summit-registration-lite 5.0.16 → 5.0.18-alpha.1

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
- .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:16px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.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: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}
2
2
 
@@ -111,9 +111,12 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
111
111
  // EXTERNAL MODULE: external "prop-types"
112
112
  var external_prop_types_ = __webpack_require__(580);
113
113
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
114
+ ;// CONCATENATED MODULE: external "@mui/icons-material/EmailRounded"
115
+ const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded");
116
+ var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
114
117
  ;// CONCATENATED MODULE: ./src/components/login/index.module.scss
115
118
  // extracted by mini-css-extract-plugin
116
- /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","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"});
117
120
  ;// CONCATENATED MODULE: ./src/components/login/index.js
118
121
  /**
119
122
  * Copyright 2020 OpenStack Foundation
@@ -131,7 +134,9 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
131
134
 
132
135
 
133
136
 
137
+
134
138
  const LoginComponent = ({
139
+ summitData,
135
140
  loginOptions,
136
141
  login,
137
142
  allowsNativeAuth,
@@ -159,12 +164,17 @@ const LoginComponent = ({
159
164
  };
160
165
 
161
166
  return /*#__PURE__*/external_react_default().createElement("div", {
162
- className: `${index_module.loginWrapper} step-wrapper`
167
+ className: `${index_module.loginWrapper}`
163
168
  }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
164
169
  className: `${index_module.innerWrapper}`
165
170
  }, /*#__PURE__*/external_react_default().createElement("div", {
166
171
  className: index_module.loginCode
167
- }, title, /*#__PURE__*/external_react_default().createElement("div", {
172
+ }, summitData?.secondary_logo && /*#__PURE__*/external_react_default().createElement("img", {
173
+ className: "login-logo",
174
+ src: `${summitData?.secondary_logo}`
175
+ }), /*#__PURE__*/external_react_default().createElement("div", {
176
+ class: index_module.title
177
+ }, title), /*#__PURE__*/external_react_default().createElement("div", {
168
178
  className: index_module.input
169
179
  }, /*#__PURE__*/external_react_default().createElement("input", {
170
180
  placeholder: "youremail@example.com",
@@ -172,12 +182,19 @@ const LoginComponent = ({
172
182
  onChange: e => setEmail(e.target.value),
173
183
  onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
174
184
  "data-testid": "email-input"
175
- }), /*#__PURE__*/external_react_default().createElement("button", {
185
+ })), /*#__PURE__*/external_react_default().createElement("div", {
176
186
  onClick: () => loginCode(),
177
- "data-testid": "email-button"
178
- }, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
187
+ "data-testid": "email-button",
188
+ className: `${index_module.button} ${index_module.email_login_button} ${email === '' ? `${index_module.pointerDisabled} ${index_module.buttonDisabled}` : `${index_module.primaryEmailButton}`}`
189
+ }, /*#__PURE__*/external_react_default().createElement((EmailRounded_default()), {
190
+ style: {
191
+ fontSize: "20px"
192
+ }
193
+ }), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a one time login code"), /*#__PURE__*/external_react_default().createElement("span", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
179
194
  "data-testid": "email-error"
180
- }, "Please enter a valid email address")), /*#__PURE__*/external_react_default().createElement("span", null, "Or you may login with one of the following:"), loginOptions.map((o, index) => {
195
+ }, "Please enter a valid email address"), /*#__PURE__*/external_react_default().createElement("h2", {
196
+ className: index_module.h2Styled
197
+ }, "or")), loginOptions.map((o, index) => {
181
198
  return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
182
199
  className: `${index_module.button}`,
183
200
  key: `provider-${o.provider_param}`,
@@ -213,10 +230,15 @@ const LoginComponent = ({
213
230
  onChange: e => setEmail(e.target.value),
214
231
  onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
215
232
  "data-testid": "email-input"
216
- }), /*#__PURE__*/external_react_default().createElement("button", {
233
+ }), /*#__PURE__*/external_react_default().createElement("br", null)), /*#__PURE__*/external_react_default().createElement("div", {
217
234
  onClick: () => loginCode(),
218
- "data-testid": "email-button"
219
- }, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
235
+ "data-testid": "email-button",
236
+ className: "button",
237
+ style: {
238
+ background: "#000",
239
+ color: "#fff"
240
+ }
241
+ }, "Email me a login code"), emailError && /*#__PURE__*/external_react_default().createElement("span", {
220
242
  "data-testid": "email-error"
221
243
  }, "Please enter a valid email adress")))));
