summit-registration-lite 5.0.20-alpha.3 → 5.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- .passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv.logoDark___VVYee{display:none}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{height:56px;width:56px;font-size:42px;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);border-radius:5px;padding:5px;display:inline-flex;text-transform:uppercase;text-align:center;margin:0 5px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .error___wZflZ{margin-top:10px;color:#e5424d;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl{margin-top:20px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .button___nBhtQ{padding:10px 30px;font-weight:normal;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}.passwordlessWrapper___BRQ_s .resend___Nma1U{margin:auto 0 0 0;font-weight:normal;font-size:14px}.passwordlessWrapper___BRQ_s .resend___Nma1U span{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}html[data-theme="DARK"] .logoLight___vSbn_{display:none}html[data-theme="DARK"] .logoDark___VVYee{display:block !important}html[data-theme="LIGHT"] .logoDark___VVYee{display:none}html[data-theme="LIGHT"] .logoLight___vSbn_{display:block !important}
1
+ .passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{background-color:#fff6d7;font-size:16px;color:#767676;text-align:center;width:200px;position:absolute;top:10px;left:calc(50% + 100);height:50px;line-height:50px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv.logoDark___VVYee{display:none}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{height:56px;width:56px;font-size:42px;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);border-radius:5px;padding:5px;display:inline-flex;text-transform:uppercase;text-align:center;margin:0 5px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .error___wZflZ{margin-top:10px;color:#e5424d;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl{margin-top:20px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .button___nBhtQ{padding:10px 30px;font-weight:normal;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}.passwordlessWrapper___BRQ_s .resend___Nma1U{margin:auto 0 0 0;font-weight:normal;font-size:14px}.passwordlessWrapper___BRQ_s .resend___Nma1U span{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}html[data-theme="DARK"] .logoLight___vSbn_{display:none}html[data-theme="DARK"] .logoDark___VVYee{display:block !important}html[data-theme="LIGHT"] .logoDark___VVYee{display:none}html[data-theme="LIGHT"] .logoLight___vSbn_{display:block !important}
2
2
 
@@ -132,7 +132,7 @@ const external_react_otp_input_namespaceObject = require("react-otp-input");
132
132
  var external_react_otp_input_default = /*#__PURE__*/__webpack_require__.n(external_react_otp_input_namespaceObject);
133
133
  ;// CONCATENATED MODULE: ./src/components/login-passwordless/index.module.scss
134
134
  // extracted by mini-css-extract-plugin
135
- /* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","logoDark":"logoDark___VVYee","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U","logoLight":"logoLight___vSbn_"});
135
+ /* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","codeSent":"codeSent___NzYb_","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","logoDark":"logoDark___VVYee","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U","logoLight":"logoLight___vSbn_"});
136
136
  // EXTERNAL MODULE: ./src/assets/FNid_WHT_logo_rgb.svg
137
137
  var FNid_WHT_logo_rgb = __webpack_require__(802);
138
138
  var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo_rgb);
@@ -173,6 +173,7 @@ const PasswordlessLoginComponent = ({
173
173
  }) => {
174
174
  const [otpCode, setOtpCode] = (0,external_react_.useState)('');
175
175
  const [otpError, setOtpError] = (0,external_react_.useState)(false);
176
+ const [codeSent, setCodeSent] = (0,external_react_.useState)(false);
176
177
 
177
178
  const tryPasswordlessLogin = code => {
178
179
  if (code.length === codeLength) {
@@ -184,7 +185,10 @@ const PasswordlessLoginComponent = ({
184
185
  };
185
186
 
186
187
  const resendCode = () => {
187
- getLoginCode(email, getPasswordlessCode);
188
+ getLoginCode(email, getPasswordlessCode).then(() => {
189
+ setCodeSent(true);
190
+ setTimeout(() => setCodeSent(false), 3000);
191
+ });
188
192
  };
189
193
 
190
194
  const handleSubmit = e => {
@@ -194,7 +198,9 @@ const PasswordlessLoginComponent = ({
194
198
 
195
199
  return /*#__PURE__*/external_react_default().createElement("div", {
196
200
  className: `${index_module.passwordlessWrapper} step-wrapper`
197
- }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
201
+ }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, codeSent && /*#__PURE__*/external_react_default().createElement("div", {
202
+ className: index_module.codeSent
203
+ }, "Code has been resent."), /*#__PURE__*/external_react_default().createElement("div", {
198
204
  className: `${index_module.innerWrapper}`
199
205
  }, /*#__PURE__*/external_react_default().createElement("img", {
200
206
  src: logoDark || (FNid_BLK_logo_rgb_default()),
@@ -204,7 +210,7 @@ const PasswordlessLoginComponent = ({
204
210
  src: logoLight || (FNid_WHT_logo_rgb_default()),
205
211
  alt: "FNid",
206
212
  className: `${index_module.logo} ${index_module.logoLight}`
207
- }), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use login code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
213
+ }), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
208
214
  "data-testid": "email"
209
215
  }, email), /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
210
216
  className: index_module.digits,
@@ -247,7 +253,7 @@ const PasswordlessLoginComponent = ({
247
253
  className: index_module.link,
248
254
  onClick: () => resendCode(),
249
255
  "data-testid": "resend"
250
- }, "resend email"), " now.")));
256
+ }, "resend code"), " now.")));
251
257
  };
