@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
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
const p = [5, 8, 10, 15, 25, 50, 100], y = 25;
|
|
2
|
+
function E(e) {
|
|
3
|
+
const t = `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(`${t}: \`stateVersion\` must be a positive integer.`);
|
|
6
|
+
if (typeof e.load != "function") throw new Error(`${t}: \`load\` must be a function.`);
|
|
7
|
+
if (typeof e.key != "function") throw new Error(`${t}: \`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 ?? p],
|
|
14
|
+
search: e.query?.search ?? !0
|
|
15
|
+
};
|
|
16
|
+
if (r.pageSizes.length === 0 || r.pageSizes.some((n) => !Number.isInteger(n) || n < 1))
|
|
17
|
+
throw new Error(`${t}: \`query.pageSizes\` must list positive integers.`);
|
|
18
|
+
for (const n of r.sensitive)
|
|
19
|
+
if (r.filters && !r.filters.includes(n)) throw new Error(`${t}: sensitive filter "${n}" is not in \`query.filters\`.`);
|
|
20
|
+
const i = e.defaults ?? {}, a = i.pageSize ?? (r.pageSizes.includes(y) ? y : r.pageSizes[0]);
|
|
21
|
+
if (!r.pageSizes.includes(a)) throw new Error(`${t}: default page size ${a} is not one of ${r.pageSizes.join(", ")}.`);
|
|
22
|
+
const s = i.sort ?? null;
|
|
23
|
+
if (s !== null && r.sorts && !r.sorts.includes(s)) throw new Error(`${t}: default sort "${s}" is not in \`query.sorts\`.`);
|
|
24
|
+
const o = i.view ?? null;
|
|
25
|
+
if (o !== null && r.views && !r.views.includes(o)) throw new Error(`${t}: default view "${o}" is not in \`query.views\`.`);
|
|
26
|
+
const f = Object.fromEntries(Object.entries(i.filters ?? {}).filter(([, n]) => n !== void 0 && n !== ""));
|
|
27
|
+
for (const n of Object.keys(f))
|
|
28
|
+
if (r.filters && !r.filters.includes(n)) throw new Error(`${t}: default filter "${n}" is not in \`query.filters\`.`);
|
|
29
|
+
const c = i.page ?? 1;
|
|
30
|
+
if (!Number.isInteger(c) || c < 1) throw new Error(`${t}: default page must be a positive integer.`);
|
|
31
|
+
const g = i.direction ?? "asc";
|
|
32
|
+
if (g !== "asc" && g !== "desc") throw new Error(`${t}: 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: c,
|
|
40
|
+
pageSize: a,
|
|
41
|
+
sort: s,
|
|
42
|
+
direction: g,
|
|
43
|
+
search: i.search ?? "",
|
|
44
|
+
view: o,
|
|
45
|
+
filters: Object.freeze(f)
|
|
46
|
+
}),
|
|
47
|
+
contract: Object.freeze(r),
|
|
48
|
+
migrate: e.migrate
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const d = (e) => typeof e == "object" && e !== null && !Array.isArray(e), l = (...e) => {
|
|
52
|
+
for (const t of e) if (typeof t == "number" && Number.isFinite(t)) return t;
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
function v(e) {
|
|
56
|
+
return {
|
|
57
|
+
// Filters first: the reserved names below always win, a filter called "page" cannot break paging.
|
|
58
|
+
...e.filters,
|
|
59
|
+
page: e.page,
|
|
60
|
+
per_page: e.pageSize,
|
|
61
|
+
order_col: e.sort,
|
|
62
|
+
order_dir: e.sort ? e.direction : null,
|
|
63
|
+
search: e.search,
|
|
64
|
+
view: e.view
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function b(e, t) {
|
|
68
|
+
const r = e.data, i = d(r) && Array.isArray(r.data), a = Array.isArray(r) ? r : i ? r.data : [], s = i ? r : {}, o = d(e.meta) ? e.meta : d(s.meta) ? s.meta : {}, f = l(s.per_page, o.per_page) ?? t.pageSize, c = l(s.total, o.total) ?? a.length, g = l(s.current_page, o.page, o.current_page) ?? t.page, n = l(s.last_page, o.last_page) ?? (c === 0 ? 0 : Math.ceil(c / Math.max(1, f))), u = l(s.from, o.from) ?? (a.length === 0 ? 0 : (g - 1) * f + 1), m = l(s.to, o.to) ?? (a.length === 0 ? 0 : u + a.length - 1), h = Array.isArray(o.views) ? o.views : Array.isArray(s.views) ? s.views : void 0;
|
|
69
|
+
return {
|
|
70
|
+
rows: a,
|
|
71
|
+
total: c,
|
|
72
|
+
page: g,
|
|
73
|
+
pageSize: f,
|
|
74
|
+
lastPage: n,
|
|
75
|
+
from: u,
|
|
76
|
+
to: m,
|
|
77
|
+
views: h?.filter(d).flatMap((w) => typeof w.key == "string" ? [{ key: w.key, count: l(w.count) ?? void 0 }] : []),
|
|
78
|
+
// Like `Row`, the shape of `meta` is the caller's word, not checked.
|
|
79
|
+
meta: o,
|
|
80
|
+
requestId: e.requestId
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function z(e, t, r = {}) {
|
|
84
|
+
return async (i, { signal: a }) => {
|
|
85
|
+
const s = await e.get(t, { query: r.params ? r.params(i) : v(i), signal: a });
|
|
86
|
+
return b(s, i);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
p as D,
|
|
91
|
+
E as d,
|
|
92
|
+
z as h,
|
|
93
|
+
v as l,
|
|
94
|
+
b as r
|
|
95
|
+
};
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -161,6 +161,7 @@ export type CoreMessages = {
|
|
|
161
161
|
saving: string;
|
|
162
162
|
saved: string;
|
|
163
163
|
more: string;
|
|
164
|
+
open: string;
|
|
164
165
|
};
|
|
165
166
|
state: {
|
|
166
167
|
loading: string;
|
|
@@ -176,6 +177,17 @@ export type CoreMessages = {
|
|
|
176
177
|
wait: {
|
|
177
178
|
seconds: string;
|
|
178
179
|
};
|
|
180
|
+
/** The install guides of `@wssto2/vue-core/pwa`; `{app}` is the application's name. */
|
|
181
|
+
pwa: {
|
|
182
|
+
android: Texts<"title" | "text" | "install">;
|
|
183
|
+
ios: {
|
|
184
|
+
title: string;
|
|
185
|
+
subtitle: string;
|
|
186
|
+
next: string;
|
|
187
|
+
steps: Texts<"more" | "share" | "add">;
|
|
188
|
+
};
|
|
189
|
+
qr: Texts<"title" | "label" | "text" | "install_here">;
|
|
190
|
+
};
|
|
179
191
|
discard_changes: {
|
|
180
192
|
title: string;
|
|
181
193
|
body: string;
|
|
@@ -388,3 +400,5 @@ export { createMessageRuntime } from "./runtime";
|
|
|
388
400
|
export type { MessageFailure, MessageRuntime, MessageRuntimeOptions, MessageTarget } from "./runtime";
|
|
389
401
|
export { appErrorDescriberKey, appFieldErrorDescriberKey, useDescribeError } from "./describeError";
|
|
390
402
|
export type { AppErrorDescriber, AppFieldErrorDescriber, DescribeError, DescribeErrorOptions } from "./describeError";
|
|
403
|
+
export { slavicPluralRule, slavicPluralRules, slovenianPluralRule } from "./plural";
|
|
404
|
+
export type { PluralCategory } from "./plural";
|