@mxenabled/connect-widget 0.20.7 → 1.1.0
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 +103 -57
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5087,23 +5087,39 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
|
|
|
5087
5087
|
}
|
|
5088
5088
|
var _baseFindIndex = baseFindIndex$2;
|
|
5089
5089
|
|
|
5090
|
-
var
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
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;
|
|
5096
5105
|
}
|
|
5097
|
-
var _trimmedEndIndex = trimmedEndIndex$1;
|
|
5098
5106
|
|
|
5099
|
-
var
|
|
5100
|
-
var
|
|
5101
|
-
|
|
5102
|
-
|
|
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;
|
|
5103
5120
|
}
|
|
5104
|
-
var _baseTrim = baseTrim$1;
|
|
5105
5121
|
|
|
5106
|
-
var baseTrim =
|
|
5122
|
+
var baseTrim = require_baseTrim(), isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
|
|
5107
5123
|
var NAN = 0 / 0;
|
|
5108
5124
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
5109
5125
|
var reIsBinary = /^0b[01]+$/i;
|
|
@@ -8559,7 +8575,7 @@ var hasRequiredTrim;
|
|
|
8559
8575
|
function requireTrim () {
|
|
8560
8576
|
if (hasRequiredTrim) return trim_1;
|
|
8561
8577
|
hasRequiredTrim = 1;
|
|
8562
|
-
var baseToString = _baseToString, baseTrim =
|
|
8578
|
+
var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
|
|
8563
8579
|
function trim(string, chars, guard) {
|
|
8564
8580
|
string = toString(string);
|
|
8565
8581
|
if (string && (guard || chars === void 0)) {
|
|
@@ -8967,7 +8983,7 @@ const COMBO_JOB_DATA_TYPES = {
|
|
|
8967
8983
|
TRANSACTIONS: "transactions",
|
|
8968
8984
|
REWARDS: "rewards"};
|
|
8969
8985
|
|
|
8970
|
-
const initialState$
|
|
8986
|
+
const initialState$6 = {
|
|
8971
8987
|
_initialValues: "",
|
|
8972
8988
|
is_mobile_webview: false,
|
|
8973
8989
|
target_origin_referrer: null,
|
|
@@ -8995,7 +9011,7 @@ const initialState$5 = {
|
|
|
8995
9011
|
};
|
|
8996
9012
|
const configSlice = createSlice({
|
|
8997
9013
|
name: "config",
|
|
8998
|
-
initialState: initialState$
|
|
9014
|
+
initialState: initialState$6,
|
|
8999
9015
|
reducers: {
|
|
9000
9016
|
addVerificationData: (state) => {
|
|
9001
9017
|
if (state.mode === AGG_MODE) {
|
|
@@ -9122,9 +9138,9 @@ function _additionalProductReset(state) {
|
|
|
9122
9138
|
const initialValuesObject = convertInitialValuesToObject(state._initialValues);
|
|
9123
9139
|
return {
|
|
9124
9140
|
...state,
|
|
9125
|
-
include_transactions: initialValuesObject?.include_transactions ?? initialState$
|
|
9126
|
-
mode: initialValuesObject?.mode ?? initialState$
|
|
9127
|
-
use_cases: initialValuesObject?.use_cases ?? initialState$
|
|
9141
|
+
include_transactions: initialValuesObject?.include_transactions ?? initialState$6.include_transactions,
|
|
9142
|
+
mode: initialValuesObject?.mode ?? initialState$6.mode,
|
|
9143
|
+
use_cases: initialValuesObject?.use_cases ?? initialState$6.use_cases
|
|
9128
9144
|
};
|
|
9129
9145
|
}
|
|
9130
9146
|
const { addVerificationData, addAggregationData, additionalProductReset } = configSlice.actions;
|
|
@@ -9175,7 +9191,7 @@ const loadConnect = (state, { payload }) => {
|
|
|
9175
9191
|
};
|
|
9176
9192
|
const loadConnectSuccess = (state, action) => {
|
|
9177
9193
|
const {
|
|
9178
|
-
members,
|
|
9194
|
+
members = [],
|
|
9179
9195
|
member,
|
|
9180
9196
|
microdeposit,
|
|
9181
9197
|
config = {},
|
|
@@ -9544,7 +9560,7 @@ function getStartingStep(members, member, microdeposit, config, institution, wid
|
|
|
9544
9560
|
}
|
|
9545
9561
|
function getStepFromMember(member) {
|
|
9546
9562
|
const connection_status = member.connection_status;
|
|
9547
|
-
if (member?.
|
|
9563
|
+
if (member?.error?.error_code && canHandleActionableError(member?.error?.error_code) || hasNoSingleAccountSelectOptions(member))
|
|
9548
9564
|
return STEPS.ACTIONABLE_ERROR;
|
|
9549
9565
|
else if (connection_status === ReadableStatuses$1.CHALLENGED)
|
|
9550
9566
|
return STEPS.MFA;
|
|
@@ -9638,7 +9654,7 @@ const connect = createReducer(defaultState$1, {
|
|
|
9638
9654
|
[addAggregationData().type]: continueAfterAdditionalProduct
|
|
9639
9655
|
});
|
|
9640
9656
|
|
|
9641
|
-
const initialState$
|
|
9657
|
+
const initialState$5 = {
|
|
9642
9658
|
loading: true,
|
|
9643
9659
|
client: {},
|
|
9644
9660
|
clientColorScheme: {
|
|
@@ -9657,7 +9673,7 @@ const initialState$4 = {
|
|
|
9657
9673
|
};
|
|
9658
9674
|
const profilesSlice = createSlice({
|
|
9659
9675
|
name: "profiles",
|
|
9660
|
-
initialState: initialState$
|
|
9676
|
+
initialState: initialState$5,
|
|
9661
9677
|
reducers: {
|
|
9662
9678
|
loadProfiles: (state, action) => {
|
|
9663
9679
|
const {
|
|
@@ -9700,12 +9716,12 @@ const isFeatureEnabled = (userFeatures, featureName) => {
|
|
|
9700
9716
|
const CONNECT_COMBO_JOBS = "CONNECT_COMBO_JOBS";
|
|
9701
9717
|
const CONNECT_CONSENT = "CONNECT_CONSENT";
|
|
9702
9718
|
|
|
9703
|
-
const initialState$
|
|
9719
|
+
const initialState$4 = {
|
|
9704
9720
|
items: []
|
|
9705
9721
|
};
|
|
9706
9722
|
const userFeaturesSlice = createSlice({
|
|
9707
9723
|
name: "userFeatures",
|
|
9708
|
-
initialState: initialState$
|
|
9724
|
+
initialState: initialState$4,
|
|
9709
9725
|
reducers: {
|
|
9710
9726
|
loadUserFeatures(state, action) {
|
|
9711
9727
|
state.items = action.payload;
|
|
@@ -13008,7 +13024,7 @@ const browser = (state = { height: 0, isMobile: false, isTablet: false, size: ""
|
|
|
13008
13024
|
}
|
|
13009
13025
|
};
|
|
13010
13026
|
|
|
13011
|
-
const initialState$
|
|
13027
|
+
const initialState$3 = {
|
|
13012
13028
|
currentSession: {},
|
|
13013
13029
|
featureVisit: {},
|
|
13014
13030
|
path: [],
|
|
@@ -13016,7 +13032,7 @@ const initialState$2 = {
|
|
|
13016
13032
|
};
|
|
13017
13033
|
const analyticsSlice = createSlice({
|
|
13018
13034
|
name: "analytics",
|
|
13019
|
-
initialState: initialState$
|
|
13035
|
+
initialState: initialState$3,
|
|
13020
13036
|
reducers: {
|
|
13021
13037
|
analyticsSessionInitialized: (state, action) => {
|
|
13022
13038
|
state.currentSession = action.payload;
|
|
@@ -13040,12 +13056,30 @@ const {
|
|
|
13040
13056
|
} = analyticsSlice.actions;
|
|
13041
13057
|
const analyticsSlice$1 = analyticsSlice.reducer;
|
|
13042
13058
|
|
|
13059
|
+
const initialState$2 = {};
|
|
13060
|
+
const localizedContentSlice = createSlice({
|
|
13061
|
+
name: "localizedContent",
|
|
13062
|
+
initialState: initialState$2,
|
|
13063
|
+
reducers: {
|
|
13064
|
+
setLocalizedContent(_state, action) {
|
|
13065
|
+
return action.payload;
|
|
13066
|
+
}
|
|
13067
|
+
}
|
|
13068
|
+
});
|
|
13069
|
+
const { setLocalizedContent } = localizedContentSlice.actions;
|
|
13070
|
+
const localizedContentSlice$1 = localizedContentSlice.reducer;
|
|
13071
|
+
const selectLocalizedContent = createSelector(
|
|
13072
|
+
(state) => state.localizedContent,
|
|
13073
|
+
(localizedContent) => localizedContent
|
|
13074
|
+
);
|
|
13075
|
+
|
|
13043
13076
|
const rootReducer = combineReducers({
|
|
13044
13077
|
analytics: analyticsSlice$1,
|
|
13045
13078
|
app,
|
|
13046
13079
|
browser,
|
|
13047
13080
|
config: configSlice$1,
|
|
13048
13081
|
connect,
|
|
13082
|
+
localizedContent: localizedContentSlice$1,
|
|
13049
13083
|
profiles: profilesSlice$1,
|
|
13050
13084
|
userFeatures: userFeaturesSlice$1
|
|
13051
13085
|
});
|
|
@@ -68906,13 +68940,13 @@ const DEFAULT_POLLING_STATE = {
|
|
|
68906
68940
|
userMessage: CONNECTING_MESSAGES.STARTING
|
|
68907
68941
|
// message to show the end user
|
|
68908
68942
|
};
|
|
68909
|
-
function pollMember(memberGuid, api, onPostMessage, sendPosthogEvent) {
|
|
68943
|
+
function pollMember(memberGuid, api, onPostMessage, sendPosthogEvent, clientLocale) {
|
|
68910
68944
|
return interval(3e3).pipe(
|
|
68911
68945
|
switchMap(
|
|
68912
68946
|
() => (
|
|
68913
68947
|
// Poll the currentMember. Catch errors but don't handle it here
|
|
68914
68948
|
// the scan will handle it below
|
|
68915
|
-
defer(() => api.loadMemberByGuid(memberGuid)).pipe(
|
|
68949
|
+
defer(() => api.loadMemberByGuid(memberGuid, clientLocale)).pipe(
|
|
68916
68950
|
mergeMap(
|
|
68917
68951
|
(member) => defer(() => api.loadJob(member.most_recent_job_guid)).pipe(
|
|
68918
68952
|
map((job) => {
|
|
@@ -70908,6 +70942,9 @@ const CreateMemberForm = (props) => {
|
|
|
70908
70942
|
const config = useSelector(selectConfig);
|
|
70909
70943
|
const isHuman = useSelector((state2) => state2.app.humanEvent);
|
|
70910
70944
|
const currentMembers = useSelector((state2) => state2.connect.members);
|
|
70945
|
+
const clientLocale = useMemo(() => {
|
|
70946
|
+
return document.querySelector("html")?.getAttribute("lang") || "en";
|
|
70947
|
+
}, [document.querySelector("html")?.getAttribute("lang")]);
|
|
70911
70948
|
const [isCreatingMember, setIsCreatingMember] = useState(false);
|
|
70912
70949
|
const [memberCreateError, setMemberCreateError] = useState(null);
|
|
70913
70950
|
const [userCredentials, setUserCredentials] = useState(null);
|
|
@@ -70990,7 +71027,7 @@ const CreateMemberForm = (props) => {
|
|
|
70990
71027
|
};
|
|
70991
71028
|
})
|
|
70992
71029
|
);
|
|
70993
|
-
return defer(() => api.loadMemberByGuid(memberGuid)).pipe(
|
|
71030
|
+
return defer(() => api.loadMemberByGuid(memberGuid, clientLocale)).pipe(
|
|
70994
71031
|
mergeMap((member) => {
|
|
70995
71032
|
const shouldStepToMFA = member.connection_status === ReadableStatuses$1.CHALLENGED;
|
|
70996
71033
|
return shouldStepToMFA ? stepToMFA$(member) : updateMember$;
|
|
@@ -71354,6 +71391,9 @@ const Connecting = (props) => {
|
|
|
71354
71391
|
} = props;
|
|
71355
71392
|
const selectedInstitution = useSelector(getSelectedInstitution);
|
|
71356
71393
|
const sendPosthogEvent = useAnalyticsEvent();
|
|
71394
|
+
const clientLocale = useMemo(() => {
|
|
71395
|
+
return document.querySelector("html")?.getAttribute("lang") || "en";
|
|
71396
|
+
}, [document.querySelector("html")?.getAttribute("lang")]);
|
|
71357
71397
|
const currentMember = useSelector(getCurrentMember);
|
|
71358
71398
|
const isComboJobsEnabled = useSelector(isConnectComboJobsEnabled);
|
|
71359
71399
|
const jobSchedule = useSelector((state) => state.connect.jobSchedule);
|
|
@@ -71479,7 +71519,7 @@ const Connecting = (props) => {
|
|
|
71479
71519
|
const startJob$ = defer(
|
|
71480
71520
|
() => api.runJob(activeJob?.type, currentMember.guid, connectConfig, true)
|
|
71481
71521
|
).pipe(
|
|
71482
|
-
mergeMap(() => api.loadMemberByGuid(currentMember.guid)),
|
|
71522
|
+
mergeMap(() => api.loadMemberByGuid(currentMember.guid, clientLocale)),
|
|
71483
71523
|
catchError((error) => {
|
|
71484
71524
|
const isSafeConflictError = error?.response?.status === 409;
|
|
71485
71525
|
if (isSafeConflictError) {
|
|
@@ -71492,7 +71532,7 @@ const Connecting = (props) => {
|
|
|
71492
71532
|
return needsJobStarted ? startJob$ : of(currentMember);
|
|
71493
71533
|
}).pipe(
|
|
71494
71534
|
concatMap(
|
|
71495
|
-
(member) => pollMember(member.guid, api, onPostMessage, sendPosthogEvent).pipe(
|
|
71535
|
+
(member) => pollMember(member.guid, api, onPostMessage, sendPosthogEvent, clientLocale).pipe(
|
|
71496
71536
|
tap((pollingState) => handleMemberPoll(pollingState)),
|
|
71497
71537
|
filter((pollingState) => pollingState.jobIsDone),
|
|
71498
71538
|
pluck("currentResponse"),
|
|
@@ -72118,7 +72158,7 @@ const ActionableError = () => {
|
|
|
72118
72158
|
const institution = useSelector((state) => state.connect.selectedInstitution);
|
|
72119
72159
|
const currentMember = useSelector(getCurrentMember);
|
|
72120
72160
|
const initialConfig = useSelector(selectInitialConfig);
|
|
72121
|
-
const jobDetailCode = currentMember.
|
|
72161
|
+
const jobDetailCode = currentMember.error.error_code;
|
|
72122
72162
|
const tokens = useTokens();
|
|
72123
72163
|
const styles = getStyles$A(tokens);
|
|
72124
72164
|
const getNextDelay = getDelay();
|
|
@@ -72127,10 +72167,6 @@ const ActionableError = () => {
|
|
|
72127
72167
|
() => ({
|
|
72128
72168
|
[ACTIONABLE_ERROR_CODES.NO_ELIGIBLE_ACCOUNTS]: {
|
|
72129
72169
|
title: __("No eligible accounts"),
|
|
72130
|
-
userMessage: (institution2) => __(
|
|
72131
|
-
"Only checking or savings accounts can be used for transfers. If you have one at %1, make sure to select it when connecting. Otherwise, try connecting a different institution.",
|
|
72132
|
-
institution2.name
|
|
72133
|
-
),
|
|
72134
72170
|
primaryAction: {
|
|
72135
72171
|
label: __("Log in again"),
|
|
72136
72172
|
action: () => dispatch({ type: ActionTypes$2.ACTIONABLE_ERROR_LOG_IN_AGAIN })
|
|
@@ -72186,7 +72222,7 @@ const ActionableError = () => {
|
|
|
72186
72222
|
style: styles.paragraph,
|
|
72187
72223
|
truncate: false,
|
|
72188
72224
|
variant: "Paragraph",
|
|
72189
|
-
children:
|
|
72225
|
+
children: currentMember.error.user_message
|
|
72190
72226
|
}
|
|
72191
72227
|
)
|
|
72192
72228
|
] }),
|
|
@@ -76175,6 +76211,9 @@ const ManualAccountForm = React__default.forwardRef(
|
|
|
76175
76211
|
useAnalyticsPath(name, path);
|
|
76176
76212
|
const { api } = useApi();
|
|
76177
76213
|
const members = useSelector(getMembers);
|
|
76214
|
+
const clientLocale = useMemo(() => {
|
|
76215
|
+
return document.querySelector("html")?.getAttribute("lang") || "en";
|
|
76216
|
+
}, [document.querySelector("html")?.getAttribute("lang")]);
|
|
76178
76217
|
const [saving, setSaving] = useState(false);
|
|
76179
76218
|
const [isPersonal, setIsPersonal] = useState(true);
|
|
76180
76219
|
const [returnField, setReturnField] = useState(null);
|
|
@@ -76262,7 +76301,7 @@ const ManualAccountForm = React__default.forwardRef(
|
|
|
76262
76301
|
return of(addManualAccountSuccess(savedAccount));
|
|
76263
76302
|
}
|
|
76264
76303
|
return zip(
|
|
76265
|
-
from(api.loadMemberByGuid(savedAccount.member_guid)),
|
|
76304
|
+
from(api.loadMemberByGuid(savedAccount.member_guid, clientLocale)),
|
|
76266
76305
|
from(api.loadInstitutionByGuid(savedAccount.institution_guid))
|
|
76267
76306
|
).pipe(
|
|
76268
76307
|
map(([loadedMember, loadedInstitution]) => {
|
|
@@ -76805,6 +76844,7 @@ const AdditionalProductStep = React__default.forwardRef(
|
|
|
76805
76844
|
}
|
|
76806
76845
|
}, navigationRef) => {
|
|
76807
76846
|
const selectedInstitution = useSelector(getSelectedInstitution);
|
|
76847
|
+
const { add_aggregation = {}, add_verification = {} } = useSelector(selectLocalizedContent)?.connect?.additional_product_screen || {};
|
|
76808
76848
|
useImperativeHandle(navigationRef, () => {
|
|
76809
76849
|
return {
|
|
76810
76850
|
showBackButton() {
|
|
@@ -76814,20 +76854,20 @@ const AdditionalProductStep = React__default.forwardRef(
|
|
|
76814
76854
|
}, []);
|
|
76815
76855
|
const getNextDelay = getDelay();
|
|
76816
76856
|
const addAggregationText = {
|
|
76817
|
-
title: __("Add financial management?"),
|
|
76818
|
-
body: __(
|
|
76857
|
+
title: add_aggregation?.title || __("Add financial management?"),
|
|
76858
|
+
body: add_aggregation?.body || __(
|
|
76819
76859
|
"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?"
|
|
76820
76860
|
),
|
|
76821
|
-
acceptButtonText: __("Yes, add financial management"),
|
|
76822
|
-
rejectButtonText: __("No, only add transfers and payments")
|
|
76861
|
+
acceptButtonText: add_aggregation?.button_1 || __("Yes, add financial management"),
|
|
76862
|
+
rejectButtonText: add_aggregation?.button_2 || __("No, only add transfers and payments")
|
|
76823
76863
|
};
|
|
76824
76864
|
const addVerificationText = {
|
|
76825
|
-
title: __("Add transfers and payments?"),
|
|
76826
|
-
body: __(
|
|
76865
|
+
title: add_verification?.title || __("Add transfers and payments?"),
|
|
76866
|
+
body: add_verification?.body || __(
|
|
76827
76867
|
"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?"
|
|
76828
76868
|
),
|
|
76829
|
-
acceptButtonText: __("Yes, add transfers and payments"),
|
|
76830
|
-
rejectButtonText: __("No, only add financial management")
|
|
76869
|
+
acceptButtonText: add_verification?.button_1 || __("Yes, add transfers and payments"),
|
|
76870
|
+
rejectButtonText: add_verification?.button_2 || __("No, only add financial management")
|
|
76831
76871
|
};
|
|
76832
76872
|
const componentText = additionalProductName === COMBO_JOB_DATA_TYPES.TRANSACTIONS ? addAggregationText : addVerificationText;
|
|
76833
76873
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
|
|
@@ -77515,8 +77555,8 @@ const RenderConnectStep = (props) => {
|
|
|
77515
77555
|
}
|
|
77516
77556
|
);
|
|
77517
77557
|
} else if (step === STEPS.ACTIONABLE_ERROR) {
|
|
77518
|
-
const
|
|
77519
|
-
connectStepView = canHandleActionableError(
|
|
77558
|
+
const errorCode = currentMember?.error?.error_code ?? null;
|
|
77559
|
+
connectStepView = canHandleActionableError(errorCode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77520
77560
|
LoginError,
|
|
77521
77561
|
{
|
|
77522
77562
|
institution: selectedInstitution,
|
|
@@ -79432,6 +79472,9 @@ const getErrorResource = (err) => {
|
|
|
79432
79472
|
const useLoadConnect = () => {
|
|
79433
79473
|
const { api } = useApi();
|
|
79434
79474
|
const profiles = useSelector((state) => state.profiles);
|
|
79475
|
+
const clientLocale = useMemo(() => {
|
|
79476
|
+
return document.querySelector("html")?.getAttribute("lang") || "en";
|
|
79477
|
+
}, [document.querySelector("html")?.getAttribute("lang")]);
|
|
79435
79478
|
const [config, setConfig] = useState({});
|
|
79436
79479
|
const dispatch = useDispatch();
|
|
79437
79480
|
const loadConnect = useCallback((config2) => setConfig(config2), [config]);
|
|
@@ -79441,7 +79484,7 @@ const useLoadConnect = () => {
|
|
|
79441
79484
|
dispatch(loadConnect$1(config));
|
|
79442
79485
|
let request$;
|
|
79443
79486
|
if (config.current_member_guid) {
|
|
79444
|
-
request$ = loadConnectFromMemberConfig(config, api);
|
|
79487
|
+
request$ = loadConnectFromMemberConfig(config, api, clientLocale);
|
|
79445
79488
|
} else if (config.current_institution_guid || config.current_institution_code) {
|
|
79446
79489
|
request$ = loadConnectFromInstitutionConfig(config, api);
|
|
79447
79490
|
} else if (config.mode === VERIFY_MODE && config.current_microdeposit_guid) {
|
|
@@ -79452,9 +79495,9 @@ const useLoadConnect = () => {
|
|
|
79452
79495
|
const requestSubscription$ = request$.pipe(
|
|
79453
79496
|
mergeMap((dependencies) => {
|
|
79454
79497
|
if (clientSupportRequestedProducts(config, profiles.clientProfile)) {
|
|
79455
|
-
return from(api.loadMembers()).pipe(
|
|
79498
|
+
return from(api.loadMembers(clientLocale)).pipe(
|
|
79456
79499
|
map(
|
|
79457
|
-
(members) => loadConnectSuccess$1({
|
|
79500
|
+
(members = []) => loadConnectSuccess$1({
|
|
79458
79501
|
members,
|
|
79459
79502
|
widgetProfile: profiles.widgetProfile,
|
|
79460
79503
|
...dependencies
|
|
@@ -79507,8 +79550,8 @@ const useLoadConnect = () => {
|
|
|
79507
79550
|
}, [config]);
|
|
79508
79551
|
return { loadConnect };
|
|
79509
79552
|
};
|
|
79510
|
-
function loadConnectFromMemberConfig(config, api) {
|
|
79511
|
-
return from(api.loadMemberByGuid(config.current_member_guid)).pipe(
|
|
79553
|
+
function loadConnectFromMemberConfig(config, api, clientLocale) {
|
|
79554
|
+
return from(api.loadMemberByGuid(config.current_member_guid, clientLocale)).pipe(
|
|
79512
79555
|
mergeMap((member) => {
|
|
79513
79556
|
return defer(() => api.loadInstitutionByGuid(member.institution_guid)).pipe(
|
|
79514
79557
|
map((institution) => {
|
|
@@ -80324,11 +80367,9 @@ const frCa = {
|
|
|
80324
80367
|
"Log in again": "Connectez-vous à nouveau",
|
|
80325
80368
|
"Connect a different institution": "Mettre en relation un autre établissement",
|
|
80326
80369
|
"No eligible accounts": "Aucun compte admissible",
|
|
80327
|
-
"Only checking or savings accounts can be used for transfers. If you have one at %1, make sure to select it when connecting. Otherwise, try connecting a different institution.": "Seuls les comptes chèques ou d’épargne peuvent être utilisés pour les transferts. Si vous en avez un à %1, assurez-vous de le sélectionner lors de la connexion. Sinon, essayez de connecter une autre institution.",
|
|
80328
80370
|
Required: Required$1,
|
|
80329
80371
|
"Add financial management?": "Ajouter la gestion financière ?",
|
|
80330
80372
|
"Yes, add financial management": "Oui, ajoutez la gestion financière",
|
|
80331
|
-
"No, just transfers and payment": "Non, juste des virements et des paiements",
|
|
80332
80373
|
"Add transfers and payments?": "Ajouter des transferts et des paiements ?",
|
|
80333
80374
|
"Yes, add transfers and payments": "Oui, ajouter des transferts et des paiements",
|
|
80334
80375
|
"Select an account to connect": "Sélectionnez un compte pour vous connecter",
|
|
@@ -80821,7 +80862,6 @@ const es = {
|
|
|
80821
80862
|
"Log in again": "Inicie sesión nuevamente",
|
|
80822
80863
|
"Connect a different institution": "Conecte una institución diferente",
|
|
80823
80864
|
"No eligible accounts": "No hay cuentas elegibles",
|
|
80824
|
-
"Only checking or savings accounts can be used for transfers. If you have one at %1, make sure to select it when connecting. Otherwise, try connecting a different institution.": "Solo se pueden usar cuentas de control o ahorro para transferencias. Si tiene uno en %1, asegúrese de seleccionarlo al conectarlo. De lo contrario, intente conectar una institución diferente.",
|
|
80825
80865
|
Required: Required,
|
|
80826
80866
|
"Add financial management?": "¿Añadir gestión financiera?",
|
|
80827
80867
|
"Yes, add financial management": "Sí, añadir gestión financiera",
|
|
@@ -81233,6 +81273,9 @@ const reducer = (state, action) => {
|
|
|
81233
81273
|
|
|
81234
81274
|
const PostMessageContext = createContext({ onPostMessage: () => {
|
|
81235
81275
|
} });
|
|
81276
|
+
function setupLocalizedContent(localizedContent) {
|
|
81277
|
+
Store.dispatch(setLocalizedContent(localizedContent));
|
|
81278
|
+
}
|
|
81236
81279
|
const ConnectWidget = ({
|
|
81237
81280
|
onPostMessage = () => {
|
|
81238
81281
|
},
|
|
@@ -81243,6 +81286,9 @@ const ConnectWidget = ({
|
|
|
81243
81286
|
...props
|
|
81244
81287
|
}) => {
|
|
81245
81288
|
initGettextLocaleData(props.language);
|
|
81289
|
+
useEffect(() => {
|
|
81290
|
+
setupLocalizedContent(props?.language?.localizedContent || {});
|
|
81291
|
+
}, []);
|
|
81246
81292
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Provider_default, { store: Store, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectedTokenProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PostMessageContext.Provider, { value: { onPostMessage, postMessageEventOverrides }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(WidgetDimensionObserver, { heightOffset: 0, children: [
|
|
81247
81293
|
showTooSmallDialog && /* @__PURE__ */ jsxRuntimeExports.jsx(TooSmallDialog, { onAnalyticPageview }),
|
|
81248
81294
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Connect$2, { onAnalyticPageview, ...props })
|