summit-registration-lite 2.0.17 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +61 -40
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
.form___DoT3x{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___DoT3x div.fieldWrapper___wa1Ks{width:48%;margin-bottom:5px}.form___DoT3x div.fieldWrapper___wa1Ks:first-of-type{width:100%}.form___DoT3x div.inputWrapper___CbXhF{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___DoT3x div.inputWrapper___CbXhF input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___DoT3x div.inputWrapper___CbXhF input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___DoT3x div.inputWrapper___CbXhF input:focus-visible{outline:none}.form___DoT3x div.inputWrapper___CbXhF i{position:relative}.form___DoT3x div.inputWrapper___CbXhF>div{width:100%}.form___DoT3x div.inputWrapper___CbXhF>div:first-of-type{width:95%}.form___DoT3x div.fieldError___QrMYW{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5}.form___DoT3x div.fieldError___QrMYW::before{font-family:FontAwesome;content:'\f071';margin-right:5px}
|
|
12
12
|
|
|
13
|
-
.title___ECoNz{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.title___ECoNz div{font-weight:normal}.form___lDFka{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0 0}.form___lDFka div.fieldWrapper___Mi_nL{width:48%;margin-bottom:5px}.form___lDFka div.inputWrapper___PEQFR{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___lDFka div.inputWrapper___PEQFR input:focus-visible{outline:none}.form___lDFka div.inputWrapper___PEQFR .readOnly___WRazF{opacity:0.6;cursor:default}.form___lDFka div.fieldError___ksJVe{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5;justify-content:left !important}.form___lDFka div.fieldError___ksJVe::before{font-family:FontAwesome;content:'\f071';margin-right:5px}.form___lDFka .companies___kmGFB>div{position:relative;width:100%;border-radius:5px;display:flex;justify-content:space-between;align-items:center;font-size:15px}.form___lDFka .companies___kmGFB>div::placeholder{color:var(--color_text_input_hints)}.form___lDFka .companies___kmGFB>div>div{height:100%;width:100%}.form___lDFka .companies___kmGFB>div>div>div{height:36px;padding:0px;border:1px solid var(--color_primary);box-shadow:0 0 1px var(--color_primary)}.form___lDFka .companies___kmGFB>div>div>div>div{height:36px}.form___lDFka .companies___kmGFB>div>div>span+div+div{overflow:auto;height:auto}.form___lDFka .companies___kmGFB>div>div>span+div+div>div{height:auto}.form___lDFka .companies___kmGFB>div input{padding:5px 10px;border:1px solid var(--color_primary);padding-right:0px !important;background-color:transparent}.form___lDFka .companies___kmGFB>div i{right:10px !important}.moreInfo___cQYdZ{display:inline-block;margin-top:10px}.moreInfoTooltip___lslgT{max-width:280px}.ticketQuantityNotice___L6gis{margin:10px 0 0 !important}.formErrors___dQQMe{margin-top:10px}.formErrors___dQQMe div+div{margin-top:10px}
|
|
13
|
+
.title___ECoNz{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.title___ECoNz div{font-weight:normal}.form___lDFka{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0 0}.form___lDFka div.fieldWrapper___Mi_nL{width:48%;margin-bottom:5px}.form___lDFka div.inputWrapper___PEQFR{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___lDFka div.inputWrapper___PEQFR input:focus-visible{outline:none}.form___lDFka div.inputWrapper___PEQFR .readOnly___WRazF{opacity:0.6;cursor:default}.form___lDFka div.fieldError___ksJVe{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5;justify-content:left !important}.form___lDFka div.fieldError___ksJVe::before{font-family:FontAwesome;content:'\f071';margin-right:5px}.form___lDFka .companies___kmGFB>div{position:relative;width:100%;border-radius:5px;display:flex;justify-content:space-between;align-items:center;font-size:15px}.form___lDFka .companies___kmGFB>div::placeholder{color:var(--color_text_input_hints)}.form___lDFka .companies___kmGFB>div>div{height:100%;width:100%}.form___lDFka .companies___kmGFB>div>div>div{height:36px;padding:0px;border:1px solid var(--color_primary);box-shadow:0 0 1px var(--color_primary)}.form___lDFka .companies___kmGFB>div>div>div>div{height:36px}.form___lDFka .companies___kmGFB>div>div>span+div+div{overflow:auto;height:auto}.form___lDFka .companies___kmGFB>div>div>span+div+div>div{height:auto}.form___lDFka .companies___kmGFB>div input{padding:5px 10px;font-size:16px;color:inherit;border:1px solid var(--color_primary);padding-right:0px !important;background-color:transparent}.form___lDFka .companies___kmGFB>div i{right:10px !important}.moreInfo___cQYdZ{display:inline-block;margin-top:10px}.moreInfoTooltip___lslgT{max-width:280px}.ticketQuantityNotice___L6gis{margin:10px 0 0 !important}.formErrors___dQQMe{margin-top:10px}.formErrors___dQQMe div+div{margin-top:10px}
|
|
14
14
|
|
|
15
15
|
.title___DNZyl{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.summary___quWdZ{text-align:right}.crossOut___QZ7dy{text-decoration:line-through}.discount___sEK_Q{color:green}.promo___F8lPO{font-weight:bold;display:flex;justify-content:flex-end}.form___aoo7w{display:flex;gap:10px;margin-top:10px}.dropdown____HWg0{flex:1 1 auto}.quantity___SIEQZ{flex-shrink:0}.quantity___SIEQZ input,.quantity___SIEQZ button{height:36px;text-align:center;border:1px solid var(--color_primary)}.quantity___SIEQZ input{padding:0 8px;width:48px !important}.quantity___SIEQZ input,.quantity___SIEQZ input:read-only{color:inherit;background-color:#fff;border:1px solid var(--color_primary)}.quantity___SIEQZ button{display:flex;align-items:center}.quantity___SIEQZ button:disabled,.quantity___SIEQZ button:disabled:hover{opacity:0.65;background:#dedede;border-color:#bebebe}.soldOut___Hatfr{height:36px;padding:0 16px;line-height:34px;font-weight:700px;background:#dedede;border:solid 1px #bebebe;border-radius:5px;opacity:0.65;font-weight:700;flex-shrink:0}.moreInfo___LmwOe{display:inline-block;margin-top:10px}.moreInfoTooltip___nOBf1{max-width:280px}.inPersonDisclaimer___PXGTz{margin-top:15px}
|
|
16
16
|
|
package/dist/index.js
CHANGED
|
@@ -98,7 +98,7 @@ class LawPayProvider {
|
|
|
98
98
|
userProfile,
|
|
99
99
|
access_token,
|
|
100
100
|
apiBaseUrl,
|
|
101
|
-
dispatch
|
|
101
|
+
dispatch: _dispatch
|
|
102
102
|
}) {
|
|
103
103
|
_defineProperty(this, "payTicket", ({
|
|
104
104
|
token
|
|
@@ -107,19 +107,27 @@ class LawPayProvider {
|
|
|
107
107
|
|
|
108
108
|
// Pay using affinity lawpay
|
|
109
109
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
110
|
-
|
|
111
|
-
const msg = res.body.message;
|
|
112
|
-
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
110
|
+
let code = err.status;
|
|
115
111
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
112
|
+
switch (code) {
|
|
113
|
+
case 404:
|
|
114
|
+
{
|
|
115
|
+
let msg = res.body.message;
|
|
116
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
case 500:
|
|
121
|
+
{
|
|
122
|
+
let msg = res.body.message;
|
|
123
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
121
126
|
|
|
122
|
-
|
|
127
|
+
default:
|
|
128
|
+
(0,actions_namespaceObject.authErrorHandler)(err, res)(dispatch, state);
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
123
131
|
};
|
|
124
132
|
|
|
125
133
|
let params = {
|
|
@@ -172,7 +180,7 @@ class LawPayProvider {
|
|
|
172
180
|
this.userProfile = userProfile;
|
|
173
181
|
this.access_token = access_token;
|
|
174
182
|
this.apiBaseUrl = apiBaseUrl;
|
|
175
|
-
this.dispatch =
|
|
183
|
+
this.dispatch = _dispatch;
|
|
176
184
|
}
|
|
177
185
|
|
|
178
186
|
}
|
|
@@ -200,19 +208,27 @@ class StripeProvider {
|
|
|
200
208
|
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4, _this$userProfile5;
|
|
201
209
|
|
|
202
210
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
203
|
-
|
|
204
|
-
const msg = res.body.message;
|
|
205
|
-
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
211
|
+
let code = err.status;
|
|
208
212
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
switch (code) {
|
|
214
|
+
case 404:
|
|
215
|
+
{
|
|
216
|
+
let msg = res.body.message;
|
|
217
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
214
220
|
|
|
215
|
-
|
|
221
|
+
case 500:
|
|
222
|
+
{
|
|
223
|
+
let msg = res.body.message;
|
|
224
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
|
|
228
|
+
default:
|
|
229
|
+
(0,actions_namespaceObject.authErrorHandler)(err, res)(dispatch, state);
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
216
232
|
};
|
|
217
233
|
|
|
218
234
|
let params = {
|
|
@@ -371,7 +387,7 @@ const loadSession = settings => dispatch => {
|
|
|
371
387
|
/* TICKETS */
|
|
372
388
|
|
|
373
389
|
/*********************************************************************************/
|
|
374
|
-
// api/v1/summits/{id}/ticket-types
|
|
390
|
+
// api/v1/summits/{id}/ticket-types/allowed
|
|
375
391
|
// api/v1/summits/{id}/tax-types
|
|
376
392
|
|
|
377
393
|
const getTicketTypes = summitId => async (dispatch, getState, {
|
|
@@ -385,7 +401,7 @@ const getTicketTypes = summitId => async (dispatch, getState, {
|
|
|
385
401
|
access_token: accessToken
|
|
386
402
|
};
|
|
387
403
|
dispatch(startWidgetLoading());
|
|
388
|
-
return (0,actions_namespaceObject.getRequest)(null, (0,actions_namespaceObject.createAction)(GET_TICKET_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/ticket-types`, actions_namespaceObject.authErrorHandler)(params)(dispatch).then(() => {
|
|
404
|
+
return (0,actions_namespaceObject.getRequest)(null, (0,actions_namespaceObject.createAction)(GET_TICKET_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/ticket-types/allowed`, actions_namespaceObject.authErrorHandler)(params)(dispatch).then(() => {
|
|
389
405
|
dispatch(stopWidgetLoading());
|
|
390
406
|
});
|
|
391
407
|
} catch (e) {
|
|
@@ -470,7 +486,7 @@ const reserveTicket = ({
|
|
|
470
486
|
return;
|
|
471
487
|
}
|
|
472
488
|
|
|
473
|
-
return (0,actions_namespaceObject.authErrorHandler)(err, res);
|
|
489
|
+
return (0,actions_namespaceObject.authErrorHandler)(err, res)(dispatch, state);
|
|
474
490
|
};
|
|
475
491
|
|
|
476
492
|
return (0,actions_namespaceObject.postRequest)((0,actions_namespaceObject.createAction)(CREATE_RESERVATION), (0,actions_namespaceObject.createAction)(CREATE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/reserve`, normalizedEntity, errorHandler // entity
|
|
@@ -1017,9 +1033,7 @@ const LawPayForm = ({
|
|
|
1017
1033
|
exp_month: '',
|
|
1018
1034
|
exp_year: '',
|
|
1019
1035
|
postal_code: userProfile.postal_code || '',
|
|
1020
|
-
address1: userProfile.address1 || ''
|
|
1021
|
-
email: userProfile.email,
|
|
1022
|
-
name: `${userProfile.given_name} ${userProfile.family_name}`
|
|
1036
|
+
address1: userProfile.address1 || ''
|
|
1023
1037
|
});
|
|
1024
1038
|
const [lawPayErrors, setLawPayErrors] = (0,external_react_namespaceObject.useState)({
|
|
1025
1039
|
exp_month: '',
|
|
@@ -1031,9 +1045,8 @@ const LawPayForm = ({
|
|
|
1031
1045
|
});
|
|
1032
1046
|
const style = {
|
|
1033
1047
|
color: marketingData.color_text_dark,
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
backgroundColor: '#ffffff',
|
|
1048
|
+
"font-size": '16px',
|
|
1049
|
+
"font-weight": 'inherit',
|
|
1037
1050
|
'::placeholder': {
|
|
1038
1051
|
color: marketingData.color_text_input_hints
|
|
1039
1052
|
}
|
|
@@ -1060,7 +1073,7 @@ const LawPayForm = ({
|
|
|
1060
1073
|
const hostedFieldsCallBack = state => {
|
|
1061
1074
|
let fieldErrors = {};
|
|
1062
1075
|
state.fields.map(f => {
|
|
1063
|
-
fieldErrors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, fieldErrors), {}, {
|
|
1076
|
+
if (f.focus && f.error !== 'Input field is empty') fieldErrors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, fieldErrors), {}, {
|
|
1064
1077
|
[f.type]: f.error
|
|
1065
1078
|
});
|
|
1066
1079
|
});
|
|
@@ -1068,7 +1081,7 @@ const LawPayForm = ({
|
|
|
1068
1081
|
};
|
|
1069
1082
|
|
|
1070
1083
|
(0,external_react_namespaceObject.useEffect)(() => {
|
|
1071
|
-
if (window.AffiniPay && hostedFields
|
|
1084
|
+
if (window.AffiniPay && !hostedFields) {
|
|
1072
1085
|
setHostedFields(window.AffiniPay.HostedFields.initializeFields(hostedFieldsConfiguration, hostedFieldsCallBack));
|
|
1073
1086
|
}
|
|
1074
1087
|
}, [reservation]);
|
|
@@ -1082,7 +1095,7 @@ const LawPayForm = ({
|
|
|
1082
1095
|
const formHasErrors = () => {
|
|
1083
1096
|
let errors = {};
|
|
1084
1097
|
Object.keys(lawPayFields).map(key => {
|
|
1085
|
-
if (!lawPayFields[key]) {
|
|
1098
|
+
if (!lawPayFields[key] || lawPayFields[key] === '') {
|
|
1086
1099
|
errors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, errors), {}, {
|
|
1087
1100
|
[key]: 'This field is required.'
|
|
1088
1101
|
});
|
|
@@ -1108,8 +1121,8 @@ const LawPayForm = ({
|
|
|
1108
1121
|
"address1": lawPayFields.address1,
|
|
1109
1122
|
"exp_year": lawPayFields.exp_year,
|
|
1110
1123
|
"exp_month": lawPayFields.exp_month,
|
|
1111
|
-
"email":
|
|
1112
|
-
"name":
|
|
1124
|
+
"email": userProfile.email,
|
|
1125
|
+
"name": `${reservation.owner_first_name} ${reservation.owner_last_name}`,
|
|
1113
1126
|
"reference": `summit_${reservation.summit_id}_order_${reservation.id}`
|
|
1114
1127
|
});
|
|
1115
1128
|
payTicket(provider, {
|
|
@@ -1217,6 +1230,7 @@ const LawPayForm = ({
|
|
|
1217
1230
|
type: "text",
|
|
1218
1231
|
name: "postal_code",
|
|
1219
1232
|
placeholder: "ZIP Code *",
|
|
1233
|
+
value: lawPayFields.postal_code,
|
|
1220
1234
|
onChange: e => setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1221
1235
|
postal_code: e.target.value
|
|
1222
1236
|
}))
|
|
@@ -1234,6 +1248,7 @@ const LawPayForm = ({
|
|
|
1234
1248
|
type: "text",
|
|
1235
1249
|
name: "address1",
|
|
1236
1250
|
placeholder: "Address *",
|
|
1251
|
+
value: lawPayFields.address1,
|
|
1237
1252
|
onChange: e => setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1238
1253
|
address1: e.target.value
|
|
1239
1254
|
}))
|
|
@@ -1368,14 +1383,20 @@ const StripeForm = ({
|
|
|
1368
1383
|
return;
|
|
1369
1384
|
}
|
|
1370
1385
|
|
|
1371
|
-
const cardElement = elements.getElement(react_stripe_js_namespaceObject.CardNumberElement);
|
|
1386
|
+
const cardElement = elements.getElement(react_stripe_js_namespaceObject.CardNumberElement); // @see https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement
|
|
1387
|
+
|
|
1372
1388
|
const {
|
|
1373
1389
|
error,
|
|
1374
1390
|
token
|
|
1375
1391
|
} = await stripe.createToken(cardElement, {
|
|
1376
1392
|
name: `${reservation.owner_first_name} ${reservation.owner_last_name}`,
|
|
1393
|
+
address_line1: userProfile.address1 || '',
|
|
1394
|
+
address_line2: userProfile.address2 || '',
|
|
1395
|
+
address_city: userProfile.locality || '',
|
|
1396
|
+
address_state: userProfile.region || '',
|
|
1377
1397
|
address_zip: data.zipCode,
|
|
1378
|
-
address_country: userProfile.country || ''
|
|
1398
|
+
address_country: userProfile.country || '',
|
|
1399
|
+
email: userProfile.email
|
|
1379
1400
|
});
|
|
1380
1401
|
|
|
1381
1402
|
if (token) {
|