summit-registration-lite 3.0.28 → 4.0.0
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/index.js
CHANGED
|
@@ -11,11 +11,301 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
+
/***/ 168:
|
|
15
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
// EXPORTS
|
|
20
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
21
|
+
"default": () => (/* binding */ login_passwordless)
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// EXTERNAL MODULE: external "react"
|
|
25
|
+
var external_react_ = __webpack_require__(689);
|
|
26
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
27
|
+
// EXTERNAL MODULE: external "prop-types"
|
|
28
|
+
var external_prop_types_ = __webpack_require__(580);
|
|
29
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
30
|
+
;// CONCATENATED MODULE: external "react-otp-input"
|
|
31
|
+
const external_react_otp_input_namespaceObject = require("react-otp-input");
|
|
32
|
+
var external_react_otp_input_default = /*#__PURE__*/__webpack_require__.n(external_react_otp_input_namespaceObject);
|
|
33
|
+
;// CONCATENATED MODULE: ./src/components/login-passwordless/index.module.scss
|
|
34
|
+
// extracted by mini-css-extract-plugin
|
|
35
|
+
/* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U"});
|
|
36
|
+
// EXTERNAL MODULE: ./src/assets/FNid_WHT_logo_rgb.svg
|
|
37
|
+
var FNid_WHT_logo_rgb = __webpack_require__(802);
|
|
38
|
+
var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo_rgb);
|
|
39
|
+
;// CONCATENATED MODULE: ./src/components/login-passwordless/index.js
|
|
40
|
+
/**
|
|
41
|
+
* Copyright 2020 OpenStack Foundation
|
|
42
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
43
|
+
* you may not use this file except in compliance with the License.
|
|
44
|
+
* You may obtain a copy of the License at
|
|
45
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
47
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
48
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
49
|
+
* See the License for the specific language governing permissions and
|
|
50
|
+
* limitations under the License.
|
|
51
|
+
**/
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
const PasswordlessLoginComponent = ({
|
|
59
|
+
email,
|
|
60
|
+
codeLength,
|
|
61
|
+
passwordlessLogin,
|
|
62
|
+
loginWithCode,
|
|
63
|
+
codeError,
|
|
64
|
+
goToLogin,
|
|
65
|
+
getLoginCode,
|
|
66
|
+
getPasswordlessCode
|
|
67
|
+
}) => {
|
|
68
|
+
const [otpCode, setOtpCode] = (0,external_react_.useState)('');
|
|
69
|
+
const [otpError, setOtpError] = (0,external_react_.useState)(false);
|
|
70
|
+
|
|
71
|
+
const tryPasswordlessLogin = code => {
|
|
72
|
+
if (code.length === codeLength) {
|
|
73
|
+
setOtpError(false);
|
|
74
|
+
passwordlessLogin(otpCode, loginWithCode);
|
|
75
|
+
} else {
|
|
76
|
+
setOtpError(true);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const resendCode = () => {
|
|
81
|
+
getLoginCode(email, getPasswordlessCode);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
85
|
+
className: `${index_module.passwordlessWrapper} step-wrapper`
|
|
86
|
+
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
87
|
+
className: `${index_module.innerWrapper}`
|
|
88
|
+
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
89
|
+
src: (FNid_WHT_logo_rgb_default()),
|
|
90
|
+
alt: "FNid",
|
|
91
|
+
className: index_module.logo
|
|
92
|
+
}), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use login code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
93
|
+
"data-testid": "email"
|
|
94
|
+
}, email), /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
95
|
+
className: index_module.digits,
|
|
96
|
+
"data-testid": "code-digits"
|
|
97
|
+
}, "Add the ", codeLength, " digit code below")), /*#__PURE__*/external_react_default().createElement("div", {
|
|
98
|
+
className: index_module.codeInput
|
|
99
|
+
}, /*#__PURE__*/external_react_default().createElement((external_react_otp_input_default()), {
|
|
100
|
+
value: otpCode,
|
|
101
|
+
onChange: code => setOtpCode(code),
|
|
102
|
+
numInputs: codeLength,
|
|
103
|
+
shouldAutoFocus: true,
|
|
104
|
+
hasErrored: otpError || codeError,
|
|
105
|
+
errorStyle: {
|
|
106
|
+
border: '1px solid #e5424d'
|
|
107
|
+
},
|
|
108
|
+
"data-testid": "otp-input"
|
|
109
|
+
})), codeError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
110
|
+
className: index_module.error,
|
|
111
|
+
"data-testid": "error"
|
|
112
|
+
}, "The code you entered it's incorrect. ", /*#__PURE__*/external_react_default().createElement("br", null), " Please try again."), /*#__PURE__*/external_react_default().createElement("div", {
|
|
113
|
+
className: index_module.verify
|
|
114
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
115
|
+
className: `${index_module.button} button`,
|
|
116
|
+
onClick: () => tryPasswordlessLogin(otpCode),
|
|
117
|
+
"data-testid": "verify"
|
|
118
|
+
}, "Verify Email"), /*#__PURE__*/external_react_default().createElement("b", null, "or go back and ", /*#__PURE__*/external_react_default().createElement("span", {
|
|
119
|
+
className: index_module.link,
|
|
120
|
+
onClick: () => goToLogin(),
|
|
121
|
+
"data-testid": "go-back"
|
|
122
|
+
}, "try another way")))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
123
|
+
className: index_module.resend
|
|
124
|
+
}, "Didn\u2019t receive it? Check your spam/junk folder, or ", /*#__PURE__*/external_react_default().createElement("span", {
|
|
125
|
+
className: index_module.link,
|
|
126
|
+
onClick: () => resendCode(),
|
|
127
|
+
"data-testid": "resend"
|
|
128
|
+
}, "resend email"), " now.")));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
PasswordlessLoginComponent.propTypes = {
|
|
132
|
+
email: (external_prop_types_default()).string.isRequired,
|
|
133
|
+
codeLength: (external_prop_types_default()).number.isRequired,
|
|
134
|
+
passwordlessLogin: (external_prop_types_default()).func.isRequired,
|
|
135
|
+
loginWithCode: (external_prop_types_default()).func,
|
|
136
|
+
codeError: (external_prop_types_default()).bool,
|
|
137
|
+
goToLogin: (external_prop_types_default()).func.isRequired,
|
|
138
|
+
getLoginCode: (external_prop_types_default()).func.isRequired,
|
|
139
|
+
getPasswordlessCode: (external_prop_types_default()).func
|
|
140
|
+
};
|
|
141
|
+
/* harmony default export */ const login_passwordless = (PasswordlessLoginComponent);
|
|
142
|
+
|
|
143
|
+
/***/ }),
|
|
144
|
+
|
|
145
|
+
/***/ 711:
|
|
146
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
147
|
+
|
|
148
|
+
"use strict";
|
|
149
|
+
|
|
150
|
+
// EXPORTS
|
|
151
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
152
|
+
"default": () => (/* binding */ login)
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// EXTERNAL MODULE: external "react"
|
|
156
|
+
var external_react_ = __webpack_require__(689);
|
|
157
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
158
|
+
// EXTERNAL MODULE: external "prop-types"
|
|
159
|
+
var external_prop_types_ = __webpack_require__(580);
|
|
160
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
161
|
+
;// CONCATENATED MODULE: ./src/components/login/index.module.scss
|
|
162
|
+
// extracted by mini-css-extract-plugin
|
|
163
|
+
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","input":"input___QR9sA"});
|
|
164
|
+
;// CONCATENATED MODULE: ./src/components/login/index.js
|
|
165
|
+
/**
|
|
166
|
+
* Copyright 2020 OpenStack Foundation
|
|
167
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
168
|
+
* you may not use this file except in compliance with the License.
|
|
169
|
+
* You may obtain a copy of the License at
|
|
170
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
171
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
172
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
173
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
174
|
+
* See the License for the specific language governing permissions and
|
|
175
|
+
* limitations under the License.
|
|
176
|
+
**/
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
const LoginComponent = ({
|
|
182
|
+
loginOptions,
|
|
183
|
+
login,
|
|
184
|
+
allowsNativeAuth,
|
|
185
|
+
allowsOtpAuthlogin,
|
|
186
|
+
getLoginCode,
|
|
187
|
+
getPasswordlessCode,
|
|
188
|
+
initialEmailValue
|
|
189
|
+
}) => {
|
|
190
|
+
const [email, setEmail] = (0,external_react_.useState)(initialEmailValue);
|
|
191
|
+
const [emailError, setEmailError] = (0,external_react_.useState)();
|
|
192
|
+
|
|
193
|
+
const isValidEmail = email => {
|
|
194
|
+
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,}))$/;
|
|
195
|
+
return re.test(String(email).toLowerCase());
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const loginCode = () => {
|
|
199
|
+
let isValid = isValidEmail(email);
|
|
200
|
+
setEmailError(!isValid);
|
|
201
|
+
|
|
202
|
+
if (isValid) {
|
|
203
|
+
getLoginCode(email, getPasswordlessCode);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
208
|
+
className: `${index_module.loginWrapper} step-wrapper`
|
|
209
|
+
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
210
|
+
className: `${index_module.innerWrapper}`
|
|
211
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
212
|
+
className: index_module.loginCode
|
|
213
|
+
}, "Enter your email to begin registration:", /*#__PURE__*/external_react_default().createElement("div", {
|
|
214
|
+
className: index_module.input
|
|
215
|
+
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
216
|
+
placeholder: "youremail@example.com",
|
|
217
|
+
value: email,
|
|
218
|
+
onChange: e => setEmail(e.target.value),
|
|
219
|
+
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
220
|
+
"data-testid": "email-input"
|
|
221
|
+
}), /*#__PURE__*/external_react_default().createElement("button", {
|
|
222
|
+
onClick: () => loginCode(),
|
|
223
|
+
"data-testid": "email-button"
|
|
224
|
+
}, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
225
|
+
"data-testid": "email-error"
|
|
226
|
+
}, "Please enter a valid email address")), /*#__PURE__*/external_react_default().createElement("span", null, "Or you may login with one of the following:"), loginOptions.map((o, index) => {
|
|
227
|
+
return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
228
|
+
className: `${index_module.button}`,
|
|
229
|
+
key: `provider-${o.provider_param}`,
|
|
230
|
+
"data-testid": "login-button",
|
|
231
|
+
style: {
|
|
232
|
+
color: o.button_border_color ? o.button_border_color : '#ffffff',
|
|
233
|
+
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
234
|
+
backgroundColor: o.button_color,
|
|
235
|
+
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
236
|
+
backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''
|
|
237
|
+
},
|
|
238
|
+
onClick: () => login(o.provider_param)
|
|
239
|
+
}, o.provider_label) : allowsNativeAuth ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
240
|
+
className: `${index_module.button}`,
|
|
241
|
+
key: `provider-fnid`,
|
|
242
|
+
"data-testid": "login-button",
|
|
243
|
+
style: {
|
|
244
|
+
color: o.button_border_color ? o.button_border_color : '#ffffff',
|
|
245
|
+
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
246
|
+
backgroundColor: o.button_color,
|
|
247
|
+
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
248
|
+
backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''
|
|
249
|
+
},
|
|
250
|
+
onClick: () => login(o.provider_param)
|
|
251
|
+
}, o.provider_label) : null;
|
|
252
|
+
}), allowsOtpAuthlogin && /*#__PURE__*/external_react_default().createElement("div", {
|
|
253
|
+
className: index_module.loginCode
|
|
254
|
+
}, "or get a login code emailed to you", /*#__PURE__*/external_react_default().createElement("div", {
|
|
255
|
+
className: index_module.input
|
|
256
|
+
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
257
|
+
placeholder: "youremail@example.com",
|
|
258
|
+
value: email,
|
|
259
|
+
onChange: e => setEmail(e.target.value),
|
|
260
|
+
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
261
|
+
"data-testid": "email-input"
|
|
262
|
+
}), /*#__PURE__*/external_react_default().createElement("button", {
|
|
263
|
+
onClick: () => loginCode(),
|
|
264
|
+
"data-testid": "email-button"
|
|
265
|
+
}, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
266
|
+
"data-testid": "email-error"
|
|
267
|
+
}, "Please enter a valid email adress")))));
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
LoginComponent.propTypes = {
|
|
271
|
+
loginOptions: (external_prop_types_default()).array.isRequired,
|
|
272
|
+
login: (external_prop_types_default()).func.isRequired,
|
|
273
|
+
allowsNativeAuth: (external_prop_types_default()).bool,
|
|
274
|
+
allowsOtpAuthlogin: (external_prop_types_default()).bool,
|
|
275
|
+
getLoginCode: (external_prop_types_default()).func.isRequired,
|
|
276
|
+
getPasswordlessCode: (external_prop_types_default()).func,
|
|
277
|
+
initialEmailValue: (external_prop_types_default()).string
|
|
278
|
+
};
|
|
279
|
+
LoginComponent.defaultProps = {
|
|
280
|
+
allowsNativeAuth: true,
|
|
281
|
+
allowsOtpAuthlogin: false,
|
|
282
|
+
initialEmailValue: ''
|
|
283
|
+
};
|
|
284
|
+
/* harmony default export */ const login = (LoginComponent);
|
|
285
|
+
|
|
286
|
+
/***/ }),
|
|
287
|
+
|
|
14
288
|
/***/ 802:
|
|
15
289
|
/***/ ((module) => {
|
|
16
290
|
|
|
17
291
|
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"
|
|
18
292
|
|
|
293
|
+
/***/ }),
|
|
294
|
+
|
|
295
|
+
/***/ 580:
|
|
296
|
+
/***/ ((module) => {
|
|
297
|
+
|
|
298
|
+
"use strict";
|
|
299
|
+
module.exports = require("prop-types");
|
|
300
|
+
|
|
301
|
+
/***/ }),
|
|
302
|
+
|
|
303
|
+
/***/ 689:
|
|
304
|
+
/***/ ((module) => {
|
|
305
|
+
|
|
306
|
+
"use strict";
|
|
307
|
+
module.exports = require("react");
|
|
308
|
+
|
|
19
309
|
/***/ })
|
|
20
310
|
|
|
21
311
|
/******/ });
|
|
@@ -95,12 +385,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
95
385
|
|
|
96
386
|
// EXPORTS
|
|
97
387
|
__webpack_require__.d(__webpack_exports__, {
|
|
388
|
+
"LoginComponent": () => (/* reexport */ login["default"]),
|
|
389
|
+
"PasswordlessLoginComponent": () => (/* reexport */ login_passwordless["default"]),
|
|
98
390
|
"default": () => (/* binding */ summit_registration_lite)
|
|
99
391
|
});
|
|
100
392
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(
|
|
393
|
+
// EXTERNAL MODULE: external "react"
|
|
394
|
+
var external_react_ = __webpack_require__(689);
|
|
395
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
104
396
|
;// CONCATENATED MODULE: external "react-redux"
|
|
105
397
|
const external_react_redux_namespaceObject = require("react-redux");
|
|
106
398
|
;// CONCATENATED MODULE: external "redux"
|
|
@@ -435,10 +727,20 @@ const customErrorHandler = (err, res) => (dispatch, state) => {
|
|
|
435
727
|
|
|
436
728
|
|
|
437
729
|
const getTicketTypesAndTaxes = summitId => async dispatch => {
|
|
438
|
-
|
|
730
|
+
dispatch(startWidgetLoading());
|
|
731
|
+
return Promise.all([dispatch(getTicketTypes(summitId)), dispatch(getTaxesTypes(summitId))]).then(values => {
|
|
732
|
+
dispatch(stopWidgetLoading());
|
|
733
|
+
return values;
|
|
734
|
+
}).catch(err => {
|
|
735
|
+
dispatch(stopWidgetLoading());
|
|
736
|
+
console.log(err);
|
|
439
737
|
return Promise.reject(err);
|
|
440
738
|
});
|
|
441
739
|
};
|
|
740
|
+
/**
|
|
741
|
+
* @param summitId
|
|
742
|
+
* @returns {(function(*, *, {apiBaseUrl: *, getAccessToken: *}): Promise<*|undefined>)|*}
|
|
743
|
+
*/
|
|
442
744
|
|
|
443
745
|
const getTicketTypes = summitId => async (dispatch, getState, {
|
|
444
746
|
apiBaseUrl,
|
|
@@ -450,18 +752,21 @@ const getTicketTypes = summitId => async (dispatch, getState, {
|
|
|
450
752
|
expand: 'badge_type,badge_type.access_levels,badge_type.badge_features',
|
|
451
753
|
access_token: accessToken
|
|
452
754
|
};
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
dispatch(stopWidgetLoading());
|
|
755
|
+
return (0,actions_namespaceObject.getRequest)((0,actions_namespaceObject.createAction)(REQUESTED_TICKET_TYPES), (0,actions_namespaceObject.createAction)(GET_TICKET_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/ticket-types/allowed`, customErrorHandler)(params)(dispatch).then(res => {
|
|
756
|
+
return res;
|
|
456
757
|
}).catch(error => {
|
|
457
|
-
dispatch(stopWidgetLoading());
|
|
458
758
|
return Promise.reject(error);
|
|
459
759
|
});
|
|
460
760
|
} catch (e) {
|
|
461
|
-
|
|
761
|
+
console.log(e);
|
|
462
762
|
return Promise.reject(e);
|
|
463
763
|
}
|
|
464
764
|
};
|
|
765
|
+
/**
|
|
766
|
+
* @param summitId
|
|
767
|
+
* @returns {(function(*, *, {apiBaseUrl: *, getAccessToken: *}): Promise<*|undefined>)|*}
|
|
768
|
+
*/
|
|
769
|
+
|
|
465
770
|
|
|
466
771
|
const getTaxesTypes = summitId => async (dispatch, getState, {
|
|
467
772
|
apiBaseUrl,
|
|
@@ -472,15 +777,13 @@ const getTaxesTypes = summitId => async (dispatch, getState, {
|
|
|
472
777
|
let params = {
|
|
473
778
|
access_token: accessToken
|
|
474
779
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
dispatch(stopWidgetLoading());
|
|
780
|
+
return (0,actions_namespaceObject.getRequest)(null, (0,actions_namespaceObject.createAction)(GET_TAX_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/tax-types`, customErrorHandler)(params)(dispatch).then(res => {
|
|
781
|
+
return res;
|
|
478
782
|
}).catch(error => {
|
|
479
|
-
dispatch(stopWidgetLoading());
|
|
480
783
|
return Promise.reject(error);
|
|
481
784
|
});
|
|
482
785
|
} catch (e) {
|
|
483
|
-
|
|
786
|
+
console.log(e);
|
|
484
787
|
return Promise.reject(e);
|
|
485
788
|
}
|
|
486
789
|
};
|
|
@@ -738,9 +1041,8 @@ const getMyInvitation = summitId => async (dispatch, getState, {
|
|
|
738
1041
|
let params = {
|
|
739
1042
|
access_token: accessToken
|
|
740
1043
|
};
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
dispatch(stopWidgetLoading());
|
|
1044
|
+
return (0,actions_namespaceObject.getRequest)((0,actions_namespaceObject.createAction)(CLEAR_MY_INVITATION), (0,actions_namespaceObject.createAction)(GET_MY_INVITATION), `${apiBaseUrl}/api/v1/summits/${summitId}/registration-invitations/me`, errorHandler)(params)(dispatch).catch(e => {
|
|
1045
|
+
console.log(e);
|
|
744
1046
|
});
|
|
745
1047
|
} catch (e) {
|
|
746
1048
|
return Promise.reject(e);
|
|
@@ -1022,9 +1324,9 @@ const getPersistor = () => {
|
|
|
1022
1324
|
};
|
|
1023
1325
|
;// CONCATENATED MODULE: external "redux-persist/integration/react"
|
|
1024
1326
|
const react_namespaceObject = require("redux-persist/integration/react");
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(
|
|
1327
|
+
// EXTERNAL MODULE: external "prop-types"
|
|
1328
|
+
var external_prop_types_ = __webpack_require__(580);
|
|
1329
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
1028
1330
|
;// CONCATENATED MODULE: external "react-spring"
|
|
1029
1331
|
const external_react_spring_namespaceObject = require("react-spring");
|
|
1030
1332
|
;// CONCATENATED MODULE: external "react-use"
|
|
@@ -1037,118 +1339,11 @@ var ajaxloader_default = /*#__PURE__*/__webpack_require__.n(ajaxloader_namespace
|
|
|
1037
1339
|
;// CONCATENATED MODULE: ./src/styles/general.module.scss
|
|
1038
1340
|
// extracted by mini-css-extract-plugin
|
|
1039
1341
|
/* harmony default export */ const general_module = ({"modal":"modal___G3Cmq","modalContent":"modalContent___lIaqw","outerWrapper":"outerWrapper___OWXyi","innerWrapper":"innerWrapper___mIrBF","title":"title___Tbvkl"});
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","input":"input___QR9sA"});
|
|
1043
|
-
;// CONCATENATED MODULE: ./src/components/login/index.js
|
|
1044
|
-
/**
|
|
1045
|
-
* Copyright 2020 OpenStack Foundation
|
|
1046
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1047
|
-
* you may not use this file except in compliance with the License.
|
|
1048
|
-
* You may obtain a copy of the License at
|
|
1049
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1050
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1051
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1052
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1053
|
-
* See the License for the specific language governing permissions and
|
|
1054
|
-
* limitations under the License.
|
|
1055
|
-
**/
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
const LoginComponent = ({
|
|
1060
|
-
options,
|
|
1061
|
-
login,
|
|
1062
|
-
allowsNativeAuth,
|
|
1063
|
-
allowsOtpAuthlogin,
|
|
1064
|
-
getLoginCode,
|
|
1065
|
-
getPasswordlessCode,
|
|
1066
|
-
initialEmailValue = ''
|
|
1067
|
-
}) => {
|
|
1068
|
-
const [email, setEmail] = (0,external_react_namespaceObject.useState)(initialEmailValue);
|
|
1069
|
-
const [emailError, setEmailError] = (0,external_react_namespaceObject.useState)();
|
|
1070
|
-
|
|
1071
|
-
const isValidEmail = email => {
|
|
1072
|
-
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,}))$/;
|
|
1073
|
-
return re.test(String(email).toLowerCase());
|
|
1074
|
-
};
|
|
1075
|
-
|
|
1076
|
-
const loginCode = () => {
|
|
1077
|
-
let isValid = isValidEmail(email);
|
|
1078
|
-
setEmailError(!isValid);
|
|
1079
|
-
|
|
1080
|
-
if (isValid) {
|
|
1081
|
-
getLoginCode(email, getPasswordlessCode);
|
|
1082
|
-
}
|
|
1083
|
-
};
|
|
1084
|
-
|
|
1085
|
-
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
1086
|
-
className: `${index_module.loginWrapper} step-wrapper`
|
|
1087
|
-
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1088
|
-
className: `${index_module.innerWrapper}`
|
|
1089
|
-
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1090
|
-
className: index_module.loginCode
|
|
1091
|
-
}, "Enter your email to begin registration:", /*#__PURE__*/external_react_default().createElement("div", {
|
|
1092
|
-
className: index_module.input
|
|
1093
|
-
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
1094
|
-
placeholder: "youremail@example.com",
|
|
1095
|
-
value: email,
|
|
1096
|
-
onChange: e => setEmail(e.target.value),
|
|
1097
|
-
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
1098
|
-
"data-testid": "email-input"
|
|
1099
|
-
}), /*#__PURE__*/external_react_default().createElement("button", {
|
|
1100
|
-
onClick: () => loginCode(),
|
|
1101
|
-
"data-testid": "email-button"
|
|
1102
|
-
}, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
1103
|
-
"data-testid": "email-error"
|
|
1104
|
-
}, "Please enter a valid email address")), /*#__PURE__*/external_react_default().createElement("span", null, "Or you may login with one of the following:"), options.map((o, index) => {
|
|
1105
|
-
return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
1106
|
-
className: `${index_module.button}`,
|
|
1107
|
-
key: `provider-${o.provider_param}`,
|
|
1108
|
-
"data-testid": "login-button",
|
|
1109
|
-
style: {
|
|
1110
|
-
color: o.button_border_color ? o.button_border_color : '#ffffff',
|
|
1111
|
-
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
1112
|
-
backgroundColor: o.button_color,
|
|
1113
|
-
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
1114
|
-
backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''
|
|
1115
|
-
},
|
|
1116
|
-
onClick: () => login(o.provider_param)
|
|
1117
|
-
}, o.provider_label) : allowsNativeAuth ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
1118
|
-
className: `${index_module.button}`,
|
|
1119
|
-
key: `provider-fnid`,
|
|
1120
|
-
"data-testid": "login-button",
|
|
1121
|
-
style: {
|
|
1122
|
-
color: o.button_border_color ? o.button_border_color : '#ffffff',
|
|
1123
|
-
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
1124
|
-
backgroundColor: o.button_color,
|
|
1125
|
-
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
1126
|
-
backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''
|
|
1127
|
-
},
|
|
1128
|
-
onClick: () => login(o.provider_param)
|
|
1129
|
-
}, o.provider_label) : null;
|
|
1130
|
-
}), allowsOtpAuthlogin && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1131
|
-
className: index_module.loginCode
|
|
1132
|
-
}, "or get a login code emailed to you", /*#__PURE__*/external_react_default().createElement("div", {
|
|
1133
|
-
className: index_module.input
|
|
1134
|
-
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
1135
|
-
placeholder: "youremail@example.com",
|
|
1136
|
-
value: email,
|
|
1137
|
-
onChange: e => setEmail(e.target.value),
|
|
1138
|
-
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
1139
|
-
"data-testid": "email-input"
|
|
1140
|
-
}), /*#__PURE__*/external_react_default().createElement("button", {
|
|
1141
|
-
onClick: () => loginCode(),
|
|
1142
|
-
"data-testid": "email-button"
|
|
1143
|
-
}, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
1144
|
-
"data-testid": "email-error"
|
|
1145
|
-
}, "Please enter a valid email adress")))));
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
/* harmony default export */ const login = (LoginComponent);
|
|
1342
|
+
// EXTERNAL MODULE: ./src/components/login/index.js + 1 modules
|
|
1343
|
+
var login = __webpack_require__(711);
|
|
1149
1344
|
;// CONCATENATED MODULE: ./src/components/payment/index.module.scss
|
|
1150
1345
|
// extracted by mini-css-extract-plugin
|
|
1151
|
-
/* harmony default export */ const
|
|
1346
|
+
/* harmony default export */ const index_module = ({"title":"title___LksVm","form":"form___v5GIx","fieldWrapper":"fieldWrapper___Eoe61"});
|
|
1152
1347
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components"
|
|
1153
1348
|
const components_namespaceObject = require("openstack-uicore-foundation/lib/components");
|
|
1154
1349
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/utils/methods"
|
|
@@ -1191,14 +1386,14 @@ const LawPayForm = ({
|
|
|
1191
1386
|
provider,
|
|
1192
1387
|
timestamp
|
|
1193
1388
|
}) => {
|
|
1194
|
-
const [hostedFields, setHostedFields] = (0,
|
|
1195
|
-
const [lawPayFields, setLawPayFields] = (0,
|
|
1389
|
+
const [hostedFields, setHostedFields] = (0,external_react_.useState)(null);
|
|
1390
|
+
const [lawPayFields, setLawPayFields] = (0,external_react_.useState)({
|
|
1196
1391
|
exp_month: '',
|
|
1197
1392
|
exp_year: '',
|
|
1198
1393
|
postal_code: userProfile.postal_code || '',
|
|
1199
1394
|
address1: userProfile.address1 || ''
|
|
1200
1395
|
});
|
|
1201
|
-
const [lawPayErrors, setLawPayErrors] = (0,
|
|
1396
|
+
const [lawPayErrors, setLawPayErrors] = (0,external_react_.useState)({
|
|
1202
1397
|
exp_month: '',
|
|
1203
1398
|
exp_year: '',
|
|
1204
1399
|
postal_code: '',
|
|
@@ -1243,7 +1438,7 @@ const LawPayForm = ({
|
|
|
1243
1438
|
setLawPayErrors(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayErrors), fieldErrors));
|
|
1244
1439
|
};
|
|
1245
1440
|
|
|
1246
|
-
(0,
|
|
1441
|
+
(0,external_react_.useEffect)(() => {
|
|
1247
1442
|
if (window.AffiniPay && !hostedFields) {
|
|
1248
1443
|
setHostedFields(window.AffiniPay.HostedFields.initializeFields(hostedFieldsConfiguration, hostedFieldsCallBack));
|
|
1249
1444
|
}
|
|
@@ -1546,7 +1741,7 @@ const StripeForm = ({
|
|
|
1546
1741
|
}) => {
|
|
1547
1742
|
const stripe = (0,react_stripe_js_namespaceObject.useStripe)();
|
|
1548
1743
|
const elements = (0,react_stripe_js_namespaceObject.useElements)();
|
|
1549
|
-
const [stripeErrors, setStripeErrors] = (0,
|
|
1744
|
+
const [stripeErrors, setStripeErrors] = (0,external_react_.useState)({});
|
|
1550
1745
|
const {
|
|
1551
1746
|
register,
|
|
1552
1747
|
handleSubmit,
|
|
@@ -1703,7 +1898,7 @@ const stripe_component_StripeProvider = ({
|
|
|
1703
1898
|
provider,
|
|
1704
1899
|
stripeOptions
|
|
1705
1900
|
}) => {
|
|
1706
|
-
const stripePromise = (0,
|
|
1901
|
+
const stripePromise = (0,external_react_.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(providerKey), [providerKey]);
|
|
1707
1902
|
const options = {
|
|
1708
1903
|
fonts: stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.fonts
|
|
1709
1904
|
};
|
|
@@ -1778,11 +1973,11 @@ const PaymentComponent = ({
|
|
|
1778
1973
|
}
|
|
1779
1974
|
});
|
|
1780
1975
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
1781
|
-
className: `${
|
|
1976
|
+
className: `${index_module.outerWrapper} step-wrapper`
|
|
1782
1977
|
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1783
|
-
className: `${
|
|
1978
|
+
className: `${index_module.innerWrapper}`
|
|
1784
1979
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1785
|
-
className:
|
|
1980
|
+
className: index_module.title
|
|
1786
1981
|
}, /*#__PURE__*/external_react_default().createElement("span", null, "Payment")), /*#__PURE__*/external_react_default().createElement(external_react_spring_namespaceObject.animated.div, {
|
|
1787
1982
|
style: payment_objectSpread({
|
|
1788
1983
|
overflow: `${isActive ? '' : 'hidden'}`
|
|
@@ -1870,7 +2065,7 @@ const PersonalInfoComponent = ({
|
|
|
1870
2065
|
}) => {
|
|
1871
2066
|
var _errors$email, _errors$email2;
|
|
1872
2067
|
|
|
1873
|
-
const [personalInfo, setPersonalInfo] = (0,
|
|
2068
|
+
const [personalInfo, setPersonalInfo] = (0,external_react_.useState)({
|
|
1874
2069
|
firstName: userProfile.given_name || (invitation ? invitation.first_name : ''),
|
|
1875
2070
|
lastName: userProfile.family_name || (invitation ? invitation.last_name : ''),
|
|
1876
2071
|
email: userProfile.email || '',
|
|
@@ -1880,7 +2075,7 @@ const PersonalInfoComponent = ({
|
|
|
1880
2075
|
},
|
|
1881
2076
|
promoCode: ''
|
|
1882
2077
|
});
|
|
1883
|
-
const [companyError, setCompanyError] = (0,
|
|
2078
|
+
const [companyError, setCompanyError] = (0,external_react_.useState)(false);
|
|
1884
2079
|
const {
|
|
1885
2080
|
register,
|
|
1886
2081
|
handleSubmit,
|
|
@@ -1888,7 +2083,7 @@ const PersonalInfoComponent = ({
|
|
|
1888
2083
|
errors
|
|
1889
2084
|
}
|
|
1890
2085
|
} = (0,external_react_hook_form_namespaceObject.useForm)();
|
|
1891
|
-
(0,
|
|
2086
|
+
(0,external_react_.useEffect)(() => {
|
|
1892
2087
|
if (reservation) {
|
|
1893
2088
|
setPersonalInfo({
|
|
1894
2089
|
firstName: reservation.owner_first_name ? reservation.owner_first_name : personalInfo.firstName,
|
|
@@ -2091,7 +2286,7 @@ const TicketDropdownComponent = ({
|
|
|
2091
2286
|
ticketTypes,
|
|
2092
2287
|
onTicketSelect
|
|
2093
2288
|
}) => {
|
|
2094
|
-
const [active, setActive] = (0,
|
|
2289
|
+
const [active, setActive] = (0,external_react_.useState)(false);
|
|
2095
2290
|
|
|
2096
2291
|
const ticketSelect = ticket => {
|
|
2097
2292
|
onTicketSelect(ticket);
|
|
@@ -2203,8 +2398,8 @@ const TicketTypeComponent = ({
|
|
|
2203
2398
|
inPersonDisclaimer,
|
|
2204
2399
|
showMultipleTicketTexts
|
|
2205
2400
|
}) => {
|
|
2206
|
-
const [ticket, setTicket] = (0,
|
|
2207
|
-
const [quantity, setQuantity] = (0,
|
|
2401
|
+
const [ticket, setTicket] = (0,external_react_.useState)(null);
|
|
2402
|
+
const [quantity, setQuantity] = (0,external_react_.useState)(1);
|
|
2208
2403
|
const minQuantity = 1;
|
|
2209
2404
|
const maxQuantity = getTicketMaxQuantity(ticket);
|
|
2210
2405
|
const [ref, {
|
|
@@ -2223,14 +2418,14 @@ const TicketTypeComponent = ({
|
|
|
2223
2418
|
height: isActive ? height + 10 : 0
|
|
2224
2419
|
}
|
|
2225
2420
|
});
|
|
2226
|
-
(0,
|
|
2421
|
+
(0,external_react_.useEffect)(() => {
|
|
2227
2422
|
var _reservation$tickets;
|
|
2228
2423
|
|
|
2229
2424
|
if (reservation && ((_reservation$tickets = reservation.tickets) === null || _reservation$tickets === void 0 ? void 0 : _reservation$tickets.length) > 0) {
|
|
2230
2425
|
setTicket(ticketTypes.find(t => t.id === reservation.tickets[0].ticket_type_id));
|
|
2231
2426
|
}
|
|
2232
2427
|
}, []);
|
|
2233
|
-
(0,
|
|
2428
|
+
(0,external_react_.useEffect)(() => {
|
|
2234
2429
|
changeForm({
|
|
2235
2430
|
ticketType: ticket,
|
|
2236
2431
|
ticketQuantity: quantity
|
|
@@ -2268,6 +2463,7 @@ const TicketTypeComponent = ({
|
|
|
2268
2463
|
className: ticket_type_index_module.promo
|
|
2269
2464
|
}, "Subtotal: ", `${ticket === null || ticket === void 0 ? void 0 : ticket.currency_symbol} ${(((reservation === null || reservation === void 0 ? void 0 : reservation.raw_amount_in_cents) - (reservation === null || reservation === void 0 ? void 0 : reservation.discount_amount_in_cents)) / 100).toFixed(2)} ${ticket === null || ticket === void 0 ? void 0 : ticket.currency}`), !isActive && (reservation === null || reservation === void 0 ? void 0 : reservation.taxes_amount) > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, reservation === null || reservation === void 0 ? void 0 : reservation.applied_taxes.map(tax => {
|
|
2270
2465
|
return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", {
|
|
2466
|
+
key: tax.id,
|
|
2271
2467
|
className: ticket_type_index_module.taxes
|
|
2272
2468
|
}, /*#__PURE__*/external_react_default().createElement("abbr", {
|
|
2273
2469
|
title: tax.name
|
|
@@ -2430,7 +2626,7 @@ const PurchaseComplete = ({
|
|
|
2430
2626
|
summit,
|
|
2431
2627
|
supportEmail = "support@fntech.com"
|
|
2432
2628
|
}) => {
|
|
2433
|
-
(0,
|
|
2629
|
+
(0,external_react_.useEffect)(() => {
|
|
2434
2630
|
onPurchaseComplete(checkout);
|
|
2435
2631
|
}, []);
|
|
2436
2632
|
const date = new Date();
|
|
@@ -2472,108 +2668,8 @@ const PurchaseComplete = ({
|
|
|
2472
2668
|
};
|
|
2473
2669
|
|
|
2474
2670
|
/* harmony default export */ const purchase_complete = (PurchaseComplete);
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
var external_react_otp_input_default = /*#__PURE__*/__webpack_require__.n(external_react_otp_input_namespaceObject);
|
|
2478
|
-
;// CONCATENATED MODULE: ./src/components/login-passwordless/index.module.scss
|
|
2479
|
-
// extracted by mini-css-extract-plugin
|
|
2480
|
-
/* harmony default export */ const login_passwordless_index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U"});
|
|
2481
|
-
// EXTERNAL MODULE: ./src/assets/FNid_WHT_logo_rgb.svg
|
|
2482
|
-
var FNid_WHT_logo_rgb = __webpack_require__(802);
|
|
2483
|
-
var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo_rgb);
|
|
2484
|
-
;// CONCATENATED MODULE: ./src/components/login-passwordless/index.js
|
|
2485
|
-
/**
|
|
2486
|
-
* Copyright 2020 OpenStack Foundation
|
|
2487
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2488
|
-
* you may not use this file except in compliance with the License.
|
|
2489
|
-
* You may obtain a copy of the License at
|
|
2490
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2491
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2492
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2493
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2494
|
-
* See the License for the specific language governing permissions and
|
|
2495
|
-
* limitations under the License.
|
|
2496
|
-
**/
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
const PasswordlessLoginComponent = ({
|
|
2504
|
-
email,
|
|
2505
|
-
codeLength,
|
|
2506
|
-
passwordlessLogin,
|
|
2507
|
-
loginWithCode,
|
|
2508
|
-
codeError,
|
|
2509
|
-
goToLogin,
|
|
2510
|
-
getLoginCode,
|
|
2511
|
-
getPasswordlessCode
|
|
2512
|
-
}) => {
|
|
2513
|
-
const [otpCode, setOtpCode] = (0,external_react_namespaceObject.useState)('');
|
|
2514
|
-
const [otpError, setOtpError] = (0,external_react_namespaceObject.useState)(false);
|
|
2515
|
-
|
|
2516
|
-
const tryPasswordlessLogin = code => {
|
|
2517
|
-
if (code.length === codeLength) {
|
|
2518
|
-
setOtpError(false);
|
|
2519
|
-
passwordlessLogin(otpCode, loginWithCode);
|
|
2520
|
-
} else {
|
|
2521
|
-
setOtpError(true);
|
|
2522
|
-
}
|
|
2523
|
-
};
|
|
2524
|
-
|
|
2525
|
-
const resendCode = () => {
|
|
2526
|
-
getLoginCode(email, getPasswordlessCode);
|
|
2527
|
-
};
|
|
2528
|
-
|
|
2529
|
-
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2530
|
-
className: `${login_passwordless_index_module.passwordlessWrapper} step-wrapper`
|
|
2531
|
-
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2532
|
-
className: `${login_passwordless_index_module.innerWrapper}`
|
|
2533
|
-
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
2534
|
-
src: (FNid_WHT_logo_rgb_default()),
|
|
2535
|
-
alt: "FNid",
|
|
2536
|
-
className: login_passwordless_index_module.logo
|
|
2537
|
-
}), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use login code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2538
|
-
"data-testid": "email"
|
|
2539
|
-
}, email), /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2540
|
-
className: login_passwordless_index_module.digits,
|
|
2541
|
-
"data-testid": "code-digits"
|
|
2542
|
-
}, "Add the ", codeLength, " digit code below")), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2543
|
-
className: login_passwordless_index_module.codeInput
|
|
2544
|
-
}, /*#__PURE__*/external_react_default().createElement((external_react_otp_input_default()), {
|
|
2545
|
-
value: otpCode,
|
|
2546
|
-
onChange: code => setOtpCode(code),
|
|
2547
|
-
numInputs: codeLength,
|
|
2548
|
-
shouldAutoFocus: true,
|
|
2549
|
-
hasErrored: otpError || codeError,
|
|
2550
|
-
errorStyle: {
|
|
2551
|
-
border: '1px solid #e5424d'
|
|
2552
|
-
},
|
|
2553
|
-
"data-testid": "otp-input"
|
|
2554
|
-
})), codeError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
2555
|
-
className: login_passwordless_index_module.error,
|
|
2556
|
-
"data-testid": "error"
|
|
2557
|
-
}, "The code you entered it's incorrect. ", /*#__PURE__*/external_react_default().createElement("br", null), " Please try again."), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2558
|
-
className: login_passwordless_index_module.verify
|
|
2559
|
-
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2560
|
-
className: `${login_passwordless_index_module.button} button`,
|
|
2561
|
-
onClick: () => tryPasswordlessLogin(otpCode),
|
|
2562
|
-
"data-testid": "verify"
|
|
2563
|
-
}, "Verify Email"), /*#__PURE__*/external_react_default().createElement("b", null, "or go back and ", /*#__PURE__*/external_react_default().createElement("span", {
|
|
2564
|
-
className: login_passwordless_index_module.link,
|
|
2565
|
-
onClick: () => goToLogin(),
|
|
2566
|
-
"data-testid": "go-back"
|
|
2567
|
-
}, "try another way")))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2568
|
-
className: login_passwordless_index_module.resend
|
|
2569
|
-
}, "Didn\u2019t receive it? Check your spam/junk folder, or ", /*#__PURE__*/external_react_default().createElement("span", {
|
|
2570
|
-
className: login_passwordless_index_module.link,
|
|
2571
|
-
onClick: () => resendCode(),
|
|
2572
|
-
"data-testid": "resend"
|
|
2573
|
-
}, "resend email"), " now.")));
|
|
2574
|
-
};
|
|
2575
|
-
|
|
2576
|
-
/* harmony default export */ const login_passwordless = (PasswordlessLoginComponent);
|
|
2671
|
+
// EXTERNAL MODULE: ./src/components/login-passwordless/index.js + 2 modules
|
|
2672
|
+
var login_passwordless = __webpack_require__(168);
|
|
2577
2673
|
;// CONCATENATED MODULE: ./src/components/ticket-owned/index.module.scss
|
|
2578
2674
|
// extracted by mini-css-extract-plugin
|
|
2579
2675
|
/* harmony default export */ const ticket_owned_index_module = ({"ticketOwnedWrapper":"ticketOwnedWrapper___nhkDY","alert":"alert___c49oP"});
|
|
@@ -2597,17 +2693,19 @@ const TicketOwnedComponent = ({
|
|
|
2597
2693
|
ownedTickets,
|
|
2598
2694
|
ticketTypes
|
|
2599
2695
|
}) => {
|
|
2600
|
-
const ownedTicketsString = (0,
|
|
2696
|
+
const ownedTicketsString = (0,external_react_.useMemo)(() => ownedTickets.reduce((acc, ownedTicket, index) => {
|
|
2601
2697
|
const ticketType = ticketTypes.find(type => type.id === ownedTicket.type_id);
|
|
2602
2698
|
if (!ticketType) return acc;
|
|
2603
|
-
return
|
|
2699
|
+
return `
|
|
2700
|
+
${acc}${acc ? `${index + 1 === ownedTickets.length ? ' and ' : ', '}` : ''}
|
|
2701
|
+
${ownedTicket.qty} ${ticketType.name}${index === 0 ? !ticketType.name.toLowerCase().endsWith('ticket') ? ' ticket' : '' : ticketType.name.toLowerCase().endsWith('ticket') ? '' : ''}${ownedTicket.qty > 1 ? 's' : ''}`;
|
|
2604
2702
|
}, ''), [ownedTickets, ticketTypes]);
|
|
2605
2703
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2606
2704
|
className: ticket_owned_index_module.ticketOwnedWrapper
|
|
2607
2705
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2608
2706
|
className: `${ticket_owned_index_module.alert} alert alert-warning`,
|
|
2609
2707
|
role: "alert"
|
|
2610
|
-
}, "You have already ordered ", ownedTicketsString, ". If you would like to order more
|
|
2708
|
+
}, "You have already ordered ", ownedTicketsString, ". If you would like to order more, please do so below."));
|
|
2611
2709
|
};
|
|
2612
2710
|
|
|
2613
2711
|
/* harmony default export */ const ticket_owned = (TicketOwnedComponent);
|
|
@@ -2816,7 +2914,7 @@ const RegistrationLite = _ref => {
|
|
|
2816
2914
|
} = _ref,
|
|
2817
2915
|
rest = registration_lite_objectWithoutProperties(_ref, registration_lite_excluded);
|
|
2818
2916
|
|
|
2819
|
-
const [registrationForm, setRegistrationForm] = (0,
|
|
2917
|
+
const [registrationForm, setRegistrationForm] = (0,external_react_.useState)({
|
|
2820
2918
|
values: {
|
|
2821
2919
|
ticketType: null,
|
|
2822
2920
|
ticketQuantity: 1,
|
|
@@ -2825,7 +2923,7 @@ const RegistrationLite = _ref => {
|
|
|
2825
2923
|
},
|
|
2826
2924
|
errors: []
|
|
2827
2925
|
});
|
|
2828
|
-
const [ticketTaxesError, setTicketTaxesError] = (0,
|
|
2926
|
+
const [ticketTaxesError, setTicketTaxesError] = (0,external_react_.useState)(false);
|
|
2829
2927
|
const {
|
|
2830
2928
|
values: formValues,
|
|
2831
2929
|
errors: formErrors
|
|
@@ -2843,7 +2941,7 @@ const RegistrationLite = _ref => {
|
|
|
2843
2941
|
publicKey,
|
|
2844
2942
|
provider
|
|
2845
2943
|
} = getCurrentProvider(summitData);
|
|
2846
|
-
(0,
|
|
2944
|
+
(0,external_react_.useEffect)(() => {
|
|
2847
2945
|
loadSession(registration_lite_objectSpread(registration_lite_objectSpread({}, rest), {}, {
|
|
2848
2946
|
summitData,
|
|
2849
2947
|
profileData
|
|
@@ -2853,17 +2951,17 @@ const RegistrationLite = _ref => {
|
|
|
2853
2951
|
changeStep(0);
|
|
2854
2952
|
}
|
|
2855
2953
|
}, [profileData]);
|
|
2856
|
-
(0,
|
|
2954
|
+
(0,external_react_.useEffect)(() => {
|
|
2857
2955
|
if (summitData && profileData) {
|
|
2858
2956
|
handleGetTicketTypesAndTaxes(summitData.id);
|
|
2859
2957
|
}
|
|
2860
2958
|
}, [summitData, profileData]);
|
|
2861
|
-
(0,
|
|
2959
|
+
(0,external_react_.useEffect)(() => {
|
|
2862
2960
|
if (summitData && profileData) {
|
|
2863
2961
|
getMyInvitation(summitData.id).catch(e => console.log(e));
|
|
2864
2962
|
}
|
|
2865
2963
|
}, [summitData, profileData]);
|
|
2866
|
-
(0,
|
|
2964
|
+
(0,external_react_.useEffect)(() => {
|
|
2867
2965
|
if (step === 1 && formValues !== null && formValues !== void 0 && formValues.ticketType && formValues !== null && formValues !== void 0 && formValues.personalInformation) {
|
|
2868
2966
|
reserveTicket({
|
|
2869
2967
|
provider,
|
|
@@ -2889,7 +2987,7 @@ const RegistrationLite = _ref => {
|
|
|
2889
2987
|
changeStep(0);
|
|
2890
2988
|
}
|
|
2891
2989
|
}, [formValues]);
|
|
2892
|
-
(0,
|
|
2990
|
+
(0,external_react_.useEffect)(() => {
|
|
2893
2991
|
setFormErrors([]);
|
|
2894
2992
|
}, [step]);
|
|
2895
2993
|
const [ref, {
|
|
@@ -2958,15 +3056,15 @@ const RegistrationLite = _ref => {
|
|
|
2958
3056
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
2959
3057
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2960
3058
|
className: general_module.stepsWrapper
|
|
2961
|
-
}, !profileData && !passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login, {
|
|
2962
|
-
|
|
3059
|
+
}, !profileData && !passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login["default"], {
|
|
3060
|
+
loginOptions: loginOptions,
|
|
2963
3061
|
allowsNativeAuth: allowsNativeAuth,
|
|
2964
3062
|
allowsOtpAuth: allowsOtpAuth,
|
|
2965
3063
|
login: provider => rest.authUser(provider),
|
|
2966
3064
|
getLoginCode: getLoginCode,
|
|
2967
3065
|
getPasswordlessCode: getPasswordlessCode,
|
|
2968
3066
|
initialEmailValue: loginInitialEmailInputValue
|
|
2969
|
-
}), !profileData && passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login_passwordless, {
|
|
3067
|
+
}), !profileData && passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login_passwordless["default"], {
|
|
2970
3068
|
codeLength: passwordlessCode,
|
|
2971
3069
|
email: passwordlessEmail,
|
|
2972
3070
|
passwordlessLogin: passwordlessLogin,
|
|
@@ -3114,6 +3212,8 @@ class RegistrationLiteWidget extends (external_react_default()).PureComponent {
|
|
|
3114
3212
|
|
|
3115
3213
|
}
|
|
3116
3214
|
|
|
3215
|
+
|
|
3216
|
+
|
|
3117
3217
|
/* harmony default export */ const summit_registration_lite = (RegistrationLiteWidget);
|
|
3118
3218
|
})();
|
|
3119
3219
|
|