222
244
  };
@@ -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;AACA,mDAAe,CAAC,8JAA8J;;ACD9K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;AAEA,MAAMI,cAAc,GAAG,CAAC;AACpBC,EAAAA,YADoB;AAEpBC,EAAAA,KAFoB;AAGpBC,EA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;AARA,CAA3B;AAWAjD,cAAc,CAACkD,YAAf,GAA8B;AAC1B/C,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeR,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/./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};","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"loginCode\":\"loginCode___dDBup\",\"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';\n\nimport styles from \"./index.module.scss\";\n\nconst LoginComponent = ({\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 {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 <button onClick={() => loginCode()} data-testid=\"email-button\">\n &gt;\n </button>\n <br />\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email address</span>}\n </div>\n <span>Or you may login with one of the following:</span>\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 <button onClick={() => loginCode()} data-testid=\"email-button\">\n &gt;\n </button>\n <br />\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","styles","LoginComponent","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","loginWrapper","innerWrapper","input","e","target","value","ev","key","map","o","index","provider_param","button","color","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","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;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;W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;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 one time login 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:16px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.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: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}
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
 
package/dist/index.js CHANGED
@@ -164,7 +164,7 @@ PasswordlessLoginComponent.propTypes = {
164
164
 
165
165
  /***/ }),
166
166
 
167
- /***/ 711:
167
+ /***/ 462:
168
168
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
169
169
 
170
170
  "use strict";
@@ -180,9 +180,12 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
180
180
  // EXTERNAL MODULE: external "prop-types"
181
181
  var external_prop_types_ = __webpack_require__(580);
182
182
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
183
+ ;// CONCATENATED MODULE: external "@mui/icons-material/EmailRounded"
184
+ const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded");
185
+ var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
183
186
  ;// CONCATENATED MODULE: ./src/components/login/index.module.scss
184
187
  // extracted by mini-css-extract-plugin
185
- /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","input":"input___QR9sA"});
188
+ /* 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"});
186
189
  ;// CONCATENATED MODULE: ./src/components/login/index.js
187
190
  /**
188
191
  * Copyright 2020 OpenStack Foundation
@@ -200,7 +203,9 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
200
203
 
201
204
 
202
205
 
206
+
203
207
  const LoginComponent = ({
208
+ summitData,
204
209
  loginOptions,
205
210
  login,
206
211
  allowsNativeAuth,
@@ -228,12 +233,17 @@ const LoginComponent = ({
228
233
  };
229
234
 
230
235
  return /*#__PURE__*/external_react_default().createElement("div", {
231
- className: `${index_module.loginWrapper} step-wrapper`
236
+ className: `${index_module.loginWrapper}`
232
237
  }, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
233
238
  className: `${index_module.innerWrapper}`
234
239
  }, /*#__PURE__*/external_react_default().createElement("div", {
235
240
  className: index_module.loginCode
236
- }, title, /*#__PURE__*/external_react_default().createElement("div", {
241
+ }, summitData?.secondary_logo && /*#__PURE__*/external_react_default().createElement("img", {
242
+ className: "login-logo",
243
+ src: `${summitData?.secondary_logo}`
244
+ }), /*#__PURE__*/external_react_default().createElement("div", {
245
+ class: index_module.title
246
+ }, title), /*#__PURE__*/external_react_default().createElement("div", {
237
247
  className: index_module.input
238
248
  }, /*#__PURE__*/external_react_default().createElement("input", {
239
249
  placeholder: "youremail@example.com",
@@ -241,12 +251,19 @@ const LoginComponent = ({
241
251
  onChange: e => setEmail(e.target.value),
242
252
  onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
243
253
  "data-testid": "email-input"
244
- }), /*#__PURE__*/external_react_default().createElement("button", {
254
+ })), /*#__PURE__*/external_react_default().createElement("div", {
245
255
  onClick: () => loginCode(),
246
- "data-testid": "email-button"
247
- }, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
256
+ "data-testid": "email-button",
257
+ className: `${index_module.button} ${index_module.email_login_button} ${email === '' ? `${index_module.pointerDisabled} ${index_module.buttonDisabled}` : `${index_module.primaryEmailButton}`}`
258
+ }, /*#__PURE__*/external_react_default().createElement((EmailRounded_default()), {
259
+ style: {
260
+ fontSize: "20px"
261
+ }
262
+ }), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a one time login code"), /*#__PURE__*/external_react_default().createElement("span", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
248
263
  "data-testid": "email-error"
249
- }, "Please enter a valid email address")), /*#__PURE__*/external_react_default().createElement("span", null, "Or you may login with one of the following:"), loginOptions.map((o, index) => {
264
+ }, "Please enter a valid email address"), /*#__PURE__*/external_react_default().createElement("h2", {
265
+ className: index_module.h2Styled
266
+ }, "or")), loginOptions.map((o, index) => {
250
267
  return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
251
268
  className: `${index_module.button}`,
252
269
  key: `provider-${o.provider_param}`,
@@ -282,10 +299,15 @@ const LoginComponent = ({
282
299
  onChange: e => setEmail(e.target.value),
283
300
  onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
284
301
  "data-testid": "email-input"
285
- }), /*#__PURE__*/external_react_default().createElement("button", {
302
+ }), /*#__PURE__*/external_react_default().createElement("br", null)), /*#__PURE__*/external_react_default().createElement("div", {
286
303
  onClick: () => loginCode(),
287
- "data-testid": "email-button"
288
- }, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
304
+ "data-testid": "email-button",
305
+ className: "button",
306
+ style: {
307
+ background: "#000",
308
+ color: "#fff"
309
+ }
310
+ }, "Email me a login code"), emailError && /*#__PURE__*/external_react_default().createElement("span", {
289
311
  "data-testid": "email-error"
290
312
  }, "Please enter a valid email adress")))));
