@mxenabled/connect-widget 0.19.0 → 0.19.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.es.js CHANGED
@@ -5087,39 +5087,23 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
5087
5087
  }
5088
5088
  var _baseFindIndex = baseFindIndex$2;
5089
5089
 
5090
- var _trimmedEndIndex;
5091
- var hasRequired_trimmedEndIndex;
5092
-
5093
- function require_trimmedEndIndex () {
5094
- if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
5095
- hasRequired_trimmedEndIndex = 1;
5096
- var reWhitespace = /\s/;
5097
- function trimmedEndIndex(string) {
5098
- var index = string.length;
5099
- while (index-- && reWhitespace.test(string.charAt(index))) {
5100
- }
5101
- return index;
5102
- }
5103
- _trimmedEndIndex = trimmedEndIndex;
5104
- return _trimmedEndIndex;
5090
+ var reWhitespace = /\s/;
5091
+ function trimmedEndIndex$1(string) {
5092
+ var index = string.length;
5093
+ while (index-- && reWhitespace.test(string.charAt(index))) {
5094
+ }
5095
+ return index;
5105
5096
  }
5097
+ var _trimmedEndIndex = trimmedEndIndex$1;
5106
5098
 
5107
- var _baseTrim;
5108
- var hasRequired_baseTrim;
5109
-
5110
- function require_baseTrim () {
5111
- if (hasRequired_baseTrim) return _baseTrim;
5112
- hasRequired_baseTrim = 1;
5113
- var trimmedEndIndex = require_trimmedEndIndex();
5114
- var reTrimStart = /^\s+/;
5115
- function baseTrim(string) {
5116
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
5117
- }
5118
- _baseTrim = baseTrim;
5119
- return _baseTrim;
5099
+ var trimmedEndIndex = _trimmedEndIndex;
5100
+ var reTrimStart = /^\s+/;
5101
+ function baseTrim$1(string) {
5102
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
5120
5103
  }
5104
+ var _baseTrim = baseTrim$1;
5121
5105
 
5122
- var baseTrim = require_baseTrim(), isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
5106
+ var baseTrim = _baseTrim, isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
5123
5107
  var NAN = 0 / 0;
5124
5108
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
5125
5109
  var reIsBinary = /^0b[01]+$/i;
@@ -8573,7 +8557,7 @@ var hasRequiredTrim;
8573
8557
  function requireTrim () {
8574
8558
  if (hasRequiredTrim) return trim_1;
8575
8559
  hasRequiredTrim = 1;
8576
- var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8560
+ var baseToString = _baseToString, baseTrim = _baseTrim, castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8577
8561
  function trim(string, chars, guard) {
8578
8562
  string = toString(string);
8579
8563
  if (string && (guard || chars === void 0)) {
@@ -65342,20 +65326,25 @@ GeneralSupport.propTypes = {
65342
65326
  GeneralSupport.displayName = "GeneralSupport";
65343
65327
 
65344
65328
  const SupportSuccess = React__default.forwardRef((props, supportSuccessRef) => {
65345
- const { email, handleClose } = props;
65329
+ const { email, handleClose, setAriaLiveRegionMessage } = props;
65346
65330
  useAnalyticsPath(...PageviewInfo.CONNECT_SUPPORT_SUCCESS);
65347
65331
  const tokens = useTokens();
65348
65332
  const styles = getStyles$15(tokens);
65349
65333
  const getNextDelay = getDelay();
65334
+ const requestReceived = __(
65335
+ "Thanks! Your request has been received. A reply will be sent to %1. Be sure to check your junk mail or spam folder, as replies sometimes end up there.",
65336
+ email
65337
+ );
65338
+ const workingHours = __("Our hours are Monday to Friday, 9 a.m. – 5 p.m. MST.");
65350
65339
  const onClose = () => fadeOut(supportSuccessRef.current, "up", 300).then(() => handleClose());
65340
+ useEffect(() => {
65341
+ setAriaLiveRegionMessage(`${requestReceived} ${workingHours}`);
65342
+ }, []);
65351
65343
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: supportSuccessRef, children: [
65352
65344
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(x, { style: styles.title, truncate: false, variant: "H2", children: __("Request received") }) }),
65353
65345
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
65354
- /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", style: styles.firstParagraph, truncate: false, variant: "Paragraph", children: __(
65355
- "Thanks! Your request has been received. A reply will be sent to %1. Be sure to check your junk mail or spam folder, as replies sometimes end up there.",
65356
- email
65357
- ) }),
65358
- /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", truncate: false, variant: "Paragraph", children: __("Our hours are Monday to Friday, 9 a.m. – 5 p.m. MST.") }),
65346
+ /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", style: styles.firstParagraph, truncate: false, variant: "Paragraph", children: requestReceived }),
65347
+ /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", truncate: false, variant: "Paragraph", children: workingHours }),
65359
65348
  /* @__PURE__ */ jsxRuntimeExports.jsx(
65360
65349
  Button$2,
65361
65350
  {
@@ -65387,7 +65376,8 @@ const getStyles$15 = (tokens) => ({
65387
65376
  });
65388
65377
  SupportSuccess.propTypes = {
65389
65378
  email: PropTypes$1.string.isRequired,
65390
- handleClose: PropTypes$1.func.isRequired
65379
+ handleClose: PropTypes$1.func.isRequired,
65380
+ setAriaLiveRegionMessage: PropTypes$1.func.isRequired
65391
65381
  };
65392
65382
  SupportSuccess.displayName = "SupportSuccess";
65393
65383
 
@@ -65401,6 +65391,7 @@ const Support = React__default.forwardRef((props, supportNavRef) => {
65401
65391
  const { loadToView, onClose } = props;
65402
65392
  const [currentView, setCurrentView] = useState(loadToView);
65403
65393
  const [email, setEmail] = useState("");
65394
+ const [ariaLiveRegionMessage, setAriaLiveRegionMessage] = useState("");
65404
65395
  const user = useSelector((state) => state.profiles.user);
65405
65396
  const menuRef = useRef(null);
65406
65397
  const requestInstitutionRef = useRef(null);
@@ -65432,42 +65423,46 @@ const Support = React__default.forwardRef((props, supportNavRef) => {
65432
65423
  setEmail(email2);
65433
65424
  setCurrentView(VIEWS$2.SUCCESS);
65434
65425
  };
65435
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.container, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.content, children: [
65436
- currentView === VIEWS$2.MENU && /* @__PURE__ */ jsxRuntimeExports.jsx(
65437
- SupportMenu,
65438
- {
65439
- ref: menuRef,
65440
- selectGeneralSupport: () => setCurrentView(VIEWS$2.GENERAL_SUPPORT),
65441
- selectRequestInstitution: () => setCurrentView(VIEWS$2.REQ_INSTITUTION)
65442
- }
65443
- ),
65444
- currentView === VIEWS$2.REQ_INSTITUTION && /* @__PURE__ */ jsxRuntimeExports.jsx(
65445
- RequestInstitution,
65446
- {
65447
- handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(requestInstitutionRef) : setCurrentView(VIEWS$2.MENU),
65448
- handleTicketSuccess,
65449
- ref: requestInstitutionRef,
65450
- user
65451
- }
65452
- ),
65453
- currentView === VIEWS$2.GENERAL_SUPPORT && /* @__PURE__ */ jsxRuntimeExports.jsx(
65454
- GeneralSupport,
65455
- {
65456
- handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(generalSupportRef) : setCurrentView(VIEWS$2.MENU),
65457
- handleTicketSuccess,
65458
- ref: generalSupportRef,
65459
- user
65460
- }
65461
- ),
65462
- currentView === VIEWS$2.SUCCESS && /* @__PURE__ */ jsxRuntimeExports.jsx(
65463
- SupportSuccess,
65464
- {
65465
- email,
65466
- handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(supportSuccessRef) : setCurrentView(VIEWS$2.MENU),
65467
- ref: supportSuccessRef
65468
- }
65469
- )
65470
- ] }) });
65426
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.container, children: [
65427
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.content, children: [
65428
+ currentView === VIEWS$2.MENU && /* @__PURE__ */ jsxRuntimeExports.jsx(
65429
+ SupportMenu,
65430
+ {
65431
+ ref: menuRef,
65432
+ selectGeneralSupport: () => setCurrentView(VIEWS$2.GENERAL_SUPPORT),
65433
+ selectRequestInstitution: () => setCurrentView(VIEWS$2.REQ_INSTITUTION)
65434
+ }
65435
+ ),
65436
+ currentView === VIEWS$2.REQ_INSTITUTION && /* @__PURE__ */ jsxRuntimeExports.jsx(
65437
+ RequestInstitution,
65438
+ {
65439
+ handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(requestInstitutionRef) : setCurrentView(VIEWS$2.MENU),
65440
+ handleTicketSuccess,
65441
+ ref: requestInstitutionRef,
65442
+ user
65443
+ }
65444
+ ),
65445
+ currentView === VIEWS$2.GENERAL_SUPPORT && /* @__PURE__ */ jsxRuntimeExports.jsx(
65446
+ GeneralSupport,
65447
+ {
65448
+ handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(generalSupportRef) : setCurrentView(VIEWS$2.MENU),
65449
+ handleTicketSuccess,
65450
+ ref: generalSupportRef,
65451
+ user
65452
+ }
65453
+ ),
65454
+ currentView === VIEWS$2.SUCCESS && /* @__PURE__ */ jsxRuntimeExports.jsx(
65455
+ SupportSuccess,
65456
+ {
65457
+ email,
65458
+ handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(supportSuccessRef) : setCurrentView(VIEWS$2.MENU),
65459
+ ref: supportSuccessRef,
65460
+ setAriaLiveRegionMessage
65461
+ }
65462
+ )
65463
+ ] }),
65464
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AriaLive, { level: "assertive", message: ariaLiveRegionMessage })
65465
+ ] });
65471
65466
  });
