@stytch/vanilla-js 5.4.0 → 5.5.1

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/adminPortal/components/DeleteConnection.d.ts +5 -2
  3. package/dist/adminPortal/components/Select.d.ts +2 -0
  4. package/dist/adminPortal/index.esm.js +1 -1
  5. package/dist/adminPortal/index.js +1 -1
  6. package/dist/adminPortal/scim/AdminPortalSCIM.d.ts +11 -1
  7. package/dist/adminPortal/scim/SCIMConnectionDangerZoneSection.d.ts +5 -0
  8. package/dist/adminPortal/scim/SCIMConnectionDetailsSection.d.ts +5 -0
  9. package/dist/adminPortal/scim/SCIMConnectionRoleAssignmentsSection.d.ts +7 -0
  10. package/dist/adminPortal/scim/SCIMConnectionTokenRotationSection.d.ts +5 -0
  11. package/dist/adminPortal/scim/mountAdminPortalSCIM.d.ts +1 -1
  12. package/dist/adminPortal/sso/AdminPortalSSO.d.ts +2 -2
  13. package/dist/adminPortal/sso/IdpInfo.d.ts +6 -2
  14. package/dist/adminPortal/sso/RoleAssignmentsSection.d.ts +2 -2
  15. package/dist/adminPortal/sso/SSONewConnectionConfigureScreen.d.ts +3 -3
  16. package/dist/adminPortal/sso/SSORouter.d.ts +7 -7
  17. package/dist/adminPortal/sso/TaggedConnection.d.ts +5 -2
  18. package/dist/adminPortal/utils/Connection.d.ts +1 -1
  19. package/dist/adminPortal/utils/ConnectionType.d.ts +1 -1
  20. package/dist/adminPortal/utils/getSsoRoleAssignments.d.ts +8 -0
  21. package/dist/adminPortal/utils/prependAsterisks.d.ts +1 -0
  22. package/dist/adminPortal/utils/useMutateScimConnection.d.ts +1 -1
  23. package/dist/adminPortal/utils/useMutateSsoConnection.d.ts +2 -5
  24. package/dist/b2b/index.esm.js +17 -11
  25. package/dist/b2b/index.headless.esm.js +1 -1
  26. package/dist/b2b/index.headless.js +1 -1
  27. package/dist/b2b/index.js +17 -11
  28. package/dist/index.esm.js +1 -1
  29. package/dist/index.headless.esm.js +1 -1
  30. package/dist/index.headless.js +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/ui/b2b/hooks/useEffectiveAuthConfig.d.ts +3 -3
  33. package/dist/ui/b2b/screens/OAuthButtons.d.ts +2 -2
  34. package/dist/utils/oauthProviderType.d.ts +1 -1
  35. package/package.json +2 -2
@@ -1,7 +1,17 @@
1
1
  import React from 'react';
2
2
  import { MappedPropsFromRouteMap } from '../Router';
3
3
  import { AdminPortalComponentMountOptions } from '../makeAdminPortalComponentMountFn';
4
- export type AdminPortalSCIMMountOptions = AdminPortalComponentMountOptions;
4
+ import { AdminPortalUIConfigRoleDisplayProvider } from '../utils/AdminPortalUIConfigRoleDisplayProvider';
5
+ /**
6
+ * The UI configuration object for SCIM used in the Admin Portal.
7
+ */
8
+ export type AdminPortalSCIMUIConfig = AdminPortalUIConfigRoleDisplayProvider;
9
+ export interface AdminPortalSCIMMountOptions extends AdminPortalComponentMountOptions {
10
+ /**
11
+ * An {@link AdminPortalSCIMUIConfig} object containing custom configuration.
12
+ */
13
+ config?: AdminPortalSCIMUIConfig;
14
+ }
5
15
  declare const routeMap: {
6
16
  scimConnection: () => React.JSX.Element;
7
17
  newConnection: () => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SCIMConnection } from '@stytch/core/public';
