@wssto2/vue-core 0.5.1 → 0.5.3

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 (56) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js → ActionRow.vue_vue_type_script_setup_true_lang-Bv-APkGf.js} +1 -1
  3. package/dist/{Activity-dpY2kIs2.js → Activity-DUjDaPfP.js} +4 -4
  4. package/dist/{Changes-CL8F1w8q.js → Changes-B0tZO6BZ.js} +3 -3
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-l-e-6WeS.js → CollectionPage.vue_vue_type_script_setup_true_lang-o_Pj-JcD.js} +2 -2
  6. package/dist/{DateField.vue_vue_type_script_setup_true_lang-DRuWzSaX.js → DateField.vue_vue_type_script_setup_true_lang-CDg31ZU7.js} +1 -1
  7. package/dist/{DeadLetters-BZLyL5lR.js → DeadLetters-IgVHao84.js} +2 -2
  8. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js → FormGroup.vue_vue_type_script_setup_true_lang-CSgT4ITL.js} +1 -1
  9. package/dist/{FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js → FormView.vue_vue_type_script_setup_true_lang-D31Hk3pJ.js} +1 -1
  10. package/dist/{General-mrVzi-5R.js → General-C40HxupS.js} +6 -6
  11. package/dist/{NewRolePage-B2DItwvf.js → NewRolePage-Bhy8KJO1.js} +2 -2
  12. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-ButMV_sf.js → NumberField.vue_vue_type_script_setup_true_lang-BdS7BxuS.js} +1 -1
  13. package/dist/{ProfilePage-EiTIYzZ5.js → ProfilePage-Bf7dFzGd.js} +9 -9
  14. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BqqilJGF.js → RoleEditor.vue_vue_type_script_setup_true_lang-C6oloGIh.js} +12 -11
  15. package/dist/{RolePage-jMHAt9y8.js → RolePage-BjbvciTg.js} +6 -6
  16. package/dist/{RolesPage-B9GaVQBx.js → RolesPage-DzVOgF4z.js} +4 -4
  17. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BwyMvkis.js → SegmentedField.vue_vue_type_script_setup_true_lang-DXe_iOS8.js} +1 -1
  18. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BzQC1qDQ.js → SelectField.vue_vue_type_script_setup_true_lang-BN4vzvV9.js} +2 -2
  19. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DhoTd5D7.js → SessionList.vue_vue_type_script_setup_true_lang-PuWIK-Wa.js} +2 -2
  20. package/dist/{Sessions-CHLokZ9e.js → Sessions-CRUObe5G.js} +2 -2
  21. package/dist/{SettingsPage-CudoKdXm.js → SettingsPage-C0qEC0uI.js} +8 -8
  22. package/dist/{SignIn-ypRvdmjg.js → SignIn-Uy0Jujzz.js} +4 -4
  23. package/dist/{SignInPage-CbPeKlAo.js → SignInPage-CpVZfrLZ.js} +3 -3
  24. package/dist/{SignIns-BApzbGq-.js → SignIns-Cp5Gx2dk.js} +1 -1
  25. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-D_-HACqT.js → SwitchField.vue_vue_type_script_setup_true_lang-Dj5Aq8QT.js} +1 -1
  26. package/dist/{TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js → TextField.vue_vue_type_script_setup_true_lang-BwfNNQEz.js} +2 -2
  27. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-DsjK2C9T.js → TextareaField.vue_vue_type_script_setup_true_lang-aT1P8Xqr.js} +1 -1
  28. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-Cz7KhUqt.js → TimeField.vue_vue_type_script_setup_true_lang-jPKPE1hc.js} +1 -1
  29. package/dist/{UserRecord-BCTaBajE.js → UserRecord-DbSMnTbj.js} +6 -6
  30. package/dist/{UsersList-CqSK3cQL.js → UsersList-9MicE2pG.js} +7 -7
  31. package/dist/access/api.d.ts +8 -7
  32. package/dist/access/context.d.ts +7 -0
  33. package/dist/access/feature.d.ts +8 -0
  34. package/dist/access/index.js +1 -1
  35. package/dist/access/labels.d.ts +5 -0
  36. package/dist/collection/index.js +1 -1
  37. package/dist/form/FormRow.vue.d.ts +3 -0
  38. package/dist/form/index.js +22 -22
  39. package/dist/identity/index.js +2 -2
  40. package/dist/index-BdGnA1Jh.js +765 -0
  41. package/dist/{index-BTRv8mcf.js → index-C-oM_Mnf.js} +261 -239
  42. package/dist/{index-auJqVMWC.js → index-Ok29ucE3.js} +13 -13
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.js +1 -1
  45. package/dist/notifications/index.d.ts +2 -0
  46. package/dist/notifications/index.js +5 -4
  47. package/dist/notifications/push/pushState.d.ts +27 -0
  48. package/dist/{options-g8RwEhBk.js → options-Bu0XbEpN.js} +104 -102
  49. package/dist/phone/index.js +1 -1
  50. package/dist/{status-BUFELJz2.js → status-C78NpXyB.js} +1 -1
  51. package/dist/styles.css +1 -1
  52. package/dist/{suggestions-CfFTHi8y.js → suggestions-ClyLexMO.js} +1 -1
  53. package/dist/{useCommand-CtqheKUv.js → useCommand-DyuPTosF.js} +1 -1
  54. package/dist/{useGroupSheet-ATvc0IiM.js → useGroupSheet-C2NyqWRp.js} +2 -2
  55. package/package.json +1 -1
  56. package/dist/index-VPzJJN6Z.js +0 -745
