@mxenabled/connect-widget 2.11.1 → 2.12.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
@@ -5099,39 +5099,23 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
5099
5099
  }
5100
5100
  var _baseFindIndex = baseFindIndex$2;
5101
5101
 
5102
- var _trimmedEndIndex;
5103
- var hasRequired_trimmedEndIndex;
5104
-
5105
- function require_trimmedEndIndex () {
5106
- if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
5107
- hasRequired_trimmedEndIndex = 1;
5108
- var reWhitespace = /\s/;
5109
- function trimmedEndIndex(string) {
5110
- var index = string.length;
5111
- while (index-- && reWhitespace.test(string.charAt(index))) {
5112
- }
5113
- return index;
5114
- }
5115
- _trimmedEndIndex = trimmedEndIndex;
5116
- return _trimmedEndIndex;
5102
+ var reWhitespace = /\s/;
5103
+ function trimmedEndIndex$1(string) {
5104
+ var index = string.length;
5105
+ while (index-- && reWhitespace.test(string.charAt(index))) {
5106
+ }
5107
+ return index;
5117
5108
  }
5109
+ var _trimmedEndIndex = trimmedEndIndex$1;
5118
5110
 
5119
- var _baseTrim;
5120
- var hasRequired_baseTrim;
5121
-
5122
- function require_baseTrim () {
5123
- if (hasRequired_baseTrim) return _baseTrim;
5124
- hasRequired_baseTrim = 1;
5125
- var trimmedEndIndex = require_trimmedEndIndex();
5126
- var reTrimStart = /^\s+/;
5127
- function baseTrim(string) {
5128
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
5129
- }
5130
- _baseTrim = baseTrim;
5131
- return _baseTrim;
5111
+ var trimmedEndIndex = _trimmedEndIndex;
5112
+ var reTrimStart = /^\s+/;
5113
+ function baseTrim$1(string) {
5114
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
5132
5115
  }
5116
+ var _baseTrim = baseTrim$1;
5133
5117
 
5134
- var baseTrim = require_baseTrim(), isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
5118
+ var baseTrim = _baseTrim, isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
5135
5119
  var NAN = 0 / 0;
5136
5120
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
5137
5121
  var reIsBinary = /^0b[01]+$/i;
@@ -8613,7 +8597,7 @@ var hasRequiredTrim;
8613
8597
  function requireTrim () {
8614
8598
  if (hasRequiredTrim) return trim_1;
8615
8599
  hasRequiredTrim = 1;
8616
- var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8600
+ var baseToString = _baseToString, baseTrim = _baseTrim, castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8617
8601
  function trim(string, chars, guard) {
8618
8602
  string = toString(string);
8619
8603
  if (string && (guard || chars === void 0)) {
@@ -9051,7 +9035,8 @@ const configSlice = createSlice({
9051
9035
  name: "config",
9052
9036
  initialState: initialState$6,
9053
9037
  reducers: {
9054
- addVerificationData: (state) => {
9038
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9039
+ addVerificationData: (state, _) => {
9055
9040
  if (state.mode === AGG_MODE) {
9056
9041
  state.include_transactions = true;
9057
9042
  }
@@ -9062,7 +9047,8 @@ const configSlice = createSlice({
9062
9047
  state.use_cases = ["MONEY_MOVEMENT"];
9063
9048
  }
9064
9049
  },
9065
- addAggregationData: (state) => {
9050
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9051
+ addAggregationData: (state, _) => {
9066
9052
  state.include_transactions = true;
9067
9053
  if (Array.isArray(state.use_cases)) {
9068
9054
  state.use_cases.push("PFM");
@@ -9150,6 +9136,13 @@ const selectConnectConfig = createSelector(selectConfig, (config) => ({
9150
9136
  use_cases: config.use_cases,
9151
9137
  additional_product_option: config.additional_product_option
9152
9138
  }));
9139
+ const selectCurrentMode = createSelector(selectConfig, (config) => ({
9140
+ mode: config.mode,
9141
+ isInAggMode: config.mode === AGG_MODE,
9142
+ isInVerifyMode: config.mode === VERIFY_MODE,
9143
+ isInTaxMode: config.mode === TAX_MODE,
9144
+ isInRewardMode: config.mode === REWARD_MODE
9145
+ }));
9153
9146
  const selectColorScheme = (state) => state.config.color_scheme;
9154
9147
  const getIsLightColorScheme = createSelector(
9155
9148
  selectColorScheme,
@@ -54620,61 +54613,6 @@ GenericError.propTypes = {
54620
54613
  title: PropTypes$1.string.isRequired
54621
54614
  };
54622
54615
 
54623
- var assignValue = _assignValue, castPath$1 = _castPath, isIndex = _isIndex, isObject$1 = isObject_1, toKey = _toKey;
54624
- function baseSet$1(object, path, value, customizer) {
54625
- if (!isObject$1(object)) {
54626
- return object;
54627
- }
54628
- path = castPath$1(path, object);
54629
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
54630
- while (nested != null && ++index < length) {
54631
- var key = toKey(path[index]), newValue = value;
54632
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
54633
- return object;
54634
- }
54635
- if (index != lastIndex) {
54636
- var objValue = nested[key];
54637
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
54638
- if (newValue === void 0) {
54639
- newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
54640
- }
54641
- }
54642
- assignValue(nested, key, newValue);
54643
- nested = nested[key];
54644
- }
54645
- return object;
54646
- }
54647
- var _baseSet = baseSet$1;
54648
-
54649
- var baseGet = _baseGet, baseSet = _baseSet, castPath = _castPath;
54650
- function basePickBy$2(object, paths, predicate) {
54651
- var index = -1, length = paths.length, result = {};
54652
- while (++index < length) {
54653
- var path = paths[index], value = baseGet(object, path);
54654
- if (predicate(value, path)) {
54655
- baseSet(result, castPath(path, object), value);
54656
- }
54657
- }
54658
- return result;
54659
- }
54660
- var _basePickBy = basePickBy$2;
54661
-
54662
- var basePickBy$1 = _basePickBy, hasIn = hasIn_1;
54663
- function basePick$1(object, paths) {
54664
- return basePickBy$1(object, paths, function(value, path) {
54665
- return hasIn(object, path);
54666
- });
54667
- }
54668
- var _basePick = basePick$1;
54669
-
54670
- var basePick = _basePick, flatRest = _flatRest;
54671
- var pick = flatRest(function(object, paths) {
54672
- return object == null ? {} : basePick(object, paths);
54673
- });
54674
- var pick_1 = pick;
54675
-
54676
- const _pick = /*@__PURE__*/getDefaultExportFromCjs(pick_1);
54677
-
54678
54616
  var baseKeys = _baseKeys, getTag = _getTag, isArguments = isArguments_1, isArray$4 = isArray_1, isArrayLike$3 = isArrayLike_1, isBuffer = isBufferExports, isPrototype = _isPrototype, isTypedArray = isTypedArray_1;
54679
54617
  var mapTag = "[object Map]", setTag = "[object Set]";
54680
54618
  var objectProto$1 = Object.prototype;
@@ -62710,17 +62648,18 @@ const scrollToTop = (ref) => {
62710
62648
  return ref.current?.scrollIntoView(true);
62711
62649
  };
62712
62650
 
62713
- const Disclosure = React__default.forwardRef((props, disclosureRef) => {
62714
- const { mode, onContinue, size } = props;
62651
+ const Disclosure = React__default.forwardRef((_, disclosureRef) => {
62715
62652
  const containerRef = useRef(null);
62716
62653
  useAnalyticsPath(...PageviewInfo.CONNECT_DISCLOSURE);
62654
+ size === "small";
62717
62655
  const tokens = useTokens();
62718
62656
  const styles = getStyles$1C(tokens);
62719
62657
  const getNextDelay = getDelay();
62720
62658
  const [showPrivacyPolicy, setShowPrivacyPolicy] = useState(false);
62721
- const IS_IN_AGG_MODE = mode === AGG_MODE;
62722
- const IS_IN_TAX_MODE = mode === TAX_MODE;
62723
- const IS_IN_VERIFY_MODE = mode === VERIFY_MODE;
62659
+ const { isInAggMode, isInTaxMode, isInVerifyMode } = useSelector(selectCurrentMode);
62660
+ const connectConfig = useSelector(selectConnectConfig);
62661
+ const size = useSelector(getSize);
62662
+ const dispatch = useDispatch();
62724
62663
  useImperativeHandle(disclosureRef, () => {
62725
62664
  return {
62726
62665
  handleBackButton() {
@@ -62745,15 +62684,15 @@ const Disclosure = React__default.forwardRef((props, disclosureRef) => {
62745
62684
  "This app will have access to the information below unless you choose to disconnect:"
62746
62685
  ) }),
62747
62686
  /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { "data-test": "disclosure-list", style: styles.dataList, children: [
62748
- IS_IN_AGG_MODE && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
62687
+ isInAggMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
62749
62688
  /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: dist.css(styles.listItem), "data-test": "disclosure-agg-mode-list-item1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { truncate: false, variant: "Paragraph", children: __("Account details") }) }),
62750
62689
  /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: dist.css(styles.listItem), "data-test": "disclosure-agg-mode-list-item2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { truncate: false, variant: "Paragraph", children: __("Account balances and transactions") }) })
62751
62690
  ] }),
62752
- IS_IN_TAX_MODE && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
62691
+ isInTaxMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
62753
62692
  /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: dist.css(styles.listItem), "data-test": "disclosure-tax-mode-list-item1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { truncate: false, variant: "Paragraph", children: __("Basic account information") }) }),
62754
62693
  /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: dist.css(styles.listItem), "data-test": "disclosure-tax-mode-list-item2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { truncate: false, variant: "Paragraph", children: __("Tax documents") }) })
62755
62694
  ] }),
62756
- IS_IN_VERIFY_MODE && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
62695
+ isInVerifyMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
62757
62696
  /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: dist.css(styles.listItem), "data-test": "disclosure-ver-mode-list-item1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { truncate: false, variant: "Paragraph", children: __("Routing and account numbers") }) }),
62758
62697
  /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: dist.css(styles.listItem), "data-test": "disclosure-ver-mode-list-item2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { truncate: false, variant: "Paragraph", children: __("Account balances") }) })
62759
62698
  ] })
@@ -62810,7 +62749,12 @@ const Disclosure = React__default.forwardRef((props, disclosureRef) => {
62810
62749
  {
62811
62750
  "data-test": "disclosure-continue",
62812
62751
  onClick: () => {
62813
- fadeOut(containerRef.current, "up", 300).then(() => onContinue());
62752
+ fadeOut(containerRef.current, "up", 300).then(
62753
+ () => dispatch({
62754
+ type: ActionTypes$2.ACCEPT_DISCLOSURE,
62755
+ payload: connectConfig
62756
+ })
62757
+ );
62814
62758
  },
62815
62759
  variant: "contained",
62816
62760
  children: _p("connect/disclosure/button", "Continue")
@@ -62874,11 +62818,6 @@ const getStyles$1C = (tokens) => {
62874
62818
  }
62875
62819
  };
62876
62820
  };
62877
- Disclosure.propTypes = {
62878
- mode: PropTypes$1.string.isRequired,
62879
- onContinue: PropTypes$1.func.isRequired,
62880
- size: PropTypes$1.string.isRequired
62881
- };
62882
62821
  Disclosure.displayName = "Disclosure";
62883
62822
 
62884
62823
  /******************************************************************************
@@ -64646,7 +64585,7 @@ var now$1 = function() {
64646
64585
  };
64647
64586
  var now_1 = now$1;
64648
64587
 
64649
- var isObject = isObject_1, now = now_1, toNumber = toNumber_1;
64588
+ var isObject$1 = isObject_1, now = now_1, toNumber = toNumber_1;
64650
64589
  var FUNC_ERROR_TEXT = "Expected a function";
64651
64590
  var nativeMax$2 = Math.max, nativeMin = Math.min;
64652
64591
  function debounce$1(func, wait, options) {
@@ -64655,7 +64594,7 @@ function debounce$1(func, wait, options) {
64655
64594
  throw new TypeError(FUNC_ERROR_TEXT);
64656
64595
  }
64657
64596
  wait = toNumber(wait) || 0;
64658
- if (isObject(options)) {
64597
+ if (isObject$1(options)) {
64659
64598
  leading = !!options.leading;
64660
64599
  maxing = "maxWait" in options;
64661
64600
  maxWait = maxing ? nativeMax$2(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -69741,6 +69680,153 @@ const INSTITUTION_TYPES = {
69741
69680
  const SEARCH_PER_PAGE_DEFAULT = 25;
69742
69681
  const SEARCH_PAGE_DEFAULT = 1;
69743
69682
 
69683
+ var assignValue = _assignValue, castPath$1 = _castPath, isIndex = _isIndex, isObject = isObject_1, toKey = _toKey;
69684
+ function baseSet$1(object, path, value, customizer) {
69685
+ if (!isObject(object)) {
69686
+ return object;
69687
+ }
69688
+ path = castPath$1(path, object);
69689
+ var index = -1, length = path.length, lastIndex = length - 1, nested = object;
69690
+ while (nested != null && ++index < length) {
69691
+ var key = toKey(path[index]), newValue = value;
69692
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
69693
+ return object;
69694
+ }
69695
+ if (index != lastIndex) {
69696
+ var objValue = nested[key];
69697
+ newValue = customizer ? customizer(objValue, key, nested) : void 0;
69698
+ if (newValue === void 0) {
69699
+ newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
69700
+ }
69701
+ }
69702
+ assignValue(nested, key, newValue);
69703
+ nested = nested[key];
69704
+ }
69705
+ return object;
69706
+ }
69707
+ var _baseSet = baseSet$1;
69708
+
69709
+ var baseGet = _baseGet, baseSet = _baseSet, castPath = _castPath;
69710
+ function basePickBy$2(object, paths, predicate) {
69711
+ var index = -1, length = paths.length, result = {};
69712
+ while (++index < length) {
69713
+ var path = paths[index], value = baseGet(object, path);
69714
+ if (predicate(value, path)) {
69715
+ baseSet(result, castPath(path, object), value);
69716
+ }
69717
+ }
69718
+ return result;
69719
+ }
69720
+ var _basePickBy = basePickBy$2;
69721
+
69722
+ var basePickBy$1 = _basePickBy, hasIn = hasIn_1;
69723
+ function basePick$1(object, paths) {
69724
+ return basePickBy$1(object, paths, function(value, path) {
69725
+ return hasIn(object, path);
69726
+ });
69727
+ }
69728
+ var _basePick = basePick$1;
69729
+
69730
+ var basePick = _basePick, flatRest = _flatRest;
69731
+ var pick = flatRest(function(object, paths) {
69732
+ return object == null ? {} : basePick(object, paths);
69733
+ });
69734
+ var pick_1 = pick;
69735
+
69736
+ const _pick = /*@__PURE__*/getDefaultExportFromCjs(pick_1);
69737
+
69738
+ const defaultApiValue = {
69739
+ // Accounts
69740
+ createAccount: () => Promise.resolve({}),
69741
+ // Members
69742
+ addMember: () => Promise.resolve({}),
69743
+ deleteMember: () => Promise.resolve(),
69744
+ getMemberCredentials: () => Promise.resolve([]),
69745
+ loadMemberByGuid: () => Promise.resolve({}),
69746
+ loadMembers: () => Promise.resolve([]),
69747
+ // Institutions
69748
+ getInstitutionCredentials: () => Promise.resolve([]),
69749
+ loadDiscoveredInstitutions: () => Promise.resolve([]),
69750
+ loadInstitutionByCode: () => Promise.resolve({}),
69751
+ loadInstitutions: () => Promise.resolve([]),
69752
+ loadInstitutionByGuid: () => Promise.resolve({}),
69753
+ loadPopularInstitutions: () => Promise.resolve([]),
69754
+ // Microdeposits
69755
+ createMicrodeposit: () => Promise.resolve({}),
69756
+ loadMicrodepositByGuid: () => Promise.resolve({}),
69757
+ refreshMicrodepositStatus: () => Promise.resolve(),
69758
+ updateMember: () => Promise.resolve({}),
69759
+ updateMFA: () => Promise.resolve({}),
69760
+ updateMicrodeposit: () => Promise.resolve({}),
69761
+ verifyMicrodeposit: () => Promise.resolve({}),
69762
+ verifyRoutingNumber: () => Promise.resolve({}),
69763
+ //OAuth
69764
+ loadOAuthState: () => Promise.resolve({}),
69765
+ loadOAuthStates: () => Promise.resolve([]),
69766
+ oAuthStart: () => Promise.resolve(),
69767
+ // Support
69768
+ createSupportTicket: () => Promise.resolve(),
69769
+ //Job
69770
+ loadJob: () => Promise.resolve({}),
69771
+ runJob: () => Promise.resolve({}),
69772
+ // User
69773
+ updateUserProfile: () => Promise.resolve({})
69774
+ };
69775
+ const ApiContext = React$1.createContext(defaultApiValue);
69776
+ const ApiProvider = ({ apiValue, children }) => {
69777
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ApiContext.Provider, { value: { ...defaultApiValue, ...apiValue }, children });
69778
+ };
69779
+ const useApi = () => {
69780
+ const context = React$1.useContext(ApiContext);
69781
+ if (context === void 0) {
69782
+ throw new Error("useApi must be used within a ApiProvider");
69783
+ }
69784
+ return { api: context };
69785
+ };
69786
+
69787
+ const useSelectInstitution = () => {
69788
+ const { api } = useApi();
69789
+ const [institution, setInstitution] = useState(null);
69790
+ const dispatch = useDispatch();
69791
+ const consentIsEnabled = useSelector((state) => isConsentEnabled(state));
69792
+ const connectConfig = useSelector(selectConnectConfig);
69793
+ const handleSelectInstitution = useCallback(
69794
+ (institution2) => {
69795
+ setInstitution(institution2);
69796
+ },
69797
+ [institution]
69798
+ );
69799
+ useEffect(() => {
69800
+ if (!institution) return () => {
69801
+ };
69802
+ const selectInstitution$ = from(api.loadInstitutionByGuid(institution.guid)).pipe(
69803
+ map((insWithCreds) => {
69804
+ return dispatch({
69805
+ type: ActionTypes$2.SELECT_INSTITUTION_SUCCESS,
69806
+ payload: {
69807
+ institution: {
69808
+ ...insWithCreds,
69809
+ is_disabled_by_client: institutionIsBlockedForCostReasons(institution)
69810
+ // Temporary workaround till backend/core is fixed
69811
+ },
69812
+ consentIsEnabled: consentIsEnabled || false,
69813
+ additionalProductOption: connectConfig?.additional_product_option || null
69814
+ }
69815
+ });
69816
+ }),
69817
+ catchError((err) => {
69818
+ setInstitution(null);
69819
+ return of(selectInstitutionError(err));
69820
+ })
69821
+ ).subscribe((action) => {
69822
+ setInstitution(null);
69823
+ dispatch(action);
69824
+ });
69825
+ return () => selectInstitution$.unsubscribe();
69826
+ }, [institution]);
69827
+ return { handleSelectInstitution };
69828
+ };
69829
+
69744
69830
  const InstitutionGridTile = (props) => {
69745
69831
  const { institution, selectInstitution } = props;
69746
69832
  const tokens = useTokens();
@@ -69892,21 +69978,30 @@ InstituionGrid.propTypes = {
69892
69978
 
69893
69979
  const PopularInstitutionsList = (props) => {
69894
69980
  useAnalyticsPath(...PageviewInfo.CONNECT_SEARCH_POPULAR);
69895
- const {
69896
- institutions,
69897
- handleSelectInstitution,
69898
- onAddManualAccountClick,
69899
- onSearchInstitutionClick,
69900
- enableManualAccounts
69901
- } = props;
69981
+ const { handleSelectInstitution } = useSelectInstitution();
69982
+ const postMessage = useContext(PostMessageContext);
69983
+ const { institutions, onSearchInstitutionClick } = props;
69902
69984
  const getNextDelay = getDelay();
69903
69985
  const tokens = useTokens();
69904
69986
  const styles = getStyles$1q(tokens);
69987
+ const dispatch = useDispatch();
69988
+ const enableManualAccounts = useSelector((state) => {
69989
+ const isManualAccountsEnabled = state.profiles.widgetProfile?.enable_manual_accounts;
69990
+ const { isInAggMode } = selectCurrentMode(state);
69991
+ const hasAtriumAPI = state.profiles.client?.has_atrium_api;
69992
+ return isManualAccountsEnabled && isInAggMode && !hasAtriumAPI;
69993
+ });
69905
69994
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.listContainer, children: [
69906
69995
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
69907
69996
  InstituionGrid,
69908
69997
  {
69909
- handleSelectInstitution,
69998
+ handleSelectInstitution: (institution) => {
69999
+ postMessage.onPostMessage(
70000
+ "connect/selectedInstitution",
70001
+ _pick(institution, ["name", "guid", "url", "code"])
70002
+ );
70003
+ handleSelectInstitution(institution);
70004
+ },
69910
70005
  institutions: institutions.filter((institution) => !institution.is_disabled_by_client),
69911
70006
  posthogEvent: AnalyticEvents.SELECT_POPULAR_INSTITUTION
69912
70007
  }
@@ -69926,7 +70021,7 @@ const PopularInstitutionsList = (props) => {
69926
70021
  Button$2,
69927
70022
  {
69928
70023
  "data-test": "add-account-manually-button",
69929
- onClick: onAddManualAccountClick,
70024
+ onClick: () => dispatch(stepToAddManualAccount$1()),
69930
70025
  variant: "text",
69931
70026
  children: __("Add account manually")
69932
70027
  }
@@ -69974,10 +70069,7 @@ const getStyles$1q = (tokens) => {
69974
70069
  };
69975
70070
  };
69976
70071
  PopularInstitutionsList.propTypes = {
69977
- enableManualAccounts: PropTypes$1.bool.isRequired,
69978
- handleSelectInstitution: PropTypes$1.func.isRequired,
69979
70072
  institutions: PropTypes$1.array.isRequired,
69980
- onAddManualAccountClick: PropTypes$1.func.isRequired,
69981
70073
  onSearchInstitutionClick: PropTypes$1.func.isRequired
69982
70074
  };
69983
70075
 
@@ -70138,25 +70230,42 @@ InstitutionTile.propTypes = {
70138
70230
  const SearchedInstitutionsList = (props) => {
70139
70231
  useAnalyticsPath(...PageviewInfo.CONNECT_SEARCHED);
70140
70232
  const sendAnalyticsEvent = useAnalyticsEvent();
70233
+ const postMessage = useContext(PostMessageContext);
70141
70234
  const {
70142
70235
  currentSearchResults,
70143
- enableManualAccounts,
70144
- enableSupportRequests,
70145
70236
  institutions,
70146
70237
  institutionSearch,
70147
- isMicrodepositsEnabled,
70148
- handleSelectInstitution,
70149
- onAddManualAccountClick,
70150
70238
  onRequestInstitution,
70151
- onVerifyWithMicrodeposits,
70152
70239
  setAriaLiveRegionMessage
70153
70240
  } = props;
70154
70241
  const tokens = useTokens();
70155
70242
  const styles = getStyles$1o(tokens);
70156
70243
  const getNextDelay = getDelay();
70157
- const clientUsesOauth = useSelector((state) => state.profiles.clientProfile.uses_oauth ?? false);
70158
70244
  const [currentPage, setCurrentPage] = useState(SEARCH_PAGE_DEFAULT);
70159
70245
  const [isLoadingInstitutions, setIsLoadingInstitutions] = useState(false);
70246
+ const dispatch = useDispatch();
70247
+ const clientUsesOauth = useSelector((state) => state.profiles.clientProfile.uses_oauth ?? false);
70248
+ const enableManualAccounts = useSelector((state) => {
70249
+ const isManualAccountsEnabled = state.profiles.widgetProfile?.enable_manual_accounts;
70250
+ const { isInAggMode } = selectCurrentMode(state);
70251
+ const hasAtriumAPI = state.profiles.client?.has_atrium_api;
70252
+ return isManualAccountsEnabled && isInAggMode && !hasAtriumAPI;
70253
+ });
70254
+ const enableSupportRequests = useSelector((state) => {
70255
+ const isSupportEnabled = state.profiles.widgetProfile?.enable_support_requests;
70256
+ const { isInAggMode } = selectCurrentMode(state);
70257
+ return isSupportEnabled && isInAggMode;
70258
+ });
70259
+ const isMicrodepositsEnabled = useSelector((state) => {
70260
+ const { isVerifyMode } = selectCurrentMode(state);
70261
+ const clientProfile = state.profiles.clientProfile || {};
70262
+ const widgetProfile = state.profiles.widgetProfile || {};
70263
+ return isVerifyMode && // Widget is in Verify Mode
70264
+ clientProfile.account_verification_is_enabled && // Client supports verification
70265
+ clientProfile.is_microdeposits_enabled && // Client supports MDV
70266
+ widgetProfile.show_microdeposits_in_connect;
70267
+ });
70268
+ const { handleSelectInstitution } = useSelectInstitution();
70160
70269
  const shouldShowLoadMore = !!currentSearchResults.length && !isLoadingInstitutions;
70161
70270
  useEffect(() => {
70162
70271
  setAriaLiveRegionMessage(
@@ -70194,6 +70303,10 @@ const SearchedInstitutionsList = (props) => {
70194
70303
  institution_guid: institution.guid,
70195
70304
  institution_name: institution.name
70196
70305
  });
70306
+ postMessage.onPostMessage(
70307
+ "connect/selectedInstitution",
70308
+ _pick(institution, ["name", "guid", "url", "code"])
70309
+ );
70197
70310
  handleSelectInstitution(institution);
70198
70311
  },
70199
70312
  size: 48
@@ -70219,7 +70332,7 @@ const SearchedInstitutionsList = (props) => {
70219
70332
  Button$2,
70220
70333
  {
70221
70334
  "data-test": "add-account-manually-button",
70222
- onClick: onAddManualAccountClick,
70335
+ onClick: () => dispatch(stepToAddManualAccount$1()),
70223
70336
  variant: "text",
70224
70337
  children: __("Add account manually")
70225
70338
  }
@@ -70237,7 +70350,7 @@ const SearchedInstitutionsList = (props) => {
70237
70350
  Button$2,
70238
70351
  {
70239
70352
  "data-test": "connect-account-numbers-button",
70240
- onClick: onVerifyWithMicrodeposits,
70353
+ onClick: () => dispatch(stepToMicrodeposits$1()),
70241
70354
  variant: "text",
70242
70355
  children: __("Connect with account numbers")
70243
70356
  }
@@ -70278,32 +70391,39 @@ const getStyles$1o = (tokens) => {
70278
70391
  };
70279
70392
  SearchedInstitutionsList.propTypes = {
70280
70393
  currentSearchResults: PropTypes$1.array.isRequired,
70281
- enableManualAccounts: PropTypes$1.bool.isRequired,
70282
- enableSupportRequests: PropTypes$1.bool.isRequired,
70283
- handleSelectInstitution: PropTypes$1.func.isRequired,
70284
70394
  institutions: PropTypes$1.array.isRequired,
70285
70395
  institutionSearch: PropTypes$1.func.isRequired,
70286
- isMicrodepositsEnabled: PropTypes$1.bool.isRequired,
70287
- onAddManualAccountClick: PropTypes$1.func.isRequired,
70288
70396
  onRequestInstitution: PropTypes$1.func.isRequired,
70289
- onVerifyWithMicrodeposits: PropTypes$1.func.isRequired,
70290
70397
  setAriaLiveRegionMessage: PropTypes$1.func.isRequired
70291
70398
  };
70292
70399
 
70293
70400
  const SearchNoResult = (props) => {
70294
70401
  useAnalyticsPath(...PageviewInfo.CONNECT_SEARCH_NO_RESULTS, { search_term: props.searchTerm });
70295
- const {
70296
- enableManualAccounts,
70297
- enableSupportRequests,
70298
- isMicrodepositsEnabled,
70299
- onAddManualAccountClick,
70300
- onRequestInstitution,
70301
- onVerifyWithMicrodeposits,
70302
- setAriaLiveRegionMessage
70303
- } = props;
70402
+ const { onRequestInstitution, setAriaLiveRegionMessage } = props;
70304
70403
  const timerRef = useRef(null);
70305
70404
  const tokens = useTokens();
70306
70405
  const styles = getStyles$1n(tokens);
70406
+ const dispatch = useDispatch();
70407
+ const enableManualAccounts = useSelector((state) => {
70408
+ const isManualAccountsEnabled = state.profiles.widgetProfile?.enable_manual_accounts;
70409
+ const { isInAggMode } = selectCurrentMode(state);
70410
+ const hasAtriumAPI = state.profiles.client?.has_atrium_api;
70411
+ return isManualAccountsEnabled && isInAggMode && !hasAtriumAPI;
70412
+ });
70413
+ const enableSupportRequests = useSelector((state) => {
70414
+ const isSupportEnabled = state.profiles.widgetProfile?.enable_support_requests;
70415
+ const { isInAggMode } = selectCurrentMode(state);
70416
+ return isSupportEnabled && isInAggMode;
70417
+ });
70418
+ const isMicrodepositsEnabled = useSelector((state) => {
70419
+ const { isVerifyMode } = selectCurrentMode(state);
70420
+ const clientProfile = state.profiles.clientProfile || {};
70421
+ const widgetProfile = state.profiles.widgetProfile || {};
70422
+ return isVerifyMode && // Widget is in Verify Mode
70423
+ clientProfile.account_verification_is_enabled && // Client supports verification
70424
+ clientProfile.is_microdeposits_enabled && // Client supports MDV
70425
+ widgetProfile.show_microdeposits_in_connect;
70426
+ });
70307
70427
  useEffect(() => {
70308
70428
  timerRef.current = setTimeout(() => {
70309
70429
  setAriaLiveRegionMessage(__("No results found for ”%1”", props.searchTerm));
@@ -70342,7 +70462,7 @@ const SearchNoResult = (props) => {
70342
70462
  Button$2,
70343
70463
  {
70344
70464
  "data-test": "add-account-manually-button",
70345
- onClick: onAddManualAccountClick,
70465
+ onClick: () => dispatch(stepToAddManualAccount$1()),
70346
70466
  variant: "text",
70347
70467
  children: __("Add account manually")
70348
70468
  }
@@ -70360,7 +70480,7 @@ const SearchNoResult = (props) => {
70360
70480
  Button$2,
70361
70481
  {
70362
70482
  "data-test": "connect-account-numbers-button",
70363
- onClick: onVerifyWithMicrodeposits,
70483
+ onClick: () => dispatch(stepToMicrodeposits$1()),
70364
70484
  variant: "text",
70365
70485
  children: __("Connect with account numbers")
70366
70486
  }
@@ -70394,12 +70514,7 @@ const getStyles$1n = (tokens) => {
70394
70514
  };
70395
70515
  };
70396
70516
  SearchNoResult.propTypes = {
70397
- enableManualAccounts: PropTypes$1.bool.isRequired,
70398
- enableSupportRequests: PropTypes$1.bool.isRequired,
70399
- isMicrodepositsEnabled: PropTypes$1.bool.isRequired,
70400
- onAddManualAccountClick: PropTypes$1.func.isRequired,
70401
70517
  onRequestInstitution: PropTypes$1.func.isRequired,
70402
- onVerifyWithMicrodeposits: PropTypes$1.func.isRequired,
70403
70518
  searchTerm: PropTypes$1.string.isRequired,
70404
70519
  setAriaLiveRegionMessage: PropTypes$1.func.isRequired
70405
70520
  };
@@ -72103,55 +72218,6 @@ const useForm = (submitCallback, formSchema, initialValues) => {
72103
72218
  };
72104
72219
  };
72105
72220
 
72106
- const defaultApiValue = {
72107
- // Accounts
72108
- createAccount: () => Promise.resolve({}),
72109
- // Members
72110
- addMember: () => Promise.resolve({}),
72111
- deleteMember: () => Promise.resolve(),
72112
- getMemberCredentials: () => Promise.resolve([]),
72113
- loadMemberByGuid: () => Promise.resolve({}),
72114
- loadMembers: () => Promise.resolve([]),
72115
- // Institutions
72116
- getInstitutionCredentials: () => Promise.resolve([]),
72117
- loadDiscoveredInstitutions: () => Promise.resolve([]),
72118
- loadInstitutionByCode: () => Promise.resolve({}),
72119
- loadInstitutions: () => Promise.resolve([]),
72120
- loadInstitutionByGuid: () => Promise.resolve({}),
72121
- loadPopularInstitutions: () => Promise.resolve([]),
72122
- // Microdeposits
72123
- createMicrodeposit: () => Promise.resolve({}),
72124
- loadMicrodepositByGuid: () => Promise.resolve({}),
72125
- refreshMicrodepositStatus: () => Promise.resolve(),
72126
- updateMember: () => Promise.resolve({}),
72127
- updateMFA: () => Promise.resolve({}),
72128
- updateMicrodeposit: () => Promise.resolve({}),
72129
- verifyMicrodeposit: () => Promise.resolve({}),
72130
- verifyRoutingNumber: () => Promise.resolve({}),
72131
- //OAuth
72132
- loadOAuthState: () => Promise.resolve({}),
72133
- loadOAuthStates: () => Promise.resolve([]),
72134
- oAuthStart: () => Promise.resolve(),
72135
- // Support
72136
- createSupportTicket: () => Promise.resolve(),
72137
- //Job
72138
- loadJob: () => Promise.resolve({}),
72139
- runJob: () => Promise.resolve({}),
72140
- // User
72141
- updateUserProfile: () => Promise.resolve({})
72142
- };
72143
- const ApiContext = React$1.createContext(defaultApiValue);
72144
- const ApiProvider = ({ apiValue, children }) => {
72145
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ApiContext.Provider, { value: { ...defaultApiValue, ...apiValue }, children });
72146
- };
72147
- const useApi = () => {
72148
- const context = React$1.useContext(ApiContext);
72149
- if (context === void 0) {
72150
- throw new Error("useApi must be used within a ApiProvider");
72151
- }
72152
- return { api: context };
72153
- };
72154
-
72155
72221
  const RequiredFieldNote = ({ styles }) => {
72156
72222
  const requiredFieldNoteColor = "#666";
72157
72223
  const asteriskColor = "#E32727";
@@ -72849,29 +72915,24 @@ const reducer$4 = (state, action) => {
72849
72915
  return state;
72850
72916
  }
72851
72917
  };
72852
- const Search$2 = React__default.forwardRef((props, navigationRef) => {
72918
+ const Search$2 = React__default.forwardRef((_, navigationRef) => {
72853
72919
  useAnalyticsPath(...PageviewInfo.CONNECT_SEARCH, {}, false);
72854
72920
  const [state, dispatch] = useReducer(reducer$4, initialState$1);
72855
72921
  const [ariaLiveRegionMessage, setAriaLiveRegionMessage] = useState("");
72856
72922
  const searchInput = useRef("");
72857
72923
  const supportNavRef = useRef(null);
72858
- const reduxDispatch = useDispatch();
72859
72924
  const sendAnalyticsEvent = useAnalyticsEvent();
72860
72925
  const postMessageFunctions = useContext(PostMessageContext);
72861
72926
  const { api } = useApi();
72862
- const {
72863
- connectConfig,
72864
- connectedMembers,
72865
- enableManualAccounts,
72866
- enableSupportRequests,
72867
- onAddManualAccountClick,
72868
- onInstitutionSelect,
72869
- usePopularOnly,
72870
- isMicrodepositsEnabled,
72871
- stepToMicrodeposits
72872
- } = props;
72927
+ const reduxDispatch = useDispatch();
72928
+ const connectConfig = useSelector(selectConnectConfig);
72929
+ const connectedMembers = useSelector(getMembers);
72930
+ const usePopularOnly = useSelector((state2) => {
72931
+ const clientProfile = state2.profiles.clientProfile || {};
72932
+ const client = state2.profiles.client || {};
72933
+ return (clientProfile.uses_custom_popular_institution_list ?? false) || (client.has_limited_institutions ?? false);
72934
+ });
72873
72935
  const MINIMUM_SEARCH_LENGTH = 2;
72874
- const mode = connectConfig.mode;
72875
72936
  const isFirstTimeUser = connectedMembers.length === 0;
72876
72937
  useImperativeHandle(navigationRef, () => {
72877
72938
  return {
@@ -72983,7 +73044,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
72983
73044
  return;
72984
73045
  }
72985
73046
  sendAnalyticsEvent(AnalyticEvents.SEARCH_QUERY, {
72986
- mode,
73047
+ mode: connectConfig.mode,
72987
73048
  search_term: value
72988
73049
  });
72989
73050
  postMessageFunctions.onPostMessage("connect/institutionSearch", { query: value });
@@ -73064,14 +73125,9 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
73064
73125
  state.currentView === SEARCH_VIEWS.NO_RESULTS && /* @__PURE__ */ jsxRuntimeExports.jsx(
73065
73126
  SearchNoResult,
73066
73127
  {
73067
- enableManualAccounts,
73068
- enableSupportRequests,
73069
- isMicrodepositsEnabled,
73070
- onAddManualAccountClick,
73071
73128
  onRequestInstitution: () => {
73072
73129
  dispatch({ type: SEARCH_ACTIONS.SHOW_SUPPORT });
73073
73130
  },
73074
- onVerifyWithMicrodeposits: stepToMicrodeposits,
73075
73131
  searchTerm: state.searchTerm,
73076
73132
  setAriaLiveRegionMessage
73077
73133
  }
@@ -73081,31 +73137,22 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
73081
73137
  SearchedInstitutionsList,
73082
73138
  {
73083
73139
  currentSearchResults: state.currentSearchResults,
73084
- enableManualAccounts,
73085
- enableSupportRequests,
73086
- handleSelectInstitution: onInstitutionSelect,
73087
73140
  institutionSearch,
73088
73141
  institutions: state.searchedInstitutions,
73089
- isMicrodepositsEnabled,
73090
- onAddManualAccountClick,
73091
73142
  onRequestInstitution: () => {
73092
73143
  dispatch({ type: SEARCH_ACTIONS.SHOW_SUPPORT });
73093
73144
  },
73094
- onVerifyWithMicrodeposits: stepToMicrodeposits,
73095
73145
  setAriaLiveRegionMessage
73096
73146
  }
73097
73147
  ),
73098
73148
  state.currentView === SEARCH_VIEWS.POPULAR && /* @__PURE__ */ jsxRuntimeExports.jsx(
73099
73149
  PopularInstitutionsList,
73100
73150
  {
73101
- enableManualAccounts,
73102
- handleSelectInstitution: onInstitutionSelect,
73103
73151
  institutions: usePopularOnly ? state.popularInstitutions : getSuggestedInstitutions(
73104
73152
  state.popularInstitutions,
73105
73153
  state.discoveredInstitutions,
73106
73154
  connectedMembers
73107
73155
  ),
73108
- onAddManualAccountClick,
73109
73156
  onSearchInstitutionClick: () => searchInput.current.focus()
73110
73157
  }
73111
73158
  ),
@@ -73137,17 +73184,6 @@ const getStyles$19 = (tokens) => {
73137
73184
  }
73138
73185
  };
73139
73186
  };
73140
- Search$2.propTypes = {
73141
- connectConfig: PropTypes$1.object.isRequired,
73142
- connectedMembers: PropTypes$1.array.isRequired,
73143
- enableManualAccounts: PropTypes$1.bool,
73144
- enableSupportRequests: PropTypes$1.bool,
73145
- isMicrodepositsEnabled: PropTypes$1.bool,
73146
- onAddManualAccountClick: PropTypes$1.func.isRequired,
73147
- onInstitutionSelect: PropTypes$1.func.isRequired,
73148
- stepToMicrodeposits: PropTypes$1.func.isRequired,
73149
- usePopularOnly: PropTypes$1.bool
73150
- };
73151
73187
  Search$2.displayName = "Search";
73152
73188
  const applyConnectConfigToSearchQuery = (connectConfig, queryObject) => {
73153
73189
  if (connectConfig.iso_country_code) {
@@ -78423,7 +78459,6 @@ const getStyles$J = (tokens) => {
78423
78459
  height: "24px",
78424
78460
  width: "24px",
78425
78461
  minWidth: "24px",
78426
- padding: "2px",
78427
78462
  zIndex: 20,
78428
78463
  display: "flex",
78429
78464
  alignItems: "center",
@@ -78510,7 +78545,7 @@ const ProgressMessage = ({ allDone, jobType }) => {
78510
78545
  };
78511
78546
  ProgressMessage.propTypes = {
78512
78547
  allDone: PropTypes$1.bool,
78513
- jobType: PropTypes$1.string
78548
+ jobType: PropTypes$1.number
78514
78549
  };
78515
78550
 
78516
78551
  const ProgressLogo = ({ children }) => {
@@ -78524,15 +78559,14 @@ const getStyles$H = (tokens) => {
78524
78559
  backgroundColor: tokens.BackgroundColor.Container,
78525
78560
  borderRadius: "8px",
78526
78561
  display: "flex",
78527
- padding: "2px",
78528
78562
  zIndex: 11
78529
78563
  }
78530
78564
  };
78531
78565
  };
78532
78566
 
78533
- const SvgProgressBackdropDark = (props) => /* @__PURE__ */ React$1.createElement("svg", { width: 80, height: 80, viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "image", ...props }, /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 23.5, stroke: "white", strokeOpacity: 0.45 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 31.5, stroke: "white", strokeOpacity: 0.3 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 39.5, stroke: "white", strokeOpacity: 0.15 }));
78567
+ const SvgProgressBackdropDark = (props) => /* @__PURE__ */ React$1.createElement("svg", { width: 80, height: 80, viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "image", "aria-hidden": "true", ...props }, /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 23.5, stroke: "white", strokeOpacity: 0.45 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 31.5, stroke: "white", strokeOpacity: 0.3 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 39.5, stroke: "white", strokeOpacity: 0.15 }));
78534
78568
 
78535
- const SvgProgressBackdropLight = (props) => /* @__PURE__ */ React$1.createElement("svg", { width: 80, height: 80, viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "image", ...props }, /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 23.5, stroke: "black", strokeOpacity: 0.25 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 31.5, stroke: "black", strokeOpacity: 0.1 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 39.5, stroke: "black", strokeOpacity: 0.05 }));
78569
+ const SvgProgressBackdropLight = (props) => /* @__PURE__ */ React$1.createElement("svg", { width: 80, height: 80, viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "image", "aria-hidden": "true", ...props }, /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 23.5, stroke: "black", strokeOpacity: 0.25 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 31.5, stroke: "black", strokeOpacity: 0.1 }), /* @__PURE__ */ React$1.createElement("circle", { cx: 40, cy: 40, r: 39.5, stroke: "black", strokeOpacity: 0.05 }));
78536
78570
 
78537
78571
  const ProgressBackgroundImage = ({ style }) => {
78538
78572
  const isLightColorScheme = useSelector(getIsLightColorScheme);
@@ -78581,7 +78615,8 @@ const ProgressBar = ({
78581
78615
  const getStyles$G = () => {
78582
78616
  return {
78583
78617
  container: {
78584
- textAlign: "center"
78618
+ textAlign: "center",
78619
+ width: "100%"
78585
78620
  },
78586
78621
  backgroundImage: {
78587
78622
  height: "80px",
@@ -78601,9 +78636,7 @@ const getStyles$G = () => {
78601
78636
  alignItems: "center",
78602
78637
  boxSizing: "border-box",
78603
78638
  display: "flex",
78604
- justifyContent: "space-between",
78605
- paddingLeft: "28px",
78606
- paddingRight: "28px",
78639
+ justifyContent: "space-around",
78607
78640
  position: "absolute",
78608
78641
  width: "100%"
78609
78642
  }
@@ -80583,8 +80616,8 @@ const Connected = React__default.forwardRef(
80583
80616
  const continueButtonRef = useRef(null);
80584
80617
  const connectSuccessSurveyRef = useRef(null);
80585
80618
  const postMessageFunctions = useContext(PostMessageContext);
80586
- const appName = useSelector((state) => state.profiles.client.oauth_app_name || null);
80587
80619
  const { onShowConnectSuccessSurvey } = useContext(AnalyticContext);
80620
+ const clientGuid = useSelector(getClientGuid);
80588
80621
  const tokens = useTokens();
80589
80622
  const styles = getStyles$x(tokens);
80590
80623
  const getNextDelay = getDelay();
@@ -80614,7 +80647,7 @@ const Connected = React__default.forwardRef(
80614
80647
  useEffect(() => {
80615
80648
  focusElement(continueButtonRef.current);
80616
80649
  }, [institutionName]);
80617
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, children: [
80650
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, style: styles.pageContainer, children: [
80618
80651
  /* @__PURE__ */ jsxRuntimeExports.jsx(
80619
80652
  ReactConfetti,
80620
80653
  {
@@ -80629,82 +80662,139 @@ const Connected = React__default.forwardRef(
80629
80662
  style: { zIndex: 3e3 }
80630
80663
  }
80631
80664
  ),
80632
- showFeedBack ? /* @__PURE__ */ jsxRuntimeExports.jsx(
80633
- ConnectSuccessSurvey,
80634
- {
80635
- handleBack: () => setShowFeedBack(false),
80636
- handleDone,
80637
- ref: connectSuccessSurveyRef
80638
- }
80639
- ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(React__default.Fragment, { children: [
80640
- /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.header, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80641
- M,
80665
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.content, children: [
80666
+ showFeedBack ? /* @__PURE__ */ jsxRuntimeExports.jsx(
80667
+ ConnectSuccessSurvey,
80642
80668
  {
80643
- className: "material-symbols-rounded",
80644
- color: "success",
80645
- fill: true,
80646
- name: "check_circle",
80647
- size: 80,
80648
- weight: Fe.Dark
80669
+ handleBack: () => setShowFeedBack(false),
80670
+ handleDone,
80671
+ ref: connectSuccessSurveyRef
80649
80672
  }
80650
- ) }) }),
80651
- /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { children: [
80652
- /* @__PURE__ */ jsxRuntimeExports.jsx(
80673
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(React__default.Fragment, { children: [
80674
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80653
80675
  D,
80654
80676
  {
80655
- component: "h2",
80677
+ component: "h1",
80656
80678
  "data-test": "connected-header",
80657
80679
  style: styles.title,
80658
80680
  truncate: false,
80659
80681
  variant: "H2",
80660
- children: __("Success")
80682
+ children: __("Success!")
80661
80683
  }
80662
- ),
80663
- appName && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(D, { component: "p", "data-test": "connected-secondary-text", style: styles.body, children: __("You have successfully connected %1 to %2.", institutionName, appName) }) }),
80664
- !appName && /* @__PURE__ */ jsxRuntimeExports.jsx(D, { component: "p", "data-test": "connected-secondary-text", style: styles.body, children: __("You have successfully connected to %1.", institutionName) })
80684
+ ) }),
80685
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.progressBarContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.barContainer, children: [
80686
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.logosContainer, children: [
80687
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressLogo, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80688
+ ClientLogo,
80689
+ {
80690
+ alt: "Client logo",
80691
+ clientGuid,
80692
+ size: 64,
80693
+ style: styles.logo
80694
+ }
80695
+ ) }),
80696
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressBackgroundImage, { style: styles.backgroundImage }),
80697
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressLogo, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80698
+ K0,
80699
+ {
80700
+ alt: "Institution logo",
80701
+ institutionGuid: institution.guid,
80702
+ logoUrl: institution.logo_url || "",
80703
+ size: 64,
80704
+ style: styles.logo
80705
+ }
80706
+ ) })
80707
+ ] }),
80708
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressLine, { isActive: true }),
80709
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressCheckMark, {}),
80710
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressLine, { isActive: true, isCentralLine: true }),
80711
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressCheckMark, {}),
80712
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressLine, { isActive: true, isCentralLine: true }),
80713
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressCheckMark, {}),
80714
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ProgressLine, { isActive: true })
80715
+ ] }) }) }),
80716
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80717
+ Button$2,
80718
+ {
80719
+ "data-test": "done-button",
80720
+ fullWidth: true,
80721
+ onClick: handleDone,
80722
+ ref: continueButtonRef,
80723
+ style: styles.button,
80724
+ variant: "contained",
80725
+ children: __("Done")
80726
+ }
80727
+ ) }),
80728
+ typeof onShowConnectSuccessSurvey === "function" && /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80729
+ Button$2,
80730
+ {
80731
+ "data-test": "give-feedback",
80732
+ fullWidth: true,
80733
+ onClick: () => {
80734
+ onShowConnectSuccessSurvey();
80735
+ setShowFeedBack(true);
80736
+ },
80737
+ style: styles.feedbackButton,
80738
+ variant: "text",
80739
+ children: __("Give feedback")
80740
+ }
80741
+ ) })
80665
80742
  ] }),
80666
- /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80667
- Button$2,
80668
- {
80669
- "data-test": "done-button",
80670
- fullWidth: true,
80671
- onClick: handleDone,
80672
- ref: continueButtonRef,
80673
- style: styles.button,
80674
- variant: "contained",
80675
- children: __("Done")
80676
- }
80677
- ) }),
80678
- typeof onShowConnectSuccessSurvey === "function" && /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
80679
- Button$2,
80680
- {
80681
- "data-test": "give-feedback",
80682
- fullWidth: true,
80683
- onClick: () => {
80684
- onShowConnectSuccessSurvey();
80685
- setShowFeedBack(true);
80686
- },
80687
- variant: "text",
80688
- children: __("Give feedback")
80689
- }
80690
- ) }),
80691
- /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(PrivateAndSecure, {}) })
80743
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AriaLive, { level: "assertive", message: ariaLiveRegionMessage, timeout: 100 })
80692
80744
  ] }),