252
258
 
253
259
  PasswordlessLoginComponent.propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"components/login-passwordless.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA,kVAAkV,4EAA4E,0BAA0B;;;;;;;ACAxb,kVAAkV,4EAA4E;;;;;;;;ACA9Z;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;ACNA,MAAM,wCAA4B;;;ACAlC;AACA,mDAAe,CAAC,oWAAoW;;;;;;;;ACDpX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;;AAEA,MAAMO,0BAA0B,GAAG,CAAC;AAC5BC,EAAAA,KAD4B;AACrBC,EAAAA,UADqB;AACTC,EAAAA,iBADS;AACUC,EAAAA,aADV;AACyBC,EAAAA,SADzB;AACoCC,EAAAA,SADpC;AAE5BC,EAAAA,YAF4B;AAEdC,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EAAAA,aAAa,EAAET,oCAJoB;AAKnCU,EAAAA,SAAS,EAAEV,oCALwB;AAMnCW,EAAAA,SAAS,EAAEX,+CANwB;AAOnCY,EAAAA,YAAY,EAAEZ,+CAPqB;AAQnCa,EAAAA,mBAAmB,EAAEb,oCAAc2C;AARA,CAAvC;AAWA,yDAAetC,0BAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/./src/assets/FNid_BLK_logo_rgb.svg","webpack://summit-registration-lite/./src/assets/FNid_WHT_logo_rgb.svg","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"react-otp-input\"","webpack://summit-registration-lite/./src/components/login-passwordless/index.module.scss","webpack://summit-registration-lite/./src/components/login-passwordless/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%23FFFFFF;%7d .st1%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath class='st0' d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7 l-25.6-80.85l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49 l25.72,81.24l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st1' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st1' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st1' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7l-25.6-80.85 l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49l25.72,81.24 l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st0' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st0' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st0' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-otp-input\");","// extracted by mini-css-extract-plugin\nexport default {\"passwordlessWrapper\":\"passwordlessWrapper___BRQ_s\",\"innerWrapper\":\"innerWrapper___nRLDi\",\"logo\":\"logo___qNVrv\",\"logoDark\":\"logoDark___VVYee\",\"digits\":\"digits___Vu5iy\",\"codeInput\":\"codeInput___LnTZe\",\"error\":\"error___wZflZ\",\"verify\":\"verify___IBgMl\",\"button\":\"button___nBhtQ\",\"link\":\"link___f6fDT\",\"resend\":\"resend___Nma1U\",\"logoLight\":\"logoLight___vSbn_\"};","/**\n * Copyright 2020 OpenStack Foundation\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 * http://www.apache.org/licenses/LICENSE-2.0\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 React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport OtpInput from 'react-otp-input';\n\nimport styles from \"./index.module.scss\";\n\nimport FNidLogo from '../../assets/FNid_WHT_logo_rgb.svg';\nimport FNidLogoDark from '../../assets/FNid_BLK_logo_rgb.svg';\n\nconst PasswordlessLoginComponent = ({ \n email, codeLength, passwordlessLogin, loginWithCode, codeError, goToLogin, \n getLoginCode, getPasswordlessCode, logoLight, logoDark }) => {\n\n const [otpCode, setOtpCode] = useState('');\n const [otpError, setOtpError] = useState(false)\n\n const tryPasswordlessLogin = (code) => {\n if (code.length === codeLength) {\n setOtpError(false)\n passwordlessLogin(otpCode, loginWithCode)\n } else {\n setOtpError(true)\n }\n }\n\n const resendCode = () => {\n getLoginCode(email, getPasswordlessCode);\n }\n\n const handleSubmit = (e) => {\n e.preventDefault();\n tryPasswordlessLogin(otpCode);\n };\n\n return (\n <div className={`${styles.passwordlessWrapper} step-wrapper`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n {/* Only one logo is displayed based on data-theme through CSS */}\n <img src={logoDark || FNidLogoDark} alt=\"FNid\" className={`${styles.logo} ${styles.logoDark}`} />\n <img src={logoLight || FNidLogo} alt=\"FNid\" className={`${styles.logo} ${styles.logoLight}`} />\n <span>\n We sent your single-use login code to <br />\n <span data-testid=\"email\">{email}</span>\n <br />\n <span className={styles.digits} data-testid=\"code-digits\">\n Add the {codeLength} digit code below\n </span>\n </span>\n <div className={styles.codeInput}>\n <form onSubmit={handleSubmit}>\n <OtpInput\n value={otpCode}\n onChange={(code) => setOtpCode(code)}\n numInputs={codeLength}\n shouldAutoFocus={true}\n hasErrored={otpError || codeError}\n errorStyle={{ border: '1px solid #e5424d' }}\n data-testid=\"otp-input\"\n />\n {/*\n this is to simulate the on key press submit (enter)\n @see https://github.com/devfolioco/react-otp-input/issues/98\n */}\n <button style={{display:'none'}} type='submit' />\n </form>\n </div>\n {codeError && (\n <span className={styles.error} data-testid=\"error\">\n The code you entered it's incorrect. <br /> Please try again.\n </span>\n )}\n <div className={styles.verify}>\n <div className={`${styles.button} button`} onClick={() => tryPasswordlessLogin(otpCode)} data-testid=\"verify\">Verify Email</div>\n <b>or go back and <span className={styles.link} onClick={() => goToLogin()} data-testid=\"go-back\">try another way</span></b>\n </div>\n </div>\n <div className={styles.resend}>\n Didn’t receive it? Check your spam/junk folder, or <span className={styles.link} onClick={() => resendCode()} data-testid=\"resend\">resend email</span> now.\n </div>\n </>\n </div>\n );\n}\n\nPasswordlessLoginComponent.propTypes = {\n email: PropTypes.string.isRequired,\n codeLength: PropTypes.number.isRequired,\n passwordlessLogin: PropTypes.func.isRequired,\n loginWithCode: PropTypes.func,\n codeError: PropTypes.bool,\n goToLogin: PropTypes.func.isRequired,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func\n}\n\nexport default PasswordlessLoginComponent;\n"],"names":["React","useState","PropTypes","OtpInput","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","logoLight","logoDark","otpCode","setOtpCode","otpError","setOtpError","tryPasswordlessLogin","code","length","resendCode","handleSubmit","e","preventDefault","passwordlessWrapper","innerWrapper","logo","digits","codeInput","border","display","error","verify","button","link","resend","propTypes","string","isRequired","number","func","bool"],"sourceRoot":""}
