From c37c4d2a822ca42a83567d75add4f5952e2a52f7 Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Mon, 6 May 2019 13:30:52 -0400 Subject: [PATCH] KEYCLOAK-10193: Upgrade PatternFly and PatternFly React --- .../theme/keycloak-preview/account/index.ftl | 6 +- .../account/resources/app/PageToolbar.tsx | 6 +- .../account/resources/package-lock.json | 106 ++++++++++-------- .../account/resources/package.json | 4 +- .../account/resources/systemjs.config.js | 11 ++ 5 files changed, 80 insertions(+), 53 deletions(-) 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 60495d960e..e445e4ccb5 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl +++ b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl @@ -153,13 +153,13 @@
<#if referrer?has_content && referrer_uri?has_content> -
+ <#if realm.internationalizationEnabled && supportedLocales?size gt 1> -
+
-
+
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageToolbar.tsx b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageToolbar.tsx index 83fe1952a2..e13ce39ae5 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageToolbar.tsx +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/PageToolbar.tsx @@ -64,7 +64,7 @@ export class PageToolbar extends React.Component {this.hasReferrer && - + @@ -72,12 +72,12 @@ export class PageToolbar extends React.Component {features.isInternationalizationEnabled && - + } - + diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json b/themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json index 9e0e54d8fd..031542b383 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/package-lock.json @@ -85,6 +85,14 @@ "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==", "dev": true }, + "@babel/runtime": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz", + "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==", + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, "@babel/template": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", @@ -197,18 +205,18 @@ "integrity": "sha512-rLu3wcBWH4P5q1CGoSSH/i9hrXs7SlbRLkoq9IGuoPYNGQvDJ3pt/wmOM+XgYjIDRMVIdkUWt0RsfzF50JfnCw==" }, "@patternfly/patternfly": { - "version": "1.0.248", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-1.0.248.tgz", - "integrity": "sha512-x+fz3cP0nyFsK0ZRt1H58ESZxoy4wKqqb2uhyaNIg5jC3x5KC0PCr0gfUmBvNOiHnOePmc+ZC5nWcAOKN9tGBA==" + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-2.6.6.tgz", + "integrity": "sha512-lKbsTE/VlU1BiVzeo0BhfDe/qeqIqheejBz0qAm3CYuHyfUXd4+Uu+/9lfEB2EMb+wXpK4Np74OHtYCC82fP0Q==" }, "@patternfly/react-core": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-2.9.2.tgz", - "integrity": "sha512-v93pAA9dXTzsgFeR8W4+fg0kC0joB4BISFoSqzb22+/cNvSnEypC/DjBN4pOUEoBvsFC/JI8FotQoj9ZAx3GAw==", + "version": "3.16.10", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-3.16.10.tgz", + "integrity": "sha512-ASoNNuC+S2UjUeT2aR7LsAuDJpvXzMHYCjRc9WmXD9S52nvqA5p4SS9cXV60RCTvRpUbXJ7/55gnxi4Dt9u6/A==", "requires": { - "@patternfly/react-icons": "^3.6.1", - "@patternfly/react-styles": "^2.4.0", - "@patternfly/react-tokens": "^2.2.1", + "@patternfly/react-icons": "^3.8.1", + "@patternfly/react-styles": "^3.2.0", + "@patternfly/react-tokens": "^2.5.1", "@tippy.js/react": "^1.1.1", "emotion": "^9.2.9", "exenv": "^1.2.2", @@ -216,14 +224,14 @@ } }, "@patternfly/react-icons": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.6.1.tgz", - "integrity": "sha512-7PkP7NC3sDmsFAnQIGl+9p14vgx7gj0TZSwtL1ABkAEV9tXcEjWsyyZP2fahfTKVE9aPrOZ/YINsr8+iGCOTnA==" + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.8.1.tgz", + "integrity": "sha512-0LCuW4qdDQdiRcnmDBhTdnJZIk1ZlP0mn9VcnnUQ5qkLlJPFtiipcgr+RoQl56ht3xt6pXDKy6Gvv7Wwz/BVkw==" }, "@patternfly/react-styles": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-2.4.0.tgz", - "integrity": "sha512-BJQtg4zjj5Gw6OixHu2MGiT2T3vFTvyiGSXPQ+wk+vqR/wl0Y7/OOGNqI3fGYm1ON4q2ySOlGuJdHF+1NLbVyA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-3.2.0.tgz", + "integrity": "sha512-8M7bo4kPvypHlbzuynV53xjk5176EktfEgZ283sfHmvUlU3Yvq2+m8hS9ERHE9gd91Ip4HiyucAVVACd2gtHNQ==", "requires": { "@babel/helper-plugin-utils": "^7.0.0-beta.48", "camel-case": "^3.0.0", @@ -240,9 +248,9 @@ } }, "@patternfly/react-tokens": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.2.1.tgz", - "integrity": "sha512-DVGrHRPpNvIhS9ekn7lqvXdHHAbkCawwfc8hRCuGvGS2Z6O45u1JFTyKWTyvW9b94pigaDTArtMlp++k5o1Xpw==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.5.1.tgz", + "integrity": "sha512-ZykUfWT4yCELXhGGwQxcNqnXwe3sqfSuoL6IlQRV6wtUKk+/et7NkVvrRwvci926+Usemr4IQVc8V9gbHqRN/A==" }, "@tippy.js/react": { "version": "1.1.1", @@ -360,9 +368,9 @@ "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==" }, "acorn-globals": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", - "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.2.tgz", + "integrity": "sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ==", "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" @@ -838,12 +846,13 @@ } }, "babel-plugin-macros": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.5.0.tgz", - "integrity": "sha512-BWw0lD0kVZAXRD3Od1kMrdmfudqzDzYv2qrN3l2ISR1HVp1EgLKfbOrYV9xmY5k3qx3RIu5uPAUZZZHpo0o5Iw==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.5.1.tgz", + "integrity": "sha512-xN3KhAxPzsJ6OQTktCanNpIFnnMsCV+t8OloKxIL72D6+SUZYFn9qfklPgef5HyyDtzYZqqb+fs1S12+gQY82Q==", "requires": { - "cosmiconfig": "^5.0.5", - "resolve": "^1.8.1" + "@babel/runtime": "^7.4.2", + "cosmiconfig": "^5.2.0", + "resolve": "^1.10.0" } }, "babel-plugin-syntax-class-properties": { @@ -1144,6 +1153,13 @@ "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + } } }, "babel-template": { @@ -2660,9 +2676,9 @@ "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==" }, "cssstyle": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz", - "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.2.tgz", + "integrity": "sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow==", "requires": { "cssom": "0.3.x" } @@ -2814,16 +2830,16 @@ } }, "mime-db": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" }, "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", "requires": { - "mime-db": "~1.38.0" + "mime-db": "1.40.0" } }, "mimic-fn": { @@ -2924,9 +2940,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nwsapi": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz", - "integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==" + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", + "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==" }, "oauth-sign": { "version": "0.9.0", @@ -3132,9 +3148,9 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" }, "popper.js": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.7.tgz", - "integrity": "sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ==" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.15.0.tgz", + "integrity": "sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA==" }, "prelude-ls": { "version": "1.1.2", @@ -3268,9 +3284,9 @@ } }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "regexpp": { "version": "2.0.1", diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/package.json b/themes/src/main/resources/theme/keycloak-preview/account/resources/package.json index bf40194310..30f8edcb84 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/package.json +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/package.json @@ -11,8 +11,8 @@ "author": "Stan Silvert", "license": "Apache-2.0", "dependencies": { - "@patternfly/patternfly": "^1.0.248", - "@patternfly/react-core": "^2.9.2", + "@patternfly/patternfly": "^2.6.6", + "@patternfly/react-core": "^3.16.10", "axios": "^0.18.0", "moment": "^2.22.2", "react": "^16.8.5", diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/systemjs.config.js b/themes/src/main/resources/theme/keycloak-preview/account/resources/systemjs.config.js index fb1993aa33..d3c20a944f 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/systemjs.config.js +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/systemjs.config.js @@ -72,6 +72,7 @@ main: './index.js', defaultExtension: 'js', map: { + './Accordion': '@empty', //'./Accordion/index.js, './Alert': '@empty', //'./Alert/index.js', './AboutModal': '@empty', //'./AboutModal/index.js', './ApplicationLauncher': '@empty', //'./ApplicationLauncher/index.js', @@ -88,10 +89,12 @@ './Card/CardFooter': '@empty', './Checkbox': '@empty', //'./Checkbox/index.js', './ChipGroup': '@empty', //'./ChipGroup/index.js', + './ClipboardCopy': '@empty', //'./ClipboardCopy/index.js, './ContextSelector': '@empty', //'./ContextSelector/index.js', './DataList': '@empty', //'./DataList/index.js', './Dropdown': './Dropdown/index.js', './EmptyState': '@empty', //'./EmptyState/index.js', + './Expandable': '@empty', //'./Expandable/index.js', './Form': '@empty', //'./Form/index.js', './FormSelect': '@empty', //'./FormSelect/index.js', './InputGroup': '@empty', //'./InputGroup/index.js', @@ -100,12 +103,14 @@ './LoginPage': '@empty', //'./LoginPage/index.js', './Modal': '@empty', //'./Modal/index.js', './Nav': './Nav/index.js', + './OptionsMenu': '@empty', //./OptionsMenu/index.js', './Page': './Page/index.js', './Popover': '@empty', //'./Popover/index.js', './Progress': '@empty', //'./Progress/index.js', './Pagination': '@empty', //'./Pagination/index.js', './Radio': '@empty', //'./Radio/index.js', './Select': '@empty', //'./Select/index.js', + './SkipToContent': '@empty', //'./SkipToContent/index.js', './Switch': '@empty', //'./Switch/index.js', './Tabs': '@empty', //'./Tabs/index.js', './Text': '@empty', //'./Text/index.js', @@ -133,6 +138,10 @@ defaultExtension: 'js', }, + 'npm:@patternfly/react-core/dist/umd/@patternfly/patternfly': { + defaultExtension: 'js', + }, + // Layouts that map to @empty will not be loaded. // To load a layout, replace @empty with its commented path. 'npm:@patternfly/react-core/dist/umd/layouts': { @@ -747,6 +756,7 @@ './icons/om-icon.js': '@empty', './icons/otter-icon.js': '@empty', './icons/outdent-icon.js': '@empty', + './icons/paperPlaneAlt-icon': '@empty', './icons/pager-icon.js': '@empty', './icons/paint-brush-icon.js': '@empty', './icons/paint-roller-icon.js': '@empty', @@ -1086,6 +1096,7 @@ './icons/wallet-icon.js': '@empty', './icons/warehouse-icon.js': '@empty', './icons/water-icon.js': '@empty', + './icons/wave-square-icon.js': '@empty', './icons/weight-icon.js': '@empty', './icons/weight-hanging-icon.js': '@empty', './icons/wheelchair-icon.js': '@empty',