@keycloak/keycloak-admin-ui 26.1.3 → 26.2.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.
Files changed (104) hide show
  1. package/README.md +4 -4
  2. package/lib/.vite/manifest.json +51 -30
  3. package/lib/{CreateFlow-py1khDIl.js → CreateFlow-BkGiX0Bw.js} +9 -9
  4. package/lib/{CreateFlow-py1khDIl.js.map → CreateFlow-BkGiX0Bw.js.map} +1 -1
  5. package/lib/{DetailOrganization-25SO9X0r.js → DetailOrganization-CJKEEgO8.js} +33 -33
  6. package/lib/{DetailOrganization-25SO9X0r.js.map → DetailOrganization-CJKEEgO8.js.map} +1 -1
  7. package/lib/{ExecutorForm-BD7jc-pB.js → ExecutorForm-C9_CWJhw.js} +49 -48
  8. package/lib/ExecutorForm-C9_CWJhw.js.map +1 -0
  9. package/lib/FlowDetails-InWOgFIk.js +9025 -0
  10. package/lib/FlowDetails-InWOgFIk.js.map +1 -0
  11. package/lib/NewOrganization-D93k_LVb.js +36 -0
  12. package/lib/{NewOrganization-DZMavWdP.js.map → NewOrganization-D93k_LVb.js.map} +1 -1
  13. package/lib/PermissionConfigurationDetails-DPu0gttX.js +702 -0
  14. package/lib/PermissionConfigurationDetails-DPu0gttX.js.map +1 -0
  15. package/lib/{PermissionDetails-C-QY7gyW.js → PermissionDetails-C4X5r4gF.js} +72 -72
  16. package/lib/{PermissionDetails-C-QY7gyW.js.map → PermissionDetails-C4X5r4gF.js.map} +1 -1
  17. package/lib/RealmSection-DYc_8dbl.js +179 -0
  18. package/lib/RealmSection-DYc_8dbl.js.map +1 -0
  19. package/lib/ResourceDetails-BO8zlCP_.js +226 -0
  20. package/lib/ResourceDetails-BO8zlCP_.js.map +1 -0
  21. package/lib/{ScopeDetails-DPQmyy0_.js → ScopeDetails-DyHGLML9.js} +35 -35
  22. package/lib/{ScopeDetails-DPQmyy0_.js.map → ScopeDetails-DyHGLML9.js.map} +1 -1
  23. package/lib/ScopePicker-DxDYNCCh.js +85 -0
  24. package/lib/ScopePicker-DxDYNCCh.js.map +1 -0
  25. package/lib/authentication/components/AuthenticationProviderContext.d.ts +9 -0
  26. package/lib/authentication/components/FlowRow.d.ts +1 -0
  27. package/lib/authentication/components/FlowTitle.d.ts +5 -2
  28. package/lib/clients/add/SamlSignature.d.ts +1 -0
  29. package/lib/clients/authorization/ScopePicker.d.ts +5 -2
  30. package/lib/clients/authorization/policy/LogicSelector.d.ts +1 -1
  31. package/lib/clients/authorization/policy/NameDescription.d.ts +3 -2
  32. package/lib/clients/routes/PermissionConfigurationDetails.d.ts +10 -0
  33. package/lib/components/client/ClientSelect.d.ts +6 -2
  34. package/lib/components/dynamic/BooleanComponent.d.ts +1 -1
  35. package/lib/components/dynamic/DynamicComponents.d.ts +2 -1
  36. package/lib/components/dynamic/FileComponent.d.ts +1 -1
  37. package/lib/components/dynamic/GroupComponent.d.ts +1 -1
  38. package/lib/components/dynamic/IntComponent.d.ts +1 -1
  39. package/lib/components/dynamic/ListComponent.d.ts +1 -1
  40. package/lib/components/dynamic/MapComponent.d.ts +1 -1
  41. package/lib/components/dynamic/MultivaluedListComponent.d.ts +1 -1
  42. package/lib/components/dynamic/MultivaluedStringComponent.d.ts +1 -1
  43. package/lib/components/dynamic/NumberComponent.d.ts +1 -1
  44. package/lib/components/dynamic/PasswordComponent.d.ts +1 -1
  45. package/lib/components/dynamic/RoleComponent.d.ts +1 -1
  46. package/lib/components/dynamic/ScriptComponent.d.ts +1 -1
  47. package/lib/components/dynamic/StringComponent.d.ts +1 -1
  48. package/lib/components/dynamic/TextComponent.d.ts +1 -1
  49. package/lib/components/dynamic/UserProfileAttributeListComponent.d.ts +1 -1
  50. package/lib/components/dynamic/components.d.ts +1 -0
  51. package/lib/components/form/CodeEditor.d.ts +12 -0
  52. package/lib/components/role-mapping/AddRoleMappingModal.d.ts +1 -1
  53. package/lib/components/users/UserSelect.d.ts +1 -1
  54. package/lib/context/RecentRealms.d.ts +6 -2
  55. package/lib/i18n/i18n.d.ts +4 -0
  56. package/lib/{index-DJI6O1zd.js → index-B5GgWXK6.js} +34359 -34352
  57. package/lib/{index-DJI6O1zd.js.map → index-B5GgWXK6.js.map} +1 -1
  58. package/lib/index.d.ts +1 -2
  59. package/lib/keycloak-admin-ui.css +1 -1
  60. package/lib/keycloak-admin-ui.js +162 -163
  61. package/lib/organizations/IdentityProviderSelect.d.ts +1 -1
  62. package/lib/permissions-configuration/PermissionsConfigurationSection.d.ts +1 -0
  63. package/lib/permissions-configuration/permission-configuration/AssignedPolicies.d.ts +10 -0
  64. package/lib/permissions-configuration/permission-configuration/AuthorizationScopesDetails.d.ts +10 -0
  65. package/lib/permissions-configuration/permission-configuration/ExistingPoliciesDialog.d.ts +10 -0
  66. package/lib/permissions-configuration/permission-configuration/NewPermissionConfigurationDialog.d.ts +8 -0
  67. package/lib/permissions-configuration/permission-configuration/NewPermissionPolicyDialog.d.ts +13 -0
  68. package/lib/permissions-configuration/permission-configuration/PermissionConfigurationDetails.d.ts +1 -0
  69. package/lib/permissions-configuration/permission-configuration/PermissionsConfigurationTab.d.ts +5 -0
  70. package/lib/permissions-configuration/permission-evaluation/PermissionEvaluationResult.d.ts +6 -0
  71. package/lib/permissions-configuration/permission-evaluation/PermissionsEvaluationTab.d.ts +8 -0
  72. package/lib/permissions-configuration/resource-types/ClientSelectComponent.d.ts +2 -0
  73. package/lib/permissions-configuration/resource-types/GroupSelect.d.ts +8 -0
  74. package/lib/permissions-configuration/resource-types/ResourceType.d.ts +11 -0
  75. package/lib/permissions-configuration/resource-types/RoleSelect.d.ts +5 -0
  76. package/lib/permissions-configuration/resource-types/SearchDropdown.d.ts +20 -0
  77. package/lib/permissions-configuration/routes/NewPermissionConfiguration.d.ts +9 -0
  78. package/lib/permissions-configuration/routes/NewPermissionPolicy.d.ts +9 -0
  79. package/lib/permissions-configuration/routes/PermissionConfigurationDetails.d.ts +10 -0
  80. package/lib/permissions-configuration/routes/PermissionPolicyDetails.d.ts +10 -0
  81. package/lib/permissions-configuration/routes/PermissionsConfiguration.d.ts +7 -0
  82. package/lib/permissions-configuration/routes/PermissionsConfigurationTabs.d.ts +10 -0
  83. package/lib/permissions-configuration/routes/PermissionsPolicies.d.ts +8 -0
  84. package/lib/realm/RealmRoutes.d.ts +7 -0
  85. package/lib/realm/RealmSection.d.ts +5 -0
  86. package/lib/realm/add/NewRealmForm.d.ts +5 -1
  87. package/lib/realm-settings/themes/ThemesTab.d.ts +1 -0
  88. package/lib/utils/useIsFeatureEnabled.d.ts +2 -1
  89. package/lib/utils/useSortedResourceTypes.d.ts +5 -0
  90. package/package.json +26 -37
  91. package/lib/ExecutorForm-BD7jc-pB.js.map +0 -1
  92. package/lib/FlowDetails-ngTM8T7P.js +0 -10786
  93. package/lib/FlowDetails-ngTM8T7P.js.map +0 -1
  94. package/lib/NewOrganization-DZMavWdP.js +0 -36
  95. package/lib/ResourceDetails-ClQzo4WE.js +0 -286
  96. package/lib/ResourceDetails-ClQzo4WE.js.map +0 -1
  97. package/lib/browser-ponyfill-Bz_eiQO2.js +0 -342
  98. package/lib/browser-ponyfill-Bz_eiQO2.js.map +0 -1
  99. package/lib/components/realm-selector/RealmSelector.d.ts +0 -1
  100. package/lib/permissions/PermissionsSection.d.ts +0 -1
  101. package/lib/permissions/routes/Permissions.d.ts +0 -7
  102. package/lib/permissions/routes/PermissionsTabs.d.ts +0 -9
  103. package/lib/realm/routes/AddRealm.d.ts +0 -7
  104. /package/lib/{permissions → permissions-configuration}/routes.d.ts +0 -0