80693
- /* @__PURE__ */ jsxRuntimeExports.jsx(AriaLive, { level: "assertive", message: ariaLiveRegionMessage, timeout: 100 })
80745
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.footer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PoweredByFooter, { aggregator: institution.aggregatorDisplayName }) })
80694
80746
  ] });
80695
80747
  }
80696
80748
  );
80697
80749
  const getStyles$x = (tokens) => {
80698
80750
  return {
80751
+ pageContainer: {
80752
+ display: "flex",
80753
+ flexDirection: "column",
80754
+ minHeight: "100%"
80755
+ },
80756
+ content: {
80757
+ flex: 1,
80758
+ display: "flex",
80759
+ flexDirection: "column"
80760
+ },
80699
80761
  header: {
80700
80762
  display: "flex",
80701
80763
  justifyContent: "center",
80702
80764
  marginTop: "20px",
80703
80765
  marginBottom: tokens.Spacing.Large
80704
80766
  },
80767
+ progressBarContainer: {
80768
+ marginBottom: "48px",
80769
+ textAlign: "center",
80770
+ width: "100%"
80771
+ },
80772
+ barContainer: {
80773
+ alignItems: "center",
80774
+ display: "flex",
80775
+ height: "80px",
80776
+ justifyContent: "center"
80777
+ },
80778
+ logosContainer: {
80779
+ alignItems: "center",
80780
+ boxSizing: "border-box",
80781
+ display: "flex",
80782
+ justifyContent: "space-around",
80783
+ position: "absolute",
80784
+ width: "100%"
80785
+ },
80786
+ logo: {
80787
+ borderRadius: "8px"
80788
+ },
80789
+ backgroundImage: {
80790
+ height: "80px",
80791
+ width: "80px",
80792
+ zIndex: 1
80793
+ },
80705
80794
  title: {
80706
80795
  textAlign: "center",
80707
- marginBottom: tokens.Spacing.Tiny
80796
+ marginBottom: tokens.Spacing.XLarge,
80797
+ marginTop: tokens.Spacing.XLarge
80708
80798
  },
80709
80799
  body: {
80710
80800
  textAlign: "center",
@@ -80713,6 +80803,13 @@ const getStyles$x = (tokens) => {
80713
80803
  },
80714
80804
  button: {
80715
80805
  marginBottom: tokens.Spacing.Small
80806
+ },
80807
+ feedbackButton: {
80808
+ color: tokens.Color.Primary300
80809
+ },
80810
+ footer: {
80811
+ marginTop: "24px",
80812
+ marginBottom: "24px"
80716
80813
  }
80717
80814
  };
80718
80815
  };
@@ -84242,6 +84339,7 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
84242
84339
  const formRef = useRef(null);
84243
84340
  const menuRef = useRef(null);
84244
84341
  const postMessageFunctions = useContext(PostMessageContext);
84342
+ const reduxDispatch = useDispatch();
84245
84343
  const [showDayPicker, setShowDayPicker] = useState(false);
84246
84344
  const [state, dispatch] = useReducer(reducer$1, {
84247
84345
  showForm: false,
@@ -84250,6 +84348,7 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
84250
84348
  accountType: props.availableAccountTypes?.length === 1 ? props.availableAccountTypes[0] : null,
84251
84349
  validationErrors: {}
84252
84350
  });
84351
+ const initialConfig = useSelector(selectInitialConfig);
84253
84352
  useImperativeHandle(ref, () => {
84254
84353
  return {
84255
84354
  handleBackButton() {
@@ -84274,7 +84373,10 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
84274
84373
  };
84275
84374
  const handleGoBackClick = () => {
84276
84375
  postMessageFunctions.onPostMessage(POST_MESSAGES.BACK_TO_SEARCH);
84277
- props.onClose();
84376
+ reduxDispatch({
84377
+ type: ActionTypes$2.GO_BACK_MANUAL_ACCOUNT,
84378
+ payload: initialConfig
84379
+ });
84278
84380
  };
84279
84381
  if (state.showSuccess) {
84280
84382
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -84282,7 +84384,10 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
84282
84384
  {
84283
84385
  accountType: state.accountType,
84284
84386
  handleDone: () => {
84285
- props.onClose();
84387
+ reduxDispatch({
84388
+ type: ActionTypes$2.GO_BACK_MANUAL_ACCOUNT,
84389
+ payload: initialConfig
84390
+ });
84286
84391
  },
84287
84392
  onManualAccountAdded: props.onManualAccountAdded
84288
84393
  }
@@ -84313,7 +84418,6 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
84313
84418
  });
84314
84419
  ManualAccountConnect.propTypes = {
84315
84420
  availableAccountTypes: PropTypes$1.array,
84316
- onClose: PropTypes$1.func.isRequired,
84317
84421
  onManualAccountAdded: PropTypes$1.func
84318
84422
  };
84319
84423
  ManualAccountConnect.displayName = "ManualAccountConnect";
@@ -84351,129 +84455,86 @@ const ADDITIONAL_PRODUCT_OPTIONS = [
84351
84455
  COMBO_JOB_DATA_TYPES.TRANSACTIONS,
84352
84456
  COMBO_JOB_DATA_TYPES.ACCOUNT_NUMBER
84353
84457
  ];
84354
- const AdditionalProductStep = React__default.forwardRef(
84355
- ({
84356
- additionalProductName,
84357
- onNoClick = () => {
84358
- throw new Error("onNoClick not implemented");
84359
- },
84360
- onYesClick = () => {
84361
- throw new Error("onYesClick not implemented");
84362
- }
84363
- }, navigationRef) => {
84364
- const selectedInstitution = useSelector(getSelectedInstitution);
84365
- const { add_aggregation = {}, add_verification = {} } = useSelector(selectLocalizedContent)?.connect?.additional_product_screen || {};
84366
- useImperativeHandle(navigationRef, () => {
84367
- return {
84368
- showBackButton() {
84369
- return true;
84370
- }
84371
- };
84372
- }, []);
84373
- const getNextDelay = getDelay();
84374
- const addAggregationText = {
84375
- title: add_aggregation?.title || __("Add financial management?"),
84376
- body: add_aggregation?.body || __(
84377
- "You're connecting this account for payments and transfers. Would you like to also enable financial management so you can track your income and spending?"
84378
- ),
84379
- acceptButtonText: add_aggregation?.button_1 || __("Yes, add financial management"),
84380
- rejectButtonText: add_aggregation?.button_2 || __("No, only add transfers and payments")
84381
- };
84382
- const addVerificationText = {
84383
- title: add_verification?.title || __("Add transfers and payments?"),
84384
- body: add_verification?.body || __(
84385
- "You're connecting this account for financial management. Would you like to also enable transfers and payments so you can quickly move money to and from this institution?"
84386
- ),
84387
- acceptButtonText: add_verification?.button_1 || __("Yes, add transfers and payments"),
84388
- rejectButtonText: add_verification?.button_2 || __("No, only add financial management")
84389
- };
84390
- const componentText = additionalProductName === COMBO_JOB_DATA_TYPES.TRANSACTIONS ? addAggregationText : addVerificationText;
84391
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
84392
- /* @__PURE__ */ jsxRuntimeExports.jsx(InstitutionBlock, { institution: selectedInstitution, style: { marginBottom: 24 } }),
84393
- /* @__PURE__ */ jsxRuntimeExports.jsx(
84394
- D,
84395
- {
84396
- component: "h2",
84397
- "data-test": "additional-product__title-text",
84398
- style: { marginBottom: 12 },
84399
- truncate: false,
84400
- variant: "H2",
84401
- children: componentText.title
84402
- }
84403
- ),
84404
- /* @__PURE__ */ jsxRuntimeExports.jsx(D, { component: "p", style: { marginBottom: 32 }, truncate: false, variant: "Paragraph", children: componentText.body }),
84405
- /* @__PURE__ */ jsxRuntimeExports.jsx(
84406
- Button$2,
84407
- {
84408
- "data-test": "additional-product__accept-button",
84409
- fullWidth: true,
84410
- onClick: () => {
84411
- onYesClick();
84412
- },
84413
- style: { marginBottom: 8 },
84414
- variant: "contained",
84415
- children: componentText.acceptButtonText
84416
- }
84417
- ),
84418
- /* @__PURE__ */ jsxRuntimeExports.jsx(
84419
- Button$2,
84420
- {
84421
- "data-test": "additional-product__reject-button",
84422
- fullWidth: true,
84423
- onClick: () => {
84424
- onNoClick();
84425
- },
84426
- variant: "text",
84427
- children: componentText.rejectButtonText
84428
- }
84429
- )
84430
- ] });
84431
- }
84432
- );
84433
- AdditionalProductStep.displayName = "AdditionalProductStep";
84434
-
84435
- const useSelectInstitution = () => {
84436
- const { api } = useApi();
84437
- const [institution, setInstitution] = useState(null);
84458
+ const AdditionalProductStep = React__default.forwardRef((_, navigationRef) => {
84438
84459
  const dispatch = useDispatch();
84439
- const consentIsEnabled = useSelector((state) => isConsentEnabled(state));
84440
84460
  const connectConfig = useSelector(selectConnectConfig);
84441
- const handleSelectInstitution = useCallback(
84442
- (institution2) => {
84443
- setInstitution(institution2);
84444
- },
84445
- [institution]
84446
- );
84447
- useEffect(() => {
84448
- if (!institution) return () => {
84461
+ const selectedInstitution = useSelector(getSelectedInstitution);
84462
+ const consentIsEnabled = useSelector(isConsentEnabled);
84463
+ const { add_aggregation = {}, add_verification = {} } = useSelector(selectLocalizedContent)?.connect?.additional_product_screen || {};
84464
+ useImperativeHandle(navigationRef, () => {
84465
+ return {
84466
+ showBackButton() {
84467
+ return true;
84468
+ }
84449
84469
  };
84450
- const selectInstitution$ = from(api.loadInstitutionByGuid(institution.guid)).pipe(
84451
- map((insWithCreds) => {
84452
- return dispatch({
84453
- type: ActionTypes$2.SELECT_INSTITUTION_SUCCESS,
84454
- payload: {
84455
- institution: {
84456
- ...insWithCreds,
84457
- is_disabled_by_client: institutionIsBlockedForCostReasons(institution)
84458
- // Temporary workaround till backend/core is fixed
84459
- },
84460
- consentIsEnabled: consentIsEnabled || false,
84461
- additionalProductOption: connectConfig?.additional_product_option || null
84462
- }
84463
- });
84464
- }),
84465
- catchError((err) => {
84466
- setInstitution(null);
84467
- return of(selectInstitutionError(err));
84468
- })
84469
- ).subscribe((action) => {
84470
- setInstitution(null);
84471
- dispatch(action);
84472
- });
84473
- return () => selectInstitution$.unsubscribe();
84474
- }, [institution]);
84475
- return { handleSelectInstitution };
84476
- };
84470
+ }, []);
84471
+ const getNextDelay = getDelay();
84472
+ const addAggregationText = {
84473
+ title: add_aggregation?.title || __("Add financial management?"),
84474
+ body: add_aggregation?.body || __(
84475
+ "You're connecting this account for payments and transfers. Would you like to also enable financial management so you can track your income and spending?"
84476
+ ),
84477
+ acceptButtonText: add_aggregation?.button_1 || __("Yes, add financial management"),
84478
+ rejectButtonText: add_aggregation?.button_2 || __("No, only add transfers and payments")
84479
+ };
84480
+ const addVerificationText = {
84481
+ title: add_verification?.title || __("Add transfers and payments?"),
84482
+ body: add_verification?.body || __(
84483
+ "You're connecting this account for financial management. Would you like to also enable transfers and payments so you can quickly move money to and from this institution?"
84484
+ ),
84485
+ acceptButtonText: add_verification?.button_1 || __("Yes, add transfers and payments"),
84486
+ rejectButtonText: add_verification?.button_2 || __("No, only add financial management")
84487
+ };
84488
+ const componentText = connectConfig.additional_product_option === COMBO_JOB_DATA_TYPES.TRANSACTIONS ? addAggregationText : addVerificationText;
84489
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
84490
+ /* @__PURE__ */ jsxRuntimeExports.jsx(InstitutionBlock, { institution: selectedInstitution, style: { marginBottom: 24 } }),
84491
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
84492
+ D,
84493
+ {
84494
+ component: "h2",
84495
+ "data-test": "additional-product__title-text",
84496
+ style: { marginBottom: 12 },
84497
+ truncate: false,
84498
+ variant: "H2",
84499
+ children: componentText.title
84500
+ }
84501
+ ),
84502
+ /* @__PURE__ */ jsxRuntimeExports.jsx(D, { component: "p", style: { marginBottom: 32 }, truncate: false, variant: "Paragraph", children: componentText.body }),
84503
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
84504
+ Button$2,
84505
+ {
84506
+ "data-test": "additional-product__accept-button",
84507
+ fullWidth: true,
84508
+ onClick: () => {
84509
+ dispatch(
84510
+ connectConfig?.additional_product_option === COMBO_JOB_DATA_TYPES.ACCOUNT_NUMBER ? addVerificationData({ consentIsEnabled }) : addAggregationData({ consentIsEnabled })
84511
+ );
84512
+ },
84513
+ style: { marginBottom: 8 },
84514
+ variant: "contained",
84515
+ children: componentText.acceptButtonText
84516
+ }
84517
+ ),
84518
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
84519
+ Button$2,
84520
+ {
84521
+ "data-test": "additional-product__reject-button",
84522
+ fullWidth: true,
84523
+ onClick: () => {
84524
+ dispatch({
84525
+ type: ActionTypes$2.REJECT_ADDITIONAL_PRODUCT,
84526
+ payload: {
84527
+ consentIsEnabled
84528
+ }
84529
+ });
84530
+ },
84531
+ variant: "text",
84532
+ children: componentText.rejectButtonText
84533
+ }
84534
+ )
84535
+ ] });
84536
+ });
84537
+ AdditionalProductStep.displayName = "AdditionalProductStep";
84477
84538
 
