summit-registration-lite 5.0.36-beta.0 → 5.0.36
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 -2
- package/dist/components/login-passwordless.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +67 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ React component for the summit registration lite widget
|
|
|
55
55
|
|
|
56
56
|
**closeWidget** = method passed that will be called if the user tries to close the widget
|
|
57
57
|
|
|
58
|
-
**goToExtraQuestions** = method passed that will be called by component to redirect to extra questions page. Pass attendeeId
|
|
58
|
+
**goToExtraQuestions** = method passed that will be called by component to redirect to extra questions page. Pass attendeeId
|
|
59
59
|
|
|
60
60
|
**goToEvent** = method passed that will be called to redirect the user to the current event
|
|
61
61
|
|
|
@@ -67,6 +67,8 @@ React component for the summit registration lite widget
|
|
|
67
67
|
|
|
68
68
|
**onPurchaseComplete** = method passed that will be called after the purchase of a ticket it's completed
|
|
69
69
|
|
|
70
|
+
**trackEvent** = method that tracks a given event.
|
|
71
|
+
|
|
70
72
|
**handleCompanyError** = method passed that will be called if the company dropdown can't be fetched
|
|
71
73
|
|
|
72
74
|
**authErrorCallback** = method passed that will handle on client any auth error
|
|
@@ -82,7 +84,7 @@ React component for the summit registration lite widget
|
|
|
82
84
|
**idpLogoDark** = string for custom src for dark theme logo on otp login
|
|
83
85
|
|
|
84
86
|
**idpLogoLight** = string for custom src for light theme logo on otp login
|
|
85
|
-
|
|
87
|
+
|
|
86
88
|
**idpLogoAlt** = string for custom alt logo on otp login
|
|
87
89
|
|
|
88
90
|
## PUBLISH TO NPM:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{background-color:#fff6d7;font-size:16px;color:#767676;text-align:center;width:200px;position:absolute;top:10px;left:calc(50% +
|
|
1
|
+
.passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{background-color:#fff6d7;font-size:16px;color:#767676;text-align:center;width:200px;position:absolute;top:10px;left:calc(50% + 100px);height:50px;line-height:50px}.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 .logo___qNVrv.logoDark___VVYee{display:none}.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;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);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;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);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_text_dark);text-decoration:underline;cursor:pointer}html[data-theme="DARK"] .logoLight___vSbn_{display:none}html[data-theme="DARK"] .logoDark___VVYee{display:block !important}html[data-theme="LIGHT"] .logoDark___VVYee{display:none}html[data-theme="LIGHT"] .logoLight___vSbn_{display:block !important}
|
|
2
2
|
|
package/dist/index.css
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
.button___XMN8a{font-weight:bold !important;font-size:1em !important;cursor:pointer !important;border:1px solid var(--color_input_border_color) !important;color:var(--color_input_text_color) !important;background-color:var(--color_input_background_color) !important}.button___XMN8a[disabled]{background-color:var(--color_secondary_contrast) !important}.button___XMN8a:hover{color:var(--color_input_text_color) !important}.button___XMN8a:active,.button___XMN8a:focus{color:var(--color_input_text_color) !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 var(--color_input_border_color);text-align:center}.wrapper___Jd5Xg .circle___lcN86{margin-bottom:10px;background-color:var(--color_input_background_color);border-radius:50px;border:1px solid var(--color_text_dark);padding:10px}.wrapper___Jd5Xg .circle___lcN86 i{font-size:36px;color:var(--color_text_dark)}.wrapper___Jd5Xg .complete___HAHzl{font-weight:bold;font-size:20px}.wrapper___Jd5Xg .actions___jJdPX{display:flex}.wrapper___Jd5Xg button{margin:10px 5px 0 5px;background-color:var(--color_button_background_color) !important;color:var(--color_button_color) !important}.wrapper___Jd5Xg span{font-size:14px}.wrapper___Jd5Xg a{color:var(--color_text_dark);text-decoration:underline}.wrapper___Jd5Xg .footer___FL9TW{font-size:14px;font-weight:normal}
|
|
24
24
|
|
|
25
|
-
.passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{background-color:#fff6d7;font-size:16px;color:#767676;text-align:center;width:200px;position:absolute;top:10px;left:calc(50% +
|
|
25
|
+
.passwordlessWrapper___BRQ_s{height:400px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{background-color:#fff6d7;font-size:16px;color:#767676;text-align:center;width:200px;position:absolute;top:10px;left:calc(50% + 100px);height:50px;line-height:50px}.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 .logo___qNVrv.logoDark___VVYee{display:none}.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;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);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;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);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_text_dark);text-decoration:underline;cursor:pointer}html[data-theme="DARK"] .logoLight___vSbn_{display:none}html[data-theme="DARK"] .logoDark___VVYee{display:block !important}html[data-theme="LIGHT"] .logoDark___VVYee{display:none}html[data-theme="LIGHT"] .logoLight___vSbn_{display:block !important}
|
|
26
26
|
|
|
27
27
|
.ticketOwnedWrapper___nhkDY{margin:10px}.ticketOwnedWrapper___nhkDY span{display:block}.alert___c49oP{margin:0 !important}
|
|
28
28
|
|
package/dist/index.js
CHANGED
|
@@ -548,7 +548,12 @@ const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';
|
|
|
548
548
|
const STEP_SELECT_TICKET_TYPE = 0;
|
|
549
549
|
const STEP_PERSONAL_INFO = 1;
|
|
550
550
|
const STEP_PAYMENT = 2;
|
|
551
|
-
const STEP_COMPLETE = 3;
|
|
551
|
+
const STEP_COMPLETE = 3; // ANALYTICS
|
|
552
|
+
|
|
553
|
+
const VIEW_ITEM = 'view_item';
|
|
554
|
+
const ADD_TO_CART = 'add_to_cart';
|
|
555
|
+
const BEGIN_CHECKOUT = 'begin_checkout';
|
|
556
|
+
const PURCHASE_COMPLETE = 'purchase_complete';
|
|
552
557
|
;// CONCATENATED MODULE: ./src/utils/payment-providers/lawpay-provider.js
|
|
553
558
|
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; }
|
|
554
559
|
|
|
@@ -749,6 +754,28 @@ const getTicketCost = (ticket, quantity = 1) => {
|
|
|
749
754
|
}), " ", ticket.currency);
|
|
750
755
|
};
|
|
751
756
|
const isPrePaidTicketType = ticketType => ticketType?.sub_type === TICKET_TYPE_SUBTYPE_PREPAID;
|
|
757
|
+
const buildTrackEvent = (data, ticketQuantity = null, promoCode = null) => {
|
|
758
|
+
const eventData = {
|
|
759
|
+
currency: data.currency || 'USD',
|
|
760
|
+
items_array: [{
|
|
761
|
+
item_id: data.id,
|
|
762
|
+
item_name: data.name,
|
|
763
|
+
price: data.cost
|
|
764
|
+
}]
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
if (ticketQuantity) {
|
|
768
|
+
eventData.value = data.cost * ticketQuantity;
|
|
769
|
+
eventData.items_array[0].quantity = ticketQuantity;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
if (promoCode) {
|
|
773
|
+
eventData.coupon = promoCode;
|
|
774
|
+
eventData.items_array[0].discount = data.cost - (data.cost_with_applied_discount || 0);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
return eventData;
|
|
778
|
+
};
|
|
752
779
|
;// CONCATENATED MODULE: ./src/utils/payment-providers/stripe-provider.js
|
|
753
780
|
function stripe_provider_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; }
|
|
754
781
|
|
|
@@ -3023,6 +3050,7 @@ function ticket_type_defineProperty(obj, key, value) { if (key in obj) { Object.
|
|
|
3023
3050
|
|
|
3024
3051
|
|
|
3025
3052
|
|
|
3053
|
+
|
|
3026
3054
|
const TicketTypeComponent = ({
|
|
3027
3055
|
allowedTicketTypes,
|
|
3028
3056
|
originalTicketTypes,
|
|
@@ -3037,7 +3065,8 @@ const TicketTypeComponent = ({
|
|
|
3037
3065
|
allowPromoCodes,
|
|
3038
3066
|
applyPromoCode,
|
|
3039
3067
|
removePromoCode,
|
|
3040
|
-
promoCode
|
|
3068
|
+
promoCode,
|
|
3069
|
+
trackViewItem
|
|
3041
3070
|
}) => {
|
|
3042
3071
|
const [ticket, setTicket] = (0,external_react_.useState)(null);
|
|
3043
3072
|
const [quantity, setQuantity] = (0,external_react_.useState)(1);
|
|
@@ -3095,6 +3124,7 @@ const TicketTypeComponent = ({
|
|
|
3095
3124
|
const handleTicketChange = t => {
|
|
3096
3125
|
setTicket(t);
|
|
3097
3126
|
setQuantity(minQuantity);
|
|
3127
|
+
trackViewItem(t);
|
|
3098
3128
|
};
|
|
3099
3129
|
|
|
3100
3130
|
const handlePromoCodeChange = code => {
|
|
@@ -3538,7 +3568,7 @@ const TicketTaxesError = ({
|
|
|
3538
3568
|
|
|
3539
3569
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
3540
3570
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
3541
|
-
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", "showCompanyInput", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData", "closeWidget", "hasVirtualAccessLevel", "idpLogoLight", "idpLogoDark", "idpLogoAlt", "showCompanyInputDefaultOptions", "companyDDLOptions2Show", "promoCode", "hasDiscount", "getTicketDiscount", "removePromoCode", "applyPromoCode", "validatePromoCode"];
|
|
3571
|
+
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "trackEvent", "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", "showCompanyInput", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData", "closeWidget", "hasVirtualAccessLevel", "idpLogoLight", "idpLogoDark", "idpLogoAlt", "showCompanyInputDefaultOptions", "companyDDLOptions2Show", "promoCode", "hasDiscount", "getTicketDiscount", "removePromoCode", "applyPromoCode", "validatePromoCode"];
|
|
3542
3572
|
|
|
3543
3573
|
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; }
|
|
3544
3574
|
|
|
@@ -3610,6 +3640,7 @@ const RegistrationLite = _ref => {
|
|
|
3610
3640
|
removeReservedTicket,
|
|
3611
3641
|
reserveTicket,
|
|
3612
3642
|
payTicketWithProvider,
|
|
3643
|
+
trackEvent,
|
|
3613
3644
|
onPurchaseComplete,
|
|
3614
3645
|
getTicketTypesAndTaxes,
|
|
3615
3646
|
getLoginCode,
|
|
@@ -3788,6 +3819,34 @@ const RegistrationLite = _ref => {
|
|
|
3788
3819
|
}).finally(() => {
|
|
3789
3820
|
setTicketTaxesLoaded(true);
|
|
3790
3821
|
});
|
|
3822
|
+
};
|
|
3823
|
+
|
|
3824
|
+
const handleValidatePromocode = (data, onError) => {
|
|
3825
|
+
validatePromoCode(data, onError).then(() => {
|
|
3826
|
+
trackAddToCart(data);
|
|
3827
|
+
});
|
|
3828
|
+
};
|
|
3829
|
+
|
|
3830
|
+
const trackViewItem = data => {
|
|
3831
|
+
const eventData = buildTrackEvent(data);
|
|
3832
|
+
trackEvent(VIEW_ITEM, eventData);
|
|
3833
|
+
};
|
|
3834
|
+
|
|
3835
|
+
const trackAddToCart = data => {
|
|
3836
|
+
const eventData = buildTrackEvent(data, data.ticketQuantity, promoCode);
|
|
3837
|
+
trackEvent(ADD_TO_CART, eventData);
|
|
3838
|
+
};
|
|
3839
|
+
|
|
3840
|
+
const trackBeginCheckout = data => {
|
|
3841
|
+
const eventData = buildTrackEvent(data.ticketType, data.ticketQuantity, promoCode);
|
|
3842
|
+
trackEvent(BEGIN_CHECKOUT, eventData);
|
|
3843
|
+
};
|
|
3844
|
+
|
|
3845
|
+
const handlePurchaseComplete = order => {
|
|
3846
|
+
onPurchaseComplete(order);
|
|
3847
|
+
trackEvent(PURCHASE_COMPLETE, {
|
|
3848
|
+
order
|
|
3849
|
+
});
|
|
3791
3850
|
}; // if we dont have yet ticket types and we didnt requested so far for them but we are already logged in
|
|
3792
3851
|
// just dont render
|
|
3793
3852
|
|
|
@@ -3864,6 +3923,7 @@ const RegistrationLite = _ref => {
|
|
|
3864
3923
|
promoCode: promoCode,
|
|
3865
3924
|
formErrors: formErrors,
|
|
3866
3925
|
changeForm: ticketForm => setFormValues(registration_lite_objectSpread(registration_lite_objectSpread({}, formValues), ticketForm)),
|
|
3926
|
+
trackViewItem: trackViewItem,
|
|
3867
3927
|
showMultipleTicketTexts: showMultipleTicketTexts
|
|
3868
3928
|
}), /*#__PURE__*/external_react_default().createElement(personal_information, {
|
|
3869
3929
|
isActive: step === STEP_PERSONAL_INFO,
|
|
@@ -3882,6 +3942,8 @@ const RegistrationLite = _ref => {
|
|
|
3882
3942
|
ticketQuantity: registrationForm.values?.ticketQuantity
|
|
3883
3943
|
}, {
|
|
3884
3944
|
onError: (err, res) => setFormErrors(res.body.errors)
|
|
3945
|
+
}).then(() => {
|
|
3946
|
+
trackBeginCheckout(registrationForm.values);
|
|
3885
3947
|
}).catch(error => {
|
|
3886
3948
|
let {
|
|
3887
3949
|
message
|
|
@@ -3919,7 +3981,7 @@ const RegistrationLite = _ref => {
|
|
|
3919
3981
|
checkout: checkout,
|
|
3920
3982
|
user: profileData,
|
|
3921
3983
|
summit: summitData,
|
|
3922
|
-
onPurchaseComplete:
|
|
3984
|
+
onPurchaseComplete: handlePurchaseComplete,
|
|
3923
3985
|
goToEvent: goToEvent,
|
|
3924
3986
|
goToMyOrders: goToMyOrders,
|
|
3925
3987
|
goToExtraQuestions: goToExtraQuestions,
|
|
@@ -3940,7 +4002,7 @@ const RegistrationLite = _ref => {
|
|
|
3940
4002
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
3941
4003
|
formValues: formValues,
|
|
3942
4004
|
removeReservedTicket: removeReservedTicket,
|
|
3943
|
-
validatePromoCode:
|
|
4005
|
+
validatePromoCode: handleValidatePromocode,
|
|
3944
4006
|
onValidateError: {
|
|
3945
4007
|
onError: (err, res) => setFormErrors(res.body.errors)
|
|
3946
4008
|
},
|