@thunderid/vue 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/cjs/index.cjs +459 -66
  2. package/dist/components/admin/AgentDetails/AgentDetails.d.ts.map +1 -1
  3. package/dist/components/admin/AgentDetails/BaseAgentDetails.d.ts +6 -1
  4. package/dist/components/admin/AgentDetails/BaseAgentDetails.d.ts.map +1 -1
  5. package/dist/components/admin/ApplicationDetails/ApplicationDetails.d.ts.map +1 -1
  6. package/dist/components/admin/ApplicationDetails/BaseApplicationDetails.d.ts +6 -1
  7. package/dist/components/admin/ApplicationDetails/BaseApplicationDetails.d.ts.map +1 -1
  8. package/dist/components/admin/GroupMembers/GroupMembers.d.ts.map +1 -1
  9. package/dist/components/admin/RoleAssignments/RoleAssignments.d.ts.map +1 -1
  10. package/dist/components/admin/UserDetails/BaseUserDetails.d.ts +9 -1
  11. package/dist/components/admin/UserDetails/BaseUserDetails.d.ts.map +1 -1
  12. package/dist/components/admin/UserDetails/UserDetails.d.ts.map +1 -1
  13. package/dist/components/admin/shared/AccessStatusBadge.d.ts +8 -0
  14. package/dist/components/admin/shared/AccessStatusBadge.d.ts.map +1 -0
  15. package/dist/components/admin/shared/AccountLifecycleButtons.d.ts +9 -0
  16. package/dist/components/admin/shared/AccountLifecycleButtons.d.ts.map +1 -0
  17. package/dist/components/auth/flow/AuthOptionFactoryCore.d.ts.map +1 -1
  18. package/dist/components/auth/sign-in/SignIn.d.ts.map +1 -1
  19. package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
  20. package/dist/composables/management/useAccountLifecycle.d.ts +56 -0
  21. package/dist/composables/management/useAccountLifecycle.d.ts.map +1 -0
  22. package/dist/index.d.ts +3 -3
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +443 -68
  25. package/dist/keys.d.ts +5 -1
  26. package/dist/keys.d.ts.map +1 -1
  27. package/dist/models/contexts.d.ts +10 -0
  28. package/dist/models/contexts.d.ts.map +1 -1
  29. package/dist/providers/ThemeProvider.d.ts.map +1 -1
  30. package/package.json +2 -2
@@ -50,6 +50,10 @@ const FLOW_META_KEY = Symbol("thunderid-flow-meta");
50
50
  */
51
51
  const THEME_KEY = Symbol("thunderid-theme");
52
52
  /**
53
+ * Injection key a nested ThemeProvider uses to take the document root from the one above it.
54
+ */
55
+ const THEME_ROOT_KEY = Symbol("thunderid-theme-root");
56
+ /**
53
57
  * Injection key for the I18n context (translation function, language switching).
54
58
  */
55
59
  const I18N_KEY = Symbol("thunderid-i18n");
@@ -590,32 +594,53 @@ const ThemeProvider = (0, vue.defineComponent)({
590
594
  const toggleTheme = () => {
591
595
  colorScheme.value = colorScheme.value === "light" ? "dark" : "light";
592
596
  };
593
- const applyToDom = (theme) => {
597
+ const applyToRoot = () => {
594
598
  if (typeof document === "undefined") return;
595
599
  const root = document.documentElement;
596
- Object.entries(theme.cssVariables).forEach(([key, value]) => {
600
+ Object.entries(resolvedTheme.value.cssVariables).forEach(([key, value]) => {
597
601
  root.style.setProperty(key, value);
598
602
  });
603
+ root.dir = direction.value;
599
604
  };
600
- (0, vue.watch)(resolvedTheme, (theme) => applyToDom(theme), { immediate: true });
601
- (0, vue.watch)(direction, (dir) => {
602
- if (typeof document !== "undefined") document.documentElement.dir = dir;
605
+ let claims = 0;
606
+ const themeRoot = { claim: () => {
607
+ claims += 1;
608
+ return () => {
609
+ claims -= 1;
610
+ if (claims === 0) applyToRoot();
611
+ };
612
+ } };
613
+ const release = (0, vue.inject)(THEME_ROOT_KEY, null)?.claim();
614
+ (0, vue.watch)([resolvedTheme, direction], () => {
615
+ if (claims === 0) applyToRoot();
603
616
  }, { immediate: true });
604
617
  let classObserver = null;
605
618
  let mediaQuery = null;
606
619
  const handleThemeChange = (isDark) => {
607
620
  colorScheme.value = isDark ? "dark" : "light";
608
621
  };
609
- (0, vue.onMounted)(() => {
622
+ const stopDetection = () => {
623
+ classObserver?.disconnect();
624
+ classObserver = null;
625
+ mediaQuery?.disconnect();
626
+ mediaQuery = null;
627
+ };
628
+ const startDetection = () => {
629
+ stopDetection();
610
630
  if (props.mode === "branding") return;
611
631
  if (props.mode === "class") {
612
632
  const targetElement = props.detection.targetElement || document.documentElement;
613
633
  if (targetElement) classObserver = (0, __thunderid_browser.createClassObserver)(targetElement, handleThemeChange, props.detection);
614
634
  } else if (props.mode === "system") mediaQuery = (0, __thunderid_browser.createMediaQueryListener)(handleThemeChange);
635
+ };
636
+ (0, vue.onMounted)(startDetection);
637
+ (0, vue.watch)(() => props.mode, () => {
638
+ colorScheme.value = initColorScheme();
639
+ startDetection();
615
640
  });
616
641
  (0, vue.onBeforeUnmount)(() => {
617
- if (classObserver) classObserver.disconnect();
618
- mediaQuery?.disconnect();
642
+ stopDetection();
643
+ release?.();
619
644
  });
620
645
  (0, vue.provide)(THEME_KEY, {
621
646
  colorScheme: (0, vue.readonly)(colorScheme),
@@ -623,6 +648,7 @@ const ThemeProvider = (0, vue.defineComponent)({
623
648
  theme: (0, vue.shallowReadonly)(resolvedTheme),
624
649
  toggleTheme
625
650
  });
651
+ (0, vue.provide)(THEME_ROOT_KEY, themeRoot);
626
652
  return () => (0, vue.h)("div", { style: "display:contents" }, slots["default"]?.());
627
653
  }
628
654
  });
@@ -5004,6 +5030,10 @@ const TextField = (0, vue.defineComponent)({
5004
5030
  default: void 0,
5005
5031
  type: String
5006
5032
  },
5033
+ maxLength: {
5034
+ default: void 0,
5035
+ type: Number
5036
+ },
5007
5037
  modelValue: {
5008
5038
  default: "",
5009
5039
  type: String
@@ -5052,6 +5082,7 @@ const TextField = (0, vue.defineComponent)({
5052
5082
  "data-testid": attrs["data-testid"],
5053
5083
  disabled: props.disabled,
5054
5084
  id: props.id ?? props.name,
5085
+ maxlength: props.maxLength,
5055
5086
  name: props.name,
5056
5087
  onBlur: () => emit("blur"),
5057
5088
  onInput: (e) => emit("update:modelValue", e.target.value),
@@ -7928,10 +7959,7 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
7928
7959
  elements: [...(p.essential ?? []).map((e) => ({
7929
7960
  approved: !isDeny,
7930
7961
  name: e.name
7931
- })), ...(p.optional ?? []).map((e) => ({
7932
- approved: !isDeny && formValues[getConsentOptionalKey(p.purposeId, e.name)] === "true",
7933
- name: e.name
7934
- }))],
7962
+ })), ...(p.optional ?? []).map((e) => (0, __thunderid_browser.getConsentElementDecision)(p.purposeId, e, !isDeny && formValues[getConsentOptionalKey(p.purposeId, e.name)] === "true", formValues))],
7935
7963
  purposeName: p.purposeName ?? ""
7936
7964
  }))
7937
7965
  };
@@ -8778,17 +8806,14 @@ const SignIn = (0, vue.defineComponent)({
8778
8806
  name: e.name
8779
8807
  })), ...(p.optional ?? []).map((e) => {
8780
8808
  const key = `__consent_opt__${p.purposeId}__${e.name}`;
8781
- return {
8782
- approved: !isDeny && processedInputs[key] === "true",
8783
- name: e.name
8784
- };
8809
+ return (0, __thunderid_browser.getConsentElementDecision)(p.purposeId, e, !isDeny && processedInputs[key] === "true", processedInputs);
8785
8810
  })],
8786
8811
  purposeName: p.purposeName
8787
8812
  }))