291
313
  };
@@ -1431,8 +1453,8 @@ var clock_default = /*#__PURE__*/__webpack_require__.n(clock_namespaceObject);
1431
1453
  ;// CONCATENATED MODULE: ./src/styles/general.module.scss
1432
1454
  // extracted by mini-css-extract-plugin
1433
1455
  /* harmony default export */ const general_module = ({"modal":"modal___G3Cmq","modalContent":"modalContent___lIaqw","outerWrapper":"outerWrapper___OWXyi","innerWrapper":"innerWrapper___mIrBF","title":"title___Tbvkl"});
1434
- // EXTERNAL MODULE: ./src/components/login/index.js + 1 modules
1435
- var login = __webpack_require__(711);
1456
+ // EXTERNAL MODULE: ./src/components/login/index.js + 2 modules
1457
+ var login = __webpack_require__(462);
1436
1458
  ;// CONCATENATED MODULE: ./src/components/payment/index.module.scss
1437
1459
  // extracted by mini-css-extract-plugin
1438
1460
  /* harmony default export */ const index_module = ({"title":"title___LksVm","form":"form___v5GIx","fieldWrapper":"fieldWrapper___Eoe61"});
@@ -2996,11 +3018,12 @@ const PurchaseComplete = _ref2 => {
2996
3018
  });
2997
3019
  }, [currentTicket]);
2998
3020
 
2999
- const _hasVirtualAccessLevel = hasVirtualAccessLevel || currentTicket && ticketHasAccessLevel(currentTicket, VirtualAccessLevel); // attendeeId is only passed to event-site only if the ticket is for someone else. If not pass it as null to use the default flow
3021
+ const _hasVirtualAccessLevel = hasVirtualAccessLevel || currentTicket && ticketHasAccessLevel(currentTicket, VirtualAccessLevel);
3000
3022
 
3023
+ const attendeeIsSomeoneElse = !isMultiOrder && currentTicket && currentTicket.hasOwnProperty('owner') && currentTicket.owner?.email !== user?.email; // attendeeId is only passed to event-site only if the ticket is for someone else.
3024
+ // If not pass it as null to use the default flow
3001
3025
 