3
+ export declare const DangerZoneSection: ({ connection }: {
4
+ connection: SCIMConnection;
5
+ }) => React.JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SCIMConnection } from '@stytch/core/public';
3
+ export declare const DetailsSection: ({ connection }: {
4
+ connection: SCIMConnection;
5
+ }) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SCIMConnection } from '@stytch/core/public';
3
+ import { UseBlockNavigation } from '../Router';
4
+ export declare const RoleAssignmentsSection: ({ connection, useBlockNavigation, }: {
5
+ connection: SCIMConnection;
6
+ useBlockNavigation: UseBlockNavigation;
7
+ }) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SCIMConnection } from '@stytch/core/public';
3
+ export declare const TokenRotationSection: ({ connection }: {
4
+ connection: SCIMConnection;
5
+ }) => React.JSX.Element;
@@ -12,4 +12,4 @@ export type { AdminPortalSCIMMountOptions } from './AdminPortalSCIM';
12
12
  *
13
13
  * @throws An error when the element specified by element cannot be found.
14
14
  */
15
- export declare const mountAdminPortalSCIM: (options: import("../makeAdminPortalComponentMountFn").AdminPortalComponentMountOptions) => void;
15
+ export declare const mountAdminPortalSCIM: (options: import("./AdminPortalSCIM").AdminPortalSCIMMountOptions) => void;
@@ -18,8 +18,8 @@ declare const routeMap: {
18
18
  }) => React.JSX.Element;
19
19
  connectionsList: () => React.JSX.Element;
20
20
  newConnection: () => React.JSX.Element;
21
- newConnectionConfigure: ({ connection: connectionProp }: {
22
- connection: import("./TaggedConnection").TaggedConnection;
21
+ newConnectionConfigure: ({ connection: connectionProp, }: {
22
+ connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
23
23
  }) => React.JSX.Element;
24
24
  };
25
25
  export type SsoRouterMappedProps = MappedPropsFromRouteMap<typeof routeMap>;
@@ -1,6 +1,6 @@
1
1
  import { RequireAllOrNone } from 'type-fest';
2
2
  import { ConnectionType } from '../utils/ConnectionType';
3
- import { OIDCTaggedConnection, SAMLTaggedConnection, TaggedConnection } from './TaggedConnection';
3
+ import { ExternalTaggedConnection, OIDCTaggedConnection, SAMLTaggedConnection, TaggedConnection } from './TaggedConnection';
4
4
  export type SamlKnownIdp = 'generic' | 'okta' | 'microsoft-entra' | 'google-workspace';
5
5
  export type OidcKnownIdp = 'generic' | 'okta' | 'microsoft-entra';
6
6
  export type KnownIdp = SamlKnownIdp | OidcKnownIdp;
@@ -138,7 +138,11 @@ type IdpAndConnectionInfoReturnType<TConnectionType extends ConnectionType> = ((
138
138
  connection: SAMLTaggedConnection;
139
139
  }) | (OidcTaggedIdpInfo & {
140
140
  connection: OIDCTaggedConnection;
141
- })) & {
141
+ }) | {
142
+ idp: undefined;
143
+ type: 'external';
144
+ connection: ExternalTaggedConnection;
145
+ }) & {
142
146
  type: TConnectionType;
143
147
  };
144
148
  export declare const getIdpAndConnectionInfo: <TConnectionType extends ConnectionType>(connection: TaggedConnection & {
@@ -1,6 +1,6 @@
1
- import { SAMLConnection } from '@stytch/core/public';
2
1
  import React from 'react';
2
+ import { ExternalTaggedConnection, SAMLTaggedConnection } from './TaggedConnection';
3
3
  export declare const RoleAssignmentsSection: ({ canUpdateConnection, connection, }: {
4
4
  canUpdateConnection: boolean;
5
- connection: SAMLConnection;
5
+ connection: SAMLTaggedConnection | ExternalTaggedConnection;
6
6
  }) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TaggedConnection } from './TaggedConnection';
3
- export declare const SSONewConnectionConfigureScreen: ({ connection: connectionProp }: {
4
- connection: TaggedConnection;
2
+ import { OIDCTaggedConnection, SAMLTaggedConnection } from './TaggedConnection';
3
+ export declare const SSONewConnectionConfigureScreen: ({ connection: connectionProp, }: {
4
+ connection: SAMLTaggedConnection | OIDCTaggedConnection;
5
5
  }) => React.JSX.Element;
@@ -7,8 +7,8 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
7
7
  }) => import("react").JSX.Element;
8
8
  connectionsList: () => import("react").JSX.Element;
9
9
  newConnection: () => import("react").JSX.Element;
10
- newConnectionConfigure: ({ connection: connectionProp }: {
11
- connection: import("./TaggedConnection").TaggedConnection;
10
+ newConnectionConfigure: ({ connection: connectionProp, }: {
11
+ connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
12
12
  }) => import("react").JSX.Element;
13
13
  }>>;
14
14
  }) => import("react").JSX.Element, SsoRouter: ({ routeMap }: {
@@ -19,7 +19,7 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
19
19
  connectionsList: import("react").ComponentType<never>;
20
20
  newConnection: import("react").ComponentType<never>;
21
21
  newConnectionConfigure: import("react").ComponentType<{
22
- connection: import("./TaggedConnection").TaggedConnection;
22
+ connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
23
23
  }>;
24
24
  };
25
25
  }) => import("react").JSX.Element | null, useSsoRouterController: () => import("../Router").RouterController<import("../Router").MappedPropsFromRouteMap<{
@@ -28,8 +28,8 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
28
28
  }) => import("react").JSX.Element;
