@keycloak/keycloak-admin-ui 26.0.7 → 26.0.8

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 (28) hide show
  1. package/lib/.vite/manifest.json +19 -19
  2. package/lib/{CreateFlow-uRG_I_sd.js → CreateFlow-D3hVgFZr.js} +13 -13
  3. package/lib/{CreateFlow-uRG_I_sd.js.map → CreateFlow-D3hVgFZr.js.map} +1 -1
  4. package/lib/{DetailOrganization-CqbiK2-2.js → DetailOrganization-DUNwCft_.js} +16 -16
  5. package/lib/{DetailOrganization-CqbiK2-2.js.map → DetailOrganization-DUNwCft_.js.map} +1 -1
  6. package/lib/{ExecutorForm-CwWVGOtW.js → ExecutorForm-Dp7Iqxos.js} +12 -12
  7. package/lib/{ExecutorForm-CwWVGOtW.js.map → ExecutorForm-Dp7Iqxos.js.map} +1 -1
  8. package/lib/{FlowDetails-CRuEMqzE.js → FlowDetails-SHMxH_Rb.js} +438 -438
  9. package/lib/{FlowDetails-CRuEMqzE.js.map → FlowDetails-SHMxH_Rb.js.map} +1 -1
  10. package/lib/{NewOrganization-CGV9yUfa.js → NewOrganization-CQAjr9Dn.js} +12 -12
  11. package/lib/{NewOrganization-CGV9yUfa.js.map → NewOrganization-CQAjr9Dn.js.map} +1 -1
  12. package/lib/{PermissionDetails-CpjubjMm.js → PermissionDetails-xk5HiPzx.js} +47 -47
  13. package/lib/{PermissionDetails-CpjubjMm.js.map → PermissionDetails-xk5HiPzx.js.map} +1 -1
  14. package/lib/{ResourceDetails-BoQE7rAq.js → ResourceDetails-CbJWQn4F.js} +28 -28
  15. package/lib/{ResourceDetails-BoQE7rAq.js.map → ResourceDetails-CbJWQn4F.js.map} +1 -1
  16. package/lib/{ScopeDetails-CXbD9GiG.js → ScopeDetails-BtYWOGtn.js} +21 -21
  17. package/lib/{ScopeDetails-CXbD9GiG.js.map → ScopeDetails-BtYWOGtn.js.map} +1 -1
  18. package/lib/clients/routes/Client.d.ts +1 -1
  19. package/lib/context/whoami/WhoAmI.d.ts +1 -0
  20. package/lib/events/UserEvents.d.ts +6 -0
  21. package/lib/{index-WPS7MqzE.js → index-6gx7hHms.js} +15073 -15030
  22. package/lib/index-6gx7hHms.js.map +1 -0
  23. package/lib/index.d.ts +1 -0
  24. package/lib/keycloak-admin-ui.js +283 -281
  25. package/lib/style.css +1 -1
  26. package/lib/user/routes/User.d.ts +1 -1
  27. package/package.json +4 -4
  28. package/lib/index-WPS7MqzE.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
