@asgardeo/react 0.14.1 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7663,7 +7663,7 @@ import {
7663
7663
  resolveVars as resolveVars3
7664
7664
  } from "@asgardeo/browser";
7665
7665
  import { cx as cx20 } from "@emotion/css";
7666
- import { useState as useState16, useCallback as useCallback11 } from "react";
7666
+ import { useState as useState17, useCallback as useCallback11 } from "react";
7667
7667
 
7668
7668
  // src/utils/v2/resolveTranslationsInObject.ts
7669
7669
  import { resolveVars } from "@asgardeo/browser";
@@ -7775,7 +7775,16 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
7775
7775
  if (errorMessage && throwOnError) {
7776
7776
  throw response;
7777
7777
  }
7778
+ const additionalData = response?.data?.additionalData ?? {};
7779
+ if (typeof additionalData["consentPrompt"] === "string") {
7780
+ try {
7781
+ const parsed = JSON.parse(additionalData["consentPrompt"]);
7782
+ additionalData["consentPrompt"] = { purposes: Array.isArray(parsed) ? parsed : [] };
7783
+ } catch {
7784
+ }
7785
+ }
7778
7786
  return {
7787
+ additionalData,
7779
7788
  components: transformComponents(response, t, resolveTranslations, meta),
7780
7789
  flowId: response.flowId
7781
7790
  };
@@ -7853,8 +7862,156 @@ import { css as css17 } from "@emotion/css";
7853
7862
  import DOMPurify from "dompurify";
7854
7863
  import { cloneElement } from "react";
7855
7864
 
7865
+ // src/components/adapters/ConsentCheckboxList.tsx
7866
+ import { Fragment as Fragment13, jsx as jsx59 } from "react/jsx-runtime";
7867
+ var getConsentOptionalKey = (purposeId, attrName) => `__consent_opt__${purposeId}__${attrName}`;
7868
+ var ConsentCheckboxList = ({
7869
+ variant,
7870
+ purpose,
7871
+ formValues,
7872
+ onInputChange,
7873
+ children
7874
+ }) => {
7875
+ const attributes = variant === "ESSENTIAL" ? purpose.essential : purpose.optional;
7876
+ if (!attributes || attributes.length === 0) {
7877
+ return null;
7878
+ }
7879
+ const isEssential = variant === "ESSENTIAL";
7880
+ const isChecked = (attrName) => {
7881
+ if (isEssential) {
7882
+ return true;
7883
+ }
7884
+ const key = getConsentOptionalKey(purpose.purpose_id, attrName);
7885
+ return formValues[key] !== "false";
7886
+ };
7887
+ const handleChange = (attrName, checked) => {
7888
+ const key = getConsentOptionalKey(purpose.purpose_id, attrName);
7889
+ onInputChange(key, checked ? "true" : "false");
7890
+ };
7891
+ if (children) {
7892
+ return /* @__PURE__ */ jsx59(Fragment13, { children: children({ attributes, handleChange, isChecked, variant }) });
7893
+ }
7894
+ return /* @__PURE__ */ jsx59(
7895
+ "div",
7896
+ {
7897
+ style: {
7898
+ display: "flex",
7899
+ flexDirection: "column",
7900
+ gap: "0.25rem",
7901
+ margin: "0.25rem 0 0.5rem"
7902
+ },
7903
+ children: attributes.map((attr) => {
7904
+ const inputId = `consent_${isEssential ? "ess" : "opt"}_${purpose.purpose_id}_${attr}`;
7905
+ const checked = isChecked(attr);
7906
+ return /* @__PURE__ */ jsx59(
7907
+ Checkbox_default,
7908
+ {
7909
+ id: inputId,
7910
+ checked,
7911
+ disabled: isEssential,
7912
+ label: attr,
7913
+ onChange: isEssential ? void 0 : (e) => handleChange(attr, e.target.checked)
7914
+ },
7915
+ attr
7916
+ );
7917
+ })
7918
+ }
7919
+ );
7920
+ };
7921
+ var ConsentCheckboxList_default = ConsentCheckboxList;
7922
+
7923
+ // src/components/adapters/Consent.tsx
7924
+ import { Fragment as Fragment14, jsx as jsx60, jsxs as jsxs27 } from "react/jsx-runtime";
7925
+ var Consent = ({ consentData, formValues, onInputChange, children }) => {
7926
+ if (!consentData) return null;
7927
+ let purposes = [];
7928
+ try {
7929
+ const parsed = typeof consentData === "string" ? JSON.parse(consentData) : consentData;
7930
+ purposes = Array.isArray(parsed) ? parsed : parsed.purposes || [];
7931
+ } catch (e) {
7932
+ return null;
7933
+ }
7934
+ if (purposes.length === 0) return null;
7935
+ if (children) {
7936
+ return /* @__PURE__ */ jsx60(Fragment14, { children: children({ formValues, onInputChange, purposes }) });
7937
+ }
7938
+ return /* @__PURE__ */ jsx60("div", { style: { display: "flex", flexDirection: "column", gap: "1rem", marginTop: "0.25rem" }, children: purposes.map((purpose, purposeIndex) => /* @__PURE__ */ jsxs27("div", { style: { paddingBottom: "1rem" }, children: [
7939
+ purpose.essential && purpose.essential.length > 0 && /* @__PURE__ */ jsxs27("div", { style: { marginTop: "0.5rem" }, children: [
7940
+ /* @__PURE__ */ jsx60(Typography_default, { variant: "subtitle2", fontWeight: "bold", children: "Essential Attributes" }),
7941
+ /* @__PURE__ */ jsx60(
7942
+ ConsentCheckboxList_default,
7943
+ {
7944
+ variant: "ESSENTIAL",
7945
+ purpose,
7946
+ formValues,
7947
+ onInputChange
7948
+ }
7949
+ )
7950
+ ] }),
7951
+ purpose.optional && purpose.optional.length > 0 && /* @__PURE__ */ jsxs27("div", { style: { marginTop: "0.5rem" }, children: [
7952
+ /* @__PURE__ */ jsx60(Typography_default, { variant: "subtitle2", fontWeight: "bold", children: "Optional Attributes" }),
7953
+ /* @__PURE__ */ jsx60(
7954
+ ConsentCheckboxList_default,
7955
+ {
7956
+ variant: "OPTIONAL",
7957
+ purpose,
7958
+ formValues,
7959
+ onInputChange
7960
+ }
7961
+ )
7962
+ ] })
7963
+ ] }, purpose.purpose_id || purposeIndex)) });
7964
+ };
7965
+ var Consent_default = Consent;
7966
+
7967
+ // src/components/adapters/FlowTimer.tsx
7968
+ import { useEffect as useEffect15, useState as useState16 } from "react";
7969
+ import { Fragment as Fragment15, jsx as jsx61 } from "react/jsx-runtime";
7970
+ var FlowTimer = ({
7971
+ expiresIn = 0,
7972
+ textTemplate = "Time remaining: {time}",
7973
+ children
7974
+ }) => {
7975
+ const [remaining, setRemaining] = useState16(expiresIn > 0 ? expiresIn : 0);
7976
+ useEffect15(() => {
7977
+ if (expiresIn <= 0) {
7978
+ return void 0;
7979
+ }
7980
+ setRemaining(expiresIn);
7981
+ const interval = setInterval(() => {
7982
+ setRemaining((prev) => {
7983
+ if (prev <= 1) {
7984
+ clearInterval(interval);
7985
+ return 0;
7986
+ }
7987
+ return prev - 1;
7988
+ });
7989
+ }, 1e3);
7990
+ return () => clearInterval(interval);
7991
+ }, [expiresIn]);
7992
+ if (expiresIn <= 0) {
7993
+ return null;
7994
+ }
7995
+ const formatTime = (seconds) => {
7996
+ if (seconds <= 0) {
7997
+ return "Timed out";
7998
+ }
7999
+ const m = Math.floor(seconds / 60);
8000
+ const s = seconds % 60;
8001
+ return `${m}:${s.toString().padStart(2, "0")}`;
8002
+ };
8003
+ const isExpired = remaining <= 0;
8004
+ const formattedTime = formatTime(remaining);
8005
+ if (children) {
8006
+ return /* @__PURE__ */ jsx61(Fragment15, { children: children({ formattedTime, isExpired, remaining }) });
8007
+ }
8008
+ const displayText = isExpired ? "Timed out" : textTemplate.replace("{time}", formattedTime);
8009
+ return /* @__PURE__ */ jsx61(Typography_default, { variant: "body2", children: displayText });
8010
+ };
8011
+ var FlowTimer_default = FlowTimer;
8012
+
7856
8013
  // src/components/adapters/ImageComponent.tsx