65472
65467
  const getStyles$14 = (tokens) => ({
65473
65468
  container: {
@@ -73859,6 +73854,7 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
73859
73854
  label: schema.firstName.label,
73860
73855
  name: "firstName",
73861
73856
  onChange: handleTextInputChange,
73857
+ required: true,
73862
73858
  value: values.firstName
73863
73859
  }
73864
73860
  ) }),
@@ -73872,10 +73868,11 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
73872
73868
  label: schema.lastName.label,
73873
73869
  name: "lastName",
73874
73870
  onChange: handleTextInputChange,
73871
+ required: true,
73875
73872
  value: values.lastName
73876
73873
  }
73877
73874
  ) }),
73878
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.inputStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73875
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73879
73876
  ProtectedTextField,
73880
73877
  {
73881
73878
  error: !!errors.email,
@@ -73885,10 +73882,16 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
73885
73882
  label: schema.email.label,
73886
73883
  name: "email",
73887
73884
  onChange: handleTextInputChange,
73885
+ required: true,
73888
73886
  value: values.email
73889
73887
  }
73890
73888
  ) })
73891
73889
  ] }),
73890
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 16, marginBottom: 32 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { color: "#666", fontSize: 13 }, children: [
73891
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 13 }, children: "*" }),
73892
+ " ",
73893
+ __("Required")
73894
+ ] }) }),
73892
73895
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73893
73896
  Button$2,
73894
73897
  {
@@ -80741,6 +80744,16 @@ const connectThemeOverrides = (palette) => ({
80741
80744
  }
80742
80745
  }
80743
80746
  },
80747
+ MuiFormLabel: {
80748
+ styleOverrides: {
80749
+ asterisk: {
80750
+ color: "#E32727",
80751
+ "&$error": {
80752
+ color: "#E32727"
80753
+ }
80754
+ }
80755
+ }
80756
+ },
80744
80757
  MuiIcon: {
80745
80758
  styleOverrides: {
80746
80759
  root: {