@mxenabled/connect-widget 0.19.2 → 0.19.3

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
@@ -5087,23 +5087,39 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
5087
5087
  }
5088
5088
  var _baseFindIndex = baseFindIndex$2;
5089
5089
 
5090
- var reWhitespace = /\s/;
5091
- function trimmedEndIndex$1(string) {
5092
- var index = string.length;
5093
- while (index-- && reWhitespace.test(string.charAt(index))) {
5094
- }
5095
- return index;
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 trimmedEndIndex = _trimmedEndIndex;
5100
- var reTrimStart = /^\s+/;
5101
- function baseTrim$1(string) {
5102
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
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 = _baseTrim, isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
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;
@@ -8557,7 +8573,7 @@ var hasRequiredTrim;
8557
8573
  function requireTrim () {
8558
8574
  if (hasRequiredTrim) return trim_1;
8559
8575
  hasRequiredTrim = 1;
8560
- var baseToString = _baseToString, baseTrim = _baseTrim, castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8576
+ var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8561
8577
  function trim(string, chars, guard) {
8562
8578
  string = toString(string);
8563
8579
  if (string && (guard || chars === void 0)) {
@@ -47304,6 +47320,7 @@ const AnalyticEvents = {
47304
47320
  CREDENTIALS_CLICKED_GET_HELP: "credentials_clicked_get_help",
47305
47321
  ENTERED_LOGIN: "entered_login",
47306
47322
  ENTERED_PASSWORD: "entered_password",
47323
+ INITIAL_DATA_READY: "initial_data_ready",
47307
47324
  LOGIN_ERROR_CLICKED_GET_HELP: "login_error_clicked_get_help",
47308
47325
  MFA_CLICKED_GET_HELP: "mfa_clicked_get_help",
47309
47326
  MFA_ENTERED_INPUT: "mfa_entered_input",
@@ -68772,7 +68789,7 @@ const DEFAULT_POLLING_STATE = {
68772
68789
  userMessage: CONNECTING_MESSAGES.STARTING
68773
68790
  // message to show the end user
68774
68791
  };
68775
- function pollMember(memberGuid, api, onPostMessage) {
68792
+ function pollMember(memberGuid, api, onPostMessage, sendPosthogEvent) {
68776
68793
  return interval(3e3).pipe(
68777
68794
  switchMap(
68778
68795
  () => (
@@ -68784,6 +68801,7 @@ function pollMember(memberGuid, api, onPostMessage) {
68784
68801
  map((job) => {
68785
68802
  if (job.async_account_data_ready) {
68786
68803
  onPostMessage("connect/initialDataReady", { member_guid: member.guid });
68804
+ sendPosthogEvent(AnalyticEvents.INITIAL_DATA_READY, { member_guid: member.guid });
68787
68805
  }
68788
68806
  return member;
68789
68807
  })
@@ -71206,6 +71224,7 @@ const Connecting = (props) => {
71206
71224
  onUpsertMember
71207
71225
  } = props;
71208
71226
  const selectedInstitution = useSelector(getSelectedInstitution);
71227
+ const sendPosthogEvent = useAnalyticsEvent();
71209
71228
  const currentMember = useSelector(getCurrentMember);
71210
71229
  const isComboJobsEnabled = useSelector(isConnectComboJobsEnabled);
71211
71230
  const jobSchedule = useSelector((state) => state.connect.jobSchedule);
@@ -71344,7 +71363,7 @@ const Connecting = (props) => {
71344
71363
  return needsJobStarted ? startJob$ : of(currentMember);
71345
71364
  }).pipe(
71346
71365
  concatMap(
71347
- (member) => pollMember(member.guid, api, onPostMessage).pipe(
71366
+ (member) => pollMember(member.guid, api, onPostMessage, sendPosthogEvent).pipe(
71348
71367
  tap((pollingState) => handleMemberPoll(pollingState)),
71349
71368
  filter((pollingState) => pollingState.jobIsDone),
71350
71369
  pluck("currentResponse"),