@wssto2/vue-core 0.4.27 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-J5HoyGNJ.js → AccessGate.vue_vue_type_script_setup_true_lang-Nw1IsB8N.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-QPvYudWc.js → ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js} +1 -1
- package/dist/{Activity-xtkZq4vG.js → Activity-CoGI2_GL.js} +7 -7
- package/dist/{Changes-BPB8h56i.js → Changes-Cwfe6wbX.js} +6 -6
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CVEYkb26.js → CollectionPage.vue_vue_type_script_setup_true_lang-CtvHtFLy.js} +5 -5
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DcQQ-uQS.js → DataTable.vue_vue_type_script_setup_true_lang-BEvz5zqo.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js → DateField.vue_vue_type_script_setup_true_lang-DRuWzSaX.js} +1 -1
- package/dist/{DeadLetters-DeYxkTMh.js → DeadLetters-DyA5Dqn0.js} +7 -7
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js → FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js → FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js} +2 -2
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js → FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js} +2 -2
- package/dist/{General-BLbn4BCc.js → General-DTEfxWls.js} +10 -10
- package/dist/MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js +28 -0
- package/dist/{NewRolePage-B7DwFWPk.js → NewRolePage-CRZoUajV.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js → NumberField.vue_vue_type_script_setup_true_lang-ButMV_sf.js} +1 -1
- package/dist/ProfilePage-DLY81mvN.js +764 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-gXbxXG2R.js +325 -0
- package/dist/RolePage-B9t586Q8.js +314 -0
- package/dist/{RolesPage-B5RwSZ89.js → RolesPage-BRdG-OSL.js} +6 -6
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dmv6TpCi.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Cy9Oi0ts.js} +1 -1
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js → SegmentedField.vue_vue_type_script_setup_true_lang-BwyMvkis.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js → SelectField.vue_vue_type_script_setup_true_lang-BzQC1qDQ.js} +11 -12
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-DhoTd5D7.js +133 -0
- package/dist/{Sessions-wEdUsK-U.js → Sessions-vGyUOnPG.js} +5 -5
- package/dist/SettingsPage-V8WeADZZ.js +632 -0
- package/dist/{SignIn-CK9rq8LQ.js → SignIn-C-3i8RG6.js} +7 -7
- package/dist/{SignInPage-BORsM1g4.js → SignInPage-D2NA3VKU.js} +4 -4
- package/dist/SignIns-eoYPB6kB.js +121 -0
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-ALvJisiP.js → SwitchField.vue_vue_type_script_setup_true_lang-D_-HACqT.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js → TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js → TextareaField.vue_vue_type_script_setup_true_lang-DsjK2C9T.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js → TimeField.vue_vue_type_script_setup_true_lang-Cz7KhUqt.js} +1 -1
- package/dist/Timestamp.vue_vue_type_script_setup_true_lang-CutyQkJb.js +52 -0
- package/dist/{UserRecord-C1SzdpKu.js → UserRecord-BaQl2zzQ.js} +13 -13
- package/dist/{UsersList-B3hc683r.js → UsersList-BfXWgH5K.js} +9 -9
- package/dist/access/RoleCompareDialog.vue.d.ts +1 -1
- package/dist/access/RoleEditor.vue.d.ts +2 -0
- package/dist/access/constraints.d.ts +28 -0
- package/dist/access/context.d.ts +5 -0
- package/dist/access/feature.d.ts +17 -0
- package/dist/access/index.d.ts +3 -1
- package/dist/access/index.js +11 -9
- package/dist/access/refusals.d.ts +20 -2
- package/dist/app/index.js +6 -6
- package/dist/client/index.js +19 -11
- package/dist/{client-k9euDWF4.js → client-BHPFfBj3.js} +20 -20
- package/dist/collection/index.js +5 -5
- package/dist/content/Timestamp.vue.d.ts +3 -2
- package/dist/content/index.js +66 -37
- package/dist/{contributions-BVBZP5Jb.js → contributions-DVQPcjJz.js} +1 -1
- package/dist/{describeError-B-NMa--w.js → describeError-BqGAUZgX.js} +1 -1
- package/dist/{error-CD7x0Jrz.js → error-Bb_dr_Ay.js} +2 -2
- package/dist/{fieldMessages-6HVzSDqG.js → fieldMessages-DTXpWnBd.js} +7 -7
- package/dist/form/index.js +1235 -1412
- package/dist/{guards-BJZjc3FZ.js → guards-DRh4zmxO.js} +1 -1
- package/dist/{http-BFfkA7gN.js → http-D_pBg22D.js} +1 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +30 -30
- package/dist/identity/index.d.ts +2 -0
- package/dist/identity/index.js +8 -6
- package/dist/identity/profile/DetailsFields.vue.d.ts +8 -0
- package/dist/identity/profile/{DetailsPanel.vue.d.ts → DetailsGroup.vue.d.ts} +4 -1
- package/dist/identity/profile/{EmailPanel.vue.d.ts → EmailGroup.vue.d.ts} +1 -1
- package/dist/identity/profile/SignInsGroup.vue.d.ts +2 -0
- package/dist/identity/profile/profileSections.d.ts +37 -0
- package/dist/identity/shared/SignInList.vue.d.ts +22 -0
- package/dist/identity/shared/deviceLabel.d.ts +7 -0
- package/dist/identity/useReturnToOwnAccount.d.ts +10 -0
- package/dist/identity/users/context.d.ts +3 -0
- package/dist/identity/users/feature.d.ts +3 -0
- package/dist/index-WkbzC_ee.js +745 -0
- package/dist/index-g-qbUeTk.js +630 -0
- package/dist/index-kqk7Mclb.js +480 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/notification/entities.d.ts +19 -0
- package/dist/modules/notification/routes.d.ts +25 -1
- package/dist/modules/notification/schemas.d.ts +24 -0
- package/dist/{navigation-DpcDF0rX.js → navigation-DuQwti76.js} +1 -1
- package/dist/{neighbors-RVQ4O3Qv.js → neighbors-IMRQ4rkm.js} +22 -22
- package/dist/notifications/context.d.ts +24 -1
- package/dist/notifications/feature.d.ts +10 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/push/DevicesSection.vue.d.ts +12 -0
- package/dist/notifications/push/ThisDeviceSection.vue.d.ts +15 -0
- package/dist/notifications/push/browser.d.ts +40 -0
- package/dist/notifications/push/devices.d.ts +15 -0
- package/dist/notifications/push/thisDevice.d.ts +28 -0
- package/dist/notifications/settings/ChannelsSection.vue.d.ts +16 -0
- package/dist/notifications/settings/{QuietHoursPanel.vue.d.ts → QuietHoursSection.vue.d.ts} +3 -1
- package/dist/notifications/settings/SettingsBody.vue.d.ts +17 -0
- package/dist/notifications/settings/settings.d.ts +4 -3
- package/dist/notifications/settings/state.d.ts +4 -2
- package/dist/options-g8RwEhBk.js +366 -0
- package/dist/overlay/MenuButton.vue.d.ts +3 -2
- package/dist/overlay/index.js +37 -59
- package/dist/page/index.js +1 -1
- package/dist/phone/index.js +10 -11
- package/dist/platform/index.js +3 -3
- package/dist/{platform-PZpUkkMS.js → platform-Dl1fbScN.js} +2 -2
- package/dist/push-worker/index.d.ts +91 -0
- package/dist/push-worker/index.js +54 -0
- package/dist/resource/index.js +1 -1
- package/dist/{routeResource-DlTsGTg_.js → routeResource-CcYA75T2.js} +2 -2
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-Dh749umr.js → rowLayout-BBFyLbOl.js} +1 -1
- package/dist/{sections-CeZl-Jxg.js → sections-D5rgQ4YB.js} +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/signInEvents-DWShrJox.js +30 -0
- package/dist/state/index.js +1 -1
- package/dist/{status-D9iQJJiz.js → status-C2gHqkj6.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-DHJFKB26.js → suggestions-CfFTHi8y.js} +2 -2
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-Cj-APj-P.js → useCommand-CtqheKUv.js} +2 -2
- package/dist/useGroupSheet-ATvc0IiM.js +278 -0
- package/dist/{useLoad-M7V-AVwR.js → useLoad-W4tfxmm5.js} +1 -1
- package/dist/{useResourceForm-tGYTfKhH.js → useResourceForm-CJfl8rj_.js} +1 -1
- package/package.json +6 -2
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +0 -35
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +0 -95
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +0 -46
- package/dist/ProfilePage-CQYHj9Ns.js +0 -654
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DRHmjA9w.js +0 -300
- package/dist/RolePage-ODFu68Ce.js +0 -315
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js +0 -111
- package/dist/SettingsPage-BVrMihx0.js +0 -255
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-AakWNvaM.js +0 -79
- package/dist/SignIns-C-8kVf7I.js +0 -66
- package/dist/Timestamp.vue_vue_type_script_setup_true_lang-DRmzPDOP.js +0 -51
- package/dist/control-B4SdblL6.js +0 -350
- package/dist/identity/profile/PanelActions.vue.d.ts +0 -17
- package/dist/index-C3E6DcO0.js +0 -706
- package/dist/index-LP6NNnow.js +0 -459
- package/dist/index-qUaGJ9j2.js +0 -504
- package/dist/notifications/settings/EmailPanel.vue.d.ts +0 -14
- package/dist/options-Ba_0uLWN.js +0 -18
- package/dist/route-goWMxDUN.js +0 -13
- package/dist/transport-BnP7WC0Y.js +0 -4
- /package/dist/identity/{profile/PasswordPanel.vue.d.ts → ReturnMenuItem.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SessionsPanel.vue.d.ts → PasswordGroup.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SignInsPanel.vue.d.ts → SessionsGroup.vue.d.ts} +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent as y, computed as k, openBlock as _, createElementBlock as b, createVNode as r, unref as t, withCtx as l, createElementVNode as u, toDisplayString as d, createTextVNode as $, ref as v, watch as w, createBlock as I, createCommentVNode as S } from "vue";
|
|
2
|
+
import { useI18n as h } from "vue-i18n";
|
|
3
|
+
import { P as V, i as N } from "./index-kqk7Mclb.js";
|
|
4
|
+
import { u as B } from "./platform-Dl1fbScN.js";
|
|
5
|
+
import { b as E } from "./routeResource-CcYA75T2.js";
|
|
6
|
+
import { _ as R } from "./AsyncSection.vue_vue_type_script_setup_true_lang-B0NfvG3B.js";
|
|
7
|
+
import { u as C } from "./useLoad-W4tfxmm5.js";
|
|
8
|
+
import { _ as P } from "./PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js";
|
|
9
|
+
import { _ as L } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
10
|
+
import { _ as T } from "./DataTable.vue_vue_type_script_setup_true_lang-BEvz5zqo.js";
|
|
11
|
+
import { _ as U } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
12
|
+
import { d as q, s as D, a as G } from "./signInEvents-DWShrJox.js";
|
|
13
|
+
import { _ as K } from "./ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js";
|
|
14
|
+
const O = {
|
|
15
|
+
class: "overflow-hidden rounded-group bg-surface-cell shadow-group",
|
|
16
|
+
"data-signin-table": ""
|
|
17
|
+
}, W = ["title"], j = { class: "font-mono text-footnote" }, z = {
|
|
18
|
+
class: "px-4 py-8 text-center text-body text-content-muted",
|
|
19
|
+
"data-signin-empty": ""
|
|
20
|
+
}, A = /* @__PURE__ */ y({
|
|
21
|
+
__name: "SignInTable",
|
|
22
|
+
props: {
|
|
23
|
+
rows: {},
|
|
24
|
+
loading: { type: Boolean }
|
|
25
|
+
},
|
|
26
|
+
setup(f) {
|
|
27
|
+
const m = f, { t: o } = h(), p = k(() => [
|
|
28
|
+
{ key: "created_at", label: o("core.account.signins.columns.time"), kind: "timestamp", width: 170, mobile: "meta" },
|
|
29
|
+
{ key: "event", label: o("core.account.signins.columns.event"), mobile: "primary" },
|
|
30
|
+
{ key: "device", label: o("core.account.signins.columns.device"), hideBelow: "md", width: 320, mobile: "hidden" },
|
|
31
|
+
{ key: "ip", label: o("core.account.signins.columns.ip"), hideBelow: "md", width: 140, mobile: "hidden" }
|
|
32
|
+
]), c = (n) => o(G(n.event, n.actor?.name || null), { name: n.actor?.name ?? "" });
|
|
33
|
+
return (n, i) => (_(), b("div", O, [
|
|
34
|
+
r(t(T), {
|
|
35
|
+
rows: m.rows,
|
|
36
|
+
columns: p.value,
|
|
37
|
+
"row-key": (e) => e.id,
|
|
38
|
+
loading: m.loading
|
|
39
|
+
}, {
|
|
40
|
+
"cell-event": l(({ item: e }) => [
|
|
41
|
+
r(t(U), {
|
|
42
|
+
tone: t(D)(e.event).tone,
|
|
43
|
+
"data-event": e.event
|
|
44
|
+
}, {
|
|
45
|
+
default: l(() => [
|
|
46
|
+
$(d(c(e)), 1)
|
|
47
|
+
]),
|
|
48
|
+
_: 2
|
|
49
|
+
}, 1032, ["tone", "data-event"])
|
|
50
|
+
]),
|
|
51
|
+
"cell-device": l(({ item: e }) => [
|
|
52
|
+
u("span", {
|
|
53
|
+
class: "block truncate",
|
|
54
|
+
title: e.device
|
|
55
|
+
}, d(t(q)(e.device) || "—"), 9, W)
|
|
56
|
+
]),
|
|
57
|
+
"cell-ip": l(({ item: e }) => [
|
|
58
|
+
u("span", j, d(e.ip || "—"), 1)
|
|
59
|
+
]),
|
|
60
|
+
empty: l(() => [
|
|
61
|
+
u("p", z, d(t(o)("core.account.signins.empty")), 1)
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["rows", "columns", "row-key", "loading"])
|
|
65
|
+
]));
|
|
66
|
+
}
|
|
67
|
+
}), F = {
|
|
68
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
69
|
+
"data-person-signins": ""
|
|
70
|
+
}, H = { class: "px-row-inset text-footnote text-content-muted" }, le = /* @__PURE__ */ y({
|
|
71
|
+
__name: "SignIns",
|
|
72
|
+
setup(f) {
|
|
73
|
+
const m = ["all", "failed"], { t: o } = h(), { http: p } = B(), c = E(V), n = v("all"), i = v(1), e = C(
|
|
74
|
+
async ({ signal: g }) => {
|
|
75
|
+
const s = c.id.value;
|
|
76
|
+
return s === null ? null : (await p.request(N.usersSignins, { id: s, view: n.value, page: i.value, per_page: 20 }, { signal: g })).data;
|
|
77
|
+
},
|
|
78
|
+
{ watch: () => c.id.value }
|
|
79
|
+
);
|
|
80
|
+
return w(n, () => {
|
|
81
|
+
i.value = 1, e.reload();
|
|
82
|
+
}), w(i, () => void e.reload()), (g, s) => (_(), b("div", F, [
|
|
83
|
+
r(L, {
|
|
84
|
+
title: t(o)("core.users.sections.signins"),
|
|
85
|
+
description: t(o)("core.users.intro.signins", { name: t(c).data.value?.name ?? "" })
|
|
86
|
+
}, null, 8, ["title", "description"]),
|
|
87
|
+
r(K, {
|
|
88
|
+
modelValue: n.value,
|
|
89
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => n.value = a),
|
|
90
|
+
views: m,
|
|
91
|
+
counts: t(e).data.value?.meta?.views,
|
|
92
|
+
"label-of": (a) => t(o)(`core.account.signins.views.${a}`),
|
|
93
|
+
label: t(o)("core.users.sections.signins")
|
|
94
|
+
}, null, 8, ["modelValue", "counts", "label-of", "label"]),
|
|
95
|
+
r(t(R), {
|
|
96
|
+
state: t(e).state.value,
|
|
97
|
+
"skeleton-rows": 5,
|
|
98
|
+
"is-empty": () => !1,
|
|
99
|
+
onRetry: s[2] || (s[2] = (a) => t(e).reload())
|
|
100
|
+
}, {
|
|
101
|
+
default: l(({ value: a }) => [
|
|
102
|
+
r(A, {
|
|
103
|
+
rows: a?.data ?? []
|
|
104
|
+
}, null, 8, ["rows"]),
|
|
105
|
+
a ? (_(), I(P, {
|
|
106
|
+
key: 0,
|
|
107
|
+
page: i.value,
|
|
108
|
+
"onUpdate:page": s[1] || (s[1] = (x) => i.value = x),
|
|
109
|
+
"last-page": a.last_page,
|
|
110
|
+
total: a.total
|
|
111
|
+
}, null, 8, ["page", "last-page", "total"])) : S("", !0),
|
|
112
|
+
u("p", H, d(t(o)("core.account.signins.footer_user")), 1)
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 8, ["state"])
|
|
116
|
+
]));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
le as default
|
|
121
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as v, useModel as w, computed as y, openBlock as g, createBlock as k, mergeProps as _, unref as t, createSlots as $, withCtx as l, createElementVNode as s, renderSlot as i, normalizeClass as d, normalizeStyle as B, toDisplayString as S, mergeModels as z, mergeDefaults as C } from "vue";
|
|
2
2
|
import { useI18n as M } from "vue-i18n";
|
|
3
|
-
import { u as V, _ as D, f as T, b as E } from "./
|
|
3
|
+
import { u as V, _ as D, f as T, b as E } from "./options-g8RwEhBk.js";
|
|
4
4
|
const F = { class: "flex items-center gap-2" }, I = ["id", "aria-checked", "aria-label", "aria-describedby", "aria-invalid", "disabled"], P = { class: "sr-only" }, Z = /* @__PURE__ */ v({
|
|
5
5
|
__name: "SwitchField",
|
|
6
6
|
props: /* @__PURE__ */ z(/* @__PURE__ */ C({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as K, useTemplateRef as N, computed as v, watch as te, nextTick as oe, openBlock as n, createElementBlock as l, withModifiers as se, normalizeStyle as ne, unref as i, createElementVNode as m, toDisplayString as r, createCommentVNode as p, Fragment as R, renderList as ae, normalizeClass as B, createBlock as P, renderSlot as b, createTextVNode as E, useModel as ie, ref as le, mergeProps as re, createSlots as ce, withCtx as w, withDirectives as de, vModelDynamic as ue, mergeModels as H, mergeDefaults as pe } from "vue";
|
|
2
2
|
import { useI18n as G } from "vue-i18n";
|
|
3
3
|
import { b as me } from "./controlSurface-t7OEFESJ.js";
|
|
4
|
-
import { a as fe, c as he, _ as ve, f as ge, b as ye } from "./
|
|
4
|
+
import { a as fe, c as he, _ as ve, f as ge, b as ye } from "./options-g8RwEhBk.js";
|
|
5
5
|
import { _ as xe } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
6
|
import { u as be, N as ke } from "./anchored-DpuUwf-9.js";
|
|
7
|
-
import { l as U, m as _e, u as we, c as $e } from "./suggestions-
|
|
7
|
+
import { l as U, m as _e, u as we, c as $e } from "./suggestions-CfFTHi8y.js";
|
|
8
8
|
const Me = ["id", "aria-busy"], qe = { class: "min-h-0 flex-1 overflow-y-auto p-1.5" }, Be = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "px-2.5 pb-1 pt-1.5 text-caption font-semibold uppercase text-content-disabled",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as V, useModel as L, useTemplateRef as M, computed as i, openBlock as p, createBlock as D, mergeProps as F, unref as f, createSlots as S, withCtx as n, createElementVNode as v, normalizeClass as b, withDirectives as z, vModelText as E, createElementBlock as P, toDisplayString as R, createCommentVNode as N, renderSlot as d, mergeModels as y, mergeDefaults as _ } from "vue";
|
|
2
2
|
import { u as j } from "./mediaQuery-CygcXmFW.js";
|
|
3
|
-
import { a as G, u as H, c as U, _ as A, f as I, b as J } from "./
|
|
3
|
+
import { a as G, u as H, c as U, _ as A, f as I, b as J } from "./options-g8RwEhBk.js";
|
|
4
4
|
const K = ["id", "name", "rows", "placeholder", "maxlength", "autocomplete", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], O = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mt-1 self-end text-footnote tabular-nums text-content-muted"
|
|
@@ -5,7 +5,7 @@ import { u as oe } from "./format-D8X4zsx6.js";
|
|
|
5
5
|
import { _ as le } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
6
|
import { u as ae } from "./mediaQuery-CygcXmFW.js";
|
|
7
7
|
import { _ as re } from "./Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
|
|
8
|
-
import { c as se, _ as ie, f as ne, b as ue } from "./
|
|
8
|
+
import { c as se, _ as ie, f as ne, b as ue } from "./options-g8RwEhBk.js";
|
|
9
9
|
import { d as me, r as de, t as I, p as ce, u as pe, a as fe, i as Q, _ as ve, b as be, c as ye } from "./useTypedEntry-C7k7Dyl-.js";
|
|
10
10
|
function ke(s) {
|
|
11
11
|
const { t: i } = R(), y = m(() => [i("core.form.time.words.now").toLowerCase(), "now"]);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as x, computed as s, openBlock as n, createElementBlock as o, createVNode as m, createElementVNode as l, toDisplayString as a, unref as u, createTextVNode as f } from "vue";
|
|
2
|
+
import { useI18n as v } from "vue-i18n";
|
|
3
|
+
import { u as h, t as g } from "./format-D8X4zsx6.js";
|
|
4
|
+
import { _ as w } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
5
|
+
import { _ as y } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
|
+
const k = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "inline-grid max-w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 text-xs",
|
|
9
|
+
"data-timestamp-author": ""
|
|
10
|
+
}, T = { class: "min-w-0 truncate text-content" }, V = ["datetime"], E = ["datetime"], I = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "text-xs text-content-muted"
|
|
13
|
+
}, z = /* @__PURE__ */ x({
|
|
14
|
+
__name: "Timestamp",
|
|
15
|
+
props: {
|
|
16
|
+
value: { default: void 0 },
|
|
17
|
+
precision: { default: "dateTime" },
|
|
18
|
+
author: { default: null }
|
|
19
|
+
},
|
|
20
|
+
setup(d) {
|
|
21
|
+
const p = /^\d{4}-\d{2}-\d{2}$/, t = d, { t: _ } = v(), r = h(), e = s(() => g(t.value)), i = s(() => {
|
|
22
|
+
if (e.value)
|
|
23
|
+
return typeof t.value == "string" && p.test(t.value) ? t.value : e.value.toISOString();
|
|
24
|
+
}), c = s(() => t.precision === "date" ? r.date(e.value) : r.dateTime(e.value));
|
|
25
|
+
return (D, N) => e.value && t.author ? (n(), o("span", k, [
|
|
26
|
+
m(y, {
|
|
27
|
+
name: t.author.name,
|
|
28
|
+
src: t.author.avatarUrl,
|
|
29
|
+
size: "xs",
|
|
30
|
+
class: "row-span-2"
|
|
31
|
+
}, null, 8, ["name", "src"]),
|
|
32
|
+
l("span", T, a(t.author.name), 1),
|
|
33
|
+
l("time", {
|
|
34
|
+
datetime: i.value,
|
|
35
|
+
class: "whitespace-nowrap text-content-muted"
|
|
36
|
+
}, a(c.value), 9, V)
|
|
37
|
+
])) : e.value ? (n(), o("time", {
|
|
38
|
+
key: 1,
|
|
39
|
+
datetime: i.value,
|
|
40
|
+
class: "inline-flex items-center gap-2 text-xs text-content"
|
|
41
|
+
}, [
|
|
42
|
+
m(u(w), {
|
|
43
|
+
name: "calendarEventFill",
|
|
44
|
+
class: "text-content-muted"
|
|
45
|
+
}),
|
|
46
|
+
f(a(c.value), 1)
|
|
47
|
+
], 8, E)) : (n(), o("span", I, a(u(_)("core.state.empty")), 1));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
z as _
|
|
52
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { defineComponent as R, openBlock as q, createBlock as P, unref as e, withCtx as u, createVNode as t, mergeProps as L, provide as N, computed as g, useTemplateRef as $, createElementVNode as x, toDisplayString as C, createTextVNode as j } from "vue";
|
|
2
2
|
import { useI18n as A } from "vue-i18n";
|
|
3
|
-
import { a as F } from "./neighbors-
|
|
3
|
+
import { a as F } from "./neighbors-IMRQ4rkm.js";
|
|
4
4
|
import { _ as H } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
5
|
-
import { u as J } from "./describeError-
|
|
6
|
-
import { i as w, P as Q, p as W, f as X, M as Y, g as Z, d as ee } from "./index-
|
|
5
|
+
import { u as J } from "./describeError-BqGAUZgX.js";
|
|
6
|
+
import { i as w, P as Q, p as W, f as X, M as Y, g as Z, d as ee } from "./index-kqk7Mclb.js";
|
|
7
7
|
import { _ as se } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
8
8
|
import { t as k } from "./toast-CqSDTWRX.js";
|
|
9
|
-
import { _ as ae } from "./SectionNavigator.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as E } from "./platform-
|
|
11
|
-
import { a as te } from "./routeResource-
|
|
9
|
+
import { _ as ae } from "./SectionNavigator.vue_vue_type_script_setup_true_lang-Cy9Oi0ts.js";
|
|
10
|
+
import { u as E } from "./platform-Dl1fbScN.js";
|
|
11
|
+
import { a as te } from "./routeResource-CcYA75T2.js";
|
|
12
12
|
import { a as oe } from "./ResourcePage.vue_vue_type_script_setup_true_lang-BFBGvevP.js";
|
|
13
13
|
import { A as re } from "./access-DmAceEo5.js";
|
|
14
14
|
import { _ as ne } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
15
|
-
import { u as ie } from "./useLoad-
|
|
15
|
+
import { u as ie } from "./useLoad-W4tfxmm5.js";
|
|
16
16
|
import { _ as V } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
|
|
17
|
-
import { _ as T } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import {
|
|
19
|
-
import { u as z, _ as K } from "./useCommand-
|
|
20
|
-
import { u as U } from "./fieldMessages-
|
|
21
|
-
import { u as ce, s as le } from "./status-
|
|
22
|
-
import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { _ as T } from "./FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js";
|
|
18
|
+
import { g as B } from "./options-g8RwEhBk.js";
|
|
19
|
+
import { u as z, _ as K } from "./useCommand-CtqheKUv.js";
|
|
20
|
+
import { u as U } from "./fieldMessages-DTXpWnBd.js";
|
|
21
|
+
import { u as ce, s as le } from "./status-C2gHqkj6.js";
|
|
22
|
+
import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js";
|
|
23
23
|
const ue = /* @__PURE__ */ R({
|
|
24
24
|
__name: "DeactivateDialog",
|
|
25
25
|
props: {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineComponent as U, openBlock as p, createBlock as C, unref as e, withCtx as c, createVNode as r, mergeProps as i, useTemplateRef as V, computed as q, createTextVNode as z, toDisplayString as $, createCommentVNode as A, createElementBlock as S, normalizeClass as N } from "vue";
|
|
2
2
|
import { useI18n as B } from "vue-i18n";
|
|
3
3
|
import { useRouter as M } from "vue-router";
|
|
4
|
-
import { u as P, _ as D } from "./CollectionPage.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as P, _ as D } from "./CollectionPage.vue_vue_type_script_setup_true_lang-CtvHtFLy.js";
|
|
5
5
|
import { _ as I } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
6
|
import { u as F } from "./format-D8X4zsx6.js";
|
|
7
|
-
import { u as L } from "./platform-
|
|
7
|
+
import { u as L } from "./platform-Dl1fbScN.js";
|
|
8
8
|
import { _ as G } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
9
|
-
import { i as K, f as E, M as W } from "./index-
|
|
10
|
-
import { U as j, u as H, s as J } from "./status-
|
|
9
|
+
import { i as K, f as E, M as W } from "./index-kqk7Mclb.js";
|
|
10
|
+
import { U as j, u as H, s as J } from "./status-C2gHqkj6.js";
|
|
11
11
|
import { u as O } from "./environment-Dva-SG8D.js";
|
|
12
12
|
import { u as Q } from "./languages-BShG9LpE.js";
|
|
13
|
-
import { _ as X } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { _ as Y } from "./SelectField.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as d } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { u as Z, _ as ee } from "./useCommand-
|
|
13
|
+
import { _ as X } from "./FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js";
|
|
14
|
+
import { _ as Y } from "./SelectField.vue_vue_type_script_setup_true_lang-BzQC1qDQ.js";
|
|
15
|
+
import { _ as d } from "./TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js";
|
|
16
|
+
import { u as Z, _ as ee } from "./useCommand-CtqheKUv.js";
|
|
17
17
|
import { t as se } from "./toast-CqSDTWRX.js";
|
|
18
|
-
import { u as te } from "./fieldMessages-
|
|
18
|
+
import { u as te } from "./fieldMessages-DTXpWnBd.js";
|
|
19
19
|
const oe = /* @__PURE__ */ U({
|
|
20
20
|
__name: "NewUserDialog",
|
|
21
21
|
emits: ["created"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Role, RoleSummary } from "../modules/access/entities";
|
|
2
2
|
/**
|
|
3
|
-
* *Compare with
|
|
3
|
+
* *Compare with another role* (any the actor may view, the standard ones too): what a custom role holds that the other does not, what it lacks, and where the whose
|
|
4
4
|
* differs. The way to see how far a copy has drifted before replacing it.
|
|
5
5
|
*/
|
|
6
6
|
type __VLS_Props = {
|
|
@@ -15,6 +15,8 @@ interface Draft {
|
|
|
15
15
|
name: string;
|
|
16
16
|
description: string;
|
|
17
17
|
grants: Grants;
|
|
18
|
+
/** The choice of each of the application's constraints on the role, "" for none. */
|
|
19
|
+
constraints: Record<string, string>;
|
|
18
20
|
}
|
|
19
21
|
declare function save(): Promise<void>;
|
|
20
22
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Constraint } from "../modules/access/entities";
|
|
2
|
+
/** One option of a role constraint. */
|
|
3
|
+
export interface RoleConstraintOption {
|
|
4
|
+
/** What is stored in the role's `attrs` for it. */
|
|
5
|
+
readonly value: string;
|
|
6
|
+
/** i18n key of its label. */
|
|
7
|
+
readonly labelKey: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A constraint the application puts on a role (go-core's `attrs`: attribute key -> values), edited as one choice among `options`
|
|
11
|
+
* (the vehicle kinds a role may work with: new only, used only) or none, which leaves the key out of `attrs` ("allows all").
|
|
12
|
+
*/
|
|
13
|
+
export interface RoleConstraint {
|
|
14
|
+
/** The attribute key the permissions declare (`authz.Attributes("vehicle_kind")`). */
|
|
15
|
+
readonly attribute: string;
|
|
16
|
+
/** i18n key of the field's label. */
|
|
17
|
+
readonly labelKey: string;
|
|
18
|
+
readonly options: readonly RoleConstraintOption[];
|
|
19
|
+
/** i18n key of the choice for no constraint; by default `core.access.constraints.any` ("All"). */
|
|
20
|
+
readonly anyLabelKey?: string;
|
|
21
|
+
}
|
|
22
|
+
/** The chosen option of each constraint, "" for none; a stored value list that is not exactly one value reads as none. */
|
|
23
|
+
export declare function constraintChoices(constraints: readonly RoleConstraint[], attrs: readonly Constraint[]): Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* The `attrs` to save: what the role holds for attributes this editor does not manage stays as it is, and so does a managed one
|
|
26
|
+
* the person left alone (a stored list the choice cannot show is not lost by saving something else); a changed choice replaces it.
|
|
27
|
+
*/
|
|
28
|
+
export declare function constraintAttrs(constraints: readonly RoleConstraint[], stored: readonly Constraint[], loaded: Record<string, string>, chosen: Record<string, string>): Constraint[];
|
package/dist/access/context.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { RouteLocationRaw } from "vue-router";
|
|
2
2
|
import type { ScopeOptions, SubjectRef } from "../modules/access/entities";
|
|
3
3
|
import type { PermissionCatalogue } from "./catalogue";
|
|
4
|
+
import type { RoleConstraint } from "./constraints";
|
|
4
5
|
/** What the access screens need from the feature that installed them. */
|
|
5
6
|
export interface AccessContext {
|
|
6
7
|
readonly catalogue: PermissionCatalogue;
|
|
7
8
|
/** Where a holder's name leads (their record), or null for a name that is not a link. */
|
|
8
9
|
readonly subjectRoute: (subject: SubjectRef) => RouteLocationRaw | null;
|
|
9
10
|
/** The places `subject` may be given roles at; by default what the server says (`GET /v1/iam/users/:id/scopes`). */
|
|
11
|
+
/** The application's constraints on a role, edited next to its name and kept in its `attrs`. */
|
|
12
|
+
readonly constraints: readonly RoleConstraint[];
|
|
13
|
+
/** The i18n key of the sentence for each of the application's own role-problem codes (`authz.invalid`). */
|
|
14
|
+
readonly problems: Readonly<Record<string, string>>;
|
|
10
15
|
readonly scopes: ((subject: SubjectRef, signal: AbortSignal) => Promise<ScopeOptions>) | null;
|
|
11
16
|
}
|
|
12
17
|
export declare const accessContextKey: import("vue").InjectionKey<AccessContext>, useAccessContext: () => AccessContext;
|
package/dist/access/feature.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type Feature } from "../app";
|
|
|
3
3
|
import type { ScopeOptions, SubjectRef } from "../modules/access/entities";
|
|
4
4
|
import type { Destination } from "../router";
|
|
5
5
|
import type { PermissionCatalogue } from "./catalogue";
|
|
6
|
+
import type { RoleConstraint } from "./constraints";
|
|
6
7
|
export interface AccessFeatureOptions {
|
|
7
8
|
/**
|
|
8
9
|
* The application's permissions: the `permissions` object go-core's `authzts` writes (`frontend/generated/permissions.ts`).
|
|
@@ -13,6 +14,22 @@ export interface AccessFeatureOptions {
|
|
|
13
14
|
subjectRoute?: (subject: SubjectRef) => RouteLocationRaw | null;
|
|
14
15
|
/** The places a person may be given roles at. Default: what the server says (`GET /v1/iam/users/:id/scopes`). */
|
|
15
16
|
scopes?: (subject: SubjectRef, signal: AbortSignal) => Promise<ScopeOptions>;
|
|
17
|
+
/**
|
|
18
|
+
* Constraints the application puts on a role, kept in the role's `attrs` (go-core: attribute key -> values). Each is a field in the role
|
|
19
|
+
* editor and on the role page, one choice among its options or none (no key in `attrs`: allows all). The attribute keys are the ones
|
|
20
|
+
* the permissions declare, or the server refuses the role (`unknown_attribute`). Attributes not listed here are kept as the role has them.
|
|
21
|
+
*
|
|
22
|
+
* accessFeature({ catalogue, roleConstraints: [{ attribute: "vehicle_kind", labelKey: "roles.vehicle_kind", options: [{ value: "new", labelKey: "roles.kind.new" }, { value: "used", labelKey: "roles.kind.used" }] }] })
|
|
23
|
+
*/
|
|
24
|
+
roleConstraints?: readonly RoleConstraint[];
|
|
25
|
+
/**
|
|
26
|
+
* The sentence for each problem code the application's own role check reports (`access.WithRoleCheck`), as an i18n key; a text may use
|
|
27
|
+
* `{permission}` (the permission's label, when the problem has one) and `{detail}`. Built-in codes have library texts (`core.access.problems.<code>`);
|
|
28
|
+
* a key here rewords one. A refused role (`authz.invalid`) shows one sentence per problem.
|
|
29
|
+
*
|
|
30
|
+
* accessFeature({ catalogue, problems: { vehicle_kind_conflict: "roles.problems.vehicle_kind_conflict" } })
|
|
31
|
+
*/
|
|
32
|
+
problems?: Readonly<Record<string, string>>;
|
|
16
33
|
/** The backend's navigation destination that opens the roles list. Without it the application links to `accessPages.roles` itself. */
|
|
17
34
|
destination?: Destination;
|
|
18
35
|
}
|
package/dist/access/index.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export { accessPages, personRolesSection } from "./routes";
|
|
|
7
7
|
export { accessPermissions } from "./context";
|
|
8
8
|
export { dependantsClosure, permissionTree, requiredClosure } from "./catalogue";
|
|
9
9
|
export type { Grants, PermissionCatalogue, PermissionEntry, PermissionGroup, PermissionMeta, PermissionScreen } from "./catalogue";
|
|
10
|
+
export type { RoleConstraint, RoleConstraintOption } from "./constraints";
|
|
10
11
|
export { useAccessLabels } from "./labels";
|
|
11
|
-
export { useRefusalMessage } from "./refusals";
|
|
12
|
+
export { roleProblems, useDescribeRefusal, useRefusalMessage } from "./refusals";
|
|
13
|
+
export type { RoleProblem } from "./refusals";
|
|
12
14
|
export { default as PersonAccess } from "./PersonAccess.vue";
|
|
13
15
|
export { default as BindingRow } from "./BindingRow.vue";
|
package/dist/access/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { _ as a,
|
|
1
|
+
import { _ as a, j as c, k as r, c as o, b as u, l as i, m as n, p as l, n as t, q as m, t as p, u as R, i as b, f as d } from "../index-WkbzC_ee.js";
|
|
2
2
|
export {
|
|
3
3
|
a as BindingRow,
|
|
4
4
|
c as PersonAccess,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
r as accessFeature,
|
|
6
|
+
o as accessPages,
|
|
7
|
+
u as accessPermissions,
|
|
8
8
|
i as accessRoutes,
|
|
9
|
-
|
|
9
|
+
n as dependantsClosure,
|
|
10
10
|
l as permissionTree,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
t as personRolesSection,
|
|
12
|
+
m as requiredClosure,
|
|
13
|
+
p as roleProblems,
|
|
14
|
+
R as useAccessLabels,
|
|
15
|
+
b as useDescribeRefusal,
|
|
16
|
+
d as useRefusalMessage
|
|
15
17
|
};
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+
import { type DescribeError } from "../i18n";
|
|
2
|
+
/** One thing wrong with a role or a binding, as go-core's `authz.invalid` carries it (`params.problems`): `{code, permission?, detail?}`. */
|
|
3
|
+
export interface RoleProblem {
|
|
4
|
+
readonly code: string;
|
|
5
|
+
readonly permission?: string;
|
|
6
|
+
readonly detail?: string;
|
|
7
|
+
}
|
|
8
|
+
/** The problems of an `authz.invalid` refusal, in the server's order (by code, then permission); empty for any other error. */
|
|
9
|
+
export declare function roleProblems(error: unknown): readonly RoleProblem[];
|
|
10
|
+
/**
|
|
11
|
+
* The sentence for a failed request on the access screens: `describeError`, except that a role the server refused as invalid
|
|
12
|
+
* (`authz.invalid`) says every problem, one sentence each. A problem's text is the application's (`accessFeature({ problems: { <code>: "<i18n key>" } })`,
|
|
13
|
+
* for its own codes or to reword a built-in one), then the library's `core.access.problems.<code>`, then a general sentence with the code.
|
|
14
|
+
* `{permission}` in a text is the permission's label (its id outside the access screens), `{detail}` the server's detail.
|
|
15
|
+
* Call it in `setup`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useDescribeRefusal(): DescribeError;
|
|
1
18
|
/**
|
|
2
19
|
* For a form's `failureMessage`: a refusal of go-core's delegation rules (`authz.escalation`, `self_assignment`, `last_admin`,
|
|
3
|
-
* `role_in_use`, ...) says which rule it was, in the app's language (`core.errors.authz.*`, overridable with `errors.authz.*`)
|
|
4
|
-
* any other failure keeps the form's own sentence for
|
|
20
|
+
* `role_in_use`, ...) says which rule it was, in the app's language (`core.errors.authz.*`, overridable with `errors.authz.*`),
|
|
21
|
+
* and a role refused as invalid says its problems (see `useDescribeRefusal`); any other failure keeps the form's own sentence for
|
|
22
|
+
* its kind. Call it in `setup`.
|
|
5
23
|
*/
|
|
6
24
|
export declare function useRefusalMessage(): (kind: unknown, error: unknown) => string | undefined;
|
package/dist/app/index.js
CHANGED
|
@@ -10,16 +10,16 @@ import { coreMessages as oe, createMessageRuntime as We } from "../i18n/index.js
|
|
|
10
10
|
import { i as Be, a as He } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
11
11
|
import { i as Ve, b as Ge } from "../bottomDock-BZEiOPYZ.js";
|
|
12
12
|
import { i as Je, p as ze } from "../chrome-nUcmVu8G.js";
|
|
13
|
-
import { i as Qe, g as Ue } from "../platform-
|
|
13
|
+
import { i as Qe, g as Ue } from "../platform-Dl1fbScN.js";
|
|
14
14
|
import { c as Xe, A as Ye, r as re } from "../access-DmAceEo5.js";
|
|
15
15
|
import { c as Ze, _ as et } from "../NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js";
|
|
16
|
-
import { i as tt } from "../guards-
|
|
17
|
-
import { b as st, c as ot, n as ae } from "../navigation-
|
|
18
|
-
import { c as rt, s as ne } from "../contributions-
|
|
19
|
-
import { S as Pt } from "../contributions-
|
|
16
|
+
import { i as tt } from "../guards-DRh4zmxO.js";
|
|
17
|
+
import { b as st, c as ot, n as ae } from "../navigation-DuQwti76.js";
|
|
18
|
+
import { c as rt, s as ne } from "../contributions-DVQPcjJz.js";
|
|
19
|
+
import { S as Pt } from "../contributions-DVQPcjJz.js";
|
|
20
20
|
import { a as ie } from "../environment-Dva-SG8D.js";
|
|
21
21
|
import { u as Bt } from "../environment-Dva-SG8D.js";
|
|
22
|
-
import { b as ce, c as le } from "../describeError-
|
|
22
|
+
import { b as ce, c as le } from "../describeError-BqGAUZgX.js";
|
|
23
23
|
import { _ as at } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
24
24
|
import { _ as nt } from "../EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
|
|
25
25
|
import { i as it } from "../feature-DdUAfyi4.js";
|
package/dist/client/index.js
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { A as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { R as p, c as o, f as u } from "../client-BHPFfBj3.js";
|
|
2
|
+
import { A as n, a as f, i as l } from "../error-Bb_dr_Ay.js";
|
|
3
|
+
function s(e, i, r = {}) {
|
|
4
|
+
return { method: e, path: i, permission: r.permission, public: r.public === !0, raw: !1 };
|
|
5
|
+
}
|
|
6
|
+
s.raw = (e, i, r = {}) => ({
|
|
7
|
+
method: e,
|
|
8
|
+
path: i,
|
|
9
|
+
permission: r.permission,
|
|
10
|
+
public: r.public === !0,
|
|
11
|
+
raw: !0
|
|
12
|
+
});
|
|
5
13
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
n as ApiError,
|
|
15
|
+
p as REQUEST_ID_HEADER,
|
|
16
|
+
o as createHttpClient,
|
|
17
|
+
u as fetchTransport,
|
|
18
|
+
f as isAborted,
|
|
19
|
+
l as isApiError,
|
|
20
|
+
s as route
|
|
13
21
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { A, k as I,
|
|
2
|
-
|
|
3
|
-
function D(t) {
|
|
1
|
+
import { A, k as I, i as S } from "./error-Bb_dr_Ay.js";
|
|
2
|
+
function U(t) {
|
|
4
3
|
if (!t) return "";
|
|
5
4
|
const e = new URLSearchParams();
|
|
6
5
|
for (const [a, r] of Object.entries(t))
|
|
@@ -10,7 +9,7 @@ function D(t) {
|
|
|
10
9
|
return e.toString();
|
|
11
10
|
}
|
|
12
11
|
const g = (t) => typeof Blob < "u" && t instanceof Blob;
|
|
13
|
-
function
|
|
12
|
+
function D(t) {
|
|
14
13
|
const e = new FormData();
|
|
15
14
|
for (const [a, r] of Object.entries(t))
|
|
16
15
|
if (r != null)
|
|
@@ -23,23 +22,23 @@ function z(t) {
|
|
|
23
22
|
function E(t) {
|
|
24
23
|
return g(t) ? t : t instanceof Date ? t.toISOString() : typeof t == "object" && t !== null ? JSON.stringify(t) : String(t);
|
|
25
24
|
}
|
|
26
|
-
function
|
|
25
|
+
function z(t) {
|
|
27
26
|
if (t === void 0) return { body: void 0, contentType: null };
|
|
28
27
|
if (typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof ArrayBuffer || ArrayBuffer.isView(t) || g(t))
|
|
29
28
|
return { body: t, contentType: null };
|
|
30
29
|
if (typeof t == "object" && t !== null && !Array.isArray(t)) {
|
|
31
30
|
const e = t;
|
|
32
31
|
if (Object.values(e).some((a) => g(a) || Array.isArray(a) && a.some(g)))
|
|
33
|
-
return { body:
|
|
32
|
+
return { body: D(e), contentType: null };
|
|
34
33
|
}
|
|
35
34
|
return { body: JSON.stringify(t), contentType: "application/json" };
|
|
36
35
|
}
|
|
37
|
-
function
|
|
36
|
+
function v() {
|
|
38
37
|
const t = new Uint8Array(16);
|
|
39
38
|
return globalThis.crypto.getRandomValues(t), Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
40
39
|
}
|
|
41
40
|
const b = "X-Request-ID", T = (t) => typeof t == "object" && t !== null && !Array.isArray(t), w = (t) => typeof t == "string" && t !== "" ? t : null;
|
|
42
|
-
function
|
|
41
|
+
function B(t) {
|
|
43
42
|
const e = t?.errors ?? t?.fields;
|
|
44
43
|
if (!T(e)) return {};
|
|
45
44
|
const a = {};
|
|
@@ -47,7 +46,7 @@ function O(t) {
|
|
|
47
46
|
Array.isArray(i) ? a[r] = i.map(String) : i != null && (a[r] = [String(i)]);
|
|
48
47
|
return a;
|
|
49
48
|
}
|
|
50
|
-
async function
|
|
49
|
+
async function O(t) {
|
|
51
50
|
const e = await t.text();
|
|
52
51
|
if (e.trim() === "") return { payload: null, readable: !0 };
|
|
53
52
|
try {
|
|
@@ -56,10 +55,10 @@ async function C(t) {
|
|
|
56
55
|
return { payload: null, readable: !1 };
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
|
-
async function
|
|
60
|
-
const a = t.headers.get(b) ?? e, { payload: r, readable: i } = await
|
|
58
|
+
async function C(t, e) {
|
|
59
|
+
const a = t.headers.get(b) ?? e, { payload: r, readable: i } = await O(t), o = T(r) ? r : null;
|
|
61
60
|
if (!t.ok) {
|
|
62
|
-
const m =
|
|
61
|
+
const m = B(o), n = o?.params;
|
|
63
62
|
throw new A({
|
|
64
63
|
kind: I(t.status, Object.keys(m).length > 0),
|
|
65
64
|
message: w(o?.error) ?? w(o?.message) ?? `Request failed with status ${t.status}`,
|
|
@@ -86,25 +85,25 @@ async function F(t, e) {
|
|
|
86
85
|
requestId: a
|
|
87
86
|
} : { data: r, meta: null, message: null, status: t.status, requestId: a };
|
|
88
87
|
}
|
|
89
|
-
const H = (t) => /^[a-z][a-z0-9+.-]*:\/\//i.test(t);
|
|
88
|
+
const F = (t, e) => globalThis.fetch(t, e), H = (t) => /^[a-z][a-z0-9+.-]*:\/\//i.test(t);
|
|
90
89
|
function P(t, e, a) {
|
|
91
90
|
const r = H(e) || t === "" ? e : `${t.replace(/\/+$/, "")}/${e.replace(/^\/+/, "")}`;
|
|
92
91
|
return a === "" ? r : `${r}${r.includes("?") ? "&" : "?"}${a}`;
|
|
93
92
|
}
|
|
94
93
|
const j = (t, e) => new A({ kind: "aborted", message: "The request was cancelled", requestId: t, cause: e });
|
|
95
|
-
function
|
|
96
|
-
const { baseUrl: e = "", transport: a =
|
|
94
|
+
function x(t = {}) {
|
|
95
|
+
const { baseUrl: e = "", transport: a = F, credentials: r = "include" } = t;
|
|
97
96
|
async function i(n, s, c, u) {
|
|
98
|
-
const { signal: f } = u, y = t.requestId === !1 ? null : (t.requestId ??
|
|
97
|
+
const { signal: f } = u, y = t.requestId === !1 ? null : (t.requestId ?? v)();
|
|
99
98
|
if (f?.aborted) throw j(y, f.reason);
|
|
100
|
-
const p =
|
|
99
|
+
const p = z(c), l = new Headers({ Accept: "application/json" }), h = t.headers ? await t.headers() : void 0;
|
|
101
100
|
for (const d of [h, u.headers])
|
|
102
101
|
d && new Headers(d).forEach(($, q) => l.set(q, $));
|
|
103
102
|
y !== null && !l.has(b) && l.set(b, y), p.contentType !== null && !l.has("Content-Type") && l.set("Content-Type", p.contentType);
|
|
104
|
-
const k = { method: n, headers: l, credentials: r, body: p.body, signal: f }, R = P(e, s,
|
|
103
|
+
const k = { method: n, headers: l, credentials: r, body: p.body, signal: f }, R = P(e, s, U(u.query));
|
|
105
104
|
try {
|
|
106
105
|
const d = await a(R, k);
|
|
107
|
-
return await
|
|
106
|
+
return await C(d, y);
|
|
108
107
|
} catch (d) {
|
|
109
108
|
throw S(d) ? d : f?.aborted || d instanceof Error && d.name === "AbortError" ? j(y, d) : new A({
|
|
110
109
|
kind: "network",
|
|
@@ -143,5 +142,6 @@ function J(t = {}) {
|
|
|
143
142
|
}
|
|
144
143
|
export {
|
|
145
144
|
b as R,
|
|
146
|
-
|
|
145
|
+
x as c,
|
|
146
|
+
F as f
|
|
147
147
|
};
|