keycloakify 10.0.0-rc.17 → 10.0.0-rc.19
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.
- package/PUBLIC_URL.js.map +1 -1
- package/account/Template.js +5 -5
- package/account/Template.js.map +1 -1
- package/account/i18n/i18n.js +37 -29
- package/account/i18n/i18n.js.map +1 -1
- package/account/kcContext/KcContext.js.map +1 -1
- package/account/kcContext/createGetKcContext.js +20 -15
- package/account/kcContext/createGetKcContext.js.map +1 -1
- package/account/kcContext/getKcContext.js.map +1 -1
- package/account/kcContext/getKcContextFromWindow.d.ts +3 -1
- package/account/kcContext/getKcContextFromWindow.js.map +1 -1
- package/account/kcContext/kcContextMocks.js +148 -144
- package/account/kcContext/kcContextMocks.js.map +1 -1
- package/account/lib/useGetClassName.js +14 -14
- package/account/lib/useGetClassName.js.map +1 -1
- package/account/pages/Account.js +1 -1
- package/account/pages/Account.js.map +1 -1
- package/account/pages/Password.js +7 -7
- package/account/pages/Password.js.map +1 -1
- package/account/pages/Totp.js +4 -4
- package/account/pages/Totp.js.map +1 -1
- package/bin/main.js +2265 -2028
- package/bin/shared/constants.d.ts +1 -0
- package/bin/shared/constants.js +4 -3
- package/bin/shared/constants.js.map +1 -1
- package/lib/isStorybook.js +2 -1
- package/lib/isStorybook.js.map +1 -1
- package/lib/useGetClassName.js.map +1 -1
- package/login/Template.js +13 -13
- package/login/Template.js.map +1 -1
- package/login/UserProfileFormFields.js +43 -41
- package/login/UserProfileFormFields.js.map +1 -1
- package/login/i18n/baseMessages/ca.d.ts +1 -1
- package/login/i18n/baseMessages/ca.js +1 -1
- package/login/i18n/baseMessages/el.d.ts +0 -1
- package/login/i18n/baseMessages/el.js +0 -1
- package/login/i18n/baseMessages/el.js.map +1 -1
- package/login/i18n/baseMessages/en.d.ts +1 -1
- package/login/i18n/baseMessages/en.js +1 -1
- package/login/i18n/baseMessages/es.d.ts +1 -1
- package/login/i18n/baseMessages/es.js +1 -1
- package/login/i18n/baseMessages/fa.d.ts +0 -1
- package/login/i18n/baseMessages/fa.js +0 -1
- package/login/i18n/baseMessages/fa.js.map +1 -1
- package/login/i18n/baseMessages/hu.d.ts +1 -1
- package/login/i18n/baseMessages/hu.js +1 -1
- package/login/i18n/baseMessages/index.d.ts +1 -2
- package/login/i18n/baseMessages/zh-CN.d.ts +1 -1
- package/login/i18n/baseMessages/zh-CN.js +1 -1
- package/login/i18n/i18n.js +39 -31
- package/login/i18n/i18n.js.map +1 -1
- package/login/kcContext/KcContext.js.map +1 -1
- package/login/kcContext/createGetKcContext.js +30 -22
- package/login/kcContext/createGetKcContext.js.map +1 -1
- package/login/kcContext/getKcContext.js.map +1 -1
- package/login/kcContext/getKcContextFromWindow.d.ts +3 -1
- package/login/kcContext/getKcContextFromWindow.js.map +1 -1
- package/login/kcContext/kcContextMocks.js +233 -231
- package/login/kcContext/kcContextMocks.js.map +1 -1
- package/login/lib/useDownloadTerms.js.map +1 -1
- package/login/lib/useGetClassName.js +112 -112
- package/login/lib/useGetClassName.js.map +1 -1
- package/login/lib/useUserProfileForm.js +181 -181
- package/login/lib/useUserProfileForm.js.map +1 -1
- package/login/pages/DeleteAccountConfirm.js +5 -1
- package/login/pages/DeleteAccountConfirm.js.map +1 -1
- package/login/pages/FrontchannelLogout.js +1 -1
- package/login/pages/FrontchannelLogout.js.map +1 -1
- package/login/pages/Login.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeConfig.js +3 -3
- package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
- package/login/pages/LoginResetPassword.js.map +1 -1
- package/login/pages/LoginUsername.js.map +1 -1
- package/login/pages/WebauthnAuthenticate.js +11 -8
- package/login/pages/WebauthnAuthenticate.js.map +1 -1
- package/login/pages/WebauthnRegister.js +7 -7
- package/login/pages/WebauthnRegister.js.map +1 -1
- package/package.json +232 -226
- package/src/PUBLIC_URL.ts +4 -1
- package/src/account/Template.tsx +5 -5
- package/src/account/TemplateProps.ts +4 -1
- package/src/account/i18n/i18n.tsx +40 -30
- package/src/account/kcContext/KcContext.ts +4 -1
- package/src/account/kcContext/createGetKcContext.ts +48 -22
- package/src/account/kcContext/getKcContext.ts +3 -1
- package/src/account/kcContext/getKcContextFromWindow.ts +6 -2
- package/src/account/kcContext/kcContextMocks.ts +164 -160
- package/src/account/lib/useGetClassName.ts +15 -14
- package/src/account/pages/Account.tsx +2 -2
- package/src/account/pages/Password.tsx +8 -8
- package/src/account/pages/Totp.tsx +4 -6
- package/src/bin/copy-keycloak-resources-to-public.ts +2 -2
- package/src/bin/download-keycloak-default-theme.ts +30 -8
- package/src/bin/eject-page.ts +48 -11
- package/src/bin/initialize-email-theme.ts +25 -17
- package/src/bin/keycloakify/buildJars/buildJar.ts +179 -104
- package/src/bin/keycloakify/buildJars/buildJars.ts +35 -16
- package/src/bin/keycloakify/buildJars/extensionVersions.ts +2 -1
- package/src/bin/keycloakify/buildJars/generatePom.ts +11 -3
- package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +33 -8
- package/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +20 -2
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +49 -12
- package/src/bin/keycloakify/generateSrcMainResources/bringInAccountV1.ts +29 -18
- package/src/bin/keycloakify/generateSrcMainResources/generateMessageProperties.ts +35 -12
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +3 -1
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts +86 -41
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +39 -15
- package/src/bin/keycloakify/generateSrcMainResources/readExtraPageNames.ts +21 -7
- package/src/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.ts +34 -7
- package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +19 -5
- package/src/bin/keycloakify/keycloakify.ts +28 -9
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +24 -5
- package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +6 -2
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +6 -3
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +24 -6
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +49 -11
- package/src/bin/main.ts +78 -41
- package/src/bin/shared/KeycloakVersionRange.ts +3 -1
- package/src/bin/shared/buildOptions.ts +70 -43
- package/src/bin/shared/constants.ts +4 -2
- package/src/bin/shared/copyKeycloakResourcesToPublic.ts +27 -13
- package/src/bin/shared/downloadKeycloakDefaultTheme.ts +161 -218
- package/src/bin/shared/downloadKeycloakStaticResources.ts +25 -21
- package/src/bin/shared/getJarFileBasename.ts +3 -1
- package/src/bin/shared/getThemeSrcDirPath.ts +5 -2
- package/src/bin/shared/metaInfKeycloakThemes.ts +35 -8
- package/src/bin/shared/promptKeycloakVersion.ts +33 -14
- package/src/bin/start-keycloak/appBuild.ts +128 -0
- package/src/bin/start-keycloak/index.ts +1 -0
- package/src/bin/start-keycloak/keycloakifyBuild.ts +41 -0
- package/src/bin/start-keycloak/myrealm-realm-23.json +2142 -0
- package/src/bin/start-keycloak/myrealm-realm-24.json +2318 -0
- package/src/bin/start-keycloak/start-keycloak.ts +469 -0
- package/src/bin/tools/SemVer.ts +32 -13
- package/src/bin/tools/String.prototype.replaceAll.ts +9 -2
- package/src/bin/tools/crawl.ts +4 -1
- package/src/bin/tools/crc32.ts +42 -24
- package/src/bin/tools/downloadAndExtractArchive/downloadAndExtractArchive.ts +262 -0
- package/src/bin/tools/downloadAndExtractArchive/fetchProxyOptions.ts +96 -0
- package/src/bin/tools/downloadAndExtractArchive/index.ts +1 -0
- package/src/bin/tools/extractArchive.ts +132 -0
- package/src/bin/tools/fetchProxyOptions.ts +31 -8
- package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +10 -2
- package/src/bin/tools/getNpmWorkspaceRootDirPath.ts +18 -5
- package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +8 -2
- package/src/bin/tools/octokit-addons/listTags.ts +15 -4
- package/src/bin/tools/partitionPromiseSettledResults.ts +12 -3
- package/src/bin/tools/readThisNpmPackageVersion.ts +5 -1
- package/src/bin/tools/transformCodebase.ts +29 -10
- package/src/bin/tools/trimIndent.ts +4 -1
- package/src/lib/isStorybook.ts +3 -1
- package/src/lib/useGetClassName.ts +12 -3
- package/src/login/Template.tsx +14 -14
- package/src/login/TemplateProps.ts +4 -1
- package/src/login/UserProfileFormFields.tsx +44 -42
- package/src/login/i18n/baseMessages/ca.ts +1 -1
- package/src/login/i18n/baseMessages/el.ts +0 -1
- package/src/login/i18n/baseMessages/en.ts +1 -1
- package/src/login/i18n/baseMessages/es.ts +1 -1
- package/src/login/i18n/baseMessages/fa.ts +0 -1
- package/src/login/i18n/baseMessages/hu.ts +1 -1
- package/src/login/i18n/baseMessages/zh-CN.ts +1 -1
- package/src/login/i18n/i18n.tsx +42 -32
- package/src/login/kcContext/KcContext.ts +8 -2
- package/src/login/kcContext/createGetKcContext.ts +84 -37
- package/src/login/kcContext/getKcContext.ts +3 -1
- package/src/login/kcContext/getKcContextFromWindow.ts +6 -2
- package/src/login/kcContext/kcContextMocks.ts +339 -325
- package/src/login/lib/useDownloadTerms.ts +6 -4
- package/src/login/lib/useGetClassName.ts +119 -112
- package/src/login/lib/useUserProfileForm.tsx +219 -205
- package/src/login/pages/DeleteAccountConfirm.tsx +9 -3
- package/src/login/pages/FrontchannelLogout.tsx +1 -1
- package/src/login/pages/Login.tsx +2 -2
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.tsx +3 -3
- package/src/login/pages/LoginResetPassword.tsx +2 -2
- package/src/login/pages/LoginUsername.tsx +2 -2
- package/src/login/pages/WebauthnAuthenticate.tsx +11 -8
- package/src/login/pages/WebauthnRegister.tsx +7 -7
- package/src/tools/AndByDiscriminatingKey.ts +12 -6
- package/src/tools/Array.prototype.every.ts +4 -1
- package/src/tools/LazyOrNot.ts +3 -1
- package/src/tools/clsx.ts +7 -1
- package/src/tools/deepAssign.ts +15 -8
- package/src/tools/deepClone.ts +3 -1
- package/src/tools/formatNumber.ts +4 -1
- package/src/tools/useConstCallback.ts +3 -1
- package/src/tools/useInsertLinkTags.ts +20 -7
- package/src/tools/useInsertScriptTags.ts +7 -2
- package/src/tools/useSetClassName.ts +4 -1
- package/src/vite-plugin/vite-plugin.ts +45 -21
- package/tools/Array.prototype.every.js +2 -1
- package/tools/Array.prototype.every.js.map +1 -1
- package/tools/clsx.js.map +1 -1
- package/tools/deepAssign.js +9 -7
- package/tools/deepAssign.js.map +1 -1
- package/tools/deepClone.js.map +1 -1
- package/tools/formatNumber.js.map +1 -1
- package/tools/useConstCallback.js.map +1 -1
- package/tools/useInsertLinkTags.js +5 -4
- package/tools/useInsertLinkTags.js.map +1 -1
- package/tools/useInsertScriptTags.js +5 -2
- package/tools/useInsertScriptTags.js.map +1 -1
- package/tools/useSetClassName.js.map +1 -1
- package/vite-plugin/index.js +985 -1651
- package/src/bin/shared/downloadAndUnzip.ts +0 -203
- package/src/bin/start-keycloak.ts +0 -309
- package/src/bin/tools/unzip.ts +0 -141
@@ -19,12 +19,18 @@ export default function DeleteAccountConfirm(props: PageProps<Extract<KcContext,
|
|
19
19
|
return (
|
20
20
|
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} headerNode={msg("deleteAccountConfirm")}>
|
21
21
|
<form action={url.loginAction} className="form-vertical" method="post">
|
22
|
-
<div className="alert alert-warning" style={{
|
22
|
+
<div className="alert alert-warning" style={{ marginTop: "0", marginBottom: "30px" }}>
|
23
23
|
<span className="pficon pficon-warning-triangle-o"></span>
|
24
24
|
{msg("irreversibleAction")}
|
25
25
|
</div>
|
26
26
|
<p>{msg("deletingImplies")}</p>
|
27
|
-
<ul
|
27
|
+
<ul
|
28
|
+
style={{
|
29
|
+
color: "#72767b",
|
30
|
+
listStyle: "disc",
|
31
|
+
listStylePosition: "inside"
|
32
|
+
}}
|
33
|
+
>
|
28
34
|
<li>{msg("loggingOutImmediately")}</li>
|
29
35
|
<li>{msg("errasingData")}</li>
|
30
36
|
</ul>
|
@@ -38,7 +44,7 @@ export default function DeleteAccountConfirm(props: PageProps<Extract<KcContext,
|
|
38
44
|
{triggered_from_aia && (
|
39
45
|
<button
|
40
46
|
className={clsx(getClassName("kcButtonClass"), getClassName("kcButtonDefaultClass"), getClassName("kcButtonLargeClass"))}
|
41
|
-
style={{
|
47
|
+
style={{ marginLeft: "calc(100% - 220px)" }}
|
42
48
|
type="submit"
|
43
49
|
name="cancel-aia"
|
44
50
|
value="true"
|
@@ -27,7 +27,7 @@ export default function FrontchannelLogout(props: PageProps<Extract<KcContext, {
|
|
27
27
|
{logout.clients.map(client => (
|
28
28
|
<li key={client.name}>
|
29
29
|
{client.name}
|
30
|
-
<iframe src={client.frontChannelLogoutUrl} style={{
|
30
|
+
<iframe src={client.frontChannelLogoutUrl} style={{ display: "none" }} />
|
31
31
|
</li>
|
32
32
|
))}
|
33
33
|
</ul>
|
@@ -96,8 +96,8 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
|
|
96
96
|
{!realm.loginWithEmailAllowed
|
97
97
|
? msg("username")
|
98
98
|
: !realm.registrationEmailAsUsername
|
99
|
-
|
100
|
-
|
99
|
+
? msg("usernameOrEmail")
|
100
|
+
: msg("email")}
|
101
101
|
</label>
|
102
102
|
<input
|
103
103
|
tabIndex={2}
|
@@ -21,10 +21,10 @@ export default function LoginRecoveryAuthnCodeConfig(props: PageProps<Extract<Kc
|
|
21
21
|
const { msg, msgStr } = i18n;
|
22
22
|
|
23
23
|
const { insertScriptTags } = useInsertScriptTags({
|
24
|
-
|
24
|
+
scriptTags: [
|
25
25
|
{
|
26
|
-
|
27
|
-
|
26
|
+
type: "text/javascript",
|
27
|
+
textContent: `
|
28
28
|
|
29
29
|
/* copy recovery codes */
|
30
30
|
function copyRecoveryCodes() {
|
@@ -31,8 +31,8 @@ export default function LoginResetPassword(props: PageProps<Extract<KcContext, {
|
|
31
31
|
{!realm.loginWithEmailAllowed
|
32
32
|
? msg("username")
|
33
33
|
: !realm.registrationEmailAsUsername
|
34
|
-
|
35
|
-
|
34
|
+
? msg("usernameOrEmail")
|
35
|
+
: msg("email")}
|
36
36
|
</label>
|
37
37
|
</div>
|
38
38
|
<div className={getClassName("kcInputWrapperClass")}>
|
@@ -93,8 +93,8 @@ export default function LoginUsername(props: PageProps<Extract<KcContext, { page
|
|
93
93
|
{!realm.loginWithEmailAllowed
|
94
94
|
? msg("username")
|
95
95
|
: !realm.registrationEmailAsUsername
|
96
|
-
|
97
|
-
|
96
|
+
? msg("usernameOrEmail")
|
97
|
+
: msg("email")}
|
98
98
|
</label>
|
99
99
|
<input
|
100
100
|
tabIndex={2}
|
@@ -32,18 +32,18 @@ export default function WebauthnAuthenticate(props: PageProps<Extract<KcContext,
|
|
32
32
|
const { msg, msgStr } = i18n;
|
33
33
|
|
34
34
|
const { insertScriptTags } = useInsertScriptTags({
|
35
|
-
|
35
|
+
scriptTags: [
|
36
36
|
{
|
37
|
-
|
38
|
-
|
37
|
+
type: "text/javascript",
|
38
|
+
src: `${url.resourcesCommonPath}/node_modules/jquery/dist/jquery.min.js`
|
39
39
|
},
|
40
40
|
{
|
41
|
-
|
42
|
-
|
41
|
+
type: "text/javascript",
|
42
|
+
src: `${url.resourcesPath}/js/base64url.js`
|
43
43
|
},
|
44
44
|
{
|
45
|
-
|
46
|
-
|
45
|
+
type: "text/javascript",
|
46
|
+
textContent: `
|
47
47
|
|
48
48
|
function webAuthnAuthenticate() {
|
49
49
|
let isUserIdentified = ${isUserIdentified};
|
@@ -206,7 +206,10 @@ export default function WebauthnAuthenticate(props: PageProps<Extract<KcContext,
|
|
206
206
|
className={getClassName("kcSelectAuthListItemDescriptionClass")}
|
207
207
|
>
|
208
208
|
{authenticator.transports.displayNameProperties
|
209
|
-
.map((nameProperty, i, arr) => ({
|
209
|
+
.map((nameProperty, i, arr) => ({
|
210
|
+
nameProperty,
|
211
|
+
hasNext: i !== arr.length - 1
|
212
|
+
}))
|
210
213
|
.map(({ nameProperty, hasNext }) => (
|
211
214
|
<Fragment key={nameProperty}>
|
212
215
|
<span>{msg(nameProperty)}</span>
|
@@ -35,18 +35,18 @@ export default function WebauthnRegister(props: PageProps<Extract<KcContext, { p
|
|
35
35
|
const { msg, msgStr } = i18n;
|
36
36
|
|
37
37
|
const { insertScriptTags } = useInsertScriptTags({
|
38
|
-
|
38
|
+
scriptTags: [
|
39
39
|
{
|
40
|
-
|
41
|
-
|
40
|
+
type: "text/javascript",
|
41
|
+
src: `${url.resourcesCommonPath}/node_modules/jquery/dist/jquery.min.js`
|
42
42
|
},
|
43
43
|
{
|
44
|
-
|
45
|
-
|
44
|
+
type: "text/javascript",
|
45
|
+
src: `${url.resourcesPath}/js/base64url.js`
|
46
46
|
},
|
47
47
|
{
|
48
|
-
|
49
|
-
|
48
|
+
type: "text/javascript",
|
49
|
+
textContent: `
|
50
50
|
function registerSecurityKey() {
|
51
51
|
|
52
52
|
// Check if WebAuthn is supported by this browser
|
@@ -10,16 +10,22 @@ export declare namespace AndByDiscriminatingKey {
|
|
10
10
|
U1,
|
11
11
|
U1Again extends Record<DiscriminatingKey, string>,
|
12
12
|
U2 extends Record<DiscriminatingKey, string>
|
13
|
-
> =
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
> =
|
14
|
+
U1 extends Pick<U2, DiscriminatingKey>
|
15
|
+
? Tf2<DiscriminatingKey, U1, U2, U1Again>
|
16
|
+
: U1Again[DiscriminatingKey] & U2[DiscriminatingKey] extends never
|
17
|
+
? U1 | U2
|
18
|
+
: U1;
|
18
19
|
|
19
20
|
export type Tf2<
|
20
21
|
DiscriminatingKey extends string,
|
21
22
|
SingletonU1 extends Record<DiscriminatingKey, string>,
|
22
23
|
U2,
|
23
24
|
U1 extends Record<DiscriminatingKey, string>
|
24
|
-
> =
|
25
|
+
> =
|
26
|
+
U2 extends Pick<SingletonU1, DiscriminatingKey>
|
27
|
+
? U2 & SingletonU1
|
28
|
+
: U2 extends Pick<U1, DiscriminatingKey>
|
29
|
+
? never
|
30
|
+
: U2;
|
25
31
|
}
|
@@ -17,7 +17,10 @@ if (!Array.prototype.every) {
|
|
17
17
|
var len = O.length >>> 0;
|
18
18
|
|
19
19
|
// 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
|
20
|
-
if (
|
20
|
+
if (
|
21
|
+
typeof callbackfn !== "function" &&
|
22
|
+
Object.prototype.toString.call(callbackfn) !== "[object Function]"
|
23
|
+
) {
|
21
24
|
throw new TypeError();
|
22
25
|
}
|
23
26
|
|
package/src/tools/LazyOrNot.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
1
|
import type { LazyExoticComponent, ComponentType } from "react";
|
2
2
|
|
3
|
-
export type LazyOrNot<Component extends ComponentType<any>> =
|
3
|
+
export type LazyOrNot<Component extends ComponentType<any>> =
|
4
|
+
| LazyExoticComponent<Component>
|
5
|
+
| Component;
|
package/src/tools/clsx.ts
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
import { assert } from "tsafe/assert";
|
2
2
|
import { typeGuard } from "tsafe/typeGuard";
|
3
3
|
|
4
|
-
export type CxArg =
|
4
|
+
export type CxArg =
|
5
|
+
| undefined
|
6
|
+
| null
|
7
|
+
| string
|
8
|
+
| boolean
|
9
|
+
| Partial<Record<string, boolean | null | undefined>>
|
10
|
+
| readonly CxArg[];
|
5
11
|
|
6
12
|
export const clsx = (...args: CxArg[]): string => {
|
7
13
|
const len = args.length;
|
package/src/tools/deepAssign.ts
CHANGED
@@ -3,7 +3,10 @@ import { is } from "tsafe/is";
|
|
3
3
|
import { deepClone } from "./deepClone";
|
4
4
|
|
5
5
|
//Warning: Be mindful that because of array this is not idempotent.
|
6
|
-
export function deepAssign(params: {
|
6
|
+
export function deepAssign(params: {
|
7
|
+
target: Record<string, unknown>;
|
8
|
+
source: Record<string, unknown>;
|
9
|
+
}) {
|
7
10
|
const { target } = params;
|
8
11
|
|
9
12
|
const source = deepClone(params.source);
|
@@ -11,12 +14,16 @@ export function deepAssign(params: { target: Record<string, unknown>; source: Re
|
|
11
14
|
Object.keys(source).forEach(key => {
|
12
15
|
var dereferencedSource = source[key];
|
13
16
|
|
14
|
-
if (
|
17
|
+
if (
|
18
|
+
target[key] === undefined ||
|
19
|
+
dereferencedSource instanceof Function ||
|
20
|
+
!(dereferencedSource instanceof Object)
|
21
|
+
) {
|
15
22
|
Object.defineProperty(target, key, {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
enumerable: true,
|
24
|
+
writable: true,
|
25
|
+
configurable: true,
|
26
|
+
value: dereferencedSource
|
20
27
|
});
|
21
28
|
|
22
29
|
return;
|
@@ -37,8 +44,8 @@ export function deepAssign(params: { target: Record<string, unknown>; source: Re
|
|
37
44
|
assert(is<Record<string, unknown>>(dereferencedSource));
|
38
45
|
|
39
46
|
deepAssign({
|
40
|
-
|
41
|
-
|
47
|
+
target: dereferencedTarget,
|
48
|
+
source: dereferencedSource
|
42
49
|
});
|
43
50
|
});
|
44
51
|
}
|
package/src/tools/deepClone.ts
CHANGED
@@ -13,5 +13,7 @@ export function deepClone<T>(o: T): T {
|
|
13
13
|
return o.map(deepClone) as any;
|
14
14
|
}
|
15
15
|
|
16
|
-
return Object.fromEntries(
|
16
|
+
return Object.fromEntries(
|
17
|
+
Object.entries(o).map(([key, value]) => [key, deepClone(value)])
|
18
|
+
) as any;
|
17
19
|
}
|
@@ -11,7 +11,10 @@ export const formatNumber = (input: string, format: string): string => {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
// calculate the maximum size of the given pattern based on the sum of the expected digits
|
14
|
-
const maxSize = digitPattern.reduce(
|
14
|
+
const maxSize = digitPattern.reduce(
|
15
|
+
(total, p) => total + parseInt(p.replace("{", "").replace("}", "")),
|
16
|
+
0
|
17
|
+
);
|
15
18
|
|
16
19
|
// keep only digits
|
17
20
|
let rawValue = input.replace(/\D+/g, "");
|
@@ -2,7 +2,9 @@ import { useRef, useState } from "react";
|
|
2
2
|
import { Parameters } from "tsafe/Parameters";
|
3
3
|
|
4
4
|
/** https://stackoverflow.com/questions/65890278/why-cant-usecallback-always-return-the-same-ref */
|
5
|
-
export function useConstCallback<
|
5
|
+
export function useConstCallback<
|
6
|
+
T extends ((...args: any[]) => unknown) | undefined | null
|
7
|
+
>(callback: NonNullable<T>): T {
|
6
8
|
const callbackRef = useRef<typeof callback>(null as any);
|
7
9
|
|
8
10
|
callbackRef.current = callback;
|
@@ -13,14 +13,20 @@ export function createUseInsertLinkTags() {
|
|
13
13
|
function useInsertLinkTags(params: { hrefs: string[] }) {
|
14
14
|
const { hrefs } = params;
|
15
15
|
|
16
|
-
const [areAllStyleSheetsLoaded, setAllStyleSheetLoaded] = useReducer(
|
16
|
+
const [areAllStyleSheetsLoaded, setAllStyleSheetLoaded] = useReducer(
|
17
|
+
() => true,
|
18
|
+
hrefs.length === 0
|
19
|
+
);
|
17
20
|
|
18
21
|
useEffect(() => {
|
19
22
|
let isActive = true;
|
20
23
|
|
21
24
|
mount_link_tags: {
|
22
25
|
if (linkTagsContext !== undefined) {
|
23
|
-
if (
|
26
|
+
if (
|
27
|
+
JSON.stringify(linkTagsContext.styleSheetHrefs) ===
|
28
|
+
JSON.stringify(hrefs)
|
29
|
+
) {
|
24
30
|
break mount_link_tags;
|
25
31
|
}
|
26
32
|
|
@@ -37,14 +43,21 @@ export function createUseInsertLinkTags() {
|
|
37
43
|
for (const href of hrefs) {
|
38
44
|
const htmlElement = document.createElement("link");
|
39
45
|
|
40
|
-
prs.push(
|
46
|
+
prs.push(
|
47
|
+
new Promise<void>(resolve =>
|
48
|
+
htmlElement.addEventListener("load", () => resolve())
|
49
|
+
)
|
50
|
+
);
|
41
51
|
|
42
52
|
htmlElement.rel = "stylesheet";
|
43
53
|
|
44
54
|
htmlElement.href = href;
|
45
55
|
|
46
56
|
if (lastMountedHtmlElement !== undefined) {
|
47
|
-
lastMountedHtmlElement.insertAdjacentElement(
|
57
|
+
lastMountedHtmlElement.insertAdjacentElement(
|
58
|
+
"afterend",
|
59
|
+
htmlElement
|
60
|
+
);
|
48
61
|
} else {
|
49
62
|
document.head.prepend(htmlElement);
|
50
63
|
}
|
@@ -57,9 +70,9 @@ export function createUseInsertLinkTags() {
|
|
57
70
|
}
|
58
71
|
|
59
72
|
linkTagsContext = {
|
60
|
-
|
61
|
-
|
62
|
-
|
73
|
+
styleSheetHrefs: hrefs,
|
74
|
+
prAreAllStyleSheetsLoaded: Promise.all(prs).then(() => undefined),
|
75
|
+
remove: () => removeFns.forEach(fn => fn())
|
63
76
|
};
|
64
77
|
}
|
65
78
|
|
@@ -23,7 +23,9 @@ export function createUseInsertScriptTags() {
|
|
23
23
|
function useInsertScriptTags(params: { scriptTags: ScriptTag[] }) {
|
24
24
|
const { scriptTags } = params;
|
25
25
|
|
26
|
-
const currentScriptTagsRef = useConst(() => ({
|
26
|
+
const currentScriptTagsRef = useConst(() => ({
|
27
|
+
current: scriptTags
|
28
|
+
}));
|
27
29
|
|
28
30
|
currentScriptTagsRef.current = scriptTags;
|
29
31
|
|
@@ -42,7 +44,10 @@ export function createUseInsertScriptTags() {
|
|
42
44
|
})
|
43
45
|
.join("---");
|
44
46
|
|
45
|
-
if (
|
47
|
+
if (
|
48
|
+
getFingerprint(scriptTags) !==
|
49
|
+
getFingerprint(currentScriptTagsRef.current)
|
50
|
+
) {
|
46
51
|
// NOTE: This is for when the scripts imported in the Template have changed switching
|
47
52
|
// from one page to another in storybook.
|
48
53
|
window.location.reload();
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { useEffect } from "react";
|
2
2
|
|
3
|
-
export function useSetClassName(params: {
|
3
|
+
export function useSetClassName(params: {
|
4
|
+
qualifiedName: "html" | "body";
|
5
|
+
className: string | undefined;
|
6
|
+
}) {
|
4
7
|
const { qualifiedName, className } = params;
|
5
8
|
|
6
9
|
useEffect(() => {
|
@@ -1,11 +1,21 @@
|
|
1
1
|
import { join as pathJoin, relative as pathRelative, sep as pathSep } from "path";
|
2
2
|
import type { Plugin } from "vite";
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
nameOfTheGlobal,
|
5
|
+
basenameOfTheKeycloakifyResourcesDir,
|
6
|
+
keycloak_resources,
|
7
|
+
vitePluginSubScriptEnvNames
|
8
|
+
} from "../bin/shared/constants";
|
4
9
|
import { id } from "tsafe/id";
|
5
10
|
import { rm } from "../bin/tools/fs.rm";
|
6
11
|
import { copyKeycloakResourcesToPublic } from "../bin/shared/copyKeycloakResourcesToPublic";
|
7
12
|
import { assert } from "tsafe/assert";
|
8
|
-
import {
|
13
|
+
import {
|
14
|
+
readBuildOptions,
|
15
|
+
type BuildOptions,
|
16
|
+
type UserProvidedBuildOptions,
|
17
|
+
type ResolvedViteConfig
|
18
|
+
} from "../bin/shared/buildOptions";
|
9
19
|
import MagicString from "magic-string";
|
10
20
|
|
11
21
|
export type Params = UserProvidedBuildOptions & {
|
@@ -22,12 +32,13 @@ export function keycloakify(params?: Params) {
|
|
22
32
|
let shouldGenerateSourcemap: boolean | undefined = undefined;
|
23
33
|
|
24
34
|
const plugin = {
|
25
|
-
|
26
|
-
|
35
|
+
name: "keycloakify" as const,
|
36
|
+
configResolved: async resolvedConfig => {
|
27
37
|
shouldGenerateSourcemap = resolvedConfig.build.sourcemap !== false;
|
28
38
|
|
29
39
|
run_post_build_script_case: {
|
30
|
-
const envValue =
|
40
|
+
const envValue =
|
41
|
+
process.env[vitePluginSubScriptEnvNames.runPostBuildScript];
|
31
42
|
|
32
43
|
if (envValue === undefined) {
|
33
44
|
break run_post_build_script_case;
|
@@ -46,7 +57,11 @@ export function keycloakify(params?: Params) {
|
|
46
57
|
urlPathname = (() => {
|
47
58
|
let out = resolvedConfig.env.BASE_URL;
|
48
59
|
|
49
|
-
if (
|
60
|
+
if (
|
61
|
+
out.startsWith(".") &&
|
62
|
+
command === "build" &&
|
63
|
+
resolvedConfig.envPrefix?.includes("STORYBOOK_") !== true
|
64
|
+
) {
|
50
65
|
throw new Error(
|
51
66
|
[
|
52
67
|
`BASE_URL=${out} is not supported By Keycloakify. Use an absolute path instead.`,
|
@@ -73,7 +88,8 @@ export function keycloakify(params?: Params) {
|
|
73
88
|
buildDirPath = pathJoin(reactAppRootDirPath, resolvedConfig.build.outDir);
|
74
89
|
|
75
90
|
resolve_vite_config_case: {
|
76
|
-
const envValue =
|
91
|
+
const envValue =
|
92
|
+
process.env[vitePluginSubScriptEnvNames.resolveViteConfig];
|
77
93
|
|
78
94
|
if (envValue === undefined) {
|
79
95
|
break resolve_vite_config_case;
|
@@ -84,9 +100,12 @@ export function keycloakify(params?: Params) {
|
|
84
100
|
console.log(
|
85
101
|
JSON.stringify(
|
86
102
|
id<ResolvedViteConfig>({
|
87
|
-
|
88
|
-
|
89
|
-
|
103
|
+
publicDir: pathRelative(
|
104
|
+
reactAppRootDirPath,
|
105
|
+
resolvedConfig.publicDir
|
106
|
+
),
|
107
|
+
assetsDir: resolvedConfig.build.assetsDir,
|
108
|
+
buildDir: resolvedConfig.build.outDir,
|
90
109
|
urlPathname,
|
91
110
|
userProvidedBuildOptions
|
92
111
|
})
|
@@ -97,14 +116,14 @@ export function keycloakify(params?: Params) {
|
|
97
116
|
}
|
98
117
|
|
99
118
|
await copyKeycloakResourcesToPublic({
|
100
|
-
|
101
|
-
|
119
|
+
buildOptions: readBuildOptions({
|
120
|
+
cliCommandOptions: {
|
102
121
|
reactAppRootDirPath
|
103
122
|
}
|
104
123
|
})
|
105
124
|
});
|
106
125
|
},
|
107
|
-
|
126
|
+
transform: (code, id) => {
|
108
127
|
assert(command !== undefined);
|
109
128
|
assert(shouldGenerateSourcemap !== undefined);
|
110
129
|
|
@@ -115,7 +134,9 @@ export function keycloakify(params?: Params) {
|
|
115
134
|
assert(reactAppRootDirPath !== undefined);
|
116
135
|
|
117
136
|
{
|
118
|
-
const isWithinSourceDirectory = id.startsWith(
|
137
|
+
const isWithinSourceDirectory = id.startsWith(
|
138
|
+
pathJoin(reactAppRootDirPath, "src") + pathSep
|
139
|
+
);
|
119
140
|
|
120
141
|
if (!isWithinSourceDirectory) {
|
121
142
|
return;
|
@@ -153,17 +174,17 @@ export function keycloakify(params?: Params) {
|
|
153
174
|
}
|
154
175
|
|
155
176
|
const map = transformedCode.generateMap({
|
156
|
-
|
157
|
-
|
158
|
-
|
177
|
+
source: id,
|
178
|
+
includeContent: true,
|
179
|
+
hires: true
|
159
180
|
});
|
160
181
|
|
161
182
|
return {
|
162
|
-
|
163
|
-
|
183
|
+
code: transformedCode.toString(),
|
184
|
+
map: map.toString()
|
164
185
|
};
|
165
186
|
},
|
166
|
-
|
187
|
+
closeBundle: async () => {
|
167
188
|
assert(command !== undefined);
|
168
189
|
|
169
190
|
if (command !== "build") {
|
@@ -172,7 +193,10 @@ export function keycloakify(params?: Params) {
|
|
172
193
|
|
173
194
|
assert(buildDirPath !== undefined);
|
174
195
|
|
175
|
-
await rm(pathJoin(buildDirPath, keycloak_resources), {
|
196
|
+
await rm(pathJoin(buildDirPath, keycloak_resources), {
|
197
|
+
recursive: true,
|
198
|
+
force: true
|
199
|
+
});
|
176
200
|
}
|
177
201
|
} satisfies Plugin;
|
178
202
|
|
@@ -14,7 +14,8 @@ if (!Array.prototype.every) {
|
|
14
14
|
// 3. Let len be ToUint32(lenValue).
|
15
15
|
var len = O.length >>> 0;
|
16
16
|
// 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
|
17
|
-
if (typeof callbackfn !== "function" &&
|
17
|
+
if (typeof callbackfn !== "function" &&
|
18
|
+
Object.prototype.toString.call(callbackfn) !== "[object Function]") {
|
18
19
|
throw new TypeError();
|
19
20
|
}
|
20
21
|
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Array.prototype.every.js","sourceRoot":"","sources":["../src/tools/Array.prototype.every.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE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,GAAG,CAAC,EAAE,CAAC;YACvB,CAAC,GAAG,OAAO,CAAC;QAChB,CAAC;QAED,iBAAiB;QACjB,CAAC,GAAG,CAAC,CAAC;QAEN,2BAA2B;QAC3B,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;YACb,IAAI,MAAM,CAAC;YAEX,4BAA4B;YAC5B,yDAAyD;YACzD,oEAAoE;YACpE,mCAAmC;YACnC,qCAAqC;YACrC,+BAA+B;YAC/B,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACT,IAAI,UAAU,CAAC;gBACf,iEAAiE;gBACjE,4BAA4B;gBAC5B,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBAEd,uEAAuE;gBACvE,+DAA+D;gBAC/D,2CAA2C;gBAC3C,iDAAiD;gBACjD,IAAI,CAAC;oBAAE,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;;oBAChD,UAAU,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;gBAE3C,wDAAwD;gBACxD,IAAI,CAAC,UAAU,EAAE,CAAC;oBACd,OAAO,KAAK,CAAC;gBACjB,CAAC;YACL,CAAC;YACD,CAAC,EAAE,CAAC;QACR,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC"}
|
package/tools/clsx.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"clsx.js","sourceRoot":"","sources":["../src/tools/clsx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"clsx.js","sourceRoot":"","sources":["../src/tools/clsx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,S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O,GAAG,CAAC;AACf,CAAC,CAAC"}
|
package/tools/deepAssign.js
CHANGED
@@ -7,12 +7,14 @@ export function deepAssign(params) {
|
|
7
7
|
const source = deepClone(params.source);
|
8
8
|
Object.keys(source).forEach(key => {
|
9
9
|
var dereferencedSource = source[key];
|
10
|
-
if (target[key] === undefined ||
|
10
|
+
if (target[key] === undefined ||
|
11
|
+
dereferencedSource instanceof Function ||
|
12
|
+
!(dereferencedSource instanceof Object)) {
|
11
13
|
Object.defineProperty(target, key, {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
enumerable: true,
|
15
|
+
writable: true,
|
16
|
+
configurable: true,
|
17
|
+
value: dereferencedSource
|
16
18
|
});
|
17
19
|
return;
|
18
20
|
}
|
@@ -26,8 +28,8 @@ export function deepAssign(params) {
|
|
26
28
|
assert(is(dereferencedTarget));
|
27
29
|
assert(is(dereferencedSource));
|
28
30
|
deepAssign({
|
29
|
-
|
30
|
-
|
31
|
+
target: dereferencedTarget,
|
32
|
+
source: dereferencedSource
|
31
33
|
});
|
32
34
|
});
|
33
35
|
}
|
package/tools/deepAssign.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deepAssign.js","sourceRoot":"","sources":["../src/tools/deepAssign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,mEAAmE;AACnE,MAAM,UAAU,UAAU,CAAC,
|
1
|
+
{"version":3,"file":"deepAssign.js","sourceRoot":"","sources":["../src/tools/deepAssign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,mEAAmE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ED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deepClone.js","sourceRoot":"","sources":["../src/tools/deepClone.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AAE9C,MAAM,UAAU,SAAS,CAAI,CAAI;IAC7B,IAAI,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;QAC1B,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAQ,CAAC;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,
|
1
|
+
{"version":3,"file":"deepClone.js","sourceRoot":"","sources":["../src/tools/deepClone.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AAE9C,MAAM,UAAU,SAAS,CAAI,CAAI;IAC7B,IAAI,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;QAC1B,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAQ,CAAC;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CACrB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5D,CAAC;AACb,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formatNumber.js","sourceRoot":"","sources":["../src/tools/formatNumber.ts"],"names":[],"mappings":"AAA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