- "_index-WPS7MqzE.js": {
3
- "file": "index-WPS7MqzE.js",
2
+ "_index-6gx7hHms.js": {
3
+ "file": "index-6gx7hHms.js",
4
4
  "name": "index",
5
5
  "dynamicImports": [
6
6
  "src/authentication/FlowDetails.tsx",
@@ -18,48 +18,48 @@
18
18
  ]
19
19
  },
20
20
  "src/authentication/FlowDetails.tsx": {
21
- "file": "FlowDetails-CRuEMqzE.js",
21
+ "file": "FlowDetails-SHMxH_Rb.js",
22
22
  "name": "FlowDetails",
23
23
  "src": "src/authentication/FlowDetails.tsx",
24
24
  "isDynamicEntry": true,
25
25
  "imports": [
26
- "_index-WPS7MqzE.js"
26
+ "_index-6gx7hHms.js"
27
27
  ]
28
28
  },
29
29
  "src/authentication/form/CreateFlow.tsx": {
30
- "file": "CreateFlow-uRG_I_sd.js",
30
+ "file": "CreateFlow-D3hVgFZr.js",
31
31
  "name": "CreateFlow",
32
32
  "src": "src/authentication/form/CreateFlow.tsx",
33
33
  "isDynamicEntry": true,
34
34
  "imports": [
35
- "_index-WPS7MqzE.js"
35
+ "_index-6gx7hHms.js"
36
36
  ]
37
37
  },
38
38
  "src/clients/authorization/PermissionDetails.tsx": {
39
- "file": "PermissionDetails-CpjubjMm.js",
39
+ "file": "PermissionDetails-xk5HiPzx.js",
40
40
  "name": "PermissionDetails",
41
41
  "src": "src/clients/authorization/PermissionDetails.tsx",
42
42
  "isDynamicEntry": true,
43
43
  "imports": [
44
- "_index-WPS7MqzE.js"
44
+ "_index-6gx7hHms.js"
45
45
  ]
46
46
  },
47
47
  "src/clients/authorization/ResourceDetails.tsx": {
48
- "file": "ResourceDetails-BoQE7rAq.js",
48
+ "file": "ResourceDetails-CbJWQn4F.js",
49
49
  "name": "ResourceDetails",
50
50
  "src": "src/clients/authorization/ResourceDetails.tsx",
51
51
  "isDynamicEntry": true,
52
52
  "imports": [
53
- "_index-WPS7MqzE.js"
53
+ "_index-6gx7hHms.js"
54
54
  ]
55
55
  },
56
56
  "src/clients/authorization/ScopeDetails.tsx": {
57
- "file": "ScopeDetails-CXbD9GiG.js",
57
+ "file": "ScopeDetails-BtYWOGtn.js",
58
58
  "name": "ScopeDetails",
59
59
  "src": "src/clients/authorization/ScopeDetails.tsx",
60
60
  "isDynamicEntry": true,
61
61
  "imports": [
62
- "_index-WPS7MqzE.js"
62
+ "_index-6gx7hHms.js"
63
63
  ]
64
64
  },
65
65
  "src/index.ts": {
@@ -68,34 +68,34 @@
68
68
  "src": "src/index.ts",
69
69
  "isEntry": true,
70
70
  "imports": [
71
- "_index-WPS7MqzE.js"
71
+ "_index-6gx7hHms.js"
72
72
  ]
73
73
  },
74
74
  "src/organizations/DetailOrganization.tsx": {
75
- "file": "DetailOrganization-CqbiK2-2.js",
75
+ "file": "DetailOrganization-DUNwCft_.js",
76
76
  "name": "DetailOrganization",
77
77
  "src": "src/organizations/DetailOrganization.tsx",
78
78
  "isDynamicEntry": true,
79
79
  "imports": [
80
- "_index-WPS7MqzE.js"
80
+ "_index-6gx7hHms.js"
81
81
  ]
82
82
  },
83
83
  "src/organizations/NewOrganization.tsx": {
84
- "file": "NewOrganization-CGV9yUfa.js",
84
+ "file": "NewOrganization-CQAjr9Dn.js",
85
85
  "name": "NewOrganization",
86
86
  "src": "src/organizations/NewOrganization.tsx",
87
87
  "isDynamicEntry": true,
88
88
  "imports": [
89
- "_index-WPS7MqzE.js"
89
+ "_index-6gx7hHms.js"
90
90
  ]
91
91
  },
92
92
  "src/realm-settings/ExecutorForm.tsx": {
93
- "file": "ExecutorForm-CwWVGOtW.js",
93
+ "file": "ExecutorForm-Dp7Iqxos.js",
94
94
  "name": "ExecutorForm",
95
95
  "src": "src/realm-settings/ExecutorForm.tsx",
96
96
  "isDynamicEntry": true,
97
97
  "imports": [
98
- "_index-WPS7MqzE.js"
98
+ "_index-6gx7hHms.js"
99
99
  ]
100
100
  },
101
101
  "style.css": {
@@ -1,11 +1,11 @@
1
- import { jsxs as r, Fragment as f, 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, W as I, A as T, X as H, B as N, t as P, d as i, e as V } from "./index-WPS7MqzE.js";
3
- import { useTranslation as k } from "react-i18next";
4
- import { useNavigate as x, Link as B } from "react-router-dom";
1
+ import { jsxs as r, Fragment as w, jsx as t } from "react/jsx-runtime";
2
+ import { u as h, a as F, U as b, b as v, V as y, P as g, F as S, c as A, N as C, j as I, A as T, e as j, B as H, t as N, d as i, f as P } from "./index-6gx7hHms.js";
3
+ import { useTranslation as V } from "react-i18next";
4
+ import { useNavigate as k, Link as x } from "react-router-dom";
5
5
  const c = ["basic-flow", "client-flow"];
6
6
  function E() {
7
- const { adminClient: u } = h(), { t: e } = k(), d = x(), { realm: n } = F(), { addAlert: l } = b(), s = v(), { handleSubmit: m, formState: p } = s;
8
- return /* @__PURE__ */ r(f, { children: [
7
+ const { adminClient: u } = h(), { t: e } = V(), d = k(), { realm: n } = F(), { addAlert: l } = b(), s = v(), { handleSubmit: m, formState: p } = s;
8
+ return /* @__PURE__ */ r(w, { children: [
9
9
  /* @__PURE__ */ t(y, { titleKey: "createFlow", subKey: "authenticationCreateFlowHelp" }),
10
10
  /* @__PURE__ */ t(g, { variant: "light", children: /* @__PURE__ */ t(S, { ...s, children: /* @__PURE__ */ r(
11
11
  A,
@@ -13,11 +13,11 @@ function E() {
13
13
  isHorizontal: !0,
14
14
  role: "manage-authorization",
15
15
  onSubmit: m(async (a) => {
16
- const w = { ...a, builtIn: !1, topLevel: !0 };
16
+ const f = { ...a, builtIn: !1, topLevel: !0 };
17
17
  try {
18
- const { id: o } = await u.authenticationManagement.createFlow(w);
18
+ const { id: o } = await u.authenticationManagement.createFlow(f);
19
19
  l(e("flowCreatedSuccess"), i.success), d(
20
- V({
20
+ P({
21
21
  realm: n,
22
22
  id: o,
23
23
  usedBy: "notInUse"
@@ -50,7 +50,7 @@ function E() {
50
50
  ),
51
51
  /* @__PURE__ */ r(T, { children: [
52
52
  /* @__PURE__ */ t(
53
- H,
53
+ j,
54
54
  {
55
55
  formState: p,
56
56
  "data-testid": "create",
@@ -60,11 +60,11 @@ function E() {
60
60
  }
61
61
  ),
62
62
  /* @__PURE__ */ t(
63
- N,
63
+ H,
64
64
  {
65
65
  "data-testid": "cancel",
66
66
  variant: "link",
67
- component: (a) => /* @__PURE__ */ t(B, { ...a, to: P({ realm: n }) }),
67
+ component: (a) => /* @__PURE__ */ t(x, { ...a, to: N({ realm: n }) }),
68
68
  children: e("cancel")
69
69
  }
70
70
  )
@@ -77,4 +77,4 @@ function E() {
77
77
  export {
78
78
  E as default
79
79
  };
80
- //# sourceMappingURL=CreateFlow-uRG_I_sd.js.map
80
+ //# sourceMappingURL=CreateFlow-D3hVgFZr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateFlow-uRG_I_sd.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;AAC7B,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,KACRC,IAAWC,KACX,EAAE,OAAAC,MAAUC,KACZ,EAAE,UAAAC,MAAaC,KACfC,IAAOC,KACP,EAAE,cAAAC,GAAc,WAAAC,EAAc,IAAAH;AA0BpC,SAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAW,EAAA,UAAS,cAAa,QAAO,gCAA+B;AAAA,sBACvEC,GAAY,EAAA,SAAQ,SACnB,UAAC,gBAAAF,EAAAG,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAI;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,cAAY;AAAA,QACZ,MAAK;AAAA,QACL,UAAUR,EAhCH,OAAOS,MAAiD;AACvE,gBAAMC,IAAO,EAAE,GAAGD,GAAY,SAAS,IAAO,UAAU;AAEpD,cAAA;AACF,kBAAM,EAAE,IAAAE,EAAG,IACT,MAAMvB,EAAY,yBAAyB,WAAWsB,CAAI;AAC5D,YAAAd,EAASN,EAAE,oBAAoB,GAAGsB,EAAa,OAAO,GACtDpB;AAAA,cACEqB,EAAO;AAAA,gBACL,OAAAnB;AAAA,gBACA,IAAAiB;AAAA,gBACA,QAAQ;AAAA,cAAA,CACT;AAAA,YAAA;AAAA,mBAEIG,GAAY;AACnB,YAAAlB;AAAA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lowRepresentation 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;AAC7B,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,KACRC,IAAWC,KACX,EAAE,OAAAC,MAAUC,KACZ,EAAE,UAAAC,MAAaC,KACfC,IAAOC,KACP,EAAE,cAAAC,GAAc,WAAAC,EAAc,IAAAH;AA0BpC,SAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAW,EAAA,UAAS,cAAa,QAAO,gCAA+B;AAAA,sBACvEC,GAAY,EAAA,SAAQ,SACnB,UAAC,gBAAAF,EAAAG,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAI;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,cAAY;AAAA,QACZ,MAAK;AAAA,QACL,UAAUR,EAhCH,OAAOS,MAAiD;AACvE,gBAAMC,IAAO,EA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BAAAjB,EAACkB,GAAM,EAAA,GAAGD,GAAO,IAAIE,EAAiB,EAAE,OAAA7B,EAAM,CAAC,EAAG,CAAA;AAAA,gBAGnD,YAAE,QAAQ;AAAA,cAAA;AAAA,YACb;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import { u as f, $ as P, a as p, b9 as O, b as S, m as A, P as c, F, bs as x, bt as B, bu as d, bv as b, c as C, bw as E, A as w, X as D, B as R, bx as V, by as j, bz as k, bA as H, bB as I, bC as X, bD as $ } from "./index-WPS7MqzE.js";
3
- import { useTranslation as G } from "react-i18next";
4
- function q() {
5
- const { adminClient: m } = f(), { addAlert: u, addError: h } = P(), { realm: g } = p(), { id: r } = O(), { t: a } = G(), e = S(), l = async (i) => {
2
+ import { u as f, U as P, a as p, b9 as O, b as S, o as A, P as c, F, bs as x, bt as B, bu as d, bv as b, c as E, bw as w, A as C, e as k, B as D, bx as R, by as V, bz as j, bA as H, bB as I, bC as U, bD as G } from "./index-6gx7hHms.js";
3
+ import { useTranslation as K } from "react-i18next";
4
+ function J() {
5
+ const { adminClient: m } = f(), { addAlert: u, addError: h } = P(), { realm: g } = p(), { id: r } = O(), { t: a } = K(), e = S(), l = async (i) => {
6
6
  try {
7
7
  const s = H(i);
8
8
  await m.organizations.updateById({ id: r }, s), u(a("organizationSaveSuccess"));
@@ -18,13 +18,13 @@ function q() {
18
18
  e.reset({
19
19
  ...i,
20
20
  domains: i.domains?.map((s) => s.name),
21
- attributes: $(i.attributes)
21
+ attributes: G(i.attributes)
22
22
  });
23
23
  },
24
24
  [r]
25
25
  );
26
26
  const n = (i) => I(
27
- X({
27
+ U({
28
28
  realm: g,
29
29
  id: r,
30
30
  tab: i
@@ -48,16 +48,16 @@ function q() {
48
48
  title: /* @__PURE__ */ t(b, { children: a("settings") }),
49
49
  ...v,
50
50
  children: /* @__PURE__ */ t(c, { children: /* @__PURE__ */ o(
51
- C,
51
+ E,
52
52
  {
53
53
  role: "anyone",
54
54
  onSubmit: e.handleSubmit(l),
55
55
  isHorizontal: !0,
56
56
  children: [
57
- /* @__PURE__ */ t(E, { readOnly: !0 }),
58
- /* @__PURE__ */ o(w, { children: [
57
+ /* @__PURE__ */ t(w, { readOnly: !0 }),
58
+ /* @__PURE__ */ o(C, { children: [
59
59
  /* @__PURE__ */ t(
60
- D,
60
+ k,
61
61
  {
62
62
  formState: e.formState,
63
63
  "data-testid": "save",
@@ -65,7 +65,7 @@ function q() {
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ t(
68
- R,
68
+ D,
69
69
  {
70
70
  onClick: () => e.reset(),
71
71
  "data-testid": "reset",
@@ -87,7 +87,7 @@ function q() {
87
87
  title: /* @__PURE__ */ t(b, { children: a("attributes") }),
88
88
  ...T,
89
89
  children: /* @__PURE__ */ t(c, { variant: "light", children: /* @__PURE__ */ t(
90
- V,
90
+ R,
91
91
  {
92
92
  form: e,
93
93
  save: l,
@@ -106,7 +106,7 @@ function q() {
106
106
  "data-testid": "membersTab",
107
107
  title: /* @__PURE__ */ t(b, { children: a("members") }),
108
108
  ...y,
109
- children: /* @__PURE__ */ t(j, {})
109
+ children: /* @__PURE__ */ t(V, {})
110
110
  }
111
111
  ),
112
112
  /* @__PURE__ */ t(
@@ -116,7 +116,7 @@ function q() {
116
116
  "data-testid": "identityProvidersTab",
117
117
  title: /* @__PURE__ */ t(b, { children: a("identityProviders") }),
118
118
  ...z,
119
- children: /* @__PURE__ */ t(k, {})
119
+ children: /* @__PURE__ */ t(j, {})
120
120
  }
121
121
  )
122
122
  ]
@@ -125,6 +125,6 @@ function q() {
125
125
  ] }) });
126
126
  }
127
127
  export {
128
- q as default
128
+ J as default
129
129
  };
130
- //# sourceMappingURL=DetailOrganization-CqbiK2-2.js.map
130
+ //# sourceMappingURL=DetailOrganization-DUNwCft_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DetailOrganization-CqbiK2-2.js","sources":["../src/organizations/DetailOrganization.tsx"],"sourcesContent":["import {\n FormSubmitButton,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Button,\n PageSection,\n Tab,\n TabTitleText,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../admin-client\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { AttributesForm } from \"../components/key-value-form/AttributeForm\";\nimport { arrayToKeyValue } from \"../components/key-value-form/key-value-convert\";\nimport {\n RoutableTabs,\n useRoutableTab,\n} from \"../components/routable-tabs/RoutableTabs\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport { useParams } from \"../utils/useParams\";\nimport { DetailOrganizationHeader } from \"./DetailOraganzationHeader\";\nimport { IdentityProviders } from \"./IdentityProviders\";\nimport { Members } from \"./Members\";\nimport {\n OrganizationForm,\n OrganizationFormType,\n convertToOrg,\n} from \"./OrganizationForm\";\nimport {\n EditOrganizationParams,\n OrganizationTab,\n toEditOrganization,\n} from \"./routes/EditOrganization\";\n\nexport default function DetailOrganization() {\n const { adminClient } = useAdminClient();\n const { addAlert, addError } = useAlerts();\n\n const { realm } = useRealm();\n const { id } = useParams<EditOrganizationParams>();\n const { t } = useTranslation();\n\n const form = useForm<OrganizationFormType>();\n\n const save = async (org: OrganizationFormType) => {\n try {\n const organization = convertToOrg(org);\n await adminClient.organizations.updateById({ id }, organization);\n addAlert(t(\"organizationSaveSuccess\"));\n } catch (error) {\n addError(\"organizationSaveError\", error);\n }\n };\n\n useFetch(\n () => adminClient.organizations.findOne({ id }),\n (org) => {\n if (!org) {\n throw new Error(t(\"notFound\"));\n }\n form.reset({\n ...org,\n domains: org.domains?.map((d) => d.name),\n attributes: arrayToKeyValue(org.attributes),\n });\n },\n [id],\n );\n\n const useTab = (tab: OrganizationTab) =>\n useRoutableTab(\n toEditOrganization({\n realm,\n id,\n tab,\n }),\n );\n\n const settingsTab = useTab(\"settings\");\n const attributesTab = useTab(\"attributes\");\n const membersTab = useTab(\"members\");\n const identityProvidersTab = useTab(\"identityProviders\");\n\n return (\n <PageSection variant=\"light\" className=\"pf-v5-u-p-0\">\n <FormProvider {...form}>\n <DetailOrganizationHeader save={() => save(form.getValues())} />\n <RoutableTabs\n data-testid=\"organization-tabs\"\n aria-label={t(\"organization\")}\n isBox\n mountOnEnter\n >\n <Tab\n id=\"settings\"\n data-testid=\"settingsTab\"\n title={<TabTitleText>{t(\"settings\")}</TabTitleText>}\n {...settingsTab}\n >\n <PageSection>\n <FormAccess\n role=\"anyone\"\n onSubmit={form.handleSubmit(save)}\n isHorizontal\n >\n <OrganizationForm readOnly />\n <ActionGroup>\n <FormSubmitButton\n formState={form.formState}\n data-testid=\"save\"\n >\n {t(\"save\")}\n </FormSubmitButton>\n <Button\n onClick={() => form.reset()}\n data-testid=\"reset\"\n variant=\"link\"\n >\n {t(\"reset\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </PageSection>\n </Tab>\n <Tab\n id=\"attributes\"\n data-testid=\"attributeTab\"\n title={<TabTitleText>{t(\"attributes\")}</TabTitleText>}\n {...attributesTab}\n >\n <PageSection variant=\"light\">\n <AttributesForm\n form={form}\n save={save}\n reset={() =>\n form.reset({\n ...form.getValues(),\n })\n }\n name=\"attributes\"\n />\n </PageSection>\n </Tab>\n <Tab\n id=\"members\"\n data-testid=\"membersTab\"\n title={<TabTitleText>{t(\"members\")}</TabTitleText>}\n {...membersTab}\n >\n <Members />\n </Tab>\n <Tab\n id=\"identityProviders\"\n data-testid=\"identityProvidersTab\"\n title={<TabTitleText>{t(\"identityProviders\")}</TabTitleText>}\n {...identityProvidersTab}\n >\n <IdentityProviders />\n </Tab>\n </RoutableTabs>\n </FormProvider>\n </PageSection>\n );\n}\n"],"names":["DetailOrganization","adminClient","useAdminClient","addAlert","addError","useAlerts","realm","useRealm","id","useParams","t","useTranslation","form","useForm","save","org","organization","convertToOrg","error","useFetch","d","arrayToKeyValue","useTab","tab","useRoutableTab","toEditOrganization","settingsTab","attributesTab","membersTab","identityProvidersTab","jsx","PageSection","jsxs","FormProvider","DetailOrganizationHeader","RoutableTabs","Tab","TabTitleText","FormAccess","OrganizationForm","ActionGroup","FormSubmitButton","Button","AttributesForm","Members","IdentityProviders"],"mappings":";;;AAsCA,SAAwBA,IAAqB;AACrC,QAAA,EAAE,aAAAC,MAAgBC,KAClB,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GAEnC,EAAE,OAAAC,MAAUC,KACZ,EAAE,IAAAC,MAAOC,KACT,EAAE,GAAAC,MAAMC,KAERC,IAAOC,KAEPC,IAAO,OAAOC,MAA8B;AAC5C,QAAA;AACI,YAAAC,IAAeC,EAAaF,CAAG;AACrC,YAAMd,EAAY,cAAc,WAAW,EAAE,IAAAO,EAAA,GAAMQ,CAAY,GACtDb,EAAAO,EAAE,yBAAyB,CAAC;AAAA,aAC9BQ,GAAO;AACd,MAAAd,EAAS,yBAAyBc,CAAK;AAAA,IACzC;AAAA,EAAA;AAGFC,EAAAA;AAAAA,IACE,MAAMlB,EAAY,cAAc,QAAQ,EAAE,IAAAO,GAAI;AAAA,IAC9C,CAACO,MAAQ;AACP,UAAI,CAACA;AACH,cAAM,IAAI,MAAML,EAAE,UAAU,CAAC;AAE/B,MAAAE,EAAK,MAAM;AAAA,QACT,GAAGG;AAAA,QACH,SAASA,EAAI,SAAS,IAAI,CAACK,MAAMA,EAAE,IAAI;AAAA,QACvC,YAAYC,EAAgBN,EAAI,UAAU;AAAA,MAAA,CAC3C;AAAA,IACH;AAAA,IACA,CAACP,CAAE;AAAA,EAAA;AAGC,QAAAc,IAAS,CAACC,MACdC;AAAA,IACEC,EAAmB;AAAA,MACjB,OAAAnB;AAAA,MACA,IAAAE;AAAA,MACA,KAAAe;AAAA,IAAA,CACD;AAAA,EAAA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AA,GACF;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAAA,GAEJ;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAkB;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,eAAY;AAAA,cACZ,OAAO,gBAAAN,EAACO,GAAc,EAAA,UAAA3B,EAAE,YAAY,GAAE;AAAA,cACrC,GAAGiB;AAAA,cAEJ,UAAA,gBAAAG,EAACC,GAAY,EAAA,SAAQ,SACnB,UAAA,gBAAAD;AAAA,gBAACa;AAAA,gBAAA;AAAA,kBACC,MAAA/B;AAAA,kBACA,MAAAE;AAAA,kBACA,OAAO,MACLF,EAAK,MAAM;AAAA,oBACT,GAAGA,EAAK,UAAU;AAAA,kBAAA,CACnB;AAAA,kBAEH,MAAK;AAAA,gBAAA;AAAA,cAAA,GAET;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAkB;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,eAAY;AAAA,cACZ,OAAO,gBAAAN,EAACO,GAAc,EAAA,UAAA3B,EAAE,SAAS,GAAE;AAAA,cAClC,GAAGkB;AAAA,cAEJ,4BAACgB,GAAQ,EAAA;AAAA,YAAA;AAAA,UACX;AAAA,UACA,gBAAAd;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,eAAY;AAAA,cACZ,OAAO,gBAAAN,EAACO,GAAc,EAAA,UAAA3B,EAAE,mBAAmB,GAAE;AAAA,cAC5C,GAAGmB;AAAA,cAEJ,4BAACgB,GAAkB,EAAA;AAAA,YAAA;AAAA,UACrB;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"DetailOrganization-DUNwCft_.js","sources":["../src/organizations/DetailOrganization.tsx"],"sourcesContent":["import {\n FormSubmitButton,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Button,\n PageSection,\n Tab,\n TabTitleText,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../admin-client\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { AttributesForm } from \"../components/key-value-form/AttributeForm\";\nimport { arrayToKeyValue } from \"../components/key-value-form/key-value-convert\";\nimport {\n RoutableTabs,\n useRoutableTab,\n} from \"../components/routable-tabs/RoutableTabs\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport { useParams } from \"../utils/useParams\";\nimport { DetailOrganizationHeader } from \"./DetailOraganzationHeader\";\nimport { IdentityProviders } from \"./IdentityProviders\";\nimport { Members } from \"./Members\";\nimport {\n OrganizationForm,\n OrganizationFormType,\n convertToOrg,\n} from \"./OrganizationForm\";\nimport {\n EditOrganizationParams,\n OrganizationTab,\n toEditOrganization,\n} from \"./routes/EditOrganization\";\n\nexport default function DetailOrganization() {\n const { adminClient } = useAdminClient();\n const { addAlert, addError } = useAlerts();\n\n const { realm } = useRealm();\n const { id } = useParams<EditOrganizationParams>();\n const { t } = useTranslation();\n\n const form = useForm<OrganizationFormType>();\n\n const save = async (org: OrganizationFormType) => {\n try {\n const organization = convertToOrg(org);\n await adminClient.organizations.updateById({ id }, organization);\n addAlert(t(\"organizationSaveSuccess\"));\n } catch (error) {\n addError(\"organizationSaveError\", error);\n }\n };\n\n useFetch(\n () => adminClient.organizations.findOne({ id }),\n (org) => {\n if (!org) {\n throw new Error(t(\"notFound\"));\n }\n form.reset({\n ...org,\n domains: org.domains?.map((d) => d.name),\n attributes: arrayToKeyValue(org.attributes),\n });\n },\n [id],\n );\n\n const useTab = (tab: OrganizationTab) =>\n useRoutableTab(\n toEditOrganization({\n realm,\n id,\n tab,\n }),\n );\n\n const settingsTab = useTab(\"settings\");\n const attributesTab = useTab(\"attributes\");\n const membersTab = useTab(\"members\");\n const identityProvidersTab = useTab(\"identityProviders\");\n\n return (\n <PageSection variant=\"light\" className=\"pf-v5-u-p-0\">\n <FormProvider {...form}>\n <DetailOrganizationHeader save={() => save(form.getValues())} />\n <RoutableTabs\n data-testid=\"organization-tabs\"\n aria-label={t(\"organization\")}\n isBox\n mountOnEnter\n >\n <Tab\n id=\"settings\"\n data-testid=\"settingsTab\"\n title={<TabTitleText>{t(\"settings\")}</TabTitleText>}\n {...settingsTab}\n >\n <PageSection>\n <FormAccess\n role=\"anyone\"\n onSubmit={form.handleSubmit(save)}\n isHorizontal\n >\n <OrganizationForm readOnly />\n <ActionGroup>\n <FormSubmitButton\n formState={form.formState}\n data-testid=\"save\"\n >\n {t(\"save\")}\n </FormSubmitButton>\n <Button\n onClick={() => form.reset()}\n data-testid=\"reset\"\n variant=\"link\"\n >\n {t(\"reset\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </PageSection>\n </Tab>\n <Tab\n id=\"attributes\"\n data-testid=\"attributeTab\"\n title={<TabTitleText>{t(\"attributes\")}</TabTitleText>}\n {...attributesTab}\n >\n <PageSection variant=\"light\">\n <AttributesForm\n form={form}\n save={save}\n reset={() =>\n form.reset({\n ...form.getValues(),\n })\n }\n name=\"attributes\"\n />\n </PageSection>\n </Tab>\n <Tab\n id=\"members\"\n data-testid=\"membersTab\"\n title={<TabTitleText>{t(\"members\")}</TabTitleText>}\n {...membersTab}\n >\n <Members />\n </Tab>\n <Tab\n id=\"identityProviders\"\n data-testid=\"identityProvidersTab\"\n title={<TabTitleText>{t(\"identityProviders\")}</TabTitleText>}\n {...identityProvidersTab}\n >\n <IdentityProviders />\n </Tab>\n </RoutableTabs>\n </FormProvider>\n </PageSection>\n );\n}\n"],"names":["DetailOrganization","adminClient","useAdminClient","addAlert","addError","useAlerts","realm","useRealm","id","useParams","t","useTranslation","form","useForm","save","org","organization","convertToOrg","error","useFetch","d","arrayToKeyValue","useTab","tab","useRoutableTab","toEditOrganization","settingsTab","attributesTab","membersTab","identityProvidersTab","jsx","PageSection","jsxs","FormProvider","DetailOrganizationHeader","RoutableTabs","Tab","TabTitleText","FormAccess","OrganizationForm","ActionGroup","FormSubmitButton","Button","AttributesForm","Members","IdentityProviders"],"mappings":";;;AAsCA,SAAwBA,IAAqB;AACrC,QAAA,EAAE,aAAAC,MAAgBC,KAClB,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GAEnC,EAAE,OAAAC,MAAUC,KACZ,EAAE,IAAAC,MAAOC,KACT,EAAE,GAAAC,MAAMC,KAERC,IAAOC,KAEPC,IAAO,OAAOC,MAA8B;AAC5C,QAAA;AACI,YAAAC,IAAeC,EAAaF,CAAG;AACrC,YAAMd,EAAY,cAAc,WAAW,EAAE,IAAAO,EAAA,GAAMQ,CAAY,GACtDb,EAAAO,EAAE,yBAAyB,CAAC;AAAA,aAC9BQ,GAAO;AACd,MAAAd,EAAS,yBAAyBc,CAAK;AAAA,IACzC;AAAA,EAAA;AAGFC,EAAAA;AAAAA,IACE,MAAMlB,EAAY,cAAc,QAAQ,EAAE,IAAAO,GAAI;AAAA,IAC9C,CAACO,MAAQ;AACP,UAAI,CAACA;AACH,cAAM,IAAI,MAAML,EAAE,UAAU,CAAC;AAE/B,MAAAE,EAAK,MAAM;AAAA,QACT,GAAGG;AAAA,QACH,SAASA,EAAI,SAAS,IAAI,CAACK,MAAMA,EAAE,IAAI;AAAA,QACvC,YAAYC,EAAgBN,EAAI,UAAU;AAAA,MAAA,CAC3C;AAAA,IACH;AAAA,IACA,CAACP,CAAE;AAAA,EAAA;AAGC,QAAAc,IAAS,CAACC,MACdC;AAAA,IACEC,EAAmB;AAAA,MACjB,OAAAnB;AAAA,MACA,IAAAE;AAAA,MACA,KAAAe;AAAA,IAAA,CACD;AAAA,EAAA,GAGCG,IAAcJ,EAAO,UAAU,GAC/BK,IAAgBL,EAAO,YAAY,GACnCM,IAAaN,EAAO,SAAS,GAC7BO,IAAuBP,EAAO,mBAAmB;AAGrD,SAAA,gBAAAQ,EAACC,KAAY,SAAQ,SAAQ,WAA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AAO,gBAAAN,EAACO,GAAc,EAAA,UAAA3B,EAAE,YAAY,GAAE;AAAA,cACrC,GAAGiB;AAAA,cAEJ,UAAA,gBAAAG,EAACC,GAAY,EAAA,SAAQ,SACnB,UAAA,gBAAAD;AAAA,gBAACa;AAAA,gBAAA;AAAA,kBACC,MAAA/B;AAAA,kBACA,MAAAE;AAAA,kBACA,OAAO,MACLF,EAAK,MAAM;AAAA,oBACT,GAAGA,EAAK,UAAU;AAAA,kBAAA,CACnB;AAAA,kBAEH,MAAK;AAAA,gBAAA;AAAA,cAAA,GAET;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAkB;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,eAAY;AAAA,cACZ,OAAO,gBAAAN,EAACO,GAAc,EAAA,UAAA3B,EAAE,SAAS,GAAE;AAAA,cAClC,GAAGkB;AAAA,cAEJ,4BAACgB,GAAQ,EAAA;AAAA,YAAA;AAAA,UACX;AAAA,UACA,gBAAAd;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,eAAY;AAAA,cACZ,OAAO,gBAAAN,EAACO,GAAc,EAAA,UAAA3B,EAAE,mBAAmB,GAAE;AAAA,cAC5C,GAAGmB;AAAA,cAEJ,4BAACgB,GAAkB,EAAA;AAAA,YAAA;AAAA,UACrB;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
@@ -1,14 +1,14 @@
1
1
  import { jsxs as u, Fragment as R, jsx as o } from "react/jsx-runtime";
2
- import { u as q, b9 as k, $ as J, bF as Q, b as U, m as W, V as X, P as Y, c as Z, bf as _, bg as V, b6 as ee, b7 as te, b8 as oe, aP as re, F as ce, aL as ae, A as se, B as g, bG as b, d as ne } from "./index-WPS7MqzE.js";
2
+ import { u as $, b9 as S, U as q, bF as J, b as Q, o as W, V as X, P as Y, c as Z, bf as _, bg as V, b6 as ee, b7 as te, b8 as oe, aP as re, F as ce, aL as ae, A as se, B as g, bG as b, d as ne } from "./index-6gx7hHms.js";
3
3
  import { useState as l } from "react";
4
4
  import { useTranslation as ie } from "react-i18next";
5
5
  import { useNavigate as le, Link as F } from "react-router-dom";
6
- const C = {
6
+ const I = {
7
7
  config: {},
8
8
  executor: ""
9
9
  };
10
10
  function ge() {
11
- const { adminClient: h } = q(), { t: a } = ie(), I = le(), { realm: d, profileName: n } = k(), { executorName: i } = k(), { addAlert: A, addError: G } = J(), [H, P] = l(!1), x = Q().componentTypes?.["org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider"], [f, N] = l([]), [O, B] = l([]), [T, L] = l([]), [D, $] = l([]), p = U({ defaultValues: C }), { control: j, reset: v, handleSubmit: w } = p, c = !!i, y = (e) => {
11
+ const { adminClient: h } = $(), { t: a } = ie(), C = le(), { realm: d, profileName: n } = S(), { executorName: i } = S(), { addAlert: A, addError: G } = q(), [H, P] = l(!1), x = J().componentTypes?.["org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider"], [f, N] = l([]), [O, B] = l([]), [T, L] = l([]), [D, j] = l([]), p = Q({ defaultValues: I }), { control: w, reset: v, handleSubmit: U } = p, c = !!i, y = (e) => {
12
12
  const r = e.find((s) => s.name === n)?.executors?.find(
13
13
  (s) => s.executor === i
14
14
  );
@@ -17,7 +17,7 @@ function ge() {
17
17
  W(
18
18
  () => h.clientPolicies.listProfiles({ includeGlobalProfiles: !0 }),
19
19
  (e) => {
20
- L(e.globalProfiles), $(e.profiles), y(e.profiles), y(e.globalProfiles);
20
+ L(e.globalProfiles), j(e.profiles), y(e.profiles), y(e.globalProfiles);
21
21
  },
22
22
  []
23
23
  );
@@ -30,11 +30,11 @@ function ge() {
30
30
  configuration: e.config || {}
31
31
  });
32
32
  if (c) {
33
- const S = r.executors.find(
33
+ const k = r.executors.find(
34
34
  (M) => M.executor === i
35
35
  );
36
- S.configuration = {
37
- ...S.configuration,
36
+ k.configuration = {
37
+ ...k.configuration,
38
38
  ...e.config
39
39
  };
40
40
  }
@@ -50,7 +50,7 @@ function ge() {
50
50
  }), A(
51
51
  a(c ? "updateExecutorSuccess" : "addExecutorSuccess"),
52
52
  ne.success
53
- ), I(b({ realm: d, profileName: n }));
53
+ ), C(b({ realm: d, profileName: n }));
54
54
  } catch (r) {
55
55
  G(c ? "updateExecutorError" : "addExecutorError", r);
56
56
  }
@@ -107,7 +107,7 @@ function ge() {
107
107
  {
108
108
  name: "executor",
109
109
  defaultValue: "",
110
- control: j,
110
+ control: w,
111
111
  render: ({ field: e }) => /* @__PURE__ */ o(
112
112
  te,
113
113
  {
@@ -115,7 +115,7 @@ function ge() {
115
115
  placeholderText: "Select an executor",
116
116
  onToggle: (t) => P(t),
117
117
  onSelect: (t) => {
118
- v({ ...C, executor: t.toString() });
118
+ v({ ...I, executor: t.toString() });
119
119
  const r = x?.filter(
120
120
  (s) => s.id === t
121
121
  );
@@ -157,7 +157,7 @@ function ge() {
157
157
  g,
158
158
  {
159
159
  variant: "primary",
160
- onClick: () => w(z)(),
160
+ onClick: () => U(z)(),
161
161
  "data-testid": "addExecutor-saveBtn",
162
162
  children: a(c ? "save" : "add")
163
163
  }
@@ -195,4 +195,4 @@ function ge() {
195
195
  export {
196
196
  ge as default
197
197
  };
198
- //# sourceMappingURL=ExecutorForm-CwWVGOtW.js.map
198
+ //# sourceMappingURL=ExecutorForm-Dp7Iqxos.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExecutorForm-CwWVGOtW.js","sources":["../src/realm-settings/ExecutorForm.tsx"],"sourcesContent":["import type { ConfigPropertyRepresentation } from \"@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation\";\nimport type ClientProfileRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation\";\nimport type ComponentTypeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation\";\nimport {\n HelpItem,\n KeycloakSelect,\n SelectVariant,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n FormGroup,\n PageSection,\n SelectOption,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { DynamicComponents } from \"../components/dynamic/DynamicComponents\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { ViewHeader } from \"../components/view-header/ViewHeader\";\nimport { useServerInfo } from \"../context/server-info/ServerInfoProvider\";\nimport { useParams } from \"../utils/useParams\";\nimport { ClientProfileParams, toClientProfile } from \"./routes/ClientProfile\";\nimport type { ExecutorParams } from \"./routes/Executor\";\n\ntype ExecutorForm = {\n config?: object;\n executor: string;\n};\n\nconst defaultValues: ExecutorForm = {\n config: {},\n executor: \"\",\n};\n\nexport default function ExecutorForm() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm, profileName } = useParams<ClientProfileParams>();\n const { executorName } = useParams<ExecutorParams>();\n const { addAlert, addError } = useAlerts();\n const [selectExecutorTypeOpen, setSelectExecutorTypeOpen] = useState(false);\n const serverInfo = useServerInfo();\n const executorTypes =\n serverInfo.componentTypes?.[\n \"org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider\"\n ];\n const [executors, setExecutors] = useState<ComponentTypeRepresentation[]>([]);\n const [executorProperties, setExecutorProperties] = useState<\n ConfigPropertyRepresentation[]\n >([]);\n const [globalProfiles, setGlobalProfiles] = useState<\n ClientProfileRepresentation[]\n >([]);\n const [profiles, setProfiles] = useState<ClientProfileRepresentation[]>([]);\n const form = useForm({ defaultValues });\n const { control, reset, handleSubmit } = form;\n const editMode = !!executorName;\n\n const setupForm = (profiles: ClientProfileRepresentation[]) => {\n const profile = profiles.find((profile) => profile.name === profileName);\n const executor = profile?.executors?.find(\n (executor) => executor.executor === executorName,\n );\n if (executor) reset({ config: executor.configuration });\n };\n\n useFetch(\n () =>\n adminClient.clientPolicies.listProfiles({ includeGlobalProfiles: true }),\n (profiles) => {\n setGlobalProfiles(profiles.globalProfiles!);\n setProfiles(profiles.profiles!);\n\n setupForm(profiles.profiles!);\n setupForm(profiles.globalProfiles!);\n },\n [],\n );\n\n const save = async () => {\n const formValues = form.getValues();\n const updatedProfiles = profiles.map((profile) => {\n if (profile.name !== profileName) {\n return profile;\n }\n\n const executors = (profile.executors ?? []).concat({\n executor: formValues.executor,\n configuration: formValues.config || {},\n });\n\n if (editMode) {\n const profileExecutor = profile.executors!.find(\n (executor) => executor.executor === executorName,\n );\n profileExecutor!.configuration = {\n ...profileExecutor!.configuration,\n ...formValues.config,\n };\n }\n\n if (editMode) {\n return profile;\n }\n return {\n ...profile,\n executors,\n };\n });\n try {\n await adminClient.clientPolicies.createProfiles({\n profiles: updatedProfiles,\n globalProfiles: globalProfiles,\n });\n addAlert(\n editMode ? t(\"updateExecutorSuccess\") : t(\"addExecutorSuccess\"),\n AlertVariant.success,\n );\n\n navigate(toClientProfile({ realm, profileName }));\n } catch (error) {\n addError(editMode ? \"updateExecutorError\" : \"addExecutorError\", error);\n }\n };\n\n const globalProfile = globalProfiles.find(\n (globalProfile) => globalProfile.name === profileName,\n );\n\n const profileExecutorType = executorTypes?.find(\n (executor) => executor.id === executorName,\n );\n\n const editedProfileExecutors =\n profileExecutorType?.properties.map<ConfigPropertyRepresentation>(\n (property) => {\n const globalDefaultValues = editMode ? property.defaultValue : \"\";\n return {\n ...property,\n defaultValue: globalDefaultValues,\n };\n },\n );\n\n return (\n <>\n <ViewHeader\n titleKey={editMode ? executorName : t(\"addExecutor\")}\n divider\n />\n <PageSection variant=\"light\">\n <FormAccess\n isHorizontal\n role=\"manage-realm\"\n className=\"pf-v5-u-mt-lg\"\n isReadOnly={!!globalProfile}\n >\n <FormGroup\n label={t(\"executorType\")}\n fieldId=\"kc-executorType\"\n labelIcon={\n executors.length > 0 && executors[0].helpText! !== \"\" ? (\n <HelpItem\n helpText={executors[0].helpText}\n fieldLabelId=\"executorTypeHelpText\"\n />\n ) : editMode ? (\n <HelpItem\n helpText={profileExecutorType?.helpText}\n fieldLabelId=\"executorTypeHelpText\"\n />\n ) : undefined\n }\n >\n <Controller\n name=\"executor\"\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n <KeycloakSelect\n toggleId=\"kc-executor\"\n placeholderText=\"Select an executor\"\n onToggle={(isOpen) => setSelectExecutorTypeOpen(isOpen)}\n onSelect={(value) => {\n reset({ ...defaultValues, executor: value.toString() });\n const selectedExecutor = executorTypes?.filter(\n (type) => type.id === value,\n );\n setExecutors(selectedExecutor ?? []);\n setExecutorProperties(\n selectedExecutor?.[0].properties ?? [],\n );\n setSelectExecutorTypeOpen(false);\n }}\n selections={editMode ? executorName : field.value}\n variant={SelectVariant.single}\n data-testid=\"executorType-select\"\n aria-label={t(\"executorType\")}\n isOpen={selectExecutorTypeOpen}\n maxHeight={580}\n isDisabled={editMode}\n >\n {executorTypes?.map((option) => (\n <SelectOption\n selected={option.id === field.value}\n key={option.id}\n value={option.id}\n description={option.helpText}\n >\n {option.id}\n </SelectOption>\n ))}\n </KeycloakSelect>\n )}\n />\n </FormGroup>\n <FormProvider {...form}>\n <DynamicComponents\n properties={\n editMode ? editedProfileExecutors! : executorProperties\n }\n />\n </FormProvider>\n {!globalProfile && (\n <ActionGroup>\n <Button\n variant=\"primary\"\n onClick={() => handleSubmit(save)()}\n data-testid=\"addExecutor-saveBtn\"\n >\n {editMode ? t(\"save\") : t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n component={(props) => (\n <Link\n {...props}\n to={toClientProfile({ realm, profileName })}\n />\n )}\n data-testid=\"addExecutor-cancelBtn\"\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n )}\n </FormAccess>\n {editMode && globalProfile && (\n <div className=\"kc-backToProfile\">\n <Button\n component={(props) => (\n <Link {...props} to={toClientProfile({ realm, profileName })} />\n )}\n variant=\"primary\"\n >\n {t(\"back\")}\n </Button>\n </div>\n )}\n </PageSection>\n </>\n );\n}\n"],"names":["defaultValues","ExecutorForm","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","profileName","useParams","executorName","addAlert","addError","useAlerts","selectExecutorTypeOpen","setSelectExecutorTypeOpen","useState","executorTypes","useServerInfo","executors","setExecutors","executorProperties","setExecutorProperties","globalProfiles","setGlobalProfiles","profiles","setProfiles","form","useForm","control","reset","handleSubmit","editMode","setupForm","executor","profile","useFetch","save","formValues","updatedProfiles","profileExecutor","AlertVariant","toClientProfile","error","globalProfile","profileExecutorType","editedProfileExecutors","property","globalDefaultValues","jsxs","Fragment","jsx","ViewHeader","PageSection","FormAccess","FormGroup","HelpItem","Controller","field","KeycloakSelect","isOpen","value","selectedExecutor","type","SelectVariant","option","SelectOption","FormProvider","DynamicComponents","ActionGroup","Button","props","Link"],"mappings":";;;;;AAoCA,MAAMA,IAA8B;AAAA,EAClC,QAAQ,CAAC;AAAA,EACT,UAAU;AACZ;AAEA,SAAwBC,KAAe;AAC/B,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,MACRC,IAAWC,MACX,EAAE,OAAAC,GAAO,aAAAC,EAAY,IAAIC,EAA+B,GACxD,EAAE,cAAAC,MAAiBD,KACnB,EAAE,UAAAE,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,CAACC,GAAwBC,CAAyB,IAAIC,EAAS,EAAK,GAEpEC,IADaC,IAEN,iBACT,0EACF,GACI,CAACC,GAAWC,CAAY,IAAIJ,EAAwC,CAAE,CAAA,GACtE,CAACK,GAAoBC,CAAqB,IAAIN,EAElD,CAAE,CAAA,GACE,CAACO,GAAgBC,CAAiB,IAAIR,EAE1C,CAAE,CAAA,GACE,CAACS,GAAUC,CAAW,IAAIV,EAAwC,CAAE,CAAA,GACpEW,IAAOC,EAAQ,EAAE,eAAA7B,EAAe,CAAA,GAChC,EAAE,SAAA8B,GA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m-settings/ExecutorForm.tsx"],"sourcesContent":["import type { ConfigPropertyRepresentation } from \"@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation\";\nimport type ClientProfileRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation\";\nimport type ComponentTypeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation\";\nimport {\n HelpItem,\n KeycloakSelect,\n SelectVariant,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n FormGroup,\n PageSection,\n SelectOption,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { DynamicComponents } from \"../components/dynamic/DynamicComponents\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { ViewHeader } from \"../components/view-header/ViewHeader\";\nimport { useServerInfo } from \"../context/server-info/ServerInfoProvider\";\nimport { useParams } from \"../utils/useParams\";\nimport { ClientProfileParams, toClientProfile } from \"./routes/ClientProfile\";\nimport type { ExecutorParams } from \"./routes/Executor\";\n\ntype ExecutorForm = {\n config?: object;\n executor: string;\n};\n\nconst defaultValues: ExecutorForm = {\n config: {},\n executor: \"\",\n};\n\nexport default function ExecutorForm() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm, profileName } = useParams<ClientProfileParams>();\n const { executorName } = useParams<ExecutorParams>();\n const { addAlert, addError } = useAlerts();\n const [selectExecutorTypeOpen, setSelectExecutorTypeOpen] = useState(false);\n const serverInfo = useServerInfo();\n const executorTypes =\n serverInfo.componentTypes?.[\n \"org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider\"\n ];\n const [executors, setExecutors] = useState<ComponentTypeRepresentation[]>([]);\n const [executorProperties, setExecutorProperties] = useState<\n ConfigPropertyRepresentation[]\n >([]);\n const [globalProfiles, setGlobalProfiles] = useState<\n ClientProfileRepresentation[]\n >([]);\n const [profiles, setProfiles] = useState<ClientProfileRepresentation[]>([]);\n const form = useForm({ defaultValues });\n const { control, reset, handleSubmit } = form;\n const editMode = !!executorName;\n\n const setupForm = (profiles: ClientProfileRepresentation[]) => {\n const profile = profiles.find((profile) => profile.name === profileName);\n const executor = profile?.executors?.find(\n (executor) => executor.executor === executorName,\n );\n if (executor) reset({ config: executor.configuration });\n };\n\n useFetch(\n () =>\n adminClient.clientPolicies.listProfiles({ includeGlobalProfiles: true }),\n (profiles) => {\n setGlobalProfiles(profiles.globalProfiles!);\n setProfiles(profiles.profiles!);\n\n setupForm(profiles.profiles!);\n setupForm(profiles.globalProfiles!);\n },\n [],\n );\n\n const save = async () => {\n const formValues = form.getValues();\n const updatedProfiles = profiles.map((profile) => {\n if (profile.name !== profileName) {\n return profile;\n }\n\n const executors = (profile.executors ?? []).concat({\n executor: formValues.executor,\n configuration: formValues.config || {},\n });\n\n if (editMode) {\n const profileExecutor = profile.executors!.find(\n (executor) => executor.executor === executorName,\n );\n profileExecutor!.configuration = {\n ...profileExecutor!.configuration,\n ...formValues.config,\n };\n }\n\n if (editMode) {\n return profile;\n }\n return {\n ...profile,\n executors,\n };\n });\n try {\n await adminClient.clientPolicies.createProfiles({\n profiles: updatedProfiles,\n globalProfiles: globalProfiles,\n });\n addAlert(\n editMode ? t(\"updateExecutorSuccess\") : t(\"addExecutorSuccess\"),\n AlertVariant.success,\n );\n\n navigate(toClientProfile({ realm, profileName }));\n } catch (error) {\n addError(editMode ? \"updateExecutorError\" : \"addExecutorError\", error);\n }\n };\n\n const globalProfile = globalProfiles.find(\n (globalProfile) => globalProfile.name === profileName,\n );\n\n const profileExecutorType = executorTypes?.find(\n (executor) => executor.id === executorName,\n );\n\n const editedProfileExecutors =\n profileExecutorType?.properties.map<ConfigPropertyRepresentation>(\n (property) => {\n const globalDefaultValues = editMode ? property.defaultValue : \"\";\n return {\n ...property,\n defaultValue: globalDefaultValues,\n };\n },\n );\n\n return (\n <>\n <ViewHeader\n titleKey={editMode ? executorName : t(\"addExecutor\")}\n divider\n />\n <PageSection variant=\"light\">\n <FormAccess\n isHorizontal\n role=\"manage-realm\"\n className=\"pf-v5-u-mt-lg\"\n isReadOnly={!!globalProfile}\n >\n <FormGroup\n label={t(\"executorType\")}\n fieldId=\"kc-executorType\"\n labelIcon={\n executors.length > 0 && executors[0].helpText! !== \"\" ? (\n <HelpItem\n helpText={executors[0].helpText}\n fieldLabelId=\"executorTypeHelpText\"\n />\n ) : editMode ? (\n <HelpItem\n helpText={profileExecutorType?.helpText}\n fieldLabelId=\"executorTypeHelpText\"\n />\n ) : undefined\n }\n >\n <Controller\n name=\"executor\"\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n <KeycloakSelect\n toggleId=\"kc-executor\"\n placeholderText=\"Select an executor\"\n onToggle={(isOpen) => setSelectExecutorTypeOpen(isOpen)}\n onSelect={(value) => {\n reset({ ...defaultValues, executor: value.toString() });\n const selectedExecutor = executorTypes?.filter(\n (type) => type.id === value,\n );\n setExecutors(selectedExecutor ?? []);\n setExecutorProperties(\n selectedExecutor?.[0].properties ?? [],\n );\n setSelectExecutorTypeOpen(false);\n }}\n selections={editMode ? executorName : field.value}\n variant={SelectVariant.single}\n data-testid=\"executorType-select\"\n aria-label={t(\"executorType\")}\n isOpen={selectExecutorTypeOpen}\n maxHeight={580}\n isDisabled={editMode}\n >\n {executorTypes?.map((option) => (\n <SelectOption\n selected={option.id === field.value}\n key={option.id}\n value={option.id}\n description={option.helpText}\n >\n {option.id}\n </SelectOption>\n ))}\n </KeycloakSelect>\n )}\n />\n </FormGroup>\n <FormProvider {...form}>\n <DynamicComponents\n properties={\n editMode ? editedProfileExecutors! : executorProperties\n }\n />\n </FormProvider>\n {!globalProfile && (\n <ActionGroup>\n <Button\n variant=\"primary\"\n onClick={() => handleSubmit(save)()}\n data-testid=\"addExecutor-saveBtn\"\n >\n {editMode ? t(\"save\") : t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n component={(props) => (\n <Link\n {...props}\n to={toClientProfile({ realm, profileName })}\n />\n )}\n data-testid=\"addExecutor-cancelBtn\"\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n )}\n </FormAccess>\n {editMode && globalProfile && (\n <div className=\"kc-backToProfile\">\n <Button\n component={(props) => (\n <Link {...props} to={toClientProfile({ realm, profileName })} />\n )}\n variant=\"primary\"\n >\n {t(\"back\")}\n </Button>\n </div>\n )}\n </PageSection>\n </>\n );\n}\n"],"names":["defaultValues","ExecutorForm","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","profileName","useParams","executorName","addAlert","addError","useAlerts","selectExecutorTypeOpen","setSelectExecutorTypeOpen","useState","executorTypes","useServerInfo","executors","setExecutors","executorProperties","setExecutorProperties","globalProfiles","setGlobalProfiles","profiles","setProfiles","form","useForm","control","reset","handleSubmit","editMode","setupForm","executor","profile","useFetch","save","formValues","updatedProfiles","profileExecutor","AlertVariant","toClientProfile","error","globalProfile","profileExecutorType","editedProfileExecutors","property","globalDefaultValues","jsxs","Fragment","jsx","ViewHeader","PageSection","FormAccess","FormGroup","HelpItem","Controller","field","KeycloakSelect","isOpen","value","selectedExecutor","type","SelectVariant","option","SelectOption","FormProvider","DynamicComponents","ActionGroup","Button","props","Link"],"mappings":";;;;;AAoCA,MAAMA,IAA8B;AAAA,EAClC,QAAQ,CAAC;AAAA,EACT,UAAU;AACZ;AAEA,SAAwBC,KAAe;AAC/B,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,MACRC,IAAWC,MACX,EAAE,OAAAC,GAAO,aAAAC,EAAY,IAAIC,EAA+B,GACxD,EAAE,cAAAC,MAAiBD,KACnB,EAAE,UAAAE,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,CAACC,GAAwBC,CAAyB,IAAIC,EAAS,EAAK,GAEpEC,IADaC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