29
29
  connectionsList: () => import("react").JSX.Element;
30
30
  newConnection: () => import("react").JSX.Element;
31
- newConnectionConfigure: ({ connection: connectionProp }: {
32
- connection: import("./TaggedConnection").TaggedConnection;
31
+ newConnectionConfigure: ({ connection: connectionProp, }: {
32
+ connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
33
33
  }) => import("react").JSX.Element;
34
34
  }>>, useSsoRouterState: () => {
35
35
  currentRoute: import("../Router").RouterStateEntry<import("../Router").MappedPropsFromRouteMap<{
@@ -38,8 +38,8 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
38
38
  }) => import("react").JSX.Element;
39
39
  connectionsList: () => import("react").JSX.Element;
40
40
  newConnection: () => import("react").JSX.Element;
41
- newConnectionConfigure: ({ connection: connectionProp }: {
42
- connection: import("./TaggedConnection").TaggedConnection;
41
+ newConnectionConfigure: ({ connection: connectionProp, }: {
42
+ connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
43
43
  }) => import("react").JSX.Element;
44
44
  }>>;
45
45
  };
@@ -1,8 +1,11 @@
1
- import { OIDCConnection, SAMLConnection } from '@stytch/core/public';
1
+ import { ExternalConnection, OIDCConnection, SAMLConnection } from '@stytch/core/public';
2
2
  export type OIDCTaggedConnection = OIDCConnection & {
3
3
  connectionType: 'oidc';
4
4
  };
5
5
  export type SAMLTaggedConnection = SAMLConnection & {
6
6
  connectionType: 'saml';
7
7
  };
8
- export type TaggedConnection = OIDCTaggedConnection | SAMLTaggedConnection;
8
+ export type ExternalTaggedConnection = ExternalConnection & {
9
+ connectionType: 'external';
10
+ };
11
+ export type TaggedConnection = OIDCTaggedConnection | SAMLTaggedConnection | ExternalTaggedConnection;
@@ -3,7 +3,7 @@ export type Connection = {
3
3
  id: string;
4
4
  displayName: string;
5
5
  connectionType: ConnectionType;
6
- idp: string;
6
+ idp: string | undefined;
7
7
  status: string;
8
8
  isDefault: boolean;
9
9
  };
@@ -1 +1 @@
1
- export type ConnectionType = 'saml' | 'oidc';
1
+ export type ConnectionType = 'saml' | 'oidc' | 'external';
@@ -0,0 +1,8 @@
1
+ import { ExternalTaggedConnection, SAMLTaggedConnection } from '../sso/TaggedConnection';
2
+ export declare const getSsoConnectionRoleAssignments: (connection: SAMLTaggedConnection | ExternalTaggedConnection) => {
3
+ role_id: string;
4
+ }[];
5
+ export declare const getSsoGroupRoleAssignments: (connection: SAMLTaggedConnection | ExternalTaggedConnection) => {
6
+ role_id: string;
7
+ group: string;
8
+ }[];
@@ -0,0 +1 @@
1
+ export declare const prependAsterisks: (value: string) => string;
@@ -1,4 +1,4 @@
1
1
  import { B2BSCIMUpdateConnectionOptions } from '@stytch/core/public';
2
2
  export declare const useMutateScimConnectionRoleAssignments: () => {
3
- mutate: import("./useMutateWithToast").MutationFn<B2BSCIMUpdateConnectionOptions, void>;
3
+ mutate: import("./useMutateWithToast").MutationFn<Pick<B2BSCIMUpdateConnectionOptions, "connection_id" | "scim_group_implicit_role_assignments">, void>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { B2BSSOOIDCUpdateConnectionOptions, B2BSSOSAMLDeleteVerificationCertificateOptions, B2BSSOSAMLUpdateConnectionByURLOptions, B2BSSOSAMLUpdateConnectionOptions } from '@stytch/core/public';
1
+ import { B2BSSOOIDCUpdateConnectionOptions, B2BSSOSAMLDeleteVerificationCertificateOptions, B2BSSOSAMLUpdateConnectionByURLOptions, B2BSSOSAMLUpdateConnectionOptions, B2BSSOUpdateExternalConnectionOptions } from '@stytch/core/public';
2
2
  import { ConnectionType } from './ConnectionType';
3
3
  export declare const useMutateSsoConnectionByUrl: () => {
4
4
  mutate: import("./useMutateWithToast").MutationFn<B2BSSOSAMLUpdateConnectionByURLOptions, void>;
@@ -12,8 +12,5 @@ export declare const useDeleteSsoConnectionCert: () => {
12
12
  mutate: import("./useMutateWithToast").MutationFn<B2BSSOSAMLDeleteVerificationCertificateOptions, void>;
13
13
  };
14
14
  export declare const useMutateSsoConnection: <TConnectionType extends ConnectionType>(connectionType: TConnectionType) => {
15
- mutate: import("./useMutateWithToast").MutationFn<TConnectionType extends "saml" ? B2BSSOSAMLUpdateConnectionOptions : B2BSSOOIDCUpdateConnectionOptions, void>;
16
- };
17
- export declare const useMutateSamlConnection: () => {
18
- mutate: import("./useMutateWithToast").MutationFn<B2BSSOSAMLUpdateConnectionOptions, void>;
15
+ mutate: import("./useMutateWithToast").MutationFn<TConnectionType extends "saml" ? B2BSSOSAMLUpdateConnectionOptions : TConnectionType extends "oidc" ? B2BSSOOIDCUpdateConnectionOptions : B2BSSOUpdateExternalConnectionOptions, void>;
19
16
  };
@@ -2681,7 +2681,7 @@ var getParamsFromB2BOAuthProviderConfig = function getParamsFromB2BOAuthProvider
2681
2681
  var oauthProvider = providerType;
2682
2682
  return {
2683
2683
  type: oauthProvider,
2684
- oneTap: oneTap,
2684
+ one_tap: oneTap,
2685
2685
  customScopes: customScopes,
2686
2686
  providerParams: providerParams
2687
2687
  };
@@ -2691,7 +2691,7 @@ var useIsOnlyFloatingOneTap = function useIsOnlyFloatingOneTap() {
2691
2691
  var isOnlyFloatingOneTap = F$1(function () {
2692
2692
  var _a, _b;
2693
2693
  var oauthProvider = config.oauthOptions ? getParamsFromB2BOAuthProviderConfig((_a = config.oauthOptions) === null || _a === void 0 ? void 0 : _a.providers[0]) : undefined;
2694
- var isGoogleOneTap = (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.type) === B2BOAuthProviders.Google && (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.oneTap) === true;
2694
+ var isGoogleOneTap = (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.type) === B2BOAuthProviders.Google && (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.one_tap) === true;
2695
2695
  return config.products.length === 1 && config.products.includes(B2BProducts.oauth) && ((_b = config.oauthOptions) === null || _b === void 0 ? void 0 : _b.providers.length) === 1 && isGoogleOneTap;
2696
2696
  }, [config]);
2697
2697
  return isOnlyFloatingOneTap;
@@ -3065,7 +3065,7 @@ var useEffectiveAuthConfig = function useEffectiveAuthConfig() {
3065
3065
  if (provider) {
3066
3066
  return (_a = oauthProviderConfigs.find(function (oauthProvider) {
3067
3067
  return oauthProvider.type === provider;
3068
- })) !== null && _a !== void 0 ? _a : provider;
3068
+ })) !== null && _a !== void 0 ? _a : getParamsFromB2BOAuthProviderConfig(provider);
3069
3069
  }
3070
3070
  }).filter(isTruthy);