7857
- import { jsx as jsx59 } from "react/jsx-runtime";
8014
+ import { jsx as jsx62 } from "react/jsx-runtime";
7858
8015
  var ImageComponent = ({ component }) => {
7859
8016
  const { theme } = useTheme_default();
7860
8017
  const config = component.config || {};
@@ -7871,7 +8028,7 @@ var ImageComponent = ({ component }) => {
7871
8028
  if (!src) {
7872
8029
  return null;
7873
8030
  }
7874
- return /* @__PURE__ */ jsx59("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx59(
8031
+ return /* @__PURE__ */ jsx62("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx62(
7875
8032
  "img",
7876
8033
  {
7877
8034
  src,
@@ -7888,7 +8045,7 @@ var ImageComponent = ({ component }) => {
7888
8045
  var ImageComponent_default = ImageComponent;
7889
8046
 
7890
8047
  // src/components/adapters/SmsOtpButton.tsx
7891
- import { jsx as jsx60 } from "react/jsx-runtime";
8048
+ import { jsx as jsx63 } from "react/jsx-runtime";
7892
8049
  var SmsOtpButton = ({
7893
8050
  isLoading,
7894
8051
  preferences,
@@ -7896,7 +8053,7 @@ var SmsOtpButton = ({
7896
8053
  ...rest
7897
8054
  }) => {
7898
8055
  const { t } = useTranslation_default(preferences?.i18n);
7899
- return /* @__PURE__ */ jsx60(
8056
+ return /* @__PURE__ */ jsx63(
7900
8057
  Button_default,
7901
8058
  {
7902
8059
  ...rest,
@@ -7905,7 +8062,7 @@ var SmsOtpButton = ({
7905
8062
  color: "secondary",
7906
8063
  variant: "solid",
7907
8064
  disabled: isLoading,
7908
- startIcon: /* @__PURE__ */ jsx60("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx60(
8065
+ startIcon: /* @__PURE__ */ jsx63("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx63(
7909
8066
  "path",
7910
8067
  {
7911
8068
  fill: "currentColor",
@@ -7919,8 +8076,8 @@ var SmsOtpButton = ({
7919
8076
  var SmsOtpButton_default = SmsOtpButton;
7920
8077
 
7921
8078
  // src/components/primitives/Icons/ArrowLeftRight.tsx
7922
- import { jsx as jsx61, jsxs as jsxs27 } from "react/jsx-runtime";
7923
- var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs27(
8079
+ import { jsx as jsx64, jsxs as jsxs28 } from "react/jsx-runtime";
8080
+ var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs28(
7924
8081
  "svg",
7925
8082
  {
7926
8083
  xmlns: "http://www.w3.org/2000/svg",
@@ -7933,10 +8090,10 @@ var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */
7933
8090
  strokeLinecap: "round",
7934
8091
  strokeLinejoin: "round",
7935
8092
  children: [
7936
- /* @__PURE__ */ jsx61("path", { d: "M8 3 4 7l4 4" }),
7937
- /* @__PURE__ */ jsx61("path", { d: "M4 7h16" }),
7938
- /* @__PURE__ */ jsx61("path", { d: "m16 21 4-4-4-4" }),
7939
- /* @__PURE__ */ jsx61("path", { d: "M20 17H4" })
8093
+ /* @__PURE__ */ jsx64("path", { d: "M8 3 4 7l4 4" }),
8094
+ /* @__PURE__ */ jsx64("path", { d: "M4 7h16" }),
8095
+ /* @__PURE__ */ jsx64("path", { d: "m16 21 4-4-4-4" }),
8096
+ /* @__PURE__ */ jsx64("path", { d: "M20 17H4" })
7940
8097
  ]
7941
8098
  }
7942
8099
  );
@@ -7944,8 +8101,8 @@ ArrowLeftRight.displayName = "ArrowLeftRight";
7944
8101
  var ArrowLeftRight_default = ArrowLeftRight;
7945
8102
 
7946
8103
  // src/components/primitives/Icons/ArrowRightLeft.tsx
7947
- import { jsx as jsx62, jsxs as jsxs28 } from "react/jsx-runtime";
7948
- var ArrowRightLeft = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs28(
8104
+ import { jsx as jsx65, jsxs as jsxs29 } from "react/jsx-runtime";
8105
+ var ArrowRightLeft = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs29(
7949
8106
  "svg",
7950
8107
  {
7951
8108
  xmlns: "http://www.w3.org/2000/svg",
@@ -7958,10 +8115,10 @@ var ArrowRightLeft = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */
7958
8115
  strokeLinecap: "round",
7959
8116
  strokeLinejoin: "round",
7960
8117
  children: [
7961
- /* @__PURE__ */ jsx62("path", { d: "m16 3 4 4-4 4" }),
7962
- /* @__PURE__ */ jsx62("path", { d: "M20 7H4" }),
7963
- /* @__PURE__ */ jsx62("path", { d: "m8 21-4-4 4-4" }),
7964
- /* @__PURE__ */ jsx62("path", { d: "M4 17h16" })
8118
+ /* @__PURE__ */ jsx65("path", { d: "m16 3 4 4-4 4" }),
8119
+ /* @__PURE__ */ jsx65("path", { d: "M20 7H4" }),
8120
+ /* @__PURE__ */ jsx65("path", { d: "m8 21-4-4 4-4" }),
8121
+ /* @__PURE__ */ jsx65("path", { d: "M4 17h16" })
7965
8122
  ]
7966
8123
  }
7967
8124
  );
@@ -7976,7 +8133,7 @@ var flowIconRegistry = {
7976
8133
  var flowIconRegistry_default = flowIconRegistry;
7977
8134
 
7978
8135
  // src/components/presentation/auth/AuthOptionFactory.tsx
7979
- import { jsx as jsx63 } from "react/jsx-runtime";
8136
+ import { jsx as jsx66 } from "react/jsx-runtime";
7980
8137
  var logger5 = createPackageComponentLogger5(
7981
8138
  "@asgardeo/react",
7982
8139
  "AuthOptionFactory"
@@ -8071,31 +8228,53 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8071
8228
  Object.keys(formValues).forEach((field) => {
8072
8229
  formData[field] = formValues[field];
8073
8230
  });
8231
+ const consentPrompt = options.additionalData?.["consentPrompt"];
8232
+ if (consentPrompt && eventType.toUpperCase() === EmbeddedFlowEventType.Submit) {
8233
+ const isDeny = componentVariant.toLowerCase() !== "primary";
8234
+ const decisions = {
8235
+ purposes: consentPrompt.purposes.map(
8236
+ (p) => ({
8237
+ approved: !isDeny,
8238
+ elements: [
8239
+ ...p.essential.map((attr) => ({ approved: !isDeny, name: attr })),
8240
+ ...p.optional.map(
8241
+ (attr) => ({
8242
+ approved: isDeny ? false : formValues[getConsentOptionalKey(p.purpose_id, attr)] !== "false",
8243
+ name: attr
8244
+ })
8245
+ )
8246
+ ],
8247
+ purpose_name: p.purpose_name
8248
+ })
8249
+ )
8250
+ };
8251
+ formData["consent_decisions"] = JSON.stringify(decisions);
8252
+ }
8074
8253
  options.onSubmit(component, formData, shouldSkipValidation);
8075
8254
  }
8076
8255
  };
8077
8256
  if (matchesSocialProvider(actionId, eventType, buttonText, "google", authType, componentVariant)) {
8078
- return /* @__PURE__ */ jsx63(GoogleButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8257
+ return /* @__PURE__ */ jsx66(GoogleButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8079
8258
  }
8080
8259
  if (matchesSocialProvider(actionId, eventType, buttonText, "github", authType, componentVariant)) {
8081
- return /* @__PURE__ */ jsx63(GitHubButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8260
+ return /* @__PURE__ */ jsx66(GitHubButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8082
8261
  }
8083
8262
  if (matchesSocialProvider(actionId, eventType, buttonText, "facebook", authType, componentVariant)) {
8084
- return /* @__PURE__ */ jsx63(FacebookButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8263
+ return /* @__PURE__ */ jsx66(FacebookButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8085
8264
  }
8086
8265
  if (matchesSocialProvider(actionId, eventType, buttonText, "microsoft", authType, componentVariant)) {
8087
- return /* @__PURE__ */ jsx63(MicrosoftButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8266
+ return /* @__PURE__ */ jsx66(MicrosoftButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8088
8267
  }
8089
8268
  if (matchesSocialProvider(actionId, eventType, buttonText, "linkedin", authType, componentVariant)) {
8090
- return /* @__PURE__ */ jsx63(LinkedInButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8269
+ return /* @__PURE__ */ jsx66(LinkedInButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8091
8270
  }
8092
8271
  if (matchesSocialProvider(actionId, eventType, buttonText, "ethereum", authType, componentVariant)) {
8093
- return /* @__PURE__ */ jsx63(SignInWithEthereumButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8272
+ return /* @__PURE__ */ jsx66(SignInWithEthereumButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8094
8273
  }
8095
8274
  if (actionId === "prompt_mobile" || eventType === "prompt_mobile") {
8096
- return /* @__PURE__ */ jsx63(SmsOtpButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8275
+ return /* @__PURE__ */ jsx66(SmsOtpButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8097
8276
  }
8098
- const startIconEl = component.startIcon ? /* @__PURE__ */ jsx63(
8277
+ const startIconEl = component.startIcon ? /* @__PURE__ */ jsx66(
8099
8278
  "img",
8100
8279
  {
8101
8280
  src: component.startIcon,
@@ -8104,7 +8283,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8104
8283
  style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
8105
8284
  }
8106
8285
  ) : null;
8107
- const endIconEl = component.endIcon ? /* @__PURE__ */ jsx63(
8286
+ const endIconEl = component.endIcon ? /* @__PURE__ */ jsx66(
8108
8287
  "img",
8109
8288
  {
8110
8289
  src: component.endIcon,
@@ -8113,12 +8292,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8113
8292
  style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
8114
8293
  }
8115
8294
  ) : null;
8116
- return /* @__PURE__ */ jsx63(
8295
+ return /* @__PURE__ */ jsx66(
8117
8296
  Button_default,
8118
8297
  {
8119
8298
  fullWidth: true,
8120
8299
  onClick: handleClick,
8121
- disabled: isLoading || !isFormValid,
8300
+ disabled: isLoading || !isFormValid && !shouldSkipValidation || options.isTimeoutDisabled || component.config?.disabled,
8122
8301
  className: options.buttonClassName,
8123
8302
  "data-testid": "asgardeo-signin-submit",
8124
8303
  variant: component.variant?.toLowerCase() === "primary" ? "solid" : "outline",
@@ -8132,10 +8311,10 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8132
8311
  }
8133
8312
  case EmbeddedFlowComponentType.Text: {
8134
8313
  const variant = getTypographyVariant(component.variant);
8135
- return /* @__PURE__ */ jsx63(Typography_default, { variant, children: resolve(component.label) }, key);
8314
+ return /* @__PURE__ */ jsx66(Typography_default, { variant, children: resolve(component.label) }, key);
8136
8315
  }
8137
8316
  case EmbeddedFlowComponentType.Divider: {
8138
- return /* @__PURE__ */ jsx63(Divider_default, { children: resolve(component.label) || "" }, key);
8317
+ return /* @__PURE__ */ jsx66(Divider_default, { children: resolve(component.label) || "" }, key);
8139
8318
  }
8140
8319
  case EmbeddedFlowComponentType.Select: {
8141
8320
  const identifier = component.ref;
@@ -8146,7 +8325,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8146
8325
  label: typeof opt === "string" ? opt : String(opt.label ?? opt.value ?? ""),
8147
8326
  value: typeof opt === "string" ? opt : String(opt.value ?? "")
8148
8327
  }));
8149
- return /* @__PURE__ */ jsx63(
8328
+ return /* @__PURE__ */ jsx66(
8150
8329
  Select_default,
8151
8330
  {
8152
8331
  name: identifier,
@@ -8181,12 +8360,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8181
8360
  }
8182
8361
  )
8183
8362
  ).filter(Boolean);
8184
- return /* @__PURE__ */ jsx63("form", { id: component.id, children: blockComponents }, key);
8363
+ return /* @__PURE__ */ jsx66("form", { id: component.id, children: blockComponents }, key);
8185
8364
  }
8186
8365
  return null;
8187
8366
  }
8188
8367
  case EmbeddedFlowComponentType.RichText: {
8189
- return /* @__PURE__ */ jsx63(
8368
+ return /* @__PURE__ */ jsx66(
8190
8369
  "div",
8191
8370
  {
8192
8371
  className: richTextClass,
@@ -8198,7 +8377,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8198
8377
  case EmbeddedFlowComponentType.Image: {
8199
8378
  const explicitHeight = resolve(component.height?.toString());
8200
8379
  const explicitWidth = resolve(component.width?.toString());
8201
- return /* @__PURE__ */ jsx63(
8380
+ return /* @__PURE__ */ jsx66(
8202
8381
  ImageComponent_default,
8203
8382
  {
8204
8383
  component: {
@@ -8228,7 +8407,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8228
8407
  logger5.warn(`Unknown icon name: "${iconName}". Skipping render.`);
8229
8408
  return null;
8230
8409
  }
8231
- return /* @__PURE__ */ jsx63(IconComponent, { size: component.size || 24, color: component.color || "currentColor" }, key);
8410
+ return /* @__PURE__ */ jsx66(IconComponent, { size: component.size || 24, color: component.color || "currentColor" }, key);
8232
8411
  }
8233
8412
  case EmbeddedFlowComponentType.Stack: {
8234
8413
  const direction = component.direction || "row";
@@ -8260,7 +8439,26 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8260
8439
  }
8261
8440
  )
8262
8441
  ) : [];
8263
- return /* @__PURE__ */ jsx63("div", { style: stackStyle, children: stackChildren }, key);
8442
+ return /* @__PURE__ */ jsx66("div", { style: stackStyle, children: stackChildren }, key);
8443
+ }
8444
+ case EmbeddedFlowComponentType.Consent: {
8445
+ const consentPromptRawData = options.additionalData?.["consentPrompt"];
8446
+ return /* @__PURE__ */ jsx66(
8447
+ Consent_default,
8448
+ {
8449
+ consentData: consentPromptRawData,
8450
+ formValues,
8451
+ onInputChange
8452
+ },
8453
+ key
8454
+ );
8455
+ }
8456
+ case EmbeddedFlowComponentType.Timer: {
8457
+ const timerConfig = component.config || {};
8458
+ const textTemplate = timerConfig.text || "Time remaining: {time}";
8459
+ const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
8460
+ const expiresIn = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3)) : 0;
8461
+ return /* @__PURE__ */ jsx66(FlowTimer_default, { expiresIn, textTemplate }, key);
8264
8462
  }
8265
8463
  default:
8266
8464
  logger5.warn(`Unsupported component type: ${component.type}. Skipping render.`);
@@ -8317,7 +8515,7 @@ var renderInviteUserComponents = (components, formValues, touchedFields, formErr
8317
8515
  ).filter(Boolean);
8318
8516
 
8319
8517
  // src/components/presentation/auth/SignIn/v2/BaseSignIn.tsx
8320
- import { jsx as jsx64, jsxs as jsxs29 } from "react/jsx-runtime";
8518
+ import { jsx as jsx67, jsxs as jsxs30 } from "react/jsx-runtime";
8321
8519
  var BaseSignInContent2 = ({
8322
8520
  components = [],
8323
8521
  onSubmit,
@@ -8332,15 +8530,17 @@ var BaseSignInContent2 = ({
8332
8530
  isLoading: externalIsLoading,
8333
8531
  children,
8334
8532
  showTitle = true,
8335
- showSubtitle = true
8533
+ showSubtitle = true,
8534
+ additionalData = {},
8535
+ isTimeoutDisabled = false
8336
8536
  }) => {
8337
8537
  const { meta } = useAsgardeo_default();
8338
8538
  const { theme } = useTheme_default();
8339
8539
  const { t } = useTranslation_default();
8340
8540
  const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
8341
8541
  const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
8342
- const [isSubmitting, setIsSubmitting] = useState16(false);
8343
- const [apiError, setApiError] = useState16(null);
8542
+ const [isSubmitting, setIsSubmitting] = useState17(false);
8543
+ const [apiError, setApiError] = useState17(null);
8344
8544
  const isLoading = externalIsLoading || isSubmitting;
8345
8545
  const handleError = useCallback11(
8346
8546
  (error) => {
@@ -8479,8 +8679,10 @@ var BaseSignInContent2 = ({
8479
8679
  isFormValid,
8480
8680
  handleInputChange,
8481
8681
  {
8682
+ additionalData,
8482
8683
  buttonClassName: buttonClasses,
8483
8684
  inputClassName: inputClasses,
8685
+ isTimeoutDisabled,
8484
8686
  meta,
8485
8687
  onInputBlur: handleInputBlur,
8486
8688
  onSubmit: handleSubmit,
@@ -8490,6 +8692,7 @@ var BaseSignInContent2 = ({
8490
8692
  }
8491
8693
  ),
8492
8694
  [
8695
+ additionalData,
8493
8696
  formValues,
8494
8697
  touchedFields,
8495
8698
  formErrors,
@@ -8502,7 +8705,8 @@ var BaseSignInContent2 = ({
8502
8705
  inputClasses,
8503
8706
  buttonClasses,
8504
8707
  handleInputBlur,
8505
- handleSubmit
8708
+ handleSubmit,
8709
+ isTimeoutDisabled
8506
8710
  ]
8507
8711
  );
8508
8712
  if (children) {
@@ -8513,6 +8717,7 @@ var BaseSignInContent2 = ({
8513
8717
  handleInputChange,
8514
8718
  handleSubmit,
8515
8719
  isLoading,
8720
+ isTimeoutDisabled,
8516
8721
  isValid: isFormValid,
8517
8722
  messages: flowMessages || [],
8518
8723
  meta,
@@ -8525,13 +8730,13 @@ var BaseSignInContent2 = ({
8525
8730
  },
8526
8731
  values: formValues
8527
8732
  };
8528
- return /* @__PURE__ */ jsx64("div", { className: containerClasses, "data-testid": "asgardeo-signin", children: children(renderProps) });
8733
+ return /* @__PURE__ */ jsx67("div", { className: containerClasses, "data-testid": "asgardeo-signin", children: children(renderProps) });
8529
8734
  }
8530
8735
  if (isLoading) {
8531
- return /* @__PURE__ */ jsx64(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx64(Card_default.Content, { children: /* @__PURE__ */ jsx64("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx64(Spinner_default, {}) }) }) });
8736
+ return /* @__PURE__ */ jsx67(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsx67("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx67(Spinner_default, {}) }) }) });
8532
8737
  }
8533
8738
  if (!components || components.length === 0) {
8534
- return /* @__PURE__ */ jsx64(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx64(Card_default.Content, { children: /* @__PURE__ */ jsx64(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx64(Typography_default, { variant: "body1", children: t("errors.signin.components.not.available") }) }) }) });
8739
+ return /* @__PURE__ */ jsx67(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsx67(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", children: t("errors.signin.components.not.available") }) }) }) });
8535
8740
  }
8536
8741
  const {
8537
8742
  title: rawTitle,
@@ -8540,46 +8745,46 @@ var BaseSignInContent2 = ({
8540
8745
  } = getAuthComponentHeadings_default(components, flowTitle, flowSubtitle, void 0, void 0);
8541
8746
  const title = resolveVars3(rawTitle, { meta, t });
8542
8747
  const subtitle = resolveVars3(rawSubtitle, { meta, t });
8543
- return /* @__PURE__ */ jsxs29(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: [
8544
- (showTitle || showSubtitle) && /* @__PURE__ */ jsxs29(Card_default.Header, { className: styles.header, children: [
8545
- showTitle && /* @__PURE__ */ jsx64(Card_default.Title, { level: 2, className: styles.title, children: title }),
8546
- showSubtitle && /* @__PURE__ */ jsx64(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
8748
+ return /* @__PURE__ */ jsxs30(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: [
8749
+ (showTitle || showSubtitle) && /* @__PURE__ */ jsxs30(Card_default.Header, { className: styles.header, children: [
8750
+ showTitle && /* @__PURE__ */ jsx67(Card_default.Title, { level: 2, className: styles.title, children: title }),
8751
+ showSubtitle && /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
8547
8752
  ] }),
8548
- /* @__PURE__ */ jsxs29(Card_default.Content, { children: [
8549
- externalError && /* @__PURE__ */ jsx64("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx64(Alert_default, { variant: "error", className: cx20(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx64(Alert_default.Description, { children: externalError.message }) }) }),
8550
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx64("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx64(
8753
+ /* @__PURE__ */ jsxs30(Card_default.Content, { children: [
8754
+ externalError && /* @__PURE__ */ jsx67("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx67(Alert_default, { variant: "error", className: cx20(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx67(Alert_default.Description, { children: externalError.message }) }) }),
8755
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx67("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx67(
8551
8756
  Alert_default,
8552
8757
  {
8553
8758
  variant: message.type === "error" ? "error" : "info",
8554
8759
  className: cx20(styles.flowMessageItem, messageClasses),
8555
- children: /* @__PURE__ */ jsx64(Alert_default.Description, { children: message.message })
8760
+ children: /* @__PURE__ */ jsx67(Alert_default.Description, { children: message.message })
8556
8761
  },
8557
8762
  index
8558
8763
  )) }),
8559
- /* @__PURE__ */ jsx64("div", { className: styles.contentContainer, children: componentsWithoutHeadings && renderComponents(componentsWithoutHeadings) })
8764
+ /* @__PURE__ */ jsx67("div", { className: styles.contentContainer, children: componentsWithoutHeadings && renderComponents(componentsWithoutHeadings) })
8560
8765
  ] })
8561
8766
  ] });
8562
8767
  };
8563
8768
  var BaseSignIn2 = ({ preferences, showLogo = true, ...rest }) => {
8564
8769
  const { theme } = useTheme_default();
8565
8770
  const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
8566
- const content = /* @__PURE__ */ jsxs29("div", { children: [
8567
- showLogo && /* @__PURE__ */ jsx64("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx64(Logo_default, { size: "large" }) }),
8568
- /* @__PURE__ */ jsx64(FlowProvider_default, { children: /* @__PURE__ */ jsx64(BaseSignInContent2, { showLogo, ...rest }) })
8771
+ const content = /* @__PURE__ */ jsxs30("div", { children: [
8772
+ showLogo && /* @__PURE__ */ jsx67("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx67(Logo_default, { size: "large" }) }),
8773
+ /* @__PURE__ */ jsx67(FlowProvider_default, { children: /* @__PURE__ */ jsx67(BaseSignInContent2, { showLogo, ...rest }) })
8569
8774
  ] });
8570
8775
  if (!preferences) return content;
8571
- return /* @__PURE__ */ jsx64(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
8776
+ return /* @__PURE__ */ jsx67(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
8572
8777
  };
8573
8778
  var BaseSignIn_default2 = BaseSignIn2;
8574
8779
 
8575
8780
  // src/components/presentation/auth/SignIn/BaseSignIn.tsx
8576
- import { jsx as jsx65 } from "react/jsx-runtime";
8781
+ import { jsx as jsx68 } from "react/jsx-runtime";
8577
8782
  var BaseSignIn3 = (props) => {
8578
8783
  const { platform } = useAsgardeo_default();
8579
8784
  if (platform === Platform4.AsgardeoV2) {
8580
- return /* @__PURE__ */ jsx65(BaseSignIn_default2, { ...props });
8785
+ return /* @__PURE__ */ jsx68(BaseSignIn_default2, { ...props });
8581
8786
  }
8582
- return /* @__PURE__ */ jsx65(BaseSignIn_default, { ...props });
8787
+ return /* @__PURE__ */ jsx68(BaseSignIn_default, { ...props });
8583
8788
  };
8584
8789
  var BaseSignIn_default3 = BaseSignIn3;
8585
8790
 
@@ -8595,10 +8800,10 @@ import {
8595
8800
  EmbeddedSignInFlowStatusV2 as EmbeddedSignInFlowStatusV22,
8596
8801
  EmbeddedSignInFlowTypeV2
8597
8802
  } from "@asgardeo/browser";
8598
- import { useState as useState17, useEffect as useEffect16, useRef as useRef7 } from "react";
8803
+ import { useState as useState18, useEffect as useEffect17, useRef as useRef7 } from "react";
8599
8804
 
8600
8805
  // src/hooks/v2/useOAuthCallback.ts
8601
- import { useEffect as useEffect15, useRef as useRef6 } from "react";
8806
+ import { useEffect as useEffect16, useRef as useRef6 } from "react";
8602
8807
  function cleanupUrlParams() {
8603
8808
  if (typeof window === "undefined") return;
8604
8809
  const url = new URL(window.location.href);
@@ -8625,7 +8830,7 @@ function useOAuthCallback({
8625
8830
  }) {
8626
8831
  const internalRef = useRef6(false);
8627
8832
  const oauthCodeProcessedRef = processedRef ?? internalRef;
8628
- useEffect15(() => {
8833
+ useEffect16(() => {
8629
8834
  if (!isInitialized || isSubmitting) {
8630
8835
  return;
8631
8836
  }
@@ -8871,7 +9076,7 @@ var handlePasskeyAuthentication = async (challengeData) => {
8871
9076
  };
8872
9077
 
8873
9078
  // src/components/presentation/auth/SignIn/v2/SignIn.tsx
8874
- import { Fragment as Fragment13, jsx as jsx66 } from "react/jsx-runtime";
9079
+ import { Fragment as Fragment16, jsx as jsx69 } from "react/jsx-runtime";
8875
9080
  var SignIn = ({
8876
9081
  className,
8877
9082
  preferences,
@@ -8883,12 +9088,14 @@ var SignIn = ({
8883
9088
  }) => {
8884
9089
  const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading, meta } = useAsgardeo_default();
8885
9090
  const { t } = useTranslation_default(preferences?.i18n);
8886
- const [components, setComponents] = useState17([]);
8887
- const [currentFlowId, setCurrentFlowId] = useState17(null);
8888
- const [isFlowInitialized, setIsFlowInitialized] = useState17(false);
8889
- const [flowError, setFlowError] = useState17(null);
8890
- const [isSubmitting, setIsSubmitting] = useState17(false);
8891
- const [passkeyState, setPasskeyState] = useState17({
9091
+ const [components, setComponents] = useState18([]);
9092
+ const [additionalData, setAdditionalData] = useState18({});
9093
+ const [currentFlowId, setCurrentFlowId] = useState18(null);
9094
+ const [isFlowInitialized, setIsFlowInitialized] = useState18(false);
9095
+ const [flowError, setFlowError] = useState18(null);
9096
+ const [isSubmitting, setIsSubmitting] = useState18(false);
9097
+ const [isTimeoutDisabled, setIsTimeoutDisabled] = useState18(false);
9098
+ const [passkeyState, setPasskeyState] = useState18({
8892
9099
  actionId: null,
8893
9100
  challenge: null,
8894
9101
  creationOptions: null,
@@ -8911,6 +9118,7 @@ var SignIn = ({
8911
9118
  setFlowId(null);
8912
9119
  setIsFlowInitialized(false);
8913
9120
  sessionStorage.removeItem("asgardeo_auth_id");
9121
+ setIsTimeoutDisabled(false);
8914
9122
  oauthCodeProcessedRef.current = false;
8915
9123
  };
8916
9124
  const getUrlParams2 = () => {
@@ -9008,7 +9216,11 @@ var SignIn = ({
9008
9216
  if (handleRedirection(response)) {
9009
9217
  return;
9010
9218
  }
9011
- const { flowId: normalizedFlowId, components: normalizedComponents } = normalizeFlowResponse(
9219
+ const {
9220
+ flowId: normalizedFlowId,
9221
+ components: normalizedComponents,
9222
+ additionalData: normalizedAdditionalData
9223
+ } = normalizeFlowResponse(
9012
9224
  response,
9013
9225
  t,
9014
9226
  {
@@ -9019,7 +9231,9 @@ var SignIn = ({
9019
9231
  if (normalizedFlowId && normalizedComponents) {
9020
9232
  setFlowId(normalizedFlowId);
9021
9233
  setComponents(normalizedComponents);
9234
+ setAdditionalData(normalizedAdditionalData ?? {});
9022
9235
  setIsFlowInitialized(true);
9236
+ setIsTimeoutDisabled(false);
9023
9237
  cleanupFlowUrlParams();
9024
9238
  }
9025
9239
  } catch (error) {
@@ -9030,33 +9244,104 @@ var SignIn = ({
9030
9244
  initializationAttemptedRef.current = false;
9031
9245
  }
9032
9246
  };
9033
- useEffect16(() => {
9247
+ useEffect17(() => {
9034
9248
  const urlParams = getUrlParams2();
9035
9249
  if (urlParams.error) {
9036
9250
  handleOAuthError(urlParams.error, urlParams.errorDescription);
9037
9251
  return;
9038
9252
  }
9039
9253
  handleAuthId(urlParams.authId);
9040
- if (urlParams.code || urlParams.state) {
9041
- return;
9042
- }
9254
+ }, []);
9255
+ useEffect17(() => {
9043
9256
  const currentUrlParams = getUrlParams2();
9044
9257
  if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current && !currentFlowId && !currentUrlParams.code && !currentUrlParams.state && !isSubmitting && !oauthCodeProcessedRef.current) {
9045
9258
  initializationAttemptedRef.current = true;
9046
9259
  initializeFlow();
9047
9260
  }
9048
9261
  }, [isInitialized, isLoading, isFlowInitialized, currentFlowId]);
9262
+ useEffect17(() => {
9263
+ const timeoutMs = Number(additionalData?.["stepTimeout"]) || 0;
9264
+ if (timeoutMs <= 0 || !isFlowInitialized) {
9265
+ setIsTimeoutDisabled(false);
9266
+ return void 0;
9267
+ }
9268
+ const remaining = Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3));
9269
+ const handleTimeout = () => {
9270
+ const errorMessage = t("errors.signin.timeout") || "Time allowed to complete the step has expired.";
9271
+ setError(new Error(errorMessage));
9272
+ setIsTimeoutDisabled(true);
9273
+ };
9274
+ if (remaining <= 0) {
9275
+ handleTimeout();
9276
+ return void 0;
9277
+ }
9278
+ const timerId = setTimeout(() => {
9279
+ handleTimeout();
9280
+ }, remaining * 1e3);
9281
+ return () => clearTimeout(timerId);
9282
+ }, [additionalData?.["stepTimeout"], isFlowInitialized, t]);
9049
9283
  const handleSubmit = async (payload) => {
9050
9284
  const effectiveFlowId = payload.flowId || currentFlowId;
9051
9285
  if (!effectiveFlowId) {
9052
9286
  throw new Error("No active flow ID");
9053
9287
  }
9288
+ const processedInputs = { ...payload.inputs };
9289
+ if (additionalData?.["consentPrompt"]) {
9290
+ try {
9291
+ const consentPromptRawData = additionalData["consentPrompt"];
9292
+ const purposes = typeof consentPromptRawData === "string" ? JSON.parse(consentPromptRawData) : consentPromptRawData.purposes || consentPromptRawData;
9293
+ let isDeny = false;
9294
+ if (payload.action) {
9295
+ const findAction = (comps) => {
9296
+ if (!comps || comps.length === 0) return null;
9297
+ const found = comps.find((c) => c.id === payload.action);
9298
+ if (found) return found;
9299
+ return comps.reduce((acc, c) => {
9300
+ if (acc) return acc;
9301
+ if (c.components) return findAction(c.components);
9302
+ return null;
9303
+ }, null);
9304
+ };
9305
+ const submitAction = findAction(components);
9306
+ if (submitAction && submitAction.variant?.toLowerCase() !== "primary") {
9307
+ isDeny = true;
9308
+ }
9309
+ }
9310
+ const decisions = {
9311
+ purposes: purposes.map((p) => ({
9312
+ approved: !isDeny,
9313
+ elements: [
9314
+ ...(p.essential || []).map((attr) => ({
9315
+ approved: !isDeny,
9316
+ name: attr
9317
+ })),
9318
+ ...(p.optional || []).map((attr) => {
9319
+ const key = `__consent_opt__${p.purpose_id}__${attr}`;
9320
+ return {
9321
+ approved: isDeny ? false : processedInputs[key] !== "false",
9322
+ name: attr
9323
+ };
9324
+ })
9325
+ ],
9326
+ purpose_name: p.purpose_name
9327
+ }))
9328
+ };
9329
+ processedInputs["consent_decisions"] = JSON.stringify(decisions);
9330
+ Object.keys(processedInputs).forEach((key) => {
9331
+ if (key.startsWith("__consent_opt__")) {
9332
+ delete processedInputs[key];
9333
+ }
9334
+ });
9335
+ } catch (e) {
9336
+ }
9337
+ }
9054
9338
  try {
9055
9339
  setIsSubmitting(true);
9056
9340
  setFlowError(null);
9057
9341
  const response = await signIn({
9058
9342
  flowId: effectiveFlowId,
9059
- ...payload
9343
+ ...payload,
9344
+ inputs: processedInputs
9060
9345
  });
9061
9346
  if (handleRedirection(response)) {
9062
9347
  return;
@@ -9076,7 +9361,11 @@ var SignIn = ({
9076
9361
  setIsSubmitting(false);
9077
9362
  return;
9078
9363
  }
9079
- const { flowId: normalizedFlowId, components: normalizedComponents } = normalizeFlowResponse(
9364
+ const {
9365
+ flowId: normalizedFlowId,
9366
+ components: normalizedComponents,
9367
+ additionalData: normalizedAdditionalData
9368
+ } = normalizeFlowResponse(
9080
9369
  response,
9081
9370
  t,
9082
9371
  {
@@ -9116,6 +9405,8 @@ var SignIn = ({
9116
9405
  if (normalizedFlowId && normalizedComponents) {
9117
9406
  setFlowId(normalizedFlowId);
9118
9407
  setComponents(normalizedComponents);
9408
+ setAdditionalData(normalizedAdditionalData ?? {});
9409
+ setIsTimeoutDisabled(false);
9119
9410
  setIsFlowInitialized(true);
9120
9411
  cleanupFlowUrlParams();
9121
9412
  if (response?.failureReason) {
@@ -9147,7 +9438,7 @@ var SignIn = ({
9147
9438
  processedRef: oauthCodeProcessedRef,
9148
9439
  setFlowId
9149
9440
  });
9150
- useEffect16(() => {
9441
+ useEffect17(() => {
9151
9442
  if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.flowId) {
9152
9443
  return;
9153
9444
  }
@@ -9200,21 +9491,25 @@ var SignIn = ({
9200
9491
  }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.flowId]);
9201
9492
  if (children) {
9202
9493
  const renderProps = {
9494
+ additionalData,
9203
9495
  components,
9204
9496
  error: flowError,
9205
9497
  initialize: initializeFlow,
9206
9498
  isInitialized: isFlowInitialized,
9207
9499
  isLoading: isLoading || isSubmitting || !isInitialized,
9500
+ isTimeoutDisabled,
9208
9501
  meta,
9209
9502
  onSubmit: handleSubmit
9210
9503
  };
9211
- return /* @__PURE__ */ jsx66(Fragment13, { children: children(renderProps) });
9504
+ return /* @__PURE__ */ jsx69(Fragment16, { children: children(renderProps) });
9212
9505
  }
9213
- return /* @__PURE__ */ jsx66(
9506
+ return /* @__PURE__ */ jsx69(
9214
9507
  BaseSignIn_default2,
9215
9508
  {
9509
+ additionalData,
9216
9510
  components,
9217
9511
  isLoading: isLoading || !isInitialized || !isFlowInitialized,
9512
+ isTimeoutDisabled,
9218
9513
  onSubmit: handleSubmit,
9219
9514
  onError: handleError,
9220
9515
  error: flowError,
@@ -9228,7 +9523,7 @@ var SignIn = ({
9228
9523
  var SignIn_default = SignIn;
9229
9524
 
9230
9525
  // src/components/presentation/auth/SignIn/SignIn.tsx
9231
- import { jsx as jsx67 } from "react/jsx-runtime";
9526
+ import { jsx as jsx70 } from "react/jsx-runtime";
9232
9527
  var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) => {
9233
9528
  const { signIn, afterSignInUrl, isInitialized, isLoading, platform } = useAsgardeo_default();
9234
9529
  const handleInitialize = async () => await signIn({ response_mode: "direct" });
@@ -9245,7 +9540,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
9245
9540
  }
9246
9541
  };
9247
9542
  if (platform === Platform5.AsgardeoV2) {
9248
- return /* @__PURE__ */ jsx67(
9543
+ return /* @__PURE__ */ jsx70(
9249
9544
  SignIn_default,
9250
9545
  {
9251
9546
  className,
@@ -9258,7 +9553,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
9258
9553
  }
9259
9554
  );
9260
9555
  }
9261
- return /* @__PURE__ */ jsx67(
9556
+ return /* @__PURE__ */ jsx70(
9262
9557
  BaseSignIn_default3,
9263
9558
  {
9264
9559
  isLoading: isLoading || !isInitialized,
@@ -9290,7 +9585,7 @@ import {
9290
9585
  createPackageComponentLogger as createPackageComponentLogger6
9291
9586
  } from "@asgardeo/browser";
9292
9587
  import { cx as cx21 } from "@emotion/css";
9293
- import { useEffect as useEffect17, useState as useState18, useCallback as useCallback12, useRef as useRef8 } from "react";
9588
+ import { useEffect as useEffect18, useState as useState19, useCallback as useCallback12, useRef as useRef8 } from "react";
9294
9589
 
9295
9590
  // src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
9296
9591
  import { EmbeddedFlowComponentType as EmbeddedFlowComponentType2 } from "@asgardeo/browser";
@@ -9352,13 +9647,13 @@ var DateInput = ({
9352
9647
  var DateInput_default = DateInput;
9353
9648
 
9354
9649
  // src/components/adapters/DividerComponent.tsx
9355
- import { jsx as jsx68 } from "react/jsx-runtime";
9650
+ import { jsx as jsx71 } from "react/jsx-runtime";
9356
9651
  var DividerComponent = ({ component }) => {
9357
9652
  const { theme } = useTheme_default();
9358
9653
  const config = component.config || {};
9359
9654
  const text = config["text"] || "";
9360
9655
  const variant = component.variant?.toLowerCase() || "horizontal";
9361
- return /* @__PURE__ */ jsx68(
9656
+ return /* @__PURE__ */ jsx71(
9362
9657
  Divider_default,
9363
9658
  {
9364
9659
  orientation: variant === "vertical" ? "vertical" : "horizontal",
@@ -9399,7 +9694,7 @@ var EmailInput = ({
9399
9694
  var EmailInput_default = EmailInput;
9400
9695
 
9401
9696
  // src/components/adapters/FormContainer.tsx
9402
- import { jsx as jsx69 } from "react/jsx-runtime";
9697
+ import { jsx as jsx72 } from "react/jsx-runtime";
9403
9698
  var FormContainer = (props) => {
9404
9699
  const { component } = props;
9405
9700
  if (component.components && component.components.length > 0) {
@@ -9412,14 +9707,14 @@ var FormContainer = (props) => {
9412
9707
  props.onSubmit(submitButton, props.formValues);
9413
9708
  }
9414
9709
  };
9415
- return /* @__PURE__ */ jsx69("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
9710
+ return /* @__PURE__ */ jsx72("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
9416
9711
  (childComponent) => createSignUpComponent({
9417
9712
  ...props,
9418
9713
  component: childComponent
9419
9714
  })
9420
9715
  ) }, component.id);
9421
9716
  }
9422
- return /* @__PURE__ */ jsx69("div", {}, component.id);
9717
+ return /* @__PURE__ */ jsx72("div", {}, component.id);
9423
9718
  };
9424
9719
  var FormContainer_default = FormContainer;
9425
9720
 
@@ -9545,7 +9840,7 @@ var SelectInput = ({
9545
9840
  var SelectInput_default = SelectInput;
9546
9841
 
9547
9842
  // src/components/adapters/SubmitButton.tsx
9548
- import { jsx as jsx70 } from "react/jsx-runtime";
9843
+ import { jsx as jsx73 } from "react/jsx-runtime";
9549
9844
  var ButtonComponent = ({
9550
9845
  component,
9551
9846
  isLoading,
@@ -9579,7 +9874,7 @@ var ButtonComponent = ({
9579
9874
  onSubmit(component);
9580
9875
  }
9581
9876
  };
9582
- return /* @__PURE__ */ jsx70(
9877
+ return /* @__PURE__ */ jsx73(
9583
9878
  Button_default,
9584
9879
  {
9585
9880
  type: buttonType === "submit" ? "submit" : "button",
@@ -9590,7 +9885,7 @@ var ButtonComponent = ({
9590
9885
  onClick: buttonType !== "submit" ? handleClick : void 0,
9591
9886
  className: buttonClassName,
9592
9887
  style: { width: "100%" },
9593
- children: isLoading ? /* @__PURE__ */ jsx70(Spinner_default, { size: "small" }) : buttonText
9888
+ children: isLoading ? /* @__PURE__ */ jsx73(Spinner_default, { size: "small" }) : buttonText
9594
9889
  },
9595
9890
  component.id
9596
9891
  );
@@ -9598,7 +9893,7 @@ var ButtonComponent = ({
9598
9893
  var SubmitButton_default = ButtonComponent;
9599
9894
 
9600
9895
  // src/components/adapters/TelephoneInput.tsx
9601
- import { jsx as jsx71 } from "react/jsx-runtime";
9896
+ import { jsx as jsx74 } from "react/jsx-runtime";
9602
9897
  var TelephoneInput = ({
9603
9898
  component,
9604
9899
  formValues,
@@ -9611,7 +9906,7 @@ var TelephoneInput = ({
9611
9906
  const fieldName = config["identifier"] || config["name"] || component.id;
9612
9907
  const value = formValues[fieldName] || "";
9613
9908
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
9614
- return /* @__PURE__ */ jsx71(
9909
+ return /* @__PURE__ */ jsx74(
9615
9910
  TextField_default,
9616
9911
  {
9617
9912
  name: fieldName,
@@ -9659,7 +9954,7 @@ var TextInput = ({
9659
9954
  var TextInput_default = TextInput;
9660
9955
 
9661
9956
  // src/components/adapters/Typography.tsx
9662
- import { jsx as jsx72 } from "react/jsx-runtime";
9957
+ import { jsx as jsx75 } from "react/jsx-runtime";
9663
9958
  var TypographyComponent = ({ component }) => {
9664
9959
  const { theme } = useTheme_default();
9665
9960
  const config = component.config || {};
@@ -9700,7 +9995,7 @@ var TypographyComponent = ({ component }) => {
9700
9995
  default:
9701
9996
  typographyVariant = "body1";
9702
9997
  }
9703
- return /* @__PURE__ */ jsx72(
9998
+ return /* @__PURE__ */ jsx75(
9704
9999
  Typography_default,
9705
10000
  {
9706
10001
  variant: typographyVariant,
@@ -9713,69 +10008,69 @@ var TypographyComponent = ({ component }) => {
9713
10008
  var Typography_default2 = TypographyComponent;
9714
10009
 
9715
10010
  // src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
9716
- import { jsx as jsx73 } from "react/jsx-runtime";
10011
+ import { jsx as jsx76 } from "react/jsx-runtime";
9717
10012
  var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
9718
10013
  switch (component.type) {
9719
10014
  case EmbeddedFlowComponentType2.Typography:
9720
- return /* @__PURE__ */ jsx73(Typography_default2, { component, onSubmit, ...rest });
10015
+ return /* @__PURE__ */ jsx76(Typography_default2, { component, onSubmit, ...rest });
9721
10016
  case EmbeddedFlowComponentType2.Input: {
9722
10017
  const inputVariant = component.variant?.toUpperCase();
9723
10018
  const inputType = component.config["type"]?.toLowerCase();
9724
10019
  if (inputVariant === "EMAIL" || inputType === "email") {
9725
- return /* @__PURE__ */ jsx73(EmailInput_default, { component, onSubmit, ...rest });
10020
+ return /* @__PURE__ */ jsx76(EmailInput_default, { component, onSubmit, ...rest });
9726
10021
  }
9727
10022
  if (inputVariant === "PASSWORD" || inputType === "password") {
9728
- return /* @__PURE__ */ jsx73(PasswordInput_default, { component, onSubmit, ...rest });
10023
+ return /* @__PURE__ */ jsx76(PasswordInput_default, { component, onSubmit, ...rest });
9729
10024
  }
9730
10025
  if (inputVariant === "TELEPHONE" || inputType === "tel") {
9731
- return /* @__PURE__ */ jsx73(TelephoneInput_default, { component, onSubmit, ...rest });
10026
+ return /* @__PURE__ */ jsx76(TelephoneInput_default, { component, onSubmit, ...rest });
9732
10027
  }
9733
10028
  if (inputVariant === "NUMBER" || inputType === "number") {
9734
- return /* @__PURE__ */ jsx73(NumberInput_default, { component, onSubmit, ...rest });
10029
+ return /* @__PURE__ */ jsx76(NumberInput_default, { component, onSubmit, ...rest });
9735
10030
  }
9736
10031
  if (inputVariant === "DATE" || inputType === "date") {
9737
- return /* @__PURE__ */ jsx73(DateInput_default, { component, onSubmit, ...rest });
10032
+ return /* @__PURE__ */ jsx76(DateInput_default, { component, onSubmit, ...rest });
9738
10033
  }
9739
10034
  if (inputVariant === "CHECKBOX" || inputType === "checkbox") {
9740
- return /* @__PURE__ */ jsx73(CheckboxInput_default, { component, onSubmit, ...rest });
10035
+ return /* @__PURE__ */ jsx76(CheckboxInput_default, { component, onSubmit, ...rest });
9741
10036
  }
9742
- return /* @__PURE__ */ jsx73(TextInput_default, { component, onSubmit, ...rest });
10037
+ return /* @__PURE__ */ jsx76(TextInput_default, { component, onSubmit, ...rest });
9743
10038
  }
9744
10039
  case EmbeddedFlowComponentType2.Button: {
9745
10040
  const buttonVariant = component.variant?.toUpperCase();
9746
10041
  const buttonText = component.config["text"] || component.config["label"] || "";
9747
10042
  if (buttonVariant === "SOCIAL") {
9748
10043
  if (buttonText.toLowerCase().includes("google")) {
9749
- return /* @__PURE__ */ jsx73(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10044
+ return /* @__PURE__ */ jsx76(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9750
10045
  }
9751
10046
  if (buttonText.toLowerCase().includes("github")) {
9752
- return /* @__PURE__ */ jsx73(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10047
+ return /* @__PURE__ */ jsx76(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9753
10048
  }
9754
10049
  if (buttonText.toLowerCase().includes("microsoft")) {
9755
- return /* @__PURE__ */ jsx73(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10050
+ return /* @__PURE__ */ jsx76(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9756
10051
  }
9757
10052
  if (buttonText.toLowerCase().includes("facebook")) {
9758
- return /* @__PURE__ */ jsx73(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10053
+ return /* @__PURE__ */ jsx76(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9759
10054
  }
9760
10055
  if (buttonText.toLowerCase().includes("linkedin")) {
9761
- return /* @__PURE__ */ jsx73(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10056
+ return /* @__PURE__ */ jsx76(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9762
10057
  }
9763
10058
  if (buttonText.toLowerCase().includes("ethereum")) {
9764
- return /* @__PURE__ */ jsx73(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10059
+ return /* @__PURE__ */ jsx76(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9765
10060
  }
9766
10061
  }
9767
- return /* @__PURE__ */ jsx73(SubmitButton_default, { component, onSubmit, ...rest });
10062
+ return /* @__PURE__ */ jsx76(SubmitButton_default, { component, onSubmit, ...rest });
9768
10063
  }
9769
10064
  case EmbeddedFlowComponentType2.Form:
9770
- return /* @__PURE__ */ jsx73(FormContainer_default, { component, onSubmit, ...rest });
10065
+ return /* @__PURE__ */ jsx76(FormContainer_default, { component, onSubmit, ...rest });
9771
10066
  case EmbeddedFlowComponentType2.Select:
9772
- return /* @__PURE__ */ jsx73(SelectInput_default, { component, onSubmit, ...rest });
10067
+ return /* @__PURE__ */ jsx76(SelectInput_default, { component, onSubmit, ...rest });
9773
10068
  case EmbeddedFlowComponentType2.Divider:
9774
- return /* @__PURE__ */ jsx73(DividerComponent_default, { component, onSubmit, ...rest });
10069
+ return /* @__PURE__ */ jsx76(DividerComponent_default, { component, onSubmit, ...rest });
9775
10070
  case EmbeddedFlowComponentType2.Image:
9776
- return /* @__PURE__ */ jsx73(ImageComponent_default, { component, onSubmit, ...rest });
10071
+ return /* @__PURE__ */ jsx76(ImageComponent_default, { component, onSubmit, ...rest });
9777
10072
  default:
9778
- return /* @__PURE__ */ jsx73("div", {});
10073
+ return /* @__PURE__ */ jsx76("div", {});
9779
10074
  }
9780
10075
  };
9781
10076
  var createSignUpOptionFromComponent = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => createSignUpComponent({
@@ -9944,7 +10239,7 @@ var useStyles17 = (theme, colorScheme) => useMemo25(() => {
9944
10239
  var BaseSignUp_styles_default = useStyles17;
9945
10240
 
9946
10241
  // src/components/presentation/auth/SignUp/v1/BaseSignUp.tsx
9947
- import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
10242
+ import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
9948
10243
  var logger6 = createPackageComponentLogger6(
9949
10244
  "@asgardeo/react",
9950
10245
  "BaseSignUp"
@@ -10006,9 +10301,9 @@ var BaseSignUpContent = ({
10006
10301
  },
10007
10302
  [t, addMessage, clearMessages]
10008
10303
  );
10009
- const [isLoading, setIsLoading] = useState18(false);
10010
- const [isFlowInitialized, setIsFlowInitialized] = useState18(false);
10011
- const [currentFlow, setCurrentFlow] = useState18(null);
10304
+ const [isLoading, setIsLoading] = useState19(false);
10305
+ const [isFlowInitialized, setIsFlowInitialized] = useState19(false);
10306
+ const [currentFlow, setCurrentFlow] = useState19(null);
10012
10307
  const initializationAttemptedRef = useRef8(false);
10013
10308
  const extractFormFields = useCallback12(
10014
10309
  (components) => {
@@ -10295,7 +10590,7 @@ var BaseSignUpContent = ({
10295
10590
  handleSubmit
10296
10591
  ]
10297
10592
  );
10298
- useEffect17(() => {
10593
+ useEffect18(() => {
10299
10594
  if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
10300
10595
  initializationAttemptedRef.current = true;
10301
10596
  (async () => {
@@ -10347,42 +10642,42 @@ var BaseSignUpContent = ({
10347
10642
  validateForm,
10348
10643
  values: formValues
10349
10644
  };
10350
- return /* @__PURE__ */ jsx74("div", { className: containerClasses, children: children(renderProps) });
10645
+ return /* @__PURE__ */ jsx77("div", { className: containerClasses, children: children(renderProps) });
10351
10646
  }
10352
10647
  if (!isFlowInitialized && isLoading) {
10353
- return /* @__PURE__ */ jsx74(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx74(Card_default.Content, { children: /* @__PURE__ */ jsx74("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx74(Spinner_default, { size: "medium" }) }) }) });
10648
+ return /* @__PURE__ */ jsx77(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx77(Card_default.Content, { children: /* @__PURE__ */ jsx77("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx77(Spinner_default, { size: "medium" }) }) }) });
10354
10649
  }
10355
10650
  if (!currentFlow) {
10356
- return /* @__PURE__ */ jsx74(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx74(Card_default.Content, { children: /* @__PURE__ */ jsxs30(Alert_default, { variant: "error", className: errorClasses, children: [
10357
- /* @__PURE__ */ jsx74(Alert_default.Title, { children: t("errors.heading") }),
10358
- /* @__PURE__ */ jsx74(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
10651
+ return /* @__PURE__ */ jsx77(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx77(Card_default.Content, { children: /* @__PURE__ */ jsxs31(Alert_default, { variant: "error", className: errorClasses, children: [
10652
+ /* @__PURE__ */ jsx77(Alert_default.Title, { children: t("errors.heading") }),
10653
+ /* @__PURE__ */ jsx77(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
10359
10654
  ] }) }) });
10360
10655
  }
10361
- return /* @__PURE__ */ jsxs30(Card_default, { className: cx21(containerClasses, styles.card), variant, children: [
10362
- (showTitle || showSubtitle) && /* @__PURE__ */ jsxs30(Card_default.Header, { className: styles.header, children: [
10363
- showTitle && /* @__PURE__ */ jsx74(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.heading") }),
10364
- showSubtitle && /* @__PURE__ */ jsx74(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subheading") })
10656
+ return /* @__PURE__ */ jsxs31(Card_default, { className: cx21(containerClasses, styles.card), variant, children: [
10657
+ (showTitle || showSubtitle) && /* @__PURE__ */ jsxs31(Card_default.Header, { className: styles.header, children: [
10658
+ showTitle && /* @__PURE__ */ jsx77(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.heading") }),
10659
+ showSubtitle && /* @__PURE__ */ jsx77(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subheading") })
10365
10660
  ] }),
10366
- /* @__PURE__ */ jsxs30(Card_default.Content, { children: [
10367
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx74("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx74(
10661
+ /* @__PURE__ */ jsxs31(Card_default.Content, { children: [
10662
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx77("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx77(
10368
10663
  Alert_default,
10369
10664
  {
10370
10665
  variant: message.type?.toLowerCase() === "error" ? "error" : "info",
10371
10666
  className: cx21(styles.flowMessageItem, messageClasses),
10372
- children: /* @__PURE__ */ jsx74(Alert_default.Description, { children: message.message })
10667
+ children: /* @__PURE__ */ jsx77(Alert_default.Description, { children: message.message })
10373
10668
  },
10374
10669
  message.id || index
10375
10670
  )) }),
10376
- /* @__PURE__ */ jsx74("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx74(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx74(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
10671
+ /* @__PURE__ */ jsx77("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx77(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx77(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
10377
10672
  ] })
10378
10673
  ] });
10379
10674
  };
10380
10675
  var BaseSignUp = ({ showLogo = true, ...rest }) => {
10381
10676
  const { theme, colorScheme } = useTheme_default();
10382
10677
  const styles = BaseSignUp_styles_default(theme, colorScheme);
10383
- return /* @__PURE__ */ jsxs30("div", { children: [
10384
- showLogo && /* @__PURE__ */ jsx74("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx74(Logo_default, { size: "large" }) }),
10385
- /* @__PURE__ */ jsx74(FlowProvider_default, { children: /* @__PURE__ */ jsx74(BaseSignUpContent, { showLogo, ...rest }) })
10678
+ return /* @__PURE__ */ jsxs31("div", { children: [
10679
+ showLogo && /* @__PURE__ */ jsx77("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx77(Logo_default, { size: "large" }) }),
10680
+ /* @__PURE__ */ jsx77(FlowProvider_default, { children: /* @__PURE__ */ jsx77(BaseSignUpContent, { showLogo, ...rest }) })
10386
10681
  ] });
10387
10682
  };
10388
10683
  var BaseSignUp_default = BaseSignUp;
@@ -10396,8 +10691,8 @@ import {
10396
10691
  createPackageComponentLogger as createPackageComponentLogger7
10397
10692
  } from "@asgardeo/browser";
10398
10693
  import { cx as cx22 } from "@emotion/css";
10399
- import { useEffect as useEffect18, useState as useState19, useCallback as useCallback13, useRef as useRef9 } from "react";
10400
- import { jsx as jsx75, jsxs as jsxs31 } from "react/jsx-runtime";
10694
+ import { useEffect as useEffect19, useState as useState20, useCallback as useCallback13, useRef as useRef9 } from "react";
10695
+ import { jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
10401
10696
  var logger7 = createPackageComponentLogger7(
10402
10697
  "@asgardeo/react",
10403
10698
  "BaseSignUp"
@@ -10427,11 +10722,11 @@ var BaseSignUpContent2 = ({
10427
10722
  const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
10428
10723
  const { meta } = useAsgardeo_default();
10429
10724
  const styles = BaseSignUp_styles_default(theme, colorScheme);
10430
- const [isLoading, setIsLoading] = useState19(false);
10431
- const [isFlowInitialized, setIsFlowInitialized] = useState19(false);
10432
- const [currentFlow, setCurrentFlow] = useState19(null);
10433
- const [apiError, setApiError] = useState19(null);
10434
- const [passkeyState, setPasskeyState] = useState19({
10725
+ const [isLoading, setIsLoading] = useState20(false);
10726
+ const [isFlowInitialized, setIsFlowInitialized] = useState20(false);
10727
+ const [currentFlow, setCurrentFlow] = useState20(null);
10728
+ const [apiError, setApiError] = useState20(null);
10729
+ const [passkeyState, setPasskeyState] = useState20({
10435
10730
  actionId: null,
10436
10731
  creationOptions: null,
10437
10732
  error: null,
@@ -10732,7 +11027,7 @@ var BaseSignUpContent2 = ({
10732
11027
  setIsLoading(false);
10733
11028
  }
10734
11029
  };
10735
- useEffect18(() => {
11030
+ useEffect19(() => {
10736
11031
  if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.flowId) {
10737
11032
  return;
10738
11033
  }
@@ -10838,7 +11133,7 @@ var BaseSignUpContent2 = ({
10838
11133
  state: urlParams.get("state")
10839
11134
  };
10840
11135
  };
10841
- useEffect18(() => {
11136
+ useEffect19(() => {
10842
11137
  const urlParams = getUrlParams2();
10843
11138
  if (urlParams.code || urlParams.state) {
10844
11139
  return;
@@ -10901,15 +11196,15 @@ var BaseSignUpContent2 = ({
10901
11196
  },
10902
11197
  values: formValues
10903
11198
  };
10904
- return /* @__PURE__ */ jsx75("div", { className: containerClasses, children: children(renderProps) });
11199
+ return /* @__PURE__ */ jsx78("div", { className: containerClasses, children: children(renderProps) });
10905
11200
  }
10906
11201
  if (!isFlowInitialized && isLoading) {
10907
- return /* @__PURE__ */ jsx75(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx75(Card_default.Content, { children: /* @__PURE__ */ jsx75("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx75(Spinner_default, { size: "medium" }) }) }) });
11202
+ return /* @__PURE__ */ jsx78(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx78(Card_default.Content, { children: /* @__PURE__ */ jsx78("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx78(Spinner_default, { size: "medium" }) }) }) });
10908
11203
  }
10909
11204
  if (!currentFlow) {
10910
- return /* @__PURE__ */ jsx75(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx75(Card_default.Content, { children: /* @__PURE__ */ jsxs31(Alert_default, { variant: "error", className: errorClasses, children: [
10911
- /* @__PURE__ */ jsx75(Alert_default.Title, { children: t("errors.heading") }),
10912
- /* @__PURE__ */ jsx75(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
11205
+ return /* @__PURE__ */ jsx78(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx78(Card_default.Content, { children: /* @__PURE__ */ jsxs32(Alert_default, { variant: "error", className: errorClasses, children: [
11206
+ /* @__PURE__ */ jsx78(Alert_default.Title, { children: t("errors.heading") }),
11207
+ /* @__PURE__ */ jsx78(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
10913
11208
  ] }) }) });
10914
11209
  }
10915
11210
  const componentsToRender = currentFlow.data?.components || [];
@@ -10920,46 +11215,46 @@ var BaseSignUpContent2 = ({
10920
11215
  t("signup.heading"),
10921
11216
  t("signup.subheading")
10922
11217
  );
10923
- return /* @__PURE__ */ jsxs31(Card_default, { className: cx22(containerClasses, styles.card), variant, children: [
10924
- (showTitle || showSubtitle) && /* @__PURE__ */ jsxs31(Card_default.Header, { className: styles.header, children: [
10925
- showTitle && /* @__PURE__ */ jsx75(Card_default.Title, { level: 2, className: styles.title, children: title }),
10926
- showSubtitle && /* @__PURE__ */ jsx75(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11218
+ return /* @__PURE__ */ jsxs32(Card_default, { className: cx22(containerClasses, styles.card), variant, children: [
11219
+ (showTitle || showSubtitle) && /* @__PURE__ */ jsxs32(Card_default.Header, { className: styles.header, children: [
11220
+ showTitle && /* @__PURE__ */ jsx78(Card_default.Title, { level: 2, className: styles.title, children: title }),
11221
+ showSubtitle && /* @__PURE__ */ jsx78(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
10927
11222
  ] }),
10928
- /* @__PURE__ */ jsxs31(Card_default.Content, { children: [
10929
- externalError && /* @__PURE__ */ jsx75("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx75(Alert_default, { variant: "error", className: cx22(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx75(Alert_default.Description, { children: externalError.message }) }) }),
10930
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx75("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx75(
11223
+ /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11224
+ externalError && /* @__PURE__ */ jsx78("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx78(Alert_default, { variant: "error", className: cx22(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx78(Alert_default.Description, { children: externalError.message }) }) }),
11225
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx78("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx78(
10931
11226
  Alert_default,
10932
11227
  {
10933
11228
  variant: message.type?.toLowerCase() === "error" ? "error" : "info",
10934
11229
  className: cx22(styles.flowMessageItem, messageClasses),
10935
- children: /* @__PURE__ */ jsx75(Alert_default.Description, { children: message.message })
11230
+ children: /* @__PURE__ */ jsx78(Alert_default.Description, { children: message.message })
10936
11231
  },
10937
11232
  message.id || index
10938
11233
  )) }),
10939
- /* @__PURE__ */ jsx75("div", { className: styles.contentContainer, children: componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : /* @__PURE__ */ jsx75(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx75(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
11234
+ /* @__PURE__ */ jsx78("div", { className: styles.contentContainer, children: componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : /* @__PURE__ */ jsx78(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx78(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
10940
11235
  ] })
10941
11236
  ] });
10942
11237
  };
10943
11238
  var BaseSignUp2 = ({ preferences, showLogo = true, ...rest }) => {
10944
11239
  const { theme, colorScheme } = useTheme_default();
10945
11240
  const styles = BaseSignUp_styles_default(theme, colorScheme);
10946
- const content = /* @__PURE__ */ jsxs31("div", { children: [
10947
- showLogo && /* @__PURE__ */ jsx75("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx75(Logo_default, { size: "large" }) }),
10948
- /* @__PURE__ */ jsx75(FlowProvider_default, { children: /* @__PURE__ */ jsx75(BaseSignUpContent2, { showLogo, ...rest }) })
11241
+ const content = /* @__PURE__ */ jsxs32("div", { children: [
11242
+ showLogo && /* @__PURE__ */ jsx78("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx78(Logo_default, { size: "large" }) }),
11243
+ /* @__PURE__ */ jsx78(FlowProvider_default, { children: /* @__PURE__ */ jsx78(BaseSignUpContent2, { showLogo, ...rest }) })
10949
11244
  ] });
10950
11245
  if (!preferences) return content;
10951
- return /* @__PURE__ */ jsx75(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
11246
+ return /* @__PURE__ */ jsx78(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
10952
11247
  };
10953
11248
  var BaseSignUp_default2 = BaseSignUp2;
10954
11249
 
10955
11250
  // src/components/presentation/auth/SignUp/BaseSignUp.tsx
10956
- import { jsx as jsx76 } from "react/jsx-runtime";
11251
+ import { jsx as jsx79 } from "react/jsx-runtime";
10957
11252
  var BaseSignUp3 = (props) => {
10958
11253
  const { platform } = useAsgardeo_default();
10959
11254
  if (platform === Platform6.AsgardeoV2) {
10960
- return /* @__PURE__ */ jsx76(BaseSignUp_default2, { ...props });
11255
+ return /* @__PURE__ */ jsx79(BaseSignUp_default2, { ...props });
10961
11256
  }
10962
- return /* @__PURE__ */ jsx76(BaseSignUp_default, { ...props });
11257
+ return /* @__PURE__ */ jsx79(BaseSignUp_default, { ...props });
10963
11258
  };
10964
11259
  var BaseSignUp_default3 = BaseSignUp3;
10965
11260
 
@@ -10971,7 +11266,7 @@ import {
10971
11266
  EmbeddedFlowResponseType as EmbeddedFlowResponseType3,
10972
11267
  EmbeddedFlowType as EmbeddedFlowType2
10973
11268
  } from "@asgardeo/browser";
10974
- import { jsx as jsx77 } from "react/jsx-runtime";
11269
+ import { jsx as jsx80 } from "react/jsx-runtime";
10975
11270
  var SignUp = ({
10976
11271
  className,
10977
11272
  size = "medium",
@@ -11000,7 +11295,7 @@ var SignUp = ({
11000
11295
  window.location.href = response.data.redirectURL;
11001
11296
  }
11002
11297
  };
11003
- return /* @__PURE__ */ jsx77(
11298
+ return /* @__PURE__ */ jsx80(
11004
11299
  BaseSignUp_default,
11005
11300
  {
11006
11301
  afterSignUpUrl,
@@ -11026,7 +11321,7 @@ import {
11026
11321
  EmbeddedFlowResponseType as EmbeddedFlowResponseType4,
11027
11322
  EmbeddedFlowType as EmbeddedFlowType3
11028
11323
  } from "@asgardeo/browser";
11029
- import { jsx as jsx78 } from "react/jsx-runtime";
11324
+ import { jsx as jsx81 } from "react/jsx-runtime";
11030
11325
  var SignUp2 = ({
11031
11326
  className,
11032
11327
  size = "medium",
@@ -11064,7 +11359,7 @@ var SignUp2 = ({
11064
11359
  window.location.href = response.data.redirectURL;
11065
11360
  }
11066
11361
  };
11067
- return /* @__PURE__ */ jsx78(
11362
+ return /* @__PURE__ */ jsx81(
11068
11363
  BaseSignUp_default2,
11069
11364
  {
11070
11365
  afterSignUpUrl,
@@ -11086,13 +11381,13 @@ var SignUp2 = ({
11086
11381
  var SignUp_default2 = SignUp2;
11087
11382
 
11088
11383
  // src/components/presentation/auth/SignUp/SignUp.tsx
11089
- import { jsx as jsx79 } from "react/jsx-runtime";
11384
+ import { jsx as jsx82 } from "react/jsx-runtime";
11090
11385
  var SignUp3 = (props) => {
11091
11386
  const { platform } = useAsgardeo_default();
11092
11387
  if (platform === Platform7.AsgardeoV2) {
11093
- return /* @__PURE__ */ jsx79(SignUp_default2, { ...props });
11388
+ return /* @__PURE__ */ jsx82(SignUp_default2, { ...props });
11094
11389
  }
11095
- return /* @__PURE__ */ jsx79(SignUp_default, { ...props });
11390
+ return /* @__PURE__ */ jsx82(SignUp_default, { ...props });
11096
11391
  };
11097
11392
  var SignUp_default3 = SignUp3;
11098
11393
 
@@ -11102,7 +11397,7 @@ import { EmbeddedFlowType as EmbeddedFlowType5 } from "@asgardeo/browser";
11102
11397
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
11103
11398
  import { EmbeddedFlowType as EmbeddedFlowType4 } from "@asgardeo/browser";
11104
11399
  import { cx as cx23 } from "@emotion/css";
11105
- import { useCallback as useCallback14, useEffect as useEffect19, useRef as useRef10, useState as useState20 } from "react";
11400
+ import { useCallback as useCallback14, useEffect as useEffect20, useRef as useRef10, useState as useState21 } from "react";
11106
11401
 
11107
11402
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.ts
11108
11403
  import { css as css19 } from "@emotion/css";
@@ -11145,7 +11440,7 @@ var useStyles18 = (theme, colorScheme) => useMemo26(() => {
11145
11440
  var BaseInviteUser_styles_default = useStyles18;
11146
11441
 
11147
11442
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
11148
- import { jsx as jsx80, jsxs as jsxs32 } from "react/jsx-runtime";
11443
+ import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
11149
11444
  var BaseInviteUser = ({
11150
11445
  onInitialize,
11151
11446
  onSubmit,
@@ -11165,16 +11460,16 @@ var BaseInviteUser = ({
11165
11460
  const { t } = useTranslation_default(preferences?.i18n);
11166
11461
  const { theme } = useTheme_default();
11167
11462
  const styles = BaseInviteUser_styles_default(theme, theme.vars.colors.text.primary);
11168
- const [isLoading, setIsLoading] = useState20(false);
11169
- const [isFlowInitialized, setIsFlowInitialized] = useState20(false);
11170
- const [currentFlow, setCurrentFlow] = useState20(null);
11171
- const [apiError, setApiError] = useState20(null);
11172
- const [formValues, setFormValues] = useState20({});
11173
- const [formErrors, setFormErrors] = useState20({});
11174
- const [touchedFields, setTouchedFields] = useState20({});
11175
- const [inviteLink, setInviteLink] = useState20();
11176
- const [inviteLinkCopied, setInviteLinkCopied] = useState20(false);
11177
- const [isFormValid, setIsFormValid] = useState20(true);
11463
+ const [isLoading, setIsLoading] = useState21(false);
11464
+ const [isFlowInitialized, setIsFlowInitialized] = useState21(false);
11465
+ const [currentFlow, setCurrentFlow] = useState21(null);
11466
+ const [apiError, setApiError] = useState21(null);
11467
+ const [formValues, setFormValues] = useState21({});
11468
+ const [formErrors, setFormErrors] = useState21({});
11469
+ const [touchedFields, setTouchedFields] = useState21({});
11470
+ const [inviteLink, setInviteLink] = useState21();
11471
+ const [inviteLinkCopied, setInviteLinkCopied] = useState21(false);
11472
+ const [isFormValid, setIsFormValid] = useState21(true);
11178
11473
  const initializationAttemptedRef = useRef10(false);
11179
11474
  const handleError = useCallback14(
11180
11475
  (error) => {
@@ -11338,7 +11633,7 @@ var BaseInviteUser = ({
11338
11633
  setInviteLinkCopied(false);
11339
11634
  initializationAttemptedRef.current = false;
11340
11635
  }, []);
11341
- useEffect19(() => {
11636
+ useEffect20(() => {
11342
11637
  if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
11343
11638
  initializationAttemptedRef.current = true;
11344
11639
  (async () => {
@@ -11365,7 +11660,7 @@ var BaseInviteUser = ({
11365
11660
  })();
11366
11661
  }
11367
11662
  }, [isInitialized, isFlowInitialized, onInitialize, onFlowChange, handleError, normalizeFlowResponseLocal]);
11368
- useEffect19(() => {
11663
+ useEffect20(() => {
11369
11664
  if (currentFlow && isFlowInitialized) {
11370
11665
  const components2 = currentFlow.data?.components || [];
11371
11666
  if (components2.length > 0) {
@@ -11449,28 +11744,28 @@ var BaseInviteUser = ({
11449
11744
  values: formValues
11450
11745
  };
11451
11746
  if (children) {
11452
- return /* @__PURE__ */ jsx80("div", { className, children: children(renderProps) });
11747
+ return /* @__PURE__ */ jsx83("div", { className, children: children(renderProps) });
11453
11748
  }
11454
11749
  if (!isInitialized) {
11455
- return /* @__PURE__ */ jsx80(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx80(Card_default.Content, { children: /* @__PURE__ */ jsx80("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx80(Spinner_default, { size: "medium" }) }) }) });
11750
+ return /* @__PURE__ */ jsx83(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx83(Card_default.Content, { children: /* @__PURE__ */ jsx83("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx83(Spinner_default, { size: "medium" }) }) }) });
11456
11751
  }
11457
11752
  if (!isFlowInitialized && isLoading) {
11458
- return /* @__PURE__ */ jsx80(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx80(Card_default.Content, { children: /* @__PURE__ */ jsx80("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx80(Spinner_default, { size: "medium" }) }) }) });
11753
+ return /* @__PURE__ */ jsx83(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx83(Card_default.Content, { children: /* @__PURE__ */ jsx83("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx83(Spinner_default, { size: "medium" }) }) }) });
11459
11754
  }
11460
11755
  if (!currentFlow && apiError) {
11461
- return /* @__PURE__ */ jsx80(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx80(Card_default.Content, { children: /* @__PURE__ */ jsxs32(Alert_default, { variant: "error", children: [
11462
- /* @__PURE__ */ jsx80(Alert_default.Title, { children: "Error" }),
11463
- /* @__PURE__ */ jsx80(Alert_default.Description, { children: apiError.message })
11756
+ return /* @__PURE__ */ jsx83(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx83(Card_default.Content, { children: /* @__PURE__ */ jsxs33(Alert_default, { variant: "error", children: [
11757
+ /* @__PURE__ */ jsx83(Alert_default.Title, { children: "Error" }),
11758
+ /* @__PURE__ */ jsx83(Alert_default.Description, { children: apiError.message })
11464
11759
  ] }) }) });
11465
11760
  }
11466
11761
  if (isInviteGenerated && inviteLink) {
11467
- return /* @__PURE__ */ jsxs32(Card_default, { className: cx23(className, styles.card), variant, children: [
11468
- /* @__PURE__ */ jsx80(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx80(Card_default.Title, { level: 2, className: styles.title, children: "Invite Link Generated!" }) }),
11469
- /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11470
- /* @__PURE__ */ jsx80(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx80(Alert_default.Description, { children: "Share this link with the user to complete their registration." }) }),
11471
- /* @__PURE__ */ jsxs32("div", { style: { marginTop: "1rem" }, children: [
11472
- /* @__PURE__ */ jsx80(Typography_default, { variant: "body2", style: { marginBottom: "0.5rem" }, children: "Invite Link" }),
11473
- /* @__PURE__ */ jsxs32(
11762
+ return /* @__PURE__ */ jsxs33(Card_default, { className: cx23(className, styles.card), variant, children: [
11763
+ /* @__PURE__ */ jsx83(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx83(Card_default.Title, { level: 2, className: styles.title, children: "Invite Link Generated!" }) }),
11764
+ /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11765
+ /* @__PURE__ */ jsx83(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx83(Alert_default.Description, { children: "Share this link with the user to complete their registration." }) }),
11766
+ /* @__PURE__ */ jsxs33("div", { style: { marginTop: "1rem" }, children: [
11767
+ /* @__PURE__ */ jsx83(Typography_default, { variant: "body2", style: { marginBottom: "0.5rem" }, children: "Invite Link" }),
11768
+ /* @__PURE__ */ jsxs33(
11474
11769
  "div",
11475
11770
  {
11476
11771
  style: {
@@ -11483,26 +11778,26 @@ var BaseInviteUser = ({
11483
11778
  wordBreak: "break-all"
11484
11779
  },
11485
11780
  children: [
11486
- /* @__PURE__ */ jsx80(Typography_default, { variant: "body2", style: { flex: 1 }, children: inviteLink }),
11487
- /* @__PURE__ */ jsx80(Button_default, { variant: "outline", size: "small", onClick: copyInviteLink, children: inviteLinkCopied ? "Copied!" : "Copy" })
11781
+ /* @__PURE__ */ jsx83(Typography_default, { variant: "body2", style: { flex: 1 }, children: inviteLink }),
11782
+ /* @__PURE__ */ jsx83(Button_default, { variant: "outline", size: "small", onClick: copyInviteLink, children: inviteLinkCopied ? "Copied!" : "Copy" })
11488
11783
  ]
11489
11784
  }
11490
11785
  )
11491
11786
  ] }),
11492
- /* @__PURE__ */ jsx80("div", { style: { display: "flex", gap: "0.5rem", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx80(Button_default, { variant: "outline", onClick: resetFlow, children: "Invite Another User" }) })
11787
+ /* @__PURE__ */ jsx83("div", { style: { display: "flex", gap: "0.5rem", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx83(Button_default, { variant: "outline", onClick: resetFlow, children: "Invite Another User" }) })
11493
11788
  ] })
11494
11789
  ] });
11495
11790
  }
11496
- return /* @__PURE__ */ jsxs32(Card_default, { className: cx23(className, styles.card), variant, children: [
11497
- (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs32(Card_default.Header, { className: styles.header, children: [
11498
- showTitle && title && /* @__PURE__ */ jsx80(Card_default.Title, { level: 2, className: styles.title, children: title }),
11499
- showSubtitle && subtitle && /* @__PURE__ */ jsx80(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11791
+ return /* @__PURE__ */ jsxs33(Card_default, { className: cx23(className, styles.card), variant, children: [
11792
+ (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs33(Card_default.Header, { className: styles.header, children: [
11793
+ showTitle && title && /* @__PURE__ */ jsx83(Card_default.Title, { level: 2, className: styles.title, children: title }),
11794
+ showSubtitle && subtitle && /* @__PURE__ */ jsx83(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11500
11795
  ] }),
11501
- /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11502
- apiError && /* @__PURE__ */ jsx80("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx80(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx80(Alert_default.Description, { children: apiError.message }) }) }),
11503
- /* @__PURE__ */ jsxs32("div", { children: [
11504
- componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx80(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx80(Typography_default, { variant: "body1", children: "No form components available" }) }),
11505
- isLoading && /* @__PURE__ */ jsx80("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx80(Spinner_default, { size: "small" }) })
11796
+ /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11797
+ apiError && /* @__PURE__ */ jsx83("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx83(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx83(Alert_default.Description, { children: apiError.message }) }) }),
11798
+ /* @__PURE__ */ jsxs33("div", { children: [
11799
+ componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx83(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx83(Typography_default, { variant: "body1", children: "No form components available" }) }),
11800
+ isLoading && /* @__PURE__ */ jsx83("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx83(Spinner_default, { size: "small" }) })
11506
11801
  ] })
11507
11802
  ] })
11508
11803
  ] });
@@ -11510,7 +11805,7 @@ var BaseInviteUser = ({
11510
11805
  var BaseInviteUser_default = BaseInviteUser;
11511
11806
 
11512
11807
  // src/components/presentation/auth/InviteUser/v2/InviteUser.tsx
11513
- import { jsx as jsx81 } from "react/jsx-runtime";
11808
+ import { jsx as jsx84 } from "react/jsx-runtime";
11514
11809
  var InviteUser = ({
11515
11810
  onInviteLinkGenerated,
11516
11811
  onError,
@@ -11554,7 +11849,7 @@ var InviteUser = ({
11554
11849
  });
11555
11850
  return response.data;
11556
11851
  };
11557
- return /* @__PURE__ */ jsx81(
11852
+ return /* @__PURE__ */ jsx84(
11558
11853
  BaseInviteUser_default,
11559
11854
  {
11560
11855
  onInitialize: handleInitialize,
@@ -11579,7 +11874,7 @@ import { useMemo as useMemo28 } from "react";
11579
11874
 
11580
11875
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
11581
11876
  import { cx as cx24 } from "@emotion/css";
11582
- import { useCallback as useCallback15, useEffect as useEffect20, useRef as useRef11, useState as useState21 } from "react";
11877
+ import { useCallback as useCallback15, useEffect as useEffect21, useRef as useRef11, useState as useState22 } from "react";
11583
11878
 
11584
11879
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.ts
11585
11880
  import { css as css20 } from "@emotion/css";
@@ -11622,7 +11917,7 @@ var useStyles19 = (theme, colorScheme) => useMemo27(() => {
11622
11917
  var BaseAcceptInvite_styles_default = useStyles19;
11623
11918
 
11624
11919
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
11625
- import { jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
11920
+ import { jsx as jsx85, jsxs as jsxs34 } from "react/jsx-runtime";
11626
11921
  var BaseAcceptInvite = ({
11627
11922
  flowId,
11628
11923
  inviteToken,
@@ -11643,17 +11938,17 @@ var BaseAcceptInvite = ({
11643
11938
  const { t } = useTranslation_default(preferences?.i18n);
11644
11939
  const { theme } = useTheme_default();
11645
11940
  const styles = BaseAcceptInvite_styles_default(theme, theme.vars.colors.text.primary);
11646
- const [isLoading, setIsLoading] = useState21(false);
11647
- const [isValidatingToken, setIsValidatingToken] = useState21(true);
11648
- const [isTokenInvalid, setIsTokenInvalid] = useState21(false);
11649
- const [isComplete, setIsComplete] = useState21(false);
11650
- const [currentFlow, setCurrentFlow] = useState21(null);
11651
- const [apiError, setApiError] = useState21(null);
11652
- const [formValues, setFormValues] = useState21({});
11653
- const [formErrors, setFormErrors] = useState21({});
11654
- const [touchedFields, setTouchedFields] = useState21({});
11655
- const [isFormValid, setIsFormValid] = useState21(true);
11656
- const [completionTitle, setCompletionTitle] = useState21(void 0);
11941
+ const [isLoading, setIsLoading] = useState22(false);
11942
+ const [isValidatingToken, setIsValidatingToken] = useState22(true);
11943
+ const [isTokenInvalid, setIsTokenInvalid] = useState22(false);
11944
+ const [isComplete, setIsComplete] = useState22(false);
11945
+ const [currentFlow, setCurrentFlow] = useState22(null);
11946
+ const [apiError, setApiError] = useState22(null);
11947
+ const [formValues, setFormValues] = useState22({});
11948
+ const [formErrors, setFormErrors] = useState22({});
11949
+ const [touchedFields, setTouchedFields] = useState22({});
11950
+ const [isFormValid, setIsFormValid] = useState22(true);
11951
+ const [completionTitle, setCompletionTitle] = useState22(void 0);
11657
11952
  const tokenValidationAttemptedRef = useRef11(false);
11658
11953
  const handleError = useCallback15(
11659
11954
  (error) => {
@@ -11834,7 +12129,7 @@ var BaseAcceptInvite = ({
11834
12129
  normalizeFlowResponseLocal
11835
12130
  ]
11836
12131
  );
11837
- useEffect20(() => {
12132
+ useEffect21(() => {
11838
12133
  if (tokenValidationAttemptedRef.current) {
11839
12134
  return;
11840
12135
  }
@@ -11951,50 +12246,50 @@ var BaseAcceptInvite = ({
11951
12246
  values: formValues
11952
12247
  };
11953
12248
  if (children) {
11954
- return /* @__PURE__ */ jsx82("div", { className, children: children(renderProps) });
12249
+ return /* @__PURE__ */ jsx85("div", { className, children: children(renderProps) });
11955
12250
  }
11956
12251
  if (isValidatingToken) {
11957
- return /* @__PURE__ */ jsx82(Card_default, { className: cx24(className, styles.card), variant, children: /* @__PURE__ */ jsx82(Card_default.Content, { children: /* @__PURE__ */ jsxs33("div", { style: { alignItems: "center", display: "flex", flexDirection: "column", gap: "1rem", padding: "2rem" }, children: [
11958
- /* @__PURE__ */ jsx82(Spinner_default, { size: "medium" }),
11959
- /* @__PURE__ */ jsx82(Typography_default, { variant: "body1", children: "Validating your invite link..." })
12252
+ return /* @__PURE__ */ jsx85(Card_default, { className: cx24(className, styles.card), variant, children: /* @__PURE__ */ jsx85(Card_default.Content, { children: /* @__PURE__ */ jsxs34("div", { style: { alignItems: "center", display: "flex", flexDirection: "column", gap: "1rem", padding: "2rem" }, children: [
12253
+ /* @__PURE__ */ jsx85(Spinner_default, { size: "medium" }),
12254
+ /* @__PURE__ */ jsx85(Typography_default, { variant: "body1", children: "Validating your invite link..." })
11960
12255
  ] }) }) });
11961
12256
  }
11962
12257
  if (isTokenInvalid) {
11963
- return /* @__PURE__ */ jsxs33(Card_default, { className: cx24(className, styles.card), variant, children: [
11964
- /* @__PURE__ */ jsx82(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx82(Card_default.Title, { level: 2, className: styles.title, children: "Invalid Invite Link" }) }),
11965
- /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11966
- /* @__PURE__ */ jsxs33(Alert_default, { variant: "error", children: [
11967
- /* @__PURE__ */ jsx82(Alert_default.Title, { children: "Unable to verify invite" }),
11968
- /* @__PURE__ */ jsx82(Alert_default.Description, { children: apiError?.message || "This invite link is invalid or has expired. Please contact your administrator for a new invite." })
12258
+ return /* @__PURE__ */ jsxs34(Card_default, { className: cx24(className, styles.card), variant, children: [
12259
+ /* @__PURE__ */ jsx85(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx85(Card_default.Title, { level: 2, className: styles.title, children: "Invalid Invite Link" }) }),
12260
+ /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
12261
+ /* @__PURE__ */ jsxs34(Alert_default, { variant: "error", children: [
12262
+ /* @__PURE__ */ jsx85(Alert_default.Title, { children: "Unable to verify invite" }),
12263
+ /* @__PURE__ */ jsx85(Alert_default.Description, { children: apiError?.message || "This invite link is invalid or has expired. Please contact your administrator for a new invite." })
11969
12264
  ] }),
11970
- onGoToSignIn && /* @__PURE__ */ jsx82("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx82(Button_default, { variant: "outline", onClick: onGoToSignIn, children: "Go to Sign In" }) })
12265
+ onGoToSignIn && /* @__PURE__ */ jsx85("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx85(Button_default, { variant: "outline", onClick: onGoToSignIn, children: "Go to Sign In" }) })
11971
12266
  ] })
11972
12267
  ] });
11973
12268
  }
11974
12269
  if (isComplete) {
11975
- return /* @__PURE__ */ jsxs33(Card_default, { className: cx24(className, styles.card), variant, children: [
11976
- /* @__PURE__ */ jsx82(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx82(Card_default.Title, { level: 2, className: styles.title, children: "Account Setup Complete!" }) }),
11977
- /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11978
- /* @__PURE__ */ jsx82(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx82(Alert_default.Description, { children: "Your account has been successfully set up. You can now sign in with your credentials." }) }),
11979
- onGoToSignIn && /* @__PURE__ */ jsx82("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx82(Button_default, { variant: "solid", color: "primary", onClick: onGoToSignIn, children: "Sign In" }) })
12270
+ return /* @__PURE__ */ jsxs34(Card_default, { className: cx24(className, styles.card), variant, children: [
12271
+ /* @__PURE__ */ jsx85(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx85(Card_default.Title, { level: 2, className: styles.title, children: "Account Setup Complete!" }) }),
12272
+ /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
12273
+ /* @__PURE__ */ jsx85(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx85(Alert_default.Description, { children: "Your account has been successfully set up. You can now sign in with your credentials." }) }),
12274
+ onGoToSignIn && /* @__PURE__ */ jsx85("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx85(Button_default, { variant: "solid", color: "primary", onClick: onGoToSignIn, children: "Sign In" }) })
11980
12275
  ] })
11981
12276
  ] });
11982
12277
  }
11983
- return /* @__PURE__ */ jsxs33(Card_default, { className: cx24(className, styles.card), variant, children: [
11984
- (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs33(Card_default.Header, { className: styles.header, children: [
11985
- showTitle && title && /* @__PURE__ */ jsx82(Card_default.Title, { level: 2, className: styles.title, children: title }),
11986
- showSubtitle && subtitle && /* @__PURE__ */ jsx82(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
12278
+ return /* @__PURE__ */ jsxs34(Card_default, { className: cx24(className, styles.card), variant, children: [
12279
+ (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs34(Card_default.Header, { className: styles.header, children: [
12280
+ showTitle && title && /* @__PURE__ */ jsx85(Card_default.Title, { level: 2, className: styles.title, children: title }),
12281
+ showSubtitle && subtitle && /* @__PURE__ */ jsx85(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11987
12282
  ] }),
11988
- /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11989
- apiError && /* @__PURE__ */ jsx82("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx82(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx82(Alert_default.Description, { children: apiError.message }) }) }),
11990
- /* @__PURE__ */ jsxs33("div", { children: [
11991
- componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx82(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx82(Typography_default, { variant: "body1", children: "No form components available" }) }),
11992
- isLoading && /* @__PURE__ */ jsx82("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx82(Spinner_default, { size: "small" }) })
12283
+ /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
12284
+ apiError && /* @__PURE__ */ jsx85("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx85(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx85(Alert_default.Description, { children: apiError.message }) }) }),
12285
+ /* @__PURE__ */ jsxs34("div", { children: [
12286
+ componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx85(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx85(Typography_default, { variant: "body1", children: "No form components available" }) }),
12287
+ isLoading && /* @__PURE__ */ jsx85("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx85(Spinner_default, { size: "small" }) })
11993
12288
  ] }),
11994
- onGoToSignIn && /* @__PURE__ */ jsx82("div", { style: { marginTop: "1.5rem", textAlign: "center" }, children: /* @__PURE__ */ jsxs33(Typography_default, { variant: "body2", children: [
12289
+ onGoToSignIn && /* @__PURE__ */ jsx85("div", { style: { marginTop: "1.5rem", textAlign: "center" }, children: /* @__PURE__ */ jsxs34(Typography_default, { variant: "body2", children: [
11995
12290
  "Already have an account?",
11996
12291
  " ",
11997
- /* @__PURE__ */ jsx82(Button_default, { variant: "text", onClick: onGoToSignIn, style: { minWidth: "auto", padding: 0 }, children: "Sign In" })
12292
+ /* @__PURE__ */ jsx85(Button_default, { variant: "text", onClick: onGoToSignIn, style: { minWidth: "auto", padding: 0 }, children: "Sign In" })
11998
12293
  ] }) })
11999
12294
  ] })
12000
12295
  ] });
@@ -12002,7 +12297,7 @@ var BaseAcceptInvite = ({
12002
12297
  var BaseAcceptInvite_default = BaseAcceptInvite;
12003
12298
 
12004
12299
  // src/components/presentation/auth/AcceptInvite/v2/AcceptInvite.tsx
12005
- import { jsx as jsx83 } from "react/jsx-runtime";
12300
+ import { jsx as jsx86 } from "react/jsx-runtime";
12006
12301
  var getUrlParams = () => {
12007
12302
  if (typeof window === "undefined") {
12008
12303
  return {};
@@ -12058,7 +12353,7 @@ var AcceptInvite = ({
12058
12353
  }
12059
12354
  return response.json();
12060
12355
  };
12061
- return /* @__PURE__ */ jsx83(
12356
+ return /* @__PURE__ */ jsx86(
12062
12357
  BaseAcceptInvite_default,
12063
12358
  {
12064
12359
  flowId,
@@ -12081,7 +12376,7 @@ var AcceptInvite_default = AcceptInvite;
12081
12376
 
12082
12377
  // src/components/auth/Callback/Callback.tsx
12083
12378
  import { navigate as browserNavigate } from "@asgardeo/browser";
12084
- import { useEffect as useEffect21, useRef as useRef12 } from "react";
12379
+ import { useEffect as useEffect22, useRef as useRef12 } from "react";
12085
12380
  var Callback = ({ onNavigate, onError }) => {
12086
12381
  const processingRef = useRef12(false);
12087
12382
  const navigate6 = (path) => {
@@ -12091,7 +12386,7 @@ var Callback = ({ onNavigate, onError }) => {
12091
12386
  browserNavigate(path);
12092
12387
  }
12093
12388
  };
12094
- useEffect21(() => {
12389
+ useEffect22(() => {
12095
12390
  const processOAuthCallback = () => {
12096
12391
  if (processingRef.current) {
12097
12392
  return;
@@ -12169,45 +12464,45 @@ var Callback = ({ onNavigate, onError }) => {
12169
12464
  };
12170
12465
 
12171
12466
  // src/components/presentation/User/BaseUser.tsx
12172
- import { Fragment as Fragment14, jsx as jsx84 } from "react/jsx-runtime";
12467
+ import { Fragment as Fragment17, jsx as jsx87 } from "react/jsx-runtime";
12173
12468
  var BaseUser = ({ user, children, fallback = null }) => {
12174
12469
  if (!user) {
12175
- return /* @__PURE__ */ jsx84(Fragment14, { children: fallback });
12470
+ return /* @__PURE__ */ jsx87(Fragment17, { children: fallback });
12176
12471
  }
12177
- return /* @__PURE__ */ jsx84(Fragment14, { children: children(user) });
12472
+ return /* @__PURE__ */ jsx87(Fragment17, { children: children(user) });
12178
12473
  };
12179
12474
  BaseUser.displayName = "BaseUser";
12180
12475
  var BaseUser_default = BaseUser;
12181
12476
 
12182
12477
  // src/components/presentation/User/User.tsx
12183
- import { jsx as jsx85 } from "react/jsx-runtime";
12478
+ import { jsx as jsx88 } from "react/jsx-runtime";
12184
12479
  var User5 = ({ children, fallback = null }) => {
12185
12480
  const { user } = useAsgardeo_default();
12186
- return /* @__PURE__ */ jsx85(BaseUser_default, { user, fallback, children });
12481
+ return /* @__PURE__ */ jsx88(BaseUser_default, { user, fallback, children });
12187
12482
  };
12188
12483
  User5.displayName = "User";
12189
12484
  var User_default = User5;
12190
12485
 
12191
12486
  // src/components/presentation/Organization/BaseOrganization.tsx
12192
- import { Fragment as Fragment15, jsx as jsx86 } from "react/jsx-runtime";
12487
+ import { Fragment as Fragment18, jsx as jsx89 } from "react/jsx-runtime";
12193
12488
  var BaseOrganization = ({
12194
12489
  children,
12195
12490
  fallback = null,
12196
12491
  organization
12197
12492
  }) => {
12198
12493
  if (!organization) {
12199
- return /* @__PURE__ */ jsx86(Fragment15, { children: fallback });
12494
+ return /* @__PURE__ */ jsx89(Fragment18, { children: fallback });
12200
12495
  }
12201
- return /* @__PURE__ */ jsx86(Fragment15, { children: children(organization) });
12496
+ return /* @__PURE__ */ jsx89(Fragment18, { children: children(organization) });
12202
12497
  };
12203
12498
  BaseOrganization.displayName = "BaseOrganization";
12204
12499
  var BaseOrganization_default = BaseOrganization;
12205
12500
 
12206
12501
  // src/components/presentation/Organization/Organization.tsx
12207
- import { jsx as jsx87 } from "react/jsx-runtime";
12502
+ import { jsx as jsx90 } from "react/jsx-runtime";
12208
12503
  var Organization5 = ({ children, fallback = null }) => {
12209
12504
  const { currentOrganization } = useOrganization_default();
12210
- return /* @__PURE__ */ jsx87(BaseOrganization_default, { organization: currentOrganization, fallback, children });
12505
+ return /* @__PURE__ */ jsx90(BaseOrganization_default, { organization: currentOrganization, fallback, children });
12211
12506
  };
12212
12507
  Organization5.displayName = "Organization";
12213
12508
  var Organization_default = Organization5;
@@ -12215,7 +12510,7 @@ var Organization_default = Organization5;
12215
12510
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
12216
12511
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix27, WellKnownSchemaIds, bem as bem19 } from "@asgardeo/browser";
12217
12512
  import { cx as cx28 } from "@emotion/css";
12218
- import { useState as useState24, useCallback as useCallback17 } from "react";
12513
+ import { useState as useState25, useCallback as useCallback17 } from "react";
12219
12514
 
12220
12515
  // src/components/presentation/UserProfile/BaseUserProfile.styles.ts
12221
12516
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix23 } from "@asgardeo/browser";
@@ -12546,7 +12841,7 @@ var useStyles21 = (theme, colorScheme, size, variant, backgroundColor) => useMem
12546
12841
  var Avatar_styles_default = useStyles21;
12547
12842
 
12548
12843
  // src/components/primitives/Avatar/Avatar.tsx
12549
- import { jsx as jsx88 } from "react/jsx-runtime";
12844
+ import { jsx as jsx91 } from "react/jsx-runtime";
12550
12845
  var Avatar = ({
12551
12846
  alt = "User avatar",
12552
12847
  background = "random",
@@ -12593,7 +12888,7 @@ var Avatar = ({
12593
12888
  const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
12594
12889
  const renderContent = () => {
12595
12890
  if (imageUrl) {
12596
- return /* @__PURE__ */ jsx88(
12891
+ return /* @__PURE__ */ jsx91(
12597
12892
  "img",
12598
12893
  {
12599
12894
  src: imageUrl,
@@ -12606,19 +12901,19 @@ var Avatar = ({
12606
12901
  return getInitials(name);
12607
12902
  }
12608
12903
  if (isLoading) {
12609
- return /* @__PURE__ */ jsx88("div", { className: cx25(withVendorCSSClassPrefix24(bem16("avatar", "skeleton")), styles["skeleton"]) });
12904
+ return /* @__PURE__ */ jsx91("div", { className: cx25(withVendorCSSClassPrefix24(bem16("avatar", "skeleton")), styles["skeleton"]) });
12610
12905
  }
12611
- return /* @__PURE__ */ jsx88(
12906
+ return /* @__PURE__ */ jsx91(
12612
12907
  "svg",
12613
12908
  {
12614
12909
  xmlns: "http://www.w3.org/2000/svg",
12615
12910
  viewBox: "0 0 640 640",
12616
12911
  className: cx25(withVendorCSSClassPrefix24(bem16("avatar", "icon")), styles["icon"]),
12617
- children: /* @__PURE__ */ jsx88("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" })
12912
+ children: /* @__PURE__ */ jsx91("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" })
12618
12913
  }
12619
12914
  );
12620
12915
  };
12621
- return /* @__PURE__ */ jsx88(
12916
+ return /* @__PURE__ */ jsx91(
12622
12917
  "div",
12623
12918
  {
12624
12919
  className: cx25(
@@ -12657,7 +12952,7 @@ import {
12657
12952
  useContext as useContext12,
12658
12953
  useLayoutEffect,
12659
12954
  useMemo as useMemo33,
12660
- useState as useState22
12955
+ useState as useState23
12661
12956
  } from "react";
12662
12957
 
12663
12958
  // src/components/primitives/Dialog/Dialog.styles.ts
@@ -12725,8 +13020,8 @@ var useStyles22 = (theme, colorScheme) => useMemo32(() => {
12725
13020
  var Dialog_styles_default = useStyles22;
12726
13021
 
12727
13022
  // src/components/primitives/Icons/LogOut.tsx
12728
- import { jsx as jsx89, jsxs as jsxs34 } from "react/jsx-runtime";
12729
- var LogOut = (props) => /* @__PURE__ */ jsxs34(
13023
+ import { jsx as jsx92, jsxs as jsxs35 } from "react/jsx-runtime";
13024
+ var LogOut = (props) => /* @__PURE__ */ jsxs35(
12730
13025
  "svg",
12731
13026
  {
12732
13027
  xmlns: "http://www.w3.org/2000/svg",
@@ -12740,17 +13035,17 @@ var LogOut = (props) => /* @__PURE__ */ jsxs34(
12740
13035
  strokeLinejoin: "round",
12741
13036
  ...props,
12742
13037
  children: [
12743
- /* @__PURE__ */ jsx89("path", { d: "m16 17 5-5-5-5" }),
12744
- /* @__PURE__ */ jsx89("path", { d: "M21 12H9" }),
12745
- /* @__PURE__ */ jsx89("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
13038
+ /* @__PURE__ */ jsx92("path", { d: "m16 17 5-5-5-5" }),
13039
+ /* @__PURE__ */ jsx92("path", { d: "M21 12H9" }),
13040
+ /* @__PURE__ */ jsx92("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
12746
13041
  ]
12747
13042
  }
12748
13043
  );
12749
13044
  var LogOut_default = LogOut;
12750
13045
 
12751
13046
  // src/components/primitives/Icons/Plus.tsx
12752
- import { jsx as jsx90, jsxs as jsxs35 } from "react/jsx-runtime";
12753
- var Plus = (props) => /* @__PURE__ */ jsxs35(
13047
+ import { jsx as jsx93, jsxs as jsxs36 } from "react/jsx-runtime";
13048
+ var Plus = (props) => /* @__PURE__ */ jsxs36(
12754
13049
  "svg",
12755
13050
  {
12756
13051
  xmlns: "http://www.w3.org/2000/svg",
@@ -12764,16 +13059,16 @@ var Plus = (props) => /* @__PURE__ */ jsxs35(
12764
13059
  strokeLinejoin: "round",
12765
13060
  ...props,
12766
13061
  children: [
12767
- /* @__PURE__ */ jsx90("path", { d: "M5 12h14" }),
12768
- /* @__PURE__ */ jsx90("path", { d: "M12 5v14" })
13062
+ /* @__PURE__ */ jsx93("path", { d: "M5 12h14" }),
13063
+ /* @__PURE__ */ jsx93("path", { d: "M12 5v14" })
12769
13064
  ]
12770
13065
  }
12771
13066
  );
12772
13067
  var Plus_default = Plus;
12773
13068
 
12774
13069
  // src/components/primitives/Icons/User.tsx
12775
- import { jsx as jsx91, jsxs as jsxs36 } from "react/jsx-runtime";
12776
- var User7 = (props) => /* @__PURE__ */ jsxs36(
13070
+ import { jsx as jsx94, jsxs as jsxs37 } from "react/jsx-runtime";
13071
+ var User7 = (props) => /* @__PURE__ */ jsxs37(
12777
13072
  "svg",
12778
13073
  {
12779
13074
  xmlns: "http://www.w3.org/2000/svg",
@@ -12787,16 +13082,16 @@ var User7 = (props) => /* @__PURE__ */ jsxs36(
12787
13082
  strokeLinejoin: "round",
12788
13083
  ...props,
12789
13084
  children: [
12790
- /* @__PURE__ */ jsx91("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
12791
- /* @__PURE__ */ jsx91("circle", { cx: "12", cy: "7", r: "4" })
13085
+ /* @__PURE__ */ jsx94("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
13086
+ /* @__PURE__ */ jsx94("circle", { cx: "12", cy: "7", r: "4" })
12792
13087
  ]
12793
13088
  }
12794
13089
  );
12795
13090
  var User_default2 = User7;
12796
13091
 
12797
13092
  // src/components/primitives/Icons/X.tsx
12798
- import { jsx as jsx92, jsxs as jsxs37 } from "react/jsx-runtime";
12799
- var X = (props) => /* @__PURE__ */ jsxs37(
13093
+ import { jsx as jsx95, jsxs as jsxs38 } from "react/jsx-runtime";
13094
+ var X = (props) => /* @__PURE__ */ jsxs38(
12800
13095
  "svg",
12801
13096
  {
12802
13097
  xmlns: "http://www.w3.org/2000/svg",
@@ -12810,23 +13105,23 @@ var X = (props) => /* @__PURE__ */ jsxs37(
12810
13105
  strokeLinejoin: "round",
12811
13106
  ...props,
12812
13107
  children: [
12813
- /* @__PURE__ */ jsx92("path", { d: "M18 6 6 18" }),
12814
- /* @__PURE__ */ jsx92("path", { d: "m6 6 12 12" })
13108
+ /* @__PURE__ */ jsx95("path", { d: "M18 6 6 18" }),
13109
+ /* @__PURE__ */ jsx95("path", { d: "m6 6 12 12" })
12815
13110
  ]
12816
13111
  }
12817
13112
  );
12818
13113
  var X_default = X;
12819
13114
 
12820
13115
  // src/components/primitives/Dialog/Dialog.tsx
12821
- import { jsx as jsx93, jsxs as jsxs38 } from "react/jsx-runtime";
13116
+ import { jsx as jsx96, jsxs as jsxs39 } from "react/jsx-runtime";
12822
13117
  function useDialog({
12823
13118
  initialOpen = false,
12824
13119
  open: controlledOpen,
12825
13120
  onOpenChange: setControlledOpen
12826
13121
  } = {}) {
12827
- const [uncontrolledOpen, setUncontrolledOpen] = useState22(initialOpen);
12828
- const [labelId, setLabelId] = useState22();
12829
- const [descriptionId, setDescriptionId] = useState22();
13122
+ const [uncontrolledOpen, setUncontrolledOpen] = useState23(initialOpen);
13123
+ const [labelId, setLabelId] = useState23();
13124
+ const [descriptionId, setDescriptionId] = useState23();
12830
13125
  const open = controlledOpen ?? uncontrolledOpen;
12831
13126
  const setOpen = setControlledOpen ?? setUncontrolledOpen;
12832
13127
  const data = useFloating({
@@ -12864,7 +13159,7 @@ var useDialogContext = () => {
12864
13159
  };
12865
13160
  function Dialog({ children, ...options }) {
12866
13161
  const dialog = useDialog(options);
12867
- return /* @__PURE__ */ jsx93(DialogContext.Provider, { value: dialog, children });
13162
+ return /* @__PURE__ */ jsx96(DialogContext.Provider, { value: dialog, children });
12868
13163
  }
12869
13164
  var DialogTrigger = forwardRef10(
12870
13165
  ({ children, asChild = false, ...props }, propRef) => {
@@ -12882,7 +13177,7 @@ var DialogTrigger = forwardRef10(
12882
13177
  })
12883
13178
  );
12884
13179
  }
12885
- return /* @__PURE__ */ jsx93("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
13180
+ return /* @__PURE__ */ jsx96("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
12886
13181
  }
12887
13182
  );
12888
13183
  var DialogContent = forwardRef10(
@@ -12892,12 +13187,12 @@ var DialogContent = forwardRef10(
12892
13187
  const styles = Dialog_styles_default(theme, colorScheme);
12893
13188
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
12894
13189
  if (!floatingContext.open) return null;
12895
- return /* @__PURE__ */ jsx93(FloatingPortal, { children: /* @__PURE__ */ jsx93(
13190
+ return /* @__PURE__ */ jsx96(FloatingPortal, { children: /* @__PURE__ */ jsx96(
12896
13191
  FloatingOverlay,
12897
13192
  {
12898
13193
  className: cx26(withVendorCSSClassPrefix25(bem17("dialog", "overlay")), styles["overlay"]),
12899
13194
  lockScroll: true,
12900
- children: /* @__PURE__ */ jsx93(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx93(
13195
+ children: /* @__PURE__ */ jsx96(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx96(
12901
13196
  "div",
12902
13197
  {
12903
13198
  ref,
@@ -12924,8 +13219,8 @@ var DialogHeading = forwardRef10(
12924
13219
  context.setLabelId(void 0);
12925
13220
  };
12926
13221
  }, [id, context.setLabelId]);
12927
- return /* @__PURE__ */ jsxs38("div", { className: cx26(withVendorCSSClassPrefix25(bem17("dialog", "header")), styles["header"]), children: [
12928
- /* @__PURE__ */ jsx93(
13222
+ return /* @__PURE__ */ jsxs39("div", { className: cx26(withVendorCSSClassPrefix25(bem17("dialog", "header")), styles["header"]), children: [
13223
+ /* @__PURE__ */ jsx96(
12929
13224
  "h2",
12930
13225
  {
12931
13226
  ...props,
@@ -12935,7 +13230,7 @@ var DialogHeading = forwardRef10(
12935
13230
  children
12936
13231
  }
12937
13232
  ),
12938
- /* @__PURE__ */ jsx93(
13233
+ /* @__PURE__ */ jsx96(
12939
13234
  Button_default,
12940
13235
  {
12941
13236
  color: "tertiary",
@@ -12946,7 +13241,7 @@ var DialogHeading = forwardRef10(
12946
13241
  context.setOpen(false);
12947
13242
  },
12948
13243
  "aria-label": "Close",
12949
- children: /* @__PURE__ */ jsx93(X_default, { width: 16, height: 16 })
13244
+ children: /* @__PURE__ */ jsx96(X_default, { width: 16, height: 16 })
12950
13245
  }
12951
13246
  )
12952
13247
  ] });
@@ -12964,7 +13259,7 @@ var DialogDescription = forwardRef10(
12964
13259
  context.setDescriptionId(void 0);
12965
13260
  };
12966
13261
  }, [id, context.setDescriptionId]);
12967
- return /* @__PURE__ */ jsx93(
13262
+ return /* @__PURE__ */ jsx96(
12968
13263
  "p",
12969
13264
  {
12970
13265
  ...props,
@@ -12993,7 +13288,7 @@ var DialogClose = forwardRef10(
12993
13288
  onClick: handleClick
12994
13289
  });
12995
13290
  }
12996
- return /* @__PURE__ */ jsx93(
13291
+ return /* @__PURE__ */ jsx96(
12997
13292
  Button_default,
12998
13293
  {
12999
13294
  ...props,
@@ -13021,7 +13316,7 @@ var Dialog_default = Dialog;
13021
13316
  // src/components/primitives/MultiInput/MultiInput.tsx
13022
13317
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix26, bem as bem18 } from "@asgardeo/browser";
13023
13318
  import { cx as cx27 } from "@emotion/css";
13024
- import { useCallback as useCallback16, useState as useState23 } from "react";
13319
+ import { useCallback as useCallback16, useState as useState24 } from "react";
13025
13320
 
13026
13321
  // src/components/primitives/MultiInput/MultiInput.styles.ts
13027
13322
  import { css as css24 } from "@emotion/css";
@@ -13116,7 +13411,7 @@ var useStyles23 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
13116
13411
  var MultiInput_styles_default = useStyles23;
13117
13412
 
13118
13413
  // src/components/primitives/MultiInput/MultiInput.tsx
13119
- import { jsx as jsx94, jsxs as jsxs39 } from "react/jsx-runtime";
13414
+ import { jsx as jsx97, jsxs as jsxs40 } from "react/jsx-runtime";
13120
13415
  var MultiInput = ({
13121
13416
  label,
13122
13417
  error,
@@ -13139,8 +13434,8 @@ var MultiInput = ({
13139
13434
  const canAddMore = !maxFields || values.length < maxFields;
13140
13435
  const canRemove = values.length > minFields;
13141
13436
  const styles = MultiInput_styles_default(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);
13142
- const PlusIcon = ({ iconClassName }) => /* @__PURE__ */ jsx94("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx94("path", { d: "M12 5v14M5 12h14" }) });
13143
- const BinIcon = ({ iconClassName }) => /* @__PURE__ */ jsx94("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx94("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
13437
+ const PlusIcon = ({ iconClassName }) => /* @__PURE__ */ jsx97("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx97("path", { d: "M12 5v14M5 12h14" }) });
13438
+ const BinIcon = ({ iconClassName }) => /* @__PURE__ */ jsx97("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx97("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
13144
13439
  const handleAddValue = useCallback16(
13145
13440
  (newValue) => {
13146
13441
  if (newValue.trim() !== "" && (!maxFields || values.length < maxFields)) {
@@ -13184,9 +13479,9 @@ var MultiInput = ({
13184
13479
  };
13185
13480
  switch (fieldType) {
13186
13481
  case "DATE_TIME":
13187
- return /* @__PURE__ */ jsx94(DatePicker_default, { ...commonProps });
13482
+ return /* @__PURE__ */ jsx97(DatePicker_default, { ...commonProps });
13188
13483
  case "BOOLEAN":
13189
- return /* @__PURE__ */ jsx94(
13484
+ return /* @__PURE__ */ jsx97(
13190
13485
  Checkbox_default,
13191
13486
  {
13192
13487
  ...commonProps,
@@ -13195,19 +13490,19 @@ var MultiInput = ({
13195
13490
  }
13196
13491
  );
13197
13492
  default:
13198
- return /* @__PURE__ */ jsx94(TextField_default, { ...commonProps, type });
13493
+ return /* @__PURE__ */ jsx97(TextField_default, { ...commonProps, type });
13199
13494
  }
13200
13495
  },
13201
13496
  [placeholder, disabled, startIcon, endIcon, error, fieldType, type]
13202
13497
  );
13203
- const [currentInputValue, setCurrentInputValue] = useState23("");
13498
+ const [currentInputValue, setCurrentInputValue] = useState24("");
13204
13499
  const handleInputSubmit = useCallback16(() => {
13205
13500
  if (currentInputValue.trim() !== "") {
13206
13501
  handleAddValue(currentInputValue);
13207
13502
  setCurrentInputValue("");
13208
13503
  }
13209
13504
  }, [currentInputValue, handleAddValue]);
13210
- return /* @__PURE__ */ jsxs39(
13505
+ return /* @__PURE__ */ jsxs40(
13211
13506
  FormControl_default,
13212
13507
  {
13213
13508
  error,
@@ -13215,27 +13510,27 @@ var MultiInput = ({
13215
13510
  className: cx27(withVendorCSSClassPrefix26(bem18("multi-input")), className),
13216
13511
  style,
13217
13512
  children: [
13218
- label && /* @__PURE__ */ jsx94(InputLabel_default, { required, error: !!error, children: label }),
13219
- /* @__PURE__ */ jsxs39("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "container")), styles["container"]), children: [
13220
- /* @__PURE__ */ jsx94("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-row")), styles["inputRow"]), children: /* @__PURE__ */ jsx94("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-wrapper")), styles["inputWrapper"]), children: renderInputField(
13513
+ label && /* @__PURE__ */ jsx97(InputLabel_default, { required, error: !!error, children: label }),
13514
+ /* @__PURE__ */ jsxs40("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "container")), styles["container"]), children: [
13515
+ /* @__PURE__ */ jsx97("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-row")), styles["inputRow"]), children: /* @__PURE__ */ jsx97("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-wrapper")), styles["inputWrapper"]), children: renderInputField(
13221
13516
  currentInputValue,
13222
13517
  setCurrentInputValue,
13223
- canAddMore ? /* @__PURE__ */ jsx94(PlusIcon, { iconClassName: styles["plusIcon"] }) : void 0,
13518
+ canAddMore ? /* @__PURE__ */ jsx97(PlusIcon, { iconClassName: styles["plusIcon"] }) : void 0,
13224
13519
  canAddMore ? handleInputSubmit : void 0
13225
13520
  ) }) }),
13226
- values.length > 0 && /* @__PURE__ */ jsx94("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-container")), styles["listContainer"]), children: values.map((value, index) => /* @__PURE__ */ jsxs39(
13521
+ values.length > 0 && /* @__PURE__ */ jsx97("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-container")), styles["listContainer"]), children: values.map((value, index) => /* @__PURE__ */ jsxs40(
13227
13522
  "div",
13228
13523
  {
13229
13524
  className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-item")), styles["listItem"]),
13230
13525
  children: [
13231
- /* @__PURE__ */ jsx94(
13526
+ /* @__PURE__ */ jsx97(
13232
13527
  "span",
13233
13528
  {
13234
13529
  className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-item-text")), styles["listItemText"]),
13235
13530
  children: value
13236
13531
  }
13237
13532
  ),
13238
- canRemove && /* @__PURE__ */ jsx94(
13533
+ canRemove && /* @__PURE__ */ jsx97(
13239
13534
  "button",
13240
13535
  {
13241
13536
  type: "button",
@@ -13246,7 +13541,7 @@ var MultiInput = ({
13246
13541
  styles["removeButton"]
13247
13542
  ),
13248
13543
  title: "Remove value",
13249
- children: /* @__PURE__ */ jsx94(BinIcon, { iconClassName: styles["icon"] })
13544
+ children: /* @__PURE__ */ jsx97(BinIcon, { iconClassName: styles["icon"] })
13250
13545
  }
13251
13546
  )
13252
13547
  ]
@@ -13261,7 +13556,7 @@ var MultiInput = ({
13261
13556
  var MultiInput_default = MultiInput;
13262
13557
 
13263
13558
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
13264
- import { Fragment as Fragment16, jsx as jsx95, jsxs as jsxs40 } from "react/jsx-runtime";
13559
+ import { Fragment as Fragment19, jsx as jsx98, jsxs as jsxs41 } from "react/jsx-runtime";
13265
13560
  var fieldsToSkip = [
13266
13561
  "roles.default",
13267
13562
  "active",
@@ -13305,8 +13600,8 @@ var BaseUserProfile = ({
13305
13600
  displayNameAttributes = []
13306
13601
  }) => {
13307
13602
  const { theme, colorScheme } = useTheme_default();
13308
- const [editedUser, setEditedUser] = useState24(flattenedProfile || profile);
13309
- const [editingFields, setEditingFields] = useState24({});
13603
+ const [editedUser, setEditedUser] = useState25(flattenedProfile || profile);
13604
+ const [editingFields, setEditingFields] = useState25({});
13310
13605
  const { t } = useTranslation_default(preferences?.i18n);
13311
13606
  const shouldShowField = useCallback17(
13312
13607
  (fieldName) => {
@@ -13323,7 +13618,7 @@ var BaseUserProfile = ({
13323
13618
  },
13324
13619
  [showFields, hideFields]
13325
13620
  );
13326
- const PencilIcon = () => /* @__PURE__ */ jsx95(
13621
+ const PencilIcon = () => /* @__PURE__ */ jsx98(
13327
13622
  "svg",
13328
13623
  {
13329
13624
  width: "16",
@@ -13334,7 +13629,7 @@ var BaseUserProfile = ({
13334
13629
  strokeWidth: "2",
13335
13630
  strokeLinecap: "round",
13336
13631
  strokeLinejoin: "round",
13337
- children: /* @__PURE__ */ jsx95("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
13632
+ children: /* @__PURE__ */ jsx98("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
13338
13633
  }
13339
13634
  );
13340
13635
  const toggleFieldEdit = useCallback17((fieldName) => {
@@ -13364,12 +13659,12 @@ var BaseUserProfile = ({
13364
13659
  const styles = BaseUserProfile_styles_default(theme, colorScheme);
13365
13660
  const ObjectDisplay = ({ data }) => {
13366
13661
  if (!data || typeof data !== "object") return null;
13367
- return /* @__PURE__ */ jsx95("table", { className: styles.value, children: /* @__PURE__ */ jsx95("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs40("tr", { children: [
13368
- /* @__PURE__ */ jsx95("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs40("strong", { children: [
13662
+ return /* @__PURE__ */ jsx98("table", { className: styles.value, children: /* @__PURE__ */ jsx98("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs41("tr", { children: [
13663
+ /* @__PURE__ */ jsx98("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs41("strong", { children: [
13369
13664
  formatLabel(key),
13370
13665
  ":"
13371
13666
  ] }) }),
13372
- /* @__PURE__ */ jsx95("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx95(ObjectDisplay, { data: value }) : String(value) })
13667
+ /* @__PURE__ */ jsx98("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx98(ObjectDisplay, { data: value }) : String(value) })
13373
13668
  ] }, key)) }) });
13374
13669
  };
13375
13670
  function set(obj, path, value) {
@@ -13444,7 +13739,7 @@ var BaseUserProfile = ({
13444
13739
  const { value, displayName, description, name, type, required, mutability, subAttributes, multiValued } = schema;
13445
13740
  const label = displayName || description || name || "";
13446
13741
  if (subAttributes && Array.isArray(subAttributes)) {
13447
- return /* @__PURE__ */ jsx95(Fragment16, { children: subAttributes.map((subAttr, index) => {
13742
+ return /* @__PURE__ */ jsx98(Fragment19, { children: subAttributes.map((subAttr, index) => {
13448
13743
  let displayValue2;
13449
13744
  if (Array.isArray(subAttr.value)) {
13450
13745
  displayValue2 = subAttr.value.map((item) => typeof item === "object" ? JSON.stringify(item) : String(item)).join(", ");
@@ -13453,9 +13748,9 @@ var BaseUserProfile = ({
13453
13748
  } else {
13454
13749
  displayValue2 = String(subAttr.value);
13455
13750
  }
13456
- return /* @__PURE__ */ jsxs40("div", { className: styles.field, children: [
13457
- /* @__PURE__ */ jsx95("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
13458
- /* @__PURE__ */ jsx95("div", { className: styles.value, children: displayValue2 })
13751
+ return /* @__PURE__ */ jsxs41("div", { className: styles.field, children: [
13752
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
13753
+ /* @__PURE__ */ jsx98("div", { className: styles.value, children: displayValue2 })
13459
13754
  ] }, index);
13460
13755
  }) });
13461
13756
  }
@@ -13479,9 +13774,9 @@ var BaseUserProfile = ({
13479
13774
  } else {
13480
13775
  fieldValues = [];
13481
13776
  }
13482
- return /* @__PURE__ */ jsxs40(Fragment16, { children: [
13483
- /* @__PURE__ */ jsx95("span", { className: styles.label, children: label }),
13484
- /* @__PURE__ */ jsx95("div", { className: styles.value, children: /* @__PURE__ */ jsx95(
13777
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13778
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13779
+ /* @__PURE__ */ jsx98("div", { className: styles.value, children: /* @__PURE__ */ jsx98(
13485
13780
  MultiInput_default,
13486
13781
  {
13487
13782
  values: fieldValues,
@@ -13512,9 +13807,9 @@ var BaseUserProfile = ({
13512
13807
  } else {
13513
13808
  displayValue2 = "-";
13514
13809
  }
13515
- return /* @__PURE__ */ jsxs40(Fragment16, { children: [
13516
- /* @__PURE__ */ jsx95("span", { className: styles.label, children: label }),
13517
- /* @__PURE__ */ jsx95("div", { className: cx28(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx95(
13810
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13811
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13812
+ /* @__PURE__ */ jsx98("div", { className: cx28(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx98(
13518
13813
  Button_default,
13519
13814
  {
13520
13815
  onClick: onStartEdit,
@@ -13529,7 +13824,7 @@ var BaseUserProfile = ({
13529
13824
  ] });
13530
13825
  }
13531
13826
  if (type === "COMPLEX" && typeof value === "object") {
13532
- return /* @__PURE__ */ jsx95(ObjectDisplay, { data: value });
13827
+ return /* @__PURE__ */ jsx98(ObjectDisplay, { data: value });
13533
13828
  }
13534
13829
  if (isEditing && onEditValue && mutability !== "READ_ONLY" && !readonlyFields.includes(name || "")) {
13535
13830
  let fieldValue;
@@ -13551,13 +13846,13 @@ var BaseUserProfile = ({
13551
13846
  let field;
13552
13847
  switch (type) {
13553
13848
  case "STRING":
13554
- field = /* @__PURE__ */ jsx95(TextField_default, { ...commonProps });
13849
+ field = /* @__PURE__ */ jsx98(TextField_default, { ...commonProps });
13555
13850
  break;
13556
13851
  case "DATE_TIME":
13557
- field = /* @__PURE__ */ jsx95(DatePicker_default, { ...commonProps });
13852
+ field = /* @__PURE__ */ jsx98(DatePicker_default, { ...commonProps });
13558
13853
  break;
13559
13854
  case "BOOLEAN":
13560
- field = /* @__PURE__ */ jsx95(
13855
+ field = /* @__PURE__ */ jsx98(
13561
13856
  Checkbox_default,
13562
13857
  {
13563
13858
  ...commonProps,
@@ -13569,7 +13864,7 @@ var BaseUserProfile = ({
13569
13864
  );
13570
13865
  break;
13571
13866
  case "COMPLEX":
13572
- field = /* @__PURE__ */ jsx95(
13867
+ field = /* @__PURE__ */ jsx98(
13573
13868
  "textarea",
13574
13869
  {
13575
13870
  value: fieldValue,
@@ -13581,11 +13876,11 @@ var BaseUserProfile = ({
13581
13876
  );
13582
13877
  break;
13583
13878
  default:
13584
- field = /* @__PURE__ */ jsx95(TextField_default, { ...commonProps });
13879
+ field = /* @__PURE__ */ jsx98(TextField_default, { ...commonProps });
13585
13880
  }
13586
- return /* @__PURE__ */ jsxs40(Fragment16, { children: [
13587
- /* @__PURE__ */ jsx95("span", { className: styles.label, children: label }),
13588
- /* @__PURE__ */ jsx95("div", { className: styles.value, children: field })
13881
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13882
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13883
+ /* @__PURE__ */ jsx98("div", { className: styles.value, children: field })
13589
13884
  ] });
13590
13885
  }
13591
13886
  const hasValue = value !== void 0 && value !== null && value !== "";
@@ -13598,9 +13893,9 @@ var BaseUserProfile = ({
13598
13893
  } else {
13599
13894
  displayValue = "-";
13600
13895
  }
13601
- return /* @__PURE__ */ jsxs40(Fragment16, { children: [
13602
- /* @__PURE__ */ jsx95("span", { className: styles.label, children: label }),
13603
- /* @__PURE__ */ jsx95("div", { className: cx28(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx95(
13896
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13897
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13898
+ /* @__PURE__ */ jsx98("div", { className: cx28(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx98(
13604
13899
  Button_default,
13605
13900
  {
13606
13901
  onClick: onStartEdit,
@@ -13623,8 +13918,8 @@ var BaseUserProfile = ({
13623
13918
  if (!shouldShow) {
13624
13919
  return null;
13625
13920
  }
13626
- return /* @__PURE__ */ jsxs40("div", { className: styles.field, children: [
13627
- /* @__PURE__ */ jsx95("div", { className: styles.fieldInner, children: renderSchemaField(
13921
+ return /* @__PURE__ */ jsxs41("div", { className: styles.field, children: [
13922
+ /* @__PURE__ */ jsx98("div", { className: styles.fieldInner, children: renderSchemaField(
13628
13923
  schema,
13629
13924
  isFieldEditing,
13630
13925
  (value) => {
@@ -13634,10 +13929,10 @@ var BaseUserProfile = ({
13634
13929
  },
13635
13930
  () => toggleFieldEdit(schema.name)
13636
13931
  ) }),
13637
- editable && schema.mutability !== "READ_ONLY" && !isReadonlyField && /* @__PURE__ */ jsxs40("div", { className: styles.fieldActions, children: [
13638
- isFieldEditing && /* @__PURE__ */ jsxs40(Fragment16, { children: [
13639
- /* @__PURE__ */ jsx95(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
13640
- /* @__PURE__ */ jsx95(
13932
+ editable && schema.mutability !== "READ_ONLY" && !isReadonlyField && /* @__PURE__ */ jsxs41("div", { className: styles.fieldActions, children: [
13933
+ isFieldEditing && /* @__PURE__ */ jsxs41(Fragment19, { children: [
13934
+ /* @__PURE__ */ jsx98(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
13935
+ /* @__PURE__ */ jsx98(
13641
13936
  Button_default,
13642
13937
  {
13643
13938
  size: "small",
@@ -13648,7 +13943,7 @@ var BaseUserProfile = ({
13648
13943
  }
13649
13944
  )
13650
13945
  ] }),
13651
- !isFieldEditing && hasValue && /* @__PURE__ */ jsx95(
13946
+ !isFieldEditing && hasValue && /* @__PURE__ */ jsx98(
13652
13947
  Button_default,
13653
13948
  {
13654
13949
  size: "small",
@@ -13657,7 +13952,7 @@ var BaseUserProfile = ({
13657
13952
  onClick: () => toggleFieldEdit(schema.name),
13658
13953
  title: "Edit",
13659
13954
  className: styles.editButton,
13660
- children: /* @__PURE__ */ jsx95(PencilIcon, {})
13955
+ children: /* @__PURE__ */ jsx98(PencilIcon, {})
13661
13956
  }
13662
13957
  )
13663
13958
  ] })
@@ -13680,9 +13975,9 @@ var BaseUserProfile = ({
13680
13975
  if (!shouldShowField(key)) return false;
13681
13976
  return value !== void 0 && value !== "" && value !== null;
13682
13977
  }).sort(([a], [b]) => a.localeCompare(b));
13683
- return /* @__PURE__ */ jsxs40(Fragment16, { children: [
13684
- /* @__PURE__ */ jsxs40("div", { className: styles.profileSummary, children: [
13685
- /* @__PURE__ */ jsx95(
13978
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13979
+ /* @__PURE__ */ jsxs41("div", { className: styles.profileSummary, children: [
13980
+ /* @__PURE__ */ jsx98(
13686
13981
  Avatar,
13687
13982
  {
13688
13983
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
@@ -13692,32 +13987,32 @@ var BaseUserProfile = ({
13692
13987
  isLoading
13693
13988
  }
13694
13989
  ),
13695
- /* @__PURE__ */ jsx95(Typography_default, { variant: "h3", fontWeight: "medium", children: displayName }),
13696
- getMappedUserProfileValue_default("email", mergedMappings, currentUser) && /* @__PURE__ */ jsx95(Typography_default, { variant: "body2", color: "textSecondary", children: getMappedUserProfileValue_default("email", mergedMappings, currentUser) })
13990
+ /* @__PURE__ */ jsx98(Typography_default, { variant: "h3", fontWeight: "medium", children: displayName }),
13991
+ getMappedUserProfileValue_default("email", mergedMappings, currentUser) && /* @__PURE__ */ jsx98(Typography_default, { variant: "body2", color: "textSecondary", children: getMappedUserProfileValue_default("email", mergedMappings, currentUser) })
13697
13992
  ] }),
13698
- /* @__PURE__ */ jsx95(Divider_default, {}),
13699
- profileEntries.map(([key, value], index) => /* @__PURE__ */ jsxs40("div", { children: [
13700
- /* @__PURE__ */ jsxs40("div", { className: styles.sectionRow, children: [
13701
- /* @__PURE__ */ jsx95("div", { className: styles.sectionLabel, children: formatLabel(key) }),
13702
- /* @__PURE__ */ jsx95("div", { className: styles.sectionValue, children: typeof value === "object" ? /* @__PURE__ */ jsx95(ObjectDisplay, { data: value }) : String(value) })
13993
+ /* @__PURE__ */ jsx98(Divider_default, {}),
13994
+ profileEntries.map(([key, value], index) => /* @__PURE__ */ jsxs41("div", { children: [
13995
+ /* @__PURE__ */ jsxs41("div", { className: styles.sectionRow, children: [
13996
+ /* @__PURE__ */ jsx98("div", { className: styles.sectionLabel, children: formatLabel(key) }),
13997
+ /* @__PURE__ */ jsx98("div", { className: styles.sectionValue, children: typeof value === "object" ? /* @__PURE__ */ jsx98(ObjectDisplay, { data: value }) : String(value) })
13703
13998
  ] }),
13704
- index < profileEntries.length - 1 && /* @__PURE__ */ jsx95(Divider_default, {})
13999
+ index < profileEntries.length - 1 && /* @__PURE__ */ jsx98(Divider_default, {})
13705
14000
  ] }, key))
13706
14001
  ] });
13707
14002
  };
13708
- const profileContent = /* @__PURE__ */ jsxs40(Card_default, { className: containerClasses, children: [
13709
- error && /* @__PURE__ */ jsxs40(
14003
+ const profileContent = /* @__PURE__ */ jsxs41(Card_default, { className: containerClasses, children: [
14004
+ error && /* @__PURE__ */ jsxs41(
13710
14005
  Alert_default,
13711
14006
  {
13712
14007
  variant: "error",
13713
14008
  className: cx28(withVendorCSSClassPrefix27(bem19("user-profile", "alert")), styles.alert),
13714
14009
  children: [
13715
- /* @__PURE__ */ jsx95(Alert_default.Title, { children: t("errors.heading") || "Error" }),
13716
- /* @__PURE__ */ jsx95(Alert_default.Description, { children: error })
14010
+ /* @__PURE__ */ jsx98(Alert_default.Title, { children: t("errors.heading") || "Error" }),
14011
+ /* @__PURE__ */ jsx98(Alert_default.Description, { children: error })
13717
14012
  ]
13718
14013
  }
13719
14014
  ),
13720
- schemas && schemas.length > 0 && /* @__PURE__ */ jsx95("div", { className: styles.header, children: /* @__PURE__ */ jsx95(
14015
+ schemas && schemas.length > 0 && /* @__PURE__ */ jsx98("div", { className: styles.header, children: /* @__PURE__ */ jsx98(
13721
14016
  Avatar,
13722
14017
  {
13723
14018
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
@@ -13727,7 +14022,7 @@ var BaseUserProfile = ({
13727
14022
  isLoading
13728
14023
  }
13729
14024
  ) }),
13730
- /* @__PURE__ */ jsx95("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
14025
+ /* @__PURE__ */ jsx98("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
13731
14026
  if (!schema.name || !shouldShowField(schema.name)) return false;
13732
14027
  if (!editable) {
13733
14028
  const value = flattenedProfile && schema.name ? flattenedProfile[schema.name] : void 0;
@@ -13744,13 +14039,13 @@ var BaseUserProfile = ({
13744
14039
  ...schema,
13745
14040
  value
13746
14041
  };
13747
- return /* @__PURE__ */ jsx95("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
14042
+ return /* @__PURE__ */ jsx98("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
13748
14043
  }) : renderProfileWithoutSchemas() })
13749
14044
  ] });
13750
14045
  if (mode === "popup") {
13751
- return /* @__PURE__ */ jsx95(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs40(Dialog_default.Content, { children: [
13752
- /* @__PURE__ */ jsx95(Dialog_default.Heading, { children: title ?? t("user.profile.heading") }),
13753
- /* @__PURE__ */ jsx95("div", { className: styles.popup, children: profileContent })
14046
+ return /* @__PURE__ */ jsx98(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs41(Dialog_default.Content, { children: [
14047
+ /* @__PURE__ */ jsx98(Dialog_default.Heading, { children: title ?? t("user.profile.heading") }),
14048
+ /* @__PURE__ */ jsx98("div", { className: styles.popup, children: profileContent })
13754
14049
  ] }) });
13755
14050
  }
13756
14051
  return profileContent;
@@ -13759,7 +14054,7 @@ var BaseUserProfile_default = BaseUserProfile;
13759
14054
 
13760
14055
  // src/components/presentation/UserProfile/UserProfile.tsx
13761
14056
  import { AsgardeoError } from "@asgardeo/browser";
13762
- import { useState as useState25 } from "react";
14057
+ import { useState as useState26 } from "react";
13763
14058
 
13764
14059
  // src/api/updateMeProfile.ts
13765
14060
  import {
@@ -13792,12 +14087,12 @@ var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
13792
14087
  var updateMeProfile_default = updateMeProfile;
13793
14088
 
13794
14089
  // src/components/presentation/UserProfile/UserProfile.tsx
13795
- import { jsx as jsx96 } from "react/jsx-runtime";
14090
+ import { jsx as jsx99 } from "react/jsx-runtime";
13796
14091
  var UserProfile3 = ({ preferences, ...rest }) => {
13797
14092
  const { baseUrl, instanceId } = useAsgardeo_default();
13798
14093
  const { profile, flattenedProfile, schemas, onUpdateProfile } = useUser_default();
13799
14094
  const { t } = useTranslation_default(preferences?.i18n);
13800
- const [error, setError] = useState25(null);
14095
+ const [error, setError] = useState26(null);
13801
14096
  const handleProfileUpdate = async (payload) => {
13802
14097
  setError(null);
13803
14098
  try {
@@ -13811,7 +14106,7 @@ var UserProfile3 = ({ preferences, ...rest }) => {
13811
14106
  setError(message);
13812
14107
  }
13813
14108
  };
13814
- return /* @__PURE__ */ jsx96(
14109
+ return /* @__PURE__ */ jsx99(
13815
14110
  BaseUserProfile_default,
13816
14111
  {
13817
14112
  profile,
@@ -13842,7 +14137,7 @@ import {
13842
14137
  FloatingFocusManager as FloatingFocusManager2,
13843
14138
  FloatingPortal as FloatingPortal2
13844
14139
  } from "@floating-ui/react";
13845
- import { useState as useState26 } from "react";
14140
+ import { useState as useState27 } from "react";
13846
14141
 
13847
14142
  // src/components/presentation/UserDropdown/BaseUserDropdown.styles.ts
13848
14143
  import { css as css25 } from "@emotion/css";
@@ -14034,7 +14329,7 @@ var useStyles24 = (theme, colorScheme) => useMemo35(() => {
14034
14329
  var BaseUserDropdown_styles_default = useStyles24;
14035
14330
 
14036
14331
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
14037
- import { jsx as jsx97, jsxs as jsxs41 } from "react/jsx-runtime";
14332
+ import { jsx as jsx100, jsxs as jsxs42 } from "react/jsx-runtime";
14038
14333
  var BaseUserDropdown = ({
14039
14334
  fallback = null,
14040
14335
  className = "",
@@ -14050,8 +14345,8 @@ var BaseUserDropdown = ({
14050
14345
  }) => {
14051
14346
  const { theme, colorScheme } = useTheme_default();
14052
14347
  const styles = BaseUserDropdown_styles_default(theme, colorScheme);
14053
- const [isOpen, setIsOpen] = useState26(false);
14054
- const [hoveredItemIndex, setHoveredItemIndex] = useState26(null);
14348
+ const [isOpen, setIsOpen] = useState27(false);
14349
+ const [hoveredItemIndex, setHoveredItemIndex] = useState27(null);
14055
14350
  const { refs, floatingStyles, context } = useFloating2({
14056
14351
  middleware: [offset(5), flip({ fallbackAxisSideDirection: "end" }), shift({ padding: 5 })],
14057
14352
  onOpenChange: setIsOpen,
@@ -14086,14 +14381,14 @@ var BaseUserDropdown = ({
14086
14381
  const defaultMenuItems = [];
14087
14382
  if (onManageProfile) {
14088
14383
  defaultMenuItems.push({
14089
- icon: /* @__PURE__ */ jsx97(User_default2, { width: "16", height: "16" }),
14384
+ icon: /* @__PURE__ */ jsx100(User_default2, { width: "16", height: "16" }),
14090
14385
  label: "Manage Profile",
14091
14386
  onClick: onManageProfile
14092
14387
  });
14093
14388
  }
14094
14389
  if (onSignOut) {
14095
14390
  defaultMenuItems.push({
14096
- icon: /* @__PURE__ */ jsx97(LogOut_default, { width: "16", height: "16" }),
14391
+ icon: /* @__PURE__ */ jsx100(LogOut_default, { width: "16", height: "16" }),
14097
14392
  label: "Sign Out",
14098
14393
  onClick: onSignOut
14099
14394
  });
@@ -14105,8 +14400,8 @@ var BaseUserDropdown = ({
14105
14400
  }
14106
14401
  allMenuItems.push(...defaultMenuItems);
14107
14402
  }
14108
- return /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown"), className), children: [
14109
- /* @__PURE__ */ jsxs41(
14403
+ return /* @__PURE__ */ jsxs42("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown"), className), children: [
14404
+ /* @__PURE__ */ jsxs42(
14110
14405
  Button_default,
14111
14406
  {
14112
14407
  ref: refs.setReference,
@@ -14117,7 +14412,7 @@ var BaseUserDropdown = ({
14117
14412
  "data-testid": "asgardeo-user-dropdown-trigger",
14118
14413
  ...getReferenceProps(),
14119
14414
  children: [
14120
- /* @__PURE__ */ jsx97(
14415
+ /* @__PURE__ */ jsx100(
14121
14416
  Avatar,
14122
14417
  {
14123
14418
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
@@ -14126,7 +14421,7 @@ var BaseUserDropdown = ({
14126
14421
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
14127
14422
  }
14128
14423
  ),
14129
- showTriggerLabel && /* @__PURE__ */ jsx97(
14424
+ showTriggerLabel && /* @__PURE__ */ jsx100(
14130
14425
  Typography_default,
14131
14426
  {
14132
14427
  variant: "body2",
@@ -14137,7 +14432,7 @@ var BaseUserDropdown = ({
14137
14432
  ]
14138
14433
  }
14139
14434
  ),
14140
- isOpen && /* @__PURE__ */ jsx97(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx97(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs41(
14435
+ isOpen && /* @__PURE__ */ jsx100(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx100(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs42(
14141
14436
  "div",
14142
14437
  {
14143
14438
  ref: refs.setFloating,
@@ -14150,8 +14445,8 @@ var BaseUserDropdown = ({
14150
14445
  },
14151
14446
  ...getFloatingProps(),
14152
14447
  children: [
14153
- /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header"), styles["dropdownHeader"]), children: [
14154
- /* @__PURE__ */ jsx97(
14448
+ /* @__PURE__ */ jsxs42("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header"), styles["dropdownHeader"]), children: [
14449
+ /* @__PURE__ */ jsx100(
14155
14450
  Avatar,
14156
14451
  {
14157
14452
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
@@ -14160,8 +14455,8 @@ var BaseUserDropdown = ({
14160
14455
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
14161
14456
  }
14162
14457
  ),
14163
- /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header-info"), styles["headerInfo"]), children: [
14164
- /* @__PURE__ */ jsx97(
14458
+ /* @__PURE__ */ jsxs42("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header-info"), styles["headerInfo"]), children: [
14459
+ /* @__PURE__ */ jsx100(
14165
14460
  Typography_default,
14166
14461
  {
14167
14462
  noWrap: true,
@@ -14171,7 +14466,7 @@ var BaseUserDropdown = ({
14171
14466
  children: getDisplayName_default(mergedMappings, user)
14172
14467
  }
14173
14468
  ),
14174
- /* @__PURE__ */ jsx97(
14469
+ /* @__PURE__ */ jsx100(
14175
14470
  Typography_default,
14176
14471
  {
14177
14472
  noWrap: true,
@@ -14183,9 +14478,9 @@ var BaseUserDropdown = ({
14183
14478
  )
14184
14479
  ] })
14185
14480
  ] }),
14186
- /* @__PURE__ */ jsx97("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__menu"), styles["dropdownMenu"]), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx97("div", { children: (() => {
14481
+ /* @__PURE__ */ jsx100("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__menu"), styles["dropdownMenu"]), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx100("div", { children: (() => {
14187
14482
  if (item.label === "") {
14188
- return /* @__PURE__ */ jsx97(
14483
+ return /* @__PURE__ */ jsx100(
14189
14484
  "div",
14190
14485
  {
14191
14486
  className: cx29(withVendorCSSClassPrefix28("user-dropdown__menu-divider"), styles["divider"])
@@ -14193,7 +14488,7 @@ var BaseUserDropdown = ({
14193
14488
  );
14194
14489
  }
14195
14490
  if (item.href) {
14196
- return /* @__PURE__ */ jsxs41(
14491
+ return /* @__PURE__ */ jsxs42(
14197
14492
  "a",
14198
14493
  {
14199
14494
  href: item.href,
@@ -14210,12 +14505,12 @@ var BaseUserDropdown = ({
14210
14505
  onBlur: () => setHoveredItemIndex(null),
14211
14506
  children: [
14212
14507
  item.icon,
14213
- /* @__PURE__ */ jsx97("span", { children: item.label })
14508
+ /* @__PURE__ */ jsx100("span", { children: item.label })
14214
14509
  ]
14215
14510
  }
14216
14511
  );
14217
14512
  }
14218
- return /* @__PURE__ */ jsx97(
14513
+ return /* @__PURE__ */ jsx100(
14219
14514
  Button_default,
14220
14515
  {
14221
14516
  onClick: () => handleMenuItemClick(item),
@@ -14241,8 +14536,8 @@ var BaseUserDropdown = ({
14241
14536
  var BaseUserDropdown_default = BaseUserDropdown;
14242
14537
 
14243
14538
  // src/components/presentation/UserDropdown/UserDropdown.tsx
14244
- import { useState as useState27 } from "react";
14245
- import { Fragment as Fragment17, jsx as jsx98, jsxs as jsxs42 } from "react/jsx-runtime";
14539
+ import { useState as useState28 } from "react";
14540
+ import { Fragment as Fragment20, jsx as jsx101, jsxs as jsxs43 } from "react/jsx-runtime";
14246
14541
  var UserDropdown = ({
14247
14542
  children,
14248
14543
  renderTrigger,
@@ -14251,7 +14546,7 @@ var UserDropdown = ({
14251
14546
  ...rest
14252
14547
  }) => {
14253
14548
  const { user, isLoading, signOut, meta } = useAsgardeo_default();
14254
- const [isProfileOpen, setIsProfileOpen] = useState27(false);
14549
+ const [isProfileOpen, setIsProfileOpen] = useState28(false);
14255
14550
  const handleManageProfile = () => {
14256
14551
  setIsProfileOpen(true);
14257
14552
  };
@@ -14274,14 +14569,14 @@ var UserDropdown = ({
14274
14569
  user
14275
14570
  };
14276
14571
  if (children) {
14277
- return /* @__PURE__ */ jsxs42(Fragment17, { children: [
14572
+ return /* @__PURE__ */ jsxs43(Fragment20, { children: [
14278
14573
  children(renderProps),
14279
- /* @__PURE__ */ jsx98(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14574
+ /* @__PURE__ */ jsx101(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14280
14575
  ] });
14281
14576
  }
14282
14577
  if (renderTrigger || renderDropdown) {
14283
- return /* @__PURE__ */ jsxs42(Fragment17, { children: [
14284
- renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx98(
14578
+ return /* @__PURE__ */ jsxs43(Fragment20, { children: [
14579
+ renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx101(
14285
14580
  BaseUserDropdown,
14286
14581
  {
14287
14582
  user,
@@ -14291,11 +14586,11 @@ var UserDropdown = ({
14291
14586
  ...rest
14292
14587
  }
14293
14588
  ),
14294
- /* @__PURE__ */ jsx98(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14589
+ /* @__PURE__ */ jsx101(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14295
14590
  ] });
14296
14591
  }
14297
- return /* @__PURE__ */ jsxs42(Fragment17, { children: [
14298
- /* @__PURE__ */ jsx98(
14592
+ return /* @__PURE__ */ jsxs43(Fragment20, { children: [
14593
+ /* @__PURE__ */ jsx101(
14299
14594
  BaseUserDropdown,
14300
14595
  {
14301
14596
  user,
@@ -14305,7 +14600,7 @@ var UserDropdown = ({
14305
14600
  ...rest
14306
14601
  }
14307
14602
  ),
14308
- isProfileOpen && /* @__PURE__ */ jsx98(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14603
+ isProfileOpen && /* @__PURE__ */ jsx101(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14309
14604
  ] });
14310
14605
  };
14311
14606
  var UserDropdown_default = UserDropdown;
@@ -14325,7 +14620,7 @@ import {
14325
14620
  FloatingFocusManager as FloatingFocusManager3,
14326
14621
  FloatingPortal as FloatingPortal3
14327
14622
  } from "@floating-ui/react";
14328
- import { useState as useState28 } from "react";
14623
+ import { useState as useState29 } from "react";
14329
14624
 
14330
14625
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.ts
14331
14626
  import { css as css26 } from "@emotion/css";
@@ -14553,9 +14848,9 @@ var useStyles25 = (theme, colorScheme) => useMemo36(() => {
14553
14848
  var BaseOrganizationSwitcher_styles_default = useStyles25;
14554
14849
 
14555
14850
  // src/components/primitives/Icons/Building.tsx
14556
- import { jsx as jsx99, jsxs as jsxs43 } from "react/jsx-runtime";
14557
- var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs43("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
14558
- /* @__PURE__ */ jsx99(
14851
+ import { jsx as jsx102, jsxs as jsxs44 } from "react/jsx-runtime";
14852
+ var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs44("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
14853
+ /* @__PURE__ */ jsx102(
14559
14854
  "path",
14560
14855
  {
14561
14856
  d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",
@@ -14565,30 +14860,30 @@ var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PU
14565
14860
  strokeLinejoin: "round"
14566
14861
  }
14567
14862
  ),
14568
- /* @__PURE__ */ jsx99("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14569
- /* @__PURE__ */ jsx99("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14570
- /* @__PURE__ */ jsx99("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14571
- /* @__PURE__ */ jsx99("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14572
- /* @__PURE__ */ jsx99("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14573
- /* @__PURE__ */ jsx99("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
14863
+ /* @__PURE__ */ jsx102("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14864
+ /* @__PURE__ */ jsx102("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14865
+ /* @__PURE__ */ jsx102("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14866
+ /* @__PURE__ */ jsx102("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14867
+ /* @__PURE__ */ jsx102("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14868
+ /* @__PURE__ */ jsx102("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
14574
14869
  ] });
14575
14870
  Building.displayName = "Building";
14576
14871
  var Building_default = Building;
14577
14872
 
14578
14873
  // src/components/primitives/Icons/Check.tsx
14579
- import { jsx as jsx100 } from "react/jsx-runtime";
14580
- var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx100("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx100("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14874
+ import { jsx as jsx103 } from "react/jsx-runtime";
14875
+ var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx103("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx103("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14581
14876
  Check.displayName = "Check";
14582
14877
  var Check_default = Check;
14583
14878
 
14584
14879
  // src/components/primitives/Icons/ChevronDown.tsx
14585
- import { jsx as jsx101 } from "react/jsx-runtime";
14586
- var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx101("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx101("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14880
+ import { jsx as jsx104 } from "react/jsx-runtime";
14881
+ var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx104("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx104("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14587
14882
  ChevronDown.displayName = "ChevronDown";
14588
14883
  var ChevronDown_default = ChevronDown;
14589
14884
 
14590
14885
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
14591
- import { Fragment as Fragment18, jsx as jsx102, jsxs as jsxs44 } from "react/jsx-runtime";
14886
+ import { Fragment as Fragment21, jsx as jsx105, jsxs as jsxs45 } from "react/jsx-runtime";
14592
14887
  var BaseOrganizationSwitcher = ({
14593
14888
  organizations,
14594
14889
  currentOrganization,
@@ -14612,8 +14907,8 @@ var BaseOrganizationSwitcher = ({
14612
14907
  }) => {
14613
14908
  const { theme, colorScheme, direction } = useTheme_default();
14614
14909
  const styles = BaseOrganizationSwitcher_styles_default(theme, colorScheme);
14615
- const [isOpen, setIsOpen] = useState28(false);
14616
- const [hoveredItemIndex, setHoveredItemIndex] = useState28(null);
14910
+ const [isOpen, setIsOpen] = useState29(false);
14911
+ const [hoveredItemIndex, setHoveredItemIndex] = useState29(null);
14617
14912
  const { t } = useTranslation_default(preferences?.i18n);
14618
14913
  const isRTL = direction === "rtl";
14619
14914
  const { refs, floatingStyles, context } = useFloating3({
@@ -14643,8 +14938,8 @@ var BaseOrganizationSwitcher = ({
14643
14938
  const switchableOrganizations = organizations.filter(
14644
14939
  (org) => org.id !== currentOrganization?.id
14645
14940
  );
14646
- const defaultRenderOrganization2 = (organization, isSelected) => /* @__PURE__ */ jsxs44(Fragment18, { children: [
14647
- /* @__PURE__ */ jsx102(
14941
+ const defaultRenderOrganization2 = (organization, isSelected) => /* @__PURE__ */ jsxs45(Fragment21, { children: [
14942
+ /* @__PURE__ */ jsx105(
14648
14943
  Avatar,
14649
14944
  {
14650
14945
  variant: "square",
@@ -14654,24 +14949,24 @@ var BaseOrganizationSwitcher = ({
14654
14949
  alt: `${organization.name} avatar`
14655
14950
  }
14656
14951
  ),
14657
- /* @__PURE__ */ jsxs44("div", { className: cx30(styles["organizationInfo"]), children: [
14658
- /* @__PURE__ */ jsx102(Typography_default, { variant: "body2", fontWeight: "medium", className: cx30(styles["organizationName"]), children: organization.name }),
14659
- /* @__PURE__ */ jsxs44("div", { className: cx30(styles["organizationMeta"]), children: [
14660
- showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsxs44("span", { children: [
14952
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["organizationInfo"]), children: [
14953
+ /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", fontWeight: "medium", className: cx30(styles["organizationName"]), children: organization.name }),
14954
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["organizationMeta"]), children: [
14955
+ showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsxs45("span", { children: [
14661
14956
  organization.memberCount,
14662
14957
  " ",
14663
14958
  organization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members")
14664
14959
  ] }),
14665
- showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx102("span", { children: " \u2022 " }),
14666
- showRole && organization.role && /* @__PURE__ */ jsx102("span", { className: cx30(styles["roleCapitalized"]), children: organization.role })
14960
+ showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx105("span", { children: " \u2022 " }),
14961
+ showRole && organization.role && /* @__PURE__ */ jsx105("span", { className: cx30(styles["roleCapitalized"]), children: organization.role })
14667
14962
  ] })
14668
14963
  ] }),
14669
- isSelected && /* @__PURE__ */ jsx102(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
14964
+ isSelected && /* @__PURE__ */ jsx105(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
14670
14965
  ] });
14671
- const defaultRenderLoading2 = () => /* @__PURE__ */ jsx102("div", { className: cx30(styles["loadingContainer"]), children: /* @__PURE__ */ jsx102(Typography_default, { variant: "caption", className: cx30(styles["loadingText"]), children: t("organization.switcher.loading.placeholder.organizations") }) });
14672
- const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx102("div", { className: cx30(styles["errorContainer"]), children: /* @__PURE__ */ jsx102(Typography_default, { variant: "caption", className: cx30(styles["errorText"]), children: errorMessage }) });
14673
- return /* @__PURE__ */ jsxs44("div", { className: cx30(styles["root"], className), style, children: [
14674
- /* @__PURE__ */ jsxs44(
14966
+ const defaultRenderLoading2 = () => /* @__PURE__ */ jsx105("div", { className: cx30(styles["loadingContainer"]), children: /* @__PURE__ */ jsx105(Typography_default, { variant: "caption", className: cx30(styles["loadingText"]), children: t("organization.switcher.loading.placeholder.organizations") }) });
14967
+ const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx105("div", { className: cx30(styles["errorContainer"]), children: /* @__PURE__ */ jsx105(Typography_default, { variant: "caption", className: cx30(styles["errorText"]), children: errorMessage }) });
14968
+ return /* @__PURE__ */ jsxs45("div", { className: cx30(styles["root"], className), style, children: [
14969
+ /* @__PURE__ */ jsxs45(
14675
14970
  Button_default,
14676
14971
  {
14677
14972
  ref: refs.setReference,
@@ -14681,8 +14976,8 @@ var BaseOrganizationSwitcher = ({
14681
14976
  size: "medium",
14682
14977
  ...getReferenceProps(),
14683
14978
  children: [
14684
- currentOrganization ? /* @__PURE__ */ jsxs44(Fragment18, { children: [
14685
- /* @__PURE__ */ jsx102(
14979
+ currentOrganization ? /* @__PURE__ */ jsxs45(Fragment21, { children: [
14980
+ /* @__PURE__ */ jsx105(
14686
14981
  Avatar,
14687
14982
  {
14688
14983
  variant: "square",
@@ -14692,16 +14987,16 @@ var BaseOrganizationSwitcher = ({
14692
14987
  alt: `${currentOrganization.name} avatar`
14693
14988
  }
14694
14989
  ),
14695
- showTriggerLabel && /* @__PURE__ */ jsx102(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: currentOrganization.name })
14696
- ] }) : /* @__PURE__ */ jsxs44(Fragment18, { children: [
14697
- /* @__PURE__ */ jsx102(Building_default, { width: avatarSize, height: avatarSize }),
14698
- showTriggerLabel && /* @__PURE__ */ jsx102(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: t("elements.fields.organization.select.label") })
14990
+ showTriggerLabel && /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: currentOrganization.name })
14991
+ ] }) : /* @__PURE__ */ jsxs45(Fragment21, { children: [
14992
+ /* @__PURE__ */ jsx105(Building_default, { width: avatarSize, height: avatarSize }),
14993
+ showTriggerLabel && /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: t("elements.fields.organization.select.label") })
14699
14994
  ] }),
14700
- /* @__PURE__ */ jsx102("span", { style: { display: "inline-flex", transform: isRTL ? "scaleX(-1)" : "none" }, children: /* @__PURE__ */ jsx102(ChevronDown_default, { width: "16", height: "16" }) })
14995
+ /* @__PURE__ */ jsx105("span", { style: { display: "inline-flex", transform: isRTL ? "scaleX(-1)" : "none" }, children: /* @__PURE__ */ jsx105(ChevronDown_default, { width: "16", height: "16" }) })
14701
14996
  ]
14702
14997
  }
14703
14998
  ),
14704
- isOpen && /* @__PURE__ */ jsx102(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx102(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs44(
14999
+ isOpen && /* @__PURE__ */ jsx105(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx105(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs45(
14705
15000
  "div",
14706
15001
  {
14707
15002
  ref: refs.setFloating,
@@ -14709,8 +15004,8 @@ var BaseOrganizationSwitcher = ({
14709
15004
  style: floatingStyles,
14710
15005
  ...getFloatingProps(),
14711
15006
  children: [
14712
- currentOrganization && /* @__PURE__ */ jsxs44("div", { className: cx30(styles["header"]), children: [
14713
- /* @__PURE__ */ jsx102(
15007
+ currentOrganization && /* @__PURE__ */ jsxs45("div", { className: cx30(styles["header"]), children: [
15008
+ /* @__PURE__ */ jsx105(
14714
15009
  Avatar,
14715
15010
  {
14716
15011
  variant: "square",
@@ -14720,10 +15015,10 @@ var BaseOrganizationSwitcher = ({
14720
15015
  alt: `${currentOrganization.name} avatar`
14721
15016
  }
14722
15017
  ),
14723
- /* @__PURE__ */ jsxs44("div", { className: cx30(styles["headerInfo"]), children: [
14724
- /* @__PURE__ */ jsx102(Typography_default, { noWrap: true, className: cx30(styles["headerName"]), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
14725
- /* @__PURE__ */ jsxs44("div", { className: cx30(styles["headerMeta"]), children: [
14726
- showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ jsxs44(
15018
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["headerInfo"]), children: [
15019
+ /* @__PURE__ */ jsx105(Typography_default, { noWrap: true, className: cx30(styles["headerName"]), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
15020
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["headerMeta"]), children: [
15021
+ showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ jsxs45(
14727
15022
  Typography_default,
14728
15023
  {
14729
15024
  noWrap: true,
@@ -14733,17 +15028,17 @@ var BaseOrganizationSwitcher = ({
14733
15028
  currentOrganization.memberCount,
14734
15029
  " ",
14735
15030
  currentOrganization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members"),
14736
- showRole && currentOrganization.role && /* @__PURE__ */ jsxs44("span", { children: [
15031
+ showRole && currentOrganization.role && /* @__PURE__ */ jsxs45("span", { children: [
14737
15032
  " \u2022 ",
14738
15033
  currentOrganization.role
14739
15034
  ] })
14740
15035
  ]
14741
15036
  }
14742
15037
  ),
14743
- showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx102(Typography_default, { noWrap: true, className: cx30(styles["headerRole"]), variant: "caption", color: "secondary", children: currentOrganization.role })
15038
+ showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx105(Typography_default, { noWrap: true, className: cx30(styles["headerRole"]), variant: "caption", color: "secondary", children: currentOrganization.role })
14744
15039
  ] })
14745
15040
  ] }),
14746
- onManageProfile && /* @__PURE__ */ jsx102(
15041
+ onManageProfile && /* @__PURE__ */ jsx105(
14747
15042
  Button_default,
14748
15043
  {
14749
15044
  onClick: onManageProfile,
@@ -14752,7 +15047,7 @@ var BaseOrganizationSwitcher = ({
14752
15047
  size: "small",
14753
15048
  "aria-label": "Manage Organization Profile",
14754
15049
  className: cx30(styles["manageButton"]),
14755
- endIcon: /* @__PURE__ */ jsxs44(
15050
+ endIcon: /* @__PURE__ */ jsxs45(
14756
15051
  "svg",
14757
15052
  {
14758
15053
  width: "16",
@@ -14764,8 +15059,8 @@ var BaseOrganizationSwitcher = ({
14764
15059
  strokeLinecap: "round",
14765
15060
  strokeLinejoin: "round",
14766
15061
  children: [
14767
- /* @__PURE__ */ jsx102("circle", { cx: "12", cy: "12", r: "3" }),
14768
- /* @__PURE__ */ jsx102("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
15062
+ /* @__PURE__ */ jsx105("circle", { cx: "12", cy: "12", r: "3" }),
15063
+ /* @__PURE__ */ jsx105("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
14769
15064
  ]
14770
15065
  }
14771
15066
  ),
@@ -14773,27 +15068,27 @@ var BaseOrganizationSwitcher = ({
14773
15068
  }
14774
15069
  )
14775
15070
  ] }),
14776
- organizations.length > 1 && /* @__PURE__ */ jsx102(
15071
+ organizations.length > 1 && /* @__PURE__ */ jsx105(
14777
15072
  "div",
14778
15073
  {
14779
15074
  className: cx30(styles["header"], styles["sectionHeaderContainer"]),
14780
15075
  style: {
14781
15076
  borderTop: currentOrganization ? `1px solid ${theme.vars.colors.border}` : "none"
14782
15077
  },
14783
- children: /* @__PURE__ */ jsx102(Typography_default, { variant: "caption", fontWeight: 600, className: cx30(styles["sectionHeader"]), children: t("organization.switcher.switch.organization") })
15078
+ children: /* @__PURE__ */ jsx105(Typography_default, { variant: "caption", fontWeight: 600, className: cx30(styles["sectionHeader"]), children: t("organization.switcher.switch.organization") })
14784
15079
  }
14785
15080
  ),
14786
- /* @__PURE__ */ jsx102("div", { className: cx30(styles["menu"]), children: (() => {
15081
+ /* @__PURE__ */ jsx105("div", { className: cx30(styles["menu"]), children: (() => {
14787
15082
  if (loading) {
14788
15083
  return renderLoading ? renderLoading() : defaultRenderLoading2();
14789
15084
  }
14790
15085
  if (error) {
14791
15086
  return renderError ? renderError(error) : defaultRenderError2(error);
14792
15087
  }
14793
- return /* @__PURE__ */ jsxs44(Fragment18, { children: [
15088
+ return /* @__PURE__ */ jsxs45(Fragment21, { children: [
14794
15089
  switchableOrganizations.map((organization) => {
14795
15090
  const isSelected = false;
14796
- return /* @__PURE__ */ jsx102(
15091
+ return /* @__PURE__ */ jsx105(
14797
15092
  Button_default,
14798
15093
  {
14799
15094
  onClick: () => handleOrganizationSwitch(organization),
@@ -14811,10 +15106,10 @@ var BaseOrganizationSwitcher = ({
14811
15106
  organization.id
14812
15107
  );
14813
15108
  }),
14814
- menuItems.length > 0 && /* @__PURE__ */ jsxs44(Fragment18, { children: [
14815
- /* @__PURE__ */ jsx102("div", { className: cx30(styles["menuDivider"]) }),
15109
+ menuItems.length > 0 && /* @__PURE__ */ jsxs45(Fragment21, { children: [
15110
+ /* @__PURE__ */ jsx105("div", { className: cx30(styles["menuDivider"]) }),
14816
15111
  menuItems.map(
14817
- (item, index) => /* @__PURE__ */ jsx102("div", { children: item.href ? /* @__PURE__ */ jsxs44(
15112
+ (item, index) => /* @__PURE__ */ jsx105("div", { children: item.href ? /* @__PURE__ */ jsxs45(
14818
15113
  "a",
14819
15114
  {
14820
15115
  href: item.href,
@@ -14828,10 +15123,10 @@ var BaseOrganizationSwitcher = ({
14828
15123
  onBlur: () => setHoveredItemIndex(null),
14829
15124
  children: [
14830
15125
  item.icon,
14831
- /* @__PURE__ */ jsx102("span", { children: item.label })
15126
+ /* @__PURE__ */ jsx105("span", { children: item.label })
14832
15127
  ]
14833
15128
  }
14834
- ) : /* @__PURE__ */ jsx102(
15129
+ ) : /* @__PURE__ */ jsx105(
14835
15130
  Button_default,
14836
15131
  {
14837
15132
  onClick: () => handleMenuItemClick(item),
@@ -14860,11 +15155,11 @@ var BaseOrganizationSwitcher = ({
14860
15155
  var BaseOrganizationSwitcher_default = BaseOrganizationSwitcher;
14861
15156
 
14862
15157
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
14863
- import { useState as useState35 } from "react";
15158
+ import { useState as useState36 } from "react";
14864
15159
 
14865
15160
  // src/components/primitives/Icons/BuildingAlt.tsx
14866
- import { jsx as jsx103, jsxs as jsxs45 } from "react/jsx-runtime";
14867
- var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs45(
15161
+ import { jsx as jsx106, jsxs as jsxs46 } from "react/jsx-runtime";
15162
+ var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs46(
14868
15163
  "svg",
14869
15164
  {
14870
15165
  width,
@@ -14877,13 +15172,13 @@ var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs45(
14877
15172
  strokeLinecap: "round",
14878
15173
  strokeLinejoin: "round",
14879
15174
  children: [
14880
- /* @__PURE__ */ jsx103("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
14881
- /* @__PURE__ */ jsx103("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
14882
- /* @__PURE__ */ jsx103("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
14883
- /* @__PURE__ */ jsx103("path", { d: "M10 6h4" }),
14884
- /* @__PURE__ */ jsx103("path", { d: "M10 10h4" }),
14885
- /* @__PURE__ */ jsx103("path", { d: "M10 14h4" }),
14886
- /* @__PURE__ */ jsx103("path", { d: "M10 18h4" })
15175
+ /* @__PURE__ */ jsx106("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
15176
+ /* @__PURE__ */ jsx106("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
15177
+ /* @__PURE__ */ jsx106("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
15178
+ /* @__PURE__ */ jsx106("path", { d: "M10 6h4" }),
15179
+ /* @__PURE__ */ jsx106("path", { d: "M10 10h4" }),
15180
+ /* @__PURE__ */ jsx106("path", { d: "M10 14h4" }),
15181
+ /* @__PURE__ */ jsx106("path", { d: "M10 18h4" })
14887
15182
  ]
14888
15183
  }
14889
15184
  );
@@ -14891,12 +15186,12 @@ BuildingAlt.displayName = "BuildingAlt";
14891
15186
  var BuildingAlt_default = BuildingAlt;
14892
15187
 
14893
15188
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
14894
- import { useState as useState30 } from "react";
15189
+ import { useState as useState31 } from "react";
14895
15190
 
14896
15191
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
14897
15192
  import { createPackageComponentLogger as createPackageComponentLogger8 } from "@asgardeo/browser";
14898
15193
  import { cx as cx31 } from "@emotion/css";
14899
- import { useState as useState29 } from "react";
15194
+ import { useState as useState30 } from "react";
14900
15195
 
14901
15196
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.styles.ts
14902
15197
  import { css as css27 } from "@emotion/css";
@@ -15037,7 +15332,7 @@ var useStyles26 = (theme, colorScheme) => useMemo37(() => {
15037
15332
  var BaseCreateOrganization_styles_default = useStyles26;
15038
15333
 
15039
15334
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
15040
- import { jsx as jsx104, jsxs as jsxs46 } from "react/jsx-runtime";
15335
+ import { jsx as jsx107, jsxs as jsxs47 } from "react/jsx-runtime";
15041
15336
  var logger8 = createPackageComponentLogger8(
15042
15337
  "@asgardeo/react",
15043
15338
  "BaseCreateOrganization"
@@ -15064,13 +15359,13 @@ var BaseCreateOrganization = ({
15064
15359
  const { theme, colorScheme } = useTheme_default();
15065
15360
  const styles = BaseCreateOrganization_styles_default(theme, colorScheme);
15066
15361
  const { t } = useTranslation_default(preferences?.i18n);
15067
- const [formData, setFormData] = useState29({
15362
+ const [formData, setFormData] = useState30({
15068
15363
  description: "",
15069
15364
  handle: "",
15070
15365
  name: "",
15071
15366
  ...initialValues
15072
15367
  });
15073
- const [formErrors, setFormErrors] = useState29({});
15368
+ const [formErrors, setFormErrors] = useState30({});
15074
15369
  const validateForm = () => {
15075
15370
  const errors = {};
15076
15371
  if (!formData.name.trim()) {
@@ -15127,13 +15422,13 @@ var BaseCreateOrganization = ({
15127
15422
  logger8.error("Form submission error:");
15128
15423
  }
15129
15424
  };
15130
- const createOrganizationContent = /* @__PURE__ */ jsx104("div", { className: cx31(styles["root"], cardLayout && styles["card"], className), style, children: /* @__PURE__ */ jsxs46("div", { className: cx31(styles["content"]), children: [
15131
- /* @__PURE__ */ jsxs46("form", { id: "create-organization-form", className: cx31(styles["form"]), onSubmit: handleSubmit, children: [
15132
- error && /* @__PURE__ */ jsxs46(Alert_default, { variant: "error", className: styles["errorAlert"], children: [
15133
- /* @__PURE__ */ jsx104(Alert_default.Title, { children: "Error" }),
15134
- /* @__PURE__ */ jsx104(Alert_default.Description, { children: error })
15425
+ const createOrganizationContent = /* @__PURE__ */ jsx107("div", { className: cx31(styles["root"], cardLayout && styles["card"], className), style, children: /* @__PURE__ */ jsxs47("div", { className: cx31(styles["content"]), children: [
15426
+ /* @__PURE__ */ jsxs47("form", { id: "create-organization-form", className: cx31(styles["form"]), onSubmit: handleSubmit, children: [
15427
+ error && /* @__PURE__ */ jsxs47(Alert_default, { variant: "error", className: styles["errorAlert"], children: [
15428
+ /* @__PURE__ */ jsx107(Alert_default.Title, { children: "Error" }),
15429
+ /* @__PURE__ */ jsx107(Alert_default.Description, { children: error })
15135
15430
  ] }),
15136
- /* @__PURE__ */ jsx104("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx104(
15431
+ /* @__PURE__ */ jsx107("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx107(
15137
15432
  TextField_default,
15138
15433
  {
15139
15434
  label: `${t("elements.fields.organization.name.label")}`,
@@ -15146,7 +15441,7 @@ var BaseCreateOrganization = ({
15146
15441
  className: cx31(styles["input"])
15147
15442
  }
15148
15443
  ) }),
15149
- /* @__PURE__ */ jsx104("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx104(
15444
+ /* @__PURE__ */ jsx107("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx107(
15150
15445
  TextField_default,
15151
15446
  {
15152
15447
  label: `${t("elements.fields.organization.handle.label") || "Organization Handle"}`,
@@ -15160,9 +15455,9 @@ var BaseCreateOrganization = ({
15160
15455
  className: cx31(styles["input"])
15161
15456
  }
15162
15457
  ) }),
15163
- /* @__PURE__ */ jsx104("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsxs46(FormControl_default, { error: formErrors.description, children: [
15164
- /* @__PURE__ */ jsx104(InputLabel_default, { required: true, children: t("elements.fields.organization.description.label") }),
15165
- /* @__PURE__ */ jsx104(
15458
+ /* @__PURE__ */ jsx107("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsxs47(FormControl_default, { error: formErrors.description, children: [
15459
+ /* @__PURE__ */ jsx107(InputLabel_default, { required: true, children: t("elements.fields.organization.description.label") }),
15460
+ /* @__PURE__ */ jsx107(
15166
15461
  "textarea",
15167
15462
  {
15168
15463
  className: cx31(styles["textarea"], formErrors.description && styles["textareaError"]),
@@ -15176,15 +15471,15 @@ var BaseCreateOrganization = ({
15176
15471
  ] }) }),
15177
15472
  renderAdditionalFields && renderAdditionalFields()
15178
15473
  ] }),
15179
- /* @__PURE__ */ jsxs46("div", { className: cx31(styles["actions"]), children: [
15180
- onCancel && /* @__PURE__ */ jsx104(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.buttons.cancel.text") }),
15181
- /* @__PURE__ */ jsx104(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.buttons.create_organization.loading.text") : t("organization.create.buttons.create_organization.text") })
15474
+ /* @__PURE__ */ jsxs47("div", { className: cx31(styles["actions"]), children: [
15475
+ onCancel && /* @__PURE__ */ jsx107(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.buttons.cancel.text") }),
15476
+ /* @__PURE__ */ jsx107(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.buttons.create_organization.loading.text") : t("organization.create.buttons.create_organization.text") })
15182
15477
  ] })
15183
15478
  ] }) });
15184
15479
  if (mode === "popup") {
15185
- return /* @__PURE__ */ jsx104(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs46(Dialog_default.Content, { children: [
15186
- /* @__PURE__ */ jsx104(Dialog_default.Heading, { children: title }),
15187
- /* @__PURE__ */ jsx104("div", { className: styles["popup"], children: createOrganizationContent })
15480
+ return /* @__PURE__ */ jsx107(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs47(Dialog_default.Content, { children: [
15481
+ /* @__PURE__ */ jsx107(Dialog_default.Heading, { children: title }),
15482
+ /* @__PURE__ */ jsx107("div", { className: styles["popup"], children: createOrganizationContent })
15188
15483
  ] }) });
15189
15484
  }
15190
15485
  return createOrganizationContent;
@@ -15225,7 +15520,7 @@ var createOrganization = async ({
15225
15520
  var createOrganization_default = createOrganization;
15226
15521
 
15227
15522
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
15228
- import { Fragment as Fragment19, jsx as jsx105 } from "react/jsx-runtime";
15523
+ import { Fragment as Fragment22, jsx as jsx108 } from "react/jsx-runtime";
15229
15524
  var CreateOrganization = ({
15230
15525
  onCreateOrganization,
15231
15526
  fallback = null,
@@ -15235,13 +15530,13 @@ var CreateOrganization = ({
15235
15530
  }) => {
15236
15531
  const { isSignedIn, baseUrl, instanceId } = useAsgardeo_default();
15237
15532
  const { currentOrganization, revalidateMyOrganizations } = useOrganization_default();
15238
- const [loading, setLoading] = useState30(false);
15239
- const [error, setError] = useState30(null);
15533
+ const [loading, setLoading] = useState31(false);
15534
+ const [error, setError] = useState31(null);
15240
15535
  if (!isSignedIn && fallback) {
15241
15536
  return fallback;
15242
15537
  }
15243
15538
  if (!isSignedIn) {
15244
- return /* @__PURE__ */ jsx105(Fragment19, {});
15539
+ return /* @__PURE__ */ jsx108(Fragment22, {});
15245
15540
  }
15246
15541
  const parentId = defaultParentId || currentOrganization?.id || "";
15247
15542
  const handleSubmit = async (payload) => {
@@ -15276,7 +15571,7 @@ var CreateOrganization = ({
15276
15571
  setLoading(false);
15277
15572
  }
15278
15573
  };
15279
- return /* @__PURE__ */ jsx105(
15574
+ return /* @__PURE__ */ jsx108(
15280
15575
  BaseCreateOrganization,
15281
15576
  {
15282
15577
  onSubmit: handleSubmit,
@@ -15291,7 +15586,7 @@ var CreateOrganization = ({
15291
15586
 
15292
15587
  // src/components/presentation/OrganizationList/OrganizationList.tsx
15293
15588
  import { cx as cx33 } from "@emotion/css";
15294
- import { useEffect as useEffect22, useState as useState31 } from "react";
15589
+ import { useEffect as useEffect23, useState as useState32 } from "react";
15295
15590
 
15296
15591
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
15297
15592
  import { cx as cx32 } from "@emotion/css";
@@ -15524,20 +15819,20 @@ var useStyles27 = (theme, colorScheme) => useMemo38(() => {
15524
15819
  var BaseOrganizationList_styles_default = useStyles27;
15525
15820
 
15526
15821
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
15527
- import { jsx as jsx106, jsxs as jsxs47 } from "react/jsx-runtime";
15528
- var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => /* @__PURE__ */ jsxs47("div", { className: cx32(styles.organizationItem), children: [
15529
- /* @__PURE__ */ jsxs47("div", { className: cx32(styles.organizationContent), children: [
15530
- /* @__PURE__ */ jsx106(Avatar, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
15531
- /* @__PURE__ */ jsxs47("div", { className: cx32(styles.organizationInfo), children: [
15532
- /* @__PURE__ */ jsx106(Typography_default, { variant: "h6", className: cx32(styles.organizationName), children: organization.name }),
15533
- /* @__PURE__ */ jsxs47(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationHandle), children: [
15822
+ import { jsx as jsx109, jsxs as jsxs48 } from "react/jsx-runtime";
15823
+ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => /* @__PURE__ */ jsxs48("div", { className: cx32(styles.organizationItem), children: [
15824
+ /* @__PURE__ */ jsxs48("div", { className: cx32(styles.organizationContent), children: [
15825
+ /* @__PURE__ */ jsx109(Avatar, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
15826
+ /* @__PURE__ */ jsxs48("div", { className: cx32(styles.organizationInfo), children: [
15827
+ /* @__PURE__ */ jsx109(Typography_default, { variant: "h6", className: cx32(styles.organizationName), children: organization.name }),
15828
+ /* @__PURE__ */ jsxs48(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationHandle), children: [
15534
15829
  "@",
15535
15830
  organization.orgHandle
15536
15831
  ] }),
15537
- showStatus && /* @__PURE__ */ jsxs47(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationStatus), children: [
15832
+ showStatus && /* @__PURE__ */ jsxs48(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationStatus), children: [
15538
15833
  t("organization.switcher.status.label"),
15539
15834
  " ",
15540
- /* @__PURE__ */ jsx106(
15835
+ /* @__PURE__ */ jsx109(
15541
15836
  "span",
15542
15837
  {
15543
15838
  className: cx32(
@@ -15550,7 +15845,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
15550
15845
  ] })
15551
15846
  ] })
15552
15847
  ] }),
15553
- organization.canSwitch && /* @__PURE__ */ jsx106("div", { className: cx32(styles.organizationActions), children: /* @__PURE__ */ jsx106(
15848
+ organization.canSwitch && /* @__PURE__ */ jsx109("div", { className: cx32(styles.organizationActions), children: /* @__PURE__ */ jsx109(
15554
15849
  Button_default,
15555
15850
  {
15556
15851
  onClick: (e) => {
@@ -15563,17 +15858,17 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
15563
15858
  }
15564
15859
  ) })
15565
15860
  ] }, organization.id);
15566
- var defaultRenderLoading = (t, styles) => /* @__PURE__ */ jsxs47("div", { className: cx32(styles.loadingContainer), children: [
15567
- /* @__PURE__ */ jsx106(Spinner_default, { size: "medium" }),
15568
- /* @__PURE__ */ jsx106(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.loadingText), children: t("organization.switcher.loading.placeholder.organizations") })
15861
+ var defaultRenderLoading = (t, styles) => /* @__PURE__ */ jsxs48("div", { className: cx32(styles.loadingContainer), children: [
15862
+ /* @__PURE__ */ jsx109(Spinner_default, { size: "medium" }),
15863
+ /* @__PURE__ */ jsx109(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.loadingText), children: t("organization.switcher.loading.placeholder.organizations") })
15569
15864
  ] });
15570
- var defaultRenderError = (errorMessage, t, styles) => /* @__PURE__ */ jsx106("div", { className: cx32(styles.errorContainer), children: /* @__PURE__ */ jsxs47(Typography_default, { variant: "body1", color: "error", children: [
15571
- /* @__PURE__ */ jsx106("strong", { children: t("organization.switcher.error.prefix") }),
15865
+ var defaultRenderError = (errorMessage, t, styles) => /* @__PURE__ */ jsx109("div", { className: cx32(styles.errorContainer), children: /* @__PURE__ */ jsxs48(Typography_default, { variant: "body1", color: "error", children: [
15866
+ /* @__PURE__ */ jsx109("strong", { children: t("organization.switcher.error.prefix") }),
15572
15867
  " ",
15573
15868
  errorMessage
15574
15869
  ] }) });
15575
- var defaultRenderLoadMore = (onLoadMore, isLoadingMore, t, styles) => /* @__PURE__ */ jsx106(Button_default, { onClick: onLoadMore, disabled: isLoadingMore, className: cx32(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoadingMore ? t("organization.switcher.loading.more") : t("organization.switcher.buttons.load_more.text") });
15576
- var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx106("div", { className: cx32(styles.emptyContainer), children: /* @__PURE__ */ jsx106(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
15870
+ var defaultRenderLoadMore = (onLoadMore, isLoadingMore, t, styles) => /* @__PURE__ */ jsx109(Button_default, { onClick: onLoadMore, disabled: isLoadingMore, className: cx32(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoadingMore ? t("organization.switcher.loading.more") : t("organization.switcher.buttons.load_more.text") });
15871
+ var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx109("div", { className: cx32(styles.emptyContainer), children: /* @__PURE__ */ jsx109(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
15577
15872
  var BaseOrganizationList = ({
15578
15873
  className = "",
15579
15874
  allOrganizations,
@@ -15617,42 +15912,42 @@ var BaseOrganizationList = ({
15617
15912
  const renderLoadMoreWithStyles = renderLoadMore || ((onLoadMore, loadingMore) => defaultRenderLoadMore(onLoadMore, loadingMore, t, styles));
15618
15913
  const renderOrganizationWithStyles = renderOrganization || ((org) => defaultRenderOrganization(org, styles, t, onOrganizationSelect, showStatus));
15619
15914
  if (isLoading && organizationsWithSwitchAccess?.length === 0) {
15620
- const loadingContent = /* @__PURE__ */ jsx106("div", { className: cx32(styles["root"], className), style, children: renderLoadingWithStyles() });
15915
+ const loadingContent = /* @__PURE__ */ jsx109("div", { className: cx32(styles["root"], className), style, children: renderLoadingWithStyles() });
15621
15916
  if (mode === "popup") {
15622
- return /* @__PURE__ */ jsx106(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs47(Dialog_default.Content, { children: [
15623
- /* @__PURE__ */ jsx106(Dialog_default.Heading, { children: title }),
15624
- /* @__PURE__ */ jsx106("div", { className: cx32(styles["popupContent"]), children: loadingContent })
15917
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15918
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15919
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: loadingContent })
15625
15920
  ] }) });
15626
15921
  }
15627
15922
  return loadingContent;
15628
15923
  }
15629
15924
  if (error && organizationsWithSwitchAccess?.length === 0) {
15630
- const errorContent = /* @__PURE__ */ jsx106("div", { className: cx32(styles["root"], className), style, children: renderErrorWithStyles(error) });
15925
+ const errorContent = /* @__PURE__ */ jsx109("div", { className: cx32(styles["root"], className), style, children: renderErrorWithStyles(error) });
15631
15926
  if (mode === "popup") {
15632
- return /* @__PURE__ */ jsx106(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs47(Dialog_default.Content, { children: [
15633
- /* @__PURE__ */ jsx106(Dialog_default.Heading, { children: title }),
15634
- /* @__PURE__ */ jsx106("div", { className: cx32(styles["popupContent"]), children: errorContent })
15927
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15928
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15929
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: errorContent })
15635
15930
  ] }) });
15636
15931
  }
15637
15932
  return errorContent;
15638
15933
  }
15639
15934
  if (!isLoading && organizationsWithSwitchAccess?.length === 0) {
15640
- const emptyContent = /* @__PURE__ */ jsx106("div", { className: cx32(styles["root"], className), style, children: renderEmptyWithStyles() });
15935
+ const emptyContent = /* @__PURE__ */ jsx109("div", { className: cx32(styles["root"], className), style, children: renderEmptyWithStyles() });
15641
15936
  if (mode === "popup") {
15642
- return /* @__PURE__ */ jsx106(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs47(Dialog_default.Content, { children: [
15643
- /* @__PURE__ */ jsx106(Dialog_default.Heading, { children: title }),
15644
- /* @__PURE__ */ jsx106("div", { className: cx32(styles["popupContent"]), children: emptyContent })
15937
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15938
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15939
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: emptyContent })
15645
15940
  ] }) });
15646
15941
  }
15647
15942
  return emptyContent;
15648
15943
  }
15649
- const organizationListContent = /* @__PURE__ */ jsxs47("div", { className: cx32(styles["root"], className), style, children: [
15650
- /* @__PURE__ */ jsxs47("div", { className: cx32(styles["header"]), children: [
15651
- /* @__PURE__ */ jsx106("div", { className: cx32(styles["headerInfo"]), children: /* @__PURE__ */ jsx106(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles["subtitle"]), children: t("organization.switcher.showing.count", {
15944
+ const organizationListContent = /* @__PURE__ */ jsxs48("div", { className: cx32(styles["root"], className), style, children: [
15945
+ /* @__PURE__ */ jsxs48("div", { className: cx32(styles["header"]), children: [
15946
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["headerInfo"]), children: /* @__PURE__ */ jsx109(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles["subtitle"]), children: t("organization.switcher.showing.count", {
15652
15947
  showing: organizationsWithSwitchAccess?.length,
15653
15948
  total: allOrganizations?.organizations?.length || 0
15654
15949
  }) }) }),
15655
- onRefresh && /* @__PURE__ */ jsx106(
15950
+ onRefresh && /* @__PURE__ */ jsx109(
15656
15951
  Button_default,
15657
15952
  {
15658
15953
  onClick: onRefresh,
@@ -15664,16 +15959,16 @@ var BaseOrganizationList = ({
15664
15959
  }
15665
15960
  )
15666
15961
  ] }),
15667
- /* @__PURE__ */ jsx106("div", { className: cx32(styles["listContainer"]), children: organizationsWithSwitchAccess?.map(
15962
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["listContainer"]), children: organizationsWithSwitchAccess?.map(
15668
15963
  (organization, index) => renderOrganizationWithStyles(organization, index)
15669
15964
  ) }),
15670
- error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx106("div", { className: cx32(styles["errorMargin"]), children: renderErrorWithStyles(error) }),
15671
- hasMore && fetchMore && /* @__PURE__ */ jsx106("div", { className: cx32(styles["loadMoreMargin"]), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
15965
+ error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx109("div", { className: cx32(styles["errorMargin"]), children: renderErrorWithStyles(error) }),
15966
+ hasMore && fetchMore && /* @__PURE__ */ jsx109("div", { className: cx32(styles["loadMoreMargin"]), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
15672
15967
  ] });
15673
15968
  if (mode === "popup") {
15674
- return /* @__PURE__ */ jsx106(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs47(Dialog_default.Content, { children: [
15675
- /* @__PURE__ */ jsx106(Dialog_default.Heading, { children: title }),
15676
- /* @__PURE__ */ jsx106("div", { className: cx32(styles["popupContent"]), children: organizationListContent })
15969
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15970
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15971
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: organizationListContent })
15677
15972
  ] }) });
15678
15973
  }
15679
15974
  return organizationListContent;
@@ -15743,22 +16038,22 @@ var useStyles28 = (theme, colorScheme) => useMemo40(() => {
15743
16038
  var OrganizationList_styles_default = useStyles28;
15744
16039
 
15745
16040
  // src/components/presentation/OrganizationList/OrganizationList.tsx
15746
- import { jsx as jsx107 } from "react/jsx-runtime";
16041
+ import { jsx as jsx110 } from "react/jsx-runtime";
15747
16042
  var OrganizationList = (props) => {
15748
16043
  const { onOrganizationSelect, className = "", style, ...baseProps } = props;
15749
16044
  const { autoFetch, filter, limit, recursive, ...filteredBaseProps } = baseProps;
15750
16045
  const { theme, colorScheme } = useTheme_default();
15751
16046
  const styles = OrganizationList_styles_default(theme, colorScheme);
15752
16047
  const { getAllOrganizations: getAllOrganizations2, error, isLoading, myOrganizations } = useOrganization_default();
15753
- const [allOrganizations, setAllOrganizations] = useState31({
16048
+ const [allOrganizations, setAllOrganizations] = useState32({
15754
16049
  organizations: []
15755
16050
  });
15756
- useEffect22(() => {
16051
+ useEffect23(() => {
15757
16052
  (async () => {
15758
16053
  setAllOrganizations(await getAllOrganizations2());
15759
16054
  })();
15760
16055
  }, []);
15761
- return /* @__PURE__ */ jsx107("div", { className: cx33(styles["root"], className), style, children: /* @__PURE__ */ jsx107("div", { className: cx33(styles["container"]), children: /* @__PURE__ */ jsx107(
16056
+ return /* @__PURE__ */ jsx110("div", { className: cx33(styles["root"], className), style, children: /* @__PURE__ */ jsx110("div", { className: cx33(styles["container"]), children: /* @__PURE__ */ jsx110(
15762
16057
  BaseOrganizationList,
15763
16058
  {
15764
16059
  allOrganizations,
@@ -15774,12 +16069,12 @@ var OrganizationList_default = OrganizationList;
15774
16069
 
15775
16070
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
15776
16071
  import { createPackageComponentLogger as createPackageComponentLogger9 } from "@asgardeo/browser";
15777
- import { useEffect as useEffect23, useState as useState34 } from "react";
16072
+ import { useEffect as useEffect24, useState as useState35 } from "react";
15778
16073
 
15779
16074
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
15780
16075
  import { formatDate } from "@asgardeo/browser";
15781
16076
  import { cx as cx35 } from "@emotion/css";
15782
- import { useState as useState33, useCallback as useCallback19 } from "react";
16077
+ import { useState as useState34, useCallback as useCallback19 } from "react";
15783
16078
 
15784
16079
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.ts
15785
16080
  import { css as css30 } from "@emotion/css";
@@ -15940,7 +16235,7 @@ var BaseOrganizationProfile_styles_default = useStyles29;
15940
16235
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
15941
16236
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix29, bem as bem20 } from "@asgardeo/browser";
15942
16237
  import { cx as cx34 } from "@emotion/css";
15943
- import { useState as useState32, useCallback as useCallback18 } from "react";
16238
+ import { useState as useState33, useCallback as useCallback18 } from "react";
15944
16239
 
15945
16240
  // src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
15946
16241
  import { css as css31 } from "@emotion/css";
@@ -16097,7 +16392,7 @@ var useStyles30 = (theme, colorScheme, disabled, readOnly, hasError) => useMemo4
16097
16392
  var KeyValueInput_styles_default = useStyles30;
16098
16393
 
16099
16394
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
16100
- import { jsx as jsx108, jsxs as jsxs48 } from "react/jsx-runtime";
16395
+ import { jsx as jsx111, jsxs as jsxs49 } from "react/jsx-runtime";
16101
16396
  var KeyValueInput = ({
16102
16397
  className = "",
16103
16398
  disabled = false,
@@ -16120,9 +16415,9 @@ var KeyValueInput = ({
16120
16415
  const { theme, colorScheme } = useTheme_default();
16121
16416
  const styles = KeyValueInput_styles_default(theme, colorScheme, disabled, readOnly, !!error);
16122
16417
  const initialPairs = Array.isArray(value) ? value : Object.entries(value).map(([key, val]) => ({ key, value: String(val) }));
16123
- const [pairs, setPairs] = useState32(initialPairs);
16124
- const [newKey, setNewKey] = useState32("");
16125
- const [newValue, setNewValue] = useState32("");
16418
+ const [pairs, setPairs] = useState33(initialPairs);
16419
+ const [newKey, setNewKey] = useState33("");
16420
+ const [newValue, setNewValue] = useState33("");
16126
16421
  const handleAddPair = useCallback18(() => {
16127
16422
  if (!newKey.trim() || !newValue.trim()) return;
16128
16423
  if (maxPairs && pairs.length >= maxPairs) return;
@@ -16174,18 +16469,18 @@ var KeyValueInput = ({
16174
16469
  const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
16175
16470
  const renderReadOnlyContent = () => {
16176
16471
  if (pairs.length === 0) {
16177
- return /* @__PURE__ */ jsx108("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "empty-state")), styles["emptyState"]), children: "No attributes defined" });
16472
+ return /* @__PURE__ */ jsx111("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "empty-state")), styles["emptyState"]), children: "No attributes defined" });
16178
16473
  }
16179
- return pairs.map((pair, index) => /* @__PURE__ */ jsxs48(
16474
+ return pairs.map((pair, index) => /* @__PURE__ */ jsxs49(
16180
16475
  "div",
16181
16476
  {
16182
16477
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-pair")), styles["readOnlyPair"]),
16183
16478
  children: [
16184
- /* @__PURE__ */ jsxs48("span", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-key")), styles["readOnlyKey"]), children: [
16479
+ /* @__PURE__ */ jsxs49("span", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-key")), styles["readOnlyKey"]), children: [
16185
16480
  pair.key,
16186
16481
  ":"
16187
16482
  ] }),
16188
- /* @__PURE__ */ jsx108(
16483
+ /* @__PURE__ */ jsx111(
16189
16484
  "span",
16190
16485
  {
16191
16486
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-value")), styles["readOnlyValue"]),
@@ -16197,10 +16492,10 @@ var KeyValueInput = ({
16197
16492
  `${pair.key}-${index}`
16198
16493
  ));
16199
16494
  };
16200
- return /* @__PURE__ */ jsxs48("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input")), styles["container"], className), children: [
16201
- label && /* @__PURE__ */ jsxs48("label", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "label")), styles["label"]), children: [
16495
+ return /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input")), styles["container"], className), children: [
16496
+ label && /* @__PURE__ */ jsxs49("label", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "label")), styles["label"]), children: [
16202
16497
  label,
16203
- required && /* @__PURE__ */ jsx108(
16498
+ required && /* @__PURE__ */ jsx111(
16204
16499
  "span",
16205
16500
  {
16206
16501
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "required")), styles["requiredIndicator"]),
@@ -16208,13 +16503,13 @@ var KeyValueInput = ({
16208
16503
  }
16209
16504
  )
16210
16505
  ] }),
16211
- /* @__PURE__ */ jsxs48("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "pairs-list")), styles["pairsList"]), children: [
16212
- readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ jsxs48(
16506
+ /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "pairs-list")), styles["pairsList"]), children: [
16507
+ readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ jsxs49(
16213
16508
  "div",
16214
16509
  {
16215
16510
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "pair-row")), styles["pairRow"]),
16216
16511
  children: [
16217
- /* @__PURE__ */ jsx108(
16512
+ /* @__PURE__ */ jsx111(
16218
16513
  TextField_default,
16219
16514
  {
16220
16515
  placeholder: keyPlaceholder,
@@ -16225,7 +16520,7 @@ var KeyValueInput = ({
16225
16520
  "aria-label": `${keyLabel} ${index + 1}`
16226
16521
  }
16227
16522
  ),
16228
- /* @__PURE__ */ jsx108(
16523
+ /* @__PURE__ */ jsx111(
16229
16524
  TextField_default,
16230
16525
  {
16231
16526
  placeholder: valuePlaceholder,
@@ -16236,7 +16531,7 @@ var KeyValueInput = ({
16236
16531
  "aria-label": `${valueLabel} ${index + 1}`
16237
16532
  }
16238
16533
  ),
16239
- !readOnly && /* @__PURE__ */ jsx108(
16534
+ !readOnly && /* @__PURE__ */ jsx111(
16240
16535
  "button",
16241
16536
  {
16242
16537
  type: "button",
@@ -16247,15 +16542,15 @@ var KeyValueInput = ({
16247
16542
  styles["removeButton"]
16248
16543
  ),
16249
16544
  "aria-label": `${removeButtonText} ${pair.key}`,
16250
- children: /* @__PURE__ */ jsx108(X_default, { width: 16, height: 16 })
16545
+ children: /* @__PURE__ */ jsx111(X_default, { width: 16, height: 16 })
16251
16546
  }
16252
16547
  )
16253
16548
  ]
16254
16549
  },
16255
16550
  `${pair.key}-${index}`
16256
16551
  )),
16257
- !readOnly && /* @__PURE__ */ jsxs48("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "add-row")), styles["addRow"]), children: [
16258
- /* @__PURE__ */ jsx108(
16552
+ !readOnly && /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "add-row")), styles["addRow"]), children: [
16553
+ /* @__PURE__ */ jsx111(
16259
16554
  TextField_default,
16260
16555
  {
16261
16556
  placeholder: keyPlaceholder,
@@ -16266,7 +16561,7 @@ var KeyValueInput = ({
16266
16561
  "aria-label": "New key"
16267
16562
  }
16268
16563
  ),
16269
- /* @__PURE__ */ jsx108(
16564
+ /* @__PURE__ */ jsx111(
16270
16565
  TextField_default,
16271
16566
  {
16272
16567
  placeholder: valuePlaceholder,
@@ -16282,7 +16577,7 @@ var KeyValueInput = ({
16282
16577
  }
16283
16578
  }
16284
16579
  ),
16285
- /* @__PURE__ */ jsx108(
16580
+ /* @__PURE__ */ jsx111(
16286
16581
  "button",
16287
16582
  {
16288
16583
  type: "button",
@@ -16290,13 +16585,13 @@ var KeyValueInput = ({
16290
16585
  disabled: isAddDisabled,
16291
16586
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "add-button")), styles["addButton"]),
16292
16587
  "aria-label": "Add new key-value pair",
16293
- children: /* @__PURE__ */ jsx108(Plus_default, { width: 16, height: 16 })
16588
+ children: /* @__PURE__ */ jsx111(Plus_default, { width: 16, height: 16 })
16294
16589
  }
16295
16590
  )
16296
16591
  ] })
16297
16592
  ] }),
16298
- (helperText || error) && /* @__PURE__ */ jsx108("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "helper-text")), styles["helperText"]), children: error || helperText }),
16299
- maxPairs && /* @__PURE__ */ jsxs48("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "counter")), styles["counterText"]), children: [
16593
+ (helperText || error) && /* @__PURE__ */ jsx111("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "helper-text")), styles["helperText"]), children: error || helperText }),
16594
+ maxPairs && /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "counter")), styles["counterText"]), children: [
16300
16595
  pairs.length,
16301
16596
  " of ",
16302
16597
  maxPairs,
@@ -16307,7 +16602,7 @@ var KeyValueInput = ({
16307
16602
  var KeyValueInput_default = KeyValueInput;
16308
16603
 
16309
16604
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
16310
- import { Fragment as Fragment20, jsx as jsx109, jsxs as jsxs49 } from "react/jsx-runtime";
16605
+ import { Fragment as Fragment23, jsx as jsx112, jsxs as jsxs50 } from "react/jsx-runtime";
16311
16606
  var BaseOrganizationProfile = ({
16312
16607
  fallback = null,
16313
16608
  className = "",
@@ -16354,9 +16649,9 @@ var BaseOrganizationProfile = ({
16354
16649
  }) => {
16355
16650
  const { theme, colorScheme } = useTheme_default();
16356
16651
  const styles = BaseOrganizationProfile_styles_default(theme, colorScheme);
16357
- const [editedOrganization, setEditedOrganization] = useState33(organization);
16358
- const [editingFields, setEditingFields] = useState33({});
16359
- const PencilIcon = () => /* @__PURE__ */ jsx109(
16652
+ const [editedOrganization, setEditedOrganization] = useState34(organization);
16653
+ const [editingFields, setEditingFields] = useState34({});
16654
+ const PencilIcon = () => /* @__PURE__ */ jsx112(
16360
16655
  "svg",
16361
16656
  {
16362
16657
  width: "16",
@@ -16367,7 +16662,7 @@ var BaseOrganizationProfile = ({
16367
16662
  strokeWidth: "2",
16368
16663
  strokeLinecap: "round",
16369
16664
  strokeLinejoin: "round",
16370
- children: /* @__PURE__ */ jsx109("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
16665
+ children: /* @__PURE__ */ jsx112("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
16371
16666
  }
16372
16667
  );
16373
16668
  const toggleFieldEdit = useCallback19((fieldName) => {
@@ -16437,7 +16732,7 @@ var BaseOrganizationProfile = ({
16437
16732
  let fieldInput;
16438
16733
  if (key === "attributes") {
16439
16734
  const attributesValue = typeof fieldValue === "object" && fieldValue !== null ? fieldValue : {};
16440
- fieldInput = /* @__PURE__ */ jsx109(
16735
+ fieldInput = /* @__PURE__ */ jsx112(
16441
16736
  KeyValueInput_default,
16442
16737
  {
16443
16738
  value: attributesValue,
@@ -16475,26 +16770,26 @@ var BaseOrganizationProfile = ({
16475
16770
  }
16476
16771
  );
16477
16772
  } else {
16478
- fieldInput = /* @__PURE__ */ jsx109(TextField_default, { ...commonProps });
16773
+ fieldInput = /* @__PURE__ */ jsx112(TextField_default, { ...commonProps });
16479
16774
  }
16480
- return /* @__PURE__ */ jsxs49(Fragment20, { children: [
16481
- /* @__PURE__ */ jsx109("span", { className: cx35(styles["label"]), children: label }),
16482
- /* @__PURE__ */ jsx109("div", { className: cx35(styles["value"]), children: fieldInput })
16775
+ return /* @__PURE__ */ jsxs50(Fragment23, { children: [
16776
+ /* @__PURE__ */ jsx112("span", { className: cx35(styles["label"]), children: label }),
16777
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["value"]), children: fieldInput })
16483
16778
  ] });
16484
16779
  }
16485
16780
  const hasValue = value !== void 0 && value !== null && value !== "";
16486
16781
  const isFieldEditable = editable && fieldEditable;
16487
16782
  let displayValue;
16488
16783
  if (hasValue) {
16489
- displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx109(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
16784
+ displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx112(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
16490
16785
  } else if (isFieldEditable) {
16491
16786
  displayValue = getFieldPlaceholder(key);
16492
16787
  } else {
16493
16788
  displayValue = "-";
16494
16789
  }
16495
- return /* @__PURE__ */ jsxs49(Fragment20, { children: [
16496
- /* @__PURE__ */ jsx109("span", { className: cx35(styles["label"]), children: label }),
16497
- /* @__PURE__ */ jsx109("div", { className: cx35(styles["value"], !hasValue && styles["valueEmpty"]), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx109(
16790
+ return /* @__PURE__ */ jsxs50(Fragment23, { children: [
16791
+ /* @__PURE__ */ jsx112("span", { className: cx35(styles["label"]), children: label }),
16792
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["value"], !hasValue && styles["valueEmpty"]), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx112(
16498
16793
  Button_default,
16499
16794
  {
16500
16795
  onClick: onStartEdit,
@@ -16517,8 +16812,8 @@ var BaseOrganizationProfile = ({
16517
16812
  if (!shouldShow) {
16518
16813
  return null;
16519
16814
  }
16520
- return /* @__PURE__ */ jsxs49("div", { className: cx35(styles["field"]), children: [
16521
- /* @__PURE__ */ jsx109("div", { className: cx35(styles["fieldContent"]), children: renderField(
16815
+ return /* @__PURE__ */ jsxs50("div", { className: cx35(styles["field"]), children: [
16816
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["fieldContent"]), children: renderField(
16522
16817
  field,
16523
16818
  isFieldEditing,
16524
16819
  (value) => {
@@ -16528,8 +16823,8 @@ var BaseOrganizationProfile = ({
16528
16823
  },
16529
16824
  () => toggleFieldEdit(field.key)
16530
16825
  ) }),
16531
- isFieldEditable && /* @__PURE__ */ jsx109("div", { className: cx35(styles["fieldActions"]), children: isFieldEditing ? /* @__PURE__ */ jsxs49(Fragment20, { children: [
16532
- /* @__PURE__ */ jsx109(
16826
+ isFieldEditable && /* @__PURE__ */ jsx112("div", { className: cx35(styles["fieldActions"]), children: isFieldEditing ? /* @__PURE__ */ jsxs50(Fragment23, { children: [
16827
+ /* @__PURE__ */ jsx112(
16533
16828
  Button_default,
16534
16829
  {
16535
16830
  onClick: () => handleFieldSave(field.key),
@@ -16540,7 +16835,7 @@ var BaseOrganizationProfile = ({
16540
16835
  children: saveButtonText
16541
16836
  }
16542
16837
  ),
16543
- /* @__PURE__ */ jsx109(
16838
+ /* @__PURE__ */ jsx112(
16544
16839
  Button_default,
16545
16840
  {
16546
16841
  onClick: () => handleFieldCancel(field.key),
@@ -16551,7 +16846,7 @@ var BaseOrganizationProfile = ({
16551
16846
  children: cancelButtonText
16552
16847
  }
16553
16848
  )
16554
- ] }) : hasValue && /* @__PURE__ */ jsx109(
16849
+ ] }) : hasValue && /* @__PURE__ */ jsx112(
16555
16850
  Button_default,
16556
16851
  {
16557
16852
  onClick: () => toggleFieldEdit(field.key),
@@ -16560,7 +16855,7 @@ var BaseOrganizationProfile = ({
16560
16855
  size: "small",
16561
16856
  title: "Edit field",
16562
16857
  className: cx35(styles["editButton"]),
16563
- children: /* @__PURE__ */ jsx109(PencilIcon, {})
16858
+ children: /* @__PURE__ */ jsx112(PencilIcon, {})
16564
16859
  }
16565
16860
  ) })
16566
16861
  ] }, field.key);
@@ -16568,23 +16863,23 @@ var BaseOrganizationProfile = ({
16568
16863
  if (!organization) {
16569
16864
  return fallback;
16570
16865
  }
16571
- const profileContent = /* @__PURE__ */ jsxs49(Card_default, { className: cx35(styles["root"], cardLayout && styles["card"], className), children: [
16572
- /* @__PURE__ */ jsxs49("div", { className: cx35(styles["header"]), children: [
16573
- /* @__PURE__ */ jsx109(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
16574
- /* @__PURE__ */ jsxs49("div", { className: cx35(styles["orgInfo"]), children: [
16575
- /* @__PURE__ */ jsx109("h2", { className: cx35(styles["name"]), children: organization.name }),
16576
- organization.orgHandle && /* @__PURE__ */ jsxs49("p", { className: cx35(styles["handle"]), children: [
16866
+ const profileContent = /* @__PURE__ */ jsxs50(Card_default, { className: cx35(styles["root"], cardLayout && styles["card"], className), children: [
16867
+ /* @__PURE__ */ jsxs50("div", { className: cx35(styles["header"]), children: [
16868
+ /* @__PURE__ */ jsx112(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
16869
+ /* @__PURE__ */ jsxs50("div", { className: cx35(styles["orgInfo"]), children: [
16870
+ /* @__PURE__ */ jsx112("h2", { className: cx35(styles["name"]), children: organization.name }),
16871
+ organization.orgHandle && /* @__PURE__ */ jsxs50("p", { className: cx35(styles["handle"]), children: [
16577
16872
  "@",
16578
16873
  organization.orgHandle
16579
16874
  ] })
16580
16875
  ] })
16581
16876
  ] }),
16582
- /* @__PURE__ */ jsx109("div", { className: cx35(styles["infoContainer"]), children: fields.map((field) => renderOrganizationField(field)) })
16877
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["infoContainer"]), children: fields.map((field) => renderOrganizationField(field)) })
16583
16878
  ] });
16584
16879
  if (mode === "popup") {
16585
- return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs49(Dialog_default.Content, { children: [
16586
- /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
16587
- /* @__PURE__ */ jsx109("div", { className: cx35(styles["popup"]), children: profileContent })
16880
+ return /* @__PURE__ */ jsx112(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs50(Dialog_default.Content, { children: [
16881
+ /* @__PURE__ */ jsx112(Dialog_default.Heading, { children: title }),
16882
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["popup"]), children: profileContent })
16588
16883
  ] }) });
16589
16884
  }
16590
16885
  return profileContent;
@@ -16660,7 +16955,7 @@ var updateOrganization = async ({
16660
16955
  var updateOrganization_default = updateOrganization;
16661
16956
 
16662
16957
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
16663
- import { jsx as jsx110 } from "react/jsx-runtime";
16958
+ import { jsx as jsx113 } from "react/jsx-runtime";
16664
16959
  var logger9 = createPackageComponentLogger9(
16665
16960
  "@asgardeo/react",
16666
16961
  "OrganizationProfile"
@@ -16679,7 +16974,7 @@ var OrganizationProfile = ({
16679
16974
  }) => {
16680
16975
  const { baseUrl, instanceId } = useAsgardeo_default();
16681
16976
  const { t } = useTranslation_default(preferences?.i18n);
16682
- const [organization, setOrganization] = useState34(null);
16977
+ const [organization, setOrganization] = useState35(null);
16683
16978
  const fetchOrganization = async () => {
16684
16979
  if (!baseUrl || !organizationId) {
16685
16980
  return;
@@ -16696,7 +16991,7 @@ var OrganizationProfile = ({
16696
16991
  setOrganization(null);
16697
16992
  }
16698
16993
  };
16699
- useEffect23(() => {
16994
+ useEffect24(() => {
16700
16995
  fetchOrganization();
16701
16996
  }, [baseUrl, organizationId]);
16702
16997
  const handleOrganizationUpdate = async (payload) => {
@@ -16718,7 +17013,7 @@ var OrganizationProfile = ({
16718
17013
  throw err;
16719
17014
  }
16720
17015
  };
16721
- return /* @__PURE__ */ jsx110(
17016
+ return /* @__PURE__ */ jsx113(
16722
17017
  BaseOrganizationProfile_default,
16723
17018
  {
16724
17019
  organization,
@@ -16735,7 +17030,7 @@ var OrganizationProfile = ({
16735
17030
  var OrganizationProfile_default = OrganizationProfile;
16736
17031
 
16737
17032
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
16738
- import { Fragment as Fragment21, jsx as jsx111, jsxs as jsxs50 } from "react/jsx-runtime";
17033
+ import { Fragment as Fragment24, jsx as jsx114, jsxs as jsxs51 } from "react/jsx-runtime";
16739
17034
  var OrganizationSwitcher = ({
16740
17035
  currentOrganization: propCurrentOrganization,
16741
17036
  fallback = null,
@@ -16752,15 +17047,15 @@ var OrganizationSwitcher = ({
16752
17047
  isLoading,
16753
17048
  error
16754
17049
  } = useOrganization_default();
16755
- const [isCreateOrgOpen, setIsCreateOrgOpen] = useState35(false);
16756
- const [isProfileOpen, setIsProfileOpen] = useState35(false);
16757
- const [isOrganizationListOpen, setIsOrganizationListOpen] = useState35(false);
17050
+ const [isCreateOrgOpen, setIsCreateOrgOpen] = useState36(false);
17051
+ const [isProfileOpen, setIsProfileOpen] = useState36(false);
17052
+ const [isOrganizationListOpen, setIsOrganizationListOpen] = useState36(false);
16758
17053
  const { t } = useTranslation_default(preferences?.i18n);
16759
17054
  if (!isSignedIn && fallback) {
16760
17055
  return fallback;
16761
17056
  }
16762
17057
  if (!isSignedIn) {
16763
- return /* @__PURE__ */ jsx111(Fragment21, {});
17058
+ return /* @__PURE__ */ jsx114(Fragment24, {});
16764
17059
  }
16765
17060
  const organizations = propOrganizations || contextOrganizations || [];
16766
17061
  const currentOrganization = propCurrentOrganization || contextCurrentOrganization;
@@ -16774,19 +17069,19 @@ var OrganizationSwitcher = ({
16774
17069
  const defaultMenuItems = [];
16775
17070
  if (currentOrganization) {
16776
17071
  defaultMenuItems.push({
16777
- icon: /* @__PURE__ */ jsx111(BuildingAlt_default, {}),
17072
+ icon: /* @__PURE__ */ jsx114(BuildingAlt_default, {}),
16778
17073
  label: t("organization.switcher.manage.organizations"),
16779
17074
  onClick: handleManageOrganizations
16780
17075
  });
16781
17076
  }
16782
17077
  defaultMenuItems.push({
16783
- icon: /* @__PURE__ */ jsx111("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx111("path", { d: "M12 5v14m-7-7h14" }) }),
17078
+ icon: /* @__PURE__ */ jsx114("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx114("path", { d: "M12 5v14m-7-7h14" }) }),
16784
17079
  label: t("organization.switcher.create.organization"),
16785
17080
  onClick: () => setIsCreateOrgOpen(true)
16786
17081
  });
16787
17082
  const menuItems = props.menuItems ? [...defaultMenuItems, ...props.menuItems] : defaultMenuItems;
16788
- return /* @__PURE__ */ jsxs50(Fragment21, { children: [
16789
- /* @__PURE__ */ jsx111(
17083
+ return /* @__PURE__ */ jsxs51(Fragment24, { children: [
17084
+ /* @__PURE__ */ jsx114(
16790
17085
  BaseOrganizationSwitcher,
16791
17086
  {
16792
17087
  organizations,
@@ -16800,7 +17095,7 @@ var OrganizationSwitcher = ({
16800
17095
  ...props
16801
17096
  }
16802
17097
  ),
16803
- /* @__PURE__ */ jsx111(
17098
+ /* @__PURE__ */ jsx114(
16804
17099
  CreateOrganization,
16805
17100
  {
16806
17101
  mode: "popup",
@@ -16814,7 +17109,7 @@ var OrganizationSwitcher = ({
16814
17109
  }
16815
17110
  }
16816
17111
  ),
16817
- currentOrganization && /* @__PURE__ */ jsx111(
17112
+ currentOrganization && /* @__PURE__ */ jsx114(
16818
17113
  OrganizationProfile_default,
16819
17114
  {
16820
17115
  organizationId: currentOrganization.id,
@@ -16822,11 +17117,11 @@ var OrganizationSwitcher = ({
16822
17117
  open: isProfileOpen,
16823
17118
  onOpenChange: setIsProfileOpen,
16824
17119
  cardLayout: true,
16825
- loadingFallback: /* @__PURE__ */ jsx111("div", { children: t("organization.profile.loading") }),
16826
- errorFallback: /* @__PURE__ */ jsx111("div", { children: t("organization.profile.error") })
17120
+ loadingFallback: /* @__PURE__ */ jsx114("div", { children: t("organization.profile.loading") }),
17121
+ errorFallback: /* @__PURE__ */ jsx114("div", { children: t("organization.profile.error") })
16827
17122
  }
16828
17123
  ),
16829
- /* @__PURE__ */ jsx111(
17124
+ /* @__PURE__ */ jsx114(
16830
17125
  OrganizationList_default,
16831
17126
  {
16832
17127
  mode: "popup",
@@ -16860,7 +17155,7 @@ import {
16860
17155
  useInteractions as useInteractions4,
16861
17156
  useRole as useRole4
16862
17157
  } from "@floating-ui/react";
16863
- import { useEffect as useEffect24, useState as useState36 } from "react";
17158
+ import { useEffect as useEffect25, useState as useState37 } from "react";
16864
17159
 
16865
17160
  // src/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.ts
16866
17161
  import { css as css32 } from "@emotion/css";
@@ -16975,7 +17270,7 @@ var useStyles31 = (theme, colorScheme) => useMemo43(() => {
16975
17270
  var BaseLanguageSwitcher_styles_default = useStyles31;
16976
17271
 
16977
17272
  // src/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.tsx
16978
- import { Fragment as Fragment22, jsx as jsx112, jsxs as jsxs51 } from "react/jsx-runtime";
17273
+ import { Fragment as Fragment25, jsx as jsx115, jsxs as jsxs52 } from "react/jsx-runtime";
16979
17274
  var BaseLanguageSwitcher = ({
16980
17275
  children,
16981
17276
  className,
@@ -16986,9 +17281,9 @@ var BaseLanguageSwitcher = ({
16986
17281
  }) => {
16987
17282
  const { theme, colorScheme } = useTheme_default();
16988
17283
  const styles = BaseLanguageSwitcher_styles_default(theme, colorScheme);
16989
- const [isOpen, setIsOpen] = useState36(false);
17284
+ const [isOpen, setIsOpen] = useState37(false);
16990
17285
  const hasMultipleLanguages = languages.length > 1;
16991
- useEffect24(() => {
17286
+ useEffect25(() => {
16992
17287
  if (!hasMultipleLanguages && isOpen) {
16993
17288
  setIsOpen(false);
16994
17289
  }
@@ -17005,15 +17300,15 @@ var BaseLanguageSwitcher = ({
17005
17300
  const { getReferenceProps, getFloatingProps } = useInteractions4([click, dismiss, role]);
17006
17301
  const currentOption = languages.find((l) => l.code === currentLanguage);
17007
17302
  if (children) {
17008
- return /* @__PURE__ */ jsx112(Fragment22, { children: children({
17303
+ return /* @__PURE__ */ jsx115(Fragment25, { children: children({
17009
17304
  currentLanguage,
17010
17305
  isLoading,
17011
17306
  languages,
17012
17307
  onLanguageChange
17013
17308
  }) });
17014
17309
  }
17015
- return /* @__PURE__ */ jsxs51("div", { className: cx36(styles["root"], className), children: [
17016
- /* @__PURE__ */ jsxs51(
17310
+ return /* @__PURE__ */ jsxs52("div", { className: cx36(styles["root"], className), children: [
17311
+ /* @__PURE__ */ jsxs52(
17017
17312
  "button",
17018
17313
  {
17019
17314
  ref: refs.setReference,
@@ -17023,13 +17318,13 @@ var BaseLanguageSwitcher = ({
17023
17318
  ...getReferenceProps(),
17024
17319
  className: styles["trigger"],
17025
17320
  children: [
17026
- currentOption && /* @__PURE__ */ jsx112("span", { className: styles["triggerEmoji"], children: currentOption.emoji }),
17027
- /* @__PURE__ */ jsx112("span", { className: styles["triggerLabel"], children: currentOption?.displayName ?? currentLanguage }),
17028
- hasMultipleLanguages && /* @__PURE__ */ jsx112(ChevronDown_default, {})
17321
+ currentOption && /* @__PURE__ */ jsx115("span", { className: styles["triggerEmoji"], children: currentOption.emoji }),
17322
+ /* @__PURE__ */ jsx115("span", { className: styles["triggerLabel"], children: currentOption?.displayName ?? currentLanguage }),
17323
+ hasMultipleLanguages && /* @__PURE__ */ jsx115(ChevronDown_default, {})
17029
17324
  ]
17030
17325
  }
17031
17326
  ),
17032
- isOpen && hasMultipleLanguages && /* @__PURE__ */ jsx112(FloatingPortal4, { children: /* @__PURE__ */ jsx112(FloatingFocusManager4, { context, modal: false, children: /* @__PURE__ */ jsx112(
17327
+ isOpen && hasMultipleLanguages && /* @__PURE__ */ jsx115(FloatingPortal4, { children: /* @__PURE__ */ jsx115(FloatingFocusManager4, { context, modal: false, children: /* @__PURE__ */ jsx115(
17033
17328
  "div",
17034
17329
  {
17035
17330
  ref: refs.setFloating,
@@ -17038,7 +17333,7 @@ var BaseLanguageSwitcher = ({
17038
17333
  className: styles["content"],
17039
17334
  role: "listbox",
17040
17335
  "aria-label": "Select language",
17041
- children: languages.map((lang) => /* @__PURE__ */ jsxs51(
17336
+ children: languages.map((lang) => /* @__PURE__ */ jsxs52(
17042
17337
  "button",
17043
17338
  {
17044
17339
  type: "button",
@@ -17050,9 +17345,9 @@ var BaseLanguageSwitcher = ({
17050
17345
  setIsOpen(false);
17051
17346
  },
17052
17347
  children: [
17053
- /* @__PURE__ */ jsx112("span", { className: styles["optionEmoji"], children: lang.emoji }),
17054
- /* @__PURE__ */ jsx112("span", { className: styles["optionLabel"], children: lang.displayName }),
17055
- lang.code === currentLanguage && /* @__PURE__ */ jsx112("span", { className: styles["checkIcon"], children: /* @__PURE__ */ jsx112(Check_default, {}) })
17348
+ /* @__PURE__ */ jsx115("span", { className: styles["optionEmoji"], children: lang.emoji }),
17349
+ /* @__PURE__ */ jsx115("span", { className: styles["optionLabel"], children: lang.displayName }),
17350
+ lang.code === currentLanguage && /* @__PURE__ */ jsx115("span", { className: styles["checkIcon"], children: /* @__PURE__ */ jsx115(Check_default, {}) })
17056
17351
  ]
17057
17352
  },
17058
17353
  lang.code
@@ -17079,7 +17374,7 @@ var useFlowMeta = () => {
17079
17374
  var useFlowMeta_default = useFlowMeta;
17080
17375
 
17081
17376
  // src/components/presentation/LanguageSwitcher/LanguageSwitcher.tsx
17082
- import { jsx as jsx113 } from "react/jsx-runtime";
17377
+ import { jsx as jsx116 } from "react/jsx-runtime";
17083
17378
  var LanguageSwitcher = ({ children, className }) => {
17084
17379
  const { meta, switchLanguage, isLoading } = useFlowMeta_default();
17085
17380
  const { currentLanguage } = useTranslation_default();
@@ -17102,7 +17397,7 @@ var LanguageSwitcher = ({ children, className }) => {
17102
17397
  switchLanguage(language);
17103
17398
  }
17104
17399
  };
17105
- return /* @__PURE__ */ jsx113(
17400
+ return /* @__PURE__ */ jsx116(
17106
17401
  BaseLanguageSwitcher_default,
17107
17402
  {
17108
17403
  currentLanguage,
@@ -17160,6 +17455,8 @@ export {
17160
17455
  Checkbox_default as Checkbox,
17161
17456
  CircleAlert_default as CircleAlert,
17162
17457
  CircleCheck_default as CircleCheck,
17458
+ Consent_default as Consent,
17459
+ ConsentCheckboxList_default as ConsentCheckboxList,
17163
17460
  CreateOrganization,
17164
17461
  DatePicker_default as DatePicker,
17165
17462
  Divider_default as Divider,
@@ -17176,6 +17473,7 @@ export {
17176
17473
  FieldFactory,
17177
17474
  FlowContext_default as FlowContext,
17178
17475
  FlowProvider_default as FlowProvider,
17476
+ FlowTimer_default as FlowTimer,
17179
17477
  FormControl_default as FormControl,
17180
17478
  GitHubButton_default as GitHubButton,
17181
17479
  GoogleButton_default as GoogleButton,
@@ -17234,6 +17532,7 @@ export {
17234
17532
  createSignInOptionFromAuthenticator,
17235
17533
  getActiveTheme2 as getActiveTheme,
17236
17534
  getAllOrganizations_default as getAllOrganizations,
17535
+ getConsentOptionalKey,
17237
17536
  getMeOrganizations_default as getMeOrganizations,
17238
17537
  getScim2Me_default as getMeProfile,
17239
17538
  getOrganization_default as getOrganization,