summit-registration-lite 5.0.24 → 5.0.26-beta.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.
- package/README.md +4 -2
- package/dist/components/login-passwordless.js +11 -7
- package/dist/components/login-passwordless.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +129 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,9 +79,11 @@ React component for the summit registration lite widget
|
|
|
79
79
|
|
|
80
80
|
**companyDDLOptions2Show** = Maximum number of companies to show on a match of the DDL company input
|
|
81
81
|
|
|
82
|
-
**
|
|
82
|
+
**idpLogoDark** = string for custom src for dark theme logo on otp login
|
|
83
83
|
|
|
84
|
-
**
|
|
84
|
+
**idpLogoLight** = string for custom src for light theme logo on otp login
|
|
85
|
+
|
|
86
|
+
**idpLogoAlt** = string for custom alt logo on otp login
|
|
85
87
|
|
|
86
88
|
## PUBLISH TO NPM:
|
|
87
89
|
|
|
@@ -168,8 +168,9 @@ const PasswordlessLoginComponent = ({
|
|
|
168
168
|
goToLogin,
|
|
169
169
|
getLoginCode,
|
|
170
170
|
getPasswordlessCode,
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
idpLogoLight,
|
|
172
|
+
idpLogoDark,
|
|
173
|
+
idpLogoAlt
|
|
173
174
|
}) => {
|
|
174
175
|
const [otpCode, setOtpCode] = (0,external_react_.useState)('');
|
|
175
176
|
const [otpError, setOtpError] = (0,external_react_.useState)(false);
|
|
@@ -203,12 +204,12 @@ const PasswordlessLoginComponent = ({
|
|
|
203
204
|
}, "Code has been resent."), /*#__PURE__*/external_react_default().createElement("div", {
|
|
204
205
|
className: `${index_module.innerWrapper}`
|
|
205
206
|
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
206
|
-
src:
|
|
207
|
-
alt: "FNid",
|
|
207
|
+
src: idpLogoDark || (FNid_BLK_logo_rgb_default()),
|
|
208
|
+
alt: idpLogoAlt || "FNid",
|
|
208
209
|
className: `${index_module.logo} ${index_module.logoDark}`
|
|
209
210
|
}), /*#__PURE__*/external_react_default().createElement("img", {
|
|
210
|
-
src:
|
|
211
|
-
alt: "FNid",
|
|
211
|
+
src: idpLogoLight || (FNid_WHT_logo_rgb_default()),
|
|
212
|
+
alt: idpLogoAlt || "FNid",
|
|
212
213
|
className: `${index_module.logo} ${index_module.logoLight}`
|
|
213
214
|
}), /*#__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", {
|
|
214
215
|
"data-testid": "email"
|
|
@@ -264,7 +265,10 @@ PasswordlessLoginComponent.propTypes = {
|
|
|
264
265
|
codeError: (external_prop_types_default()).bool,
|
|
265
266
|
goToLogin: (external_prop_types_default()).func.isRequired,
|
|
266
267
|
getLoginCode: (external_prop_types_default()).func.isRequired,
|
|
267
|
-
getPasswordlessCode: (external_prop_types_default()).func
|
|
268
|
+
getPasswordlessCode: (external_prop_types_default()).func,
|
|
269
|
+
idpLogoLight: (external_prop_types_default()).string,
|
|
270
|
+
idpLogoDark: (external_prop_types_default()).string,
|
|
271
|
+
idpLogoAlt: (external_prop_types_default()).string
|
|
268
272
|
};
|
|
269
273
|
/* harmony default export */ const login_passwordless = (PasswordlessLoginComponent);
|
|
270
274
|
})();
|
|
@@ -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;WAC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AO,EAAC;AAAT,KAAf;AAAiC,QAAI,EAAC;AAAtC,IAdJ,CADJ,CAZJ,EA8BK3B,SAAS,iBACN;AAAM,aAAS,EAAER,kBAAjB;AAA+B,mBAAY;AAA3C,2DACyC,kDADzC,uBA/BR,eAmCI;AAAK,aAAS,EAAEA,mBAAaqC;AAA7B,kBACI;AAAK,aAAS,EAAG,GAAErC,mBAAc,SAAjC;AAA2C,WAAO,EAAE,MAAMoB,oBAAoB,CAACN,OAAD,CAA9E;AAAyF,mBAAY;AAArG,oBADJ,eAEI,kFAAkB;AAAM,aAAS,EAAEd,iBAAjB;AAA8B,WAAO,EAAE,MAAMS,SAAS,EAAtD;AAA0D,mBAAY;AAAtE,uBAAlB,CAFJ,CAnCJ,CAJJ,eA4CI;AAAK,aAAS,EAAET,mBAAawC;AAA7B,8EACuD;AAAM,aAAS,EAAExC,iBAAjB;AAA8B,WAAO,EAAE,MAAMuB,UAAU,EAAvD;AAA2D,mBAAY;AAAvE,mBADvD,UA5CJ,CADJ,CADJ;AAoDH,CAlFD;;AAoFApB,0BAA0B,CAACsC,SAA3B,GAAuC;AACnCrC,EAAAA,KAAK,EAAEN,iDAD4B;AAEnCO,EAAAA,UAAU,EAAEP,iDAFuB;AAGnCQ,EAAAA,iBAAiB,EAAER,+CAHgB;AAInCS,EAAAA,aAAa,EAAET,oCAJoB;AAKnCU,EAAAA,SAAS,EAAEV,oCALwB;AAMnCW,EAAAA,SAAS,EAAEX,+CANwB;AAOnCY,EAAAA,YAAY,EAAEZ,+CAPqB;AAQnCa,EAAAA,mBAAmB,EAAEb,oCAAc+C;AARA,CAAvC;AAWA,yDAAe1C,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\",\"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
|
+
{"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,w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A,OAAO,EAAC;AAAT,KAAf;AAAiC,QAAI,EAAC;AAAtC,IAdJ,CADJ,CAZJ,EA8BK9B,SAAS,iBACN;AAAM,aAAS,EAAER,kBAAjB;AAA+B,mBAAY;AAA3C,2DACyC,kDADzC,uBA/BR,eAmCI;AAAK,aAAS,EAAEA,mBAAawC;AAA7B,kBACI;AAAK,aAAS,EAAG,GAAExC,mBAAc,SAAjC;AAA2C,WAAO,EAAE,MAAMqB,oBAAoB,CAACN,OAAD,CAA9E;AAAyF,mBAAY;AAArG,oBADJ,eAEI,kFAAkB;AAAM,aAAS,EAAEf,iBAAjB;AAA8B,WAAO,EAAE,MAAMS,SAAS,EAAtD;AAA0D,mBAAY;AAAtE,uBAAlB,CAFJ,CAnCJ,CAJJ,eA4CI;AAAK,aAAS,EAAET,mBAAa2C;AAA7B,8EACuD;AAAM,aAAS,EAAE3C,iBAAjB;AAA8B,WAAO,EAAE,MAAMwB,UAAU,EAAvD;AAA2D,mBAAY;AAAvE,mBADvD,UA5CJ,CADJ,CADJ;AAoDH,CAlFD;;AAoFArB,0BAA0B,CAACyC,SAA3B,GAAuC;AACnCxC,EAAAA,KAAK,EAAEN,iDAD4B;AAEnCO,EAAAA,UAAU,EAAEP,iDAFuB;AAGnCQ,EAAAA,iBAAiB,EAAER,+CAHgB;AAInCS,EAAAA,aAAa,EAAET,oCAJoB;AAKnCU,EAAAA,SAAS,EAAEV,oCALwB;AAMnCW,EAAAA,SAAS,EAAEX,+CANwB;AAOnCY,EAAAA,YAAY,EAAEZ,+CAPqB;AAQnCa,EAAAA,mBAAmB,EAAEb,oCARc;AASnCc,EAAAA,YAAY,EAAEd,sCATqB;AAUnCe,EAAAA,WAAW,EAAEf,sCAVsB;AAWnCgB,EAAAA,UAAU,EAAEhB,sCAAgB+C;AAXO,CAAvC;AAcA,yDAAe1C,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\",\"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, idpLogoLight, idpLogoDark, idpLogoAlt }) => {\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={idpLogoDark || FNidLogoDark} alt={idpLogoAlt || \"FNid\"} className={`${styles.logo} ${styles.logoDark}`} />\n <img src={idpLogoLight || FNidLogo} alt={idpLogoAlt || \"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 idpLogoLight: PropTypes.string,\n idpLogoDark: PropTypes.string,\n idpLogoAlt: PropTypes.string\n}\n\nexport default PasswordlessLoginComponent;\n"],"names":["React","useState","PropTypes","OtpInput","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","idpLogoLight","idpLogoDark","idpLogoAlt","otpCode","setOtpCode","otpError","setOtpError","codeSent","setCodeSent","tryPasswordlessLogin","code","length","resendCode","then","setTimeout","handleSubmit","e","preventDefault","passwordlessWrapper","innerWrapper","logo","logoDark","logoLight","digits","codeInput","border","display","error","verify","button","link","resend","propTypes","string","isRequired","number","func","bool"],"sourceRoot":""}
|
package/dist/index.css
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
.placeholder___pcdCn{border-radius:5px;width:100%;border:1px solid var(--color_primary);background-color:var(--color_primary50);padding:5px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;height:36px}.placeholder___pcdCn i{padding:2px 5px;border-left:1px solid var(--color_primary)}.placeholder___pcdCn .selectedTicket___qkbpH{max-height:25px;word-wrap:break-word;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:400px}@media screen and (max-width: 630px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:300px}}@media screen and (max-width: 500px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:200px}}@media screen and (max-width: 400px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:100px}}.inPersonDisclaimer___z_DzO{padding:4px}.dropdown___mfbPG{margin-top:10px;border-radius:5px;width:100%;border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);cursor:pointer}.dropdown___mfbPG div{padding:5px}.dropdown___mfbPG div:hover{border-radius:5px;background-color:var(--color_primary50);color:var(--color_input_text_color)}.soldOut___rBLC0,.soldOut___rBLC0:hover,.soldOut___rBLC0:focus{color:inherit !important;background-color:#dedede !important;opacity:0.65;cursor:not-allowed}
|
|
18
18
|
|
|
19
|
-
.promoCodeWrapper___aw3Zx{padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;gap:15px}.promoCodeWrapper___aw3Zx span{color:var(--color_text_dark);font-size:14px;font-weight:600;line-height:140%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{display:flex;align-items:center;position:relative;flex:1;height:33px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input{display:inline-flex;padding:13px 8px;width:70%;height:100%;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1.5px solid var(--color_input_border_color);border-radius:4px 0px 0px 4px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input.promoCodeActive___j7xnn{padding-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5{display:flex;align-items:center;width:30%;height:100%;background-color:#818181;border-radius:0px 4px 4px 0px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5.noCode___YUmVy{background-color:#CFCFCF;cursor:not-allowed}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5 button{color:#fff;font-size:14px;font-style:normal;font-weight:600;line-height:120%;letter-spacing:-0.14px;width:100%;height:100%;border:none;background-color:transparent}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .appliedCodeIcon___pa3B4{position:absolute;left:60%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{display:inline-block}.promoCodeWrapper___aw3Zx .moreInfoTooltip___eaYWm{max-width:280px}
|
|
19
|
+
.promoCodeWrapper___aw3Zx{padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:15px}.promoCodeWrapper___aw3Zx span{color:var(--color_text_dark);font-size:14px;font-weight:600;line-height:140%;width:30%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{display:flex;align-items:center;position:relative;flex:1;height:33px;width:50%;min-width:220px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input{display:inline-flex;padding:13px 8px;width:70%;height:100%;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1.5px solid var(--color_input_border_color);border-radius:4px 0px 0px 4px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input.promoCodeActive___j7xnn{padding-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5{display:flex;align-items:center;width:30%;height:100%;background-color:#818181;border-radius:0px 4px 4px 0px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5.noCode___YUmVy{background-color:#CFCFCF;cursor:not-allowed}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5 button{color:#fff;font-size:14px;font-style:normal;font-weight:600;line-height:120%;letter-spacing:-0.14px;width:100%;height:100%;border:none;background-color:transparent}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .appliedCodeIcon___pa3B4{position:absolute;left:60%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{display:inline-block}.promoCodeWrapper___aw3Zx .moreInfoTooltip___eaYWm{max-width:280px}@media screen and (max-width: 540px){.promoCodeWrapper___aw3Zx span{width:100%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{width:100%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{width:100%}}
|
|
20
20
|
|
|
21
21
|
.button___MZBIY{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___MZBIY[disabled]{background-color:var(--color_secondary_contrast) !important}.button___MZBIY:hover{color:var(--color_input_text_color) !important}.button___MZBIY:active,.button___MZBIY:focus{color:var(--color_input_text_color) !important}.outerWrapper___XRnaq{padding:10px 0px 10px 10px;margin:10px}.outerWrapper___XRnaq .innerWrapper___LFsOH{display:flex;justify-content:space-between;align-items:center}.outerWrapper___XRnaq .innerWrapper___LFsOH span{font-size:14px}.outerWrapper___XRnaq .innerWrapper___LFsOH .registration___jdf6T{cursor:pointer;color:var(--color_primary);text-decoration:underline}.outerWrapper___XRnaq .innerWrapper___LFsOH .actions___Gsf0y{display:flex}.outerWrapper___XRnaq .innerWrapper___LFsOH .actions___Gsf0y button{margin-left:10px}
|
|
22
22
|
|
package/dist/index.js
CHANGED
|
@@ -68,8 +68,9 @@ const PasswordlessLoginComponent = ({
|
|
|
68
68
|
goToLogin,
|
|
69
69
|
getLoginCode,
|
|
70
70
|
getPasswordlessCode,
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
idpLogoLight,
|
|
72
|
+
idpLogoDark,
|
|
73
|
+
idpLogoAlt
|
|
73
74
|
}) => {
|
|
74
75
|
const [otpCode, setOtpCode] = (0,external_react_.useState)('');
|
|
75
76
|
const [otpError, setOtpError] = (0,external_react_.useState)(false);
|
|
@@ -103,12 +104,12 @@ const PasswordlessLoginComponent = ({
|
|
|
103
104
|
}, "Code has been resent."), /*#__PURE__*/external_react_default().createElement("div", {
|
|
104
105
|
className: `${index_module.innerWrapper}`
|
|
105
106
|
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
106
|
-
src:
|
|
107
|
-
alt: "FNid",
|
|
107
|
+
src: idpLogoDark || (FNid_BLK_logo_rgb_default()),
|
|
108
|
+
alt: idpLogoAlt || "FNid",
|
|
108
109
|
className: `${index_module.logo} ${index_module.logoDark}`
|
|
109
110
|
}), /*#__PURE__*/external_react_default().createElement("img", {
|
|
110
|
-
src:
|
|
111
|
-
alt: "FNid",
|
|
111
|
+
src: idpLogoLight || (FNid_WHT_logo_rgb_default()),
|
|
112
|
+
alt: idpLogoAlt || "FNid",
|
|
112
113
|
className: `${index_module.logo} ${index_module.logoLight}`
|
|
113
114
|
}), /*#__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", {
|
|
114
115
|
"data-testid": "email"
|
|
@@ -164,7 +165,10 @@ PasswordlessLoginComponent.propTypes = {
|
|
|
164
165
|
codeError: (external_prop_types_default()).bool,
|
|
165
166
|
goToLogin: (external_prop_types_default()).func.isRequired,
|
|
166
167
|
getLoginCode: (external_prop_types_default()).func.isRequired,
|
|
167
|
-
getPasswordlessCode: (external_prop_types_default()).func
|
|
168
|
+
getPasswordlessCode: (external_prop_types_default()).func,
|
|
169
|
+
idpLogoLight: (external_prop_types_default()).string,
|
|
170
|
+
idpLogoDark: (external_prop_types_default()).string,
|
|
171
|
+
idpLogoAlt: (external_prop_types_default()).string
|
|
168
172
|
};
|
|
169
173
|
/* harmony default export */ const login_passwordless = (PasswordlessLoginComponent);
|
|
170
174
|
|
|
@@ -514,12 +518,44 @@ const actions_namespaceObject = require("openstack-uicore-foundation/lib/utils/a
|
|
|
514
518
|
;// CONCATENATED MODULE: external "sweetalert2"
|
|
515
519
|
const external_sweetalert2_namespaceObject = require("sweetalert2");
|
|
516
520
|
var external_sweetalert2_default = /*#__PURE__*/__webpack_require__.n(external_sweetalert2_namespaceObject);
|
|
521
|
+
;// CONCATENATED MODULE: ./src/utils/constants.js
|
|
522
|
+
/**
|
|
523
|
+
* Copyright 2022 OpenStack Foundation
|
|
524
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
525
|
+
* you may not use this file except in compliance with the License.
|
|
526
|
+
* You may obtain a copy of the License at
|
|
527
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
528
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
529
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
530
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
531
|
+
* See the License for the specific language governing permissions and
|
|
532
|
+
* limitations under the License.
|
|
533
|
+
**/
|
|
534
|
+
const AUTH_ERROR_MESSAGE = 'Missing Auth info';
|
|
535
|
+
const AUTH_ERROR_MISSING_REFRESH_TOKEN = "missing Refresh Token";
|
|
536
|
+
const AUTH_ERROR_REQUEST_FAILED = 'Request failed';
|
|
537
|
+
const VirtualAccessLevel = 'VIRTUAL';
|
|
538
|
+
const DefaultBGColor = '#000000';
|
|
539
|
+
const DefaultTextColor = '#FFFFFF';
|
|
540
|
+
const DefaultHintColor = 'rgb(58, 63, 65)';
|
|
541
|
+
const EMAIL_REGEXP = /(([^<>()\[\]\\.,;:\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,}))/;
|
|
542
|
+
const TICKET_OWNER_MYSELF = 'myself';
|
|
543
|
+
const TICKET_OWNER_SOMEONE = 'someoneElse';
|
|
544
|
+
const TICKET_OWNER_UNASSIGNED = 'unassigned';
|
|
545
|
+
const TICKET_TYPE_SUBTYPE_PREPAID = 'PrePaid';
|
|
546
|
+
const ORDER_STATUS_PAID = 'Paid';
|
|
547
|
+
const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';
|
|
548
|
+
const STEP_SELECT_TICKET_TYPE = 0;
|
|
549
|
+
const STEP_PERSONAL_INFO = 1;
|
|
550
|
+
const STEP_PAYMENT = 2;
|
|
551
|
+
const STEP_COMPLETE = 3;
|
|
517
552
|
;// CONCATENATED MODULE: ./src/utils/payment-providers/lawpay-provider.js
|
|
518
553
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
519
554
|
|
|
520
555
|
|
|
521
556
|
|
|
522
557
|
|
|
558
|
+
|
|
523
559
|
class LawPayProvider {
|
|
524
560
|
constructor({
|
|
525
561
|
reservation,
|
|
@@ -579,11 +615,11 @@ class LawPayProvider {
|
|
|
579
615
|
)(params)(this.dispatch).then(payload => {
|
|
580
616
|
this.dispatch(stopWidgetLoading());
|
|
581
617
|
this.dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
582
|
-
this.dispatch(changeStep(
|
|
618
|
+
this.dispatch(changeStep(STEP_COMPLETE));
|
|
583
619
|
return payload;
|
|
584
620
|
}).catch(e => {
|
|
585
621
|
this.dispatch(removeReservedTicket());
|
|
586
|
-
this.dispatch(changeStep(
|
|
622
|
+
this.dispatch(changeStep(STEP_PERSONAL_INFO));
|
|
587
623
|
this.dispatch(stopWidgetLoading());
|
|
588
624
|
return e;
|
|
589
625
|
}); // The payment has succeeded. Display a success message.
|
|
@@ -647,37 +683,6 @@ const getTicketMaxQuantity = ticket => {
|
|
|
647
683
|
|
|
648
684
|
|
|
649
685
|
|
|
650
|
-
;// CONCATENATED MODULE: ./src/utils/constants.js
|
|
651
|
-
/**
|
|
652
|
-
* Copyright 2022 OpenStack Foundation
|
|
653
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
654
|
-
* you may not use this file except in compliance with the License.
|
|
655
|
-
* You may obtain a copy of the License at
|
|
656
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
657
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
658
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
659
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
660
|
-
* See the License for the specific language governing permissions and
|
|
661
|
-
* limitations under the License.
|
|
662
|
-
**/
|
|
663
|
-
const AUTH_ERROR_MESSAGE = 'Missing Auth info';
|
|
664
|
-
const AUTH_ERROR_MISSING_REFRESH_TOKEN = "missing Refresh Token";
|
|
665
|
-
const AUTH_ERROR_REQUEST_FAILED = 'Request failed';
|
|
666
|
-
const VirtualAccessLevel = 'VIRTUAL';
|
|
667
|
-
const DefaultBGColor = '#000000';
|
|
668
|
-
const DefaultTextColor = '#FFFFFF';
|
|
669
|
-
const DefaultHintColor = 'rgb(58, 63, 65)';
|
|
670
|
-
const EMAIL_REGEXP = /(([^<>()\[\]\\.,;:\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,}))/;
|
|
671
|
-
const TICKET_OWNER_MYSELF = 'myself';
|
|
672
|
-
const TICKET_OWNER_SOMEONE = 'someoneElse';
|
|
673
|
-
const TICKET_OWNER_UNASSIGNED = 'unassigned';
|
|
674
|
-
const TICKET_TYPE_SUBTYPE_PREPAID = 'PrePaid';
|
|
675
|
-
const ORDER_STATUS_PAID = 'Paid';
|
|
676
|
-
const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';
|
|
677
|
-
const STEP_SELECT_TICKET_TYPE = 0;
|
|
678
|
-
const STEP_PERSONAL_INFO = 1;
|
|
679
|
-
const STEP_PAYMENT = 2;
|
|
680
|
-
const STEP_COMPLETE = 3;
|
|
681
686
|
;// CONCATENATED MODULE: ./src/utils/utils.js
|
|
682
687
|
|
|
683
688
|
|
|
@@ -1108,6 +1113,19 @@ const validatePromoCode = (ticketData, {
|
|
|
1108
1113
|
promoCode: currentPromoCode
|
|
1109
1114
|
}
|
|
1110
1115
|
} = getState();
|
|
1116
|
+
const {
|
|
1117
|
+
promoCode: formPromoCode
|
|
1118
|
+
} = ticketData;
|
|
1119
|
+
|
|
1120
|
+
if (formPromoCode && !currentPromoCode) {
|
|
1121
|
+
const defaultMessage = `You entered a promo code but it hasn't been applied. Make sure to click the 'Apply' button or remove it before continuing.`;
|
|
1122
|
+
const notAppliedCodeError = {
|
|
1123
|
+
body: {
|
|
1124
|
+
errors: [defaultMessage]
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
return onError(null, notAppliedCodeError);
|
|
1128
|
+
}
|
|
1111
1129
|
|
|
1112
1130
|
if (summitId && currentPromoCode) {
|
|
1113
1131
|
dispatch(startWidgetLoading());
|
|
@@ -1426,6 +1444,9 @@ const updateClock = timestamp => dispatch => {
|
|
|
1426
1444
|
};
|
|
1427
1445
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/security/actions"
|
|
1428
1446
|
const security_actions_namespaceObject = require("openstack-uicore-foundation/lib/security/actions");
|
|
1447
|
+
;// CONCATENATED MODULE: external "moment"
|
|
1448
|
+
const external_moment_namespaceObject = require("moment");
|
|
1449
|
+
var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_namespaceObject);
|
|
1429
1450
|
;// CONCATENATED MODULE: ./src/reducer.js
|
|
1430
1451
|
function reducer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1431
1452
|
|
|
@@ -1447,11 +1468,13 @@ function reducer_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
1447
1468
|
**/
|
|
1448
1469
|
|
|
1449
1470
|
|
|
1450
|
-
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
const localNowUtc = external_moment_default()().unix();
|
|
1451
1474
|
const DEFAULT_STATE = {
|
|
1452
1475
|
reservation: null,
|
|
1453
1476
|
checkout: null,
|
|
1454
|
-
step:
|
|
1477
|
+
step: STEP_SELECT_TICKET_TYPE,
|
|
1455
1478
|
widgetLoading: false,
|
|
1456
1479
|
passwordless: {
|
|
1457
1480
|
email: null,
|
|
@@ -2188,7 +2211,7 @@ const StripeForm = ({
|
|
|
2188
2211
|
}
|
|
2189
2212
|
}, stripeOptions?.style);
|
|
2190
2213
|
|
|
2191
|
-
const onSubmit = async data => {
|
|
2214
|
+
const onSubmit = async (data, ev) => {
|
|
2192
2215
|
setStripeErrors({});
|
|
2193
2216
|
|
|
2194
2217
|
if (!stripe) {
|
|
@@ -2197,6 +2220,8 @@ const StripeForm = ({
|
|
|
2197
2220
|
return;
|
|
2198
2221
|
}
|
|
2199
2222
|
|
|
2223
|
+
const btn = document.getElementById('payment-form-btn');
|
|
2224
|
+
if (btn) btn.disabled = true;
|
|
2200
2225
|
const cardElement = elements.getElement(react_stripe_js_namespaceObject.CardNumberElement); // @see https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement
|
|
2201
2226
|
|
|
2202
2227
|
const {
|
|
@@ -2222,14 +2247,20 @@ const StripeForm = ({
|
|
|
2222
2247
|
stripe,
|
|
2223
2248
|
zipCode: data.zipCode
|
|
2224
2249
|
});
|
|
2225
|
-
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
if (error) {
|
|
2254
|
+
if (btn) btn.disabled = false;
|
|
2255
|
+
|
|
2226
2256
|
if (stripeErrorCodeMap[error.code]) {
|
|
2227
2257
|
setStripeErrors({
|
|
2228
2258
|
[stripeErrorCodeMap[error.code].field]: stripeErrorCodeMap[error.code].message || error.message
|
|
2229
2259
|
});
|
|
2230
|
-
|
|
2231
|
-
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
2260
|
+
return;
|
|
2232
2261
|
}
|
|
2262
|
+
|
|
2263
|
+
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
2233
2264
|
}
|
|
2234
2265
|
};
|
|
2235
2266
|
|
|
@@ -2885,9 +2916,16 @@ const PromoCodeInput = ({
|
|
|
2885
2916
|
applyPromoCode,
|
|
2886
2917
|
promoCode,
|
|
2887
2918
|
removePromoCode,
|
|
2888
|
-
showMultipleTicketTexts
|
|
2919
|
+
showMultipleTicketTexts,
|
|
2920
|
+
onPromoCodeChange
|
|
2889
2921
|
}) => {
|
|
2890
2922
|
const [statePromoCode, setStatePromoCode] = (0,external_react_.useState)(promoCode);
|
|
2923
|
+
|
|
2924
|
+
const handlePromoCodeChange = value => {
|
|
2925
|
+
onPromoCodeChange(value);
|
|
2926
|
+
setStatePromoCode(value);
|
|
2927
|
+
};
|
|
2928
|
+
|
|
2891
2929
|
(0,external_react_.useEffect)(() => {
|
|
2892
2930
|
if (isEmptyString(promoCode)) setStatePromoCode('');
|
|
2893
2931
|
}, [promoCode]);
|
|
@@ -2899,7 +2937,7 @@ const PromoCodeInput = ({
|
|
|
2899
2937
|
className: `${promoCode ? promocode_input_index_module.promoCodeActive : ''}`,
|
|
2900
2938
|
type: "text",
|
|
2901
2939
|
value: statePromoCode,
|
|
2902
|
-
onChange: ev =>
|
|
2940
|
+
onChange: ev => handlePromoCodeChange(ev.target.value),
|
|
2903
2941
|
placeholder: "Enter your promo code",
|
|
2904
2942
|
onKeyDown: e => {
|
|
2905
2943
|
if (e.key === "Enter") applyPromoCode(statePromoCode);
|
|
@@ -3001,6 +3039,7 @@ const TicketTypeComponent = ({
|
|
|
3001
3039
|
(0,external_react_.useEffect)(() => {
|
|
3002
3040
|
if (reservation && reservation.tickets?.length > 0) {
|
|
3003
3041
|
setTicket(allowedTicketTypes.find(t => t.id === reservation.tickets[0].ticket_type_id));
|
|
3042
|
+
setQuantity(reservation.tickets.length);
|
|
3004
3043
|
}
|
|
3005
3044
|
}, []);
|
|
3006
3045
|
(0,external_react_.useEffect)(() => {
|
|
@@ -3031,6 +3070,12 @@ const TicketTypeComponent = ({
|
|
|
3031
3070
|
setQuantity(minQuantity);
|
|
3032
3071
|
};
|
|
3033
3072
|
|
|
3073
|
+
const handlePromoCodeChange = code => {
|
|
3074
|
+
changeForm({
|
|
3075
|
+
promoCode: code
|
|
3076
|
+
});
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3034
3079
|
const incrementQuantity = () => setQuantity(quantity + 1);
|
|
3035
3080
|
|
|
3036
3081
|
const decrementQuantity = () => setQuantity(quantity - 1);
|
|
@@ -3115,8 +3160,10 @@ const TicketTypeComponent = ({
|
|
|
3115
3160
|
promoCode: promoCode,
|
|
3116
3161
|
applyPromoCode: applyPromoCode,
|
|
3117
3162
|
showMultipleTicketTexts: showMultipleTicketTexts,
|
|
3118
|
-
removePromoCode: removePromoCode
|
|
3119
|
-
|
|
3163
|
+
removePromoCode: removePromoCode,
|
|
3164
|
+
onPromoCodeChange: handlePromoCodeChange
|
|
3165
|
+
}), promoCodeError && Object.values(promoCodeError).map((er, index) => /*#__PURE__*/external_react_default().createElement("div", {
|
|
3166
|
+
key: `error-${index}`,
|
|
3120
3167
|
className: `${ticket_type_index_module.promocodeError} alert alert-danger`
|
|
3121
3168
|
}, er))), showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
3122
3169
|
className: ticket_type_index_module.moreInfo,
|
|
@@ -3173,16 +3220,17 @@ const ButtonBarComponent = ({
|
|
|
3173
3220
|
}) => {
|
|
3174
3221
|
const {
|
|
3175
3222
|
ticketType,
|
|
3176
|
-
ticketQuantity
|
|
3223
|
+
ticketQuantity,
|
|
3224
|
+
promoCode
|
|
3177
3225
|
} = formValues || {};
|
|
3178
3226
|
const nextButtonText = inPersonDisclaimer && ticketType && isInPersonTicketType(ticketType) ? 'Accept' : 'Next';
|
|
3179
3227
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3180
3228
|
className: `${button_bar_index_module.outerWrapper}`
|
|
3181
|
-
}, step !==
|
|
3229
|
+
}, step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
3182
3230
|
className: `${button_bar_index_module.innerWrapper}`
|
|
3183
3231
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
3184
3232
|
className: button_bar_index_module.required
|
|
3185
|
-
}, step !==
|
|
3233
|
+
}, step !== STEP_SELECT_TICKET_TYPE && /*#__PURE__*/external_react_default().createElement("span", null, "* Required fields ", /*#__PURE__*/external_react_default().createElement("br", null), " ")), /*#__PURE__*/external_react_default().createElement("div", {
|
|
3186
3234
|
className: button_bar_index_module.actions
|
|
3187
3235
|
}, step !== STEP_SELECT_TICKET_TYPE && step !== STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3188
3236
|
className: `${button_bar_index_module.button} button`,
|
|
@@ -3194,7 +3242,8 @@ const ButtonBarComponent = ({
|
|
|
3194
3242
|
disabled: !ticketType,
|
|
3195
3243
|
className: `${button_bar_index_module.button} button`,
|
|
3196
3244
|
onClick: () => validatePromoCode(button_bar_objectSpread(button_bar_objectSpread({}, ticketType), {}, {
|
|
3197
|
-
ticketQuantity
|
|
3245
|
+
ticketQuantity,
|
|
3246
|
+
promoCode
|
|
3198
3247
|
}), onValidateError)
|
|
3199
3248
|
}, nextButtonText), step === STEP_PERSONAL_INFO && ticketType?.cost === 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3200
3249
|
className: `${button_bar_index_module.button} button`,
|
|
@@ -3206,6 +3255,7 @@ const ButtonBarComponent = ({
|
|
|
3206
3255
|
form: "personal-info-form"
|
|
3207
3256
|
}, "Next"), step === STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3208
3257
|
className: `${button_bar_index_module.button} button`,
|
|
3258
|
+
id: "payment-form-btn",
|
|
3209
3259
|
type: "submit",
|
|
3210
3260
|
form: "payment-form"
|
|
3211
3261
|
}, "Pay Now")))));
|
|
@@ -3461,7 +3511,7 @@ const TicketTaxesError = ({
|
|
|
3461
3511
|
|
|
3462
3512
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
3463
3513
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
3464
|
-
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypesAndTaxes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToMyOrders", "goToEvent", "profileData", "summitData", "supportEmail", "ticketOwned", "ownedTickets", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile", "handleCompanyError", "stripeOptions", "invitation", "loginInitialEmailInputValue", "getMyInvitation", "showMultipleTicketTexts", "noAllowedTicketsMessage", "ticketTaxesErrorMessage", "authErrorCallback", "clearWidgetState", "requestedTicketTypes", "allowPromoCodes", "showCompanyInput", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData", "closeWidget", "hasVirtualAccessLevel", "
|
|
3514
|
+
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypesAndTaxes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToMyOrders", "goToEvent", "profileData", "summitData", "supportEmail", "ticketOwned", "ownedTickets", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile", "handleCompanyError", "stripeOptions", "invitation", "loginInitialEmailInputValue", "getMyInvitation", "showMultipleTicketTexts", "noAllowedTicketsMessage", "ticketTaxesErrorMessage", "authErrorCallback", "clearWidgetState", "requestedTicketTypes", "allowPromoCodes", "showCompanyInput", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData", "closeWidget", "hasVirtualAccessLevel", "idpLogoLight", "idpLogoDark", "idpLogoAlt", "showCompanyInputDefaultOptions", "companyDDLOptions2Show", "promoCode", "hasDiscount", "getTicketDiscount", "removePromoCode", "applyPromoCode", "validatePromoCode"];
|
|
3465
3515
|
|
|
3466
3516
|
function registration_lite_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3467
3517
|
|
|
@@ -3584,8 +3634,9 @@ const RegistrationLite = _ref => {
|
|
|
3584
3634
|
loadProfileData,
|
|
3585
3635
|
closeWidget,
|
|
3586
3636
|
hasVirtualAccessLevel,
|
|
3587
|
-
|
|
3588
|
-
|
|
3637
|
+
idpLogoLight,
|
|
3638
|
+
idpLogoDark,
|
|
3639
|
+
idpLogoAlt,
|
|
3589
3640
|
showCompanyInputDefaultOptions,
|
|
3590
3641
|
companyDDLOptions2Show,
|
|
3591
3642
|
promoCode,
|
|
@@ -3602,11 +3653,13 @@ const RegistrationLite = _ref => {
|
|
|
3602
3653
|
ticketType: null,
|
|
3603
3654
|
ticketQuantity: 1,
|
|
3604
3655
|
personalInformation: null,
|
|
3605
|
-
paymentInformation: null
|
|
3656
|
+
paymentInformation: null,
|
|
3657
|
+
promoCode: null
|
|
3606
3658
|
},
|
|
3607
3659
|
errors: []
|
|
3608
3660
|
});
|
|
3609
3661
|
const [ticketTaxesError, setTicketTaxesError] = (0,external_react_.useState)(false);
|
|
3662
|
+
const [ticketTaxesLoaded, setTicketTaxesLoaded] = (0,external_react_.useState)(false);
|
|
3610
3663
|
const {
|
|
3611
3664
|
values: formValues,
|
|
3612
3665
|
errors: formErrors
|
|
@@ -3635,7 +3688,7 @@ const RegistrationLite = _ref => {
|
|
|
3635
3688
|
}));
|
|
3636
3689
|
|
|
3637
3690
|
if (!profileData) {
|
|
3638
|
-
changeStep(
|
|
3691
|
+
changeStep(STEP_SELECT_TICKET_TYPE);
|
|
3639
3692
|
}
|
|
3640
3693
|
}, []);
|
|
3641
3694
|
(0,external_react_.useEffect)(() => {
|
|
@@ -3645,8 +3698,8 @@ const RegistrationLite = _ref => {
|
|
|
3645
3698
|
}, [summitData, profileData]);
|
|
3646
3699
|
(0,external_react_.useEffect)(() => {
|
|
3647
3700
|
// check if there's personal information data and no ticket data to reset widget
|
|
3648
|
-
if (step >
|
|
3649
|
-
changeStep(
|
|
3701
|
+
if (step > STEP_SELECT_TICKET_TYPE && !registrationForm.values?.ticketType && !reservation) {
|
|
3702
|
+
changeStep(STEP_SELECT_TICKET_TYPE);
|
|
3650
3703
|
}
|
|
3651
3704
|
}, [registrationForm.values, step]);
|
|
3652
3705
|
(0,external_react_.useEffect)(() => {
|
|
@@ -3669,7 +3722,7 @@ const RegistrationLite = _ref => {
|
|
|
3669
3722
|
// Reset the step when closed to avoid unexpected behavior from `useEffect`s w/in other steps.
|
|
3670
3723
|
// (i.e., recalling `onPurchaseComplete` after a user completes one order, closes the window, and then reopens the registration widget)
|
|
3671
3724
|
const closeAndClearState = () => {
|
|
3672
|
-
changeStep(
|
|
3725
|
+
changeStep(STEP_SELECT_TICKET_TYPE);
|
|
3673
3726
|
clearWidgetState();
|
|
3674
3727
|
|
|
3675
3728
|
if (closeWidget) {
|
|
@@ -3689,6 +3742,7 @@ const RegistrationLite = _ref => {
|
|
|
3689
3742
|
|
|
3690
3743
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
3691
3744
|
setTicketTaxesError(false);
|
|
3745
|
+
setTicketTaxesLoaded(false);
|
|
3692
3746
|
getTicketTypesAndTaxes(summitId).then().catch(error => {
|
|
3693
3747
|
let {
|
|
3694
3748
|
message
|
|
@@ -3701,13 +3755,15 @@ const RegistrationLite = _ref => {
|
|
|
3701
3755
|
}
|
|
3702
3756
|
|
|
3703
3757
|
setTicketTaxesError(true);
|
|
3758
|
+
}).finally(() => {
|
|
3759
|
+
setTicketTaxesLoaded(true);
|
|
3704
3760
|
});
|
|
3705
3761
|
}; // if we dont have yet ticket types and we didnt requested so far for them but we are already logged in
|
|
3706
3762
|
// just dont render
|
|
3707
3763
|
|
|
3708
3764
|
|
|
3709
3765
|
if (ticketTypes.length === 0 && !requestedTicketTypes && profileData) return null;
|
|
3710
|
-
const allowedTicketTypes = ticketTypes.filter(tt => tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date);
|
|
3766
|
+
const allowedTicketTypes = ticketTaxesLoaded ? ticketTypes.filter(tt => tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date) : [];
|
|
3711
3767
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3712
3768
|
id: `${general_module.modal}`,
|
|
3713
3769
|
className: "modal is-active"
|
|
@@ -3733,10 +3789,10 @@ const RegistrationLite = _ref => {
|
|
|
3733
3789
|
className: "fa fa-close",
|
|
3734
3790
|
"aria-label": "close",
|
|
3735
3791
|
onClick: handleCloseClick
|
|
3736
|
-
})),
|
|
3792
|
+
})), profileData && ticketTaxesError && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3737
3793
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3738
3794
|
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData?.id)
|
|
3739
|
-
}),
|
|
3795
|
+
}), profileData && ticketTaxesLoaded && !ticketTaxesError && allowedTicketTypes.length === 0 && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3740
3796
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3741
3797
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3742
3798
|
className: general_module.stepsWrapper
|
|
@@ -3758,9 +3814,10 @@ const RegistrationLite = _ref => {
|
|
|
3758
3814
|
goToLogin: goToLogin,
|
|
3759
3815
|
getLoginCode: getLoginCode,
|
|
3760
3816
|
getPasswordlessCode: getPasswordlessCode,
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3817
|
+
idpLogoLight: idpLogoLight,
|
|
3818
|
+
idpLogoDark: idpLogoDark,
|
|
3819
|
+
idpLogoAlt: idpLogoAlt
|
|
3820
|
+
}), profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, ownedTickets.length > 0 && /*#__PURE__*/external_react_default().createElement(ticket_owned, {
|
|
3764
3821
|
ownedTickets: ownedTickets
|
|
3765
3822
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
3766
3823
|
allowedTicketTypes: allowedTicketTypes,
|
|
@@ -3849,7 +3906,7 @@ const RegistrationLite = _ref => {
|
|
|
3849
3906
|
orderComplete1stParagraph: rest.orderComplete1stParagraph,
|
|
3850
3907
|
orderComplete2ndParagraph: rest.orderComplete2ndParagraph,
|
|
3851
3908
|
orderCompleteButton: rest.orderCompleteButton
|
|
3852
|
-
})), !ticketTaxesError && profileData && step !==
|
|
3909
|
+
})), !ticketTaxesError && profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement(button_bar, {
|
|
3853
3910
|
step: step,
|
|
3854
3911
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
3855
3912
|
formValues: formValues,
|
|
@@ -3896,7 +3953,9 @@ RegistrationLite.defaultProps = {
|
|
|
3896
3953
|
hasVirtualAccessLevel: false,
|
|
3897
3954
|
supportEmail: 'support@fntech.com',
|
|
3898
3955
|
showCompanyInputDefaultOptions: false,
|
|
3899
|
-
companyDDLOptions2Show: 25
|
|
3956
|
+
companyDDLOptions2Show: 25,
|
|
3957
|
+
idpLogoLight: null,
|
|
3958
|
+
idpLogoDark: null
|
|
3900
3959
|
};
|
|
3901
3960
|
RegistrationLite.propTypes = {
|
|
3902
3961
|
loginInitialEmailInputValue: (external_prop_types_default()).string,
|