summit-registration-lite 4.0.17 → 5.0.1
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 -3
- package/dist/components/login-passwordless.css +1 -1
- package/dist/components/login-passwordless.js +21 -4
- package/dist/components/login-passwordless.js.map +1 -1
- package/dist/components/login.css +1 -1
- package/dist/index.css +11 -11
- package/dist/index.css.map +1 -1
- package/dist/index.js +108 -108
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -32,10 +32,13 @@ const external_react_otp_input_namespaceObject = require("react-otp-input");
|
|
|
32
32
|
var external_react_otp_input_default = /*#__PURE__*/__webpack_require__.n(external_react_otp_input_namespaceObject);
|
|
33
33
|
;// CONCATENATED MODULE: ./src/components/login-passwordless/index.module.scss
|
|
34
34
|
// extracted by mini-css-extract-plugin
|
|
35
|
-
/* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U"});
|
|
35
|
+
/* harmony default export */ const index_module = ({"passwordlessWrapper":"passwordlessWrapper___BRQ_s","innerWrapper":"innerWrapper___nRLDi","logo":"logo___qNVrv","logoDark":"logoDark___VVYee","digits":"digits___Vu5iy","codeInput":"codeInput___LnTZe","error":"error___wZflZ","verify":"verify___IBgMl","button":"button___nBhtQ","link":"link___f6fDT","resend":"resend___Nma1U","logoLight":"logoLight___vSbn_"});
|
|
36
36
|
// EXTERNAL MODULE: ./src/assets/FNid_WHT_logo_rgb.svg
|
|
37
37
|
var FNid_WHT_logo_rgb = __webpack_require__(802);
|
|
38
38
|
var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo_rgb);
|
|
39
|
+
// EXTERNAL MODULE: ./src/assets/FNid_BLK_logo_rgb.svg
|
|
40
|
+
var FNid_BLK_logo_rgb = __webpack_require__(107);
|
|
41
|
+
var FNid_BLK_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_BLK_logo_rgb);
|
|
39
42
|
;// CONCATENATED MODULE: ./src/components/login-passwordless/index.js
|
|
40
43
|
/**
|
|
41
44
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -55,6 +58,7 @@ var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo
|
|
|
55
58
|
|
|
56
59
|
|
|
57
60
|
|
|
61
|
+
|
|
58
62
|
const PasswordlessLoginComponent = ({
|
|
59
63
|
email,
|
|
60
64
|
codeLength,
|
|
@@ -63,7 +67,9 @@ const PasswordlessLoginComponent = ({
|
|
|
63
67
|
codeError,
|
|
64
68
|
goToLogin,
|
|
65
69
|
getLoginCode,
|
|
66
|
-
getPasswordlessCode
|
|
70
|
+
getPasswordlessCode,
|
|
71
|
+
logoLight,
|
|
72
|
+
logoDark
|
|
67
73
|
}) => {
|
|
68
74
|
const [otpCode, setOtpCode] = (0,external_react_.useState)('');
|
|
69
75
|
const [otpError, setOtpError] = (0,external_react_.useState)(false);
|
|
@@ -91,9 +97,13 @@ const PasswordlessLoginComponent = ({
|
|
|
91
97
|
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
92
98
|
className: `${index_module.innerWrapper}`
|
|
93
99
|
}, /*#__PURE__*/external_react_default().createElement("img", {
|
|
94
|
-
src: (
|
|
100
|
+
src: logoDark || (FNid_BLK_logo_rgb_default()),
|
|
101
|
+
alt: "FNid",
|
|
102
|
+
className: `${index_module.logo} ${index_module.logoDark}`
|
|
103
|
+
}), /*#__PURE__*/external_react_default().createElement("img", {
|
|
104
|
+
src: logoLight || (FNid_WHT_logo_rgb_default()),
|
|
95
105
|
alt: "FNid",
|
|
96
|
-
className: index_module.logo
|
|
106
|
+
className: `${index_module.logo} ${index_module.logoLight}`
|
|
97
107
|
}), /*#__PURE__*/external_react_default().createElement("span", null, "We sent your single-use login code to ", /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
98
108
|
"data-testid": "email"
|
|
99
109
|
}, email), /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
@@ -300,6 +310,13 @@ LoginComponent.defaultProps = {
|
|
|
300
310
|
|
|
301
311
|
/***/ }),
|
|
302
312
|
|
|
313
|
+
/***/ 107:
|
|
314
|
+
/***/ ((module) => {
|
|
315
|
+
|
|
316
|
+
module.exports = "data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%23FFFFFF;%7d .st1%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath class='st0' d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7 l-25.6-80.85l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49 l25.72,81.24l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st1' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st1' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st1' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e"
|
|
317
|
+
|
|
318
|
+
/***/ }),
|
|
319
|
+
|
|
303
320
|
/***/ 802:
|
|
304
321
|
/***/ ((module) => {
|
|
305
322
|
|
|
@@ -480,8 +497,6 @@ class LawPayProvider {
|
|
|
480
497
|
_defineProperty(this, "payTicket", ({
|
|
481
498
|
token = null
|
|
482
499
|
}) => async dispatch => {
|
|
483
|
-
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4, _this$userProfile5, _this$userProfile6;
|
|
484
|
-
|
|
485
500
|
// Pay using affinity lawpay
|
|
486
501
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
487
502
|
let code = err.status;
|
|
@@ -512,12 +527,12 @@ class LawPayProvider {
|
|
|
512
527
|
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
513
528
|
};
|
|
514
529
|
let normalizedEntity = {
|
|
515
|
-
billing_address_1: token ? token.address1 :
|
|
516
|
-
billing_address_2:
|
|
517
|
-
billing_address_zip_code: token ? token.postal_code :
|
|
518
|
-
billing_address_city:
|
|
519
|
-
billing_address_state:
|
|
520
|
-
billing_address_country:
|
|
530
|
+
billing_address_1: token ? token.address1 : this.userProfile?.address1 || '',
|
|
531
|
+
billing_address_2: this.userProfile?.address2 || '',
|
|
532
|
+
billing_address_zip_code: token ? token.postal_code : this.userProfile?.postal_code || '',
|
|
533
|
+
billing_address_city: this.userProfile?.locality || '',
|
|
534
|
+
billing_address_state: this.userProfile?.region || '',
|
|
535
|
+
billing_address_country: this.userProfile?.country || ''
|
|
521
536
|
};
|
|
522
537
|
|
|
523
538
|
if (token) {
|
|
@@ -569,8 +584,6 @@ class StripeProvider {
|
|
|
569
584
|
stripe = null,
|
|
570
585
|
zipCode = null
|
|
571
586
|
}) => async dispatch => {
|
|
572
|
-
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4, _this$userProfile5;
|
|
573
|
-
|
|
574
587
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
575
588
|
let code = err.status;
|
|
576
589
|
|
|
@@ -600,12 +613,12 @@ class StripeProvider {
|
|
|
600
613
|
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
601
614
|
};
|
|
602
615
|
let normalizedEntity = {
|
|
603
|
-
billing_address_1:
|
|
604
|
-
billing_address_2:
|
|
616
|
+
billing_address_1: this.userProfile?.address1 || '',
|
|
617
|
+
billing_address_2: this.userProfile?.address2 || '',
|
|
605
618
|
billing_address_zip_code: zipCode,
|
|
606
|
-
billing_address_city:
|
|
607
|
-
billing_address_state:
|
|
608
|
-
billing_address_country:
|
|
619
|
+
billing_address_city: this.userProfile?.locality || '',
|
|
620
|
+
billing_address_state: this.userProfile?.region || '',
|
|
621
|
+
billing_address_country: this.userProfile?.country || ''
|
|
609
622
|
};
|
|
610
623
|
dispatch(startWidgetLoading());
|
|
611
624
|
|
|
@@ -1147,7 +1160,6 @@ const DEFAULT_STATE = {
|
|
|
1147
1160
|
settings: {
|
|
1148
1161
|
apiBaseUrl: null,
|
|
1149
1162
|
summitId: null,
|
|
1150
|
-
marketingData: null,
|
|
1151
1163
|
userProfile: null
|
|
1152
1164
|
},
|
|
1153
1165
|
nowUtc: localNowUtc
|
|
@@ -1190,17 +1202,10 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
|
1190
1202
|
|
|
1191
1203
|
case LOAD_INITIAL_VARS:
|
|
1192
1204
|
const {
|
|
1193
|
-
marketingData,
|
|
1194
1205
|
summitData,
|
|
1195
1206
|
apiBaseUrl,
|
|
1196
1207
|
profileData
|
|
1197
1208
|
} = payload;
|
|
1198
|
-
Object.keys(marketingData).forEach(setting => {
|
|
1199
|
-
if (getComputedStyle(document.documentElement).getPropertyValue(`--${setting}`)) {
|
|
1200
|
-
document.documentElement.style.setProperty(`--${setting}`, marketingData[setting]);
|
|
1201
|
-
document.documentElement.style.setProperty(`--${setting}50`, `${marketingData[setting]}50`);
|
|
1202
|
-
}
|
|
1203
|
-
});
|
|
1204
1209
|
return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
|
|
1205
1210
|
reservation: null,
|
|
1206
1211
|
checkout: null,
|
|
@@ -1210,7 +1215,6 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
|
1210
1215
|
invitation: null,
|
|
1211
1216
|
passwordless: reducer_objectSpread({}, DEFAULT_STATE.passwordless),
|
|
1212
1217
|
settings: reducer_objectSpread(reducer_objectSpread({}, DEFAULT_STATE.settings), {}, {
|
|
1213
|
-
marketingData: marketingData,
|
|
1214
1218
|
summitId: summitData.id,
|
|
1215
1219
|
userProfile: profileData,
|
|
1216
1220
|
apiBaseUrl: apiBaseUrl
|
|
@@ -1431,6 +1435,26 @@ const methods_namespaceObject = require("openstack-uicore-foundation/lib/utils/m
|
|
|
1431
1435
|
;// CONCATENATED MODULE: ./src/components/lawpay-form/index.module.scss
|
|
1432
1436
|
// extracted by mini-css-extract-plugin
|
|
1433
1437
|
/* harmony default export */ const lawpay_form_index_module = ({"form":"form___zXb7s","fieldWrapper":"fieldWrapper___G4Wqw","inputWrapper":"inputWrapper___Yz5zB","fieldRow":"fieldRow___NfZdJ","addressField":"addressField___vmAQh","lawpayWrapper":"lawpayWrapper___hpUBf","dateWrapper":"dateWrapper___XDfqs","dropdown":"dropdown___l3_bk","fieldError":"fieldError___Igq3U"});
|
|
1438
|
+
;// CONCATENATED MODULE: ./src/utils/constants.js
|
|
1439
|
+
/**
|
|
1440
|
+
* Copyright 2022 OpenStack Foundation
|
|
1441
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1442
|
+
* you may not use this file except in compliance with the License.
|
|
1443
|
+
* You may obtain a copy of the License at
|
|
1444
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1445
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1446
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1447
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1448
|
+
* See the License for the specific language governing permissions and
|
|
1449
|
+
* limitations under the License.
|
|
1450
|
+
**/
|
|
1451
|
+
const AUTH_ERROR_MESSAGE = 'Missing Auth info';
|
|
1452
|
+
const AUTH_ERROR_MISSING_REFRESH_TOKEN = "missing Refresh Token";
|
|
1453
|
+
const AUTH_ERROR_REQUEST_FAILED = 'Request failed';
|
|
1454
|
+
const VirtualAccessLevel = 'VIRTUAL';
|
|
1455
|
+
const DefaultBGColor = '#000000';
|
|
1456
|
+
const DefaultTextColor = '#FFFFFF';
|
|
1457
|
+
const DefaultHintColor = 'rgb(58, 63, 65)';
|
|
1434
1458
|
;// CONCATENATED MODULE: ./src/components/lawpay-form/index.js
|
|
1435
1459
|
function lawpay_form_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; }
|
|
1436
1460
|
|
|
@@ -1461,7 +1485,6 @@ const LawPayForm = ({
|
|
|
1461
1485
|
reservation,
|
|
1462
1486
|
payTicket,
|
|
1463
1487
|
userProfile,
|
|
1464
|
-
marketingData,
|
|
1465
1488
|
providerKey,
|
|
1466
1489
|
provider,
|
|
1467
1490
|
timestamp
|
|
@@ -1481,12 +1504,21 @@ const LawPayForm = ({
|
|
|
1481
1504
|
cvv: '',
|
|
1482
1505
|
address1: ''
|
|
1483
1506
|
});
|
|
1507
|
+
let textColor = DefaultTextColor;
|
|
1508
|
+
let hintColor = DefaultHintColor;
|
|
1509
|
+
|
|
1510
|
+
if (document && document.documentElement) {
|
|
1511
|
+
const documentStyles = getComputedStyle(document.documentElement);
|
|
1512
|
+
textColor = documentStyles.getPropertyValue('--color_input_text_color');
|
|
1513
|
+
hintColor = documentStyles.getPropertyValue('--color_text_input_hints');
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1484
1516
|
const style = {
|
|
1485
|
-
color:
|
|
1517
|
+
color: textColor,
|
|
1486
1518
|
"font-size": '16px',
|
|
1487
1519
|
"font-weight": 'inherit',
|
|
1488
1520
|
'::placeholder': {
|
|
1489
|
-
color:
|
|
1521
|
+
color: hintColor
|
|
1490
1522
|
}
|
|
1491
1523
|
};
|
|
1492
1524
|
const hostedFieldsConfiguration = {
|
|
@@ -1731,13 +1763,7 @@ const LawPayForm = ({
|
|
|
1731
1763
|
}, lawPayErrors.address1)));
|
|
1732
1764
|
};
|
|
1733
1765
|
|
|
1734
|
-
const
|
|
1735
|
-
registrationLiteState
|
|
1736
|
-
}) => ({
|
|
1737
|
-
marketingData: registrationLiteState.settings.marketingData
|
|
1738
|
-
});
|
|
1739
|
-
|
|
1740
|
-
/* harmony default export */ const lawpay_form = ((0,external_react_redux_namespaceObject.connect)(mapStateToProps, null)(LawPayForm));
|
|
1766
|
+
/* harmony default export */ const lawpay_form = (LawPayForm);
|
|
1741
1767
|
;// CONCATENATED MODULE: external "@stripe/stripe-js"
|
|
1742
1768
|
const stripe_js_namespaceObject = require("@stripe/stripe-js");
|
|
1743
1769
|
;// CONCATENATED MODULE: external "@stripe/react-stripe-js"
|
|
@@ -1815,7 +1841,6 @@ const StripeForm = ({
|
|
|
1815
1841
|
reservation,
|
|
1816
1842
|
payTicket,
|
|
1817
1843
|
userProfile,
|
|
1818
|
-
marketingData,
|
|
1819
1844
|
stripeOptions,
|
|
1820
1845
|
provider
|
|
1821
1846
|
}) => {
|
|
@@ -1829,16 +1854,26 @@ const StripeForm = ({
|
|
|
1829
1854
|
errors
|
|
1830
1855
|
}
|
|
1831
1856
|
} = (0,external_react_hook_form_namespaceObject.useForm)();
|
|
1832
|
-
|
|
1857
|
+
let bgColor = DefaultBGColor;
|
|
1858
|
+
let textColor = DefaultTextColor;
|
|
1859
|
+
let hintColor = DefaultHintColor;
|
|
1860
|
+
|
|
1861
|
+
if (document && document.documentElement) {
|
|
1862
|
+
const documentStyles = getComputedStyle(document.documentElement);
|
|
1863
|
+
bgColor = documentStyles.getPropertyValue('--color_input_background_color');
|
|
1864
|
+
textColor = documentStyles.getPropertyValue('--color_input_text_color');
|
|
1865
|
+
hintColor = documentStyles.getPropertyValue('--color_text_input_hints');
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1833
1868
|
const stripeStyle = merge_default()({}, {
|
|
1834
1869
|
base: {
|
|
1835
1870
|
// Add your base input styles here. For example: #d4e5f4
|
|
1836
|
-
color:
|
|
1871
|
+
color: textColor,
|
|
1837
1872
|
fontSize: '16px',
|
|
1838
1873
|
//fontFamily: 'inherit',
|
|
1839
|
-
backgroundColor:
|
|
1874
|
+
backgroundColor: bgColor,
|
|
1840
1875
|
'::placeholder': {
|
|
1841
|
-
color:
|
|
1876
|
+
color: hintColor
|
|
1842
1877
|
}
|
|
1843
1878
|
},
|
|
1844
1879
|
invalid: {
|
|
@@ -1847,7 +1882,7 @@ const StripeForm = ({
|
|
|
1847
1882
|
color: '#3486cd'
|
|
1848
1883
|
}
|
|
1849
1884
|
}
|
|
1850
|
-
}, stripeOptions
|
|
1885
|
+
}, stripeOptions?.style);
|
|
1851
1886
|
|
|
1852
1887
|
const onSubmit = async data => {
|
|
1853
1888
|
setStripeErrors({});
|
|
@@ -1945,13 +1980,7 @@ const StripeForm = ({
|
|
|
1945
1980
|
}, "This field is required.")));
|
|
1946
1981
|
};
|
|
1947
1982
|
|
|
1948
|
-
const
|
|
1949
|
-
registrationLiteState
|
|
1950
|
-
}) => ({
|
|
1951
|
-
marketingData: registrationLiteState.settings.marketingData
|
|
1952
|
-
});
|
|
1953
|
-
|
|
1954
|
-
/* harmony default export */ const stripe_form = ((0,external_react_redux_namespaceObject.connect)(stripe_form_mapStateToProps, null)(StripeForm));
|
|
1983
|
+
/* harmony default export */ const stripe_form = (StripeForm);
|
|
1955
1984
|
;// CONCATENATED MODULE: ./src/components/stripe-component/index.js
|
|
1956
1985
|
/**
|
|
1957
1986
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -1970,7 +1999,6 @@ const stripe_form_mapStateToProps = ({
|
|
|
1970
1999
|
|
|
1971
2000
|
|
|
1972
2001
|
|
|
1973
|
-
|
|
1974
2002
|
const stripe_component_StripeProvider = ({
|
|
1975
2003
|
userProfile,
|
|
1976
2004
|
reservation,
|
|
@@ -1981,7 +2009,7 @@ const stripe_component_StripeProvider = ({
|
|
|
1981
2009
|
}) => {
|
|
1982
2010
|
const stripePromise = (0,external_react_.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(providerKey), [providerKey]);
|
|
1983
2011
|
const options = {
|
|
1984
|
-
fonts: stripeOptions
|
|
2012
|
+
fonts: stripeOptions?.fonts
|
|
1985
2013
|
};
|
|
1986
2014
|
return /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.Elements, {
|
|
1987
2015
|
options: options,
|
|
@@ -2098,7 +2126,7 @@ const formatErrorMessage = string => {
|
|
|
2098
2126
|
};
|
|
2099
2127
|
;// CONCATENATED MODULE: ./src/components/personal-information/index.module.scss
|
|
2100
2128
|
// extracted by mini-css-extract-plugin
|
|
2101
|
-
/* harmony default export */ const personal_information_index_module = ({"title":"title___ECoNz","form":"form___lDFka","fieldWrapper":"fieldWrapper___Mi_nL","inputWrapper":"inputWrapper___PEQFR","readOnly":"readOnly___WRazF","fieldError":"fieldError___ksJVe","
|
|
2129
|
+
/* harmony default export */ const personal_information_index_module = ({"title":"title___ECoNz","form":"form___lDFka","fieldWrapper":"fieldWrapper___Mi_nL","inputWrapper":"inputWrapper___PEQFR","readOnly":"readOnly___WRazF","fieldError":"fieldError___ksJVe","moreInfo":"moreInfo___cQYdZ","moreInfoTooltip":"moreInfoTooltip___lslgT","ticketQuantityNotice":"ticketQuantityNotice___L6gis","formErrors":"formErrors___dQQMe"});
|
|
2102
2130
|
;// CONCATENATED MODULE: ./src/components/personal-information/index.js
|
|
2103
2131
|
function personal_information_extends() { personal_information_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return personal_information_extends.apply(this, arguments); }
|
|
2104
2132
|
|
|
@@ -2145,8 +2173,6 @@ const PersonalInfoComponent = ({
|
|
|
2145
2173
|
companyInputPlaceholder,
|
|
2146
2174
|
companyDDLPlaceholder
|
|
2147
2175
|
}) => {
|
|
2148
|
-
var _errors$email, _errors$email2;
|
|
2149
|
-
|
|
2150
2176
|
const [personalInfo, setPersonalInfo] = (0,external_react_.useState)({
|
|
2151
2177
|
firstName: userProfile.given_name || (invitation ? invitation.first_name : ''),
|
|
2152
2178
|
lastName: userProfile.family_name || (invitation ? invitation.last_name : ''),
|
|
@@ -2286,10 +2312,10 @@ const PersonalInfoComponent = ({
|
|
|
2286
2312
|
pattern: /^\S+@\S+$/i
|
|
2287
2313
|
}), {
|
|
2288
2314
|
"data-testid": "email"
|
|
2289
|
-
}))),
|
|
2315
|
+
}))), errors.email?.type === 'required' && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2290
2316
|
className: personal_information_index_module.fieldError,
|
|
2291
2317
|
"data-testid": "email-error-required"
|
|
2292
|
-
}, "This field is required."),
|
|
2318
|
+
}, "This field is required."), errors.email?.type === 'pattern' && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2293
2319
|
className: personal_information_index_module.fieldError,
|
|
2294
2320
|
"data-testid": "email-error-invalid"
|
|
2295
2321
|
}, "The email is invalid.")), showCompanyInput && /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -2306,7 +2332,8 @@ const PersonalInfoComponent = ({
|
|
|
2306
2332
|
onError: handleCompanyError,
|
|
2307
2333
|
value: personalInfo.company,
|
|
2308
2334
|
inputPlaceholder: companyInputPlaceholder,
|
|
2309
|
-
DDLPlaceholder: companyDDLPlaceholder
|
|
2335
|
+
DDLPlaceholder: companyDDLPlaceholder,
|
|
2336
|
+
isClearable: true
|
|
2310
2337
|
}), companyError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2311
2338
|
className: personal_information_index_module.fieldError,
|
|
2312
2339
|
"data-testid": "company-error"
|
|
@@ -2498,9 +2525,7 @@ const TicketTypeComponent = ({
|
|
|
2498
2525
|
}
|
|
2499
2526
|
});
|
|
2500
2527
|
(0,external_react_.useEffect)(() => {
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
if (reservation && ((_reservation$tickets = reservation.tickets) === null || _reservation$tickets === void 0 ? void 0 : _reservation$tickets.length) > 0) {
|
|
2528
|
+
if (reservation && reservation.tickets?.length > 0) {
|
|
2504
2529
|
setTicket(ticketTypes.find(t => t.id === reservation.tickets[0].ticket_type_id));
|
|
2505
2530
|
}
|
|
2506
2531
|
}, []);
|
|
@@ -2530,7 +2555,7 @@ const TicketTypeComponent = ({
|
|
|
2530
2555
|
className: ticket_type_index_module.summary
|
|
2531
2556
|
}, /*#__PURE__*/external_react_default().createElement("span", null, ticket && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, `${ticket.name} (${quantity}): ${formatCurrency(ticket.cost * quantity, {
|
|
2532
2557
|
currency: ticket.currency
|
|
2533
|
-
})} ${ticket.currency}`, !isActive &&
|
|
2558
|
+
})} ${ticket.currency}`, !isActive && reservation?.discount_amount > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2534
2559
|
className: ticket_type_index_module.promoCode
|
|
2535
2560
|
}, "Promo code\xA0", /*#__PURE__*/external_react_default().createElement("abbr", {
|
|
2536
2561
|
title: reservation.promo_code
|
|
@@ -2540,7 +2565,7 @@ const TicketTypeComponent = ({
|
|
|
2540
2565
|
currency: ticket.currency
|
|
2541
2566
|
})} ${ticket.currency}`)), !isActive && reservation && /*#__PURE__*/external_react_default().createElement("span", {
|
|
2542
2567
|
className: ticket_type_index_module.promo
|
|
2543
|
-
}, "Subtotal: ", `${ticket
|
|
2568
|
+
}, "Subtotal: ", `${ticket?.currency_symbol} ${((reservation?.raw_amount_in_cents - reservation?.discount_amount_in_cents) / 100).toFixed(2)} ${ticket?.currency}`), !isActive && reservation?.taxes_amount > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, reservation?.applied_taxes.map(tax => {
|
|
2544
2569
|
return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, {
|
|
2545
2570
|
key: tax.id
|
|
2546
2571
|
}, /*#__PURE__*/external_react_default().createElement("span", {
|
|
@@ -2662,11 +2687,11 @@ const ButtonBarComponent = ({
|
|
|
2662
2687
|
disabled: !ticketType,
|
|
2663
2688
|
className: `${button_bar_index_module.button} button`,
|
|
2664
2689
|
onClick: () => changeStep(step + 1)
|
|
2665
|
-
}, nextButtonText), step === 1 &&
|
|
2690
|
+
}, nextButtonText), step === 1 && ticketType?.cost === 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
2666
2691
|
className: `${button_bar_index_module.button} button`,
|
|
2667
2692
|
type: "submit",
|
|
2668
2693
|
form: "personal-info-form"
|
|
2669
|
-
}, "Get Ticket"), step === 1 &&
|
|
2694
|
+
}, "Get Ticket"), step === 1 && ticketType?.cost > 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
2670
2695
|
className: `${button_bar_index_module.button} button`,
|
|
2671
2696
|
type: "submit",
|
|
2672
2697
|
form: "personal-info-form"
|
|
@@ -2710,10 +2735,8 @@ const getCurrentProvider = summit => {
|
|
|
2710
2735
|
};
|
|
2711
2736
|
};
|
|
2712
2737
|
const ticketHasAccessLevel = (ticket, accessLevel) => {
|
|
2713
|
-
var _ticket$badge, _ticket$badge$type;
|
|
2714
|
-
|
|
2715
2738
|
if (!ticket) return false;
|
|
2716
|
-
return
|
|
2739
|
+
return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);
|
|
2717
2740
|
};
|
|
2718
2741
|
const getCurrentUserLanguage = () => {
|
|
2719
2742
|
let language = 'en';
|
|
@@ -2724,23 +2747,6 @@ const getCurrentUserLanguage = () => {
|
|
|
2724
2747
|
|
|
2725
2748
|
return language;
|
|
2726
2749
|
};
|
|
2727
|
-
;// CONCATENATED MODULE: ./src/utils/constants.js
|
|
2728
|
-
/**
|
|
2729
|
-
* Copyright 2022 OpenStack Foundation
|
|
2730
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2731
|
-
* you may not use this file except in compliance with the License.
|
|
2732
|
-
* You may obtain a copy of the License at
|
|
2733
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2734
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2735
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2736
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2737
|
-
* See the License for the specific language governing permissions and
|
|
2738
|
-
* limitations under the License.
|
|
2739
|
-
**/
|
|
2740
|
-
const AUTH_ERROR_MESSAGE = 'Missing Auth info';
|
|
2741
|
-
const AUTH_ERROR_MISSING_REFRESH_TOKEN = "missing Refresh Token";
|
|
2742
|
-
const AUTH_ERROR_REQUEST_FAILED = 'Request failed';
|
|
2743
|
-
const VirtualAccessLevel = 'VIRTUAL';
|
|
2744
2750
|
;// CONCATENATED MODULE: external "i18n-react"
|
|
2745
2751
|
const external_i18n_react_namespaceObject = require("i18n-react");
|
|
2746
2752
|
var external_i18n_react_default = /*#__PURE__*/__webpack_require__.n(external_i18n_react_namespaceObject);
|
|
@@ -2812,11 +2818,7 @@ const PurchaseComplete = _ref2 => {
|
|
|
2812
2818
|
onPurchaseComplete(checkout);
|
|
2813
2819
|
}, []);
|
|
2814
2820
|
const isActive = (0,external_react_.useMemo)(() => summit.start_date <= nowUtc && summit.end_date >= nowUtc, [summit, nowUtc]);
|
|
2815
|
-
const currentUserTicket = (0,external_react_.useMemo)(() => checkout
|
|
2816
|
-
var _t$owner;
|
|
2817
|
-
|
|
2818
|
-
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);
|
|
2819
|
-
}), [user]);
|
|
2821
|
+
const currentUserTicket = (0,external_react_.useMemo)(() => checkout?.tickets.find(t => t?.owner?.email == user?.email), [user]);
|
|
2820
2822
|
const requireExtraQuestions = (0,external_react_.useMemo)(() => completedExtraQuestions(checkout), [user]);
|
|
2821
2823
|
|
|
2822
2824
|
const _hasVirtualAccessLevel = hasVirtualAccessLevel || currentUserTicket && ticketHasAccessLevel(currentUserTicket, VirtualAccessLevel);
|
|
@@ -2978,7 +2980,7 @@ const TicketTaxesError = ({
|
|
|
2978
2980
|
|
|
2979
2981
|
/* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
|
|
2980
2982
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
2981
|
-
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", "companyInputPlaceholder", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData", "closeWidget", "hasVirtualAccessLevel"];
|
|
2983
|
+
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", "companyInputPlaceholder", "companyDDLPlaceholder", "nowUtc", "updateClock", "completedExtraQuestions", "loadProfileData", "closeWidget", "hasVirtualAccessLevel", "logoLight", "logoDark"];
|
|
2982
2984
|
|
|
2983
2985
|
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; }
|
|
2984
2986
|
|
|
@@ -3042,8 +3044,6 @@ try {
|
|
|
3042
3044
|
}
|
|
3043
3045
|
|
|
3044
3046
|
const RegistrationLite = _ref => {
|
|
3045
|
-
var _formValues$ticketTyp, _formValues$ticketTyp2;
|
|
3046
|
-
|
|
3047
3047
|
let {
|
|
3048
3048
|
loadSession,
|
|
3049
3049
|
setMarketingSettings,
|
|
@@ -3102,7 +3102,9 @@ const RegistrationLite = _ref => {
|
|
|
3102
3102
|
completedExtraQuestions,
|
|
3103
3103
|
loadProfileData,
|
|
3104
3104
|
closeWidget,
|
|
3105
|
-
hasVirtualAccessLevel
|
|
3105
|
+
hasVirtualAccessLevel,
|
|
3106
|
+
logoLight,
|
|
3107
|
+
logoDark
|
|
3106
3108
|
} = _ref,
|
|
3107
3109
|
rest = registration_lite_objectWithoutProperties(_ref, registration_lite_excluded);
|
|
3108
3110
|
|
|
@@ -3153,10 +3155,8 @@ const RegistrationLite = _ref => {
|
|
|
3153
3155
|
}
|
|
3154
3156
|
}, [summitData, profileData]);
|
|
3155
3157
|
(0,external_react_.useEffect)(() => {
|
|
3156
|
-
var _registrationForm$val;
|
|
3157
|
-
|
|
3158
3158
|
// check if there's personal information data and no ticket data to reset widget
|
|
3159
|
-
if (step > 0 && !
|
|
3159
|
+
if (step > 0 && !registrationForm.values?.ticketType) {
|
|
3160
3160
|
changeStep(0);
|
|
3161
3161
|
}
|
|
3162
3162
|
}, [registrationForm.values, step]);
|
|
@@ -3171,8 +3171,8 @@ const RegistrationLite = _ref => {
|
|
|
3171
3171
|
bounce: 0
|
|
3172
3172
|
}, external_react_spring_namespaceObject.config.stiff),
|
|
3173
3173
|
to: {
|
|
3174
|
-
opacity:
|
|
3175
|
-
height:
|
|
3174
|
+
opacity: formValues?.ticketType?.cost === 0 ? 0 : 1,
|
|
3175
|
+
height: formValues?.ticketType?.cost === 0 ? 0 : height
|
|
3176
3176
|
}
|
|
3177
3177
|
});
|
|
3178
3178
|
|
|
@@ -3232,7 +3232,7 @@ const RegistrationLite = _ref => {
|
|
|
3232
3232
|
onClick: handleCloseClick
|
|
3233
3233
|
})), ticketTaxesError && profileData && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3234
3234
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3235
|
-
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData
|
|
3235
|
+
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData?.id)
|
|
3236
3236
|
}), !ticketTaxesError && profileData && allowedTicketTypes.length === 0 && requestedTicketTypes && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3237
3237
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3238
3238
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3253,7 +3253,9 @@ const RegistrationLite = _ref => {
|
|
|
3253
3253
|
codeError: passwordlessCodeError,
|
|
3254
3254
|
goToLogin: goToLogin,
|
|
3255
3255
|
getLoginCode: getLoginCode,
|
|
3256
|
-
getPasswordlessCode: getPasswordlessCode
|
|
3256
|
+
getPasswordlessCode: getPasswordlessCode,
|
|
3257
|
+
logoLight: logoLight,
|
|
3258
|
+
logoDark: logoDark
|
|
3257
3259
|
}), profileData && step !== 3 && allowedTicketTypes.length > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, ownedTickets.length > 0 && /*#__PURE__*/external_react_default().createElement(ticket_owned, {
|
|
3258
3260
|
ownedTickets: ownedTickets
|
|
3259
3261
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
@@ -3271,16 +3273,14 @@ const RegistrationLite = _ref => {
|
|
|
3271
3273
|
invitation: invitation,
|
|
3272
3274
|
summitId: summitData.id,
|
|
3273
3275
|
changeForm: personalInformation => {
|
|
3274
|
-
var _registrationForm$val2, _registrationForm$val3;
|
|
3275
|
-
|
|
3276
3276
|
setFormValues(registration_lite_objectSpread(registration_lite_objectSpread({}, registrationForm.values), {}, {
|
|
3277
3277
|
personalInformation
|
|
3278
3278
|
}));
|
|
3279
3279
|
reserveTicket({
|
|
3280
3280
|
provider,
|
|
3281
3281
|
personalInformation: personalInformation,
|
|
3282
|
-
ticket:
|
|
3283
|
-
ticketQuantity:
|
|
3282
|
+
ticket: registrationForm.values?.ticketType,
|
|
3283
|
+
ticketQuantity: registrationForm.values?.ticketQuantity
|
|
3284
3284
|
}, {
|
|
3285
3285
|
onError: (err, res) => setFormErrors(res.body.errors)
|
|
3286
3286
|
}).catch(error => {
|
|
@@ -3345,7 +3345,7 @@ const RegistrationLite = _ref => {
|
|
|
3345
3345
|
})))));
|
|
3346
3346
|
};
|
|
3347
3347
|
|
|
3348
|
-
const
|
|
3348
|
+
const mapStateToProps = ({
|
|
3349
3349
|
registrationLiteState
|
|
3350
3350
|
}) => ({
|
|
3351
3351
|
widgetLoading: registrationLiteState.widgetLoading,
|
|
@@ -3397,7 +3397,7 @@ RegistrationLite.propTypes = {
|
|
|
3397
3397
|
orderComplete2ndParagraph: (external_prop_types_default()).string,
|
|
3398
3398
|
orderCompleteButton: (external_prop_types_default()).string
|
|
3399
3399
|
};
|
|
3400
|
-
/* harmony default export */ const registration_lite = ((0,external_react_redux_namespaceObject.connect)(
|
|
3400
|
+
/* harmony default export */ const registration_lite = ((0,external_react_redux_namespaceObject.connect)(mapStateToProps, {
|
|
3401
3401
|
loadSession: loadSession,
|
|
3402
3402
|
changeStep: changeStep,
|
|
3403
3403
|
reserveTicket: reserveTicket,
|