@keycloak/keycloak-admin-ui 26.4.7 → 26.5.1

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 (69) hide show
  1. package/lib/.vite/manifest.json +53 -43
  2. package/lib/AddJWTAuthorizationGrant-CmYIQF47.js +69 -0
  3. package/lib/AddJWTAuthorizationGrant-CmYIQF47.js.map +1 -0
  4. package/lib/{AddKubernetesConnect-TKm82MxO.js → AddKubernetesConnect--zBiT7am.js} +4 -4
  5. package/lib/{AddKubernetesConnect-TKm82MxO.js.map → AddKubernetesConnect--zBiT7am.js.map} +1 -1
  6. package/lib/{AddOAuth2-Bg_V5CMD.js → AddOAuth2-BLRNGQKN.js} +15 -15
  7. package/lib/{AddOAuth2-Bg_V5CMD.js.map → AddOAuth2-BLRNGQKN.js.map} +1 -1
  8. package/lib/{AddSpiffeConnect-gH8LxYcP.js → AddSpiffeConnect-NfHagx80.js} +5 -5
  9. package/lib/{AddSpiffeConnect-gH8LxYcP.js.map → AddSpiffeConnect-NfHagx80.js.map} +1 -1
  10. package/lib/{CreateFlow-6M8Wg_2H.js → CreateFlow-Bf02T80Q.js} +2 -2
  11. package/lib/{CreateFlow-6M8Wg_2H.js.map → CreateFlow-Bf02T80Q.js.map} +1 -1
  12. package/lib/DetailOrganization-DWvk7gJ9.js +194 -0
  13. package/lib/DetailOrganization-DWvk7gJ9.js.map +1 -0
  14. package/lib/{ExecutorForm-BYCH7c3u.js → ExecutorForm-DHTRUoB1.js} +2 -2
  15. package/lib/{ExecutorForm-BYCH7c3u.js.map → ExecutorForm-DHTRUoB1.js.map} +1 -1
  16. package/lib/{FlowDetails-Dkl-8lLX.js → FlowDetails--N_U426z.js} +1021 -1048
  17. package/lib/{FlowDetails-Dkl-8lLX.js.map → FlowDetails--N_U426z.js.map} +1 -1
  18. package/lib/{NewOrganization-CBaP7xLv.js → NewOrganization-7we_ianL.js} +12 -12
  19. package/lib/{NewOrganization-CBaP7xLv.js.map → NewOrganization-7we_ianL.js.map} +1 -1
  20. package/lib/{PermissionConfigurationDetails-C0sgaW6Y.js → PermissionConfigurationDetails-u9MRYXxC.js} +18 -18
  21. package/lib/{PermissionConfigurationDetails-C0sgaW6Y.js.map → PermissionConfigurationDetails-u9MRYXxC.js.map} +1 -1
  22. package/lib/{PermissionDetails-CCdfBuaW.js → PermissionDetails-DxeSTYxA.js} +2 -2
  23. package/lib/{PermissionDetails-CCdfBuaW.js.map → PermissionDetails-DxeSTYxA.js.map} +1 -1
  24. package/lib/{RealmSection-CbqC2up8.js → RealmSection-DoqGXY7F.js} +7 -7
  25. package/lib/{RealmSection-CbqC2up8.js.map → RealmSection-DoqGXY7F.js.map} +1 -1
  26. package/lib/{ResourceDetails-DWXjggUc.js → ResourceDetails-Bn6Uim5l.js} +3 -3
  27. package/lib/{ResourceDetails-DWXjggUc.js.map → ResourceDetails-Bn6Uim5l.js.map} +1 -1
  28. package/lib/{ScopeDetails-dcHTfc9f.js → ScopeDetails-BCjTo6cS.js} +2 -2
  29. package/lib/{ScopeDetails-dcHTfc9f.js.map → ScopeDetails-BCjTo6cS.js.map} +1 -1
  30. package/lib/{ScopePicker-DNYZfIbU.js → ScopePicker-Dd6Cs54v.js} +7 -7
  31. package/lib/{ScopePicker-DNYZfIbU.js.map → ScopePicker-Dd6Cs54v.js.map} +1 -1
  32. package/lib/WorkflowDetailForm-alfgEItU.js +4938 -0
  33. package/lib/WorkflowDetailForm-alfgEItU.js.map +1 -0
  34. package/lib/WorkflowsSection-DflIdHaB.js +135 -0
  35. package/lib/WorkflowsSection-DflIdHaB.js.map +1 -0
  36. package/lib/client-scopes/details/SearchFilter.d.ts +1 -1
  37. package/lib/clients/constants.d.ts +2 -0
  38. package/lib/clients/keys/ImportKeyDialog.d.ts +3 -1
  39. package/lib/components/dynamic/ClaimDisplayComponent.d.ts +2 -0
  40. package/lib/components/dynamic/IdentityProviderMultiSelectComponent.d.ts +2 -0
  41. package/lib/components/dynamic/MultivaluedListComponent.d.ts +6 -1
  42. package/lib/components/dynamic/components.d.ts +2 -1
  43. package/lib/components/identity-provider/IdentityProviderSelect.d.ts +10 -0
  44. package/lib/components/users/UserDataTableAttributeSearchForm.d.ts +2 -1
  45. package/lib/groups/GroupRoleMapping.d.ts +2 -1
  46. package/lib/identity-providers/add/AddJWTAuthorizationGrant.d.ts +1 -0
  47. package/lib/identity-providers/add/JWTAuthorizationGrantAssertionSettings.d.ts +1 -0
  48. package/lib/identity-providers/add/JWTAuthorizationGrantSettings.d.ts +1 -0
  49. package/lib/identity-providers/add/JwksSettings.d.ts +5 -0
  50. package/lib/identity-providers/routes/IdentityProviderJWTAuthorizationGrant.d.ts +7 -0
  51. package/lib/{index-YEmLy1gM.js → index-Ddam0zn3.js} +28912 -27332
  52. package/lib/{index-YEmLy1gM.js.map → index-Ddam0zn3.js.map} +1 -1
  53. package/lib/index.d.ts +2 -0
  54. package/lib/keycloak-admin-ui.js +147 -145
  55. package/lib/organizations/Invitations.d.ts +1 -0
  56. package/lib/organizations/MembersSection.d.ts +1 -0
  57. package/lib/realm-settings/TokensTab.d.ts +2 -2
  58. package/lib/utils/useIsFeatureEnabled.d.ts +1 -0
  59. package/lib/workflows/WorkflowDetailForm.d.ts +1 -0
  60. package/lib/workflows/routes/WorkflowDetail.d.ts +9 -0
  61. package/package.json +34 -22
  62. package/lib/CreateWorkflow-zbDnQ8Gr.js +0 -86
  63. package/lib/CreateWorkflow-zbDnQ8Gr.js.map +0 -1
  64. package/lib/DetailOrganization-DfVZ7YOx.js +0 -164
  65. package/lib/DetailOrganization-DfVZ7YOx.js.map +0 -1
  66. package/lib/WorkflowsSection-DZtAH1DA.js +0 -92
  67. package/lib/WorkflowsSection-DZtAH1DA.js.map +0 -1
  68. package/lib/workflows/CreateWorkflow.d.ts +0 -1
  69. package/lib/workflows/routes/AddWorkflow.d.ts +0 -7
