summit-registration-lite 5.0.25 → 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 +59 -20
- 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
|
|
|
@@ -1109,6 +1113,19 @@ const validatePromoCode = (ticketData, {
|
|
|
1109
1113
|
promoCode: currentPromoCode
|
|
1110
1114
|
}
|
|
1111
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
|
+
}
|
|
1112
1129
|
|
|
1113
1130
|
if (summitId && currentPromoCode) {
|
|
1114
1131
|
dispatch(startWidgetLoading());
|
|
@@ -2899,9 +2916,16 @@ const PromoCodeInput = ({
|
|
|
2899
2916
|
applyPromoCode,
|
|
2900
2917
|
promoCode,
|
|
2901
2918
|
removePromoCode,
|
|
2902
|
-
showMultipleTicketTexts
|
|
2919
|
+
showMultipleTicketTexts,
|
|
2920
|
+
onPromoCodeChange
|
|
2903
2921
|
}) => {
|
|
2904
2922
|
const [statePromoCode, setStatePromoCode] = (0,external_react_.useState)(promoCode);
|
|
2923
|
+
|
|
2924
|
+
const handlePromoCodeChange = value => {
|
|
2925
|
+
onPromoCodeChange(value);
|
|
2926
|
+
setStatePromoCode(value);
|
|
2927
|
+
};
|
|
2928
|
+
|
|
2905
2929
|
(0,external_react_.useEffect)(() => {
|
|
2906
2930
|
if (isEmptyString(promoCode)) setStatePromoCode('');
|
|
2907
2931
|
}, [promoCode]);
|
|
@@ -2913,7 +2937,7 @@ const PromoCodeInput = ({
|
|
|
2913
2937
|
className: `${promoCode ? promocode_input_index_module.promoCodeActive : ''}`,
|
|
2914
2938
|
type: "text",
|
|
2915
2939
|
value: statePromoCode,
|
|
2916
|
-
onChange: ev =>
|
|
2940
|
+
onChange: ev => handlePromoCodeChange(ev.target.value),
|
|
2917
2941
|
placeholder: "Enter your promo code",
|
|
2918
2942
|
onKeyDown: e => {
|
|
2919
2943
|
if (e.key === "Enter") applyPromoCode(statePromoCode);
|
|
@@ -3046,6 +3070,12 @@ const TicketTypeComponent = ({
|
|
|
3046
3070
|
setQuantity(minQuantity);
|
|
3047
3071
|
};
|
|
3048
3072
|
|
|
3073
|
+
const handlePromoCodeChange = code => {
|
|
3074
|
+
changeForm({
|
|
3075
|
+
promoCode: code
|
|
3076
|
+
});
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3049
3079
|
const incrementQuantity = () => setQuantity(quantity + 1);
|
|
3050
3080
|
|
|
3051
3081
|
const decrementQuantity = () => setQuantity(quantity - 1);
|
|
@@ -3130,8 +3160,10 @@ const TicketTypeComponent = ({
|
|
|
3130
3160
|
promoCode: promoCode,
|
|
3131
3161
|
applyPromoCode: applyPromoCode,
|
|
3132
3162
|
showMultipleTicketTexts: showMultipleTicketTexts,
|
|
3133
|
-
removePromoCode: removePromoCode
|
|
3134
|
-
|
|
3163
|
+
removePromoCode: removePromoCode,
|
|
3164
|
+
onPromoCodeChange: handlePromoCodeChange
|
|
3165
|
+
}), promoCodeError && Object.values(promoCodeError).map((er, index) => /*#__PURE__*/external_react_default().createElement("div", {
|
|
3166
|
+
key: `error-${index}`,
|
|
3135
3167
|
className: `${ticket_type_index_module.promocodeError} alert alert-danger`
|
|
3136
3168
|
}, er))), showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
3137
3169
|
className: ticket_type_index_module.moreInfo,
|
|
@@ -3188,7 +3220,8 @@ const ButtonBarComponent = ({
|
|
|
3188
3220
|
}) => {
|
|
3189
3221
|
const {
|
|
3190
3222
|
ticketType,
|
|
3191
|
-
ticketQuantity
|
|
3223
|
+
ticketQuantity,
|
|
3224
|
+
promoCode
|
|
3192
3225
|
} = formValues || {};
|
|
3193
3226
|
const nextButtonText = inPersonDisclaimer && ticketType && isInPersonTicketType(ticketType) ? 'Accept' : 'Next';
|
|
3194
3227
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3209,7 +3242,8 @@ const ButtonBarComponent = ({
|
|
|
3209
3242
|
disabled: !ticketType,
|
|
3210
3243
|
className: `${button_bar_index_module.button} button`,
|
|
3211
3244
|
onClick: () => validatePromoCode(button_bar_objectSpread(button_bar_objectSpread({}, ticketType), {}, {
|
|
3212
|
-
ticketQuantity
|
|
3245
|
+
ticketQuantity,
|
|
3246
|
+
promoCode
|
|
3213
3247
|
}), onValidateError)
|
|
3214
3248
|
}, nextButtonText), step === STEP_PERSONAL_INFO && ticketType?.cost === 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3215
3249
|
className: `${button_bar_index_module.button} button`,
|
|
@@ -3477,7 +3511,7 @@ const TicketTaxesError = ({
|
|
|
3477
3511
|
|
|
3478
3512
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
3479
3513
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
3480
|
-
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"];
|
|
3481
3515
|
|
|
3482
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; }
|
|
3483
3517
|
|
|
@@ -3600,8 +3634,9 @@ const RegistrationLite = _ref => {
|
|
|
3600
3634
|
loadProfileData,
|
|
3601
3635
|
closeWidget,
|
|
3602
3636
|
hasVirtualAccessLevel,
|
|
3603
|
-
|
|
3604
|
-
|
|
3637
|
+
idpLogoLight,
|
|
3638
|
+
idpLogoDark,
|
|
3639
|
+
idpLogoAlt,
|
|
3605
3640
|
showCompanyInputDefaultOptions,
|
|
3606
3641
|
companyDDLOptions2Show,
|
|
3607
3642
|
promoCode,
|
|
@@ -3618,7 +3653,8 @@ const RegistrationLite = _ref => {
|
|
|
3618
3653
|
ticketType: null,
|
|
3619
3654
|
ticketQuantity: 1,
|
|
3620
3655
|
personalInformation: null,
|
|
3621
|
-
paymentInformation: null
|
|
3656
|
+
paymentInformation: null,
|
|
3657
|
+
promoCode: null
|
|
3622
3658
|
},
|
|
3623
3659
|
errors: []
|
|
3624
3660
|
});
|
|
@@ -3778,8 +3814,9 @@ const RegistrationLite = _ref => {
|
|
|
3778
3814
|
goToLogin: goToLogin,
|
|
3779
3815
|
getLoginCode: getLoginCode,
|
|
3780
3816
|
getPasswordlessCode: getPasswordlessCode,
|
|
3781
|
-
|
|
3782
|
-
|
|
3817
|
+
idpLogoLight: idpLogoLight,
|
|
3818
|
+
idpLogoDark: idpLogoDark,
|
|
3819
|
+
idpLogoAlt: idpLogoAlt
|
|
3783
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, {
|
|
3784
3821
|
ownedTickets: ownedTickets
|
|
3785
3822
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
@@ -3916,7 +3953,9 @@ RegistrationLite.defaultProps = {
|
|
|
3916
3953
|
hasVirtualAccessLevel: false,
|
|
3917
3954
|
supportEmail: 'support@fntech.com',
|
|
3918
3955
|
showCompanyInputDefaultOptions: false,
|
|
3919
|
-
companyDDLOptions2Show: 25
|
|
3956
|
+
companyDDLOptions2Show: 25,
|
|
3957
|
+
idpLogoLight: null,
|
|
3958
|
+
idpLogoDark: null
|
|
3920
3959
|
};
|
|
3921
3960
|
RegistrationLite.propTypes = {
|
|
3922
3961
|
loginInitialEmailInputValue: (external_prop_types_default()).string,
|