diff --git a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/page/AbstractAccountPage.java b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/page/AbstractAccountPage.java
index ade34bb8ab5..78b947a2135 100644
--- a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/page/AbstractAccountPage.java
+++ b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/page/AbstractAccountPage.java
@@ -41,7 +41,6 @@ public abstract class AbstractAccountPage extends AuthRealm {
public UriBuilder createUriBuilder() {
String fragment = null;
if (hashPath != null) {
- hashPath.add(0, "app"); // TODO remove this once KEYCLOAK-11268 is resolved
fragment = "/" + String.join("/", hashPath);
}
diff --git a/themes/.gitignore b/themes/.gitignore
index 64f5a0a6813..bda76414e35 100644
--- a/themes/.gitignore
+++ b/themes/.gitignore
@@ -1 +1,2 @@
node
+web_modules
diff --git a/themes/pom.xml b/themes/pom.xml
index 2d73bbc3390..3adba182bd1 100755
--- a/themes/pom.xml
+++ b/themes/pom.xml
@@ -15,12 +15,25 @@
src/main/resources/theme/keycloak/common/resources
- src/main/resources/theme/keycloak-preview/account/resources
+ src/main/resources/theme/keycloak-preview/account/src
ci --no-optional --ignore-scripts
+
+ maven-clean-plugin
+
+
+
+ ${dir.account2}/web_modules
+
+
+ ${dir.common}/web_modules
+
+
+
+
com.github.eirslett
frontend-maven-plugin
@@ -110,9 +123,11 @@
**/Gruntfile.js
**/Gemfile*
**/.*
+
**/git-Logo.svg
- **/keycloak-preview/account/resources/node_modules/**
+
+ **/keycloak-preview/account/src/**
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl
index f5ce7d942e1..ebf5468db2c 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl
+++ b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl
@@ -130,7 +130,7 @@
document.getElementById("landingLoggedInUser").innerHTML = loggedInUserName('${msg("unknownUser")}', '${msg("fullName")}');
}
- loadjs("/app/Main.js");
+ loadjs("/Main.js");
}).error(function() {
alert('failed to initialize keycloak');
@@ -231,7 +231,7 @@
${msg("personalInfoIntroMessage")}
@@ -242,9 +242,9 @@
${msg("accountSecurityIntroMessage")}
@@ -255,7 +255,7 @@
${msg("applicationsIntroMessage")}
@@ -266,7 +266,7 @@
${msg("resourceIntroMessage")}
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/.gitignore b/themes/src/main/resources/theme/keycloak-preview/account/resources/.gitignore
index 87a9386336d..fe968d73d22 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/.gitignore
+++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/.gitignore
@@ -1,24 +1,14 @@
-# ignore typescript-generated files
+# ignore typescript-generated files
*.js
*.js.map
-# ignore keycloak.json - we won't need this much longer
-keycloak.json
-
# ignore log files
*.log
-# Do not commit, installed at compile time
-node_modules
-
# Don't ignore these
-!keycloak.js
-!snowpack.config.js
-!.eslintrc.js
!WelcomePageScripts.js
!content.js
public/app.css
public/base.css
-public/assets/
-web_modules/
\ No newline at end of file
+public/assets/
\ No newline at end of file
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/QRCode.png b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/QRCode.png
deleted file mode 100644
index 38b551dc2c5..00000000000
Binary files a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/QRCode.png and /dev/null differ
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/keycloak-logo-min.png b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/keycloak-logo-min.png
deleted file mode 100644
index 0bbf1d51e4f..00000000000
Binary files a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/keycloak-logo-min.png and /dev/null differ
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/keycloak-logo.png b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/keycloak-logo.png
deleted file mode 100644
index ca53f0a04ba..00000000000
Binary files a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/assets/img/keycloak-logo.png and /dev/null differ
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/content.js b/themes/src/main/resources/theme/keycloak-preview/account/resources/content.js
index e6e22955464..d22a983eb7b 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/content.js
+++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/content.js
@@ -4,7 +4,7 @@ var content = [
id: 'personal-info',
path: 'personal-info',
label: 'personalInfoHtmlTitle',
- modulePath: '/app/content/account-page/AccountPage.js',
+ modulePath: '/content/account-page/AccountPage.js',
componentName: 'AccountPage'
},
{
@@ -15,21 +15,21 @@ var content = [
id: 'signingin',
path: 'security/signingin',
label: 'signingIn',
- modulePath: '/app/content/signingin-page/SigningInPage.js',
+ modulePath: '/content/signingin-page/SigningInPage.js',
componentName: 'SigningInPage',
},
{
id: 'device-activity',
path: 'security/device-activity',
label: 'device-activity',
- modulePath: '/app/content/device-activity-page/DeviceActivityPage.js',
+ modulePath: '/content/device-activity-page/DeviceActivityPage.js',
componentName: 'DeviceActivityPage'
},
{
id: 'linked-accounts',
path: 'security/linked-accounts',
label: 'linkedAccountsHtmlTitle',
- modulePath: '/app/content/linked-accounts-page/LinkedAccountsPage.js',
+ modulePath: '/content/linked-accounts-page/LinkedAccountsPage.js',
componentName: 'LinkedAccountsPage',
hidden: !features.isLinkedAccountsEnabled
}
@@ -39,14 +39,14 @@ var content = [
id: 'applications',
path: 'applications',
label: 'applications',
- modulePath: '/app/content/applications-page/ApplicationsPage.js',
+ modulePath: '/content/applications-page/ApplicationsPage.js',
componentName: 'ApplicationsPage'
},
{
id: 'resources',
path: 'resources',
label: 'resources',
- modulePath: '/app/content/my-resources-page/MyResourcesPage.js',
+ modulePath: '/content/my-resources-page/MyResourcesPage.js',
componentName: 'MyResourcesPage',
hidden: !features.isMyResourcesEnabled
}
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/environments/environment.prod.ts b/themes/src/main/resources/theme/keycloak-preview/account/resources/environments/environment.prod.ts
deleted file mode 100644
index 3612073bc31..00000000000
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/environments/environment.prod.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export const environment = {
- production: true
-};
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/environments/environment.ts b/themes/src/main/resources/theme/keycloak-preview/account/resources/environments/environment.ts
deleted file mode 100644
index b7f639aecac..00000000000
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/environments/environment.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// The file contents for the current environment will overwrite these during build.
-// The build system defaults to the dev environment which uses `environment.ts`, but if you do
-// `ng build --env=prod` then `environment.prod.ts` will be used instead.
-// The list of which env maps to which file can be found in `.angular-cli.json`.
-
-export const environment = {
- production: false
-};
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/WelcomePageScripts.js b/themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js
similarity index 98%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/WelcomePageScripts.js
rename to themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js
index d149b387b82..b49bcaa5bca 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/WelcomePageScripts.js
+++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js
@@ -15,7 +15,7 @@
*/
var isWelcomePage = function () {
var winHash = window.location.hash;
- return winHash.indexOf('#/app') !== 0;
+ return winHash === '#/';
};
var toggleReact = function () {
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/.babelrc b/themes/src/main/resources/theme/keycloak-preview/account/src/.babelrc
similarity index 82%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/.babelrc
rename to themes/src/main/resources/theme/keycloak-preview/account/src/.babelrc
index 4c05b5a74c2..455e60f25cf 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/.babelrc
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/.babelrc
@@ -3,7 +3,7 @@
[
"snowpack/assets/babel-plugin.js",
{
- "webModulesUrl": "./web_modules",
+ "webModulesUrl": "../common/keycloak/web_modules",
"moduleResolution": "node"
}
],
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/.eslintrc.js b/themes/src/main/resources/theme/keycloak-preview/account/src/.eslintrc.js
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/.eslintrc.js
rename to themes/src/main/resources/theme/keycloak-preview/account/src/.eslintrc.js
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/src/.gitignore b/themes/src/main/resources/theme/keycloak-preview/account/src/.gitignore
new file mode 100644
index 00000000000..2497619debf
--- /dev/null
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/.gitignore
@@ -0,0 +1,2 @@
+# Do not commit, installed at compile time
+node_modules
\ No newline at end of file
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/README.md b/themes/src/main/resources/theme/keycloak-preview/account/src/README.md
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/README.md
rename to themes/src/main/resources/theme/keycloak-preview/account/src/README.md
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/App.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/App.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/App.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/App.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/ContentPages.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/ContentPages.tsx
similarity index 95%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/ContentPages.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/ContentPages.tsx
index f8eefd86c0e..439c4505846 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/ContentPages.tsx
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/app/ContentPages.tsx
@@ -93,7 +93,7 @@ function createNavItems(activePage: PageDef, contentParam: ContentItem[], groupN
groupId={item.groupId}
itemId={item.itemId}
key={item.itemId}
- to={'#/app/' + page.path}
+ to={'#/' + page.path}
isActive={activePage.itemId === item.itemId}
type="button">
{Msg.localize(page.label, page.labelParams)}
@@ -158,10 +158,10 @@ export function makeRoutes(): React.ReactNode {
const routes: React.ReactElement[] = pageDefs.map((page: PageDef) => {
if (isModulePageDef(page)) {
const node: React.ReactNode = React.createElement(page.module[page.componentName], {'pageDef': page});
- return node} />;
+ return node} />;
} else {
const pageDef: ComponentPageDef = page as ComponentPageDef;
- return ;
+ return ;
}
});
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/Main.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/Main.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/Main.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/Main.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageNav.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/PageNav.tsx
similarity index 96%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageNav.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/PageNav.tsx
index 00d36c17540..fbc693085b0 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageNav.tsx
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/app/PageNav.tsx
@@ -37,7 +37,7 @@ class PageNavigation extends React.Component {
const items: PageDef[] = flattenContent(content);
const firstItem = items[0];
for (let item of items) {
- const itemPath: string = '/app/' + item.path;
+ const itemPath: string = '/' + item.path;
if (itemPath === currentPath) {
return item;
}
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageToolbar.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/PageToolbar.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageToolbar.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/PageToolbar.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/account-service/account.service.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/account-service/account.service.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/account-service/account.service.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/account-service/account.service.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/ContentAlert.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/ContentAlert.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/ContentAlert.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/ContentAlert.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/ContentPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/ContentPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/ContentPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/ContentPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/account-page/AccountPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/account-page/AccountPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/account-page/AccountPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/account-page/AccountPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/aia-page/AppInitiatedActionPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/aia-page/AppInitiatedActionPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/aia-page/AppInitiatedActionPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/aia-page/AppInitiatedActionPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/applications-page/ApplicationsPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/applications-page/ApplicationsPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/applications-page/ApplicationsPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/applications-page/ApplicationsPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/authenticator-page/AuthenticatorPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/authenticator-page/AuthenticatorPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/authenticator-page/AuthenticatorPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/authenticator-page/AuthenticatorPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/device-activity-page/DeviceActivityPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/device-activity-page/DeviceActivityPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/device-activity-page/DeviceActivityPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/device-activity-page/DeviceActivityPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/linked-accounts-page/LinkedAccountsPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/linked-accounts-page/LinkedAccountsPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/linked-accounts-page/LinkedAccountsPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/linked-accounts-page/LinkedAccountsPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/AbstractResourceTable.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/AbstractResourceTable.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/AbstractResourceTable.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/AbstractResourceTable.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/EditTheResource.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/EditTheResource.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/EditTheResource.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/EditTheResource.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/MyResourcesPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/MyResourcesPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/MyResourcesPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/MyResourcesPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/PermissionRequest.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/PermissionRequest.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/PermissionRequest.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/PermissionRequest.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/ResourcesTable.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/ResourcesTable.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ShareTheResource.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/ShareTheResource.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ShareTheResource.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/ShareTheResource.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/SharedResourcesTable.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/SharedResourcesTable.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/SharedResourcesTable.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/my-resources-page/SharedResourcesTable.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/page-not-found/PageNotFound.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/page-not-found/PageNotFound.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/page-not-found/PageNotFound.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/page-not-found/PageNotFound.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/signingin-page/SigningInPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/content/signingin-page/SigningInPage.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/signingin-page/SigningInPage.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/content/signingin-page/SigningInPage.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/keycloak-service/keycloak.service.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/keycloak-service/keycloak.service.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/keycloak-service/keycloak.service.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/keycloak-service/keycloak.service.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/AIACommand.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/util/AIACommand.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/AIACommand.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/util/AIACommand.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/ParseLink.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/util/ParseLink.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/ParseLink.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/util/ParseLink.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/RedirectUri.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/util/RedirectUri.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/RedirectUri.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/util/RedirectUri.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/TimeUtil.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/util/TimeUtil.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/util/TimeUtil.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/util/TimeUtil.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/ContinueCancelModal.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/ContinueCancelModal.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/ContinueCancelModal.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/ContinueCancelModal.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/LocaleSelectors.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/LocaleSelectors.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/LocaleSelectors.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/LocaleSelectors.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/Logout.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/Logout.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/Logout.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/Logout.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/Msg.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/Msg.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/Msg.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/Msg.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/ReferrerDropdownItem.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/ReferrerDropdownItem.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/ReferrerDropdownItem.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/ReferrerDropdownItem.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/ReferrerLink.tsx b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/ReferrerLink.tsx
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/ReferrerLink.tsx
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/ReferrerLink.tsx
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/features.ts b/themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/features.ts
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/features.ts
rename to themes/src/main/resources/theme/keycloak-preview/account/src/app/widgets/features.ts
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/eslint.cmd b/themes/src/main/resources/theme/keycloak-preview/account/src/eslint.cmd
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/eslint.cmd
rename to themes/src/main/resources/theme/keycloak-preview/account/src/eslint.cmd
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json b/themes/src/main/resources/theme/keycloak-preview/account/src/package-lock.json
similarity index 99%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json
rename to themes/src/main/resources/theme/keycloak-preview/account/src/package-lock.json
index c3da8d8f1ff..61423f7ed9a 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/package-lock.json
@@ -4581,6 +4581,12 @@
"is-symbol": "^1.0.2"
}
},
+ "es6-object-assign": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
+ "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=",
+ "dev": true
+ },
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -6339,6 +6345,12 @@
}
}
},
+ "interpret": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
+ "dev": true
+ },
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
@@ -8675,6 +8687,15 @@
}
}
},
+ "rechoir": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
+ "dev": true,
+ "requires": {
+ "resolve": "^1.1.6"
+ }
+ },
"regenerate": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz",
@@ -9113,6 +9134,36 @@
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
+ "shelljs": {
+ "version": "0.8.4",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
+ "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.0.0",
+ "interpret": "^1.0.0",
+ "rechoir": "^0.6.2"
+ }
+ },
+ "shx": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz",
+ "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==",
+ "dev": true,
+ "requires": {
+ "es6-object-assign": "^1.0.3",
+ "minimist": "^1.2.0",
+ "shelljs": "^0.8.1"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+ "dev": true
+ }
+ }
+ },
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/package.json b/themes/src/main/resources/theme/keycloak-preview/account/src/package.json
similarity index 85%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/package.json
rename to themes/src/main/resources/theme/keycloak-preview/account/src/package.json
index f68ee5bb53e..4baa08eb2dc 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/package.json
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/package.json
@@ -3,12 +3,13 @@
"version": "1.0.0",
"description": "keycloak-preview account management written in React",
"scripts": {
- "build": "snowpack && npm run check-types && npm run babel",
- "babel": "babel --source-maps --extensions \".js,.ts,.tsx\" app/ --out-dir app/",
+ "build": "snowpack && npm run check-types && npm run babel && npm run move-web_modules",
+ "babel": "babel --source-maps --extensions \".js,.ts,.tsx\" app/ --out-dir ../resources/",
"babel:watch": "npm run babel -- --watch",
"check-types": "tsc --noImplicitAny --strictNullChecks --jsx react -p ./",
"check-types:watch": "npm run check-types -- -w",
- "lint": "eslint ./app/**/*.ts*"
+ "lint": "eslint ./app/**/*.ts*",
+ "move-web_modules": "shx mv web_modules ../../../keycloak/common/resources"
},
"keywords": [],
"author": "Stan Silvert",
@@ -42,6 +43,7 @@
"eslint-plugin-react": "^7.12.4",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-postcss": "^2.5.0",
+ "shx": "^0.3.2",
"snowpack": "^1.7.0",
"typescript": "^3.8.3"
},
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/snowpack.config.js b/themes/src/main/resources/theme/keycloak-preview/account/src/snowpack.config.js
similarity index 55%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/snowpack.config.js
rename to themes/src/main/resources/theme/keycloak-preview/account/src/snowpack.config.js
index d86f9f0421f..5b70dd30f2e 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/snowpack.config.js
+++ b/themes/src/main/resources/theme/keycloak-preview/account/src/snowpack.config.js
@@ -1,17 +1,20 @@
const copy = require('rollup-plugin-copy');
const postcss = require('rollup-plugin-postcss');
+const appDest = '../resources/'
+const appDestPublic = appDest + 'public/'
+
module.exports = {
rollup: {
plugins: [
postcss({
- extract: 'public/app.css'
+ extract: appDestPublic + 'app.css'
}),
copy({
targets: [
- { src: 'node_modules/@patternfly/react-core/dist/styles/base.css', dest: 'public/' },
- { src: 'node_modules/@patternfly/react-core/dist/styles/assets/fonts/overpass-webfont/overpass*.woff2', dest: 'public/assets/fonts/overpass-webfont/'},
- { src: 'node_modules/@patternfly/react-core/dist/styles/assets/pficon/pficon.woff2', dest: 'public/assets/pficon/'},
+ { src: 'node_modules/@patternfly/react-core/dist/styles/base.css', dest: appDestPublic },
+ { src: 'node_modules/@patternfly/react-core/dist/styles/assets/fonts/overpass-webfont/overpass*.woff2', dest: appDestPublic + 'assets/fonts/overpass-webfont/'},
+ { src: 'node_modules/@patternfly/react-core/dist/styles/assets/pficon/pficon.woff2', dest: appDestPublic + 'assets/pficon/'},
],
})
]
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/tsconfig.json b/themes/src/main/resources/theme/keycloak-preview/account/src/tsconfig.json
similarity index 100%
rename from themes/src/main/resources/theme/keycloak-preview/account/resources/tsconfig.json
rename to themes/src/main/resources/theme/keycloak-preview/account/src/tsconfig.json
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/theme.properties b/themes/src/main/resources/theme/keycloak-preview/account/theme.properties
index 63e2004ad6b..96a0c78c92d 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/theme.properties
+++ b/themes/src/main/resources/theme/keycloak-preview/account/theme.properties
@@ -1,6 +1,6 @@
parent=base
deprecatedMode=false
-scripts=WelcomePageScripts.js content.js
+scripts=welcome-page-scripts.js content.js
developmentMode=false
# This is the logo in upper lefthand corner.