summit-registration-lite 1.0.78 → 1.0.81
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/.nvmrc +1 -0
- package/README.md +6 -0
- package/package.json +4 -3
- package/dist/index.css +0 -490
- package/dist/index.js +0 -2070
package/dist/index.js
DELETED
|
@@ -1,2070 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define("summit-registration-lite", [], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["summit-registration-lite"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["summit-registration-lite"] = factory();
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return /******/ (function(modules) { // webpackBootstrap
|
|
12
|
-
/******/ // The module cache
|
|
13
|
-
/******/ var installedModules = {};
|
|
14
|
-
/******/
|
|
15
|
-
/******/ // The require function
|
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/ }
|
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/ i: moduleId,
|
|
25
|
-
/******/ l: false,
|
|
26
|
-
/******/ exports: {}
|
|
27
|
-
/******/ };
|
|
28
|
-
/******/
|
|
29
|
-
/******/ // Execute the module function
|
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.l = true;
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Return the exports of the module
|
|
36
|
-
/******/ return module.exports;
|
|
37
|
-
/******/ }
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
-
/******/ __webpack_require__.m = modules;
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the module cache
|
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // define getter function for harmony exports
|
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
-
/******/ }
|
|
51
|
-
/******/ };
|
|
52
|
-
/******/
|
|
53
|
-
/******/ // define __esModule on exports
|
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
-
/******/ }
|
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
-
/******/ };
|
|
60
|
-
/******/
|
|
61
|
-
/******/ // create a fake namespace object
|
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
|
65
|
-
/******/ // mode & 8|1: behave like require
|
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
-
/******/ if(mode & 8) return value;
|
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
-
/******/ var ns = Object.create(null);
|
|
71
|
-
/******/ __webpack_require__.r(ns);
|
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
-
/******/ return ns;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
|
81
|
-
/******/ function getModuleExports() { return module; };
|
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
-
/******/ return getter;
|
|
84
|
-
/******/ };
|
|
85
|
-
/******/
|
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // __webpack_public_path__
|
|
90
|
-
/******/ __webpack_require__.p = "/dist/";
|
|
91
|
-
/******/
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = 29);
|
|
95
|
-
/******/ })
|
|
96
|
-
/************************************************************************/
|
|
97
|
-
/******/ ([
|
|
98
|
-
/* 0 */
|
|
99
|
-
/***/ (function(module, exports) {
|
|
100
|
-
|
|
101
|
-
module.exports = require("react");
|
|
102
|
-
|
|
103
|
-
/***/ }),
|
|
104
|
-
/* 1 */
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("openstack-uicore-foundation/lib/methods");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
/* 2 */
|
|
111
|
-
/***/ (function(module, exports) {
|
|
112
|
-
|
|
113
|
-
module.exports = require("react-spring");
|
|
114
|
-
|
|
115
|
-
/***/ }),
|
|
116
|
-
/* 3 */
|
|
117
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
118
|
-
|
|
119
|
-
// extracted by mini-css-extract-plugin
|
|
120
|
-
module.exports = {"button":"button___2t2wu","outerWrapper":"outerWrapper___1mTpT","innerWrapper":"innerWrapper___3THAF","registration":"registration___3PmSf","actions":"actions___I9WTO"};
|
|
121
|
-
|
|
122
|
-
/***/ }),
|
|
123
|
-
/* 4 */
|
|
124
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
125
|
-
|
|
126
|
-
// extracted by mini-css-extract-plugin
|
|
127
|
-
module.exports = {"passwordlessWrapper":"passwordlessWrapper___1p18R","innerWrapper":"innerWrapper___4MdlE","digits":"digits___F0Kcb","codeInput":"codeInput___1xtWR","error":"error___1v7Eo","verify":"verify___1b49k","button":"button___5OMnr","link":"link___3Jnwz","resend":"resend___35Xcu"};
|
|
128
|
-
|
|
129
|
-
/***/ }),
|
|
130
|
-
/* 5 */
|
|
131
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
132
|
-
|
|
133
|
-
// extracted by mini-css-extract-plugin
|
|
134
|
-
module.exports = {"title":"title___3SYkl","summary":"summary___38fgb","crossOut":"crossOut___2q3QH","discount":"discount___sJ1Bg","promo":"promo___11cRU","dropdown":"dropdown___2F1ra","inPersonDisclaimer":"inPersonDisclaimer___47veY"};
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
/* 6 */
|
|
138
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
139
|
-
|
|
140
|
-
// extracted by mini-css-extract-plugin
|
|
141
|
-
module.exports = {"button":"button___2ecjs","wrapper":"wrapper___3h7RA","circle":"circle___2jWZb","complete":"complete___3RjCF","actions":"actions___2ru3L","footer":"footer___KBj_E"};
|
|
142
|
-
|
|
143
|
-
/***/ }),
|
|
144
|
-
/* 7 */
|
|
145
|
-
/***/ (function(module, exports) {
|
|
146
|
-
|
|
147
|
-
module.exports = require("@stripe/react-stripe-js");
|
|
148
|
-
|
|
149
|
-
/***/ }),
|
|
150
|
-
/* 8 */
|
|
151
|
-
/***/ (function(module, exports) {
|
|
152
|
-
|
|
153
|
-
module.exports = require("react-use");
|
|
154
|
-
|
|
155
|
-
/***/ }),
|
|
156
|
-
/* 9 */
|
|
157
|
-
/***/ (function(module, exports) {
|
|
158
|
-
|
|
159
|
-
module.exports = require("react-redux");
|
|
160
|
-
|
|
161
|
-
/***/ }),
|
|
162
|
-
/* 10 */
|
|
163
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
164
|
-
|
|
165
|
-
// extracted by mini-css-extract-plugin
|
|
166
|
-
module.exports = {"outerWrapper":"outerWrapper___Ctsl4","innerWrapper":"innerWrapper___HgUWp","title":"title___2V7rZ"};
|
|
167
|
-
|
|
168
|
-
/***/ }),
|
|
169
|
-
/* 11 */
|
|
170
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
171
|
-
|
|
172
|
-
// extracted by mini-css-extract-plugin
|
|
173
|
-
module.exports = {"loginWrapper":"loginWrapper___29UY5","innerWrapper":"innerWrapper___3ls8s","button":"button___XnwyV","loginCode":"loginCode___1tdoI","input":"input___2qKqP"};
|
|
174
|
-
|
|
175
|
-
/***/ }),
|
|
176
|
-
/* 12 */
|
|
177
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
178
|
-
|
|
179
|
-
// extracted by mini-css-extract-plugin
|
|
180
|
-
module.exports = {"form":"form___29UFw","fieldWrapper":"fieldWrapper___16TrJ"};
|
|
181
|
-
|
|
182
|
-
/***/ }),
|
|
183
|
-
/* 13 */
|
|
184
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
185
|
-
|
|
186
|
-
// extracted by mini-css-extract-plugin
|
|
187
|
-
module.exports = {"title":"title___3ZHGA","form":"form___3v5vW","readOnly":"readOnly___GTMgw"};
|
|
188
|
-
|
|
189
|
-
/***/ }),
|
|
190
|
-
/* 14 */
|
|
191
|
-
/***/ (function(module, exports) {
|
|
192
|
-
|
|
193
|
-
module.exports = require("prop-types");
|
|
194
|
-
|
|
195
|
-
/***/ }),
|
|
196
|
-
/* 15 */
|
|
197
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
198
|
-
|
|
199
|
-
// extracted by mini-css-extract-plugin
|
|
200
|
-
module.exports = {"wrapper":"wrapper___3G9ab","circle":"circle___2EnTU","complete":"complete___P-4ft"};
|
|
201
|
-
|
|
202
|
-
/***/ }),
|
|
203
|
-
/* 16 */
|
|
204
|
-
/***/ (function(module, exports) {
|
|
205
|
-
|
|
206
|
-
module.exports = require("sweetalert2");
|
|
207
|
-
|
|
208
|
-
/***/ }),
|
|
209
|
-
/* 17 */
|
|
210
|
-
/***/ (function(module, exports) {
|
|
211
|
-
|
|
212
|
-
module.exports = require("openstack-uicore-foundation/lib/components");
|
|
213
|
-
|
|
214
|
-
/***/ }),
|
|
215
|
-
/* 18 */
|
|
216
|
-
/***/ (function(module, exports) {
|
|
217
|
-
|
|
218
|
-
module.exports = require("redux");
|
|
219
|
-
|
|
220
|
-
/***/ }),
|
|
221
|
-
/* 19 */
|
|
222
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
223
|
-
|
|
224
|
-
// extracted by mini-css-extract-plugin
|
|
225
|
-
module.exports = {"title":"title___3msFT","form":"form___1imhA","fieldWrapper":"fieldWrapper___26upm"};
|
|
226
|
-
|
|
227
|
-
/***/ }),
|
|
228
|
-
/* 20 */
|
|
229
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
230
|
-
|
|
231
|
-
// extracted by mini-css-extract-plugin
|
|
232
|
-
module.exports = {"placeholder":"placeholder___1AQcO","inPersonDisclaimer":"inPersonDisclaimer___qehRb","dropdown":"dropdown___2BSL8"};
|
|
233
|
-
|
|
234
|
-
/***/ }),
|
|
235
|
-
/* 21 */
|
|
236
|
-
/***/ (function(module, exports) {
|
|
237
|
-
|
|
238
|
-
module.exports = require("redux-persist");
|
|
239
|
-
|
|
240
|
-
/***/ }),
|
|
241
|
-
/* 22 */
|
|
242
|
-
/***/ (function(module, exports) {
|
|
243
|
-
|
|
244
|
-
module.exports = require("redux-thunk");
|
|
245
|
-
|
|
246
|
-
/***/ }),
|
|
247
|
-
/* 23 */
|
|
248
|
-
/***/ (function(module, exports) {
|
|
249
|
-
|
|
250
|
-
module.exports = require("redux-persist/es/storage");
|
|
251
|
-
|
|
252
|
-
/***/ }),
|
|
253
|
-
/* 24 */
|
|
254
|
-
/***/ (function(module, exports) {
|
|
255
|
-
|
|
256
|
-
module.exports = require("redux-persist/integration/react");
|
|
257
|
-
|
|
258
|
-
/***/ }),
|
|
259
|
-
/* 25 */
|
|
260
|
-
/***/ (function(module, exports) {
|
|
261
|
-
|
|
262
|
-
module.exports = require("@stripe/stripe-js");
|
|
263
|
-
|
|
264
|
-
/***/ }),
|
|
265
|
-
/* 26 */
|
|
266
|
-
/***/ (function(module, exports) {
|
|
267
|
-
|
|
268
|
-
module.exports = require("react-hook-form");
|
|
269
|
-
|
|
270
|
-
/***/ }),
|
|
271
|
-
/* 27 */
|
|
272
|
-
/***/ (function(module, exports) {
|
|
273
|
-
|
|
274
|
-
module.exports = require("react-otp-input");
|
|
275
|
-
|
|
276
|
-
/***/ }),
|
|
277
|
-
/* 28 */
|
|
278
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
279
|
-
|
|
280
|
-
// extracted by mini-css-extract-plugin
|
|
281
|
-
|
|
282
|
-
/***/ }),
|
|
283
|
-
/* 29 */
|
|
284
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
285
|
-
|
|
286
|
-
"use strict";
|
|
287
|
-
// ESM COMPAT FLAG
|
|
288
|
-
__webpack_require__.r(__webpack_exports__);
|
|
289
|
-
|
|
290
|
-
// EXTERNAL MODULE: external "react"
|
|
291
|
-
var external_react_ = __webpack_require__(0);
|
|
292
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
293
|
-
|
|
294
|
-
// EXTERNAL MODULE: external "react-redux"
|
|
295
|
-
var external_react_redux_ = __webpack_require__(9);
|
|
296
|
-
|
|
297
|
-
// EXTERNAL MODULE: external "redux"
|
|
298
|
-
var external_redux_ = __webpack_require__(18);
|
|
299
|
-
|
|
300
|
-
// EXTERNAL MODULE: external "redux-thunk"
|
|
301
|
-
var external_redux_thunk_ = __webpack_require__(22);
|
|
302
|
-
var external_redux_thunk_default = /*#__PURE__*/__webpack_require__.n(external_redux_thunk_);
|
|
303
|
-
|
|
304
|
-
// EXTERNAL MODULE: external "redux-persist"
|
|
305
|
-
var external_redux_persist_ = __webpack_require__(21);
|
|
306
|
-
|
|
307
|
-
// EXTERNAL MODULE: external "redux-persist/es/storage"
|
|
308
|
-
var storage_ = __webpack_require__(23);
|
|
309
|
-
var storage_default = /*#__PURE__*/__webpack_require__.n(storage_);
|
|
310
|
-
|
|
311
|
-
// EXTERNAL MODULE: external "openstack-uicore-foundation/lib/methods"
|
|
312
|
-
var methods_ = __webpack_require__(1);
|
|
313
|
-
|
|
314
|
-
// EXTERNAL MODULE: external "sweetalert2"
|
|
315
|
-
var external_sweetalert2_ = __webpack_require__(16);
|
|
316
|
-
var external_sweetalert2_default = /*#__PURE__*/__webpack_require__.n(external_sweetalert2_);
|
|
317
|
-
|
|
318
|
-
// CONCATENATED MODULE: ./src/actions.js
|
|
319
|
-
/**
|
|
320
|
-
* Copyright 2020 OpenStack Foundation
|
|
321
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
322
|
-
* you may not use this file except in compliance with the License.
|
|
323
|
-
* You may obtain a copy of the License at
|
|
324
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
325
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
326
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
327
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
328
|
-
* See the License for the specific language governing permissions and
|
|
329
|
-
* limitations under the License.
|
|
330
|
-
**/
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
const START_WIDGET_LOADING = 'START_WIDGET_LOADING';
|
|
335
|
-
const STOP_WIDGET_LOADING = 'STOP_WIDGET_LOADING';
|
|
336
|
-
const LOAD_INITIAL_VARS = 'LOAD_INITIAL_VARS';
|
|
337
|
-
const CHANGE_STEP = 'CHANGE_STEP';
|
|
338
|
-
const GET_TICKET_TYPES = 'GET_TICKET_TYPES';
|
|
339
|
-
const GET_TAX_TYPES = 'GET_TAX_TYPES';
|
|
340
|
-
const CREATE_RESERVATION = 'CREATE_RESERVATION';
|
|
341
|
-
const CREATE_RESERVATION_SUCCESS = 'CREATE_RESERVATION_SUCCESS';
|
|
342
|
-
const CREATE_RESERVATION_ERROR = 'CREATE_RESERVATION_ERROR';
|
|
343
|
-
const DELETE_RESERVATION = 'DELETE_RESERVATION';
|
|
344
|
-
const DELETE_RESERVATION_SUCCESS = 'DELETE_RESERVATION_SUCCESS';
|
|
345
|
-
const DELETE_RESERVATION_ERROR = 'DELETE_RESERVATION_ERROR';
|
|
346
|
-
const PAY_RESERVATION = 'PAY_RESERVATION';
|
|
347
|
-
const CLEAR_RESERVATION = 'CLEAR_RESERVATION';
|
|
348
|
-
const SET_PASSWORDLESS_LOGIN = 'SET_PASSWORDLESS_LOGIN';
|
|
349
|
-
const SET_PASSWORDLESS_LENGTH = 'SET_PASSWORDLESS_LENGTH';
|
|
350
|
-
const SET_PASSWORDLESS_ERROR = 'SET_PASSWORDLESS_ERROR';
|
|
351
|
-
const GO_TO_LOGIN = 'GO_TO_LOGIN';
|
|
352
|
-
const startWidgetLoading = Object(methods_["createAction"])(START_WIDGET_LOADING);
|
|
353
|
-
const stopWidgetLoading = Object(methods_["createAction"])(STOP_WIDGET_LOADING);
|
|
354
|
-
const actions_loadSession = settings => dispatch => {
|
|
355
|
-
dispatch(Object(methods_["createAction"])(LOAD_INITIAL_VARS)(settings));
|
|
356
|
-
};
|
|
357
|
-
/*********************************************************************************/
|
|
358
|
-
|
|
359
|
-
/* TICKETS */
|
|
360
|
-
|
|
361
|
-
/*********************************************************************************/
|
|
362
|
-
// api/v1/summits/{id}/ticket-types
|
|
363
|
-
// api/v1/summits/{id}/tax-types
|
|
364
|
-
|
|
365
|
-
const actions_getTicketTypes = summitId => async (dispatch, getState, {
|
|
366
|
-
apiBaseUrl,
|
|
367
|
-
getAccessToken
|
|
368
|
-
}) => {
|
|
369
|
-
try {
|
|
370
|
-
const accessToken = await getAccessToken();
|
|
371
|
-
let params = {
|
|
372
|
-
expand: 'badge_type,badge_type.access_levels,badge_type.badge_features',
|
|
373
|
-
access_token: accessToken
|
|
374
|
-
};
|
|
375
|
-
dispatch(startWidgetLoading());
|
|
376
|
-
return Object(methods_["getRequest"])(null, Object(methods_["createAction"])(GET_TICKET_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/ticket-types`, methods_["authErrorHandler"])(params)(dispatch).then(() => {
|
|
377
|
-
dispatch(stopWidgetLoading());
|
|
378
|
-
});
|
|
379
|
-
} catch (e) {
|
|
380
|
-
return Promise.reject();
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
const actions_getTaxesTypes = summitId => async (dispatch, getState, {
|
|
384
|
-
apiBaseUrl,
|
|
385
|
-
getAccessToken
|
|
386
|
-
}) => {
|
|
387
|
-
try {
|
|
388
|
-
const accessToken = await getAccessToken();
|
|
389
|
-
let params = {
|
|
390
|
-
access_token: accessToken
|
|
391
|
-
};
|
|
392
|
-
dispatch(startWidgetLoading());
|
|
393
|
-
return Object(methods_["getRequest"])(null, Object(methods_["createAction"])(GET_TAX_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/tax-types`, methods_["authErrorHandler"])(params)(dispatch).then(() => {
|
|
394
|
-
dispatch(stopWidgetLoading());
|
|
395
|
-
});
|
|
396
|
-
} catch (e) {
|
|
397
|
-
return Promise.reject();
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
const actions_reserveTicket = (personalInformation, ticket) => async (dispatch, getState, {
|
|
401
|
-
apiBaseUrl,
|
|
402
|
-
getAccessToken
|
|
403
|
-
}) => {
|
|
404
|
-
const {
|
|
405
|
-
registrationLiteState: {
|
|
406
|
-
settings: {
|
|
407
|
-
summitId
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
} = getState();
|
|
411
|
-
let {
|
|
412
|
-
firstName,
|
|
413
|
-
lastName,
|
|
414
|
-
email,
|
|
415
|
-
company,
|
|
416
|
-
promoCode
|
|
417
|
-
} = personalInformation;
|
|
418
|
-
dispatch(startWidgetLoading());
|
|
419
|
-
const access_token = await getAccessToken();
|
|
420
|
-
let params = {
|
|
421
|
-
access_token,
|
|
422
|
-
expand: 'tickets,tickets.owner,tickets.ticket_type,tickets.ticket_type.taxes'
|
|
423
|
-
};
|
|
424
|
-
let normalizedEntity = {
|
|
425
|
-
owner_email: email,
|
|
426
|
-
owner_first_name: firstName,
|
|
427
|
-
owner_last_name: lastName,
|
|
428
|
-
owner_company: company,
|
|
429
|
-
tickets: [{
|
|
430
|
-
type_id: ticket.id,
|
|
431
|
-
promo_code: promoCode || null,
|
|
432
|
-
attendee_first_name: firstName,
|
|
433
|
-
attendee_last_name: lastName,
|
|
434
|
-
attendee_email: email
|
|
435
|
-
}]
|
|
436
|
-
};
|
|
437
|
-
return Object(methods_["postRequest"])(Object(methods_["createAction"])(CREATE_RESERVATION), Object(methods_["createAction"])(CREATE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/reserve`, normalizedEntity, methods_["authErrorHandler"] // entity
|
|
438
|
-
)(params)(dispatch).then(payload => {
|
|
439
|
-
dispatch(stopWidgetLoading());
|
|
440
|
-
payload.response.promo_code = promoCode || null;
|
|
441
|
-
|
|
442
|
-
if (!payload.response.payment_gateway_client_token) {
|
|
443
|
-
dispatch(actions_payTicket(null, null, getAccessToken));
|
|
444
|
-
return payload;
|
|
445
|
-
} else {
|
|
446
|
-
dispatch(actions_changeStep(2));
|
|
447
|
-
return payload;
|
|
448
|
-
}
|
|
449
|
-
}).catch(e => {
|
|
450
|
-
dispatch(Object(methods_["createAction"])(CREATE_RESERVATION_ERROR)(e));
|
|
451
|
-
dispatch(stopWidgetLoading());
|
|
452
|
-
return e;
|
|
453
|
-
});
|
|
454
|
-
};
|
|
455
|
-
const actions_removeReservedTicket = () => async (dispatch, getState, {
|
|
456
|
-
apiBaseUrl,
|
|
457
|
-
getAccessToken
|
|
458
|
-
}) => {
|
|
459
|
-
let {
|
|
460
|
-
registrationLiteState: {
|
|
461
|
-
settings: {
|
|
462
|
-
summitId
|
|
463
|
-
},
|
|
464
|
-
reservation: {
|
|
465
|
-
hash
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
} = getState();
|
|
469
|
-
const access_token = await getAccessToken();
|
|
470
|
-
let params = {
|
|
471
|
-
access_token,
|
|
472
|
-
expand: 'tickets,tickets.owner'
|
|
473
|
-
};
|
|
474
|
-
dispatch(startWidgetLoading());
|
|
475
|
-
return Object(methods_["deleteRequest"])(Object(methods_["createAction"])(DELETE_RESERVATION), Object(methods_["createAction"])(DELETE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${hash}`, {}, methods_["authErrorHandler"] // entity
|
|
476
|
-
)(params)(dispatch).then(payload => {
|
|
477
|
-
dispatch(stopWidgetLoading());
|
|
478
|
-
dispatch(actions_changeStep(1));
|
|
479
|
-
return payload;
|
|
480
|
-
}).catch(e => {
|
|
481
|
-
dispatch(Object(methods_["createAction"])(DELETE_RESERVATION_ERROR)(e));
|
|
482
|
-
dispatch(actions_changeStep(1));
|
|
483
|
-
dispatch(stopWidgetLoading());
|
|
484
|
-
return e;
|
|
485
|
-
});
|
|
486
|
-
};
|
|
487
|
-
const actions_payTicket = (token = null, stripe = null, zipCode = null) => async (dispatch, getState, {
|
|
488
|
-
apiBaseUrl,
|
|
489
|
-
getAccessToken
|
|
490
|
-
}) => {
|
|
491
|
-
let {
|
|
492
|
-
registrationLiteState: {
|
|
493
|
-
settings: {
|
|
494
|
-
summitId,
|
|
495
|
-
userProfile
|
|
496
|
-
},
|
|
497
|
-
reservation
|
|
498
|
-
}
|
|
499
|
-
} = getState();
|
|
500
|
-
const access_token = await getAccessToken();
|
|
501
|
-
let params = {
|
|
502
|
-
access_token,
|
|
503
|
-
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
504
|
-
};
|
|
505
|
-
let normalizedEntity = {
|
|
506
|
-
billing_address_1: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.address1) || '',
|
|
507
|
-
billing_address_2: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.address2) || '',
|
|
508
|
-
billing_address_zip_code: zipCode,
|
|
509
|
-
billing_address_city: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.locality) || '',
|
|
510
|
-
billing_address_state: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.region) || '',
|
|
511
|
-
billing_address_country: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.country) || ''
|
|
512
|
-
};
|
|
513
|
-
dispatch(startWidgetLoading());
|
|
514
|
-
|
|
515
|
-
if (reservation.payment_gateway_client_token) {
|
|
516
|
-
const {
|
|
517
|
-
id
|
|
518
|
-
} = token;
|
|
519
|
-
stripe.confirmCardPayment(reservation.payment_gateway_client_token, {
|
|
520
|
-
payment_method: {
|
|
521
|
-
card: {
|
|
522
|
-
token: id
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}).then(result => {
|
|
526
|
-
if (result.error) {
|
|
527
|
-
// Reserve error.message in your UI.
|
|
528
|
-
external_sweetalert2_default.a.fire(result.error.message, "Please retry purchase.", "warning");
|
|
529
|
-
dispatch(actions_changeStep(1));
|
|
530
|
-
dispatch(actions_removeReservedTicket());
|
|
531
|
-
dispatch(stopWidgetLoading());
|
|
532
|
-
} else {
|
|
533
|
-
return Object(methods_["putRequest"])(null, Object(methods_["createAction"])(PAY_RESERVATION), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${reservation.hash}/checkout`, normalizedEntity, methods_["authErrorHandler"] // entity
|
|
534
|
-
)(params)(dispatch).then(payload => {
|
|
535
|
-
dispatch(stopWidgetLoading());
|
|
536
|
-
dispatch(Object(methods_["createAction"])(CLEAR_RESERVATION)({}));
|
|
537
|
-
dispatch(actions_changeStep(3));
|
|
538
|
-
return payload;
|
|
539
|
-
}).catch(e => {
|
|
540
|
-
dispatch(stopWidgetLoading());
|
|
541
|
-
return e;
|
|
542
|
-
}); // The payment has succeeded. Display a success message.
|
|
543
|
-
}
|
|
544
|
-
}).catch(e => {
|
|
545
|
-
dispatch(actions_removeReservedTicket());
|
|
546
|
-
dispatch(actions_changeStep(1));
|
|
547
|
-
dispatch(stopWidgetLoading());
|
|
548
|
-
return e;
|
|
549
|
-
});
|
|
550
|
-
} else {
|
|
551
|
-
// FREE TICKET
|
|
552
|
-
return Object(methods_["putRequest"])(null, Object(methods_["createAction"])(PAY_RESERVATION), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${reservation.hash}/checkout`, normalizedEntity, methods_["authErrorHandler"] // entity
|
|
553
|
-
)(params)(dispatch).then(payload => {
|
|
554
|
-
dispatch(stopWidgetLoading());
|
|
555
|
-
dispatch(Object(methods_["createAction"])(CLEAR_RESERVATION)({}));
|
|
556
|
-
dispatch(actions_changeStep(3));
|
|
557
|
-
return payload;
|
|
558
|
-
}).catch(e => {
|
|
559
|
-
dispatch(actions_removeReservedTicket());
|
|
560
|
-
dispatch(actions_changeStep(1));
|
|
561
|
-
dispatch(stopWidgetLoading());
|
|
562
|
-
return e;
|
|
563
|
-
}); // The payment has succeeded. Display a success message.
|
|
564
|
-
}
|
|
565
|
-
};
|
|
566
|
-
const actions_changeStep = step => (dispatch, getState) => {
|
|
567
|
-
dispatch(startWidgetLoading());
|
|
568
|
-
dispatch(Object(methods_["createAction"])(CHANGE_STEP)(step));
|
|
569
|
-
dispatch(stopWidgetLoading());
|
|
570
|
-
};
|
|
571
|
-
const actions_goToLogin = () => (dispatch, getState) => {
|
|
572
|
-
dispatch(Object(methods_["createAction"])(GO_TO_LOGIN)());
|
|
573
|
-
};
|
|
574
|
-
const actions_getLoginCode = (email, getPasswordlessCode) => async (dispatch, getState) => {
|
|
575
|
-
dispatch(Object(methods_["createAction"])(SET_PASSWORDLESS_LOGIN)(email));
|
|
576
|
-
return new Promise((resolve, reject) => {
|
|
577
|
-
getPasswordlessCode(email).then(res => {
|
|
578
|
-
dispatch(Object(methods_["createAction"])(SET_PASSWORDLESS_LENGTH)(res.response));
|
|
579
|
-
resolve(res);
|
|
580
|
-
}, err => {
|
|
581
|
-
reject(err);
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
|
-
};
|
|
585
|
-
const actions_passwordlessLogin = (code, loginWithCode) => async (dispatch, getState) => {
|
|
586
|
-
const {
|
|
587
|
-
registrationLiteState: {
|
|
588
|
-
passwordless: {
|
|
589
|
-
email
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
} = getState();
|
|
593
|
-
return new Promise((resolve, reject) => {
|
|
594
|
-
loginWithCode(code, email).then(res => {
|
|
595
|
-
if (res) {
|
|
596
|
-
dispatch(Object(methods_["createAction"])(SET_PASSWORDLESS_ERROR)());
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
resolve(res);
|
|
600
|
-
}, err => {
|
|
601
|
-
reject(err);
|
|
602
|
-
});
|
|
603
|
-
});
|
|
604
|
-
};
|
|
605
|
-
const isInPersonTicketType = ticketType => {
|
|
606
|
-
/** check is the current order has or not IN_PERSON tickets types **/
|
|
607
|
-
if (ticketType.hasOwnProperty("badge_type")) {
|
|
608
|
-
let badgeType = ticketType.badge_type;
|
|
609
|
-
return badgeType.access_levels.some(al => {
|
|
610
|
-
return al.name == 'IN_PERSON';
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
return false;
|
|
615
|
-
};
|
|
616
|
-
// CONCATENATED MODULE: ./src/reducer.js
|
|
617
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
618
|
-
|
|
619
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
620
|
-
|
|
621
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Copyright 2020 OpenStack Foundation
|
|
625
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
626
|
-
* you may not use this file except in compliance with the License.
|
|
627
|
-
* You may obtain a copy of the License at
|
|
628
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
629
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
630
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
631
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
632
|
-
* See the License for the specific language governing permissions and
|
|
633
|
-
* limitations under the License.
|
|
634
|
-
**/
|
|
635
|
-
|
|
636
|
-
const DEFAULT_STATE = {
|
|
637
|
-
reservation: null,
|
|
638
|
-
checkout: null,
|
|
639
|
-
step: 0,
|
|
640
|
-
widgetLoading: false,
|
|
641
|
-
passwordless: {
|
|
642
|
-
email: null,
|
|
643
|
-
otp_length: 0,
|
|
644
|
-
code_sent: false,
|
|
645
|
-
error: false
|
|
646
|
-
},
|
|
647
|
-
ticketTypes: [],
|
|
648
|
-
taxTypes: [],
|
|
649
|
-
settings: {
|
|
650
|
-
apiBaseUrl: null,
|
|
651
|
-
summitId: null,
|
|
652
|
-
marketingData: null,
|
|
653
|
-
userProfile: null
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
658
|
-
const {
|
|
659
|
-
type,
|
|
660
|
-
payload
|
|
661
|
-
} = action;
|
|
662
|
-
|
|
663
|
-
switch (type) {
|
|
664
|
-
case START_WIDGET_LOADING:
|
|
665
|
-
{
|
|
666
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
667
|
-
widgetLoading: true
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
case STOP_WIDGET_LOADING:
|
|
672
|
-
{
|
|
673
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
674
|
-
widgetLoading: false
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
case LOAD_INITIAL_VARS:
|
|
679
|
-
const {
|
|
680
|
-
marketingData,
|
|
681
|
-
summitData,
|
|
682
|
-
apiBaseUrl,
|
|
683
|
-
profileData
|
|
684
|
-
} = payload;
|
|
685
|
-
Object.keys(marketingData).forEach(setting => {
|
|
686
|
-
if (getComputedStyle(document.documentElement).getPropertyValue(`--${setting}`)) {
|
|
687
|
-
document.documentElement.style.setProperty(`--${setting}`, marketingData[setting]);
|
|
688
|
-
document.documentElement.style.setProperty(`--${setting}50`, `${marketingData[setting]}50`);
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
692
|
-
reservation: null,
|
|
693
|
-
checkout: null,
|
|
694
|
-
passwordless: _objectSpread({}, DEFAULT_STATE.passwordless),
|
|
695
|
-
settings: _objectSpread(_objectSpread({}, DEFAULT_STATE.settings), {}, {
|
|
696
|
-
marketingData: marketingData,
|
|
697
|
-
summitId: summitData.id,
|
|
698
|
-
userProfile: profileData,
|
|
699
|
-
apiBaseUrl: apiBaseUrl
|
|
700
|
-
})
|
|
701
|
-
});
|
|
702
|
-
|
|
703
|
-
case CHANGE_STEP:
|
|
704
|
-
{
|
|
705
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
706
|
-
step: payload
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
case GET_TICKET_TYPES:
|
|
711
|
-
{
|
|
712
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
713
|
-
ticketTypes: payload.response.data
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
case GET_TAX_TYPES:
|
|
718
|
-
{
|
|
719
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
720
|
-
taxTypes: payload.response.data
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
case GO_TO_LOGIN:
|
|
725
|
-
{
|
|
726
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
727
|
-
passwordless: _objectSpread(_objectSpread({}, state.passwordless), {}, {
|
|
728
|
-
code_sent: false,
|
|
729
|
-
error: false
|
|
730
|
-
})
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
case SET_PASSWORDLESS_LOGIN:
|
|
735
|
-
{
|
|
736
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
737
|
-
passwordless: _objectSpread(_objectSpread({}, state.passwordless), {}, {
|
|
738
|
-
email: payload,
|
|
739
|
-
error: false
|
|
740
|
-
})
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
case SET_PASSWORDLESS_LENGTH:
|
|
745
|
-
{
|
|
746
|
-
const {
|
|
747
|
-
otp_length
|
|
748
|
-
} = payload;
|
|
749
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
750
|
-
passwordless: _objectSpread(_objectSpread({}, state.passwordless), {}, {
|
|
751
|
-
otp_length,
|
|
752
|
-
code_sent: true,
|
|
753
|
-
error: false
|
|
754
|
-
})
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
case SET_PASSWORDLESS_ERROR:
|
|
759
|
-
{
|
|
760
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
761
|
-
passwordless: _objectSpread(_objectSpread({}, state.passwordless), {}, {
|
|
762
|
-
error: true
|
|
763
|
-
})
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
case CREATE_RESERVATION_SUCCESS:
|
|
768
|
-
{
|
|
769
|
-
const reservation = payload.response;
|
|
770
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
771
|
-
reservation
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
case DELETE_RESERVATION_SUCCESS:
|
|
776
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
777
|
-
reservation: null
|
|
778
|
-
});
|
|
779
|
-
|
|
780
|
-
case CLEAR_RESERVATION:
|
|
781
|
-
{
|
|
782
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
783
|
-
reservation: null
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
case PAY_RESERVATION:
|
|
788
|
-
{
|
|
789
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
790
|
-
checkout: payload.response,
|
|
791
|
-
reservation: null,
|
|
792
|
-
userProfile: null
|
|
793
|
-
});
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
default:
|
|
797
|
-
{
|
|
798
|
-
return state;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
/* harmony default export */ var reducer = (RegistrationLiteReducer);
|
|
804
|
-
// CONCATENATED MODULE: ./src/store.js
|
|
805
|
-
/**
|
|
806
|
-
* Copyright 2019
|
|
807
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
808
|
-
* you may not use this file except in compliance with the License.
|
|
809
|
-
* You may obtain a copy of the License at
|
|
810
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
811
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
812
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
813
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
814
|
-
* See the License for the specific language governing permissions and
|
|
815
|
-
* limitations under the License.
|
|
816
|
-
**/
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
// default: localStorage if web, AsyncStorage if react-native
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
let store, persistor;
|
|
824
|
-
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || external_redux_["compose"];
|
|
825
|
-
const getStore = (clientId, apiBaseUrl, getAccessToken) => {
|
|
826
|
-
if (store) return store;
|
|
827
|
-
const config = {
|
|
828
|
-
key: `root_registration_lite_${clientId}`,
|
|
829
|
-
storage: storage_default.a,
|
|
830
|
-
blacklist: ['ticketTypes', 'taxTypes'] // do not persist these keys
|
|
831
|
-
|
|
832
|
-
};
|
|
833
|
-
const reducers = Object(external_redux_persist_["persistCombineReducers"])(config, {
|
|
834
|
-
registrationLiteState: reducer
|
|
835
|
-
});
|
|
836
|
-
store = Object(external_redux_["createStore"])(reducers, composeEnhancers(Object(external_redux_["applyMiddleware"])(external_redux_thunk_default.a.withExtraArgument({
|
|
837
|
-
apiBaseUrl: apiBaseUrl,
|
|
838
|
-
getAccessToken: getAccessToken
|
|
839
|
-
}))));
|
|
840
|
-
return store;
|
|
841
|
-
};
|
|
842
|
-
const getPersistor = () => {
|
|
843
|
-
if (persistor) return persistor;
|
|
844
|
-
|
|
845
|
-
const onRehydrateComplete = () => {};
|
|
846
|
-
|
|
847
|
-
persistor = Object(external_redux_persist_["persistStore"])(store, null, onRehydrateComplete);
|
|
848
|
-
return persistor;
|
|
849
|
-
};
|
|
850
|
-
// EXTERNAL MODULE: external "redux-persist/integration/react"
|
|
851
|
-
var react_ = __webpack_require__(24);
|
|
852
|
-
|
|
853
|
-
// EXTERNAL MODULE: external "react-spring"
|
|
854
|
-
var external_react_spring_ = __webpack_require__(2);
|
|
855
|
-
|
|
856
|
-
// EXTERNAL MODULE: external "react-use"
|
|
857
|
-
var external_react_use_ = __webpack_require__(8);
|
|
858
|
-
|
|
859
|
-
// EXTERNAL MODULE: external "openstack-uicore-foundation/lib/components"
|
|
860
|
-
var components_ = __webpack_require__(17);
|
|
861
|
-
|
|
862
|
-
// EXTERNAL MODULE: external "@stripe/stripe-js"
|
|
863
|
-
var stripe_js_ = __webpack_require__(25);
|
|
864
|
-
|
|
865
|
-
// EXTERNAL MODULE: ./src/styles/general.module.scss
|
|
866
|
-
var general_module = __webpack_require__(10);
|
|
867
|
-
var general_module_default = /*#__PURE__*/__webpack_require__.n(general_module);
|
|
868
|
-
|
|
869
|
-
// EXTERNAL MODULE: ./src/styles/styles.scss
|
|
870
|
-
var styles = __webpack_require__(28);
|
|
871
|
-
|
|
872
|
-
// EXTERNAL MODULE: ./src/components/login/index.module.scss
|
|
873
|
-
var index_module = __webpack_require__(11);
|
|
874
|
-
var index_module_default = /*#__PURE__*/__webpack_require__.n(index_module);
|
|
875
|
-
|
|
876
|
-
// CONCATENATED MODULE: ./src/components/login/index.js
|
|
877
|
-
/**
|
|
878
|
-
* Copyright 2020 OpenStack Foundation
|
|
879
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
880
|
-
* you may not use this file except in compliance with the License.
|
|
881
|
-
* You may obtain a copy of the License at
|
|
882
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
883
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
884
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
885
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
886
|
-
* See the License for the specific language governing permissions and
|
|
887
|
-
* limitations under the License.
|
|
888
|
-
**/
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
const LoginComponent = ({
|
|
893
|
-
options,
|
|
894
|
-
login,
|
|
895
|
-
getLoginCode,
|
|
896
|
-
getPasswordlessCode
|
|
897
|
-
}) => {
|
|
898
|
-
const [email, setEmail] = Object(external_react_["useState"])('');
|
|
899
|
-
const [emailError, setEmailError] = Object(external_react_["useState"])();
|
|
900
|
-
|
|
901
|
-
const isValidEmail = email => {
|
|
902
|
-
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,}))$/;
|
|
903
|
-
return re.test(String(email).toLowerCase());
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
const loginCode = () => {
|
|
907
|
-
let isValid = isValidEmail(email);
|
|
908
|
-
setEmailError(!isValid);
|
|
909
|
-
|
|
910
|
-
if (isValid) {
|
|
911
|
-
getLoginCode(email, getPasswordlessCode);
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
916
|
-
className: `${index_module_default.a.loginWrapper} step-wrapper`
|
|
917
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
918
|
-
className: `${index_module_default.a.innerWrapper}`
|
|
919
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
920
|
-
className: index_module_default.a.loginCode
|
|
921
|
-
}, "Enter your email address to login or signup:", /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
922
|
-
className: index_module_default.a.input
|
|
923
|
-
}, /*#__PURE__*/external_react_default.a.createElement("input", {
|
|
924
|
-
placeholder: "youremail@example.com",
|
|
925
|
-
value: email,
|
|
926
|
-
onChange: e => setEmail(e.target.value),
|
|
927
|
-
onKeyPress: ev => ev.key === 'Enter' ? loginCode() : null,
|
|
928
|
-
"data-testid": "email-input"
|
|
929
|
-
}), /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
930
|
-
onClick: () => loginCode(),
|
|
931
|
-
"data-testid": "email-button"
|
|
932
|
-
}, ">"), /*#__PURE__*/external_react_default.a.createElement("br", null)), emailError && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
933
|
-
"data-testid": "email-error"
|
|
934
|
-
}, "Please enter a valid email adress")), /*#__PURE__*/external_react_default.a.createElement("span", null, "Or you may signup or login with a social provider:"), options.map((o, index) => {
|
|
935
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
936
|
-
className: `${index_module_default.a.button}`,
|
|
937
|
-
key: `provider-${o.provider_param ? o.provider_param : 'fnid'}`,
|
|
938
|
-
"data-testid": "login-button",
|
|
939
|
-
style: {
|
|
940
|
-
color: o.button_border_color ? o.button_border_color : '#ffffff',
|
|
941
|
-
border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,
|
|
942
|
-
backgroundColor: o.button_color,
|
|
943
|
-
backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',
|
|
944
|
-
backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''
|
|
945
|
-
},
|
|
946
|
-
onClick: () => login(o.provider_param)
|
|
947
|
-
}, o.provider_label);
|
|
948
|
-
}))));
|
|
949
|
-
};
|
|
950
|
-
|
|
951
|
-
/* harmony default export */ var components_login = (LoginComponent);
|
|
952
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
953
|
-
var external_prop_types_ = __webpack_require__(14);
|
|
954
|
-
|
|
955
|
-
// EXTERNAL MODULE: external "@stripe/react-stripe-js"
|
|
956
|
-
var react_stripe_js_ = __webpack_require__(7);
|
|
957
|
-
|
|
958
|
-
// EXTERNAL MODULE: ./src/components/payment/index.module.scss
|
|
959
|
-
var payment_index_module = __webpack_require__(19);
|
|
960
|
-
var payment_index_module_default = /*#__PURE__*/__webpack_require__.n(payment_index_module);
|
|
961
|
-
|
|
962
|
-
// EXTERNAL MODULE: ./src/components/stripe-form/index.module.scss
|
|
963
|
-
var stripe_form_index_module = __webpack_require__(12);
|
|
964
|
-
var stripe_form_index_module_default = /*#__PURE__*/__webpack_require__.n(stripe_form_index_module);
|
|
965
|
-
|
|
966
|
-
// CONCATENATED MODULE: ./src/components/stripe-form/index.js
|
|
967
|
-
/**
|
|
968
|
-
* Copyright 2020 OpenStack Foundation
|
|
969
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
970
|
-
* you may not use this file except in compliance with the License.
|
|
971
|
-
* You may obtain a copy of the License at
|
|
972
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
973
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
974
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
975
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
976
|
-
* See the License for the specific language governing permissions and
|
|
977
|
-
* limitations under the License.
|
|
978
|
-
**/
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
const StripeForm = ({
|
|
986
|
-
reservation,
|
|
987
|
-
payTicket,
|
|
988
|
-
userProfile,
|
|
989
|
-
marketingData
|
|
990
|
-
}) => {
|
|
991
|
-
const stripe = Object(react_stripe_js_["useStripe"])();
|
|
992
|
-
const elements = Object(react_stripe_js_["useElements"])();
|
|
993
|
-
const [zipCode, setZipCode] = Object(external_react_["useState"])('');
|
|
994
|
-
const [zipCodeError, setZipCodeError] = Object(external_react_["useState"])({
|
|
995
|
-
required: false
|
|
996
|
-
});
|
|
997
|
-
const stripeStyle = {
|
|
998
|
-
base: {
|
|
999
|
-
// Add your base input styles here. For example: #d4e5f4
|
|
1000
|
-
color: marketingData.color_text_dark,
|
|
1001
|
-
fontSize: '16px',
|
|
1002
|
-
//fontFamily: 'inherit',
|
|
1003
|
-
backgroundColor: '#ffffff',
|
|
1004
|
-
'::placeholder': {
|
|
1005
|
-
color: marketingData.color_text_input_hints
|
|
1006
|
-
}
|
|
1007
|
-
},
|
|
1008
|
-
invalid: {
|
|
1009
|
-
color: '#e5424d',
|
|
1010
|
-
':focus': {
|
|
1011
|
-
color: '#3486cd'
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
};
|
|
1015
|
-
|
|
1016
|
-
const handleSubmit = async event => {
|
|
1017
|
-
event.preventDefault();
|
|
1018
|
-
|
|
1019
|
-
if (!zipCode) {
|
|
1020
|
-
setZipCodeError({
|
|
1021
|
-
required: true
|
|
1022
|
-
});
|
|
1023
|
-
return;
|
|
1024
|
-
} else {
|
|
1025
|
-
setZipCodeError({
|
|
1026
|
-
required: false
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
if (!stripe) {
|
|
1031
|
-
// Stripe.js has not loaded yet. Make sure to disable
|
|
1032
|
-
// form submission until Stripe.js has loaded.
|
|
1033
|
-
return;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
const cardElement = elements.getElement(react_stripe_js_["CardNumberElement"]);
|
|
1037
|
-
const {
|
|
1038
|
-
error,
|
|
1039
|
-
token
|
|
1040
|
-
} = await stripe.createToken(cardElement, {
|
|
1041
|
-
name: `${reservation.owner_first_name} ${reservation.owner_last_name}`,
|
|
1042
|
-
address_zip: zipCode,
|
|
1043
|
-
address_country: userProfile.country || ''
|
|
1044
|
-
});
|
|
1045
|
-
|
|
1046
|
-
if (token) {
|
|
1047
|
-
payTicket(token, stripe, zipCode);
|
|
1048
|
-
} else if (error) {
|
|
1049
|
-
external_sweetalert2_default.a.fire("Payment error", "There's an error generating your payment, please retry.", "warning");
|
|
1050
|
-
}
|
|
1051
|
-
};
|
|
1052
|
-
|
|
1053
|
-
return /*#__PURE__*/external_react_default.a.createElement("form", {
|
|
1054
|
-
className: stripe_form_index_module_default.a.form,
|
|
1055
|
-
id: "payment-form",
|
|
1056
|
-
onSubmit: handleSubmit
|
|
1057
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1058
|
-
className: stripe_form_index_module_default.a.fieldWrapper
|
|
1059
|
-
}, /*#__PURE__*/external_react_default.a.createElement(react_stripe_js_["CardNumberElement"], {
|
|
1060
|
-
options: {
|
|
1061
|
-
style: stripeStyle
|
|
1062
|
-
}
|
|
1063
|
-
}), /*#__PURE__*/external_react_default.a.createElement("i", {
|
|
1064
|
-
className: "fa fa-credit-card"
|
|
1065
|
-
})), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1066
|
-
className: stripe_form_index_module_default.a.fieldWrapper
|
|
1067
|
-
}, /*#__PURE__*/external_react_default.a.createElement(react_stripe_js_["CardExpiryElement"], {
|
|
1068
|
-
options: {
|
|
1069
|
-
style: stripeStyle
|
|
1070
|
-
}
|
|
1071
|
-
})), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1072
|
-
className: stripe_form_index_module_default.a.fieldWrapper
|
|
1073
|
-
}, /*#__PURE__*/external_react_default.a.createElement(react_stripe_js_["CardCvcElement"], {
|
|
1074
|
-
options: {
|
|
1075
|
-
style: stripeStyle
|
|
1076
|
-
}
|
|
1077
|
-
})), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1078
|
-
className: stripe_form_index_module_default.a.fieldWrapper,
|
|
1079
|
-
style: {
|
|
1080
|
-
marginBottom: `${zipCodeError.required ? '25px' : '0px'}`
|
|
1081
|
-
}
|
|
1082
|
-
}, /*#__PURE__*/external_react_default.a.createElement("input", {
|
|
1083
|
-
placeholder: "Zip Code",
|
|
1084
|
-
value: zipCode,
|
|
1085
|
-
onChange: e => setZipCode(e.target.value)
|
|
1086
|
-
}), zipCodeError.required && /*#__PURE__*/external_react_default.a.createElement("span", null, "This field is required")));
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
const mapStateToProps = ({
|
|
1090
|
-
registrationLiteState
|
|
1091
|
-
}) => ({
|
|
1092
|
-
marketingData: registrationLiteState.settings.marketingData
|
|
1093
|
-
});
|
|
1094
|
-
|
|
1095
|
-
/* harmony default export */ var stripe_form = (Object(external_react_redux_["connect"])(mapStateToProps, null)(StripeForm));
|
|
1096
|
-
// CONCATENATED MODULE: ./src/components/payment/index.js
|
|
1097
|
-
function payment_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1098
|
-
|
|
1099
|
-
function payment_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { payment_ownKeys(Object(source), true).forEach(function (key) { payment_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { payment_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1100
|
-
|
|
1101
|
-
function payment_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* Copyright 2020 OpenStack Foundation
|
|
1105
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1106
|
-
* you may not use this file except in compliance with the License.
|
|
1107
|
-
* You may obtain a copy of the License at
|
|
1108
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1109
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1110
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1111
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1112
|
-
* See the License for the specific language governing permissions and
|
|
1113
|
-
* limitations under the License.
|
|
1114
|
-
**/
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
const PaymentComponent = ({
|
|
1124
|
-
isActive,
|
|
1125
|
-
userProfile,
|
|
1126
|
-
reservation,
|
|
1127
|
-
payTicket,
|
|
1128
|
-
stripeKey
|
|
1129
|
-
}) => {
|
|
1130
|
-
const [ref, {
|
|
1131
|
-
height
|
|
1132
|
-
}] = Object(external_react_use_["useMeasure"])();
|
|
1133
|
-
const toggleAnimation = Object(external_react_spring_["useSpring"])({
|
|
1134
|
-
config: payment_objectSpread({
|
|
1135
|
-
bounce: 0
|
|
1136
|
-
}, external_react_spring_["config"].stiff),
|
|
1137
|
-
from: {
|
|
1138
|
-
opacity: 0,
|
|
1139
|
-
height: 0
|
|
1140
|
-
},
|
|
1141
|
-
to: {
|
|
1142
|
-
opacity: 1,
|
|
1143
|
-
height: isActive ? height + 10 : 0,
|
|
1144
|
-
marginBottom: isActive ? 5 : 0
|
|
1145
|
-
}
|
|
1146
|
-
});
|
|
1147
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1148
|
-
className: `${payment_index_module_default.a.outerWrapper} step-wrapper`
|
|
1149
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1150
|
-
className: `${payment_index_module_default.a.innerWrapper}`
|
|
1151
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1152
|
-
className: payment_index_module_default.a.title
|
|
1153
|
-
}, /*#__PURE__*/external_react_default.a.createElement("span", null, "Payment")), /*#__PURE__*/external_react_default.a.createElement(external_react_spring_["animated"].div, {
|
|
1154
|
-
style: payment_objectSpread({
|
|
1155
|
-
overflow: 'hidden'
|
|
1156
|
-
}, toggleAnimation)
|
|
1157
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1158
|
-
ref: ref
|
|
1159
|
-
}, /*#__PURE__*/external_react_default.a.createElement(react_stripe_js_["Elements"], {
|
|
1160
|
-
stripe: stripeKey
|
|
1161
|
-
}, /*#__PURE__*/external_react_default.a.createElement(stripe_form, {
|
|
1162
|
-
reservation: reservation,
|
|
1163
|
-
payTicket: payTicket,
|
|
1164
|
-
userProfile: userProfile
|
|
1165
|
-
})))))));
|
|
1166
|
-
};
|
|
1167
|
-
|
|
1168
|
-
/* harmony default export */ var payment = (PaymentComponent);
|
|
1169
|
-
// EXTERNAL MODULE: external "react-hook-form"
|
|
1170
|
-
var external_react_hook_form_ = __webpack_require__(26);
|
|
1171
|
-
|
|
1172
|
-
// EXTERNAL MODULE: ./src/components/personal-information/index.module.scss
|
|
1173
|
-
var personal_information_index_module = __webpack_require__(13);
|
|
1174
|
-
var personal_information_index_module_default = /*#__PURE__*/__webpack_require__.n(personal_information_index_module);
|
|
1175
|
-
|
|
1176
|
-
// CONCATENATED MODULE: ./src/components/personal-information/index.js
|
|
1177
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1178
|
-
|
|
1179
|
-
function personal_information_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1180
|
-
|
|
1181
|
-
function personal_information_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { personal_information_ownKeys(Object(source), true).forEach(function (key) { personal_information_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { personal_information_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1182
|
-
|
|
1183
|
-
function personal_information_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* Copyright 2020 OpenStack Foundation
|
|
1187
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1188
|
-
* you may not use this file except in compliance with the License.
|
|
1189
|
-
* You may obtain a copy of the License at
|
|
1190
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1191
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1192
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1193
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1194
|
-
* See the License for the specific language governing permissions and
|
|
1195
|
-
* limitations under the License.
|
|
1196
|
-
**/
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
const PersonalInfoComponent = ({
|
|
1205
|
-
isActive,
|
|
1206
|
-
changeForm,
|
|
1207
|
-
reservation,
|
|
1208
|
-
userProfile
|
|
1209
|
-
}) => {
|
|
1210
|
-
var _errors$email, _errors$email2;
|
|
1211
|
-
|
|
1212
|
-
const [personalInfo, setPersonalInfo] = Object(external_react_["useState"])({
|
|
1213
|
-
firstName: userProfile.given_name || '',
|
|
1214
|
-
lastName: userProfile.family_name || '',
|
|
1215
|
-
email: userProfile.email || '',
|
|
1216
|
-
company: userProfile.company || '',
|
|
1217
|
-
promoCode: ''
|
|
1218
|
-
});
|
|
1219
|
-
const {
|
|
1220
|
-
register,
|
|
1221
|
-
handleSubmit,
|
|
1222
|
-
formState: {
|
|
1223
|
-
errors
|
|
1224
|
-
}
|
|
1225
|
-
} = Object(external_react_hook_form_["useForm"])();
|
|
1226
|
-
Object(external_react_["useEffect"])(() => {
|
|
1227
|
-
if (reservation) {
|
|
1228
|
-
setPersonalInfo({
|
|
1229
|
-
firstName: reservation.owner_first_name ? reservation.owner_first_name : personalInfo.firstName,
|
|
1230
|
-
lastName: reservation.owner_last_name ? reservation.owner_last_name : personalInfo.lastName,
|
|
1231
|
-
email: reservation.owner_email ? reservation.owner_email : personalInfo.email,
|
|
1232
|
-
company: reservation.owner_company ? reservation.owner_company : personalInfo.company
|
|
1233
|
-
});
|
|
1234
|
-
}
|
|
1235
|
-
}, []);
|
|
1236
|
-
|
|
1237
|
-
const onSubmit = data => {
|
|
1238
|
-
setPersonalInfo(data);
|
|
1239
|
-
changeForm(data);
|
|
1240
|
-
};
|
|
1241
|
-
|
|
1242
|
-
const [ref, {
|
|
1243
|
-
height
|
|
1244
|
-
}] = Object(external_react_use_["useMeasure"])();
|
|
1245
|
-
const toggleAnimation = Object(external_react_spring_["useSpring"])({
|
|
1246
|
-
config: personal_information_objectSpread({
|
|
1247
|
-
bounce: 0
|
|
1248
|
-
}, external_react_spring_["config"].stiff),
|
|
1249
|
-
from: {
|
|
1250
|
-
opacity: 0,
|
|
1251
|
-
height: 0
|
|
1252
|
-
},
|
|
1253
|
-
to: {
|
|
1254
|
-
opacity: 1,
|
|
1255
|
-
height: isActive ? height + 10 : 0,
|
|
1256
|
-
marginBottom: isActive ? 5 : 0
|
|
1257
|
-
}
|
|
1258
|
-
});
|
|
1259
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1260
|
-
className: `${personal_information_index_module_default.a.outerWrapper} step-wrapper`
|
|
1261
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1262
|
-
className: `${personal_information_index_module_default.a.innerWrapper}`
|
|
1263
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1264
|
-
className: personal_information_index_module_default.a.title
|
|
1265
|
-
}, /*#__PURE__*/external_react_default.a.createElement("span", null, "Personal Information"), !isActive && /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1266
|
-
"data-testid": "personal-info"
|
|
1267
|
-
}, /*#__PURE__*/external_react_default.a.createElement("span", null, `${personalInfo.firstName} ${personalInfo.lastName} ${personalInfo.company ? `- ${personalInfo.company}` : ''}`), /*#__PURE__*/external_react_default.a.createElement("br", null), /*#__PURE__*/external_react_default.a.createElement("span", null, personalInfo.email))), /*#__PURE__*/external_react_default.a.createElement(external_react_spring_["animated"].div, {
|
|
1268
|
-
style: personal_information_objectSpread({
|
|
1269
|
-
overflow: 'hidden'
|
|
1270
|
-
}, toggleAnimation)
|
|
1271
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1272
|
-
ref: ref
|
|
1273
|
-
}, /*#__PURE__*/external_react_default.a.createElement("form", {
|
|
1274
|
-
id: "personal-info-form",
|
|
1275
|
-
onSubmit: handleSubmit(onSubmit),
|
|
1276
|
-
className: personal_information_index_module_default.a.form,
|
|
1277
|
-
"data-testid": "personal-form"
|
|
1278
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", null, /*#__PURE__*/external_react_default.a.createElement("input", _extends({
|
|
1279
|
-
type: "text",
|
|
1280
|
-
placeholder: "First name *",
|
|
1281
|
-
defaultValue: personalInfo.firstName || ''
|
|
1282
|
-
}, register("firstName", {
|
|
1283
|
-
required: true,
|
|
1284
|
-
maxLength: 80
|
|
1285
|
-
}), {
|
|
1286
|
-
"data-testid": "first-name"
|
|
1287
|
-
})), errors.firstName && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1288
|
-
"data-testid": "first-name-error"
|
|
1289
|
-
}, "This field is required")), /*#__PURE__*/external_react_default.a.createElement("div", null, /*#__PURE__*/external_react_default.a.createElement("input", _extends({
|
|
1290
|
-
type: "text",
|
|
1291
|
-
placeholder: "Last name *",
|
|
1292
|
-
defaultValue: personalInfo.lastName || ''
|
|
1293
|
-
}, register("lastName", {
|
|
1294
|
-
required: true,
|
|
1295
|
-
maxLength: 100
|
|
1296
|
-
}), {
|
|
1297
|
-
"data-testid": "last-name"
|
|
1298
|
-
})), errors.lastName && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1299
|
-
"data-testid": "last-name-error"
|
|
1300
|
-
}, "This field is required")), /*#__PURE__*/external_react_default.a.createElement("div", null, /*#__PURE__*/external_react_default.a.createElement("input", _extends({
|
|
1301
|
-
type: "text",
|
|
1302
|
-
placeholder: "Email *",
|
|
1303
|
-
className: personal_information_index_module_default.a.readOnly,
|
|
1304
|
-
readOnly: true,
|
|
1305
|
-
defaultValue: personalInfo.email || ''
|
|
1306
|
-
}, register("email", {
|
|
1307
|
-
required: true,
|
|
1308
|
-
pattern: /^\S+@\S+$/i
|
|
1309
|
-
}), {
|
|
1310
|
-
"data-testid": "email"
|
|
1311
|
-
})), ((_errors$email = errors.email) === null || _errors$email === void 0 ? void 0 : _errors$email.type) === 'required' && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1312
|
-
"data-testid": "email-error-required"
|
|
1313
|
-
}, "This field is required"), ((_errors$email2 = errors.email) === null || _errors$email2 === void 0 ? void 0 : _errors$email2.type) === 'pattern' && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1314
|
-
"data-testid": "email-error-invalid"
|
|
1315
|
-
}, "The email is invalid")), /*#__PURE__*/external_react_default.a.createElement("div", null, /*#__PURE__*/external_react_default.a.createElement("input", _extends({
|
|
1316
|
-
type: "text",
|
|
1317
|
-
placeholder: "Company *",
|
|
1318
|
-
defaultValue: personalInfo.company || ''
|
|
1319
|
-
}, register("company", {
|
|
1320
|
-
required: true
|
|
1321
|
-
}), {
|
|
1322
|
-
"data-testid": "company"
|
|
1323
|
-
})), errors.company && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1324
|
-
"data-testid": "company-error"
|
|
1325
|
-
}, "This field is required")), /*#__PURE__*/external_react_default.a.createElement("div", null, /*#__PURE__*/external_react_default.a.createElement("input", _extends({
|
|
1326
|
-
type: "text",
|
|
1327
|
-
placeholder: "Promo Code"
|
|
1328
|
-
}, register("promoCode"))))))))));
|
|
1329
|
-
};
|
|
1330
|
-
|
|
1331
|
-
/* harmony default export */ var personal_information = (PersonalInfoComponent);
|
|
1332
|
-
// EXTERNAL MODULE: ./src/components/ticket-type/index.module.scss
|
|
1333
|
-
var ticket_type_index_module = __webpack_require__(5);
|
|
1334
|
-
var ticket_type_index_module_default = /*#__PURE__*/__webpack_require__.n(ticket_type_index_module);
|
|
1335
|
-
|
|
1336
|
-
// EXTERNAL MODULE: ./src/components/ticket-dropdown/index.module.scss
|
|
1337
|
-
var ticket_dropdown_index_module = __webpack_require__(20);
|
|
1338
|
-
var ticket_dropdown_index_module_default = /*#__PURE__*/__webpack_require__.n(ticket_dropdown_index_module);
|
|
1339
|
-
|
|
1340
|
-
// CONCATENATED MODULE: ./src/components/ticket-dropdown/index.js
|
|
1341
|
-
/**
|
|
1342
|
-
* Copyright 2020 OpenStack Foundation
|
|
1343
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1344
|
-
* you may not use this file except in compliance with the License.
|
|
1345
|
-
* You may obtain a copy of the License at
|
|
1346
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1347
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1348
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1349
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1350
|
-
* See the License for the specific language governing permissions and
|
|
1351
|
-
* limitations under the License.
|
|
1352
|
-
**/
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
const TicketDropdownComponent = ({
|
|
1358
|
-
selectedTicket,
|
|
1359
|
-
ticketTypes,
|
|
1360
|
-
onTicketSelect
|
|
1361
|
-
}) => {
|
|
1362
|
-
const [active, setActive] = Object(external_react_["useState"])(false);
|
|
1363
|
-
|
|
1364
|
-
const ticketSelect = ticket => {
|
|
1365
|
-
onTicketSelect(ticket);
|
|
1366
|
-
setActive(!active);
|
|
1367
|
-
};
|
|
1368
|
-
|
|
1369
|
-
const date = new Date();
|
|
1370
|
-
let now_utc = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) / 1000;
|
|
1371
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1372
|
-
className: `${ticket_dropdown_index_module_default.a.outerWrapper}`
|
|
1373
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1374
|
-
className: ticket_dropdown_index_module_default.a.placeholder,
|
|
1375
|
-
onClick: () => setActive(!active),
|
|
1376
|
-
"data-testid": "ticket-dropdown"
|
|
1377
|
-
}, selectedTicket ? /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1378
|
-
"data-testid": "selected-ticket"
|
|
1379
|
-
}, `${selectedTicket.name} - $${selectedTicket.cost} ${selectedTicket.currency}`), /*#__PURE__*/external_react_default.a.createElement("i", {
|
|
1380
|
-
className: "fa fa-chevron-down"
|
|
1381
|
-
})) : /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1382
|
-
"data-testid": "no-ticket"
|
|
1383
|
-
}, "Select a ticket"), /*#__PURE__*/external_react_default.a.createElement("i", {
|
|
1384
|
-
className: "fa fa-chevron-down"
|
|
1385
|
-
}))), active && /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1386
|
-
className: ticket_dropdown_index_module_default.a.dropdown,
|
|
1387
|
-
"data-testid": "ticket-list"
|
|
1388
|
-
}, ticketTypes.map(t => {
|
|
1389
|
-
if (t.quantity_2_sell - t.quantity_sold > 0 && (t.sales_start_date === null && t.sales_end_date === null || now_utc >= t.sales_start_date && now_utc <= t.sales_end_date)) {
|
|
1390
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1391
|
-
key: t.id,
|
|
1392
|
-
onClick: () => ticketSelect(t)
|
|
1393
|
-
}, `${t.name} - $${t.cost} ${t.currency}`);
|
|
1394
|
-
}
|
|
1395
|
-
})));
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
/* harmony default export */ var ticket_dropdown = (TicketDropdownComponent);
|
|
1399
|
-
// CONCATENATED MODULE: ./src/components/ticket-type/index.js
|
|
1400
|
-
function ticket_type_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1401
|
-
|
|
1402
|
-
function ticket_type_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ticket_type_ownKeys(Object(source), true).forEach(function (key) { ticket_type_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ticket_type_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1403
|
-
|
|
1404
|
-
function ticket_type_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1405
|
-
|
|
1406
|
-
/**
|
|
1407
|
-
* Copyright 2020 OpenStack Foundation
|
|
1408
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1409
|
-
* you may not use this file except in compliance with the License.
|
|
1410
|
-
* You may obtain a copy of the License at
|
|
1411
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1412
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1413
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1414
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1415
|
-
* See the License for the specific language governing permissions and
|
|
1416
|
-
* limitations under the License.
|
|
1417
|
-
**/
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
const TicketTypeComponent = ({
|
|
1427
|
-
ticketTypes,
|
|
1428
|
-
taxTypes,
|
|
1429
|
-
isActive,
|
|
1430
|
-
changeForm,
|
|
1431
|
-
reservation,
|
|
1432
|
-
inPersonDisclaimer
|
|
1433
|
-
}) => {
|
|
1434
|
-
const [ticket, setTicket] = Object(external_react_["useState"])(null);
|
|
1435
|
-
const [ref, {
|
|
1436
|
-
height
|
|
1437
|
-
}] = Object(external_react_use_["useMeasure"])();
|
|
1438
|
-
const toggleAnimation = Object(external_react_spring_["useSpring"])({
|
|
1439
|
-
config: ticket_type_objectSpread({
|
|
1440
|
-
bounce: 0
|
|
1441
|
-
}, external_react_spring_["config"].stiff),
|
|
1442
|
-
from: {
|
|
1443
|
-
opacity: 0,
|
|
1444
|
-
height: 0
|
|
1445
|
-
},
|
|
1446
|
-
to: {
|
|
1447
|
-
opacity: 1,
|
|
1448
|
-
height: isActive ? height + 10 : 0,
|
|
1449
|
-
marginBottom: isActive ? 5 : 0
|
|
1450
|
-
}
|
|
1451
|
-
});
|
|
1452
|
-
Object(external_react_["useEffect"])(() => {
|
|
1453
|
-
var _reservation$tickets;
|
|
1454
|
-
|
|
1455
|
-
if (reservation && ((_reservation$tickets = reservation.tickets) === null || _reservation$tickets === void 0 ? void 0 : _reservation$tickets.length) > 0) {
|
|
1456
|
-
setTicket(ticketTypes.find(t => t.id === reservation.tickets[0].ticket_type_id));
|
|
1457
|
-
}
|
|
1458
|
-
}, []);
|
|
1459
|
-
Object(external_react_["useEffect"])(() => {
|
|
1460
|
-
changeForm(ticket);
|
|
1461
|
-
}, [ticket]);
|
|
1462
|
-
|
|
1463
|
-
const ticketSelect = t => {
|
|
1464
|
-
setTicket(t);
|
|
1465
|
-
};
|
|
1466
|
-
|
|
1467
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1468
|
-
className: `${ticket_type_index_module_default.a.outerWrapper} step-wrapper`
|
|
1469
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1470
|
-
className: `${ticket_type_index_module_default.a.innerWrapper}`
|
|
1471
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1472
|
-
className: ticket_type_index_module_default.a.title
|
|
1473
|
-
}, /*#__PURE__*/external_react_default.a.createElement("span", null, "Ticket "), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1474
|
-
className: ticket_type_index_module_default.a.summary
|
|
1475
|
-
}, !isActive && (reservation === null || reservation === void 0 ? void 0 : reservation.discount_amount) > 0 ? /*#__PURE__*/external_react_default.a.createElement("span", null, ticket && /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, ticket.name, " \xA0", /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1476
|
-
className: ticket_type_index_module_default.a.crossOut
|
|
1477
|
-
}, "$", ticket.cost, " \xA0"), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1478
|
-
className: ticket_type_index_module_default.a.discount
|
|
1479
|
-
}, "$", reservation.raw_amount - reservation.discount_amount), ticket.currency), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1480
|
-
className: ticket_type_index_module_default.a.promo
|
|
1481
|
-
}, "Promo code applied")) : /*#__PURE__*/external_react_default.a.createElement("span", null, ticket ? `${ticket.name}: $${ticket.cost} ${ticket.currency}` : 'No ticket selected'), !isActive && (reservation === null || reservation === void 0 ? void 0 : reservation.taxes_amount) > 0 && /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("br", null), /*#__PURE__*/external_react_default.a.createElement("span", null, "Taxes: $", reservation === null || reservation === void 0 ? void 0 : reservation.taxes_amount, " ", ticket === null || ticket === void 0 ? void 0 : ticket.currency)))), /*#__PURE__*/external_react_default.a.createElement(external_react_spring_["animated"].div, {
|
|
1482
|
-
style: ticket_type_objectSpread({
|
|
1483
|
-
overflow: 'hidden'
|
|
1484
|
-
}, toggleAnimation)
|
|
1485
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1486
|
-
ref: ref,
|
|
1487
|
-
className: ticket_type_index_module_default.a.dropdown
|
|
1488
|
-
}, /*#__PURE__*/external_react_default.a.createElement(ticket_dropdown, {
|
|
1489
|
-
selectedTicket: ticket,
|
|
1490
|
-
ticketTypes: ticketTypes,
|
|
1491
|
-
onTicketSelect: t => ticketSelect(t)
|
|
1492
|
-
}))), inPersonDisclaimer && ticket && isInPersonTicketType(ticket) && /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1493
|
-
className: ticket_type_index_module_default.a.inPersonDisclaimer
|
|
1494
|
-
}, /*#__PURE__*/external_react_default.a.createElement(components_["RawHTML"], null, inPersonDisclaimer)))));
|
|
1495
|
-
};
|
|
1496
|
-
|
|
1497
|
-
/* harmony default export */ var ticket_type = (TicketTypeComponent);
|
|
1498
|
-
// EXTERNAL MODULE: ./src/components/button-bar/index.module.scss
|
|
1499
|
-
var button_bar_index_module = __webpack_require__(3);
|
|
1500
|
-
var button_bar_index_module_default = /*#__PURE__*/__webpack_require__.n(button_bar_index_module);
|
|
1501
|
-
|
|
1502
|
-
// CONCATENATED MODULE: ./src/components/button-bar/index.js
|
|
1503
|
-
/**
|
|
1504
|
-
* Copyright 2020 OpenStack Foundation
|
|
1505
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1506
|
-
* you may not use this file except in compliance with the License.
|
|
1507
|
-
* You may obtain a copy of the License at
|
|
1508
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1509
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1510
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1511
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1512
|
-
* See the License for the specific language governing permissions and
|
|
1513
|
-
* limitations under the License.
|
|
1514
|
-
**/
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
const ButtonBarComponent = ({
|
|
1520
|
-
step,
|
|
1521
|
-
changeStep,
|
|
1522
|
-
registrationForm,
|
|
1523
|
-
removeReservedTicket,
|
|
1524
|
-
inPersonDisclaimer,
|
|
1525
|
-
goToRegistration
|
|
1526
|
-
}) => {
|
|
1527
|
-
var _registrationForm$tic, _registrationForm$tic2;
|
|
1528
|
-
|
|
1529
|
-
const nextButtonText = inPersonDisclaimer && registrationForm !== null && registrationForm !== void 0 && registrationForm.ticketType && isInPersonTicketType(registrationForm.ticketType) ? 'Accept' : 'Next';
|
|
1530
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1531
|
-
className: `${button_bar_index_module_default.a.outerWrapper}`
|
|
1532
|
-
}, step !== 3 && /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1533
|
-
className: `${button_bar_index_module_default.a.innerWrapper}`
|
|
1534
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1535
|
-
className: button_bar_index_module_default.a.required
|
|
1536
|
-
}, step !== 0 && /*#__PURE__*/external_react_default.a.createElement("span", null, "* Required fields ", /*#__PURE__*/external_react_default.a.createElement("br", null), " "), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1537
|
-
className: button_bar_index_module_default.a.registration,
|
|
1538
|
-
onClick: () => goToRegistration()
|
|
1539
|
-
}, "Need multiple tickets?")), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1540
|
-
className: button_bar_index_module_default.a.actions
|
|
1541
|
-
}, step !== 0 && step !== 2 && /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1542
|
-
className: `${button_bar_index_module_default.a.button} button`,
|
|
1543
|
-
onClick: () => changeStep(step - 1)
|
|
1544
|
-
}, "< Back"), step !== 0 && step === 2 && /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1545
|
-
className: `${button_bar_index_module_default.a.button} button`,
|
|
1546
|
-
onClick: () => removeReservedTicket()
|
|
1547
|
-
}, "< Back"), step === 0 && /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1548
|
-
disabled: !registrationForm.ticketType,
|
|
1549
|
-
className: `${button_bar_index_module_default.a.button} button`,
|
|
1550
|
-
onClick: () => changeStep(step + 1)
|
|
1551
|
-
}, nextButtonText), step === 1 && ((_registrationForm$tic = registrationForm.ticketType) === null || _registrationForm$tic === void 0 ? void 0 : _registrationForm$tic.cost) === 0 && /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1552
|
-
className: `${button_bar_index_module_default.a.button} button`,
|
|
1553
|
-
type: "submit",
|
|
1554
|
-
form: "personal-info-form"
|
|
1555
|
-
}, "Get Ticket"), step === 1 && ((_registrationForm$tic2 = registrationForm.ticketType) === null || _registrationForm$tic2 === void 0 ? void 0 : _registrationForm$tic2.cost) > 0 && /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1556
|
-
className: `${button_bar_index_module_default.a.button} button`,
|
|
1557
|
-
type: "submit",
|
|
1558
|
-
form: "personal-info-form"
|
|
1559
|
-
}, "Next"), step === 2 && /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1560
|
-
className: `${button_bar_index_module_default.a.button} button`,
|
|
1561
|
-
type: "submit",
|
|
1562
|
-
form: "payment-form"
|
|
1563
|
-
}, "Pay Now")))));
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
/* harmony default export */ var button_bar = (ButtonBarComponent);
|
|
1567
|
-
// EXTERNAL MODULE: ./src/components/purchase-complete/index.module.scss
|
|
1568
|
-
var purchase_complete_index_module = __webpack_require__(6);
|
|
1569
|
-
var purchase_complete_index_module_default = /*#__PURE__*/__webpack_require__.n(purchase_complete_index_module);
|
|
1570
|
-
|
|
1571
|
-
// CONCATENATED MODULE: ./src/components/purchase-complete/index.js
|
|
1572
|
-
/**
|
|
1573
|
-
* Copyright 2020 OpenStack Foundation
|
|
1574
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1575
|
-
* you may not use this file except in compliance with the License.
|
|
1576
|
-
* You may obtain a copy of the License at
|
|
1577
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1578
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1579
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1580
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1581
|
-
* See the License for the specific language governing permissions and
|
|
1582
|
-
* limitations under the License.
|
|
1583
|
-
**/
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
const PurchaseComplete = ({
|
|
1590
|
-
checkout,
|
|
1591
|
-
onPurchaseComplete,
|
|
1592
|
-
goToExtraQuestions,
|
|
1593
|
-
goToEvent,
|
|
1594
|
-
summit,
|
|
1595
|
-
supportEmail = "support@fntech.com"
|
|
1596
|
-
}) => {
|
|
1597
|
-
Object(external_react_["useEffect"])(() => {
|
|
1598
|
-
onPurchaseComplete(checkout);
|
|
1599
|
-
}, []);
|
|
1600
|
-
const date = new Date();
|
|
1601
|
-
let now_utc = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) / 1000;
|
|
1602
|
-
const isActive = summit.start_date < now_utc && summit.end_date > now_utc;
|
|
1603
|
-
const startDateFormatted = {
|
|
1604
|
-
date: Object(methods_["epochToMomentTimeZone"])(summit.start_date, summit.time_zone_id).format('MMMM D'),
|
|
1605
|
-
time: Object(methods_["epochToMomentTimeZone"])(summit.start_date, summit.time_zone_id).format('HH:mm')
|
|
1606
|
-
};
|
|
1607
|
-
|
|
1608
|
-
const needExtraQuestions = () => {
|
|
1609
|
-
return summit.order_extra_questions.some(q => q.mandatory === true) ? true : false;
|
|
1610
|
-
};
|
|
1611
|
-
|
|
1612
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1613
|
-
className: purchase_complete_index_module_default.a.wrapper
|
|
1614
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1615
|
-
className: purchase_complete_index_module_default.a.circle
|
|
1616
|
-
}, /*#__PURE__*/external_react_default.a.createElement("i", {
|
|
1617
|
-
className: "fa fa-ticket"
|
|
1618
|
-
})), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1619
|
-
className: purchase_complete_index_module_default.a.complete
|
|
1620
|
-
}, "Your order is complete"), isActive ? needExtraQuestions() ? /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("span", null, "This ticket requires additional details. ", /*#__PURE__*/external_react_default.a.createElement("br", null)), /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1621
|
-
className: `${purchase_complete_index_module_default.a.button} button`,
|
|
1622
|
-
onClick: () => goToExtraQuestions()
|
|
1623
|
-
}, "Finish now")) : /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1624
|
-
className: `${purchase_complete_index_module_default.a.button} button`,
|
|
1625
|
-
onClick: () => goToEvent()
|
|
1626
|
-
}, "Access event now")) : /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("span", null, "The event will start on ", startDateFormatted.date, " at ", startDateFormatted.time, " ", summit.time_zone_id, " ", /*#__PURE__*/external_react_default.a.createElement("br", null), "This ticket requires additional details."), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1627
|
-
className: purchase_complete_index_module_default.a.actions
|
|
1628
|
-
}, /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1629
|
-
className: `${purchase_complete_index_module_default.a.button} button`,
|
|
1630
|
-
onClick: () => goToExtraQuestions()
|
|
1631
|
-
}, "Finish Now"), /*#__PURE__*/external_react_default.a.createElement("button", {
|
|
1632
|
-
className: `${purchase_complete_index_module_default.a.button} button`,
|
|
1633
|
-
onClick: () => goToEvent()
|
|
1634
|
-
}, "Do this later"))), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1635
|
-
className: purchase_complete_index_module_default.a.footer
|
|
1636
|
-
}, "For further assistance, please email ", /*#__PURE__*/external_react_default.a.createElement("a", {
|
|
1637
|
-
href: `mailto:${supportEmail}`
|
|
1638
|
-
}, supportEmail)));
|
|
1639
|
-
};
|
|
1640
|
-
|
|
1641
|
-
/* harmony default export */ var purchase_complete = (PurchaseComplete);
|
|
1642
|
-
// EXTERNAL MODULE: external "react-otp-input"
|
|
1643
|
-
var external_react_otp_input_ = __webpack_require__(27);
|
|
1644
|
-
var external_react_otp_input_default = /*#__PURE__*/__webpack_require__.n(external_react_otp_input_);
|
|
1645
|
-
|
|
1646
|
-
// EXTERNAL MODULE: ./src/components/login-passwordless/index.module.scss
|
|
1647
|
-
var login_passwordless_index_module = __webpack_require__(4);
|
|
1648
|
-
var login_passwordless_index_module_default = /*#__PURE__*/__webpack_require__.n(login_passwordless_index_module);
|
|
1649
|
-
|
|
1650
|
-
// CONCATENATED MODULE: ./src/components/login-passwordless/index.js
|
|
1651
|
-
/**
|
|
1652
|
-
* Copyright 2020 OpenStack Foundation
|
|
1653
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1654
|
-
* you may not use this file except in compliance with the License.
|
|
1655
|
-
* You may obtain a copy of the License at
|
|
1656
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1657
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1658
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1659
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1660
|
-
* See the License for the specific language governing permissions and
|
|
1661
|
-
* limitations under the License.
|
|
1662
|
-
**/
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
const PasswordlessLoginComponent = ({
|
|
1669
|
-
email,
|
|
1670
|
-
codeLength,
|
|
1671
|
-
passwordlessLogin,
|
|
1672
|
-
loginWithCode,
|
|
1673
|
-
codeError,
|
|
1674
|
-
goToLogin,
|
|
1675
|
-
getLoginCode,
|
|
1676
|
-
getPasswordlessCode
|
|
1677
|
-
}) => {
|
|
1678
|
-
const [otpCode, setOtpCode] = Object(external_react_["useState"])('');
|
|
1679
|
-
const [otpError, setOtpError] = Object(external_react_["useState"])(false);
|
|
1680
|
-
|
|
1681
|
-
const tryPasswordlessLogin = code => {
|
|
1682
|
-
if (code.length === codeLength) {
|
|
1683
|
-
setOtpError(false);
|
|
1684
|
-
passwordlessLogin(otpCode, loginWithCode);
|
|
1685
|
-
} else {
|
|
1686
|
-
setOtpError(true);
|
|
1687
|
-
}
|
|
1688
|
-
};
|
|
1689
|
-
|
|
1690
|
-
const resendCode = () => {
|
|
1691
|
-
getLoginCode(email, getPasswordlessCode);
|
|
1692
|
-
};
|
|
1693
|
-
|
|
1694
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1695
|
-
className: `${login_passwordless_index_module_default.a.passwordlessWrapper} step-wrapper`
|
|
1696
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1697
|
-
className: `${login_passwordless_index_module_default.a.innerWrapper}`
|
|
1698
|
-
}, /*#__PURE__*/external_react_default.a.createElement("span", null, "We sent your single-use login code to ", /*#__PURE__*/external_react_default.a.createElement("br", null), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1699
|
-
"data-testid": "email"
|
|
1700
|
-
}, email), /*#__PURE__*/external_react_default.a.createElement("br", null), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1701
|
-
className: login_passwordless_index_module_default.a.digits,
|
|
1702
|
-
"data-testid": "code-digits"
|
|
1703
|
-
}, "Add the ", codeLength, " digit code below")), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1704
|
-
className: login_passwordless_index_module_default.a.codeInput
|
|
1705
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_otp_input_default.a, {
|
|
1706
|
-
value: otpCode,
|
|
1707
|
-
onChange: code => setOtpCode(code),
|
|
1708
|
-
numInputs: codeLength,
|
|
1709
|
-
shouldAutoFocus: true,
|
|
1710
|
-
hasErrored: otpError || codeError,
|
|
1711
|
-
errorStyle: {
|
|
1712
|
-
border: '1px solid #e5424d'
|
|
1713
|
-
},
|
|
1714
|
-
"data-testid": "otp-input"
|
|
1715
|
-
})), codeError && /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1716
|
-
className: login_passwordless_index_module_default.a.error,
|
|
1717
|
-
"data-testid": "error"
|
|
1718
|
-
}, "The code you entered it's incorrect. ", /*#__PURE__*/external_react_default.a.createElement("br", null), " Please try again."), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1719
|
-
className: login_passwordless_index_module_default.a.verify
|
|
1720
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1721
|
-
className: `${login_passwordless_index_module_default.a.button} button`,
|
|
1722
|
-
onClick: () => tryPasswordlessLogin(otpCode),
|
|
1723
|
-
"data-testid": "verify"
|
|
1724
|
-
}, "Verify"), /*#__PURE__*/external_react_default.a.createElement("b", null, "or go back and ", /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1725
|
-
className: login_passwordless_index_module_default.a.link,
|
|
1726
|
-
onClick: () => goToLogin(),
|
|
1727
|
-
"data-testid": "go-back"
|
|
1728
|
-
}, "try another way")))), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1729
|
-
className: login_passwordless_index_module_default.a.resend
|
|
1730
|
-
}, "Didn\u2019t receive it? Check your spam/junk folder, or ", /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1731
|
-
className: login_passwordless_index_module_default.a.link,
|
|
1732
|
-
onClick: () => resendCode(),
|
|
1733
|
-
"data-testid": "resend"
|
|
1734
|
-
}, "resend email"), " now.")));
|
|
1735
|
-
};
|
|
1736
|
-
|
|
1737
|
-
/* harmony default export */ var login_passwordless = (PasswordlessLoginComponent);
|
|
1738
|
-
// EXTERNAL MODULE: ./src/components/ticket-owned/index.module.scss
|
|
1739
|
-
var ticket_owned_index_module = __webpack_require__(15);
|
|
1740
|
-
var ticket_owned_index_module_default = /*#__PURE__*/__webpack_require__.n(ticket_owned_index_module);
|
|
1741
|
-
|
|
1742
|
-
// CONCATENATED MODULE: ./src/components/ticket-owned/index.js
|
|
1743
|
-
/**
|
|
1744
|
-
* Copyright 2020 OpenStack Foundation
|
|
1745
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1746
|
-
* you may not use this file except in compliance with the License.
|
|
1747
|
-
* You may obtain a copy of the License at
|
|
1748
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1749
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1750
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1751
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1752
|
-
* See the License for the specific language governing permissions and
|
|
1753
|
-
* limitations under the License.
|
|
1754
|
-
**/
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
const TicketOwnedComponent = ({
|
|
1759
|
-
goToRegistration
|
|
1760
|
-
}) => {
|
|
1761
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1762
|
-
className: `${ticket_owned_index_module_default.a.wrapper}`
|
|
1763
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1764
|
-
className: ticket_owned_index_module_default.a.circle
|
|
1765
|
-
}, /*#__PURE__*/external_react_default.a.createElement("i", {
|
|
1766
|
-
className: "fa fa-ticket"
|
|
1767
|
-
})), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1768
|
-
className: ticket_owned_index_module_default.a.complete
|
|
1769
|
-
}, "Our records show you have a ticket(s) to this event."), /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
1770
|
-
className: ticket_owned_index_module_default.a.complete
|
|
1771
|
-
}, "If you would like to purchase more, ", /*#__PURE__*/external_react_default.a.createElement("a", {
|
|
1772
|
-
onClick: () => goToRegistration()
|
|
1773
|
-
}, "click here"), ".")));
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
/* harmony default export */ var ticket_owned = (TicketOwnedComponent);
|
|
1777
|
-
// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
1778
|
-
const _excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicket", "onPurchaseComplete", "getTicketTypes", "getTaxesTypes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToEvent", "goToRegistration", "profileData", "summitData", "supportEmail", "ticketOwned", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile"];
|
|
1779
|
-
|
|
1780
|
-
function registration_lite_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1781
|
-
|
|
1782
|
-
function registration_lite_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { registration_lite_ownKeys(Object(source), true).forEach(function (key) { registration_lite_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { registration_lite_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1783
|
-
|
|
1784
|
-
function registration_lite_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1785
|
-
|
|
1786
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
1787
|
-
|
|
1788
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
1789
|
-
|
|
1790
|
-
/**
|
|
1791
|
-
* Copyright 2020 OpenStack Foundation
|
|
1792
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1793
|
-
* you may not use this file except in compliance with the License.
|
|
1794
|
-
* You may obtain a copy of the License at
|
|
1795
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1796
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1797
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1798
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1799
|
-
* See the License for the specific language governing permissions and
|
|
1800
|
-
* limitations under the License.
|
|
1801
|
-
**/
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
const RegistrationLite = _ref => {
|
|
1821
|
-
var _registrationForm$tic, _registrationForm$tic2;
|
|
1822
|
-
|
|
1823
|
-
let {
|
|
1824
|
-
loadSession,
|
|
1825
|
-
setMarketingSettings,
|
|
1826
|
-
changeStep,
|
|
1827
|
-
removeReservedTicket,
|
|
1828
|
-
reserveTicket,
|
|
1829
|
-
payTicket,
|
|
1830
|
-
onPurchaseComplete,
|
|
1831
|
-
getTicketTypes,
|
|
1832
|
-
getTaxesTypes,
|
|
1833
|
-
getLoginCode,
|
|
1834
|
-
passwordlessLogin,
|
|
1835
|
-
goToLogin,
|
|
1836
|
-
loginOptions,
|
|
1837
|
-
reservation,
|
|
1838
|
-
checkout,
|
|
1839
|
-
ticketTypes,
|
|
1840
|
-
taxTypes,
|
|
1841
|
-
step,
|
|
1842
|
-
passwordlessCodeSent,
|
|
1843
|
-
passwordlessEmail,
|
|
1844
|
-
passwordlessCode,
|
|
1845
|
-
getPasswordlessCode,
|
|
1846
|
-
passwordlessCodeError,
|
|
1847
|
-
loginWithCode,
|
|
1848
|
-
goToExtraQuestions,
|
|
1849
|
-
goToEvent,
|
|
1850
|
-
goToRegistration,
|
|
1851
|
-
profileData,
|
|
1852
|
-
summitData,
|
|
1853
|
-
supportEmail,
|
|
1854
|
-
ticketOwned,
|
|
1855
|
-
widgetLoading,
|
|
1856
|
-
loading,
|
|
1857
|
-
inPersonDisclaimer,
|
|
1858
|
-
userProfile
|
|
1859
|
-
} = _ref,
|
|
1860
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
1861
|
-
|
|
1862
|
-
const [registrationForm, setRegistrationForm] = Object(external_react_["useState"])({
|
|
1863
|
-
ticketType: null,
|
|
1864
|
-
personalInformation: null,
|
|
1865
|
-
paymentInformation: null
|
|
1866
|
-
});
|
|
1867
|
-
let publicKey = null;
|
|
1868
|
-
|
|
1869
|
-
for (let profile of summitData.payment_profiles) {
|
|
1870
|
-
if (profile.application_type === 'Registration') {
|
|
1871
|
-
publicKey = profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key;
|
|
1872
|
-
break;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
const stripePromise = Object(external_react_["useMemo"])(() => Object(stripe_js_["loadStripe"])(publicKey), [publicKey]);
|
|
1877
|
-
|
|
1878
|
-
const ticketReservation = () => {
|
|
1879
|
-
reserveTicket(registrationForm.personalInformation, registrationForm.ticketType);
|
|
1880
|
-
};
|
|
1881
|
-
|
|
1882
|
-
Object(external_react_["useEffect"])(() => {
|
|
1883
|
-
loadSession(registration_lite_objectSpread(registration_lite_objectSpread({}, rest), {}, {
|
|
1884
|
-
summitData,
|
|
1885
|
-
profileData
|
|
1886
|
-
}));
|
|
1887
|
-
|
|
1888
|
-
if (!profileData) {
|
|
1889
|
-
changeStep(0);
|
|
1890
|
-
}
|
|
1891
|
-
}, [profileData]);
|
|
1892
|
-
Object(external_react_["useEffect"])(() => {
|
|
1893
|
-
if (summitData && profileData) {
|
|
1894
|
-
getTicketTypes(summitData.id).then(() => getTaxesTypes(summitData.id));
|
|
1895
|
-
}
|
|
1896
|
-
}, [summitData, profileData]);
|
|
1897
|
-
Object(external_react_["useEffect"])(() => {
|
|
1898
|
-
if (step === 1 && registrationForm.ticketType && registrationForm.personalInformation) {
|
|
1899
|
-
ticketReservation();
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
if (step > 0 && !registrationForm.ticketType) {
|
|
1903
|
-
changeStep(0);
|
|
1904
|
-
}
|
|
1905
|
-
}, [registrationForm]);
|
|
1906
|
-
const [ref, {
|
|
1907
|
-
height
|
|
1908
|
-
}] = Object(external_react_use_["useMeasure"])();
|
|
1909
|
-
const toggleAnimation = Object(external_react_spring_["useSpring"])({
|
|
1910
|
-
config: registration_lite_objectSpread({
|
|
1911
|
-
bounce: 0
|
|
1912
|
-
}, external_react_spring_["config"].stiff),
|
|
1913
|
-
to: {
|
|
1914
|
-
opacity: ((_registrationForm$tic = registrationForm.ticketType) === null || _registrationForm$tic === void 0 ? void 0 : _registrationForm$tic.cost) === 0 ? 0 : 1,
|
|
1915
|
-
height: ((_registrationForm$tic2 = registrationForm.ticketType) === null || _registrationForm$tic2 === void 0 ? void 0 : _registrationForm$tic2.cost) === 0 ? 0 : height
|
|
1916
|
-
}
|
|
1917
|
-
});
|
|
1918
|
-
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1919
|
-
id: "modal",
|
|
1920
|
-
className: "modal is-active"
|
|
1921
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1922
|
-
className: "modal-background"
|
|
1923
|
-
}), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1924
|
-
className: "modal-content"
|
|
1925
|
-
}, /*#__PURE__*/external_react_default.a.createElement(components_["AjaxLoader"], {
|
|
1926
|
-
relative: true,
|
|
1927
|
-
color: '#ffffff',
|
|
1928
|
-
show: widgetLoading || loading,
|
|
1929
|
-
size: 80
|
|
1930
|
-
}), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1931
|
-
className: `${general_module_default.a.outerWrapper} summit-registration-lite`
|
|
1932
|
-
}, /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1933
|
-
className: `${general_module_default.a.innerWrapper}`
|
|
1934
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1935
|
-
className: general_module_default.a.title
|
|
1936
|
-
}, /*#__PURE__*/external_react_default.a.createElement("span", null, summitData.name), /*#__PURE__*/external_react_default.a.createElement("i", {
|
|
1937
|
-
className: "fa fa-close",
|
|
1938
|
-
"aria-label": "close",
|
|
1939
|
-
onClick: () => rest.closeWidget()
|
|
1940
|
-
})), ticketOwned && /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1941
|
-
className: general_module_default.a.stepsWrapper
|
|
1942
|
-
}, /*#__PURE__*/external_react_default.a.createElement(ticket_owned, {
|
|
1943
|
-
goToRegistration: goToRegistration
|
|
1944
|
-
})), !ticketOwned && /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1945
|
-
className: general_module_default.a.stepsWrapper
|
|
1946
|
-
}, !profileData && !passwordlessCodeSent && /*#__PURE__*/external_react_default.a.createElement(components_login, {
|
|
1947
|
-
options: loginOptions,
|
|
1948
|
-
login: provider => rest.authUser(provider),
|
|
1949
|
-
getLoginCode: getLoginCode,
|
|
1950
|
-
getPasswordlessCode: getPasswordlessCode
|
|
1951
|
-
}), !profileData && passwordlessCodeSent && /*#__PURE__*/external_react_default.a.createElement(login_passwordless, {
|
|
1952
|
-
codeLength: passwordlessCode,
|
|
1953
|
-
email: passwordlessEmail,
|
|
1954
|
-
passwordlessLogin: passwordlessLogin,
|
|
1955
|
-
loginWithCode: loginWithCode,
|
|
1956
|
-
codeError: passwordlessCodeError,
|
|
1957
|
-
goToLogin: goToLogin,
|
|
1958
|
-
getLoginCode: getLoginCode,
|
|
1959
|
-
getPasswordlessCode: getPasswordlessCode
|
|
1960
|
-
}), profileData && step !== 3 && ticketTypes.length > 0 && /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement(ticket_type, {
|
|
1961
|
-
ticketTypes: ticketTypes,
|
|
1962
|
-
inPersonDisclaimer: inPersonDisclaimer,
|
|
1963
|
-
taxTypes: taxTypes,
|
|
1964
|
-
reservation: reservation,
|
|
1965
|
-
isActive: step === 0,
|
|
1966
|
-
changeForm: t => setRegistrationForm(registration_lite_objectSpread(registration_lite_objectSpread({}, registrationForm), {}, {
|
|
1967
|
-
ticketType: t
|
|
1968
|
-
}))
|
|
1969
|
-
}), /*#__PURE__*/external_react_default.a.createElement(personal_information, {
|
|
1970
|
-
isActive: step === 1,
|
|
1971
|
-
reservation: reservation,
|
|
1972
|
-
userProfile: profileData,
|
|
1973
|
-
changeForm: personalForm => setRegistrationForm(registration_lite_objectSpread(registration_lite_objectSpread({}, registrationForm), {}, {
|
|
1974
|
-
personalInformation: personalForm
|
|
1975
|
-
}))
|
|
1976
|
-
}), /*#__PURE__*/external_react_default.a.createElement(external_react_spring_["animated"].div, {
|
|
1977
|
-
style: registration_lite_objectSpread({}, toggleAnimation)
|
|
1978
|
-
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
1979
|
-
ref: ref
|
|
1980
|
-
}, /*#__PURE__*/external_react_default.a.createElement(payment, {
|
|
1981
|
-
isActive: step === 2,
|
|
1982
|
-
reservation: reservation,
|
|
1983
|
-
payTicket: payTicket,
|
|
1984
|
-
userProfile: profileData,
|
|
1985
|
-
stripeKey: stripePromise
|
|
1986
|
-
})))), profileData && step === 3 && /*#__PURE__*/external_react_default.a.createElement(purchase_complete, {
|
|
1987
|
-
checkout: checkout,
|
|
1988
|
-
summit: summitData,
|
|
1989
|
-
onPurchaseComplete: onPurchaseComplete,
|
|
1990
|
-
supportEmail: supportEmail,
|
|
1991
|
-
goToEvent: goToEvent,
|
|
1992
|
-
goToExtraQuestions: goToExtraQuestions
|
|
1993
|
-
})), profileData && !ticketOwned && step !== 3 && /*#__PURE__*/external_react_default.a.createElement(button_bar, {
|
|
1994
|
-
step: step,
|
|
1995
|
-
inPersonDisclaimer: inPersonDisclaimer,
|
|
1996
|
-
registrationForm: registrationForm,
|
|
1997
|
-
goToRegistration: goToRegistration,
|
|
1998
|
-
removeReservedTicket: removeReservedTicket,
|
|
1999
|
-
changeStep: changeStep
|
|
2000
|
-
}))))));
|
|
2001
|
-
};
|
|
2002
|
-
|
|
2003
|
-
const registration_lite_mapStateToProps = ({
|
|
2004
|
-
registrationLiteState
|
|
2005
|
-
}) => ({
|
|
2006
|
-
widgetLoading: registrationLiteState.widgetLoading,
|
|
2007
|
-
reservation: registrationLiteState.reservation,
|
|
2008
|
-
userProfile: registrationLiteState.settings.userProfile,
|
|
2009
|
-
checkout: registrationLiteState.checkout,
|
|
2010
|
-
ticketTypes: registrationLiteState.ticketTypes,
|
|
2011
|
-
taxTypes: registrationLiteState.taxTypes,
|
|
2012
|
-
step: registrationLiteState.step,
|
|
2013
|
-
passwordlessEmail: registrationLiteState.passwordless.email,
|
|
2014
|
-
passwordlessCode: registrationLiteState.passwordless.otp_length,
|
|
2015
|
-
passwordlessCodeSent: registrationLiteState.passwordless.code_sent,
|
|
2016
|
-
passwordlessCodeError: registrationLiteState.passwordless.error
|
|
2017
|
-
});
|
|
2018
|
-
|
|
2019
|
-
/* harmony default export */ var registration_lite = (Object(external_react_redux_["connect"])(registration_lite_mapStateToProps, {
|
|
2020
|
-
loadSession: actions_loadSession,
|
|
2021
|
-
changeStep: actions_changeStep,
|
|
2022
|
-
reserveTicket: actions_reserveTicket,
|
|
2023
|
-
removeReservedTicket: actions_removeReservedTicket,
|
|
2024
|
-
payTicket: actions_payTicket,
|
|
2025
|
-
getTicketTypes: actions_getTicketTypes,
|
|
2026
|
-
getTaxesTypes: actions_getTaxesTypes,
|
|
2027
|
-
getLoginCode: actions_getLoginCode,
|
|
2028
|
-
passwordlessLogin: actions_passwordlessLogin,
|
|
2029
|
-
goToLogin: actions_goToLogin
|
|
2030
|
-
})(RegistrationLite));
|
|
2031
|
-
// CONCATENATED MODULE: ./src/summit-registration-lite.js
|
|
2032
|
-
/**
|
|
2033
|
-
* Copyright 2017 OpenStack Foundation
|
|
2034
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2035
|
-
* you may not use this file except in compliance with the License.
|
|
2036
|
-
* You may obtain a copy of the License at
|
|
2037
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2038
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2039
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2040
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2041
|
-
* See the License for the specific language governing permissions and
|
|
2042
|
-
* limitations under the License.
|
|
2043
|
-
**/
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
class summit_registration_lite_RegistrationLiteWidget extends external_react_default.a.PureComponent {
|
|
2051
|
-
constructor(props) {
|
|
2052
|
-
super(props);
|
|
2053
|
-
this.store = getStore(props.clientId, props.apiBaseUrl, props.getAccessToken);
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
render() {
|
|
2057
|
-
return /*#__PURE__*/external_react_default.a.createElement(external_react_redux_["Provider"], {
|
|
2058
|
-
store: this.store
|
|
2059
|
-
}, /*#__PURE__*/external_react_default.a.createElement(react_["PersistGate"], {
|
|
2060
|
-
persistor: getPersistor()
|
|
2061
|
-
}, /*#__PURE__*/external_react_default.a.createElement(registration_lite, this.props)));
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
/* harmony default export */ var summit_registration_lite = __webpack_exports__["default"] = (summit_registration_lite_RegistrationLiteWidget);
|
|
2067
|
-
|
|
2068
|
-
/***/ })
|
|
2069
|
-
/******/ ]);
|
|
2070
|
-
});
|