Compare commits
22 Commits
v11.2.4
...
keycloak-2
Author | SHA1 | Date | |
---|---|---|---|
6f416ad335 | |||
4e982ee898 | |||
bcb514ae9c | |||
cfdad8d71d | |||
39ad1eb8d1 | |||
3d1d2e316b | |||
dd217e8a46 | |||
1339a96ea4 | |||
616e834c90 | |||
80eaa77acc | |||
ce3135c83b | |||
09abc73068 | |||
037d623550 | |||
8c8d2fd6a8 | |||
153a99d63f | |||
939e3ca7ea | |||
a0dc7eeb7c | |||
c21d072231 | |||
2e10ec8073 | |||
1177d6770c | |||
d492a393fe | |||
77952337c5 |
@ -269,6 +269,27 @@
|
|||||||
"test",
|
"test",
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "kathari00",
|
||||||
|
"name": "Katharina Eiserfey",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/42547712?v=4",
|
||||||
|
"profile": "https://github.com/kathari00",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"test",
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "luca-peruzzo",
|
||||||
|
"name": "Luca Peruzzo",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/69015314?v=4",
|
||||||
|
"profile": "https://github.com/luca-peruzzo",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"test"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Looking to contribute? Thank you! PR are more than welcome.
|
Looking to contribute? Thank you! PR are more than welcome.
|
||||||
|
|
||||||
Please refers to [this documentation page](https://docs.keycloakify.dev/contributing) that will help you get started.
|
Please refers to [this documentation page](https://docs.keycloakify.dev/faq-and-help/contributing) that will help you get started.
|
||||||
|
@ -134,6 +134,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/oes-rioniz/"><img src="https://avatars.githubusercontent.com/u/5172296?v=4?s=100" width="100px;" alt="Omid"/><br /><sub><b>Omid</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=uchar" title="Tests">⚠️</a> <a href="https://github.com/keycloakify/keycloakify/commits?author=uchar" title="Code">💻</a></td>
|
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/oes-rioniz/"><img src="https://avatars.githubusercontent.com/u/5172296?v=4?s=100" width="100px;" alt="Omid"/><br /><sub><b>Omid</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=uchar" title="Tests">⚠️</a> <a href="https://github.com/keycloakify/keycloakify/commits?author=uchar" title="Code">💻</a></td>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kathari00"><img src="https://avatars.githubusercontent.com/u/42547712?v=4?s=100" width="100px;" alt="Katharina Eiserfey"/><br /><sub><b>Katharina Eiserfey</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=kathari00" title="Code">💻</a> <a href="https://github.com/keycloakify/keycloakify/commits?author=kathari00" title="Tests">⚠️</a> <a href="https://github.com/keycloakify/keycloakify/commits?author=kathari00" title="Documentation">📖</a></td>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/luca-peruzzo"><img src="https://avatars.githubusercontent.com/u/69015314?v=4?s=100" width="100px;" alt="Luca Peruzzo"/><br /><sub><b>Luca Peruzzo</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=luca-peruzzo" title="Code">💻</a> <a href="https://github.com/keycloakify/keycloakify/commits?author=luca-peruzzo" title="Tests">⚠️</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloakify",
|
"name": "keycloakify",
|
||||||
"version": "11.2.4",
|
"version": "11.2.9-rc.1",
|
||||||
"description": "Framework to create custom Keycloak UIs",
|
"description": "Framework to create custom Keycloak UIs",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -62,7 +62,7 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://www.keycloakify.dev",
|
"homepage": "https://www.keycloakify.dev",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tsafe": "^1.7.4"
|
"tsafe": "^1.7.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.24.5",
|
"@babel/core": "^7.24.5",
|
||||||
|
@ -52,9 +52,9 @@ export function getKeycloakVersionRangeForJar(params: {
|
|||||||
case "0.6":
|
case "0.6":
|
||||||
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
||||||
case null:
|
case null:
|
||||||
return undefined;
|
return "26-and-above" as const;
|
||||||
case "1.1.5":
|
case "1.1.5":
|
||||||
return "25-and-above" as const;
|
return "25" as const;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert<Equals<typeof keycloakAccountV1Version, never>>(false);
|
assert<Equals<typeof keycloakAccountV1Version, never>>(false);
|
||||||
@ -75,9 +75,9 @@ export function getKeycloakVersionRangeForJar(params: {
|
|||||||
}
|
}
|
||||||
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
||||||
case null:
|
case null:
|
||||||
return "21-and-below";
|
return "all-other-versions";
|
||||||
case "1.1.5":
|
case "1.1.5":
|
||||||
return "22-and-above";
|
return "22-to-25";
|
||||||
}
|
}
|
||||||
assert<Equals<typeof keycloakThemeAdditionalInfoExtensionVersion, never>>(
|
assert<Equals<typeof keycloakThemeAdditionalInfoExtensionVersion, never>>(
|
||||||
false
|
false
|
||||||
|
@ -235,6 +235,9 @@ function decodeHtmlEntities(htmlStr){
|
|||||||
"identityFederationEnabled",
|
"identityFederationEnabled",
|
||||||
"userManagedAccessAllowed"
|
"userManagedAccessAllowed"
|
||||||
]?seq_contains(key)
|
]?seq_contains(key)
|
||||||
|
) || (
|
||||||
|
["flowContext", "session", "realm"]?seq_contains(key) &&
|
||||||
|
areSamePath(path, ["social"])
|
||||||
)
|
)
|
||||||
>
|
>
|
||||||
<#-- <#local outSeq += ["/*" + path?join(".") + "." + key + " excluded*/"]> -->
|
<#-- <#local outSeq += ["/*" + path?join(".") + "." + key + " excluded*/"]> -->
|
||||||
|
@ -3,7 +3,7 @@ export type KeycloakVersionRange =
|
|||||||
| KeycloakVersionRange.WithoutAccountV1Theme;
|
| KeycloakVersionRange.WithoutAccountV1Theme;
|
||||||
|
|
||||||
export namespace KeycloakVersionRange {
|
export namespace KeycloakVersionRange {
|
||||||
export type WithoutAccountV1Theme = "21-and-below" | "22-and-above";
|
export type WithoutAccountV1Theme = "22-to-25" | "all-other-versions";
|
||||||
|
|
||||||
export type WithAccountV1Theme = "21-and-below" | "23" | "24" | "25-and-above";
|
export type WithAccountV1Theme = "21-and-below" | "23" | "24" | "25" | "26-and-above";
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import { type ThemeType } from "./constants";
|
|||||||
import { id } from "tsafe/id";
|
import { id } from "tsafe/id";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import { getProxyFetchOptions, type ProxyFetchOptions } from "../tools/fetchProxyOptions";
|
import { getProxyFetchOptions, type ProxyFetchOptions } from "../tools/fetchProxyOptions";
|
||||||
|
import { is } from "tsafe/is";
|
||||||
|
|
||||||
export type BuildContext = {
|
export type BuildContext = {
|
||||||
themeVersion: string;
|
themeVersion: string;
|
||||||
@ -276,7 +277,8 @@ export function getBuildContext(params: {
|
|||||||
"21-and-below": z.union([z.boolean(), z.string()]),
|
"21-and-below": z.union([z.boolean(), z.string()]),
|
||||||
"23": z.union([z.boolean(), z.string()]),
|
"23": z.union([z.boolean(), z.string()]),
|
||||||
"24": z.union([z.boolean(), z.string()]),
|
"24": z.union([z.boolean(), z.string()]),
|
||||||
"25-and-above": z.union([z.boolean(), z.string()])
|
"25": z.union([z.boolean(), z.string()]),
|
||||||
|
"26-and-above": z.union([z.boolean(), z.string()])
|
||||||
})
|
})
|
||||||
.optional()
|
.optional()
|
||||||
});
|
});
|
||||||
@ -297,8 +299,8 @@ export function getBuildContext(params: {
|
|||||||
]),
|
]),
|
||||||
keycloakVersionTargets: z
|
keycloakVersionTargets: z
|
||||||
.object({
|
.object({
|
||||||
"21-and-below": z.union([z.boolean(), z.string()]),
|
"22-to-25": z.union([z.boolean(), z.string()]),
|
||||||
"22-and-above": z.union([z.boolean(), z.string()])
|
"all-other-versions": z.union([z.boolean(), z.string()])
|
||||||
})
|
})
|
||||||
.optional()
|
.optional()
|
||||||
});
|
});
|
||||||
@ -766,7 +768,11 @@ export function getBuildContext(params: {
|
|||||||
return "24" as const;
|
return "24" as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "25-and-above" as const;
|
if (buildForKeycloakMajorVersionNumber === 25) {
|
||||||
|
return "25" as const;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "26-and-above" as const;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
assert<
|
assert<
|
||||||
@ -779,11 +785,14 @@ export function getBuildContext(params: {
|
|||||||
return keycloakVersionRange;
|
return keycloakVersionRange;
|
||||||
} else {
|
} else {
|
||||||
const keycloakVersionRange = (() => {
|
const keycloakVersionRange = (() => {
|
||||||
if (buildForKeycloakMajorVersionNumber <= 21) {
|
if (
|
||||||
return "21-and-below" as const;
|
buildForKeycloakMajorVersionNumber <= 21 ||
|
||||||
|
buildForKeycloakMajorVersionNumber >= 26
|
||||||
|
) {
|
||||||
|
return "all-other-versions" as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "22-and-above" as const;
|
return "22-to-25" as const;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
assert<
|
assert<
|
||||||
@ -801,6 +810,12 @@ export function getBuildContext(params: {
|
|||||||
use_custom_jar_basename: {
|
use_custom_jar_basename: {
|
||||||
const { keycloakVersionTargets } = buildOptions;
|
const { keycloakVersionTargets } = buildOptions;
|
||||||
|
|
||||||
|
assert(
|
||||||
|
is<Record<KeycloakVersionRange, string | boolean>>(
|
||||||
|
keycloakVersionTargets
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (keycloakVersionTargets === undefined) {
|
if (keycloakVersionTargets === undefined) {
|
||||||
break use_custom_jar_basename;
|
break use_custom_jar_basename;
|
||||||
}
|
}
|
||||||
@ -845,7 +860,8 @@ export function getBuildContext(params: {
|
|||||||
"21-and-below",
|
"21-and-below",
|
||||||
"23",
|
"23",
|
||||||
"24",
|
"24",
|
||||||
"25-and-above"
|
"25",
|
||||||
|
"26-and-above"
|
||||||
] as const) {
|
] as const) {
|
||||||
assert<
|
assert<
|
||||||
Equals<
|
Equals<
|
||||||
@ -861,8 +877,8 @@ export function getBuildContext(params: {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const keycloakVersionRange of [
|
for (const keycloakVersionRange of [
|
||||||
"21-and-below",
|
"22-to-25",
|
||||||
"22-and-above"
|
"all-other-versions"
|
||||||
] as const) {
|
] as const) {
|
||||||
assert<
|
assert<
|
||||||
Equals<
|
Equals<
|
||||||
@ -888,7 +904,17 @@ export function getBuildContext(params: {
|
|||||||
const jarTargets: BuildContext["jarTargets"] = [];
|
const jarTargets: BuildContext["jarTargets"] = [];
|
||||||
|
|
||||||
for (const [keycloakVersionRange, jarNameOrBoolean] of objectEntries(
|
for (const [keycloakVersionRange, jarNameOrBoolean] of objectEntries(
|
||||||
buildOptions.keycloakVersionTargets
|
(() => {
|
||||||
|
const { keycloakVersionTargets } = buildOptions;
|
||||||
|
|
||||||
|
assert(
|
||||||
|
is<Record<KeycloakVersionRange, string | boolean>>(
|
||||||
|
keycloakVersionTargets
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return keycloakVersionTargets;
|
||||||
|
})()
|
||||||
)) {
|
)) {
|
||||||
if (jarNameOrBoolean === false) {
|
if (jarNameOrBoolean === false) {
|
||||||
continue;
|
continue;
|
||||||
|
2400
src/bin/start-keycloak/myrealm-realm-26.json
Normal file
2400
src/bin/start-keycloak/myrealm-realm-26.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -434,9 +434,7 @@ function AddRemoveButtonsMultiValuedAttribute(props: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function InputTagSelects(props: InputFieldByTypeProps) {
|
function InputTagSelects(props: InputFieldByTypeProps) {
|
||||||
const { attribute, dispatchFormAction, kcClsx, valueOrValues } = props;
|
const { attribute, dispatchFormAction, kcClsx, i18n, valueOrValues } = props;
|
||||||
|
|
||||||
const { advancedMsg } = props.i18n;
|
|
||||||
|
|
||||||
const { classDiv, classInput, classLabel, inputType } = (() => {
|
const { classDiv, classInput, classLabel, inputType } = (() => {
|
||||||
const { inputType } = attribute.annotations;
|
const { inputType } = attribute.annotations;
|
||||||
@ -533,7 +531,7 @@ function InputTagSelects(props: InputFieldByTypeProps) {
|
|||||||
htmlFor={`${attribute.name}-${option}`}
|
htmlFor={`${attribute.name}-${option}`}
|
||||||
className={`${classLabel}${attribute.readOnly ? ` ${kcClsx("kcInputClassRadioCheckboxLabelDisabled")}` : ""}`}
|
className={`${classLabel}${attribute.readOnly ? ` ${kcClsx("kcInputClassRadioCheckboxLabelDisabled")}` : ""}`}
|
||||||
>
|
>
|
||||||
{advancedMsg(option)}
|
{inputLabel(i18n, attribute, option)}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
@ -580,8 +578,6 @@ function TextareaTag(props: InputFieldByTypeProps) {
|
|||||||
function SelectTag(props: InputFieldByTypeProps) {
|
function SelectTag(props: InputFieldByTypeProps) {
|
||||||
const { attribute, dispatchFormAction, kcClsx, displayableErrors, i18n, valueOrValues } = props;
|
const { attribute, dispatchFormAction, kcClsx, displayableErrors, i18n, valueOrValues } = props;
|
||||||
|
|
||||||
const { advancedMsgStr } = i18n;
|
|
||||||
|
|
||||||
const isMultiple = attribute.annotations.inputType === "multiselect";
|
const isMultiple = attribute.annotations.inputType === "multiselect";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -645,22 +641,26 @@ function SelectTag(props: InputFieldByTypeProps) {
|
|||||||
|
|
||||||
return options.map(option => (
|
return options.map(option => (
|
||||||
<option key={option} value={option}>
|
<option key={option} value={option}>
|
||||||
{(() => {
|
{inputLabel(i18n, attribute, option)}
|
||||||
if (attribute.annotations.inputOptionLabels !== undefined) {
|
|
||||||
const { inputOptionLabels } = attribute.annotations;
|
|
||||||
|
|
||||||
return advancedMsgStr(inputOptionLabels[option] ?? option);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (attribute.annotations.inputOptionLabelsI18nPrefix !== undefined) {
|
|
||||||
return advancedMsgStr(`${attribute.annotations.inputOptionLabelsI18nPrefix}.${option}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return option;
|
|
||||||
})()}
|
|
||||||
</option>
|
</option>
|
||||||
));
|
));
|
||||||
})()}
|
})()}
|
||||||
</select>
|
</select>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function inputLabel(i18n: I18n, attribute: Attribute, option: string) {
|
||||||
|
const { advancedMsg } = i18n;
|
||||||
|
|
||||||
|
if (attribute.annotations.inputOptionLabels !== undefined) {
|
||||||
|
const { inputOptionLabels } = attribute.annotations;
|
||||||
|
|
||||||
|
return advancedMsg(inputOptionLabels[option] ?? option);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attribute.annotations.inputOptionLabelsI18nPrefix !== undefined) {
|
||||||
|
return advancedMsg(`${attribute.annotations.inputOptionLabelsI18nPrefix}.${option}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
@ -166,7 +166,7 @@ export function keycloakify(params: keycloakify.Params) {
|
|||||||
[
|
[
|
||||||
`(`,
|
`(`,
|
||||||
`(window.kcContext === undefined || import.meta.env.MODE === "development")?`,
|
`(window.kcContext === undefined || import.meta.env.MODE === "development")?`,
|
||||||
`"${urlPathname ?? "/"}":`,
|
`import.meta.env.BASE_URL:`,
|
||||||
`(window.kcContext["x-keycloakify"].resourcesPath + "/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/")`,
|
`(window.kcContext["x-keycloakify"].resourcesPath + "/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/")`,
|
||||||
`)`
|
`)`
|
||||||
].join("")
|
].join("")
|
||||||
|
@ -115,6 +115,38 @@ export const WithFavoritePet: Story = {
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const WithNewsletter: Story = {
|
||||||
|
render: () => (
|
||||||
|
<KcPageStory
|
||||||
|
kcContext={{
|
||||||
|
profile: {
|
||||||
|
attributesByName: {
|
||||||
|
newsletter: {
|
||||||
|
name: "newsletter",
|
||||||
|
displayName: "Sign up to the newsletter",
|
||||||
|
validators: {
|
||||||
|
options: {
|
||||||
|
options: ["yes"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
annotations: {
|
||||||
|
inputOptionLabels: {
|
||||||
|
"yes": "I want my email inbox filled with spam"
|
||||||
|
},
|
||||||
|
inputType: "multiselect-checkboxes"
|
||||||
|
},
|
||||||
|
required: false,
|
||||||
|
readOnly: false
|
||||||
|
} satisfies Attribute
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export const WithEmailAsUsername: Story = {
|
export const WithEmailAsUsername: Story = {
|
||||||
render: () => (
|
render: () => (
|
||||||
<KcPageStory
|
<KcPageStory
|
||||||
|
@ -12579,10 +12579,10 @@ tsafe@^1.6.6:
|
|||||||
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.6.6.tgz#fd93e64d6eb13ef83ed1650669cc24bad4f5df9f"
|
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.6.6.tgz#fd93e64d6eb13ef83ed1650669cc24bad4f5df9f"
|
||||||
integrity sha512-gzkapsdbMNwBnTIjgO758GujLCj031IgHK/PKr2mrmkCSJMhSOR5FeOuSxKLMUoYc0vAA4RGEYYbjt/v6afD3g==
|
integrity sha512-gzkapsdbMNwBnTIjgO758GujLCj031IgHK/PKr2mrmkCSJMhSOR5FeOuSxKLMUoYc0vAA4RGEYYbjt/v6afD3g==
|
||||||
|
|
||||||
tsafe@^1.7.4:
|
tsafe@^1.7.5:
|
||||||
version "1.7.4"
|
version "1.7.5"
|
||||||
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.7.4.tgz#7dd288b1a1be8d9c25e84ab8dd8a7df6094168d7"
|
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.7.5.tgz#0d3a31202b5ef87c7ba997e66e03fd80801278ef"
|
||||||
integrity sha512-4BrLklZMJ14dEtA+CkhY9OtID3al4+/GJhaeocWPtUuoZPr4SJkaqoPemyFgkLC1Y3LRNXF9zxa94SwssRGMaQ==
|
integrity sha512-tbNyyBSbwfbilFfiuXkSOj82a6++ovgANwcoqBAcO9/REPoZMEQoE8kWPeO0dy5A2D/2Lajr8Ohue5T0ifIvLQ==
|
||||||
|
|
||||||
tsc-alias@^1.8.10:
|
tsc-alias@^1.8.10:
|
||||||
version "1.8.10"
|
version "1.8.10"
|
||||||
|
Reference in New Issue
Block a user