@webx-ui/module-team 0.1.0 → 0.1.2
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/dist/index.js +41 -41
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as S, computed as v, onMounted as me, onBeforeUnmount as ne, openBlock as y, createElementBlock as A, createBlock as N, unref as n, Fragment as le, createVNode as b, createSlots as ve, withCtx as p, createTextVNode as
|
|
1
|
+
import { defineComponent as ae, ref as S, computed as v, onMounted as me, onBeforeUnmount as ne, openBlock as y, createElementBlock as A, createBlock as N, unref as n, Fragment as le, createVNode as b, createSlots as ve, withCtx as p, createTextVNode as O, toDisplayString as L, createCommentVNode as V, watch as Y, createElementVNode as K, normalizeClass as F, resolveDynamicComponent as be } from "vue";
|
|
2
2
|
import { onBeforeRouteUpdate as pe, onBeforeRouteLeave as he, useRoute as fe, useRouter as ye } from "vue-router";
|
|
3
3
|
import { useLocales as we, localizedValue as ge, WxSkeleton as re, WxBadge as oe, WxActionBar as xe, WxButton as _e, toast as x, confirm as G, WxCard as ke, WxListDetail as Te, WxEmpty as Z, WxInput as Se, WxIcon as ee, WxSortableList as We, WxAvatar as Ne, WxAlert as qe } from "@webx-ui/core";
|
|
4
|
-
import { reorderItems as Be, useAdmin as Q, useTranslate as se, useErrorText as ie,
|
|
4
|
+
import { reorderItems as Be, useAdmin as Q, useTranslate as se, useErrorText as ie, useBodyKeys as $e, WxScreenHead as Ce, WxScreen as Pe, WxSaveState as Ve, useItemOrder as Ae, WxListScreen as Le, WxRowMenu as Me } from "@webx-ui/module-admin";
|
|
5
5
|
const H = "team";
|
|
6
6
|
function ue(i) {
|
|
7
7
|
const u = `${i.apiPath}/${H}`, s = (t) => t.data;
|
|
@@ -20,7 +20,7 @@ function ue(i) {
|
|
|
20
20
|
reorder: (t) => Be(i, H, t, null)
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const Re = {
|
|
24
24
|
module: {
|
|
25
25
|
team: "Team"
|
|
26
26
|
},
|
|
@@ -84,11 +84,11 @@ const Me = {
|
|
|
84
84
|
function de() {
|
|
85
85
|
try {
|
|
86
86
|
const { i18n: i } = Q();
|
|
87
|
-
te.has(i) || (i.defaults("webx-team",
|
|
87
|
+
te.has(i) || (i.defaults("webx-team", Re), te.add(i));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const Ue = /* @__PURE__ */ ae({
|
|
92
92
|
name: "WxMemberPane",
|
|
93
93
|
__name: "MemberPane",
|
|
94
94
|
props: {
|
|
@@ -161,15 +161,15 @@ const Re = /* @__PURE__ */ ae({
|
|
|
161
161
|
function j(a) {
|
|
162
162
|
B.value && a.preventDefault();
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function I(a) {
|
|
165
165
|
(a.ctrlKey || a.metaKey) && a.key.toLowerCase() === "s" && (a.preventDefault(), (B.value || s.id === null) && C());
|
|
166
166
|
}
|
|
167
|
-
me(() => {
|
|
167
|
+
$e(I), me(() => {
|
|
168
168
|
T(), window.addEventListener("beforeunload", j);
|
|
169
169
|
}), ne(() => {
|
|
170
170
|
window.removeEventListener("beforeunload", j);
|
|
171
171
|
});
|
|
172
|
-
async function
|
|
172
|
+
async function E() {
|
|
173
173
|
return !B.value || !f.value ? !0 : await G({
|
|
174
174
|
title: o("member.leave-title"),
|
|
175
175
|
message: o("member.leave-text"),
|
|
@@ -179,8 +179,8 @@ const Re = /* @__PURE__ */ ae({
|
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
pe(
|
|
182
|
-
async (a, d) => a.query.member === d.query.member ? !0 : await
|
|
183
|
-
), he(
|
|
182
|
+
async (a, d) => a.query.member === d.query.member ? !0 : await E()
|
|
183
|
+
), he(E);
|
|
184
184
|
const J = v(
|
|
185
185
|
() => f.value && w.value !== null ? [
|
|
186
186
|
{
|
|
@@ -197,7 +197,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
197
197
|
);
|
|
198
198
|
return (a, d) => (y(), A("div", {
|
|
199
199
|
class: "wx-member",
|
|
200
|
-
onKeydown:
|
|
200
|
+
onKeydown: I
|
|
201
201
|
}, [
|
|
202
202
|
h.value ? (y(), N(n(re), {
|
|
203
203
|
key: 0,
|
|
@@ -205,7 +205,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
205
205
|
title: "",
|
|
206
206
|
rows: 6
|
|
207
207
|
})) : (y(), A(le, { key: 1 }, [
|
|
208
|
-
b(n(
|
|
208
|
+
b(n(Ce), {
|
|
209
209
|
level: 3,
|
|
210
210
|
back: !s.inline,
|
|
211
211
|
"back-label": n(o)("member.back"),
|
|
@@ -219,7 +219,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
219
219
|
fn: p(() => [
|
|
220
220
|
b(n(oe), { dot: "" }, {
|
|
221
221
|
default: p(() => [
|
|
222
|
-
|
|
222
|
+
O(L(n(o)("member.not-published")), 1)
|
|
223
223
|
]),
|
|
224
224
|
_: 1
|
|
225
225
|
})
|
|
@@ -227,7 +227,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
227
227
|
key: "0"
|
|
228
228
|
} : void 0
|
|
229
229
|
]), 1032, ["back", "back-label", "title", "actions"]),
|
|
230
|
-
b(n(
|
|
230
|
+
b(n(Pe), {
|
|
231
231
|
modelValue: _.value,
|
|
232
232
|
"onUpdate:modelValue": d[1] || (d[1] = (P) => _.value = P),
|
|
233
233
|
name: "team.form",
|
|
@@ -236,7 +236,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
236
236
|
}, null, 8, ["modelValue", "errors", "disabled"]),
|
|
237
237
|
f.value ? (y(), N(n(xe), { key: 0 }, {
|
|
238
238
|
state: p(() => [
|
|
239
|
-
b(n(
|
|
239
|
+
b(n(Ve), { state: R.value }, null, 8, ["state"])
|
|
240
240
|
]),
|
|
241
241
|
default: p(() => [
|
|
242
242
|
b(n(_e), {
|
|
@@ -246,7 +246,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
246
246
|
onClick: C
|
|
247
247
|
}, {
|
|
248
248
|
default: p(() => [
|
|
249
|
-
|
|
249
|
+
O(L(n(o)("member.save")), 1)
|
|
250
250
|
]),
|
|
251
251
|
_: 1
|
|
252
252
|
}, 8, ["loading", "disabled"])
|
|
@@ -261,13 +261,13 @@ const Re = /* @__PURE__ */ ae({
|
|
|
261
261
|
for (const [t, c] of u)
|
|
262
262
|
s[t] = c;
|
|
263
263
|
return s;
|
|
264
|
-
},
|
|
264
|
+
}, je = /* @__PURE__ */ ce(Ue, [["__scopeId", "data-v-443f6ebd"]]), ze = { class: "wx-team__bar" }, De = { class: "wx-member-row__body" }, Ie = { class: "wx-member-row__name" }, Ee = {
|
|
265
265
|
key: 0,
|
|
266
266
|
class: "wx-member-row__job"
|
|
267
|
-
},
|
|
267
|
+
}, Oe = {
|
|
268
268
|
key: 1,
|
|
269
269
|
class: "wx-member-row__facts"
|
|
270
|
-
},
|
|
270
|
+
}, Je = /* @__PURE__ */ ae({
|
|
271
271
|
__name: "TeamPage",
|
|
272
272
|
props: {
|
|
273
273
|
base: { default: "/team" }
|
|
@@ -297,7 +297,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
297
297
|
}), B = v(() => [
|
|
298
298
|
{ value: "", label: l("member.all") },
|
|
299
299
|
{ value: "trashed", label: l("member.trashed"), icon: "trash" }
|
|
300
|
-
]), R =
|
|
300
|
+
]), R = Ae(H, () => ({ q: g.value, filtered: h.value })), z = v(() => w.value && R.sortable.value), D = v(() => g.value !== "" ? l("member.empty-search") : h.value ? l("member.empty-bin") : l("member.empty"));
|
|
301
301
|
async function T() {
|
|
302
302
|
W.value = !0;
|
|
303
303
|
try {
|
|
@@ -328,10 +328,10 @@ const Re = /* @__PURE__ */ ae({
|
|
|
328
328
|
const e = { ...t.query };
|
|
329
329
|
delete e.member, c.replace({ query: e });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function I(e) {
|
|
332
332
|
U(e.id), T();
|
|
333
333
|
}
|
|
334
|
-
async function
|
|
334
|
+
async function E() {
|
|
335
335
|
try {
|
|
336
336
|
await R.move(o.value.map((e) => e.id));
|
|
337
337
|
} catch (e) {
|
|
@@ -386,7 +386,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
386
386
|
await T();
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
return (e, m) => (y(), N(n(
|
|
389
|
+
return (e, m) => (y(), N(n(Le), {
|
|
390
390
|
view: k.value,
|
|
391
391
|
"onUpdate:view": m[4] || (m[4] = (r) => k.value = r),
|
|
392
392
|
title: _.value,
|
|
@@ -408,7 +408,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
408
408
|
"detail-label": n(l)("module.team")
|
|
409
409
|
}, {
|
|
410
410
|
list: p(() => [
|
|
411
|
-
K("div",
|
|
411
|
+
K("div", ze, [
|
|
412
412
|
b(n(Se), {
|
|
413
413
|
modelValue: q.value,
|
|
414
414
|
"onUpdate:modelValue": m[0] || (m[0] = (r) => q.value = r),
|
|
@@ -437,7 +437,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
437
437
|
name: "plus",
|
|
438
438
|
size: "sm"
|
|
439
439
|
}),
|
|
440
|
-
|
|
440
|
+
O(" " + L(n(l)("member.new")), 1)
|
|
441
441
|
], 2)) : V("", !0),
|
|
442
442
|
W.value && o.value.length === 0 ? (y(), N(n(re), {
|
|
443
443
|
key: 1,
|
|
@@ -457,7 +457,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
457
457
|
handle: z.value ? "grip" : "row",
|
|
458
458
|
"item-label": (r) => r.name,
|
|
459
459
|
disabled: !z.value,
|
|
460
|
-
onMove:
|
|
460
|
+
onMove: E
|
|
461
461
|
}, {
|
|
462
462
|
default: p(({ item: r }) => [
|
|
463
463
|
(y(), N(be(h.value ? "div" : "button"), {
|
|
@@ -472,16 +472,16 @@ const Re = /* @__PURE__ */ ae({
|
|
|
472
472
|
name: r.name,
|
|
473
473
|
size: "md"
|
|
474
474
|
}, null, 8, ["src", "name"]),
|
|
475
|
-
K("span",
|
|
476
|
-
K("span",
|
|
477
|
-
r.job_title ? (y(), A("span",
|
|
478
|
-
r.published ? V("", !0) : (y(), A("span",
|
|
475
|
+
K("span", De, [
|
|
476
|
+
K("span", Ie, L(r.name), 1),
|
|
477
|
+
r.job_title ? (y(), A("span", Ee, L(r.job_title), 1)) : V("", !0),
|
|
478
|
+
r.published ? V("", !0) : (y(), A("span", Oe, [
|
|
479
479
|
b(n(oe), {
|
|
480
480
|
dot: "",
|
|
481
481
|
size: "sm"
|
|
482
482
|
}, {
|
|
483
483
|
default: p(() => [
|
|
484
|
-
|
|
484
|
+
O(L(n(l)("member.not-published")), 1)
|
|
485
485
|
]),
|
|
486
486
|
_: 1
|
|
487
487
|
})
|
|
@@ -492,7 +492,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
492
492
|
}, 1032, ["type", "class", "onClick"]))
|
|
493
493
|
]),
|
|
494
494
|
actions: p(({ item: r }) => [
|
|
495
|
-
b(n(
|
|
495
|
+
b(n(Me), {
|
|
496
496
|
actions: J(r),
|
|
497
497
|
label: r.name
|
|
498
498
|
}, null, 8, ["actions", "label"])
|
|
@@ -508,13 +508,13 @@ const Re = /* @__PURE__ */ ae({
|
|
|
508
508
|
], 64))
|
|
509
509
|
]),
|
|
510
510
|
detail: p(({ inline: r, back: X }) => [
|
|
511
|
-
f.value !== null ? (y(), N(
|
|
511
|
+
f.value !== null ? (y(), N(je, {
|
|
512
512
|
id: f.value === "new" ? null : f.value,
|
|
513
513
|
key: String(f.value),
|
|
514
514
|
inline: r,
|
|
515
515
|
onBack: X,
|
|
516
516
|
onSaved: T,
|
|
517
|
-
onCreated:
|
|
517
|
+
onCreated: I,
|
|
518
518
|
onRemoved: d
|
|
519
519
|
}, null, 8, ["id", "inline", "onBack"])) : V("", !0)
|
|
520
520
|
]),
|
|
@@ -533,23 +533,23 @@ const Re = /* @__PURE__ */ ae({
|
|
|
533
533
|
_: 1
|
|
534
534
|
}, 8, ["view", "title", "views"]));
|
|
535
535
|
}
|
|
536
|
-
}),
|
|
537
|
-
function
|
|
536
|
+
}), Ke = /* @__PURE__ */ ce(Je, [["__scopeId", "data-v-65fc44a2"]]);
|
|
537
|
+
function Xe(i = {}) {
|
|
538
538
|
const u = i.path ?? "/team";
|
|
539
539
|
return {
|
|
540
540
|
id: "team",
|
|
541
541
|
path: u,
|
|
542
542
|
// One route: the open person is in the address (`?member=`), beside the list they were
|
|
543
543
|
// opened from, so a link to them is a link to both.
|
|
544
|
-
routes: [{ path: u, name: "webx.team", component:
|
|
544
|
+
routes: [{ path: u, name: "webx.team", component: Ke, props: { base: u } }]
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
547
|
export {
|
|
548
548
|
H as TEAM_API,
|
|
549
|
-
|
|
550
|
-
|
|
549
|
+
je as WxMemberPane,
|
|
550
|
+
Ke as WxTeamPage,
|
|
551
551
|
ue as createTeamApi,
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
Xe as team,
|
|
553
|
+
Re as teamMessages
|
|
554
554
|
};
|
|
555
555
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/api.ts","../src/messages.ts","../src/i18n.ts","../src/MemberPane.vue","../src/TeamPage.vue","../src/module.ts"],"sourcesContent":["import { reorderItems, type AdminContext } from '@webx-ui/module-admin'\nimport type { ScreenModel } from '@webx-ui/schema'\nimport type { MemberDetail, MemberQuery, MemberRow, MembersList } from './types'\n\nexport interface TeamApi {\n list(query?: MemberQuery): Promise<MembersList>\n get(id: number): Promise<MemberDetail>\n /**\n * A new person out of the values of their form, in one request: the form is filled in first\n * and the record made on the first save, so nobody leaves an empty person behind.\n */\n create(values: ScreenModel): Promise<MemberDetail>\n /** Refused with a 422 under the name of the field — `socials.<n>.url` for a link. */\n save(id: number, values: ScreenModel): Promise<MemberDetail>\n remove(id: number): Promise<void>\n restore(id: number): Promise<MemberRow>\n /** The one order there is (decision 5). */\n reorder(ids: number[]): Promise<void>\n}\n\n/** The path of the section under the panel's API, and of its order. */\nexport const TEAM_API = 'team'\n\n/** Everything under `/team`, below the panel's API path (§5.7). */\nexport function createTeamApi(admin: AdminContext): TeamApi {\n const base = `${admin.apiPath}/${TEAM_API}`\n const data = <T>(body: { data: T }): T => body.data\n\n return {\n list: (query = {}) => {\n const search = new URLSearchParams()\n\n if (query.search) search.set('search', query.search)\n if (query.trashed) search.set('trashed', '1')\n\n return admin.http.get<MembersList>(search.size > 0 ? `${base}?${search}` : base)\n },\n get: (id) => admin.http.get<{ data: MemberDetail }>(`${base}/${id}`).then(data),\n create: (values) => admin.http.post<{ data: MemberDetail }>(base, { values }).then(data),\n save: (id, values) =>\n admin.http.put<{ data: MemberDetail }>(`${base}/${id}`, { values }).then(data),\n remove: (id) => admin.http.delete<void>(`${base}/${id}`).then(() => undefined),\n // The resource of the list line, and not the form's pair: a restored person stays closed.\n restore: (id) => admin.http.post<{ data: MemberRow }>(`${base}/${id}/restore`, {}).then(data),\n reorder: (ids) => reorderItems(admin, TEAM_API, ids, null),\n }\n}\n","import type { Messages } from '@webx-ui/module-admin'\n\n/**\n * The English this package speaks on its own, before the server's dictionary arrives, or without\n * one. The server ships the same lines in ten languages under `webx-team::` and overrides these;\n * `messages.test.ts` keeps the two sets of keys equal.\n */\nexport const teamMessages: Record<string, Messages> = {\n module: {\n team: 'Team',\n },\n member: {\n new: 'New person',\n untitled: 'Untitled',\n search: 'Search the team',\n empty: 'Nobody on the team yet.',\n 'empty-help': 'A person reaches the site in a team block, on any page.',\n 'empty-search': 'Nothing matches that.',\n 'empty-bin': 'The bin is empty.',\n all: 'All',\n trashed: 'Bin',\n 'not-published': 'Not published',\n 'no-job-title': 'No job title',\n order: 'Drag to change the order on the site.',\n choose: 'Choose a person',\n 'choose-help': 'Or add a new one: the first line of the list.',\n save: 'Save',\n saved: 'Saved.',\n 'save-failed': 'Not saved.',\n cancel: 'Cancel',\n delete: 'Delete',\n 'delete-title': 'Delete “:name” from the team?',\n 'delete-text':\n 'They go to the bin and leave every block on the site. Restored, they come back to their place.',\n deleted: 'Moved to the bin.',\n restore: 'Restore',\n restored: 'Restored.',\n 'reorder-failed': 'The new order was not saved.',\n 'leave-title': 'Leave without saving?',\n 'leave-text': 'What you wrote about this person is not on the server.',\n leave: 'Leave',\n back: 'Back to the list',\n },\n screen: {\n person: 'Person',\n photo: 'Photo',\n 'photo-help': 'Without one, the site shows the initials of the name.',\n name: 'Name',\n 'name-help':\n 'Required in the default language. Not written in another, the default one is shown.',\n 'job-title': 'Job title',\n 'job-title-help':\n 'Printed under the name. Not written in a language, the default one is shown.',\n about: 'About',\n text: 'Text',\n 'text-help': 'Printed only in the language it is written in. The person is shown either way.',\n links: 'Links',\n socials: 'Social networks',\n 'socials-help': 'In the order the site prints them. A row left empty is dropped when you save.',\n 'socials-add': 'Add a link',\n 'socials-empty': 'No links.',\n network: 'Network',\n 'network-placeholder': 'Choose a network',\n url: 'Address',\n services: 'Services',\n 'services-help':\n 'What the person provides: a team block on a service’s page can show only them.',\n settings: 'Settings',\n published: 'Published',\n 'published-help': 'On the site in every team block, from the moment it is saved.',\n },\n}\n","import { useAdmin } from '@webx-ui/module-admin'\nimport { teamMessages } from './messages'\n\nconst seeded = new WeakSet<object>()\n\n/** Puts this package's English under the panel's dictionary, once per panel. */\nexport function useTeamMessages(): void {\n try {\n const { i18n } = useAdmin()\n\n if (!seeded.has(i18n)) {\n i18n.defaults('webx-team', teamMessages)\n seeded.add(i18n)\n }\n } catch {\n // Outside a panel there is no dictionary to seed, and `useTranslate` falls back on its own.\n }\n}\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\nimport { onBeforeRouteLeave, onBeforeRouteUpdate, type RouteLocationNormalized } from 'vue-router'\nimport {\n confirm,\n localizedValue,\n toast,\n useLocales,\n WxActionBar,\n WxBadge,\n WxButton,\n WxSkeleton,\n type LocalizedValue,\n} from '@webx-ui/core'\nimport {\n useAdmin,\n useErrorText,\n useTranslate,\n WxSaveState,\n WxScreen,\n WxScreenHead,\n type ScreenAction,\n} from '@webx-ui/module-admin'\nimport type { ScreenModel } from '@webx-ui/schema'\nimport { createTeamApi } from './api'\nimport { useTeamMessages } from './i18n'\nimport type { MemberDetail, MemberSummary } from './types'\n\n/**\n * One person: the pane beside the list, and the whole screen on a phone.\n *\n * The described screen `team.form` with a head over it and one button under it. One explicit\n * save, and no autosave: a person has no draft (decision 10), so what is saved is on the site at\n * once — the button is the moment somebody decides it is ready.\n *\n * A new person is a form first and a record on the first save: an empty row made by pressing\n * \"New person\" and walking away would be a nameless card on every team block for ever.\n *\n * The way back is drawn here and not by the pane around it: the drawer a narrow screen opens\n * this in has no close of its own on purpose (CLAUDE.md §4).\n */\ndefineOptions({ name: 'WxMemberPane' })\n\nconst props = withDefaults(\n defineProps<{\n /** `null` — a person not written yet. */\n id: number | null\n /** False in the drawer a narrow screen opens this in. */\n inline?: boolean\n }>(),\n { inline: true },\n)\n\nconst emit = defineEmits<{\n back: []\n /** The person was written; the list redraws their row. */\n saved: [member: MemberSummary]\n /** The first save of a new person: a record now, with an id to be opened by. */\n created: [member: MemberSummary]\n removed: [id: number]\n}>()\n\nconst context = useAdmin()\nconst api = createTeamApi(context)\nconst locales = useLocales()\nuseTeamMessages()\n\nconst t = useTranslate('webx-team')\n/* Not the server's `message`: the panel says how a request failed in its own words. */\nconst message = useErrorText()\n\nconst member = ref<MemberSummary | null>(null)\nconst values = ref<ScreenModel>({})\nconst snapshot = ref('')\n\nconst loading = ref(props.id !== null)\nconst saving = ref(false)\nconst errors = ref<Record<string, string[]>>({})\n\nconst canManage = computed(() => context.can('team.manage'))\n\nconst current = computed(() => JSON.stringify(values.value))\nconst dirty = computed(() => snapshot.value !== '' && current.value !== snapshot.value)\n\nconst state = computed<'saving' | 'unsaved' | 'saved'>(() => {\n if (saving.value) return 'saving'\n\n return dirty.value || props.id === null ? 'unsaved' : 'saved'\n})\n\n/** The name follows the field rather than the answer: an edit shows at the top as it is typed. */\nconst title = computed(() => {\n const written = values.value.name as LocalizedValue | string | null | undefined\n const fallback = props.id === null ? t('member.new') : (member.value?.name ?? '')\n\n return localizedValue(written, locales.active.value, fallback) || t('member.untitled')\n})\n\nfunction take(detail: MemberDetail): void {\n member.value = detail.member\n values.value = detail.values\n snapshot.value = JSON.stringify(detail.values)\n}\n\nif (props.id === null) {\n // What the server would answer for a person with nothing in them yet. No `services`: the field\n // is there only when the site has services (decision 3), and the screen fills its own default.\n const blank: ScreenModel = {\n name: {},\n job_title: {},\n text: {},\n photo: null,\n socials: [],\n published: false,\n }\n\n values.value = blank\n snapshot.value = JSON.stringify(blank)\n}\n\nasync function load(): Promise<void> {\n if (props.id === null) return\n\n loading.value = true\n\n try {\n take(await api.get(props.id))\n } catch (error) {\n toast.danger(message(error))\n emit('back')\n } finally {\n loading.value = false\n }\n}\n\nasync function save(): Promise<void> {\n if (saving.value || !canManage.value) return\n\n saving.value = true\n errors.value = {}\n\n try {\n const made = props.id === null\n const detail = made\n ? await api.create(values.value)\n : await api.save(props.id as number, values.value)\n\n take(detail)\n toast.success(t('member.saved'))\n if (made) emit('created', detail.member)\n else emit('saved', detail.member)\n } catch (error) {\n const body = (error as { body?: { errors?: Record<string, string[]> } }).body\n\n if (body?.errors) {\n errors.value = body.errors\n toast.danger(t('member.save-failed'))\n } else {\n toast.danger(message(error))\n }\n } finally {\n saving.value = false\n }\n}\n\nasync function remove(): Promise<void> {\n const record = member.value\n\n if (!record) return\n\n const agreed = await confirm({\n title: t('member.delete-title', { name: record.name }),\n message: t('member.delete-text'),\n confirmText: t('member.delete'),\n cancelText: t('member.cancel'),\n tone: 'danger',\n })\n\n if (!agreed) return\n\n try {\n await api.remove(record.id)\n toast.success(t('member.deleted'))\n // Nothing left to protect: the record is in the bin.\n snapshot.value = current.value\n emit('removed', record.id)\n } catch (error) {\n toast.danger(message(error))\n }\n}\n\n/* The browser's own guard: it cannot wait for a request, so all it can do is ask. */\nfunction leaveGuard(event: BeforeUnloadEvent): void {\n if (dirty.value) event.preventDefault()\n}\n\n/* Ctrl+S saves, as it does everywhere else that has a save button. */\nfunction onKeydown(event: KeyboardEvent): void {\n if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') {\n event.preventDefault()\n if (dirty.value || props.id === null) void save()\n }\n}\n\nonMounted(() => {\n void load()\n window.addEventListener('beforeunload', leaveGuard)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('beforeunload', leaveGuard)\n})\n\nasync function mayLeave(): Promise<boolean> {\n if (!dirty.value || !canManage.value) return true\n\n return await confirm({\n title: t('member.leave-title'),\n message: t('member.leave-text'),\n confirmText: t('member.leave'),\n cancelText: t('member.cancel'),\n tone: 'danger',\n })\n}\n\n/*\n * The list and this form are one route, so another person is an update of it rather than a way\n * out — and so is every keystroke in the search above the list, which goes into the address too.\n * Only a change of the person asks.\n */\nonBeforeRouteUpdate(async (to: RouteLocationNormalized, from: RouteLocationNormalized) =>\n to.query.member === from.query.member ? true : await mayLeave(),\n)\n\nonBeforeRouteLeave(mayLeave)\n\n/* What leads away from the person. On a narrow pane the head folds them into the ···. */\nconst actions = computed<ScreenAction[]>(() =>\n canManage.value && member.value !== null\n ? [\n {\n key: 'delete',\n label: t('member.delete'),\n icon: 'trash',\n danger: true,\n menu: true,\n run: () => void remove(),\n },\n ]\n : [],\n)\n</script>\n\n<template>\n <div class=\"wx-member\" @keydown=\"onKeydown\">\n <wx-skeleton v-if=\"loading\" class=\"wx-member__ghost\" title :rows=\"6\" />\n\n <template v-else>\n <wx-screen-head\n :level=\"3\"\n :back=\"!props.inline\"\n :back-label=\"t('member.back')\"\n :title=\"title\"\n :actions=\"actions\"\n :collapse-below=\"480\"\n @back=\"emit('back')\"\n >\n <template v-if=\"member && !member.published\" #title-after>\n <wx-badge dot>{{ t('member.not-published') }}</wx-badge>\n </template>\n </wx-screen-head>\n\n <wx-screen\n v-model=\"values\"\n name=\"team.form\"\n :errors=\"errors\"\n :disabled=\"!canManage || saving\"\n />\n\n <wx-action-bar v-if=\"canManage\">\n <template #state>\n <wx-save-state :state=\"state\" />\n </template>\n\n <wx-button\n type=\"primary\"\n :loading=\"saving\"\n :disabled=\"!dirty && props.id !== null\"\n @click=\"save\"\n >\n {{ t('member.save') }}\n </wx-button>\n </wx-action-bar>\n </template>\n </div>\n</template>\n\n<style scoped>\n.wx-member {\n display: flex;\n flex-direction: column;\n gap: var(--wx-gap, var(--wx-space-16));\n min-width: 0;\n padding: var(--wx-gap, var(--wx-space-16));\n container-type: inline-size;\n}\n\n.wx-member__ghost {\n max-width: 480px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport { useRoute, useRouter, type LocationQueryRaw } from 'vue-router'\nimport {\n confirm,\n toast,\n WxAlert,\n WxAvatar,\n WxBadge,\n WxCard,\n WxEmpty,\n WxIcon,\n WxInput,\n WxListDetail,\n WxSkeleton,\n WxSortableList,\n type TabItem,\n type TabValue,\n} from '@webx-ui/core'\nimport {\n useAdmin,\n useErrorText,\n useItemOrder,\n useTranslate,\n WxListScreen,\n WxRowMenu,\n type RowAction,\n} from '@webx-ui/module-admin'\nimport { createTeamApi, TEAM_API } from './api'\nimport { useTeamMessages } from './i18n'\nimport MemberPane from './MemberPane.vue'\nimport type { MemberRow, MemberSummary } from './types'\n\n/**\n * The team: everybody on the left, the person being written on the right (§5.6, decision 11).\n *\n * The shape of the reviews without their categories: a person is typed in from a list sent by\n * the client in a minute, and the next one is usually the one under it. On a phone the form is\n * the whole screen, in the drawer `WxListDetail` raises, and draws its own way back.\n *\n * One order, the general one (decision 5): a drag moves it; a search or the bin shows a\n * selection, so the grips go away and the line under the list says why.\n *\n * Everything the screen is looking at lives in the address — the view, the search and the open\n * person — so a link to a person is a link to them in their list.\n */\nwithDefaults(defineProps<{ base?: string }>(), { base: '/team' })\n\nconst context = useAdmin()\nconst api = createTeamApi(context)\nconst route = useRoute()\nconst router = useRouter()\nuseTeamMessages()\n\nconst t = useTranslate('webx-team')\n/* Not the server's `message`: the panel says how a request failed in its own words. */\nconst message = useErrorText()\n\nconst rows = ref<MemberRow[]>([])\nconst loading = ref(true)\n\nconst canManage = computed(() => context.can('team.manage'))\n\nconst title = computed(\n () =>\n context.state.manifest?.modules.find((module) => module.id === 'team')?.title ??\n t('module.team'),\n)\n\nconst view = computed<TabValue>({\n get: () => (route.query.view === 'trashed' ? 'trashed' : ''),\n set: (value) => {\n const query: LocationQueryRaw = {\n ...route.query,\n view: value === '' ? undefined : String(value),\n }\n\n // A person from the list is not a person from the bin: the form closes with the view.\n delete query.member\n void router.replace({ query })\n },\n})\n\nconst inBin = computed(() => view.value === 'trashed')\n\nconst q = computed(() => (typeof route.query.q === 'string' ? route.query.q : ''))\n\n/* What is typed, ahead of the address: the address follows it after a pause. */\nconst typed = ref(q.value)\n\n/** The open person: a number, `'new'` for one not yet saved, or nothing. */\nconst selected = computed<number | 'new' | null>(() => {\n const raw = route.query.member\n\n if (raw === 'new') return canManage.value ? 'new' : null\n\n return typeof raw === 'string' && raw !== '' ? Number(raw) || null : null\n})\n\n/*\n * Open is \"a person is chosen\", and closing is un-choosing them — so the address, the list's\n * highlight and the drawer on a phone can never disagree about it.\n */\nconst open = computed({\n get: () => selected.value !== null,\n set: (value) => {\n if (!value) close()\n },\n})\n\nconst views = computed<TabItem[]>(() => [\n { value: '', label: t('member.all') },\n { value: 'trashed', label: t('member.trashed'), icon: 'trash' },\n])\n\nconst order = useItemOrder(TEAM_API, () => ({ q: q.value, filtered: inBin.value }))\n\n/* Dragged only by somebody who may write, and only in a list that is the whole order. */\nconst sortable = computed(() => canManage.value && order.sortable.value)\n\nconst emptyText = computed(() => {\n if (q.value !== '') return t('member.empty-search')\n\n return inBin.value ? t('member.empty-bin') : t('member.empty')\n})\n\nasync function load(): Promise<void> {\n loading.value = true\n\n try {\n const answer = await api.list({ search: q.value, trashed: inBin.value })\n\n rows.value = answer.data\n } catch (error) {\n toast.danger(message(error))\n } finally {\n loading.value = false\n }\n}\n\nwatch(\n () => [view.value, q.value] as const,\n () => void load(),\n)\nvoid load()\n\nlet pause: ReturnType<typeof setTimeout> | undefined\n\nwatch(typed, (value) => {\n clearTimeout(pause)\n pause = setTimeout(() => {\n void router.replace({ query: { ...route.query, q: value.trim() === '' ? undefined : value } })\n }, 300)\n})\n\nonBeforeUnmount(() => clearTimeout(pause))\n\n/* `replace` and not `push`: going through twenty people is not twenty steps of history. */\nfunction choose(id: number | 'new'): void {\n void router.replace({ query: { ...route.query, member: String(id) } })\n}\n\nfunction close(): void {\n const query = { ...route.query }\n\n delete query.member\n void router.replace({ query })\n}\n\n/** A new person was saved: they are a record now, and the list has them. */\nfunction created(member: MemberSummary): void {\n choose(member.id)\n void load()\n}\n\n/**\n * The order on screen, written as a whole. The list is already in its new order\n * (`WxSortableList` reorders the model before it says so), so a failure has to put it back\n * rather than leave the screen disagreeing with the database.\n */\nasync function reorder(): Promise<void> {\n try {\n await order.move(rows.value.map((row) => row.id))\n } catch (error) {\n toast.danger(message(error, t('member.reorder-failed')))\n await load()\n }\n}\n\nfunction actionsFor(row: MemberRow): RowAction[] {\n if (!canManage.value) return []\n\n if (inBin.value) {\n return [\n {\n key: 'restore',\n icon: 'refresh',\n label: t('member.restore'),\n run: () => void restore(row),\n },\n ]\n }\n\n return [\n {\n key: 'delete',\n icon: 'trash',\n label: t('member.delete'),\n danger: true,\n run: () => void remove(row),\n },\n ]\n}\n\nasync function remove(row: MemberRow): Promise<void> {\n const agreed = await confirm({\n title: t('member.delete-title', { name: row.name }),\n message: t('member.delete-text'),\n confirmText: t('member.delete'),\n cancelText: t('member.cancel'),\n tone: 'danger',\n })\n\n if (!agreed) return\n\n try {\n await api.remove(row.id)\n toast.success(t('member.deleted'))\n removed(row.id)\n } catch (error) {\n toast.danger(message(error))\n }\n}\n\n/** Gone from the list; and if they were the open one, the form goes with them. */\nfunction removed(id: number): void {\n if (selected.value === id) close()\n\n void load()\n}\n\nasync function restore(row: MemberRow): Promise<void> {\n try {\n await api.restore(row.id)\n toast.success(t('member.restored'))\n } catch (error) {\n toast.danger(message(error))\n } finally {\n await load()\n }\n}\n</script>\n\n<template>\n <wx-list-screen v-model:view=\"view\" :title=\"title\" :views=\"views\" :card=\"false\">\n <wx-card class=\"wx-team\" padding=\"none\">\n <wx-list-detail\n v-model:open=\"open\"\n class=\"wx-team__panes\"\n :list-width=\"360\"\n :detail-min=\"460\"\n :detail-label=\"t('module.team')\"\n >\n <template #list>\n <div class=\"wx-team__bar\">\n <wx-input\n v-model=\"typed\"\n class=\"wx-team__search\"\n size=\"sm\"\n clearable\n :placeholder=\"t('member.search')\"\n :aria-label=\"t('member.search')\"\n >\n <template #prefix><wx-icon name=\"search\" size=\"sm\" /></template>\n </wx-input>\n </div>\n\n <!--\n A line of the list rather than a button in the head: the new person is written where\n they will stand, beside the ones they join — and the form opens the way any other does.\n -->\n <button\n v-if=\"canManage && !inBin\"\n type=\"button\"\n class=\"wx-team__new\"\n :class=\"{ 'is-current': selected === 'new' }\"\n @click=\"choose('new')\"\n >\n <wx-icon name=\"plus\" size=\"sm\" />\n {{ t('member.new') }}\n </button>\n\n <wx-skeleton v-if=\"loading && rows.length === 0\" class=\"wx-team__loading\" :rows=\"5\" />\n\n <wx-empty\n v-else-if=\"rows.length === 0\"\n :title=\"emptyText\"\n :description=\"!inBin && q === '' ? t('member.empty-help') : undefined\"\n />\n\n <template v-else>\n <!-- A grip and not the whole row: the row opens a person, and a row that both opens\n and drags is one where one of the two happens by accident. -->\n <wx-sortable-list\n v-model=\"rows\"\n class=\"wx-team__list\"\n :class=\"{ 'is-loading': loading }\"\n plain\n item-key=\"id\"\n :handle=\"sortable ? 'grip' : 'row'\"\n :item-label=\"(item: MemberRow) => item.name\"\n :disabled=\"!sortable\"\n @move=\"reorder\"\n >\n <template #default=\"{ item }\">\n <component\n :is=\"inBin ? 'div' : 'button'\"\n :type=\"inBin ? undefined : 'button'\"\n class=\"wx-member-row\"\n :class=\"{ 'is-current': selected === item.id }\"\n @click=\"inBin ? undefined : choose(item.id)\"\n >\n <wx-avatar\n class=\"wx-member-row__photo\"\n :src=\"item.photo?.thumb ?? undefined\"\n :name=\"item.name\"\n size=\"md\"\n />\n\n <span class=\"wx-member-row__body\">\n <span class=\"wx-member-row__name\">{{ item.name }}</span>\n\n <span v-if=\"item.job_title\" class=\"wx-member-row__job\">\n {{ item.job_title }}\n </span>\n\n <span v-if=\"!item.published\" class=\"wx-member-row__facts\">\n <wx-badge dot size=\"sm\">{{ t('member.not-published') }}</wx-badge>\n </span>\n </span>\n </component>\n </template>\n\n <template #actions=\"{ item }\">\n <wx-row-menu :actions=\"actionsFor(item)\" :label=\"item.name\" />\n </template>\n </wx-sortable-list>\n\n <!-- What a drag does here, or why there is nothing to drag. -->\n <wx-alert\n v-if=\"canManage && !inBin\"\n class=\"wx-team__note\"\n type=\"info\"\n :description=\"order.hint.value\"\n />\n </template>\n </template>\n\n <template #detail=\"{ inline, back }\">\n <member-pane\n v-if=\"selected !== null\"\n :id=\"selected === 'new' ? null : selected\"\n :key=\"String(selected)\"\n :inline=\"inline\"\n @back=\"back\"\n @saved=\"load\"\n @created=\"created\"\n @removed=\"removed\"\n />\n </template>\n\n <template #empty>\n <wx-empty\n :title=\"t('member.choose')\"\n :description=\"canManage ? t('member.choose-help') : undefined\"\n />\n </template>\n </wx-list-detail>\n </wx-card>\n </wx-list-screen>\n</template>\n\n<style>\n/*\n * What scrolls here is the page, the way it does on every other list of the panel. The card's\n * corners are the screen's, and the panes paint their own background to the edge: `clip`, not\n * `hidden`, which would make this a scroll container and pin everything sticky inside to a box\n * that never moves (CLAUDE.md §4).\n */\n.wx-team > .wx-card__body {\n display: flex;\n flex-direction: column;\n overflow: clip;\n border-radius: inherit;\n}\n</style>\n\n<style scoped>\n.wx-team__bar {\n display: flex;\n gap: var(--wx-space-8);\n padding: var(--wx-space-12) var(--wx-space-12) var(--wx-space-8);\n}\n\n.wx-team__search {\n flex: 1 1 180px;\n min-width: 0;\n}\n\n.wx-team__new {\n display: flex;\n align-items: center;\n gap: var(--wx-space-8);\n width: calc(100% - 2 * var(--wx-space-8));\n margin: 0 var(--wx-space-8) var(--wx-space-4);\n padding: var(--wx-space-8);\n border: 1px dashed var(--wx-border-default);\n border-radius: var(--wx-radius-sm);\n background: none;\n font: inherit;\n color: var(--wx-color-primary);\n text-align: start;\n cursor: pointer;\n}\n\n.wx-team__new:hover,\n.wx-team__new.is-current {\n background: var(--wx-bg-subtle);\n}\n\n.wx-team__loading {\n padding: var(--wx-space-12);\n}\n\n.wx-team__list {\n padding-inline: var(--wx-space-8);\n}\n\n.wx-team__list.is-loading {\n opacity: 0.6;\n}\n\n.wx-team__list :deep(.wx-sortable-list__row) {\n gap: var(--wx-space-4);\n padding-inline: var(--wx-space-4);\n border-radius: var(--wx-radius-sm);\n}\n\n.wx-team__list :deep(.wx-sortable-list__row:hover),\n.wx-team__list :deep(.wx-sortable-list__row:has(.is-current)) {\n background: var(--wx-bg-subtle);\n}\n\n.wx-team__note {\n margin: var(--wx-space-8);\n}\n\n.wx-member-row {\n display: flex;\n align-items: flex-start;\n gap: var(--wx-space-10);\n /* The row is the target: a short name should not leave half the line dead — and a button,\n unlike a link, is only as wide as what is in it until it is told otherwise. */\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n padding-block: var(--wx-space-8);\n padding-inline: 0;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: start;\n}\n\nbutton.wx-member-row {\n cursor: pointer;\n}\n\n.wx-member-row__photo {\n flex: none;\n}\n\n.wx-member-row__body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: var(--wx-space-2);\n min-width: 0;\n}\n\n.wx-member-row__name {\n min-width: 0;\n overflow: hidden;\n font-weight: var(--wx-font-weight-medium);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.wx-member-row.is-current .wx-member-row__name {\n color: var(--wx-color-primary);\n}\n\n.wx-member-row__job {\n overflow: hidden;\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-sm);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.wx-member-row__facts {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--wx-space-4);\n min-width: 0;\n margin-top: var(--wx-space-2);\n}\n</style>\n","import type { AdminModule } from '@webx-ui/module-admin'\nimport TeamPage from './TeamPage.vue'\n\nexport interface TeamOptions {\n /** Where the team lives inside the panel. */\n path?: string\n}\n\n/**\n * The team as a section of the panel (§5.6): one module and one entry, without a group of its\n * own — there are no categories to stand beside it (decision 1), and a group around a single\n * item is a heading over itself. A section whose server half is not installed never appears —\n * the entry is built from the manifest.\n */\nexport function team(options: TeamOptions = {}): AdminModule {\n const path = options.path ?? '/team'\n\n return {\n id: 'team',\n path,\n // One route: the open person is in the address (`?member=`), beside the list they were\n // opened from, so a link to them is a link to both.\n routes: [{ path, name: 'webx.team', component: TeamPage, props: { base: path } }],\n }\n}\n"],"names":["TEAM_API","createTeamApi","admin","base","data","body","query","search","id","values","ids","reorderItems","teamMessages","seeded","useTeamMessages","i18n","useAdmin","props","__props","emit","__emit","context","api","locales","useLocales","t","useTranslate","message","useErrorText","member","ref","snapshot","loading","saving","errors","canManage","computed","current","dirty","state","title","written","fallback","localizedValue","take","detail","blank","load","error","toast","save","made","remove","record","confirm","leaveGuard","event","onKeydown","onMounted","onBeforeUnmount","mayLeave","onBeforeRouteUpdate","to","from","onBeforeRouteLeave","actions","_createElementBlock","_createBlock","_unref","WxSkeleton","_Fragment","_createVNode","WxScreenHead","WxBadge","WxScreen","$event","WxActionBar","WxSaveState","WxButton","route","useRoute","router","useRouter","rows","module","view","value","inBin","q","typed","selected","raw","open","close","views","order","useItemOrder","sortable","emptyText","answer","watch","pause","choose","created","reorder","row","actionsFor","restore","removed","WxListScreen","WxCard","WxListDetail","_createElementVNode","_hoisted_1","WxInput","WxIcon","_normalizeClass","_createTextVNode","WxEmpty","WxSortableList","item","_withCtx","_openBlock","_resolveDynamicComponent","WxAvatar","_hoisted_2","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","WxRowMenu","WxAlert","inline","back","MemberPane","team","options","path","TeamPage"],"mappings":";;;;AAqBO,MAAMA,IAAW;AAGjB,SAASC,GAAcC,GAA8B;AAC1D,QAAMC,IAAO,GAAGD,EAAM,OAAO,IAAIF,CAAQ,IACnCI,IAAO,CAAIC,MAAyBA,EAAK;AAE/C,SAAO;AAAA,IACL,MAAM,CAACC,IAAQ,OAAO;AACpB,YAAMC,IAAS,IAAI,gBAAA;AAEnB,aAAID,EAAM,UAAQC,EAAO,IAAI,UAAUD,EAAM,MAAM,GAC/CA,EAAM,WAASC,EAAO,IAAI,WAAW,GAAG,GAErCL,EAAM,KAAK,IAAiBK,EAAO,OAAO,IAAI,GAAGJ,CAAI,IAAII,CAAM,KAAKJ,CAAI;AAAA,IACjF;AAAA,IACA,KAAK,CAACK,MAAON,EAAM,KAAK,IAA4B,GAAGC,CAAI,IAAIK,CAAE,EAAE,EAAE,KAAKJ,CAAI;AAAA,IAC9E,QAAQ,CAACK,MAAWP,EAAM,KAAK,KAA6BC,GAAM,EAAE,QAAAM,EAAA,CAAQ,EAAE,KAAKL,CAAI;AAAA,IACvF,MAAM,CAACI,GAAIC,MACTP,EAAM,KAAK,IAA4B,GAAGC,CAAI,IAAIK,CAAE,IAAI,EAAE,QAAAC,GAAQ,EAAE,KAAKL,CAAI;AAAA,IAC/E,QAAQ,CAACI,MAAON,EAAM,KAAK,OAAa,GAAGC,CAAI,IAAIK,CAAE,EAAE,EAAE,KAAK,MAAA;AAAA,KAAe;AAAA;AAAA,IAE7E,SAAS,CAACA,MAAON,EAAM,KAAK,KAA0B,GAAGC,CAAI,IAAIK,CAAE,YAAY,CAAA,CAAE,EAAE,KAAKJ,CAAI;AAAA,IAC5F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,eAAA;AAAA,kBACR,aAAaU,EAAA,QAAYiC,EAAA3C,CAAA,0BAA0B;AAAA,gBAAA;;;;;;;;;;;;ACxWzD,SAAS8G,GAAKC,IAAuB,IAAiB;AAC3D,QAAMC,IAAOD,EAAQ,QAAQ;AAE7B,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAAC;AAAA;AAAA;AAAA,IAGA,QAAQ,CAAC,EAAE,MAAAA,GAAM,MAAM,aAAa,WAAWC,IAAU,OAAO,EAAE,MAAMD,EAAA,GAAQ;AAAA,EAAA;AAEpF;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/api.ts","../src/messages.ts","../src/i18n.ts","../src/MemberPane.vue","../src/TeamPage.vue","../src/module.ts"],"sourcesContent":["import { reorderItems, type AdminContext } from '@webx-ui/module-admin'\nimport type { ScreenModel } from '@webx-ui/schema'\nimport type { MemberDetail, MemberQuery, MemberRow, MembersList } from './types'\n\nexport interface TeamApi {\n list(query?: MemberQuery): Promise<MembersList>\n get(id: number): Promise<MemberDetail>\n /**\n * A new person out of the values of their form, in one request: the form is filled in first\n * and the record made on the first save, so nobody leaves an empty person behind.\n */\n create(values: ScreenModel): Promise<MemberDetail>\n /** Refused with a 422 under the name of the field — `socials.<n>.url` for a link. */\n save(id: number, values: ScreenModel): Promise<MemberDetail>\n remove(id: number): Promise<void>\n restore(id: number): Promise<MemberRow>\n /** The one order there is (decision 5). */\n reorder(ids: number[]): Promise<void>\n}\n\n/** The path of the section under the panel's API, and of its order. */\nexport const TEAM_API = 'team'\n\n/** Everything under `/team`, below the panel's API path (§5.7). */\nexport function createTeamApi(admin: AdminContext): TeamApi {\n const base = `${admin.apiPath}/${TEAM_API}`\n const data = <T>(body: { data: T }): T => body.data\n\n return {\n list: (query = {}) => {\n const search = new URLSearchParams()\n\n if (query.search) search.set('search', query.search)\n if (query.trashed) search.set('trashed', '1')\n\n return admin.http.get<MembersList>(search.size > 0 ? `${base}?${search}` : base)\n },\n get: (id) => admin.http.get<{ data: MemberDetail }>(`${base}/${id}`).then(data),\n create: (values) => admin.http.post<{ data: MemberDetail }>(base, { values }).then(data),\n save: (id, values) =>\n admin.http.put<{ data: MemberDetail }>(`${base}/${id}`, { values }).then(data),\n remove: (id) => admin.http.delete<void>(`${base}/${id}`).then(() => undefined),\n // The resource of the list line, and not the form's pair: a restored person stays closed.\n restore: (id) => admin.http.post<{ data: MemberRow }>(`${base}/${id}/restore`, {}).then(data),\n reorder: (ids) => reorderItems(admin, TEAM_API, ids, null),\n }\n}\n","import type { Messages } from '@webx-ui/module-admin'\n\n/**\n * The English this package speaks on its own, before the server's dictionary arrives, or without\n * one. The server ships the same lines in ten languages under `webx-team::` and overrides these;\n * `messages.test.ts` keeps the two sets of keys equal.\n */\nexport const teamMessages: Record<string, Messages> = {\n module: {\n team: 'Team',\n },\n member: {\n new: 'New person',\n untitled: 'Untitled',\n search: 'Search the team',\n empty: 'Nobody on the team yet.',\n 'empty-help': 'A person reaches the site in a team block, on any page.',\n 'empty-search': 'Nothing matches that.',\n 'empty-bin': 'The bin is empty.',\n all: 'All',\n trashed: 'Bin',\n 'not-published': 'Not published',\n 'no-job-title': 'No job title',\n order: 'Drag to change the order on the site.',\n choose: 'Choose a person',\n 'choose-help': 'Or add a new one: the first line of the list.',\n save: 'Save',\n saved: 'Saved.',\n 'save-failed': 'Not saved.',\n cancel: 'Cancel',\n delete: 'Delete',\n 'delete-title': 'Delete “:name” from the team?',\n 'delete-text':\n 'They go to the bin and leave every block on the site. Restored, they come back to their place.',\n deleted: 'Moved to the bin.',\n restore: 'Restore',\n restored: 'Restored.',\n 'reorder-failed': 'The new order was not saved.',\n 'leave-title': 'Leave without saving?',\n 'leave-text': 'What you wrote about this person is not on the server.',\n leave: 'Leave',\n back: 'Back to the list',\n },\n screen: {\n person: 'Person',\n photo: 'Photo',\n 'photo-help': 'Without one, the site shows the initials of the name.',\n name: 'Name',\n 'name-help':\n 'Required in the default language. Not written in another, the default one is shown.',\n 'job-title': 'Job title',\n 'job-title-help':\n 'Printed under the name. Not written in a language, the default one is shown.',\n about: 'About',\n text: 'Text',\n 'text-help': 'Printed only in the language it is written in. The person is shown either way.',\n links: 'Links',\n socials: 'Social networks',\n 'socials-help': 'In the order the site prints them. A row left empty is dropped when you save.',\n 'socials-add': 'Add a link',\n 'socials-empty': 'No links.',\n network: 'Network',\n 'network-placeholder': 'Choose a network',\n url: 'Address',\n services: 'Services',\n 'services-help':\n 'What the person provides: a team block on a service’s page can show only them.',\n settings: 'Settings',\n published: 'Published',\n 'published-help': 'On the site in every team block, from the moment it is saved.',\n },\n}\n","import { useAdmin } from '@webx-ui/module-admin'\nimport { teamMessages } from './messages'\n\nconst seeded = new WeakSet<object>()\n\n/** Puts this package's English under the panel's dictionary, once per panel. */\nexport function useTeamMessages(): void {\n try {\n const { i18n } = useAdmin()\n\n if (!seeded.has(i18n)) {\n i18n.defaults('webx-team', teamMessages)\n seeded.add(i18n)\n }\n } catch {\n // Outside a panel there is no dictionary to seed, and `useTranslate` falls back on its own.\n }\n}\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\nimport { onBeforeRouteLeave, onBeforeRouteUpdate, type RouteLocationNormalized } from 'vue-router'\nimport {\n confirm,\n localizedValue,\n toast,\n useLocales,\n WxActionBar,\n WxBadge,\n WxButton,\n WxSkeleton,\n type LocalizedValue,\n} from '@webx-ui/core'\nimport {\n useAdmin,\n useErrorText,\n useTranslate,\n WxSaveState,\n WxScreen,\n WxScreenHead,\n type ScreenAction,\n useBodyKeys,\n} from '@webx-ui/module-admin'\nimport type { ScreenModel } from '@webx-ui/schema'\nimport { createTeamApi } from './api'\nimport { useTeamMessages } from './i18n'\nimport type { MemberDetail, MemberSummary } from './types'\n\n/**\n * One person: the pane beside the list, and the whole screen on a phone.\n *\n * The described screen `team.form` with a head over it and one button under it. One explicit\n * save, and no autosave: a person has no draft (decision 10), so what is saved is on the site at\n * once — the button is the moment somebody decides it is ready.\n *\n * A new person is a form first and a record on the first save: an empty row made by pressing\n * \"New person\" and walking away would be a nameless card on every team block for ever.\n *\n * The way back is drawn here and not by the pane around it: the drawer a narrow screen opens\n * this in has no close of its own on purpose (CLAUDE.md §4).\n */\ndefineOptions({ name: 'WxMemberPane' })\n\nconst props = withDefaults(\n defineProps<{\n /** `null` — a person not written yet. */\n id: number | null\n /** False in the drawer a narrow screen opens this in. */\n inline?: boolean\n }>(),\n { inline: true },\n)\n\nconst emit = defineEmits<{\n back: []\n /** The person was written; the list redraws their row. */\n saved: [member: MemberSummary]\n /** The first save of a new person: a record now, with an id to be opened by. */\n created: [member: MemberSummary]\n removed: [id: number]\n}>()\n\nconst context = useAdmin()\nconst api = createTeamApi(context)\nconst locales = useLocales()\nuseTeamMessages()\n\nconst t = useTranslate('webx-team')\n/* Not the server's `message`: the panel says how a request failed in its own words. */\nconst message = useErrorText()\n\nconst member = ref<MemberSummary | null>(null)\nconst values = ref<ScreenModel>({})\nconst snapshot = ref('')\n\nconst loading = ref(props.id !== null)\nconst saving = ref(false)\nconst errors = ref<Record<string, string[]>>({})\n\nconst canManage = computed(() => context.can('team.manage'))\n\nconst current = computed(() => JSON.stringify(values.value))\nconst dirty = computed(() => snapshot.value !== '' && current.value !== snapshot.value)\n\nconst state = computed<'saving' | 'unsaved' | 'saved'>(() => {\n if (saving.value) return 'saving'\n\n return dirty.value || props.id === null ? 'unsaved' : 'saved'\n})\n\n/** The name follows the field rather than the answer: an edit shows at the top as it is typed. */\nconst title = computed(() => {\n const written = values.value.name as LocalizedValue | string | null | undefined\n const fallback = props.id === null ? t('member.new') : (member.value?.name ?? '')\n\n return localizedValue(written, locales.active.value, fallback) || t('member.untitled')\n})\n\nfunction take(detail: MemberDetail): void {\n member.value = detail.member\n values.value = detail.values\n snapshot.value = JSON.stringify(detail.values)\n}\n\nif (props.id === null) {\n // What the server would answer for a person with nothing in them yet. No `services`: the field\n // is there only when the site has services (decision 3), and the screen fills its own default.\n const blank: ScreenModel = {\n name: {},\n job_title: {},\n text: {},\n photo: null,\n socials: [],\n published: false,\n }\n\n values.value = blank\n snapshot.value = JSON.stringify(blank)\n}\n\nasync function load(): Promise<void> {\n if (props.id === null) return\n\n loading.value = true\n\n try {\n take(await api.get(props.id))\n } catch (error) {\n toast.danger(message(error))\n emit('back')\n } finally {\n loading.value = false\n }\n}\n\nasync function save(): Promise<void> {\n if (saving.value || !canManage.value) return\n\n saving.value = true\n errors.value = {}\n\n try {\n const made = props.id === null\n const detail = made\n ? await api.create(values.value)\n : await api.save(props.id as number, values.value)\n\n take(detail)\n toast.success(t('member.saved'))\n if (made) emit('created', detail.member)\n else emit('saved', detail.member)\n } catch (error) {\n const body = (error as { body?: { errors?: Record<string, string[]> } }).body\n\n if (body?.errors) {\n errors.value = body.errors\n toast.danger(t('member.save-failed'))\n } else {\n toast.danger(message(error))\n }\n } finally {\n saving.value = false\n }\n}\n\nasync function remove(): Promise<void> {\n const record = member.value\n\n if (!record) return\n\n const agreed = await confirm({\n title: t('member.delete-title', { name: record.name }),\n message: t('member.delete-text'),\n confirmText: t('member.delete'),\n cancelText: t('member.cancel'),\n tone: 'danger',\n })\n\n if (!agreed) return\n\n try {\n await api.remove(record.id)\n toast.success(t('member.deleted'))\n // Nothing left to protect: the record is in the bin.\n snapshot.value = current.value\n emit('removed', record.id)\n } catch (error) {\n toast.danger(message(error))\n }\n}\n\n/* The browser's own guard: it cannot wait for a request, so all it can do is ask. */\nfunction leaveGuard(event: BeforeUnloadEvent): void {\n if (dirty.value) event.preventDefault()\n}\n\n/* Ctrl+S saves, as it does everywhere else that has a save button. */\nfunction onKeydown(event: KeyboardEvent): void {\n if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') {\n event.preventDefault()\n if (dirty.value || props.id === null) void save()\n }\n}\n\n// And from the page around the form, where a click on empty space leaves the focus.\nuseBodyKeys(onKeydown)\n\nonMounted(() => {\n void load()\n window.addEventListener('beforeunload', leaveGuard)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('beforeunload', leaveGuard)\n})\n\nasync function mayLeave(): Promise<boolean> {\n if (!dirty.value || !canManage.value) return true\n\n return await confirm({\n title: t('member.leave-title'),\n message: t('member.leave-text'),\n confirmText: t('member.leave'),\n cancelText: t('member.cancel'),\n tone: 'danger',\n })\n}\n\n/*\n * The list and this form are one route, so another person is an update of it rather than a way\n * out — and so is every keystroke in the search above the list, which goes into the address too.\n * Only a change of the person asks.\n */\nonBeforeRouteUpdate(async (to: RouteLocationNormalized, from: RouteLocationNormalized) =>\n to.query.member === from.query.member ? true : await mayLeave(),\n)\n\nonBeforeRouteLeave(mayLeave)\n\n/* What leads away from the person. On a narrow pane the head folds them into the ···. */\nconst actions = computed<ScreenAction[]>(() =>\n canManage.value && member.value !== null\n ? [\n {\n key: 'delete',\n label: t('member.delete'),\n icon: 'trash',\n danger: true,\n menu: true,\n run: () => void remove(),\n },\n ]\n : [],\n)\n</script>\n\n<template>\n <div class=\"wx-member\" @keydown=\"onKeydown\">\n <wx-skeleton v-if=\"loading\" class=\"wx-member__ghost\" title :rows=\"6\" />\n\n <template v-else>\n <wx-screen-head\n :level=\"3\"\n :back=\"!props.inline\"\n :back-label=\"t('member.back')\"\n :title=\"title\"\n :actions=\"actions\"\n :collapse-below=\"480\"\n @back=\"emit('back')\"\n >\n <template v-if=\"member && !member.published\" #title-after>\n <wx-badge dot>{{ t('member.not-published') }}</wx-badge>\n </template>\n </wx-screen-head>\n\n <wx-screen\n v-model=\"values\"\n name=\"team.form\"\n :errors=\"errors\"\n :disabled=\"!canManage || saving\"\n />\n\n <wx-action-bar v-if=\"canManage\">\n <template #state>\n <wx-save-state :state=\"state\" />\n </template>\n\n <wx-button\n type=\"primary\"\n :loading=\"saving\"\n :disabled=\"!dirty && props.id !== null\"\n @click=\"save\"\n >\n {{ t('member.save') }}\n </wx-button>\n </wx-action-bar>\n </template>\n </div>\n</template>\n\n<style scoped>\n.wx-member {\n display: flex;\n flex-direction: column;\n gap: var(--wx-gap, var(--wx-space-16));\n min-width: 0;\n padding: var(--wx-gap, var(--wx-space-16));\n container-type: inline-size;\n}\n\n.wx-member__ghost {\n max-width: 480px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport { useRoute, useRouter, type LocationQueryRaw } from 'vue-router'\nimport {\n confirm,\n toast,\n WxAlert,\n WxAvatar,\n WxBadge,\n WxCard,\n WxEmpty,\n WxIcon,\n WxInput,\n WxListDetail,\n WxSkeleton,\n WxSortableList,\n type TabItem,\n type TabValue,\n} from '@webx-ui/core'\nimport {\n useAdmin,\n useErrorText,\n useItemOrder,\n useTranslate,\n WxListScreen,\n WxRowMenu,\n type RowAction,\n} from '@webx-ui/module-admin'\nimport { createTeamApi, TEAM_API } from './api'\nimport { useTeamMessages } from './i18n'\nimport MemberPane from './MemberPane.vue'\nimport type { MemberRow, MemberSummary } from './types'\n\n/**\n * The team: everybody on the left, the person being written on the right (§5.6, decision 11).\n *\n * The shape of the reviews without their categories: a person is typed in from a list sent by\n * the client in a minute, and the next one is usually the one under it. On a phone the form is\n * the whole screen, in the drawer `WxListDetail` raises, and draws its own way back.\n *\n * One order, the general one (decision 5): a drag moves it; a search or the bin shows a\n * selection, so the grips go away and the line under the list says why.\n *\n * Everything the screen is looking at lives in the address — the view, the search and the open\n * person — so a link to a person is a link to them in their list.\n */\nwithDefaults(defineProps<{ base?: string }>(), { base: '/team' })\n\nconst context = useAdmin()\nconst api = createTeamApi(context)\nconst route = useRoute()\nconst router = useRouter()\nuseTeamMessages()\n\nconst t = useTranslate('webx-team')\n/* Not the server's `message`: the panel says how a request failed in its own words. */\nconst message = useErrorText()\n\nconst rows = ref<MemberRow[]>([])\nconst loading = ref(true)\n\nconst canManage = computed(() => context.can('team.manage'))\n\nconst title = computed(\n () =>\n context.state.manifest?.modules.find((module) => module.id === 'team')?.title ??\n t('module.team'),\n)\n\nconst view = computed<TabValue>({\n get: () => (route.query.view === 'trashed' ? 'trashed' : ''),\n set: (value) => {\n const query: LocationQueryRaw = {\n ...route.query,\n view: value === '' ? undefined : String(value),\n }\n\n // A person from the list is not a person from the bin: the form closes with the view.\n delete query.member\n void router.replace({ query })\n },\n})\n\nconst inBin = computed(() => view.value === 'trashed')\n\nconst q = computed(() => (typeof route.query.q === 'string' ? route.query.q : ''))\n\n/* What is typed, ahead of the address: the address follows it after a pause. */\nconst typed = ref(q.value)\n\n/** The open person: a number, `'new'` for one not yet saved, or nothing. */\nconst selected = computed<number | 'new' | null>(() => {\n const raw = route.query.member\n\n if (raw === 'new') return canManage.value ? 'new' : null\n\n return typeof raw === 'string' && raw !== '' ? Number(raw) || null : null\n})\n\n/*\n * Open is \"a person is chosen\", and closing is un-choosing them — so the address, the list's\n * highlight and the drawer on a phone can never disagree about it.\n */\nconst open = computed({\n get: () => selected.value !== null,\n set: (value) => {\n if (!value) close()\n },\n})\n\nconst views = computed<TabItem[]>(() => [\n { value: '', label: t('member.all') },\n { value: 'trashed', label: t('member.trashed'), icon: 'trash' },\n])\n\nconst order = useItemOrder(TEAM_API, () => ({ q: q.value, filtered: inBin.value }))\n\n/* Dragged only by somebody who may write, and only in a list that is the whole order. */\nconst sortable = computed(() => canManage.value && order.sortable.value)\n\nconst emptyText = computed(() => {\n if (q.value !== '') return t('member.empty-search')\n\n return inBin.value ? t('member.empty-bin') : t('member.empty')\n})\n\nasync function load(): Promise<void> {\n loading.value = true\n\n try {\n const answer = await api.list({ search: q.value, trashed: inBin.value })\n\n rows.value = answer.data\n } catch (error) {\n toast.danger(message(error))\n } finally {\n loading.value = false\n }\n}\n\nwatch(\n () => [view.value, q.value] as const,\n () => void load(),\n)\nvoid load()\n\nlet pause: ReturnType<typeof setTimeout> | undefined\n\nwatch(typed, (value) => {\n clearTimeout(pause)\n pause = setTimeout(() => {\n void router.replace({ query: { ...route.query, q: value.trim() === '' ? undefined : value } })\n }, 300)\n})\n\nonBeforeUnmount(() => clearTimeout(pause))\n\n/* `replace` and not `push`: going through twenty people is not twenty steps of history. */\nfunction choose(id: number | 'new'): void {\n void router.replace({ query: { ...route.query, member: String(id) } })\n}\n\nfunction close(): void {\n const query = { ...route.query }\n\n delete query.member\n void router.replace({ query })\n}\n\n/** A new person was saved: they are a record now, and the list has them. */\nfunction created(member: MemberSummary): void {\n choose(member.id)\n void load()\n}\n\n/**\n * The order on screen, written as a whole. The list is already in its new order\n * (`WxSortableList` reorders the model before it says so), so a failure has to put it back\n * rather than leave the screen disagreeing with the database.\n */\nasync function reorder(): Promise<void> {\n try {\n await order.move(rows.value.map((row) => row.id))\n } catch (error) {\n toast.danger(message(error, t('member.reorder-failed')))\n await load()\n }\n}\n\nfunction actionsFor(row: MemberRow): RowAction[] {\n if (!canManage.value) return []\n\n if (inBin.value) {\n return [\n {\n key: 'restore',\n icon: 'refresh',\n label: t('member.restore'),\n run: () => void restore(row),\n },\n ]\n }\n\n return [\n {\n key: 'delete',\n icon: 'trash',\n label: t('member.delete'),\n danger: true,\n run: () => void remove(row),\n },\n ]\n}\n\nasync function remove(row: MemberRow): Promise<void> {\n const agreed = await confirm({\n title: t('member.delete-title', { name: row.name }),\n message: t('member.delete-text'),\n confirmText: t('member.delete'),\n cancelText: t('member.cancel'),\n tone: 'danger',\n })\n\n if (!agreed) return\n\n try {\n await api.remove(row.id)\n toast.success(t('member.deleted'))\n removed(row.id)\n } catch (error) {\n toast.danger(message(error))\n }\n}\n\n/** Gone from the list; and if they were the open one, the form goes with them. */\nfunction removed(id: number): void {\n if (selected.value === id) close()\n\n void load()\n}\n\nasync function restore(row: MemberRow): Promise<void> {\n try {\n await api.restore(row.id)\n toast.success(t('member.restored'))\n } catch (error) {\n toast.danger(message(error))\n } finally {\n await load()\n }\n}\n</script>\n\n<template>\n <wx-list-screen v-model:view=\"view\" :title=\"title\" :views=\"views\" :card=\"false\">\n <wx-card class=\"wx-team\" padding=\"none\">\n <wx-list-detail\n v-model:open=\"open\"\n class=\"wx-team__panes\"\n :list-width=\"360\"\n :detail-min=\"460\"\n :detail-label=\"t('module.team')\"\n >\n <template #list>\n <div class=\"wx-team__bar\">\n <wx-input\n v-model=\"typed\"\n class=\"wx-team__search\"\n size=\"sm\"\n clearable\n :placeholder=\"t('member.search')\"\n :aria-label=\"t('member.search')\"\n >\n <template #prefix><wx-icon name=\"search\" size=\"sm\" /></template>\n </wx-input>\n </div>\n\n <!--\n A line of the list rather than a button in the head: the new person is written where\n they will stand, beside the ones they join — and the form opens the way any other does.\n -->\n <button\n v-if=\"canManage && !inBin\"\n type=\"button\"\n class=\"wx-team__new\"\n :class=\"{ 'is-current': selected === 'new' }\"\n @click=\"choose('new')\"\n >\n <wx-icon name=\"plus\" size=\"sm\" />\n {{ t('member.new') }}\n </button>\n\n <wx-skeleton v-if=\"loading && rows.length === 0\" class=\"wx-team__loading\" :rows=\"5\" />\n\n <wx-empty\n v-else-if=\"rows.length === 0\"\n :title=\"emptyText\"\n :description=\"!inBin && q === '' ? t('member.empty-help') : undefined\"\n />\n\n <template v-else>\n <!-- A grip and not the whole row: the row opens a person, and a row that both opens\n and drags is one where one of the two happens by accident. -->\n <wx-sortable-list\n v-model=\"rows\"\n class=\"wx-team__list\"\n :class=\"{ 'is-loading': loading }\"\n plain\n item-key=\"id\"\n :handle=\"sortable ? 'grip' : 'row'\"\n :item-label=\"(item: MemberRow) => item.name\"\n :disabled=\"!sortable\"\n @move=\"reorder\"\n >\n <template #default=\"{ item }\">\n <component\n :is=\"inBin ? 'div' : 'button'\"\n :type=\"inBin ? undefined : 'button'\"\n class=\"wx-member-row\"\n :class=\"{ 'is-current': selected === item.id }\"\n @click=\"inBin ? undefined : choose(item.id)\"\n >\n <wx-avatar\n class=\"wx-member-row__photo\"\n :src=\"item.photo?.thumb ?? undefined\"\n :name=\"item.name\"\n size=\"md\"\n />\n\n <span class=\"wx-member-row__body\">\n <span class=\"wx-member-row__name\">{{ item.name }}</span>\n\n <span v-if=\"item.job_title\" class=\"wx-member-row__job\">\n {{ item.job_title }}\n </span>\n\n <span v-if=\"!item.published\" class=\"wx-member-row__facts\">\n <wx-badge dot size=\"sm\">{{ t('member.not-published') }}</wx-badge>\n </span>\n </span>\n </component>\n </template>\n\n <template #actions=\"{ item }\">\n <wx-row-menu :actions=\"actionsFor(item)\" :label=\"item.name\" />\n </template>\n </wx-sortable-list>\n\n <!-- What a drag does here, or why there is nothing to drag. -->\n <wx-alert\n v-if=\"canManage && !inBin\"\n class=\"wx-team__note\"\n type=\"info\"\n :description=\"order.hint.value\"\n />\n </template>\n </template>\n\n <template #detail=\"{ inline, back }\">\n <member-pane\n v-if=\"selected !== null\"\n :id=\"selected === 'new' ? null : selected\"\n :key=\"String(selected)\"\n :inline=\"inline\"\n @back=\"back\"\n @saved=\"load\"\n @created=\"created\"\n @removed=\"removed\"\n />\n </template>\n\n <template #empty>\n <wx-empty\n :title=\"t('member.choose')\"\n :description=\"canManage ? t('member.choose-help') : undefined\"\n />\n </template>\n </wx-list-detail>\n </wx-card>\n </wx-list-screen>\n</template>\n\n<style>\n/*\n * What scrolls here is the page, the way it does on every other list of the panel. The card's\n * corners are the screen's, and the panes paint their own background to the edge: `clip`, not\n * `hidden`, which would make this a scroll container and pin everything sticky inside to a box\n * that never moves (CLAUDE.md §4).\n */\n.wx-team > .wx-card__body {\n display: flex;\n flex-direction: column;\n overflow: clip;\n border-radius: inherit;\n}\n</style>\n\n<style scoped>\n.wx-team__bar {\n display: flex;\n gap: var(--wx-space-8);\n padding: var(--wx-space-12) var(--wx-space-12) var(--wx-space-8);\n}\n\n.wx-team__search {\n flex: 1 1 180px;\n min-width: 0;\n}\n\n.wx-team__new {\n display: flex;\n align-items: center;\n gap: var(--wx-space-8);\n width: calc(100% - 2 * var(--wx-space-8));\n margin: 0 var(--wx-space-8) var(--wx-space-4);\n padding: var(--wx-space-8);\n border: 1px dashed var(--wx-border-default);\n border-radius: var(--wx-radius-sm);\n background: none;\n font: inherit;\n color: var(--wx-color-primary);\n text-align: start;\n cursor: pointer;\n}\n\n.wx-team__new:hover,\n.wx-team__new.is-current {\n background: var(--wx-bg-subtle);\n}\n\n.wx-team__loading {\n padding: var(--wx-space-12);\n}\n\n.wx-team__list {\n padding-inline: var(--wx-space-8);\n}\n\n.wx-team__list.is-loading {\n opacity: 0.6;\n}\n\n.wx-team__list :deep(.wx-sortable-list__row) {\n gap: var(--wx-space-4);\n padding-inline: var(--wx-space-4);\n border-radius: var(--wx-radius-sm);\n}\n\n.wx-team__list :deep(.wx-sortable-list__row:hover),\n.wx-team__list :deep(.wx-sortable-list__row:has(.is-current)) {\n background: var(--wx-bg-subtle);\n}\n\n.wx-team__note {\n margin: var(--wx-space-8);\n}\n\n.wx-member-row {\n display: flex;\n align-items: flex-start;\n gap: var(--wx-space-10);\n /* The row is the target: a short name should not leave half the line dead — and a button,\n unlike a link, is only as wide as what is in it until it is told otherwise. */\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n padding-block: var(--wx-space-8);\n padding-inline: 0;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: start;\n}\n\nbutton.wx-member-row {\n cursor: pointer;\n}\n\n.wx-member-row__photo {\n flex: none;\n}\n\n.wx-member-row__body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: var(--wx-space-2);\n min-width: 0;\n}\n\n.wx-member-row__name {\n min-width: 0;\n overflow: hidden;\n font-weight: var(--wx-font-weight-medium);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.wx-member-row.is-current .wx-member-row__name {\n color: var(--wx-color-primary);\n}\n\n.wx-member-row__job {\n overflow: hidden;\n color: var(--wx-text-muted);\n font-size: var(--wx-font-size-sm);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.wx-member-row__facts {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--wx-space-4);\n min-width: 0;\n margin-top: var(--wx-space-2);\n}\n</style>\n","import type { AdminModule } from '@webx-ui/module-admin'\nimport TeamPage from './TeamPage.vue'\n\nexport interface TeamOptions {\n /** Where the team lives inside the panel. */\n path?: string\n}\n\n/**\n * The team as a section of the panel (§5.6): one module and one entry, without a group of its\n * own — there are no categories to stand beside it (decision 1), and a group around a single\n * item is a heading over itself. A section whose server half is not installed never appears —\n * the entry is built from the manifest.\n */\nexport function team(options: TeamOptions = {}): AdminModule {\n const path = options.path ?? '/team'\n\n return {\n id: 'team',\n path,\n // One route: the open person is in the address (`?member=`), beside the list they were\n // opened from, so a link to them is a link to both.\n routes: [{ path, name: 'webx.team', component: TeamPage, props: { base: path } }],\n }\n}\n"],"names":["TEAM_API","createTeamApi","admin","base","data","body","query","search","id","values","ids","reorderItems","teamMessages","seeded","useTeamMessages","i18n","useAdmin","props","__props","emit","__emit","context","api","locales","useLocales","t","useTranslate","message","useErrorText","member","ref","snapshot","loading","saving","errors","canManage","computed","current","dirty","state","title","written","fallback","localizedValue","take","detail","blank","load","error","toast","save","made","remove","record","confirm","leaveGuard","event","onKeydown","useBodyKeys","onMounted","onBeforeUnmount","mayLeave","onBeforeRouteUpdate","to","from","onBeforeRouteLeave","actions","_createElementBlock","_createBlock","_unref","WxSkeleton","_Fragment","_createVNode","WxScreenHead","WxBadge","WxScreen","$event","WxActionBar","WxSaveState","WxButton","route","useRoute","router","useRouter","rows","module","view","value","inBin","q","typed","selected","raw","open","close","views","order","useItemOrder","sortable","emptyText","answer","watch","pause","choose","created","reorder","row","actionsFor","restore","removed","WxListScreen","WxCard","WxListDetail","_createElementVNode","_hoisted_1","WxInput","WxIcon","_normalizeClass","_createTextVNode","WxEmpty","WxSortableList","item","_withCtx","_openBlock","_resolveDynamicComponent","WxAvatar","_hoisted_2","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","WxRowMenu","WxAlert","inline","back","MemberPane","team","options","path","TeamPage"],"mappings":";;;;AAqBO,MAAMA,IAAW;AAGjB,SAASC,GAAcC,GAA8B;AAC1D,QAAMC,IAAO,GAAGD,EAAM,OAAO,IAAIF,CAAQ,IACnCI,IAAO,CAAIC,MAAyBA,EAAK;AAE/C,SAAO;AAAA,IACL,MAAM,CAACC,IAAQ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@@
|
|
|
1
|
-
.wx-member[data-v-
|
|
1
|
+
.wx-member[data-v-443f6ebd]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0;padding:var(--wx-gap, var(--wx-space-16));container-type:inline-size}.wx-member__ghost[data-v-443f6ebd]{max-width:480px}.wx-team>.wx-card__body{display:flex;flex-direction:column;overflow:clip;border-radius:inherit}.wx-team__bar[data-v-65fc44a2]{display:flex;gap:var(--wx-space-8);padding:var(--wx-space-12) var(--wx-space-12) var(--wx-space-8)}.wx-team__search[data-v-65fc44a2]{flex:1 1 180px;min-width:0}.wx-team__new[data-v-65fc44a2]{display:flex;align-items:center;gap:var(--wx-space-8);width:calc(100% - 2 * var(--wx-space-8));margin:0 var(--wx-space-8) var(--wx-space-4);padding:var(--wx-space-8);border:1px dashed var(--wx-border-default);border-radius:var(--wx-radius-sm);background:none;font:inherit;color:var(--wx-color-primary);text-align:start;cursor:pointer}.wx-team__new[data-v-65fc44a2]:hover,.wx-team__new.is-current[data-v-65fc44a2]{background:var(--wx-bg-subtle)}.wx-team__loading[data-v-65fc44a2]{padding:var(--wx-space-12)}.wx-team__list[data-v-65fc44a2]{padding-inline:var(--wx-space-8)}.wx-team__list.is-loading[data-v-65fc44a2]{opacity:.6}.wx-team__list[data-v-65fc44a2] .wx-sortable-list__row{gap:var(--wx-space-4);padding-inline:var(--wx-space-4);border-radius:var(--wx-radius-sm)}.wx-team__list[data-v-65fc44a2] .wx-sortable-list__row:hover,.wx-team__list[data-v-65fc44a2] .wx-sortable-list__row:has(.is-current){background:var(--wx-bg-subtle)}.wx-team__note[data-v-65fc44a2]{margin:var(--wx-space-8)}.wx-member-row[data-v-65fc44a2]{display:flex;align-items:flex-start;gap:var(--wx-space-10);flex:1 1 auto;width:100%;min-width:0;padding-block:var(--wx-space-8);padding-inline:0;border:0;background:none;font:inherit;color:inherit;text-align:start}button.wx-member-row[data-v-65fc44a2]{cursor:pointer}.wx-member-row__photo[data-v-65fc44a2]{flex:none}.wx-member-row__body[data-v-65fc44a2]{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--wx-space-2);min-width:0}.wx-member-row__name[data-v-65fc44a2]{min-width:0;overflow:hidden;font-weight:var(--wx-font-weight-medium);text-overflow:ellipsis;white-space:nowrap}.wx-member-row.is-current .wx-member-row__name[data-v-65fc44a2]{color:var(--wx-color-primary)}.wx-member-row__job[data-v-65fc44a2]{overflow:hidden;color:var(--wx-text-muted);font-size:var(--wx-font-size-sm);text-overflow:ellipsis;white-space:nowrap}.wx-member-row__facts[data-v-65fc44a2]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-4);min-width:0;margin-top:var(--wx-space-2)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webx-ui/module-team",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The team for the WebX UI admin panel: people with a photo, a job title, a short text and their social links, ordered by hand, shown on the site by a block.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"vue-router": "^4.5.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@webx-ui/core": "^0.34.
|
|
48
|
-
"@webx-ui/module-admin": "^0.
|
|
49
|
-
"@webx-ui/schema": "^0.6.
|
|
47
|
+
"@webx-ui/core": "^0.34.1",
|
|
48
|
+
"@webx-ui/module-admin": "^0.19.0",
|
|
49
|
+
"@webx-ui/schema": "^0.6.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^24.10.1",
|