@@ -15,15 +15,15 @@ import { useRouter as Y, useRoute as he } from "vue-router";
15
15
  import { _ as J } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js";
16
16
  import { _ as z } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
17
17
  import { u as ye } from "./leaveGuard-Cc8yeLxM.js";
18
- import { _ as ge } from "./FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js";
19
- import { _ as ve } from "./TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js";
18
+ import { _ as ge } from "./FormView.vue_vue_type_script_setup_true_lang-D31Hk3pJ.js";
19
+ import { _ as ve } from "./TextField.vue_vue_type_script_setup_true_lang-BwfNNQEz.js";
20
20
  import { u as _e } from "./mediaQuery-CygcXmFW.js";
21
21
  import { u as be } from "./useDialog-CXR3hN0G.js";
22
22
  import { c as we } from "./closeOverlays-CjVsIrpL.js";
23
23
  import { u as xe } from "./FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js";
24
24
  import { u as Ee } from "./format-D8X4zsx6.js";
25
25
  import { b as Se } from "./routeResource-CcYA75T2.js";
26
- import "./ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js";
26
+ import "./ActionRow.vue_vue_type_script_setup_true_lang-Bv-APkGf.js";
27
27
  import { _ as Te } from "./AccessGate.vue_vue_type_script_setup_true_lang-DZ9GcLC1.js";
28
28
  const b = {
29
29
  login: i("POST", "/v1/auth/login", { public: !0 }),
@@ -286,7 +286,7 @@ const De = ["aria-labelledby"], Fe = ["id"], Ne = { class: "mt-1 text-subheadlin
286
286
  ]));
287
287
  }
