@mxenabled/connect-widget 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.es.js +133 -95
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,3 +75,7 @@ This will link the local package to your project in the node modules. Unlink the
|
|
|
75
75
|
Pull requests are welcome. Please open an issue first to discuss what you would like to change.
|
|
76
76
|
|
|
77
77
|
Make sure to add/update tests, translations, and documentation as appropriate.
|
|
78
|
+
|
|
79
|
+
## Changelog
|
|
80
|
+
|
|
81
|
+
View our changelog [here](./CHANGELOG.md)
|
package/dist/index.es.js
CHANGED
|
@@ -5130,39 +5130,23 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
|
|
|
5130
5130
|
}
|
|
5131
5131
|
var _baseFindIndex = baseFindIndex$2;
|
|
5132
5132
|
|
|
5133
|
-
var
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
var reWhitespace = /\s/;
|
|
5140
|
-
function trimmedEndIndex(string) {
|
|
5141
|
-
var index = string.length;
|
|
5142
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
5143
|
-
}
|
|
5144
|
-
return index;
|
|
5145
|
-
}
|
|
5146
|
-
_trimmedEndIndex = trimmedEndIndex;
|
|
5147
|
-
return _trimmedEndIndex;
|
|
5133
|
+
var reWhitespace = /\s/;
|
|
5134
|
+
function trimmedEndIndex$1(string) {
|
|
5135
|
+
var index = string.length;
|
|
5136
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
5137
|
+
}
|
|
5138
|
+
return index;
|
|
5148
5139
|
}
|
|
5140
|
+
var _trimmedEndIndex = trimmedEndIndex$1;
|
|
5149
5141
|
|
|
5150
|
-
var
|
|
5151
|
-
var
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
if (hasRequired_baseTrim) return _baseTrim;
|
|
5155
|
-
hasRequired_baseTrim = 1;
|
|
5156
|
-
var trimmedEndIndex = require_trimmedEndIndex();
|
|
5157
|
-
var reTrimStart = /^\s+/;
|
|
5158
|
-
function baseTrim(string) {
|
|
5159
|
-
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
5160
|
-
}
|
|
5161
|
-
_baseTrim = baseTrim;
|
|
5162
|
-
return _baseTrim;
|
|
5142
|
+
var trimmedEndIndex = _trimmedEndIndex;
|
|
5143
|
+
var reTrimStart = /^\s+/;
|
|
5144
|
+
function baseTrim$1(string) {
|
|
5145
|
+
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
5163
5146
|
}
|
|
5147
|
+
var _baseTrim = baseTrim$1;
|
|
5164
5148
|
|
|
5165
|
-
var baseTrim =
|
|
5149
|
+
var baseTrim = _baseTrim, isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
|
|
5166
5150
|
var NAN = 0 / 0;
|
|
5167
5151
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
5168
5152
|
var reIsBinary = /^0b[01]+$/i;
|
|
@@ -8628,7 +8612,7 @@ var hasRequiredTrim;
|
|
|
8628
8612
|
function requireTrim () {
|
|
8629
8613
|
if (hasRequiredTrim) return trim_1;
|
|
8630
8614
|
hasRequiredTrim = 1;
|
|
8631
|
-
var baseToString = _baseToString, baseTrim =
|
|
8615
|
+
var baseToString = _baseToString, baseTrim = _baseTrim, castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
|
|
8632
8616
|
function trim(string, chars, guard) {
|
|
8633
8617
|
string = toString(string);
|
|
8634
8618
|
if (string && (guard || chars === void 0)) {
|
|
@@ -9566,21 +9550,25 @@ const initialState$5 = {
|
|
|
9566
9550
|
oauth_referral_source: REFERRAL_SOURCES.BROWSER,
|
|
9567
9551
|
update_credentials: false,
|
|
9568
9552
|
wait_for_full_aggregation: false,
|
|
9569
|
-
data_request: null
|
|
9553
|
+
data_request: null,
|
|
9554
|
+
use_cases: null
|
|
9570
9555
|
};
|
|
9571
9556
|
const configSlice = createSlice({
|
|
9572
9557
|
name: "config",
|
|
9573
9558
|
initialState: initialState$5,
|
|
9574
9559
|
reducers: {},
|
|
9575
9560
|
extraReducers(builder) {
|
|
9576
|
-
builder.addCase(
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9561
|
+
builder.addCase(
|
|
9562
|
+
ActionTypes$4.LOAD_CONNECT,
|
|
9563
|
+
(state, action) => {
|
|
9564
|
+
const productDetermineMode = getProductDeterminedMode(action.payload);
|
|
9565
|
+
return {
|
|
9566
|
+
...state,
|
|
9567
|
+
...action.payload,
|
|
9568
|
+
mode: productDetermineMode !== null ? productDetermineMode : action.payload.mode || state.mode
|
|
9569
|
+
};
|
|
9570
|
+
}
|
|
9571
|
+
);
|
|
9584
9572
|
}
|
|
9585
9573
|
});
|
|
9586
9574
|
const selectConfig = (state) => state.config;
|
|
@@ -9600,7 +9588,8 @@ const selectConnectConfig = createSelector(selectConfig, (config) => ({
|
|
|
9600
9588
|
oauth_referral_source: config.oauth_referral_source,
|
|
9601
9589
|
update_credentials: config.update_credentials,
|
|
9602
9590
|
wait_for_full_aggregation: config.wait_for_full_aggregation,
|
|
9603
|
-
data_request: config.data_request
|
|
9591
|
+
data_request: config.data_request,
|
|
9592
|
+
use_cases: config.use_cases
|
|
9604
9593
|
}));
|
|
9605
9594
|
const selectColorScheme = (state) => state.config.color_scheme;
|
|
9606
9595
|
const getProductDeterminedMode = (config) => {
|
|
@@ -13922,25 +13911,18 @@ if (typeof window !== "undefined") {
|
|
|
13922
13911
|
}
|
|
13923
13912
|
|
|
13924
13913
|
const getExperiments = (state) => state.experiments.items;
|
|
13925
|
-
const
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
const
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
);
|
|
13938
|
-
return { ...acc, [experiment.name]: feature.name };
|
|
13939
|
-
}
|
|
13940
|
-
return acc;
|
|
13941
|
-
}, {});
|
|
13942
|
-
}
|
|
13943
|
-
);
|
|
13914
|
+
const getExperimentNamesToUserVariantMap = createSelector(getExperiments, (experiments) => {
|
|
13915
|
+
return experiments.reduce((acc, experiment) => {
|
|
13916
|
+
if (experiment.is_active && experiment.selected_variant) {
|
|
13917
|
+
const selectedVariantFeatureGuid = experiment.selected_variant.user_feature.feature_guid;
|
|
13918
|
+
const feature = experiment.features.find(
|
|
13919
|
+
(feature2) => feature2.guid === selectedVariantFeatureGuid
|
|
13920
|
+
);
|
|
13921
|
+
return { ...acc, [experiment.name]: feature.name };
|
|
13922
|
+
}
|
|
13923
|
+
return acc;
|
|
13924
|
+
}, {});
|
|
13925
|
+
});
|
|
13944
13926
|
|
|
13945
13927
|
var dist = {};
|
|
13946
13928
|
|
|
@@ -14831,10 +14813,7 @@ const AnalyticEvents = {
|
|
|
14831
14813
|
MFA_SUBMITTED_IMAGE: "mfa_submitted_image",
|
|
14832
14814
|
MFA_SELECTED_OPTION: "mfa_selected_option",
|
|
14833
14815
|
MFA_SUBMITTED_OPTION: "mfa_submitted_option",
|
|
14834
|
-
MONEY_MANAGER_POPUP: "money_manager_popup",
|
|
14835
|
-
MONEY_MANAGER_POPUP_CLOSED: "money_manager_popup_closed",
|
|
14836
14816
|
NO_ELIGIBLE_ACCOUNTS_RETRY: "no_eligible_accounts_retry",
|
|
14837
|
-
NO_ELIGIBLE_ACCOUNTS_TRY_ANOTHER_INSTITUTION: "no_eligible_accounts_try_another_institution",
|
|
14838
14817
|
OAUTH_PENDING_MEMBER_CREATED: "oauth_pending_member_created",
|
|
14839
14818
|
OAUTH_DEFAULT_CANCEL: "oauth_default_cancel",
|
|
14840
14819
|
OAUTH_DEFAULT_GO_TO_INSTITUTION: "oauth_default_go_to_institution",
|
|
@@ -14866,14 +14845,12 @@ const PageviewInfo = {
|
|
|
14866
14845
|
CONNECT_DISCLOSURE_DATA_AVAILABLE: ["Connect Disclosure Data Available", "/data_available"],
|
|
14867
14846
|
CONNECT_DISCLOSURE_DATA_REQUESTED: ["Connect Disclosure Data Requested", "/data_requested"],
|
|
14868
14847
|
CONNECT_DISCLOSURE_PRIVACY_POLICY: ["Connect Disclosure Privacy Policy", "/privacy_policy"],
|
|
14869
|
-
CONNECT_EXISTING_MEMBER_WARNING: ["Connect Existing Member Warning", "/existing_member_warning"],
|
|
14870
14848
|
CONNECT_GENERIC_ERROR: ["Connect Generic Error", "/generic_error"],
|
|
14871
14849
|
CONNECT_IE_11_DEPRECATION: ["Connect IE 11 Deprecation", "/ie_11_deprecation"],
|
|
14872
14850
|
CONNECT_LOGIN_ERROR: ["Connect Login Error", "/login_error"],
|
|
14873
14851
|
CONNECT_MANUAL_ACCOUNT: ["Manual Account Connect", "/manual_account_connect"],
|
|
14874
14852
|
CONNECT_MANUAL_ACCOUNT_FORM: ["Connect Manual Account Form", "/manual_account_form"],
|
|
14875
14853
|
CONNECT_MANUAL_ACCOUNT_SUCCESS: ["Connect Manual Account Success", "/manual_account_success"],
|
|
14876
|
-
CONNECT_MFA: ["Connect MFA", "/mfa"],
|
|
14877
14854
|
CONNECT_MFA_DEFAULT: ["Connect MFA Default", "/mfa_default"],
|
|
14878
14855
|
CONNECT_MFA_IMAGE_OPTIONS: ["Connect MFA Image Options", "/mfa_image_options"],
|
|
14879
14856
|
CONNECT_MFA_OPTIONS: ["Connect MFA Options", "/mfa_options"],
|
|
@@ -14925,15 +14902,12 @@ const PageviewInfo = {
|
|
|
14925
14902
|
],
|
|
14926
14903
|
CONNECT_SUPPORT_GENERAL: ["Connect Support General", "/support/support_general"],
|
|
14927
14904
|
CONNECT_SUPPORT_SUCCESS: ["Connect Support Success", "/support/support_success"],
|
|
14928
|
-
CONNECT_SURVEY_FEEDBACK: ["Connect Survey Feedback", "/survey/feedback"],
|
|
14929
|
-
CONNECT_TIMEOUT: ["Connect Timeout", "/timeout"],
|
|
14930
14905
|
CONNECT_UPDATE_CREDENTIALS: [
|
|
14931
14906
|
"Connect Update Credentials",
|
|
14932
14907
|
"/credentials/update_credentials_form"
|
|
14933
14908
|
],
|
|
14934
14909
|
CONNECT_UNSUPPORTED_RESOLUTION: ["Connect Unsupported Resolution", "/unsupported_resolution"],
|
|
14935
|
-
CONNECT_VERIFY_EXISTING_MEMBER: ["Connect Verify Existing Member", "/verify_existing_member"]
|
|
14936
|
-
CONNECTIONS: ["Connections", "/connections"]
|
|
14910
|
+
CONNECT_VERIFY_EXISTING_MEMBER: ["Connect Verify Existing Member", "/verify_existing_member"]
|
|
14937
14911
|
};
|
|
14938
14912
|
const AuthenticationMethods = {
|
|
14939
14913
|
OAUTH: "OAuth",
|
|
@@ -21388,8 +21362,7 @@ var intervalProvider = {
|
|
|
21388
21362
|
return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));
|
|
21389
21363
|
},
|
|
21390
21364
|
clearInterval: function(handle) {
|
|
21391
|
-
|
|
21392
|
-
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);
|
|
21365
|
+
return (clearInterval)(handle);
|
|
21393
21366
|
},
|
|
21394
21367
|
delegate: void 0
|
|
21395
21368
|
};
|
|
@@ -36059,6 +36032,7 @@ const CreateMemberForm = (props) => {
|
|
|
36059
36032
|
});
|
|
36060
36033
|
const config = useSelector(selectConfig);
|
|
36061
36034
|
const isHuman = useSelector((state2) => state2.app.humanEvent);
|
|
36035
|
+
const currentMembers = useSelector((state2) => state2.connect.members);
|
|
36062
36036
|
const [isCreatingMember, setIsCreatingMember] = useState(false);
|
|
36063
36037
|
const [memberCreateError, setMemberCreateError] = useState(null);
|
|
36064
36038
|
const [userCredentials, setUserCredentials] = useState(null);
|
|
@@ -36114,9 +36088,19 @@ const CreateMemberForm = (props) => {
|
|
|
36114
36088
|
payload: member.guid
|
|
36115
36089
|
}))
|
|
36116
36090
|
);
|
|
36117
|
-
const updateMember$ = defer(
|
|
36118
|
-
() =>
|
|
36119
|
-
|
|
36091
|
+
const updateMember$ = defer(() => {
|
|
36092
|
+
const current409member = currentMembers.find((mbr) => mbr.guid === memberGuid);
|
|
36093
|
+
if (!current409member) {
|
|
36094
|
+
setIsCreatingMember(false);
|
|
36095
|
+
setMemberCreateError("Something went wrong, invalid member state");
|
|
36096
|
+
return new Error("Something went wrong, invalid member state");
|
|
36097
|
+
}
|
|
36098
|
+
const oldUseCases = current409member.use_cases || null;
|
|
36099
|
+
return api.updateMember(
|
|
36100
|
+
{ ...memberData, guid: memberGuid, use_cases: oldUseCases },
|
|
36101
|
+
config
|
|
36102
|
+
);
|
|
36103
|
+
}).pipe(
|
|
36120
36104
|
map((member) => {
|
|
36121
36105
|
if (props.onUpsertMember) {
|
|
36122
36106
|
props.onUpsertMember(member);
|
|
@@ -36494,6 +36478,7 @@ const Connecting$2 = (props) => {
|
|
|
36494
36478
|
} = props;
|
|
36495
36479
|
const currentMember = useSelector((state) => getCurrentMember(state));
|
|
36496
36480
|
const isComboJobsEnabled = useSelector((state) => isConnectComboJobsEnabled(state));
|
|
36481
|
+
const jobSchedule = useSelector((state) => state.connect.jobSchedule);
|
|
36497
36482
|
useAnalyticsPath(...PageviewInfo.CONNECT_CONNECTING, {
|
|
36498
36483
|
authentication_method: currentMember.is_oauth ? AuthenticationMethods.OAUTH : AuthenticationMethods.NON_OAUTH
|
|
36499
36484
|
});
|
|
@@ -36505,9 +36490,9 @@ const Connecting$2 = (props) => {
|
|
|
36505
36490
|
const postMessageFunctions = useContext(PostMessageContext);
|
|
36506
36491
|
const connectingRef = useRef(null);
|
|
36507
36492
|
const { api } = useApi();
|
|
36508
|
-
const jobSchedule = useSelector((state) => state.connect.jobSchedule);
|
|
36509
36493
|
const [message, setMessage] = useState(CONNECTING_MESSAGES.STARTING);
|
|
36510
36494
|
const [timedOut, setTimedOut] = useState(false);
|
|
36495
|
+
const [connectingError, setConnectingError] = useState(null);
|
|
36511
36496
|
const activeJob = getActiveJob(jobSchedule);
|
|
36512
36497
|
const needsToInitializeJobSchedule = jobSchedule.isInitialized === false;
|
|
36513
36498
|
function handleMemberPoll(pollingState) {
|
|
@@ -36546,10 +36531,20 @@ const Connecting$2 = (props) => {
|
|
|
36546
36531
|
}, 1500);
|
|
36547
36532
|
}
|
|
36548
36533
|
}, [needsToInitializeJobSchedule, jobSchedule]);
|
|
36534
|
+
const memberUseCasesWereProvidedInConfig = () => Boolean(connectConfig?.use_cases?.length);
|
|
36535
|
+
const memberIsMissingAConfiguredUseCase = () => {
|
|
36536
|
+
const currentUseCases = currentMember?.use_cases;
|
|
36537
|
+
if (!currentUseCases || !Array.isArray(currentUseCases)) {
|
|
36538
|
+
return true;
|
|
36539
|
+
}
|
|
36540
|
+
const newUseCases = connectConfig.use_cases;
|
|
36541
|
+
return newUseCases.some((useCase) => currentUseCases.includes(useCase) === false);
|
|
36542
|
+
};
|
|
36549
36543
|
useEffect(() => {
|
|
36550
36544
|
if (!needsToInitializeJobSchedule) return () => {
|
|
36551
36545
|
};
|
|
36552
|
-
|
|
36546
|
+
let sub$ = null;
|
|
36547
|
+
const loadJob$ = defer(() => {
|
|
36553
36548
|
if (currentMember.most_recent_job_guid) {
|
|
36554
36549
|
return defer(() => api.loadJob(currentMember.most_recent_job_guid)).pipe(
|
|
36555
36550
|
// I have to retry here because sometimes this is too fast in sand and
|
|
@@ -36561,22 +36556,45 @@ const Connecting$2 = (props) => {
|
|
|
36561
36556
|
} else {
|
|
36562
36557
|
return of(null);
|
|
36563
36558
|
}
|
|
36564
|
-
})
|
|
36565
|
-
|
|
36566
|
-
|
|
36567
|
-
|
|
36559
|
+
});
|
|
36560
|
+
if (memberUseCasesWereProvidedInConfig() && memberIsMissingAConfiguredUseCase()) {
|
|
36561
|
+
api.updateMember({ ...currentMember }, connectConfig).then((updatedMember) => {
|
|
36562
|
+
sub$ = loadJob$.subscribe((job) => {
|
|
36563
|
+
if (onUpsertMember) {
|
|
36564
|
+
onUpsertMember(updatedMember);
|
|
36565
|
+
}
|
|
36566
|
+
dispatch({
|
|
36567
|
+
type: ActionTypes$4.UPDATE_MEMBER_SUCCESS,
|
|
36568
|
+
payload: { item: updatedMember }
|
|
36569
|
+
});
|
|
36570
|
+
return dispatch(
|
|
36571
|
+
initializeJobSchedule$1(currentMember, job, connectConfig, isComboJobsEnabled)
|
|
36572
|
+
);
|
|
36573
|
+
});
|
|
36574
|
+
});
|
|
36575
|
+
} else {
|
|
36576
|
+
sub$ = loadJob$.subscribe(
|
|
36577
|
+
(job) => dispatch(initializeJobSchedule$1(currentMember, job, connectConfig, isComboJobsEnabled))
|
|
36578
|
+
);
|
|
36579
|
+
}
|
|
36580
|
+
return () => sub$?.unsubscribe();
|
|
36568
36581
|
}, [needsToInitializeJobSchedule]);
|
|
36569
36582
|
useEffect(() => {
|
|
36570
|
-
if (needsToInitializeJobSchedule) return () => {
|
|
36583
|
+
if (needsToInitializeJobSchedule || !activeJob) return () => {
|
|
36571
36584
|
};
|
|
36572
36585
|
const connectMember$ = defer(() => {
|
|
36573
36586
|
const needsJobStarted = currentMember.is_being_aggregated === false;
|
|
36574
36587
|
const startJob$ = defer(
|
|
36575
|
-
() => api.runJob(activeJob
|
|
36588
|
+
() => api.runJob(activeJob?.type, currentMember.guid, connectConfig, true)
|
|
36576
36589
|
).pipe(
|
|
36577
36590
|
mergeMap(() => api.loadMemberByGuid(currentMember.guid)),
|
|
36578
|
-
catchError(() => {
|
|
36579
|
-
|
|
36591
|
+
catchError((error) => {
|
|
36592
|
+
const isSafeConflictError = error?.response?.status === 409;
|
|
36593
|
+
if (isSafeConflictError) {
|
|
36594
|
+
return of(currentMember);
|
|
36595
|
+
}
|
|
36596
|
+
setConnectingError(error);
|
|
36597
|
+
throw error;
|
|
36580
36598
|
})
|
|
36581
36599
|
);
|
|
36582
36600
|
return needsJobStarted ? startJob$ : of(currentMember);
|
|
@@ -36626,6 +36644,9 @@ const Connecting$2 = (props) => {
|
|
|
36626
36644
|
});
|
|
36627
36645
|
}
|
|
36628
36646
|
}, [timedOut]);
|
|
36647
|
+
if (connectingError !== null) {
|
|
36648
|
+
throw connectingError;
|
|
36649
|
+
}
|
|
36629
36650
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: connectingRef, style: styles.container, children: [
|
|
36630
36651
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
|
|
36631
36652
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.logoHeader, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectLogoHeader, { institutionGuid: institution.guid }) }),
|
|
@@ -49860,6 +49881,8 @@ function loadConnectFromMicrodepositConfig(config, api) {
|
|
|
49860
49881
|
);
|
|
49861
49882
|
}
|
|
49862
49883
|
class VerifyNotEnabled extends Error {
|
|
49884
|
+
entity;
|
|
49885
|
+
entity_type;
|
|
49863
49886
|
constructor(entity, message, entity_type) {
|
|
49864
49887
|
super(message);
|
|
49865
49888
|
this.name = "VerifyNotEnabled";
|
|
@@ -49876,7 +49899,22 @@ const AnalyticContext = createContext({
|
|
|
49876
49899
|
onAnalyticPageview: () => {
|
|
49877
49900
|
}
|
|
49878
49901
|
});
|
|
49879
|
-
const Connect$2 = (
|
|
49902
|
+
const Connect$2 = ({
|
|
49903
|
+
availableAccountTypes = [],
|
|
49904
|
+
onManualAccountAdded = () => {
|
|
49905
|
+
},
|
|
49906
|
+
onMemberDeleted = () => {
|
|
49907
|
+
},
|
|
49908
|
+
onSuccessfulAggregation = () => {
|
|
49909
|
+
},
|
|
49910
|
+
onUpsertMember = () => {
|
|
49911
|
+
},
|
|
49912
|
+
onAnalyticEvent = () => {
|
|
49913
|
+
},
|
|
49914
|
+
onAnalyticPageview = () => {
|
|
49915
|
+
},
|
|
49916
|
+
...props
|
|
49917
|
+
}) => {
|
|
49880
49918
|
const connectConfig = useSelector(selectConnectConfig);
|
|
49881
49919
|
const experimentDetails = getActiveABExperimentDetails(
|
|
49882
49920
|
useSelector(getExperimentNamesToUserVariantMap),
|
|
@@ -49958,8 +49996,8 @@ const Connect$2 = (props) => {
|
|
|
49958
49996
|
metadata.current_institution_guid = config.current_institution_guid;
|
|
49959
49997
|
if (!_isNil(config.current_institution_code))
|
|
49960
49998
|
metadata.current_institution_code = config.current_institution_code;
|
|
49961
|
-
if (
|
|
49962
|
-
|
|
49999
|
+
if (onAnalyticEvent) {
|
|
50000
|
+
onAnalyticEvent(`connect_${AnalyticEvents.WIDGET_LOAD}`, {
|
|
49963
50001
|
...defaultEventMetadata,
|
|
49964
50002
|
...metadata
|
|
49965
50003
|
});
|
|
@@ -50023,7 +50061,7 @@ const Connect$2 = (props) => {
|
|
|
50023
50061
|
const invalidVerifyMode = IS_IN_VERIFY_MODE && !isVerificationEnabled;
|
|
50024
50062
|
if (invalidVerifyMode || invalidTaxMode) {
|
|
50025
50063
|
const title = IS_IN_TAX_MODE ? __("Oops! Tax statements must be enabled to use this feature.") : __("Oops! Verification must be enabled to use this feature.");
|
|
50026
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericError, { onAnalyticPageview
|
|
50064
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericError, { onAnalyticPageview, title });
|
|
50027
50065
|
}
|
|
50028
50066
|
if (isLoading) {
|
|
50029
50067
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingSpinner, { showText: true });
|
|
@@ -50033,7 +50071,7 @@ const Connect$2 = (props) => {
|
|
|
50033
50071
|
GenericError,
|
|
50034
50072
|
{
|
|
50035
50073
|
loadError,
|
|
50036
|
-
onAnalyticPageview
|
|
50074
|
+
onAnalyticPageview,
|
|
50037
50075
|
title: loadError.message
|
|
50038
50076
|
}
|
|
50039
50077
|
);
|
|
@@ -50042,8 +50080,8 @@ const Connect$2 = (props) => {
|
|
|
50042
50080
|
AnalyticContext.Provider,
|
|
50043
50081
|
{
|
|
50044
50082
|
value: {
|
|
50045
|
-
onAnalyticEvent
|
|
50046
|
-
onAnalyticPageview
|
|
50083
|
+
onAnalyticEvent,
|
|
50084
|
+
onAnalyticPageview
|
|
50047
50085
|
},
|
|
50048
50086
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TokenContext.Consumer, { children: (tokens) => {
|
|
50049
50087
|
const styles = getStyles$1(tokens);
|
|
@@ -50059,7 +50097,7 @@ const Connect$2 = (props) => {
|
|
|
50059
50097
|
postMessageFunctions.onPostMessage("connect/memberDeleted", {
|
|
50060
50098
|
member_guid: deletedMember.guid
|
|
50061
50099
|
});
|
|
50062
|
-
|
|
50100
|
+
onMemberDeleted(deletedMember.guid);
|
|
50063
50101
|
setState((prevState) => {
|
|
50064
50102
|
dispatch(stepToDeleteMemberSuccess$1(deletedMember.guid));
|
|
50065
50103
|
return { ...prevState, memberToDelete: null };
|
|
@@ -50077,14 +50115,14 @@ const Connect$2 = (props) => {
|
|
|
50077
50115
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50078
50116
|
RenderConnectStep,
|
|
50079
50117
|
{
|
|
50080
|
-
availableAccountTypes
|
|
50118
|
+
availableAccountTypes,
|
|
50081
50119
|
handleAddManualAccountClick: _handleAddManualAccountClick,
|
|
50082
50120
|
handleCredentialsGoBack: _handleCredentialsGoBack,
|
|
50083
50121
|
handleOAuthGoBack: _handleOAuthGoBack,
|
|
50084
50122
|
navigationRef: _handleStepDOMChange,
|
|
50085
|
-
onManualAccountAdded
|
|
50086
|
-
onSuccessfulAggregation
|
|
50087
|
-
onUpsertMember
|
|
50123
|
+
onManualAccountAdded,
|
|
50124
|
+
onSuccessfulAggregation,
|
|
50125
|
+
onUpsertMember,
|
|
50088
50126
|
setConnectLocalState: setState
|
|
50089
50127
|
}
|
|
50090
50128
|
)
|