84478
84539
  const getConsentDataClusters = () => {
84479
84540
  const dataClusters = {
@@ -84653,13 +84714,14 @@ const getStyles$8 = () => {
84653
84714
  };
84654
84715
 
84655
84716
  const DynamicDisclosure = React__default.forwardRef(
84656
- ({ onConsentClick, onGoBackClick }, navigationRef) => {
84717
+ ({ onGoBackClick }, navigationRef) => {
84657
84718
  const [name, path] = PageviewInfo.CONNECT_DYNAMIC_DISCLOSURE;
84658
84719
  useAnalyticsPath(name, path);
84659
84720
  const containerRef = useRef(null);
84660
84721
  const tokens = J0();
84661
84722
  const styles = getStyles$7(tokens);
84662
84723
  const getNextDelay = getDelay();
84724
+ const dispatch = useDispatch();
84663
84725
  const institution = useSelector((state) => state.connect.selectedInstitution);
84664
84726
  const appName = useSelector((state) => state.profiles.client.oauth_app_name || null);
84665
84727
  const [dialogIsOpen, setDialogIsOpen] = React__default.useState(false);
@@ -84733,7 +84795,7 @@ const DynamicDisclosure = React__default.forwardRef(
84733
84795
  if (["es", "fr-ca"].includes(initialLocal) && initialLocal !== getLocale()) {
84734
84796
  setLocale(initialLocal);
84735
84797
  }
84736
- onConsentClick();
84798
+ dispatch({ type: ActionTypes$2.USER_CONSENTED });
84737
84799
  },
84738
84800
  sx: styles.button,
84739
84801
  variant: "contained",
@@ -84892,7 +84954,6 @@ const RenderConnectStep = (props) => {
84892
84954
  const selectedInstitution = useSelector(getSelectedInstitution);
84893
84955
  const updateCredentials = useSelector((state) => state.connect.updateCredentials);
84894
84956
  const verifyMemberError = useSelector((state) => state.connect.error);
84895
- const consentIsEnabled = useSelector((state) => isConsentEnabled(state));
84896
84957
  const { handleSelectInstitution } = useSelectInstitution();
84897
84958
  const dispatch = useDispatch();
84898
84959
  const tokens = useTokens();
@@ -84903,100 +84964,32 @@ const RenderConnectStep = (props) => {
84903
84964
  clientProfile.is_microdeposits_enabled && // Client supports MDV
84904
84965
  widgetProfile.show_microdeposits_in_connect;
84905
84966
  const hasAtriumAPI = client.has_atrium_api;
84906
- const isManualAccountsEnabled = widgetProfile.enable_manual_accounts && mode === AGG_MODE && !hasAtriumAPI;
84907
84967
  const showSupport = widgetProfile.enable_support_requests && mode === AGG_MODE;
84908
- const usePopularOnly = (clientProfile.uses_custom_popular_institution_list ?? false) || (client.has_limited_institutions ?? false);
84909
84968
  const isDeleteInstitutionOptionEnabled = widgetProfile?.display_delete_option_in_connect ?? true;
84910
- const handleInstitutionSelect = (institution) => {
84911
- postMessageFunctions.onPostMessage(
84912
- "connect/selectedInstitution",
84913
- _pick(institution, ["name", "guid", "url", "code"])
84914
- );
84915
- handleSelectInstitution(institution);
84916
- };
84917
84969
  let connectStepView = null;
84918
84970
  if (step === STEPS.DISCLOSURE) {
84919
- connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(
84920
- Disclosure,
84921
- {
84922
- mode,
84923
- onContinue: () => dispatch({ type: ActionTypes$2.ACCEPT_DISCLOSURE, payload: connectConfig }),
84924
- ref: props.navigationRef,
84925
- size
84926
- }
84927
- );
84971
+ connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(Disclosure, { ref: props.navigationRef });
84928
84972
  } else if (step === STEPS.SEARCH) {
84929
- connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(
84930
- Search$2,
84931
- {
84932
- connectConfig,
84933
- connectedMembers,
84934
- enableManualAccounts: isManualAccountsEnabled,
84935
- enableSupportRequests: showSupport,
84936
- isMicrodepositsEnabled,
84937
- onAddManualAccountClick: props.handleAddManualAccountClick,
84938
- onInstitutionSelect: handleInstitutionSelect,
84939
- ref: props.navigationRef,
84940
- size,
84941
- stepToMicrodeposits: () => dispatch(stepToMicrodeposits$1()),
84942
- usePopularOnly
84943
- }
84944
- );
84973
+ connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(Search$2, { ref: props.navigationRef });
84945
84974
  } else if (step === STEPS.INSTITUTION_DISABLED) {
84946
84975
  connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(InstitutionDisabled, { ref: props.navigationRef });
84947
84976
  } else if (step === STEPS.CONSENT) {
84948
84977
  connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
84949
84978
  DynamicDisclosure,
84950
84979
  {
84951
- onConsentClick: () => {
84952
- dispatch({ type: ActionTypes$2.USER_CONSENTED });
84953
- },
84954
- onGoBackClick: () => {
84955
- props.handleConsentGoBack();
84956
- },
84980
+ onGoBackClick: () => props.handleConsentGoBack(),
84957
84981
  ref: props.navigationRef
84958
84982
  }
84959
84983
  ) });
84960
84984
  } else if (step === STEPS.ADDITIONAL_PRODUCT) {
84961
- if (!ADDITIONAL_PRODUCT_OPTIONS.includes(connectConfig?.additional_product_option)) {
84985
+ if (!ADDITIONAL_PRODUCT_OPTIONS.includes(connectConfig?.additional_product_option))
84962
84986
  throw new Error("invalid product offer");
84963
- }
84964
- const onNoClick = () => {
84965
- dispatch({
84966
- type: ActionTypes$2.REJECT_ADDITIONAL_PRODUCT,
84967
- payload: {
84968
- consentIsEnabled
84969
- }
84970
- });
84971
- };
84972
- let onYesClick = null;
84973
- if (connectConfig?.additional_product_option === COMBO_JOB_DATA_TYPES.ACCOUNT_NUMBER) {
84974
- onYesClick = () => {
84975
- dispatch(addVerificationData({ consentIsEnabled }));
84976
- };
84977
- } else if (connectConfig?.additional_product_option === COMBO_JOB_DATA_TYPES.TRANSACTIONS) {
84978
- onYesClick = () => {
84979
- dispatch(addAggregationData({ consentIsEnabled }));
84980
- };
84981
- }
84982
- connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(
84983
- AdditionalProductStep,
84984
- {
84985
- additionalProductName: connectConfig.additional_product_option,
84986
- onNoClick,
84987
- onYesClick,
84988
- ref: props.navigationRef
84989
- }
84990
- );
84987
+ connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(AdditionalProductStep, { ref: props.navigationRef });
84991
84988
  } else if (step === STEPS.ADD_MANUAL_ACCOUNT) {
84992
84989
  connectStepView = /* @__PURE__ */ jsxRuntimeExports.jsx(
84993
84990
  ManualAccountConnect,
84994
84991
  {
84995
84992
  availableAccountTypes: props.availableAccountTypes,
84996
- onClose: () => dispatch({
84997
- type: ActionTypes$2.GO_BACK_MANUAL_ACCOUNT,
84998
- payload: initialConfig
84999
- }),
85000
84993
  onManualAccountAdded: props.onManualAccountAdded,
85001
84994
  ref: props.navigationRef
85002
84995
  }
@@ -85159,7 +85152,6 @@ const RenderConnectStep = (props) => {
85159
85152
  };
85160
85153
  RenderConnectStep.propTypes = {
85161
85154
  availableAccountTypes: PropTypes$1.array,
85162
- handleAddManualAccountClick: PropTypes$1.func.isRequired,
85163
85155
  handleConsentGoBack: PropTypes$1.func.isRequired,
85164
85156
  handleCredentialsGoBack: PropTypes$1.func.isRequired,
85165
85157
  handleOAuthGoBack: PropTypes$1.func.isRequired,
@@ -87330,9 +87322,6 @@ const Connect$2 = ({
87330
87322
  loadConnect(props.clientConfig);
87331
87323
  }
87332
87324
  }, [isLoading, step, props.clientConfig]);
87333
- const _handleAddManualAccountClick = () => {
87334
- dispatch(stepToAddManualAccount$1());
87335
- };
87336
87325
  const _handleConsentGoBack = () => {
87337
87326
  if (state.returnToMicrodeposits) {
87338
87327
  dispatch(stepToMicrodeposits$1());
@@ -87425,7 +87414,6 @@ const Connect$2 = ({
87425
87414
  RenderConnectStep,
87426
87415
  {
87427
87416
  availableAccountTypes,
87428
- handleAddManualAccountClick: _handleAddManualAccountClick,
87429
87417
  handleConsentGoBack: _handleConsentGoBack,
87430
87418
  handleCredentialsGoBack: _handleCredentialsGoBack,
87431
87419
  handleOAuthGoBack: _handleOAuthGoBack,
@@ -87515,7 +87503,6 @@ const Edge$1 = "Edge";
87515
87503
  const Chrome$1 = "Chrome";
87516
87504
  const Firefox$1 = "Firefox";
87517
87505
  const Dismiss$1 = "Rejeter";
87518
- const Success$1 = "Succès";
87519
87506
  const Spanish$1 = "Espagnol";
87520
87507
  const French$1 = "Français";
87521
87508
  const English$1 = "Anglais";
@@ -87856,9 +87843,6 @@ const frCa = {
87856
87843
  "Please try linking a checking or savings account.": "Veuillez essayer de lier un compte courant ou un compte d'épargne.",
87857
87844
  "Choose an institution that’s already connected and select accounts to share, or search for a different one.": "Choisissez une institution déjà connectée et sélectionnez les comptes à partager, ou recherchez-en un autre.",
87858
87845
  "You have successfully connected to %1": "Vous vous êtes connecté avec succès à %1",
87859
- Success: Success$1,
87860
- "You have successfully connected to %1.": "Vous vous êtes connecté avec succès à %1.",
87861
- "You have successfully connected %1 to %2.": "Vous avez réussi à connecter %1 à %2",
87862
87846
  "Go back": "Retourner",
87863
87847
  "Account Information": "Informations sur le compte",
87864
87848
  "Account type and description": "Type de compte et description",
@@ -87938,6 +87922,14 @@ const frCa = {
87938
87922
  "Logo for %1": "Logo pour %1",
87939
87923
  "Free %1 Connections Are No Longer Available": "Les connexions gratuites %1 ne sont plus disponibles",
87940
87924
  "%1 now charges a fee for us to access your account data. To avoid passing that cost on to you, we no longer support %1 connections.": "$1 facture désormais des frais pour accéder à vos données de compte. Pour éviter de vous les répercuter, nous ne prenons plus en charge les connexions $1.",
87925
+ "Success!": "Succès!",
87926
+ "No accounts found": "Aucun compte trouvé",
87927
+ "Return to institution selection": "Retour à la sélection des établissements",
87928
+ "Additional permissions needed": "Autorisations supplémentaires nécessaires",
87929
+ "Review instructions": "Instructions de révision",
87930
+ "Unable to connect": "Impossible de se connecter",
87931
+ "Maintenance in progress": "Entretien en cours",
87932
+ "Deposits verified. You're almost done setting things up. Continue to your institution.": "Dépôts vérifiés. Vous avez presque terminé la configuration. Rendez-vous dans votre établissement.",
87941
87933
  "connect/disclosure/policy/text\u0004By clicking Continue, you agree to the ": "En cliquant sur Continuer, vous acceptez la ",
87942
87934
  "connect/disclosure/policy/link\u0004MX Privacy Policy.": "Politique de confidentialité de MX.",
87943
87935
  "connect/disclosure/policy/link\u0004MX Privacy Policy": "Politique de confidentialité de MX.",
@@ -88012,7 +88004,6 @@ const Edge = "Edge";
88012
88004
  const Chrome = "Chrome";
88013
88005
  const Firefox = "Firefox";
88014
88006
  const Dismiss = "Descartar";
88015
- const Success = "Éxito";
88016
88007
  const Spanish = "Español";
88017
88008
  const French = "Francés";
88018
88009
  const English = "Inglés";
@@ -88356,9 +88347,6 @@ const es = {
88356
88347
  "Please try linking a checking or savings account.": "Intente vincular una cuenta corriente o de ahorros.",
88357
88348
  "Choose an institution that’s already connected and select accounts to share, or search for a different one.": "Elija una institución que ya esté conectada y seleccione cuentas para compartir. o buscar uno diferente.",
88358
88349
  "You have successfully connected to %1": "Te has conectado correctamente a %1",
88359
- Success: Success,
88360
- "You have successfully connected to %1.": "Te has conectado correctamente a %1.",
88361
- "You have successfully connected %1 to %2.": "Has conectado correctamente %1 a %2.",
88362
88350
  "Account Information": "Información de la cuenta",
88363
88351
  "Account type and description": "Tipo de cuenta y descripción",
88364
88352
  "Credit limits": "Límites de crédito",
@@ -88437,6 +88425,14 @@ const es = {
88437
88425
  "Logo for %1": "Logotipo de %1",
88438
88426
  "Free %1 Connections Are No Longer Available": "Las conexiones gratuitas de %1 ya no están disponibles",
88439
88427
  "%1 now charges a fee for us to access your account data. To avoid passing that cost on to you, we no longer support %1 connections.": "%1 ahora cobra una comisión por acceder a los datos de su cuenta. Para evitar que usted pague ese costo, ya no ofrecemos conexiones con %1.",
88428
+ "Success!": "¡Éxito!",
88429
+ "No accounts found": "No se encontraron cuentas",
88430
+ "Return to institution selection": "Volver a la selección de instituciones",
88431
+ "Additional permissions needed": "Se necesitan permisos adicionales",
88432
+ "Review instructions": "Revisar instrucciones",
88433
+ "Unable to connect": "No se puede conectar",
88434
+ "Maintenance in progress": "Mantenimiento en curso",
88435
+ "Deposits verified. You're almost done setting things up. Continue to your institution.": "Depósitos verificados. Ya casi terminas de configurar todo. Continúa con tu institución.",
88440
88436
  "connect/disclosure/button\u0004Continue": "Continuar",
88441
88437
  "connect/disclosure/policy/text\u0004By clicking Continue, you agree to the ": "Al hacer clic en Continuar, tu aceptas la ",
88442
88438
  "connect/disclosure/policy/link\u0004MX Privacy Policy.": "Política de privacidad de Money Experience.",