summit-registration-lite 5.0.4 → 5.0.6
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 +0 -2
- package/dist/components/login.js +1 -1
- package/dist/components/login.js.map +1 -1
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,8 +75,6 @@ React component for the summit registration lite widget
|
|
|
75
75
|
|
|
76
76
|
**showCompanyInput** = booleaen to show/hide the "Company" field. Defaults to true.
|
|
77
77
|
|
|
78
|
-
**companyInputPlaceholder**= string for the set the placeholder of the free text company input
|
|
79
|
-
|
|
80
78
|
**companyDDLPlaceholder** = string for the set the placeholder of the DDL company input
|
|
81
79
|
|
|
82
80
|
**logoDark** = string for custom src for dark theme logo on otp login
|
package/dist/components/login.js
CHANGED
|
@@ -183,7 +183,7 @@ const LoginComponent = ({
|
|
|
183
183
|
key: `provider-${o.provider_param}`,
|
|
184
184
|
"data-testid": "login-button",
|
|
185
185
|
style: {
|
|
186
|
-
color: o.
|
|
186
|
+
color: o.button_text_color ? o.button_text_color : '#ffffff',
|
|
187
187
|
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
188
188
|
backgroundColor: o.button_color,
|
|
189
189
|
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/login.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;ACVA;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA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2B;AACvB1C,EAAAA,YAAY,EAAEH,gDADS;AAEvBI,EAAAA,KAAK,EAAEJ,+CAFgB;AAGvBK,EAAAA,gBAAgB,EAAEL,oCAHK;AAIvBM,EAAAA,kBAAkB,EAAEN,oCAJG;AAKvBO,EAAAA,YAAY,EAAEP,+CALS;AAMvBQ,EAAAA,mBAAmB,EAAER,oCANE;AAOvBS,EAAAA,iBAAiB,EAAET,sCAPI;AAQvBU,EAAAA,KAAK,EAAEV,sCAAgBkD;AARA,CAA3B;AAWAhD,cAAc,CAACiD,YAAf,GAA8B;AAC1B9C,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeR,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"loginCode\":\"loginCode___dDBup\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from \"./index.module.scss\";\n\nconst LoginComponent = ({\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState();\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n if (isValid) {\n getLoginCode(email, getPasswordlessCode);\n }\n }\n\n return (\n <div className={`${styles.loginWrapper} step-wrapper`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {title}\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)}\n onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <button onClick={() => loginCode()} data-testid=\"email-button\">\n >\n </button>\n <br />\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email address</span>}\n </div>\n <span>Or you may login with one of the following:</span>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <button onClick={() => loginCode()} data-testid=\"email-button\">\n >\n </button>\n <br />\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["React","useState","PropTypes","styles","LoginComponent","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","loginWrapper","innerWrapper","input","e","target","value","ev","key","map","o","index","provider_param","button","color","button_border_color","border","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/login.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;ACVA;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA,mDAAe,CAAC,8JAA8J;;ACD9K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;AAEA,MAAMI,cAAc,GAAG,CAAC;AACpBC,EAAAA,YADoB;AAEpBC,EAAAA,KAFoB;AAGpBC,EAAAA,gBAHoB;AAIpBC,EAAAA,kBAJoB;AAKpBC,EAAAA,YALoB;AAMpBC,EAAAA,mBANoB;AAOpBC,EAAAA,iBAPoB;AAQpBC,EAAAA;AARoB,CAAD,KAQP;AAEZ,QAAM,CAACC,KAAD,EAAQC,QAAR,IAAoBb,4BAAQ,CAACU,iBAAD,CAAlC;AACA,QAAM,CAACI,UAAD,EAAaC,aAAb,IAA8Bf,4BAAQ,EAA5C;;AAEA,QAAMgB,YAAY,GAAIJ,KAAD,IAAW;AAC5B,UAAMK,EAAE,GAAG,uJAAX;AACA,WAAOA,EAAE,CAACC,IAAH,CAAQC,MAAM,CAACP,KAAD,CAAN,CAAcQ,WAAd,EAAR,CAAP;AACH,GAHD;;AAKA,QAAMC,SAAS,GAAG,MAAM;AACpB,QAAIC,OAAO,GAAGN,YAAY,CAACJ,KAAD,CAA1B;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AAQ,CAACa,CAAC,CAACC,MAAF,CAASC,KAAV,CAAhF;AAAkG,cAAU,EAAGC,EAAD,IAAQA,EAAE,CAACC,GAAH,KAAW,OAAX,GAAqBT,SAAS,EAA9B,GAAmC,IAAzJ;AAA+J,mBAAY;AAA3K,IADJ,eAEI;AAAQ,WAAO,EAAE,MAAMA,SAAS,EAAhC;AAAoC,mBAAY;AAAhD,SAFJ,eAKI,kDALJ,CAFJ,EASKP,UAAU,iBAAI;AAAM,mBAAY;AAAlB,yCATnB,CA9CR,CADJ,CADJ,CADJ;AAiEH,CA3FD;;AA6FAX,cAAc,CAAC4C,SAAf,GAA2B;AACvB3C,EAAAA,YAAY,EAAEH,gDADS;AAEvBI,EAAAA,KAAK,EAAEJ,+CAFgB;AAGvBK,EAAAA,gBAAgB,EAAEL,oCAHK;AAIvBM,EAAAA,kBAAkB,EAAEN,oCAJG;AAKvBO,EAAAA,YAAY,EAAEP,+CALS;AAMvBQ,EAAAA,mBAAmB,EAAER,oCANE;AAOvBS,EAAAA,iBAAiB,EAAET,sCAPI;AAQvBU,EAAAA,KAAK,EAAEV,sCAAgBmD;AARA,CAA3B;AAWAjD,cAAc,CAACkD,YAAf,GAA8B;AAC1B/C,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeR,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"loginCode\":\"loginCode___dDBup\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from \"./index.module.scss\";\n\nconst LoginComponent = ({\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState();\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n if (isValid) {\n getLoginCode(email, getPasswordlessCode);\n }\n }\n\n return (\n <div className={`${styles.loginWrapper} step-wrapper`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {title}\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)}\n onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <button onClick={() => loginCode()} data-testid=\"email-button\">\n >\n </button>\n <br />\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email address</span>}\n </div>\n <span>Or you may login with one of the following:</span>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_text_color ? o.button_text_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <button onClick={() => loginCode()} data-testid=\"email-button\">\n >\n </button>\n <br />\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["React","useState","PropTypes","styles","LoginComponent","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","loginWrapper","innerWrapper","input","e","target","value","ev","key","map","o","index","provider_param","button","color","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}
|
package/dist/index.js
CHANGED
|
@@ -252,7 +252,7 @@ const LoginComponent = ({
|
|
|
252
252
|
key: `provider-${o.provider_param}`,
|
|
253
253
|
"data-testid": "login-button",
|
|
254
254
|
style: {
|
|
255
|
-
color: o.
|
|
255
|
+
color: o.button_text_color ? o.button_text_color : '#ffffff',
|
|
256
256
|
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
257
257
|
backgroundColor: o.button_color,
|
|
258
258
|
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
@@ -2170,7 +2170,6 @@ const PersonalInfoComponent = ({
|
|
|
2170
2170
|
showMultipleTicketTexts,
|
|
2171
2171
|
allowPromoCodes,
|
|
2172
2172
|
showCompanyInput = true,
|
|
2173
|
-
companyInputPlaceholder,
|
|
2174
2173
|
companyDDLPlaceholder
|
|
2175
2174
|
}) => {
|
|
2176
2175
|
const [personalInfo, setPersonalInfo] = (0,external_react_.useState)({
|
|
@@ -2985,7 +2984,7 @@ const TicketTaxesError = ({
|
|
|
2985
2984
|
|
|
2986
2985
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
2987
2986
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
2988
|
-
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", "
|
|
2987
|
+
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", "logoLight", "logoDark"];
|
|
2989
2988
|
|
|
2990
2989
|
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; }
|
|
2991
2990
|
|
|
@@ -3100,7 +3099,6 @@ const RegistrationLite = _ref => {
|
|
|
3100
3099
|
requestedTicketTypes,
|
|
3101
3100
|
allowPromoCodes,
|
|
3102
3101
|
showCompanyInput,
|
|
3103
|
-
companyInputPlaceholder,
|
|
3104
3102
|
companyDDLPlaceholder,
|
|
3105
3103
|
nowUtc,
|
|
3106
3104
|
updateClock,
|
|
@@ -3184,9 +3182,23 @@ const RegistrationLite = _ref => {
|
|
|
3184
3182
|
const handleCloseClick = () => {
|
|
3185
3183
|
// Reset the step when closed to avoid unexpected behavior from `useEffect`s w/in other steps.
|
|
3186
3184
|
// (i.e., recalling `onPurchaseComplete` after a user completes one order, closes the window, and then reopens the registration widget)
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3185
|
+
const closeAndClearState = () => {
|
|
3186
|
+
changeStep(0);
|
|
3187
|
+
clearWidgetState();
|
|
3188
|
+
|
|
3189
|
+
if (closeWidget) {
|
|
3190
|
+
closeWidget();
|
|
3191
|
+
}
|
|
3192
|
+
}; // if there's a reservation on the state, delete it before close the widget
|
|
3193
|
+
|
|
3194
|
+
|
|
3195
|
+
if (reservation) {
|
|
3196
|
+
removeReservedTicket().finally(() => {
|
|
3197
|
+
closeAndClearState();
|
|
3198
|
+
});
|
|
3199
|
+
} else {
|
|
3200
|
+
closeAndClearState();
|
|
3201
|
+
}
|
|
3190
3202
|
};
|
|
3191
3203
|
|
|
3192
3204
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
@@ -3306,7 +3318,6 @@ const RegistrationLite = _ref => {
|
|
|
3306
3318
|
showMultipleTicketTexts: showMultipleTicketTexts,
|
|
3307
3319
|
allowPromoCodes: allowPromoCodes,
|
|
3308
3320
|
showCompanyInput: showCompanyInput,
|
|
3309
|
-
companyInputPlaceholder: companyInputPlaceholder,
|
|
3310
3321
|
companyDDLPlaceholder: companyDDLPlaceholder
|
|
3311
3322
|
}), /*#__PURE__*/external_react_default().createElement(external_react_spring_namespaceObject.animated.div, {
|
|
3312
3323
|
style: registration_lite_objectSpread({}, toggleAnimation)
|
|
@@ -3376,7 +3387,6 @@ RegistrationLite.defaultProps = {
|
|
|
3376
3387
|
noAllowedTicketsMessage: '<span>You already have purchased all available tickets for this event and/or there are no tickets available for you to purchase.</span><br/><span><a href="/a/my-tickets">Visit the my orders / my tickets page</a> to review your existing tickets.</span>',
|
|
3377
3388
|
ticketTaxesErrorMessage: '<span>There was an error getting the information for the tickets. Please try it again.</span>',
|
|
3378
3389
|
allowPromoCodes: true,
|
|
3379
|
-
companyInputPlaceholder: 'Enter your company',
|
|
3380
3390
|
companyDDLPlaceholder: 'Select a company',
|
|
3381
3391
|
authErrorCallback: error => {
|
|
3382
3392
|
console.log(error);
|