@mxenabled/connect-widget 0.0.6 → 0.0.7

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
@@ -5130,23 +5130,39 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
5130
5130
  }
5131
5131
  var _baseFindIndex = baseFindIndex$2;
5132
5132
 
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;
5133
+ var _trimmedEndIndex;
5134
+ var hasRequired_trimmedEndIndex;
5135
+
5136
+ function require_trimmedEndIndex () {
5137
+ if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
5138
+ hasRequired_trimmedEndIndex = 1;
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;
5139
5148
  }
5140
- var _trimmedEndIndex = trimmedEndIndex$1;
5141
5149
 
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;
5150
+ var _baseTrim;
5151
+ var hasRequired_baseTrim;
5152
+
5153
+ function require_baseTrim () {
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;
5146
5163
  }
5147
- var _baseTrim = baseTrim$1;
5148
5164
 
5149
- var baseTrim = _baseTrim, isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
5165
+ var baseTrim = require_baseTrim(), isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
5150
5166
  var NAN = 0 / 0;
5151
5167
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
5152
5168
  var reIsBinary = /^0b[01]+$/i;
@@ -8612,7 +8628,7 @@ var hasRequiredTrim;
8612
8628
  function requireTrim () {
8613
8629
  if (hasRequiredTrim) return trim_1;
8614
8630
  hasRequiredTrim = 1;
8615
- var baseToString = _baseToString, baseTrim = _baseTrim, castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8631
+ var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
8616
8632
  function trim(string, chars, guard) {
8617
8633
  string = toString(string);
8618
8634
  if (string && (guard || chars === void 0)) {
@@ -30462,7 +30478,7 @@ const ApiContext = React$2.createContext(defaultApiValue);
30462
30478
  const ApiProvider = ({ apiValue, children }) => {
30463
30479
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ApiContext.Provider, { value: { ...defaultApiValue, ...apiValue }, children });
30464
30480
  };
30465
- const useApi$1 = () => {
30481
+ const useApi = () => {
30466
30482
  const context = React$2.useContext(ApiContext);
30467
30483
  if (context === void 0) {
30468
30484
  throw new Error("useApi must be used within a ApiProvider");
@@ -30473,7 +30489,7 @@ const useApi$1 = () => {
30473
30489
  const RequestInstitution = React__default.forwardRef((props, requestInstitutionRef) => {
30474
30490
  const { handleClose, handleTicketSuccess, user } = props;
30475
30491
  useAnalyticsPath(...PageviewInfo.CONNECT_SUPPORT_REQUEST_INSTITUTION);
30476
- const { api } = useApi$1();
30492
+ const { api } = useApi();
30477
30493
  const [submitting, setSubmitting] = useState(false);
30478
30494
  const initialForm = {
30479
30495
  email: user.email ?? "",
@@ -30665,7 +30681,7 @@ const schema$5 = {
30665
30681
  const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
30666
30682
  const { handleClose, handleTicketSuccess, user } = props;
30667
30683
  useAnalyticsPath(...PageviewInfo.CONNECT_SUPPORT_GENERAL);
30668
- const { api } = useApi$1();
30684
+ const { api } = useApi();
30669
30685
  const [submitting, setSubmitting] = useState(false);
30670
30686
  const initialForm = {
30671
30687
  email: user.email ?? "",
@@ -31071,7 +31087,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
31071
31087
  const reduxDispatch = useDispatch();
31072
31088
  const sendPosthogEvent = useAnalyticsEvent();
31073
31089
  const postMessageFunctions = useContext(PostMessageContext);
31074
- const { api } = useApi$1();
31090
+ const { api } = useApi();
31075
31091
  const {
31076
31092
  connectConfig,
31077
31093
  connectedMembers,
@@ -32162,7 +32178,7 @@ const MFAStep = React__default.forwardRef((props, navigationRef) => {
32162
32178
  const postMessageFunctions = useContext(PostMessageContext);
32163
32179
  const dispatch = useDispatch();
32164
32180
  const sendPosthogEvent = useAnalyticsEvent();
32165
- const { api } = useApi$1();
32181
+ const { api } = useApi();
32166
32182
  const mfaCredentials = _get(currentMember, "mfa.credentials", []);
32167
32183
  const tokens = useTokens();
32168
32184
  const styles = getStyles$P(tokens);
@@ -34247,7 +34263,7 @@ const WaitingForOAuth = ({
34247
34263
  const tokens = useTokens();
34248
34264
  const styles = getStyles$L(tokens);
34249
34265
  const getNextDelay = getDelay();
34250
- const { api } = useApi$1();
34266
+ const { api } = useApi();
34251
34267
  useEffect(() => {
34252
34268
  const oauthStateCompleted$ = of(member).pipe(
34253
34269
  delay$1(1500),
@@ -35061,7 +35077,7 @@ const OAuthStep = React__default.forwardRef((props, navigationRef) => {
35061
35077
  const [isLeavingUrl, setIsLeavingUrl] = useState(null);
35062
35078
  const [showInterstitialDisclosure, setShowInterstitialDisclosure] = useState(false);
35063
35079
  const sendPosthogEvent = useAnalyticsEvent();
35064
- const { api } = useApi$1();
35080
+ const { api } = useApi();
35065
35081
  useImperativeHandle(navigationRef, () => {
35066
35082
  return {
35067
35083
  handleBackButton() {
@@ -35815,7 +35831,7 @@ const UpdateMemberForm = (props) => {
35815
35831
  error: null
35816
35832
  });
35817
35833
  const postMessageFunctions = useContext(PostMessageContext);
35818
- const { api } = useApi$1();
35834
+ const { api } = useApi();
35819
35835
  const dispatch = useDispatch();
35820
35836
  useEffect(() => {
35821
35837
  const request$ = defer(() => api.getMemberCredentials(currentMember.guid)).subscribe(
@@ -35898,7 +35914,7 @@ const CreateMemberForm = (props) => {
35898
35914
  error: null
35899
35915
  });
35900
35916
  const postMessageFunctions = useContext(PostMessageContext);
35901
- const { api } = useApi$1();
35917
+ const { api } = useApi();
35902
35918
  const dispatch = useDispatch();
35903
35919
  useEffect(() => {
35904
35920
  const request$ = defer(() => api.getInstitutionCredentials(institution.guid)).subscribe(
@@ -36345,7 +36361,7 @@ const Connecting$2 = (props) => {
36345
36361
  const analyticFunctions = useContext(AnalyticContext);
36346
36362
  const postMessageFunctions = useContext(PostMessageContext);
36347
36363
  const connectingRef = useRef(null);
36348
- const { api } = useApi$1();
36364
+ const { api } = useApi();
36349
36365
  const [message, setMessage] = useState(CONNECTING_MESSAGES.STARTING);
36350
36366
  const [timedOut, setTimedOut] = useState(false);
36351
36367
  const [connectingError, setConnectingError] = useState(null);
@@ -37738,7 +37754,7 @@ const RoutingNumber = (props) => {
37738
37754
  const { accountDetails, onContinue, stepToIAV } = props;
37739
37755
  const connectConfig = useSelector(selectConnectConfig);
37740
37756
  const includeIdentity = connectConfig?.include_identity ?? false;
37741
- const { api } = useApi$1();
37757
+ const { api } = useApi();
37742
37758
  const containerRef = useRef(null);
37743
37759
  useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_ROUTING_NUMBER);
37744
37760
  const tokens = useTokens();
@@ -38331,7 +38347,7 @@ DetailReviewItem.propTypes = {
38331
38347
 
38332
38348
  const ConfirmDetails = (props) => {
38333
38349
  const { accountDetails, currentMicrodeposit, onEditForm, onError, onSuccess } = props;
38334
- const { api } = useApi$1();
38350
+ const { api } = useApi();
38335
38351
  const containerRef = useRef(null);
38336
38352
  useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_CONFIRM_DETAILS);
38337
38353
  const [isSubmitting, setIsSubmitting] = useState(false);
@@ -38599,7 +38615,7 @@ const reducer$3 = (state, action) => {
38599
38615
  const VerifyDeposits = ({ microdeposit, onSuccess }) => {
38600
38616
  const containerRef = useRef(null);
38601
38617
  useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_VERIFY_DEPOSITS);
38602
- const { api } = useApi$1();
38618
+ const { api } = useApi();
38603
38619
  const initialForm = { firstAmount: "", secondAmount: "" };
38604
38620
  const { handleTextInputChange, handleSubmit, values, errors } = useForm(
38605
38621
  () => dispatch({ type: ACTIONS$1.SET_SUBMITTING }),
@@ -38863,7 +38879,7 @@ MicrodepositErrors.propTypes = {
38863
38879
  const Verifying = ({ microdeposit, onError, onSuccess }) => {
38864
38880
  const containerRef = useRef(null);
38865
38881
  useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_VERIFYING);
38866
- const { api } = useApi$1();
38882
+ const { api } = useApi();
38867
38883
  const tokens = useTokens();
38868
38884
  const styles = getStyles$d(tokens);
38869
38885
  useEffect(() => {
@@ -39155,7 +39171,7 @@ const reducer$2 = (state, action) => {
39155
39171
  };
39156
39172
  const Microdeposits = React__default.forwardRef((props, navigationRef) => {
39157
39173
  useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS);
39158
- const { api } = useApi$1();
39174
+ const { api } = useApi();
39159
39175
  const [state, dispatch] = useReducer(reducer$2, initialState);
39160
39176
  const { microdepositGuid, stepToIAV } = props;
39161
39177
  const postMessageFunctions = useContext(PostMessageContext);
@@ -39356,7 +39372,7 @@ const getViewByStatus = (status) => {
39356
39372
 
39357
39373
  const VerifyExistingMember = (props) => {
39358
39374
  useAnalyticsPath(...PageviewInfo.CONNECT_VERIFY_EXISTING_MEMBER);
39359
- const { api } = useApi$1();
39375
+ const { api } = useApi();
39360
39376
  const dispatch = useDispatch();
39361
39377
  const { members, onAddNew } = props;
39362
39378
  const iavMembers = members.filter((member) => member.verification_is_enabled);
@@ -47562,7 +47578,7 @@ const Actions = {
47562
47578
  };
47563
47579
 
47564
47580
  const useSelectInstitution = () => {
47565
- const { api } = useApi$1();
47581
+ const { api } = useApi();
47566
47582
  const [institutionGuid, setInstitutionGuid] = useState("");
47567
47583
  const dispatch = useDispatch();
47568
47584
  const handleSelectInstitution = useCallback(
@@ -49342,7 +49358,7 @@ const DeleteMemberSurvey = (props) => {
49342
49358
  const { member, onCancel, onDeleteSuccess } = props;
49343
49359
  const containerRef = useRef(null);
49344
49360
  useAnalyticsPath(...PageviewInfo.CONNECT_DELETE_MEMBER_SURVEY);
49345
- const { api } = useApi$1();
49361
+ const { api } = useApi();
49346
49362
  const [selectedReason, setSelectedReason] = useState(null);
49347
49363
  const [deleteMemberState, updateDeleteMemberState] = useState({
49348
49364
  loading: false,
@@ -49587,7 +49603,7 @@ const getErrorResource = (err) => {
49587
49603
  }
49588
49604
  };
49589
49605
  const useLoadConnect = () => {
49590
- const { api } = useApi$1();
49606
+ const { api } = useApi();
49591
49607
  const profiles = useSelector((state) => state.profiles);
49592
49608
  const [config, setConfig] = useState({});
49593
49609
  const dispatch = useDispatch();
@@ -53062,7 +53078,7 @@ const TooSmallDialog = (props) => {
53062
53078
  const [pageviewSent, setPagviewSent] = useState(false);
53063
53079
  const tokens = useTokens();
53064
53080
  const styles = getStyles(tokens);
53065
- const { api } = useApi$1();
53081
+ const { api } = useApi();
53066
53082
  useEffect(() => {
53067
53083
  const shouldShowtooSmallConsiderSnooze = shouldShowTooSmallDialogFromSnooze(
53068
53084
  userProfile?.too_small_modal_dismissed_at || null,