@wssto2/vue-core 0.9.4 → 0.10.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 +24 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js +87 -0
- package/dist/Activity-CeAG0ZtJ.js +169 -0
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-DdJOodn8.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js} +147 -159
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-BdeOKqz_.js → AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js} +1 -1
- package/dist/BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js +17 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js +123 -0
- package/dist/Changes-B9-zpDxG.js +69 -0
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js → CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js} +19 -18
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js → DataTable.vue_vue_type_script_setup_true_lang-BQRG8bpH.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js → DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js} +1 -1
- package/dist/{DeadLetters-Bb5pPlOY.js → DeadLetters-BP03yC4R.js} +5 -6
- package/dist/DrawnCheck.vue_vue_type_script_setup_true_lang-9DzDJlIA.js +38 -0
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +427 -0
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-aaNnMIOi.js → FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js} +2 -2
- package/dist/{General-BAG7S6wV.js → General-BDmCJr3H.js} +35 -38
- package/dist/{IncidentRecord-D8aOpNHo.js → IncidentRecord-DEhl6AyA.js} +14 -15
- package/dist/{IncidentsList-C0cFl0Db.js → IncidentsList-COgRPdk3.js} +3 -3
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-BlHhdmMy.js → Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js} +9 -8
- package/dist/{NewRolePage-C6Iu-EQJ.js → NewRolePage-DhGFwvk3.js} +4 -4
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js → NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-qz1tmYpF.js → PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js} +56 -56
- package/dist/ProfilePage-BQCK2w8R.js +684 -0
- package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-DrOm8k--.js +30 -0
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B9mN7UxZ.js → RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cw8mGf_B.js → ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js} +3 -3
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CJPvOVDV.js → RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js} +11 -12
- package/dist/{RolePage-Dj_ocMnM.js → RolePage-DaNv049g.js} +10 -10
- package/dist/{RolesPage-PXrs4O-1.js → RolesPage-6hlzJes_.js} +6 -6
- package/dist/SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js +32 -0
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CtdF1zuv.js → SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-B5ove3rM.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js} +2 -2
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js → SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js → SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js} +3 -3
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C0OIBrSp.js} +20 -20
- package/dist/{ServiceAccountRecord-bxX9yQkC.js → ServiceAccountRecord-gtlhYaAz.js} +37 -37
- package/dist/{ServiceAccountsList-BXE6htxk.js → ServiceAccountsList-BM7GGcvw.js} +33 -33
- package/dist/{Sessions--Gvc0kxw.js → Sessions-BCDJYuV2.js} +23 -24
- package/dist/{SettingsPage-DzDC7gD-.js → SettingsPage-DUhMsYBf.js} +27 -30
- package/dist/{SignIn-CTI_699e.js → SignIn-4D7WohI8.js} +9 -10
- package/dist/{SignInPage-HKC1bm2E.js → SignInPage-B6B-34GG.js} +4 -4
- package/dist/SignIns-CFoe4hpX.js +64 -0
- package/dist/StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js +56 -0
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js → SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js → TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js → TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js → TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js} +1 -1
- package/dist/UserRecord-Cd1TCpJZ.js +202 -0
- package/dist/UsersList-GJU5-CTG.js +74 -0
- package/dist/access/index.js +4 -4
- package/dist/app/index.js +1 -1
- package/dist/{application-BmXW6iW_.js → application-CuzT-0vW.js} +1 -1
- package/dist/button/index.js +6 -5
- package/dist/collection/PickerModal.vue.d.ts +26 -0
- package/dist/collection/definition.d.ts +6 -6
- package/dist/collection/http.d.ts +6 -6
- package/dist/collection/index.d.ts +5 -1
- package/dist/collection/index.js +144 -85
- package/dist/collection/picker.d.ts +39 -0
- package/dist/collection/types.d.ts +9 -4
- package/dist/collection/useCollection.d.ts +5 -5
- package/dist/content/ActivityStream.vue.d.ts +62 -0
- package/dist/content/CommentThread.vue.d.ts +52 -0
- package/dist/content/Composer.vue.d.ts +36 -0
- package/dist/content/index.d.ts +3 -0
- package/dist/content/index.js +321 -56
- package/dist/controls/index.js +28 -54
- package/dist/form/index.js +132 -134
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +10 -6
- package/dist/format/slug.d.ts +8 -0
- package/dist/highlight-DnYhLXnu.js +9 -0
- package/dist/http-Dm0uXY9O.js +95 -0
- package/dist/i18n/index.d.ts +14 -0
- package/dist/i18n/index.js +87 -63
- package/dist/i18n/plural.d.ts +23 -0
- package/dist/identity/embed.d.ts +39 -0
- package/dist/identity/index.d.ts +20 -0
- package/dist/identity/index.js +40 -21
- package/dist/identity/session.d.ts +9 -1
- package/dist/identity/shared/ChangeFeed.vue.d.ts +6 -3
- package/dist/identity/users/context.d.ts +8 -0
- package/dist/identity/users/dialogs.d.ts +10 -0
- package/dist/identity/users/ext.d.ts +8 -0
- package/dist/identity/users/feature.d.ts +10 -0
- package/dist/identity/users/list.d.ts +1 -1
- package/dist/identity/users/personSections.d.ts +1 -1
- package/dist/identity/users/replace.d.ts +45 -0
- package/dist/identity/users/words.d.ts +28 -0
- package/dist/incidents/api.d.ts +1 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-Dz0LkLM8.js → index-CTkG-acm.js} +4 -4
- package/dist/{index-Dm-sdJJr.js → index-DUs7WSz-.js} +31 -32
- package/dist/index-pJ_eRg80.js +1257 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/index.js +3 -3
- package/dist/modules/identity/entities.d.ts +7 -0
- package/dist/modules/identity/routes.d.ts +8 -4
- package/dist/modules/identity/schemas.d.ts +16 -0
- package/dist/{neighbors-DVfU9T0o.js → neighbors-OyvGi233.js} +2 -2
- package/dist/notifications/deadletters/list.d.ts +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{options-QuOkMKVZ.js → options-B48UiYsG.js} +2 -2
- package/dist/page/index.js +11 -11
- package/dist/phone/index.js +1 -1
- package/dist/pwa/AndroidInstallBanner.vue.d.ts +18 -0
- package/dist/pwa/InstallQrSheet.vue.d.ts +21 -0
- package/dist/pwa/IosInstallGuide.vue.d.ts +19 -0
- package/dist/pwa/QrCode.vue.d.ts +16 -0
- package/dist/pwa/index.d.ts +4 -0
- package/dist/pwa/index.js +244 -24
- package/dist/resource/index.js +1 -1
- package/dist/{rowLayout-CT8vWYgI.js → rowLayout-Il4psyXN.js} +183 -188
- package/dist/shell/DarkModeRow.vue.d.ts +15 -0
- package/dist/shell/OfflineNotice.vue.d.ts +2 -0
- package/dist/shell/QuickSearchButton.vue.d.ts +2 -0
- package/dist/shell/QuickSearchPalette.vue.d.ts +12 -0
- package/dist/shell/darkMode.d.ts +26 -0
- package/dist/shell/index.d.ts +10 -0
- package/dist/shell/index.js +963 -580
- package/dist/shell/offlineNotice.d.ts +3 -0
- package/dist/shell/quickSearch.d.ts +14 -0
- package/dist/shell/quickSearchControl.d.ts +66 -0
- package/dist/shortcut-DUR6yPWA.js +93 -0
- package/dist/state/BackgroundTaskCapsule.vue.d.ts +18 -0
- package/dist/state/backgroundTasks.d.ts +58 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.js +194 -80
- package/dist/state/useCountUp.d.ts +9 -0
- package/dist/styles.css +1 -1
- package/dist/{suggestions-BVQhoXzS.js → suggestions-q_v3M7G6.js} +1 -1
- package/dist/testing/collection.d.ts +1 -1
- package/dist/{useCommand-Dc8Lgs9h.js → useCommand-Ch_nx1AQ.js} +4 -4
- package/dist/{useGroupSheet-DQ6cVG-z.js → useGroupSheet-CPjHydQV.js} +14 -15
- package/dist/{useRecordDialog-BTsbHY38.js → useRecordDialog-DdkauXnU.js} +1 -1
- package/dist/{useResourceForm-DJ4Q75pq.js → useResourceForm-Dl6YFYyz.js} +1 -1
- package/package.json +3 -2
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js +0 -45
- package/dist/Activity-29hsZ28j.js +0 -156
- package/dist/Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js +0 -192
- package/dist/Changes-Dxjdkd_5.js +0 -129
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js +0 -295
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js +0 -137
- package/dist/PageBar.vue_vue_type_script_setup_true_lang-qI94fjJv.js +0 -47
- package/dist/ProfilePage-BnohZIEg.js +0 -764
- package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js +0 -64
- package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +0 -23
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js +0 -133
- package/dist/SignIns-BcqBgWgN.js +0 -121
- package/dist/UserRecord-CtUPpbCt.js +0 -267
- package/dist/UsersList-BMkIgIg8.js +0 -155
- package/dist/definition-C7QuyV3i.js +0 -54
- package/dist/fieldMessages-B6GHgi40.js +0 -25
- package/dist/http-nz92KjdS.js +0 -42
- package/dist/index-CdtofdcJ.js +0 -501
- package/dist/languages-BShG9LpE.js +0 -10
- package/dist/signInEvents-DWShrJox.js +0 -30
- package/dist/status-BRA14qwX.js +0 -34
- package/dist/useWaitStatus-fsacMl4W.js +0 -24
|
@@ -1,155 +0,0 @@
|
|
|
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
|
-
import { useI18n as B } from "vue-i18n";
|
|
3
|
-
import { useRouter as P } from "vue-router";
|
|
4
|
-
import { u as D, _ as I } from "./CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js";
|
|
5
|
-
import { _ as M } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
|
-
import { u as F } from "./format-D8KUBmbS.js";
|
|
7
|
-
import { u as L } from "./platform-BQOX_Ntw.js";
|
|
8
|
-
import { _ as G } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
9
|
-
import { i as K, g as E, h as W } from "./index-CdtofdcJ.js";
|
|
10
|
-
import { U as j, u as H, s as J } from "./status-BRA14qwX.js";
|
|
11
|
-
import { u as O } from "./environment-Dva-SG8D.js";
|
|
12
|
-
import { u as Q } from "./languages-BShG9LpE.js";
|
|
13
|
-
import { _ as X } from "./FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js";
|
|
14
|
-
import { _ as Y } from "./SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js";
|
|
15
|
-
import { _ as d } from "./TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js";
|
|
16
|
-
import { u as Z, _ as ee } from "./useCommand-Dc8Lgs9h.js";
|
|
17
|
-
import { t as se } from "./toast-CqSDTWRX.js";
|
|
18
|
-
import { u as te } from "./fieldMessages-B6GHgi40.js";
|
|
19
|
-
const oe = /* @__PURE__ */ U({
|
|
20
|
-
__name: "NewUserDialog",
|
|
21
|
-
emits: ["created"],
|
|
22
|
-
setup(T, { expose: o, emit: b }) {
|
|
23
|
-
const { t } = B(), { http: g } = L(), h = O(), f = te(), w = Q(), y = () => ({ login: "", name: "", email: "", phone: "", locale: h.locale.value, password: "", repeat: "" }), m = (s) => s.trim() === "", k = {
|
|
24
|
-
safeParse(s) {
|
|
25
|
-
const { repeat: n, locale: R, ...u } = s, v = t("core.account.validation.required"), _ = ["login", "name", "email", "password"].filter((x) => m(u[x])).map((x) => ({ path: [x], message: v }));
|
|
26
|
-
return R === null && _.push({ path: ["locale"], message: v }), !m(u.password) && n !== u.password && _.push({ path: ["repeat"], message: m(n) ? v : t("core.account.validation.mismatch") }), _.length > 0 ? { success: !1, error: { issues: _ } } : { success: !0, data: { ...u, locale: R ?? "", phone: m(u.phone) ? void 0 : u.phone } };
|
|
27
|
-
}
|
|
28
|
-
}, l = b, a = Z({
|
|
29
|
-
...f,
|
|
30
|
-
defaults: y,
|
|
31
|
-
validator: k,
|
|
32
|
-
run: async (s) => (await g.request(K.usersCreate, s)).data,
|
|
33
|
-
done: (s) => {
|
|
34
|
-
se.success(t("core.users.create.done", { name: s.name })), l("created", s);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return o({ create: () => a.present() }), (s, n) => (p(), C(e(ee), {
|
|
38
|
-
command: e(a),
|
|
39
|
-
title: e(t)("core.users.create.title"),
|
|
40
|
-
subtitle: e(t)("core.users.create.subtitle"),
|
|
41
|
-
"confirm-label": e(t)("core.users.create.action"),
|
|
42
|
-
size: "md"
|
|
43
|
-
}, {
|
|
44
|
-
default: c(() => [
|
|
45
|
-
r(e(X), { "label-width": "11rem" }, {
|
|
46
|
-
default: c(() => [
|
|
47
|
-
r(e(d), i(e(a).form.bind("name"), {
|
|
48
|
-
label: e(t)("core.users.fields.name"),
|
|
49
|
-
required: "",
|
|
50
|
-
autocomplete: "off"
|
|
51
|
-
}), null, 16, ["label"]),
|
|
52
|
-
r(e(d), i(e(a).form.bind("login"), {
|
|
53
|
-
label: e(t)("core.users.fields.login"),
|
|
54
|
-
required: "",
|
|
55
|
-
mono: "",
|
|
56
|
-
autocomplete: "off"
|
|
57
|
-
}), null, 16, ["label"]),
|
|
58
|
-
r(e(d), i(e(a).form.bind("password"), {
|
|
59
|
-
label: e(t)("core.users.fields.password"),
|
|
60
|
-
type: "password",
|
|
61
|
-
required: "",
|
|
62
|
-
autocomplete: "new-password"
|
|
63
|
-
}), null, 16, ["label"]),
|
|
64
|
-
r(e(d), i(e(a).form.bind("repeat"), {
|
|
65
|
-
label: e(t)("core.users.fields.password_repeat"),
|
|
66
|
-
type: "password",
|
|
67
|
-
required: "",
|
|
68
|
-
autocomplete: "new-password"
|
|
69
|
-
}), null, 16, ["label"]),
|
|
70
|
-
r(e(d), i(e(a).form.bind("email"), {
|
|
71
|
-
label: e(t)("core.users.fields.email"),
|
|
72
|
-
type: "email",
|
|
73
|
-
required: "",
|
|
74
|
-
autocomplete: "off"
|
|
75
|
-
}), null, 16, ["label"]),
|
|
76
|
-
r(e(d), i(e(a).form.bind("phone"), {
|
|
77
|
-
label: e(t)("core.users.fields.phone"),
|
|
78
|
-
type: "tel",
|
|
79
|
-
autocomplete: "off"
|
|
80
|
-
}), null, 16, ["label"]),
|
|
81
|
-
r(e(Y), i(e(a).form.bind("locale"), {
|
|
82
|
-
label: e(t)("core.users.fields.locale"),
|
|
83
|
-
options: e(w),
|
|
84
|
-
required: ""
|
|
85
|
-
}), null, 16, ["label", "options"])
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
})
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["command", "title", "subtitle", "confirm-label"]));
|
|
92
|
-
}
|
|
93
|
-
}), ae = ["datetime"], xe = /* @__PURE__ */ U({
|
|
94
|
-
__name: "UsersList",
|
|
95
|
-
setup(T) {
|
|
96
|
-
const { t: o } = B(), { http: b, access: t } = L(), g = F(), h = P(), f = V("dialog"), w = q(() => [
|
|
97
|
-
{ key: "name", label: o("core.users.columns.person"), kind: "identity", subtitle: (l) => l.email, sort: "name", mobile: "primary" },
|
|
98
|
-
{ key: "login", label: o("core.users.columns.login"), sort: "login", hideBelow: "md", width: 180, mobile: "hidden" },
|
|
99
|
-
{ key: "last_sign_in", label: o("core.users.columns.last_sign_in"), width: 170, mobile: "meta" },
|
|
100
|
-
{ key: "status", label: o("core.users.columns.status"), width: 130, mobile: "accessory" }
|
|
101
|
-
]), y = q(() => j.map((l) => ({ key: l, label: o(`core.users.views.${l}`) }))), m = D(H(b), { columns: w, views: y, state: { kind: "url", key: "query" }, recordRoute: (l) => E.record({ id: l.id }) }), k = q(
|
|
102
|
-
() => t.can(W) ? [{ id: "create", label: o("core.users.create.title"), icon: "addLine", placement: "primary", compact: "icon", keyboardShortcut: { key: "N", ctrlKey: !0 }, onClick: () => f.value?.create() }] : []
|
|
103
|
-
);
|
|
104
|
-
return (l, a) => (p(), C(e(I), {
|
|
105
|
-
collection: e(m),
|
|
106
|
-
title: e(o)("core.users.title"),
|
|
107
|
-
description: e(o)("core.users.description"),
|
|
108
|
-
actions: k.value,
|
|
109
|
-
"row-height": 64,
|
|
110
|
-
"row-label": (s) => s.name,
|
|
111
|
-
"views-presentation": "scope"
|
|
112
|
-
}, {
|
|
113
|
-
leading: c(({ item: s }) => [
|
|
114
|
-
r(e(M), {
|
|
115
|
-
name: s.name,
|
|
116
|
-
size: "md",
|
|
117
|
-
tone: "anchor"
|
|
118
|
-
}, null, 8, ["name"])
|
|
119
|
-
]),
|
|
120
|
-
"cell-last_sign_in": c(({ item: s, compact: n }) => [
|
|
121
|
-
s.last_sign_in ? (p(), S("time", {
|
|
122
|
-
key: 0,
|
|
123
|
-
datetime: s.last_sign_in,
|
|
124
|
-
class: N(["text-content", n ? "text-footnote text-content-muted" : "text-body"])
|
|
125
|
-
}, $(e(g).dateTime(s.last_sign_in)), 11, ae)) : (p(), S("span", {
|
|
126
|
-
key: 1,
|
|
127
|
-
class: N(n ? "text-footnote text-content-disabled" : "text-body text-content-disabled")
|
|
128
|
-
}, $(e(o)("core.users.never")), 3))
|
|
129
|
-
]),
|
|
130
|
-
"cell-status": c(({ item: s, compact: n }) => [
|
|
131
|
-
!n || s.status !== "active" ? (p(), C(e(G), {
|
|
132
|
-
key: 0,
|
|
133
|
-
tone: e(J)(s.status),
|
|
134
|
-
dot: ""
|
|
135
|
-
}, {
|
|
136
|
-
default: c(() => [
|
|
137
|
-
z($(e(o)(`core.users.status.${s.status}`)), 1)
|
|
138
|
-
]),
|
|
139
|
-
_: 2
|
|
140
|
-
}, 1032, ["tone"])) : A("", !0)
|
|
141
|
-
]),
|
|
142
|
-
default: c(() => [
|
|
143
|
-
r(oe, {
|
|
144
|
-
ref_key: "dialog",
|
|
145
|
-
ref: f,
|
|
146
|
-
onCreated: a[0] || (a[0] = (s) => e(h).push(e(E).record({ id: s.id })))
|
|
147
|
-
}, null, 512)
|
|
148
|
-
]),
|
|
149
|
-
_: 1
|
|
150
|
-
}, 8, ["collection", "title", "description", "actions", "row-label"]));
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
export {
|
|
154
|
-
xe as default
|
|
155
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
const w = [5, 8, 10, 15, 25, 50, 100], d = 25;
|
|
2
|
-
function u(e) {
|
|
3
|
-
const s = `defineCollection("${e.id}")`;
|
|
4
|
-
if (typeof e.id != "string" || e.id.trim() === "") throw new Error("defineCollection: `id` must be a non-empty string.");
|
|
5
|
-
if (!Number.isInteger(e.stateVersion) || e.stateVersion < 1) throw new Error(`${s}: \`stateVersion\` must be a positive integer.`);
|
|
6
|
-
if (typeof e.load != "function") throw new Error(`${s}: \`load\` must be a function.`);
|
|
7
|
-
if (typeof e.key != "function") throw new Error(`${s}: \`key\` must be a function.`);
|
|
8
|
-
const r = {
|
|
9
|
-
sorts: e.query?.sorts ? [...e.query.sorts] : null,
|
|
10
|
-
filters: e.query?.filters ? [...e.query.filters] : null,
|
|
11
|
-
views: e.query?.views ? [...e.query.views] : null,
|
|
12
|
-
sensitive: [...e.query?.sensitive ?? []],
|
|
13
|
-
pageSizes: [...e.query?.pageSizes ?? w],
|
|
14
|
-
search: e.query?.search ?? !0
|
|
15
|
-
};
|
|
16
|
-
if (r.pageSizes.length === 0 || r.pageSizes.some((t) => !Number.isInteger(t) || t < 1))
|
|
17
|
-
throw new Error(`${s}: \`query.pageSizes\` must list positive integers.`);
|
|
18
|
-
for (const t of r.sensitive)
|
|
19
|
-
if (r.filters && !r.filters.includes(t)) throw new Error(`${s}: sensitive filter "${t}" is not in \`query.filters\`.`);
|
|
20
|
-
const i = e.defaults ?? {}, f = i.pageSize ?? (r.pageSizes.includes(d) ? d : r.pageSizes[0]);
|
|
21
|
-
if (!r.pageSizes.includes(f)) throw new Error(`${s}: default page size ${f} is not one of ${r.pageSizes.join(", ")}.`);
|
|
22
|
-
const o = i.sort ?? null;
|
|
23
|
-
if (o !== null && r.sorts && !r.sorts.includes(o)) throw new Error(`${s}: default sort "${o}" is not in \`query.sorts\`.`);
|
|
24
|
-
const n = i.view ?? null;
|
|
25
|
-
if (n !== null && r.views && !r.views.includes(n)) throw new Error(`${s}: default view "${n}" is not in \`query.views\`.`);
|
|
26
|
-
const a = Object.fromEntries(Object.entries(i.filters ?? {}).filter(([, t]) => t !== void 0 && t !== ""));
|
|
27
|
-
for (const t of Object.keys(a))
|
|
28
|
-
if (r.filters && !r.filters.includes(t)) throw new Error(`${s}: default filter "${t}" is not in \`query.filters\`.`);
|
|
29
|
-
const l = i.page ?? 1;
|
|
30
|
-
if (!Number.isInteger(l) || l < 1) throw new Error(`${s}: default page must be a positive integer.`);
|
|
31
|
-
const c = i.direction ?? "asc";
|
|
32
|
-
if (c !== "asc" && c !== "desc") throw new Error(`${s}: default direction must be "asc" or "desc".`);
|
|
33
|
-
return Object.freeze({
|
|
34
|
-
id: e.id,
|
|
35
|
-
stateVersion: e.stateVersion,
|
|
36
|
-
load: e.load,
|
|
37
|
-
key: e.key,
|
|
38
|
-
defaults: Object.freeze({
|
|
39
|
-
page: l,
|
|
40
|
-
pageSize: f,
|
|
41
|
-
sort: o,
|
|
42
|
-
direction: c,
|
|
43
|
-
search: i.search ?? "",
|
|
44
|
-
view: n,
|
|
45
|
-
filters: Object.freeze(a)
|
|
46
|
-
}),
|
|
47
|
-
contract: Object.freeze(r),
|
|
48
|
-
migrate: e.migrate
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
w as D,
|
|
53
|
-
u as d
|
|
54
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { useI18n as f } from "vue-i18n";
|
|
2
|
-
import { a as c } from "./error-CD7x0Jrz.js";
|
|
3
|
-
import { u as m } from "./format-D8KUBmbS.js";
|
|
4
|
-
import { u as l } from "./describeError-B-NMa--w.js";
|
|
5
|
-
function E() {
|
|
6
|
-
const { t: i, te: u } = f(), a = m(), d = l(), s = (e) => [`errors.${e}`, `core.errors.${e}`].find((t) => u(t));
|
|
7
|
-
function n(e, t) {
|
|
8
|
-
if (c(e) && e.code) {
|
|
9
|
-
const r = s(e.code), o = typeof e.params?.locked_until == "string" ? new Date(e.params.locked_until) : null;
|
|
10
|
-
if (r && o && !Number.isNaN(o.getTime())) return i(r, { ...e.params, locked_until: a.time(o) });
|
|
11
|
-
}
|
|
12
|
-
return d(e, t === void 0 ? void 0 : { fallback: t });
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
sentence: n,
|
|
16
|
-
describeFieldError: (e) => {
|
|
17
|
-
const t = s(e);
|
|
18
|
-
return t === void 0 ? e : i(t);
|
|
19
|
-
},
|
|
20
|
-
failureMessage: (e, t) => c(t) && t.code && (e === "failed" || e === "forbidden" || e === "conflict") ? n(t) : void 0
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
E as u
|
|
25
|
-
};
|
package/dist/http-nz92KjdS.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const c = (t) => typeof t == "object" && t !== null && !Array.isArray(t), n = (...t) => {
|
|
2
|
-
for (const o of t) if (typeof o == "number" && Number.isFinite(o)) return o;
|
|
3
|
-
return null;
|
|
4
|
-
};
|
|
5
|
-
function A(t) {
|
|
6
|
-
return {
|
|
7
|
-
// Filters first: the reserved names below always win, a filter called "page" cannot break paging.
|
|
8
|
-
...t.filters,
|
|
9
|
-
page: t.page,
|
|
10
|
-
per_page: t.pageSize,
|
|
11
|
-
order_col: t.sort,
|
|
12
|
-
order_dir: t.sort ? t.direction : null,
|
|
13
|
-
search: t.search,
|
|
14
|
-
view: t.view
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
function _(t, o) {
|
|
18
|
-
const r = t.data, i = c(r) && Array.isArray(r.data), s = Array.isArray(r) ? r : i ? r.data : [], a = i ? r : {}, e = c(t.meta) ? t.meta : c(a.meta) ? a.meta : {}, p = n(a.per_page, e.per_page) ?? o.pageSize, g = n(a.total, e.total) ?? s.length, d = n(a.current_page, e.page, e.current_page) ?? o.page, m = n(a.last_page, e.last_page) ?? (g === 0 ? 0 : Math.ceil(g / Math.max(1, p))), f = n(a.from, e.from) ?? (s.length === 0 ? 0 : (d - 1) * p + 1), h = n(a.to, e.to) ?? (s.length === 0 ? 0 : f + s.length - 1), y = Array.isArray(e.views) ? e.views : Array.isArray(a.views) ? a.views : void 0;
|
|
19
|
-
return {
|
|
20
|
-
rows: s,
|
|
21
|
-
total: g,
|
|
22
|
-
page: d,
|
|
23
|
-
pageSize: p,
|
|
24
|
-
lastPage: m,
|
|
25
|
-
from: f,
|
|
26
|
-
to: h,
|
|
27
|
-
views: y?.filter(c).flatMap((l) => typeof l.key == "string" ? [{ key: l.key, count: n(l.count) ?? void 0 }] : []),
|
|
28
|
-
meta: e,
|
|
29
|
-
requestId: t.requestId
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function u(t, o, r = {}) {
|
|
33
|
-
return async (i, { signal: s }) => {
|
|
34
|
-
const a = await t.get(o, { query: r.params ? r.params(i) : A(i), signal: s });
|
|
35
|
-
return _(a, i);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
u as h,
|
|
40
|
-
A as l,
|
|
41
|
-
_ as r
|
|
42
|
-
};
|