Fix build and reduce size
This commit is contained in:
parent
63ccb0609e
commit
69f017df36
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloak-react-theming",
|
"name": "keycloak-react-theming",
|
||||||
"version": "0.0.24",
|
"version": "0.0.25",
|
||||||
"description": "Keycloak theme generator for Reacts app",
|
"description": "Keycloak theme generator for Reacts app",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
2
src/bin/build-keycloak-theme/ftlValuesGlobalName.ts
Normal file
2
src/bin/build-keycloak-theme/ftlValuesGlobalName.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
export const ftlValuesGlobalName = "keycloakPagesContext";
|
@ -10,8 +10,7 @@ import { generateFtlFilesCodeFactory } from "./generateFtl";
|
|||||||
import { keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl } from "../download-sample-keycloak-themes";
|
import { keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl } from "../download-sample-keycloak-themes";
|
||||||
import { downloadAndUnzip } from "../tools/downloadAndUnzip";
|
import { downloadAndUnzip } from "../tools/downloadAndUnzip";
|
||||||
import * as child_process from "child_process";
|
import * as child_process from "child_process";
|
||||||
|
import { ftlValuesGlobalName } from "./ftlValuesGlobalName";
|
||||||
export const ftlValuesGlobalName = "keycloakPagesContext";
|
|
||||||
|
|
||||||
export function generateKeycloakThemeResources(
|
export function generateKeycloakThemeResources(
|
||||||
params: {
|
params: {
|
||||||
|
31
src/lib/LoginPage.tsx
Normal file
31
src/lib/LoginPage.tsx
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
import { useState, memo } from "react";
|
||||||
|
import { KcProperties, Template } from "./Template";
|
||||||
|
import { assert } from "evt/tools/typeSafety/assert";
|
||||||
|
import { keycloakPagesContext } from "./keycloakFtlValues";
|
||||||
|
|
||||||
|
export type Props = {
|
||||||
|
properties: KcProperties;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const LoginPage = memo((props: Props)=>{
|
||||||
|
|
||||||
|
|
||||||
|
const [{ }] = useState(() => {
|
||||||
|
|
||||||
|
assert(keycloakPagesContext !== undefined);
|
||||||
|
|
||||||
|
return keycloakPagesContext;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Template/>
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
export {};
|
@ -15,18 +15,11 @@ import { useConstCallback } from "powerhooks";
|
|||||||
|
|
||||||
type KcClasses<T extends string> = { [key in T]?: string[] | string };
|
type KcClasses<T extends string> = { [key in T]?: string[] | string };
|
||||||
|
|
||||||
|
export type KcProperties = {
|
||||||
export type Props = {
|
|
||||||
displayInfo?: boolean;
|
|
||||||
displayMessage: boolean;
|
|
||||||
displayRequiredFields: boolean;
|
|
||||||
displayWide: boolean;
|
|
||||||
showAnotherWayIfPresent: boolean;
|
|
||||||
properties?: {
|
|
||||||
stylesCommon?: string[];
|
stylesCommon?: string[];
|
||||||
styles?: string[];
|
styles?: string[];
|
||||||
scripts?: string[];
|
scripts?: string[];
|
||||||
} & KcClasses<
|
} & KcClasses<
|
||||||
"kcLoginClass" |
|
"kcLoginClass" |
|
||||||
"kcHeaderClass" |
|
"kcHeaderClass" |
|
||||||
"kcHeaderWrapperClass" |
|
"kcHeaderWrapperClass" |
|
||||||
@ -50,7 +43,15 @@ export type Props = {
|
|||||||
"kcFormSocialAccountClass" |
|
"kcFormSocialAccountClass" |
|
||||||
"kcSignUpClass" |
|
"kcSignUpClass" |
|
||||||
"kcInfoAreaWrapperClass"
|
"kcInfoAreaWrapperClass"
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
export type Props = {
|
||||||
|
displayInfo?: boolean;
|
||||||
|
displayMessage: boolean;
|
||||||
|
displayRequiredFields: boolean;
|
||||||
|
displayWide: boolean;
|
||||||
|
showAnotherWayIfPresent: boolean;
|
||||||
|
properties?: KcProperties;
|
||||||
headerNode: ReactNode;
|
headerNode: ReactNode;
|
||||||
showUsernameNode: ReactNode;
|
showUsernameNode: ReactNode;
|
||||||
formNode: ReactNode;
|
formNode: ReactNode;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import { ftlValuesGlobalName } from "../bin/build-keycloak-theme/generateKeycloakThemeResources";
|
import { ftlValuesGlobalName } from "../bin/build-keycloak-theme/ftlValuesGlobalName";
|
||||||
import type { generateFtlFilesCodeFactory } from "../bin/build-keycloak-theme/generateFtl";
|
import type { generateFtlFilesCodeFactory } from "../bin/build-keycloak-theme/generateFtl";
|
||||||
import { id } from "evt/tools/typeSafety/id";
|
import { id } from "evt/tools/typeSafety/id";
|
||||||
//import type { LanguageLabel } from "./i18n/getLanguageLabel";
|
//import type { LanguageLabel } from "./i18n/getLanguageLabel";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user