@@ -1,13 +1,13 @@
1
1
  {
2
- "_ScopePicker-DNYZfIbU.js": {
3
- "file": "ScopePicker-DNYZfIbU.js",
2
+ "_ScopePicker-Dd6Cs54v.js": {
3
+ "file": "ScopePicker-Dd6Cs54v.js",
4
4
  "name": "ScopePicker",
5
5
  "imports": [
6
- "_index-YEmLy1gM.js"
6
+ "_index-Ddam0zn3.js"
7
7
  ]
8
8
  },
9
- "_index-YEmLy1gM.js": {
10
- "file": "index-YEmLy1gM.js",
9
+ "_index-Ddam0zn3.js": {
10
+ "file": "index-Ddam0zn3.js",
11
11
  "name": "index",
12
12
  "dynamicImports": [
13
13
  "src/authentication/FlowDetails.tsx",
@@ -22,87 +22,97 @@
22
22
  "src/identity-providers/add/AddSpiffeConnect.tsx",
23
23
  "src/identity-providers/add/AddKubernetesConnect.tsx",
24
24
  "src/identity-providers/add/AddOAuth2.tsx",
25
+ "src/identity-providers/add/AddJWTAuthorizationGrant.tsx",
25
26
  "src/organizations/NewOrganization.tsx",
26
27
  "src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx",
27
28
  "src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx",
28
29
  "src/realm-settings/ExecutorForm.tsx",
29
30
  "src/realm-settings/ExecutorForm.tsx",
30
31
  "src/realm/RealmSection.tsx",
31
- "src/workflows/CreateWorkflow.tsx",
32
- "src/workflows/WorkflowsSection.tsx"
32
+ "src/workflows/WorkflowsSection.tsx",
33
+ "src/workflows/WorkflowDetailForm.tsx"
33
34
  ]
34
35
  },
35
36
  "src/authentication/FlowDetails.tsx": {
36
- "file": "FlowDetails-Dkl-8lLX.js",
37
+ "file": "FlowDetails--N_U426z.js",
37
38
  "name": "FlowDetails",
38
39
  "src": "src/authentication/FlowDetails.tsx",
39
40
  "isDynamicEntry": true,
40
41
  "imports": [
41
- "_index-YEmLy1gM.js"
42
+ "_index-Ddam0zn3.js"
42
43
  ]
43
44
  },
44
45
  "src/authentication/form/CreateFlow.tsx": {
45
- "file": "CreateFlow-6M8Wg_2H.js",
46
+ "file": "CreateFlow-Bf02T80Q.js",
46
47
  "name": "CreateFlow",
47
48
  "src": "src/authentication/form/CreateFlow.tsx",
48
49
  "isDynamicEntry": true,
49
50
  "imports": [
50
- "_index-YEmLy1gM.js"
51
+ "_index-Ddam0zn3.js"
51
52
  ]
52
53
  },
53
54
  "src/clients/authorization/PermissionDetails.tsx": {
54
- "file": "PermissionDetails-CCdfBuaW.js",
55
+ "file": "PermissionDetails-DxeSTYxA.js",
55
56
  "name": "PermissionDetails",
56
57
  "src": "src/clients/authorization/PermissionDetails.tsx",
57
58
  "isDynamicEntry": true,
58
59
  "imports": [
59
- "_index-YEmLy1gM.js"
60
+ "_index-Ddam0zn3.js"
60
61
  ]
61
62
  },
62
63
  "src/clients/authorization/ResourceDetails.tsx": {
63
- "file": "ResourceDetails-DWXjggUc.js",
64
+ "file": "ResourceDetails-Bn6Uim5l.js",
64
65
  "name": "ResourceDetails",
65
66
  "src": "src/clients/authorization/ResourceDetails.tsx",
66
67
  "isDynamicEntry": true,
67
68
  "imports": [
68
- "_index-YEmLy1gM.js",
69
- "_ScopePicker-DNYZfIbU.js"
69
+ "_index-Ddam0zn3.js",
70
+ "_ScopePicker-Dd6Cs54v.js"
70
71
  ]
71
72
  },
72
73
  "src/clients/authorization/ScopeDetails.tsx": {
73
- "file": "ScopeDetails-dcHTfc9f.js",
74
+ "file": "ScopeDetails-BCjTo6cS.js",
74
75
  "name": "ScopeDetails",
75
76
  "src": "src/clients/authorization/ScopeDetails.tsx",
76
77
  "isDynamicEntry": true,
77
78
  "imports": [
78
- "_index-YEmLy1gM.js"
79
+ "_index-Ddam0zn3.js"
80
+ ]
81
+ },
82
+ "src/identity-providers/add/AddJWTAuthorizationGrant.tsx": {
83
+ "file": "AddJWTAuthorizationGrant-CmYIQF47.js",
84
+ "name": "AddJWTAuthorizationGrant",
85
+ "src": "src/identity-providers/add/AddJWTAuthorizationGrant.tsx",
86
+ "isDynamicEntry": true,
87
+ "imports": [
88
+ "_index-Ddam0zn3.js"
79
89
  ]
80
90
  },
81
91
  "src/identity-providers/add/AddKubernetesConnect.tsx": {
82
- "file": "AddKubernetesConnect-TKm82MxO.js",
92
+ "file": "AddKubernetesConnect--zBiT7am.js",
83
93
  "name": "AddKubernetesConnect",
84
94
  "src": "src/identity-providers/add/AddKubernetesConnect.tsx",
85
95
  "isDynamicEntry": true,
86
96
  "imports": [
87
- "_index-YEmLy1gM.js"
97
+ "_index-Ddam0zn3.js"
88
98
  ]
89
99
  },
90
100
  "src/identity-providers/add/AddOAuth2.tsx": {
91
- "file": "AddOAuth2-Bg_V5CMD.js",
101
+ "file": "AddOAuth2-BLRNGQKN.js",
92
102
  "name": "AddOAuth2",
93
103
  "src": "src/identity-providers/add/AddOAuth2.tsx",
94
104
  "isDynamicEntry": true,
95
105
  "imports": [
96
- "_index-YEmLy1gM.js"
106
+ "_index-Ddam0zn3.js"
97
107
  ]
98
108
  },
99
109
  "src/identity-providers/add/AddSpiffeConnect.tsx": {
100
- "file": "AddSpiffeConnect-gH8LxYcP.js",
110
+ "file": "AddSpiffeConnect-NfHagx80.js",
101
111
  "name": "AddSpiffeConnect",
102
112
  "src": "src/identity-providers/add/AddSpiffeConnect.tsx",
103
113
  "isDynamicEntry": true,
104
114
  "imports": [
105
- "_index-YEmLy1gM.js"
115
+ "_index-Ddam0zn3.js"
106
116
  ]
107
117
  },
108
118
  "src/index.ts": {
@@ -111,71 +121,71 @@
111
121
  "src": "src/index.ts",
112
122
  "isEntry": true,
113
123
  "imports": [
114
- "_index-YEmLy1gM.js"
124
+ "_index-Ddam0zn3.js"
115
125
  ]
116
126
  },
117
127
  "src/organizations/DetailOrganization.tsx": {
118
- "file": "DetailOrganization-DfVZ7YOx.js",
128
+ "file": "DetailOrganization-DWvk7gJ9.js",
119
129
  "name": "DetailOrganization",
120
130
  "src": "src/organizations/DetailOrganization.tsx",
121
131
  "isDynamicEntry": true,
122
132
  "imports": [
123
- "_index-YEmLy1gM.js"
133
+ "_index-Ddam0zn3.js"
124
134
  ]
125
135
  },
126
136
  "src/organizations/NewOrganization.tsx": {
127
- "file": "NewOrganization-CBaP7xLv.js",
137
+ "file": "NewOrganization-7we_ianL.js",
128
138
  "name": "NewOrganization",
129
139
  "src": "src/organizations/NewOrganization.tsx",
130
140
  "isDynamicEntry": true,
131
141
  "imports": [
132
- "_index-YEmLy1gM.js"
142
+ "_index-Ddam0zn3.js"
133
143
  ]
134
144
  },
135
145
  "src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx": {
136
- "file": "PermissionConfigurationDetails-C0sgaW6Y.js",
146
+ "file": "PermissionConfigurationDetails-u9MRYXxC.js",
137
147
  "name": "PermissionConfigurationDetails",
138
148
  "src": "src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx",
139
149
  "isDynamicEntry": true,
140
150
  "imports": [
141
- "_index-YEmLy1gM.js",
142
- "_ScopePicker-DNYZfIbU.js"
151
+ "_index-Ddam0zn3.js",
152
+ "_ScopePicker-Dd6Cs54v.js"
143
153
  ]
144
154
  },
145
155
  "src/realm-settings/ExecutorForm.tsx": {
146
- "file": "ExecutorForm-BYCH7c3u.js",
156
+ "file": "ExecutorForm-DHTRUoB1.js",
147
157
  "name": "ExecutorForm",
148
158
  "src": "src/realm-settings/ExecutorForm.tsx",
149
159
  "isDynamicEntry": true,
150
160
  "imports": [
151
- "_index-YEmLy1gM.js"
161
+ "_index-Ddam0zn3.js"
152
162
  ]
153
163
  },
154
164
  "src/realm/RealmSection.tsx": {
155
- "file": "RealmSection-CbqC2up8.js",
165
+ "file": "RealmSection-DoqGXY7F.js",
156
166
  "name": "RealmSection",
157
167
  "src": "src/realm/RealmSection.tsx",
158
168
  "isDynamicEntry": true,
159
169
  "imports": [
160
- "_index-YEmLy1gM.js"
170
+ "_index-Ddam0zn3.js"
161
171
  ]
162
172
  },
163
- "src/workflows/CreateWorkflow.tsx": {
164
- "file": "CreateWorkflow-zbDnQ8Gr.js",
165
- "name": "CreateWorkflow",
166
- "src": "src/workflows/CreateWorkflow.tsx",
173
+ "src/workflows/WorkflowDetailForm.tsx": {
174
+ "file": "WorkflowDetailForm-alfgEItU.js",
175
+ "name": "WorkflowDetailForm",
176
+ "src": "src/workflows/WorkflowDetailForm.tsx",
167
177
  "isDynamicEntry": true,
168
178
  "imports": [
169
- "_index-YEmLy1gM.js"
179
+ "_index-Ddam0zn3.js"
170
180
  ]
171
181
  },
172
182
  "src/workflows/WorkflowsSection.tsx": {
173
- "file": "WorkflowsSection-DZtAH1DA.js",
183
+ "file": "WorkflowsSection-DflIdHaB.js",
174
184
  "name": "WorkflowsSection",
175
185
  "src": "src/workflows/WorkflowsSection.tsx",
176
186
  "isDynamicEntry": true,
177
187
  "imports": [
178
- "_index-YEmLy1gM.js"
188
+ "_index-Ddam0zn3.js"
179
189
  ]
180
190
  },
181
191
  "style.css": {
@@ -0,0 +1,69 @@
1
+ import { jsxs as i, Fragment as g, jsx as t } from "react/jsx-runtime";
2
+ import { u as p, b as A, _ as b, a as f, V as P, P as S, F as z, c as I, bG as C, A as F, B as s, bz as G, d as w, bA as T } from "./index-Ddam0zn3.js";
3
+ import { useTranslation as V } from "react-i18next";
4
+ import { useNavigate as j, Link as x } from "react-router-dom";
5
+ function B() {
6
+ const { adminClient: d } = p(), { t: e } = V(), c = j(), r = "jwt-authorization-grant", n = A({
7
+ defaultValues: { alias: r, config: { allowCreate: "true" } },
8
+ mode: "onChange"
9
+ }), {
10
+ handleSubmit: l,
11
+ formState: { isDirty: m }
12
+ } = n, { addAlert: u, addError: h } = b(), { realm: o } = f(), v = async (a) => {
13
+ delete a.discoveryEndpoint;
14
+ try {
15
+ await d.identityProviders.create({
16
+ ...a,
17
+ providerId: r
18
+ }), u(e("createIdentityProviderSuccess"), w.success), c(
19
+ T({
20
+ realm: o,
21
+ providerId: r,
22
+ alias: a.alias,
23
+ tab: "settings"
24
+ })
25
+ );
26
+ } catch (y) {
27
+ h("createIdentityProviderError", y);
28
+ }
29
+ };
30
+ return /* @__PURE__ */ i(g, { children: [
31
+ /* @__PURE__ */ t(P, { titleKey: e("addJWTAuthorizationGrantProvider") }),
32
+ /* @__PURE__ */ t(S, { variant: "light", children: /* @__PURE__ */ t(z, { ...n, children: /* @__PURE__ */ i(
33
+ I,
34
+ {
35
+ role: "manage-identity-providers",
36
+ isHorizontal: !0,
37
+ onSubmit: l(v),
38
+ children: [
39
+ /* @__PURE__ */ t(C, {}),
40
+ /* @__PURE__ */ i(F, { children: [
41
+ /* @__PURE__ */ t(
42
+ s,
43
+ {
44
+ isDisabled: !m,
45
+ variant: "primary",
46
+ type: "submit",
47
+ "data-testid": "createProvider",
48
+ children: e("add")
49
+ }
50
+ ),
51
+ /* @__PURE__ */ t(
52
+ s,
53
+ {
54
+ variant: "link",
55
+ "data-testid": "cancel",
56
+ component: (a) => /* @__PURE__ */ t(x, { ...a, to: G({ realm: o }) }),
57
+ children: e("cancel")
58
+ }
59
+ )
60
+ ] })
61
+ ]
62
+ }
63
+ ) }) })
64
+ ] });
65
+ }
66
+ export {
67
+ B as default
68
+ };
69
+ //# sourceMappingURL=AddJWTAuthorizationGrant-CmYIQF47.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddJWTAuthorizationGrant-CmYIQF47.js","sources":["../src/identity-providers/add/AddJWTAuthorizationGrant.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport JWTAuthorizationGrantSettings from \"./JWTAuthorizationGrantSettings\";\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddJWTAuthorizationGrantConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"jwt-authorization-grant\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addJWTAuthorizationGrantProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <JWTAuthorizationGrantSettings />\n\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddJWTAuthorizationGrantConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","JWTAuthorizationGrantSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AAsBA,SAAwBA,IAAkC;AACxD,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,2BAELC,IAAOC,EAAmC;AAAA,IAC9C,eAAe,EAAE,OAAOF,GAAI,QAAQ,EAAE,aAAa,SAAO;AAAA,IAC1D,MAAM;AAAA,EAAA,CACP,GACK;AAAA,IACJ,cAAAG;AAAA,IACA,WAAW,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACnBH,GAEE,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAwC;AAC9D,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GACjEd;AAAA,QACEe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAY;AACnB,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUtB,EAAE,kCAAkC,EAAA,CAAG;AAAA,sBAC5DuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAA8B;AAAA,4BAE9BC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,YAAY,CAACpB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAR,EAACS,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAnB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i, Fragment as y, jsx as e } from "react/jsx-runtime";
2
- import { u as h, b as p, _ as g, a as P, V as f, P as A, F as I, c as S, bA as C, A as F, B as o, by as K, d as V, bz as k } from "./index-YEmLy1gM.js";
2
+ import { u as h, b as p, _ as g, a as P, V as f, P as A, F as I, c as S, bB as C, A as F, B as o, bz as K, d as V, bA as k } from "./index-Ddam0zn3.js";
3
3
  import { useTranslation as w } from "react-i18next";
4
- import { useNavigate as x, Link as E } from "react-router-dom";
4
+ import { useNavigate as x, Link as B } from "react-router-dom";
5
5
  function _() {
6
6
  const { adminClient: d } = h(), { t: r } = w(), c = x(), a = "kubernetes", n = p({
7
7
  defaultValues: { alias: a, config: { allowCreate: "true" } },
@@ -49,7 +49,7 @@ function _() {
49
49
  {
50
50
  variant: "link",
51
51
  "data-testid": "cancel",
52
- component: (t) => /* @__PURE__ */ e(E, { ...t, to: K({ realm: s }) }),
52
+ component: (t) => /* @__PURE__ */ e(B, { ...t, to: K({ realm: s }) }),
53
53
  children: r("cancel")
54
54
  }
55
55
  )
@@ -62,4 +62,4 @@ function _() {
62
62
  export {
63
63
  _ as default
64
64
  };
65
- //# sourceMappingURL=AddKubernetesConnect-TKm82MxO.js.map
65
+ //# sourceMappingURL=AddKubernetesConnect--zBiT7am.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddKubernetesConnect-TKm82MxO.js","sources":["../src/identity-providers/add/AddKubernetesConnect.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { KubernetesSettings } from \"./KubernetesSettings\";\n\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddKubernetesConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"kubernetes\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const { handleSubmit } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addKubernetesProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <KubernetesSettings />\n <ActionGroup>\n <Button\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddKubernetesConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","KubernetesSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AAuBA,SAAwBA,IAAuB;AAC7C,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,cAELC,IAAOC,EAAmC;AAAA,IAC9C,eAAe,EAAE,OAAOF,GAAI,QAAQ,EAAE,aAAa,SAAO;AAAA,IAC1D,MAAM;AAAA,EAAA,CACP,GACK,EAAE,cAAAG,MAAiBF,GAEnB,EAAE,UAAAG,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAwC;AAC9D,WAAOA,EA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AA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"AddKubernetesConnect--zBiT7am.js","sources":["../src/identity-providers/add/AddKubernetesConnect.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { KubernetesSettings } from \"./KubernetesSettings\";\n\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddKubernetesConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"kubernetes\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const { handleSubmit } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addKubernetesProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <KubernetesSettings />\n <ActionGroup>\n <Button\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddKubernetesConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","KubernetesSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AAuBA,SAAwBA,IAAuB;AAC7C,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,cAELC,IAAOC,EAAmC;AAAA,IAC9C,eAAe,EAAE,OAAOF,GAAI,QAAQ,EAAE,aAAa,SAAO;AAAA,IAC1D,MAAM;AAAA,EAAA,CACP,GACK,EAAE,cAAAG,MAAiBF,GAEnB,EAAE,UAAAG,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAwC;AAC9D,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMhB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGgB;AAAA,QACH,YAAYV;AAAA,MAAA,CACb,GACDI,EAASR,EAAE,+BAA+B,GAAGe,EAAa,OAAO,GACjEb;AAAA,QACEc,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYP;AAAA,UACZ,OAAOU,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAY;AACnB,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUrB,EAAE,uBAAuB,EAAA,CAAG;AAAA,sBACjDsB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGlB,GAChB,UAAA,gBAAAa;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUjB,EAAaM,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAmB;AAAA,4BACnBC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAP;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAR,EAACS,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAnB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,9 +1,9 @@
1
- import { jsxs as r, Fragment as b, jsx as t } from "react/jsx-runtime";
2
- import { u as p, b as f, _ as g, a as I, V as P, P as C, F as A, c as S, bB as D, bC as O, bD as F, bE as E, A as V, B as o, by as x, d as B, bz as j } from "./index-YEmLy1gM.js";
3
- import { useTranslation as k } from "react-i18next";
4
- import { useNavigate as w, Link as z } from "react-router-dom";
1
+ import { jsxs as r, Fragment as p, jsx as t } from "react/jsx-runtime";
2
+ import { u as y, b as f, _ as g, a as I, V as P, P as A, F as C, c as S, bC as D, bD as F, bE as O, bF as E, A as V, B as o, bz as x, d as j, bA as k } from "./index-Ddam0zn3.js";
3
+ import { useTranslation as w } from "react-i18next";
4
+ import { useNavigate as z, Link as B } from "react-router-dom";
5
5
  function L() {
6
- const { adminClient: d } = p(), { t: a } = k(), c = w(), i = "oauth2", n = f({
6
+ const { adminClient: d } = y(), { t: a } = w(), c = z(), i = "oauth2", n = f({
7
7
  defaultValues: { alias: i },
8
8
  mode: "onChange"
9
9
  }), {
@@ -15,21 +15,21 @@ function L() {
15
15
  await d.identityProviders.create({
16
16
  ...e,
17
17
  providerId: i
18
- }), u(a("createIdentityProviderSuccess"), B.success), c(
19
- j({
18
+ }), u(a("createIdentityProviderSuccess"), j.success), c(
19
+ k({
20
20
  realm: s,
21
21
  providerId: i,
22
22
  alias: e.alias,
23
23
  tab: "settings"
24
24
  })
25
25
  );
26
- } catch (y) {
27
- v("createIdentityProviderError", y);
26
+ } catch (b) {
27
+ v("createIdentityProviderError", b);
28
28
  }
29
29
  };
30
- return /* @__PURE__ */ r(b, { children: [
30
+ return /* @__PURE__ */ r(p, { children: [
31
31
  /* @__PURE__ */ t(P, { titleKey: a("addOAuth2Provider") }),
32
- /* @__PURE__ */ t(C, { variant: "light", children: /* @__PURE__ */ t(A, { ...n, children: /* @__PURE__ */ r(
32
+ /* @__PURE__ */ t(A, { variant: "light", children: /* @__PURE__ */ t(C, { ...n, children: /* @__PURE__ */ r(
33
33
  S,
34
34
  {
35
35
  role: "manage-identity-providers",
@@ -37,8 +37,8 @@ function L() {
37
37
  onSubmit: l(h),
38
38
  children: [
39
39
  /* @__PURE__ */ t(D, {}),
40
- /* @__PURE__ */ t(O, { isOIDC: !1 }),
41
- /* @__PURE__ */ t(F, {}),
40
+ /* @__PURE__ */ t(F, { isOIDC: !1 }),
41
+ /* @__PURE__ */ t(O, {}),
42
42
  /* @__PURE__ */ t(E, {}),
43
43
  /* @__PURE__ */ r(V, { children: [
44
44
  /* @__PURE__ */ t(
@@ -56,7 +56,7 @@ function L() {
56
56
  {
57
57
  variant: "link",
58
58
  "data-testid": "cancel",
59
- component: (e) => /* @__PURE__ */ t(z, { ...e, to: x({ realm: s }) }),
59
+ component: (e) => /* @__PURE__ */ t(B, { ...e, to: x({ realm: s }) }),
60
60
  children: a("cancel")
61
61
  }
62
62
  )
@@ -69,4 +69,4 @@ function L() {
69
69
  export {
70
70
  L as default
71
71
  };
72
- //# sourceMappingURL=AddOAuth2-Bg_V5CMD.js.map
72
+ //# sourceMappingURL=AddOAuth2-BLRNGQKN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddOAuth2-Bg_V5CMD.js","sources":["../src/identity-providers/add/AddOAuth2.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { OIDCAuthentication } from \"./OIDCAuthentication\";\nimport { OIDCGeneralSettings } from \"./OIDCGeneralSettings\";\nimport { OpenIdConnectSettings } from \"./OpenIdConnectSettings\";\nimport { UserProfileClaimsSettings } from \"./OAuth2UserProfileClaimsSettings\";\n\ntype DiscoveryIdentity = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddOpenIdConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = `oauth2`;\n\n const form = useForm<IdentityProviderRepresentation>({\n defaultValues: { alias: id },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentity) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addOAuth2Provider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <OIDCGeneralSettings />\n <OpenIdConnectSettings isOIDC={false} />\n <OIDCAuthentication />\n <UserProfileClaimsSettings />\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddOpenIdConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","OIDCGeneralSettings","OpenIdConnectSettings","OIDCAuthentication","UserProfileClaimsSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AA0BA,SAAwBA,IAAmB;AACzC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,UAELC,IAAOC,EAAwC;AAAA,IACnD,eAAe,EAAE,OAAOF,EAAA;AAAA,IACxB,MAAM;AAAA,EAAA,CACP,GACK;AAAA,IACJ,cAAAG;AAAA,IACA,WAAW,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACnBH,GAEE,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAgC;AACtD,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GACjEd;AAAA,QACEe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAO;AACd,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUtB,EAAE,mBAAmB,EAAA,CAAG;AAAA,sBAC7CuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAoB;AAAA,UACrB,gBAAAL,EAACM,GAAA,EAAsB,QAAQ,GAAA,CAAO;AAAA,4BACrCC,GAAA,EAAmB;AAAA,4BACnBC,GAAA,EAA0B;AAAA,4BAC1BC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAT;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,YAAY,CAACvB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAX,EAACY,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAtB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"AddOAuth2-BLRNGQKN.js","sources":["../src/identity-providers/add/AddOAuth2.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { OIDCAuthentication } from \"./OIDCAuthentication\";\nimport { OIDCGeneralSettings } from \"./OIDCGeneralSettings\";\nimport { OpenIdConnectSettings } from \"./OpenIdConnectSettings\";\nimport { UserProfileClaimsSettings } from \"./OAuth2UserProfileClaimsSettings\";\n\ntype DiscoveryIdentity = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddOpenIdConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = `oauth2`;\n\n const form = useForm<IdentityProviderRepresentation>({\n defaultValues: { alias: id },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentity) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addOAuth2Provider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <OIDCGeneralSettings />\n <OpenIdConnectSettings isOIDC={false} />\n <OIDCAuthentication />\n <UserProfileClaimsSettings />\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddOpenIdConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","OIDCGeneralSettings","OpenIdConnectSettings","OIDCAuthentication","UserProfileClaimsSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AA0BA,SAAwBA,IAAmB;AACzC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,UAELC,IAAOC,EAAwC;AAAA,IACnD,eAAe,EAAE,OAAOF,EAAA;AAAA,IACxB,MAAM;AAAA,EAAA,CACP,GACK;AAAA,IACJ,cAAAG;AAAA,IACA,WAAW,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACnBH,GAEE,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAgC;AACtD,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GACjEd;AAAA,QACEe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAO;AACd,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUtB,EAAE,mBAAmB,EAAA,CAAG;AAAA,sBAC7CuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAoB;AAAA,UACrB,gBAAAL,EAACM,GAAA,EAAsB,QAAQ,GAAA,CAAO;AAAA,4BACrCC,GAAA,EAAmB;AAAA,4BACnBC,GAAA,EAA0B;AAAA,4BAC1BC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAT;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,YAAY,CAACvB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAX,EAACY,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAtB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, Fragment as y, jsx as e } from "react/jsx-runtime";
2
- import { u as h, b, _ as g, a as P, V as S, P as A, F as I, c as C, bx as F, A as x, B as o, by as V, d as w, bz as E } from "./index-YEmLy1gM.js";
2
+ import { u as h, b, _ as g, a as P, V as S, P as A, F as I, c as C, by as F, A as V, B as o, bz as w, d as x, bA as E } from "./index-Ddam0zn3.js";
3
3
  import { useTranslation as j } from "react-i18next";
4
4
  import { useNavigate as k, Link as z } from "react-router-dom";
5
5
  function G() {
@@ -15,7 +15,7 @@ function G() {
15
15
  await d.identityProviders.create({
16
16
  ...t,
17
17
  providerId: r
18
- }), u(a("createIdentityProviderSuccess"), w.success), c(
18
+ }), u(a("createIdentityProviderSuccess"), x.success), c(
19
19
  E({
20
20
  realm: s,
21
21
  providerId: r,
@@ -37,7 +37,7 @@ function G() {
37
37
  onSubmit: l(v),
38
38
  children: [
39
39
  /* @__PURE__ */ e(F, {}),
40
- /* @__PURE__ */ i(x, { children: [
40
+ /* @__PURE__ */ i(V, { children: [
41
41
  /* @__PURE__ */ e(
42
42
  o,
43
43
  {
@@ -53,7 +53,7 @@ function G() {
53
53
  {
54
54
  variant: "link",
55
55
  "data-testid": "cancel",
56
- component: (t) => /* @__PURE__ */ e(z, { ...t, to: V({ realm: s }) }),
56
+ component: (t) => /* @__PURE__ */ e(z, { ...t, to: w({ realm: s }) }),
57
57
  children: a("cancel")
58
58
  }
59
59
  )
@@ -66,4 +66,4 @@ function G() {
66
66
  export {
67
67
  G as default
68
68
  };
69
- //# sourceMappingURL=AddSpiffeConnect-gH8LxYcP.js.map
69
+ //# sourceMappingURL=AddSpiffeConnect-NfHagx80.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddSpiffeConnect-gH8LxYcP.js","sources":["../src/identity-providers/add/AddSpiffeConnect.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { SpiffeSettings } from \"./SpiffeSettings\";\n\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddSamlConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"spiffe\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addSpiffeProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <SpiffeSettings />\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddSamlConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","SpiffeSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AAuBA,SAAwBA,IAAiB;AACvC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,UAELC,IAAOC,EAAmC;AAAA,IAC9C,eAAe,EAAE,OAAOF,GAAI,QAAQ,EAAE,aAAa,SAAO;AAAA,IAC1D,MAAM;AAAA,EAAA,CACP,GACK;AAAA,IACJ,cAAAG;AAAA,IACA,WAAW,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACnBH,GAEE,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAwC;AAC9D,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GACjEd;AAAA,QACEe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAY;AACnB,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUtB,EAAE,mBAAmB,EAAA,CAAG;AAAA,sBAC7CuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAe;AAAA,4BACfC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,YAAY,CAACpB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAR,EAACS,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAnB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"AddSpiffeConnect-NfHagx80.js","sources":["../src/identity-providers/add/AddSpiffeConnect.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { SpiffeSettings } from \"./SpiffeSettings\";\n\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddSamlConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"spiffe\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addSpiffeProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <SpiffeSettings />\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddSamlConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProv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,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAe;AAAA,4BACfC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,YAAY,CAACpB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAR,EAACS,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAnB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs as r, Fragment as w, jsx as t } from "react/jsx-runtime";
2
- import { u as h, a as F, _ as b, b as v, V as y, P as g, F as S, c as A, N as C, U as I, A as T, e as H, B as N, t as P, d as i, f as V } from "./index-YEmLy1gM.js";
2
+ import { u as h, a as F, _ as b, b as v, V as y, P as g, F as S, c as A, N as C, U as I, A as T, e as H, B as N, t as P, d as i, f as V } from "./index-Ddam0zn3.js";
3
3
  import { useTranslation as k } from "react-i18next";
4
4
  import { useNavigate as x, Link as B } from "react-router-dom";
5
5
  const c = ["basic-flow", "client-flow"];
@@ -77,4 +77,4 @@ function E() {
77
77
  export {
78
78
  E as default
79
79
  };
80
- //# sourceMappingURL=CreateFlow-6M8Wg_2H.js.map
80
+ //# sourceMappingURL=CreateFlow-Bf02T80Q.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateFlow-6M8Wg_2H.js","sources":["../src/authentication/form/CreateFlow.tsx"],"sourcesContent":["import type AuthenticationFlowRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { FormSubmitButton, SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toAuthentication } from \"../routes/Authentication\";\nimport { toFlow } from \"../routes/Flow\";\nimport { NameDescription } from \"./NameDescription\";\n\nconst TYPES = [\"basic-flow\", \"client-flow\"] as const;\n\nexport default function CreateFlow() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm } = useRealm();\n const { addAlert } = useAlerts();\n const form = useForm<AuthenticationFlowRepresentation>();\n const { handleSubmit, formState } = form;\n\n const onSubmit = async (formValues: AuthenticationFlowRepresentation) => {\n const flow = { ...formValues, builtIn: false, topLevel: true };\n\n try {\n const { id } =\n await adminClient.authenticationManagement.createFlow(flow);\n addAlert(t(\"flowCreatedSuccess\"), AlertVariant.success);\n navigate(\n toFlow({\n realm,\n id: id!,\n usedBy: \"notInUse\",\n }),\n );\n } catch (error: any) {\n addAlert(\n t(\"flowCreateError\", {\n error: error.response?.data?.errorMessage || error,\n }),\n AlertVariant.danger,\n );\n }\n };\n\n return (\n <>\n <ViewHeader titleKey=\"createFlow\" subKey=\"authenticationCreateFlowHelp\" />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <NameDescription />\n <SelectControl\n name=\"providerId\"\n label={t(\"flowType\")}\n labelIcon={t(\"topLevelFlowTypeHelp\")}\n aria-label={t(\"selectFlowType\")}\n controller={{ defaultValue: TYPES[0] }}\n options={TYPES.map((type) => ({\n key: type,\n value: t(`top-level-flow-type.${type}`),\n }))}\n />\n <ActionGroup>\n <FormSubmitButton\n formState={formState}\n data-testid=\"create\"\n allowInvalid\n allowNonDirty\n >\n {t(\"create\")}\n </FormSubmitButton>\n <Button\n data-testid=\"cancel\"\n variant=\"link\"\n component={(props) => (\n <Link {...props} to={toAuthentication({ realm })}></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["TYPES","CreateFlow","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","useRealm","addAlert","useAlerts","form","useForm","handleSubmit","formState","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","formValues","flow","id","AlertVariant","toFlow","error","NameDescription","SelectControl","type","ActionGroup","FormSubmitButton","Button","props","Link","toAuthentication"],"mappings":";;;;AAoBA,MAAMA,IAAQ,CAAC,cAAc,aAAa;AAE1C,SAAwBC,IAAa;AACnC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACX,EAAE,OAAAC,EAAA,IAAUC,EAAA,GACZ,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACfC,IAAOC,EAAA,GACP,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcH;AA0BpC,SACE,gBAAAI,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAS,cAAa,QAAO,gCAA+B;AAAA,sBACvEC,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAI;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,cAAY;AAAA,QACZ,MAAK;AAAA,QACL,UAA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C,eAAY;AAAA,gBACZ,SAAQ;AAAA,gBACR,WAAW,CAACC,MACV,gBAAAjB,EAACkB,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAiB,EAAE,OAAA7B,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGnD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"CreateFlow-Bf02T80Q.js","sources":["../src/authentication/form/CreateFlow.tsx"],"sourcesContent":["import type AuthenticationFlowRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { FormSubmitButton, SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toAuthentication } from \"../routes/Authentication\";\nimport { toFlow } from \"../routes/Flow\";\nimport { NameDescription } from \"./NameDescription\";\n\nconst TYPES = [\"basic-flow\", \"client-flow\"] as const;\n\nexport default function CreateFlow() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm } = useRealm();\n const { addAlert } = useAlerts();\n const form = useForm<AuthenticationFlowRepresentation>();\n const { handleSubmit, formState } = form;\n\n const onSubmit = async (formValues: AuthenticationFlowRepresentation) => {\n const flow = { ...formValues, builtIn: false, topLevel: true };\n\n try {\n const { id } =\n await adminClient.authenticationManagement.createFlow(flow);\n addAlert(t(\"flowCreatedSuccess\"), AlertVariant.success);\n navigate(\n toFlow({\n realm,\n id: id!,\n usedBy: \"notInUse\",\n }),\n );\n } catch (error: any) {\n addAlert(\n t(\"flowCreateError\", {\n error: error.response?.data?.errorMessage || error,\n }),\n AlertVariant.danger,\n );\n }\n };\n\n return (\n <>\n <ViewHeader titleKey=\"createFlow\" subKey=\"authenticationCreateFlowHelp\" />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <NameDescription />\n <SelectControl\n name=\"providerId\"\n label={t(\"flowType\")}\n labelIcon={t(\"topLevelFlowTypeHelp\")}\n aria-label={t(\"selectFlowType\")}\n controller={{ defaultValue: TYPES[0] }}\n options={TYPES.map((type) => ({\n key: type,\n value: t(`top-level-flow-type.${type}`),\n }))}\n />\n <ActionGroup>\n <FormSubmitButton\n formState={formState}\n data-testid=\"create\"\n allowInvalid\n allowNonDirty\n >\n {t(\"create\")}\n </FormSubmitButton>\n <Button\n data-testid=\"cancel\"\n variant=\"link\"\n component={(props) => (\n <Link {...props} to={toAuthentication({ realm })}></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["TYPES","CreateFlow","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","useRealm","addAlert","useAlerts","form","useForm","handleSubmit","formState","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","formValues","flow","id","AlertVariant","toFlow","error","NameDescription","SelectControl","type","ActionGroup","FormSubmitButton","Button","props","Link","toAuthentication"],"mappings":";;;;AAoBA,MAAMA,IAAQ,CAAC,cAAc,aAAa;AAE1C,SAAwBC,IAAa;AACnC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACX,EAAE,OAAAC,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