keycloakify 10.1.3 → 11.0.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 (198) hide show
  1. package/account/KcContext/kcContextMocks.js +18 -6
  2. package/account/KcContext/kcContextMocks.js.map +1 -1
  3. package/account/Template.js +8 -26
  4. package/account/Template.js.map +1 -1
  5. package/account/Template.useInitialize.d.ts +12 -0
  6. package/account/Template.useInitialize.js +20 -0
  7. package/account/Template.useInitialize.js.map +1 -0
  8. package/account/i18n/index.d.ts +5 -5
  9. package/account/i18n/index.js +1 -1
  10. package/account/i18n/index.js.map +1 -1
  11. package/account/i18n/messages_defaultSet/types.d.ts +3 -0
  12. package/account/i18n/messages_defaultSet/types.js +26 -0
  13. package/account/i18n/messages_defaultSet/types.js.map +1 -0
  14. package/account/i18n/noJsx/GenericI18n_noJsx.d.ts +63 -0
  15. package/account/i18n/noJsx/GenericI18n_noJsx.js +2 -0
  16. package/account/i18n/noJsx/GenericI18n_noJsx.js.map +1 -0
  17. package/account/i18n/noJsx/getI18n.d.ts +41 -0
  18. package/account/i18n/noJsx/getI18n.js +207 -0
  19. package/account/i18n/noJsx/getI18n.js.map +1 -0
  20. package/account/i18n/noJsx/i18nBuilder.d.ts +18 -0
  21. package/account/i18n/noJsx/i18nBuilder.js +27 -0
  22. package/account/i18n/noJsx/i18nBuilder.js.map +1 -0
  23. package/account/i18n/noJsx/index.d.ts +3 -0
  24. package/account/i18n/noJsx/index.js +2 -0
  25. package/account/i18n/noJsx/index.js.map +1 -0
  26. package/account/i18n/withJsx/GenericI18n.d.ts +72 -0
  27. package/account/i18n/withJsx/GenericI18n.js +5 -0
  28. package/account/i18n/withJsx/GenericI18n.js.map +1 -0
  29. package/account/i18n/withJsx/i18nBuilder.d.ts +18 -0
  30. package/account/i18n/withJsx/i18nBuilder.js +27 -0
  31. package/account/i18n/withJsx/i18nBuilder.js.map +1 -0
  32. package/account/i18n/withJsx/index.d.ts +3 -0
  33. package/account/i18n/withJsx/index.js +2 -0
  34. package/account/i18n/withJsx/index.js.map +1 -0
  35. package/account/i18n/withJsx/useI18n.d.ts +27 -0
  36. package/account/i18n/{useI18n.js → withJsx/useI18n.js} +6 -4
  37. package/account/i18n/withJsx/useI18n.js.map +1 -0
  38. package/account/index.d.ts +1 -1
  39. package/account/index.js +1 -1
  40. package/account/index.js.map +1 -1
  41. package/account/pages/Totp.js +3 -2
  42. package/account/pages/Totp.js.map +1 -1
  43. package/bin/246.index.js +191 -191
  44. package/bin/499.index.js +252 -68
  45. package/bin/main.js +1 -1
  46. package/lib/kcSanitize/HtmlPolicyBuilder.d.ts +28 -0
  47. package/lib/kcSanitize/HtmlPolicyBuilder.js +209 -0
  48. package/lib/kcSanitize/HtmlPolicyBuilder.js.map +1 -0
  49. package/lib/kcSanitize/KcSanitizer.d.ts +12 -0
  50. package/lib/kcSanitize/KcSanitizer.js +46 -0
  51. package/lib/kcSanitize/KcSanitizer.js.map +1 -0
  52. package/lib/kcSanitize/KcSanitizerPolicy.d.ts +24 -0
  53. package/lib/kcSanitize/KcSanitizerPolicy.js +149 -0
  54. package/lib/kcSanitize/KcSanitizerPolicy.js.map +1 -0
  55. package/lib/kcSanitize/index.d.ts +1 -0
  56. package/lib/kcSanitize/index.js +5 -0
  57. package/lib/kcSanitize/index.js.map +1 -0
  58. package/login/KcContext/kcContextMocks.js +24 -6
  59. package/login/KcContext/kcContextMocks.js.map +1 -1
  60. package/login/Template.js +7 -7
  61. package/login/Template.js.map +1 -1
  62. package/login/{Template.useStylesAndScripts.d.ts → Template.useInitialize.d.ts} +1 -4
  63. package/login/{Template.useStylesAndScripts.js → Template.useInitialize.js} +5 -23
  64. package/login/Template.useInitialize.js.map +1 -0
  65. package/login/i18n/index.d.ts +5 -5
  66. package/login/i18n/index.js +1 -1
  67. package/login/i18n/index.js.map +1 -1
  68. package/login/i18n/messages_defaultSet/types.d.ts +3 -0
  69. package/login/i18n/messages_defaultSet/types.js +33 -0
  70. package/login/i18n/messages_defaultSet/types.js.map +1 -0
  71. package/login/i18n/noJsx/GenericI18n_noJsx.d.ts +63 -0
  72. package/login/i18n/noJsx/GenericI18n_noJsx.js +2 -0
  73. package/login/i18n/noJsx/GenericI18n_noJsx.js.map +1 -0
  74. package/login/i18n/noJsx/getI18n.d.ts +41 -0
  75. package/login/i18n/noJsx/getI18n.js +207 -0
  76. package/login/i18n/noJsx/getI18n.js.map +1 -0
  77. package/login/i18n/noJsx/i18nBuilder.d.ts +18 -0
  78. package/login/i18n/noJsx/i18nBuilder.js +27 -0
  79. package/login/i18n/noJsx/i18nBuilder.js.map +1 -0
  80. package/login/i18n/noJsx/index.d.ts +3 -0
  81. package/login/i18n/noJsx/index.js +2 -0
  82. package/login/i18n/noJsx/index.js.map +1 -0
  83. package/login/i18n/withJsx/GenericI18n.d.ts +72 -0
  84. package/login/i18n/withJsx/GenericI18n.js +5 -0
  85. package/login/i18n/withJsx/GenericI18n.js.map +1 -0
  86. package/login/i18n/withJsx/i18nBuilder.d.ts +18 -0
  87. package/login/i18n/withJsx/i18nBuilder.js +27 -0
  88. package/login/i18n/withJsx/i18nBuilder.js.map +1 -0
  89. package/login/i18n/withJsx/index.d.ts +3 -0
  90. package/login/i18n/withJsx/index.js +2 -0
  91. package/login/i18n/withJsx/index.js.map +1 -0
  92. package/login/i18n/withJsx/useI18n.d.ts +27 -0
  93. package/login/i18n/{useI18n.js → withJsx/useI18n.js} +6 -4
  94. package/login/i18n/withJsx/useI18n.js.map +1 -0
  95. package/login/index.d.ts +1 -1
  96. package/login/index.js +1 -1
  97. package/login/index.js.map +1 -1
  98. package/login/lib/useUserProfileForm.d.ts +1 -1
  99. package/login/lib/useUserProfileForm.js +2 -1
  100. package/login/lib/useUserProfileForm.js.map +1 -1
  101. package/login/pages/Error.js +2 -1
  102. package/login/pages/Error.js.map +1 -1
  103. package/login/pages/Info.js +4 -3
  104. package/login/pages/Info.js.map +1 -1
  105. package/login/pages/Login.js +4 -3
  106. package/login/pages/Login.js.map +1 -1
  107. package/login/pages/LoginConfigTotp.js +3 -2
  108. package/login/pages/LoginConfigTotp.js.map +1 -1
  109. package/login/pages/LoginOtp.js +2 -1
  110. package/login/pages/LoginOtp.js.map +1 -1
  111. package/login/pages/LoginPassword.js +2 -1
  112. package/login/pages/LoginPassword.js.map +1 -1
  113. package/login/pages/LoginRecoveryAuthnCodeInput.js +2 -1
  114. package/login/pages/LoginRecoveryAuthnCodeInput.js.map +1 -1
  115. package/login/pages/LoginResetPassword.js +2 -1
  116. package/login/pages/LoginResetPassword.js.map +1 -1
  117. package/login/pages/LoginUpdatePassword.js +3 -2
  118. package/login/pages/LoginUpdatePassword.js.map +1 -1
  119. package/login/pages/Register.js +2 -1
  120. package/login/pages/Register.js.map +1 -1
  121. package/package.json +110 -31
  122. package/src/account/KcContext/kcContextMocks.ts +49 -29
  123. package/src/account/Template.tsx +11 -32
  124. package/src/account/Template.useInitialize.ts +35 -0
  125. package/src/account/i18n/index.ts +5 -5
  126. package/src/account/i18n/messages_defaultSet/types.ts +30 -0
  127. package/src/account/i18n/noJsx/GenericI18n_noJsx.ts +64 -0
  128. package/src/account/i18n/noJsx/getI18n.tsx +341 -0
  129. package/src/account/i18n/noJsx/i18nBuilder.ts +117 -0
  130. package/src/account/i18n/noJsx/index.ts +3 -0
  131. package/src/account/i18n/withJsx/GenericI18n.tsx +81 -0
  132. package/src/account/i18n/withJsx/i18nBuilder.ts +117 -0
  133. package/src/account/i18n/withJsx/index.ts +3 -0
  134. package/src/{login/i18n → account/i18n/withJsx}/useI18n.tsx +43 -11
  135. package/src/account/index.ts +1 -1
  136. package/src/account/pages/Totp.tsx +3 -2
  137. package/src/bin/initialize-account-theme/src/multi-page/i18n.ts +10 -3
  138. package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +15 -0
  139. package/src/bin/keycloakify/generateResources/generateMessageProperties.ts +371 -121
  140. package/src/bin/keycloakify/generateResources/generateResources.ts +8 -6
  141. package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +61 -29
  142. package/src/bin/keycloakify/generateResources/generateResourcesForThemeVariant.ts +15 -9
  143. package/src/lib/kcSanitize/HtmlPolicyBuilder.ts +252 -0
  144. package/src/lib/kcSanitize/KcSanitizer.ts +60 -0
  145. package/src/lib/kcSanitize/KcSanitizerPolicy.ts +294 -0
  146. package/src/lib/kcSanitize/index.ts +5 -0
  147. package/src/login/KcContext/kcContextMocks.ts +54 -29
  148. package/src/login/Template.tsx +11 -17
  149. package/src/login/{Template.useStylesAndScripts.ts → Template.useInitialize.ts} +5 -29
  150. package/src/login/i18n/index.ts +5 -5
  151. package/src/login/i18n/messages_defaultSet/types.ts +37 -0
  152. package/src/login/i18n/noJsx/GenericI18n_noJsx.ts +64 -0
  153. package/src/login/i18n/noJsx/getI18n.tsx +341 -0
  154. package/src/login/i18n/noJsx/i18nBuilder.ts +117 -0
  155. package/src/login/i18n/noJsx/index.ts +3 -0
  156. package/src/login/i18n/withJsx/GenericI18n.tsx +81 -0
  157. package/src/login/i18n/withJsx/i18nBuilder.ts +117 -0
  158. package/src/login/i18n/withJsx/index.ts +3 -0
  159. package/src/{account/i18n → login/i18n/withJsx}/useI18n.tsx +43 -11
  160. package/src/login/index.ts +1 -1
  161. package/src/login/lib/useUserProfileForm.tsx +3 -2
  162. package/src/login/pages/Error.tsx +2 -1
  163. package/src/login/pages/Info.tsx +13 -10
  164. package/src/login/pages/Login.tsx +4 -3
  165. package/src/login/pages/LoginConfigTotp.tsx +3 -2
  166. package/src/login/pages/LoginOtp.tsx +2 -1
  167. package/src/login/pages/LoginPassword.tsx +2 -1
  168. package/src/login/pages/LoginRecoveryAuthnCodeInput.tsx +2 -1
  169. package/src/login/pages/LoginResetPassword.tsx +2 -1
  170. package/src/login/pages/LoginUpdatePassword.tsx +3 -2
  171. package/src/login/pages/Register.tsx +2 -1
  172. package/src/tools/useInsertScriptTags.ts +1 -1
  173. package/src/tools/vendor/dompurify.ts +3 -0
  174. package/stories/intro/intro.stories.tsx +0 -1
  175. package/tools/useInsertScriptTags.d.ts +1 -1
  176. package/tools/vendor/dompurify.d.ts +2 -0
  177. package/tools/vendor/dompurify.js +2 -0
  178. package/account/i18n/GenericI18n.d.ts +0 -6
  179. package/account/i18n/GenericI18n.js +0 -2
  180. package/account/i18n/GenericI18n.js.map +0 -1
  181. package/account/i18n/i18n.d.ts +0 -87
  182. package/account/i18n/i18n.js +0 -111
  183. package/account/i18n/i18n.js.map +0 -1
  184. package/account/i18n/useI18n.d.ts +0 -14
  185. package/account/i18n/useI18n.js.map +0 -1
  186. package/login/Template.useStylesAndScripts.js.map +0 -1
  187. package/login/i18n/GenericI18n.d.ts +0 -6
  188. package/login/i18n/GenericI18n.js +0 -2
  189. package/login/i18n/GenericI18n.js.map +0 -1
  190. package/login/i18n/i18n.d.ts +0 -87
  191. package/login/i18n/i18n.js +0 -113
  192. package/login/i18n/i18n.js.map +0 -1
  193. package/login/i18n/useI18n.d.ts +0 -14
  194. package/login/i18n/useI18n.js.map +0 -1
  195. package/src/account/i18n/GenericI18n.tsx +0 -6
  196. package/src/account/i18n/i18n.tsx +0 -250
  197. package/src/login/i18n/GenericI18n.tsx +0 -6
  198. package/src/login/i18n/i18n.tsx +0 -252
