summit-registration-lite 5.0.20-alpha.0 → 5.0.20-alpha.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/dist/index.css +2 -2
- package/dist/index.js +107 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
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.fieldWrapperRadio___x18VG{width:100%;margin-bottom:10px}.form___lDFka div.fieldWrapperRadio___x18VG label{display:inline-block;margin-bottom:5px}.form___lDFka div.fieldWrapperRadio___x18VG>div>div{padding-left:0px !important}.form___lDFka div.inputWrapper___PEQFR{display:flex;border-radius:5px;border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input{width:100%;background-color:transparent;color:var(--color_input_text_color);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 .fieldWrapperRadio___x18VG>div{display:flex;flex-direction:row}.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
|
-
.title___DNZyl{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.summary___quWdZ{text-align:right}.promoCode___bqTCw{display:inline-flex}.promoCode___bqTCw abbr{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:10ch}.crossOut___QZ7dy{text-decoration:line-through}.discount___sEK_Q{color:red}.taxes___fe8oJ{display:inline-flex}.taxes___fe8oJ abbr{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:15ch}.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_input_border_color)}.quantity___SIEQZ input{padding:0 8px;width:48px !important}.quantity___SIEQZ input,.quantity___SIEQZ input:read-only{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color)}.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;padding-right:10px;max-height:150px;overflow-y:auto}
|
|
15
|
+
.title___DNZyl{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.summary___quWdZ{text-align:right}.promoCode___bqTCw{display:inline-flex}.promoCode___bqTCw abbr{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:10ch}.crossOut___QZ7dy{text-decoration:line-through}.discount___sEK_Q{color:red}.promocodeError___oxk4p{margin-top:10px;color:red}.promocodeError___oxk4p::before{font-family:FontAwesome;content:'\f071';margin-right:5px}.taxes___fe8oJ{display:inline-flex}.taxes___fe8oJ abbr{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:15ch}.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_input_border_color)}.quantity___SIEQZ input{padding:0 8px;width:48px !important}.quantity___SIEQZ input,.quantity___SIEQZ input:read-only{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color)}.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;padding-right:10px;max-height:150px;overflow-y:auto}
|
|
16
16
|
|
|
17
17
|
.placeholder___pcdCn{border-radius:5px;width:100%;border:1px solid var(--color_primary);background-color:var(--color_primary50);padding:5px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;height:36px}.placeholder___pcdCn i{padding:2px 5px;border-left:1px solid var(--color_primary)}.placeholder___pcdCn .selectedTicket___qkbpH{max-height:25px;word-wrap:break-word;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:400px}@media screen and (max-width: 630px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:300px}}@media screen and (max-width: 500px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:200px}}@media screen and (max-width: 400px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:100px}}.inPersonDisclaimer___z_DzO{padding:4px}.dropdown___mfbPG{margin-top:10px;border-radius:5px;width:100%;border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);cursor:pointer}.dropdown___mfbPG div{padding:5px}.dropdown___mfbPG div:hover{background-color:var(--color_primary);color:var(--color_input_text_color)}.soldOut___rBLC0,.soldOut___rBLC0:hover,.soldOut___rBLC0:focus{color:inherit !important;background-color:#dedede !important;opacity:0.65;cursor:not-allowed}
|
|
18
18
|
|
|
19
|
-
.promoCodeWrapper___aw3Zx{padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;gap:15px}.promoCodeWrapper___aw3Zx span{color:var(--color_text_dark);font-size:14px;font-weight:600;line-height:140%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{display:flex;align-items:center;position:relative;flex:1}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input{display:inline-flex;
|
|
19
|
+
.promoCodeWrapper___aw3Zx{padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;gap:15px}.promoCodeWrapper___aw3Zx span{color:var(--color_text_dark);font-size:14px;font-weight:600;line-height:140%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{display:flex;align-items:center;position:relative;flex:1;height:33px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input{display:inline-flex;padding:13px 8px;width:70%;height:100%;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1.5px solid var(--color_input_border_color);border-radius:4px 0px 0px 4px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input.promoCodeActive___j7xnn{padding-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5{display:flex;align-items:center;width:30%;height:100%;background-color:#818181;border-radius:0px 4px 4px 0px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5.noCode___YUmVy{background-color:#CFCFCF;cursor:not-allowed}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5 button{color:#fff;font-size:14px;font-style:normal;font-weight:600;line-height:120%;letter-spacing:-0.14px;width:100%;height:100%;border:none;background-color:transparent}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .appliedCodeIcon___pa3B4{position:absolute;left:60%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{display:inline-block}.promoCodeWrapper___aw3Zx .moreInfoTooltip___eaYWm{max-width:280px}
|
|
20
20
|
|
|
21
21
|
.button___MZBIY{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___MZBIY[disabled]{background-color:var(--color_secondary_contrast) !important}.button___MZBIY:hover{color:var(--color_input_text_color) !important}.button___MZBIY:active,.button___MZBIY:focus{color:var(--color_input_text_color) !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}
|
|
22
22
|
|
package/dist/index.js
CHANGED
|
@@ -888,6 +888,9 @@ payment_provider_factory_defineProperty(PaymentProviderFactory, "build", (provid
|
|
|
888
888
|
|
|
889
889
|
return currentProvider;
|
|
890
890
|
});
|
|
891
|
+
;// CONCATENATED MODULE: external "urijs"
|
|
892
|
+
const external_urijs_namespaceObject = require("urijs");
|
|
893
|
+
var external_urijs_default = /*#__PURE__*/__webpack_require__.n(external_urijs_namespaceObject);
|
|
891
894
|
;// CONCATENATED MODULE: ./src/actions.js
|
|
892
895
|
function actions_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; }
|
|
893
896
|
|
|
@@ -913,6 +916,7 @@ function actions_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
913
916
|
|
|
914
917
|
|
|
915
918
|
|
|
919
|
+
|
|
916
920
|
const START_WIDGET_LOADING = 'START_WIDGET_LOADING';
|
|
917
921
|
const STOP_WIDGET_LOADING = 'STOP_WIDGET_LOADING';
|
|
918
922
|
const LOAD_INITIAL_VARS = 'LOAD_INITIAL_VARS';
|
|
@@ -939,6 +943,7 @@ const UPDATE_CLOCK = 'UPDATE_CLOCK';
|
|
|
939
943
|
const LOAD_PROFILE_DATA = 'LOAD_PROFILE_DATA';
|
|
940
944
|
const SET_CURRENT_PROMO_CODE = 'SET_CURRENT_PROMO_CODE';
|
|
941
945
|
const CLEAR_CURRENT_PROMO_CODE = 'CLEAR_CURRENT_PROMO_CODE';
|
|
946
|
+
const VALIDATE_PROMO_CODE = 'VALIDATE_PROMO_CODE';
|
|
942
947
|
const startWidgetLoading = (0,actions_namespaceObject.createAction)(START_WIDGET_LOADING);
|
|
943
948
|
const stopWidgetLoading = (0,actions_namespaceObject.createAction)(STOP_WIDGET_LOADING);
|
|
944
949
|
const loadSession = settings => dispatch => {
|
|
@@ -1081,6 +1086,62 @@ const removePromoCode = () => (dispatch, getState) => {
|
|
|
1081
1086
|
return Promise.reject(e);
|
|
1082
1087
|
}
|
|
1083
1088
|
};
|
|
1089
|
+
const validatePromoCode = (ticketData, {
|
|
1090
|
+
onError
|
|
1091
|
+
}) => async (dispatch, getState, {
|
|
1092
|
+
apiBaseUrl,
|
|
1093
|
+
getAccessToken
|
|
1094
|
+
}) => {
|
|
1095
|
+
const {
|
|
1096
|
+
registrationLiteState: {
|
|
1097
|
+
settings: {
|
|
1098
|
+
summitId
|
|
1099
|
+
},
|
|
1100
|
+
promoCode: currentPromoCode
|
|
1101
|
+
}
|
|
1102
|
+
} = getState();
|
|
1103
|
+
|
|
1104
|
+
if (summitId && currentPromoCode) {
|
|
1105
|
+
dispatch(startWidgetLoading());
|
|
1106
|
+
const {
|
|
1107
|
+
ticketQuantity,
|
|
1108
|
+
id,
|
|
1109
|
+
sub_type
|
|
1110
|
+
} = ticketData;
|
|
1111
|
+
const access_token = await getAccessToken();
|
|
1112
|
+
let apiUrl = external_urijs_default()(`${apiBaseUrl}/api/v1/summits/${summitId}/promo-codes/${currentPromoCode}/apply`);
|
|
1113
|
+
apiUrl.addQuery('access_token', access_token);
|
|
1114
|
+
apiUrl.addQuery('filter[]', `ticket_type_id==${id}`);
|
|
1115
|
+
apiUrl.addQuery('filter[]', `ticket_type_qty==${ticketQuantity}`);
|
|
1116
|
+
apiUrl.addQuery('filter[]', `ticket_type_subtype==${sub_type}`);
|
|
1117
|
+
|
|
1118
|
+
const errorHandler = (err, res) => (dispatch, state) => {
|
|
1119
|
+
if (res && res.statusCode === 404 && onError) return onError(err, res);
|
|
1120
|
+
if (res && res.statusCode === 412 && onError) return onError(err, res);
|
|
1121
|
+
if (res && res.statusCode === 429 && onError) return onError(err, res);
|
|
1122
|
+
|
|
1123
|
+
if (res && res.statusCode === 500) {
|
|
1124
|
+
const defaultMessage = 'Server Error';
|
|
1125
|
+
const msg = res?.body?.message || defaultMessage;
|
|
1126
|
+
external_sweetalert2_default().fire("Server Error", msg, "error");
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
return (0,actions_namespaceObject.authErrorHandler)(err, res)(dispatch, state);
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
return (0,actions_namespaceObject.getRequest)(null, (0,actions_namespaceObject.createAction)(VALIDATE_PROMO_CODE), `${apiUrl}`, errorHandler)({})(dispatch).then(res => {
|
|
1134
|
+
dispatch(changeStep(STEP_PERSONAL_INFO));
|
|
1135
|
+
dispatch(stopWidgetLoading());
|
|
1136
|
+
return res;
|
|
1137
|
+
}).catch(error => {
|
|
1138
|
+
dispatch(stopWidgetLoading());
|
|
1139
|
+
return Promise.reject(error);
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
return dispatch(changeStep(STEP_PERSONAL_INFO));
|
|
1144
|
+
};
|
|
1084
1145
|
const reserveTicket = ({
|
|
1085
1146
|
provider,
|
|
1086
1147
|
personalInformation,
|
|
@@ -2650,7 +2711,7 @@ const PersonalInfoComponent = ({
|
|
|
2650
2711
|
}), companyError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2651
2712
|
className: personal_information_index_module.fieldError,
|
|
2652
2713
|
"data-testid": "company-error"
|
|
2653
|
-
}, "This field is required."))), shouldDisplayTicketAssignment() && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("
|
|
2714
|
+
}, "This field is required."))), shouldDisplayTicketAssignment() && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2654
2715
|
className: personal_information_index_module.fieldWrapperRadio
|
|
2655
2716
|
}, /*#__PURE__*/external_react_default().createElement("label", null, "Ticket is for:"), /*#__PURE__*/external_react_default().createElement(components_namespaceObject.RadioList, {
|
|
2656
2717
|
id: `ticket-self-radio`,
|
|
@@ -2720,7 +2781,7 @@ const raw_html_namespaceObject = require("openstack-uicore-foundation/lib/compon
|
|
|
2720
2781
|
var raw_html_default = /*#__PURE__*/__webpack_require__.n(raw_html_namespaceObject);
|
|
2721
2782
|
;// CONCATENATED MODULE: ./src/components/ticket-type/index.module.scss
|
|
2722
2783
|
// extracted by mini-css-extract-plugin
|
|
2723
|
-
/* harmony default export */ const ticket_type_index_module = ({"title":"title___DNZyl","summary":"summary___quWdZ","promoCode":"promoCode___bqTCw","crossOut":"crossOut___QZ7dy","discount":"discount___sEK_Q","taxes":"taxes___fe8oJ","promo":"promo___F8lPO","form":"form___aoo7w","dropdown":"dropdown____HWg0","quantity":"quantity___SIEQZ","soldOut":"soldOut___Hatfr","moreInfo":"moreInfo___LmwOe","moreInfoTooltip":"moreInfoTooltip___nOBf1","inPersonDisclaimer":"inPersonDisclaimer___PXGTz"});
|
|
2784
|
+
/* harmony default export */ const ticket_type_index_module = ({"title":"title___DNZyl","summary":"summary___quWdZ","promoCode":"promoCode___bqTCw","crossOut":"crossOut___QZ7dy","discount":"discount___sEK_Q","promocodeError":"promocodeError___oxk4p","taxes":"taxes___fe8oJ","promo":"promo___F8lPO","form":"form___aoo7w","dropdown":"dropdown____HWg0","quantity":"quantity___SIEQZ","soldOut":"soldOut___Hatfr","moreInfo":"moreInfo___LmwOe","moreInfoTooltip":"moreInfoTooltip___nOBf1","inPersonDisclaimer":"inPersonDisclaimer___PXGTz"});
|
|
2724
2785
|
;// CONCATENATED MODULE: ./src/components/ticket-dropdown/index.module.scss
|
|
2725
2786
|
// extracted by mini-css-extract-plugin
|
|
2726
2787
|
/* harmony default export */ const ticket_dropdown_index_module = ({"placeholder":"placeholder___pcdCn","selectedTicket":"selectedTicket___qkbpH","inPersonDisclaimer":"inPersonDisclaimer___z_DzO","dropdown":"dropdown___mfbPG","soldOut":"soldOut___rBLC0"});
|
|
@@ -2794,7 +2855,7 @@ var icon_check_circle = __webpack_require__(60);
|
|
|
2794
2855
|
var icon_check_circle_default = /*#__PURE__*/__webpack_require__.n(icon_check_circle);
|
|
2795
2856
|
;// CONCATENATED MODULE: ./src/components/promocode-input/index.module.scss
|
|
2796
2857
|
// extracted by mini-css-extract-plugin
|
|
2797
|
-
/* harmony default export */ const promocode_input_index_module = ({"promoCodeWrapper":"promoCodeWrapper___aw3Zx","promoCodeInput":"promoCodeInput___rDiET","promoCodeActive":"promoCodeActive___j7xnn","
|
|
2858
|
+
/* harmony default export */ const promocode_input_index_module = ({"promoCodeWrapper":"promoCodeWrapper___aw3Zx","promoCodeInput":"promoCodeInput___rDiET","promoCodeActive":"promoCodeActive___j7xnn","codeButtonWrapper":"codeButtonWrapper___jVZh5","noCode":"noCode___YUmVy","appliedCodeIcon":"appliedCodeIcon___pa3B4","moreInfo":"moreInfo___Ru3Rv","moreInfoTooltip":"moreInfoTooltip___eaYWm"});
|
|
2798
2859
|
;// CONCATENATED MODULE: ./src/components/promocode-input/index.js
|
|
2799
2860
|
/**
|
|
2800
2861
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -2838,16 +2899,17 @@ const PromoCodeInput = ({
|
|
|
2838
2899
|
if (e.key === "Enter") applyPromoCode(statePromoCode);
|
|
2839
2900
|
},
|
|
2840
2901
|
readOnly: !isEmptyString(promoCode)
|
|
2841
|
-
}), promoCode
|
|
2842
|
-
className: promocode_input_index_module.appliedCode
|
|
2843
|
-
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
2902
|
+
}), promoCode && /*#__PURE__*/external_react_default().createElement("img", {
|
|
2844
2903
|
src: (icon_check_circle_default()),
|
|
2845
2904
|
className: promocode_input_index_module.appliedCodeIcon
|
|
2846
|
-
}), /*#__PURE__*/external_react_default().createElement("
|
|
2905
|
+
}), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2906
|
+
className: `${promocode_input_index_module.codeButtonWrapper} ${statePromoCode ? '' : promocode_input_index_module.noCode}`
|
|
2907
|
+
}, promoCode !== '' ? /*#__PURE__*/external_react_default().createElement("button", {
|
|
2847
2908
|
onClick: () => removePromoCode()
|
|
2848
|
-
}, "Remove")
|
|
2909
|
+
}, "Remove") : /*#__PURE__*/external_react_default().createElement("button", {
|
|
2910
|
+
disabled: !statePromoCode,
|
|
2849
2911
|
onClick: () => applyPromoCode(statePromoCode)
|
|
2850
|
-
}, "Apply")), showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
2912
|
+
}, "Apply"))), showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
2851
2913
|
className: promocode_input_index_module.moreInfo,
|
|
2852
2914
|
"data-tip": true,
|
|
2853
2915
|
"data-for": "promo-code-info"
|
|
@@ -2901,6 +2963,7 @@ const TicketTypeComponent = ({
|
|
|
2901
2963
|
taxTypes,
|
|
2902
2964
|
isActive,
|
|
2903
2965
|
changeForm,
|
|
2966
|
+
formErrors,
|
|
2904
2967
|
reservation,
|
|
2905
2968
|
inPersonDisclaimer,
|
|
2906
2969
|
showMultipleTicketTexts,
|
|
@@ -2966,6 +3029,7 @@ const TicketTypeComponent = ({
|
|
|
2966
3029
|
|
|
2967
3030
|
const decrementQuantity = () => setQuantity(quantity - 1);
|
|
2968
3031
|
|
|
3032
|
+
const promoCodeError = Object.keys(formErrors).length > 0 ? formErrors : null;
|
|
2969
3033
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2970
3034
|
className: `${ticket_type_index_module.outerWrapper} step-wrapper`
|
|
2971
3035
|
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3041,12 +3105,14 @@ const TicketTypeComponent = ({
|
|
|
3041
3105
|
disabled: maxQuantity === 0 || quantity >= maxQuantity
|
|
3042
3106
|
}, /*#__PURE__*/external_react_default().createElement("i", {
|
|
3043
3107
|
className: "glyphicon glyphicon-plus"
|
|
3044
|
-
}))))))), allowPromoCodes && /*#__PURE__*/external_react_default().createElement(promocode_input, {
|
|
3108
|
+
}))))))), allowPromoCodes && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement(promocode_input, {
|
|
3045
3109
|
promoCode: promoCode,
|
|
3046
3110
|
applyPromoCode: applyPromoCode,
|
|
3047
3111
|
showMultipleTicketTexts: showMultipleTicketTexts,
|
|
3048
3112
|
removePromoCode: removePromoCode
|
|
3049
|
-
}),
|
|
3113
|
+
}), promoCodeError && Object.values(promoCodeError).map(er => /*#__PURE__*/external_react_default().createElement("div", {
|
|
3114
|
+
className: `${ticket_type_index_module.promocodeError} alert alert-danger`
|
|
3115
|
+
}, er))), showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
3050
3116
|
className: ticket_type_index_module.moreInfo,
|
|
3051
3117
|
"data-tip": true,
|
|
3052
3118
|
"data-for": "ticket-quantity-info"
|
|
@@ -3067,6 +3133,12 @@ const TicketTypeComponent = ({
|
|
|
3067
3133
|
// extracted by mini-css-extract-plugin
|
|
3068
3134
|
/* harmony default export */ const button_bar_index_module = ({"button":"button___MZBIY","outerWrapper":"outerWrapper___XRnaq","innerWrapper":"innerWrapper___LFsOH","registration":"registration___jdf6T","actions":"actions___Gsf0y"});
|
|
3069
3135
|
;// CONCATENATED MODULE: ./src/components/button-bar/index.js
|
|
3136
|
+
function button_bar_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; }
|
|
3137
|
+
|
|
3138
|
+
function button_bar_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? button_bar_ownKeys(Object(source), !0).forEach(function (key) { button_bar_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : button_bar_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3139
|
+
|
|
3140
|
+
function button_bar_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; }
|
|
3141
|
+
|
|
3070
3142
|
/**
|
|
3071
3143
|
* Copyright 2020 OpenStack Foundation
|
|
3072
3144
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -3083,15 +3155,19 @@ const TicketTypeComponent = ({
|
|
|
3083
3155
|
|
|
3084
3156
|
|
|
3085
3157
|
|
|
3158
|
+
|
|
3086
3159
|
const ButtonBarComponent = ({
|
|
3087
3160
|
step,
|
|
3088
3161
|
changeStep,
|
|
3162
|
+
validatePromoCode,
|
|
3163
|
+
onValidateError,
|
|
3089
3164
|
formValues,
|
|
3090
3165
|
removeReservedTicket,
|
|
3091
3166
|
inPersonDisclaimer
|
|
3092
3167
|
}) => {
|
|
3093
3168
|
const {
|
|
3094
|
-
ticketType
|
|
3169
|
+
ticketType,
|
|
3170
|
+
ticketQuantity
|
|
3095
3171
|
} = formValues || {};
|
|
3096
3172
|
const nextButtonText = inPersonDisclaimer && ticketType && isInPersonTicketType(ticketType) ? 'Accept' : 'Next';
|
|
3097
3173
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3102,25 +3178,27 @@ const ButtonBarComponent = ({
|
|
|
3102
3178
|
className: button_bar_index_module.required
|
|
3103
3179
|
}, step !== 0 && /*#__PURE__*/external_react_default().createElement("span", null, "* Required fields ", /*#__PURE__*/external_react_default().createElement("br", null), " ")), /*#__PURE__*/external_react_default().createElement("div", {
|
|
3104
3180
|
className: button_bar_index_module.actions
|
|
3105
|
-
}, step !==
|
|
3181
|
+
}, step !== STEP_SELECT_TICKET_TYPE && step !== STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3106
3182
|
className: `${button_bar_index_module.button} button`,
|
|
3107
3183
|
onClick: () => changeStep(step - 1)
|
|
3108
|
-
}, "< Back"), step !==
|
|
3184
|
+
}, "< Back"), step !== STEP_SELECT_TICKET_TYPE && step === STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3109
3185
|
className: `${button_bar_index_module.button} button`,
|
|
3110
3186
|
onClick: () => removeReservedTicket()
|
|
3111
|
-
}, "< Back"), step ===
|
|
3187
|
+
}, "< Back"), step === STEP_SELECT_TICKET_TYPE && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3112
3188
|
disabled: !ticketType,
|
|
3113
3189
|
className: `${button_bar_index_module.button} button`,
|
|
3114
|
-
onClick: () =>
|
|
3115
|
-
|
|
3190
|
+
onClick: () => validatePromoCode(button_bar_objectSpread(button_bar_objectSpread({}, ticketType), {}, {
|
|
3191
|
+
ticketQuantity
|
|
3192
|
+
}), onValidateError)
|
|
3193
|
+
}, nextButtonText), step === STEP_PERSONAL_INFO && ticketType?.cost === 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3116
3194
|
className: `${button_bar_index_module.button} button`,
|
|
3117
3195
|
type: "submit",
|
|
3118
3196
|
form: "personal-info-form"
|
|
3119
|
-
}, "Get Ticket"), step ===
|
|
3197
|
+
}, "Get Ticket"), step === STEP_PERSONAL_INFO && ticketType?.cost > 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3120
3198
|
className: `${button_bar_index_module.button} button`,
|
|
3121
3199
|
type: "submit",
|
|
3122
3200
|
form: "personal-info-form"
|
|
3123
|
-
}, "Next"), step ===
|
|
3201
|
+
}, "Next"), step === STEP_PAYMENT && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3124
3202
|
className: `${button_bar_index_module.button} button`,
|
|
3125
3203
|
type: "submit",
|
|
3126
3204
|
form: "payment-form"
|
|
@@ -3377,7 +3455,7 @@ const TicketTaxesError = ({
|
|
|
3377
3455
|
|
|
3378
3456
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
3379
3457
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
3380
|
-
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", "logoLight", "logoDark", "showCompanyInputDefaultOptions", "companyDDLOptions2Show", "promoCode", "hasDiscount", "getTicketDiscount", "removePromoCode", "applyPromoCode"];
|
|
3458
|
+
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", "logoLight", "logoDark", "showCompanyInputDefaultOptions", "companyDDLOptions2Show", "promoCode", "hasDiscount", "getTicketDiscount", "removePromoCode", "applyPromoCode", "validatePromoCode"];
|
|
3381
3459
|
|
|
3382
3460
|
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; }
|
|
3383
3461
|
|
|
@@ -3508,7 +3586,8 @@ const RegistrationLite = _ref => {
|
|
|
3508
3586
|
hasDiscount,
|
|
3509
3587
|
getTicketDiscount,
|
|
3510
3588
|
removePromoCode,
|
|
3511
|
-
applyPromoCode
|
|
3589
|
+
applyPromoCode,
|
|
3590
|
+
validatePromoCode
|
|
3512
3591
|
} = _ref,
|
|
3513
3592
|
rest = registration_lite_objectWithoutProperties(_ref, registration_lite_excluded);
|
|
3514
3593
|
|
|
@@ -3688,6 +3767,7 @@ const RegistrationLite = _ref => {
|
|
|
3688
3767
|
applyPromoCode: applyPromoCode,
|
|
3689
3768
|
removePromoCode: removePromoCode,
|
|
3690
3769
|
promoCode: promoCode,
|
|
3770
|
+
formErrors: formErrors,
|
|
3691
3771
|
changeForm: ticketForm => setFormValues(registration_lite_objectSpread(registration_lite_objectSpread({}, formValues), ticketForm)),
|
|
3692
3772
|
showMultipleTicketTexts: showMultipleTicketTexts
|
|
3693
3773
|
}), /*#__PURE__*/external_react_default().createElement(personal_information, {
|
|
@@ -3765,6 +3845,10 @@ const RegistrationLite = _ref => {
|
|
|
3765
3845
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
3766
3846
|
formValues: formValues,
|
|
3767
3847
|
removeReservedTicket: removeReservedTicket,
|
|
3848
|
+
validatePromoCode: validatePromoCode,
|
|
3849
|
+
onValidateError: {
|
|
3850
|
+
onError: (err, res) => setFormErrors(res.body.errors)
|
|
3851
|
+
},
|
|
3768
3852
|
changeStep: changeStep
|
|
3769
3853
|
})))));
|
|
3770
3854
|
};
|
|
@@ -3840,7 +3924,8 @@ RegistrationLite.propTypes = {
|
|
|
3840
3924
|
updateClock: updateClock,
|
|
3841
3925
|
loadProfileData: loadProfileData,
|
|
3842
3926
|
applyPromoCode: applyPromoCode,
|
|
3843
|
-
removePromoCode: removePromoCode
|
|
3927
|
+
removePromoCode: removePromoCode,
|
|
3928
|
+
validatePromoCode: validatePromoCode
|
|
3844
3929
|
})(RegistrationLite));
|
|
3845
3930
|
;// CONCATENATED MODULE: ./src/summit-registration-lite.js
|
|
3846
3931
|
/**
|