summit-registration-lite 7.0.2 → 7.0.3
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/components/index.js +22 -21
- package/dist/components/index.js.map +1 -1
- package/dist/components/registration-form.js +22 -21
- package/dist/components/registration-form.js.map +1 -1
- package/dist/components/registration-modal.js +22 -21
- package/dist/components/registration-modal.js.map +1 -1
- package/dist/index.js +22 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/.claude/rules/summit-registration-lite-component-props.md +0 -95
- package/.claude/rules/summit-registration-lite-i18n.md +0 -62
- package/.claude/rules/summit-registration-lite-payment-providers.md +0 -69
- package/.claude/rules/summit-registration-lite-project.md +0 -80
- package/.claude/rules/summit-registration-lite-redux-actions.md +0 -65
- package/.claude/rules/summit-registration-lite-step-flow.md +0 -77
- package/.claude/rules/summit-registration-lite-testing.md +0 -97
- package/.claude/rules/summit-registration-lite-utils.md +0 -71
- package/.claude/skills/summit-registration-lite-add-provider/SKILL.md +0 -155
- package/.claude/skills/summit-registration-lite-dev-setup/SKILL.md +0 -67
- package/.claude/skills/summit-registration-lite-publish/SKILL.md +0 -64
- package/.claude/skills/summit-registration-lite-scaffold-component/SKILL.md +0 -152
- package/.codegraph/config.json +0 -141
package/dist/components/index.js
CHANGED
|
@@ -3863,9 +3863,12 @@ const RegistrationFormContent = _ref => {
|
|
|
3863
3863
|
},
|
|
3864
3864
|
errors: []
|
|
3865
3865
|
});
|
|
3866
|
+
const [hasTicketData, setHasTicketData] = (0,external_react_.useState)(false);
|
|
3866
3867
|
const [ticketDataError, setTicketDataError] = (0,external_react_.useState)(false);
|
|
3867
|
-
const [ticketDataLoaded, setTicketDataLoaded] = (0,external_react_.useState)(false);
|
|
3868
3868
|
const [unappliedCodeWarning, setUnappliedCodeWarning] = (0,external_react_.useState)(null);
|
|
3869
|
+
const isAuthenticated = !!profileData;
|
|
3870
|
+
const summitId = summitData?.id;
|
|
3871
|
+
const userId = profileData?.id;
|
|
3869
3872
|
const {
|
|
3870
3873
|
values: formValues,
|
|
3871
3874
|
errors: formErrors
|
|
@@ -3880,12 +3883,12 @@ const RegistrationFormContent = _ref => {
|
|
|
3880
3883
|
publicKey,
|
|
3881
3884
|
provider
|
|
3882
3885
|
} = (0,utils/* getCurrentProvider */.U5)(summitData);
|
|
3883
|
-
const allowedTicketTypes =
|
|
3884
|
-
const noAvailableTickets = (0,external_react_.useMemo)(() =>
|
|
3885
|
-
const alreadyOwnedTickets = (0,external_react_.useMemo)(() =>
|
|
3886
|
+
const allowedTicketTypes = (0,external_react_.useMemo)(() => hasTicketData ? ticketTypes.filter(tt => tt.sub_type === constants.TICKET_TYPE_SUBTYPE_PREPAID || tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date) : [], [hasTicketData, ticketTypes, nowUtc]);
|
|
3887
|
+
const noAvailableTickets = (0,external_react_.useMemo)(() => isAuthenticated && hasTicketData && !ticketDataError && allowedTicketTypes.length === 0 && step !== constants.STEP_COMPLETE, [isAuthenticated, hasTicketData, ticketDataError, allowedTicketTypes, step]);
|
|
3888
|
+
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => isAuthenticated && hasTicketData && !ticketDataError && allowedTicketTypes.length > 0 && ownedTickets.length > 0, [isAuthenticated, hasTicketData, ticketDataError, allowedTicketTypes, ownedTickets]);
|
|
3886
3889
|
(0,external_react_.useEffect)(() => {
|
|
3887
3890
|
if (profileData) loadProfileData(profileData);
|
|
3888
|
-
}, [
|
|
3891
|
+
}, [userId]);
|
|
3889
3892
|
(0,external_react_.useEffect)(() => {
|
|
3890
3893
|
loadSession(registration_form_objectSpread(registration_form_objectSpread({}, rest), {}, {
|
|
3891
3894
|
summitData,
|
|
@@ -3897,12 +3900,12 @@ const RegistrationFormContent = _ref => {
|
|
|
3897
3900
|
}
|
|
3898
3901
|
}, []);
|
|
3899
3902
|
(0,external_react_.useEffect)(() => {
|
|
3900
|
-
if (
|
|
3901
|
-
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(
|
|
3903
|
+
if (summitId && isAuthenticated) {
|
|
3904
|
+
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(summitId) : Promise.resolve();
|
|
3902
3905
|
|
|
3903
|
-
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(
|
|
3906
|
+
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(summitId));
|
|
3904
3907
|
}
|
|
3905
|
-
}, [
|
|
3908
|
+
}, [summitId, isAuthenticated]);
|
|
3906
3909
|
(0,external_react_.useEffect)(() => {
|
|
3907
3910
|
if (step > constants.STEP_SELECT_TICKET_TYPE && !registrationForm.values?.ticketType && !reservation) {
|
|
3908
3911
|
changeStep(constants.STEP_SELECT_TICKET_TYPE);
|
|
@@ -3913,10 +3916,10 @@ const RegistrationFormContent = _ref => {
|
|
|
3913
3916
|
}, [step]); // Discovery: fetch qualifying promo codes after auth
|
|
3914
3917
|
|
|
3915
3918
|
(0,external_react_.useEffect)(() => {
|
|
3916
|
-
if (
|
|
3917
|
-
discoverPromoCodes(
|
|
3919
|
+
if (isAuthenticated && summitId) {
|
|
3920
|
+
discoverPromoCodes(summitId);
|
|
3918
3921
|
}
|
|
3919
|
-
}, [
|
|
3922
|
+
}, [isAuthenticated, summitId]);
|
|
3920
3923
|
const handleFormPromoCodeChange = (0,external_react_.useCallback)(code => mergeFormValues({
|
|
3921
3924
|
promoCode: code
|
|
3922
3925
|
}), [mergeFormValues]);
|
|
@@ -3929,7 +3932,7 @@ const RegistrationFormContent = _ref => {
|
|
|
3929
3932
|
removePromoCode,
|
|
3930
3933
|
validatePromoCode,
|
|
3931
3934
|
setFormPromoCode: handleFormPromoCodeChange,
|
|
3932
|
-
ticketDataLoaded:
|
|
3935
|
+
ticketDataLoaded: hasTicketData && !ticketDataError,
|
|
3933
3936
|
hasTickets: allowedTicketTypes.length > 0
|
|
3934
3937
|
}); // Local destructure for readability at call sites.
|
|
3935
3938
|
|
|
@@ -3988,8 +3991,9 @@ const RegistrationFormContent = _ref => {
|
|
|
3988
3991
|
|
|
3989
3992
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
3990
3993
|
setTicketDataError(false);
|
|
3991
|
-
|
|
3992
|
-
|
|
3994
|
+
getTicketTypesAndTaxes(summitId).then(() => {
|
|
3995
|
+
setHasTicketData(true);
|
|
3996
|
+
}).catch(error => {
|
|
3993
3997
|
let {
|
|
3994
3998
|
message
|
|
3995
3999
|
} = error;
|
|
@@ -4000,8 +4004,6 @@ const RegistrationFormContent = _ref => {
|
|
|
4000
4004
|
}
|
|
4001
4005
|
|
|
4002
4006
|
setTicketDataError(true);
|
|
4003
|
-
}).finally(() => {
|
|
4004
|
-
setTicketDataLoaded(true);
|
|
4005
4007
|
});
|
|
4006
4008
|
};
|
|
4007
4009
|
|
|
@@ -4049,12 +4051,11 @@ const RegistrationFormContent = _ref => {
|
|
|
4049
4051
|
trackEvent(constants.PURCHASE_COMPLETE, {
|
|
4050
4052
|
order
|
|
4051
4053
|
});
|
|
4052
|
-
}; //
|
|
4053
|
-
//
|
|
4054
|
-
// race conditions with redux-persist rehydration.
|
|
4054
|
+
}; // Authenticated first-load: wait until ticket data is in before rendering
|
|
4055
|
+
// to avoid a flash of empty/wrong state.
|
|
4055
4056
|
|
|
4056
4057
|
|
|
4057
|
-
if (
|
|
4058
|
+
if (isAuthenticated && !hasTicketData && !ticketDataError) return null;
|
|
4058
4059
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
4059
4060
|
className: "summit-registration-lite"
|
|
4060
4061
|
}, /*#__PURE__*/external_react_default().createElement((ajaxloader_default()), {
|