@@ -1,17 +1,49 @@
1
1
  import { useEffect, useState } from "react";
2
- import { createGetI18n, type GenericI18n_noJsx, type KcContextLike, type MessageKey_defaultSet } from "./i18n";
3
- import { GenericI18n } from "./GenericI18n";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
3
+ import { createGetI18n, type KcContextLike } from "../noJsx/getI18n";
4
+ import type { GenericI18n_noJsx } from "../noJsx/GenericI18n_noJsx";
4
5
  import { Reflect } from "tsafe/Reflect";
6
+ import type { GenericI18n } from "./GenericI18n";
7
+ import type { LanguageTag as LanguageTag_defaultSet, MessageKey as MessageKey_defaultSet } from "../messages_defaultSet/types";
8
+
9
+ export type ReturnTypeOfCreateUseI18n<MessageKey_themeDefined extends string, LanguageTag_notInDefaultSet extends string> = {
10
+ useI18n: (params: { kcContext: KcContextLike }) => {
11
+ i18n: GenericI18n<MessageKey_defaultSet | MessageKey_themeDefined, LanguageTag_defaultSet | LanguageTag_notInDefaultSet>;
12
+ };
13
+ ofTypeI18n: GenericI18n<MessageKey_defaultSet | MessageKey_themeDefined, LanguageTag_defaultSet | LanguageTag_notInDefaultSet>;
14
+ };
15
+
16
+ export { KcContextLike };
17
+
18
+ export function createUseI18n<
19
+ ThemeName extends string = string,
20
+ MessageKey_themeDefined extends string = never,
21
+ LanguageTag_notInDefaultSet extends string = never
22
+ >(params: {
23
+ extraLanguageTranslations: {
24
+ [languageTag in LanguageTag_notInDefaultSet]: {
25
+ label: string;
26
+ getMessages: () => Promise<{ default: Record<MessageKey_defaultSet, string> }>;
27
+ };
28
+ };
29
+ messagesByLanguageTag_themeDefined: Partial<{
30
+ [languageTag in LanguageTag_defaultSet | LanguageTag_notInDefaultSet]: {
31
+ [key in MessageKey_themeDefined]: string | Record<ThemeName, string>;
32
+ };
33
+ }>;
34
+ }): ReturnTypeOfCreateUseI18n<MessageKey_themeDefined, LanguageTag_notInDefaultSet> {
35
+ const { extraLanguageTranslations, messagesByLanguageTag_themeDefined } = params;
36
+
37
+ type LanguageTag = LanguageTag_defaultSet | LanguageTag_notInDefaultSet;
5
38
 
6
- export function createUseI18n<MessageKey_themeDefined extends string = never>(messagesByLanguageTag: {
7
- [languageTag: string]: { [key in MessageKey_themeDefined]: string };
8
- }) {
9
39
  type MessageKey = MessageKey_defaultSet | MessageKey_themeDefined;
10
40
 
11
- type I18n = GenericI18n<MessageKey>;
41
+ type I18n = GenericI18n<MessageKey, LanguageTag>;
42
+
43
+ type Result = { i18n: I18n };
12
44
 
13
45
  const { withJsx } = (() => {
14
- const cache = new WeakMap<GenericI18n_noJsx<MessageKey>, GenericI18n<MessageKey>>();
46
+ const cache = new WeakMap<GenericI18n_noJsx<MessageKey, LanguageTag>, GenericI18n<MessageKey, LanguageTag>>();
15
47
 
16
48
  function renderHtmlString(params: { htmlString: string; msgKey: string }): JSX.Element {
17
49
  const { htmlString, msgKey } = params;
@@ -19,13 +51,13 @@ export function createUseI18n<MessageKey_themeDefined extends string = never>(me
19
51
  <div
20
52
  data-kc-msg={msgKey}
21
53
  dangerouslySetInnerHTML={{
22
- __html: htmlString
54
+ __html: kcSanitize(htmlString)
23
55
  }}
24
56
  />
25
57
  );
26
58
  }
27
59
 
28
- function withJsx(i18n_noJsx: GenericI18n_noJsx<MessageKey>): I18n {
60
+ function withJsx(i18n_noJsx: GenericI18n_noJsx<MessageKey, LanguageTag>): I18n {
29
61
  use_cache: {
30
62
  const i18n = cache.get(i18n_noJsx);
31
63
 
@@ -63,9 +95,9 @@ export function createUseI18n<MessageKey_themeDefined extends string = never>(me
63
95
  (styleElement.textContent = `[data-kc-msg] { display: inline-block; }`), document.head.prepend(styleElement);
64
96
  }
65
97
 
66
- const { getI18n } = createGetI18n(messagesByLanguageTag);
98
+ const { getI18n } = createGetI18n({ extraLanguageTranslations, messagesByLanguageTag_themeDefined });
67
99
 
68
- function useI18n(params: { kcContext: KcContextLike }): { i18n: I18n } {
100
+ function useI18n(params: { kcContext: KcContextLike }): Result {
69
101
  const { kcContext } = params;
70
102
 
71
103
  const { i18n, prI18n_currentLanguage } = getI18n({ kcContext });
@@ -1,3 +1,3 @@
1
1
  export type { ExtendKcContext, Attribute } from "keycloakify/login/KcContext";
2
2
  export type { ClassKey } from "keycloakify/login/TemplateProps";
3
- export { createUseI18n } from "keycloakify/login/i18n";
3
+ export { i18nBuilder, type MessageKey_defaultSet } from "keycloakify/login/i18n";
@@ -3,6 +3,7 @@ import { useMemo, useReducer, useEffect, Fragment, type Dispatch } from "react";
3
3
  import { assert, type Equals } from "tsafe/assert";
4
4
  import { id } from "tsafe/id";
5
5
  import { structuredCloneButFunctions } from "keycloakify/tools/structuredCloneButFunctions";
6
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
6
7
  import { useConstCallback } from "keycloakify/tools/useConstCallback";
7
8
  import { emailRegexp } from "keycloakify/tools/emailRegExp";
8
9
  import { formatNumber } from "keycloakify/tools/formatNumber";
@@ -10,7 +11,7 @@ import { useInsertScriptTags } from "keycloakify/tools/useInsertScriptTags";
10
11
  import type { PasswordPolicies, Attribute, Validators } from "keycloakify/login/KcContext";
11
12
  import type { KcContext } from "../KcContext";
12
13
  import type { MessageKey_defaultSet } from "keycloakify/login/i18n";
13
- import { KcContextLike as KcContextLike_i18n } from "keycloakify/login/i18n";
14
+ import type { KcContextLike as KcContextLike_i18n } from "keycloakify/login/i18n";
14
15
  import type { I18n } from "../i18n";
15
16
 
16
17
  export type FormFieldError = {
@@ -661,7 +662,7 @@ function useGetErrors(params: { kcContext: KcContextLike_useGetErrors; i18n: I18
661
662
  <span
662
663
  key={0}
663
664
  dangerouslySetInnerHTML={{
664
- __html: errorMessageStr
665
+ __html: kcSanitize(errorMessageStr)
665
666
  }}
666
667
  />
667
668
  ),
@@ -1,4 +1,5 @@
1
1
  import type { PageProps } from "keycloakify/login/pages/PageProps";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import type { KcContext } from "../KcContext";
3
4
  import type { I18n } from "../i18n";
4
5
 
@@ -19,7 +20,7 @@ export default function Error(props: PageProps<Extract<KcContext, { pageId: "err
19
20
  headerNode={msg("errorTitle")}
20
21
  >
21
22
  <div id="kc-error-message">
22
- <p className="instruction" dangerouslySetInnerHTML={{ __html: message.summary }} />
23
+ <p className="instruction" dangerouslySetInnerHTML={{ __html: kcSanitize(message.summary) }} />
23
24
  {!skipLink && client !== undefined && client.baseUrl !== undefined && (
24
25
  <p>
25
26
  <a id="backToApplication" href={client.baseUrl}>
@@ -1,4 +1,5 @@
1
1
  import type { PageProps } from "keycloakify/login/pages/PageProps";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import type { KcContext } from "../KcContext";
3
4
  import type { I18n } from "../i18n";
4
5
 
@@ -19,7 +20,7 @@ export default function Info(props: PageProps<Extract<KcContext, { pageId: "info
19
20
  headerNode={
20
21
  <span
21
22
  dangerouslySetInnerHTML={{
22
- __html: messageHeader ?? message.summary
23
+ __html: kcSanitize(messageHeader ?? message.summary)
23
24
  }}
24
25
  />
25
26
  }
@@ -28,19 +29,21 @@ export default function Info(props: PageProps<Extract<KcContext, { pageId: "info
28
29
  <p
29
30
  className="instruction"
30
31
  dangerouslySetInnerHTML={{
31
- __html: (() => {
32
- let html = message.summary;
32
+ __html: kcSanitize(
33
+ (() => {
34
+ let html = message.summary;
33
35
 
34
- if (requiredActions) {
35
- html += "<b>";
36
+ if (requiredActions) {
37
+ html += "<b>";
36
38
 
37
- html += requiredActions.map(requiredAction => advancedMsgStr(`requiredAction.${requiredAction}`)).join(", ");
39
+ html += requiredActions.map(requiredAction => advancedMsgStr(`requiredAction.${requiredAction}`)).join(", ");
38
40
 
39
- html += "</b>";
40
- }
41
+ html += "</b>";
42
+ }
41
43
 
42
- return html;
43
- })()
44
+ return html;
45
+ })()
46
+ )
44
47
  }}
45
48
  />
46
49
  {(() => {
@@ -1,4 +1,5 @@
1
1
  import { useState, useEffect, useReducer } from "react";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import { assert } from "keycloakify/tools/assert";
3
4
  import { clsx } from "keycloakify/tools/clsx";
4
5
  import type { PageProps } from "keycloakify/login/pages/PageProps";
@@ -62,7 +63,7 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
62
63
  {p.iconClasses && <i className={clsx(kcClsx("kcCommonLogoIdP"), p.iconClasses)} aria-hidden="true"></i>}
63
64
  <span
64
65
  className={clsx(kcClsx("kcFormSocialAccountNameClass"), p.iconClasses && "kc-social-icon-text")}
65
- dangerouslySetInnerHTML={{ __html: p.displayName }}
66
+ dangerouslySetInnerHTML={{ __html: kcSanitize(p.displayName) }}
66
67
  ></span>
67
68
  </a>
68
69
  </li>
@@ -111,7 +112,7 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
111
112
  className={kcClsx("kcInputErrorMessageClass")}
112
113
  aria-live="polite"
113
114
  dangerouslySetInnerHTML={{
114
- __html: messagesPerField.getFirstError("username", "password")
115
+ __html: kcSanitize(messagesPerField.getFirstError("username", "password"))
115
116
  }}
116
117
  />
117
118
  )}
@@ -139,7 +140,7 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
139
140
  className={kcClsx("kcInputErrorMessageClass")}
140
141
  aria-live="polite"
141
142
  dangerouslySetInnerHTML={{
142
- __html: messagesPerField.getFirstError("username", "password")
143
+ __html: kcSanitize(messagesPerField.getFirstError("username", "password"))
143
144
  }}
144
145
  />
145
146
  )}
@@ -1,4 +1,5 @@
1
1
  import { getKcClsx, KcClsx } from "keycloakify/login/lib/kcClsx";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import type { PageProps } from "keycloakify/login/pages/PageProps";
3
4
  import type { KcContext } from "../KcContext";
4
5
  import type { I18n } from "../i18n";
@@ -117,7 +118,7 @@ export default function LoginConfigTotp(props: PageProps<Extract<KcContext, { pa
117
118
  className={kcClsx("kcInputErrorMessageClass")}
118
119
  aria-live="polite"
119
120
  dangerouslySetInnerHTML={{
120
- __html: messagesPerField.get("totp")
121
+ __html: kcSanitize(messagesPerField.get("totp"))
121
122
  }}
122
123
  />
123
124
  )}
@@ -148,7 +149,7 @@ export default function LoginConfigTotp(props: PageProps<Extract<KcContext, { pa
148
149
  className={kcClsx("kcInputErrorMessageClass")}
149
150
  aria-live="polite"
150
151
  dangerouslySetInnerHTML={{
151
- __html: messagesPerField.get("userLabel")
152
+ __html: kcSanitize(messagesPerField.get("userLabel"))
152
153
  }}
153
154
  />
154
155
  )}
@@ -1,5 +1,6 @@
1
1
  import { Fragment } from "react";
2
2
  import { getKcClsx } from "keycloakify/login/lib/kcClsx";
3
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
3
4
  import type { PageProps } from "keycloakify/login/pages/PageProps";
4
5
  import type { KcContext } from "../KcContext";
5
6
  import type { I18n } from "../i18n";
@@ -75,7 +76,7 @@ export default function LoginOtp(props: PageProps<Extract<KcContext, { pageId: "
75
76
  className={kcClsx("kcInputErrorMessageClass")}
76
77
  aria-live="polite"
77
78
  dangerouslySetInnerHTML={{
78
- __html: messagesPerField.get("totp")
79
+ __html: kcSanitize(messagesPerField.get("totp"))
79
80
  }}
80
81
  />
81
82
  )}
@@ -1,4 +1,5 @@
1
1
  import { useState, useEffect, useReducer } from "react";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import { clsx } from "keycloakify/tools/clsx";
3
4
  import { assert } from "keycloakify/tools/assert";
4
5
  import { getKcClsx, type KcClsx } from "keycloakify/login/lib/kcClsx";
@@ -65,7 +66,7 @@ export default function LoginPassword(props: PageProps<Extract<KcContext, { page
65
66
  className={kcClsx("kcInputErrorMessageClass")}
66
67
  aria-live="polite"
67
68
  dangerouslySetInnerHTML={{
68
- __html: messagesPerField.get("password")
69
+ __html: kcSanitize(messagesPerField.get("password"))
69
70
  }}
70
71
  />
71
72
  )}
@@ -1,4 +1,5 @@
1
1
  import { getKcClsx } from "keycloakify/login/lib/kcClsx";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import type { PageProps } from "keycloakify/login/pages/PageProps";
3
4
  import type { KcContext } from "../KcContext";
4
5
  import type { I18n } from "../i18n";
@@ -48,7 +49,7 @@ export default function LoginRecoveryAuthnCodeInput(props: PageProps<Extract<KcC
48
49
  className={kcClsx("kcInputErrorMessageClass")}
49
50
  aria-live="polite"
50
51
  dangerouslySetInnerHTML={{
51
- __html: messagesPerField.get("recoveryCodeInput")
52
+ __html: kcSanitize(messagesPerField.get("recoveryCodeInput"))
52
53
  }}
53
54
  />
54
55
  )}
@@ -1,4 +1,5 @@
1
1
  import { getKcClsx } from "keycloakify/login/lib/kcClsx";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import type { PageProps } from "keycloakify/login/pages/PageProps";
3
4
  import type { KcContext } from "../KcContext";
4
5
  import type { I18n } from "../i18n";
@@ -53,7 +54,7 @@ export default function LoginResetPassword(props: PageProps<Extract<KcContext, {
53
54
  className={kcClsx("kcInputErrorMessageClass")}
54
55
  aria-live="polite"
55
56
  dangerouslySetInnerHTML={{
56
- __html: messagesPerField.get("username")
57
+ __html: kcSanitize(messagesPerField.get("username"))
57
58
  }}
58
59
  />
59
60
  )}
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useReducer } from "react";
2
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
2
3
  import { assert } from "keycloakify/tools/assert";
3
4
  import { getKcClsx, type KcClsx } from "keycloakify/login/lib/kcClsx";
4
5
  import type { PageProps } from "keycloakify/login/pages/PageProps";
@@ -52,7 +53,7 @@ export default function LoginUpdatePassword(props: PageProps<Extract<KcContext,
52
53
  className={kcClsx("kcInputErrorMessageClass")}
53
54
  aria-live="polite"
54
55
  dangerouslySetInnerHTML={{
55
- __html: messagesPerField.get("password")
56
+ __html: kcSanitize(messagesPerField.get("password"))
56
57
  }}
57
58
  />
58
59
  )}
@@ -84,7 +85,7 @@ export default function LoginUpdatePassword(props: PageProps<Extract<KcContext,
84
85
  className={kcClsx("kcInputErrorMessageClass")}
85
86
  aria-live="polite"
86
87
  dangerouslySetInnerHTML={{
87
- __html: messagesPerField.get("password-confirm")
88
+ __html: kcSanitize(messagesPerField.get("password-confirm"))
88
89
  }}
89
90
  />
90
91
  )}
@@ -1,5 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import type { LazyOrNot } from "keycloakify/tools/LazyOrNot";
3
+ import { kcSanitize } from "keycloakify/lib/kcSanitize";
3
4
  import { getKcClsx, type KcClsx } from "keycloakify/login/lib/kcClsx";
4
5
  import { clsx } from "keycloakify/tools/clsx";
5
6
  import type { UserProfileFormFieldsProps } from "keycloakify/login/UserProfileFormFieldsProps";
@@ -145,7 +146,7 @@ function TermsAcceptance(props: {
145
146
  className={kcClsx("kcInputErrorMessageClass")}
146
147
  aria-live="polite"
147
148
  dangerouslySetInnerHTML={{
148
- __html: messagesPerField.get("termsAccepted")
149
+ __html: kcSanitize(messagesPerField.get("termsAccepted"))
149
150
  }}
150
151
  />
151
152
  </div>
@@ -6,7 +6,7 @@ export type ScriptTag = ScriptTag.TextContent | ScriptTag.Src;
6
6
 
7
7
  export namespace ScriptTag {
8
8
  type Common = {
9
- type: "text/javascript" | "module" | "importmap";
9
+ type: "text/javascript" | "module";
10
10
  };
11
11
 
12
12
  export type TextContent = Common & {
@@ -0,0 +1,3 @@
1
+ import DOMPurify from "dompurify";
2
+
3
+ export { DOMPurify };
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
3
  import { KeycloakifyRotatingLogo } from "./KeycloakifyRotatingLogo";
4
4
  import { useInsertLinkTags } from "../../dist/tools/useInsertLinkTags";
5
- import { useOnFistMount } from "../../dist/tools/useOnFirstMount";
6
5
  import { tss } from "../tss";
7
6
 
8
7
  const meta = {
@@ -1,7 +1,7 @@
1
1
  export type ScriptTag = ScriptTag.TextContent | ScriptTag.Src;
2
2
  export declare namespace ScriptTag {
3
3
  type Common = {
4
- type: "text/javascript" | "module" | "importmap";
4
+ type: "text/javascript" | "module";
5
5
  };
6
6
  export type TextContent = Common & {
7
7
  textContent: string | (() => string);
@@ -0,0 +1,2 @@
1
+ import DOMPurify from "dompurify";
2
+ export { DOMPurify };
@@ -0,0 +1,2 @@
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ var e={836:function(e,t,n){var r,o,a;function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}a=function(){var e=Object.entries,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,a=Object.freeze,s=Object.seal,m=Object.create,p="undefined"!=typeof Reflect&&Reflect,d=p.apply,h=p.construct;a||(a=function(e){return e}),s||(s=function(e){return e}),d||(d=function(e,t,n){return e.apply(t,n)}),h||(h=function(e,t){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&i(o,n.prototype),o}(e,c(t))});var y,g=x(Array.prototype.forEach),T=x(Array.prototype.pop),b=x(Array.prototype.push),v=x(String.prototype.toLowerCase),E=x(String.prototype.toString),A=x(String.prototype.match),_=x(String.prototype.replace),S=x(String.prototype.indexOf),N=x(String.prototype.trim),w=x(Object.prototype.hasOwnProperty),O=x(RegExp.prototype.test),R=(y=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h(y,t)});function x(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return d(e,t,r)}}function C(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;t&&t(e,null);for(var a=r.length;a--;){var i=r[a];if("string"==typeof i){var l=o(i);l!==i&&(n(r)||(r[a]=l),i=l)}e[i]=!0}return e}function L(e){for(var t=0;t<e.length;t++)w(e,t)||(e[t]=null);return e}function D(t){var n,r,o,a=m(null),i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=u(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(i)throw o}}}}(e(t));try{for(i.s();!(n=i.n()).done;){var l=(r=n.value,o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(r,o)||u(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],s=l[1];w(t,c)&&(Array.isArray(s)?a[c]=L(s):s&&"object"===f(s)&&s.constructor===Object?a[c]=D(s):a[c]=s)}}catch(e){i.e(e)}finally{i.f()}return a}function k(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=r(e)}return function(){return null}}var I=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),H=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=a(["#text"]),j=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),W=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),G=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),X=s(/<%[\w\W]*|[\w\W]*%>/gm),q=s(/\${[\w\W]*}/gm),$=s(/^data-[\-\w.\u00B7-\uFFFF]/),K=s(/^aria-[\-\w]+$/),V=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=s(/^(?:\w+script|data):/i),J=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=s(/^html$/i),ee=s(/^[a-z][.\w]*(-[.\w]+)+$/i),te=Object.freeze({__proto__:null,MUSTACHE_EXPR:Y,ERB_EXPR:X,TMPLIT_EXPR:q,DATA_ATTR:$,ARIA_ATTR:K,IS_ALLOWED_URI:V,IS_SCRIPT_OR_DATA:Z,ATTR_WHITESPACE:J,DOCTYPE_NAME:Q,CUSTOM_ELEMENT:ee}),ne=function(){return"undefined"==typeof window?null:window},re=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne(),r=function(e){return t(e)};if(r.version="3.1.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var o,i=n.document,l=i,u=l.currentScript,s=n.DocumentFragment,p=n.HTMLTemplateElement,d=n.Node,h=n.Element,y=n.NodeFilter,x=n.NamedNodeMap,L=void 0===x?n.NamedNodeMap||n.MozNamedAttrMap:x,Y=n.HTMLFormElement,X=n.DOMParser,q=n.trustedTypes,$=h.prototype,K=k($,"cloneNode"),Z=k($,"remove"),J=k($,"nextSibling"),ee=k($,"childNodes"),re=k($,"parentNode");if("function"==typeof p){var oe=i.createElement("template");oe.content&&oe.content.ownerDocument&&(i=oe.content.ownerDocument)}var ae="",ie=i,le=ie.implementation,ce=ie.createNodeIterator,ue=ie.createDocumentFragment,se=ie.getElementsByTagName,fe=l.importNode,me={};r.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;var pe=te.MUSTACHE_EXPR,de=te.ERB_EXPR,he=te.TMPLIT_EXPR,ye=te.DATA_ATTR,ge=te.ARIA_ATTR,Te=te.IS_SCRIPT_OR_DATA,be=te.ATTR_WHITESPACE,ve=te.CUSTOM_ELEMENT,Ee=te.IS_ALLOWED_URI,Ae=null,_e=C({},[].concat(c(I),c(M),c(U),c(F),c(z))),Se=null,Ne=C({},[].concat(c(j),c(B),c(W),c(G))),we=Object.seal(m(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,Re=null,xe=!0,Ce=!0,Le=!1,De=!0,ke=!1,Ie=!0,Me=!1,Ue=!1,Pe=!1,Fe=!1,He=!1,ze=!1,je=!0,Be=!1,We=!0,Ge=!1,Ye={},Xe=null,qe=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$e=null,Ke=C({},["audio","video","img","source","image","track"]),Ve=null,Ze=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=null,ot=C({},[Je,Qe,et],E),at=null,it=["application/xhtml+xml","text/html"],lt=null,ct=null,ut=i.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"===f(e)||(e={}),e=D(e),at=-1===it.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===at?E:v,Ae=w(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,lt):_e,Se=w(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,lt):Ne,rt=w(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,E):ot,Ve=w(e,"ADD_URI_SAFE_ATTR")?C(D(Ze),e.ADD_URI_SAFE_ATTR,lt):Ze,$e=w(e,"ADD_DATA_URI_TAGS")?C(D(Ke),e.ADD_DATA_URI_TAGS,lt):Ke,Xe=w(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,lt):qe,Oe=w(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,lt):{},Re=w(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,lt):{},Ye=!!w(e,"USE_PROFILES")&&e.USE_PROFILES,xe=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ie=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,je=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,We=!1!==e.KEEP_CONTENT,Ge=e.IN_PLACE||!1,Ee=e.ALLOWED_URI_REGEXP||V,tt=e.NAMESPACE||et,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&st(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&st(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(Ce=!1),He&&(Fe=!0),Ye&&(Ae=C({},z),Se=[],!0===Ye.html&&(C(Ae,I),C(Se,j)),!0===Ye.svg&&(C(Ae,M),C(Se,B),C(Se,G)),!0===Ye.svgFilters&&(C(Ae,U),C(Se,B),C(Se,G)),!0===Ye.mathMl&&(C(Ae,F),C(Se,W),C(Se,G))),e.ADD_TAGS&&(Ae===_e&&(Ae=D(Ae)),C(Ae,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Se===Ne&&(Se=D(Se)),C(Se,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&C(Ve,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=D(Xe)),C(Xe,e.FORBID_CONTENTS,lt)),We&&(Ae["#text"]=!0),Me&&C(Ae,["html","head","body"]),Ae.table&&(C(Ae,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw R('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw R('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');o=e.TRUSTED_TYPES_POLICY,ae=o.createHTML("")}else void 0===o&&(o=function(e,t){if("object"!==f(e)||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(q,u)),null!==o&&"string"==typeof ae&&(ae=o.createHTML(""));a&&a(e),ct=e}},mt=C({},["mi","mo","mn","ms","mtext"]),pt=C({},["foreignobject","annotation-xml"]),dt=C({},["title","style","font","a","script"]),ht=C({},[].concat(c(M),c(U),c(P))),yt=C({},[].concat(c(F),c(H))),gt=function(e){b(r.removed,{element:e});try{re(e).removeChild(e)}catch(t){Z(e)}},Tt=function(e,t){try{b(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){b(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Fe||He)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){var t=null,n=null;if(Pe)e="<remove></remove>"+e;else{var r=A(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===at&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=o?o.createHTML(e):e;if(tt===et)try{t=(new X).parseFromString(a,at)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:a}catch(e){}}var l=t.body||t.documentElement;return e&&n&&l.insertBefore(i.createTextNode(n),l.childNodes[0]||null),tt===et?se.call(t,Me?"html":"body")[0]:Me?t.documentElement:l},vt=function(e){return ce.call(e.ownerDocument||e,e,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof Y&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof L)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(e){return"function"==typeof d&&e instanceof d},_t=function(e,t,n){me[e]&&g(me[e],(function(e){e.call(r,t,n,ct)}))},St=function(e){var t=null;if(_t("beforeSanitizeElements",e,null),Et(e))return gt(e),!0;var n=lt(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:n,allowedTags:Ae}),e.hasChildNodes()&&!At(e.firstElementChild)&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Ie&&8===e.nodeType&&O(/<[/\w]/g,e.data))return gt(e),!0;if(!Ae[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&O(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(We&&!Xe[n]){var o=re(e)||e.parentNode,a=ee(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i){var l=K(a[i],!0);l.__removalCount=(e.__removalCount||0)+1,o.insertBefore(l,J(e))}}return gt(e),!0}return e instanceof h&&!function(e){var t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});var n=v(e.tagName),r=v(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===r||mt[r]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&pt[r]:Boolean(yt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!pt[r])&&!(t.namespaceURI===Je&&!mt[r])&&!yt[n]&&(dt[n]||!ht[n]):!("application/xhtml+xml"!==at||!rt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!O(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&3===e.nodeType&&(t=e.textContent,g([pe,de,he],(function(e){t=_(t,e," ")})),e.textContent!==t&&(b(r.removed,{element:e.cloneNode()}),e.textContent=t)),_t("afterSanitizeElements",e,null),!1):(gt(e),!0)},Nt=function(e,t,n){if(je&&("id"===t||"name"===t)&&(n in i||n in ut))return!1;if(Ce&&!Re[t]&&O(ye,t));else if(xe&&O(ge,t));else if(!Se[t]||Re[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&O(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&O(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&O(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(O(Ee,_(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!$e[e])if(Le&&!O(Te,_(n,be,"")));else if(n)return!1;return!0},wt=function(e){return"annotation-xml"!==e&&A(e,ve)},Ot=function(e){_t("beforeSanitizeAttributes",e,null);var t=e.attributes;if(t){for(var n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se},a=t.length,i=function(){var i=t[a],l=i.name,c=i.namespaceURI,u=i.value,s=lt(l),m="value"===l?u:N(u);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,_t("uponSanitizeAttribute",e,n),m=n.attrValue,Ie&&O(/((--!?|])>)|<\/(style|title)/i,m))return Tt(l,e),0;if(n.forceKeepAttr)return 0;if(Tt(l,e),!n.keepAttr)return 0;if(!De&&O(/\/>/i,m))return Tt(l,e),0;ke&&g([pe,de,he],(function(e){m=_(m,e," ")}));var p=lt(e.nodeName);if(!Nt(p,s,m))return 0;if(!Be||"id"!==s&&"name"!==s||(Tt(l,e),m="user-content-"+m),o&&"object"===f(q)&&"function"==typeof q.getAttributeType)if(c);else switch(q.getAttributeType(p,s)){case"TrustedHTML":m=o.createHTML(m);break;case"TrustedScriptURL":m=o.createScriptURL(m)}try{c?e.setAttributeNS(c,l,m):e.setAttribute(l,m),Et(e)?gt(e):T(r.removed)}catch(e){}};a--;)i();_t("afterSanitizeAttributes",e,null)}},Rt=function e(t){var n=null,r=vt(t);for(_t("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)_t("uponSanitizeShadowNode",n,null),St(n)||(n.content instanceof s&&e(n.content),Ot(n));_t("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,i=null,c=null;if((nt=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!At(e)){if("function"!=typeof e.toString)throw R("toString is not a function");if("string"!=typeof(e=e.toString()))throw R("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ue||ft(t),r.removed=[],"string"==typeof e&&(Ge=!1),Ge){if(e.nodeName){var u=lt(e.nodeName);if(!Ae[u]||Oe[u])throw R("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)1===(a=(n=bt("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!Fe&&!ke&&!Me&&-1===e.indexOf("<"))return o&&ze?o.createHTML(e):e;if(!(n=bt(e)))return Fe?null:ze?ae:""}n&&Pe&&gt(n.firstChild);for(var f=vt(Ge?e:n);i=f.nextNode();)St(i)||(i.content instanceof s&&Rt(i.content),Ot(i));if(Ge)return e;if(Fe){if(He)for(c=ue.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(Se.shadowroot||Se.shadowrootmode)&&(c=fe.call(l,c,!0)),c}var m=Me?n.outerHTML:n.innerHTML;return Me&&Ae["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&O(Q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&g([pe,de,he],(function(e){m=_(m,e," ")})),o&&ze?o.createHTML(m):m},r.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},r.clearConfig=function(){ct=null,Ue=!1},r.isValidAttribute=function(e,t,n){ct||ft({});var r=lt(e),o=lt(t);return Nt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(me[e]=me[e]||[],b(me[e],t))},r.removeHook=function(e){if(me[e])return T(me[e])},r.removeHooks=function(e){me[e]&&(me[e]=[])},r.removeAllHooks=function(){me={}},r}();return re},"object"===f(t)?e.exports=a():void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};n.d(r,{W:()=>a.a});var o=n(836),a=n.n(o),i=r.W;export{i as DOMPurify};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GenericI18n_noJsx } from "./i18n";
3
- export type GenericI18n<MessageKey extends string> = GenericI18n_noJsx<MessageKey> & {
4
- msg: (key: MessageKey, ...args: (string | undefined)[]) => JSX.Element;
5
- advancedMsg: (key: string, ...args: (string | undefined)[]) => JSX.Element;
6
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=GenericI18n.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenericI18n.js","sourceRoot":"","sources":["../../src/account/i18n/GenericI18n.tsx"],"names":[],"mappings":""}
@@ -1,87 +0,0 @@
1
- import "../../tools/Object.fromEntries";
2
- import messages_defaultSet_fallbackLanguage from "./messages_defaultSet/en";
3
- export type KcContextLike = {
4
- locale?: {
5
- currentLanguageTag: string;
6
- supported: {
7
- languageTag: string;
8
- url: string;
9
- label: string;
10
- }[];
11
- };
12
- "x-keycloakify": {
13
- messages: Record<string, string>;
14
- };
15
- };
16
- export type GenericI18n_noJsx<MessageKey extends string> = {
17
- /**
18
- * e.g: "en", "fr", "zh-CN"
19
- *
20
- * The current language
21
- */
22
- currentLanguageTag: string;
23
- /**
24
- * Redirect to this url to change the language.
25
- * After reload currentLanguageTag === newLanguageTag
26
- */
27
- getChangeLocaleUrl: (newLanguageTag: string) => string;
28
- /**
29
- * e.g. "en" => "English", "fr" => "Français", ...
30
- *
31
- * Used to render a select that enable user to switch language.
32
- * ex: https://user-images.githubusercontent.com/6702424/186044799-38801eec-4e89-483b-81dd-8e9233e8c0eb.png
33
- * */
34
- labelBySupportedLanguageTag: Record<string, string>;
35
- /**
36
- *
37
- * Examples assuming currentLanguageTag === "en"
38
- * {
39
- * en: {
40
- * "access-denied": "Access denied",
41
- * "impersonateTitleHtml": "<strong>{0}</strong> Impersonate User",
42
- * "bar": "Bar {0}"
43
- * }
44
- * }
45
- *
46
- * msgStr("access-denied") === "Access denied"
47
- * msgStr("not-a-message-key") Throws an error
48
- * msgStr("impersonateTitleHtml", "Foo") === "<strong>Foo</strong> Impersonate User"
49
- * msgStr("${bar}", "<strong>c</strong>") === "Bar &lt;strong&gt;XXX&lt;/strong&gt;"
50
- * The html in the arg is partially escaped for security reasons, it might come from an untrusted source, it's not safe to render it as html.
51
- */
52
- msgStr: (key: MessageKey, ...args: (string | undefined)[]) => string;
53
- /**
54
- * This is meant to be used when the key argument is variable, something that might have been configured by the user
55
- * in the Keycloak admin for example.
56
- *
57
- * Examples assuming currentLanguageTag === "en"
58
- * {
59
- * en: {
60
- * "access-denied": "Access denied",
61
- * }
62
- * }
63
- *
64
- * advancedMsgStr("${access-denied}") === advancedMsgStr("access-denied") === msgStr("access-denied") === "Access denied"
65
- * advancedMsgStr("${not-a-message-key}") === advancedMsgStr("not-a-message-key") === "not-a-message-key"
66
- */
67
- advancedMsgStr: (key: string, ...args: (string | undefined)[]) => string;
68
- /**
69
- * Initially the messages are in english (fallback language).
70
- * The translations in the current language are being fetched dynamically.
71
- * This property is true while the translations are being fetched.
72
- */
73
- isFetchingTranslations: boolean;
74
- };
75
- export type MessageKey_defaultSet = keyof typeof messages_defaultSet_fallbackLanguage;
76
- export declare function createGetI18n<MessageKey_themeDefined extends string = never>(messagesByLanguageTag_themeDefined: {
77
- [languageTag: string]: {
78
- [key in MessageKey_themeDefined]: string;
79
- };
80
- }): {
81
- getI18n: (params: {
82
- kcContext: KcContextLike;
83
- }) => {
84
- i18n: GenericI18n_noJsx<"region" | "icon" | "address" | "details" | "action" | "name" | "application" | "group" | "log" | "email" | "resource" | "date" | "user" | "password" | "account" | "sessions" | "totpAppFreeOTPName" | "totpAppMicrosoftAuthenticatorName" | "totpAppGoogleName" | "federatedIdentity" | "applications" | "people" | MessageKey_themeDefined | "doSave" | "doCancel" | "doLogOutAllSessions" | "doRemove" | "doAdd" | "doSignOut" | "doLogIn" | "doLink" | "noAccessMessage" | "personalInfoSidebarTitle" | "accountSecuritySidebarTitle" | "signingInSidebarTitle" | "deviceActivitySidebarTitle" | "linkedAccountsSidebarTitle" | "editAccountHtmlTitle" | "personalInfoHtmlTitle" | "federatedIdentitiesHtmlTitle" | "accountLogHtmlTitle" | "changePasswordHtmlTitle" | "deviceActivityHtmlTitle" | "sessionsHtmlTitle" | "accountManagementTitle" | "authenticatorTitle" | "applicationsHtmlTitle" | "linkedAccountsHtmlTitle" | "accountManagementWelcomeMessage" | "personalInfoIntroMessage" | "accountSecurityTitle" | "accountSecurityIntroMessage" | "applicationsIntroMessage" | "resourceIntroMessage" | "passwordLastUpdateMessage" | "updatePasswordTitle" | "updatePasswordMessageTitle" | "updatePasswordMessage" | "personalSubTitle" | "personalSubMessage" | "authenticatorCode" | "firstName" | "givenName" | "fullName" | "lastName" | "familyName" | "currentPassword" | "passwordConfirm" | "passwordNew" | "username" | "street" | "locality" | "postal_code" | "country" | "emailVerified" | "website" | "phoneNumber" | "phoneNumberVerified" | "gender" | "birthday" | "zoneinfo" | "gssDelegationCredential" | "profileScopeConsentText" | "emailScopeConsentText" | "addressScopeConsentText" | "phoneScopeConsentText" | "offlineAccessScopeConsentText" | "samlRoleListScopeConsentText" | "rolesScopeConsentText" | "role_admin" | "role_realm-admin" | "role_create-realm" | "role_view-realm" | "role_view-users" | "role_view-applications" | "role_view-groups" | "role_view-clients" | "role_view-events" | "role_view-identity-providers" | "role_view-consent" | "role_manage-realm" | "role_manage-users" | "role_manage-applications" | "role_manage-identity-providers" | "role_manage-clients" | "role_manage-events" | "role_view-profile" | "role_manage-account" | "role_manage-account-links" | "role_manage-consent" | "role_read-token" | "role_offline-access" | "role_uma_authorization" | "client_account" | "client_account-console" | "client_security-admin-console" | "client_admin-cli" | "client_realm-management" | "client_broker" | "requiredFields" | "allFieldsRequired" | "backToApplication" | "backTo" | "event" | "ip" | "client" | "clients" | "started" | "lastAccess" | "expires" | "authenticator" | "device-activity" | "availableRoles" | "grantedPermissions" | "grantedPersonalInfo" | "additionalGrants" | "inResource" | "fullAccess" | "offlineToken" | "revoke" | "configureAuthenticators" | "mobile" | "totpStep1" | "totpStep2" | "totpStep3" | "totpStep3DeviceName" | "totpManualStep2" | "totpManualStep3" | "totpUnableToScan" | "totpScanBarcode" | "totp.totp" | "totp.hotp" | "totpType" | "totpAlgorithm" | "totpDigits" | "totpInterval" | "totpCounter" | "totpDeviceName" | "irreversibleAction" | "deletingImplies" | "errasingData" | "loggingOutImmediately" | "accountUnusable" | "missingUsernameMessage" | "missingFirstNameMessage" | "invalidEmailMessage" | "missingLastNameMessage" | "missingEmailMessage" | "missingPasswordMessage" | "notMatchPasswordMessage" | "invalidUserMessage" | "updateReadOnlyAttributesRejectedMessage" | "missingTotpMessage" | "missingTotpDeviceNameMessage" | "invalidPasswordExistingMessage" | "invalidPasswordConfirmMessage" | "invalidTotpMessage" | "usernameExistsMessage" | "emailExistsMessage" | "readOnlyUserMessage" | "readOnlyUsernameMessage" | "readOnlyPasswordMessage" | "successTotpMessage" | "successTotpRemovedMessage" | "successGrantRevokedMessage" | "accountUpdatedMessage" | "accountPasswordUpdatedMessage" | "missingIdentityProviderMessage" | "invalidFederatedIdentityActionMessage" | "identityProviderNotFoundMessage" | "federatedIdentityLinkNotActiveMessage" | "federatedIdentityRemovingLastProviderMessage" | "identityProviderRedirectErrorMessage" | "identityProviderRemovedMessage" | "identityProviderAlreadyLinkedMessage" | "staleCodeAccountMessage" | "consentDenied" | "access-denied-when-idp-auth" | "accountDisabledMessage" | "accountTemporarilyDisabledMessage" | "invalidPasswordMinLengthMessage" | "invalidPasswordMaxLengthMessage" | "invalidPasswordMinLowerCaseCharsMessage" | "invalidPasswordMinDigitsMessage" | "invalidPasswordMinUpperCaseCharsMessage" | "invalidPasswordMinSpecialCharsMessage" | "invalidPasswordNotUsernameMessage" | "invalidPasswordNotEmailMessage" | "invalidPasswordRegexPatternMessage" | "invalidPasswordHistoryMessage" | "invalidPasswordBlacklistedMessage" | "invalidPasswordGenericMessage" | "myResources" | "myResourcesSub" | "doDeny" | "doRevoke" | "doApprove" | "doRemoveSharing" | "doRemoveRequest" | "peopleAccessResource" | "resourceManagedPolicies" | "resourceNoPermissionsGrantingAccess" | "anyAction" | "description" | "scopes" | "peopleSharingThisResource" | "shareWithOthers" | "needMyApproval" | "requestsWaitingApproval" | "requestor" | "owner" | "resourcesSharedWithMe" | "permissionRequestion" | "permission" | "shares" | "notBeingShared" | "notHaveAnyResource" | "noResourcesSharedWithYou" | "havePermissionRequestsWaitingForApproval" | "clickHereForDetails" | "resourceIsNotBeingShared" | "locale_ar" | "locale_ca" | "locale_cs" | "locale_de" | "locale_en" | "locale_es" | "locale_fr" | "locale_hu" | "locale_it" | "locale_ja" | "locale_lt" | "locale_nl" | "locale_no" | "locale_pl" | "locale_pt-BR" | "locale_ru" | "locale_sk" | "locale_sv" | "locale_tr" | "locale_zh-CN" | "locale_fi" | "applicationName" | "applicationType" | "applicationInUse" | "clearAllFilter" | "activeFilters" | "filterByName" | "allApps" | "internalApps" | "thirdpartyApps" | "appResults" | "clientNotFoundMessage" | "authorizedProvider" | "authorizedProviderMessage" | "identityProvider" | "identityProviderMessage" | "socialLogin" | "userDefined" | "removeAccess" | "removeAccessMessage" | "authenticatorStatusMessage" | "authenticatorFinishSetUpTitle" | "authenticatorFinishSetUpMessage" | "authenticatorSubTitle" | "authenticatorSubMessage" | "authenticatorMobileTitle" | "authenticatorMobileMessage" | "authenticatorMobileFinishSetUpMessage" | "authenticatorActionSetup" | "authenticatorSMSTitle" | "authenticatorSMSMessage" | "authenticatorSMSFinishSetUpMessage" | "authenticatorDefaultStatus" | "authenticatorChangePhone" | "authenticatorMobileSetupTitle" | "smscodeIntroMessage" | "mobileSetupStep1" | "mobileSetupStep2" | "mobileSetupStep3" | "scanBarCode" | "enterBarCode" | "doCopy" | "doFinish" | "authenticatorSMSCodeSetupTitle" | "chooseYourCountry" | "enterYourPhoneNumber" | "sendVerficationCode" | "enterYourVerficationCode" | "authenticatorBackupCodesSetupTitle" | "realmName" | "doDownload" | "doPrint" | "generateNewBackupCodes" | "backtoAuthenticatorPage" | "resources" | "sharedwithMe" | "share" | "sharedwith" | "accessPermissions" | "permissionRequests" | "approve" | "approveAll" | "perPage" | "currentPage" | "sharetheResource" | "selectPermission" | "addPeople" | "addTeam" | "myPermissions" | "waitingforApproval" | "anyPermission" | "openshift.scope.user_info" | "openshift.scope.user_check-access" | "openshift.scope.user_full" | "openshift.scope.list-projects" | "error-invalid-value" | "error-invalid-blank" | "error-empty" | "error-invalid-length" | "error-invalid-length-too-short" | "error-invalid-length-too-long" | "error-invalid-email" | "error-invalid-number" | "error-number-out-of-range" | "error-number-out-of-range-too-small" | "error-number-out-of-range-too-big" | "error-pattern-no-match" | "error-invalid-uri" | "error-invalid-uri-scheme" | "error-invalid-uri-fragment" | "error-user-attribute-required" | "error-invalid-date" | "error-user-attribute-read-only" | "error-username-invalid-character" | "error-person-name-invalid-character" | "newPasswordSameAsOld" | "passwordConfirmNotMatch">;
85
- prI18n_currentLanguage: Promise<GenericI18n_noJsx<"region" | "icon" | "address" | "details" | "action" | "name" | "application" | "group" | "log" | "email" | "resource" | "date" | "user" | "password" | "account" | "sessions" | "totpAppFreeOTPName" | "totpAppMicrosoftAuthenticatorName" | "totpAppGoogleName" | "federatedIdentity" | "applications" | "people" | MessageKey_themeDefined | "doSave" | "doCancel" | "doLogOutAllSessions" | "doRemove" | "doAdd" | "doSignOut" | "doLogIn" | "doLink" | "noAccessMessage" | "personalInfoSidebarTitle" | "accountSecuritySidebarTitle" | "signingInSidebarTitle" | "deviceActivitySidebarTitle" | "linkedAccountsSidebarTitle" | "editAccountHtmlTitle" | "personalInfoHtmlTitle" | "federatedIdentitiesHtmlTitle" | "accountLogHtmlTitle" | "changePasswordHtmlTitle" | "deviceActivityHtmlTitle" | "sessionsHtmlTitle" | "accountManagementTitle" | "authenticatorTitle" | "applicationsHtmlTitle" | "linkedAccountsHtmlTitle" | "accountManagementWelcomeMessage" | "personalInfoIntroMessage" | "accountSecurityTitle" | "accountSecurityIntroMessage" | "applicationsIntroMessage" | "resourceIntroMessage" | "passwordLastUpdateMessage" | "updatePasswordTitle" | "updatePasswordMessageTitle" | "updatePasswordMessage" | "personalSubTitle" | "personalSubMessage" | "authenticatorCode" | "firstName" | "givenName" | "fullName" | "lastName" | "familyName" | "currentPassword" | "passwordConfirm" | "passwordNew" | "username" | "street" | "locality" | "postal_code" | "country" | "emailVerified" | "website" | "phoneNumber" | "phoneNumberVerified" | "gender" | "birthday" | "zoneinfo" | "gssDelegationCredential" | "profileScopeConsentText" | "emailScopeConsentText" | "addressScopeConsentText" | "phoneScopeConsentText" | "offlineAccessScopeConsentText" | "samlRoleListScopeConsentText" | "rolesScopeConsentText" | "role_admin" | "role_realm-admin" | "role_create-realm" | "role_view-realm" | "role_view-users" | "role_view-applications" | "role_view-groups" | "role_view-clients" | "role_view-events" | "role_view-identity-providers" | "role_view-consent" | "role_manage-realm" | "role_manage-users" | "role_manage-applications" | "role_manage-identity-providers" | "role_manage-clients" | "role_manage-events" | "role_view-profile" | "role_manage-account" | "role_manage-account-links" | "role_manage-consent" | "role_read-token" | "role_offline-access" | "role_uma_authorization" | "client_account" | "client_account-console" | "client_security-admin-console" | "client_admin-cli" | "client_realm-management" | "client_broker" | "requiredFields" | "allFieldsRequired" | "backToApplication" | "backTo" | "event" | "ip" | "client" | "clients" | "started" | "lastAccess" | "expires" | "authenticator" | "device-activity" | "availableRoles" | "grantedPermissions" | "grantedPersonalInfo" | "additionalGrants" | "inResource" | "fullAccess" | "offlineToken" | "revoke" | "configureAuthenticators" | "mobile" | "totpStep1" | "totpStep2" | "totpStep3" | "totpStep3DeviceName" | "totpManualStep2" | "totpManualStep3" | "totpUnableToScan" | "totpScanBarcode" | "totp.totp" | "totp.hotp" | "totpType" | "totpAlgorithm" | "totpDigits" | "totpInterval" | "totpCounter" | "totpDeviceName" | "irreversibleAction" | "deletingImplies" | "errasingData" | "loggingOutImmediately" | "accountUnusable" | "missingUsernameMessage" | "missingFirstNameMessage" | "invalidEmailMessage" | "missingLastNameMessage" | "missingEmailMessage" | "missingPasswordMessage" | "notMatchPasswordMessage" | "invalidUserMessage" | "updateReadOnlyAttributesRejectedMessage" | "missingTotpMessage" | "missingTotpDeviceNameMessage" | "invalidPasswordExistingMessage" | "invalidPasswordConfirmMessage" | "invalidTotpMessage" | "usernameExistsMessage" | "emailExistsMessage" | "readOnlyUserMessage" | "readOnlyUsernameMessage" | "readOnlyPasswordMessage" | "successTotpMessage" | "successTotpRemovedMessage" | "successGrantRevokedMessage" | "accountUpdatedMessage" | "accountPasswordUpdatedMessage" | "missingIdentityProviderMessage" | "invalidFederatedIdentityActionMessage" | "identityProviderNotFoundMessage" | "federatedIdentityLinkNotActiveMessage" | "federatedIdentityRemovingLastProviderMessage" | "identityProviderRedirectErrorMessage" | "identityProviderRemovedMessage" | "identityProviderAlreadyLinkedMessage" | "staleCodeAccountMessage" | "consentDenied" | "access-denied-when-idp-auth" | "accountDisabledMessage" | "accountTemporarilyDisabledMessage" | "invalidPasswordMinLengthMessage" | "invalidPasswordMaxLengthMessage" | "invalidPasswordMinLowerCaseCharsMessage" | "invalidPasswordMinDigitsMessage" | "invalidPasswordMinUpperCaseCharsMessage" | "invalidPasswordMinSpecialCharsMessage" | "invalidPasswordNotUsernameMessage" | "invalidPasswordNotEmailMessage" | "invalidPasswordRegexPatternMessage" | "invalidPasswordHistoryMessage" | "invalidPasswordBlacklistedMessage" | "invalidPasswordGenericMessage" | "myResources" | "myResourcesSub" | "doDeny" | "doRevoke" | "doApprove" | "doRemoveSharing" | "doRemoveRequest" | "peopleAccessResource" | "resourceManagedPolicies" | "resourceNoPermissionsGrantingAccess" | "anyAction" | "description" | "scopes" | "peopleSharingThisResource" | "shareWithOthers" | "needMyApproval" | "requestsWaitingApproval" | "requestor" | "owner" | "resourcesSharedWithMe" | "permissionRequestion" | "permission" | "shares" | "notBeingShared" | "notHaveAnyResource" | "noResourcesSharedWithYou" | "havePermissionRequestsWaitingForApproval" | "clickHereForDetails" | "resourceIsNotBeingShared" | "locale_ar" | "locale_ca" | "locale_cs" | "locale_de" | "locale_en" | "locale_es" | "locale_fr" | "locale_hu" | "locale_it" | "locale_ja" | "locale_lt" | "locale_nl" | "locale_no" | "locale_pl" | "locale_pt-BR" | "locale_ru" | "locale_sk" | "locale_sv" | "locale_tr" | "locale_zh-CN" | "locale_fi" | "applicationName" | "applicationType" | "applicationInUse" | "clearAllFilter" | "activeFilters" | "filterByName" | "allApps" | "internalApps" | "thirdpartyApps" | "appResults" | "clientNotFoundMessage" | "authorizedProvider" | "authorizedProviderMessage" | "identityProvider" | "identityProviderMessage" | "socialLogin" | "userDefined" | "removeAccess" | "removeAccessMessage" | "authenticatorStatusMessage" | "authenticatorFinishSetUpTitle" | "authenticatorFinishSetUpMessage" | "authenticatorSubTitle" | "authenticatorSubMessage" | "authenticatorMobileTitle" | "authenticatorMobileMessage" | "authenticatorMobileFinishSetUpMessage" | "authenticatorActionSetup" | "authenticatorSMSTitle" | "authenticatorSMSMessage" | "authenticatorSMSFinishSetUpMessage" | "authenticatorDefaultStatus" | "authenticatorChangePhone" | "authenticatorMobileSetupTitle" | "smscodeIntroMessage" | "mobileSetupStep1" | "mobileSetupStep2" | "mobileSetupStep3" | "scanBarCode" | "enterBarCode" | "doCopy" | "doFinish" | "authenticatorSMSCodeSetupTitle" | "chooseYourCountry" | "enterYourPhoneNumber" | "sendVerficationCode" | "enterYourVerficationCode" | "authenticatorBackupCodesSetupTitle" | "realmName" | "doDownload" | "doPrint" | "generateNewBackupCodes" | "backtoAuthenticatorPage" | "resources" | "sharedwithMe" | "share" | "sharedwith" | "accessPermissions" | "permissionRequests" | "approve" | "approveAll" | "perPage" | "currentPage" | "sharetheResource" | "selectPermission" | "addPeople" | "addTeam" | "myPermissions" | "waitingforApproval" | "anyPermission" | "openshift.scope.user_info" | "openshift.scope.user_check-access" | "openshift.scope.user_full" | "openshift.scope.list-projects" | "error-invalid-value" | "error-invalid-blank" | "error-empty" | "error-invalid-length" | "error-invalid-length-too-short" | "error-invalid-length-too-long" | "error-invalid-email" | "error-invalid-number" | "error-number-out-of-range" | "error-number-out-of-range-too-small" | "error-number-out-of-range-too-big" | "error-pattern-no-match" | "error-invalid-uri" | "error-invalid-uri-scheme" | "error-invalid-uri-fragment" | "error-user-attribute-required" | "error-invalid-date" | "error-user-attribute-read-only" | "error-username-invalid-character" | "error-person-name-invalid-character" | "newPasswordSameAsOld" | "passwordConfirmNotMatch">> | undefined;
86
- };
87
- };