@asgardeo/vue 0.3.2 → 0.3.4
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/README.md +1 -1
- package/dist/cjs/index.js +1156 -414
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/presentation/sign-up/BaseSignUp.d.ts +9 -49
- package/dist/components/presentation/sign-up/SignUp.d.ts +6 -3
- package/dist/components/presentation/sign-up/v1/BaseSignUp.d.ts +48 -0
- package/dist/components/presentation/sign-up/v1/SignUp.d.ts +30 -0
- package/dist/components/presentation/sign-up/v1/options/SignUpOptionFactory.d.ts +49 -0
- package/dist/components/presentation/sign-up/v2/BaseSignUp.d.ts +72 -0
- package/dist/components/presentation/sign-up/v2/SignUp.d.ts +25 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1157 -399
- package/dist/index.js.map +4 -4
- package/dist/plugins/AsgardeoPlugin.d.ts +26 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4074,8 +4074,11 @@ function injectStyles() {
|
|
|
4074
4074
|
|
|
4075
4075
|
// src/plugins/AsgardeoPlugin.ts
|
|
4076
4076
|
var AsgardeoPlugin = {
|
|
4077
|
-
install(app) {
|
|
4077
|
+
install(app, options) {
|
|
4078
4078
|
injectStyles();
|
|
4079
|
+
if (options?.mode === "delegated") {
|
|
4080
|
+
return;
|
|
4081
|
+
}
|
|
4079
4082
|
app.component("AsgardeoProvider", AsgardeoProvider_default);
|
|
4080
4083
|
}
|
|
4081
4084
|
};
|
|
@@ -8244,26 +8247,695 @@ var BaseSignIn3 = defineComponent44({
|
|
|
8244
8247
|
var BaseSignIn_default3 = BaseSignIn3;
|
|
8245
8248
|
|
|
8246
8249
|
// src/components/presentation/sign-up/SignUp.ts
|
|
8250
|
+
import { Platform as Platform5 } from "@asgardeo/browser";
|
|
8251
|
+
import { defineComponent as defineComponent49, h as h52 } from "vue";
|
|
8252
|
+
|
|
8253
|
+
// src/components/presentation/sign-up/v1/SignUp.ts
|
|
8247
8254
|
import {
|
|
8248
8255
|
EmbeddedFlowResponseType as EmbeddedFlowResponseType2,
|
|
8249
8256
|
EmbeddedFlowType as EmbeddedFlowType2
|
|
8250
8257
|
} from "@asgardeo/browser";
|
|
8251
|
-
import { defineComponent as defineComponent46, h as
|
|
8258
|
+
import { defineComponent as defineComponent46, h as h49 } from "vue";
|
|
8252
8259
|
|
|
8253
|
-
// src/components/presentation/sign-up/BaseSignUp.ts
|
|
8260
|
+
// src/components/presentation/sign-up/v1/BaseSignUp.ts
|
|
8254
8261
|
import {
|
|
8255
|
-
|
|
8262
|
+
EmbeddedFlowComponentType as EmbeddedFlowComponentType3,
|
|
8256
8263
|
EmbeddedFlowResponseType,
|
|
8257
8264
|
EmbeddedFlowStatus,
|
|
8258
8265
|
withVendorCSSClassPrefix as withVendorCSSClassPrefix19
|
|
8259
8266
|
} from "@asgardeo/browser";
|
|
8260
8267
|
import {
|
|
8261
8268
|
defineComponent as defineComponent45,
|
|
8262
|
-
h as
|
|
8269
|
+
h as h48,
|
|
8263
8270
|
ref as ref17,
|
|
8264
8271
|
watch as watch10
|
|
8265
8272
|
} from "vue";
|
|
8266
8273
|
|
|
8274
|
+
// src/components/presentation/sign-up/v1/options/SignUpOptionFactory.ts
|
|
8275
|
+
import { EmbeddedFlowComponentType as EmbeddedFlowComponentType2, FieldType as FieldType4 } from "@asgardeo/browser";
|
|
8276
|
+
import { h as h47 } from "vue";
|
|
8277
|
+
var getInputName = (component) => {
|
|
8278
|
+
const cfg = component.config || {};
|
|
8279
|
+
return cfg.name || cfg.identifier || component.id;
|
|
8280
|
+
};
|
|
8281
|
+
var inferFieldType = (component) => {
|
|
8282
|
+
const variant = String(component.variant || "").toUpperCase();
|
|
8283
|
+
const cfg = component.config || {};
|
|
8284
|
+
const cfgType = String(cfg.type || "").toLowerCase();
|
|
8285
|
+
if (variant === "EMAIL" || cfgType === "email") return FieldType4.Email;
|
|
8286
|
+
if (variant === "PASSWORD" || cfgType === "password") return FieldType4.Password;
|
|
8287
|
+
if (variant === "TELEPHONE" || cfgType === "tel") return FieldType4.Text;
|
|
8288
|
+
if (variant === "NUMBER" || cfgType === "number") return FieldType4.Number;
|
|
8289
|
+
if (variant === "DATE" || cfgType === "date") return FieldType4.Date;
|
|
8290
|
+
if (variant === "CHECKBOX" || cfgType === "checkbox") return FieldType4.Checkbox;
|
|
8291
|
+
return FieldType4.Text;
|
|
8292
|
+
};
|
|
8293
|
+
var inferTypographyVariant = (component) => {
|
|
8294
|
+
const variant = String(component.variant || "").toUpperCase();
|
|
8295
|
+
switch (variant) {
|
|
8296
|
+
case "H1":
|
|
8297
|
+
return "h1";
|
|
8298
|
+
case "H2":
|
|
8299
|
+
return "h2";
|
|
8300
|
+
case "H3":
|
|
8301
|
+
return "h3";
|
|
8302
|
+
case "H4":
|
|
8303
|
+
return "h4";
|
|
8304
|
+
case "H5":
|
|
8305
|
+
return "h5";
|
|
8306
|
+
case "H6":
|
|
8307
|
+
return "h6";
|
|
8308
|
+
case "SUBTITLE1":
|
|
8309
|
+
return "subtitle1";
|
|
8310
|
+
case "SUBTITLE2":
|
|
8311
|
+
return "subtitle2";
|
|
8312
|
+
case "BODY2":
|
|
8313
|
+
return "body2";
|
|
8314
|
+
case "CAPTION":
|
|
8315
|
+
return "caption";
|
|
8316
|
+
case "OVERLINE":
|
|
8317
|
+
return "overline";
|
|
8318
|
+
default:
|
|
8319
|
+
return "body1";
|
|
8320
|
+
}
|
|
8321
|
+
};
|
|
8322
|
+
var matchesSocialProvider2 = (component, provider) => {
|
|
8323
|
+
const text = String(component?.config?.text || component?.config?.label || "").toLowerCase();
|
|
8324
|
+
const variant = String(component?.variant || "").toUpperCase();
|
|
8325
|
+
return variant === "SOCIAL" && text.includes(provider);
|
|
8326
|
+
};
|
|
8327
|
+
var createSignUpComponent = (props) => {
|
|
8328
|
+
const {
|
|
8329
|
+
component,
|
|
8330
|
+
formValues,
|
|
8331
|
+
touchedFields,
|
|
8332
|
+
formErrors,
|
|
8333
|
+
isLoading,
|
|
8334
|
+
isFormValid,
|
|
8335
|
+
onInputChange,
|
|
8336
|
+
onSubmit,
|
|
8337
|
+
inputClassName,
|
|
8338
|
+
buttonClassName
|
|
8339
|
+
} = props;
|
|
8340
|
+
const cfg = component.config || {};
|
|
8341
|
+
switch (component.type) {
|
|
8342
|
+
case EmbeddedFlowComponentType2.Typography: {
|
|
8343
|
+
const text = String(cfg.text || cfg.label || "");
|
|
8344
|
+
return h47(
|
|
8345
|
+
Typography_default,
|
|
8346
|
+
{ style: "margin-bottom:0.5rem", variant: inferTypographyVariant(component) },
|
|
8347
|
+
{ default: () => text }
|
|
8348
|
+
);
|
|
8349
|
+
}
|
|
8350
|
+
case EmbeddedFlowComponentType2.Input: {
|
|
8351
|
+
const name = getInputName(component);
|
|
8352
|
+
const fieldType = inferFieldType(component);
|
|
8353
|
+
const value = formValues[name] || "";
|
|
8354
|
+
const isTouched = touchedFields[name] || false;
|
|
8355
|
+
const error = isTouched ? formErrors[name] : void 0;
|
|
8356
|
+
return createField({
|
|
8357
|
+
className: inputClassName,
|
|
8358
|
+
disabled: isLoading,
|
|
8359
|
+
error,
|
|
8360
|
+
label: String(cfg.label || ""),
|
|
8361
|
+
name,
|
|
8362
|
+
onChange: (newValue) => onInputChange(name, newValue),
|
|
8363
|
+
placeholder: String(cfg.placeholder || ""),
|
|
8364
|
+
required: Boolean(cfg.required),
|
|
8365
|
+
touched: isTouched,
|
|
8366
|
+
type: fieldType,
|
|
8367
|
+
value
|
|
8368
|
+
});
|
|
8369
|
+
}
|
|
8370
|
+
case EmbeddedFlowComponentType2.Button: {
|
|
8371
|
+
const text = String(cfg.text || cfg.label || "Submit");
|
|
8372
|
+
const variant = String(component.variant || "PRIMARY").toUpperCase();
|
|
8373
|
+
const isPrimary = variant === "PRIMARY";
|
|
8374
|
+
const handleClick = () => onSubmit(component, void 0);
|
|
8375
|
+
if (matchesSocialProvider2(component, "google")) {
|
|
8376
|
+
return h47(GoogleButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8377
|
+
}
|
|
8378
|
+
if (matchesSocialProvider2(component, "github")) {
|
|
8379
|
+
return h47(GitHubButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8380
|
+
}
|
|
8381
|
+
if (matchesSocialProvider2(component, "microsoft")) {
|
|
8382
|
+
return h47(MicrosoftButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8383
|
+
}
|
|
8384
|
+
if (matchesSocialProvider2(component, "facebook")) {
|
|
8385
|
+
return h47(FacebookButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8386
|
+
}
|
|
8387
|
+
return h47(
|
|
8388
|
+
Button_default,
|
|
8389
|
+
{
|
|
8390
|
+
class: buttonClassName,
|
|
8391
|
+
color: isPrimary ? "primary" : "secondary",
|
|
8392
|
+
"data-testid": "asgardeo-signup-submit",
|
|
8393
|
+
disabled: isLoading || !isFormValid && cfg.type === "submit",
|
|
8394
|
+
fullWidth: true,
|
|
8395
|
+
loading: isLoading,
|
|
8396
|
+
onClick: handleClick,
|
|
8397
|
+
type: cfg.type === "submit" ? "submit" : "button",
|
|
8398
|
+
variant: isPrimary ? "solid" : "outline"
|
|
8399
|
+
},
|
|
8400
|
+
{ default: () => text }
|
|
8401
|
+
);
|
|
8402
|
+
}
|
|
8403
|
+
case EmbeddedFlowComponentType2.Form: {
|
|
8404
|
+
const children = component.components || [];
|
|
8405
|
+
const nodes = [];
|
|
8406
|
+
children.forEach((child) => {
|
|
8407
|
+
const rendered = createSignUpComponent({ ...props, component: child });
|
|
8408
|
+
if (rendered === null) return;
|
|
8409
|
+
if (Array.isArray(rendered)) nodes.push(...rendered);
|
|
8410
|
+
else nodes.push(rendered);
|
|
8411
|
+
});
|
|
8412
|
+
return nodes;
|
|
8413
|
+
}
|
|
8414
|
+
case EmbeddedFlowComponentType2.Divider: {
|
|
8415
|
+
return h47("hr", {
|
|
8416
|
+
class: "asgardeo-signup__divider",
|
|
8417
|
+
style: "margin:0.75rem 0;border:0;border-top:1px solid #e5e7eb"
|
|
8418
|
+
});
|
|
8419
|
+
}
|
|
8420
|
+
case EmbeddedFlowComponentType2.Image: {
|
|
8421
|
+
const src = String(cfg.src || cfg.url || "");
|
|
8422
|
+
const alt = String(cfg.alt || "");
|
|
8423
|
+
if (!src) return null;
|
|
8424
|
+
return h47("img", { alt, src, style: "max-width:100%;height:auto;display:block;margin:0.5rem auto" });
|
|
8425
|
+
}
|
|
8426
|
+
default: {
|
|
8427
|
+
if (String(component.type).toUpperCase() === "RICH_TEXT") {
|
|
8428
|
+
const html = String(cfg.text || cfg.label || "");
|
|
8429
|
+
return h47("div", { class: "asgardeo-signup__rich-text", innerHTML: html });
|
|
8430
|
+
}
|
|
8431
|
+
return null;
|
|
8432
|
+
}
|
|
8433
|
+
}
|
|
8434
|
+
};
|
|
8435
|
+
var renderSignUpComponents2 = (components, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, onSubmit, options) => {
|
|
8436
|
+
const result = [];
|
|
8437
|
+
components.forEach((component) => {
|
|
8438
|
+
const rendered = createSignUpComponent({
|
|
8439
|
+
buttonClassName: options?.buttonClassName,
|
|
8440
|
+
component,
|
|
8441
|
+
formErrors,
|
|
8442
|
+
formValues,
|
|
8443
|
+
inputClassName: options?.inputClassName,
|
|
8444
|
+
isFormValid,
|
|
8445
|
+
isLoading,
|
|
8446
|
+
onInputChange,
|
|
8447
|
+
onSubmit,
|
|
8448
|
+
size: options?.size,
|
|
8449
|
+
touchedFields
|
|
8450
|
+
});
|
|
8451
|
+
if (rendered === null) return;
|
|
8452
|
+
if (Array.isArray(rendered)) result.push(...rendered);
|
|
8453
|
+
else result.push(rendered);
|
|
8454
|
+
});
|
|
8455
|
+
return result;
|
|
8456
|
+
};
|
|
8457
|
+
|
|
8458
|
+
// src/components/presentation/sign-up/v1/BaseSignUp.ts
|
|
8459
|
+
var logger6 = createVueLogger("BaseSignUpV1");
|
|
8460
|
+
var BaseSignUp = defineComponent45({
|
|
8461
|
+
emits: ["error", "flowChange", "complete"],
|
|
8462
|
+
name: "BaseSignUpV1",
|
|
8463
|
+
props: {
|
|
8464
|
+
afterSignUpUrl: { default: void 0, type: String },
|
|
8465
|
+
buttonClassName: { default: "", type: String },
|
|
8466
|
+
className: { default: "", type: String },
|
|
8467
|
+
errorClassName: { default: "", type: String },
|
|
8468
|
+
inputClassName: { default: "", type: String },
|
|
8469
|
+
isInitialized: { default: true, type: Boolean },
|
|
8470
|
+
messageClassName: { default: "", type: String },
|
|
8471
|
+
onComplete: { default: void 0, type: Function },
|
|
8472
|
+
onError: { default: void 0, type: Function },
|
|
8473
|
+
onFlowChange: {
|
|
8474
|
+
default: void 0,
|
|
8475
|
+
type: Function
|
|
8476
|
+
},
|
|
8477
|
+
onInitialize: {
|
|
8478
|
+
default: void 0,
|
|
8479
|
+
type: Function
|
|
8480
|
+
},
|
|
8481
|
+
onSubmit: {
|
|
8482
|
+
default: void 0,
|
|
8483
|
+
type: Function
|
|
8484
|
+
},
|
|
8485
|
+
shouldRedirectAfterSignUp: { default: true, type: Boolean },
|
|
8486
|
+
showLogo: { default: true, type: Boolean },
|
|
8487
|
+
showSubtitle: { default: true, type: Boolean },
|
|
8488
|
+
showTitle: { default: true, type: Boolean },
|
|
8489
|
+
size: { default: "medium", type: String },
|
|
8490
|
+
variant: { default: "outlined", type: String }
|
|
8491
|
+
},
|
|
8492
|
+
setup(props, { slots, emit }) {
|
|
8493
|
+
const { t } = useI18n_default();
|
|
8494
|
+
const { title: flowTitle, subtitle: flowSubtitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
|
|
8495
|
+
const isLoading = ref17(false);
|
|
8496
|
+
const isFlowInitialized = ref17(false);
|
|
8497
|
+
const currentFlow = ref17(null);
|
|
8498
|
+
const formValues = ref17({});
|
|
8499
|
+
const touchedFields = ref17({});
|
|
8500
|
+
const formErrors = ref17({});
|
|
8501
|
+
let initializationAttempted = false;
|
|
8502
|
+
const handleError = (err) => {
|
|
8503
|
+
let errorMessage = t("errors.signup.flow.failure") || "Sign-up failed";
|
|
8504
|
+
if (err && typeof err === "object") {
|
|
8505
|
+
if (err.code && (err.message || err.description)) {
|
|
8506
|
+
errorMessage = err.description || err.message;
|
|
8507
|
+
} else if (err.message) {
|
|
8508
|
+
errorMessage = err.message;
|
|
8509
|
+
}
|
|
8510
|
+
} else if (typeof err === "string") {
|
|
8511
|
+
errorMessage = err;
|
|
8512
|
+
}
|
|
8513
|
+
clearMessages();
|
|
8514
|
+
addMessage({ message: errorMessage, type: "error" });
|
|
8515
|
+
};
|
|
8516
|
+
const collectInputNames = (components) => {
|
|
8517
|
+
const names = [];
|
|
8518
|
+
const walk = (comps) => {
|
|
8519
|
+
comps.forEach((component) => {
|
|
8520
|
+
const cfg = component.config || {};
|
|
8521
|
+
if (component.type === EmbeddedFlowComponentType3.Input) {
|
|
8522
|
+
const name = cfg.name || cfg.identifier || component.id;
|
|
8523
|
+
if (name) names.push(name);
|
|
8524
|
+
}
|
|
8525
|
+
const children = component.components || [];
|
|
8526
|
+
if (children.length > 0) walk(children);
|
|
8527
|
+
});
|
|
8528
|
+
};
|
|
8529
|
+
walk(components);
|
|
8530
|
+
return names;
|
|
8531
|
+
};
|
|
8532
|
+
const setupFormFields = (response) => {
|
|
8533
|
+
const componentTree = response.data?.components || [];
|
|
8534
|
+
const names = collectInputNames(componentTree);
|
|
8535
|
+
const initial = {};
|
|
8536
|
+
names.forEach((name) => {
|
|
8537
|
+
initial[name] = "";
|
|
8538
|
+
});
|
|
8539
|
+
formValues.value = initial;
|
|
8540
|
+
touchedFields.value = {};
|
|
8541
|
+
formErrors.value = {};
|
|
8542
|
+
};
|
|
8543
|
+
const handleInputChange = (name, value) => {
|
|
8544
|
+
formValues.value = { ...formValues.value, [name]: value };
|
|
8545
|
+
touchedFields.value = { ...touchedFields.value, [name]: true };
|
|
8546
|
+
if (formErrors.value[name]) {
|
|
8547
|
+
const next = { ...formErrors.value };
|
|
8548
|
+
delete next[name];
|
|
8549
|
+
formErrors.value = next;
|
|
8550
|
+
}
|
|
8551
|
+
};
|
|
8552
|
+
const isFormValid = () => Object.keys(formErrors.value).length === 0;
|
|
8553
|
+
const handleRedirectionIfNeeded = (response) => {
|
|
8554
|
+
if (response?.type !== EmbeddedFlowResponseType.Redirection || !response?.data?.redirectURL) {
|
|
8555
|
+
return false;
|
|
8556
|
+
}
|
|
8557
|
+
if (typeof window === "undefined") return false;
|
|
8558
|
+
const redirectUrl = response.data.redirectURL;
|
|
8559
|
+
const popup = window.open(
|
|
8560
|
+
redirectUrl,
|
|
8561
|
+
"oauth_popup",
|
|
8562
|
+
"width=500,height=600,scrollbars=yes,resizable=yes"
|
|
8563
|
+
);
|
|
8564
|
+
if (!popup) {
|
|
8565
|
+
logger6.error("Failed to open popup window for social sign-up redirect");
|
|
8566
|
+
return false;
|
|
8567
|
+
}
|
|
8568
|
+
let processed = false;
|
|
8569
|
+
let popupMonitor;
|
|
8570
|
+
let messageHandler;
|
|
8571
|
+
const cleanup = () => {
|
|
8572
|
+
window.removeEventListener("message", messageHandler);
|
|
8573
|
+
if (popupMonitor) clearInterval(popupMonitor);
|
|
8574
|
+
};
|
|
8575
|
+
const continueWithCode = async (code, state) => {
|
|
8576
|
+
const payload = {
|
|
8577
|
+
...currentFlow.value?.flowId && { flowId: currentFlow.value.flowId },
|
|
8578
|
+
actionId: "",
|
|
8579
|
+
flowType: currentFlow.value?.flowType || "REGISTRATION",
|
|
8580
|
+
inputs: { code, state }
|
|
8581
|
+
};
|
|
8582
|
+
try {
|
|
8583
|
+
const next = await props.onSubmit(payload);
|
|
8584
|
+
props.onFlowChange?.(next);
|
|
8585
|
+
emit("flowChange", next);
|
|
8586
|
+
if (next.flowStatus === EmbeddedFlowStatus.Complete) {
|
|
8587
|
+
props.onComplete?.(next);
|
|
8588
|
+
emit("complete", next);
|
|
8589
|
+
} else if (next.flowStatus === EmbeddedFlowStatus.Incomplete) {
|
|
8590
|
+
currentFlow.value = next;
|
|
8591
|
+
setupFormFields(next);
|
|
8592
|
+
}
|
|
8593
|
+
} catch (err) {
|
|
8594
|
+
handleError(err);
|
|
8595
|
+
props.onError?.(err);
|
|
8596
|
+
emit("error", err);
|
|
8597
|
+
} finally {
|
|
8598
|
+
popup.close();
|
|
8599
|
+
cleanup();
|
|
8600
|
+
}
|
|
8601
|
+
};
|
|
8602
|
+
messageHandler = async (event) => {
|
|
8603
|
+
if (event.source !== popup) return;
|
|
8604
|
+
const expectedOrigin = props.afterSignUpUrl ? new URL(props.afterSignUpUrl).origin : window.location.origin;
|
|
8605
|
+
if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;
|
|
8606
|
+
const { code, state } = event.data || {};
|
|
8607
|
+
if (code && state && !processed) {
|
|
8608
|
+
processed = true;
|
|
8609
|
+
await continueWithCode(code, state);
|
|
8610
|
+
}
|
|
8611
|
+
};
|
|
8612
|
+
window.addEventListener("message", messageHandler);
|
|
8613
|
+
popupMonitor = setInterval(async () => {
|
|
8614
|
+
try {
|
|
8615
|
+
if (popup.closed) {
|
|
8616
|
+
cleanup();
|
|
8617
|
+
return;
|
|
8618
|
+
}
|
|
8619
|
+
if (processed) return;
|
|
8620
|
+
let popupUrl;
|
|
8621
|
+
try {
|
|
8622
|
+
popupUrl = popup.location.href;
|
|
8623
|
+
} catch {
|
|
8624
|
+
return;
|
|
8625
|
+
}
|
|
8626
|
+
if (!popupUrl) return;
|
|
8627
|
+
if (popupUrl.includes("code=") || popupUrl.includes("error=")) {
|
|
8628
|
+
const url = new URL(popupUrl);
|
|
8629
|
+
const code = url.searchParams.get("code");
|
|
8630
|
+
const state = url.searchParams.get("state");
|
|
8631
|
+
const error = url.searchParams.get("error");
|
|
8632
|
+
if (error) {
|
|
8633
|
+
processed = true;
|
|
8634
|
+
logger6.error(`OAuth error during social sign-up: ${error}`);
|
|
8635
|
+
popup.close();
|
|
8636
|
+
cleanup();
|
|
8637
|
+
return;
|
|
8638
|
+
}
|
|
8639
|
+
if (code && state) {
|
|
8640
|
+
processed = true;
|
|
8641
|
+
await continueWithCode(code, state);
|
|
8642
|
+
}
|
|
8643
|
+
}
|
|
8644
|
+
} catch (err) {
|
|
8645
|
+
logger6.error("Error monitoring sign-up popup");
|
|
8646
|
+
}
|
|
8647
|
+
}, 1e3);
|
|
8648
|
+
return true;
|
|
8649
|
+
};
|
|
8650
|
+
const handleSubmit = async (component, data) => {
|
|
8651
|
+
if (!currentFlow.value) return;
|
|
8652
|
+
isLoading.value = true;
|
|
8653
|
+
clearMessages();
|
|
8654
|
+
try {
|
|
8655
|
+
const filteredInputs = {};
|
|
8656
|
+
const sourceInputs = data ?? formValues.value;
|
|
8657
|
+
Object.entries(sourceInputs).forEach(([key, value]) => {
|
|
8658
|
+
if (value !== null && value !== void 0 && value !== "") {
|
|
8659
|
+
filteredInputs[key] = value;
|
|
8660
|
+
}
|
|
8661
|
+
});
|
|
8662
|
+
const actionId = component?.actionId || component?.id;
|
|
8663
|
+
const payload = {
|
|
8664
|
+
...currentFlow.value.flowId && { flowId: currentFlow.value.flowId },
|
|
8665
|
+
flowType: currentFlow.value.flowType || "REGISTRATION",
|
|
8666
|
+
inputs: filteredInputs,
|
|
8667
|
+
...actionId && { actionId }
|
|
8668
|
+
};
|
|
8669
|
+
const response = await props.onSubmit(payload);
|
|
8670
|
+
props.onFlowChange?.(response);
|
|
8671
|
+
emit("flowChange", response);
|
|
8672
|
+
if (response?.flowStatus === EmbeddedFlowStatus.Complete) {
|
|
8673
|
+
props.onComplete?.(response);
|
|
8674
|
+
emit("complete", response);
|
|
8675
|
+
return;
|
|
8676
|
+
}
|
|
8677
|
+
if (response?.flowStatus === EmbeddedFlowStatus.Incomplete) {
|
|
8678
|
+
if (handleRedirectionIfNeeded(response)) return;
|
|
8679
|
+
currentFlow.value = response;
|
|
8680
|
+
setupFormFields(response);
|
|
8681
|
+
}
|
|
8682
|
+
} catch (err) {
|
|
8683
|
+
handleError(err);
|
|
8684
|
+
props.onError?.(err);
|
|
8685
|
+
emit("error", err);
|
|
8686
|
+
} finally {
|
|
8687
|
+
isLoading.value = false;
|
|
8688
|
+
}
|
|
8689
|
+
};
|
|
8690
|
+
watch10(
|
|
8691
|
+
() => [props.isInitialized, isFlowInitialized.value],
|
|
8692
|
+
([initialized, flowInit]) => {
|
|
8693
|
+
if (!initialized || flowInit || initializationAttempted) return;
|
|
8694
|
+
if (!props.onInitialize) return;
|
|
8695
|
+
initializationAttempted = true;
|
|
8696
|
+
(async () => {
|
|
8697
|
+
isLoading.value = true;
|
|
8698
|
+
clearMessages();
|
|
8699
|
+
try {
|
|
8700
|
+
const response = await props.onInitialize();
|
|
8701
|
+
currentFlow.value = response;
|
|
8702
|
+
isFlowInitialized.value = true;
|
|
8703
|
+
props.onFlowChange?.(response);
|
|
8704
|
+
emit("flowChange", response);
|
|
8705
|
+
if (response?.flowStatus === EmbeddedFlowStatus.Complete) {
|
|
8706
|
+
props.onComplete?.(response);
|
|
8707
|
+
emit("complete", response);
|
|
8708
|
+
return;
|
|
8709
|
+
}
|
|
8710
|
+
if (response?.flowStatus === EmbeddedFlowStatus.Incomplete) {
|
|
8711
|
+
setupFormFields(response);
|
|
8712
|
+
}
|
|
8713
|
+
} catch (err) {
|
|
8714
|
+
handleError(err);
|
|
8715
|
+
props.onError?.(err);
|
|
8716
|
+
emit("error", err);
|
|
8717
|
+
} finally {
|
|
8718
|
+
isLoading.value = false;
|
|
8719
|
+
}
|
|
8720
|
+
})();
|
|
8721
|
+
},
|
|
8722
|
+
{ immediate: true }
|
|
8723
|
+
);
|
|
8724
|
+
return () => {
|
|
8725
|
+
const containerClass = [
|
|
8726
|
+
withVendorCSSClassPrefix19("signup"),
|
|
8727
|
+
withVendorCSSClassPrefix19(`signup--${props.size}`),
|
|
8728
|
+
withVendorCSSClassPrefix19(`signup--${props.variant}`),
|
|
8729
|
+
props.className
|
|
8730
|
+
].filter(Boolean).join(" ");
|
|
8731
|
+
if (slots["default"]) {
|
|
8732
|
+
const renderProps = {
|
|
8733
|
+
components: currentFlow.value?.data?.components || [],
|
|
8734
|
+
errors: formErrors.value,
|
|
8735
|
+
handleInputChange,
|
|
8736
|
+
handleSubmit,
|
|
8737
|
+
isLoading: isLoading.value,
|
|
8738
|
+
isValid: isFormValid(),
|
|
8739
|
+
messages: flowMessages.value || [],
|
|
8740
|
+
subtitle: flowSubtitle.value || t("signup.subheading") || "",
|
|
8741
|
+
title: flowTitle.value || t("signup.heading") || "",
|
|
8742
|
+
touched: touchedFields.value,
|
|
8743
|
+
values: formValues.value
|
|
8744
|
+
};
|
|
8745
|
+
return h48("div", { class: containerClass }, slots["default"](renderProps));
|
|
8746
|
+
}
|
|
8747
|
+
if (!isFlowInitialized.value && isLoading.value) {
|
|
8748
|
+
return h48(
|
|
8749
|
+
Card_default,
|
|
8750
|
+
{ class: containerClass, variant: props.variant },
|
|
8751
|
+
() => h48("div", { style: "display:flex;justify-content:center;padding:2rem" }, h48(Spinner_default))
|
|
8752
|
+
);
|
|
8753
|
+
}
|
|
8754
|
+
if (!currentFlow.value) {
|
|
8755
|
+
return h48(
|
|
8756
|
+
Card_default,
|
|
8757
|
+
{ class: containerClass, variant: props.variant },
|
|
8758
|
+
() => h48(
|
|
8759
|
+
Alert_default,
|
|
8760
|
+
{ variant: "error" },
|
|
8761
|
+
() => t("errors.signup.flow.initialization.failure") || "Failed to initialize sign-up flow"
|
|
8762
|
+
)
|
|
8763
|
+
);
|
|
8764
|
+
}
|
|
8765
|
+
const components = currentFlow.value.data?.components || [];
|
|
8766
|
+
const rendered = renderSignUpComponents2(
|
|
8767
|
+
components,
|
|
8768
|
+
formValues.value,
|
|
8769
|
+
touchedFields.value,
|
|
8770
|
+
formErrors.value,
|
|
8771
|
+
isLoading.value,
|
|
8772
|
+
isFormValid(),
|
|
8773
|
+
handleInputChange,
|
|
8774
|
+
handleSubmit,
|
|
8775
|
+
{
|
|
8776
|
+
buttonClassName: props.buttonClassName,
|
|
8777
|
+
inputClassName: props.inputClassName,
|
|
8778
|
+
size: props.size
|
|
8779
|
+
}
|
|
8780
|
+
);
|
|
8781
|
+
const cardChildren = [];
|
|
8782
|
+
if (props.showLogo) {
|
|
8783
|
+
cardChildren.push(h48("div", { style: "display:flex;justify-content:center;margin-bottom:1rem" }, [h48(Logo_default)]));
|
|
8784
|
+
}
|
|
8785
|
+
if (props.showTitle || props.showSubtitle) {
|
|
8786
|
+
const headerChildren = [];
|
|
8787
|
+
if (props.showTitle) {
|
|
8788
|
+
headerChildren.push(
|
|
8789
|
+
h48(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signup.heading") || "Sign Up" })
|
|
8790
|
+
);
|
|
8791
|
+
}
|
|
8792
|
+
if (props.showSubtitle) {
|
|
8793
|
+
headerChildren.push(
|
|
8794
|
+
h48(
|
|
8795
|
+
Typography_default,
|
|
8796
|
+
{ variant: "body1" },
|
|
8797
|
+
{ default: () => flowSubtitle.value || t("signup.subheading") || "Create your account" }
|
|
8798
|
+
)
|
|
8799
|
+
);
|
|
8800
|
+
}
|
|
8801
|
+
cardChildren.push(h48("div", { style: "padding: 0 1rem 1rem" }, headerChildren));
|
|
8802
|
+
}
|
|
8803
|
+
if (flowMessages.value && flowMessages.value.length > 0) {
|
|
8804
|
+
cardChildren.push(
|
|
8805
|
+
h48(
|
|
8806
|
+
"div",
|
|
8807
|
+
{ style: "padding: 0 1rem" },
|
|
8808
|
+
flowMessages.value.map(
|
|
8809
|
+
(msg, i) => h48(
|
|
8810
|
+
Alert_default,
|
|
8811
|
+
{
|
|
8812
|
+
class: props.messageClassName,
|
|
8813
|
+
key: msg.id || i,
|
|
8814
|
+
variant: msg.type?.toLowerCase() === "error" ? "error" : "info"
|
|
8815
|
+
},
|
|
8816
|
+
() => msg.message
|
|
8817
|
+
)
|
|
8818
|
+
)
|
|
8819
|
+
)
|
|
8820
|
+
);
|
|
8821
|
+
}
|
|
8822
|
+
cardChildren.push(
|
|
8823
|
+
h48(
|
|
8824
|
+
"form",
|
|
8825
|
+
{
|
|
8826
|
+
class: withVendorCSSClassPrefix19("signup__form"),
|
|
8827
|
+
onSubmit: (e) => {
|
|
8828
|
+
e.preventDefault();
|
|
8829
|
+
handleSubmit({ config: { type: "submit" }, type: "BUTTON" });
|
|
8830
|
+
},
|
|
8831
|
+
style: "padding: 1rem;display:flex;flex-direction:column;gap:0.75rem"
|
|
8832
|
+
},
|
|
8833
|
+
rendered.length > 0 ? rendered : [
|
|
8834
|
+
h48(
|
|
8835
|
+
Alert_default,
|
|
8836
|
+
{ variant: "warning" },
|
|
8837
|
+
() => t("errors.signup.components.not.available") || "No components available"
|
|
8838
|
+
)
|
|
8839
|
+
]
|
|
8840
|
+
)
|
|
8841
|
+
);
|
|
8842
|
+
return h48(Card_default, { class: containerClass, variant: props.variant }, () => cardChildren);
|
|
8843
|
+
};
|
|
8844
|
+
}
|
|
8845
|
+
});
|
|
8846
|
+
var BaseSignUp_default = BaseSignUp;
|
|
8847
|
+
|
|
8848
|
+
// src/components/presentation/sign-up/v1/SignUp.ts
|
|
8849
|
+
var SignUp = defineComponent46({
|
|
8850
|
+
name: "SignUpV1",
|
|
8851
|
+
props: {
|
|
8852
|
+
afterSignUpUrl: { default: void 0, type: String },
|
|
8853
|
+
buttonClassName: { default: "", type: String },
|
|
8854
|
+
className: { default: "", type: String },
|
|
8855
|
+
errorClassName: { default: "", type: String },
|
|
8856
|
+
inputClassName: { default: "", type: String },
|
|
8857
|
+
messageClassName: { default: "", type: String },
|
|
8858
|
+
onComplete: { default: void 0, type: Function },
|
|
8859
|
+
onError: { default: void 0, type: Function },
|
|
8860
|
+
shouldRedirectAfterSignUp: { default: true, type: Boolean },
|
|
8861
|
+
showSubtitle: { default: true, type: Boolean },
|
|
8862
|
+
showTitle: { default: true, type: Boolean },
|
|
8863
|
+
size: { default: "medium", type: String },
|
|
8864
|
+
variant: { default: "outlined", type: String }
|
|
8865
|
+
},
|
|
8866
|
+
setup(props, { slots }) {
|
|
8867
|
+
const { signUp, isInitialized, applicationId } = useAsgardeo_default();
|
|
8868
|
+
const handleInitialize = async (payload) => {
|
|
8869
|
+
const applicationIdFromUrl = typeof window !== "undefined" ? new URL(window.location.href).searchParams.get("applicationId") : null;
|
|
8870
|
+
const effectiveApplicationId = applicationId || applicationIdFromUrl || void 0;
|
|
8871
|
+
const initialPayload = payload || {
|
|
8872
|
+
flowType: EmbeddedFlowType2.Registration,
|
|
8873
|
+
...effectiveApplicationId && { applicationId: effectiveApplicationId }
|
|
8874
|
+
};
|
|
8875
|
+
return await signUp(initialPayload);
|
|
8876
|
+
};
|
|
8877
|
+
const handleOnSubmit = async (payload) => await signUp(payload);
|
|
8878
|
+
const handleComplete = (response) => {
|
|
8879
|
+
props.onComplete?.(response);
|
|
8880
|
+
const oauthRedirectUrl = response?.redirectUrl;
|
|
8881
|
+
if (props.shouldRedirectAfterSignUp && oauthRedirectUrl) {
|
|
8882
|
+
if (typeof window !== "undefined") {
|
|
8883
|
+
window.location.href = oauthRedirectUrl;
|
|
8884
|
+
}
|
|
8885
|
+
return;
|
|
8886
|
+
}
|
|
8887
|
+
if (props.shouldRedirectAfterSignUp && response?.type !== EmbeddedFlowResponseType2.Redirection && props.afterSignUpUrl) {
|
|
8888
|
+
if (typeof window !== "undefined") {
|
|
8889
|
+
window.location.href = props.afterSignUpUrl;
|
|
8890
|
+
}
|
|
8891
|
+
}
|
|
8892
|
+
};
|
|
8893
|
+
return () => h49(
|
|
8894
|
+
BaseSignUp_default,
|
|
8895
|
+
{
|
|
8896
|
+
afterSignUpUrl: props.afterSignUpUrl,
|
|
8897
|
+
buttonClassName: props.buttonClassName,
|
|
8898
|
+
className: props.className,
|
|
8899
|
+
errorClassName: props.errorClassName,
|
|
8900
|
+
inputClassName: props.inputClassName,
|
|
8901
|
+
isInitialized: isInitialized?.value ?? false,
|
|
8902
|
+
messageClassName: props.messageClassName,
|
|
8903
|
+
onComplete: handleComplete,
|
|
8904
|
+
onError: props.onError,
|
|
8905
|
+
onInitialize: handleInitialize,
|
|
8906
|
+
onSubmit: handleOnSubmit,
|
|
8907
|
+
showSubtitle: props.showSubtitle,
|
|
8908
|
+
showTitle: props.showTitle,
|
|
8909
|
+
size: props.size,
|
|
8910
|
+
variant: props.variant
|
|
8911
|
+
},
|
|
8912
|
+
slots["default"] ? { default: (renderProps) => slots["default"](renderProps) } : void 0
|
|
8913
|
+
);
|
|
8914
|
+
}
|
|
8915
|
+
});
|
|
8916
|
+
var SignUp_default = SignUp;
|
|
8917
|
+
|
|
8918
|
+
// src/components/presentation/sign-up/v2/SignUp.ts
|
|
8919
|
+
import {
|
|
8920
|
+
EmbeddedFlowResponseType as EmbeddedFlowResponseType4,
|
|
8921
|
+
EmbeddedFlowType as EmbeddedFlowType3
|
|
8922
|
+
} from "@asgardeo/browser";
|
|
8923
|
+
import { defineComponent as defineComponent48, h as h51 } from "vue";
|
|
8924
|
+
|
|
8925
|
+
// src/components/presentation/sign-up/v2/BaseSignUp.ts
|
|
8926
|
+
import {
|
|
8927
|
+
EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType4,
|
|
8928
|
+
EmbeddedFlowResponseType as EmbeddedFlowResponseType3,
|
|
8929
|
+
EmbeddedFlowStatus as EmbeddedFlowStatus2,
|
|
8930
|
+
withVendorCSSClassPrefix as withVendorCSSClassPrefix20
|
|
8931
|
+
} from "@asgardeo/browser";
|
|
8932
|
+
import {
|
|
8933
|
+
defineComponent as defineComponent47,
|
|
8934
|
+
h as h50,
|
|
8935
|
+
ref as ref18,
|
|
8936
|
+
watch as watch11
|
|
8937
|
+
} from "vue";
|
|
8938
|
+
|
|
8267
8939
|
// src/utils/v2/getAuthComponentHeadings.ts
|
|
8268
8940
|
var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitle, defaultSubtitle) => {
|
|
8269
8941
|
let heading = null;
|
|
@@ -8325,13 +8997,13 @@ var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitl
|
|
|
8325
8997
|
};
|
|
8326
8998
|
var getAuthComponentHeadings_default = getAuthComponentHeadings;
|
|
8327
8999
|
|
|
8328
|
-
// src/components/presentation/sign-up/BaseSignUp.ts
|
|
8329
|
-
var
|
|
9000
|
+
// src/components/presentation/sign-up/v2/BaseSignUp.ts
|
|
9001
|
+
var logger7 = createVueLogger("BaseSignUp");
|
|
8330
9002
|
var extractFormFields2 = (components) => {
|
|
8331
9003
|
const fields = [];
|
|
8332
9004
|
const process = (comps) => {
|
|
8333
9005
|
comps.forEach((c) => {
|
|
8334
|
-
if (c.type ===
|
|
9006
|
+
if (c.type === EmbeddedFlowComponentType4.TextInput || c.type === EmbeddedFlowComponentType4.PasswordInput || c.type === EmbeddedFlowComponentType4.EmailInput || c.type === EmbeddedFlowComponentType4.Select) {
|
|
8335
9007
|
const fieldName = c.ref || c.id;
|
|
8336
9008
|
fields.push({ name: fieldName, required: c.required || false, type: c.type });
|
|
8337
9009
|
}
|
|
@@ -8343,7 +9015,7 @@ var extractFormFields2 = (components) => {
|
|
|
8343
9015
|
process(components);
|
|
8344
9016
|
return fields;
|
|
8345
9017
|
};
|
|
8346
|
-
var
|
|
9018
|
+
var BaseSignUp2 = defineComponent47({
|
|
8347
9019
|
emits: ["error", "complete", "flowChange"],
|
|
8348
9020
|
name: "BaseSignUp",
|
|
8349
9021
|
props: {
|
|
@@ -8383,22 +9055,22 @@ var BaseSignUp = defineComponent45({
|
|
|
8383
9055
|
setup(props, { slots }) {
|
|
8384
9056
|
const { meta: flowMetaRef } = useFlowMeta_default();
|
|
8385
9057
|
const { t } = useI18n_default();
|
|
8386
|
-
const isLoading =
|
|
8387
|
-
const isFlowInitialized =
|
|
8388
|
-
const currentFlow =
|
|
8389
|
-
const apiError =
|
|
8390
|
-
const flowMessages =
|
|
8391
|
-
const passkeyState =
|
|
9058
|
+
const isLoading = ref18(false);
|
|
9059
|
+
const isFlowInitialized = ref18(false);
|
|
9060
|
+
const currentFlow = ref18(null);
|
|
9061
|
+
const apiError = ref18(null);
|
|
9062
|
+
const flowMessages = ref18([]);
|
|
9063
|
+
const passkeyState = ref18({
|
|
8392
9064
|
actionId: null,
|
|
8393
9065
|
creationOptions: null,
|
|
8394
9066
|
error: null,
|
|
8395
9067
|
flowId: null,
|
|
8396
9068
|
isActive: false
|
|
8397
9069
|
});
|
|
8398
|
-
const formValues =
|
|
8399
|
-
const touchedFields =
|
|
8400
|
-
const formErrors =
|
|
8401
|
-
const isFormValid =
|
|
9070
|
+
const formValues = ref18({});
|
|
9071
|
+
const touchedFields = ref18({});
|
|
9072
|
+
const formErrors = ref18({});
|
|
9073
|
+
const isFormValid = ref18(true);
|
|
8402
9074
|
let initializationAttempted = false;
|
|
8403
9075
|
let passkeyProcessed = false;
|
|
8404
9076
|
const handleError = (error) => {
|
|
@@ -8441,7 +9113,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8441
9113
|
if (field.required && (!value || value.trim() === "")) {
|
|
8442
9114
|
errors[field.name] = t("validations.required.field.error") || "This field is required";
|
|
8443
9115
|
}
|
|
8444
|
-
if ((field.type ===
|
|
9116
|
+
if ((field.type === EmbeddedFlowComponentType4.EmailInput || field.type === "EMAIL") && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
8445
9117
|
errors[field.name] = t("field.email.invalid") || "Invalid email address";
|
|
8446
9118
|
}
|
|
8447
9119
|
});
|
|
@@ -8470,7 +9142,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8470
9142
|
touchedFields.value = { ...touchedFields.value, [name]: true };
|
|
8471
9143
|
};
|
|
8472
9144
|
const handleRedirectionIfNeeded = (response) => {
|
|
8473
|
-
if (response?.type !==
|
|
9145
|
+
if (response?.type !== EmbeddedFlowResponseType3.Redirection || !response?.data?.redirectURL) {
|
|
8474
9146
|
return false;
|
|
8475
9147
|
}
|
|
8476
9148
|
const redirectUrl = response.data.redirectURL;
|
|
@@ -8480,7 +9152,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8480
9152
|
"width=500,height=600,scrollbars=yes,resizable=yes"
|
|
8481
9153
|
);
|
|
8482
9154
|
if (!popup) {
|
|
8483
|
-
|
|
9155
|
+
logger7.error("Failed to open popup window");
|
|
8484
9156
|
return false;
|
|
8485
9157
|
}
|
|
8486
9158
|
let hasProcessedCallback = false;
|
|
@@ -8500,9 +9172,9 @@ var BaseSignUp = defineComponent45({
|
|
|
8500
9172
|
try {
|
|
8501
9173
|
const continueResponse = await props.onSubmit(payload);
|
|
8502
9174
|
props.onFlowChange?.(continueResponse);
|
|
8503
|
-
if (continueResponse.flowStatus ===
|
|
9175
|
+
if (continueResponse.flowStatus === EmbeddedFlowStatus2.Complete) {
|
|
8504
9176
|
props.onComplete?.(continueResponse);
|
|
8505
|
-
} else if (continueResponse.flowStatus ===
|
|
9177
|
+
} else if (continueResponse.flowStatus === EmbeddedFlowStatus2.Incomplete) {
|
|
8506
9178
|
currentFlow.value = continueResponse;
|
|
8507
9179
|
setupFormFields(continueResponse);
|
|
8508
9180
|
}
|
|
@@ -8541,7 +9213,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8541
9213
|
const state = url.searchParams.get("state");
|
|
8542
9214
|
const error = url.searchParams.get("error");
|
|
8543
9215
|
if (error) {
|
|
8544
|
-
|
|
9216
|
+
logger7.error("OAuth error");
|
|
8545
9217
|
popup.close();
|
|
8546
9218
|
cleanup();
|
|
8547
9219
|
return;
|
|
@@ -8553,7 +9225,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8553
9225
|
} catch {
|
|
8554
9226
|
}
|
|
8555
9227
|
} catch {
|
|
8556
|
-
|
|
9228
|
+
logger7.error("Error monitoring popup");
|
|
8557
9229
|
}
|
|
8558
9230
|
}, 1e3);
|
|
8559
9231
|
return true;
|
|
@@ -8585,11 +9257,11 @@ var BaseSignUp = defineComponent45({
|
|
|
8585
9257
|
const rawResponse = await props.onSubmit(payload);
|
|
8586
9258
|
const response = normalizeFlowResponseLocal(rawResponse);
|
|
8587
9259
|
props.onFlowChange?.(response);
|
|
8588
|
-
if (response.flowStatus ===
|
|
9260
|
+
if (response.flowStatus === EmbeddedFlowStatus2.Complete) {
|
|
8589
9261
|
props.onComplete?.(response);
|
|
8590
9262
|
return;
|
|
8591
9263
|
}
|
|
8592
|
-
if (response.flowStatus ===
|
|
9264
|
+
if (response.flowStatus === EmbeddedFlowStatus2.Incomplete) {
|
|
8593
9265
|
if (handleRedirectionIfNeeded(response)) return;
|
|
8594
9266
|
if (response.data?.additionalData?.["passkeyCreationOptions"]) {
|
|
8595
9267
|
const { passkeyCreationOptions } = response.data.additionalData;
|
|
@@ -8615,7 +9287,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8615
9287
|
isLoading.value = false;
|
|
8616
9288
|
}
|
|
8617
9289
|
};
|
|
8618
|
-
|
|
9290
|
+
watch11(
|
|
8619
9291
|
() => passkeyState.value,
|
|
8620
9292
|
async (state) => {
|
|
8621
9293
|
if (!state.isActive || !state.creationOptions || !state.flowId) return;
|
|
@@ -8638,7 +9310,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8638
9310
|
const nextResponse = await props.onSubmit(payload);
|
|
8639
9311
|
const processed = normalizeFlowResponseLocal(nextResponse);
|
|
8640
9312
|
props.onFlowChange?.(processed);
|
|
8641
|
-
if (processed.flowStatus ===
|
|
9313
|
+
if (processed.flowStatus === EmbeddedFlowStatus2.Complete) {
|
|
8642
9314
|
props.onComplete?.(processed);
|
|
8643
9315
|
} else {
|
|
8644
9316
|
currentFlow.value = processed;
|
|
@@ -8653,7 +9325,7 @@ var BaseSignUp = defineComponent45({
|
|
|
8653
9325
|
},
|
|
8654
9326
|
{ deep: true }
|
|
8655
9327
|
);
|
|
8656
|
-
|
|
9328
|
+
watch11(
|
|
8657
9329
|
() => [props.isInitialized, isFlowInitialized.value],
|
|
8658
9330
|
([initialized, flowInit]) => {
|
|
8659
9331
|
const urlParams = new URL(window.location.href).searchParams;
|
|
@@ -8670,11 +9342,11 @@ var BaseSignUp = defineComponent45({
|
|
|
8670
9342
|
currentFlow.value = response;
|
|
8671
9343
|
isFlowInitialized.value = true;
|
|
8672
9344
|
props.onFlowChange?.(response);
|
|
8673
|
-
if (response.flowStatus ===
|
|
9345
|
+
if (response.flowStatus === EmbeddedFlowStatus2.Complete) {
|
|
8674
9346
|
props.onComplete?.(response);
|
|
8675
9347
|
return;
|
|
8676
9348
|
}
|
|
8677
|
-
if (response.flowStatus ===
|
|
9349
|
+
if (response.flowStatus === EmbeddedFlowStatus2.Incomplete) {
|
|
8678
9350
|
setupFormFields(response);
|
|
8679
9351
|
}
|
|
8680
9352
|
} catch (err) {
|
|
@@ -8690,9 +9362,9 @@ var BaseSignUp = defineComponent45({
|
|
|
8690
9362
|
);
|
|
8691
9363
|
return () => {
|
|
8692
9364
|
const containerClass = [
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
9365
|
+
withVendorCSSClassPrefix20("signup"),
|
|
9366
|
+
withVendorCSSClassPrefix20(`signup--${props.size}`),
|
|
9367
|
+
withVendorCSSClassPrefix20(`signup--${props.variant}`),
|
|
8696
9368
|
props.className
|
|
8697
9369
|
].filter(Boolean).join(" ");
|
|
8698
9370
|
if (slots["default"]) {
|
|
@@ -8714,20 +9386,20 @@ var BaseSignUp = defineComponent45({
|
|
|
8714
9386
|
},
|
|
8715
9387
|
values: formValues.value
|
|
8716
9388
|
};
|
|
8717
|
-
return
|
|
9389
|
+
return h50("div", { class: containerClass }, slots["default"](renderProps));
|
|
8718
9390
|
}
|
|
8719
9391
|
if (!isFlowInitialized.value && isLoading.value) {
|
|
8720
|
-
return
|
|
9392
|
+
return h50(
|
|
8721
9393
|
Card_default,
|
|
8722
9394
|
{ class: containerClass, variant: props.variant },
|
|
8723
|
-
() =>
|
|
9395
|
+
() => h50("div", { style: "display:flex;justify-content:center;padding:2rem" }, h50(Spinner_default))
|
|
8724
9396
|
);
|
|
8725
9397
|
}
|
|
8726
9398
|
if (!currentFlow.value) {
|
|
8727
|
-
return
|
|
9399
|
+
return h50(
|
|
8728
9400
|
Card_default,
|
|
8729
9401
|
{ class: containerClass, variant: props.variant },
|
|
8730
|
-
() =>
|
|
9402
|
+
() => h50(
|
|
8731
9403
|
Alert_default,
|
|
8732
9404
|
{ variant: "error" },
|
|
8733
9405
|
() => t("errors.signup.flow.initialization.failure") || "Failed to initialize sign-up flow"
|
|
@@ -8762,32 +9434,32 @@ var BaseSignUp = defineComponent45({
|
|
|
8762
9434
|
variant: props.variant
|
|
8763
9435
|
}
|
|
8764
9436
|
) : [];
|
|
8765
|
-
return
|
|
9437
|
+
return h50(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
8766
9438
|
// Header with title/subtitle
|
|
8767
|
-
props.showTitle || props.showSubtitle ?
|
|
8768
|
-
props.showTitle ?
|
|
8769
|
-
props.showSubtitle ?
|
|
9439
|
+
props.showTitle || props.showSubtitle ? h50("div", { style: "padding: 1rem 1rem 0" }, [
|
|
9440
|
+
props.showTitle ? h50(Typography_default, { variant: "h5" }, () => title) : null,
|
|
9441
|
+
props.showSubtitle ? h50(Typography_default, { style: "margin-top: 0.25rem", variant: "body1" }, () => subtitle) : null
|
|
8770
9442
|
]) : null,
|
|
8771
9443
|
// External error
|
|
8772
|
-
props.error ?
|
|
9444
|
+
props.error ? h50(
|
|
8773
9445
|
"div",
|
|
8774
9446
|
{ style: "padding: 0 1rem" },
|
|
8775
|
-
|
|
9447
|
+
h50(Alert_default, { variant: "error" }, () => props.error.message)
|
|
8776
9448
|
) : null,
|
|
8777
9449
|
// Flow messages
|
|
8778
|
-
flowMessages.value.length > 0 ?
|
|
9450
|
+
flowMessages.value.length > 0 ? h50(
|
|
8779
9451
|
"div",
|
|
8780
9452
|
{ style: "padding: 0 1rem" },
|
|
8781
9453
|
flowMessages.value.map(
|
|
8782
|
-
(msg, i) =>
|
|
9454
|
+
(msg, i) => h50(Alert_default, { key: i, variant: msg.type === "error" ? "error" : "info" }, () => msg.message)
|
|
8783
9455
|
)
|
|
8784
9456
|
) : null,
|
|
8785
9457
|
// Components
|
|
8786
|
-
|
|
9458
|
+
h50(
|
|
8787
9459
|
"div",
|
|
8788
9460
|
{ style: "padding: 1rem" },
|
|
8789
9461
|
renderedComponents.length > 0 ? renderedComponents : [
|
|
8790
|
-
|
|
9462
|
+
h50(
|
|
8791
9463
|
Alert_default,
|
|
8792
9464
|
{ variant: "warning" },
|
|
8793
9465
|
() => t("errors.signup.components.not.available") || "No components available"
|
|
@@ -8798,10 +9470,10 @@ var BaseSignUp = defineComponent45({
|
|
|
8798
9470
|
};
|
|
8799
9471
|
}
|
|
8800
9472
|
});
|
|
8801
|
-
var
|
|
9473
|
+
var BaseSignUp_default2 = BaseSignUp2;
|
|
8802
9474
|
|
|
8803
|
-
// src/components/presentation/sign-up/SignUp.ts
|
|
8804
|
-
var
|
|
9475
|
+
// src/components/presentation/sign-up/v2/SignUp.ts
|
|
9476
|
+
var SignUp2 = defineComponent48({
|
|
8805
9477
|
name: "SignUp",
|
|
8806
9478
|
props: {
|
|
8807
9479
|
afterSignUpUrl: { default: void 0, type: String },
|
|
@@ -8825,7 +9497,7 @@ var SignUp = defineComponent46({
|
|
|
8825
9497
|
const applicationIdFromUrl = urlParams.get("applicationId");
|
|
8826
9498
|
const effectiveApplicationId = applicationId || applicationIdFromUrl || void 0;
|
|
8827
9499
|
const initialPayload = payload || {
|
|
8828
|
-
flowType:
|
|
9500
|
+
flowType: EmbeddedFlowType3.Registration,
|
|
8829
9501
|
...effectiveApplicationId && { applicationId: effectiveApplicationId }
|
|
8830
9502
|
};
|
|
8831
9503
|
return await signUp(initialPayload);
|
|
@@ -8838,15 +9510,15 @@ var SignUp = defineComponent46({
|
|
|
8838
9510
|
window.location.href = oauthRedirectUrl;
|
|
8839
9511
|
return;
|
|
8840
9512
|
}
|
|
8841
|
-
if (props.shouldRedirectAfterSignUp && response?.type !==
|
|
9513
|
+
if (props.shouldRedirectAfterSignUp && response?.type !== EmbeddedFlowResponseType4.Redirection && props.afterSignUpUrl) {
|
|
8842
9514
|
window.location.href = props.afterSignUpUrl;
|
|
8843
9515
|
}
|
|
8844
|
-
if (props.shouldRedirectAfterSignUp && response?.type ===
|
|
9516
|
+
if (props.shouldRedirectAfterSignUp && response?.type === EmbeddedFlowResponseType4.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && !response.data.redirectURL.includes("auth")) {
|
|
8845
9517
|
window.location.href = response.data.redirectURL;
|
|
8846
9518
|
}
|
|
8847
9519
|
};
|
|
8848
|
-
return () =>
|
|
8849
|
-
|
|
9520
|
+
return () => h51(
|
|
9521
|
+
BaseSignUp_default2,
|
|
8850
9522
|
{
|
|
8851
9523
|
afterSignUpUrl: props.afterSignUpUrl,
|
|
8852
9524
|
buttonClassName: props.buttonClassName,
|
|
@@ -8868,24 +9540,110 @@ var SignUp = defineComponent46({
|
|
|
8868
9540
|
);
|
|
8869
9541
|
}
|
|
8870
9542
|
});
|
|
8871
|
-
var
|
|
9543
|
+
var SignUp_default2 = SignUp2;
|
|
9544
|
+
|
|
9545
|
+
// src/components/presentation/sign-up/SignUp.ts
|
|
9546
|
+
var SignUp3 = defineComponent49({
|
|
9547
|
+
inheritAttrs: false,
|
|
9548
|
+
name: "SignUp",
|
|
9549
|
+
setup(_props, { attrs, slots }) {
|
|
9550
|
+
const { platform } = useAsgardeo_default();
|
|
9551
|
+
return () => {
|
|
9552
|
+
if (platform === Platform5.AsgardeoV2) {
|
|
9553
|
+
return h52(SignUp_default2, { ...attrs }, slots);
|
|
9554
|
+
}
|
|
9555
|
+
return h52(SignUp_default, { ...attrs }, slots);
|
|
9556
|
+
};
|
|
9557
|
+
}
|
|
9558
|
+
});
|
|
9559
|
+
var SignUp_default3 = SignUp3;
|
|
9560
|
+
|
|
9561
|
+
// src/components/presentation/sign-up/BaseSignUp.ts
|
|
9562
|
+
import { Platform as Platform6 } from "@asgardeo/browser";
|
|
9563
|
+
import { defineComponent as defineComponent50, h as h53 } from "vue";
|
|
9564
|
+
var BaseSignUp3 = defineComponent50({
|
|
9565
|
+
inheritAttrs: false,
|
|
9566
|
+
name: "BaseSignUp",
|
|
9567
|
+
setup(_props, { attrs, slots }) {
|
|
9568
|
+
const { platform } = useAsgardeo_default();
|
|
9569
|
+
return () => {
|
|
9570
|
+
if (platform === Platform6.AsgardeoV2) {
|
|
9571
|
+
return h53(BaseSignUp_default2, { ...attrs }, slots);
|
|
9572
|
+
}
|
|
9573
|
+
return h53(BaseSignUp_default, { ...attrs }, slots);
|
|
9574
|
+
};
|
|
9575
|
+
}
|
|
9576
|
+
});
|
|
9577
|
+
var BaseSignUp_default3 = BaseSignUp3;
|
|
8872
9578
|
|
|
8873
9579
|
// src/components/presentation/user-profile/UserProfile.ts
|
|
8874
|
-
import { withVendorCSSClassPrefix as
|
|
8875
|
-
import { defineComponent as
|
|
9580
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix22 } from "@asgardeo/browser";
|
|
9581
|
+
import { defineComponent as defineComponent52, h as h55 } from "vue";
|
|
8876
9582
|
|
|
8877
9583
|
// src/components/presentation/user-profile/BaseUserProfile.ts
|
|
8878
|
-
import {
|
|
8879
|
-
|
|
9584
|
+
import {
|
|
9585
|
+
WellKnownSchemaIds,
|
|
9586
|
+
withVendorCSSClassPrefix as withVendorCSSClassPrefix21
|
|
9587
|
+
} from "@asgardeo/browser";
|
|
9588
|
+
import { defineComponent as defineComponent51, h as h54, ref as ref19 } from "vue";
|
|
8880
9589
|
var PROFILE_FIELD_DESCRIPTORS = [
|
|
8881
|
-
{ keys: ["
|
|
8882
|
-
{ keys: ["firstName", "givenName"], label: "First Name", readonly: false },
|
|
8883
|
-
{ keys: ["lastName", "familyName"], label: "Last Name", readonly: false },
|
|
8884
|
-
{ keys: ["
|
|
9590
|
+
{ keys: ["userName", "username"], label: "Username", readonly: true },
|
|
9591
|
+
{ keys: ["name.givenName", "firstName", "givenName"], label: "First Name", readonly: false },
|
|
9592
|
+
{ keys: ["name.familyName", "lastName", "familyName"], label: "Last Name", readonly: false },
|
|
9593
|
+
{ keys: ["emails", "email"], label: "Email", readonly: true },
|
|
8885
9594
|
{ keys: ["country"], label: "Country", readonly: false },
|
|
8886
|
-
{ keys: ["
|
|
8887
|
-
{ keys: ["mobile", "
|
|
9595
|
+
{ keys: ["dateOfBirth", "birthdate", "birthDate"], label: "Birth Date", readonly: false },
|
|
9596
|
+
{ keys: ["phoneNumbers.mobile", "mobile", "mobileNumbers"], label: "Mobile", readonly: false }
|
|
8888
9597
|
];
|
|
9598
|
+
var CORE_USER_SCHEMA_ID = WellKnownSchemaIds.User;
|
|
9599
|
+
var setNestedPath = (target, segments, value) => {
|
|
9600
|
+
let cursor = target;
|
|
9601
|
+
for (let i = 0; i < segments.length - 1; i += 1) {
|
|
9602
|
+
const segment = segments[i];
|
|
9603
|
+
if (typeof cursor[segment] !== "object" || cursor[segment] === null) {
|
|
9604
|
+
cursor[segment] = {};
|
|
9605
|
+
}
|
|
9606
|
+
cursor = cursor[segment];
|
|
9607
|
+
}
|
|
9608
|
+
cursor[segments[segments.length - 1]] = value;
|
|
9609
|
+
};
|
|
9610
|
+
var buildScimPatchValue = (flatKey, rawValue, schemas) => {
|
|
9611
|
+
const list = schemas ?? [];
|
|
9612
|
+
const entry = list.find((s) => s.name === flatKey);
|
|
9613
|
+
if (flatKey === "phoneNumbers.mobile") {
|
|
9614
|
+
return {
|
|
9615
|
+
phoneNumbers: [{ type: "mobile", value: rawValue }],
|
|
9616
|
+
[WellKnownSchemaIds.SystemUser]: { mobileNumbers: [rawValue] }
|
|
9617
|
+
};
|
|
9618
|
+
}
|
|
9619
|
+
const complexMultiValued = /* @__PURE__ */ new Set([
|
|
9620
|
+
"phoneNumbers",
|
|
9621
|
+
"emails",
|
|
9622
|
+
"ims",
|
|
9623
|
+
"photos",
|
|
9624
|
+
"addresses",
|
|
9625
|
+
"entitlements",
|
|
9626
|
+
"roles",
|
|
9627
|
+
"x509Certificates"
|
|
9628
|
+
]);
|
|
9629
|
+
const dotIndex = flatKey.indexOf(".");
|
|
9630
|
+
if (dotIndex > 0) {
|
|
9631
|
+
const head = flatKey.slice(0, dotIndex);
|
|
9632
|
+
const tail = flatKey.slice(dotIndex + 1);
|
|
9633
|
+
if (complexMultiValued.has(head)) {
|
|
9634
|
+
return { [head]: [{ type: tail, value: rawValue }] };
|
|
9635
|
+
}
|
|
9636
|
+
}
|
|
9637
|
+
const value = entry?.multiValued ? [rawValue] : rawValue;
|
|
9638
|
+
const segments = flatKey.split(".");
|
|
9639
|
+
const nested = {};
|
|
9640
|
+
setNestedPath(nested, segments, value);
|
|
9641
|
+
const schemaId = entry?.schemaId;
|
|
9642
|
+
if (schemaId && schemaId !== CORE_USER_SCHEMA_ID) {
|
|
9643
|
+
return { [schemaId]: nested };
|
|
9644
|
+
}
|
|
9645
|
+
return nested;
|
|
9646
|
+
};
|
|
8889
9647
|
var AVATAR_GRADIENTS = [
|
|
8890
9648
|
"linear-gradient(135deg, #a855f7 0%, #ec4899 100%)",
|
|
8891
9649
|
"linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%)",
|
|
@@ -8913,7 +9671,7 @@ var getUserInitials = (user) => {
|
|
|
8913
9671
|
const fallback = String(user["username"] || user["userName"] || user["email"] || user["sub"] || "");
|
|
8914
9672
|
return fallback.charAt(0).toUpperCase() || "?";
|
|
8915
9673
|
};
|
|
8916
|
-
var BaseUserProfile =
|
|
9674
|
+
var BaseUserProfile = defineComponent51({
|
|
8917
9675
|
inheritAttrs: false,
|
|
8918
9676
|
name: "BaseUserProfile",
|
|
8919
9677
|
props: {
|
|
@@ -8934,8 +9692,8 @@ var BaseUserProfile = defineComponent47({
|
|
|
8934
9692
|
title: { default: "Profile", type: String }
|
|
8935
9693
|
},
|
|
8936
9694
|
setup(props, { slots }) {
|
|
8937
|
-
const editingFields =
|
|
8938
|
-
const editedValues =
|
|
9695
|
+
const editingFields = ref19({});
|
|
9696
|
+
const editedValues = ref19({});
|
|
8939
9697
|
return () => {
|
|
8940
9698
|
if (slots["default"]) {
|
|
8941
9699
|
return slots["default"]({
|
|
@@ -8944,7 +9702,7 @@ var BaseUserProfile = defineComponent47({
|
|
|
8944
9702
|
profile: props.flattenedProfile || props.profile
|
|
8945
9703
|
});
|
|
8946
9704
|
}
|
|
8947
|
-
const prefix =
|
|
9705
|
+
const prefix = withVendorCSSClassPrefix21;
|
|
8948
9706
|
const data = props.flattenedProfile || props.profile;
|
|
8949
9707
|
const dataRecord = data;
|
|
8950
9708
|
const initials = getUserInitials(dataRecord);
|
|
@@ -8954,28 +9712,28 @@ var BaseUserProfile = defineComponent47({
|
|
|
8954
9712
|
const avatarGradient = getAvatarGradient(avatarSeed);
|
|
8955
9713
|
const children = [];
|
|
8956
9714
|
children.push(
|
|
8957
|
-
|
|
8958
|
-
|
|
9715
|
+
h54("div", { class: prefix("user-profile__header") }, [
|
|
9716
|
+
h54(Typography_default, { class: prefix("user-profile__title"), variant: "h5" }, () => props.title)
|
|
8959
9717
|
])
|
|
8960
9718
|
);
|
|
8961
|
-
children.push(
|
|
9719
|
+
children.push(h54(Divider_default, { class: prefix("user-profile__header-divider") }));
|
|
8962
9720
|
children.push(
|
|
8963
|
-
|
|
8964
|
-
|
|
9721
|
+
h54("div", { class: prefix("user-profile__avatar-section") }, [
|
|
9722
|
+
h54(
|
|
8965
9723
|
"div",
|
|
8966
9724
|
{
|
|
8967
9725
|
class: prefix("user-profile__avatar"),
|
|
8968
9726
|
style: { background: avatarGradient }
|
|
8969
9727
|
},
|
|
8970
|
-
[
|
|
9728
|
+
[h54("span", { class: prefix("user-profile__avatar-initials") }, initials)]
|
|
8971
9729
|
)
|
|
8972
9730
|
])
|
|
8973
9731
|
);
|
|
8974
9732
|
if (props.error) {
|
|
8975
|
-
children.push(
|
|
9733
|
+
children.push(h54(Alert_default, { class: prefix("user-profile__error"), severity: "error" }, () => props.error));
|
|
8976
9734
|
}
|
|
8977
9735
|
if (props.isLoading) {
|
|
8978
|
-
children.push(
|
|
9736
|
+
children.push(h54("div", { class: prefix("user-profile__loading") }, [h54(Spinner_default)]));
|
|
8979
9737
|
} else if (data) {
|
|
8980
9738
|
const fieldDataRecord = data;
|
|
8981
9739
|
const descriptors = PROFILE_FIELD_DESCRIPTORS.filter((d) => {
|
|
@@ -8995,28 +9753,28 @@ var BaseUserProfile = defineComponent47({
|
|
|
8995
9753
|
const isEmpty2 = value == null || value === "";
|
|
8996
9754
|
const { label } = descriptor;
|
|
8997
9755
|
fieldRows.push(
|
|
8998
|
-
|
|
9756
|
+
h54("div", { class: prefix("user-profile__field"), key }, [
|
|
8999
9757
|
// Label column
|
|
9000
|
-
|
|
9001
|
-
|
|
9758
|
+
h54("div", { class: prefix("user-profile__field-label-col") }, [
|
|
9759
|
+
h54(Typography_default, { class: prefix("user-profile__field-label"), variant: "body2" }, () => label)
|
|
9002
9760
|
]),
|
|
9003
9761
|
// Value column
|
|
9004
|
-
|
|
9005
|
-
isEditing ?
|
|
9006
|
-
|
|
9762
|
+
h54("div", { class: prefix("user-profile__field-value-col") }, [
|
|
9763
|
+
isEditing ? h54("div", { class: prefix("user-profile__field-edit") }, [
|
|
9764
|
+
h54(TextField_default, {
|
|
9007
9765
|
modelValue: editedValues.value[key] ?? String(value ?? ""),
|
|
9008
9766
|
"onUpdate:modelValue": (v) => {
|
|
9009
9767
|
editedValues.value = { ...editedValues.value, [key]: v };
|
|
9010
9768
|
}
|
|
9011
9769
|
}),
|
|
9012
|
-
|
|
9013
|
-
|
|
9770
|
+
h54("div", { class: prefix("user-profile__field-edit-actions") }, [
|
|
9771
|
+
h54(
|
|
9014
9772
|
Button_default,
|
|
9015
9773
|
{
|
|
9016
9774
|
onClick: async () => {
|
|
9017
9775
|
if (props.onUpdate) {
|
|
9018
9776
|
await props.onUpdate({
|
|
9019
|
-
payload:
|
|
9777
|
+
payload: buildScimPatchValue(key, editedValues.value[key] ?? "", props.schemas)
|
|
9020
9778
|
});
|
|
9021
9779
|
}
|
|
9022
9780
|
editingFields.value = { ...editingFields.value, [key]: false };
|
|
@@ -9026,7 +9784,7 @@ var BaseUserProfile = defineComponent47({
|
|
|
9026
9784
|
},
|
|
9027
9785
|
() => "Save"
|
|
9028
9786
|
),
|
|
9029
|
-
|
|
9787
|
+
h54(
|
|
9030
9788
|
Button_default,
|
|
9031
9789
|
{
|
|
9032
9790
|
onClick: () => {
|
|
@@ -9038,8 +9796,8 @@ var BaseUserProfile = defineComponent47({
|
|
|
9038
9796
|
() => "Cancel"
|
|
9039
9797
|
)
|
|
9040
9798
|
])
|
|
9041
|
-
]) :
|
|
9042
|
-
isEmpty2 ?
|
|
9799
|
+
]) : h54("div", { class: prefix("user-profile__field-display") }, [
|
|
9800
|
+
isEmpty2 ? h54(
|
|
9043
9801
|
"span",
|
|
9044
9802
|
{
|
|
9045
9803
|
class: prefix("user-profile__field-placeholder"),
|
|
@@ -9049,12 +9807,12 @@ var BaseUserProfile = defineComponent47({
|
|
|
9049
9807
|
} : void 0
|
|
9050
9808
|
},
|
|
9051
9809
|
`Enter your ${label.toLowerCase()}`
|
|
9052
|
-
) :
|
|
9810
|
+
) : h54(
|
|
9053
9811
|
Typography_default,
|
|
9054
9812
|
{ class: prefix("user-profile__field-value"), variant: "body1" },
|
|
9055
9813
|
() => String(value)
|
|
9056
9814
|
),
|
|
9057
|
-
props.editable && !isReadonly ?
|
|
9815
|
+
props.editable && !isReadonly ? h54(
|
|
9058
9816
|
"button",
|
|
9059
9817
|
{
|
|
9060
9818
|
"aria-label": `Edit ${label}`,
|
|
@@ -9065,29 +9823,29 @@ var BaseUserProfile = defineComponent47({
|
|
|
9065
9823
|
},
|
|
9066
9824
|
type: "button"
|
|
9067
9825
|
},
|
|
9068
|
-
[
|
|
9826
|
+
[h54(PencilIcon)]
|
|
9069
9827
|
) : null
|
|
9070
9828
|
])
|
|
9071
9829
|
])
|
|
9072
9830
|
])
|
|
9073
9831
|
);
|
|
9074
9832
|
});
|
|
9075
|
-
children.push(
|
|
9833
|
+
children.push(h54("div", { class: prefix("user-profile__fields") }, fieldRows));
|
|
9076
9834
|
}
|
|
9077
9835
|
if (slots["footer"]) {
|
|
9078
|
-
children.push(
|
|
9836
|
+
children.push(h54("div", { class: prefix("user-profile__footer") }, slots["footer"]()));
|
|
9079
9837
|
}
|
|
9080
9838
|
if (props.cardLayout) {
|
|
9081
|
-
return
|
|
9839
|
+
return h54(Card_default, { class: [prefix("user-profile"), props.className].filter(Boolean).join(" ") }, () => children);
|
|
9082
9840
|
}
|
|
9083
|
-
return
|
|
9841
|
+
return h54("div", { class: [prefix("user-profile"), props.className].filter(Boolean).join(" ") }, children);
|
|
9084
9842
|
};
|
|
9085
9843
|
}
|
|
9086
9844
|
});
|
|
9087
9845
|
var BaseUserProfile_default = BaseUserProfile;
|
|
9088
9846
|
|
|
9089
9847
|
// src/components/presentation/user-profile/UserProfile.ts
|
|
9090
|
-
var UserProfile3 =
|
|
9848
|
+
var UserProfile3 = defineComponent52({
|
|
9091
9849
|
name: "UserProfile",
|
|
9092
9850
|
props: {
|
|
9093
9851
|
cardLayout: { default: true, type: Boolean },
|
|
@@ -9099,11 +9857,11 @@ var UserProfile3 = defineComponent48({
|
|
|
9099
9857
|
},
|
|
9100
9858
|
setup(props, { slots }) {
|
|
9101
9859
|
const { flattenedProfile, schemas, updateProfile } = useUser_default();
|
|
9102
|
-
return () =>
|
|
9860
|
+
return () => h55(
|
|
9103
9861
|
BaseUserProfile_default,
|
|
9104
9862
|
{
|
|
9105
9863
|
cardLayout: props.cardLayout,
|
|
9106
|
-
class:
|
|
9864
|
+
class: withVendorCSSClassPrefix22("user-profile--styled"),
|
|
9107
9865
|
className: props.className,
|
|
9108
9866
|
editable: props.editable,
|
|
9109
9867
|
flattenedProfile: flattenedProfile?.value,
|
|
@@ -9120,13 +9878,13 @@ var UserProfile3 = defineComponent48({
|
|
|
9120
9878
|
var UserProfile_default = UserProfile3;
|
|
9121
9879
|
|
|
9122
9880
|
// src/components/presentation/user-dropdown/UserDropdown.ts
|
|
9123
|
-
import { withVendorCSSClassPrefix as
|
|
9124
|
-
import { defineComponent as
|
|
9881
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix24 } from "@asgardeo/browser";
|
|
9882
|
+
import { defineComponent as defineComponent54, h as h57, ref as ref21 } from "vue";
|
|
9125
9883
|
|
|
9126
9884
|
// src/components/presentation/user-dropdown/BaseUserDropdown.ts
|
|
9127
|
-
import { withVendorCSSClassPrefix as
|
|
9128
|
-
import { defineComponent as
|
|
9129
|
-
var BaseUserDropdown =
|
|
9885
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix23 } from "@asgardeo/browser";
|
|
9886
|
+
import { defineComponent as defineComponent53, h as h56, ref as ref20 } from "vue";
|
|
9887
|
+
var BaseUserDropdown = defineComponent53({
|
|
9130
9888
|
inheritAttrs: false,
|
|
9131
9889
|
name: "BaseUserDropdown",
|
|
9132
9890
|
props: {
|
|
@@ -9139,8 +9897,8 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9139
9897
|
user: { default: null, type: Object }
|
|
9140
9898
|
},
|
|
9141
9899
|
setup(props, { slots }) {
|
|
9142
|
-
const isOpen =
|
|
9143
|
-
const prefix =
|
|
9900
|
+
const isOpen = ref20(false);
|
|
9901
|
+
const prefix = withVendorCSSClassPrefix23;
|
|
9144
9902
|
return () => {
|
|
9145
9903
|
if (slots["default"]) {
|
|
9146
9904
|
return slots["default"]({
|
|
@@ -9168,7 +9926,7 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9168
9926
|
const displayName = resolveDisplayName();
|
|
9169
9927
|
const children = [];
|
|
9170
9928
|
children.push(
|
|
9171
|
-
|
|
9929
|
+
h56(
|
|
9172
9930
|
"button",
|
|
9173
9931
|
{
|
|
9174
9932
|
class: prefix("user-dropdown__trigger"),
|
|
@@ -9178,9 +9936,9 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9178
9936
|
type: "button"
|
|
9179
9937
|
},
|
|
9180
9938
|
[
|
|
9181
|
-
|
|
9182
|
-
displayName ?
|
|
9183
|
-
|
|
9939
|
+
h56("span", { class: prefix("user-dropdown__avatar") }, [h56(UserIcon, { size: 20 })]),
|
|
9940
|
+
displayName ? h56(Typography_default, { class: prefix("user-dropdown__name"), variant: "body2" }, () => displayName) : null,
|
|
9941
|
+
h56(ChevronDownIcon, { size: 16 })
|
|
9184
9942
|
]
|
|
9185
9943
|
)
|
|
9186
9944
|
);
|
|
@@ -9188,9 +9946,9 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9188
9946
|
const menuItems = [];
|
|
9189
9947
|
if (props.onProfileClick) {
|
|
9190
9948
|
menuItems.push(
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9949
|
+
h56("button", { class: prefix("user-dropdown__item"), onClick: props.onProfileClick, type: "button" }, [
|
|
9950
|
+
h56(UserIcon, { size: 16 }),
|
|
9951
|
+
h56("span", null, "Profile")
|
|
9194
9952
|
])
|
|
9195
9953
|
);
|
|
9196
9954
|
}
|
|
@@ -9199,25 +9957,25 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9199
9957
|
}
|
|
9200
9958
|
if (props.onSignOut) {
|
|
9201
9959
|
menuItems.push(
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9960
|
+
h56("button", { class: prefix("user-dropdown__item"), onClick: props.onSignOut, type: "button" }, [
|
|
9961
|
+
h56(LogOutIcon, { size: 16 }),
|
|
9962
|
+
h56("span", null, "Sign Out")
|
|
9205
9963
|
])
|
|
9206
9964
|
);
|
|
9207
9965
|
}
|
|
9208
|
-
children.push(
|
|
9966
|
+
children.push(h56("div", { class: prefix("user-dropdown__menu") }, menuItems));
|
|
9209
9967
|
}
|
|
9210
|
-
const container =
|
|
9968
|
+
const container = h56(
|
|
9211
9969
|
"div",
|
|
9212
9970
|
{ class: [prefix("user-dropdown"), props.className].filter(Boolean).join(" ") },
|
|
9213
9971
|
children
|
|
9214
9972
|
);
|
|
9215
9973
|
if (props.isProfileModalOpen) {
|
|
9216
|
-
return
|
|
9974
|
+
return h56("div", [
|
|
9217
9975
|
container,
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9976
|
+
h56("div", { class: prefix("user-dropdown__modal-overlay") }, [
|
|
9977
|
+
h56("div", { class: prefix("user-dropdown__modal-content") }, [
|
|
9978
|
+
h56(
|
|
9221
9979
|
"button",
|
|
9222
9980
|
{
|
|
9223
9981
|
"aria-label": "Close profile modal",
|
|
@@ -9225,7 +9983,7 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9225
9983
|
onClick: props.onProfileModalClose,
|
|
9226
9984
|
type: "button"
|
|
9227
9985
|
},
|
|
9228
|
-
[
|
|
9986
|
+
[h56(XIcon, { size: 24 })]
|
|
9229
9987
|
),
|
|
9230
9988
|
props.profileContent
|
|
9231
9989
|
])
|
|
@@ -9239,7 +9997,7 @@ var BaseUserDropdown = defineComponent49({
|
|
|
9239
9997
|
var BaseUserDropdown_default = BaseUserDropdown;
|
|
9240
9998
|
|
|
9241
9999
|
// src/components/presentation/user-dropdown/UserDropdown.ts
|
|
9242
|
-
var UserDropdown =
|
|
10000
|
+
var UserDropdown = defineComponent54({
|
|
9243
10001
|
emits: ["profileClick"],
|
|
9244
10002
|
name: "UserDropdown",
|
|
9245
10003
|
props: {
|
|
@@ -9250,11 +10008,11 @@ var UserDropdown = defineComponent50({
|
|
|
9250
10008
|
},
|
|
9251
10009
|
setup(props, { slots, emit }) {
|
|
9252
10010
|
const { user, signOut } = useAsgardeo_default();
|
|
9253
|
-
const isProfileModalOpen =
|
|
9254
|
-
return () =>
|
|
10011
|
+
const isProfileModalOpen = ref21(false);
|
|
10012
|
+
return () => h57(
|
|
9255
10013
|
BaseUserDropdown_default,
|
|
9256
10014
|
{
|
|
9257
|
-
class:
|
|
10015
|
+
class: withVendorCSSClassPrefix24("user-dropdown--styled"),
|
|
9258
10016
|
className: props.className,
|
|
9259
10017
|
isProfileModalOpen: isProfileModalOpen.value,
|
|
9260
10018
|
onProfileClick: () => {
|
|
@@ -9267,7 +10025,7 @@ var UserDropdown = defineComponent50({
|
|
|
9267
10025
|
onSignOut: () => {
|
|
9268
10026
|
signOut();
|
|
9269
10027
|
},
|
|
9270
|
-
profileContent: isProfileModalOpen.value ?
|
|
10028
|
+
profileContent: isProfileModalOpen.value ? h57(UserProfile_default, {
|
|
9271
10029
|
cardLayout: false,
|
|
9272
10030
|
editable: true
|
|
9273
10031
|
}) : null,
|
|
@@ -9280,17 +10038,17 @@ var UserDropdown = defineComponent50({
|
|
|
9280
10038
|
var UserDropdown_default = UserDropdown;
|
|
9281
10039
|
|
|
9282
10040
|
// src/components/presentation/accept-invite/AcceptInvite.ts
|
|
9283
|
-
import { defineComponent as
|
|
10041
|
+
import { defineComponent as defineComponent56, h as h59 } from "vue";
|
|
9284
10042
|
|
|
9285
10043
|
// src/components/presentation/accept-invite/BaseAcceptInvite.ts
|
|
9286
|
-
import { withVendorCSSClassPrefix as
|
|
10044
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix25 } from "@asgardeo/browser";
|
|
9287
10045
|
import {
|
|
9288
|
-
defineComponent as
|
|
9289
|
-
h as
|
|
9290
|
-
ref as
|
|
9291
|
-
watch as
|
|
10046
|
+
defineComponent as defineComponent55,
|
|
10047
|
+
h as h58,
|
|
10048
|
+
ref as ref22,
|
|
10049
|
+
watch as watch12
|
|
9292
10050
|
} from "vue";
|
|
9293
|
-
var BaseAcceptInvite =
|
|
10051
|
+
var BaseAcceptInvite = defineComponent55({
|
|
9294
10052
|
name: "BaseAcceptInvite",
|
|
9295
10053
|
props: {
|
|
9296
10054
|
className: { default: "", type: String },
|
|
@@ -9315,17 +10073,17 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9315
10073
|
setup(props, { slots }) {
|
|
9316
10074
|
const { meta: metaRef } = useFlowMeta_default();
|
|
9317
10075
|
const { t } = useI18n_default();
|
|
9318
|
-
const isLoading =
|
|
9319
|
-
const isValidatingToken =
|
|
9320
|
-
const isTokenInvalid =
|
|
9321
|
-
const isComplete =
|
|
9322
|
-
const currentFlow =
|
|
9323
|
-
const apiError =
|
|
9324
|
-
const completionTitle =
|
|
9325
|
-
const formValues =
|
|
9326
|
-
const formErrors =
|
|
9327
|
-
const touchedFields =
|
|
9328
|
-
const isFormValid =
|
|
10076
|
+
const isLoading = ref22(false);
|
|
10077
|
+
const isValidatingToken = ref22(true);
|
|
10078
|
+
const isTokenInvalid = ref22(false);
|
|
10079
|
+
const isComplete = ref22(false);
|
|
10080
|
+
const currentFlow = ref22(null);
|
|
10081
|
+
const apiError = ref22(null);
|
|
10082
|
+
const completionTitle = ref22(void 0);
|
|
10083
|
+
const formValues = ref22({});
|
|
10084
|
+
const formErrors = ref22({});
|
|
10085
|
+
const touchedFields = ref22({});
|
|
10086
|
+
const isFormValid = ref22(true);
|
|
9329
10087
|
let tokenValidationAttempted = false;
|
|
9330
10088
|
const handleError = (error) => {
|
|
9331
10089
|
const errorMessage = error?.failureReason || extractErrorMessage(error, t, "components.acceptInvite.errors.generic");
|
|
@@ -9347,8 +10105,8 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9347
10105
|
}
|
|
9348
10106
|
};
|
|
9349
10107
|
useOAuthCallback({
|
|
9350
|
-
currentFlowId:
|
|
9351
|
-
isInitialized:
|
|
10108
|
+
currentFlowId: ref22(props.flowId ?? null),
|
|
10109
|
+
isInitialized: ref22(true),
|
|
9352
10110
|
onComplete: () => {
|
|
9353
10111
|
isComplete.value = true;
|
|
9354
10112
|
isValidatingToken.value = false;
|
|
@@ -9465,7 +10223,7 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9465
10223
|
isLoading.value = false;
|
|
9466
10224
|
}
|
|
9467
10225
|
};
|
|
9468
|
-
|
|
10226
|
+
watch12(
|
|
9469
10227
|
() => [props.flowId, props.inviteToken],
|
|
9470
10228
|
([flowId, inviteToken]) => {
|
|
9471
10229
|
if (tokenValidationAttempted) return;
|
|
@@ -9516,7 +10274,7 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9516
10274
|
(comp) => !(comp.type === "TEXT" && (comp.variant === "HEADING_1" || comp.variant === "HEADING_2"))
|
|
9517
10275
|
);
|
|
9518
10276
|
return () => {
|
|
9519
|
-
const containerClass = [
|
|
10277
|
+
const containerClass = [withVendorCSSClassPrefix25("accept-invite"), props.className].filter(Boolean).join(" ");
|
|
9520
10278
|
const components = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];
|
|
9521
10279
|
const { title, subtitle } = extractHeadings(components);
|
|
9522
10280
|
const componentsWithoutHeadings = filterHeadings(components);
|
|
@@ -9544,44 +10302,44 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9544
10302
|
touched: touchedFields.value,
|
|
9545
10303
|
values: formValues.value
|
|
9546
10304
|
};
|
|
9547
|
-
return
|
|
10305
|
+
return h58("div", { class: containerClass }, slots["default"](renderProps));
|
|
9548
10306
|
}
|
|
9549
10307
|
if (isValidatingToken.value) {
|
|
9550
|
-
return
|
|
10308
|
+
return h58(
|
|
9551
10309
|
Card_default,
|
|
9552
10310
|
{ class: containerClass, variant: props.variant },
|
|
9553
|
-
() =>
|
|
9554
|
-
|
|
9555
|
-
|
|
10311
|
+
() => h58("div", { style: "display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem" }, [
|
|
10312
|
+
h58(Spinner_default),
|
|
10313
|
+
h58(Typography_default, { variant: "body1" }, () => "Validating your invite link...")
|
|
9556
10314
|
])
|
|
9557
10315
|
);
|
|
9558
10316
|
}
|
|
9559
10317
|
if (isTokenInvalid.value) {
|
|
9560
|
-
return
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
10318
|
+
return h58(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
10319
|
+
h58("div", { style: "padding:1rem" }, [
|
|
10320
|
+
h58(Typography_default, { variant: "h5" }, () => "Invalid Invite Link"),
|
|
10321
|
+
h58(
|
|
9564
10322
|
Alert_default,
|
|
9565
10323
|
{ style: "margin-top:1rem", variant: "error" },
|
|
9566
10324
|
() => apiError.value?.message || "This invite link is invalid or has expired. Please contact your administrator for a new invite."
|
|
9567
10325
|
),
|
|
9568
|
-
props.onGoToSignIn ?
|
|
9569
|
-
|
|
10326
|
+
props.onGoToSignIn ? h58("div", { style: "display:flex;justify-content:center;margin-top:1.5rem" }, [
|
|
10327
|
+
h58(Button_default, { onClick: props.onGoToSignIn, variant: "outline" }, () => "Go to Sign In")
|
|
9570
10328
|
]) : null
|
|
9571
10329
|
])
|
|
9572
10330
|
]);
|
|
9573
10331
|
}
|
|
9574
10332
|
if (isComplete.value) {
|
|
9575
|
-
return
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
10333
|
+
return h58(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
10334
|
+
h58("div", { style: "padding:1rem" }, [
|
|
10335
|
+
h58(Typography_default, { variant: "h5" }, () => "Account Setup Complete!"),
|
|
10336
|
+
h58(
|
|
9579
10337
|
Alert_default,
|
|
9580
10338
|
{ style: "margin-top:1rem", variant: "success" },
|
|
9581
10339
|
() => "Your account has been successfully set up. You can now sign in with your credentials."
|
|
9582
10340
|
),
|
|
9583
|
-
props.onGoToSignIn ?
|
|
9584
|
-
|
|
10341
|
+
props.onGoToSignIn ? h58("div", { style: "display:flex;justify-content:center;margin-top:1.5rem" }, [
|
|
10342
|
+
h58(Button_default, { onClick: props.onGoToSignIn, variant: "solid" }, () => "Sign In")
|
|
9585
10343
|
]) : null
|
|
9586
10344
|
])
|
|
9587
10345
|
]);
|
|
@@ -9603,17 +10361,17 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9603
10361
|
variant: props.variant
|
|
9604
10362
|
}
|
|
9605
10363
|
) : [];
|
|
9606
|
-
return
|
|
9607
|
-
(props.showTitle || props.showSubtitle) && (title || subtitle) ?
|
|
9608
|
-
props.showTitle && title ?
|
|
9609
|
-
props.showSubtitle && subtitle ?
|
|
10364
|
+
return h58(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
10365
|
+
(props.showTitle || props.showSubtitle) && (title || subtitle) ? h58("div", { style: "padding:1rem 1rem 0" }, [
|
|
10366
|
+
props.showTitle && title ? h58(Typography_default, { variant: "h5" }, () => title) : null,
|
|
10367
|
+
props.showSubtitle && subtitle ? h58(Typography_default, { style: "margin-top:0.25rem", variant: "body1" }, () => subtitle) : null
|
|
9610
10368
|
]) : null,
|
|
9611
|
-
apiError.value ?
|
|
10369
|
+
apiError.value ? h58(
|
|
9612
10370
|
"div",
|
|
9613
10371
|
{ style: "padding:0 1rem;margin-bottom:1rem" },
|
|
9614
|
-
|
|
10372
|
+
h58(Alert_default, { variant: "error" }, () => apiError.value.message)
|
|
9615
10373
|
) : null,
|
|
9616
|
-
|
|
10374
|
+
h58(
|
|
9617
10375
|
"div",
|
|
9618
10376
|
{ style: "padding:1rem" },
|
|
9619
10377
|
(() => {
|
|
@@ -9621,18 +10379,18 @@ var BaseAcceptInvite = defineComponent51({
|
|
|
9621
10379
|
if (renderedComponents.length > 0) {
|
|
9622
10380
|
formContent.push(renderedComponents);
|
|
9623
10381
|
} else if (!isLoading.value) {
|
|
9624
|
-
formContent.push(
|
|
10382
|
+
formContent.push(h58(Alert_default, { variant: "warning" }, () => "No form components available"));
|
|
9625
10383
|
}
|
|
9626
10384
|
if (isLoading.value) {
|
|
9627
|
-
formContent.push(
|
|
10385
|
+
formContent.push(h58("div", { style: "display:flex;justify-content:center;padding:1rem" }, h58(Spinner_default)));
|
|
9628
10386
|
}
|
|
9629
10387
|
return formContent;
|
|
9630
10388
|
})()
|
|
9631
10389
|
),
|
|
9632
|
-
props.onGoToSignIn ?
|
|
9633
|
-
|
|
10390
|
+
props.onGoToSignIn ? h58("div", { style: "margin-top:1.5rem;text-align:center;padding:0 1rem 1rem" }, [
|
|
10391
|
+
h58(Typography_default, { variant: "body2" }, () => [
|
|
9634
10392
|
"Already have an account? ",
|
|
9635
|
-
|
|
10393
|
+
h58(
|
|
9636
10394
|
Button_default,
|
|
9637
10395
|
{ onClick: props.onGoToSignIn, style: "min-width:auto;padding:0", variant: "text" },
|
|
9638
10396
|
() => "Sign In"
|
|
@@ -9654,7 +10412,7 @@ var getUrlParams = () => {
|
|
|
9654
10412
|
inviteToken: params.get("inviteToken") || void 0
|
|
9655
10413
|
};
|
|
9656
10414
|
};
|
|
9657
|
-
var AcceptInvite =
|
|
10415
|
+
var AcceptInvite = defineComponent56({
|
|
9658
10416
|
name: "AcceptInvite",
|
|
9659
10417
|
props: {
|
|
9660
10418
|
baseUrl: { default: void 0, type: String },
|
|
@@ -9693,7 +10451,7 @@ var AcceptInvite = defineComponent52({
|
|
|
9693
10451
|
}
|
|
9694
10452
|
return response.json();
|
|
9695
10453
|
};
|
|
9696
|
-
return () =>
|
|
10454
|
+
return () => h59(
|
|
9697
10455
|
BaseAcceptInvite_default,
|
|
9698
10456
|
{
|
|
9699
10457
|
className: props.className,
|
|
@@ -9716,18 +10474,18 @@ var AcceptInvite = defineComponent52({
|
|
|
9716
10474
|
var AcceptInvite_default = AcceptInvite;
|
|
9717
10475
|
|
|
9718
10476
|
// src/components/presentation/invite-user/InviteUser.ts
|
|
9719
|
-
import { EmbeddedFlowType as
|
|
9720
|
-
import { defineComponent as
|
|
10477
|
+
import { EmbeddedFlowType as EmbeddedFlowType5 } from "@asgardeo/browser";
|
|
10478
|
+
import { defineComponent as defineComponent58, h as h61 } from "vue";
|
|
9721
10479
|
|
|
9722
10480
|
// src/components/presentation/invite-user/BaseInviteUser.ts
|
|
9723
|
-
import { EmbeddedFlowType as
|
|
10481
|
+
import { EmbeddedFlowType as EmbeddedFlowType4, withVendorCSSClassPrefix as withVendorCSSClassPrefix26 } from "@asgardeo/browser";
|
|
9724
10482
|
import {
|
|
9725
|
-
defineComponent as
|
|
9726
|
-
h as
|
|
9727
|
-
ref as
|
|
9728
|
-
watch as
|
|
10483
|
+
defineComponent as defineComponent57,
|
|
10484
|
+
h as h60,
|
|
10485
|
+
ref as ref23,
|
|
10486
|
+
watch as watch13
|
|
9729
10487
|
} from "vue";
|
|
9730
|
-
var BaseInviteUser =
|
|
10488
|
+
var BaseInviteUser = defineComponent57({
|
|
9731
10489
|
name: "BaseInviteUser",
|
|
9732
10490
|
props: {
|
|
9733
10491
|
className: { default: "", type: String },
|
|
@@ -9757,17 +10515,17 @@ var BaseInviteUser = defineComponent53({
|
|
|
9757
10515
|
setup(props, { slots }) {
|
|
9758
10516
|
const { meta: metaRef } = useFlowMeta_default();
|
|
9759
10517
|
const { t } = useI18n_default();
|
|
9760
|
-
const isLoading =
|
|
9761
|
-
const isFlowInitialized =
|
|
9762
|
-
const currentFlow =
|
|
9763
|
-
const apiError =
|
|
9764
|
-
const formValues =
|
|
9765
|
-
const formErrors =
|
|
9766
|
-
const touchedFields =
|
|
9767
|
-
const isFormValid =
|
|
9768
|
-
const inviteLink =
|
|
9769
|
-
const inviteLinkCopied =
|
|
9770
|
-
const emailSent =
|
|
10518
|
+
const isLoading = ref23(false);
|
|
10519
|
+
const isFlowInitialized = ref23(false);
|
|
10520
|
+
const currentFlow = ref23(null);
|
|
10521
|
+
const apiError = ref23(null);
|
|
10522
|
+
const formValues = ref23({});
|
|
10523
|
+
const formErrors = ref23({});
|
|
10524
|
+
const touchedFields = ref23({});
|
|
10525
|
+
const isFormValid = ref23(true);
|
|
10526
|
+
const inviteLink = ref23(void 0);
|
|
10527
|
+
const inviteLinkCopied = ref23(false);
|
|
10528
|
+
const emailSent = ref23(false);
|
|
9771
10529
|
let initializationAttempted = false;
|
|
9772
10530
|
const handleError = (error) => {
|
|
9773
10531
|
const errorMessage = error?.failureReason || extractErrorMessage(error, t, "components.inviteUser.errors.generic");
|
|
@@ -9901,7 +10659,7 @@ var BaseInviteUser = defineComponent53({
|
|
|
9901
10659
|
emailSent.value = false;
|
|
9902
10660
|
initializationAttempted = false;
|
|
9903
10661
|
};
|
|
9904
|
-
|
|
10662
|
+
watch13(
|
|
9905
10663
|
() => [props.isInitialized, isFlowInitialized.value],
|
|
9906
10664
|
([initialized, flowInit]) => {
|
|
9907
10665
|
if (initialized && !flowInit && !initializationAttempted) {
|
|
@@ -9910,7 +10668,7 @@ var BaseInviteUser = defineComponent53({
|
|
|
9910
10668
|
isLoading.value = true;
|
|
9911
10669
|
apiError.value = null;
|
|
9912
10670
|
try {
|
|
9913
|
-
const payload = { flowType:
|
|
10671
|
+
const payload = { flowType: EmbeddedFlowType4.UserOnboarding, verbose: true };
|
|
9914
10672
|
const rawResponse = await props.onInitialize(payload);
|
|
9915
10673
|
const response = normalizeFlowResponseLocal(rawResponse);
|
|
9916
10674
|
currentFlow.value = response;
|
|
@@ -9944,7 +10702,7 @@ var BaseInviteUser = defineComponent53({
|
|
|
9944
10702
|
(comp) => !(comp.type === "TEXT" && (comp.variant === "HEADING_1" || comp.variant === "HEADING_2"))
|
|
9945
10703
|
);
|
|
9946
10704
|
return () => {
|
|
9947
|
-
const containerClass = [
|
|
10705
|
+
const containerClass = [withVendorCSSClassPrefix26("invite-user"), props.className].filter(Boolean).join(" ");
|
|
9948
10706
|
const components = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];
|
|
9949
10707
|
const { title, subtitle } = extractHeadings(components);
|
|
9950
10708
|
const componentsWithoutHeadings = filterHeadings(components);
|
|
@@ -9974,56 +10732,56 @@ var BaseInviteUser = defineComponent53({
|
|
|
9974
10732
|
touched: touchedFields.value,
|
|
9975
10733
|
values: formValues.value
|
|
9976
10734
|
};
|
|
9977
|
-
return
|
|
10735
|
+
return h60("div", { class: containerClass }, slots["default"](renderProps));
|
|
9978
10736
|
}
|
|
9979
10737
|
if (!props.isInitialized || !isFlowInitialized.value && isLoading.value) {
|
|
9980
|
-
return
|
|
10738
|
+
return h60(
|
|
9981
10739
|
Card_default,
|
|
9982
10740
|
{ class: containerClass, variant: props.variant },
|
|
9983
|
-
() =>
|
|
10741
|
+
() => h60("div", { style: "display:flex;justify-content:center;padding:2rem" }, h60(Spinner_default))
|
|
9984
10742
|
);
|
|
9985
10743
|
}
|
|
9986
10744
|
if (!currentFlow.value && apiError.value) {
|
|
9987
|
-
return
|
|
10745
|
+
return h60(
|
|
9988
10746
|
Card_default,
|
|
9989
10747
|
{ class: containerClass, variant: props.variant },
|
|
9990
|
-
() =>
|
|
10748
|
+
() => h60(Alert_default, { variant: "error" }, () => apiError.value.message)
|
|
9991
10749
|
);
|
|
9992
10750
|
}
|
|
9993
10751
|
if (isInviteGenerated && isEmailSent) {
|
|
9994
|
-
return
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
10752
|
+
return h60(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
10753
|
+
h60("div", { style: "padding:1rem" }, [
|
|
10754
|
+
h60(Typography_default, { variant: "h5" }, () => "Invite Email Sent!"),
|
|
10755
|
+
h60(
|
|
9998
10756
|
Alert_default,
|
|
9999
10757
|
{ style: "margin-top:1rem", variant: "success" },
|
|
10000
10758
|
() => "An invitation email has been sent successfully. The user can complete their registration using the link in the email."
|
|
10001
10759
|
),
|
|
10002
|
-
|
|
10003
|
-
|
|
10760
|
+
h60("div", { style: "display:flex;gap:0.5rem;margin-top:1.5rem" }, [
|
|
10761
|
+
h60(Button_default, { onClick: resetFlow, variant: "outline" }, () => "Invite Another User")
|
|
10004
10762
|
])
|
|
10005
10763
|
])
|
|
10006
10764
|
]);
|
|
10007
10765
|
}
|
|
10008
10766
|
if (isInviteGenerated && inviteLink.value) {
|
|
10009
|
-
return
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10767
|
+
return h60(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
10768
|
+
h60("div", { style: "padding:1rem" }, [
|
|
10769
|
+
h60(Typography_default, { variant: "h5" }, () => "Invite Link Generated!"),
|
|
10770
|
+
h60(
|
|
10013
10771
|
Alert_default,
|
|
10014
10772
|
{ style: "margin-top:1rem", variant: "success" },
|
|
10015
10773
|
() => "Share this link with the user to complete their registration."
|
|
10016
10774
|
),
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10775
|
+
h60("div", { style: "margin-top:1rem" }, [
|
|
10776
|
+
h60(Typography_default, { style: "margin-bottom:0.5rem", variant: "body2" }, () => "Invite Link"),
|
|
10777
|
+
h60(
|
|
10020
10778
|
"div",
|
|
10021
10779
|
{
|
|
10022
10780
|
style: "display:flex;align-items:center;gap:0.5rem;padding:0.75rem;background:var(--asgardeo-color-background-secondary,#f5f5f5);border-radius:4px;word-break:break-all"
|
|
10023
10781
|
},
|
|
10024
10782
|
[
|
|
10025
|
-
|
|
10026
|
-
|
|
10783
|
+
h60(Typography_default, { style: "flex:1", variant: "body2" }, () => inviteLink.value),
|
|
10784
|
+
h60(
|
|
10027
10785
|
Button_default,
|
|
10028
10786
|
{ onClick: copyInviteLink, size: "small", variant: "outline" },
|
|
10029
10787
|
() => inviteLinkCopied.value ? "Copied!" : "Copy"
|
|
@@ -10031,8 +10789,8 @@ var BaseInviteUser = defineComponent53({
|
|
|
10031
10789
|
]
|
|
10032
10790
|
)
|
|
10033
10791
|
]),
|
|
10034
|
-
|
|
10035
|
-
|
|
10792
|
+
h60("div", { style: "display:flex;gap:0.5rem;margin-top:1.5rem" }, [
|
|
10793
|
+
h60(Button_default, { onClick: resetFlow, variant: "outline" }, () => "Invite Another User")
|
|
10036
10794
|
])
|
|
10037
10795
|
])
|
|
10038
10796
|
]);
|
|
@@ -10054,17 +10812,17 @@ var BaseInviteUser = defineComponent53({
|
|
|
10054
10812
|
variant: props.variant
|
|
10055
10813
|
}
|
|
10056
10814
|
) : [];
|
|
10057
|
-
return
|
|
10058
|
-
(props.showTitle || props.showSubtitle) && (title || subtitle) ?
|
|
10059
|
-
props.showTitle && title ?
|
|
10060
|
-
props.showSubtitle && subtitle ?
|
|
10815
|
+
return h60(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
10816
|
+
(props.showTitle || props.showSubtitle) && (title || subtitle) ? h60("div", { style: "padding:1rem 1rem 0" }, [
|
|
10817
|
+
props.showTitle && title ? h60(Typography_default, { variant: "h5" }, () => title) : null,
|
|
10818
|
+
props.showSubtitle && subtitle ? h60(Typography_default, { style: "margin-top:0.25rem", variant: "body1" }, () => subtitle) : null
|
|
10061
10819
|
]) : null,
|
|
10062
|
-
apiError.value ?
|
|
10820
|
+
apiError.value ? h60(
|
|
10063
10821
|
"div",
|
|
10064
10822
|
{ style: "padding:0 1rem;margin-bottom:1rem" },
|
|
10065
|
-
|
|
10823
|
+
h60(Alert_default, { variant: "error" }, () => apiError.value.message)
|
|
10066
10824
|
) : null,
|
|
10067
|
-
|
|
10825
|
+
h60(
|
|
10068
10826
|
"div",
|
|
10069
10827
|
{ style: "padding:1rem" },
|
|
10070
10828
|
(() => {
|
|
@@ -10072,10 +10830,10 @@ var BaseInviteUser = defineComponent53({
|
|
|
10072
10830
|
if (renderedComponents.length > 0) {
|
|
10073
10831
|
formContent.push(renderedComponents);
|
|
10074
10832
|
} else if (!isLoading.value) {
|
|
10075
|
-
formContent.push(
|
|
10833
|
+
formContent.push(h60(Alert_default, { variant: "warning" }, () => "No form components available"));
|
|
10076
10834
|
}
|
|
10077
10835
|
if (isLoading.value) {
|
|
10078
|
-
formContent.push(
|
|
10836
|
+
formContent.push(h60("div", { style: "display:flex;justify-content:center;padding:1rem" }, h60(Spinner_default)));
|
|
10079
10837
|
}
|
|
10080
10838
|
return formContent;
|
|
10081
10839
|
})()
|
|
@@ -10087,7 +10845,7 @@ var BaseInviteUser = defineComponent53({
|
|
|
10087
10845
|
var BaseInviteUser_default = BaseInviteUser;
|
|
10088
10846
|
|
|
10089
10847
|
// src/components/presentation/invite-user/InviteUser.ts
|
|
10090
|
-
var InviteUser =
|
|
10848
|
+
var InviteUser = defineComponent58({
|
|
10091
10849
|
name: "InviteUser",
|
|
10092
10850
|
props: {
|
|
10093
10851
|
className: { default: "", type: String },
|
|
@@ -10109,7 +10867,7 @@ var InviteUser = defineComponent54({
|
|
|
10109
10867
|
const { http: http3, baseUrl, isInitialized } = useAsgardeo_default();
|
|
10110
10868
|
const handleInitialize = async (payload) => {
|
|
10111
10869
|
const response = await http3.request({
|
|
10112
|
-
data: { ...payload, flowType:
|
|
10870
|
+
data: { ...payload, flowType: EmbeddedFlowType5.UserOnboarding, verbose: true },
|
|
10113
10871
|
headers: { Accept: "application/json", "Content-Type": "application/json" },
|
|
10114
10872
|
method: "POST",
|
|
10115
10873
|
url: `${baseUrl}/flow/execute`
|
|
@@ -10125,7 +10883,7 @@ var InviteUser = defineComponent54({
|
|
|
10125
10883
|
});
|
|
10126
10884
|
return response.data;
|
|
10127
10885
|
};
|
|
10128
|
-
return () =>
|
|
10886
|
+
return () => h61(
|
|
10129
10887
|
BaseInviteUser_default,
|
|
10130
10888
|
{
|
|
10131
10889
|
className: props.className,
|
|
@@ -10147,13 +10905,13 @@ var InviteUser = defineComponent54({
|
|
|
10147
10905
|
var InviteUser_default = InviteUser;
|
|
10148
10906
|
|
|
10149
10907
|
// src/components/presentation/organization-list/OrganizationList.ts
|
|
10150
|
-
import { withVendorCSSClassPrefix as
|
|
10151
|
-
import { defineComponent as
|
|
10908
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix28 } from "@asgardeo/browser";
|
|
10909
|
+
import { defineComponent as defineComponent60, h as h63 } from "vue";
|
|
10152
10910
|
|
|
10153
10911
|
// src/components/presentation/organization-list/BaseOrganizationList.ts
|
|
10154
|
-
import { withVendorCSSClassPrefix as
|
|
10155
|
-
import { defineComponent as
|
|
10156
|
-
var BaseOrganizationList =
|
|
10912
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix27 } from "@asgardeo/browser";
|
|
10913
|
+
import { defineComponent as defineComponent59, h as h62 } from "vue";
|
|
10914
|
+
var BaseOrganizationList = defineComponent59({
|
|
10157
10915
|
inheritAttrs: false,
|
|
10158
10916
|
name: "BaseOrganizationList",
|
|
10159
10917
|
props: {
|
|
@@ -10167,18 +10925,18 @@ var BaseOrganizationList = defineComponent55({
|
|
|
10167
10925
|
if (slots["default"]) {
|
|
10168
10926
|
return slots["default"]({ isLoading: props.isLoading, organizations: props.organizations });
|
|
10169
10927
|
}
|
|
10170
|
-
const prefix =
|
|
10928
|
+
const prefix = withVendorCSSClassPrefix27;
|
|
10171
10929
|
const children = [];
|
|
10172
10930
|
if (props.isLoading) {
|
|
10173
|
-
children.push(
|
|
10931
|
+
children.push(h62("div", { class: prefix("organization-list__loading") }, [h62(Spinner_default)]));
|
|
10174
10932
|
} else if (props.organizations.length === 0) {
|
|
10175
10933
|
children.push(
|
|
10176
|
-
|
|
10934
|
+
h62(Typography_default, { class: prefix("organization-list__empty"), variant: "body2" }, () => "No organizations found")
|
|
10177
10935
|
);
|
|
10178
10936
|
} else {
|
|
10179
10937
|
props.organizations.forEach((org) => {
|
|
10180
10938
|
children.push(
|
|
10181
|
-
|
|
10939
|
+
h62(
|
|
10182
10940
|
"button",
|
|
10183
10941
|
{
|
|
10184
10942
|
class: prefix("organization-list__item"),
|
|
@@ -10186,19 +10944,19 @@ var BaseOrganizationList = defineComponent55({
|
|
|
10186
10944
|
onClick: () => props.onSelect?.(org),
|
|
10187
10945
|
type: "button"
|
|
10188
10946
|
},
|
|
10189
|
-
[
|
|
10947
|
+
[h62(BuildingIcon, { size: 16 }), h62(Typography_default, { variant: "body1" }, () => org["name"] || org["id"])]
|
|
10190
10948
|
)
|
|
10191
10949
|
);
|
|
10192
10950
|
});
|
|
10193
10951
|
}
|
|
10194
|
-
return
|
|
10952
|
+
return h62("div", { class: [prefix("organization-list"), props.className].filter(Boolean).join(" ") }, children);
|
|
10195
10953
|
};
|
|
10196
10954
|
}
|
|
10197
10955
|
});
|
|
10198
10956
|
var BaseOrganizationList_default = BaseOrganizationList;
|
|
10199
10957
|
|
|
10200
10958
|
// src/components/presentation/organization-list/OrganizationList.ts
|
|
10201
|
-
var OrganizationList =
|
|
10959
|
+
var OrganizationList = defineComponent60({
|
|
10202
10960
|
emits: ["select"],
|
|
10203
10961
|
name: "OrganizationList",
|
|
10204
10962
|
props: {
|
|
@@ -10213,10 +10971,10 @@ var OrganizationList = defineComponent56({
|
|
|
10213
10971
|
emit("select", org);
|
|
10214
10972
|
await switchOrganization(org);
|
|
10215
10973
|
};
|
|
10216
|
-
return () =>
|
|
10974
|
+
return () => h63(
|
|
10217
10975
|
BaseOrganizationList_default,
|
|
10218
10976
|
{
|
|
10219
|
-
class:
|
|
10977
|
+
class: withVendorCSSClassPrefix28("organization-list--styled"),
|
|
10220
10978
|
className: props.className,
|
|
10221
10979
|
isLoading: isLoading.value,
|
|
10222
10980
|
onSelect: handleSelect,
|
|
@@ -10229,12 +10987,12 @@ var OrganizationList = defineComponent56({
|
|
|
10229
10987
|
var OrganizationList_default = OrganizationList;
|
|
10230
10988
|
|
|
10231
10989
|
// src/components/presentation/organization-profile/OrganizationProfile.ts
|
|
10232
|
-
import { withVendorCSSClassPrefix as
|
|
10233
|
-
import { defineComponent as
|
|
10990
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix30 } from "@asgardeo/browser";
|
|
10991
|
+
import { defineComponent as defineComponent62, h as h65 } from "vue";
|
|
10234
10992
|
|
|
10235
10993
|
// src/components/presentation/organization-profile/BaseOrganizationProfile.ts
|
|
10236
|
-
import { withVendorCSSClassPrefix as
|
|
10237
|
-
import { defineComponent as
|
|
10994
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix29 } from "@asgardeo/browser";
|
|
10995
|
+
import { defineComponent as defineComponent61, h as h64, ref as ref24 } from "vue";
|
|
10238
10996
|
var ORG_AVATAR_GRADIENTS = [
|
|
10239
10997
|
"linear-gradient(135deg, #22d3ee 0%, #2dd4bf 100%)",
|
|
10240
10998
|
"linear-gradient(135deg, #34d399 0%, #059669 100%)",
|
|
@@ -10266,7 +11024,7 @@ var formatDate = (dateStr) => {
|
|
|
10266
11024
|
return dateStr;
|
|
10267
11025
|
}
|
|
10268
11026
|
};
|
|
10269
|
-
var BaseOrganizationProfile =
|
|
11027
|
+
var BaseOrganizationProfile = defineComponent61({
|
|
10270
11028
|
name: "BaseOrganizationProfile",
|
|
10271
11029
|
props: {
|
|
10272
11030
|
className: { default: "", type: String },
|
|
@@ -10279,10 +11037,10 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10279
11037
|
title: { default: "Organization Profile", type: String }
|
|
10280
11038
|
},
|
|
10281
11039
|
setup(props, { slots }) {
|
|
10282
|
-
const editingName =
|
|
10283
|
-
const editingDescription =
|
|
10284
|
-
const editedName =
|
|
10285
|
-
const editedDescription =
|
|
11040
|
+
const editingName = ref24(false);
|
|
11041
|
+
const editingDescription = ref24(false);
|
|
11042
|
+
const editedName = ref24("");
|
|
11043
|
+
const editedDescription = ref24("");
|
|
10286
11044
|
return () => {
|
|
10287
11045
|
if (slots["default"]) {
|
|
10288
11046
|
return slots["default"]({ organization: props.organization });
|
|
@@ -10290,7 +11048,7 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10290
11048
|
if (!props.organization) {
|
|
10291
11049
|
return slots["fallback"]?.() ?? null;
|
|
10292
11050
|
}
|
|
10293
|
-
const prefix =
|
|
11051
|
+
const prefix = withVendorCSSClassPrefix29;
|
|
10294
11052
|
const org = props.organization;
|
|
10295
11053
|
const orgName = String(org["name"] || org["displayName"] || "");
|
|
10296
11054
|
const orgHandle = String(org["orgHandle"] || "");
|
|
@@ -10302,43 +11060,43 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10302
11060
|
const avatarGradient = getOrgAvatarGradient(orgId || orgName);
|
|
10303
11061
|
const children = [];
|
|
10304
11062
|
children.push(
|
|
10305
|
-
|
|
10306
|
-
|
|
11063
|
+
h64("div", { class: prefix("organization-profile__header") }, [
|
|
11064
|
+
h64(Typography_default, { class: prefix("organization-profile__title"), variant: "h5" }, () => props.title)
|
|
10307
11065
|
])
|
|
10308
11066
|
);
|
|
10309
|
-
children.push(
|
|
11067
|
+
children.push(h64(Divider_default, { class: prefix("organization-profile__header-divider") }));
|
|
10310
11068
|
children.push(
|
|
10311
|
-
|
|
10312
|
-
|
|
11069
|
+
h64("div", { class: prefix("organization-profile__identity") }, [
|
|
11070
|
+
h64(
|
|
10313
11071
|
"div",
|
|
10314
11072
|
{
|
|
10315
11073
|
class: prefix("organization-profile__avatar"),
|
|
10316
11074
|
style: { background: avatarGradient }
|
|
10317
11075
|
},
|
|
10318
|
-
[
|
|
11076
|
+
[h64("span", { class: prefix("organization-profile__avatar-initials") }, initials)]
|
|
10319
11077
|
),
|
|
10320
|
-
|
|
10321
|
-
orgHandle ?
|
|
11078
|
+
h64(Typography_default, { class: prefix("organization-profile__org-name"), variant: "h5" }, () => orgName),
|
|
11079
|
+
orgHandle ? h64(
|
|
10322
11080
|
Typography_default,
|
|
10323
11081
|
{ class: prefix("organization-profile__org-handle"), variant: "body2" },
|
|
10324
11082
|
() => `@${orgHandle}`
|
|
10325
11083
|
) : null
|
|
10326
11084
|
])
|
|
10327
11085
|
);
|
|
10328
|
-
children.push(
|
|
11086
|
+
children.push(h64(Divider_default, { class: prefix("organization-profile__identity-divider") }));
|
|
10329
11087
|
const fieldRows = [];
|
|
10330
11088
|
fieldRows.push(
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
11089
|
+
h64("div", { class: prefix("organization-profile__field"), key: "id" }, [
|
|
11090
|
+
h64("div", { class: prefix("organization-profile__field-label-col") }, [
|
|
11091
|
+
h64(
|
|
10334
11092
|
Typography_default,
|
|
10335
11093
|
{ class: prefix("organization-profile__field-label"), variant: "body2" },
|
|
10336
11094
|
() => "Organization ID"
|
|
10337
11095
|
)
|
|
10338
11096
|
]),
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
orgId ?
|
|
11097
|
+
h64("div", { class: prefix("organization-profile__field-value-col") }, [
|
|
11098
|
+
h64("div", { class: prefix("organization-profile__field-display") }, [
|
|
11099
|
+
orgId ? h64(
|
|
10342
11100
|
Typography_default,
|
|
10343
11101
|
{
|
|
10344
11102
|
class: [
|
|
@@ -10348,30 +11106,30 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10348
11106
|
variant: "body1"
|
|
10349
11107
|
},
|
|
10350
11108
|
() => orgId
|
|
10351
|
-
) :
|
|
11109
|
+
) : h64("span", { class: prefix("organization-profile__field-placeholder") }, "Not available")
|
|
10352
11110
|
])
|
|
10353
11111
|
])
|
|
10354
11112
|
])
|
|
10355
11113
|
);
|
|
10356
11114
|
fieldRows.push(
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
11115
|
+
h64("div", { class: prefix("organization-profile__field"), key: "name" }, [
|
|
11116
|
+
h64("div", { class: prefix("organization-profile__field-label-col") }, [
|
|
11117
|
+
h64(
|
|
10360
11118
|
Typography_default,
|
|
10361
11119
|
{ class: prefix("organization-profile__field-label"), variant: "body2" },
|
|
10362
11120
|
() => "Organization Name"
|
|
10363
11121
|
)
|
|
10364
11122
|
]),
|
|
10365
|
-
|
|
10366
|
-
editingName.value ?
|
|
10367
|
-
|
|
11123
|
+
h64("div", { class: prefix("organization-profile__field-value-col") }, [
|
|
11124
|
+
editingName.value ? h64("div", { class: prefix("organization-profile__field-edit") }, [
|
|
11125
|
+
h64(TextField_default, {
|
|
10368
11126
|
modelValue: editedName.value,
|
|
10369
11127
|
"onUpdate:modelValue": (v) => {
|
|
10370
11128
|
editedName.value = v;
|
|
10371
11129
|
}
|
|
10372
11130
|
}),
|
|
10373
|
-
|
|
10374
|
-
|
|
11131
|
+
h64("div", { class: prefix("organization-profile__field-edit-actions") }, [
|
|
11132
|
+
h64(
|
|
10375
11133
|
Button_default,
|
|
10376
11134
|
{
|
|
10377
11135
|
onClick: async () => {
|
|
@@ -10383,7 +11141,7 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10383
11141
|
},
|
|
10384
11142
|
() => "Save"
|
|
10385
11143
|
),
|
|
10386
|
-
|
|
11144
|
+
h64(
|
|
10387
11145
|
Button_default,
|
|
10388
11146
|
{
|
|
10389
11147
|
onClick: () => {
|
|
@@ -10395,9 +11153,9 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10395
11153
|
() => "Cancel"
|
|
10396
11154
|
)
|
|
10397
11155
|
])
|
|
10398
|
-
]) :
|
|
10399
|
-
|
|
10400
|
-
props.editable ?
|
|
11156
|
+
]) : h64("div", { class: prefix("organization-profile__field-display") }, [
|
|
11157
|
+
h64(Typography_default, { class: prefix("organization-profile__field-value"), variant: "body1" }, () => orgName),
|
|
11158
|
+
props.editable ? h64(
|
|
10401
11159
|
"button",
|
|
10402
11160
|
{
|
|
10403
11161
|
"aria-label": "Edit Organization Name",
|
|
@@ -10408,31 +11166,31 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10408
11166
|
},
|
|
10409
11167
|
type: "button"
|
|
10410
11168
|
},
|
|
10411
|
-
[
|
|
11169
|
+
[h64(PencilIcon)]
|
|
10412
11170
|
) : null
|
|
10413
11171
|
])
|
|
10414
11172
|
])
|
|
10415
11173
|
])
|
|
10416
11174
|
);
|
|
10417
11175
|
fieldRows.push(
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
11176
|
+
h64("div", { class: prefix("organization-profile__field"), key: "description" }, [
|
|
11177
|
+
h64("div", { class: prefix("organization-profile__field-label-col") }, [
|
|
11178
|
+
h64(
|
|
10421
11179
|
Typography_default,
|
|
10422
11180
|
{ class: prefix("organization-profile__field-label"), variant: "body2" },
|
|
10423
11181
|
() => "Organization Description"
|
|
10424
11182
|
)
|
|
10425
11183
|
]),
|
|
10426
|
-
|
|
10427
|
-
editingDescription.value ?
|
|
10428
|
-
|
|
11184
|
+
h64("div", { class: prefix("organization-profile__field-value-col") }, [
|
|
11185
|
+
editingDescription.value ? h64("div", { class: prefix("organization-profile__field-edit") }, [
|
|
11186
|
+
h64(TextField_default, {
|
|
10429
11187
|
modelValue: editedDescription.value,
|
|
10430
11188
|
"onUpdate:modelValue": (v) => {
|
|
10431
11189
|
editedDescription.value = v;
|
|
10432
11190
|
}
|
|
10433
11191
|
}),
|
|
10434
|
-
|
|
10435
|
-
|
|
11192
|
+
h64("div", { class: prefix("organization-profile__field-edit-actions") }, [
|
|
11193
|
+
h64(
|
|
10436
11194
|
Button_default,
|
|
10437
11195
|
{
|
|
10438
11196
|
onClick: async () => {
|
|
@@ -10444,7 +11202,7 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10444
11202
|
},
|
|
10445
11203
|
() => "Save"
|
|
10446
11204
|
),
|
|
10447
|
-
|
|
11205
|
+
h64(
|
|
10448
11206
|
Button_default,
|
|
10449
11207
|
{
|
|
10450
11208
|
onClick: () => {
|
|
@@ -10456,12 +11214,12 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10456
11214
|
() => "Cancel"
|
|
10457
11215
|
)
|
|
10458
11216
|
])
|
|
10459
|
-
]) :
|
|
10460
|
-
orgDescription != null ?
|
|
11217
|
+
]) : h64("div", { class: prefix("organization-profile__field-display") }, [
|
|
11218
|
+
orgDescription != null ? h64(
|
|
10461
11219
|
Typography_default,
|
|
10462
11220
|
{ class: prefix("organization-profile__field-value"), variant: "body1" },
|
|
10463
11221
|
() => orgDescription
|
|
10464
|
-
) :
|
|
11222
|
+
) : h64(
|
|
10465
11223
|
"span",
|
|
10466
11224
|
{
|
|
10467
11225
|
class: prefix("organization-profile__field-placeholder"),
|
|
@@ -10472,7 +11230,7 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10472
11230
|
},
|
|
10473
11231
|
"Enter organization description"
|
|
10474
11232
|
),
|
|
10475
|
-
props.editable ?
|
|
11233
|
+
props.editable ? h64(
|
|
10476
11234
|
"button",
|
|
10477
11235
|
{
|
|
10478
11236
|
"aria-label": "Edit Organization Description",
|
|
@@ -10483,66 +11241,66 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10483
11241
|
},
|
|
10484
11242
|
type: "button"
|
|
10485
11243
|
},
|
|
10486
|
-
[
|
|
11244
|
+
[h64(PencilIcon)]
|
|
10487
11245
|
) : null
|
|
10488
11246
|
])
|
|
10489
11247
|
])
|
|
10490
11248
|
])
|
|
10491
11249
|
);
|
|
10492
11250
|
fieldRows.push(
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
11251
|
+
h64("div", { class: prefix("organization-profile__field"), key: "created" }, [
|
|
11252
|
+
h64("div", { class: prefix("organization-profile__field-label-col") }, [
|
|
11253
|
+
h64(Typography_default, { class: prefix("organization-profile__field-label"), variant: "body2" }, () => "Created Date")
|
|
10496
11254
|
]),
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
createdDate ?
|
|
11255
|
+
h64("div", { class: prefix("organization-profile__field-value-col") }, [
|
|
11256
|
+
h64("div", { class: prefix("organization-profile__field-display") }, [
|
|
11257
|
+
createdDate ? h64(
|
|
10500
11258
|
Typography_default,
|
|
10501
11259
|
{ class: prefix("organization-profile__field-value"), variant: "body1" },
|
|
10502
11260
|
() => createdDate
|
|
10503
|
-
) :
|
|
11261
|
+
) : h64("span", { class: prefix("organization-profile__field-placeholder") }, "Not available")
|
|
10504
11262
|
])
|
|
10505
11263
|
])
|
|
10506
11264
|
])
|
|
10507
11265
|
);
|
|
10508
11266
|
fieldRows.push(
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
11267
|
+
h64("div", { class: prefix("organization-profile__field"), key: "lastModified" }, [
|
|
11268
|
+
h64("div", { class: prefix("organization-profile__field-label-col") }, [
|
|
11269
|
+
h64(
|
|
10512
11270
|
Typography_default,
|
|
10513
11271
|
{ class: prefix("organization-profile__field-label"), variant: "body2" },
|
|
10514
11272
|
() => "Last Modified Date"
|
|
10515
11273
|
)
|
|
10516
11274
|
]),
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
lastModifiedDate ?
|
|
11275
|
+
h64("div", { class: prefix("organization-profile__field-value-col") }, [
|
|
11276
|
+
h64("div", { class: prefix("organization-profile__field-display") }, [
|
|
11277
|
+
lastModifiedDate ? h64(
|
|
10520
11278
|
Typography_default,
|
|
10521
11279
|
{ class: prefix("organization-profile__field-value"), variant: "body1" },
|
|
10522
11280
|
() => lastModifiedDate
|
|
10523
|
-
) :
|
|
11281
|
+
) : h64("span", { class: prefix("organization-profile__field-placeholder") }, "Not available")
|
|
10524
11282
|
])
|
|
10525
11283
|
])
|
|
10526
11284
|
])
|
|
10527
11285
|
);
|
|
10528
11286
|
fieldRows.push(
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
11287
|
+
h64("div", { class: prefix("organization-profile__field"), key: "orgHandle" }, [
|
|
11288
|
+
h64("div", { class: prefix("organization-profile__field-label-col") }, [
|
|
11289
|
+
h64(
|
|
10532
11290
|
Typography_default,
|
|
10533
11291
|
{ class: prefix("organization-profile__field-label"), variant: "body2" },
|
|
10534
11292
|
() => "Organization Handle"
|
|
10535
11293
|
)
|
|
10536
11294
|
]),
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
orgHandle ?
|
|
11295
|
+
h64("div", { class: prefix("organization-profile__field-value-col") }, [
|
|
11296
|
+
h64("div", { class: prefix("organization-profile__field-display") }, [
|
|
11297
|
+
orgHandle ? h64(Typography_default, { class: prefix("organization-profile__field-value"), variant: "body1" }, () => orgHandle) : h64("span", { class: prefix("organization-profile__field-placeholder") }, "Not available")
|
|
10540
11298
|
])
|
|
10541
11299
|
])
|
|
10542
11300
|
])
|
|
10543
11301
|
);
|
|
10544
|
-
children.push(
|
|
10545
|
-
return
|
|
11302
|
+
children.push(h64("div", { class: prefix("organization-profile__fields") }, fieldRows));
|
|
11303
|
+
return h64(
|
|
10546
11304
|
Card_default,
|
|
10547
11305
|
{ class: [prefix("organization-profile"), props.className].filter(Boolean).join(" ") },
|
|
10548
11306
|
() => children
|
|
@@ -10553,7 +11311,7 @@ var BaseOrganizationProfile = defineComponent57({
|
|
|
10553
11311
|
var BaseOrganizationProfile_default = BaseOrganizationProfile;
|
|
10554
11312
|
|
|
10555
11313
|
// src/components/presentation/organization-profile/OrganizationProfile.ts
|
|
10556
|
-
var OrganizationProfile =
|
|
11314
|
+
var OrganizationProfile = defineComponent62({
|
|
10557
11315
|
name: "OrganizationProfile",
|
|
10558
11316
|
props: {
|
|
10559
11317
|
className: { default: "", type: String },
|
|
@@ -10566,10 +11324,10 @@ var OrganizationProfile = defineComponent58({
|
|
|
10566
11324
|
},
|
|
10567
11325
|
setup(props, { slots }) {
|
|
10568
11326
|
const { currentOrganization } = useOrganization_default();
|
|
10569
|
-
return () =>
|
|
11327
|
+
return () => h65(
|
|
10570
11328
|
BaseOrganizationProfile_default,
|
|
10571
11329
|
{
|
|
10572
|
-
class:
|
|
11330
|
+
class: withVendorCSSClassPrefix30("organization-profile--styled"),
|
|
10573
11331
|
className: props.className,
|
|
10574
11332
|
editable: props.editable,
|
|
10575
11333
|
onUpdate: props.onUpdate,
|
|
@@ -10583,14 +11341,14 @@ var OrganizationProfile = defineComponent58({
|
|
|
10583
11341
|
var OrganizationProfile_default = OrganizationProfile;
|
|
10584
11342
|
|
|
10585
11343
|
// src/components/presentation/organization-switcher/OrganizationSwitcher.ts
|
|
10586
|
-
import { withVendorCSSClassPrefix as
|
|
10587
|
-
import { defineComponent as
|
|
11344
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix32 } from "@asgardeo/browser";
|
|
11345
|
+
import { defineComponent as defineComponent64, h as h67 } from "vue";
|
|
10588
11346
|
|
|
10589
11347
|
// src/components/presentation/organization-switcher/BaseOrganizationSwitcher.ts
|
|
10590
|
-
import { withVendorCSSClassPrefix as
|
|
10591
|
-
import { defineComponent as
|
|
10592
|
-
var cls = (name) =>
|
|
10593
|
-
var BaseOrganizationSwitcher =
|
|
11348
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix31 } from "@asgardeo/browser";
|
|
11349
|
+
import { defineComponent as defineComponent63, h as h66, ref as ref25 } from "vue";
|
|
11350
|
+
var cls = (name) => withVendorCSSClassPrefix31(`organization-switcher${name}`);
|
|
11351
|
+
var BaseOrganizationSwitcher = defineComponent63({
|
|
10594
11352
|
inheritAttrs: false,
|
|
10595
11353
|
name: "BaseOrganizationSwitcher",
|
|
10596
11354
|
props: {
|
|
@@ -10601,7 +11359,7 @@ var BaseOrganizationSwitcher = defineComponent59({
|
|
|
10601
11359
|
organizations: { default: () => [], type: Array }
|
|
10602
11360
|
},
|
|
10603
11361
|
setup(props, { slots }) {
|
|
10604
|
-
const isOpen =
|
|
11362
|
+
const isOpen = ref25(false);
|
|
10605
11363
|
const toggle = () => {
|
|
10606
11364
|
isOpen.value = !isOpen.value;
|
|
10607
11365
|
};
|
|
@@ -10621,7 +11379,7 @@ var BaseOrganizationSwitcher = defineComponent59({
|
|
|
10621
11379
|
});
|
|
10622
11380
|
}
|
|
10623
11381
|
const currentName = props.currentOrganization?.name ?? "No Organization";
|
|
10624
|
-
const triggerButton =
|
|
11382
|
+
const triggerButton = h66(
|
|
10625
11383
|
"button",
|
|
10626
11384
|
{
|
|
10627
11385
|
"aria-expanded": isOpen.value,
|
|
@@ -10631,23 +11389,23 @@ var BaseOrganizationSwitcher = defineComponent59({
|
|
|
10631
11389
|
type: "button"
|
|
10632
11390
|
},
|
|
10633
11391
|
[
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
11392
|
+
h66(BuildingIcon, { size: 16 }),
|
|
11393
|
+
h66(Typography_default, { class: cls("__trigger-label"), variant: "body2" }, () => currentName),
|
|
11394
|
+
h66(ChevronDownIcon, { size: 12 })
|
|
10637
11395
|
]
|
|
10638
11396
|
);
|
|
10639
11397
|
const dropdownChildren = [];
|
|
10640
11398
|
if (props.isLoading) {
|
|
10641
|
-
dropdownChildren.push(
|
|
11399
|
+
dropdownChildren.push(h66("div", { class: cls("__loading") }, [h66(Spinner_default, { size: "small" })]));
|
|
10642
11400
|
} else if (props.organizations.length === 0) {
|
|
10643
11401
|
dropdownChildren.push(
|
|
10644
|
-
|
|
11402
|
+
h66(Typography_default, { class: cls("__empty"), variant: "body2" }, () => "No organizations available")
|
|
10645
11403
|
);
|
|
10646
11404
|
} else {
|
|
10647
11405
|
props.organizations.forEach((org) => {
|
|
10648
11406
|
const isActive = org["id"] === props.currentOrganization?.id;
|
|
10649
11407
|
dropdownChildren.push(
|
|
10650
|
-
|
|
11408
|
+
h66(
|
|
10651
11409
|
"button",
|
|
10652
11410
|
{
|
|
10653
11411
|
"aria-selected": isActive,
|
|
@@ -10656,30 +11414,30 @@ var BaseOrganizationSwitcher = defineComponent59({
|
|
|
10656
11414
|
role: "option",
|
|
10657
11415
|
type: "button"
|
|
10658
11416
|
},
|
|
10659
|
-
[
|
|
11417
|
+
[h66(BuildingIcon, { size: 14 }), h66(Typography_default, { variant: "body2" }, () => org["name"])]
|
|
10660
11418
|
)
|
|
10661
11419
|
);
|
|
10662
11420
|
});
|
|
10663
11421
|
}
|
|
10664
|
-
const dropdown = isOpen.value ?
|
|
10665
|
-
return
|
|
11422
|
+
const dropdown = isOpen.value ? h66("div", { class: cls("__dropdown"), role: "listbox" }, dropdownChildren) : null;
|
|
11423
|
+
return h66(Card_default, { class: [cls(""), props.className].filter(Boolean).join(" ") }, () => [triggerButton, dropdown]);
|
|
10666
11424
|
};
|
|
10667
11425
|
}
|
|
10668
11426
|
});
|
|
10669
11427
|
var BaseOrganizationSwitcher_default = BaseOrganizationSwitcher;
|
|
10670
11428
|
|
|
10671
11429
|
// src/components/presentation/organization-switcher/OrganizationSwitcher.ts
|
|
10672
|
-
var OrganizationSwitcher =
|
|
11430
|
+
var OrganizationSwitcher = defineComponent64({
|
|
10673
11431
|
name: "OrganizationSwitcher",
|
|
10674
11432
|
props: {
|
|
10675
11433
|
className: { default: "", type: String }
|
|
10676
11434
|
},
|
|
10677
11435
|
setup(props, { slots }) {
|
|
10678
11436
|
const { currentOrganization, myOrganizations, isLoading, switchOrganization } = useOrganization_default();
|
|
10679
|
-
return () =>
|
|
11437
|
+
return () => h67(
|
|
10680
11438
|
BaseOrganizationSwitcher_default,
|
|
10681
11439
|
{
|
|
10682
|
-
class:
|
|
11440
|
+
class: withVendorCSSClassPrefix32("organization-switcher--styled"),
|
|
10683
11441
|
className: props.className,
|
|
10684
11442
|
currentOrganization: currentOrganization?.value ?? null,
|
|
10685
11443
|
isLoading: isLoading?.value ?? false,
|
|
@@ -10693,14 +11451,14 @@ var OrganizationSwitcher = defineComponent60({
|
|
|
10693
11451
|
var OrganizationSwitcher_default = OrganizationSwitcher;
|
|
10694
11452
|
|
|
10695
11453
|
// src/components/presentation/create-organization/CreateOrganization.ts
|
|
10696
|
-
import { withVendorCSSClassPrefix as
|
|
10697
|
-
import { defineComponent as
|
|
11454
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix34 } from "@asgardeo/browser";
|
|
11455
|
+
import { defineComponent as defineComponent66, h as h69 } from "vue";
|
|
10698
11456
|
|
|
10699
11457
|
// src/components/presentation/create-organization/BaseCreateOrganization.ts
|
|
10700
|
-
import { withVendorCSSClassPrefix as
|
|
10701
|
-
import { defineComponent as
|
|
10702
|
-
var cls2 = (name) =>
|
|
10703
|
-
var BaseCreateOrganization =
|
|
11458
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix33 } from "@asgardeo/browser";
|
|
11459
|
+
import { defineComponent as defineComponent65, h as h68, ref as ref26 } from "vue";
|
|
11460
|
+
var cls2 = (name) => withVendorCSSClassPrefix33(`create-organization${name}`);
|
|
11461
|
+
var BaseCreateOrganization = defineComponent65({
|
|
10704
11462
|
name: "BaseCreateOrganization",
|
|
10705
11463
|
props: {
|
|
10706
11464
|
className: { default: "", type: String },
|
|
@@ -10709,9 +11467,9 @@ var BaseCreateOrganization = defineComponent61({
|
|
|
10709
11467
|
title: { default: "Create Organization", type: String }
|
|
10710
11468
|
},
|
|
10711
11469
|
setup(props, { slots }) {
|
|
10712
|
-
const orgName =
|
|
10713
|
-
const isSubmitting =
|
|
10714
|
-
const error =
|
|
11470
|
+
const orgName = ref26("");
|
|
11471
|
+
const isSubmitting = ref26(false);
|
|
11472
|
+
const error = ref26(null);
|
|
10715
11473
|
const handleSubmit = async () => {
|
|
10716
11474
|
const name = orgName.value.trim();
|
|
10717
11475
|
if (!name) {
|
|
@@ -10741,11 +11499,11 @@ var BaseCreateOrganization = defineComponent61({
|
|
|
10741
11499
|
}
|
|
10742
11500
|
});
|
|
10743
11501
|
}
|
|
10744
|
-
return
|
|
10745
|
-
|
|
10746
|
-
props.description ?
|
|
10747
|
-
error.value ?
|
|
10748
|
-
|
|
11502
|
+
return h68(Card_default, { class: [cls2(""), props.className].filter(Boolean).join(" ") }, () => [
|
|
11503
|
+
h68(Typography_default, { class: cls2("__title"), variant: "h6" }, () => props.title),
|
|
11504
|
+
props.description ? h68(Typography_default, { class: cls2("__description"), variant: "body2" }, () => props.description) : null,
|
|
11505
|
+
error.value ? h68(Alert_default, { class: cls2("__error"), severity: "error" }, () => error.value) : null,
|
|
11506
|
+
h68(TextField_default, {
|
|
10749
11507
|
class: cls2("__input"),
|
|
10750
11508
|
label: "Organization Name",
|
|
10751
11509
|
modelValue: orgName.value,
|
|
@@ -10754,7 +11512,7 @@ var BaseCreateOrganization = defineComponent61({
|
|
|
10754
11512
|
},
|
|
10755
11513
|
placeholder: "Enter organization name"
|
|
10756
11514
|
}),
|
|
10757
|
-
|
|
11515
|
+
h68(
|
|
10758
11516
|
Button_default,
|
|
10759
11517
|
{
|
|
10760
11518
|
class: cls2("__submit"),
|
|
@@ -10773,7 +11531,7 @@ var BaseCreateOrganization = defineComponent61({
|
|
|
10773
11531
|
var BaseCreateOrganization_default = BaseCreateOrganization;
|
|
10774
11532
|
|
|
10775
11533
|
// src/components/presentation/create-organization/CreateOrganization.ts
|
|
10776
|
-
var CreateOrganization =
|
|
11534
|
+
var CreateOrganization = defineComponent66({
|
|
10777
11535
|
name: "CreateOrganization",
|
|
10778
11536
|
props: {
|
|
10779
11537
|
className: { default: "", type: String },
|
|
@@ -10782,10 +11540,10 @@ var CreateOrganization = defineComponent62({
|
|
|
10782
11540
|
},
|
|
10783
11541
|
setup(props, { slots }) {
|
|
10784
11542
|
const { createOrganization } = useOrganization_default();
|
|
10785
|
-
return () =>
|
|
11543
|
+
return () => h69(
|
|
10786
11544
|
BaseCreateOrganization_default,
|
|
10787
11545
|
{
|
|
10788
|
-
class:
|
|
11546
|
+
class: withVendorCSSClassPrefix34("create-organization--styled"),
|
|
10789
11547
|
className: props.className,
|
|
10790
11548
|
description: props.description,
|
|
10791
11549
|
onCreate: createOrganization ? async (name) => {
|
|
@@ -10800,14 +11558,14 @@ var CreateOrganization = defineComponent62({
|
|
|
10800
11558
|
var CreateOrganization_default = CreateOrganization;
|
|
10801
11559
|
|
|
10802
11560
|
// src/components/presentation/language-switcher/LanguageSwitcher.ts
|
|
10803
|
-
import { withVendorCSSClassPrefix as
|
|
10804
|
-
import { defineComponent as
|
|
11561
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix36 } from "@asgardeo/browser";
|
|
11562
|
+
import { defineComponent as defineComponent68, h as h71 } from "vue";
|
|
10805
11563
|
|
|
10806
11564
|
// src/components/presentation/language-switcher/BaseLanguageSwitcher.ts
|
|
10807
|
-
import { withVendorCSSClassPrefix as
|
|
10808
|
-
import { defineComponent as
|
|
10809
|
-
var cls3 = (name) =>
|
|
10810
|
-
var BaseLanguageSwitcher =
|
|
11565
|
+
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix35 } from "@asgardeo/browser";
|
|
11566
|
+
import { defineComponent as defineComponent67, h as h70, ref as ref27 } from "vue";
|
|
11567
|
+
var cls3 = (name) => withVendorCSSClassPrefix35(`language-switcher${name}`);
|
|
11568
|
+
var BaseLanguageSwitcher = defineComponent67({
|
|
10811
11569
|
name: "BaseLanguageSwitcher",
|
|
10812
11570
|
props: {
|
|
10813
11571
|
className: { default: "", type: String },
|
|
@@ -10816,7 +11574,7 @@ var BaseLanguageSwitcher = defineComponent63({
|
|
|
10816
11574
|
onLanguageChange: { default: void 0, type: Function }
|
|
10817
11575
|
},
|
|
10818
11576
|
setup(props, { slots }) {
|
|
10819
|
-
const isOpen =
|
|
11577
|
+
const isOpen = ref27(false);
|
|
10820
11578
|
const toggle = () => {
|
|
10821
11579
|
isOpen.value = !isOpen.value;
|
|
10822
11580
|
};
|
|
@@ -10835,7 +11593,7 @@ var BaseLanguageSwitcher = defineComponent63({
|
|
|
10835
11593
|
});
|
|
10836
11594
|
}
|
|
10837
11595
|
const currentLabel = props.languages.find((l) => l.value === props.currentLanguage)?.label ?? props.currentLanguage;
|
|
10838
|
-
const triggerButton =
|
|
11596
|
+
const triggerButton = h70(
|
|
10839
11597
|
"button",
|
|
10840
11598
|
{
|
|
10841
11599
|
"aria-expanded": isOpen.value,
|
|
@@ -10845,14 +11603,14 @@ var BaseLanguageSwitcher = defineComponent63({
|
|
|
10845
11603
|
type: "button"
|
|
10846
11604
|
},
|
|
10847
11605
|
[
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
11606
|
+
h70(GlobeIcon, { size: 16 }),
|
|
11607
|
+
h70(Typography_default, { class: cls3("__trigger-label"), variant: "body2" }, () => currentLabel),
|
|
11608
|
+
h70(ChevronDownIcon, { size: 12 })
|
|
10851
11609
|
]
|
|
10852
11610
|
);
|
|
10853
11611
|
const dropdownItems = props.languages.map((lang) => {
|
|
10854
11612
|
const isActive = lang.value === props.currentLanguage;
|
|
10855
|
-
return
|
|
11613
|
+
return h70(
|
|
10856
11614
|
"button",
|
|
10857
11615
|
{
|
|
10858
11616
|
"aria-selected": isActive,
|
|
@@ -10861,18 +11619,18 @@ var BaseLanguageSwitcher = defineComponent63({
|
|
|
10861
11619
|
role: "option",
|
|
10862
11620
|
type: "button"
|
|
10863
11621
|
},
|
|
10864
|
-
[
|
|
11622
|
+
[h70(Typography_default, { variant: "body2" }, () => lang.label)]
|
|
10865
11623
|
);
|
|
10866
11624
|
});
|
|
10867
|
-
const dropdown = isOpen.value ?
|
|
10868
|
-
return
|
|
11625
|
+
const dropdown = isOpen.value ? h70("div", { class: cls3("__dropdown"), role: "listbox" }, dropdownItems) : null;
|
|
11626
|
+
return h70(Card_default, { class: [cls3(""), props.className].filter(Boolean).join(" ") }, () => [triggerButton, dropdown]);
|
|
10869
11627
|
};
|
|
10870
11628
|
}
|
|
10871
11629
|
});
|
|
10872
11630
|
var BaseLanguageSwitcher_default = BaseLanguageSwitcher;
|
|
10873
11631
|
|
|
10874
11632
|
// src/components/presentation/language-switcher/LanguageSwitcher.ts
|
|
10875
|
-
var LanguageSwitcher =
|
|
11633
|
+
var LanguageSwitcher = defineComponent68({
|
|
10876
11634
|
name: "LanguageSwitcher",
|
|
10877
11635
|
props: {
|
|
10878
11636
|
className: { default: "", type: String },
|
|
@@ -10888,10 +11646,10 @@ var LanguageSwitcher = defineComponent64({
|
|
|
10888
11646
|
},
|
|
10889
11647
|
setup(props, { slots }) {
|
|
10890
11648
|
const { currentLanguage, setLanguage } = useI18n_default();
|
|
10891
|
-
return () =>
|
|
11649
|
+
return () => h71(
|
|
10892
11650
|
BaseLanguageSwitcher_default,
|
|
10893
11651
|
{
|
|
10894
|
-
class:
|
|
11652
|
+
class: withVendorCSSClassPrefix36("language-switcher--styled"),
|
|
10895
11653
|
className: props.className,
|
|
10896
11654
|
currentLanguage: currentLanguage?.value ?? "en",
|
|
10897
11655
|
languages: props.languages,
|
|
@@ -10950,7 +11708,7 @@ var buildThemeConfigFromFlowMeta_default = buildThemeConfigFromFlowMeta;
|
|
|
10950
11708
|
|
|
10951
11709
|
// src/index.ts
|
|
10952
11710
|
import {
|
|
10953
|
-
FieldType as
|
|
11711
|
+
FieldType as FieldType5
|
|
10954
11712
|
} from "@asgardeo/browser";
|
|
10955
11713
|
|
|
10956
11714
|
// src/utils/handleWebAuthnAuthentication.ts
|
|
@@ -10967,13 +11725,13 @@ import { http, http as http2 } from "@asgardeo/browser";
|
|
|
10967
11725
|
|
|
10968
11726
|
// src/router/guard.ts
|
|
10969
11727
|
import { inject as inject11 } from "vue";
|
|
10970
|
-
var
|
|
11728
|
+
var logger8 = createVueLogger("Guard");
|
|
10971
11729
|
var createAsgardeoGuard = (options = {}) => {
|
|
10972
11730
|
const { redirectTo = "/", waitForInit = true, initTimeout = 1e4 } = options;
|
|
10973
11731
|
return async (_to, _from, next) => {
|
|
10974
11732
|
const ctx = inject11(ASGARDEO_KEY);
|
|
10975
11733
|
if (!ctx) {
|
|
10976
|
-
|
|
11734
|
+
logger8.error(
|
|
10977
11735
|
"createAsgardeoGuard: Asgardeo context not found. Ensure the AsgardeoPlugin is installed before using the router guard."
|
|
10978
11736
|
);
|
|
10979
11737
|
next({ path: redirectTo });
|
|
@@ -11018,13 +11776,13 @@ var createAsgardeoGuard = (options = {}) => {
|
|
|
11018
11776
|
};
|
|
11019
11777
|
|
|
11020
11778
|
// src/router/callbackRoute.ts
|
|
11021
|
-
import { defineComponent as
|
|
11779
|
+
import { defineComponent as defineComponent69, h as h72 } from "vue";
|
|
11022
11780
|
var createCallbackRoute = (options = {}) => {
|
|
11023
11781
|
const { path = "/callback", name, onError } = options;
|
|
11024
|
-
const CallbackWrapper =
|
|
11782
|
+
const CallbackWrapper = defineComponent69({
|
|
11025
11783
|
name: "AsgardeoCallbackRoute",
|
|
11026
11784
|
setup() {
|
|
11027
|
-
return () =>
|
|
11785
|
+
return () => h72(Callback_default, {
|
|
11028
11786
|
...onError && { onError }
|
|
11029
11787
|
});
|
|
11030
11788
|
}
|
|
@@ -11077,7 +11835,7 @@ export {
|
|
|
11077
11835
|
BaseSignIn_default3 as BaseSignIn,
|
|
11078
11836
|
BaseSignInButton_default as BaseSignInButton,
|
|
11079
11837
|
BaseSignOutButton_default as BaseSignOutButton,
|
|
11080
|
-
|
|
11838
|
+
BaseSignUp_default3 as BaseSignUp,
|
|
11081
11839
|
BaseSignUpButton_default as BaseSignUpButton,
|
|
11082
11840
|
BaseUserDropdown_default as BaseUserDropdown,
|
|
11083
11841
|
BaseUserProfile_default as BaseUserProfile,
|
|
@@ -11106,7 +11864,7 @@ export {
|
|
|
11106
11864
|
FLOW_META_KEY,
|
|
11107
11865
|
FacebookButton_default as FacebookButton,
|
|
11108
11866
|
FieldFactory_default as FieldFactory,
|
|
11109
|
-
|
|
11867
|
+
FieldType5 as FieldType,
|
|
11110
11868
|
FlowMetaProvider_default as FlowMetaProvider,
|
|
11111
11869
|
FlowProvider_default as FlowProvider,
|
|
11112
11870
|
GitHubButton_default as GitHubButton,
|
|
@@ -11135,7 +11893,7 @@ export {
|
|
|
11135
11893
|
SignIn_default3 as SignIn,
|
|
11136
11894
|
SignInButton_default as SignInButton,
|
|
11137
11895
|
SignOutButton_default as SignOutButton,
|
|
11138
|
-
|
|
11896
|
+
SignUp_default3 as SignUp,
|
|
11139
11897
|
SignUpButton_default as SignUpButton,
|
|
11140
11898
|
SignedIn_default as SignedIn,
|
|
11141
11899
|
SignedOut_default as SignedOut,
|