@@ -1,18 +1,18 @@
1
1
  import { jsxs as c, Fragment as D, jsx as t } from "react/jsx-runtime";
2
- import { u as w, b9 as N, B as z, aH as F, b as H, n as k, br as C, bb as l, V as U, aG as B, P, F as V, c as j, q as d, A as q, d as m, h as x, e as E } from "./index-DJI6O1zd.js";
3
- import { useState as T } from "react";
4
- import { useTranslation as G } from "react-i18next";
5
- import { useNavigate as K, Link as L } from "react-router-dom";
6
- function W() {
7
- const { adminClient: r } = w(), { t: e } = G(), { id: i, scopeId: o, realm: s } = N(), p = K(), { addAlert: S, addError: f } = z(), [v, u] = F(), [n, h] = T(), b = H({
2
+ import { u as w, ao as N, V as z, S as F, b as k, n as C, aF as H, ay as l, c as U, K as V, P, F as x, d as B, Y as d, A as E, B as m, l as T, e as j } from "./index-B5GgWXK6.js";
3
+ import { useState as q } from "react";
4
+ import { useTranslation as K } from "react-i18next";
5
+ import { useNavigate as Y, Link as G } from "react-router-dom";
6
+ function R() {
7
+ const { adminClient: r } = w(), { t: e } = K(), { id: o, scopeId: i, realm: s } = N(), p = Y(), { addAlert: b, addError: v } = z(), [f, u] = F(), [n, h] = q(), g = k({
8
8
  mode: "onChange"
9
- }), { reset: g, handleSubmit: y } = b;
10
- k(
9
+ }), { reset: S, handleSubmit: y } = g;
10
+ C(
11
11
  async () => {
12
- if (o) {
12
+ if (i) {
13
13
  const a = await r.clients.getAuthorizationScope({
14
- id: i,
15
- scopeId: o
14
+ id: o,
15
+ scopeId: i
16
16
  });
17
17
  if (!a)
18
18
  throw new Error(e("notFound"));
@@ -20,48 +20,48 @@ function W() {
20
20
  }
21
21
  },
22
22
  (a) => {
23
- h(a), g({ ...a });
23
+ h(a), S({ ...a });
24
24
  },
25
25
  []
26
26
  );
27
27
  const A = async (a) => {
28
28
  try {
29
- o ? (await r.clients.updateAuthorizationScope(
30
- { id: i, scopeId: o },
29
+ i ? (await r.clients.updateAuthorizationScope(
30
+ { id: o, scopeId: i },
31
31
  a
32
32
  ), h(a)) : (await r.clients.createAuthorizationScope(
33
- { id: i },
33
+ { id: o },
34
34
  {
35
35
  name: a.name,
36
36
  displayName: a.displayName,
37
37
  iconUri: a.iconUri
38
38
  }
39
- ), p(l({ realm: s, clientId: i, tab: "scopes" }))), S(
40
- e((o ? "update" : "create") + "ScopeSuccess"),
41
- E.success
39
+ ), p(l({ realm: s, clientId: o, tab: "scopes" }))), b(
40
+ e((i ? "update" : "create") + "ScopeSuccess"),
41
+ j.success
42
42
  );
43
43
  } catch (I) {
44
- f("scopeSaveError", I);
44
+ v("scopeSaveError", I);
45
45
  }
46
46
  };
47
47
  return /* @__PURE__ */ c(D, { children: [
48
48
  /* @__PURE__ */ t(
49
- C,
49
+ H,
50
50
  {
51
- clientId: i,
52
- open: v,
51
+ clientId: o,
52
+ open: f,
53
53
  toggleDialog: u,
54
54
  selectedScope: n,
55
- refresh: () => p(l({ realm: s, clientId: i, tab: "scopes" }))
55
+ refresh: () => p(l({ realm: s, clientId: o, tab: "scopes" }))
56
56
  }
57
57
  ),
58
58
  /* @__PURE__ */ t(
59
59
  U,
60
60
  {
61
- titleKey: o ? n?.name : e("createAuthorizationScope"),
62
- dropdownItems: o ? [
61
+ titleKey: i ? n?.name : e("createAuthorizationScope"),
62
+ dropdownItems: i ? [
63
63
  /* @__PURE__ */ t(
64
- B,
64
+ V,
65
65
  {
66
66
  "data-testid": "delete-resource",
67
67
  onClick: () => u(),
@@ -72,8 +72,8 @@ function W() {
72
72
  ] : void 0
73
73
  }
74
74
  ),
75
- /* @__PURE__ */ t(P, { variant: "light", children: /* @__PURE__ */ t(V, { ...b, children: /* @__PURE__ */ c(
76
- j,
75
+ /* @__PURE__ */ t(P, { variant: "light", children: /* @__PURE__ */ t(x, { ...g, children: /* @__PURE__ */ c(
76
+ B,
77
77
  {
78
78
  isHorizontal: !0,
79
79
  role: "manage-authorization",
@@ -104,11 +104,11 @@ function W() {
104
104
  labelIcon: e("iconUriHelp")
105
105
  }
106
106
  ),
107
- /* @__PURE__ */ t(q, { children: /* @__PURE__ */ c("div", { className: "pf-v5-u-mt-md", children: [
107
+ /* @__PURE__ */ t(E, { children: /* @__PURE__ */ c("div", { className: "pf-v5-u-mt-md", children: [
108
108
  /* @__PURE__ */ t(
109
109
  m,
110
110
  {
111
- variant: x.primary,
111
+ variant: T.primary,
112
112
  type: "submit",
113
113
  "data-testid": "save",
114
114
  children: e("save")
@@ -119,7 +119,7 @@ function W() {
119
119
  {
120
120
  variant: "link",
121
121
  "data-testid": "revert",
122
- onClick: () => g({ ...n }),
122
+ onClick: () => S({ ...n }),
123
123
  children: e("revert")
124
124
  }
125
125
  ) : /* @__PURE__ */ t(
@@ -128,12 +128,12 @@ function W() {
128
128
  variant: "link",
129
129
  "data-testid": "cancel",
130
130
  component: (a) => /* @__PURE__ */ t(
131
- L,
131
+ G,
132
132
  {
133
133
  ...a,
134
134
  to: l({
135
135
  realm: s,
136
- clientId: i,
136
+ clientId: o,
137
137
  tab: "scopes"
138
138
  })
139
139
  }
@@ -148,6 +148,6 @@ function W() {
148
148
  ] });
149
149
  }
150
150
  export {
151
- W as default
151
+ R as default
152
152
  };
153
- //# sourceMappingURL=ScopeDetails-DPQmyy0_.js.map
153
+ //# sourceMappingURL=ScopeDetails-DyHGLML9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScopeDetails-DPQmyy0_.js","sources":["../src/clients/authorization/ScopeDetails.tsx"],"sourcesContent":["import type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport { TextControl, useAlerts, useFetch } from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n ButtonVariant,\n DropdownItem,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\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 { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useParams } from \"../../utils/useParams\";\nimport useToggle from \"../../utils/useToggle\";\nimport { toAuthorizationTab } from \"../routes/AuthenticationTab\";\nimport type { ScopeDetailsParams } from \"../routes/Scope\";\nimport { DeleteScopeDialog } from \"./DeleteScopeDialog\";\n\ntype FormFields = Omit<ScopeRepresentation, \"resources\">;\n\nexport default function ScopeDetails() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { id, scopeId, realm } = useParams<ScopeDetailsParams>();\n const navigate = useNavigate();\n const { addAlert, addError } = useAlerts();\n const [deleteDialog, toggleDeleteDialog] = useToggle();\n const [scope, setScope] = useState<ScopeRepresentation>();\n const form = useForm<FormFields>({\n mode: \"onChange\",\n });\n const { reset, handleSubmit } = form;\n\n useFetch(\n async () => {\n if (scopeId) {\n const scope = await adminClient.clients.getAuthorizationScope({\n id,\n scopeId,\n });\n if (!scope) {\n throw new Error(t(\"notFound\"));\n }\n return scope;\n }\n },\n (scope) => {\n setScope(scope);\n reset({ ...scope });\n },\n [],\n );\n\n const onSubmit = async (scope: ScopeRepresentation) => {\n try {\n if (scopeId) {\n await adminClient.clients.updateAuthorizationScope(\n { id, scopeId },\n scope,\n );\n setScope(scope);\n } else {\n await adminClient.clients.createAuthorizationScope(\n { id },\n {\n name: scope.name!,\n displayName: scope.displayName,\n iconUri: scope.iconUri,\n },\n );\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"scopes\" }));\n }\n addAlert(\n t((scopeId ? \"update\" : \"create\") + \"ScopeSuccess\"),\n AlertVariant.success,\n );\n } catch (error) {\n addError(\"scopeSaveError\", error);\n }\n };\n\n return (\n <>\n <DeleteScopeDialog\n clientId={id}\n open={deleteDialog}\n toggleDialog={toggleDeleteDialog}\n selectedScope={scope}\n refresh={() =>\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"scopes\" }))\n }\n />\n <ViewHeader\n titleKey={scopeId ? scope?.name! : t(\"createAuthorizationScope\")}\n dropdownItems={\n scopeId\n ? [\n <DropdownItem\n key=\"delete\"\n data-testid=\"delete-resource\"\n onClick={() => toggleDeleteDialog()}\n >\n {t(\"delete\")}\n </DropdownItem>,\n ]\n : undefined\n }\n />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <TextControl\n name=\"name\"\n label={t(\"name\")}\n labelIcon={t(\"scopeNameHelp\")}\n rules={{ required: t(\"required\") }}\n />\n <TextControl\n name=\"displayName\"\n label={t(\"displayName\")}\n labelIcon={t(\"scopeDisplayNameHelp\")}\n />\n <TextControl\n name=\"iconUri\"\n label={t(\"iconUri\")}\n labelIcon={t(\"iconUriHelp\")}\n />\n <ActionGroup>\n <div className=\"pf-v5-u-mt-md\">\n <Button\n variant={ButtonVariant.primary}\n type=\"submit\"\n data-testid=\"save\"\n >\n {t(\"save\")}\n </Button>\n\n {!scope ? (\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link\n {...props}\n to={toAuthorizationTab({\n realm,\n clientId: id,\n tab: \"scopes\",\n })}\n ></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n ) : (\n <Button\n variant=\"link\"\n data-testid=\"revert\"\n onClick={() => reset({ ...scope })}\n >\n {t(\"revert\")}\n </Button>\n )}\n </div>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["ScopeDetails","adminClient","useAdminClient","t","useTranslation","id","scopeId","realm","useParams","navigate","useNavigate","addAlert","addError","useAlerts","deleteDialog","toggleDeleteDialog","useToggle","scope","setScope","useState","form","useForm","reset","handleSubmit","useFetch","onSubmit","toAuthorizationTab","AlertVariant","error","jsxs","Fragment","jsx","DeleteScopeDialog","ViewHeader","DropdownItem","PageSection","FormProvider","FormAccess","TextControl","ActionGroup","Button","ButtonVariant","props","Link"],"mappings":";;;;;AAyBA,SAAwBA,IAAe;AAC/B,QAAA,EAAE,aAAAC,EAAY,IAAIC,EAAe,GAEjC,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvB,EAAE,IAAAC,GAAI,SAAAC,GAAS,OAAAC,EAAA,IAAUC,EAA8B,GACvDC,IAAWC,EAAY,GACvB,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,CAACC,GAAcC,CAAkB,IAAIC,EAAU,GAC/C,CAACC,GAAOC,CAAQ,IAAIC,EAA8B,GACl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A,YAAA,gBAAAE;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,SAASC,EAAc;AAAA,gBACvB,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,MAAM;AAAA,cAAA;AAAA,YACX;AAAA,YAEExB,IAkBA,gBAAAc;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,SAAS,MAAMlB,EAAM,EAAE,GAAGL,GAAO;AAAA,gBAEhC,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA,IAtBb,gBAAAc;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACE,MACV,gBAAAX;AAAA,kBAACY;AAAA,kBAAA;AAAA,oBACE,GAAGD;AAAA,oBACJ,IAAIhB,EAAmB;AAAA,sBACrB,OAAAnB;AAAA,sBACA,UAAUF;AAAA,sBACV,KAAK;AAAA,oBACN,CAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAGF,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UASb,EAAA,CAEJ,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"ScopeDetails-DyHGLML9.js","sources":["../src/clients/authorization/ScopeDetails.tsx"],"sourcesContent":["import type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport { TextControl, useAlerts, useFetch } from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n ButtonVariant,\n DropdownItem,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\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 { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useParams } from \"../../utils/useParams\";\nimport useToggle from \"../../utils/useToggle\";\nimport { toAuthorizationTab } from \"../routes/AuthenticationTab\";\nimport type { ScopeDetailsParams } from \"../routes/Scope\";\nimport { DeleteScopeDialog } from \"./DeleteScopeDialog\";\n\ntype FormFields = Omit<ScopeRepresentation, \"resources\">;\n\nexport default function ScopeDetails() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { id, scopeId, realm } = useParams<ScopeDetailsParams>();\n const navigate = useNavigate();\n const { addAlert, addError } = useAlerts();\n const [deleteDialog, toggleDeleteDialog] = useToggle();\n const [scope, setScope] = useState<ScopeRepresentation>();\n const form = useForm<FormFields>({\n mode: \"onChange\",\n });\n const { reset, handleSubmit } = form;\n\n useFetch(\n async () => {\n if (scopeId) {\n const scope = await adminClient.clients.getAuthorizationScope({\n id,\n scopeId,\n });\n if (!scope) {\n throw new Error(t(\"notFound\"));\n }\n return scope;\n }\n },\n (scope) => {\n setScope(scope);\n reset({ ...scope });\n },\n [],\n );\n\n const onSubmit = async (scope: ScopeRepresentation) => {\n try {\n if (scopeId) {\n await adminClient.clients.updateAuthorizationScope(\n { id, scopeId },\n scope,\n );\n setScope(scope);\n } else {\n await adminClient.clients.createAuthorizationScope(\n { id },\n {\n name: scope.name!,\n displayName: scope.displayName,\n iconUri: scope.iconUri,\n },\n );\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"scopes\" }));\n }\n addAlert(\n t((scopeId ? \"update\" : \"create\") + \"ScopeSuccess\"),\n AlertVariant.success,\n );\n } catch (error) {\n addError(\"scopeSaveError\", error);\n }\n };\n\n return (\n <>\n <DeleteScopeDialog\n clientId={id}\n open={deleteDialog}\n toggleDialog={toggleDeleteDialog}\n selectedScope={scope}\n refresh={() =>\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"scopes\" }))\n }\n />\n <ViewHeader\n titleKey={scopeId ? scope?.name! : t(\"createAuthorizationScope\")}\n dropdownItems={\n scopeId\n ? [\n <DropdownItem\n key=\"delete\"\n data-testid=\"delete-resource\"\n onClick={() => toggleDeleteDialog()}\n >\n {t(\"delete\")}\n </DropdownItem>,\n ]\n : undefined\n }\n />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <TextControl\n name=\"name\"\n label={t(\"name\")}\n labelIcon={t(\"scopeNameHelp\")}\n rules={{ required: t(\"required\") }}\n />\n <TextControl\n name=\"displayName\"\n label={t(\"displayName\")}\n labelIcon={t(\"scopeDisplayNameHelp\")}\n />\n <TextControl\n name=\"iconUri\"\n label={t(\"iconUri\")}\n labelIcon={t(\"iconUriHelp\")}\n />\n <ActionGroup>\n <div className=\"pf-v5-u-mt-md\">\n <Button\n variant={ButtonVariant.primary}\n type=\"submit\"\n data-testid=\"save\"\n >\n {t(\"save\")}\n </Button>\n\n {!scope ? (\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link\n {...props}\n to={toAuthorizationTab({\n realm,\n clientId: id,\n tab: \"scopes\",\n })}\n ></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n ) : (\n <Button\n variant=\"link\"\n data-testid=\"revert\"\n onClick={() => reset({ ...scope })}\n >\n {t(\"revert\")}\n </Button>\n )}\n </div>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["ScopeDetails","adminClient","useAdminClient","t","useTranslation","id","scopeId","realm","useParams","navigate","useNavigate","addAlert","addError","useAlerts","deleteDialog","toggleDeleteDialog","useToggle","scope","setScope","useState","form","useForm","reset","handleSubmit","useFetch","onSubmit","toAuthorizationTab","AlertVariant","error","jsxs","Fragment","jsx","DeleteScopeDialog","ViewHeader","DropdownItem","PageSection","FormProvider","FormAccess","TextControl","ActionGroup","Button","ButtonVariant","props","Link"],"mappings":";;;;;AAyBA,SAAwBA,IAAe;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,aAAa;AAAA,cACtB,WAAWA,EAAE,sBAAsB;AAAA,YAAA;AAAA,UACrC;AAAA,UACA,gBAAA4B;AAAA,YAACO;AAAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAOnC,EAAE,SAAS;AAAA,cAClB,WAAWA,EAAE,aAAa;AAAA,YAAA;AAAA,UAC5B;AAAA,UACC,gBAAA4B,EAAAQ,GAAA,EACC,UAAC,gBAAAV,EAAA,OAAA,EAAI,WAAU,iBACb,UAAA;AAAA,YAAA,gBAAAE;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,SAASC,EAAc;AAAA,gBACvB,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,MAAM;AAAA,cAAA;AAAA,YACX;AAAA,YAEExB,IAkBA,gBAAAc;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,SAAS,MAAMlB,EAAM,EAAE,GAAGL,GAAO;AAAA,gBAEhC,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA,IAtBb,gBAAAc;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACE,MACV,gBAAAX;AAAA,kBAACY;AAAA,kBAAA;AAAA,oBACE,GAAGD;AAAA,oBACJ,IAAIhB,EAAmB;AAAA,sBACrB,OAAAnB;AAAA,sBACA,UAAUF;AAAA,sBACV,KAAK;AAAA,oBACN,CAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAGF,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UASb,EAAA,CAEJ,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,85 @@
1
+ import { jsx as n, jsxs as b, Fragment as q } from "react/jsx-runtime";
2
+ import { u as I, ak as P, aU as y, n as O, ar as T, at as j, al as k, am as w, an as z, aw as G, a7 as L, a4 as R } from "./index-B5GgWXK6.js";
3
+ import { useState as c } from "react";
4
+ import { useTranslation as V } from "react-i18next";
5
+ const B = ({
6
+ clientId: m,
7
+ resourceTypeScopes: r
8
+ }) => {
9
+ const { adminClient: S } = I(), { t: a } = V(), {
10
+ control: f,
11
+ formState: { errors: C }
12
+ } = P(), [x, v] = c(!1), [p, A] = c(), [u, d] = c(""), o = y(m);
13
+ O(
14
+ () => {
15
+ const e = {
16
+ id: m,
17
+ first: 0,
18
+ max: 20,
19
+ deep: !1,
20
+ name: u
21
+ };
22
+ return S.clients.listAllScopes(e);
23
+ },
24
+ A,
25
+ [u]
26
+ );
27
+ const h = (e) => e.map((t, s) => /* @__PURE__ */ n(R, { value: t, children: typeof t == "string" ? t : t.name }, s));
28
+ if (!p && !r) return /* @__PURE__ */ n(T, {});
29
+ const g = o && r ? r : p?.map((e) => e.name);
30
+ return /* @__PURE__ */ n(
31
+ j,
32
+ {
33
+ label: a("authorizationScopes"),
34
+ labelIcon: /* @__PURE__ */ n(L, { helpText: a("clientScopesHelp"), fieldLabelId: "scopes" }),
35
+ fieldId: "scopes",
36
+ isRequired: o,
37
+ children: /* @__PURE__ */ n(
38
+ k,
39
+ {
40
+ name: "scopes",
41
+ defaultValue: [],
42
+ control: f,
43
+ rules: o ? { required: a("requiredField") } : {},
44
+ render: ({ field: e }) => {
45
+ const t = e.value.map((s) => s.name);
46
+ return /* @__PURE__ */ b(q, { children: [
47
+ /* @__PURE__ */ n(
48
+ w,
49
+ {
50
+ toggleId: "scopes",
51
+ variant: z.typeaheadMulti,
52
+ chipGroupProps: {
53
+ numChips: 3,
54
+ expandedText: a("hide"),
55
+ collapsedText: a("showRemaining")
56
+ },
57
+ onToggle: (s) => v(s),
58
+ isOpen: x,
59
+ selections: t,
60
+ onFilter: (s) => (d(s), h(g || [])),
61
+ onSelect: (s) => {
62
+ const i = typeof s == "string" ? s : s.name, F = e.value.find(
63
+ (l) => l.name === i
64
+ ) ? e.value.filter((l) => l.name !== i) : [...e.value, { name: i }];
65
+ e.onChange(F);
66
+ },
67
+ onClear: () => {
68
+ d(""), e.onChange([]);
69
+ },
70
+ typeAheadAriaLabel: a("authorizationScopes"),
71
+ children: h(g || [])
72
+ }
73
+ ),
74
+ o && C.scopes && /* @__PURE__ */ n(G, { message: a("required") })
75
+ ] });
76
+ }
77
+ }
78
+ )
79
+ }
80
+ );
81
+ };
82
+ export {
83
+ B as S
84
+ };
85
+ //# sourceMappingURL=ScopePicker-DxDYNCCh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScopePicker-DxDYNCCh.js","sources":["../src/clients/authorization/ScopePicker.tsx"],"sourcesContent":["import type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport {\n FormErrorText,\n HelpItem,\n KeycloakSelect,\n SelectVariant,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport { FormGroup, SelectOption } from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { KeycloakSpinner } from \"@keycloak/keycloak-ui-shared\";\nimport { useIsAdminPermissionsClient } from \"../../utils/useIsAdminPermissionsClient\";\n\ntype Scope = {\n id: string;\n name: string;\n};\n\ntype ScopePickerProps = {\n clientId: string;\n resourceTypeScopes?: string[];\n};\n\nexport const ScopePicker = ({\n clientId,\n resourceTypeScopes,\n}: ScopePickerProps) => {\n const { adminClient } = useAdminClient();\n const { t } = useTranslation();\n const {\n control,\n formState: { errors },\n } = useFormContext();\n const [open, setOpen] = useState(false);\n const [scopes, setScopes] = useState<ScopeRepresentation[]>();\n const [search, setSearch] = useState(\"\");\n const isAdminPermissionsClient = useIsAdminPermissionsClient(clientId);\n\n useFetch(\n () => {\n const params = {\n id: clientId,\n first: 0,\n max: 20,\n deep: false,\n name: search,\n };\n return adminClient.clients.listAllScopes(params);\n },\n setScopes,\n [search],\n );\n\n const renderScopes = (scopes: ScopeRepresentation[] | string[]) =>\n scopes.map((option, index) => (\n <SelectOption key={index} value={option}>\n {typeof option === \"string\" ? option : option.name}\n </SelectOption>\n ));\n\n if (!scopes && !resourceTypeScopes) return <KeycloakSpinner />;\n\n const allScopes =\n isAdminPermissionsClient && resourceTypeScopes\n ? resourceTypeScopes\n : scopes?.map((scope) => scope.name!);\n\n return (\n <FormGroup\n label={t(\"authorizationScopes\")}\n labelIcon={\n <HelpItem helpText={t(\"clientScopesHelp\")} fieldLabelId=\"scopes\" />\n }\n fieldId=\"scopes\"\n isRequired={isAdminPermissionsClient}\n >\n <Controller\n name=\"scopes\"\n defaultValue={[]}\n control={control}\n rules={isAdminPermissionsClient ? { required: t(\"requiredField\") } : {}}\n render={({ field }) => {\n const selectedValues = field.value.map((o: Scope) => o.name);\n return (\n <>\n <KeycloakSelect\n toggleId=\"scopes\"\n variant={SelectVariant.typeaheadMulti}\n chipGroupProps={{\n numChips: 3,\n expandedText: t(\"hide\"),\n collapsedText: t(\"showRemaining\"),\n }}\n onToggle={(val) => setOpen(val)}\n isOpen={open}\n selections={selectedValues}\n onFilter={(value) => {\n setSearch(value);\n return renderScopes(allScopes || []);\n }}\n onSelect={(selectedValue) => {\n const option =\n typeof selectedValue === \"string\"\n ? selectedValue\n : (selectedValue as Scope).name;\n const changedValue = field.value.find(\n (o: Scope) => o.name === option,\n )\n ? field.value.filter((item: Scope) => item.name !== option)\n : [...field.value, { name: option }];\n field.onChange(changedValue);\n }}\n onClear={() => {\n setSearch(\"\");\n field.onChange([]);\n }}\n typeAheadAriaLabel={t(\"authorizationScopes\")}\n >\n {renderScopes(allScopes || [])}\n </KeycloakSelect>\n {isAdminPermissionsClient && errors.scopes && (\n <FormErrorText message={t(\"required\")} />\n )}\n </>\n );\n }}\n />\n </FormGroup>\n );\n};\n"],"names":["ScopePicker","clientId","resourceTypeScopes","adminClient","useAdminClient","t","useTranslation","control","errors","useFormContext","open","setOpen","useState","scopes","setScopes","search","setSearch","isAdminPermissionsClient","useIsAdminPermissionsClient","useFetch","params","renderScopes","option","index","jsx","SelectOption","KeycloakSpinner","allScopes","scope","FormGroup","HelpItem","Controller","field","selectedValues","o","jsxs","Fragment","KeycloakSelect","SelectVariant","val","value","selectedValue","changedValue","item","FormErrorText"],"mappings":";;;;AA0BO,MAAMA,IAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,oBAAAC;AACF,MAAwB;AAChB,QAAA,EAAE,aAAAC,EAAY,IAAIC,EAAe,GACjC,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvB;AAAA,IACJ,SAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,EAAO;AAAA,MAClBC,EAAe,GACb,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAChC,CAACC,GAAQC,CAAS,IAAIF,EAAgC,GACtD,CAACG,GAAQC,CAAS,IAAIJ,EAAS,EAAE,GACjCK,IAA2BC,EAA4BjB,CAAQ;AAErEkB,EAAAA;AAAAA,IACE,MAAM;AACJ,YAAMC,IAAS;AAAA,QACb,IAAInB;AAAA,QACJ,OAAO;AAAA,QACP,KAAK;AAAA,QACL,MAAM;AAAA,QACN,MAAMc;AAAA,MACR;AACO,aAAAZ,EAAY,QAAQ,cAAciB,CAAM;AAAA,IACjD;AAAA,IACAN;AAAA,IACA,CAACC,CAAM;AAAA,EACT;AAEA,QAAMM,IAAe,CAACR,MACpBA,EAAO,IAAI,CAACS,GAAQC,MAClB,gBAAAC,EAACC,KAAyB,OAAOH,GAC9B,iBAAOA,KAAW,WAAWA,IAASA,EAAO,QAD7BC,CAEnB,CACD;AAEH,MAAI,CAACV,KAAU,CAACX,EAAoB,0BAAQwB,GAAgB,EAAA;AAEtD,QAAAC,IACJV,KAA4Bf,IACxBA,IACAW,GAAQ,IAAI,CAACe,MAAUA,EAAM,IAAK;AAGtC,SAAA,gBAAAJ;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,OAAOxB,EAAE,qBAAqB;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EAAE;AAAA,kBACnB;AAAA,kBACA,oBAAoB3B,EAAE,qBAAqB;AAAA,kBAE1C,UAAAgB,EAAaM,KAAa,CAAE,CAAA;AAAA,gBAAA;AAAA,cAC/B;AAAA,cACCV,KAA4BT,EAAO,UAClC,gBAAAgB,EAACoB,KAAc,SAASvC,EAAE,UAAU,EAAG,CAAA;AAAA,YAAA,GAE3C;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
@@ -0,0 +1,9 @@
1
+ import { AuthenticationProviderRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation';
2
+ import { PropsWithChildren } from 'react';
3
+ export declare const AuthenticationProviderContext: import('libs/ui-shared/dist/utils/createNamedContext').NamedContext<{
4
+ providers?: AuthenticationProviderRepresentation[];
5
+ } | undefined>;
6
+ export declare const AuthenticationProviderContextProvider: ({ children, }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const useAuthenticationProvider: () => {
8
+ providers?: AuthenticationProviderRepresentation[];
9
+ };
@@ -10,5 +10,6 @@ type FlowRowProps = {
10
10
  onAddFlow: (execution: ExpandableExecution, flow: Flow) => void;
11
11
  onDelete: (execution: ExpandableExecution) => void;
12
12
  };
13
+ export type FlowType = "flow" | "condition" | "execution" | "step";
13
14
  export declare const FlowRow: ({ builtIn, execution, onRowClick, onRowChange, onAddExecution, onAddFlow, onDelete, }: FlowRowProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export {};
@@ -1,7 +1,10 @@
1
+ import { FlowType } from './FlowRow';
1
2
  type FlowTitleProps = {
2
3
  id?: string;
4
+ type: FlowType;
3
5
  title: string;
4
- alias: string;
6
+ subtitle: string;
7
+ providerId?: string;
5
8
  };
6
- export declare const FlowTitle: ({ id, title, alias }: FlowTitleProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const FlowTitle: ({ id, type, title, subtitle, providerId, }: FlowTitleProps) => import("react/jsx-runtime").JSX.Element;
7
10
  export {};
@@ -1 +1,2 @@
1
+ export declare const SIGNATURE_ALGORITHMS: readonly ["RSA_SHA1", "RSA_SHA256", "RSA_SHA256_MGF1", "RSA_SHA512", "RSA_SHA512_MGF1", "DSA_SHA1"];
1
2
  export declare const SamlSignature: () => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,6 @@
1
- export declare const ScopePicker: ({ clientId }: {
1
+ type ScopePickerProps = {
2
2
  clientId: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ resourceTypeScopes?: string[];
4
+ };
5
+ export declare const ScopePicker: ({ clientId, resourceTypeScopes, }: ScopePickerProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,5 +1,5 @@
1
1
  type LogicSelectorProps = {
2
- isDisabled: boolean;
2
+ isDisabled?: boolean;
3
3
  };
4
4
  export declare const LogicSelector: ({ isDisabled }: LogicSelectorProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -1,5 +1,6 @@
1
1
  type NameDescriptionProps = {
2
- isDisabled: boolean;
2
+ isDisabled?: boolean;
3
+ clientId?: string;
3
4
  };
4
- export declare const NameDescription: ({ isDisabled }: NameDescriptionProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const NameDescription: ({ isDisabled, clientId, }: NameDescriptionProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -0,0 +1,10 @@
1
+ import { Path } from 'react-router-dom';
2
+ import { AppRouteObject } from '../../routes';
3
+ export type PermissionConfigurationDetailParams = {
4
+ realm: string;
5
+ id: string;
6
+ permissionId: string;
7
+ permissionType: string;
8
+ };
9
+ export declare const PermissionConfigurationDetailRoute: AppRouteObject;
10
+ export declare const toPermissionConfigurationDetails: (params: PermissionConfigurationDetailParams) => Partial<Path>;
@@ -1,7 +1,11 @@
1
+ import { default as ClientRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/clientRepresentation';
1
2
  import { SelectVariant } from '@keycloak/keycloak-ui-shared';
2
3
  import { ComponentProps } from '../dynamic/components';
3
- type ClientSelectProps = ComponentProps & {
4
+ type ClientSelectProps = Omit<ComponentProps, "convertToName"> & {
4
5
  variant?: `${SelectVariant}`;
6
+ isRequired?: boolean;
7
+ clientKey?: keyof ClientRepresentation;
8
+ placeholderText?: string;
5
9
  };
6
- export declare const ClientSelect: ({ name, label, helpText, defaultValue, isDisabled, required, variant, }: ClientSelectProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ClientSelect: ({ name, label, helpText, defaultValue, isDisabled, isRequired, variant, clientKey, placeholderText, }: ClientSelectProps) => import("react/jsx-runtime").JSX.Element;
7
11
  export {};
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const BooleanComponent: ({ name, label, helpText, isDisabled, defaultValue, isNew, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const BooleanComponent: ({ name, label, helpText, isDisabled, defaultValue, isNew, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,8 @@ type DynamicComponentProps = {
3
3
  properties: ConfigPropertyRepresentation[];
4
4
  stringify?: boolean;
5
5
  isNew?: boolean;
6
+ convertToName?: (name: string) => string;
6
7
  };
7
- export declare const DynamicComponents: ({ properties, ...rest }: DynamicComponentProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const DynamicComponents: ({ convertToName: convert, properties, ...rest }: DynamicComponentProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export declare const convertToName: (name: string) => string;
9
10
  export {};
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const FileComponent: ({ name, label, helpText, defaultValue, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const FileComponent: ({ name, label, helpText, defaultValue, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const GroupComponent: ({ name, label, helpText, required, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const GroupComponent: ({ name, label, helpText, required, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { NumberComponentProps } from './components';
2
- export declare const IntComponent: ({ name, label, helpText, ...props }: NumberComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const IntComponent: ({ name, label, helpText, convertToName, ...props }: NumberComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const ListComponent: ({ name, label, helpText, defaultValue, options, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ListComponent: ({ name, label, helpText, defaultValue, options, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const MapComponent: ({ name, label, helpText, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MapComponent: ({ name, label, helpText, required, isDisabled, defaultValue, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const MultiValuedListComponent: ({ name, label, helpText, defaultValue, options, isDisabled, stringify, required, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MultiValuedListComponent: ({ name, label, helpText, defaultValue, options, isDisabled, stringify, required, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const MultiValuedStringComponent: ({ name, label, defaultValue, helpText, stringify, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MultiValuedStringComponent: ({ name, label, defaultValue, helpText, stringify, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { NumberComponentProps } from './components';
2
- export declare const NumberComponent: ({ name, label, helpText, ...props }: NumberComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const NumberComponent: ({ name, label, helpText, convertToName, ...props }: NumberComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const PasswordComponent: ({ name, label, helpText, defaultValue, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const PasswordComponent: ({ name, label, helpText, defaultValue, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const RoleComponent: ({ name, label, helpText, defaultValue, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const RoleComponent: ({ name, label, helpText, defaultValue, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const ScriptComponent: ({ name, label, helpText, defaultValue, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ScriptComponent: ({ name, label, helpText, defaultValue, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const StringComponent: ({ name, label, helpText, ...props }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const StringComponent: ({ name, label, helpText, convertToName, ...props }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const TextComponent: ({ name, label, helpText, defaultValue, required, isDisabled, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const TextComponent: ({ name, label, helpText, defaultValue, required, isDisabled, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from './components';
2
- export declare const UserProfileAttributeListComponent: ({ name, label, helpText, required, }: ComponentProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const UserProfileAttributeListComponent: ({ name, label, helpText, required, convertToName, }: ComponentProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -4,6 +4,7 @@ export type ComponentProps = Omit<ConfigPropertyRepresentation, "type"> & {
4
4
  isDisabled?: boolean;
5
5
  isNew?: boolean;
6
6
  stringify?: boolean;
7
+ convertToName: (name: string) => string;
7
8
  };
8
9
  export type NumberComponentProps = ComponentProps & {
9
10
  min?: number;
@@ -0,0 +1,12 @@
1
+ type CodeEditorProps = {
2
+ id?: string;
3
+ "aria-label"?: string;
4
+ "data-testid"?: string;
5
+ value?: string;
6
+ onChange?: (value: string) => void;
7
+ language?: string;
8
+ readOnly?: boolean;
9
+ height?: number;
10
+ };
11
+ declare const CodeEditor: ({ onChange, height, ...rest }: CodeEditorProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default CodeEditor;
@@ -8,5 +8,5 @@ type AddRoleMappingModalProps = {
8
8
  onClose: () => void;
9
9
  isLDAPmapper?: boolean;
10
10
  };
11
- export declare const AddRoleMappingModal: ({ id, name, type, isRadio, isLDAPmapper, onAssign, onClose, }: AddRoleMappingModalProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const AddRoleMappingModal: ({ id, name, type, isLDAPmapper, onAssign, onClose, }: AddRoleMappingModalProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from '../dynamic/components';
2
2
  type UserSelectVariant = "typeaheadMulti" | "typeahead";
3
- type UserSelectProps = ComponentProps & {
3
+ type UserSelectProps = Omit<ComponentProps, "convertToName"> & {
4
4
  variant?: UserSelectVariant;
5
5
  isRequired?: boolean;
6
6
  };
@@ -1,4 +1,8 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export declare const RecentRealmsContext: import('libs/ui-shared/dist/utils/createNamedContext').NamedContext<string[] | undefined>;
2
+ export declare const RecentRealmsContext: import('libs/ui-shared/dist/utils/createNamedContext').NamedContext<RealmNameRepresentation[] | undefined>;
3
+ export type RealmNameRepresentation = {
4
+ name: string;
5
+ displayName?: string;
6
+ };
3
7
  export declare const RecentRealmsProvider: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
4
- export declare const useRecentRealms: () => string[];
8
+ export declare const useRecentRealms: () => RealmNameRepresentation[];
@@ -0,0 +1,4 @@
1
+ import { i18n as i18nType } from 'i18next';
2
+ export declare const DEFAULT_LOCALE = "en";
3
+ export declare const KEY_SEPARATOR = ".";
4
+ export declare const i18n: i18nType;