1
+ {"version":3,"file":"components/login-passwordless.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA,kVAAkV,4EAA4E,0BAA0B;;;;;;;ACAxb,kVAAkV,4EAA4E;;;;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registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/./src/assets/FNid_BLK_logo_rgb.svg","webpack://summit-registration-lite/./src/assets/FNid_WHT_logo_rgb.svg","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"react-otp-input\"","webpack://summit-registration-lite/./src/components/login-passwordless/index.module.scss","webpack://summit-registration-lite/./src/components/login-passwordless/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%23FFFFFF;%7d .st1%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath class='st0' d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7 l-25.6-80.85l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49 l25.72,81.24l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st1' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st1' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st1' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7l-25.6-80.85 l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49l25.72,81.24 l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st0' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st0' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st0' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-otp-input\");","// extracted by mini-css-extract-plugin\nexport default {\"passwordlessWrapper\":\"passwordlessWrapper___BRQ_s\",\"codeSent\":\"codeSent___NzYb_\",\"innerWrapper\":\"innerWrapper___nRLDi\",\"logo\":\"logo___qNVrv\",\"logoDark\":\"logoDark___VVYee\",\"digits\":\"digits___Vu5iy\",\"codeInput\":\"codeInput___LnTZe\",\"error\":\"error___wZflZ\",\"verify\":\"verify___IBgMl\",\"button\":\"button___nBhtQ\",\"link\":\"link___f6fDT\",\"resend\":\"resend___Nma1U\",\"logoLight\":\"logoLight___vSbn_\"};","/**\n * Copyright 2020 OpenStack Foundation\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 * http://www.apache.org/licenses/LICENSE-2.0\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 React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport OtpInput from 'react-otp-input';\n\nimport styles from \"./index.module.scss\";\n\nimport FNidLogo from '../../assets/FNid_WHT_logo_rgb.svg';\nimport FNidLogoDark from '../../assets/FNid_BLK_logo_rgb.svg';\n\nconst PasswordlessLoginComponent = ({\n email, codeLength, passwordlessLogin, loginWithCode, codeError, goToLogin,\n getLoginCode, getPasswordlessCode, logoLight, logoDark }) => {\n\n const [otpCode, setOtpCode] = useState('');\n const [otpError, setOtpError] = useState(false)\n const [codeSent, setCodeSent] = useState(false);\n\n const tryPasswordlessLogin = (code) => {\n if (code.length === codeLength) {\n setOtpError(false)\n passwordlessLogin(otpCode, loginWithCode)\n } else {\n setOtpError(true)\n }\n }\n\n const resendCode = () => {\n getLoginCode(email, getPasswordlessCode)\n .then(() => {\n setCodeSent(true);\n setTimeout(() => setCodeSent(false), 3000);\n });\n }\n\n const handleSubmit = (e) => {\n e.preventDefault();\n tryPasswordlessLogin(otpCode);\n };\n\n return (\n <div className={`${styles.passwordlessWrapper} step-wrapper`}>\n <>\n {codeSent &&\n <div className={styles.codeSent}>Code has been resent.</div>\n }\n <div className={`${styles.innerWrapper}`}>\n {/* Only one logo is displayed based on data-theme through CSS */}\n <img src={logoDark || FNidLogoDark} alt=\"FNid\" className={`${styles.logo} ${styles.logoDark}`} />\n <img src={logoLight || FNidLogo} alt=\"FNid\" className={`${styles.logo} ${styles.logoLight}`} />\n <span>\n We sent your single-use code to <br />\n <span data-testid=\"email\">{email}</span>\n <br />\n <span className={styles.digits} data-testid=\"code-digits\">\n Add the {codeLength} digit code below\n </span>\n </span>\n <div className={styles.codeInput}>\n <form onSubmit={handleSubmit}>\n <OtpInput\n value={otpCode}\n onChange={(code) => setOtpCode(code)}\n numInputs={codeLength}\n shouldAutoFocus={true}\n hasErrored={otpError || codeError}\n errorStyle={{ border: '1px solid #e5424d' }}\n data-testid=\"otp-input\"\n />\n {/*\n this is to simulate the on key press submit (enter)\n @see https://github.com/devfolioco/react-otp-input/issues/98\n */}\n <button style={{display:'none'}} type='submit' />\n </form>\n </div>\n {codeError && (\n <span className={styles.error} data-testid=\"error\">\n The code you entered it's incorrect. <br /> Please try again.\n </span>\n )}\n <div className={styles.verify}>\n <div className={`${styles.button} button`} onClick={() => tryPasswordlessLogin(otpCode)} data-testid=\"verify\">Verify Email</div>\n <b>or go back and <span className={styles.link} onClick={() => goToLogin()} data-testid=\"go-back\">try another way</span></b>\n </div>\n </div>\n <div className={styles.resend}>\n Didn’t receive it? Check your spam/junk folder, or <span className={styles.link} onClick={() => resendCode()} data-testid=\"resend\">resend code</span> now.\n </div>\n </>\n </div>\n );\n}\n\nPasswordlessLoginComponent.propTypes = {\n email: PropTypes.string.isRequired,\n codeLength: PropTypes.number.isRequired,\n passwordlessLogin: PropTypes.func.isRequired,\n loginWithCode: PropTypes.func,\n codeError: PropTypes.bool,\n goToLogin: PropTypes.func.isRequired,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func\n}\n\nexport default PasswordlessLoginComponent;\n"],"names":["React","useState","PropTypes","OtpInput","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","logoLight","logoDark","otpCode","setOtpCode","otpError","setOtpError","codeSent","setCodeSent","tryPasswordlessLogin","code","length","resendCode","then","setTimeout","handleSubmit","e","preventDefault","passwordlessWrapper","innerWrapper","logo","digits","codeInput","border","display","error","verify","button","link","resend","propTypes","string","isRequired","number","func","bool"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- .loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:28px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.primaryEmailButton___gH1fC{background-color:var(--color_primary)}.buttonDisabled___T9tkn{background-color:var(--color_text_input_hints)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;color:var(--color_primary_contrast);width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0;color:#fff}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:16px !important;font-weight:bold;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
1
+ .loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:12px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.title___NnwWR{padding:15px 0 0 0}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.primaryEmailButton___gH1fC{background-color:var(--color_primary)}.buttonDisabled___T9tkn{background-color:var(--color_text_input_hints)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;justify-content:space-between;padding:10px 9px;color:var(--color_primary_contrast);width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0;color:#fff}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:18px !important;font-weight:800 !important;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
2
2
 
@@ -116,7 +116,7 @@ const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded")
116
116
  var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
117
117
  ;// CONCATENATED MODULE: ./src/components/login/index.module.scss
118
118
  // extracted by mini-css-extract-plugin
119
- /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
119
+ /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","title":"title___NnwWR","loginCode":"loginCode___dDBup","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
120
120
  ;// CONCATENATED MODULE: ./src/components/login/index.js
121
121
  /**
122
122
  * Copyright 2020 OpenStack Foundation
@@ -164,7 +164,7 @@ const LoginComponent = ({
164
164
  };
165
165
 
166
166
  return /*#__PURE__*/external_react_default().createElement("div", {
167
- className: `${index_module.loginWrapper} step-wrapper`
167
+ className: `${index_module.loginWrapper}`
168
168
  }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
169
169
  className: `${index_module.innerWrapper}`
170
170
  }, /*#__PURE__*/external_react_default().createElement("div", {
@@ -172,7 +172,9 @@ const LoginComponent = ({
172
172
  }, summitData?.secondary_logo && /*#__PURE__*/external_react_default().createElement("img", {
173
173
  className: "login-logo",
174
174
  src: `${summitData?.secondary_logo}`
175
- }), title, /*#__PURE__*/external_react_default().createElement("div", {
175
+ }), /*#__PURE__*/external_react_default().createElement("div", {
176
+ class: index_module.title
177
+ }, title), /*#__PURE__*/external_react_default().createElement("div", {
176
178
  className: index_module.input
177
179
  }, /*#__PURE__*/external_react_default().createElement("input", {
178
180
  placeholder: "youremail@example.com",
@@ -186,9 +188,9 @@ const LoginComponent = ({
186
188
  className: `${index_module.button} ${index_module.email_login_button} ${email === '' ? `${index_module.pointerDisabled} ${index_module.buttonDisabled}` : `${index_module.primaryEmailButton}`}`
187
189
  }, /*#__PURE__*/external_react_default().createElement((EmailRounded_default()), {
188
190
  style: {
189
- fontSize: '20px'
191
+ fontSize: "20px"
190
192
  }
191
- }), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a login code")), emailError && /*#__PURE__*/external_react_default().createElement("span", {
193
+ }), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a single-use code"), /*#__PURE__*/external_react_default().createElement("span", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
192
194
  "data-testid": "email-error"
193
195
  }, "Please enter a valid email address"), /*#__PURE__*/external_react_default().createElement("h2", {
194
196
  className: index_module.h2Styled
@@ -1 +1 @@
1
- {"version":3,"file":"components/login.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;ACVA;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;ACNA,MAAM,4BAA4B;;;ACAlC;AACA,mDAAe,CAAC,sXAAsX;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,GAAqBV,SAAS,EAA9B,GAAmC,IAAzJ;AAA+J,mBAAY;AAA3K,IADJ,eAEI,kDAFJ,CAFJ,eAMI;AAAK,WAAO,EAAE,MAAMA,SAAS,EAA7B;AAAiC,mBAAY,cAA7C;AAA4D,aAAS,EAAC,QAAtE;AAA+E,SAAK,EAAE;AAAEiC,MAAAA,UAAU,EAAE,MAAd;AAAsBX,MAAAA,KAAK,EAAE;AAA7B;AAAtF,6BANJ,EASK7B,UAAU,iBAAI;AAAM,mBAAY;AAAlB,yCATnB,CAhDR,CADJ,CADJ,CADJ;AAmEH,CA9FD;;AAgGAZ,cAAc,CAACqD,SAAf,GAA2B;AACvBnD,EAAAA,YAAY,EAAEL,gDADS;AAEvBM,EAAAA,KAAK,EAAEN,+CAFgB;AAGvBO,EAAAA,gBAAgB,EAAEP,oCAHK;AAIvBQ,EAAAA,kBAAkB,EAAER,oCAJG;AAKvBS,EAAAA,YAAY,EAAET,+CALS;AAMvBU,EAAAA,mBAAmB,EAAEV,oCANE;AAOvBW,EAAAA,iBAAiB,EAAEX,sCAPI;AAQvBY,EAAAA,KAAK,EAAEZ,sCAAgB6D;AARA,CAA3B;AAWA1D,cAAc,CAAC2D,YAAf,GAA8B;AAC1BvD,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeT,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"@mui/icons-material/EmailRounded\"","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/EmailRounded\");","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"loginCode\":\"loginCode___dDBup\",\"primaryEmailButton\":\"primaryEmailButton___gH1fC\",\"buttonDisabled\":\"buttonDisabled___T9tkn\",\"pointerDisabled\":\"pointerDisabled___qt_HK\",\"email_login_button\":\"email_login_button___seiLi\",\"h2Styled\":\"h2Styled___rfIKD\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\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 * http://www.apache.org/licenses/LICENSE-2.0\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 React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport EmailRoundedIcon from '@mui/icons-material/EmailRounded';\n\nimport styles from \"./index.module.scss\";\n\nconst LoginComponent = ({\n summitData,\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState();\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n if (isValid) {\n getLoginCode(email, getPasswordlessCode);\n }\n }\n \n return (\n <div className={`${styles.loginWrapper} step-wrapper`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {summitData?.secondary_logo && <img className=\"login-logo\" src={`${summitData?.secondary_logo}`} />}\n {title}\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)}\n onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" /> \n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\"\n className={`${styles.button} ${styles.email_login_button} ${email === '' ? `${styles.pointerDisabled} ${styles.buttonDisabled}` : `${styles.primaryEmailButton}`}`}>\n <EmailRoundedIcon style={{ fontSize: '20px' }} />\n <span>Email me a login code</span>\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email address</span>}\n <h2 className={styles.h2Styled}>or</h2>\n </div>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_text_color ? o.button_text_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <br />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" className=\"button\" style={{ background: \"#000\", color: \"#fff\"}}>\n Email me a login code\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["React","useState","PropTypes","EmailRoundedIcon","styles","LoginComponent","summitData","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","loginWrapper","innerWrapper","secondary_logo","input","e","target","value","ev","key","button","email_login_button","pointerDisabled","buttonDisabled","primaryEmailButton","fontSize","h2Styled","map","o","index","provider_param","color","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","background","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}
1
+ {"version":3,"file":"components/login.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;ACVA;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA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BAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeT,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"@mui/icons-material/EmailRounded\"","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/EmailRounded\");","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"title\":\"title___NnwWR\",\"loginCode\":\"loginCode___dDBup\",\"primaryEmailButton\":\"primaryEmailButton___gH1fC\",\"buttonDisabled\":\"buttonDisabled___T9tkn\",\"pointerDisabled\":\"pointerDisabled___qt_HK\",\"email_login_button\":\"email_login_button___seiLi\",\"h2Styled\":\"h2Styled___rfIKD\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\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 * http://www.apache.org/licenses/LICENSE-2.0\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 React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport EmailRoundedIcon from '@mui/icons-material/EmailRounded';\n\nimport styles from \"./index.module.scss\";\n\nconst LoginComponent = ({\n summitData,\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState();\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n if (isValid) {\n getLoginCode(email, getPasswordlessCode);\n }\n }\n \n return (\n <div className={`${styles.loginWrapper}`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {summitData?.secondary_logo && <img className=\"login-logo\" src={`${summitData?.secondary_logo}`} />}\n <div class={styles.title}>{title}</div>\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)}\n onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" /> \n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\"\n className={`${styles.button} ${styles.email_login_button} ${email === '' ? `${styles.pointerDisabled} ${styles.buttonDisabled}` : `${styles.primaryEmailButton}`}`}>\n <EmailRoundedIcon style={{ fontSize: \"20px\" }} />\n <span>Email me a single-use code</span>\n <span></span>\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email address</span>}\n <h2 className={styles.h2Styled}>or</h2>\n </div>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_text_color ? o.button_text_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : '',\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <br />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" className=\"button\" style={{ background: \"#000\", color: \"#fff\"}}>\n Email me a login code\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["React","useState","PropTypes","EmailRoundedIcon","styles","LoginComponent","summitData","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","loginWrapper","innerWrapper","secondary_logo","input","e","target","value","ev","key","button","email_login_button","pointerDisabled","buttonDisabled","primaryEmailButton","fontSize","h2Styled","map","o","index","provider_param","color","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","background","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}
package/dist/index.css CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  .step-wrapper{padding:10px;margin:10px;border:1px solid var(--color_input_border_color);border-radius:5px}.summit-registration-lite{color:var(--color_text_dark);font-size:15px;font-smooth:auto !important;-moz-osx-font-smoothing:auto !important;-webkit-font-smoothing:auto !important}.summit-registration-lite input:-moz-placeholder,.summit-registration-lite input::-moz-placeholder{opacity:1}input{outline:none}.registration_company_dll .registration_company_dll_prefix__control{border:1px solid var(--color_primary) !important;border-radius:5px !important}
4
4
 
5
- .loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:28px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.primaryEmailButton___gH1fC{background-color:var(--color_primary)}.buttonDisabled___T9tkn{background-color:var(--color_text_input_hints)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;color:var(--color_primary_contrast);width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0;color:#fff}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:16px !important;font-weight:bold;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
5
+ .loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:12px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.title___NnwWR{padding:15px 0 0 0}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.primaryEmailButton___gH1fC{background-color:var(--color_primary)}.buttonDisabled___T9tkn{background-color:var(--color_text_input_hints)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;justify-content:space-between;padding:10px 9px;color:var(--color_primary_contrast);width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0;color:#fff}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:18px !important;font-weight:800 !important;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
6
6
 
7
7
  .title___LksVm{font-weight:bold;cursor:pointer}.form___v5GIx{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___v5GIx div.fieldWrapper___Eoe61{width:48%;border-radius:5px;color:var(--color_input_text_color);border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);height:36px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.form___v5GIx div.fieldWrapper___Eoe61:first-of-type{width:100%}.form___v5GIx div.fieldWrapper___Eoe61 input{width:100%;background-color:transparent;border:none}.form___v5GIx div.fieldWrapper___Eoe61 input:focus-visible{outline:none}.form___v5GIx div.fieldWrapper___Eoe61 i{position:relative}.form___v5GIx div.fieldWrapper___Eoe61>div{width:100%}.form___v5GIx div.fieldWrapper___Eoe61>div:first-of-type{width:95%}.form___v5GIx input{width:48%;border-radius:5px;color:var(--color_input_text_color);border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);font-size:16px;height:36px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:5px;font-weight:bold}.form___v5GIx input::placeholder{color:var(--color_text_input_hints)}
8
8
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  .button___XMN8a{font-weight:bold !important;font-size:1em !important;cursor:pointer !important;border:1px solid var(--color_input_border_color) !important;color:var(--color_input_text_color) !important;background-color:var(--color_input_background_color) !important}.button___XMN8a[disabled]{background-color:var(--color_secondary_contrast) !important}.button___XMN8a:hover{color:var(--color_input_text_color) !important}.button___XMN8a:active,.button___XMN8a:focus{color:var(--color_input_text_color) !important}.wrapper___Jd5Xg{height:370px;display:flex;flex-direction:column;align-items:center;justify-content:space-around;margin:15px 0;padding:15px;border-radius:5px;border:1px solid var(--color_input_border_color);text-align:center}.wrapper___Jd5Xg .circle___lcN86{margin-bottom:10px;background-color:var(--color_input_background_color);border-radius:50px;border:1px solid var(--color_text_dark);padding:10px}.wrapper___Jd5Xg .circle___lcN86 i{font-size:36px;color:var(--color_text_dark)}.wrapper___Jd5Xg .complete___HAHzl{font-weight:bold;font-size:20px}.wrapper___Jd5Xg .actions___jJdPX{display:flex}.wrapper___Jd5Xg button{margin:10px 5px 0 5px}.wrapper___Jd5Xg span{font-size:14px}.wrapper___Jd5Xg a{color:var(--color_text_dark);text-decoration:underline}.wrapper___Jd5Xg .footer___FL9TW{font-size:14px;font-weight:normal}
24
24
 
25
- .passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv.logoDark___VVYee{display:none}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{height:56px;width:56px;font-size:42px;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);border-radius:5px;padding:5px;display:inline-flex;text-transform:uppercase;text-align:center;margin:0 5px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .error___wZflZ{margin-top:10px;color:#e5424d;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl{margin-top:20px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .button___nBhtQ{padding:10px 30px;font-weight:normal;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}.passwordlessWrapper___BRQ_s .resend___Nma1U{margin:auto 0 0 0;font-weight:normal;font-size:14px}.passwordlessWrapper___BRQ_s .resend___Nma1U span{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}html[data-theme="DARK"] .logoLight___vSbn_{display:none}html[data-theme="DARK"] .logoDark___VVYee{display:block !important}html[data-theme="LIGHT"] .logoDark___VVYee{display:none}html[data-theme="LIGHT"] .logoLight___vSbn_{display:block !important}
25
+ .passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{background-color:#fff6d7;font-size:16px;color:#767676;text-align:center;width:200px;position:absolute;top:10px;left:calc(50% + 100);height:50px;line-height:50px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv.logoDark___VVYee{display:none}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{height:56px;width:56px;font-size:42px;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);border-radius:5px;padding:5px;display:inline-flex;text-transform:uppercase;text-align:center;margin:0 5px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .error___wZflZ{margin-top:10px;color:#e5424d;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl{margin-top:20px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .button___nBhtQ{padding:10px 30px;font-weight:normal;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}.passwordlessWrapper___BRQ_s .resend___Nma1U{margin:auto 0 0 0;font-weight:normal;font-size:14px}.passwordlessWrapper___BRQ_s .resend___Nma1U span{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}html[data-theme="DARK"] .logoLight___vSbn_{display:none}html[data-theme="DARK"] .logoDark___VVYee{display:block !important}html[data-theme="LIGHT"] .logoDark___VVYee{display:none}html[data-theme="LIGHT"] .logoLight___vSbn_{display:block !important}
26
26
 
27
27
  .ticketOwnedWrapper___nhkDY{margin:10px}.ticketOwnedWrapper___nhkDY span{display:block}.alert___c49oP{margin:0 !important}
28
28
 
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ const external_react_otp_input_namespaceObject = require("react-otp-input");
32
32
  var external_react_otp_input_default = /*#__PURE__*/__webpack_require__.n(external_react_otp_input_namespaceObject);
33
33
  ;// CONCATENATED MODULE: ./src/components/login-passwordless/index.module.scss
34
34
  // extracted by mini-css-extract-plugin
35
- /* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","logoDark":"logoDark___VVYee","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U","logoLight":"logoLight___vSbn_"});
35
+ /* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","codeSent":"codeSent___NzYb_","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","logoDark":"logoDark___VVYee","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U","logoLight":"logoLight___vSbn_"});
36
36
  // EXTERNAL MODULE: ./src/assets/FNid_WHT_logo_rgb.svg
37
37
  var FNid_WHT_logo_rgb = __webpack_require__(802);
38
38
  var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo_rgb);
@@ -73,6 +73,7 @@ const PasswordlessLoginComponent = ({
73
73
  }) => {
74
74
  const [otpCode, setOtpCode] = (0,external_react_.useState)('');
75
75
  const [otpError, setOtpError] = (0,external_react_.useState)(false);
76
+ const [codeSent, setCodeSent] = (0,external_react_.useState)(false);
76
77
 
77
78
  const tryPasswordlessLogin = code => {
78
79
  if (code.length === codeLength) {
@@ -84,7 +85,10 @@ const PasswordlessLoginComponent = ({
84
85
  };
85
86
 
86
87
  const resendCode = () => {
87
- getLoginCode(email, getPasswordlessCode);
88
+ getLoginCode(email, getPasswordlessCode).then(() => {
89
+ setCodeSent(true);
90
+ setTimeout(() => setCodeSent(false), 3000);
91
+ });
88
92
  };
89
93
 
90
94
  const handleSubmit = e => {
@@ -94,7 +98,9 @@ const PasswordlessLoginComponent = ({
94
98
 
95
99
  return /*#__PURE__*/external_react_default().createElement("div", {
96
100
  className: `${index_module.passwordlessWrapper} step-wrapper`
97
- }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
101
+ }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, codeSent && /*#__PURE__*/external_react_default().createElement("div", {
102
+ className: index_module.codeSent
103
+ }, "Code has been resent."), /*#__PURE__*/external_react_default().createElement("div", {
98
104
  className: `${index_module.innerWrapper}`
99
105
  }, /*#__PURE__*/external_react_default().createElement("img", {
100
106
  src: logoDark || (FNid_BLK_logo_rgb_default()),
@@ -104,7 +110,7 @@ const PasswordlessLoginComponent = ({
104
110
  src: logoLight || (FNid_WHT_logo_rgb_default()),
105
111
  alt: "FNid",
106
112
  className: `${index_module.logo} ${index_module.logoLight}`
107
- }), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use login code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
113
+ }), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
108
114
  "data-testid": "email"
109
115
  }, email), /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
110
116
  className: index_module.digits,
@@ -147,7 +153,7 @@ const PasswordlessLoginComponent = ({
147
153
  className: index_module.link,
148
154
  onClick: () => resendCode(),
149
155
  "data-testid": "resend"
150
- }, "resend email"), " now.")));
156
+ }, "resend code"), " now.")));
151
157
  };
152
158
 
153
159
  PasswordlessLoginComponent.propTypes = {
@@ -185,7 +191,7 @@ const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded")
185
191
  var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
186
192
  ;// CONCATENATED MODULE: ./src/components/login/index.module.scss
187
193
  // extracted by mini-css-extract-plugin
188
- /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
194
+ /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","title":"title___NnwWR","loginCode":"loginCode___dDBup","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
189
195
  ;// CONCATENATED MODULE: ./src/components/login/index.js
190
196
  /**
191
197
  * Copyright 2020 OpenStack Foundation
@@ -233,7 +239,7 @@ const LoginComponent = ({
233
239
  };
234
240
 
235
241
  return /*#__PURE__*/external_react_default().createElement("div", {
236
- className: `${index_module.loginWrapper} step-wrapper`
242
+ className: `${index_module.loginWrapper}`
237
243
  }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
238
244
  className: `${index_module.innerWrapper}`
239
245
  }, /*#__PURE__*/external_react_default().createElement("div", {
@@ -241,7 +247,9 @@ const LoginComponent = ({
241
247
  }, summitData?.secondary_logo && /*#__PURE__*/external_react_default().createElement("img", {
242
248
  className: "login-logo",
243
249
  src: `${summitData?.secondary_logo}`
244
- }), title, /*#__PURE__*/external_react_default().createElement("div", {
250
+ }), /*#__PURE__*/external_react_default().createElement("div", {
251
+ class: index_module.title
252
+ }, title), /*#__PURE__*/external_react_default().createElement("div", {
245
253
  className: index_module.input
246
254
  }, /*#__PURE__*/external_react_default().createElement("input", {
247
255
  placeholder: "youremail@example.com",
@@ -255,9 +263,9 @@ const LoginComponent = ({
255
263
  className: `${index_module.button} ${index_module.email_login_button} ${email === '' ? `${index_module.pointerDisabled} ${index_module.buttonDisabled}` : `${index_module.primaryEmailButton}`}`
256
264
  }, /*#__PURE__*/external_react_default().createElement((EmailRounded_default()), {
257
265
  style: {
258
- fontSize: '20px'
266
+ fontSize: "20px"
259
267
  }
260
- }), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a login code")), emailError && /*#__PURE__*/external_react_default().createElement("span", {
268
+ }), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a single-use code"), /*#__PURE__*/external_react_default().createElement("span", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
261
269
  "data-testid": "email-error"
262
270
  }, "Please enter a valid email address"), /*#__PURE__*/external_react_default().createElement("h2", {
263
271
  className: index_module.h2Styled
@@ -723,7 +731,7 @@ const getTicketTaxes = (ticket, taxes) => {
723
731
  const ticketTaxes = taxes.filter(tax => tax.ticket_types.includes(ticket?.id));
724
732
  return `${ticketTaxes.length > 0 ? ` plus ${taxes.map(t => t.name).join(' & ')}` : ''}`;
725
733
  };
726
- const hasDiscountApplied = ticketType => ticketType?.cost_with_applied_discount > 0;
734
+ const hasDiscountApplied = ticketType => ticketType.hasOwnProperty('cost_with_applied_discount') && ticketType.cost !== ticketType?.cost_with_applied_discount;
727
735
  const isFreeOrder = reservation => reservation.amount === 0;
728
736
  const isPrePaidOrder = reservation => reservation.status === ORDER_STATUS_PAID && reservation.payment_method === ORDER_PAYMENT_METHOD_OFFLINE;
729
737
  const getTicketCost = (ticket, quantity = 1) => {
@@ -3721,7 +3729,7 @@ const RegistrationLite = _ref => {
3721
3729
  className: general_module.innerWrapper
3722
3730
  }, /*#__PURE__*/external_react_default().createElement("div", {
3723
3731
  className: general_module.title
3724
- }, /*#__PURE__*/external_react_default().createElement("span", null, summitData.name), /*#__PURE__*/external_react_default().createElement("i", {
3732
+ }, profileData && /*#__PURE__*/external_react_default().createElement("span", null, summitData.name), /*#__PURE__*/external_react_default().createElement("i", {
3725
3733
  className: "fa fa-close",
3726
3734
  "aria-label": "close",
3727
3735
  onClick: handleCloseClick