3002
- const attendeeTicket = checkout?.tickets.find(t => t?.owner?.email !== user?.email);
3003
- const attendeeId = checkout?.tickets.length === 1 ? attendeeTicket?.owner?.id : null;
3026
+ const attendeeId = attendeeIsSomeoneElse ? currentTicket?.owner?.id : null;
3004
3027
  const startDateFormatted = {
3005
3028
  date: (0,methods_namespaceObject.epochToMomentTimeZone)(summit.start_date, summit.time_zone_id).format('MMMM D'),
3006
3029
  time: (0,methods_namespaceObject.epochToMomentTimeZone)(summit.start_date, summit.time_zone_id).format('hh:mm A')
@@ -3008,9 +3031,9 @@ const PurchaseComplete = _ref2 => {
3008
3031
  if (!checkout) return null;
3009
3032
  if (requireExtraQuestions == null) return null;
3010
3033
  let orderCompleteButtonText = currentTicket && requireExtraQuestions ? rest.hasOwnProperty('initialOrderCompleteButton') && !isEmptyString(rest.initialOrderCompleteButton) && typeof rest.initialOrderCompleteButton !== 'undefined' ? rest.initialOrderCompleteButton : external_i18n_react_default().translate('purchase_complete_step.initial_order_complete_button') : rest.hasOwnProperty('orderCompleteButton') && !isEmptyString(rest.orderCompleteButton) ? rest.orderCompleteButton : external_i18n_react_default().translate('purchase_complete_step.order_complete_button');
3011
- let orderComplete1stParagraph = currentTicket ? !attendeeTicket && rest.hasOwnProperty('initialOrderComplete1stParagraph') && typeof rest.initialOrderComplete1stParagraph !== 'undefined' ? rest.initialOrderComplete1stParagraph : external_i18n_react_default().translate('purchase_complete_step.initial_order_complete_1st_paragraph_label', {
3012
- attendee: `${attendeeTicket ? ` ${attendeeTicket.owner.email}` : 'you'}`,
3013
- adv: `${attendeeTicket ? `${attendeeTicket.owner.email}` : 'your'}`,
3034
+ let orderComplete1stParagraph = currentTicket ? !attendeeIsSomeoneElse && rest.hasOwnProperty('initialOrderComplete1stParagraph') && typeof rest.initialOrderComplete1stParagraph !== 'undefined' ? rest.initialOrderComplete1stParagraph : external_i18n_react_default().translate('purchase_complete_step.initial_order_complete_1st_paragraph_label', {
3035
+ attendee: `${attendeeIsSomeoneElse ? ` ${currentTicket.owner.email}` : 'you'}`,
3036
+ adv: `${attendeeIsSomeoneElse ? `${currentTicket.owner.email}` : 'your'}`,
3014
3037
  button: orderCompleteButtonText
3015
3038
  }) : rest.hasOwnProperty('orderComplete1stParagraph') && typeof rest.orderComplete1stParagraph !== 'undefined' ? rest.orderComplete1stParagraph : external_i18n_react_default().translate('purchase_complete_step.order_complete_1st_paragraph_label');
3016
3039
  let orderComplete2ndParagraph = currentTicket ? rest.hasOwnProperty('initialOrderComplete2ndParagraph') && typeof rest.initialOrderComplete2ndParagraph !== 'undefined' ? rest.initialOrderComplete2ndParagraph : external_i18n_react_default().translate('purchase_complete_step.initial_order_footer_label') : rest.hasOwnProperty('orderComplete2ndParagraph') && typeof rest.orderComplete2ndParagraph !== 'undefined' ? rest.orderComplete2ndParagraph : '';
@@ -3422,7 +3445,7 @@ const RegistrationLite = _ref => {
3422
3445
  className: general_module.innerWrapper
3423
3446
  }, /*#__PURE__*/external_react_default().createElement("div", {
3424
3447
  className: general_module.title
3425
- }, /*#__PURE__*/external_react_default().createElement("span", null, summitData.name), /*#__PURE__*/external_react_default().createElement("i", {
3448
+ }, /*#__PURE__*/external_react_default().createElement("i", {
3426
3449
  className: "fa fa-close",
3427
3450
  "aria-label": "close",
3428
3451
  onClick: handleCloseClick
@@ -3434,6 +3457,7 @@ const RegistrationLite = _ref => {
3434
3457
  }), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
3435
3458
  className: general_module.stepsWrapper
3436
3459
  }, !profileData && !passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login["default"], {
3460
+ summitData: summitData,
3437
3461
  loginOptions: loginOptions,
3438
3462
  allowsNativeAuth: allowsNativeAuth,
3439
3463
  allowsOtpAuth: allowsOtpAuth,