@wssto2/vue-core 0.5.4 → 0.6.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 +23 -0
- package/README.md +3 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-Bv-APkGf.js → ActionRow.vue_vue_type_script_setup_true_lang-D8NCXX4p.js} +1 -1
- package/dist/{Activity-DUjDaPfP.js → Activity-DGodh6BU.js} +4 -4
- package/dist/{Changes-B0tZO6BZ.js → Changes-38u4xY6e.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-o_Pj-JcD.js → CollectionPage.vue_vue_type_script_setup_true_lang-DPcCnrjr.js} +3 -3
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CDg31ZU7.js → DateField.vue_vue_type_script_setup_true_lang-BxUuUypB.js} +1 -1
- package/dist/{DeadLetters-IgVHao84.js → DeadLetters-CeHfhFHP.js} +6 -5
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-CSgT4ITL.js → FormGroup.vue_vue_type_script_setup_true_lang-CNb2CK01.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-D31Hk3pJ.js → FormView.vue_vue_type_script_setup_true_lang-nyz8EkzM.js} +1 -1
- package/dist/{General-C40HxupS.js → General-BNTjPvat.js} +6 -6
- package/dist/{NewRolePage-Bhy8KJO1.js → NewRolePage-Btg7gzzH.js} +7 -6
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BdS7BxuS.js → NumberField.vue_vue_type_script_setup_true_lang-C8um4ARi.js} +1 -1
- package/dist/PersonAccess.vue_vue_type_script_setup_true_lang-ClmawvYm.js +600 -0
- package/dist/{ProfilePage-Bf7dFzGd.js → ProfilePage-CoZyG11N.js} +9 -9
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C6oloGIh.js → RoleEditor.vue_vue_type_script_setup_true_lang-Bs9bo0Zb.js} +30 -29
- package/dist/{RolePage-BjbvciTg.js → RolePage-CPlwZA6X.js} +37 -35
- package/dist/{RolesPage-DzVOgF4z.js → RolesPage-CdYdIHR4.js} +29 -27
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-DXe_iOS8.js → SegmentedField.vue_vue_type_script_setup_true_lang-B_hBL5f4.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BN4vzvV9.js → SelectField.vue_vue_type_script_setup_true_lang-CBZhGNpm.js} +4 -4
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DuvSSBbX.js +126 -0
- package/dist/ServiceAccountRecord-BtaUZuWU.js +511 -0
- package/dist/ServiceAccountsList-CcRJvNaf.js +137 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-PuWIK-Wa.js → SessionList.vue_vue_type_script_setup_true_lang-VvBB2EZz.js} +2 -2
- package/dist/{Sessions-CRUObe5G.js → Sessions-DkGNO1FO.js} +2 -2
- package/dist/{SettingsPage-C0qEC0uI.js → SettingsPage-D4G1HGbG.js} +8 -8
- package/dist/{SignIn-Uy0Jujzz.js → SignIn-DS1YymqD.js} +4 -4
- package/dist/{SignInPage-CpVZfrLZ.js → SignInPage-BrmL0PUw.js} +3 -3
- package/dist/{SignIns-Cp5Gx2dk.js → SignIns-C7l7IPHQ.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Dj5Aq8QT.js → SwitchField.vue_vue_type_script_setup_true_lang-DXZK89A3.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BwfNNQEz.js → TextField.vue_vue_type_script_setup_true_lang-CX3LdZLK.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-aT1P8Xqr.js → TextareaField.vue_vue_type_script_setup_true_lang-BOtn_1GT.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-jPKPE1hc.js → TimeField.vue_vue_type_script_setup_true_lang-CbflIrq6.js} +1 -1
- package/dist/{UserRecord-DbSMnTbj.js → UserRecord-Du8M_kuk.js} +25 -25
- package/dist/{UsersList-9MicE2pG.js → UsersList-D3ydQice.js} +13 -13
- package/dist/access/api.d.ts +7 -8
- package/dist/access/context.d.ts +2 -7
- package/dist/access/feature.d.ts +0 -8
- package/dist/access/index.js +47 -15
- package/dist/collection/index.js +17 -16
- package/dist/form/index.js +586 -611
- package/dist/http-nz92KjdS.js +42 -0
- package/dist/i18n/index.js +32 -32
- package/dist/identity/index.d.ts +7 -0
- package/dist/identity/index.js +19 -15
- package/dist/identity/serviceaccounts/ApiKeysPanel.vue.d.ts +17 -0
- package/dist/identity/serviceaccounts/CreatedApiKeyDialog.vue.d.ts +53 -0
- package/dist/identity/serviceaccounts/NewApiKeyDialog.vue.d.ts +24 -0
- package/dist/identity/serviceaccounts/ServiceAccountDialog.vue.d.ts +22 -0
- package/dist/identity/serviceaccounts/ServiceAccountRecord.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/ServiceAccountsList.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/access.d.ts +4 -0
- package/dist/identity/serviceaccounts/api.d.ts +27 -0
- package/dist/identity/serviceaccounts/context.d.ts +14 -0
- package/dist/identity/serviceaccounts/feature.d.ts +23 -0
- package/dist/identity/serviceaccounts/form.d.ts +4 -0
- package/dist/identity/serviceaccounts/messages.d.ts +11 -0
- package/dist/identity/serviceaccounts/routes.d.ts +22 -0
- package/dist/{index-Ok29ucE3.js → index-Cmj9iZmT.js} +191 -168
- package/dist/{index-C-oM_Mnf.js → index-DH0MoFqg.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/copyText.d.ts +5 -0
- package/dist/modules/serviceaccount/entities.d.ts +127 -0
- package/dist/modules/serviceaccount/routes.d.ts +58 -0
- package/dist/modules/serviceaccount/schemas.d.ts +49 -0
- package/dist/{neighbors-Bv6vnWlW.js → neighbors-DNZuGlQH.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{options-Bu0XbEpN.js → options-e_CAfvDQ.js} +3 -3
- package/dist/phone/index.js +1 -1
- package/dist/refusals-COPr15XZ.js +135 -0
- package/dist/routes-CVckt7Pj.js +19 -0
- package/dist/state-BC1Fc6U2.js +154 -0
- package/dist/{status-C78NpXyB.js → status-C8XtnK6m.js} +7 -6
- package/dist/styles.css +1 -1
- package/dist/{suggestions-ClyLexMO.js → suggestions-cPjs5gQz.js} +1 -1
- package/dist/{useCommand-DyuPTosF.js → useCommand-CfG727e8.js} +1 -1
- package/dist/{useGroupSheet-C2NyqWRp.js → useGroupSheet-BVcNDWbP.js} +2 -2
- package/dist/useRecordDialog-D65FF85F.js +30 -0
- package/package.json +2 -2
- package/dist/http-CdQowFlW.js +0 -194
- package/dist/index-BdGnA1Jh.js +0 -765
package/dist/http-CdQowFlW.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { hasInjectionContext as $, inject as _, watch as O } from "vue";
|
|
2
|
-
import { g as j } from "./platform-Dx6STiwY.js";
|
|
3
|
-
const k = [5, 8, 10, 15, 25, 50, 100], A = 25;
|
|
4
|
-
function X(e) {
|
|
5
|
-
const t = `defineCollection("${e.id}")`;
|
|
6
|
-
if (typeof e.id != "string" || e.id.trim() === "") throw new Error("defineCollection: `id` must be a non-empty string.");
|
|
7
|
-
if (!Number.isInteger(e.stateVersion) || e.stateVersion < 1) throw new Error(`${t}: \`stateVersion\` must be a positive integer.`);
|
|
8
|
-
if (typeof e.load != "function") throw new Error(`${t}: \`load\` must be a function.`);
|
|
9
|
-
if (typeof e.key != "function") throw new Error(`${t}: \`key\` must be a function.`);
|
|
10
|
-
const s = {
|
|
11
|
-
sorts: e.query?.sorts ? [...e.query.sorts] : null,
|
|
12
|
-
filters: e.query?.filters ? [...e.query.filters] : null,
|
|
13
|
-
views: e.query?.views ? [...e.query.views] : null,
|
|
14
|
-
sensitive: [...e.query?.sensitive ?? []],
|
|
15
|
-
pageSizes: [...e.query?.pageSizes ?? k],
|
|
16
|
-
search: e.query?.search ?? !0
|
|
17
|
-
};
|
|
18
|
-
if (s.pageSizes.length === 0 || s.pageSizes.some((c) => !Number.isInteger(c) || c < 1))
|
|
19
|
-
throw new Error(`${t}: \`query.pageSizes\` must list positive integers.`);
|
|
20
|
-
for (const c of s.sensitive)
|
|
21
|
-
if (s.filters && !s.filters.includes(c)) throw new Error(`${t}: sensitive filter "${c}" is not in \`query.filters\`.`);
|
|
22
|
-
const r = e.defaults ?? {}, o = r.pageSize ?? (s.pageSizes.includes(A) ? A : s.pageSizes[0]);
|
|
23
|
-
if (!s.pageSizes.includes(o)) throw new Error(`${t}: default page size ${o} is not one of ${s.pageSizes.join(", ")}.`);
|
|
24
|
-
const n = r.sort ?? null;
|
|
25
|
-
if (n !== null && s.sorts && !s.sorts.includes(n)) throw new Error(`${t}: default sort "${n}" is not in \`query.sorts\`.`);
|
|
26
|
-
const i = r.view ?? null;
|
|
27
|
-
if (i !== null && s.views && !s.views.includes(i)) throw new Error(`${t}: default view "${i}" is not in \`query.views\`.`);
|
|
28
|
-
const a = Object.fromEntries(Object.entries(r.filters ?? {}).filter(([, c]) => c !== void 0 && c !== ""));
|
|
29
|
-
for (const c of Object.keys(a))
|
|
30
|
-
if (s.filters && !s.filters.includes(c)) throw new Error(`${t}: default filter "${c}" is not in \`query.filters\`.`);
|
|
31
|
-
const l = r.page ?? 1;
|
|
32
|
-
if (!Number.isInteger(l) || l < 1) throw new Error(`${t}: default page must be a positive integer.`);
|
|
33
|
-
const f = r.direction ?? "asc";
|
|
34
|
-
if (f !== "asc" && f !== "desc") throw new Error(`${t}: default direction must be "asc" or "desc".`);
|
|
35
|
-
return Object.freeze({
|
|
36
|
-
id: e.id,
|
|
37
|
-
stateVersion: e.stateVersion,
|
|
38
|
-
load: e.load,
|
|
39
|
-
key: e.key,
|
|
40
|
-
defaults: Object.freeze({
|
|
41
|
-
page: l,
|
|
42
|
-
pageSize: o,
|
|
43
|
-
sort: n,
|
|
44
|
-
direction: f,
|
|
45
|
-
search: r.search ?? "",
|
|
46
|
-
view: i,
|
|
47
|
-
filters: Object.freeze(a)
|
|
48
|
-
}),
|
|
49
|
-
contract: Object.freeze(s),
|
|
50
|
-
migrate: e.migrate
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const F = "from";
|
|
54
|
-
function G(e, t) {
|
|
55
|
-
if (typeof e == "string") {
|
|
56
|
-
const s = new URLSearchParams(t).toString(), r = e.indexOf("#"), o = r === -1 ? e : e.slice(0, r);
|
|
57
|
-
return `${o}${o.includes("?") ? "&" : "?"}${s}${r === -1 ? "" : e.slice(r)}`;
|
|
58
|
-
}
|
|
59
|
-
return { ...e, query: { ...e.query, ...t } };
|
|
60
|
-
}
|
|
61
|
-
function J(e) {
|
|
62
|
-
if (!$()) return;
|
|
63
|
-
const t = _(j, null);
|
|
64
|
-
t && O(
|
|
65
|
-
() => {
|
|
66
|
-
const s = t.session.state.value;
|
|
67
|
-
return s.status === "authenticated" ? s.user.id : null;
|
|
68
|
-
},
|
|
69
|
-
e,
|
|
70
|
-
{ flush: "sync" }
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
const I = 4096, T = 200, N = 32, C = 1e6, S = /^[A-Za-z0-9_.-]{1,64}$/;
|
|
74
|
-
function M(e) {
|
|
75
|
-
let t = "";
|
|
76
|
-
for (const s of new TextEncoder().encode(e)) t += String.fromCharCode(s);
|
|
77
|
-
return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
78
|
-
}
|
|
79
|
-
function x(e) {
|
|
80
|
-
const t = e.replace(/-/g, "+").replace(/_/g, "/"), s = atob(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
81
|
-
return new TextDecoder("utf-8", { fatal: !0 }).decode(Uint8Array.from(s, (r) => r.charCodeAt(0)));
|
|
82
|
-
}
|
|
83
|
-
const E = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
84
|
-
function d(e, t = T) {
|
|
85
|
-
return typeof e == "string" && e.length <= t ? e : null;
|
|
86
|
-
}
|
|
87
|
-
function z(e, t, s) {
|
|
88
|
-
const { contract: r } = e, o = s ?? e.defaults, n = typeof t.p == "number" && Number.isInteger(t.p) && t.p >= 1 && t.p <= C ? t.p : o.page, i = typeof t.l == "number" && r.pageSizes.includes(t.l) ? t.l : o.pageSize;
|
|
89
|
-
let a = o.sort;
|
|
90
|
-
const l = d(t.c, 64);
|
|
91
|
-
l !== null && (r.sorts ? r.sorts.includes(l) : S.test(l)) && (a = l);
|
|
92
|
-
const f = t.d === "asc" || t.d === "desc" ? t.d : o.direction, c = d(t.s) ?? o.search;
|
|
93
|
-
let g = o.view;
|
|
94
|
-
const p = d(t.w, 64);
|
|
95
|
-
t.w === "" ? g = null : p !== null && (r.views ? r.views.includes(p) : S.test(p)) && (g = p);
|
|
96
|
-
const h = E(t.f) ? {} : { ...o.filters };
|
|
97
|
-
if (E(t.f)) {
|
|
98
|
-
let w = 0;
|
|
99
|
-
for (const [m, y] of Object.entries(t.f)) {
|
|
100
|
-
if (++w > N) break;
|
|
101
|
-
if (!(r.filters ? r.filters.includes(m) : S.test(m)) || r.sensitive.includes(m)) continue;
|
|
102
|
-
const v = typeof y == "number" || typeof y == "boolean" ? String(y) : d(y);
|
|
103
|
-
v !== null && v !== "" && (h[m] = v);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return { page: n, pageSize: i, sort: a, direction: f, search: c, view: g, filters: h };
|
|
107
|
-
}
|
|
108
|
-
function Z(e, t, s) {
|
|
109
|
-
const r = { v: e.stateVersion, p: t.page, l: t.pageSize };
|
|
110
|
-
t.sort && (r.c = t.sort), r.d = t.direction, (t.search || s && e.defaults.search !== s.search) && (r.s = t.search), (t.view || s && e.defaults.view !== s.view) && (r.w = t.view ?? "");
|
|
111
|
-
const o = Object.fromEntries(
|
|
112
|
-
Object.entries(t.filters).filter(([n, i]) => i !== void 0 && i !== "" && !e.contract.sensitive.includes(n))
|
|
113
|
-
);
|
|
114
|
-
return (Object.keys(o).length > 0 || Object.keys(e.defaults.filters).length > 0 || Object.keys(s?.filters ?? {}).length > 0) && (r.f = o), M(JSON.stringify(r));
|
|
115
|
-
}
|
|
116
|
-
function L(e, t, s) {
|
|
117
|
-
const r = t.v === void 0 ? e.stateVersion : t.v;
|
|
118
|
-
if (typeof r != "number" || !Number.isInteger(r)) return null;
|
|
119
|
-
if (r === e.stateVersion) return z(e, t, s);
|
|
120
|
-
const o = e.migrate?.(t, r);
|
|
121
|
-
return o ? z(e, o, s) : null;
|
|
122
|
-
}
|
|
123
|
-
function B(e, t, s) {
|
|
124
|
-
if (typeof t != "string" || t === "" || t.length > I) return null;
|
|
125
|
-
let r;
|
|
126
|
-
try {
|
|
127
|
-
r = JSON.parse(x(t));
|
|
128
|
-
} catch {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
return E(r) ? L(e, r, s) : null;
|
|
132
|
-
}
|
|
133
|
-
function K(e) {
|
|
134
|
-
return JSON.stringify([
|
|
135
|
-
e.page,
|
|
136
|
-
e.pageSize,
|
|
137
|
-
e.sort,
|
|
138
|
-
e.direction,
|
|
139
|
-
e.search,
|
|
140
|
-
e.view,
|
|
141
|
-
Object.entries(e.filters).sort(([t], [s]) => t.localeCompare(s))
|
|
142
|
-
]);
|
|
143
|
-
}
|
|
144
|
-
const b = (e) => typeof e == "object" && e !== null && !Array.isArray(e), u = (...e) => {
|
|
145
|
-
for (const t of e) if (typeof t == "number" && Number.isFinite(t)) return t;
|
|
146
|
-
return null;
|
|
147
|
-
};
|
|
148
|
-
function P(e) {
|
|
149
|
-
return {
|
|
150
|
-
// Filters first: the reserved names below always win, a filter called "page" cannot break paging.
|
|
151
|
-
...e.filters,
|
|
152
|
-
page: e.page,
|
|
153
|
-
per_page: e.pageSize,
|
|
154
|
-
order_col: e.sort,
|
|
155
|
-
order_dir: e.sort ? e.direction : null,
|
|
156
|
-
search: e.search,
|
|
157
|
-
view: e.view
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
function V(e, t) {
|
|
161
|
-
const s = e.data, r = b(s) && Array.isArray(s.data), o = Array.isArray(s) ? s : r ? s.data : [], n = r ? s : {}, i = b(e.meta) ? e.meta : b(n.meta) ? n.meta : {}, a = u(n.per_page, i.per_page) ?? t.pageSize, l = u(n.total, i.total) ?? o.length, f = u(n.current_page, i.page, i.current_page) ?? t.page, c = u(n.last_page, i.last_page) ?? (l === 0 ? 0 : Math.ceil(l / Math.max(1, a))), g = u(n.from, i.from) ?? (o.length === 0 ? 0 : (f - 1) * a + 1), p = u(n.to, i.to) ?? (o.length === 0 ? 0 : g + o.length - 1), h = Array.isArray(i.views) ? i.views : Array.isArray(n.views) ? n.views : void 0;
|
|
162
|
-
return {
|
|
163
|
-
rows: o,
|
|
164
|
-
total: l,
|
|
165
|
-
page: f,
|
|
166
|
-
pageSize: a,
|
|
167
|
-
lastPage: c,
|
|
168
|
-
from: g,
|
|
169
|
-
to: p,
|
|
170
|
-
views: h?.filter(b).flatMap((w) => typeof w.key == "string" ? [{ key: w.key, count: u(w.count) ?? void 0 }] : []),
|
|
171
|
-
meta: i,
|
|
172
|
-
requestId: e.requestId
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
function Q(e, t, s = {}) {
|
|
176
|
-
return async (r, { signal: o }) => {
|
|
177
|
-
const n = await e.get(t, { query: s.params ? s.params(r) : P(r), signal: o });
|
|
178
|
-
return V(n, r);
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
export {
|
|
182
|
-
k as D,
|
|
183
|
-
F as L,
|
|
184
|
-
X as a,
|
|
185
|
-
L as b,
|
|
186
|
-
B as d,
|
|
187
|
-
Z as e,
|
|
188
|
-
Q as h,
|
|
189
|
-
P as l,
|
|
190
|
-
J as o,
|
|
191
|
-
K as q,
|
|
192
|
-
V as r,
|
|
193
|
-
G as w
|
|
194
|
-
};
|