summit-registration-lite 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.css +1 -1
- package/dist/index.js +133 -48
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -40,6 +40,8 @@ React component for the summit registration lite widget
|
|
|
40
40
|
|
|
41
41
|
**authUser** = method passed that will be called on user login. param -> (provider) => console.log('login with', provider)
|
|
42
42
|
|
|
43
|
+
**completedExtraQuestions**= method passed that will be called to evaluate if the user extra questions are completed
|
|
44
|
+
|
|
43
45
|
**getAccessToken** = method passed that will be called to request the access token
|
|
44
46
|
|
|
45
47
|
**closeWidget** = method passed that will be called if the user tries to close the widget
|
|
@@ -48,6 +50,8 @@ React component for the summit registration lite widget
|
|
|
48
50
|
|
|
49
51
|
**goToEvent** = method passed that will be called to redirect the user to the current event
|
|
50
52
|
|
|
53
|
+
**goToMyOrders** = method passed that will be called to redirect the user to the my orders page
|
|
54
|
+
|
|
51
55
|
**getPasswordlessCode** = method passed that will be called when the user generates a code to login without password
|
|
52
56
|
|
|
53
57
|
**loginWithCode** = method passed that will be called when the user tries to login with a code
|
package/dist/index.css
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
.button___MZBIY{background-color:var(--color_secondary_contrast) !important;color:#fff !important;border:none !important;font-weight:bold !important;font-size:1em !important;cursor:pointer !important}.button___MZBIY[disabled]{background-color:var(--color_secondary_contrast) !important}.button___MZBIY:hover{color:#fff !important}.button___MZBIY:active,.button___MZBIY:focus{color:#fff !important}.outerWrapper___XRnaq{padding:10px 0px 10px 10px;margin:10px}.outerWrapper___XRnaq .innerWrapper___LFsOH{display:flex;justify-content:space-between;align-items:center}.outerWrapper___XRnaq .innerWrapper___LFsOH span{font-size:14px}.outerWrapper___XRnaq .innerWrapper___LFsOH .registration___jdf6T{cursor:pointer;color:var(--color_primary);text-decoration:underline}.outerWrapper___XRnaq .innerWrapper___LFsOH .actions___Gsf0y{display:flex}.outerWrapper___XRnaq .innerWrapper___LFsOH .actions___Gsf0y button{margin-left:10px}
|
|
20
20
|
|
|
21
|
-
.button___XMN8a{background-color:var(--color_secondary_contrast) !important;color:#fff !important;border:none !important;font-weight:bold !important;font-size:1em !important;cursor:pointer !important}.button___XMN8a[disabled]{background-color:var(--color_secondary_contrast) !important}.button___XMN8a:hover{color:#fff !important}.button___XMN8a:active,.button___XMN8a:focus{color:#fff !important}.wrapper___Jd5Xg{height:
|
|
21
|
+
.button___XMN8a{background-color:var(--color_secondary_contrast) !important;color:#fff !important;border:none !important;font-weight:bold !important;font-size:1em !important;cursor:pointer !important}.button___XMN8a[disabled]{background-color:var(--color_secondary_contrast) !important}.button___XMN8a:hover{color:#fff !important}.button___XMN8a:active,.button___XMN8a:focus{color:#fff !important}.wrapper___Jd5Xg{height:370px;display:flex;flex-direction:column;align-items:center;justify-content:space-around;margin:15px 0;padding:15px;border-radius:5px;border:1px solid lightgray;text-align:center}.wrapper___Jd5Xg .circle___lcN86{margin-bottom:10px;background-color:var(--color_primary50);border-radius:50px;border:1px solid var(--color_primary);padding:10px}.wrapper___Jd5Xg .circle___lcN86 i{font-size:36px;color:var(--color_primary)}.wrapper___Jd5Xg .complete___HAHzl{font-weight:bold;font-size:20px}.wrapper___Jd5Xg .actions___jJdPX{display:flex}.wrapper___Jd5Xg button{margin:10px 5px 0 5px}.wrapper___Jd5Xg span{font-size:14px}.wrapper___Jd5Xg a{color:var(--color_primary);text-decoration:underline}.wrapper___Jd5Xg .footer___FL9TW{font-size:14px;font-weight:normal}
|
|
22
22
|
|
|
23
23
|
.passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{height:56px;width:56px;font-size:42px;background-color:var(--color_primary50);border:1px solid var(--color_primary);border-radius:5px;padding:5px;display:inline-flex;text-transform:uppercase;text-align:center;margin:0 5px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .error___wZflZ{margin-top:10px;color:#e5424d;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl{margin-top:20px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .button___nBhtQ{padding:10px 30px;font-weight:normal;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-color:var(--color_secondary_contrast);color:#FFFFFF;width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_primary);text-decoration:underline;cursor:pointer}.passwordlessWrapper___BRQ_s .resend___Nma1U{margin:auto 0 0 0;font-weight:normal;font-size:14px}.passwordlessWrapper___BRQ_s .resend___Nma1U span{color:var(--color_primary);text-decoration:underline;cursor:pointer}
|
|
24
24
|
|
package/dist/index.js
CHANGED
|
@@ -693,11 +693,16 @@ const GO_TO_LOGIN = 'GO_TO_LOGIN';
|
|
|
693
693
|
const GET_MY_INVITATION = 'GET_MY_INVITATION';
|
|
694
694
|
const CLEAR_MY_INVITATION = 'CLEAR_MY_INVITATION';
|
|
695
695
|
const CLEAR_WIDGET_STATE = 'CLEAR_WIDGET_STATE';
|
|
696
|
+
const UPDATE_CLOCK = 'UPDATE_CLOCK';
|
|
697
|
+
const LOAD_PROFILE_DATA = 'LOAD_PROFILE_DATA';
|
|
696
698
|
const startWidgetLoading = (0,actions_namespaceObject.createAction)(START_WIDGET_LOADING);
|
|
697
699
|
const stopWidgetLoading = (0,actions_namespaceObject.createAction)(STOP_WIDGET_LOADING);
|
|
698
700
|
const loadSession = settings => dispatch => {
|
|
699
701
|
dispatch((0,actions_namespaceObject.createAction)(LOAD_INITIAL_VARS)(settings));
|
|
700
702
|
};
|
|
703
|
+
const loadProfileData = profileData => dispatch => {
|
|
704
|
+
dispatch((0,actions_namespaceObject.createAction)(LOAD_PROFILE_DATA)(profileData));
|
|
705
|
+
};
|
|
701
706
|
const clearWidgetState = () => dispatch => {
|
|
702
707
|
dispatch((0,actions_namespaceObject.createAction)(CLEAR_WIDGET_STATE)({}));
|
|
703
708
|
};
|
|
@@ -1048,6 +1053,11 @@ const getMyInvitation = summitId => async (dispatch, getState, {
|
|
|
1048
1053
|
return Promise.reject(e);
|
|
1049
1054
|
}
|
|
1050
1055
|
};
|
|
1056
|
+
const updateClock = timestamp => dispatch => {
|
|
1057
|
+
dispatch((0,actions_namespaceObject.createAction)(UPDATE_CLOCK)({
|
|
1058
|
+
timestamp
|
|
1059
|
+
}));
|
|
1060
|
+
};
|
|
1051
1061
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/security/actions"
|
|
1052
1062
|
const security_actions_namespaceObject = require("openstack-uicore-foundation/lib/security/actions");
|
|
1053
1063
|
;// CONCATENATED MODULE: ./src/reducer.js
|
|
@@ -1071,6 +1081,7 @@ function reducer_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
1071
1081
|
**/
|
|
1072
1082
|
|
|
1073
1083
|
|
|
1084
|
+
const localNowUtc = Date.now();
|
|
1074
1085
|
const DEFAULT_STATE = {
|
|
1075
1086
|
reservation: null,
|
|
1076
1087
|
checkout: null,
|
|
@@ -1093,7 +1104,8 @@ const DEFAULT_STATE = {
|
|
|
1093
1104
|
summitId: null,
|
|
1094
1105
|
marketingData: null,
|
|
1095
1106
|
userProfile: null
|
|
1096
|
-
}
|
|
1107
|
+
},
|
|
1108
|
+
nowUtc: localNowUtc
|
|
1097
1109
|
};
|
|
1098
1110
|
|
|
1099
1111
|
const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
@@ -1159,6 +1171,15 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
|
1159
1171
|
})
|
|
1160
1172
|
});
|
|
1161
1173
|
|
|
1174
|
+
case LOAD_PROFILE_DATA:
|
|
1175
|
+
{
|
|
1176
|
+
return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
|
|
1177
|
+
settings: reducer_objectSpread(reducer_objectSpread({}, state.settings), {}, {
|
|
1178
|
+
userProfile: payload
|
|
1179
|
+
})
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1162
1183
|
case CHANGE_STEP:
|
|
1163
1184
|
{
|
|
1164
1185
|
return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
|
|
@@ -1268,6 +1289,16 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
|
1268
1289
|
});
|
|
1269
1290
|
}
|
|
1270
1291
|
|
|
1292
|
+
case UPDATE_CLOCK:
|
|
1293
|
+
{
|
|
1294
|
+
const {
|
|
1295
|
+
timestamp
|
|
1296
|
+
} = payload;
|
|
1297
|
+
return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
|
|
1298
|
+
nowUtc: timestamp
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1271
1302
|
default:
|
|
1272
1303
|
{
|
|
1273
1304
|
return state;
|
|
@@ -1336,6 +1367,9 @@ const constants_namespaceObject = require("openstack-uicore-foundation/lib/secur
|
|
|
1336
1367
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components/ajaxloader"
|
|
1337
1368
|
const ajaxloader_namespaceObject = require("openstack-uicore-foundation/lib/components/ajaxloader");
|
|
1338
1369
|
var ajaxloader_default = /*#__PURE__*/__webpack_require__.n(ajaxloader_namespaceObject);
|
|
1370
|
+
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components/clock"
|
|
1371
|
+
const clock_namespaceObject = require("openstack-uicore-foundation/lib/components/clock");
|
|
1372
|
+
var clock_default = /*#__PURE__*/__webpack_require__.n(clock_namespaceObject);
|
|
1339
1373
|
;// CONCATENATED MODULE: ./src/styles/general.module.scss
|
|
1340
1374
|
// extracted by mini-css-extract-plugin
|
|
1341
1375
|
/* harmony default export */ const general_module = ({"modal":"modal___G3Cmq","modalContent":"modalContent___lIaqw","outerWrapper":"outerWrapper___OWXyi","innerWrapper":"innerWrapper___mIrBF","title":"title___Tbvkl"});
|
|
@@ -1749,6 +1783,7 @@ const StripeForm = ({
|
|
|
1749
1783
|
errors
|
|
1750
1784
|
}
|
|
1751
1785
|
} = (0,external_react_hook_form_namespaceObject.useForm)();
|
|
1786
|
+
if (!marketingData) return null;
|
|
1752
1787
|
const stripeStyle = merge_default()({}, {
|
|
1753
1788
|
base: {
|
|
1754
1789
|
// Add your base input styles here. For example: #d4e5f4
|
|
@@ -2280,7 +2315,6 @@ const getTicketMaxQuantity = ticket => ticket ? Math.min((ticket.quantity_2_sell
|
|
|
2280
2315
|
|
|
2281
2316
|
|
|
2282
2317
|
|
|
2283
|
-
|
|
2284
2318
|
const TicketDropdownComponent = ({
|
|
2285
2319
|
selectedTicket,
|
|
2286
2320
|
ticketTypes,
|
|
@@ -2293,8 +2327,6 @@ const TicketDropdownComponent = ({
|
|
|
2293
2327
|
setActive(!active);
|
|
2294
2328
|
};
|
|
2295
2329
|
|
|
2296
|
-
const date = new Date();
|
|
2297
|
-
let now_utc = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) / 1000;
|
|
2298
2330
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2299
2331
|
className: `${ticket_dropdown_index_module.outerWrapper}`
|
|
2300
2332
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -2314,19 +2346,17 @@ const TicketDropdownComponent = ({
|
|
|
2314
2346
|
className: ticket_dropdown_index_module.dropdown,
|
|
2315
2347
|
"data-testid": "ticket-list"
|
|
2316
2348
|
}, ticketTypes.map(t => {
|
|
2349
|
+
console.log('TicketDropdownComponent::render');
|
|
2317
2350
|
const maxQuantity = getTicketMaxQuantity(t);
|
|
2318
2351
|
const isTicketSoldOut = maxQuantity < 1;
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
}
|
|
2328
|
-
}, t.name, " -", ` `, !isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, t.currency_symbol, t.cost, " ", t.currency), isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, "Sold Out"));
|
|
2329
|
-
}
|
|
2352
|
+
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2353
|
+
key: t.id,
|
|
2354
|
+
className: isTicketSoldOut ? ticket_dropdown_index_module.soldOut : '',
|
|
2355
|
+
onClick: () => {
|
|
2356
|
+
if (isTicketSoldOut) return;
|
|
2357
|
+
ticketSelect(t);
|
|
2358
|
+
}
|
|
2359
|
+
}, t.name, " -", ` `, !isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, t.currency_symbol, t.cost, " ", t.currency), isTicketSoldOut && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, "Sold Out"));
|
|
2330
2360
|
})));
|
|
2331
2361
|
};
|
|
2332
2362
|
|
|
@@ -2617,29 +2647,35 @@ const ButtonBarComponent = ({
|
|
|
2617
2647
|
|
|
2618
2648
|
|
|
2619
2649
|
|
|
2650
|
+
|
|
2620
2651
|
const PurchaseComplete = ({
|
|
2621
2652
|
checkout,
|
|
2653
|
+
user,
|
|
2622
2654
|
onPurchaseComplete,
|
|
2623
2655
|
goToExtraQuestions,
|
|
2624
2656
|
goToEvent,
|
|
2657
|
+
goToMyOrders,
|
|
2658
|
+
completedExtraQuestions,
|
|
2625
2659
|
summit,
|
|
2626
|
-
|
|
2660
|
+
nowUtc,
|
|
2661
|
+
clearWidgetState,
|
|
2662
|
+
supportEmail = 'support@fntech.com'
|
|
2627
2663
|
}) => {
|
|
2628
2664
|
(0,external_react_.useEffect)(() => {
|
|
2629
2665
|
onPurchaseComplete(checkout);
|
|
2630
2666
|
}, []);
|
|
2631
|
-
const
|
|
2632
|
-
|
|
2633
|
-
|
|
2667
|
+
const isActive = (0,external_react_.useMemo)(() => summit.start_date <= nowUtc && summit.end_date >= nowUtc, [summit]);
|
|
2668
|
+
const userFirstTicket = (0,external_react_.useMemo)(() => checkout === null || checkout === void 0 ? void 0 : checkout.tickets.some(t => {
|
|
2669
|
+
var _t$owner;
|
|
2670
|
+
|
|
2671
|
+
return (t === null || t === void 0 ? void 0 : (_t$owner = t.owner) === null || _t$owner === void 0 ? void 0 : _t$owner.email) == (user === null || user === void 0 ? void 0 : user.email);
|
|
2672
|
+
}), [user]);
|
|
2673
|
+
const requireExtraQuestions = (0,external_react_.useMemo)(() => completedExtraQuestions(checkout), [user]);
|
|
2634
2674
|
const startDateFormatted = {
|
|
2635
2675
|
date: (0,methods_namespaceObject.epochToMomentTimeZone)(summit.start_date, summit.time_zone_id).format('MMMM D'),
|
|
2636
2676
|
time: (0,methods_namespaceObject.epochToMomentTimeZone)(summit.start_date, summit.time_zone_id).format('hh:mm A')
|
|
2637
2677
|
};
|
|
2638
|
-
|
|
2639
|
-
const needExtraQuestions = () => {
|
|
2640
|
-
return summit.order_extra_questions.some(q => q.mandatory === true) ? true : false;
|
|
2641
|
-
};
|
|
2642
|
-
|
|
2678
|
+
if (!checkout) return null;
|
|
2643
2679
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2644
2680
|
className: purchase_complete_index_module.wrapper
|
|
2645
2681
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -2648,22 +2684,46 @@ const PurchaseComplete = ({
|
|
|
2648
2684
|
className: "fa fa-ticket"
|
|
2649
2685
|
})), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2650
2686
|
className: purchase_complete_index_module.complete
|
|
2651
|
-
}, "Your order is complete"), isActive ?
|
|
2687
|
+
}, "Your order is complete"), isActive ? userFirstTicket ? requireExtraQuestions ? /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", null, "A ticket has been assigned to you. To complete your additional ticket details, please click the \"Finish Now\" button."), /*#__PURE__*/external_react_default().createElement("button", {
|
|
2652
2688
|
className: `${purchase_complete_index_module.button} button`,
|
|
2653
|
-
onClick: () =>
|
|
2654
|
-
|
|
2689
|
+
onClick: () => {
|
|
2690
|
+
clearWidgetState();
|
|
2691
|
+
goToExtraQuestions();
|
|
2692
|
+
}
|
|
2693
|
+
}, "Finish Now")) : /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("button", {
|
|
2655
2694
|
className: `${purchase_complete_index_module.button} button`,
|
|
2656
|
-
onClick: () =>
|
|
2657
|
-
|
|
2695
|
+
onClick: () => {
|
|
2696
|
+
clearWidgetState();
|
|
2697
|
+
goToEvent();
|
|
2698
|
+
}
|
|
2699
|
+
}, "Access event now")) : /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", null, "You may visit the My Orders/Tickets tab in the top right-hand corner of the navigation bar to assign/reassign tickets or to complete any required ticket details."), /*#__PURE__*/external_react_default().createElement("button", {
|
|
2700
|
+
className: `${purchase_complete_index_module.button} button`,
|
|
2701
|
+
onClick: () => {
|
|
2702
|
+
clearWidgetState();
|
|
2703
|
+
goToMyOrders();
|
|
2704
|
+
}
|
|
2705
|
+
}, "View My Orders/Tickets")) : /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", null, "The event will start on ", startDateFormatted.date, " at ", startDateFormatted.time, " ", summit.time_zone_label, /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("br", null), userFirstTicket ? `A ticket has been assigned to you. To complete your additional ticket details, please click the "Finish Now" button.` : `You may visit the My Orders/Tickets tab in the top right-hand corner of the navigation bar to
|
|
2706
|
+
assign/reassign tickets or to complete any required ticket details.`), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2658
2707
|
className: purchase_complete_index_module.actions
|
|
2659
|
-
}, /*#__PURE__*/external_react_default().createElement("button", {
|
|
2708
|
+
}, userFirstTicket ? /*#__PURE__*/external_react_default().createElement("button", {
|
|
2709
|
+
className: `${purchase_complete_index_module.button} button`,
|
|
2710
|
+
onClick: () => {
|
|
2711
|
+
clearWidgetState();
|
|
2712
|
+
goToExtraQuestions();
|
|
2713
|
+
}
|
|
2714
|
+
}, "Finish Now") : /*#__PURE__*/external_react_default().createElement("button", {
|
|
2660
2715
|
className: `${purchase_complete_index_module.button} button`,
|
|
2661
|
-
onClick: () =>
|
|
2662
|
-
|
|
2716
|
+
onClick: () => {
|
|
2717
|
+
clearWidgetState();
|
|
2718
|
+
goToMyOrders();
|
|
2719
|
+
}
|
|
2720
|
+
}, "View My Orders/Tickets"))), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2663
2721
|
className: purchase_complete_index_module.footer
|
|
2664
|
-
}, "For further assistance, please email ", /*#__PURE__*/external_react_default().createElement("a", {
|
|
2722
|
+
}, userFirstTicket ? /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, "If you wish to transfer your assigned ticket, close this window and visit the \"My Orders/Tickets\" tab in the top navigation bar. For further assistance, please email ", /*#__PURE__*/external_react_default().createElement("a", {
|
|
2723
|
+
href: `mailto:${supportEmail}`
|
|
2724
|
+
}, supportEmail)) : /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, "For further assistance, please email ", /*#__PURE__*/external_react_default().createElement("a", {
|
|
2665
2725
|
href: `mailto:${supportEmail}`
|
|
2666
|
-
}, supportEmail)));
|
|
2726
|
+
}, supportEmail))));
|
|
2667
2727
|
};
|
|
2668
2728
|
|
|
2669
2729
|
/* harmony default export */ const purchase_complete = (PurchaseComplete);
|
|
@@ -2809,7 +2869,7 @@ const TicketTaxesError = ({
|
|
|
2809
2869
|
|
|
2810
2870
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
2811
2871
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
2812
|
-
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypesAndTaxes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "
|
|
2872
|
+
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypesAndTaxes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToMyOrders", "goToEvent", "profileData", "summitData", "supportEmail", "ticketOwned", "ownedTickets", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile", "handleCompanyError", "stripeOptions", "invitation", "loginInitialEmailInputValue", "getMyInvitation", "showMultipleTicketTexts", "noAllowedTicketsMessage", "ticketTaxesErrorMessage", "authErrorCallback", "clearWidgetState", "requestedTicketTypes", "allowPromoCodes", "companyInputPlaceholder", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData"];
|
|
2813
2873
|
|
|
2814
2874
|
function registration_lite_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2815
2875
|
|
|
@@ -2853,6 +2913,7 @@ function registration_lite_objectWithoutPropertiesLoose(source, excluded) { if (
|
|
|
2853
2913
|
|
|
2854
2914
|
|
|
2855
2915
|
|
|
2916
|
+
|
|
2856
2917
|
|
|
2857
2918
|
|
|
2858
2919
|
const RegistrationLite = _ref => {
|
|
@@ -2885,8 +2946,8 @@ const RegistrationLite = _ref => {
|
|
|
2885
2946
|
passwordlessCodeError,
|
|
2886
2947
|
loginWithCode,
|
|
2887
2948
|
goToExtraQuestions,
|
|
2949
|
+
goToMyOrders,
|
|
2888
2950
|
goToEvent,
|
|
2889
|
-
goToRegistration,
|
|
2890
2951
|
profileData,
|
|
2891
2952
|
summitData,
|
|
2892
2953
|
supportEmail,
|
|
@@ -2909,7 +2970,11 @@ const RegistrationLite = _ref => {
|
|
|
2909
2970
|
requestedTicketTypes,
|
|
2910
2971
|
allowPromoCodes,
|
|
2911
2972
|
companyInputPlaceholder,
|
|
2912
|
-
companyDDLPlaceholder
|
|
2973
|
+
companyDDLPlaceholder,
|
|
2974
|
+
nowUtc,
|
|
2975
|
+
updateClock,
|
|
2976
|
+
completedExtraQuestions,
|
|
2977
|
+
loadProfileData
|
|
2913
2978
|
} = _ref,
|
|
2914
2979
|
rest = registration_lite_objectWithoutProperties(_ref, registration_lite_excluded);
|
|
2915
2980
|
|
|
@@ -2940,6 +3005,10 @@ const RegistrationLite = _ref => {
|
|
|
2940
3005
|
publicKey,
|
|
2941
3006
|
provider
|
|
2942
3007
|
} = getCurrentProvider(summitData);
|
|
3008
|
+
(0,external_react_.useEffect)(() => {
|
|
3009
|
+
if (profileData) loadProfileData(profileData);
|
|
3010
|
+
}, [profileData]); // just initial load ( once )
|
|
3011
|
+
|
|
2943
3012
|
(0,external_react_.useEffect)(() => {
|
|
2944
3013
|
loadSession(registration_lite_objectSpread(registration_lite_objectSpread({}, rest), {}, {
|
|
2945
3014
|
summitData,
|
|
@@ -2949,7 +3018,7 @@ const RegistrationLite = _ref => {
|
|
|
2949
3018
|
if (!profileData) {
|
|
2950
3019
|
changeStep(0);
|
|
2951
3020
|
}
|
|
2952
|
-
}, [
|
|
3021
|
+
}, []);
|
|
2953
3022
|
(0,external_react_.useEffect)(() => {
|
|
2954
3023
|
if (summitData && profileData) {
|
|
2955
3024
|
handleGetTicketTypesAndTaxes(summitData.id);
|
|
@@ -3006,7 +3075,8 @@ const RegistrationLite = _ref => {
|
|
|
3006
3075
|
// Reset the step when closed to avoid unexpected behavior from `useEffect`s w/in other steps.
|
|
3007
3076
|
// (i.e., recalling `onPurchaseComplete` after a user completes one order, closes the window, and then reopens the registration widget)
|
|
3008
3077
|
changeStep(0);
|
|
3009
|
-
|
|
3078
|
+
clearWidgetState();
|
|
3079
|
+
if (rest.closeWidget) rest.closeWidget();
|
|
3010
3080
|
};
|
|
3011
3081
|
|
|
3012
3082
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
@@ -3026,6 +3096,7 @@ const RegistrationLite = _ref => {
|
|
|
3026
3096
|
});
|
|
3027
3097
|
};
|
|
3028
3098
|
|
|
3099
|
+
const allowedTicketTypes = ticketTypes.filter(tt => tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date);
|
|
3029
3100
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3030
3101
|
id: `${general_module.modal}`,
|
|
3031
3102
|
className: "modal is-active"
|
|
@@ -3038,6 +3109,9 @@ const RegistrationLite = _ref => {
|
|
|
3038
3109
|
color: '#ffffff',
|
|
3039
3110
|
show: widgetLoading || loading,
|
|
3040
3111
|
size: 80
|
|
3112
|
+
}), /*#__PURE__*/external_react_default().createElement((clock_default()), {
|
|
3113
|
+
onTick: timestamp => updateClock(timestamp),
|
|
3114
|
+
timezone: summitData.time_zone_id
|
|
3041
3115
|
}), /*#__PURE__*/external_react_default().createElement("div", {
|
|
3042
3116
|
className: `${general_module.outerWrapper} summit-registration-lite`
|
|
3043
3117
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3051,7 +3125,7 @@ const RegistrationLite = _ref => {
|
|
|
3051
3125
|
})), ticketTaxesError && profileData && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3052
3126
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3053
3127
|
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData === null || summitData === void 0 ? void 0 : summitData.id)
|
|
3054
|
-
}), !ticketTaxesError && profileData &&
|
|
3128
|
+
}), !ticketTaxesError && profileData && allowedTicketTypes.length === 0 && requestedTicketTypes && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3055
3129
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3056
3130
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3057
3131
|
className: general_module.stepsWrapper
|
|
@@ -3072,11 +3146,11 @@ const RegistrationLite = _ref => {
|
|
|
3072
3146
|
goToLogin: goToLogin,
|
|
3073
3147
|
getLoginCode: getLoginCode,
|
|
3074
3148
|
getPasswordlessCode: getPasswordlessCode
|
|
3075
|
-
}), profileData && step !== 3 &&
|
|
3149
|
+
}), profileData && step !== 3 && allowedTicketTypes.length > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, ticketOwned && /*#__PURE__*/external_react_default().createElement(ticket_owned, {
|
|
3076
3150
|
ownedTickets: ownedTickets,
|
|
3077
|
-
ticketTypes:
|
|
3151
|
+
ticketTypes: allowedTicketTypes
|
|
3078
3152
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
3079
|
-
ticketTypes:
|
|
3153
|
+
ticketTypes: allowedTicketTypes,
|
|
3080
3154
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
3081
3155
|
taxTypes: taxTypes,
|
|
3082
3156
|
reservation: reservation,
|
|
@@ -3114,12 +3188,17 @@ const RegistrationLite = _ref => {
|
|
|
3114
3188
|
stripeOptions: stripeOptions
|
|
3115
3189
|
})))), profileData && step === 3 && /*#__PURE__*/external_react_default().createElement(purchase_complete, {
|
|
3116
3190
|
checkout: checkout,
|
|
3191
|
+
user: profileData,
|
|
3117
3192
|
summit: summitData,
|
|
3118
3193
|
onPurchaseComplete: onPurchaseComplete,
|
|
3119
3194
|
supportEmail: supportEmail,
|
|
3120
3195
|
goToEvent: goToEvent,
|
|
3121
|
-
|
|
3122
|
-
|
|
3196
|
+
goToMyOrders: goToMyOrders,
|
|
3197
|
+
goToExtraQuestions: goToExtraQuestions,
|
|
3198
|
+
completedExtraQuestions: completedExtraQuestions,
|
|
3199
|
+
nowUtc: nowUtc,
|
|
3200
|
+
clearWidgetState: clearWidgetState
|
|
3201
|
+
})), !ticketTaxesError && profileData && step !== 3 && allowedTicketTypes.length > 0 && /*#__PURE__*/external_react_default().createElement(button_bar, {
|
|
3123
3202
|
step: step,
|
|
3124
3203
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
3125
3204
|
formValues: formValues,
|
|
@@ -3143,7 +3222,8 @@ const registration_lite_mapStateToProps = ({
|
|
|
3143
3222
|
passwordlessEmail: registrationLiteState.passwordless.email,
|
|
3144
3223
|
passwordlessCode: registrationLiteState.passwordless.otp_length,
|
|
3145
3224
|
passwordlessCodeSent: registrationLiteState.passwordless.code_sent,
|
|
3146
|
-
passwordlessCodeError: registrationLiteState.passwordless.error
|
|
3225
|
+
passwordlessCodeError: registrationLiteState.passwordless.error,
|
|
3226
|
+
nowUtc: registrationLiteState.nowUtc
|
|
3147
3227
|
});
|
|
3148
3228
|
|
|
3149
3229
|
RegistrationLite.defaultProps = {
|
|
@@ -3161,7 +3241,10 @@ RegistrationLite.defaultProps = {
|
|
|
3161
3241
|
RegistrationLite.propTypes = {
|
|
3162
3242
|
loginInitialEmailInputValue: (external_prop_types_default()).string,
|
|
3163
3243
|
showMultipleTicketTexts: (external_prop_types_default()).bool,
|
|
3164
|
-
authErrorCallback: (external_prop_types_default()).func
|
|
3244
|
+
authErrorCallback: (external_prop_types_default()).func,
|
|
3245
|
+
goToMyOrders: (external_prop_types_default()).func.isRequired,
|
|
3246
|
+
goToExtraQuestions: (external_prop_types_default()).func.isRequired,
|
|
3247
|
+
completedExtraQuestions: (external_prop_types_default()).func.isRequired
|
|
3165
3248
|
};
|
|
3166
3249
|
/* harmony default export */ const registration_lite = ((0,external_react_redux_namespaceObject.connect)(registration_lite_mapStateToProps, {
|
|
3167
3250
|
loadSession: loadSession,
|
|
@@ -3174,7 +3257,9 @@ RegistrationLite.propTypes = {
|
|
|
3174
3257
|
passwordlessLogin: passwordlessLogin,
|
|
3175
3258
|
goToLogin: goToLogin,
|
|
3176
3259
|
getMyInvitation: getMyInvitation,
|
|
3177
|
-
clearWidgetState: clearWidgetState
|
|
3260
|
+
clearWidgetState: clearWidgetState,
|
|
3261
|
+
updateClock: updateClock,
|
|
3262
|
+
loadProfileData: loadProfileData
|
|
3178
3263
|
})(RegistrationLite));
|
|
3179
3264
|
;// CONCATENATED MODULE: ./src/summit-registration-lite.js
|
|
3180
3265
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "summit-registration-lite",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Summit Registration Lite",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"moment": "^2.22.2",
|
|
62
62
|
"moment-timezone": "^0.5.21",
|
|
63
63
|
"node-sass": "^7.0.1",
|
|
64
|
-
"openstack-uicore-foundation": "
|
|
64
|
+
"openstack-uicore-foundation": "4.0.88",
|
|
65
65
|
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
|
66
66
|
"path": "^0.12.7",
|
|
67
67
|
"react": "^16.8.4",
|