summit-registration-lite 5.0.24 → 5.0.26
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
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;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAA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DADzC,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,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;ACNA,MAAM,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yC,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.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
|
|
|
@@ -1426,6 +1431,9 @@ const updateClock = timestamp => dispatch => {
|
|
|
1426
1431
|
};
|
|
1427
1432
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/security/actions"
|
|
1428
1433
|
const security_actions_namespaceObject = require("openstack-uicore-foundation/lib/security/actions");
|
|
1434
|
+
;// CONCATENATED MODULE: external "moment"
|
|
1435
|
+
const external_moment_namespaceObject = require("moment");
|
|
1436
|
+
var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_namespaceObject);
|
|
1429
1437
|
;// CONCATENATED MODULE: ./src/reducer.js
|
|
1430
1438
|
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
1439
|
|
|
@@ -1447,11 +1455,13 @@ function reducer_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
1447
1455
|
**/
|
|
1448
1456
|
|
|
1449
1457
|
|
|
1450
|
-
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
const localNowUtc = external_moment_default()().unix();
|
|
1451
1461
|
const DEFAULT_STATE = {
|
|
1452
1462
|
reservation: null,
|
|
1453
1463
|
checkout: null,
|
|
1454
|
-
step:
|
|
1464
|
+
step: STEP_SELECT_TICKET_TYPE,
|
|
1455
1465
|
widgetLoading: false,
|
|
1456
1466
|
passwordless: {
|
|
1457
1467
|
email: null,
|
|
@@ -2188,7 +2198,7 @@ const StripeForm = ({
|
|
|
2188
2198
|
}
|
|
2189
2199
|
}, stripeOptions?.style);
|
|
2190
2200
|
|
|
2191
|
-
const onSubmit = async data => {
|
|
2201
|
+
const onSubmit = async (data, ev) => {
|
|
2192
2202
|
setStripeErrors({});
|
|
2193
2203
|
|
|
2194
2204
|
if (!stripe) {
|
|
@@ -2197,6 +2207,8 @@ const StripeForm = ({
|
|
|
2197
2207
|
return;
|
|
2198
2208
|
}
|
|
2199
2209
|
|
|
2210
|
+
const btn = document.getElementById('payment-form-btn');
|
|
2211
|
+
if (btn) btn.disabled = true;
|
|
2200
2212
|
const cardElement = elements.getElement(react_stripe_js_namespaceObject.CardNumberElement); // @see https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement
|
|
2201
2213
|
|
|
2202
2214
|
const {
|
|
@@ -2222,14 +2234,20 @@ const StripeForm = ({
|
|
|
2222
2234
|
stripe,
|
|
2223
2235
|
zipCode: data.zipCode
|
|
2224
2236
|
});
|
|
2225
|
-
|
|
2237
|
+
return;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
if (error) {
|
|
2241
|
+
if (btn) btn.disabled = false;
|
|
2242
|
+
|
|
2226
2243
|
if (stripeErrorCodeMap[error.code]) {
|
|
2227
2244
|
setStripeErrors({
|
|
2228
2245
|
[stripeErrorCodeMap[error.code].field]: stripeErrorCodeMap[error.code].message || error.message
|
|
2229
2246
|
});
|
|
2230
|
-
|
|
2231
|
-
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
2247
|
+
return;
|
|
2232
2248
|
}
|
|
2249
|
+
|
|
2250
|
+
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
2233
2251
|
}
|
|
2234
2252
|
};
|
|
2235
2253
|
|
|
@@ -3001,6 +3019,7 @@ const TicketTypeComponent = ({
|
|
|
3001
3019
|
(0,external_react_.useEffect)(() => {
|
|
3002
3020
|
if (reservation && reservation.tickets?.length > 0) {
|
|
3003
3021
|
setTicket(allowedTicketTypes.find(t => t.id === reservation.tickets[0].ticket_type_id));
|
|
3022
|
+
setQuantity(reservation.tickets.length);
|
|
3004
3023
|
}
|
|
3005
3024
|
}, []);
|
|
3006
3025
|
(0,external_react_.useEffect)(() => {
|
|
@@ -3178,11 +3197,11 @@ const ButtonBarComponent = ({
|
|
|
3178
3197
|
const nextButtonText = inPersonDisclaimer && ticketType && isInPersonTicketType(ticketType) ? 'Accept' : 'Next';
|
|
3179
3198
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3180
3199
|
className: `${button_bar_index_module.outerWrapper}`
|
|
3181
|
-
}, step !==
|
|
3200
|
+
}, step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
3182
3201
|
className: `${button_bar_index_module.innerWrapper}`
|
|
3183
3202
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
3184
3203
|
className: button_bar_index_module.required
|
|
3185
|
-
}, step !==
|
|
3204
|
+
}, 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
3205
|
className: button_bar_index_module.actions
|
|
3187
3206
|
}, step !== STEP_SELECT_TICKET_TYPE && step !== STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3188
3207
|
className: `${button_bar_index_module.button} button`,
|
|
@@ -3206,6 +3225,7 @@ const ButtonBarComponent = ({
|
|
|
3206
3225
|
form: "personal-info-form"
|
|
3207
3226
|
}, "Next"), step === STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3208
3227
|
className: `${button_bar_index_module.button} button`,
|
|
3228
|
+
id: "payment-form-btn",
|
|
3209
3229
|
type: "submit",
|
|
3210
3230
|
form: "payment-form"
|
|
3211
3231
|
}, "Pay Now")))));
|
|
@@ -3461,7 +3481,7 @@ const TicketTaxesError = ({
|
|
|
3461
3481
|
|
|
3462
3482
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
3463
3483
|
;// 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", "
|
|
3484
|
+
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
3485
|
|
|
3466
3486
|
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
3487
|
|
|
@@ -3584,8 +3604,9 @@ const RegistrationLite = _ref => {
|
|
|
3584
3604
|
loadProfileData,
|
|
3585
3605
|
closeWidget,
|
|
3586
3606
|
hasVirtualAccessLevel,
|
|
3587
|
-
|
|
3588
|
-
|
|
3607
|
+
idpLogoLight,
|
|
3608
|
+
idpLogoDark,
|
|
3609
|
+
idpLogoAlt,
|
|
3589
3610
|
showCompanyInputDefaultOptions,
|
|
3590
3611
|
companyDDLOptions2Show,
|
|
3591
3612
|
promoCode,
|
|
@@ -3607,6 +3628,7 @@ const RegistrationLite = _ref => {
|
|
|
3607
3628
|
errors: []
|
|
3608
3629
|
});
|
|
3609
3630
|
const [ticketTaxesError, setTicketTaxesError] = (0,external_react_.useState)(false);
|
|
3631
|
+
const [ticketTaxesLoaded, setTicketTaxesLoaded] = (0,external_react_.useState)(false);
|
|
3610
3632
|
const {
|
|
3611
3633
|
values: formValues,
|
|
3612
3634
|
errors: formErrors
|
|
@@ -3635,7 +3657,7 @@ const RegistrationLite = _ref => {
|
|
|
3635
3657
|
}));
|
|
3636
3658
|
|
|
3637
3659
|
if (!profileData) {
|
|
3638
|
-
changeStep(
|
|
3660
|
+
changeStep(STEP_SELECT_TICKET_TYPE);
|
|
3639
3661
|
}
|
|
3640
3662
|
}, []);
|
|
3641
3663
|
(0,external_react_.useEffect)(() => {
|
|
@@ -3645,8 +3667,8 @@ const RegistrationLite = _ref => {
|
|
|
3645
3667
|
}, [summitData, profileData]);
|
|
3646
3668
|
(0,external_react_.useEffect)(() => {
|
|
3647
3669
|
// check if there's personal information data and no ticket data to reset widget
|
|
3648
|
-
if (step >
|
|
3649
|
-
changeStep(
|
|
3670
|
+
if (step > STEP_SELECT_TICKET_TYPE && !registrationForm.values?.ticketType && !reservation) {
|
|
3671
|
+
changeStep(STEP_SELECT_TICKET_TYPE);
|
|
3650
3672
|
}
|
|
3651
3673
|
}, [registrationForm.values, step]);
|
|
3652
3674
|
(0,external_react_.useEffect)(() => {
|
|
@@ -3669,7 +3691,7 @@ const RegistrationLite = _ref => {
|
|
|
3669
3691
|
// Reset the step when closed to avoid unexpected behavior from `useEffect`s w/in other steps.
|
|
3670
3692
|
// (i.e., recalling `onPurchaseComplete` after a user completes one order, closes the window, and then reopens the registration widget)
|
|
3671
3693
|
const closeAndClearState = () => {
|
|
3672
|
-
changeStep(
|
|
3694
|
+
changeStep(STEP_SELECT_TICKET_TYPE);
|
|
3673
3695
|
clearWidgetState();
|
|
3674
3696
|
|
|
3675
3697
|
if (closeWidget) {
|
|
@@ -3689,6 +3711,7 @@ const RegistrationLite = _ref => {
|
|
|
3689
3711
|
|
|
3690
3712
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
3691
3713
|
setTicketTaxesError(false);
|
|
3714
|
+
setTicketTaxesLoaded(false);
|
|
3692
3715
|
getTicketTypesAndTaxes(summitId).then().catch(error => {
|
|
3693
3716
|
let {
|
|
3694
3717
|
message
|
|
@@ -3701,13 +3724,15 @@ const RegistrationLite = _ref => {
|
|
|
3701
3724
|
}
|
|
3702
3725
|
|
|
3703
3726
|
setTicketTaxesError(true);
|
|
3727
|
+
}).finally(() => {
|
|
3728
|
+
setTicketTaxesLoaded(true);
|
|
3704
3729
|
});
|
|
3705
3730
|
}; // if we dont have yet ticket types and we didnt requested so far for them but we are already logged in
|
|
3706
3731
|
// just dont render
|
|
3707
3732
|
|
|
3708
3733
|
|
|
3709
3734
|
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);
|
|
3735
|
+
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
3736
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3712
3737
|
id: `${general_module.modal}`,
|
|
3713
3738
|
className: "modal is-active"
|
|
@@ -3733,10 +3758,10 @@ const RegistrationLite = _ref => {
|
|
|
3733
3758
|
className: "fa fa-close",
|
|
3734
3759
|
"aria-label": "close",
|
|
3735
3760
|
onClick: handleCloseClick
|
|
3736
|
-
})),
|
|
3761
|
+
})), profileData && ticketTaxesError && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3737
3762
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3738
3763
|
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData?.id)
|
|
3739
|
-
}),
|
|
3764
|
+
}), profileData && ticketTaxesLoaded && !ticketTaxesError && allowedTicketTypes.length === 0 && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3740
3765
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3741
3766
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3742
3767
|
className: general_module.stepsWrapper
|
|
@@ -3758,9 +3783,10 @@ const RegistrationLite = _ref => {
|
|
|
3758
3783
|
goToLogin: goToLogin,
|
|
3759
3784
|
getLoginCode: getLoginCode,
|
|
3760
3785
|
getPasswordlessCode: getPasswordlessCode,
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3786
|
+
idpLogoLight: idpLogoLight,
|
|
3787
|
+
idpLogoDark: idpLogoDark,
|
|
3788
|
+
idpLogoAlt: idpLogoAlt
|
|
3789
|
+
}), 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
3790
|
ownedTickets: ownedTickets
|
|
3765
3791
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
3766
3792
|
allowedTicketTypes: allowedTicketTypes,
|
|
@@ -3849,7 +3875,7 @@ const RegistrationLite = _ref => {
|
|
|
3849
3875
|
orderComplete1stParagraph: rest.orderComplete1stParagraph,
|
|
3850
3876
|
orderComplete2ndParagraph: rest.orderComplete2ndParagraph,
|
|
3851
3877
|
orderCompleteButton: rest.orderCompleteButton
|
|
3852
|
-
})), !ticketTaxesError && profileData && step !==
|
|
3878
|
+
})), !ticketTaxesError && profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement(button_bar, {
|
|
3853
3879
|
step: step,
|
|
3854
3880
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
3855
3881
|
formValues: formValues,
|
|
@@ -3896,7 +3922,9 @@ RegistrationLite.defaultProps = {
|
|
|
3896
3922
|
hasVirtualAccessLevel: false,
|
|
3897
3923
|
supportEmail: 'support@fntech.com',
|
|
3898
3924
|
showCompanyInputDefaultOptions: false,
|
|
3899
|
-
companyDDLOptions2Show: 25
|
|
3925
|
+
companyDDLOptions2Show: 25,
|
|
3926
|
+
idpLogoLight: null,
|
|
3927
|
+
idpLogoDark: null
|
|
3900
3928
|
};
|
|
3901
3929
|
RegistrationLite.propTypes = {
|
|
3902
3930
|
loginInitialEmailInputValue: (external_prop_types_default()).string,
|