288
288
  }), He = G({
289
- login: { name: "login", path: "/login", component: () => import("./SignInPage-CbPeKlAo.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
289
+ login: { name: "login", path: "/login", component: () => import("./SignInPage-CpVZfrLZ.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
290
290
  });
291
291
  function Rs(e = {}) {
292
292
  return j({
@@ -354,7 +354,7 @@ function Is(e) {
354
354
  };
355
355
  }
356
356
  const ee = G({
357
- index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-EiTIYzZ5.js"), meta: { titleKey: "core.profile.title" } }
357
+ index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-Bf7dFzGd.js"), meta: { titleKey: "core.profile.title" } }
358
358
  }), Xe = /* @__PURE__ */ w({
359
359
  __name: "ProfileMenuItem",
360
360
  setup(e) {
@@ -378,19 +378,19 @@ function ss(e) {
378
378
  return { name: `users.record.${e.path}`, path: e.path, component: s, meta: { ...e.meta } };
379
379
  }
380
380
  const V = "iam.user:view", zs = "iam.user:manage", ts = "iam.user.activity:view", se = G({
381
- index: { name: "users.index", path: "/users", component: () => import("./UsersList-CqSK3cQL.js"), meta: { access: V, titleKey: "core.users.title" } },
381
+ index: { name: "users.index", path: "/users", component: () => import("./UsersList-9MicE2pG.js"), meta: { access: V, titleKey: "core.users.title" } },
382
382
  record: {
383
383
  name: "users.record",
384
384
  path: "/users/:id",
385
- component: () => import("./UserRecord-BCTaBajE.js"),
385
+ component: () => import("./UserRecord-DbSMnTbj.js"),
386
386
  meta: { access: V, titleKey: "core.users.title", remountOnParam: "id" },
387
387
  children: [
388
- { name: "users.record.general", path: "general", component: () => import("./General-mrVzi-5R.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
389
- { name: "users.record.signin", path: "signin", component: () => import("./SignIn-ypRvdmjg.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
390
- { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-CHLokZ9e.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
391
- { name: "users.record.signins", path: "signins", component: () => import("./SignIns-BApzbGq-.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
392
- { name: "users.record.changes", path: "changes", component: () => import("./Changes-CL8F1w8q.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
393
- { name: "users.record.activity", path: "activity", component: () => import("./Activity-dpY2kIs2.js"), meta: { access: ts, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
388
+ { name: "users.record.general", path: "general", component: () => import("./General-C40HxupS.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
389
+ { name: "users.record.signin", path: "signin", component: () => import("./SignIn-Uy0Jujzz.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
390
+ { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-CRUObe5G.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
391
+ { name: "users.record.signins", path: "signins", component: () => import("./SignIns-Cp5Gx2dk.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
392
+ { name: "users.record.changes", path: "changes", component: () => import("./Changes-B0tZO6BZ.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
393
+ { name: "users.record.activity", path: "activity", component: () => import("./Activity-DUjDaPfP.js"), meta: { access: ts, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
394
394
  ]
395
395
  }
396
396
  });
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
2
- export declare const version = "0.5.1";
2
+ export declare const version = "0.5.3";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = "0.5.1";
1
+ const o = "0.5.3";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -7,6 +7,8 @@ export { eventsRoutes } from "../modules/events/routes";
7
7
  export { notificationsFeature } from "./feature";
8
8
  export type { NotificationsFeatureOptions } from "./feature";
9
9
  export type { NotificationCategoryLook, NotificationSettingsSection } from "./context";
10
+ export { usePushState } from "./push/pushState";
11
+ export type { PushState } from "./push/pushState";
10
12
  export { notificationSettingsRoutes } from "./settings/routes";
11
13
  export type { NotificationSettingsRoutes } from "./settings/routes";
12
14
  export { deadLettersRoutes } from "./deadletters/routes";
@@ -1,8 +1,9 @@
1
- import { d as s, e as o, n as a, b as i, c as n } from "../index-BTRv8mcf.js";
1
+ import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-C-oM_Mnf.js";
2
2
  export {
3
3
  s as deadLettersRoutes,
4
- o as eventsRoutes,
5
- a as notificationRoutes,
4
+ a as eventsRoutes,
5
+ o as notificationRoutes,
6
6
  i as notificationSettingsRoutes,
7
- n as notificationsFeature
7
+ n as notificationsFeature,
8
+ u as usePushState
8
9
  };
@@ -0,0 +1,27 @@
1
+ import { type ComputedRef, type Ref } from "vue";
2
+ import type { HttpClient } from "../../client";
3
+ import { type PushBrowser } from "./browser";
4
+ /** This browser's push, for an application's own screens (an onboarding step): the same state the settings page shows. */
5
+ export interface PushState {
6
+ /** Settled: `available`, `permission` and `subscribed` are read. Until then `subscribed` is false, so wait for it before offering push. */
7
+ readonly ready: Readonly<Ref<boolean>>;
8
+ /** The server has push and this browser can use it (not an old browser, not an iPhone Safari tab outside the home-screen app). */
9
+ readonly available: ComputedRef<boolean>;
10
+ /** The browser's permission; `unknown` where there is no Notification API. */
11
+ readonly permission: Readonly<Ref<NotificationPermission | "unknown">>;
12
+ /** This browser holds a push subscription, backed by the permission, which the server was given at sign-in or by `enable()`. */
13
+ readonly subscribed: ComputedRef<boolean>;
14
+ readonly busy: Readonly<Ref<boolean>>;
15
+ /** Asks for the permission and registers this browser; call it from a tap. Resolves to `subscribed`. */
16
+ enable(): Promise<boolean>;
17
+ /** Stops push on this browser only. */
18
+ disable(): Promise<void>;
19
+ }
20
+ /**
21
+ * This browser's push state and its two actions, read at once when called (in `setup`). Built on what the notification settings page uses,
22
+ * so a browser that already has push on is `subscribed` and an onboarding step does not offer it again.
23
+ *
24
+ * const push = usePushState();
25
+ * // v-if="push.ready.value && push.available.value && !push.subscribed.value" -> <Button @click="push.enable()">
26
+ */
27
+ export declare function usePushState(http?: HttpClient, browser?: PushBrowser): PushState;
@@ -1,4 +1,4 @@
1
- import { inject as N, ref as O, computed as d, onBeforeUnmount as F, defineComponent as A, useSlots as D, openBlock as r, createBlock as L, resolveDynamicComponent as j, unref as t, normalizeClass as b, withCtx as _, createElementBlock as i, renderSlot as c, createCommentVNode as u, createElementVNode as h, createTextVNode as k, toDisplayString as v, createVNode as V, useAttrs as G, useId as K, mergeProps as C, createSlots as M, mergeDefaults as P } from "vue";
1
+ import { inject as C, ref as z, computed as d, onBeforeUnmount as F, defineComponent as O, useSlots as A, openBlock as r, createBlock as L, resolveDynamicComponent as T, unref as t, normalizeClass as b, withCtx as w, createElementBlock as i, renderSlot as f, createCommentVNode as u, createElementVNode as k, createTextVNode as h, toDisplayString as m, createVNode as D, useAttrs as G, useId as K, mergeProps as j, createSlots as M, mergeDefaults as P } from "vue";
2
2
  import { useI18n as U } from "vue-i18n";
3
3
  import { _ as B } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
4
4
  import { RouterLink as Y } from "vue-router";
@@ -15,14 +15,14 @@ const X = {
15
15
  lockedReason: void 0,
16
16
  presentation: "control",
17
17
  name: void 0
18
- }, Z = Symbol("vue-core.formGroup"), ee = Symbol("vue-core.formRowIndent"), te = Symbol("vue-core.formEditable"), R = () => N(Z, null), oe = () => N(ee, 0);
18
+ }, Z = Symbol("vue-core.formGroup"), ee = Symbol("vue-core.formRowIndent"), te = Symbol("vue-core.formEditable"), N = () => C(Z, null), oe = () => C(ee, 0);
19
19
  function le(n) {
20
- const e = R(), l = N(te, O(!0)), o = W(), g = d(() => !!e && !!n.disabled && (o.value || n.presentation === "value")), m = d(() => (n.editable ?? !0) && l.value && !g.value), s = d(() => !!e && !!n.disabled && m.value);
20
+ const e = N(), l = C(te, z(!0)), o = W(), g = d(() => !!e && !!n.disabled && (o.value || n.presentation === "value")), v = d(() => (n.editable ?? !0) && l.value && !g.value), s = d(() => !!e && !!n.disabled && v.value);
21
21
  if (e) {
22
- const f = e.registerLocked(d(() => !!n.disabled && l.value && n.presentation !== "value"));
23
- F(f);
22
+ const c = e.registerLocked(d(() => !!n.disabled && l.value && n.presentation !== "value"));
23
+ F(c);
24
24
  }
25
- return { editable: m, locked: s };
25
+ return { editable: v, locked: s };
26
26
  }
27
27
  const ae = ["label", "labelHidden", "hint", "error", "required", "editable", "disabled", "lockedReason", "presentation", "name"];
28
28
  function He(n) {
@@ -35,10 +35,10 @@ const re = {
35
35
  key: 0,
36
36
  class: "text-content-destructive",
37
37
  "aria-hidden": "true"
38
- }, ie = ["id"], de = {
38
+ }, ie = ["id"], de = ["data-stacked"], ue = {
39
39
  key: 0,
40
40
  class: "break-words text-body text-content-strong"
41
- }, ue = ["id"], ce = /* @__PURE__ */ A({
41
+ }, ce = ["id"], fe = /* @__PURE__ */ O({
42
42
  __name: "FormRow",
43
43
  props: {
44
44
  label: { default: void 0 },
@@ -54,79 +54,81 @@ const re = {
54
54
  errorId: { default: void 0 },
55
55
  indent: { default: 0 },
56
56
  labelLines: { default: void 0 },
57
- labelAlign: { default: "center" }
57
+ labelAlign: { default: "center" },
58
+ stackOnCompact: { type: Boolean, default: !1 }
58
59
  },
59
60
  setup(n) {
60
- const e = n, l = D(), o = oe(), g = d(() => o + e.indent), m = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], s = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, f = d(() => e.labelHidden && (e.layout === "entry" || e.layout === "value") ? "stacked" : e.layout), S = d(() => {
61
- switch (f.value) {
61
+ const e = n, l = A(), o = oe(), g = d(() => o + e.indent), v = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], s = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, c = d(() => e.labelHidden && (e.layout === "entry" || e.layout === "value") ? "stacked" : e.layout), S = d(() => {
62
+ switch (c.value) {
62
63
  case "entry":
63
64
  return "grid grid-cols-[var(--form-label-width,11rem)_minmax(0,1fr)] items-center gap-x-4 compact:grid-cols-[minmax(0,auto)_minmax(40%,1fr)]";
64
65
  case "value":
65
66
  return "grid grid-cols-[minmax(min-content,1fr)_minmax(0,auto)] items-center gap-x-4";
66
67
  case "setting":
67
- return "flex items-center gap-4";
68
+ return e.stackOnCompact ? "flex items-center gap-4 compact:flex-col compact:items-stretch compact:gap-1" : "flex items-center gap-4";
68
69
  default:
69
70
  return "flex flex-col gap-1";
70
71
  }
71
- }), p = d(() => e.labelHidden ? "sr-only" : f.value === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), w = d(() => e.value !== void 0 && e.value !== null && e.value !== "");
72
- return (y, x) => (r(), L(j(e.to ? t(Y) : "div"), {
72
+ }), p = d(() => e.labelHidden ? "sr-only" : c.value === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), _ = d(() => e.value !== void 0 && e.value !== null && e.value !== "");
73
+ return (y, x) => (r(), L(T(e.to ? t(Y) : "div"), {
73
74
  to: e.to,
74
75
  "data-test": "form-row",
75
- "data-layout": f.value,
76
+ "data-layout": c.value,
76
77
  "data-field-error": e.error ? "true" : void 0,
77
- class: b(["form-row flex min-w-0 items-stretch gap-3 transition-colors duration-motion-fast first:rounded-t-group last:rounded-b-group focus-within:bg-tint-soft/50 [&:first-child>.row-body]:border-t-0", [m[Math.min(g.value, 2)], e.to ? "hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus" : ""]])
78
+ class: b(["form-row flex min-w-0 items-stretch gap-3 transition-colors duration-motion-fast first:rounded-t-group last:rounded-b-group focus-within:bg-tint-soft/50 [&:first-child>.row-body]:border-t-0", [v[Math.min(g.value, 2)], e.to ? "hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus" : ""]])
78
79
  }, {
79
- default: _(() => [
80
+ default: w(() => [
80
81
  l.leading ? (r(), i("div", re, [
81
- c(y.$slots, "leading")
82
+ f(y.$slots, "leading")
82
83
  ])) : u("", !0),
83
- h("div", se, [
84
- h("div", {
84
+ k("div", se, [
85
+ k("div", {
85
86
  class: b(["min-w-0", S.value])
86
87
  }, [
87
88
  e.label || e.sub || l.sub ? (r(), i("div", {
88
89
  key: 0,
89
- class: b([e.labelHidden && !e.sub && !l.sub ? "contents" : f.value === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
90
+ class: b([e.labelHidden && !e.sub && !l.sub ? "contents" : c.value === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
90
91
  }, [
91
- h("div", {
92
+ k("div", {
92
93
  class: b(l["label-trailing"] ? "flex items-center justify-between gap-3" : "")
93
94
  }, [
94
- (r(), L(j(e.for ? "label" : "span"), {
95
+ (r(), L(T(e.for ? "label" : "span"), {
95
96
  for: e.for,
96
97
  class: b(["break-words", [p.value, e.labelHidden ? "" : e.labelLines ? s[e.labelLines] : "block"]])
97
98
  }, {
98
- default: _(() => [
99
- k(v(e.label), 1),
99
+ default: w(() => [
100
+ h(m(e.label), 1),
100
101
  e.required ? (r(), i("span", ne, " *")) : u("", !0)
101
102
  ]),
102
103
  _: 1
103
104
  }, 8, ["for", "class"])),
104
- c(y.$slots, "label-trailing")
105
+ f(y.$slots, "label-trailing")
105
106
  ], 2),
106
107
  e.sub || l.sub ? (r(), i("small", {
107
108
  key: 0,
108
109
  id: e.subId,
109
110
  class: "mt-0.5 block text-footnote text-content-muted"
110
111
  }, [
111
- c(y.$slots, "sub", {}, () => [
112
- k(v(e.sub), 1)
112
+ f(y.$slots, "sub", {}, () => [
113
+ h(m(e.sub), 1)
113
114
  ])
114
115
  ], 8, ie)) : u("", !0)
115
116
  ], 2)) : u("", !0),
116
- h("div", {
117
- class: b(["flex min-w-0 items-center gap-2", f.value === "value" ? "justify-end text-right" : f.value === "setting" ? "flex-wrap justify-end text-right" : f.value === "entry" ? "compact:justify-end" : ""])
117
+ k("div", {
118
+ class: b(["flex min-w-0 items-center gap-2", c.value === "value" ? "justify-end text-right" : c.value === "setting" ? ["flex-wrap justify-end text-right", e.stackOnCompact ? "compact:flex-col compact:items-start compact:text-left" : ""] : c.value === "entry" ? "compact:justify-end" : ""]),
119
+ "data-stacked": c.value === "setting" && e.stackOnCompact ? "compact" : void 0
118
120
  }, [
119
- c(y.$slots, "default", {}, () => [
120
- w.value ? (r(), i("span", de, v(e.value), 1)) : u("", !0)
121
+ f(y.$slots, "default", {}, () => [
122
+ _.value ? (r(), i("span", ue, m(e.value), 1)) : u("", !0)
121
123
  ]),
122
- c(y.$slots, "trailing"),
124
+ f(y.$slots, "trailing"),
123
125
  e.to ? (r(), L(t(B), {
124
126
  key: 0,
125
127
  name: "arrowRightSLine",
126
128
  size: 18,
127
129
  class: "shrink-0 text-content-disabled"
128
130
  })) : u("", !0)
129
- ], 2)
131
+ ], 10, de)
130
132
  ], 2),
131
133
  e.error ? (r(), i("p", {
132
134
  key: 0,
@@ -134,46 +136,46 @@ const re = {
134
136
  class: "mt-1 flex items-start gap-1.5 text-footnote text-content-destructive",
135
137
  role: "alert"
136
138
  }, [
137
- V(t(B), {
139
+ D(t(B), {
138
140
  name: "alertTriangle",
139
141
  size: 14,
140
142
  class: "mt-px shrink-0"
141
143
  }),
142
- k(" " + v(e.error), 1)
143
- ], 8, ue)) : u("", !0)
144
+ h(" " + m(e.error), 1)
145
+ ], 8, ce)) : u("", !0)
144
146
  ])
145
147
  ]),
146
148
  _: 3
147
149
  }, 8, ["to", "data-layout", "data-field-error", "class"]));
148
150
  }
149
- }), fe = ["title"], ve = {
151
+ }), me = ["title"], ve = {
150
152
  key: 0,
151
153
  class: "mr-1.5 inline-flex shrink-0 items-center align-middle",
152
154
  "data-test": "field-prefix"
153
- }, me = {
155
+ }, be = {
154
156
  key: 1,
155
157
  class: "mr-1"
156
- }, be = {
158
+ }, pe = {
157
159
  key: 2,
158
160
  class: "ml-1 text-content-muted"
159
- }, pe = {
161
+ }, ye = {
160
162
  key: 3,
161
163
  class: "block text-body text-content-disabled"
162
- }, ye = {
164
+ }, ge = {
163
165
  key: 0,
164
166
  class: "sr-only"
165
- }, ge = ["data-field-error"], xe = ["for"], he = {
167
+ }, xe = ["data-field-error"], ke = ["for"], he = {
166
168
  key: 0,
167
169
  class: "text-content-destructive",
168
170
  "aria-hidden": "true"
169
- }, ke = {
171
+ }, _e = {
170
172
  key: 1,
171
173
  class: "flex min-w-0 items-center gap-2"
172
- }, we = { class: "min-w-0 flex-1" }, _e = {
174
+ }, we = { class: "min-w-0 flex-1" }, $e = {
173
175
  key: 0,
174
176
  class: "mr-1.5 inline-flex shrink-0 items-center align-middle",
175
177
  "data-test": "field-prefix"
176
- }, $e = ["id"], Le = ["id"], Te = /* @__PURE__ */ A({
178
+ }, Le = ["id"], Se = ["id"], Te = /* @__PURE__ */ O({
177
179
  __name: "Field",
178
180
  props: /* @__PURE__ */ P({
179
181
  label: {},
@@ -194,79 +196,79 @@ const re = {
194
196
  rowLabelAlign: {}
195
197
  }, { ...X, value: void 0, prefix: void 0, suffix: void 0, valueStyle: void 0, rowLayout: "entry", rowLabelAlign: "center" }),
196
198
  setup(n) {
197
- const e = n, { t: l } = U(), o = D(), g = G(), m = R(), { editable: s, locked: f } = le(e), S = K(), p = d(() => e.name ?? S), w = d(() => `${p.value}-hint`), y = d(() => `${p.value}-error`);
198
- if (m?.registerField) {
199
- const a = g["data-field-key"], T = m.registerField(typeof a == "string" ? a : void 0, d(() => e.disabled));
200
- F(T);
199
+ const e = n, { t: l } = U(), o = A(), g = G(), v = N(), { editable: s, locked: c } = le(e), S = K(), p = d(() => e.name ?? S), _ = d(() => `${p.value}-hint`), y = d(() => `${p.value}-error`);
200
+ if (v?.registerField) {
201
+ const a = g["data-field-key"], H = v.registerField(typeof a == "string" ? a : void 0, d(() => e.disabled));
202
+ F(H);
201
203
  }
202
204
  const x = d(() => {
203
205
  const a = e.value;
204
206
  return a == null ? !1 : typeof a == "string" ? a.length > 0 : typeof a == "number" ? !Number.isNaN(a) : !0;
205
- }), E = d(() => typeof e.value == "boolean" ? e.value ? l("core.form.yes") : l("core.form.no") : e.value), z = d(() => !!m && !s.value && m.hideEmpty.value && !x.value && !o.readonly), q = d(() => [e.hint && s.value ? w.value : null, e.error ? y.value : null].filter(Boolean).join(" ") || void 0), $ = d(() => {
207
+ }), R = d(() => typeof e.value == "boolean" ? e.value ? l("core.form.yes") : l("core.form.no") : e.value), V = d(() => !!v && !s.value && v.hideEmpty.value && !x.value && !o.readonly), q = d(() => [e.hint && s.value ? _.value : null, e.error ? y.value : null].filter(Boolean).join(" ") || void 0), $ = d(() => {
206
208
  const a = s.value ? e.rowLayout : e.rowLayout === "stacked" ? "stacked" : "value";
207
209
  return e.labelHidden && (a === "entry" || a === "value") ? "stacked" : a;
208
- }), H = d(
209
- () => s.value && !f.value && e.required ? { "data-field-required": "true", "data-field-filled": x.value ? "true" : void 0 } : {}
210
+ }), E = d(
211
+ () => s.value && !c.value && e.required ? { "data-field-required": "true", "data-field-filled": x.value ? "true" : void 0 } : {}
210
212
  );
211
- return (a, T) => t(m) && !z.value ? (r(), L(ce, C({ key: 0 }, H.value, {
213
+ return (a, H) => t(v) && !V.value ? (r(), L(fe, j({ key: 0 }, E.value, {
212
214
  label: e.label,
213
215
  "label-hidden": e.labelHidden,
214
216
  for: t(s) ? p.value : void 0,
215
217
  sub: t(s) ? e.hint : void 0,
216
- "sub-id": w.value,
217
- required: t(s) && !t(f) && e.required,
218
+ "sub-id": _.value,
219
+ required: t(s) && !t(c) && e.required,
218
220
  layout: $.value,
219
221
  "label-align": $.value === "entry" ? e.rowLabelAlign : void 0,
220
222
  error: t(s) ? e.error : void 0,
221
223
  "error-id": y.value,
222
- "data-field-locked": t(f) ? "true" : void 0
224
+ "data-field-locked": t(c) ? "true" : void 0
223
225
  }), M({
224
- default: _(() => [
225
- h("div", {
226
+ default: w(() => [
227
+ k("div", {
226
228
  class: "relative w-full min-w-0",
227
- title: t(f) ? e.lockedReason : void 0
229
+ title: t(c) ? e.lockedReason : void 0
228
230
  }, [
229
- h("div", {
231
+ k("div", {
230
232
  class: b(t(s) ? $.value === "setting" ? "flex min-w-0 flex-col items-end" : $.value === "stacked" ? "flex min-w-0 flex-col items-stretch" : "flex min-w-0 flex-col items-start compact:items-end" : "")
231
233
  }, [
232
- t(s) ? c(a.$slots, "default", {
234
+ t(s) ? f(a.$slots, "default", {
233
235
  id: p.value,
234
236
  describedby: q.value,
235
237
  invalid: !!e.error,
236
238
  required: e.required,
237
239
  disabled: e.disabled
238
- }, void 0, void 0, 0) : t(o).readonly ? c(a.$slots, "readonly", {}, void 0, void 0, 1) : x.value ? (r(), i("span", {
240
+ }, void 0, void 0, 0) : t(o).readonly ? f(a.$slots, "readonly", {}, void 0, void 0, 1) : x.value ? (r(), i("span", {
239
241
  key: 2,
240
242
  class: b(["block break-words text-body text-content-strong", e.valueStyle === "mono" ? "font-mono" : e.valueStyle === "numeric" ? "tabular-nums" : ""])
241
243
  }, [
242
244
  t(o).prefix ? (r(), i("span", ve, [
243
- c(a.$slots, "prefix")
245
+ f(a.$slots, "prefix")
244
246
  ])) : u("", !0),
245
- e.prefix ? (r(), i("span", me, v(e.prefix), 1)) : u("", !0),
246
- k(v(E.value), 1),
247
- e.suffix ? (r(), i("span", be, v(e.suffix), 1)) : u("", !0)
248
- ], 2)) : (r(), i("span", pe, v(t(l)("core.state.no_value")), 1))
247
+ e.prefix ? (r(), i("span", be, m(e.prefix), 1)) : u("", !0),
248
+ h(m(R.value), 1),
249
+ e.suffix ? (r(), i("span", pe, m(e.suffix), 1)) : u("", !0)
250
+ ], 2)) : (r(), i("span", ye, m(t(l)("core.state.no_value")), 1))
249
251
  ], 2)
250
- ], 8, fe),
251
- t(f) && e.lockedReason ? (r(), i("span", ye, v(e.lockedReason), 1)) : u("", !0)
252
+ ], 8, me),
253
+ t(c) && e.lockedReason ? (r(), i("span", ge, m(e.lockedReason), 1)) : u("", !0)
252
254
  ]),
253
255
  _: 2
254
256
  }, [
255
257
  t(s) && t(o).trailing ? {
256
258
  name: "trailing",
257
- fn: _(() => [
258
- c(a.$slots, "trailing")
259
+ fn: w(() => [
260
+ f(a.$slots, "trailing")
259
261
  ]),
260
262
  key: "0"
261
263
  } : void 0,
262
264
  t(s) && t(o).labelTrailing ? {
263
265
  name: "label-trailing",
264
- fn: _(() => [
265
- c(a.$slots, "labelTrailing")
266
+ fn: w(() => [
267
+ f(a.$slots, "labelTrailing")
266
268
  ]),
267
269
  key: "1"
268
270
  } : void 0
269
- ]), 1040, ["label", "label-hidden", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(m) ? u("", !0) : (r(), i("div", C({ key: 1 }, H.value, {
271
+ ]), 1040, ["label", "label-hidden", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(v) ? u("", !0) : (r(), i("div", j({ key: 1 }, E.value, {
270
272
  "data-field-error": e.error ? "true" : void 0,
271
273
  class: "flex min-w-0 flex-col gap-1"
272
274
  }), [
@@ -279,14 +281,14 @@ const re = {
279
281
  for: t(s) ? p.value : void 0,
280
282
  class: b(e.labelHidden ? "sr-only" : "text-footnote font-medium text-content-muted")
281
283
  }, [
282
- k(v(e.label), 1),
284
+ h(m(e.label), 1),
283
285
  t(s) && e.required ? (r(), i("span", he, " *")) : u("", !0)
284
- ], 10, xe)) : u("", !0),
285
- t(s) ? c(a.$slots, "labelTrailing", {}, void 0, void 0, 1) : u("", !0)
286
+ ], 10, ke)) : u("", !0),
287
+ t(s) ? f(a.$slots, "labelTrailing", {}, void 0, void 0, 1) : u("", !0)
286
288
  ], 2)) : u("", !0),
287
- t(s) && t(o).trailing ? (r(), i("div", ke, [
288
- h("div", we, [
289
- c(a.$slots, "default", {
289
+ t(s) && t(o).trailing ? (r(), i("div", _e, [
290
+ k("div", we, [
291
+ f(a.$slots, "default", {
290
292
  id: p.value,
291
293
  describedby: q.value,
292
294
  invalid: !!e.error,
@@ -294,48 +296,48 @@ const re = {
294
296
  disabled: e.disabled
295
297
  })
296
298
  ]),
297
- c(a.$slots, "trailing")
298
- ])) : t(s) ? c(a.$slots, "default", {
299
+ f(a.$slots, "trailing")
300
+ ])) : t(s) ? f(a.$slots, "default", {
299
301
  id: p.value,
300
302
  describedby: q.value,
301
303
  invalid: !!e.error,
302
304
  required: e.required,
303
305
  disabled: e.disabled
304
- }, void 0, void 0, 2) : t(o).readonly ? c(a.$slots, "readonly", {}, void 0, void 0, 3) : (r(), i("span", {
306
+ }, void 0, void 0, 2) : t(o).readonly ? f(a.$slots, "readonly", {}, void 0, void 0, 3) : (r(), i("span", {
305
307
  key: 4,
306
308
  class: b(["text-body", x.value ? "text-content-strong" : "text-content-disabled"])
307
309
  }, [
308
- x.value && t(o).prefix ? (r(), i("span", _e, [
309
- c(a.$slots, "prefix")
310
+ x.value && t(o).prefix ? (r(), i("span", $e, [
311
+ f(a.$slots, "prefix")
310
312
  ])) : u("", !0),
311
- k(v(x.value ? `${e.prefix ?? ""}${E.value}${e.suffix ?? ""}` : t(l)("core.state.no_value")), 1)
313
+ h(m(x.value ? `${e.prefix ?? ""}${R.value}${e.suffix ?? ""}` : t(l)("core.state.no_value")), 1)
312
314
  ], 2)),
313
315
  e.hint && t(s) ? (r(), i("p", {
314
316
  key: 5,
315
- id: w.value,
317
+ id: _.value,
316
318
  class: "text-footnote text-content-muted"
317
- }, v(e.hint), 9, $e)) : u("", !0),
319
+ }, m(e.hint), 9, Le)) : u("", !0),
318
320
  e.error ? (r(), i("p", {
319
321
  key: 6,
320
322
  id: y.value,
321
323
  role: "alert",
322
324
  class: "flex items-start gap-1.5 text-footnote text-content-destructive"
323
325
  }, [
324
- V(t(B), {
326
+ D(t(B), {
325
327
  name: "alertTriangle",
326
328
  size: 14,
327
329
  class: "mt-px shrink-0"
328
330
  }),
329
- k(" " + v(e.error), 1)
330
- ], 8, Le)) : u("", !0)
331
- ], 16, ge));
331
+ h(" " + m(e.error), 1)
332
+ ], 8, Se)) : u("", !0)
333
+ ], 16, xe));
332
334
  }
333
- }), Se = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
335
+ }), qe = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
334
336
  function je(n, e) {
335
- const l = !!R();
336
- return d(() => l ? J({ kind: n, state: e() }) : [Se, ...Q(n, e()).map(([o]) => o)].join(" "));
337
+ const l = !!N();
338
+ return d(() => l ? J({ kind: n, state: e() }) : [qe, ...Q(n, e()).map(([o]) => o)].join(" "));
337
339
  }
338
- function Ce(n) {
340
+ function Fe(n) {
339
341
  const e = /* @__PURE__ */ new Map();
340
342
  for (const l of n) {
341
343
  const o = l.group ?? null, g = e.get(o) ?? [];
@@ -343,24 +345,24 @@ function Ce(n) {
343
345
  }
344
346
  return [...e.entries()].sort(([l], [o]) => l === null ? -1 : o === null ? 1 : 0).map(([l, o]) => ({ title: l, options: o }));
345
347
  }
346
- function Fe(n, e) {
348
+ function Oe(n, e) {
347
349
  const l = I(e.trim());
348
350
  return l === "" ? n : n.filter((o) => I(o.label).includes(l) || o.description !== void 0 && I(o.description).includes(l));
349
351
  }
350
352
  const I = (n) => n.normalize("NFD").replace(/[̀-ͯ]/g, "").toLocaleLowerCase();
351
353
  export {
352
354
  Te as _,
353
- R as a,
355
+ N as a,
354
356
  X as b,
355
357
  je as c,
356
358
  I as d,
357
359
  te as e,
358
360
  He as f,
359
- ce as g,
361
+ fe as g,
360
362
  Z as h,
361
- Ce as i,
363
+ Fe as i,
362
364
  ee as j,
363
365
  oe as k,
364
- Fe as m,
366
+ Oe as m,
365
367
  le as u
366
368
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as fe, useModel as me, useTemplateRef as F, ref as E, computed as g, watch as ne, nextTick as A, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as s, createVNode as M, toDisplayString as T, normalizeStyle as xe, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as we, withDirectives as _e, vModelText as ke, mergeModels as ae, inject as Ce, shallowRef as $e, onBeforeUnmount as De, createBlock as Me, mergeProps as Te, createSlots as Se, withCtx as ie, createTextVNode as Ne, renderSlot as Ie, mergeDefaults as Pe } from "vue";
2
2
  import { useI18n as pe } from "vue-i18n";
3
3
  import { b as Ve } from "../controlSurface-t7OEFESJ.js";
4
- import { d as se, a as Oe, c as Re, _ as Be, f as Ee, b as ze } from "../options-g8RwEhBk.js";
4
+ import { d as se, a as Oe, c as Re, _ as Be, f as Ee, b as ze } from "../options-Bu0XbEpN.js";
5
5
  import { _ as q } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
6
  import { _ as ue } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
7
7
  import { u as Fe } from "../anchored-DpuUwf-9.js";
@@ -1,5 +1,5 @@
1
1
  import { a, r as o } from "./http-CdQowFlW.js";
2
- import { i as r } from "./index-auJqVMWC.js";
2
+ import { i as r } from "./index-Ok29ucE3.js";
3
3
  const n = ["active", "locked", "inactive", "all"];
4
4
  function l(i) {
5
5
  return a({