@mxenabled/connect-widget 2.1.0 → 2.2.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 +39 -38
- 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
|
@@ -63614,7 +63614,7 @@ const useAnalyticsEvent = () => {
|
|
|
63614
63614
|
};
|
|
63615
63615
|
|
|
63616
63616
|
const InstituionGrid = (props) => {
|
|
63617
|
-
const
|
|
63617
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
63618
63618
|
const { handleSelectInstitution, institutions, posthogEvent } = props;
|
|
63619
63619
|
const trueWidth = useSelector(getTrueWidth);
|
|
63620
63620
|
const clientUsesOauth = useSelector((state) => state.profiles.clientProfile.uses_oauth ?? false);
|
|
@@ -63628,7 +63628,7 @@ const InstituionGrid = (props) => {
|
|
|
63628
63628
|
"data-test": `${institution.name}-tile`,
|
|
63629
63629
|
institution,
|
|
63630
63630
|
selectInstitution: () => {
|
|
63631
|
-
|
|
63631
|
+
sendAnalyticsEvent(posthogEvent, {
|
|
63632
63632
|
authentication_method: clientUsesOauth && institution.supports_oauth ? AuthenticationMethods.OAUTH : AuthenticationMethods.NON_OAUTH,
|
|
63633
63633
|
institution_guid: institution.guid,
|
|
63634
63634
|
institution_name: institution.name
|
|
@@ -63901,7 +63901,7 @@ InstitutionTile.propTypes = {
|
|
|
63901
63901
|
|
|
63902
63902
|
const SearchedInstitutionsList = (props) => {
|
|
63903
63903
|
useAnalyticsPath(...PageviewInfo.CONNECT_SEARCHED);
|
|
63904
|
-
const
|
|
63904
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
63905
63905
|
const {
|
|
63906
63906
|
currentSearchResults,
|
|
63907
63907
|
enableManualAccounts,
|
|
@@ -63953,7 +63953,7 @@ const SearchedInstitutionsList = (props) => {
|
|
|
63953
63953
|
{
|
|
63954
63954
|
institution,
|
|
63955
63955
|
selectInstitution: () => {
|
|
63956
|
-
|
|
63956
|
+
sendAnalyticsEvent(AnalyticEvents.SELECT_SEARCHED_INSTITUTION, {
|
|
63957
63957
|
authentication_method: clientUsesOauth && institution.supports_oauth ? AuthenticationMethods.OAUTH : AuthenticationMethods.NON_OAUTH,
|
|
63958
63958
|
institution_guid: institution.guid,
|
|
63959
63959
|
institution_name: institution.name
|
|
@@ -66623,7 +66623,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
66623
66623
|
const searchInput = useRef("");
|
|
66624
66624
|
const supportNavRef = useRef(null);
|
|
66625
66625
|
const reduxDispatch = useDispatch();
|
|
66626
|
-
const
|
|
66626
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
66627
66627
|
const postMessageFunctions = useContext(PostMessageContext);
|
|
66628
66628
|
const { api } = useApi();
|
|
66629
66629
|
const {
|
|
@@ -66749,7 +66749,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
66749
66749
|
if (value === state.searchTerm) {
|
|
66750
66750
|
return;
|
|
66751
66751
|
}
|
|
66752
|
-
|
|
66752
|
+
sendAnalyticsEvent(AnalyticEvents.SEARCH_QUERY, {
|
|
66753
66753
|
mode,
|
|
66754
66754
|
search_term: value
|
|
66755
66755
|
});
|
|
@@ -67501,7 +67501,7 @@ ViewTitle.propTypes = {
|
|
|
67501
67501
|
|
|
67502
67502
|
const MFAOptions = (props) => {
|
|
67503
67503
|
const { currentMember, institution, isSubmitting, mfaCredentials, onSubmit } = props;
|
|
67504
|
-
const
|
|
67504
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
67505
67505
|
const isSAS = mfaCredentials[0].external_id === "single_account_select";
|
|
67506
67506
|
const pageView = isSAS ? PageviewInfo.CONNECT_MFA_SINGLE_ACCOUNT_SELECT : PageviewInfo.CONNECT_MFA_OPTIONS;
|
|
67507
67507
|
useAnalyticsPath(...pageView);
|
|
@@ -67562,7 +67562,7 @@ const MFAOptions = (props) => {
|
|
|
67562
67562
|
(cred) => credential.guid === option.credential_guid ? { guid: option.credential_guid, value: option.guid } : cred
|
|
67563
67563
|
)
|
|
67564
67564
|
);
|
|
67565
|
-
|
|
67565
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_SELECTED_OPTION, {
|
|
67566
67566
|
institution_guid: institution.guid,
|
|
67567
67567
|
institution_name: institution.name,
|
|
67568
67568
|
selectedOption: option.value,
|
|
@@ -67694,7 +67694,7 @@ const getMFAFieldType = (mfaCredentials) => {
|
|
|
67694
67694
|
const DefaultMFA = (props) => {
|
|
67695
67695
|
const { currentMember, institution, isSubmitting, mfaCredentials, onSubmit } = props;
|
|
67696
67696
|
useAnalyticsPath(...PageviewInfo.CONNECT_MFA_DEFAULT);
|
|
67697
|
-
const
|
|
67697
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
67698
67698
|
const buttonRef = useCallback((button) => {
|
|
67699
67699
|
focusElement(button);
|
|
67700
67700
|
}, []);
|
|
@@ -67711,7 +67711,7 @@ const DefaultMFA = (props) => {
|
|
|
67711
67711
|
const [needToSendAnalyticEvent, setNeedToSendAnalyticEvent] = useState(true);
|
|
67712
67712
|
const handleMFACodeChange = (e) => {
|
|
67713
67713
|
if (needToSendAnalyticEvent) {
|
|
67714
|
-
|
|
67714
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_ENTERED_INPUT, {
|
|
67715
67715
|
institution_guid: institution.guid,
|
|
67716
67716
|
institution_name: institution.name,
|
|
67717
67717
|
member_guid: sha256Exports.sha256(currentMember.guid)
|
|
@@ -67831,7 +67831,7 @@ DefaultMFA.propTypes = {
|
|
|
67831
67831
|
const MFAImages = (props) => {
|
|
67832
67832
|
const { institution, isSubmitting, mfaCredentials, onSubmit } = props;
|
|
67833
67833
|
useAnalyticsPath(...PageviewInfo.CONNECT_MFA_IMAGE_OPTIONS);
|
|
67834
|
-
const
|
|
67834
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
67835
67835
|
const buttonRef = useCallback((button) => {
|
|
67836
67836
|
focusElement(button);
|
|
67837
67837
|
}, []);
|
|
@@ -67867,7 +67867,7 @@ const MFAImages = (props) => {
|
|
|
67867
67867
|
(cred) => credential.guid === option.credential_guid ? { guid: option.credential_guid, value: option.guid } : cred
|
|
67868
67868
|
)
|
|
67869
67869
|
);
|
|
67870
|
-
|
|
67870
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_SELECTED_IMAGE, {
|
|
67871
67871
|
institution_guid: institution.guid,
|
|
67872
67872
|
institution_name: institution.name
|
|
67873
67873
|
});
|
|
@@ -67991,7 +67991,7 @@ const CredentialTypes = {
|
|
|
67991
67991
|
|
|
67992
67992
|
const MFAForm = (props) => {
|
|
67993
67993
|
const { currentMember, institution, isSubmitting, onSubmit } = props;
|
|
67994
|
-
const
|
|
67994
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
67995
67995
|
const tokens = useTokens();
|
|
67996
67996
|
const mfaCredentials = _get(currentMember, "mfa.credentials", []);
|
|
67997
67997
|
const mfaType = getMFAFieldType(mfaCredentials);
|
|
@@ -68004,11 +68004,11 @@ const MFAForm = (props) => {
|
|
|
68004
68004
|
member_guid: sha256Exports.sha256(currentMember.guid)
|
|
68005
68005
|
};
|
|
68006
68006
|
if (mfaType === CredentialTypes.OPTIONS) {
|
|
68007
|
-
|
|
68007
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_SUBMITTED_OPTION, posthogEventMetadata);
|
|
68008
68008
|
} else if (mfaType === CredentialTypes.IMAGE_OPTIONS) {
|
|
68009
|
-
|
|
68009
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_SUBMITTED_IMAGE, posthogEventMetadata);
|
|
68010
68010
|
} else {
|
|
68011
|
-
|
|
68011
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_SUBMITTED_INPUT, posthogEventMetadata);
|
|
68012
68012
|
}
|
|
68013
68013
|
onSubmit(credentials);
|
|
68014
68014
|
};
|
|
@@ -68088,7 +68088,7 @@ const MFAStep = React__default.forwardRef((props, navigationRef) => {
|
|
|
68088
68088
|
const [updatedMember, setUpdatedMember] = useState(currentMember);
|
|
68089
68089
|
const postMessageFunctions = useContext(PostMessageContext);
|
|
68090
68090
|
const dispatch = useDispatch();
|
|
68091
|
-
const
|
|
68091
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
68092
68092
|
const { api } = useApi();
|
|
68093
68093
|
const mfaCredentials = _get(currentMember, "mfa.credentials", []);
|
|
68094
68094
|
const tokens = useTokens();
|
|
@@ -68180,7 +68180,7 @@ const MFAStep = React__default.forwardRef((props, navigationRef) => {
|
|
|
68180
68180
|
"data-test": "mfa-get-help-button",
|
|
68181
68181
|
fullWidth: true,
|
|
68182
68182
|
onClick: () => {
|
|
68183
|
-
|
|
68183
|
+
sendAnalyticsEvent(AnalyticEvents.MFA_CLICKED_GET_HELP);
|
|
68184
68184
|
setShowSupportView(true);
|
|
68185
68185
|
},
|
|
68186
68186
|
style: styles.getHelpButton,
|
|
@@ -69734,7 +69734,7 @@ const OAuthDefault = (props) => {
|
|
|
69734
69734
|
institution_guid: props.institution.guid,
|
|
69735
69735
|
institution_name: props.institution.name
|
|
69736
69736
|
});
|
|
69737
|
-
const
|
|
69737
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
69738
69738
|
const getNextDelay = getDelay();
|
|
69739
69739
|
const showExternalLinkPopup = useSelector(
|
|
69740
69740
|
(state) => state.profiles.clientProfile.show_external_link_popup
|
|
@@ -69779,10 +69779,11 @@ const OAuthDefault = (props) => {
|
|
|
69779
69779
|
disabled: isOauthLoading || !oauthURL,
|
|
69780
69780
|
fullWidth: true,
|
|
69781
69781
|
onClick: () => {
|
|
69782
|
-
|
|
69782
|
+
sendAnalyticsEvent(AnalyticEvents.OAUTH_DEFAULT_GO_TO_INSTITUTION, {
|
|
69783
69783
|
institution_guid: props.institution.guid,
|
|
69784
69784
|
institution_name: props.institution.name,
|
|
69785
|
-
member_guid: sha256Exports.sha256(props.currentMember.guid)
|
|
69785
|
+
member_guid: sha256Exports.sha256(props.currentMember.guid),
|
|
69786
|
+
rawInstitution: props.institution
|
|
69786
69787
|
});
|
|
69787
69788
|
props.onSignInClick();
|
|
69788
69789
|
},
|
|
@@ -69842,7 +69843,7 @@ const DEFAULT_POLLING_STATE = {
|
|
|
69842
69843
|
userMessage: CONNECTING_MESSAGES.STARTING
|
|
69843
69844
|
// message to show the end user
|
|
69844
69845
|
};
|
|
69845
|
-
function pollMember(memberGuid, api, onPostMessage,
|
|
69846
|
+
function pollMember(memberGuid, api, onPostMessage, sendAnalyticsEvent, clientLocale) {
|
|
69846
69847
|
return interval(3e3).pipe(
|
|
69847
69848
|
switchMap(
|
|
69848
69849
|
() => (
|
|
@@ -69854,7 +69855,7 @@ function pollMember(memberGuid, api, onPostMessage, sendPosthogEvent, clientLoca
|
|
|
69854
69855
|
map((job) => {
|
|
69855
69856
|
if (job.async_account_data_ready) {
|
|
69856
69857
|
onPostMessage("connect/initialDataReady", { member_guid: member.guid });
|
|
69857
|
-
|
|
69858
|
+
sendAnalyticsEvent(AnalyticEvents.INITIAL_DATA_READY, { member_guid: member.guid });
|
|
69858
69859
|
}
|
|
69859
69860
|
return member;
|
|
69860
69861
|
})
|
|
@@ -69961,7 +69962,7 @@ const WaitingForOAuth = ({
|
|
|
69961
69962
|
institution_guid: institution.guid,
|
|
69962
69963
|
institution_name: institution.name
|
|
69963
69964
|
});
|
|
69964
|
-
const
|
|
69965
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
69965
69966
|
const [disableOauthButtons, setDisableOauthButtons] = useState(true);
|
|
69966
69967
|
const tokens = useTokens();
|
|
69967
69968
|
const styles = getStyles$R(tokens);
|
|
@@ -70022,7 +70023,7 @@ const WaitingForOAuth = ({
|
|
|
70022
70023
|
disabled: disableOauthButtons,
|
|
70023
70024
|
fullWidth: true,
|
|
70024
70025
|
onClick: () => {
|
|
70025
|
-
|
|
70026
|
+
sendAnalyticsEvent(AnalyticEvents.WAITING_FOR_OAUTH_TRYAGAIN, {
|
|
70026
70027
|
institution_guid: institution.guid,
|
|
70027
70028
|
institution_name: institution.name
|
|
70028
70029
|
});
|
|
@@ -70870,7 +70871,7 @@ const OAuthStep = React__default.forwardRef((props, navigationRef) => {
|
|
|
70870
70871
|
const dispatch = useDispatch();
|
|
70871
70872
|
const [isLeavingUrl, setIsLeavingUrl] = useState(null);
|
|
70872
70873
|
const [showInterstitialDisclosure, setShowInterstitialDisclosure] = useState(false);
|
|
70873
|
-
const
|
|
70874
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
70874
70875
|
const { api } = useApi();
|
|
70875
70876
|
useImperativeHandle(navigationRef, () => {
|
|
70876
70877
|
return {
|
|
@@ -70924,7 +70925,7 @@ const OAuthStep = React__default.forwardRef((props, navigationRef) => {
|
|
|
70924
70925
|
)
|
|
70925
70926
|
).pipe(pluck("member")).subscribe(
|
|
70926
70927
|
(member2) => {
|
|
70927
|
-
|
|
70928
|
+
sendAnalyticsEvent(AnalyticEvents.OAUTH_PENDING_MEMBER_CREATED, {
|
|
70928
70929
|
institution_guid: institution.guid,
|
|
70929
70930
|
institution_name: institution.name
|
|
70930
70931
|
});
|
|
@@ -71300,7 +71301,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71300
71301
|
onDeleteConnectionClick,
|
|
71301
71302
|
onGoBackClick
|
|
71302
71303
|
}, navigationRef) => {
|
|
71303
|
-
const
|
|
71304
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
71304
71305
|
const containerRef = useRef(null);
|
|
71305
71306
|
const interstitialRef = useRef(null);
|
|
71306
71307
|
const interstitialNavRef = useRef(null);
|
|
@@ -71378,7 +71379,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71378
71379
|
setIsLeavingUrl(recoveryInstitution.url);
|
|
71379
71380
|
setRecoveryInstitution(recoveryInstitution);
|
|
71380
71381
|
} else {
|
|
71381
|
-
|
|
71382
|
+
sendAnalyticsEvent(recoveryInstitution.analyticEvent, {
|
|
71382
71383
|
institution_guid: institution.guid,
|
|
71383
71384
|
institution_name: institution.name
|
|
71384
71385
|
});
|
|
@@ -71414,7 +71415,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71414
71415
|
}
|
|
71415
71416
|
const handleUserNameTextChange = (e) => {
|
|
71416
71417
|
if (needToSendAnalyticEvent) {
|
|
71417
|
-
|
|
71418
|
+
sendAnalyticsEvent(AnalyticEvents.ENTERED_LOGIN, {
|
|
71418
71419
|
institution_guid: institution.guid,
|
|
71419
71420
|
institution_name: institution.name
|
|
71420
71421
|
});
|
|
@@ -71424,7 +71425,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71424
71425
|
};
|
|
71425
71426
|
const handlePasswordTextChange = (e) => {
|
|
71426
71427
|
if (needToSendPasswordAnalyticEvent) {
|
|
71427
|
-
|
|
71428
|
+
sendAnalyticsEvent(AnalyticEvents.ENTERED_PASSWORD, {
|
|
71428
71429
|
institution_guid: institution.guid,
|
|
71429
71430
|
institution_name: institution.name
|
|
71430
71431
|
});
|
|
@@ -71459,7 +71460,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71459
71460
|
};
|
|
71460
71461
|
});
|
|
71461
71462
|
handleSubmitCredentials(credentialsPayload);
|
|
71462
|
-
|
|
71463
|
+
sendAnalyticsEvent(AnalyticEvents.SUBMITTED_CREDENTIALS, {
|
|
71463
71464
|
institution_guid: institution.guid,
|
|
71464
71465
|
institution_name: institution.name
|
|
71465
71466
|
});
|
|
@@ -71517,7 +71518,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71517
71518
|
},
|
|
71518
71519
|
onContinue: () => {
|
|
71519
71520
|
if (currentRecoveryInstution?.analyticEvent) {
|
|
71520
|
-
|
|
71521
|
+
sendAnalyticsEvent(currentRecoveryInstution.analyticEvent, {
|
|
71521
71522
|
institution_guid: institution.guid,
|
|
71522
71523
|
institution_name: institution.name
|
|
71523
71524
|
});
|
|
@@ -71702,7 +71703,7 @@ const Credentials = React__default.forwardRef(
|
|
|
71702
71703
|
{
|
|
71703
71704
|
"data-test": "credentials-get-help-button",
|
|
71704
71705
|
onClick: () => {
|
|
71705
|
-
|
|
71706
|
+
sendAnalyticsEvent(AnalyticEvents.CREDENTIALS_CLICKED_GET_HELP, {
|
|
71706
71707
|
type: "UPDATE"
|
|
71707
71708
|
});
|
|
71708
71709
|
setShowSupportView(true);
|
|
@@ -72306,7 +72307,7 @@ const Connecting = (props) => {
|
|
|
72306
72307
|
onUpsertMember
|
|
72307
72308
|
} = props;
|
|
72308
72309
|
const selectedInstitution = useSelector(getSelectedInstitution);
|
|
72309
|
-
const
|
|
72310
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
72310
72311
|
const clientLocale = useMemo(() => {
|
|
72311
72312
|
return document.querySelector("html")?.getAttribute("lang") || "en";
|
|
72312
72313
|
}, [document.querySelector("html")?.getAttribute("lang")]);
|
|
@@ -72448,7 +72449,7 @@ const Connecting = (props) => {
|
|
|
72448
72449
|
return needsJobStarted ? startJob$ : of(currentMember);
|
|
72449
72450
|
}).pipe(
|
|
72450
72451
|
concatMap(
|
|
72451
|
-
(member) => pollMember(member.guid, api, onPostMessage,
|
|
72452
|
+
(member) => pollMember(member.guid, api, onPostMessage, sendAnalyticsEvent, clientLocale).pipe(
|
|
72452
72453
|
tap((pollingState) => handleMemberPoll(pollingState)),
|
|
72453
72454
|
filter((pollingState) => pollingState.jobIsDone),
|
|
72454
72455
|
pluck("currentResponse"),
|
|
@@ -72619,7 +72620,7 @@ const SecondaryActions = ({
|
|
|
72619
72620
|
onDeleteConnectionClick,
|
|
72620
72621
|
setIsLeaving
|
|
72621
72622
|
}) => {
|
|
72622
|
-
const
|
|
72623
|
+
const sendAnalyticsEvent = useAnalyticsEvent();
|
|
72623
72624
|
const tokens = useTokens();
|
|
72624
72625
|
const styles = getStyles$C(tokens);
|
|
72625
72626
|
const actionMap = [
|
|
@@ -72648,7 +72649,7 @@ const SecondaryActions = ({
|
|
|
72648
72649
|
key: GET_HELP,
|
|
72649
72650
|
title: __("Get help"),
|
|
72650
72651
|
onClick: () => {
|
|
72651
|
-
|
|
72652
|
+
sendAnalyticsEvent(AnalyticEvents.LOGIN_ERROR_CLICKED_GET_HELP);
|
|
72652
72653
|
onGetHelpClick();
|
|
72653
72654
|
},
|
|
72654
72655
|
shouldShow: showSupport
|