feat: update keycloak theme

This commit is contained in:
Jonas Juselius
2024-02-22 09:47:34 +01:00
parent d6fde78f8d
commit f9e012da95
9813 changed files with 611335 additions and 162181 deletions
@@ -1,7 +1,7 @@
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
@@ -17,9 +17,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import { Modal, ModalVariant, Button } from "../../../common/keycloak/web_modules/@patternfly/react-core.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
import { Modal, ModalVariant, Button } from "../../keycloak.v2/web_modules/@patternfly/react-core.js";
import { Msg } from "./Msg.js";
/**
* For any of these properties that are strings, you can
* pass in a localization key instead of a static string.
@@ -34,7 +36,6 @@ import { Msg } from "./Msg.js";
export class ContinueCancelModal extends React.Component {
constructor(props) {
super(props);
_defineProperty(this, "handleModalToggle", () => {
this.setState(({
isModalOpen
@@ -43,17 +44,14 @@ export class ContinueCancelModal extends React.Component {
}));
if (this.props.onClose) this.props.onClose();
});
_defineProperty(this, "handleContinue", () => {
this.handleModalToggle();
this.props.onContinue();
});
this.state = {
isModalOpen: false
};
}
render() {
const {
isModalOpen
@@ -89,15 +87,12 @@ export class ContinueCancelModal extends React.Component {
msgKey: this.props.modalMessage
})));
}
}
_defineProperty(ContinueCancelModal, "defaultProps", {
buttonVariant: 'primary',
modalContinueButtonLabel: 'continue',
modalCancelButtonLabel: 'doCancel',
isDisabled: false
});
;
//# sourceMappingURL=ContinueCancelModal.js.map
File diff suppressed because one or more lines are too long
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import { EmptyState, EmptyStateVariant, Title, EmptyStateIcon, EmptyStateBody } from "../../../common/keycloak/web_modules/@patternfly/react-core.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
import { EmptyState, EmptyStateVariant, Title, EmptyStateIcon, EmptyStateBody } from "../../keycloak.v2/web_modules/@patternfly/react-core.js";
import { Msg } from "./Msg.js";
export default class EmptyMessageState extends React.Component {
constructor(props) {
super(props);
}
render() {
return /*#__PURE__*/React.createElement(EmptyState, {
variant: EmptyStateVariant.full
@@ -33,6 +33,5 @@ export default class EmptyMessageState extends React.Component {
msgKey: this.props.messageKey
})), /*#__PURE__*/React.createElement(EmptyStateBody, null, this.props.children));
}
}
//# sourceMappingURL=EmptyMessageState.js.map
@@ -1 +1 @@
{"version":3,"sources":["../../src/app/widgets/EmptyMessageState.tsx"],"names":["React","EmptyState","EmptyStateVariant","Title","EmptyStateIcon","EmptyStateBody","Msg","EmptyMessageState","Component","constructor","props","render","full","icon","messageKey","children"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ;AACA,SACIC,UADJ,EAEIC,iBAFJ,EAGIC,KAHJ,EAIIC,cAJJ,EAKIC,cALJ;AAQA,SAASC,GAAT;AAQA,eAAe,MAAMC,iBAAN,SAAgCP,KAAK,CAACQ,SAAtC,CAA4E;AACvFC,EAAAA,WAAW,CAACC,KAAD,EAAgC;AACvC,UAAMA,KAAN;AACH;;AAEDC,EAAAA,MAAM,GAAG;AACL,wBACI,oBAAC,UAAD;AAAY,MAAA,OAAO,EAAET,iBAAiB,CAACU;AAAvC,oBACI,oBAAC,cAAD;AAAgB,MAAA,IAAI,EAAE,KAAKF,KAAL,CAAWG;AAAjC,MADJ,eAEI,oBAAC,KAAD;AAAO,MAAA,YAAY,EAAC,IAApB;AAAyB,MAAA,IAAI,EAAC;AAA9B,oBACI,oBAAC,GAAD;AAAK,MAAA,MAAM,EAAE,KAAKH,KAAL,CAAWI;AAAxB,MADJ,CAFJ,eAKI,oBAAC,cAAD,QACK,KAAKJ,KAAL,CAAWK,QADhB,CALJ,CADJ;AAWH;;AAjBsF","sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\nimport {\n EmptyState,\n EmptyStateVariant,\n Title,\n EmptyStateIcon,\n EmptyStateBody,\n} from '@patternfly/react-core'\n\nimport { Msg } from './Msg';\nimport {SVGIconProps} from '@patternfly/react-icons/dist/esm/createIcon';\n\nexport interface EmptyMessageStateProps {\n icon: React.ComponentType<SVGIconProps>;\n messageKey: string;\n}\n\nexport default class EmptyMessageState extends React.Component<EmptyMessageStateProps, {}> {\n constructor(props: EmptyMessageStateProps) {\n super(props);\n }\n\n render() {\n return (\n <EmptyState variant={EmptyStateVariant.full}>\n <EmptyStateIcon icon={this.props.icon} />\n <Title headingLevel=\"h5\" size=\"lg\">\n <Msg msgKey={this.props.messageKey} />\n </Title>\n <EmptyStateBody>\n {this.props.children}\n </EmptyStateBody>\n </EmptyState>\n );\n }\n}\n"],"file":"EmptyMessageState.js"}
{"version":3,"file":"EmptyMessageState.js","names":["React","EmptyState","EmptyStateVariant","Title","EmptyStateIcon","EmptyStateBody","Msg","EmptyMessageState","Component","constructor","props","render","createElement","variant","full","icon","headingLevel","size","msgKey","messageKey","children"],"sources":["../../src/app/widgets/EmptyMessageState.tsx"],"sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\nimport {\n EmptyState,\n EmptyStateVariant,\n Title,\n EmptyStateIcon,\n EmptyStateBody,\n} from '@patternfly/react-core'\n\nimport { Msg } from './Msg';\nimport {SVGIconProps} from '@patternfly/react-icons/dist/esm/createIcon';\n\nexport interface EmptyMessageStateProps {\n icon: React.ComponentType<SVGIconProps>;\n messageKey: string;\n}\n\nexport default class EmptyMessageState extends React.Component<EmptyMessageStateProps, {}> {\n constructor(props: EmptyMessageStateProps) {\n super(props);\n }\n\n render() {\n return (\n <EmptyState variant={EmptyStateVariant.full}>\n <EmptyStateIcon icon={this.props.icon} />\n <Title headingLevel=\"h5\" size=\"lg\">\n <Msg msgKey={this.props.messageKey} />\n </Title>\n <EmptyStateBody>\n {this.props.children}\n </EmptyStateBody>\n </EmptyState>\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK;AACjB,SACIC,UAAU,EACVC,iBAAiB,EACjBC,KAAK,EACLC,cAAc,EACdC,cAAc;AAGlB,SAASC,GAAG;AAQZ,eAAe,MAAMC,iBAAiB,SAASP,KAAK,CAACQ,SAAS,CAA6B;EACvFC,WAAWA,CAACC,KAA6B,EAAE;IACvC,KAAK,CAACA,KAAK,CAAC;EAChB;EAEAC,MAAMA,CAAA,EAAG;IACL,oBACIX,KAAA,CAAAY,aAAA,CAACX,UAAU;MAACY,OAAO,EAAEX,iBAAiB,CAACY;IAAK,gBACxCd,KAAA,CAAAY,aAAA,CAACR,cAAc;MAACW,IAAI,EAAE,IAAI,CAACL,KAAK,CAACK;IAAK,CAAE,CAAC,eACzCf,KAAA,CAAAY,aAAA,CAACT,KAAK;MAACa,YAAY,EAAC,IAAI;MAACC,IAAI,EAAC;IAAI,gBAC9BjB,KAAA,CAAAY,aAAA,CAACN,GAAG;MAACY,MAAM,EAAE,IAAI,CAACR,KAAK,CAACS;IAAW,CAAE,CAClC,CAAC,eACRnB,KAAA,CAAAY,aAAA,CAACP,cAAc,QACV,IAAI,CAACK,KAAK,CAACU,QACA,CACR,CAAC;EAErB;AACJ"}
@@ -13,15 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import { FormSelect, FormSelectOption } from "../../../common/keycloak/web_modules/@patternfly/react-core.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
import { FormSelect, FormSelectOption } from "../../keycloak.v2/web_modules/@patternfly/react-core.js";
import { Msg } from "./Msg.js";
;
export class LocaleSelector extends React.Component {
constructor(props) {
super(props);
}
render() {
return /*#__PURE__*/React.createElement(FormSelect, {
id: "locale-select",
@@ -36,6 +35,5 @@ export class LocaleSelector extends React.Component {
label: locale.label
})));
}
}
//# sourceMappingURL=LocaleSelectors.js.map
@@ -1 +1 @@
{"version":3,"sources":["../../src/app/widgets/LocaleSelectors.tsx"],"names":["React","FormSelect","FormSelectOption","Msg","LocaleSelector","Component","constructor","props","render","value","event","onChange","localize","availableLocales","map","locale","index","label"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAZ;AAEA,SACIC,UADJ,EAEIC,gBAFJ;AAKA,SAASC,GAAT;AAKC;AAKD,OAAO,MAAMC,cAAN,SAA6BJ,KAAK,CAACK,SAAnC,CAAuF;AAE1FC,EAAAA,WAAW,CAACC,KAAD,EAA6B;AACpC,UAAMA,KAAN;AACH;;AAEDC,EAAAA,MAAM,GAAoB;AACtB,wBACI,oBAAC,UAAD;AACI,MAAA,EAAE,EAAC,eADP;AAEI,MAAA,KAAK,EAAE,KAAKD,KAAL,CAAWE,KAFtB;AAGI,MAAA,QAAQ,EAAE,CAACA,KAAD,EAAQC,KAAR,KAAkB;AAAE,YAAI,KAAKH,KAAL,CAAWI,QAAf,EAAyB,KAAKJ,KAAL,CAAWI,QAAX,CAAoBF,KAApB,EAA2BC,KAA3B;AAAmC,OAH9F;AAII,oBAAYP,GAAG,CAACS,QAAJ,CAAa,cAAb;AAJhB,OAMKC,gBAAgB,CAACC,GAAjB,CAAqB,CAACC,MAAD,EAASC,KAAT,kBAClB,oBAAC,gBAAD;AACI,MAAA,GAAG,EAAEA,KADT;AAEI,MAAA,KAAK,EAAED,MAAM,CAACA,MAFlB;AAGI,MAAA,KAAK,EAAEA,MAAM,CAACE;AAHlB,MADH,CANL,CADJ;AAgBH;;AAvByF","sourcesContent":["/*\n * Copyright 2019 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as React from 'react';\n\nimport {\n FormSelect,\n FormSelectOption,\n FormSelectProps\n} from '@patternfly/react-core';\nimport { Msg } from './Msg';\n\ninterface AvailableLocale {\n locale: string;\n label: string;\n};\ndeclare const availableLocales: [AvailableLocale];\n\ninterface LocaleSelectorProps extends Omit<FormSelectProps, 'children'> { }\ninterface LocaleSelectorState { }\nexport class LocaleSelector extends React.Component<LocaleSelectorProps, LocaleSelectorState> {\n\n constructor(props: LocaleSelectorProps) {\n super(props);\n }\n\n render(): React.ReactNode {\n return (\n <FormSelect\n id=\"locale-select\"\n value={this.props.value}\n onChange={(value, event) => { if (this.props.onChange) this.props.onChange(value, event) }}\n aria-label={Msg.localize('selectLocale')}\n >\n {availableLocales.map((locale, index) =>\n <FormSelectOption\n key={index}\n value={locale.locale}\n label={locale.label}\n />)\n }\n </FormSelect>\n );\n }\n}"],"file":"LocaleSelectors.js"}
{"version":3,"file":"LocaleSelectors.js","names":["React","FormSelect","FormSelectOption","Msg","LocaleSelector","Component","constructor","props","render","createElement","id","value","onChange","event","localize","availableLocales","map","locale","index","key","label"],"sources":["../../src/app/widgets/LocaleSelectors.tsx"],"sourcesContent":["/*\n * Copyright 2019 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as React from 'react';\n\nimport {\n FormSelect,\n FormSelectOption,\n FormSelectProps\n} from '@patternfly/react-core';\nimport { Msg } from './Msg';\n\ninterface AvailableLocale {\n locale: string;\n label: string;\n};\ndeclare const availableLocales: [AvailableLocale];\n\ninterface LocaleSelectorProps extends Omit<FormSelectProps, 'children'> { }\ninterface LocaleSelectorState { }\nexport class LocaleSelector extends React.Component<LocaleSelectorProps, LocaleSelectorState> {\n\n constructor(props: LocaleSelectorProps) {\n super(props);\n }\n\n render(): React.ReactNode {\n return (\n <FormSelect\n id=\"locale-select\"\n value={this.props.value}\n onChange={(value, event) => { if (this.props.onChange) this.props.onChange(value, event) }}\n aria-label={Msg.localize('selectLocale')}\n >\n {availableLocales.map((locale, index) =>\n <FormSelectOption\n key={index}\n value={locale.locale}\n label={locale.label}\n />)\n }\n </FormSelect>\n );\n }\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAK;AAEjB,SACIC,UAAU,EACVC,gBAAgB;AAGpB,SAASC,GAAG;AAKX;AAKD,OAAO,MAAMC,cAAc,SAASJ,KAAK,CAACK,SAAS,CAA2C;EAE1FC,WAAWA,CAACC,KAA0B,EAAE;IACpC,KAAK,CAACA,KAAK,CAAC;EAChB;EAEAC,MAAMA,CAAA,EAAoB;IACtB,oBACIR,KAAA,CAAAS,aAAA,CAACR,UAAU;MACPS,EAAE,EAAC,eAAe;MAClBC,KAAK,EAAE,IAAI,CAACJ,KAAK,CAACI,KAAM;MACxBC,QAAQ,EAAEA,CAACD,KAAK,EAAEE,KAAK,KAAK;QAAE,IAAI,IAAI,CAACN,KAAK,CAACK,QAAQ,EAAE,IAAI,CAACL,KAAK,CAACK,QAAQ,CAACD,KAAK,EAAEE,KAAK,CAAC;MAAC,CAAE;MAC3F,cAAYV,GAAG,CAACW,QAAQ,CAAC,cAAc;IAAE,GAExCC,gBAAgB,CAACC,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,kBAChClB,KAAA,CAAAS,aAAA,CAACP,gBAAgB;MACbiB,GAAG,EAAED,KAAM;MACXP,KAAK,EAAEM,MAAM,CAACA,MAAO;MACrBG,KAAK,EAAEH,MAAM,CAACG;IAAM,CACvB,CAAC,CAEE,CAAC;EAErB;AACJ"}
@@ -13,15 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
import { Msg } from "./Msg.js";
import { KeycloakContext } from "../keycloak-service/KeycloakContext.js";
import { Button, DropdownItem } from "../../../common/keycloak/web_modules/@patternfly/react-core.js";
import { Button, DropdownItem } from "../../keycloak.v2/web_modules/@patternfly/react-core.js";
function handleLogout(keycloak) {
keycloak.logout();
}
export class LogoutButton extends React.Component {
render() {
return /*#__PURE__*/React.createElement(KeycloakContext.Consumer, null, keycloak => /*#__PURE__*/React.createElement(Button, {
@@ -31,7 +30,6 @@ export class LogoutButton extends React.Component {
msgKey: "doSignOut"
})));
}
}
export class LogoutDropdownItem extends React.Component {
render() {
@@ -41,6 +39,5 @@ export class LogoutDropdownItem extends React.Component {
onClick: () => handleLogout(keycloak)
}, Msg.localize('doSignOut')));
}
}
//# sourceMappingURL=Logout.js.map
@@ -1 +1 @@
{"version":3,"sources":["../../src/app/widgets/Logout.tsx"],"names":["React","Msg","KeycloakContext","Button","DropdownItem","handleLogout","keycloak","logout","LogoutButton","Component","render","LogoutDropdownItem","localize"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ;AAEA,SAAQC,GAAR;AAEA,SAASC,eAAT;AAEA,SAAQC,MAAR,EAAgBC,YAAhB;;AAEA,SAASC,YAAT,CAAsBC,QAAtB,EAAuD;AACnDA,EAAAA,QAAQ,CAACC,MAAT;AACH;;AAGD,OAAO,MAAMC,YAAN,SAA2BR,KAAK,CAACS,SAAjC,CAAwD;AACpDC,EAAAA,MAAM,GAAoB;AAC7B,wBACI,oBAAC,eAAD,CAAiB,QAAjB,QACEJ,QAAQ,iBACN,oBAAC,MAAD;AAAQ,MAAA,EAAE,EAAC,eAAX;AAA2B,MAAA,OAAO,EAAE,MAAMD,YAAY,CAACC,QAAD;AAAtD,oBAAmE,oBAAC,GAAD;AAAK,MAAA,MAAM,EAAC;AAAZ,MAAnE,CAFJ,CADJ;AAQH;;AAV0D;AAc/D,OAAO,MAAMK,kBAAN,SAAiCX,KAAK,CAACS,SAAvC,CAA0E;AACtEC,EAAAA,MAAM,GAAoB;AAC7B,wBACI,oBAAC,eAAD,CAAiB,QAAjB,QACMJ,QAAQ,iBACV,oBAAC,YAAD;AAAc,MAAA,EAAE,EAAC,aAAjB;AAA+B,MAAA,GAAG,EAAC,QAAnC;AAA4C,MAAA,OAAO,EAAE,MAAMD,YAAY,CAACC,QAAD;AAAvE,OACKL,GAAG,CAACW,QAAJ,CAAa,WAAb,CADL,CAFJ,CADJ;AASH;;AAX4E","sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {Msg} from './Msg';\nimport {KeycloakService} from '../keycloak-service/keycloak.service';\nimport { KeycloakContext } from '../keycloak-service/KeycloakContext';\n\nimport {Button, DropdownItem} from '@patternfly/react-core';\n\nfunction handleLogout(keycloak: KeycloakService): void {\n keycloak.logout();\n}\n\ninterface LogoutProps {}\nexport class LogoutButton extends React.Component<LogoutProps> {\n public render(): React.ReactNode {\n return (\n <KeycloakContext.Consumer>\n { keycloak => (\n <Button id=\"signOutButton\" onClick={() => handleLogout(keycloak!)}><Msg msgKey=\"doSignOut\"/></Button>\n )}\n </KeycloakContext.Consumer>\n\n );\n }\n}\n\ninterface LogoutDropdownItemProps {}\nexport class LogoutDropdownItem extends React.Component<LogoutDropdownItemProps> {\n public render(): React.ReactNode {\n return (\n <KeycloakContext.Consumer>\n { keycloak => (\n <DropdownItem id=\"signOutLink\" key=\"logout\" onClick={() => handleLogout(keycloak!)}>\n {Msg.localize('doSignOut')}\n </DropdownItem>\n )}\n </KeycloakContext.Consumer>\n );\n }\n}"],"file":"Logout.js"}
{"version":3,"file":"Logout.js","names":["React","Msg","KeycloakContext","Button","DropdownItem","handleLogout","keycloak","logout","LogoutButton","Component","render","createElement","Consumer","id","onClick","msgKey","LogoutDropdownItem","key","localize"],"sources":["../../src/app/widgets/Logout.tsx"],"sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {Msg} from './Msg';\nimport {KeycloakService} from '../keycloak-service/keycloak.service';\nimport { KeycloakContext } from '../keycloak-service/KeycloakContext';\n\nimport {Button, DropdownItem} from '@patternfly/react-core';\n\nfunction handleLogout(keycloak: KeycloakService): void {\n keycloak.logout();\n}\n\ninterface LogoutProps {}\nexport class LogoutButton extends React.Component<LogoutProps> {\n public render(): React.ReactNode {\n return (\n <KeycloakContext.Consumer>\n { keycloak => (\n <Button id=\"signOutButton\" onClick={() => handleLogout(keycloak!)}><Msg msgKey=\"doSignOut\"/></Button>\n )}\n </KeycloakContext.Consumer>\n\n );\n }\n}\n\ninterface LogoutDropdownItemProps {}\nexport class LogoutDropdownItem extends React.Component<LogoutDropdownItemProps> {\n public render(): React.ReactNode {\n return (\n <KeycloakContext.Consumer>\n { keycloak => (\n <DropdownItem id=\"signOutLink\" key=\"logout\" onClick={() => handleLogout(keycloak!)}>\n {Msg.localize('doSignOut')}\n </DropdownItem>\n )}\n </KeycloakContext.Consumer>\n );\n }\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK;AAEjB,SAAQC,GAAG;AAEX,SAASC,eAAe;AAExB,SAAQC,MAAM,EAAEC,YAAY;AAE5B,SAASC,YAAYA,CAACC,QAAyB,EAAQ;EACnDA,QAAQ,CAACC,MAAM,CAAC,CAAC;AACrB;AAGA,OAAO,MAAMC,YAAY,SAASR,KAAK,CAACS,SAAS,CAAc;EACpDC,MAAMA,CAAA,EAAoB;IAC7B,oBACIV,KAAA,CAAAW,aAAA,CAACT,eAAe,CAACU,QAAQ,QACvBN,QAAQ,iBACNN,KAAA,CAAAW,aAAA,CAACR,MAAM;MAACU,EAAE,EAAC,eAAe;MAACC,OAAO,EAAEA,CAAA,KAAMT,YAAY,CAACC,QAAS;IAAE,gBAACN,KAAA,CAAAW,aAAA,CAACV,GAAG;MAACc,MAAM,EAAC;IAAW,CAAC,CAAS,CAE9E,CAAC;EAGnC;AACJ;AAGA,OAAO,MAAMC,kBAAkB,SAAShB,KAAK,CAACS,SAAS,CAA0B;EACtEC,MAAMA,CAAA,EAAoB;IAC7B,oBACIV,KAAA,CAAAW,aAAA,CAACT,eAAe,CAACU,QAAQ,QACnBN,QAAQ,iBACVN,KAAA,CAAAW,aAAA,CAACP,YAAY;MAACS,EAAE,EAAC,aAAa;MAACI,GAAG,EAAC,QAAQ;MAACH,OAAO,EAAEA,CAAA,KAAMT,YAAY,CAACC,QAAS;IAAE,GAC9EL,GAAG,CAACiB,QAAQ,CAAC,WAAW,CACf,CAEQ,CAAC;EAEnC;AACJ"}
@@ -13,57 +13,53 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
export class Msg extends React.Component {
constructor(props) {
super(props);
}
render() {
if (this.props.children) {
return Msg.localizeWithChildren(this.props.msgKey, this.props.children);
}
return /*#__PURE__*/React.createElement(React.Fragment, null, Msg.localize(this.props.msgKey, this.props.params));
}
static localizeWithChildren(msgKey, children) {
const message = l18nMsg[this.processKey(msgKey)];
const parts = message.split(/\{\{param_\d*}}/);
const count = React.Children.count(children);
return React.Children.map(children, (child, i) => [parts[i], child, count === i + 1 ? parts[count] : '']);
}
static localize(msgKey, params) {
let message = l18nMsg[this.processKey(msgKey)];
if (message === undefined) message = msgKey;
if (params !== undefined && params.length > 0) {
params.forEach((value, index) => {
value = this.processParam(value);
message = message.replace('{{param_' + index + '}}', value);
});
}
return message;
} // if the message key has Freemarker syntax, remove it
}
// if the message key has Freemarker syntax, remove it
static processKey(msgKey) {
if (!(msgKey.startsWith('${') && msgKey.endsWith('}'))) return msgKey; // remove Freemarker syntax
if (!(msgKey.startsWith('${') && msgKey.endsWith('}'))) return msgKey;
// remove Freemarker syntax
return msgKey.substring(2, msgKey.length - 1);
} // if the param has Freemarker syntax, try to look up its value
}
// if the param has Freemarker syntax, try to look up its value
static processParam(param) {
if (!(param.startsWith('${') && param.endsWith('}'))) return param; // remove Freemarker syntax
if (!(param.startsWith('${') && param.endsWith('}'))) return param;
// remove Freemarker syntax
const key = param.substring(2, param.length - 1);
let value = l18nMsg[key];
if (value === undefined) return param;
return value;
}
}
//# sourceMappingURL=Msg.js.map
File diff suppressed because one or more lines are too long
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import { Msg } from "./Msg.js";
import { DropdownItem } from "../../../common/keycloak/web_modules/@patternfly/react-core.js";
import { ArrowIcon } from "../../../common/keycloak/web_modules/@patternfly/react-icons.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
import { Msg } from "./Msg.js";
import { DropdownItem } from "../../keycloak.v2/web_modules/@patternfly/react-core.js";
import { ArrowIcon } from "../../keycloak.v2/web_modules/@patternfly/react-icons.js";
/**
* @author Stan Silvert ssilvert@redhat.com (C) 2018 Red Hat Inc.
*/
@@ -25,14 +25,12 @@ export class ReferrerDropdownItem extends React.Component {
constructor(props) {
super(props);
}
render() {
return /*#__PURE__*/React.createElement(DropdownItem, {
id: "referrerMobileLink",
href: referrerUri
}, /*#__PURE__*/React.createElement(ArrowIcon, null), " ", Msg.localize('backTo', [referrerName]));
}
}
;
//# sourceMappingURL=ReferrerDropdownItem.js.map
@@ -1 +1 @@
{"version":3,"sources":["../../src/app/widgets/ReferrerDropdownItem.tsx"],"names":["React","Msg","DropdownItem","ArrowIcon","ReferrerDropdownItem","Component","constructor","props","render","referrerUri","localize","referrerName"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ;AAEA,SAAQC,GAAR;AAEA,SAAQC,YAAR;AACA,SAAQC,SAAR;;AAQA;AACA;AACA;AACA,OAAO,MAAMC,oBAAN,SAAmCJ,KAAK,CAACK,SAAzC,CAA8E;AAE1EC,EAAAA,WAAW,CAACC,KAAD,EAAmC;AACjD,UAAMA,KAAN;AACH;;AAEMC,EAAAA,MAAM,GAAoB;AAE7B,wBACI,oBAAC,YAAD;AAAc,MAAA,EAAE,EAAC,oBAAjB;AAAsC,MAAA,IAAI,EAAEC;AAA5C,oBACI,oBAAC,SAAD,OADJ,OACmBR,GAAG,CAACS,QAAJ,CAAa,QAAb,EAAuB,CAACC,YAAD,CAAvB,CADnB,CADJ;AAKH;;AAbgF;AAcpF","sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {Msg} from '../widgets/Msg';\n\nimport {DropdownItem} from '@patternfly/react-core';\nimport {ArrowIcon} from '@patternfly/react-icons';\n\ndeclare const referrerName: string;\ndeclare const referrerUri: string;\n\nexport interface ReferrerDropdownItemProps {\n}\n\n/**\n * @author Stan Silvert ssilvert@redhat.com (C) 2018 Red Hat Inc.\n */\nexport class ReferrerDropdownItem extends React.Component<ReferrerDropdownItemProps> {\n\n public constructor(props: ReferrerDropdownItemProps) {\n super(props);\n }\n\n public render(): React.ReactNode {\n\n return (\n <DropdownItem id=\"referrerMobileLink\" href={referrerUri}>\n <ArrowIcon /> {Msg.localize('backTo', [referrerName])}\n </DropdownItem>\n );\n }\n};"],"file":"ReferrerDropdownItem.js"}
{"version":3,"file":"ReferrerDropdownItem.js","names":["React","Msg","DropdownItem","ArrowIcon","ReferrerDropdownItem","Component","constructor","props","render","createElement","id","href","referrerUri","localize","referrerName"],"sources":["../../src/app/widgets/ReferrerDropdownItem.tsx"],"sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {Msg} from '../widgets/Msg';\n\nimport {DropdownItem} from '@patternfly/react-core';\nimport {ArrowIcon} from '@patternfly/react-icons';\n\ndeclare const referrerName: string;\ndeclare const referrerUri: string;\n\nexport interface ReferrerDropdownItemProps {\n}\n\n/**\n * @author Stan Silvert ssilvert@redhat.com (C) 2018 Red Hat Inc.\n */\nexport class ReferrerDropdownItem extends React.Component<ReferrerDropdownItemProps> {\n\n public constructor(props: ReferrerDropdownItemProps) {\n super(props);\n }\n\n public render(): React.ReactNode {\n\n return (\n <DropdownItem id=\"referrerMobileLink\" href={referrerUri}>\n <ArrowIcon /> {Msg.localize('backTo', [referrerName])}\n </DropdownItem>\n );\n }\n};"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK;AAEjB,SAAQC,GAAG;AAEX,SAAQC,YAAY;AACpB,SAAQC,SAAS;AAQjB;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,SAASJ,KAAK,CAACK,SAAS,CAA4B;EAE1EC,WAAWA,CAACC,KAAgC,EAAE;IACjD,KAAK,CAACA,KAAK,CAAC;EAChB;EAEOC,MAAMA,CAAA,EAAoB;IAE7B,oBACIR,KAAA,CAAAS,aAAA,CAACP,YAAY;MAACQ,EAAE,EAAC,oBAAoB;MAACC,IAAI,EAAEC;IAAY,gBACpDZ,KAAA,CAAAS,aAAA,CAACN,SAAS,MAAE,CAAC,KAAC,EAACF,GAAG,CAACY,QAAQ,CAAC,QAAQ,EAAE,CAACC,YAAY,CAAC,CAC1C,CAAC;EAEvB;AACJ;AAAC"}
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "../../../common/keycloak/web_modules/react.js";
import { Msg } from "./Msg.js";
import { ArrowIcon } from "../../../common/keycloak/web_modules/@patternfly/react-icons.js";
import * as React from "../../keycloak.v2/web_modules/react.js";
import { Msg } from "./Msg.js";
import { ArrowIcon } from "../../keycloak.v2/web_modules/@patternfly/react-icons.js";
/**
* @author Stan Silvert ssilvert@redhat.com (C) 2018 Red Hat Inc.
*/
@@ -24,7 +24,6 @@ export class ReferrerLink extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
/*#__PURE__*/
@@ -40,7 +39,6 @@ export class ReferrerLink extends React.Component {
}))
);
}
}
;
//# sourceMappingURL=ReferrerLink.js.map
@@ -1 +1 @@
{"version":3,"sources":["../../src/app/widgets/ReferrerLink.tsx"],"names":["React","Msg","ArrowIcon","ReferrerLink","Component","constructor","props","render","referrerUri","replace","referrerName"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ;AAEA,SAAQC,GAAR;AAEA,SAAQC,SAAR;;AAQA;AACA;AACA;AACA,OAAO,MAAMC,YAAN,SAA2BH,KAAK,CAACI,SAAjC,CAA8D;AAE1DC,EAAAA,WAAW,CAACC,KAAD,EAA2B;AACzC,UAAMA,KAAN;AACH;;AAEMC,EAAAA,MAAM,GAAoB;AAC7B;AAAA;AACI;AACA;AACA;AACA;AAAG,QAAA,EAAE,EAAC,cAAN;AAAqB,QAAA,IAAI,EAAEC,WAAW,CAACC,OAAZ,CAAoB,QAApB,EAA8B,GAA9B;AAA3B,sBACG,oBAAC,SAAD,OADH,oBACgB,oBAAC,GAAD;AAAK,QAAA,MAAM,EAAC,QAAZ;AAAqB,QAAA,MAAM,EAAE,CAACC,YAAD;AAA7B,QADhB;AAJJ;AAQH;;AAfgE;AAgBpE","sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {Msg} from './Msg';\n\nimport {ArrowIcon} from '@patternfly/react-icons';\n \ndeclare const referrerName: string;\ndeclare const referrerUri: string;\n\nexport interface ReferrerLinkProps {\n}\n\n/**\n * @author Stan Silvert ssilvert@redhat.com (C) 2018 Red Hat Inc.\n */\nexport class ReferrerLink extends React.Component<ReferrerLinkProps> {\n\n public constructor(props: ReferrerLinkProps) {\n super(props);\n }\n\n public render(): React.ReactNode {\n return (\n // '_hash_' is a workaround for when uri encoding is not\n // sufficient to escape the # character properly.\n // See AppInitiatedActionPage for more details.\n <a id=\"referrerLink\" href={referrerUri.replace('_hash_', '#')}>\n <ArrowIcon/> <Msg msgKey=\"backTo\" params={[referrerName]}/>\n </a>\n );\n }\n};"],"file":"ReferrerLink.js"}
{"version":3,"file":"ReferrerLink.js","names":["React","Msg","ArrowIcon","ReferrerLink","Component","constructor","props","render","createElement","id","href","referrerUri","replace","msgKey","params","referrerName"],"sources":["../../src/app/widgets/ReferrerLink.tsx"],"sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {Msg} from './Msg';\n\nimport {ArrowIcon} from '@patternfly/react-icons';\n \ndeclare const referrerName: string;\ndeclare const referrerUri: string;\n\nexport interface ReferrerLinkProps {\n}\n\n/**\n * @author Stan Silvert ssilvert@redhat.com (C) 2018 Red Hat Inc.\n */\nexport class ReferrerLink extends React.Component<ReferrerLinkProps> {\n\n public constructor(props: ReferrerLinkProps) {\n super(props);\n }\n\n public render(): React.ReactNode {\n return (\n // '_hash_' is a workaround for when uri encoding is not\n // sufficient to escape the # character properly.\n // See AppInitiatedActionPage for more details.\n <a id=\"referrerLink\" href={referrerUri.replace('_hash_', '#')}>\n <ArrowIcon/> <Msg msgKey=\"backTo\" params={[referrerName]}/>\n </a>\n );\n }\n};"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK;AAEjB,SAAQC,GAAG;AAEX,SAAQC,SAAS;AAQjB;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASH,KAAK,CAACI,SAAS,CAAoB;EAE1DC,WAAWA,CAACC,KAAwB,EAAE;IACzC,KAAK,CAACA,KAAK,CAAC;EAChB;EAEOC,MAAMA,CAAA,EAAoB;IAC7B;MAAA;MACI;MACA;MACA;MACAP,KAAA,CAAAQ,aAAA;QAAGC,EAAE,EAAC,cAAc;QAACC,IAAI,EAAEC,WAAW,CAACC,OAAO,CAAC,QAAQ,EAAE,GAAG;MAAE,gBAC3DZ,KAAA,CAAAQ,aAAA,CAACN,SAAS,MAAC,CAAC,KAAC,eAAAF,KAAA,CAAAQ,aAAA,CAACP,GAAG;QAACY,MAAM,EAAC,QAAQ;QAACC,MAAM,EAAE,CAACC,YAAY;MAAE,CAAC,CAC1D;IAAC;EAEZ;AACJ;AAAC"}
@@ -1 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"features.js"}
{"version":3,"file":"features.js","names":[],"sources":["../../src/app/widgets/features.ts"],"sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n \n export interface Features {\n isRegistrationEmailAsUsername: boolean;\n isEditUserNameAllowed: boolean;\n isInternationalizationEnabled: boolean;\n isLinkedAccountsEnabled: boolean;\n isEventsEnabled: boolean;\n isMyResourcesEnabled: boolean;\n isTotpConfigured: boolean;\n deleteAccountAllowed: boolean;\n updateEmailFeatureEnabled: boolean;\n updateEmailActionEnabled: boolean;\n isViewGroupsEnabled: boolean;\n }\n\n\n"],"mappings":""}