Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
071635ea05 | |||
ec2b085855 | |||
305d5b7328 | |||
deb4ddaed2 | |||
379f052e6e |
@ -1,3 +1,7 @@
|
||||
### **0.0.27** (2021-03-02)
|
||||
|
||||
- Implement entrypoint
|
||||
|
||||
### **0.0.26** (2021-03-02)
|
||||
|
||||
- Login page implemented
|
||||
|
6
lib/components/KcApp.d.ts
vendored
Normal file
6
lib/components/KcApp.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/// <reference types="react" />
|
||||
import type { KcPagesProperties } from "./KcProperties";
|
||||
export declare type KcAppProps = {
|
||||
kcProperties?: KcPagesProperties;
|
||||
};
|
||||
export declare const KcApp: import("react").MemoExoticComponent<(props: KcAppProps) => JSX.Element | null>;
|
19
lib/components/KcApp.js
Normal file
19
lib/components/KcApp.js
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.KcApp = void 0;
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var react_1 = require("react");
|
||||
var kcContext_1 = require("../kcContext");
|
||||
var assert_1 = require("evt/tools/typeSafety/assert");
|
||||
var Login_1 = require("./Login");
|
||||
exports.KcApp = react_1.memo(function (props) {
|
||||
var kcProperties = props.kcProperties;
|
||||
assert_1.assert(kcContext_1.kcContext !== undefined, "App is not currently served by a Keycloak server");
|
||||
switch (kcContext_1.kcContext.pageBasename) {
|
||||
case "login.ftl": return jsx_runtime_1.jsx(Login_1.Login, { kcProperties: kcProperties }, void 0);
|
||||
case "register.ftl":
|
||||
alert("TODO: Implement " + kcContext_1.kcContext.pageBasename);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=KcApp.js.map
|
1
lib/components/KcApp.js.map
Normal file
1
lib/components/KcApp.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"KcApp.js","sourceRoot":"","sources":["../../src/lib/components/KcApp.tsx"],"names":[],"mappings":";;;;AACA,+BAA6B;AAC7B,0CAAyC;AACzC,sDAAqD;AAErD,iCAAgC;AAMnB,QAAA,KAAK,GAAG,YAAI,CAAC,UAAC,KAAiB;IAEhC,IAAA,YAAY,GAAK,KAAK,aAAV,CAAW;IAE/B,eAAM,CAAC,qBAAS,KAAK,SAAS,EAAE,kDAAkD,CAAC,CAAC;IAEpF,QAAQ,qBAAS,CAAC,YAAY,EAAE;QAC5B,KAAK,WAAW,CAAC,CAAC,OAAO,kBAAC,aAAK,IAAC,YAAY,EAAE,YAAY,WAAI,CAAA;QAC9D,KAAK,cAAc;YACf,KAAK,CAAC,qBAAmB,qBAAS,CAAC,YAAc,CAAC,CAAC;YACnD,OAAO,IAAI,CAAC;KACnB;AAEL,CAAC,CAAC,CAAC"}
|
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@ -5,3 +5,4 @@ export * from "./i18n/useKcTranslation";
|
||||
export * from "./components/KcProperties";
|
||||
export * from "./components/Login";
|
||||
export * from "./components/Template";
|
||||
export * from "./components/KcApp";
|
||||
|
@ -17,4 +17,5 @@ __exportStar(require("./i18n/useKcTranslation"), exports);
|
||||
__exportStar(require("./components/KcProperties"), exports);
|
||||
__exportStar(require("./components/Login"), exports);
|
||||
__exportStar(require("./components/Template"), exports);
|
||||
__exportStar(require("./components/KcApp"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAE5B,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AAExC,4DAA0C;AAC1C,qDAAmC;AACnC,wDAAsC"}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAE5B,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AAExC,4DAA0C;AAC1C,qDAAmC;AACnC,wDAAsC;AACtC,qDAAmC"}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "keycloak-react-theming",
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.27",
|
||||
"description": "Keycloak theme generator for Reacts app",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -31,6 +31,7 @@
|
||||
"src/bin/tools/getProjectRoot.ts",
|
||||
"src/bin/tools/grant-exec-perms.ts",
|
||||
"src/bin/tools/transformCodebase.ts",
|
||||
"src/lib/components/KcApp.tsx",
|
||||
"src/lib/components/KcProperties.ts",
|
||||
"src/lib/components/Login.tsx",
|
||||
"src/lib/components/Template.tsx",
|
||||
@ -90,6 +91,9 @@
|
||||
"bin/tools/transformCodebase.d.ts",
|
||||
"bin/tools/transformCodebase.js",
|
||||
"bin/tools/transformCodebase.js.map",
|
||||
"lib/components/KcApp.d.ts",
|
||||
"lib/components/KcApp.js",
|
||||
"lib/components/KcApp.js.map",
|
||||
"lib/components/KcProperties.d.ts",
|
||||
"lib/components/KcProperties.js",
|
||||
"lib/components/KcProperties.js.map",
|
||||
|
25
src/lib/components/KcApp.tsx
Normal file
25
src/lib/components/KcApp.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
import { memo } from "react";
|
||||
import { kcContext } from "../kcContext";
|
||||
import { assert } from "evt/tools/typeSafety/assert";
|
||||
import type { KcPagesProperties } from "./KcProperties";
|
||||
import { Login } from "./Login";
|
||||
|
||||
export type KcAppProps = {
|
||||
kcProperties?: KcPagesProperties;
|
||||
};
|
||||
|
||||
export const KcApp = memo((props: KcAppProps) => {
|
||||
|
||||
const { kcProperties } = props;
|
||||
|
||||
assert(kcContext !== undefined, "App is not currently served by a Keycloak server");
|
||||
|
||||
switch (kcContext.pageBasename) {
|
||||
case "login.ftl": return <Login kcProperties={kcProperties} />
|
||||
case "register.ftl":
|
||||
alert(`TODO: Implement ${kcContext.pageBasename}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
});
|
@ -6,4 +6,5 @@ export * from "./i18n/useKcTranslation";
|
||||
|
||||
export * from "./components/KcProperties";
|
||||
export * from "./components/Login";
|
||||
export * from "./components/Template";
|
||||
export * from "./components/Template";
|
||||
export * from "./components/KcApp";
|
@ -506,9 +506,14 @@
|
||||
"signature": "b140c6befa7cffb7a1ba17cd337326993258beb795aa99d9495c01727cd732da",
|
||||
"affectsGlobalScope": false
|
||||
},
|
||||
"../src/lib/components/KcApp.tsx": {
|
||||
"version": "b36ca5456441bb06ae16c21ca9c9d10c4dc6e959be61dd3b62d464e449f6057a",
|
||||
"signature": "24c4592303b7d6b1cc308a3fcc670d17accbb8829cebc11918ad03e11c95cde6",
|
||||
"affectsGlobalScope": false
|
||||
},
|
||||
"../src/lib/index.ts": {
|
||||
"version": "57ce3866aa67ccd2a899eaa6deea5c60452edb5bcfdefed7fdd3f757387f8de6",
|
||||
"signature": "ede4a52c319dbd5e4af56958957e4881904104cff5b5d25adb3c1c095e0dc7f1",
|
||||
"version": "e4fdff9cbcbe1220aaf660684ed15f0aca2bf495130f9cf4a5ed54b2c5839ad4",
|
||||
"signature": "c054099d88cc247d4f8c372a16dd9d00c0ee746ca1251e6760e27262532768bd",
|
||||
"affectsGlobalScope": false
|
||||
},
|
||||
"../src/lib/i18n/generated_messages/account.ts": {
|
||||
@ -1169,6 +1174,14 @@
|
||||
"../node_modules/@types/react/jsx-runtime.d.ts",
|
||||
"../src/bin/tools/crawl.ts"
|
||||
],
|
||||
"../src/lib/components/KcApp.tsx": [
|
||||
"../node_modules/@types/react/index.d.ts",
|
||||
"../node_modules/@types/react/jsx-runtime.d.ts",
|
||||
"../node_modules/evt/tools/typeSafety/assert.d.ts",
|
||||
"../src/lib/components/KcProperties.ts",
|
||||
"../src/lib/components/Login.tsx",
|
||||
"../src/lib/kcContext.ts"
|
||||
],
|
||||
"../src/lib/components/KcProperties.ts": [
|
||||
"../node_modules/@types/react/jsx-runtime.d.ts",
|
||||
"../src/lib/tools/allPropertiesValuesToUndefined.ts"
|
||||
@ -1233,6 +1246,7 @@
|
||||
],
|
||||
"../src/lib/index.ts": [
|
||||
"../node_modules/@types/react/jsx-runtime.d.ts",
|
||||
"../src/lib/components/KcApp.tsx",
|
||||
"../src/lib/components/KcProperties.ts",
|
||||
"../src/lib/components/Login.tsx",
|
||||
"../src/lib/components/Template.tsx",
|
||||
@ -1559,6 +1573,10 @@
|
||||
"../node_modules/@emotion/css/types/index.d.ts",
|
||||
"../node_modules/@emotion/serialize/types/index.d.ts"
|
||||
],
|
||||
"../src/lib/components/KcApp.tsx": [
|
||||
"../node_modules/@types/react/index.d.ts",
|
||||
"../src/lib/components/KcProperties.ts"
|
||||
],
|
||||
"../src/lib/components/Login.tsx": [
|
||||
"../node_modules/@types/react/index.d.ts",
|
||||
"../src/lib/components/KcProperties.ts"
|
||||
@ -1578,6 +1596,7 @@
|
||||
"../src/lib/i18n/generated_messages/login.ts"
|
||||
],
|
||||
"../src/lib/index.ts": [
|
||||
"../src/lib/components/KcApp.tsx",
|
||||
"../src/lib/components/KcProperties.ts",
|
||||
"../src/lib/components/Login.tsx",
|
||||
"../src/lib/components/Template.tsx",
|
||||
@ -1732,6 +1751,7 @@
|
||||
"../src/bin/tools/getProjectRoot.ts",
|
||||
"../src/bin/tools/grant-exec-perms.ts",
|
||||
"../src/bin/tools/transformCodebase.ts",
|
||||
"../src/lib/components/KcApp.tsx",
|
||||
"../src/lib/components/KcProperties.ts",
|
||||
"../src/lib/components/Login.tsx",
|
||||
"../src/lib/components/Template.tsx",
|
||||
|
Reference in New Issue
Block a user