@mxenabled/connect-widget 0.18.4 → 0.19.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/dist/index.es.js CHANGED
@@ -65342,20 +65342,25 @@ GeneralSupport.propTypes = {
65342
65342
  GeneralSupport.displayName = "GeneralSupport";
65343
65343
 
65344
65344
  const SupportSuccess = React__default.forwardRef((props, supportSuccessRef) => {
65345
- const { email, handleClose } = props;
65345
+ const { email, handleClose, setAriaLiveRegionMessage } = props;
65346
65346
  useAnalyticsPath(...PageviewInfo.CONNECT_SUPPORT_SUCCESS);
65347
65347
  const tokens = useTokens();
65348
65348
  const styles = getStyles$15(tokens);
65349
65349
  const getNextDelay = getDelay();
65350
+ const requestReceived = __(
65351
+ "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.",
65352
+ email
65353
+ );
65354
+ const workingHours = __("Our hours are Monday to Friday, 9 a.m. – 5 p.m. MST.");
65350
65355
  const onClose = () => fadeOut(supportSuccessRef.current, "up", 300).then(() => handleClose());
65356
+ useEffect(() => {
65357
+ setAriaLiveRegionMessage(`${requestReceived} ${workingHours}`);
65358
+ }, []);
65351
65359
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: supportSuccessRef, children: [
65352
65360
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(x, { style: styles.title, truncate: false, variant: "H2", children: __("Request received") }) }),
65353
65361
  /* @__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.") }),
65362
+ /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", style: styles.firstParagraph, truncate: false, variant: "Paragraph", children: requestReceived }),
65363
+ /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", truncate: false, variant: "Paragraph", children: workingHours }),
65359
65364
  /* @__PURE__ */ jsxRuntimeExports.jsx(
65360
65365
  Button$2,
65361
65366
  {
@@ -65387,7 +65392,8 @@ const getStyles$15 = (tokens) => ({
65387
65392
  });
65388
65393
  SupportSuccess.propTypes = {
65389
65394
  email: PropTypes$1.string.isRequired,
65390
- handleClose: PropTypes$1.func.isRequired
65395
+ handleClose: PropTypes$1.func.isRequired,
65396
+ setAriaLiveRegionMessage: PropTypes$1.func.isRequired
65391
65397
  };
65392
65398
  SupportSuccess.displayName = "SupportSuccess";
65393
65399
 
@@ -65401,6 +65407,7 @@ const Support = React__default.forwardRef((props, supportNavRef) => {
65401
65407
  const { loadToView, onClose } = props;
65402
65408
  const [currentView, setCurrentView] = useState(loadToView);
65403
65409
  const [email, setEmail] = useState("");
65410
+ const [ariaLiveRegionMessage, setAriaLiveRegionMessage] = useState("");
65404
65411
  const user = useSelector((state) => state.profiles.user);
65405
65412
  const menuRef = useRef(null);
65406
65413
  const requestInstitutionRef = useRef(null);
@@ -65432,42 +65439,46 @@ const Support = React__default.forwardRef((props, supportNavRef) => {
65432
65439
  setEmail(email2);
65433
65440
  setCurrentView(VIEWS$2.SUCCESS);
65434
65441
  };
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
- ] }) });
65442
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.container, children: [
65443
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.content, children: [
65444
+ currentView === VIEWS$2.MENU && /* @__PURE__ */ jsxRuntimeExports.jsx(
65445
+ SupportMenu,
65446
+ {
65447
+ ref: menuRef,
65448
+ selectGeneralSupport: () => setCurrentView(VIEWS$2.GENERAL_SUPPORT),
65449
+ selectRequestInstitution: () => setCurrentView(VIEWS$2.REQ_INSTITUTION)
65450
+ }
65451
+ ),
65452
+ currentView === VIEWS$2.REQ_INSTITUTION && /* @__PURE__ */ jsxRuntimeExports.jsx(
65453
+ RequestInstitution,
65454
+ {
65455
+ handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(requestInstitutionRef) : setCurrentView(VIEWS$2.MENU),
65456
+ handleTicketSuccess,
65457
+ ref: requestInstitutionRef,
65458
+ user
65459
+ }
65460
+ ),
65461
+ currentView === VIEWS$2.GENERAL_SUPPORT && /* @__PURE__ */ jsxRuntimeExports.jsx(
65462
+ GeneralSupport,
65463
+ {
65464
+ handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(generalSupportRef) : setCurrentView(VIEWS$2.MENU),
65465
+ handleTicketSuccess,
65466
+ ref: generalSupportRef,
65467
+ user
65468
+ }
65469
+ ),
65470
+ currentView === VIEWS$2.SUCCESS && /* @__PURE__ */ jsxRuntimeExports.jsx(
65471
+ SupportSuccess,
65472
+ {
65473
+ email,
65474
+ handleClose: () => loadToView !== VIEWS$2.MENU ? handleCloseSupport(supportSuccessRef) : setCurrentView(VIEWS$2.MENU),
65475
+ ref: supportSuccessRef,
65476
+ setAriaLiveRegionMessage
65477
+ }
65478
+ )
65479
+ ] }),
65480
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AriaLive, { level: "assertive", message: ariaLiveRegionMessage })
65481
+ ] });
65471
65482
  });
65472
65483
  const getStyles$14 = (tokens) => ({
65473
65484
  container: {
@@ -69834,7 +69845,14 @@ const OAuthStep = React__default.forwardRef((props, navigationRef) => {
69834
69845
  member$ = of(pendingOauthMember);
69835
69846
  } else {
69836
69847
  const newMemberStream$ = defer(
69837
- () => api.addMember({ is_oauth: true, institution_guid: institution.guid }, config)
69848
+ () => api.addMember(
69849
+ {
69850
+ is_oauth: true,
69851
+ institution_guid: institution.guid,
69852
+ rawInstitutionData: { ...institution }
69853
+ },
69854
+ config
69855
+ )
69838
69856
  ).pipe(pluck("member")).subscribe(
69839
69857
  (member2) => {
69840
69858
  sendPosthogEvent(AnalyticEvents.OAUTH_PENDING_MEMBER_CREATED, {
@@ -70791,7 +70809,11 @@ const CreateMemberForm = (props) => {
70791
70809
  postMessageFunctions.onPostMessage("connect/enterCredentials", {
70792
70810
  institution: { guid: institution.guid, code: institution.code }
70793
70811
  });
70794
- const memberData = { institution_guid: institution.guid, credentials: userCredentials };
70812
+ const memberData = {
70813
+ institution_guid: institution.guid,
70814
+ credentials: userCredentials,
70815
+ rawInstitutionData: { ...institution }
70816
+ };
70795
70817
  const createMember$ = defer(() => api.addMember(memberData, config, isHuman)).pipe(
70796
70818
  // this delay is dumb, but if we don't wait long enough after the
70797
70819
  // create, then the job afterward is gonna 404.