3071
3071
  }, [authMethodsToShow, oauthProviderConfigs]);
@@ -3136,12 +3136,11 @@ var OAuthButtons = function OAuthButtons() {
3136
3136
  discoveryRedirectURL = _ref61.discoveryRedirectURL,
3137
3137
  customScopes = _ref61.customScopes,
3138
3138
  providerParams = _ref61.providerParams;
3139
- var mappedProviders = oauthProviderSettings.map(function (provider) {
3140
- var oauthProvider = getParamsFromB2BOAuthProviderConfig(provider);
3139
+ var mappedProviders = oauthProviderSettings.map(function (oauthProvider) {
3141
3140
  var _getProviderInfo = getProviderInfo(oauthProvider.type),
3142
3141
  icon = _getProviderInfo.icon,
3143
3142
  providerTypeTitle = _getProviderInfo.providerTypeTitle;
3144
- if (oauthProvider.oneTap) {
3143
+ if (oauthProvider.one_tap) {
3145
3144
  return /*#__PURE__*/y(B2BGoogleOneTap, {
3146
3145
  key: "oauth-".concat(oauthProvider.type)
3147
3146
  });
@@ -4861,16 +4860,23 @@ var PhoneInput = function PhoneInput(_ref87) {
4861
4860
  type: 'text',
4862
4861
  onChange: function onChange(e) {
4863
4862
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
4864
- var parsedPhoneNumber;
4863
+ var userInput, parsedPhoneNumber;
4865
4864
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
4866
4865
  while (1) switch (_context10.prev = _context10.next) {
4867
4866
  case 0:
4868
- _context10.next = 2;
4869
- return parsePhoneNumber(e.target.value, country);
4870
- case 2:
4867
+ userInput = e.target.value;
4868
+ _context10.next = 3;
4869
+ return parsePhoneNumber(userInput, country);
4870
+ case 3:
4871
4871
  parsedPhoneNumber = _context10.sent;
4872
+ if (!(userInput !== e.target.value)) {
4873
+ _context10.next = 6;
4874
+ break;
4875
+ }
4876
+ return _context10.abrupt("return");
4877
+ case 6:
4872
4878
  setPhone(parsedPhoneNumber.national);
4873
- case 4:
4879
+ case 7:
4874
4880
  case "end":
4875
4881
  return _context10.stop();
4876
4882
  }
@@ -1433,7 +1433,7 @@ var B2BOneTapProvider = /*#__PURE__*/function () {
1433
1433
  }]);
1434
1434
  return B2BOneTapProvider;
1435
1435
  }();
1436
- var version = "5.4.0";
1436
+ var version = "5.5.1";
1437
1437
  var NetworkClient = /*#__PURE__*/function () {
1438
1438
  function NetworkClient(_publicToken, _subscriptionDataLayer, _liveAPIURL, _testAPIURL, additionalTelemetryDataFn) {
1439
1439
  _classCallCheck(this, NetworkClient);
@@ -1434,7 +1434,7 @@ var B2BOneTapProvider = /*#__PURE__*/function () {
1434
1434
  }]);
1435
1435
  return B2BOneTapProvider;
1436
1436
  }();
1437
- var version = "5.4.0";
1437
+ var version = "5.5.1";
1438
1438
  var NetworkClient = /*#__PURE__*/function () {
1439
1439
  function NetworkClient(_publicToken, _subscriptionDataLayer, _liveAPIURL, _testAPIURL, additionalTelemetryDataFn) {
1440
1440
  _classCallCheck(this, NetworkClient);
package/dist/b2b/index.js CHANGED
@@ -2682,7 +2682,7 @@ var getParamsFromB2BOAuthProviderConfig = function getParamsFromB2BOAuthProvider
2682
2682
  var oauthProvider = providerType;
2683
2683
  return {
2684
2684
  type: oauthProvider,
2685
- oneTap: oneTap,
2685
+ one_tap: oneTap,
2686
2686
  customScopes: customScopes,
2687
2687
  providerParams: providerParams
2688
2688
  };
@@ -2692,7 +2692,7 @@ var useIsOnlyFloatingOneTap = function useIsOnlyFloatingOneTap() {
2692
2692
  var isOnlyFloatingOneTap = extractErrorMessage.F(function () {
2693
2693
  var _a, _b;
2694
2694
  var oauthProvider = config.oauthOptions ? getParamsFromB2BOAuthProviderConfig((_a = config.oauthOptions) === null || _a === void 0 ? void 0 : _a.providers[0]) : undefined;
2695
- var isGoogleOneTap = (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.type) === internal.B2BOAuthProviders.Google && (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.oneTap) === true;
2695
+ var isGoogleOneTap = (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.type) === internal.B2BOAuthProviders.Google && (oauthProvider === null || oauthProvider === void 0 ? void 0 : oauthProvider.one_tap) === true;
2696
2696
  return config.products.length === 1 && config.products.includes(internal.B2BProducts.oauth) && ((_b = config.oauthOptions) === null || _b === void 0 ? void 0 : _b.providers.length) === 1 && isGoogleOneTap;
2697
2697
  }, [config]);
2698
2698
  return isOnlyFloatingOneTap;
@@ -3066,7 +3066,7 @@ var useEffectiveAuthConfig = function useEffectiveAuthConfig() {
3066
3066
  if (provider) {
3067
3067
  return (_a = oauthProviderConfigs.find(function (oauthProvider) {
3068
3068
  return oauthProvider.type === provider;
3069
- })) !== null && _a !== void 0 ? _a : provider;
3069
+ })) !== null && _a !== void 0 ? _a : getParamsFromB2BOAuthProviderConfig(provider);
3070
3070
  }
3071
3071
  }).filter(extractErrorMessage.isTruthy);
3072
3072
  }, [authMethodsToShow, oauthProviderConfigs]);
@@ -3137,12 +3137,11 @@ var OAuthButtons = function OAuthButtons() {
3137
3137
  discoveryRedirectURL = _ref61.discoveryRedirectURL,
3138
3138
  customScopes = _ref61.customScopes,
3139
3139
  providerParams = _ref61.providerParams;
3140
- var mappedProviders = oauthProviderSettings.map(function (provider) {
3141
- var oauthProvider = getParamsFromB2BOAuthProviderConfig(provider);
3140
+ var mappedProviders = oauthProviderSettings.map(function (oauthProvider) {
3142
3141
  var _getProviderInfo = getProviderInfo(oauthProvider.type),
3143
3142
  icon = _getProviderInfo.icon,
3144
3143
  providerTypeTitle = _getProviderInfo.providerTypeTitle;
3145
- if (oauthProvider.oneTap) {
3144
+ if (oauthProvider.one_tap) {
3146
3145
  return /*#__PURE__*/extractErrorMessage.y(B2BGoogleOneTap, {
3147
3146
  key: "oauth-".concat(oauthProvider.type)
3148
3147
  });
@@ -4862,16 +4861,23 @@ var PhoneInput = function PhoneInput(_ref87) {
4862
4861
  type: 'text',
4863
4862
  onChange: function onChange(e) {
4864
4863
  return internal.__awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
4865
- var parsedPhoneNumber;
4864
+ var userInput, parsedPhoneNumber;
4866
4865
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
4867
4866
  while (1) switch (_context10.prev = _context10.next) {
4868
4867
  case 0:
4869
- _context10.next = 2;
4870
- return parsePhoneNumber(e.target.value, country);
4871
- case 2:
4868
+ userInput = e.target.value;
4869
+ _context10.next = 3;
4870
+ return parsePhoneNumber(userInput, country);
4871
+ case 3:
4872
4872
  parsedPhoneNumber = _context10.sent;
4873
+ if (!(userInput !== e.target.value)) {
4874
+ _context10.next = 6;
4875
+ break;
4876
+ }
4877
+ return _context10.abrupt("return");
4878
+ case 6:
4873
4879
  setPhone(parsedPhoneNumber.national);
4874
- case 4:
4880
+ case 7:
4875
4881
  case "end":
4876
4882
  return _context10.stop();
4877
4883
  }