summit-registration-lite 5.0.15 → 5.0.17
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/dist/components/login.css +1 -1
- package/dist/components/login.js +29 -9
- package/dist/components/login.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +91 -59
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:28px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.loginCode___dDBup{margin-bottom:10px;font-size:
|
|
1
|
+
.loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:28px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.primaryEmailButton___gH1fC{background-color:var(--color_primary)}.buttonDisabled___T9tkn{background-color:var(--color_text_input_hints)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;color:var(--color_primary_contrast);width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0;color:#fff}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:16px !important;font-weight:bold;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
|
|
2
2
|
|
package/dist/components/login.js
CHANGED
|
@@ -111,9 +111,12 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
111
111
|
// EXTERNAL MODULE: external "prop-types"
|
|
112
112
|
var external_prop_types_ = __webpack_require__(580);
|
|
113
113
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
114
|
+
;// CONCATENATED MODULE: external "@mui/icons-material/EmailRounded"
|
|
115
|
+
const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded");
|
|
116
|
+
var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
|
|
114
117
|
;// CONCATENATED MODULE: ./src/components/login/index.module.scss
|
|
115
118
|
// extracted by mini-css-extract-plugin
|
|
116
|
-
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","input":"input___QR9sA"});
|
|
119
|
+
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
|
|
117
120
|
;// CONCATENATED MODULE: ./src/components/login/index.js
|
|
118
121
|
/**
|
|
119
122
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -131,7 +134,9 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
131
134
|
|
|
132
135
|
|
|
133
136
|
|
|
137
|
+
|
|
134
138
|
const LoginComponent = ({
|
|
139
|
+
summitData,
|
|
135
140
|
loginOptions,
|
|
136
141
|
login,
|
|
137
142
|
allowsNativeAuth,
|
|
@@ -164,7 +169,10 @@ const LoginComponent = ({
|
|
|
164
169
|
className: `${index_module.innerWrapper}`
|
|
165
170
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
166
171
|
className: index_module.loginCode
|
|
167
|
-
},
|
|
172
|
+
}, summitData?.secondary_logo && /*#__PURE__*/external_react_default().createElement("img", {
|
|
173
|
+
className: "login-logo",
|
|
174
|
+
src: `${summitData?.secondary_logo}`
|
|
175
|
+
}), title, /*#__PURE__*/external_react_default().createElement("div", {
|
|
168
176
|
className: index_module.input
|
|
169
177
|
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
170
178
|
placeholder: "youremail@example.com",
|
|
@@ -172,12 +180,19 @@ const LoginComponent = ({
|
|
|
172
180
|
onChange: e => setEmail(e.target.value),
|
|
173
181
|
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
174
182
|
"data-testid": "email-input"
|
|
175
|
-
}), /*#__PURE__*/external_react_default().createElement("
|
|
183
|
+
})), /*#__PURE__*/external_react_default().createElement("div", {
|
|
176
184
|
onClick: () => loginCode(),
|
|
177
|
-
"data-testid": "email-button"
|
|
178
|
-
|
|
185
|
+
"data-testid": "email-button",
|
|
186
|
+
className: `${index_module.button} ${index_module.email_login_button} ${email === '' ? `${index_module.pointerDisabled} ${index_module.buttonDisabled}` : `${index_module.primaryEmailButton}`}`
|
|
187
|
+
}, /*#__PURE__*/external_react_default().createElement((EmailRounded_default()), {
|
|
188
|
+
style: {
|
|
189
|
+
fontSize: '20px'
|
|
190
|
+
}
|
|
191
|
+
}), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a login code")), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
179
192
|
"data-testid": "email-error"
|
|
180
|
-
}, "Please enter a valid email address")
|
|
193
|
+
}, "Please enter a valid email address"), /*#__PURE__*/external_react_default().createElement("h2", {
|
|
194
|
+
className: index_module.h2Styled
|
|
195
|
+
}, "or")), loginOptions.map((o, index) => {
|
|
181
196
|
return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
182
197
|
className: `${index_module.button}`,
|
|
183
198
|
key: `provider-${o.provider_param}`,
|
|
@@ -213,10 +228,15 @@ const LoginComponent = ({
|
|
|
213
228
|
onChange: e => setEmail(e.target.value),
|
|
214
229
|
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
215
230
|
"data-testid": "email-input"
|
|
216
|
-
}), /*#__PURE__*/external_react_default().createElement("
|
|
231
|
+
}), /*#__PURE__*/external_react_default().createElement("br", null)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
217
232
|
onClick: () => loginCode(),
|
|
218
|
-
"data-testid": "email-button"
|
|
219
|
-
|
|
233
|
+
"data-testid": "email-button",
|
|
234
|
+
className: "button",
|
|
235
|
+
style: {
|
|
236
|
+
background: "#000",
|
|
237
|
+
color: "#fff"
|
|
238
|
+
}
|
|
239
|
+
}, "Email me a login code"), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
220
240
|
"data-testid": "email-error"
|
|
221
241
|
}, "Please enter a valid email adress")))));
|
|
222
242
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/login.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;ACVA;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA,mDAAe,CAAC,8JAA8J;;ACD9K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;AAEA,MAAMI,cAAc,GAAG,CAAC;AACpBC,EAAAA,YADoB;AAEpBC,EAAAA,KAFoB;AAGpBC,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,IAA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efinition","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":""}
|
|
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,MAAM,4BAA4B;;;ACAlC;AACA,mDAAe,CAAC,sXA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OAAX,GAAqBV,SAAS,EAA9B,GAAmC,IAAzJ;AAA+J,mBAAY;AAA3K,IADJ,eAEI,kDAFJ,CAFJ,eAMI;AAAK,WAAO,EAAE,MAAMA,SAAS,EAA7B;AAAiC,mBAAY,cAA7C;AAA4D,aAAS,EAAC,QAAtE;AAA+E,SAAK,EAAE;AAAEiC,MAAAA,UAAU,EAAE,MAAd;AAAsBX,MAAAA,KAAK,EAAE;AAA7B;AAAtF,6BANJ,EASK7B,UAAU,iBAAI;AAAM,mBAAY;AAAlB,yCATnB,CAhDR,CADJ,CADJ,CADJ;AAmEH,CA9FD;;AAgGAZ,cAAc,CAACqD,SAAf,GAA2B;AACvBnD,EAAAA,YAAY,EAAEL,gDADS;AAEvBM,EAAAA,KAAK,EAAEN,+CAFgB;AAGvBO,EAAAA,gBAAgB,EAAEP,oCAHK;AAIvBQ,EAAAA,kBAAkB,EAAER,oCAJG;AAKvBS,EAAAA,YAAY,EAAET,+CALS;AAMvBU,EAAAA,mBAAmB,EAAEV,oCANE;AAOvBW,EAAAA,iBAAiB,EAAEX,sCAPI;AAQvBY,EAAAA,KAAK,EAAEZ,sCAAgB6D;AARA,CAA3B;AAWA1D,cAAc,CAAC2D,YAAf,GAA8B;AAC1BvD,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeT,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"@mui/icons-material/EmailRounded\"","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/EmailRounded\");","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"loginCode\":\"loginCode___dDBup\",\"primaryEmailButton\":\"primaryEmailButton___gH1fC\",\"buttonDisabled\":\"buttonDisabled___T9tkn\",\"pointerDisabled\":\"pointerDisabled___qt_HK\",\"email_login_button\":\"email_login_button___seiLi\",\"h2Styled\":\"h2Styled___rfIKD\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport EmailRoundedIcon from '@mui/icons-material/EmailRounded';\n\nimport styles from \"./index.module.scss\";\n\nconst LoginComponent = ({\n summitData,\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState();\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n if (isValid) {\n getLoginCode(email, getPasswordlessCode);\n }\n }\n \n return (\n <div className={`${styles.loginWrapper} step-wrapper`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {summitData?.secondary_logo && <img className=\"login-logo\" src={`${summitData?.secondary_logo}`} />}\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 </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\"\n className={`${styles.button} ${styles.email_login_button} ${email === '' ? `${styles.pointerDisabled} ${styles.buttonDisabled}` : `${styles.primaryEmailButton}`}`}>\n <EmailRoundedIcon style={{ fontSize: '20px' }} />\n <span>Email me a login code</span>\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email address</span>}\n <h2 className={styles.h2Styled}>or</h2>\n </div>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_text_color ? o.button_text_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <br />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" className=\"button\" style={{ background: \"#000\", color: \"#fff\"}}>\n Email me a login code\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["React","useState","PropTypes","EmailRoundedIcon","styles","LoginComponent","summitData","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","loginWrapper","innerWrapper","secondary_logo","input","e","target","value","ev","key","button","email_login_button","pointerDisabled","buttonDisabled","primaryEmailButton","fontSize","h2Styled","map","o","index","provider_param","color","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","background","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}
|
package/dist/index.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.step-wrapper{padding:10px;margin:10px;border:1px solid var(--color_input_border_color);border-radius:5px}.summit-registration-lite{color:var(--color_text_dark);font-size:15px;font-smooth:auto !important;-moz-osx-font-smoothing:auto !important;-webkit-font-smoothing:auto !important}.summit-registration-lite input:-moz-placeholder,.summit-registration-lite input::-moz-placeholder{opacity:1}input{outline:none}.registration_company_dll .registration_company_dll_prefix__control{border:1px solid var(--color_primary) !important;border-radius:5px !important}
|
|
4
4
|
|
|
5
|
-
.loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:28px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.loginCode___dDBup{margin-bottom:10px;font-size:
|
|
5
|
+
.loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;background-color:red;color:white;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:28px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px;color:#e5424d}.primaryEmailButton___gH1fC{background-color:var(--color_primary)}.buttonDisabled___T9tkn{background-color:var(--color_text_input_hints)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;color:var(--color_primary_contrast);width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0;color:#fff}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:16px !important;font-weight:bold;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
|
|
6
6
|
|
|
7
7
|
.title___LksVm{font-weight:bold;cursor:pointer}.form___v5GIx{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___v5GIx div.fieldWrapper___Eoe61{width:48%;border-radius:5px;color:var(--color_input_text_color);border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);height:36px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.form___v5GIx div.fieldWrapper___Eoe61:first-of-type{width:100%}.form___v5GIx div.fieldWrapper___Eoe61 input{width:100%;background-color:transparent;border:none}.form___v5GIx div.fieldWrapper___Eoe61 input:focus-visible{outline:none}.form___v5GIx div.fieldWrapper___Eoe61 i{position:relative}.form___v5GIx div.fieldWrapper___Eoe61>div{width:100%}.form___v5GIx div.fieldWrapper___Eoe61>div:first-of-type{width:95%}.form___v5GIx input{width:48%;border-radius:5px;color:var(--color_input_text_color);border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);font-size:16px;height:36px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:5px;font-weight:bold}.form___v5GIx input::placeholder{color:var(--color_text_input_hints)}
|
|
8
8
|
|
package/dist/index.js
CHANGED
|
@@ -164,7 +164,7 @@ PasswordlessLoginComponent.propTypes = {
|
|
|
164
164
|
|
|
165
165
|
/***/ }),
|
|
166
166
|
|
|
167
|
-
/***/
|
|
167
|
+
/***/ 462:
|
|
168
168
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
169
169
|
|
|
170
170
|
"use strict";
|
|
@@ -180,9 +180,12 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
180
180
|
// EXTERNAL MODULE: external "prop-types"
|
|
181
181
|
var external_prop_types_ = __webpack_require__(580);
|
|
182
182
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
183
|
+
;// CONCATENATED MODULE: external "@mui/icons-material/EmailRounded"
|
|
184
|
+
const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded");
|
|
185
|
+
var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
|
|
183
186
|
;// CONCATENATED MODULE: ./src/components/login/index.module.scss
|
|
184
187
|
// extracted by mini-css-extract-plugin
|
|
185
|
-
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","input":"input___QR9sA"});
|
|
188
|
+
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
|
|
186
189
|
;// CONCATENATED MODULE: ./src/components/login/index.js
|
|
187
190
|
/**
|
|
188
191
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -200,7 +203,9 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
200
203
|
|
|
201
204
|
|
|
202
205
|
|
|
206
|
+
|
|
203
207
|
const LoginComponent = ({
|
|
208
|
+
summitData,
|
|
204
209
|
loginOptions,
|
|
205
210
|
login,
|
|
206
211
|
allowsNativeAuth,
|
|
@@ -233,7 +238,10 @@ const LoginComponent = ({
|
|
|
233
238
|
className: `${index_module.innerWrapper}`
|
|
234
239
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
235
240
|
className: index_module.loginCode
|
|
236
|
-
},
|
|
241
|
+
}, summitData?.secondary_logo && /*#__PURE__*/external_react_default().createElement("img", {
|
|
242
|
+
className: "login-logo",
|
|
243
|
+
src: `${summitData?.secondary_logo}`
|
|
244
|
+
}), title, /*#__PURE__*/external_react_default().createElement("div", {
|
|
237
245
|
className: index_module.input
|
|
238
246
|
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
239
247
|
placeholder: "youremail@example.com",
|
|
@@ -241,12 +249,19 @@ const LoginComponent = ({
|
|
|
241
249
|
onChange: e => setEmail(e.target.value),
|
|
242
250
|
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
243
251
|
"data-testid": "email-input"
|
|
244
|
-
}), /*#__PURE__*/external_react_default().createElement("
|
|
252
|
+
})), /*#__PURE__*/external_react_default().createElement("div", {
|
|
245
253
|
onClick: () => loginCode(),
|
|
246
|
-
"data-testid": "email-button"
|
|
247
|
-
|
|
254
|
+
"data-testid": "email-button",
|
|
255
|
+
className: `${index_module.button} ${index_module.email_login_button} ${email === '' ? `${index_module.pointerDisabled} ${index_module.buttonDisabled}` : `${index_module.primaryEmailButton}`}`
|
|
256
|
+
}, /*#__PURE__*/external_react_default().createElement((EmailRounded_default()), {
|
|
257
|
+
style: {
|
|
258
|
+
fontSize: '20px'
|
|
259
|
+
}
|
|
260
|
+
}), /*#__PURE__*/external_react_default().createElement("span", null, "Email me a login code")), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
248
261
|
"data-testid": "email-error"
|
|
249
|
-
}, "Please enter a valid email address")
|
|
262
|
+
}, "Please enter a valid email address"), /*#__PURE__*/external_react_default().createElement("h2", {
|
|
263
|
+
className: index_module.h2Styled
|
|
264
|
+
}, "or")), loginOptions.map((o, index) => {
|
|
250
265
|
return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
251
266
|
className: `${index_module.button}`,
|
|
252
267
|
key: `provider-${o.provider_param}`,
|
|
@@ -282,10 +297,15 @@ const LoginComponent = ({
|
|
|
282
297
|
onChange: e => setEmail(e.target.value),
|
|
283
298
|
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
284
299
|
"data-testid": "email-input"
|
|
285
|
-
}), /*#__PURE__*/external_react_default().createElement("
|
|
300
|
+
}), /*#__PURE__*/external_react_default().createElement("br", null)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
286
301
|
onClick: () => loginCode(),
|
|
287
|
-
"data-testid": "email-button"
|
|
288
|
-
|
|
302
|
+
"data-testid": "email-button",
|
|
303
|
+
className: "button",
|
|
304
|
+
style: {
|
|
305
|
+
background: "#000",
|
|
306
|
+
color: "#fff"
|
|
307
|
+
}
|
|
308
|
+
}, "Email me a login code"), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
289
309
|
"data-testid": "email-error"
|
|
290
310
|
}, "Please enter a valid email adress")))));
|
|
291
311
|
};
|
|
@@ -1431,8 +1451,8 @@ var clock_default = /*#__PURE__*/__webpack_require__.n(clock_namespaceObject);
|
|
|
1431
1451
|
;// CONCATENATED MODULE: ./src/styles/general.module.scss
|
|
1432
1452
|
// extracted by mini-css-extract-plugin
|
|
1433
1453
|
/* harmony default export */ const general_module = ({"modal":"modal___G3Cmq","modalContent":"modalContent___lIaqw","outerWrapper":"outerWrapper___OWXyi","innerWrapper":"innerWrapper___mIrBF","title":"title___Tbvkl"});
|
|
1434
|
-
// EXTERNAL MODULE: ./src/components/login/index.js +
|
|
1435
|
-
var login = __webpack_require__(
|
|
1454
|
+
// EXTERNAL MODULE: ./src/components/login/index.js + 2 modules
|
|
1455
|
+
var login = __webpack_require__(462);
|
|
1436
1456
|
;// CONCATENATED MODULE: ./src/components/payment/index.module.scss
|
|
1437
1457
|
// extracted by mini-css-extract-plugin
|
|
1438
1458
|
/* harmony default export */ const index_module = ({"title":"title___LksVm","form":"form___v5GIx","fieldWrapper":"fieldWrapper___Eoe61"});
|
|
@@ -2529,6 +2549,54 @@ const getTicketMaxQuantity = ticket => ticket ? Math.min((ticket.quantity_2_sell
|
|
|
2529
2549
|
;// CONCATENATED MODULE: ./src/components/ticket-dropdown/index.module.scss
|
|
2530
2550
|
// extracted by mini-css-extract-plugin
|
|
2531
2551
|
/* harmony default export */ const ticket_dropdown_index_module = ({"placeholder":"placeholder___pcdCn","selectedTicket":"selectedTicket___qkbpH","inPersonDisclaimer":"inPersonDisclaimer___z_DzO","dropdown":"dropdown___mfbPG","soldOut":"soldOut___rBLC0"});
|
|
2552
|
+
;// CONCATENATED MODULE: ./src/utils/utils.js
|
|
2553
|
+
/**
|
|
2554
|
+
* Copyright 2022 OpenStack Foundation
|
|
2555
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2556
|
+
* you may not use this file except in compliance with the License.
|
|
2557
|
+
* You may obtain a copy of the License at
|
|
2558
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2559
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2560
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2561
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2562
|
+
* See the License for the specific language governing permissions and
|
|
2563
|
+
* limitations under the License.
|
|
2564
|
+
**/
|
|
2565
|
+
const getCurrentProvider = summit => {
|
|
2566
|
+
for (let profile of summit.payment_profiles) {
|
|
2567
|
+
if (profile.application_type === 'Registration') {
|
|
2568
|
+
return {
|
|
2569
|
+
publicKey: profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key,
|
|
2570
|
+
provider: profile.provider
|
|
2571
|
+
};
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
return {
|
|
2576
|
+
publicKey: null,
|
|
2577
|
+
provider: ''
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
const ticketHasAccessLevel = (ticket, accessLevel) => {
|
|
2581
|
+
if (!ticket) return false;
|
|
2582
|
+
return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);
|
|
2583
|
+
};
|
|
2584
|
+
const getCurrentUserLanguage = () => {
|
|
2585
|
+
let language = 'en';
|
|
2586
|
+
|
|
2587
|
+
if (typeof navigator !== 'undefined') {
|
|
2588
|
+
language = navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
return language;
|
|
2592
|
+
};
|
|
2593
|
+
const isEmptyString = val => {
|
|
2594
|
+
return typeof val === 'string' && val.trim().length == 0;
|
|
2595
|
+
};
|
|
2596
|
+
const getTicketTaxes = (ticket, taxes) => {
|
|
2597
|
+
const ticketTaxes = taxes.filter(tax => tax.ticket_types.includes(ticket?.id));
|
|
2598
|
+
return `${ticketTaxes.length > 0 ? ` plus ${taxes.map(t => t.name).join(' & ')}` : ''}`;
|
|
2599
|
+
};
|
|
2532
2600
|
;// CONCATENATED MODULE: ./src/components/ticket-dropdown/index.js
|
|
2533
2601
|
/**
|
|
2534
2602
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -2546,9 +2614,11 @@ const getTicketMaxQuantity = ticket => ticket ? Math.min((ticket.quantity_2_sell
|
|
|
2546
2614
|
|
|
2547
2615
|
|
|
2548
2616
|
|
|
2617
|
+
|
|
2549
2618
|
const TicketDropdownComponent = ({
|
|
2550
2619
|
selectedTicket,
|
|
2551
2620
|
ticketTypes,
|
|
2621
|
+
taxTypes,
|
|
2552
2622
|
onTicketSelect
|
|
2553
2623
|
}) => {
|
|
2554
2624
|
const [active, setActive] = (0,external_react_.useState)(false);
|
|
@@ -2567,7 +2637,8 @@ const TicketDropdownComponent = ({
|
|
|
2567
2637
|
}, selectedTicket ? /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", {
|
|
2568
2638
|
className: ticket_dropdown_index_module.selectedTicket,
|
|
2569
2639
|
"data-testid": "selected-ticket"
|
|
2570
|
-
}, `${selectedTicket.name} - ${selectedTicket.currency_symbol}${selectedTicket.cost} ${selectedTicket.currency}
|
|
2640
|
+
}, `${selectedTicket.name} - ${selectedTicket.currency_symbol}${selectedTicket.cost} ${selectedTicket.currency}
|
|
2641
|
+
${getTicketTaxes(selectedTicket, taxTypes)}`), /*#__PURE__*/external_react_default().createElement("i", {
|
|
2571
2642
|
className: "fa fa-chevron-down"
|
|
2572
2643
|
})) : /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", {
|
|
2573
2644
|
"data-testid": "no-ticket"
|
|
@@ -2587,7 +2658,7 @@ const TicketDropdownComponent = ({
|
|
|
2587
2658
|
if (isTicketSoldOut) return;
|
|
2588
2659
|
ticketSelect(t);
|
|
2589
2660
|
}
|
|
2590
|
-
}, t.name, " -", ` `, !isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, t.currency_symbol, t.cost, " ", t.currency), isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, "Sold Out"));
|
|
2661
|
+
}, t.name, " -", ` `, !isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, t.currency_symbol, t.cost, " ", t.currency), getTicketTaxes(t, taxTypes), isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, "Sold Out"));
|
|
2591
2662
|
})));
|
|
2592
2663
|
};
|
|
2593
2664
|
|
|
@@ -2651,8 +2722,10 @@ function ticket_type_defineProperty(obj, key, value) { if (key in obj) { Object.
|
|
|
2651
2722
|
|
|
2652
2723
|
|
|
2653
2724
|
|
|
2725
|
+
|
|
2654
2726
|
const TicketTypeComponent = ({
|
|
2655
2727
|
ticketTypes,
|
|
2728
|
+
taxTypes,
|
|
2656
2729
|
isActive,
|
|
2657
2730
|
changeForm,
|
|
2658
2731
|
reservation,
|
|
@@ -2710,7 +2783,8 @@ const TicketTypeComponent = ({
|
|
|
2710
2783
|
className: ticket_type_index_module.summary
|
|
2711
2784
|
}, /*#__PURE__*/external_react_default().createElement("span", null, ticket && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, `${ticket.name} (${quantity}): ${formatCurrency(ticket.cost * quantity, {
|
|
2712
2785
|
currency: ticket.currency
|
|
2713
|
-
})} ${ticket.currency}
|
|
2786
|
+
})} ${ticket.currency}
|
|
2787
|
+
${getTicketTaxes(ticket, taxTypes)}`, !isActive && reservation?.discount_amount > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2714
2788
|
className: ticket_type_index_module.promoCode
|
|
2715
2789
|
}, "Promo code\xA0", /*#__PURE__*/external_react_default().createElement("abbr", {
|
|
2716
2790
|
title: reservation.promo_code
|
|
@@ -2745,6 +2819,7 @@ const TicketTypeComponent = ({
|
|
|
2745
2819
|
}, /*#__PURE__*/external_react_default().createElement(ticket_dropdown, {
|
|
2746
2820
|
selectedTicket: ticket,
|
|
2747
2821
|
ticketTypes: ticketTypes,
|
|
2822
|
+
taxTypes: taxTypes,
|
|
2748
2823
|
onTicketSelect: handleTicketChange
|
|
2749
2824
|
})), ticket && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2750
2825
|
className: ticket_type_index_module.quantity
|
|
@@ -2861,50 +2936,6 @@ const ButtonBarComponent = ({
|
|
|
2861
2936
|
;// CONCATENATED MODULE: ./src/components/purchase-complete/index.module.scss
|
|
2862
2937
|
// extracted by mini-css-extract-plugin
|
|
2863
2938
|
/* harmony default export */ const purchase_complete_index_module = ({"button":"button___XMN8a","wrapper":"wrapper___Jd5Xg","circle":"circle___lcN86","complete":"complete___HAHzl","actions":"actions___jJdPX","footer":"footer___FL9TW"});
|
|
2864
|
-
;// CONCATENATED MODULE: ./src/utils/utils.js
|
|
2865
|
-
/**
|
|
2866
|
-
* Copyright 2022 OpenStack Foundation
|
|
2867
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2868
|
-
* you may not use this file except in compliance with the License.
|
|
2869
|
-
* You may obtain a copy of the License at
|
|
2870
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2871
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2872
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2873
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2874
|
-
* See the License for the specific language governing permissions and
|
|
2875
|
-
* limitations under the License.
|
|
2876
|
-
**/
|
|
2877
|
-
const getCurrentProvider = summit => {
|
|
2878
|
-
for (let profile of summit.payment_profiles) {
|
|
2879
|
-
if (profile.application_type === 'Registration') {
|
|
2880
|
-
return {
|
|
2881
|
-
publicKey: profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key,
|
|
2882
|
-
provider: profile.provider
|
|
2883
|
-
};
|
|
2884
|
-
}
|
|
2885
|
-
}
|
|
2886
|
-
|
|
2887
|
-
return {
|
|
2888
|
-
publicKey: null,
|
|
2889
|
-
provider: ''
|
|
2890
|
-
};
|
|
2891
|
-
};
|
|
2892
|
-
const ticketHasAccessLevel = (ticket, accessLevel) => {
|
|
2893
|
-
if (!ticket) return false;
|
|
2894
|
-
return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);
|
|
2895
|
-
};
|
|
2896
|
-
const getCurrentUserLanguage = () => {
|
|
2897
|
-
let language = 'en';
|
|
2898
|
-
|
|
2899
|
-
if (typeof navigator !== 'undefined') {
|
|
2900
|
-
language = navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage;
|
|
2901
|
-
}
|
|
2902
|
-
|
|
2903
|
-
return language;
|
|
2904
|
-
};
|
|
2905
|
-
const isEmptyString = val => {
|
|
2906
|
-
return typeof val === 'string' && val.trim().length == 0;
|
|
2907
|
-
};
|
|
2908
2939
|
;// CONCATENATED MODULE: external "i18n-react"
|
|
2909
2940
|
const external_i18n_react_namespaceObject = require("i18n-react");
|
|
2910
2941
|
var external_i18n_react_default = /*#__PURE__*/__webpack_require__.n(external_i18n_react_namespaceObject);
|
|
@@ -3423,6 +3454,7 @@ const RegistrationLite = _ref => {
|
|
|
3423
3454
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3424
3455
|
className: general_module.stepsWrapper
|
|
3425
3456
|
}, !profileData && !passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login["default"], {
|
|
3457
|
+
summitData: summitData,
|
|
3426
3458
|
loginOptions: loginOptions,
|
|
3427
3459
|
allowsNativeAuth: allowsNativeAuth,
|
|
3428
3460
|
allowsOtpAuth: allowsOtpAuth,
|