@asgardeo/react 0.8.0 → 0.9.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/cjs/index.js CHANGED
@@ -37,7 +37,7 @@ __export(index_exports, {
37
37
  AlertTitle: () => AlertTitle,
38
38
  AsgardeoContext: () => AsgardeoContext_default,
39
39
  AsgardeoProvider: () => AsgardeoProvider_default,
40
- AsgardeoRuntimeError: () => import_browser80.AsgardeoRuntimeError,
40
+ AsgardeoRuntimeError: () => import_browser81.AsgardeoRuntimeError,
41
41
  BaseAcceptInvite: () => BaseAcceptInvite_default,
42
42
  BaseCreateOrganization: () => BaseCreateOrganization,
43
43
  BaseInviteUser: () => BaseInviteUser_default,
@@ -71,12 +71,12 @@ __export(index_exports, {
71
71
  DatePicker: () => DatePicker_default,
72
72
  Divider: () => Divider_default,
73
73
  EmailOtp: () => EmailOtp_default,
74
- EmbeddedFlowActionVariant: () => import_browser80.EmbeddedFlowActionVariantV2,
75
- EmbeddedFlowComponentType: () => import_browser80.EmbeddedFlowComponentTypeV2,
76
- EmbeddedFlowEventType: () => import_browser80.EmbeddedFlowEventTypeV2,
77
- EmbeddedFlowTextVariant: () => import_browser80.EmbeddedFlowTextVariantV2,
78
- EmbeddedSignInFlowStatus: () => import_browser80.EmbeddedSignInFlowStatusV2,
79
- EmbeddedSignInFlowType: () => import_browser80.EmbeddedSignInFlowTypeV2,
74
+ EmbeddedFlowActionVariant: () => import_browser81.EmbeddedFlowActionVariantV2,
75
+ EmbeddedFlowComponentType: () => import_browser81.EmbeddedFlowComponentTypeV2,
76
+ EmbeddedFlowEventType: () => import_browser81.EmbeddedFlowEventTypeV2,
77
+ EmbeddedFlowTextVariant: () => import_browser81.EmbeddedFlowTextVariantV2,
78
+ EmbeddedSignInFlowStatus: () => import_browser81.EmbeddedSignInFlowStatusV2,
79
+ EmbeddedSignInFlowType: () => import_browser81.EmbeddedSignInFlowTypeV2,
80
80
  Eye: () => Eye_default,
81
81
  EyeOff: () => EyeOff_default,
82
82
  FacebookButton: () => FacebookButton_default,
@@ -135,17 +135,17 @@ __export(index_exports, {
135
135
  UsernamePassword: () => UsernamePassword_default,
136
136
  createField: () => createField,
137
137
  createOrganization: () => createOrganization_default,
138
- createPatchOperations: () => import_browser79.createPatchOperations,
138
+ createPatchOperations: () => import_browser80.createPatchOperations,
139
139
  createSignInOption: () => createSignInOption,
140
140
  createSignInOptionFromAuthenticator: () => createSignInOptionFromAuthenticator,
141
- getActiveTheme: () => import_browser80.getActiveTheme,
141
+ getActiveTheme: () => import_browser81.getActiveTheme,
142
142
  getAllOrganizations: () => getAllOrganizations_default,
143
143
  getMeOrganizations: () => getMeOrganizations_default,
144
144
  getMeProfile: () => getScim2Me_default,
145
145
  getOrganization: () => getOrganization_default,
146
146
  getSchemas: () => getSchemas_default,
147
- http: () => import_browser80.http,
148
- navigate: () => import_browser80.navigate,
147
+ http: () => import_browser81.http,
148
+ navigate: () => import_browser81.navigate,
149
149
  updateMeProfile: () => updateMeProfile_default,
150
150
  updateOrganization: () => updateOrganization_default,
151
151
  useAlertVariant: () => useAlertVariant,
@@ -7764,11 +7764,159 @@ var BaseSignIn3 = (props) => {
7764
7764
  var BaseSignIn_default3 = BaseSignIn3;
7765
7765
 
7766
7766
  // src/components/presentation/auth/SignIn/SignIn.tsx
7767
- var import_browser49 = require("@asgardeo/browser");
7767
+ var import_browser50 = require("@asgardeo/browser");
7768
7768
 
7769
7769
  // src/components/presentation/auth/SignIn/v2/SignIn.tsx
7770
7770
  var import_react59 = require("react");
7771
+ var import_browser49 = require("@asgardeo/browser");
7772
+
7773
+ // src/utils/v2/passkey.ts
7771
7774
  var import_browser48 = require("@asgardeo/browser");
7775
+ var handlePasskeyRegistration = async (challengeData) => {
7776
+ if (!window.navigator.credentials || !window.navigator.credentials.create) {
7777
+ throw new import_browser48.AsgardeoRuntimeError(
7778
+ "WebAuthn is not supported in this browser.",
7779
+ "browser-webauthn-not-supported",
7780
+ "browser",
7781
+ "WebAuthn/Passkey registration requires a browser that supports the Web Authentication API."
7782
+ );
7783
+ }
7784
+ try {
7785
+ const creationOptions = JSON.parse(challengeData);
7786
+ const publicKey = {
7787
+ ...creationOptions,
7788
+ challenge: (0, import_browser48.base64urlToArrayBuffer)(creationOptions.challenge),
7789
+ user: {
7790
+ ...creationOptions.user,
7791
+ id: (0, import_browser48.base64urlToArrayBuffer)(creationOptions.user.id)
7792
+ },
7793
+ ...creationOptions.excludeCredentials && {
7794
+ excludeCredentials: creationOptions.excludeCredentials.map((cred) => ({
7795
+ ...cred,
7796
+ id: (0, import_browser48.base64urlToArrayBuffer)(cred.id)
7797
+ }))
7798
+ }
7799
+ };
7800
+ const credential = await navigator.credentials.create({
7801
+ publicKey
7802
+ });
7803
+ if (!credential) {
7804
+ throw new import_browser48.AsgardeoRuntimeError(
7805
+ "No credential returned from WebAuthn registration.",
7806
+ "browser-webauthn-no-credential",
7807
+ "browser",
7808
+ "The WebAuthn registration ceremony completed but did not return a valid credential."
7809
+ );
7810
+ }
7811
+ const response = credential.response;
7812
+ const registrationResponse = {
7813
+ id: credential.id,
7814
+ rawId: (0, import_browser48.arrayBufferToBase64url)(credential.rawId),
7815
+ type: credential.type,
7816
+ response: {
7817
+ attestationObject: (0, import_browser48.arrayBufferToBase64url)(response.attestationObject),
7818
+ clientDataJSON: (0, import_browser48.arrayBufferToBase64url)(response.clientDataJSON),
7819
+ ...response.getTransports && {
7820
+ transports: response.getTransports()
7821
+ }
7822
+ },
7823
+ ...credential.authenticatorAttachment && {
7824
+ authenticatorAttachment: credential.authenticatorAttachment
7825
+ }
7826
+ };
7827
+ return JSON.stringify(registrationResponse);
7828
+ } catch (error) {
7829
+ if (error instanceof import_browser48.AsgardeoRuntimeError) {
7830
+ throw error;
7831
+ }
7832
+ if (error instanceof Error) {
7833
+ throw new import_browser48.AsgardeoRuntimeError(
7834
+ `Passkey registration failed: ${error.message}`,
7835
+ "browser-webauthn-registration-error",
7836
+ "browser",
7837
+ `WebAuthn registration failed with error: ${error.name}`
7838
+ );
7839
+ }
7840
+ throw new import_browser48.AsgardeoRuntimeError(
7841
+ "Passkey registration failed due to an unexpected error.",
7842
+ "browser-webauthn-unexpected-error",
7843
+ "browser",
7844
+ "An unexpected error occurred during WebAuthn registration."
7845
+ );
7846
+ }
7847
+ };
7848
+ var handlePasskeyAuthentication = async (challengeData) => {
7849
+ if (!window.navigator.credentials || !window.navigator.credentials.get) {
7850
+ throw new import_browser48.AsgardeoRuntimeError(
7851
+ "WebAuthn is not supported in this browser.",
7852
+ "browser-webauthn-not-supported",
7853
+ "browser",
7854
+ "WebAuthn/Passkey authentication requires a browser that supports the Web Authentication API."
7855
+ );
7856
+ }
7857
+ try {
7858
+ const requestOptions = JSON.parse(challengeData);
7859
+ const publicKey = {
7860
+ ...requestOptions,
7861
+ challenge: (0, import_browser48.base64urlToArrayBuffer)(requestOptions.challenge),
7862
+ ...requestOptions.allowCredentials && {
7863
+ allowCredentials: requestOptions.allowCredentials.map((cred) => ({
7864
+ ...cred,
7865
+ id: (0, import_browser48.base64urlToArrayBuffer)(cred.id)
7866
+ }))
7867
+ }
7868
+ };
7869
+ const credential = await navigator.credentials.get({
7870
+ publicKey
7871
+ });
7872
+ if (!credential) {
7873
+ throw new import_browser48.AsgardeoRuntimeError(
7874
+ "No credential returned from WebAuthn authentication.",
7875
+ "browser-webauthn-no-credential",
7876
+ "browser",
7877
+ "The WebAuthn authentication ceremony completed but did not return a valid credential."
7878
+ );
7879
+ }
7880
+ const response = credential.response;
7881
+ const authenticationResponse = {
7882
+ id: credential.id,
7883
+ rawId: (0, import_browser48.arrayBufferToBase64url)(credential.rawId),
7884
+ type: credential.type,
7885
+ response: {
7886
+ authenticatorData: (0, import_browser48.arrayBufferToBase64url)(response.authenticatorData),
7887
+ clientDataJSON: (0, import_browser48.arrayBufferToBase64url)(response.clientDataJSON),
7888
+ signature: (0, import_browser48.arrayBufferToBase64url)(response.signature),
7889
+ ...response.userHandle && {
7890
+ userHandle: (0, import_browser48.arrayBufferToBase64url)(response.userHandle)
7891
+ }
7892
+ },
7893
+ ...credential.authenticatorAttachment && {
7894
+ authenticatorAttachment: credential.authenticatorAttachment
7895
+ }
7896
+ };
7897
+ return JSON.stringify(authenticationResponse);
7898
+ } catch (error) {
7899
+ if (error instanceof import_browser48.AsgardeoRuntimeError) {
7900
+ throw error;
7901
+ }
7902
+ if (error instanceof Error) {
7903
+ throw new import_browser48.AsgardeoRuntimeError(
7904
+ `Passkey authentication failed: ${error.message}`,
7905
+ "browser-webauthn-authentication-error",
7906
+ "browser",
7907
+ `WebAuthn authentication failed with error: ${error.name}`
7908
+ );
7909
+ }
7910
+ throw new import_browser48.AsgardeoRuntimeError(
7911
+ "Passkey authentication failed due to an unexpected error.",
7912
+ "browser-webauthn-unexpected-error",
7913
+ "browser",
7914
+ "An unexpected error occurred during WebAuthn authentication."
7915
+ );
7916
+ }
7917
+ };
7918
+
7919
+ // src/components/presentation/auth/SignIn/v2/SignIn.tsx
7772
7920
  var import_jsx_runtime58 = require("react/jsx-runtime");
7773
7921
  var SignIn = ({ className, size = "medium", onSuccess, onError, variant, children }) => {
7774
7922
  const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading } = useAsgardeo_default();
@@ -7778,8 +7926,17 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7778
7926
  const [isFlowInitialized, setIsFlowInitialized] = (0, import_react59.useState)(false);
7779
7927
  const [flowError, setFlowError] = (0, import_react59.useState)(null);
7780
7928
  const [isSubmitting, setIsSubmitting] = (0, import_react59.useState)(false);
7929
+ const [passkeyState, setPasskeyState] = (0, import_react59.useState)({
7930
+ isActive: false,
7931
+ challenge: null,
7932
+ creationOptions: null,
7933
+ flowId: null,
7934
+ actionId: null,
7935
+ error: null
7936
+ });
7781
7937
  const initializationAttemptedRef = (0, import_react59.useRef)(false);
7782
7938
  const oauthCodeProcessedRef = (0, import_react59.useRef)(false);
7939
+ const passkeyProcessedRef = (0, import_react59.useRef)(false);
7783
7940
  const setFlowId = (flowId) => {
7784
7941
  setCurrentFlowId(flowId);
7785
7942
  if (flowId) {
@@ -7838,7 +7995,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7838
7995
  const handleOAuthError = (error, errorDescription) => {
7839
7996
  clearFlowState();
7840
7997
  const errorMessage = errorDescription || `OAuth error: ${error}`;
7841
- const err = new import_browser48.AsgardeoRuntimeError(errorMessage, "SIGN_IN_ERROR", "react");
7998
+ const err = new import_browser49.AsgardeoRuntimeError(errorMessage, "SIGN_IN_ERROR", "react");
7842
7999
  setError(err);
7843
8000
  cleanupOAuthUrlParams(true);
7844
8001
  };
@@ -7848,7 +8005,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7848
8005
  onError?.(error);
7849
8006
  };
7850
8007
  const handleRedirection = (response) => {
7851
- if (response.type === import_browser48.EmbeddedSignInFlowTypeV2.Redirection) {
8008
+ if (response.type === import_browser49.EmbeddedSignInFlowTypeV2.Redirection) {
7852
8009
  const redirectURL = response.data?.redirectURL || response?.redirectURL;
7853
8010
  if (redirectURL && window?.location) {
7854
8011
  if (response.flowId) {
@@ -7885,7 +8042,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7885
8042
  handleAuthId(urlParams.authId);
7886
8043
  const effectiveApplicationId = applicationId || urlParams.applicationId;
7887
8044
  if (!urlParams.flowId && !effectiveApplicationId) {
7888
- const error = new import_browser48.AsgardeoRuntimeError(
8045
+ const error = new import_browser49.AsgardeoRuntimeError(
7889
8046
  "Either flowId or applicationId is required for authentication",
7890
8047
  "SIGN_IN_ERROR",
7891
8048
  "react"
@@ -7903,7 +8060,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7903
8060
  } else {
7904
8061
  response = await signIn({
7905
8062
  applicationId: effectiveApplicationId,
7906
- flowType: import_browser48.EmbeddedFlowType.Authentication
8063
+ flowType: import_browser49.EmbeddedFlowType.Authentication
7907
8064
  });
7908
8065
  }
7909
8066
  if (handleRedirection(response)) {
@@ -7942,10 +8099,26 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7942
8099
  if (handleRedirection(response)) {
7943
8100
  return;
7944
8101
  }
8102
+ if (response.data?.additionalData?.["passkeyChallenge"] || response.data?.additionalData?.["passkeyCreationOptions"]) {
8103
+ const passkeyChallenge = response.data.additionalData["passkeyChallenge"];
8104
+ const passkeyCreationOptions = response.data.additionalData["passkeyCreationOptions"];
8105
+ const effectiveFlowIdForPasskey = response.flowId || effectiveFlowId;
8106
+ passkeyProcessedRef.current = false;
8107
+ setPasskeyState({
8108
+ isActive: true,
8109
+ challenge: passkeyChallenge,
8110
+ creationOptions: passkeyCreationOptions,
8111
+ flowId: effectiveFlowIdForPasskey,
8112
+ actionId: "submit",
8113
+ error: null
8114
+ });
8115
+ setIsSubmitting(false);
8116
+ return;
8117
+ }
7945
8118
  const { flowId, components: components2, ...rest } = normalizeFlowResponse(response, t, {
7946
8119
  resolveTranslations: !children
7947
8120
  });
7948
- if (response.flowStatus === import_browser48.EmbeddedSignInFlowStatusV2.Error) {
8121
+ if (response.flowStatus === import_browser49.EmbeddedSignInFlowStatusV2.Error) {
7949
8122
  clearFlowState();
7950
8123
  const failureReason = response?.failureReason;
7951
8124
  const errorMessage = failureReason || "Authentication flow failed. Please try again.";
@@ -7954,7 +8127,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7954
8127
  cleanupFlowUrlParams();
7955
8128
  throw err;
7956
8129
  }
7957
- if (response.flowStatus === import_browser48.EmbeddedSignInFlowStatusV2.Complete) {
8130
+ if (response.flowStatus === import_browser49.EmbeddedSignInFlowStatusV2.Complete) {
7958
8131
  const redirectUrl = response?.redirectUrl || response?.redirect_uri;
7959
8132
  const finalRedirectUrl = redirectUrl || afterSignInUrl;
7960
8133
  setIsSubmitting(false);
@@ -8021,6 +8194,50 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
8021
8194
  cleanupOAuthUrlParams(true);
8022
8195
  });
8023
8196
  }, [isFlowInitialized, currentFlowId, isInitialized, isLoading, isSubmitting, signIn]);
8197
+ (0, import_react59.useEffect)(() => {
8198
+ if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.flowId) {
8199
+ return;
8200
+ }
8201
+ if (passkeyProcessedRef.current) {
8202
+ return;
8203
+ }
8204
+ passkeyProcessedRef.current = true;
8205
+ const performPasskeyProcess = async () => {
8206
+ let inputs;
8207
+ if (passkeyState.challenge) {
8208
+ const passkeyResponse = await handlePasskeyAuthentication(passkeyState.challenge);
8209
+ const passkeyResponseObj = JSON.parse(passkeyResponse);
8210
+ inputs = {
8211
+ credentialId: passkeyResponseObj.id,
8212
+ authenticatorData: passkeyResponseObj.response.authenticatorData,
8213
+ clientDataJSON: passkeyResponseObj.response.clientDataJSON,
8214
+ signature: passkeyResponseObj.response.signature,
8215
+ userHandle: passkeyResponseObj.response.userHandle
8216
+ };
8217
+ } else if (passkeyState.creationOptions) {
8218
+ const passkeyResponse = await handlePasskeyRegistration(passkeyState.creationOptions);
8219
+ const passkeyResponseObj = JSON.parse(passkeyResponse);
8220
+ inputs = {
8221
+ credentialId: passkeyResponseObj.id,
8222
+ clientDataJSON: passkeyResponseObj.response.clientDataJSON,
8223
+ attestationObject: passkeyResponseObj.response.attestationObject
8224
+ };
8225
+ } else {
8226
+ throw new Error("No passkey challenge or creation options available");
8227
+ }
8228
+ await handleSubmit({
8229
+ flowId: passkeyState.flowId,
8230
+ inputs
8231
+ });
8232
+ };
8233
+ performPasskeyProcess().then(() => {
8234
+ setPasskeyState({ isActive: false, challenge: null, creationOptions: null, flowId: null, actionId: null, error: null });
8235
+ }).catch((error) => {
8236
+ setPasskeyState((prev) => ({ ...prev, isActive: false, error }));
8237
+ setFlowError(error);
8238
+ onError?.(error);
8239
+ });
8240
+ }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.flowId]);
8024
8241
  if (children) {
8025
8242
  const renderProps = {
8026
8243
  initialize: initializeFlow,
@@ -8069,7 +8286,7 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
8069
8286
  window.location.href = url.toString();
8070
8287
  }
8071
8288
  };
8072
- if (platform === import_browser49.Platform.AsgardeoV2) {
8289
+ if (platform === import_browser50.Platform.AsgardeoV2) {
8073
8290
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8074
8291
  SignIn_default,
8075
8292
  {
@@ -8102,18 +8319,18 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
8102
8319
  var SignIn_default2 = SignIn2;
8103
8320
 
8104
8321
  // src/components/presentation/auth/SignUp/BaseSignUp.tsx
8105
- var import_browser60 = require("@asgardeo/browser");
8322
+ var import_browser61 = require("@asgardeo/browser");
8106
8323
 
8107
8324
  // src/components/presentation/auth/SignUp/v1/BaseSignUp.tsx
8108
- var import_browser58 = require("@asgardeo/browser");
8325
+ var import_browser59 = require("@asgardeo/browser");
8109
8326
  var import_css38 = require("@emotion/css");
8110
8327
  var import_react61 = require("react");
8111
8328
 
8112
8329
  // src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
8113
- var import_browser57 = require("@asgardeo/browser");
8330
+ var import_browser58 = require("@asgardeo/browser");
8114
8331
 
8115
8332
  // src/components/adapters/CheckboxInput.tsx
8116
- var import_browser50 = require("@asgardeo/browser");
8333
+ var import_browser51 = require("@asgardeo/browser");
8117
8334
  var CheckboxInput = ({
8118
8335
  component,
8119
8336
  formValues,
@@ -8127,7 +8344,7 @@ var CheckboxInput = ({
8127
8344
  const value = formValues[fieldName] || false;
8128
8345
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8129
8346
  return createField({
8130
- type: import_browser50.FieldType.Checkbox,
8347
+ type: import_browser51.FieldType.Checkbox,
8131
8348
  name: fieldName,
8132
8349
  label: config["label"] || "",
8133
8350
  placeholder: config["placeholder"] || "",
@@ -8141,7 +8358,7 @@ var CheckboxInput = ({
8141
8358
  var CheckboxInput_default = CheckboxInput;
8142
8359
 
8143
8360
  // src/components/adapters/DateInput.tsx
8144
- var import_browser51 = require("@asgardeo/browser");
8361
+ var import_browser52 = require("@asgardeo/browser");
8145
8362
  var DateInput = ({
8146
8363
  component,
8147
8364
  formValues,
@@ -8155,7 +8372,7 @@ var DateInput = ({
8155
8372
  const value = formValues[fieldName] || "";
8156
8373
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8157
8374
  return createField({
8158
- type: import_browser51.FieldType.Date,
8375
+ type: import_browser52.FieldType.Date,
8159
8376
  name: fieldName,
8160
8377
  label: config["label"] || "",
8161
8378
  placeholder: config["placeholder"] || "",
@@ -8188,7 +8405,7 @@ var DividerComponent = ({ component }) => {
8188
8405
  var DividerComponent_default = DividerComponent;
8189
8406
 
8190
8407
  // src/components/adapters/EmailInput.tsx
8191
- var import_browser52 = require("@asgardeo/browser");
8408
+ var import_browser53 = require("@asgardeo/browser");
8192
8409
  var EmailInput = ({
8193
8410
  component,
8194
8411
  formValues,
@@ -8202,7 +8419,7 @@ var EmailInput = ({
8202
8419
  const value = formValues[fieldName] || "";
8203
8420
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8204
8421
  return createField({
8205
- type: import_browser52.FieldType.Email,
8422
+ type: import_browser53.FieldType.Email,
8206
8423
  name: fieldName,
8207
8424
  label: config["label"] || "Email",
8208
8425
  placeholder: config["placeholder"] || "Enter your email",
@@ -8273,7 +8490,7 @@ var ImageComponent = ({ component }) => {
8273
8490
  var ImageComponent_default = ImageComponent;
8274
8491
 
8275
8492
  // src/components/adapters/NumberInput.tsx
8276
- var import_browser53 = require("@asgardeo/browser");
8493
+ var import_browser54 = require("@asgardeo/browser");
8277
8494
  var NumberInput = ({
8278
8495
  component,
8279
8496
  formValues,
@@ -8287,7 +8504,7 @@ var NumberInput = ({
8287
8504
  const value = formValues[fieldName] || "";
8288
8505
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8289
8506
  return createField({
8290
- type: import_browser53.FieldType.Number,
8507
+ type: import_browser54.FieldType.Number,
8291
8508
  name: fieldName,
8292
8509
  label: config["label"] || "",
8293
8510
  placeholder: config["placeholder"] || "",
@@ -8301,7 +8518,7 @@ var NumberInput = ({
8301
8518
  var NumberInput_default = NumberInput;
8302
8519
 
8303
8520
  // src/components/adapters/PasswordInput.tsx
8304
- var import_browser54 = require("@asgardeo/browser");
8521
+ var import_browser55 = require("@asgardeo/browser");
8305
8522
  var PasswordInput = ({
8306
8523
  component,
8307
8524
  formValues,
@@ -8347,7 +8564,7 @@ var PasswordInput = ({
8347
8564
  });
8348
8565
  const hint = validationHints.length > 0 ? validationHints.join(", ") : config["hint"] || "";
8349
8566
  return createField({
8350
- type: import_browser54.FieldType.Password,
8567
+ type: import_browser55.FieldType.Password,
8351
8568
  name: fieldName,
8352
8569
  label: config["label"] || "Password",
8353
8570
  placeholder: config["placeholder"] || "Enter your password",
@@ -8446,7 +8663,7 @@ var TelephoneInput = ({
8446
8663
  var TelephoneInput_default = TelephoneInput;
8447
8664
 
8448
8665
  // src/components/adapters/TextInput.tsx
8449
- var import_browser55 = require("@asgardeo/browser");
8666
+ var import_browser56 = require("@asgardeo/browser");
8450
8667
  var TextInput = ({
8451
8668
  component,
8452
8669
  formValues,
@@ -8460,7 +8677,7 @@ var TextInput = ({
8460
8677
  const value = formValues[fieldName] || "";
8461
8678
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8462
8679
  return createField({
8463
- type: import_browser55.FieldType.Text,
8680
+ type: import_browser56.FieldType.Text,
8464
8681
  name: fieldName,
8465
8682
  label: config["label"] || "",
8466
8683
  placeholder: config["placeholder"] || "",
@@ -8474,7 +8691,7 @@ var TextInput = ({
8474
8691
  var TextInput_default = TextInput;
8475
8692
 
8476
8693
  // src/components/adapters/SelectInput.tsx
8477
- var import_browser56 = require("@asgardeo/browser");
8694
+ var import_browser57 = require("@asgardeo/browser");
8478
8695
  var SelectInput = ({
8479
8696
  component,
8480
8697
  formValues,
@@ -8493,7 +8710,7 @@ var SelectInput = ({
8493
8710
  value: option
8494
8711
  }));
8495
8712
  return createField({
8496
- type: import_browser56.FieldType.Select,
8713
+ type: import_browser57.FieldType.Select,
8497
8714
  name: fieldName,
8498
8715
  label: config["label"] || "",
8499
8716
  placeholder: config["placeholder"] || "",
@@ -8565,9 +8782,9 @@ var Typography_default2 = TypographyComponent;
8565
8782
  var import_jsx_runtime66 = require("react/jsx-runtime");
8566
8783
  var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8567
8784
  switch (component.type) {
8568
- case import_browser57.EmbeddedFlowComponentType.Typography:
8785
+ case import_browser58.EmbeddedFlowComponentType.Typography:
8569
8786
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography_default2, { component, onSubmit, ...rest });
8570
- case import_browser57.EmbeddedFlowComponentType.Input:
8787
+ case import_browser58.EmbeddedFlowComponentType.Input:
8571
8788
  const inputVariant = component.variant?.toUpperCase();
8572
8789
  const inputType = component.config["type"]?.toLowerCase();
8573
8790
  if (inputVariant === "EMAIL" || inputType === "email") {
@@ -8589,7 +8806,7 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8589
8806
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CheckboxInput_default, { component, onSubmit, ...rest });
8590
8807
  }
8591
8808
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TextInput_default, { component, onSubmit, ...rest });
8592
- case import_browser57.EmbeddedFlowComponentType.Button: {
8809
+ case import_browser58.EmbeddedFlowComponentType.Button: {
8593
8810
  const buttonVariant = component.variant?.toUpperCase();
8594
8811
  const buttonText = component.config["text"] || component.config["label"] || "";
8595
8812
  if (buttonVariant === "SOCIAL") {
@@ -8614,13 +8831,13 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8614
8831
  }
8615
8832
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SubmitButton_default, { component, onSubmit, ...rest });
8616
8833
  }
8617
- case import_browser57.EmbeddedFlowComponentType.Form:
8834
+ case import_browser58.EmbeddedFlowComponentType.Form:
8618
8835
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FormContainer_default, { component, onSubmit, ...rest });
8619
- case import_browser57.EmbeddedFlowComponentType.Select:
8836
+ case import_browser58.EmbeddedFlowComponentType.Select:
8620
8837
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectInput_default, { component, onSubmit, ...rest });
8621
- case import_browser57.EmbeddedFlowComponentType.Divider:
8838
+ case import_browser58.EmbeddedFlowComponentType.Divider:
8622
8839
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DividerComponent_default, { component, onSubmit, ...rest });
8623
- case import_browser57.EmbeddedFlowComponentType.Image:
8840
+ case import_browser58.EmbeddedFlowComponentType.Image:
8624
8841
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ImageComponent_default, { component, onSubmit, ...rest });
8625
8842
  default:
8626
8843
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", {});
@@ -8868,7 +9085,7 @@ var BaseSignUpContent = ({
8868
9085
  const fields = [];
8869
9086
  const processComponents = (comps) => {
8870
9087
  comps.forEach((component) => {
8871
- if (component.type === import_browser58.EmbeddedFlowComponentType.Input) {
9088
+ if (component.type === import_browser59.EmbeddedFlowComponentType.Input) {
8872
9089
  const config = component.config || {};
8873
9090
  fields.push({
8874
9091
  name: config.name || component.id,
@@ -8961,11 +9178,11 @@ var BaseSignUpContent = ({
8961
9178
  };
8962
9179
  const response = await onSubmit(payload);
8963
9180
  onFlowChange?.(response);
8964
- if (response.flowStatus === import_browser58.EmbeddedFlowStatus.Complete) {
9181
+ if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
8965
9182
  onComplete?.(response);
8966
9183
  return;
8967
9184
  }
8968
- if (response.flowStatus === import_browser58.EmbeddedFlowStatus.Incomplete) {
9185
+ if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
8969
9186
  if (handleRedirectionIfNeeded(response, component)) {
8970
9187
  return;
8971
9188
  }
@@ -8980,7 +9197,7 @@ var BaseSignUpContent = ({
8980
9197
  }
8981
9198
  };
8982
9199
  const handleRedirectionIfNeeded = (response, component) => {
8983
- if (response?.type === import_browser58.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
9200
+ if (response?.type === import_browser59.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
8984
9201
  const redirectUrl = response.data.redirectURL;
8985
9202
  const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
8986
9203
  if (!popup) {
@@ -9009,9 +9226,9 @@ var BaseSignUpContent = ({
9009
9226
  try {
9010
9227
  const continueResponse = await onSubmit(payload);
9011
9228
  onFlowChange?.(continueResponse);
9012
- if (continueResponse.flowStatus === import_browser58.EmbeddedFlowStatus.Complete) {
9229
+ if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9013
9230
  onComplete?.(continueResponse);
9014
- } else if (continueResponse.flowStatus === import_browser58.EmbeddedFlowStatus.Incomplete) {
9231
+ } else if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9015
9232
  setCurrentFlow(continueResponse);
9016
9233
  setupFormFields(continueResponse);
9017
9234
  }
@@ -9069,9 +9286,9 @@ var BaseSignUpContent = ({
9069
9286
  try {
9070
9287
  const continueResponse = await onSubmit(payload);
9071
9288
  onFlowChange?.(continueResponse);
9072
- if (continueResponse.flowStatus === import_browser58.EmbeddedFlowStatus.Complete) {
9289
+ if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9073
9290
  onComplete?.(continueResponse);
9074
- } else if (continueResponse.flowStatus === import_browser58.EmbeddedFlowStatus.Incomplete) {
9291
+ } else if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9075
9292
  setCurrentFlow(continueResponse);
9076
9293
  setupFormFields(continueResponse);
9077
9294
  }
@@ -9095,30 +9312,30 @@ var BaseSignUpContent = ({
9095
9312
  };
9096
9313
  const containerClasses = (0, import_css38.cx)(
9097
9314
  [
9098
- (0, import_browser58.withVendorCSSClassPrefix)("signup"),
9099
- (0, import_browser58.withVendorCSSClassPrefix)(`signup--${size}`),
9100
- (0, import_browser58.withVendorCSSClassPrefix)(`signup--${variant}`)
9315
+ (0, import_browser59.withVendorCSSClassPrefix)("signup"),
9316
+ (0, import_browser59.withVendorCSSClassPrefix)(`signup--${size}`),
9317
+ (0, import_browser59.withVendorCSSClassPrefix)(`signup--${variant}`)
9101
9318
  ],
9102
9319
  className
9103
9320
  );
9104
9321
  const inputClasses = (0, import_css38.cx)(
9105
9322
  [
9106
- (0, import_browser58.withVendorCSSClassPrefix)("signup__input"),
9107
- size === "small" && (0, import_browser58.withVendorCSSClassPrefix)("signup__input--small"),
9108
- size === "large" && (0, import_browser58.withVendorCSSClassPrefix)("signup__input--large")
9323
+ (0, import_browser59.withVendorCSSClassPrefix)("signup__input"),
9324
+ size === "small" && (0, import_browser59.withVendorCSSClassPrefix)("signup__input--small"),
9325
+ size === "large" && (0, import_browser59.withVendorCSSClassPrefix)("signup__input--large")
9109
9326
  ],
9110
9327
  inputClassName
9111
9328
  );
9112
9329
  const buttonClasses = (0, import_css38.cx)(
9113
9330
  [
9114
- (0, import_browser58.withVendorCSSClassPrefix)("signup__button"),
9115
- size === "small" && (0, import_browser58.withVendorCSSClassPrefix)("signup__button--small"),
9116
- size === "large" && (0, import_browser58.withVendorCSSClassPrefix)("signup__button--large")
9331
+ (0, import_browser59.withVendorCSSClassPrefix)("signup__button"),
9332
+ size === "small" && (0, import_browser59.withVendorCSSClassPrefix)("signup__button--small"),
9333
+ size === "large" && (0, import_browser59.withVendorCSSClassPrefix)("signup__button--large")
9117
9334
  ],
9118
9335
  buttonClassName
9119
9336
  );
9120
- const errorClasses = (0, import_css38.cx)([(0, import_browser58.withVendorCSSClassPrefix)("signup__error")], errorClassName);
9121
- const messageClasses = (0, import_css38.cx)([(0, import_browser58.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
9337
+ const errorClasses = (0, import_css38.cx)([(0, import_browser59.withVendorCSSClassPrefix)("signup__error")], errorClassName);
9338
+ const messageClasses = (0, import_css38.cx)([(0, import_browser59.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
9122
9339
  const renderComponents = (0, import_react61.useCallback)(
9123
9340
  (components) => renderSignUpComponents2(
9124
9341
  components,
@@ -9160,11 +9377,11 @@ var BaseSignUpContent = ({
9160
9377
  setCurrentFlow(response);
9161
9378
  setIsFlowInitialized(true);
9162
9379
  onFlowChange?.(response);
9163
- if (response.flowStatus === import_browser58.EmbeddedFlowStatus.Complete) {
9380
+ if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9164
9381
  onComplete?.(response);
9165
9382
  return;
9166
9383
  }
9167
- if (response.flowStatus === import_browser58.EmbeddedFlowStatus.Incomplete) {
9384
+ if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9168
9385
  setupFormFields(response);
9169
9386
  }
9170
9387
  } catch (err) {
@@ -9234,7 +9451,7 @@ var BaseSignUpContent = ({
9234
9451
  var BaseSignUp_default = BaseSignUp;
9235
9452
 
9236
9453
  // src/components/presentation/auth/SignUp/v2/BaseSignUp.tsx
9237
- var import_browser59 = require("@asgardeo/browser");
9454
+ var import_browser60 = require("@asgardeo/browser");
9238
9455
  var import_css39 = require("@emotion/css");
9239
9456
  var import_react62 = require("react");
9240
9457
  var import_jsx_runtime68 = require("react/jsx-runtime");
@@ -9287,7 +9504,15 @@ var BaseSignUpContent2 = ({
9287
9504
  const [isFlowInitialized, setIsFlowInitialized] = (0, import_react62.useState)(false);
9288
9505
  const [currentFlow, setCurrentFlow] = (0, import_react62.useState)(null);
9289
9506
  const [apiError, setApiError] = (0, import_react62.useState)(null);
9507
+ const [passkeyState, setPasskeyState] = (0, import_react62.useState)({
9508
+ isActive: false,
9509
+ creationOptions: null,
9510
+ flowId: null,
9511
+ actionId: null,
9512
+ error: null
9513
+ });
9290
9514
  const initializationAttemptedRef = (0, import_react62.useRef)(false);
9515
+ const passkeyProcessedRef = (0, import_react62.useRef)(false);
9291
9516
  const normalizeFlowResponseLocal = (0, import_react62.useCallback)(
9292
9517
  (response) => {
9293
9518
  if (response?.data?.components && Array.isArray(response.data.components)) {
@@ -9319,7 +9544,7 @@ var BaseSignUpContent2 = ({
9319
9544
  const fields = [];
9320
9545
  const processComponents = (comps) => {
9321
9546
  comps.forEach((component) => {
9322
- if (component.type === import_browser59.EmbeddedFlowComponentTypeV2.TextInput || component.type === import_browser59.EmbeddedFlowComponentTypeV2.PasswordInput || component.type === import_browser59.EmbeddedFlowComponentTypeV2.EmailInput || component.type === import_browser59.EmbeddedFlowComponentTypeV2.Select) {
9547
+ if (component.type === import_browser60.EmbeddedFlowComponentTypeV2.TextInput || component.type === import_browser60.EmbeddedFlowComponentTypeV2.PasswordInput || component.type === import_browser60.EmbeddedFlowComponentTypeV2.EmailInput || component.type === import_browser60.EmbeddedFlowComponentTypeV2.Select) {
9323
9548
  const fieldName = component.ref || component.id;
9324
9549
  fields.push({
9325
9550
  name: fieldName,
@@ -9329,7 +9554,7 @@ var BaseSignUpContent2 = ({
9329
9554
  if (component.required && (!value || value.trim() === "")) {
9330
9555
  return t("validations.required.field.error");
9331
9556
  }
9332
- if ((component.type === import_browser59.EmbeddedFlowComponentTypeV2.EmailInput || component.variant === "EMAIL") && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
9557
+ if ((component.type === import_browser60.EmbeddedFlowComponentTypeV2.EmailInput || component.variant === "EMAIL") && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
9333
9558
  return t("field.email.invalid");
9334
9559
  }
9335
9560
  return null;
@@ -9419,14 +9644,28 @@ var BaseSignUpContent2 = ({
9419
9644
  const rawResponse = await onSubmit(payload);
9420
9645
  const response = normalizeFlowResponseLocal(rawResponse);
9421
9646
  onFlowChange?.(response);
9422
- if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9647
+ if (response.flowStatus === import_browser60.EmbeddedFlowStatus.Complete) {
9423
9648
  onComplete?.(response);
9424
9649
  return;
9425
9650
  }
9426
- if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9651
+ if (response.flowStatus === import_browser60.EmbeddedFlowStatus.Incomplete) {
9427
9652
  if (handleRedirectionIfNeeded(response, component)) {
9428
9653
  return;
9429
9654
  }
9655
+ if (response.data?.additionalData?.["passkeyCreationOptions"]) {
9656
+ const passkeyCreationOptions = response.data.additionalData["passkeyCreationOptions"];
9657
+ const effectiveFlowIdForPasskey = response.flowId || currentFlow?.flowId;
9658
+ passkeyProcessedRef.current = false;
9659
+ setPasskeyState({
9660
+ isActive: true,
9661
+ creationOptions: passkeyCreationOptions,
9662
+ flowId: effectiveFlowIdForPasskey,
9663
+ actionId: component.id || "submit",
9664
+ error: null
9665
+ });
9666
+ setIsLoading(false);
9667
+ return;
9668
+ }
9430
9669
  setCurrentFlow(response);
9431
9670
  setupFormFields(response);
9432
9671
  }
@@ -9437,8 +9676,50 @@ var BaseSignUpContent2 = ({
9437
9676
  setIsLoading(false);
9438
9677
  }
9439
9678
  };
9679
+ (0, import_react62.useEffect)(() => {
9680
+ if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.flowId) {
9681
+ return;
9682
+ }
9683
+ if (passkeyProcessedRef.current) {
9684
+ return;
9685
+ }
9686
+ passkeyProcessedRef.current = true;
9687
+ const performPasskeyRegistration = async () => {
9688
+ const passkeyResponse = await handlePasskeyRegistration(passkeyState.creationOptions);
9689
+ const passkeyResponseObj = JSON.parse(passkeyResponse);
9690
+ const inputs = {
9691
+ credentialId: passkeyResponseObj.id,
9692
+ clientDataJSON: passkeyResponseObj.response.clientDataJSON,
9693
+ attestationObject: passkeyResponseObj.response.attestationObject
9694
+ };
9695
+ const payload = {
9696
+ flowId: passkeyState.flowId,
9697
+ flowType: currentFlow?.flowType || "REGISTRATION",
9698
+ actionId: passkeyState.actionId || "submit",
9699
+ inputs
9700
+ };
9701
+ const nextResponse = await onSubmit(payload);
9702
+ const processedResponse = normalizeFlowResponseLocal(nextResponse);
9703
+ onFlowChange?.(processedResponse);
9704
+ if (processedResponse.flowStatus === import_browser60.EmbeddedFlowStatus.Complete) {
9705
+ onComplete?.(processedResponse);
9706
+ return;
9707
+ } else {
9708
+ setCurrentFlow(processedResponse);
9709
+ setupFormFields(processedResponse);
9710
+ return;
9711
+ }
9712
+ };
9713
+ performPasskeyRegistration().then(() => {
9714
+ setPasskeyState({ isActive: false, creationOptions: null, flowId: null, actionId: null, error: null });
9715
+ }).catch((error) => {
9716
+ setPasskeyState((prev) => ({ ...prev, isActive: false, error }));
9717
+ handleError(error);
9718
+ onError?.(error);
9719
+ });
9720
+ }, [passkeyState.isActive, passkeyState.creationOptions, passkeyState.flowId]);
9440
9721
  const handleRedirectionIfNeeded = (response, component) => {
9441
- if (response?.type === import_browser59.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
9722
+ if (response?.type === import_browser60.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
9442
9723
  const redirectUrl = response.data.redirectURL;
9443
9724
  const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
9444
9725
  if (!popup) {
@@ -9467,9 +9748,9 @@ var BaseSignUpContent2 = ({
9467
9748
  try {
9468
9749
  const continueResponse = await onSubmit(payload);
9469
9750
  onFlowChange?.(continueResponse);
9470
- if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9751
+ if (continueResponse.flowStatus === import_browser60.EmbeddedFlowStatus.Complete) {
9471
9752
  onComplete?.(continueResponse);
9472
- } else if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9753
+ } else if (continueResponse.flowStatus === import_browser60.EmbeddedFlowStatus.Incomplete) {
9473
9754
  setCurrentFlow(continueResponse);
9474
9755
  setupFormFields(continueResponse);
9475
9756
  }
@@ -9527,9 +9808,9 @@ var BaseSignUpContent2 = ({
9527
9808
  try {
9528
9809
  const continueResponse = await onSubmit(payload);
9529
9810
  onFlowChange?.(continueResponse);
9530
- if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9811
+ if (continueResponse.flowStatus === import_browser60.EmbeddedFlowStatus.Complete) {
9531
9812
  onComplete?.(continueResponse);
9532
- } else if (continueResponse.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9813
+ } else if (continueResponse.flowStatus === import_browser60.EmbeddedFlowStatus.Incomplete) {
9533
9814
  setCurrentFlow(continueResponse);
9534
9815
  setupFormFields(continueResponse);
9535
9816
  }
@@ -9553,30 +9834,30 @@ var BaseSignUpContent2 = ({
9553
9834
  };
9554
9835
  const containerClasses = (0, import_css39.cx)(
9555
9836
  [
9556
- (0, import_browser59.withVendorCSSClassPrefix)("signup"),
9557
- (0, import_browser59.withVendorCSSClassPrefix)(`signup--${size}`),
9558
- (0, import_browser59.withVendorCSSClassPrefix)(`signup--${variant}`)
9837
+ (0, import_browser60.withVendorCSSClassPrefix)("signup"),
9838
+ (0, import_browser60.withVendorCSSClassPrefix)(`signup--${size}`),
9839
+ (0, import_browser60.withVendorCSSClassPrefix)(`signup--${variant}`)
9559
9840
  ],
9560
9841
  className
9561
9842
  );
9562
9843
  const inputClasses = (0, import_css39.cx)(
9563
9844
  [
9564
- (0, import_browser59.withVendorCSSClassPrefix)("signup__input"),
9565
- size === "small" && (0, import_browser59.withVendorCSSClassPrefix)("signup__input--small"),
9566
- size === "large" && (0, import_browser59.withVendorCSSClassPrefix)("signup__input--large")
9845
+ (0, import_browser60.withVendorCSSClassPrefix)("signup__input"),
9846
+ size === "small" && (0, import_browser60.withVendorCSSClassPrefix)("signup__input--small"),
9847
+ size === "large" && (0, import_browser60.withVendorCSSClassPrefix)("signup__input--large")
9567
9848
  ],
9568
9849
  inputClassName
9569
9850
  );
9570
9851
  const buttonClasses = (0, import_css39.cx)(
9571
9852
  [
9572
- (0, import_browser59.withVendorCSSClassPrefix)("signup__button"),
9573
- size === "small" && (0, import_browser59.withVendorCSSClassPrefix)("signup__button--small"),
9574
- size === "large" && (0, import_browser59.withVendorCSSClassPrefix)("signup__button--large")
9853
+ (0, import_browser60.withVendorCSSClassPrefix)("signup__button"),
9854
+ size === "small" && (0, import_browser60.withVendorCSSClassPrefix)("signup__button--small"),
9855
+ size === "large" && (0, import_browser60.withVendorCSSClassPrefix)("signup__button--large")
9575
9856
  ],
9576
9857
  buttonClassName
9577
9858
  );
9578
- const errorClasses = (0, import_css39.cx)([(0, import_browser59.withVendorCSSClassPrefix)("signup__error")], errorClassName);
9579
- const messageClasses = (0, import_css39.cx)([(0, import_browser59.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
9859
+ const errorClasses = (0, import_css39.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__error")], errorClassName);
9860
+ const messageClasses = (0, import_css39.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
9580
9861
  const renderComponents = (0, import_react62.useCallback)(
9581
9862
  (components) => renderSignUpComponents(
9582
9863
  components,
@@ -9634,11 +9915,11 @@ var BaseSignUpContent2 = ({
9634
9915
  setCurrentFlow(response);
9635
9916
  setIsFlowInitialized(true);
9636
9917
  onFlowChange?.(response);
9637
- if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Complete) {
9918
+ if (response.flowStatus === import_browser60.EmbeddedFlowStatus.Complete) {
9638
9919
  onComplete?.(response);
9639
9920
  return;
9640
9921
  }
9641
- if (response.flowStatus === import_browser59.EmbeddedFlowStatus.Incomplete) {
9922
+ if (response.flowStatus === import_browser60.EmbeddedFlowStatus.Incomplete) {
9642
9923
  setupFormFields(response);
9643
9924
  }
9644
9925
  } catch (err) {
@@ -9725,7 +10006,7 @@ var BaseSignUp_default2 = BaseSignUp2;
9725
10006
  var import_jsx_runtime69 = require("react/jsx-runtime");
9726
10007
  var BaseSignUp3 = (props) => {
9727
10008
  const { platform } = useAsgardeo_default();
9728
- if (platform === import_browser60.Platform.AsgardeoV2) {
10009
+ if (platform === import_browser61.Platform.AsgardeoV2) {
9729
10010
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(BaseSignUp_default2, { ...props });
9730
10011
  }
9731
10012
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(BaseSignUp_default, { ...props });
@@ -9733,10 +10014,10 @@ var BaseSignUp3 = (props) => {
9733
10014
  var BaseSignUp_default3 = BaseSignUp3;
9734
10015
 
9735
10016
  // src/components/presentation/auth/SignUp/SignUp.tsx
9736
- var import_browser63 = require("@asgardeo/browser");
10017
+ var import_browser64 = require("@asgardeo/browser");
9737
10018
 
9738
10019
  // src/components/presentation/auth/SignUp/v1/SignUp.tsx
9739
- var import_browser61 = require("@asgardeo/browser");
10020
+ var import_browser62 = require("@asgardeo/browser");
9740
10021
  var import_jsx_runtime70 = require("react/jsx-runtime");
9741
10022
  var SignUp = ({
9742
10023
  className,
@@ -9751,17 +10032,17 @@ var SignUp = ({
9751
10032
  const { signUp, isInitialized } = useAsgardeo_default();
9752
10033
  const handleInitialize = async (payload) => {
9753
10034
  const initialPayload = payload || {
9754
- flowType: import_browser61.EmbeddedFlowType.Registration
10035
+ flowType: import_browser62.EmbeddedFlowType.Registration
9755
10036
  };
9756
10037
  return await signUp(initialPayload);
9757
10038
  };
9758
10039
  const handleOnSubmit = async (payload) => await signUp(payload);
9759
10040
  const handleComplete = (response) => {
9760
10041
  onComplete?.(response);
9761
- if (shouldRedirectAfterSignUp && response?.type !== import_browser61.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
10042
+ if (shouldRedirectAfterSignUp && response?.type !== import_browser62.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
9762
10043
  window.location.href = afterSignUpUrl;
9763
10044
  }
9764
- if (shouldRedirectAfterSignUp && response?.type === import_browser61.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
10045
+ if (shouldRedirectAfterSignUp && response?.type === import_browser62.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
9765
10046
  !response.data.redirectURL.includes("auth")) {
9766
10047
  window.location.href = response.data.redirectURL;
9767
10048
  }
@@ -9788,7 +10069,7 @@ var SignUp = ({
9788
10069
  var SignUp_default = SignUp;
9789
10070
 
9790
10071
  // src/components/presentation/auth/SignUp/v2/SignUp.tsx
9791
- var import_browser62 = require("@asgardeo/browser");
10072
+ var import_browser63 = require("@asgardeo/browser");
9792
10073
  var import_jsx_runtime71 = require("react/jsx-runtime");
9793
10074
  var SignUp2 = ({
9794
10075
  className,
@@ -9806,7 +10087,7 @@ var SignUp2 = ({
9806
10087
  const applicationIdFromUrl = urlParams.get("applicationId");
9807
10088
  const effectiveApplicationId = applicationId || applicationIdFromUrl;
9808
10089
  const initialPayload = payload || {
9809
- flowType: import_browser62.EmbeddedFlowType.Registration,
10090
+ flowType: import_browser63.EmbeddedFlowType.Registration,
9810
10091
  ...effectiveApplicationId && { applicationId: effectiveApplicationId }
9811
10092
  };
9812
10093
  return await signUp(initialPayload);
@@ -9814,10 +10095,10 @@ var SignUp2 = ({
9814
10095
  const handleOnSubmit = async (payload) => await signUp(payload);
9815
10096
  const handleComplete = (response) => {
9816
10097
  onComplete?.(response);
9817
- if (shouldRedirectAfterSignUp && response?.type !== import_browser62.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
10098
+ if (shouldRedirectAfterSignUp && response?.type !== import_browser63.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
9818
10099
  window.location.href = afterSignUpUrl;
9819
10100
  }
9820
- if (shouldRedirectAfterSignUp && response?.type === import_browser62.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
10101
+ if (shouldRedirectAfterSignUp && response?.type === import_browser63.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
9821
10102
  !response.data.redirectURL.includes("auth")) {
9822
10103
  window.location.href = response.data.redirectURL;
9823
10104
  }
@@ -9847,7 +10128,7 @@ var SignUp_default2 = SignUp2;
9847
10128
  var import_jsx_runtime72 = require("react/jsx-runtime");
9848
10129
  var SignUp3 = (props) => {
9849
10130
  const { platform } = useAsgardeo_default();
9850
- if (platform === import_browser63.Platform.AsgardeoV2) {
10131
+ if (platform === import_browser64.Platform.AsgardeoV2) {
9851
10132
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SignUp_default2, { ...props });
9852
10133
  }
9853
10134
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SignUp_default, { ...props });
@@ -9855,11 +10136,11 @@ var SignUp3 = (props) => {
9855
10136
  var SignUp_default3 = SignUp3;
9856
10137
 
9857
10138
  // src/components/presentation/auth/InviteUser/v2/InviteUser.tsx
9858
- var import_browser65 = require("@asgardeo/browser");
10139
+ var import_browser66 = require("@asgardeo/browser");
9859
10140
 
9860
10141
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
9861
10142
  var import_react64 = require("react");
9862
- var import_browser64 = require("@asgardeo/browser");
10143
+ var import_browser65 = require("@asgardeo/browser");
9863
10144
  var import_css41 = require("@emotion/css");
9864
10145
 
9865
10146
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.ts
@@ -10088,7 +10369,7 @@ var BaseInviteUser = ({
10088
10369
  setApiError(null);
10089
10370
  try {
10090
10371
  const payload = {
10091
- flowType: import_browser64.EmbeddedFlowType.UserOnboarding,
10372
+ flowType: import_browser65.EmbeddedFlowType.UserOnboarding,
10092
10373
  verbose: true
10093
10374
  };
10094
10375
  const rawResponse = await onInitialize(payload);
@@ -10253,7 +10534,7 @@ var InviteUser = ({
10253
10534
  },
10254
10535
  data: {
10255
10536
  ...payload,
10256
- flowType: import_browser65.EmbeddedFlowType.UserOnboarding,
10537
+ flowType: import_browser66.EmbeddedFlowType.UserOnboarding,
10257
10538
  verbose: true
10258
10539
  }
10259
10540
  });
@@ -10767,35 +11048,35 @@ Organization5.displayName = "Organization";
10767
11048
  var Organization_default = Organization5;
10768
11049
 
10769
11050
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
10770
- var import_browser71 = require("@asgardeo/browser");
11051
+ var import_browser72 = require("@asgardeo/browser");
10771
11052
  var import_css51 = require("@emotion/css");
10772
11053
  var import_react76 = require("react");
10773
11054
 
10774
11055
  // src/utils/getMappedUserProfileValue.ts
10775
- var import_browser66 = require("@asgardeo/browser");
11056
+ var import_browser67 = require("@asgardeo/browser");
10776
11057
  var getMappedUserProfileValue = (key, mappings, user) => {
10777
11058
  if (!key || !mappings || !user) {
10778
11059
  return void 0;
10779
11060
  }
10780
11061
  const mapping = mappings[key];
10781
11062
  if (!mapping) {
10782
- return (0, import_browser66.get)(user, key);
11063
+ return (0, import_browser67.get)(user, key);
10783
11064
  }
10784
11065
  if (Array.isArray(mapping)) {
10785
11066
  for (const path of mapping) {
10786
- const value = (0, import_browser66.get)(user, path);
11067
+ const value = (0, import_browser67.get)(user, path);
10787
11068
  if (value !== void 0 && value !== null && value !== "") {
10788
11069
  return value;
10789
11070
  }
10790
11071
  }
10791
11072
  return void 0;
10792
11073
  }
10793
- return (0, import_browser66.get)(user, mapping);
11074
+ return (0, import_browser67.get)(user, mapping);
10794
11075
  };
10795
11076
  var getMappedUserProfileValue_default = getMappedUserProfileValue;
10796
11077
 
10797
11078
  // src/components/primitives/Avatar/Avatar.tsx
10798
- var import_browser67 = require("@asgardeo/browser");
11079
+ var import_browser68 = require("@asgardeo/browser");
10799
11080
  var import_css45 = require("@emotion/css");
10800
11081
  var import_react69 = require("react");
10801
11082
 
@@ -10914,20 +11195,20 @@ var Avatar = ({
10914
11195
  const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
10915
11196
  const renderContent = () => {
10916
11197
  if (imageUrl) {
10917
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: imageUrl, alt, className: (0, import_css45.cx)((0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("avatar", "image")), styles.image) });
11198
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: imageUrl, alt, className: (0, import_css45.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("avatar", "image")), styles.image) });
10918
11199
  }
10919
11200
  if (name) {
10920
11201
  return getInitials(name);
10921
11202
  }
10922
11203
  if (isLoading) {
10923
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: (0, import_css45.cx)((0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("avatar", "skeleton")), styles.skeleton) });
11204
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: (0, import_css45.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("avatar", "skeleton")), styles.skeleton) });
10924
11205
  }
10925
11206
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
10926
11207
  "svg",
10927
11208
  {
10928
11209
  xmlns: "http://www.w3.org/2000/svg",
10929
11210
  viewBox: "0 0 640 640",
10930
- className: (0, import_css45.cx)((0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("avatar", "icon")), styles.icon),
11211
+ className: (0, import_css45.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("avatar", "icon")), styles.icon),
10931
11212
  children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
10932
11213
  }
10933
11214
  );
@@ -10936,11 +11217,11 @@ var Avatar = ({
10936
11217
  "div",
10937
11218
  {
10938
11219
  className: (0, import_css45.cx)(
10939
- (0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("avatar")),
11220
+ (0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("avatar")),
10940
11221
  styles.avatar,
10941
11222
  styles.variant,
10942
- (0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("avatar", null, variant)),
10943
- isDefaultState && (0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("avatar", "default")),
11223
+ (0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("avatar", null, variant)),
11224
+ isDefaultState && (0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("avatar", "default")),
10944
11225
  className
10945
11226
  ),
10946
11227
  children: renderContent()
@@ -10950,7 +11231,7 @@ var Avatar = ({
10950
11231
  var Avatar_default = Avatar;
10951
11232
 
10952
11233
  // src/components/primitives/Dialog/Dialog.tsx
10953
- var import_browser68 = require("@asgardeo/browser");
11234
+ var import_browser69 = require("@asgardeo/browser");
10954
11235
  var import_react71 = require("@floating-ui/react");
10955
11236
  var import_css47 = require("@emotion/css");
10956
11237
  var import_react72 = __toESM(require("react"), 1);
@@ -11187,11 +11468,11 @@ var DialogContent = import_react72.default.forwardRef((props, propRef) => {
11187
11468
  const styles = Dialog_styles_default(theme, colorScheme);
11188
11469
  const ref = (0, import_react71.useMergeRefs)([context.refs.setFloating, propRef]);
11189
11470
  if (!floatingContext.open) return null;
11190
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react71.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react71.FloatingOverlay, { className: (0, import_css47.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react71.FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
11471
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react71.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react71.FloatingOverlay, { className: (0, import_css47.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react71.FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
11191
11472
  "div",
11192
11473
  {
11193
11474
  ref,
11194
- className: (0, import_css47.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("dialog", "content")), styles.content, props.className),
11475
+ className: (0, import_css47.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("dialog", "content")), styles.content, props.className),
11195
11476
  "aria-labelledby": context.labelId,
11196
11477
  "aria-describedby": context.descriptionId,
11197
11478
  ...context.getFloatingProps(props),
@@ -11209,14 +11490,14 @@ var DialogHeading = import_react72.default.forwardRef(
11209
11490
  context.setLabelId(id);
11210
11491
  return () => context.setLabelId(void 0);
11211
11492
  }, [id, context.setLabelId]);
11212
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: (0, import_css47.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("dialog", "header")), styles.header), children: [
11493
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: (0, import_css47.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("dialog", "header")), styles.header), children: [
11213
11494
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
11214
11495
  "h2",
11215
11496
  {
11216
11497
  ...props,
11217
11498
  ref,
11218
11499
  id,
11219
- className: (0, import_css47.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("dialog", "title")), styles.headerTitle),
11500
+ className: (0, import_css47.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("dialog", "title")), styles.headerTitle),
11220
11501
  children
11221
11502
  }
11222
11503
  ),
@@ -11251,7 +11532,7 @@ var DialogDescription = import_react72.default.forwardRef(
11251
11532
  ...props,
11252
11533
  ref,
11253
11534
  id,
11254
- className: (0, import_css47.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("dialog", "description")), styles.description, props.className),
11535
+ className: (0, import_css47.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("dialog", "description")), styles.description, props.className),
11255
11536
  children
11256
11537
  }
11257
11538
  );
@@ -11281,7 +11562,7 @@ var DialogClose = import_react72.default.forwardRef(({ children, asChild = false
11281
11562
  ...props,
11282
11563
  ref,
11283
11564
  onClick: handleClick,
11284
- className: (0, import_css47.cx)((0, import_browser68.withVendorCSSClassPrefix)((0, import_browser68.bem)("dialog", "close")), props.className),
11565
+ className: (0, import_css47.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("dialog", "close")), props.className),
11285
11566
  variant: "text",
11286
11567
  children
11287
11568
  }
@@ -11302,7 +11583,7 @@ var Dialog_default = Dialog;
11302
11583
  // src/components/primitives/MultiInput/MultiInput.tsx
11303
11584
  var import_react74 = require("react");
11304
11585
  var import_css49 = require("@emotion/css");
11305
- var import_browser69 = require("@asgardeo/browser");
11586
+ var import_browser70 = require("@asgardeo/browser");
11306
11587
 
11307
11588
  // src/components/primitives/MultiInput/MultiInput.styles.ts
11308
11589
  var import_css48 = require("@emotion/css");
@@ -11494,26 +11775,26 @@ var MultiInput = ({
11494
11775
  {
11495
11776
  error,
11496
11777
  helperText,
11497
- className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input")), className),
11778
+ className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input")), className),
11498
11779
  style,
11499
11780
  children: [
11500
11781
  label && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(InputLabel_default, { required, error: !!error, children: label }),
11501
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "container")), styles.container), children: [
11502
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
11782
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "container")), styles.container), children: [
11783
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
11503
11784
  currentInputValue,
11504
11785
  setCurrentInputValue,
11505
11786
  canAddMore ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PlusIcon, { className: styles.plusIcon }) : void 0,
11506
11787
  canAddMore ? handleInputSubmit : void 0
11507
11788
  ) }) }),
11508
- values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11789
+ values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11509
11790
  "div",
11510
11791
  {
11511
- className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "list-item")), styles.listItem),
11792
+ className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "list-item")), styles.listItem),
11512
11793
  children: [
11513
11794
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11514
11795
  "span",
11515
11796
  {
11516
- className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "list-item-text")), styles.listItemText),
11797
+ className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "list-item-text")), styles.listItemText),
11517
11798
  children: value
11518
11799
  }
11519
11800
  ),
@@ -11523,7 +11804,7 @@ var MultiInput = ({
11523
11804
  type: "button",
11524
11805
  onClick: () => handleRemoveValue(index),
11525
11806
  disabled,
11526
- className: (0, import_css49.cx)((0, import_browser69.withVendorCSSClassPrefix)((0, import_browser69.bem)("multi-input", "remove-button")), styles.removeButton),
11807
+ className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)((0, import_browser70.bem)("multi-input", "remove-button")), styles.removeButton),
11527
11808
  title: "Remove value",
11528
11809
  children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(BinIcon, { className: styles.icon })
11529
11810
  }
@@ -11542,7 +11823,7 @@ var MultiInput_default = MultiInput;
11542
11823
  // src/components/presentation/UserProfile/BaseUserProfile.styles.ts
11543
11824
  var import_css50 = require("@emotion/css");
11544
11825
  var import_react75 = require("react");
11545
- var import_browser70 = require("@asgardeo/browser");
11826
+ var import_browser71 = require("@asgardeo/browser");
11546
11827
  var useStyles23 = (theme, colorScheme) => {
11547
11828
  const valuePlaceholder = import_css50.css`
11548
11829
  font-style: italic;
@@ -11653,7 +11934,7 @@ var useStyles23 = (theme, colorScheme) => {
11653
11934
  max-width: 350px;
11654
11935
  text-align: start;
11655
11936
 
11656
- .${(0, import_browser70.withVendorCSSClassPrefix)("form-control")} {
11937
+ .${(0, import_browser71.withVendorCSSClassPrefix)("form-control")} {
11657
11938
  margin-bottom: 0;
11658
11939
  }
11659
11940
 
@@ -11852,7 +12133,7 @@ var BaseUserProfile = ({
11852
12133
  fieldValue = fieldValue.filter((v) => v !== void 0 && v !== null && v !== "");
11853
12134
  }
11854
12135
  let payload = {};
11855
- if (schema.schemaId && schema.schemaId !== import_browser71.WellKnownSchemaIds.User) {
12136
+ if (schema.schemaId && schema.schemaId !== import_browser72.WellKnownSchemaIds.User) {
11856
12137
  payload = {
11857
12138
  [schema.schemaId]: {
11858
12139
  [fieldName]: fieldValue
@@ -12086,7 +12367,7 @@ var BaseUserProfile = ({
12086
12367
  const containerClasses = (0, import_css51.cx)(
12087
12368
  styles.root,
12088
12369
  cardLayout ? styles.card : "",
12089
- (0, import_browser71.withVendorCSSClassPrefix)("user-profile"),
12370
+ (0, import_browser72.withVendorCSSClassPrefix)("user-profile"),
12090
12371
  className
12091
12372
  );
12092
12373
  const currentUser = flattenedProfile || profile;
@@ -12104,7 +12385,7 @@ var BaseUserProfile = ({
12104
12385
  ] }, key)) });
12105
12386
  };
12106
12387
  const profileContent = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Card_default, { className: containerClasses, children: [
12107
- error && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Alert_default, { variant: "error", className: (0, import_css51.cx)((0, import_browser71.withVendorCSSClassPrefix)((0, import_browser71.bem)("user-profile", "alert")), styles.alert), children: [
12388
+ error && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Alert_default, { variant: "error", className: (0, import_css51.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("user-profile", "alert")), styles.alert), children: [
12108
12389
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Alert_default.Title, { children: t("errors.heading") || "Error" }),
12109
12390
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Alert_default.Description, { children: error })
12110
12391
  ] }),
@@ -12152,8 +12433,8 @@ var BaseUserProfile_default = BaseUserProfile;
12152
12433
  var import_react77 = require("react");
12153
12434
 
12154
12435
  // src/api/updateMeProfile.ts
12155
- var import_browser72 = require("@asgardeo/browser");
12156
- var httpClient5 = import_browser72.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser72.AsgardeoSPAClient.getInstance());
12436
+ var import_browser73 = require("@asgardeo/browser");
12437
+ var httpClient5 = import_browser73.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser73.AsgardeoSPAClient.getInstance());
12157
12438
  var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
12158
12439
  const defaultFetcher = async (url, config) => {
12159
12440
  const response = await httpClient5({
@@ -12170,7 +12451,7 @@ var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
12170
12451
  text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
12171
12452
  };
12172
12453
  };
12173
- return (0, import_browser72.updateMeProfile)({
12454
+ return (0, import_browser73.updateMeProfile)({
12174
12455
  ...requestConfig,
12175
12456
  fetcher: fetcher || defaultFetcher
12176
12457
  });
@@ -12178,7 +12459,7 @@ var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
12178
12459
  var updateMeProfile_default = updateMeProfile;
12179
12460
 
12180
12461
  // src/components/presentation/UserProfile/UserProfile.tsx
12181
- var import_browser73 = require("@asgardeo/browser");
12462
+ var import_browser74 = require("@asgardeo/browser");
12182
12463
  var import_jsx_runtime89 = require("react/jsx-runtime");
12183
12464
  var UserProfile3 = ({ ...rest }) => {
12184
12465
  const { baseUrl, isLoading } = useAsgardeo_default();
@@ -12192,7 +12473,7 @@ var UserProfile3 = ({ ...rest }) => {
12192
12473
  onUpdateProfile(response);
12193
12474
  } catch (error2) {
12194
12475
  let message = t("user.profile.update.generic.error");
12195
- if (error2 instanceof import_browser73.AsgardeoError) {
12476
+ if (error2 instanceof import_browser74.AsgardeoError) {
12196
12477
  message = error2?.message;
12197
12478
  }
12198
12479
  setError(message);
@@ -12213,7 +12494,7 @@ var UserProfile3 = ({ ...rest }) => {
12213
12494
  var UserProfile_default = UserProfile3;
12214
12495
 
12215
12496
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
12216
- var import_browser74 = require("@asgardeo/browser");
12497
+ var import_browser75 = require("@asgardeo/browser");
12217
12498
  var import_react79 = require("@floating-ui/react");
12218
12499
  var import_css53 = require("@emotion/css");
12219
12500
  var import_react80 = require("react");
@@ -12474,12 +12755,12 @@ var BaseUserDropdown = ({
12474
12755
  }
12475
12756
  allMenuItems.push(...defaultMenuItems);
12476
12757
  }
12477
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown"), className), children: [
12758
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown"), className), children: [
12478
12759
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12479
12760
  Button_default,
12480
12761
  {
12481
12762
  ref: refs.setReference,
12482
- className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles.trigger),
12763
+ className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles.trigger),
12483
12764
  color: "tertiary",
12484
12765
  variant: "text",
12485
12766
  size: "medium",
@@ -12498,7 +12779,7 @@ var BaseUserDropdown = ({
12498
12779
  Typography_default,
12499
12780
  {
12500
12781
  variant: "body2",
12501
- className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles.userName),
12782
+ className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles.userName),
12502
12783
  children: getDisplayName_default(mergedMappings, user)
12503
12784
  }
12504
12785
  )
@@ -12509,7 +12790,7 @@ var BaseUserDropdown = ({
12509
12790
  "div",
12510
12791
  {
12511
12792
  ref: refs.setFloating,
12512
- className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__content"), styles.dropdownContent),
12793
+ className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__content"), styles.dropdownContent),
12513
12794
  style: {
12514
12795
  ...floatingStyles,
12515
12796
  // Floating UI doesn't set a z-index by default, so we set a high value to ensure the dropdown appears above other elements.
@@ -12518,7 +12799,7 @@ var BaseUserDropdown = ({
12518
12799
  },
12519
12800
  ...getFloatingProps(),
12520
12801
  children: [
12521
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__header"), styles.dropdownHeader), children: [
12802
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__header"), styles.dropdownHeader), children: [
12522
12803
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12523
12804
  Avatar,
12524
12805
  {
@@ -12528,12 +12809,12 @@ var BaseUserDropdown = ({
12528
12809
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
12529
12810
  }
12530
12811
  ),
12531
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__header-info"), styles.headerInfo), children: [
12812
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__header-info"), styles.headerInfo), children: [
12532
12813
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12533
12814
  Typography_default,
12534
12815
  {
12535
12816
  noWrap: true,
12536
- className: (0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__header-name"),
12817
+ className: (0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__header-name"),
12537
12818
  variant: "body1",
12538
12819
  fontWeight: "medium",
12539
12820
  children: getDisplayName_default(mergedMappings, user)
@@ -12543,7 +12824,7 @@ var BaseUserDropdown = ({
12543
12824
  Typography_default,
12544
12825
  {
12545
12826
  noWrap: true,
12546
- className: (0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__header-email"),
12827
+ className: (0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__header-email"),
12547
12828
  variant: "caption",
12548
12829
  color: "secondary",
12549
12830
  children: getMappedUserProfileValue_default("username", mergedMappings, user) || getMappedUserProfileValue_default("email", mergedMappings, user)
@@ -12551,14 +12832,14 @@ var BaseUserDropdown = ({
12551
12832
  )
12552
12833
  ] })
12553
12834
  ] }),
12554
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { children: item.label === "" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12835
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { children: item.label === "" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12555
12836
  "a",
12556
12837
  {
12557
12838
  href: item.href,
12558
12839
  style: {
12559
12840
  backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
12560
12841
  },
12561
- className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItemAnchor),
12842
+ className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItemAnchor),
12562
12843
  onMouseEnter: () => setHoveredItemIndex(index),
12563
12844
  onMouseLeave: () => setHoveredItemIndex(null),
12564
12845
  onFocus: () => setHoveredItemIndex(index),
@@ -12575,7 +12856,7 @@ var BaseUserDropdown = ({
12575
12856
  style: {
12576
12857
  backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
12577
12858
  },
12578
- className: (0, import_css53.cx)((0, import_browser74.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItem),
12859
+ className: (0, import_css53.cx)((0, import_browser75.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItem),
12579
12860
  color: "tertiary",
12580
12861
  variant: "text",
12581
12862
  size: "small",
@@ -13478,8 +13759,8 @@ var BaseCreateOrganization = ({
13478
13759
  };
13479
13760
 
13480
13761
  // src/api/createOrganization.ts
13481
- var import_browser75 = require("@asgardeo/browser");
13482
- var httpClient6 = import_browser75.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser75.AsgardeoSPAClient.getInstance());
13762
+ var import_browser76 = require("@asgardeo/browser");
13763
+ var httpClient6 = import_browser76.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser76.AsgardeoSPAClient.getInstance());
13483
13764
  var createOrganization = async ({ fetcher, ...requestConfig }) => {
13484
13765
  const defaultFetcher = async (url, config) => {
13485
13766
  const response = await httpClient6({
@@ -13496,7 +13777,7 @@ var createOrganization = async ({ fetcher, ...requestConfig }) => {
13496
13777
  text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
13497
13778
  };
13498
13779
  };
13499
- return (0, import_browser75.createOrganization)({
13780
+ return (0, import_browser76.createOrganization)({
13500
13781
  ...requestConfig,
13501
13782
  fetcher: fetcher || defaultFetcher
13502
13783
  });
@@ -13571,12 +13852,12 @@ var CreateOrganization = ({
13571
13852
  var import_react92 = require("react");
13572
13853
 
13573
13854
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
13574
- var import_browser77 = require("@asgardeo/browser");
13855
+ var import_browser78 = require("@asgardeo/browser");
13575
13856
  var import_css61 = require("@emotion/css");
13576
13857
  var import_react91 = require("react");
13577
13858
 
13578
13859
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
13579
- var import_browser76 = require("@asgardeo/browser");
13860
+ var import_browser77 = require("@asgardeo/browser");
13580
13861
  var import_css59 = require("@emotion/css");
13581
13862
  var import_react89 = require("react");
13582
13863
 
@@ -13811,27 +14092,27 @@ var KeyValueInput = ({
13811
14092
  );
13812
14093
  const canAddMore = !maxPairs || pairs.length < maxPairs;
13813
14094
  const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
13814
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input")), styles.container, className), children: [
13815
- label && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("label", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "label")), styles.label), children: [
14095
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input")), styles.container, className), children: [
14096
+ label && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("label", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "label")), styles.label), children: [
13816
14097
  label,
13817
14098
  required && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
13818
14099
  "span",
13819
14100
  {
13820
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "required")), styles.requiredIndicator),
14101
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "required")), styles.requiredIndicator),
13821
14102
  children: " *"
13822
14103
  }
13823
14104
  )
13824
14105
  ] }),
13825
- /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "pairs-list")), styles.pairsList), children: [
13826
- pairs.length === 0 && readOnly ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
14106
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "pairs-list")), styles.pairsList), children: [
14107
+ pairs.length === 0 && readOnly ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
13827
14108
  "div",
13828
14109
  {
13829
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "readonly-pair")), styles.readOnlyPair),
14110
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "readonly-pair")), styles.readOnlyPair),
13830
14111
  children: [
13831
14112
  /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
13832
14113
  "span",
13833
14114
  {
13834
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "readonly-key")), styles.readOnlyKey),
14115
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "readonly-key")), styles.readOnlyKey),
13835
14116
  children: [
13836
14117
  pair.key,
13837
14118
  ":"
@@ -13841,7 +14122,7 @@ var KeyValueInput = ({
13841
14122
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
13842
14123
  "span",
13843
14124
  {
13844
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "readonly-value")), styles.readOnlyValue),
14125
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "readonly-value")), styles.readOnlyValue),
13845
14126
  children: pair.value
13846
14127
  }
13847
14128
  )
@@ -13851,7 +14132,7 @@ var KeyValueInput = ({
13851
14132
  )) : pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
13852
14133
  "div",
13853
14134
  {
13854
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "pair-row")), styles.pairRow),
14135
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "pair-row")), styles.pairRow),
13855
14136
  children: [
13856
14137
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
13857
14138
  TextField_default,
@@ -13860,7 +14141,7 @@ var KeyValueInput = ({
13860
14141
  value: pair.key,
13861
14142
  onChange: (e) => handleUpdatePair(index, "key", e.target.value),
13862
14143
  disabled: disabled || readOnly,
13863
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "pair-input")), styles.pairInput),
14144
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "pair-input")), styles.pairInput),
13864
14145
  "aria-label": `${keyLabel} ${index + 1}`
13865
14146
  }
13866
14147
  ),
@@ -13871,7 +14152,7 @@ var KeyValueInput = ({
13871
14152
  value: pair.value,
13872
14153
  onChange: (e) => handleUpdatePair(index, "value", e.target.value),
13873
14154
  disabled: disabled || readOnly,
13874
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "pair-input")), styles.pairInput),
14155
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "pair-input")), styles.pairInput),
13875
14156
  "aria-label": `${valueLabel} ${index + 1}`
13876
14157
  }
13877
14158
  ),
@@ -13881,7 +14162,7 @@ var KeyValueInput = ({
13881
14162
  type: "button",
13882
14163
  onClick: () => handleRemovePair(index),
13883
14164
  disabled,
13884
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "remove-button")), styles.removeButton),
14165
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "remove-button")), styles.removeButton),
13885
14166
  "aria-label": `${removeButtonText} ${pair.key}`,
13886
14167
  children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(X_default, { width: 16, height: 16 })
13887
14168
  }
@@ -13890,7 +14171,7 @@ var KeyValueInput = ({
13890
14171
  },
13891
14172
  `${pair.key}-${index}`
13892
14173
  )),
13893
- !readOnly && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "add-row")), styles.addRow), children: [
14174
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "add-row")), styles.addRow), children: [
13894
14175
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
13895
14176
  TextField_default,
13896
14177
  {
@@ -13898,7 +14179,7 @@ var KeyValueInput = ({
13898
14179
  value: newKey,
13899
14180
  onChange: (e) => setNewKey(e.target.value),
13900
14181
  disabled,
13901
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "pair-input")), styles.pairInput),
14182
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "pair-input")), styles.pairInput),
13902
14183
  "aria-label": "New key"
13903
14184
  }
13904
14185
  ),
@@ -13909,7 +14190,7 @@ var KeyValueInput = ({
13909
14190
  value: newValue,
13910
14191
  onChange: (e) => setNewValue(e.target.value),
13911
14192
  disabled,
13912
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "pair-input")), styles.pairInput),
14193
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "pair-input")), styles.pairInput),
13913
14194
  "aria-label": "New value",
13914
14195
  onKeyPress: (e) => {
13915
14196
  if (e.key === "Enter" && !isAddDisabled) {
@@ -13924,15 +14205,15 @@ var KeyValueInput = ({
13924
14205
  type: "button",
13925
14206
  onClick: handleAddPair,
13926
14207
  disabled: isAddDisabled,
13927
- className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "add-button")), styles.addButton),
14208
+ className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "add-button")), styles.addButton),
13928
14209
  "aria-label": "Add new key-value pair",
13929
14210
  children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Plus_default, { width: 16, height: 16 })
13930
14211
  }
13931
14212
  )
13932
14213
  ] })
13933
14214
  ] }),
13934
- (helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
13935
- maxPairs && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser76.withVendorCSSClassPrefix)((0, import_browser76.bem)("key-value-input", "counter")), styles.counterText), children: [
14215
+ (helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
14216
+ maxPairs && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: (0, import_css59.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("key-value-input", "counter")), styles.counterText), children: [
13936
14217
  pairs.length,
13937
14218
  " of ",
13938
14219
  maxPairs,
@@ -14136,13 +14417,13 @@ var BaseOrganizationProfile = ({
14136
14417
  key: "created",
14137
14418
  label: "Created Date",
14138
14419
  editable: false,
14139
- render: (value) => (0, import_browser77.formatDate)(value)
14420
+ render: (value) => (0, import_browser78.formatDate)(value)
14140
14421
  },
14141
14422
  {
14142
14423
  key: "lastModified",
14143
14424
  label: "Last Modified Date",
14144
14425
  editable: false,
14145
- render: (value) => (0, import_browser77.formatDate)(value)
14426
+ render: (value) => (0, import_browser78.formatDate)(value)
14146
14427
  }
14147
14428
  ]
14148
14429
  }) => {
@@ -14379,8 +14660,8 @@ var BaseOrganizationProfile = ({
14379
14660
  var BaseOrganizationProfile_default = BaseOrganizationProfile;
14380
14661
 
14381
14662
  // src/api/getOrganization.ts
14382
- var import_browser78 = require("@asgardeo/browser");
14383
- var httpClient7 = import_browser78.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser78.AsgardeoSPAClient.getInstance());
14663
+ var import_browser79 = require("@asgardeo/browser");
14664
+ var httpClient7 = import_browser79.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser79.AsgardeoSPAClient.getInstance());
14384
14665
  var getOrganization = async ({ fetcher, ...requestConfig }) => {
14385
14666
  const defaultFetcher = async (url, config) => {
14386
14667
  const response = await httpClient7({
@@ -14396,7 +14677,7 @@ var getOrganization = async ({ fetcher, ...requestConfig }) => {
14396
14677
  text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
14397
14678
  };
14398
14679
  };
14399
- return (0, import_browser78.getOrganization)({
14680
+ return (0, import_browser79.getOrganization)({
14400
14681
  ...requestConfig,
14401
14682
  fetcher: fetcher || defaultFetcher
14402
14683
  });
@@ -14404,8 +14685,8 @@ var getOrganization = async ({ fetcher, ...requestConfig }) => {
14404
14685
  var getOrganization_default = getOrganization;
14405
14686
 
14406
14687
  // src/api/updateOrganization.ts
14407
- var import_browser79 = require("@asgardeo/browser");
14408
- var httpClient8 = import_browser79.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser79.AsgardeoSPAClient.getInstance());
14688
+ var import_browser80 = require("@asgardeo/browser");
14689
+ var httpClient8 = import_browser80.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser80.AsgardeoSPAClient.getInstance());
14409
14690
  var updateOrganization = async ({
14410
14691
  fetcher,
14411
14692
  ...requestConfig
@@ -14425,7 +14706,7 @@ var updateOrganization = async ({
14425
14706
  text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
14426
14707
  };
14427
14708
  };
14428
- return (0, import_browser79.updateOrganization)({
14709
+ return (0, import_browser80.updateOrganization)({
14429
14710
  ...requestConfig,
14430
14711
  fetcher: fetcher || defaultFetcher
14431
14712
  });
@@ -14478,7 +14759,7 @@ var OrganizationProfile = ({
14478
14759
  const handleOrganizationUpdate = async (payload) => {
14479
14760
  if (!baseUrl || !organizationId) return;
14480
14761
  try {
14481
- const operations = (0, import_browser79.createPatchOperations)(payload);
14762
+ const operations = (0, import_browser80.createPatchOperations)(payload);
14482
14763
  await updateOrganization_default({
14483
14764
  baseUrl,
14484
14765
  organizationId,
@@ -15128,5 +15409,5 @@ var OrganizationSwitcher = ({
15128
15409
  var OrganizationSwitcher_default = OrganizationSwitcher;
15129
15410
 
15130
15411
  // src/index.ts
15131
- var import_browser80 = require("@asgardeo/browser");
15412
+ var import_browser81 = require("@asgardeo/browser");
15132
15413
  //# sourceMappingURL=index.js.map