8788
8813
  };
8789
8814
  processedInputs["consent_decisions"] = JSON.stringify(decisions);
8790
8815
  Object.keys(processedInputs).forEach((key) => {
8791
- if (key.startsWith("__consent_opt__")) delete processedInputs[key];
8816
+ if (key.startsWith("__consent_opt__") || key.startsWith(__thunderid_browser.CONSENT_MODIFIED_KEY_PREFIX) || key.startsWith(__thunderid_browser.CONSENT_INVALID_KEY_PREFIX)) delete processedInputs[key];
8792
8817
  });
8793
8818
  } catch {}
8794
8819
  try {
@@ -10477,7 +10502,7 @@ var useAdminTranslation_default = useAdminTranslation;
10477
10502
 
10478
10503
  //#endregion
10479
10504
  //#region src/components/common/attribution/Attribution.ts
10480
- const cls$11 = (suffix) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`attribution${suffix}`);
10505
+ const cls$13 = (suffix) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`attribution${suffix}`);
10481
10506
  const wordmark = (className) => (0, vue.h)("svg", {
10482
10507
  "aria-label": "ThunderID",
10483
10508
  class: className,
@@ -10525,8 +10550,8 @@ const Attribution = (0, vue.defineComponent)({
10525
10550
  return () => {
10526
10551
  const isRibbon = props.appearance === "ribbon";
10527
10552
  const label = t(props.variant === "powered" ? "attribution.powered_by" : "attribution.secured_by");
10528
- const className = [cls$11(""), ...isRibbon ? [cls$11("--ribbon")] : []];
10529
- const content = isRibbon ? (0, vue.h)("span", { class: cls$11("__ribbon-content") }, [(0, vue.h)("span", { class: cls$11("__ribbon-label") }, label), wordmark(cls$11("__ribbon-wordmark"))]) : [(0, vue.h)("span", { class: cls$11("__label") }, label), wordmark(cls$11("__wordmark"))];
10553
+ const className = [cls$13(""), ...isRibbon ? [cls$13("--ribbon")] : []];
10554
+ const content = isRibbon ? (0, vue.h)("span", { class: cls$13("__ribbon-content") }, [(0, vue.h)("span", { class: cls$13("__ribbon-label") }, label), wordmark(cls$13("__ribbon-wordmark"))]) : [(0, vue.h)("span", { class: cls$13("__label") }, label), wordmark(cls$13("__wordmark"))];
10530
10555
  if (props.href) return (0, vue.h)("a", {
10531
10556
  class: className,
10532
10557
  href: props.href,
@@ -12195,7 +12220,7 @@ var InviteUser_default = InviteUser;
12195
12220
 
12196
12221
  //#endregion
12197
12222
  //#region src/components/common/language-switcher/BaseLanguageSwitcher.ts
12198
- const cls$10 = (name) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`language-switcher${name}`);
12223
+ const cls$12 = (name) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`language-switcher${name}`);
12199
12224
  /**
12200
12225
  * BaseLanguageSwitcher — unstyled language selection component.
12201
12226
  *
@@ -12245,13 +12270,13 @@ const BaseLanguageSwitcher = (0, vue.defineComponent)({
12245
12270
  const triggerButton = (0, vue.h)("button", {
12246
12271
  "aria-expanded": isOpen.value,
12247
12272
  "aria-haspopup": "listbox",
12248
- class: cls$10("__trigger"),
12273
+ class: cls$12("__trigger"),
12249
12274
  onClick: toggle,
12250
12275
  type: "button"
12251
12276
  }, [
12252
12277
  (0, vue.h)(GlobeIcon, { size: 16 }),
12253
12278
  (0, vue.h)(Typography_default, {
12254
- class: cls$10("__trigger-label"),
12279
+ class: cls$12("__trigger-label"),
12255
12280
  variant: "body2"
12256
12281
  }, () => currentLabel),
12257
12282
  (0, vue.h)(ChevronDownIcon, { size: 12 })
@@ -12260,17 +12285,17 @@ const BaseLanguageSwitcher = (0, vue.defineComponent)({
12260
12285
  const isActive = lang.value === props.currentLanguage;
12261
12286
  return (0, vue.h)("button", {
12262
12287
  "aria-selected": isActive,
12263
- class: [cls$10("__item"), isActive ? cls$10("__item--active") : ""],
12288
+ class: [cls$12("__item"), isActive ? cls$12("__item--active") : ""],
12264
12289
  onClick: () => handleSelect(lang.value),
12265
12290
  role: "option",
12266
12291
  type: "button"
12267
12292
  }, [(0, vue.h)(Typography_default, { variant: "body2" }, () => lang.label)]);
12268
12293
  });
12269
12294
  const dropdown = isOpen.value ? (0, vue.h)("div", {
12270
- class: cls$10("__dropdown"),
12295
+ class: cls$12("__dropdown"),
12271
12296
  role: "listbox"
12272
12297
  }, dropdownItems) : null;
12273
- return (0, vue.h)(Card_default, { class: [cls$10(""), props.className].filter(Boolean).join(" ") }, () => [triggerButton, dropdown]);
12298
+ return (0, vue.h)(Card_default, { class: [cls$12(""), props.className].filter(Boolean).join(" ") }, () => [triggerButton, dropdown]);
12274
12299
  };
12275
12300
  }
12276
12301
  });
@@ -12387,38 +12412,38 @@ const DataTable = (0, vue.defineComponent)({
12387
12412
  setup(props) {
12388
12413
  const { t: fallbackT } = useI18n_default();
12389
12414
  const translate = (key, params) => (props.t ?? fallbackT)(key, params);
12390
- const cls$12 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(element ? `data-table__${element}` : "data-table");
12415
+ const cls$14 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(element ? `data-table__${element}` : "data-table");
12391
12416
  const renderBody = () => {
12392
12417
  const colSpan = props.columns.length;
12393
12418
  if (props.isLoading) return (0, vue.h)("tr", {}, [(0, vue.h)("td", {
12394
- class: cls$12("empty"),
12419
+ class: cls$14("empty"),
12395
12420
  colspan: colSpan
12396
12421
  }, [(0, vue.h)("span", {
12397
- class: cls$12("loading"),
12422
+ class: cls$14("loading"),
12398
12423
  role: "status"
12399
12424
  }, [(0, vue.h)(Spinner_default, {
12400
12425
  "aria-hidden": "true",
12401
12426
  size: "small"
12402
12427
  }), translate("admin.common.loading")])])]);
12403
12428
  if (props.rows.length === 0) return (0, vue.h)("tr", {}, [(0, vue.h)("td", {
12404
- class: cls$12("empty"),
12429
+ class: cls$14("empty"),
12405
12430
  colspan: colSpan
12406
12431
  }, props.emptyText)]);
12407
12432
  return props.rows.map((row) => {
12408
12433
  const rowId = props.getRowId(row);
12409
12434
  const onRowClick = props.onRowClick;
12410
12435
  return (0, vue.h)("tr", {
12411
- class: cls$12("row"),
12436
+ class: cls$14("row"),
12412
12437
  "data-clickable": onRowClick ? "true" : void 0,
12413
12438
  "data-selected": props.selectedRowId === rowId ? "true" : void 0,
12414
12439
  key: rowId,
12415
12440
  onClick: onRowClick ? () => onRowClick(row) : void 0
12416
12441
  }, props.columns.map((column, index) => (0, vue.h)("td", {
12417
- class: cls$12("cell"),
12442
+ class: cls$14("cell"),
12418
12443
  key: column.id
12419
12444
  }, index === 0 && onRowClick ? [(0, vue.h)("button", {
12420
12445
  "aria-pressed": props.selectedRowId === void 0 ? void 0 : String(props.selectedRowId === rowId),
12421
- class: cls$12("row-button"),
12446
+ class: cls$14("row-button"),
12422
12447
  onClick: (event) => {
12423
12448
  event.stopPropagation();
12424
12449
  onRowClick(row);
@@ -12431,12 +12456,12 @@ const DataTable = (0, vue.defineComponent)({
12431
12456
  const { pagination } = props;
12432
12457
  const start = pagination ? Math.min(pagination.offset + 1, pagination.total) : 0;
12433
12458
  const end = pagination ? Math.min(pagination.offset + props.rows.length, pagination.total) : 0;
12434
- return (0, vue.h)("div", { class: [cls$12(), props.className].filter(Boolean).join(" ") }, [
12459
+ return (0, vue.h)("div", { class: [cls$14(), props.className].filter(Boolean).join(" ") }, [
12435
12460
  props.error ? (0, vue.h)(Alert_default, { severity: "error" }, { default: () => [props.error] }) : null,
12436
- (0, vue.h)("div", { class: cls$12("scroller") }, [(0, vue.h)("table", { class: cls$12("table") }, [
12437
- (0, vue.h)("caption", { class: cls$12("caption") }, props.caption),
12461
+ (0, vue.h)("div", { class: cls$14("scroller") }, [(0, vue.h)("table", { class: cls$14("table") }, [
12462
+ (0, vue.h)("caption", { class: cls$14("caption") }, props.caption),
12438
12463
  (0, vue.h)("thead", {}, [(0, vue.h)("tr", {}, props.columns.map((column) => (0, vue.h)("th", {
12439
- class: cls$12("header-cell"),
12464
+ class: cls$14("header-cell"),
12440
12465
  key: column.id,
12441
12466
  scope: "col"
12442
12467
  }, column.header)))]),
@@ -12444,12 +12469,12 @@ const DataTable = (0, vue.defineComponent)({
12444
12469
  ])]),
12445
12470
  pagination && pagination.total > pagination.limit ? (0, vue.h)("nav", {
12446
12471
  "aria-label": translate("admin.common.pagination.label"),
12447
- class: cls$12("footer")
12472
+ class: cls$14("footer")
12448
12473
  }, [(0, vue.h)("span", { "aria-live": "polite" }, translate("admin.common.pagination.range", {
12449
12474
  end,
12450
12475
  start,
12451
12476
  total: pagination.total
12452
- })), (0, vue.h)("div", { class: cls$12("footer-actions") }, [(0, vue.h)(Button_default, {
12477
+ })), (0, vue.h)("div", { class: cls$14("footer-actions") }, [(0, vue.h)(Button_default, {
12453
12478
  disabled: pagination.offset === 0 || props.isLoading,
12454
12479
  onClick: () => pagination.onChange(Math.max(0, pagination.offset - pagination.limit)),
12455
12480
  size: "small",
@@ -12468,7 +12493,7 @@ var DataTable_default = DataTable;
12468
12493
 
12469
12494
  //#endregion
12470
12495
  //#region src/components/admin/shared/AdminAvatar.ts
12471
- const cls$9 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`admin__${element}`);
12496
+ const cls$11 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`admin__${element}`);
12472
12497
  /**
12473
12498
  * A decorative circle with a name's initials. Hidden from assistive technology, since the name is
12474
12499
  * always rendered next to it.
@@ -12490,7 +12515,7 @@ const AdminAvatar = (0, vue.defineComponent)({
12490
12515
  const initials = props.name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part.charAt(0).toUpperCase()).join("");
12491
12516
  return (0, vue.h)("span", {
12492
12517
  "aria-hidden": "true",
12493
- class: cls$9("avatar"),
12518
+ class: cls$11("avatar"),
12494
12519
  style: {
12495
12520
  fontSize: `${Math.round(props.size * .4)}px`,
12496
12521
  height: `${props.size}px`,
@@ -13351,6 +13376,146 @@ const UserCreate = (0, vue.defineComponent)({
13351
13376
  });
13352
13377
  var UserCreate_default = UserCreate;
13353
13378
 
13379
+ //#endregion
13380
+ //#region src/components/admin/shared/AccessStatusBadge.ts
13381
+ const cls$10 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`admin__${element}`);
13382
+ /**
13383
+ * The translated access status of an identity, or its raw value when the status is one this SDK does
13384
+ * not know. Renders nothing when the server reports no status.
13385
+ */
13386
+ const AccessStatusBadge = (0, vue.defineComponent)({
13387
+ name: "AdminAccessStatusBadge",
13388
+ props: {
13389
+ status: {
13390
+ default: void 0,
13391
+ type: String
13392
+ },
13393
+ t: {
13394
+ required: true,
13395
+ type: Function
13396
+ }
13397
+ },
13398
+ setup(props) {
13399
+ return () => {
13400
+ if (!props.status) return null;
13401
+ const labels = {
13402
+ ACTIVE: props.t("admin.common.status.active"),
13403
+ LOCKED: props.t("admin.common.status.locked"),
13404
+ SUSPENDED: props.t("admin.common.status.suspended")
13405
+ };
13406
+ return (0, vue.h)("span", { class: cls$10("chip") }, labels[props.status] ?? props.status);
13407
+ };
13408
+ }
13409
+ });
13410
+ var AccessStatusBadge_default = AccessStatusBadge;
13411
+
13412
+ //#endregion
13413
+ //#region src/components/admin/shared/AccountLifecycleButtons.ts
13414
+ const cls$9 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`admin__${element}`);
13415
+ /**
13416
+ * Matches the server's limit on an operator note.
13417
+ */
13418
+ const OPERATOR_NOTE_MAX_LENGTH = 100;
13419
+ /**
13420
+ * One button per account lifecycle action. Suspending and unsuspending ask for confirmation inline;
13421
+ * unlocking is remedial and runs straight away. Emits `action` with the action and, on a suspension
13422
+ * that collects one, the operator's note.
13423
+ */
13424
+ const AccountLifecycleButtons = (0, vue.defineComponent)({
13425
+ name: "AdminAccountLifecycleButtons",
13426
+ props: {
13427
+ actions: {
13428
+ required: true,
13429
+ type: Array
13430
+ },
13431
+ collectsOperatorNote: {
13432
+ default: false,
13433
+ type: Boolean
13434
+ },
13435
+ isRunning: {
13436
+ default: false,
13437
+ type: Boolean
13438
+ },
13439
+ name: {
13440
+ required: true,
13441
+ type: String
13442
+ },
13443
+ t: {
13444
+ required: true,
13445
+ type: Function
13446
+ }
13447
+ },
13448
+ emits: ["action"],
13449
+ setup(props, { emit }) {
13450
+ const uid = (0, vue.useId)();
13451
+ const confirming = (0, vue.ref)(null);
13452
+ const operatorNote = (0, vue.ref)("");
13453
+ const close = () => {
13454
+ confirming.value = null;
13455
+ operatorNote.value = "";
13456
+ };
13457
+ return () => {
13458
+ const { t } = props;
13459
+ if (props.actions.length === 0) return null;
13460
+ const labels = {
13461
+ suspend: t("admin.common.lifecycle.suspend"),
13462
+ unlock: t("admin.common.lifecycle.unlock"),
13463
+ unsuspend: t("admin.common.lifecycle.unsuspend")
13464
+ };
13465
+ const action = confirming.value;
13466
+ if (action && props.actions.includes(action)) {
13467
+ const question = action === "suspend" ? t("admin.common.lifecycle.suspend_confirm", { name: props.name }) : t("admin.common.lifecycle.unsuspend_confirm", { name: props.name });
13468
+ const withNote = props.collectsOperatorNote && action === "suspend";
13469
+ return (0, vue.h)("span", {
13470
+ "aria-label": question,
13471
+ class: cls$9("confirm"),
13472
+ role: "group"
13473
+ }, [
13474
+ (0, vue.h)("span", {}, question),
13475
+ withNote ? (0, vue.h)(TextField_default, {
13476
+ disabled: props.isRunning,
13477
+ label: t("admin.common.lifecycle.operator_note"),
13478
+ maxLength: OPERATOR_NOTE_MAX_LENGTH,
13479
+ modelValue: operatorNote.value,
13480
+ name: `${uid}-operator-note`,
13481
+ "onUpdate:modelValue": (value) => {
13482
+ operatorNote.value = value;
13483
+ }
13484
+ }) : null,
13485
+ (0, vue.h)(Button_default, {
13486
+ disabled: props.isRunning,
13487
+ onClick: close,
13488
+ size: "small",
13489
+ variant: "text"
13490
+ }, { default: () => t("admin.common.actions.cancel") }),
13491
+ (0, vue.h)(Button_default, {
13492
+ color: action === "suspend" ? "danger" : "primary",
13493
+ disabled: props.isRunning,
13494
+ loading: props.isRunning,
13495
+ onClick: () => {
13496
+ emit("action", action, withNote ? operatorNote.value.trim() || void 0 : void 0);
13497
+ close();
13498
+ },
13499
+ size: "small"
13500
+ }, { default: () => labels[action] })
13501
+ ]);
13502
+ }
13503
+ return props.actions.map((offered) => (0, vue.h)(Button_default, {
13504
+ color: offered === "suspend" ? "danger" : "primary",
13505
+ disabled: props.isRunning,
13506
+ key: offered,
13507
+ loading: props.isRunning && offered === "unlock",
13508
+ onClick: () => {
13509
+ if (offered === "unlock") emit("action", offered);
13510
+ else confirming.value = offered;
13511
+ },
13512
+ variant: "outline"
13513
+ }, { default: () => labels[offered] }));
13514
+ };
13515
+ }
13516
+ });
13517
+ var AccountLifecycleButtons_default = AccountLifecycleButtons;
13518
+
13354
13519
  //#endregion
13355
13520
  //#region src/components/admin/shared/ChipList.ts
13356
13521
  const cls$8 = (element) => (0, __thunderid_browser.withVendorCSSClassPrefix)(`admin__${element}`);
@@ -13540,14 +13705,26 @@ const BaseUserDetails = (0, vue.defineComponent)({
13540
13705
  default: false,
13541
13706
  type: Boolean
13542
13707
  },
13708
+ isRunningLifecycleAction: {
13709
+ default: false,
13710
+ type: Boolean
13711
+ },
13543
13712
  isUpdating: {
13544
13713
  default: false,
13545
13714
  type: Boolean
13546
13715
  },
13716
+ lifecycleActions: {
13717
+ default: () => [],
13718
+ type: Array
13719
+ },
13547
13720
  onDelete: {
13548
13721
  default: void 0,
13549
13722
  type: Function
13550
13723
  },
13724
+ onLifecycleAction: {
13725
+ default: void 0,
13726
+ type: Function
13727
+ },
13551
13728
  onUpdate: {
13552
13729
  default: void 0,
13553
13730
  type: Function
@@ -13576,8 +13753,11 @@ const BaseUserDetails = (0, vue.defineComponent)({
13576
13753
  groups: props.groups,
13577
13754
  isDeleting: props.isDeleting,
13578
13755
  isLoading: props.isLoading,
13756
+ isRunningLifecycleAction: props.isRunningLifecycleAction,
13579
13757
  isUpdating: props.isUpdating,
13758
+ lifecycleActions: props.onLifecycleAction && user ? props.lifecycleActions : [],
13580
13759
  onDelete: isWritable ? props.onDelete : void 0,
13760
+ onLifecycleAction: user ? props.onLifecycleAction : void 0,
13581
13761
  onUpdate: isWritable ? props.onUpdate : void 0,
13582
13762
  user
13583
13763
  };
@@ -13650,18 +13830,36 @@ const BaseUserDetails = (0, vue.defineComponent)({
13650
13830
  description: t("admin.users.details.subtitle", { type: user.type }),
13651
13831
  title: displayName
13652
13832
  }, {
13653
- actions: () => [slots["actions"]?.(), props.onDelete && !user.isReadOnly ? (0, vue.h)(ConfirmButton_default, {
13654
- confirmText: t("admin.users.details.delete.confirm", { name: displayName }),
13655
- isLoading: props.isDeleting,
13656
- onConfirm: props.onDelete,
13657
- t
13658
- }, { default: () => t("admin.users.details.delete.action") }) : null],
13833
+ actions: () => [
13834
+ slots["actions"]?.(),
13835
+ props.onLifecycleAction ? (0, vue.h)(AccountLifecycleButtons_default, {
13836
+ actions: props.lifecycleActions,
13837
+ collectsOperatorNote: true,
13838
+ isRunning: props.isRunningLifecycleAction,
13839
+ name: displayName,
13840
+ onAction: props.onLifecycleAction,
13841
+ t
13842
+ }) : null,
13843
+ props.onDelete && !user.isReadOnly ? (0, vue.h)(ConfirmButton_default, {
13844
+ confirmText: t("admin.users.details.delete.confirm", { name: displayName }),
13845
+ isLoading: props.isDeleting,
13846
+ onConfirm: props.onDelete,
13847
+ t
13848
+ }, { default: () => t("admin.users.details.delete.action") }) : null
13849
+ ],
13659
13850
  default: () => [
13660
13851
  props.error ? (0, vue.h)(Alert_default, { severity: "error" }, { default: () => [props.error] }) : null,
13661
- (0, vue.h)("div", { class: cls$4("row") }, [(0, vue.h)(AdminAvatar_default, {
13662
- name: displayName,
13663
- size: 48
13664
- }), (0, vue.h)("span", { class: cls$4("muted") }, user.ouHandle ?? user.ouId)]),
13852
+ (0, vue.h)("div", { class: cls$4("row") }, [
13853
+ (0, vue.h)(AdminAvatar_default, {
13854
+ name: displayName,
13855
+ size: 48
13856
+ }),
13857
+ (0, vue.h)("span", { class: cls$4("muted") }, user.ouHandle ?? user.ouId),
13858
+ (0, vue.h)(AccessStatusBadge_default, {
13859
+ status: user.status?.value,
13860
+ t
13861
+ })
13862
+ ]),
13665
13863
  (0, vue.h)(Panel_default, { title: t("admin.users.details.attributes") }, {
13666
13864
  actions: () => canEdit && !draft.value ? (0, vue.h)(Button_default, {
13667
13865
  onClick: () => {
@@ -13687,6 +13885,55 @@ const BaseUserDetails = (0, vue.defineComponent)({
13687
13885
  });
13688
13886
  var BaseUserDetails_default = BaseUserDetails;
13689
13887
 
13888
+ //#endregion
13889
+ //#region src/composables/management/useAccountLifecycle.ts
13890
+ /**
13891
+ * Offers the account lifecycle actions (suspend, unsuspend, unlock) of a user, agent or application and
13892
+ * runs them. These actions have no management API endpoint: they run only through the administration
13893
+ * flows the server configures, so an action is offered only when its flow is configured.
13894
+ *
13895
+ * @example
13896
+ * ```typescript
13897
+ * const lifecycle = useAccountLifecycle({
13898
+ * enabled: () => props.lifecycleActions,
13899
+ * invalidatedKeys: () => [[UserQueryKeys.USER, props.userId]],
13900
+ * kind: 'user',
13901
+ * status: () => user.data.value?.status?.value,
13902
+ * subject: () => props.userId,
13903
+ * });
13904
+ * ```
13905
+ */
13906
+ const useAccountLifecycle = ({ enabled, invalidatedKeys, kind, status, subject }) => {
13907
+ const { baseUrl } = useThunderID_default();
13908
+ const flows = useResourceQuery_default(() => [
13909
+ "administration-flows",
13910
+ "account-lifecycle",
13911
+ kind
13912
+ ], (fetcher) => (0, __thunderid_browser.resolveAdministrationFlows)({
13913
+ baseUrl,
13914
+ fetcher
13915
+ }, Object.values(__thunderid_browser.AccountLifecycleFlowConfigKey[kind])), { enabled });
13916
+ const execution = useResourceMutation_default(({ action, operatorNote }, fetcher) => (0, __thunderid_browser.runAccountLifecycleAction)({
13917
+ action,
13918
+ baseUrl,
13919
+ fetcher,
13920
+ kind,
13921
+ operatorNote,
13922
+ subject: subject()
13923
+ }), () => invalidatedKeys());
13924
+ return {
13925
+ actions: (0, vue.computed)(() => enabled() && flows.data.value ? (0, __thunderid_browser.getAccountLifecycleActions)(kind, status(), flows.data.value) : []),
13926
+ error: (0, vue.computed)(() => execution.error.value),
13927
+ isRunning: (0, vue.computed)(() => execution.isLoading.value),
13928
+ loadError: (0, vue.computed)(() => flows.error.value),
13929
+ run: (action, operatorNote) => void execution.mutate({
13930
+ action,
13931
+ operatorNote
13932
+ })
13933
+ };
13934
+ };
13935
+ var useAccountLifecycle_default = useAccountLifecycle;
13936
+
13690
13937
  //#endregion
13691
13938
  //#region src/components/admin/UserDetails/UserDetails.ts
13692
13939
  /**
@@ -13703,6 +13950,10 @@ var BaseUserDetails_default = BaseUserDetails;
13703
13950
  const UserDetails = (0, vue.defineComponent)({
13704
13951
  name: "UserDetails",
13705
13952
  props: {
13953
+ administrationMode: {
13954
+ default: void 0,
13955
+ type: String
13956
+ },
13706
13957
  className: {
13707
13958
  default: "",
13708
13959
  type: String
@@ -13719,6 +13970,10 @@ const UserDetails = (0, vue.defineComponent)({
13719
13970
  default: () => ["password"],
13720
13971
  type: Array
13721
13972
  },
13973
+ lifecycleActions: {
13974
+ default: false,
13975
+ type: Boolean
13976
+ },
13722
13977
  preferences: {
13723
13978
  default: void 0,
13724
13979
  type: Object
@@ -13751,6 +14006,7 @@ const UserDetails = (0, vue.defineComponent)({
13751
14006
  }), { enabled: hasUserId });
13752
14007
  const deletion = useResourceMutation_default((userId, fetcher) => (0, __thunderid_browser.deleteUser)({
13753
14008
  ...endpoint,
14009
+ administrationMode: props.administrationMode,
13754
14010
  fetcher,
13755
14011
  userId
13756
14012
  }), () => [[__thunderid_browser.UserQueryKeys.USERS]], { onSuccess: () => emit("deleted") });
@@ -13760,17 +14016,27 @@ const UserDetails = (0, vue.defineComponent)({
13760
14016
  payload: data,
13761
14017
  userId
13762
14018
  }), ({ userId }) => [[__thunderid_browser.UserQueryKeys.USER, userId], [__thunderid_browser.UserQueryKeys.USERS]]);
14019
+ const lifecycle = useAccountLifecycle_default({
14020
+ enabled: () => props.lifecycleActions,
14021
+ invalidatedKeys: () => [[__thunderid_browser.UserQueryKeys.USER, props.userId], [__thunderid_browser.UserQueryKeys.USERS]],
14022
+ kind: "user",
14023
+ status: () => user.data.value?.status?.value,
14024
+ subject: () => props.userId
14025
+ });
13763
14026
  return () => {
13764
14027
  const current = user.data.value;
13765
14028
  return (0, vue.h)(BaseUserDetails_default, {
13766
14029
  className: props.className,
13767
- error: (0, __thunderid_browser.toManagementErrorMessage)(t, user.error.value, "admin.users.details.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, deletion.error.value, "admin.users.details.delete.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, update.error.value, "admin.users.details.edit.error"),
14030
+ error: (0, __thunderid_browser.toManagementErrorMessage)(t, user.error.value, "admin.users.details.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, deletion.error.value, "admin.users.details.delete.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, update.error.value, "admin.users.details.edit.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, lifecycle.error.value, "admin.common.lifecycle.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, lifecycle.loadError.value, "admin.common.lifecycle.load_error"),
13768
14031
  groups: groups.data.value?.groups ?? [],
13769
14032
  hiddenAttributes: props.hiddenAttributes,
13770
14033
  isDeleting: deletion.isLoading.value,
13771
14034
  isLoading: user.isLoading.value,
14035
+ isRunningLifecycleAction: lifecycle.isRunning.value,
13772
14036
  isUpdating: update.isLoading.value,
14037
+ lifecycleActions: lifecycle.actions.value,
13773
14038
  onDelete: props.deletable ? () => void deletion.mutate(props.userId) : void 0,
14039
+ onLifecycleAction: props.lifecycleActions ? lifecycle.run : void 0,
13774
14040
  onUpdate: props.editable && current ? (attributes) => void update.mutate({
13775
14041
  data: {
13776
14042
  attributes,
@@ -14223,6 +14489,10 @@ var BaseGroupMembers_default = BaseGroupMembers;
14223
14489
  const GroupMembers = (0, vue.defineComponent)({
14224
14490
  name: "GroupMembers",
14225
14491
  props: {
14492
+ administrationMode: {
14493
+ default: void 0,
14494
+ type: String
14495
+ },
14226
14496
  className: {
14227
14497
  default: "",
14228
14498
  type: String
@@ -14288,6 +14558,7 @@ const GroupMembers = (0, vue.defineComponent)({
14288
14558
  }), invalidatedByMembership);
14289
14559
  const remove = useResourceMutation_default(({ groupId, members: removed }, fetcher) => (0, __thunderid_browser.removeGroupMembers)({
14290
14560
  ...groupsEndpoint,
14561
+ administrationMode: props.administrationMode,
14291
14562
  fetcher,
14292
14563
  groupId,
14293
14564
  members: removed
@@ -14708,6 +14979,10 @@ var BaseRoleAssignments_default = BaseRoleAssignments;
14708
14979
  const RoleAssignments = (0, vue.defineComponent)({
14709
14980
  name: "RoleAssignments",
14710
14981
  props: {
14982
+ administrationMode: {
14983
+ default: void 0,
14984
+ type: String
14985
+ },
14711
14986
  className: {
14712
14987
  default: "",
14713
14988
  type: String
@@ -14782,6 +15057,7 @@ const RoleAssignments = (0, vue.defineComponent)({
14782
15057
  }), () => [[__thunderid_browser.RoleQueryKeys.ROLE_ASSIGNMENTS]]);
14783
15058
  const unassign = useResourceMutation_default(({ roleId, assignments: removed }, fetcher) => (0, __thunderid_browser.removeRoleAssignments)({
14784
15059
  ...rolesEndpoint,
15060
+ administrationMode: props.administrationMode,
14785
15061
  assignments: removed,
14786
15062
  fetcher,
14787
15063
  roleId
@@ -15280,10 +15556,22 @@ const BaseAgentDetails = (0, vue.defineComponent)({
15280
15556
  default: false,
15281
15557
  type: Boolean
15282
15558
  },
15559
+ isRunningLifecycleAction: {
15560
+ default: false,
15561
+ type: Boolean
15562
+ },
15563
+ lifecycleActions: {
15564
+ default: () => [],
15565
+ type: Array
15566
+ },
15283
15567
  onDelete: {
15284
15568
  default: void 0,
15285
15569
  type: Function
15286
15570
  },
15571
+ onLifecycleAction: {
15572
+ default: void 0,
15573
+ type: Function
15574
+ },
15287
15575
  preferences: {
15288
15576
  default: void 0,
15289
15577
  type: Object
@@ -15304,7 +15592,10 @@ const BaseAgentDetails = (0, vue.defineComponent)({
15304
15592
  groups: props.groups,
15305
15593
  isDeleting: props.isDeleting,
15306
15594
  isLoading: props.isLoading,
15595
+ isRunningLifecycleAction: props.isRunningLifecycleAction,
15596
+ lifecycleActions: props.onLifecycleAction && agent ? props.lifecycleActions : [],
15307
15597
  onDelete: agent && !agent.isReadOnly ? props.onDelete : void 0,
15598
+ onLifecycleAction: agent ? props.onLifecycleAction : void 0,
15308
15599
  roles: props.roles
15309
15600
  };
15310
15601
  return (0, vue.h)("div", { class: props.className }, slots["default"](renderProps));
@@ -15337,6 +15628,13 @@ const BaseAgentDetails = (0, vue.defineComponent)({
15337
15628
  value: agent.ouHandle ?? agent.ouId
15338
15629
  }
15339
15630
  ];
15631
+ if (agent.status) details.push({
15632
+ label: t("admin.common.columns.status"),
15633
+ value: (0, vue.h)(AccessStatusBadge_default, {
15634
+ status: agent.status.value,
15635
+ t
15636
+ })
15637
+ });
15340
15638
  if (agent.clientId) details.push({
15341
15639
  label: t("admin.agents.list.columns.client_id"),
15342
15640
  value: (0, vue.h)(CopyableText_default, { value: agent.clientId })
@@ -15347,12 +15645,23 @@ const BaseAgentDetails = (0, vue.defineComponent)({
15347
15645
  description: agent.description,
15348
15646
  title: agent.name
15349
15647
  }, {
15350
- actions: () => [slots["actions"]?.(), props.onDelete && !agent.isReadOnly ? (0, vue.h)(ConfirmButton_default, {
15351
- confirmText: t("admin.agents.details.delete.confirm", { name: agent.name }),
15352
- isLoading: props.isDeleting,
15353
- onConfirm: props.onDelete,
15354
- t
15355
- }, { default: () => t("admin.agents.details.delete.action") }) : null],
15648
+ actions: () => [
15649
+ slots["actions"]?.(),
15650
+ props.onLifecycleAction ? (0, vue.h)(AccountLifecycleButtons_default, {
15651
+ actions: props.lifecycleActions,
15652
+ collectsOperatorNote: true,
15653
+ isRunning: props.isRunningLifecycleAction,
15654
+ name: agent.name,
15655
+ onAction: props.onLifecycleAction,
15656
+ t
15657
+ }) : null,
15658
+ props.onDelete && !agent.isReadOnly ? (0, vue.h)(ConfirmButton_default, {
15659
+ confirmText: t("admin.agents.details.delete.confirm", { name: agent.name }),
15660
+ isLoading: props.isDeleting,
15661
+ onConfirm: props.onDelete,
15662
+ t
15663
+ }, { default: () => t("admin.agents.details.delete.action") }) : null
15664
+ ],
15356
15665
  default: () => [
15357
15666
  props.error ? (0, vue.h)(Alert_default, { severity: "error" }, { default: () => [props.error] }) : null,
15358
15667
  (0, vue.h)(Panel_default, { title: t("admin.agents.details.overview") }, { default: () => (0, vue.h)(DetailList_default, { items: details }) }),
@@ -15407,6 +15716,10 @@ const AgentDetails = (0, vue.defineComponent)({
15407
15716
  default: false,
15408
15717
  type: Boolean
15409
15718
  },
15719
+ lifecycleActions: {
15720
+ default: false,
15721
+ type: Boolean
15722
+ },
15410
15723
  preferences: {
15411
15724
  default: void 0,
15412
15725
  type: Object
@@ -15449,14 +15762,24 @@ const AgentDetails = (0, vue.defineComponent)({
15449
15762
  agentId,
15450
15763
  fetcher
15451
15764
  }), () => [[__thunderid_browser.AgentQueryKeys.AGENTS]], { onSuccess: () => emit("deleted") });
15765
+ const lifecycle = useAccountLifecycle_default({
15766
+ enabled: () => props.lifecycleActions,
15767
+ invalidatedKeys: () => [[__thunderid_browser.AgentQueryKeys.AGENT, props.agentId], [__thunderid_browser.AgentQueryKeys.AGENTS]],
15768
+ kind: "agent",
15769
+ status: () => agent.data.value?.status?.value,
15770
+ subject: () => props.agentId
15771
+ });
15452
15772
  return () => (0, vue.h)(BaseAgentDetails_default, {
15453
15773
  agent: agent.data.value,
15454
15774
  className: props.className,
15455
- error: (0, __thunderid_browser.toManagementErrorMessage)(t, agent.error.value, "admin.agents.details.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, deletion.error.value, "admin.agents.details.delete.error"),
15775
+ error: (0, __thunderid_browser.toManagementErrorMessage)(t, agent.error.value, "admin.agents.details.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, deletion.error.value, "admin.agents.details.delete.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, lifecycle.error.value, "admin.common.lifecycle.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, lifecycle.loadError.value, "admin.common.lifecycle.load_error"),
15456
15776
  groups: groups.data.value?.groups ?? [],
15457
15777
  isDeleting: deletion.isLoading.value,
15458
15778
  isLoading: agent.isLoading.value,
15779
+ isRunningLifecycleAction: lifecycle.isRunning.value,
15780
+ lifecycleActions: lifecycle.actions.value,
15459
15781
  onDelete: props.deletable ? () => void deletion.mutate(props.agentId) : void 0,
15782
+ onLifecycleAction: props.lifecycleActions ? lifecycle.run : void 0,
15460
15783
  preferences: props.preferences,
15461
15784
  roles: roles.data.value?.roles ?? []
15462
15785
  }, { ...slots });
@@ -15903,14 +16226,26 @@ const BaseApplicationDetails = (0, vue.defineComponent)({
15903
16226
  default: false,
15904
16227
  type: Boolean
15905
16228
  },
16229
+ isRunningLifecycleAction: {
16230
+ default: false,
16231
+ type: Boolean
16232
+ },
15906
16233
  isUpdating: {
15907
16234
  default: false,
15908
16235
  type: Boolean
15909
16236
  },
16237
+ lifecycleActions: {
16238
+ default: () => [],
16239
+ type: Array
16240
+ },
15910
16241
  onDelete: {
15911
16242
  default: void 0,
15912
16243
  type: Function
15913
16244
  },
16245
+ onLifecycleAction: {
16246
+ default: void 0,
16247
+ type: Function
16248
+ },
15914
16249
  onRegenerateSecret: {
15915
16250
  default: void 0,
15916
16251
  type: Function
@@ -15950,9 +16285,12 @@ const BaseApplicationDetails = (0, vue.defineComponent)({
15950
16285
  isDeleting: props.isDeleting,
15951
16286
  isLoading: props.isLoading,
15952
16287
  isRegeneratingSecret: props.isRegeneratingSecret,
16288
+ isRunningLifecycleAction: props.isRunningLifecycleAction,
15953
16289
  isUpdating: props.isUpdating,
16290
+ lifecycleActions: props.onLifecycleAction && application ? props.lifecycleActions : [],
15954
16291
  oauth,
15955
16292
  onDelete: isWritable ? props.onDelete : void 0,
16293
+ onLifecycleAction: application ? props.onLifecycleAction : void 0,
15956
16294
  onRegenerateSecret: canRegenerate ? props.onRegenerateSecret : void 0,
15957
16295
  onSecretDismiss: props.clientSecret ? props.onSecretDismiss : void 0,
15958
16296
  onUpdate: isWritable ? props.onUpdate : void 0
@@ -15996,6 +16334,13 @@ const BaseApplicationDetails = (0, vue.defineComponent)({
15996
16334
  value: application.logoUrl ?? notSet
15997
16335
  }
15998
16336
  ];
16337
+ if (application.status?.value) overview.push({
16338
+ label: t("admin.common.columns.status"),
16339
+ value: (0, vue.h)(AccessStatusBadge_default, {
16340
+ status: application.status.value,
16341
+ t
16342
+ })
16343
+ });
15999
16344
  const renderEditForm = (current) => (0, vue.h)(Panel_default, { title: t("admin.applications.details.edit.action") }, { default: () => (0, vue.h)("form", {
16000
16345
  class: cls("edit-form"),
16001
16346
  novalidate: true,
@@ -16079,12 +16424,22 @@ const BaseApplicationDetails = (0, vue.defineComponent)({
16079
16424
  description: application.description,
16080
16425
  title: application.name
16081
16426
  }, {
16082
- actions: () => [slots["actions"]?.(), props.onDelete && isWritable ? (0, vue.h)(ConfirmButton_default, {
16083
- confirmText: t("admin.applications.details.delete.confirm", { name: application.name }),
16084
- isLoading: props.isDeleting,
16085
- onConfirm: props.onDelete,
16086
- t
16087
- }, { default: () => t("admin.applications.details.delete.action") }) : null],
16427
+ actions: () => [
16428
+ slots["actions"]?.(),
16429
+ props.onLifecycleAction ? (0, vue.h)(AccountLifecycleButtons_default, {
16430
+ actions: props.lifecycleActions,
16431
+ isRunning: props.isRunningLifecycleAction,
16432
+ name: application.name,
16433
+ onAction: props.onLifecycleAction,
16434
+ t
16435
+ }) : null,
16436
+ props.onDelete && isWritable ? (0, vue.h)(ConfirmButton_default, {
16437
+ confirmText: t("admin.applications.details.delete.confirm", { name: application.name }),
16438
+ isLoading: props.isDeleting,
16439
+ onConfirm: props.onDelete,
16440
+ t
16441
+ }, { default: () => t("admin.applications.details.delete.action") }) : null
16442
+ ],
16088
16443
  default: () => [props.error ? (0, vue.h)(Alert_default, { severity: "error" }, { default: () => [props.error] }) : null, ...draft.value ? [renderEditForm(draft.value)] : [(0, vue.h)(Panel_default, { title: t("admin.applications.details.overview") }, {
16089
16444
  actions: () => props.onUpdate && isWritable ? (0, vue.h)(Button_default, {
16090
16445
  onClick: () => {
@@ -16129,6 +16484,10 @@ var BaseApplicationDetails_default = BaseApplicationDetails;
16129
16484
  const ApplicationDetails = (0, vue.defineComponent)({
16130
16485
  name: "ApplicationDetails",
16131
16486
  props: {
16487
+ administrationMode: {
16488
+ default: void 0,
16489
+ type: String
16490
+ },
16132
16491
  applicationId: {
16133
16492
  required: true,
16134
16493
  type: String
@@ -16145,6 +16504,10 @@ const ApplicationDetails = (0, vue.defineComponent)({
16145
16504
  default: false,
16146
16505
  type: Boolean
16147
16506
  },
16507
+ lifecycleActions: {
16508
+ default: false,
16509
+ type: Boolean
16510
+ },
16148
16511
  preferences: {
16149
16512
  default: void 0,
16150
16513
  type: Object
@@ -16165,6 +16528,7 @@ const ApplicationDetails = (0, vue.defineComponent)({
16165
16528
  }), { enabled: () => Boolean(props.applicationId) });
16166
16529
  const deletion = useResourceMutation_default((applicationId, fetcher) => (0, __thunderid_browser.deleteApplication)({
16167
16530
  ...endpoint,
16531
+ administrationMode: props.administrationMode,
16168
16532
  applicationId,
16169
16533
  fetcher
16170
16534
  }), () => [[__thunderid_browser.ApplicationQueryKeys.APPLICATIONS]], { onSuccess: () => emit("deleted") });
@@ -16176,21 +16540,32 @@ const ApplicationDetails = (0, vue.defineComponent)({
16176
16540
  }), ({ application: current }) => [[__thunderid_browser.ApplicationQueryKeys.APPLICATION, current.id], [__thunderid_browser.ApplicationQueryKeys.APPLICATIONS]]);
16177
16541
  const regeneration = useResourceMutation_default((applicationId, fetcher) => (0, __thunderid_browser.regenerateClientSecret)({
16178
16542
  ...endpoint,
16543
+ administrationMode: props.administrationMode,
16179
16544
  applicationId,
16180
16545
  fetcher
16181
16546
  }), (applicationId) => [[__thunderid_browser.ApplicationQueryKeys.APPLICATION, applicationId], [__thunderid_browser.ApplicationQueryKeys.APPLICATIONS]]);
16547
+ const lifecycle = useAccountLifecycle_default({
16548
+ enabled: () => props.lifecycleActions,
16549
+ invalidatedKeys: () => [[__thunderid_browser.ApplicationQueryKeys.APPLICATION, props.applicationId], [__thunderid_browser.ApplicationQueryKeys.APPLICATIONS]],
16550
+ kind: "application",
16551
+ status: () => application.data.value?.status?.value,
16552
+ subject: () => props.applicationId
16553
+ });
16182
16554
  return () => {
16183
16555
  const current = application.data.value;
16184
16556
  return (0, vue.h)(BaseApplicationDetails_default, {
16185
16557
  application: current,
16186
16558
  className: props.className,
16187
16559
  clientSecret: regeneration.data.value?.clientSecret ?? null,
16188
- error: (0, __thunderid_browser.toManagementErrorMessage)(t, application.error.value, "admin.applications.details.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, deletion.error.value, "admin.applications.details.delete.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, update.error.value, "admin.applications.details.edit.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, regeneration.error.value, "admin.applications.details.secret.error"),
16560
+ error: (0, __thunderid_browser.toManagementErrorMessage)(t, application.error.value, "admin.applications.details.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, deletion.error.value, "admin.applications.details.delete.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, update.error.value, "admin.applications.details.edit.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, regeneration.error.value, "admin.applications.details.secret.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, lifecycle.error.value, "admin.common.lifecycle.error") ?? (0, __thunderid_browser.toManagementErrorMessage)(t, lifecycle.loadError.value, "admin.common.lifecycle.load_error"),
16189
16561
  isDeleting: deletion.isLoading.value,
16190
16562
  isLoading: application.isLoading.value,
16191
16563
  isRegeneratingSecret: regeneration.isLoading.value,
16564
+ isRunningLifecycleAction: lifecycle.isRunning.value,
16192
16565
  isUpdating: update.isLoading.value,
16566
+ lifecycleActions: lifecycle.actions.value,
16193
16567
  onDelete: props.deletable ? () => void deletion.mutate(props.applicationId) : void 0,
16568
+ onLifecycleAction: props.lifecycleActions ? lifecycle.run : void 0,
16194
16569
  onRegenerateSecret: props.secretRegenerable ? () => void regeneration.mutate(props.applicationId) : void 0,
16195
16570
  onSecretDismiss: regeneration.reset,
16196
16571
  onUpdate: props.editable && current ? (changes) => void update.mutate({
@@ -16347,6 +16722,12 @@ Object.defineProperty(exports, 'ADMINISTRATION_FLOW_TYPE', {
16347
16722
  }
16348
16723
  });
16349
16724
  exports.AcceptInvite = AcceptInvite_default;
16725
+ Object.defineProperty(exports, 'AccountLifecycleFlowConfigKey', {
16726
+ enumerable: true,
16727
+ get: function () {
16728
+ return __thunderid_browser.AccountLifecycleFlowConfigKey;
16729
+ }
16730
+ });
16350
16731
  Object.defineProperty(exports, 'AdministrationFlowConfigKey', {
16351
16732
  enumerable: true,
16352
16733
  get: function () {
@@ -16967,6 +17348,12 @@ Object.defineProperty(exports, 'findAdministrationFlows', {
16967
17348
  return __thunderid_browser.findAdministrationFlows;
16968
17349
  }
16969
17350
  });
17351
+ Object.defineProperty(exports, 'getAccountLifecycleActions', {
17352
+ enumerable: true,
17353
+ get: function () {
17354
+ return __thunderid_browser.getAccountLifecycleActions;
17355
+ }
17356
+ });
16970
17357
  Object.defineProperty(exports, 'getAction', {
16971
17358
  enumerable: true,
16972
17359
  get: function () {
@@ -17561,6 +17948,12 @@ Object.defineProperty(exports, 'revertGatewayConfiguration', {
17561
17948
  return __thunderid_browser.revertGatewayConfiguration;
17562
17949
  }
17563
17950
  });
17951
+ Object.defineProperty(exports, 'runAccountLifecycleAction', {
17952
+ enumerable: true,
17953
+ get: function () {
17954
+ return __thunderid_browser.runAccountLifecycleAction;
17955
+ }
17956
+ });
17564
17957
  Object.defineProperty(exports, 'runAdministrationFlow', {
17565
17958
  enumerable: true,
17566
17959
  get: function () {