@peasant-labs/fairtrade 0.0.27 → 0.0.29
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/README.md +30 -0
- package/dist/lib/commons.js +217 -208
- package/dist/lib/components.css +1 -1
- package/dist/lib/types/DataTable.d.ts +19 -12
- package/dist/lib/types/DataTableControls.d.ts +44 -0
- package/dist/lib/types/Publish.d.ts +6 -4
- package/dist/lib/types/Redaction.d.ts +12 -10
- package/dist/lib/types/index.d.ts +2 -0
- package/dist/lib/types/redaction-categories.d.ts +0 -15
- package/dist/lib/{ui-Y-iKXft1.js → ui-kyAEj4Vo.js} +1381 -1341
- package/dist/lib/ui.js +4 -4
- package/package.json +5 -5
package/dist/lib/commons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as e, Et as t, Ot as n, Vn as r, Xn as i, an as a, br as o, er as s, ft as c, ht as l, in as u, ir as d, jt as f, kt as p, mt as m, nn as h, nr as g, on as _, tr as v, ut as y, wt as b } from "./ui-kyAEj4Vo.js";
|
|
2
2
|
import { ct as x, ft as S, lt as C, mt as w, wt as T } from "./GraphLegend-kO2WP4yM.js";
|
|
3
3
|
import { useEffect as E, useId as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
4
4
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
@@ -215,7 +215,7 @@ function Te({ transcript: e, href: t, onOpen: n }) {
|
|
|
215
215
|
className: "mono",
|
|
216
216
|
children: e.modelName || e.modelProvider
|
|
217
217
|
})]
|
|
218
|
-
}), /* @__PURE__ */ M(
|
|
218
|
+
}), /* @__PURE__ */ M(y, { visibility: e.visibility })]
|
|
219
219
|
}),
|
|
220
220
|
/* @__PURE__ */ M("h3", {
|
|
221
221
|
className: "cex-title",
|
|
@@ -281,7 +281,7 @@ function Ee({ transcript: e, href: t, onOpen: n }) {
|
|
|
281
281
|
className: "cex-trow-date mono tnum",
|
|
282
282
|
children: _e(e.sessionStart || e.sessionEnd || "")
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */ M(
|
|
284
|
+
/* @__PURE__ */ M(y, { visibility: e.visibility })
|
|
285
285
|
] });
|
|
286
286
|
return t ? /* @__PURE__ */ M("a", {
|
|
287
287
|
href: t,
|
|
@@ -331,19 +331,19 @@ function De({ collective: e, href: t, onOpen: n }) {
|
|
|
331
331
|
children: r
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
function Oe({ data:
|
|
335
|
-
let
|
|
334
|
+
function Oe({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript: r, onOpenProfile: i, onOpenCollective: a, transcriptHref: o, profileHref: s, collectiveHref: c }) {
|
|
335
|
+
let l = Ce(e), u = l.transcripts.transcripts, [d, m] = A(""), [h, _] = A(""), [v, b] = A("recent"), [x, S] = A("all"), [C, T] = A(() => /* @__PURE__ */ new Set()), [D, j] = A("grid"), [P, F] = A(() => we(l.transcripts.page)), [I, L] = A(null), [R, B] = A("browse"), V = k(!0), H = k(null);
|
|
336
336
|
E(() => {
|
|
337
337
|
if (V.current) {
|
|
338
|
-
V.current = !1,
|
|
338
|
+
V.current = !1, _(d);
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
let e = setTimeout(() =>
|
|
341
|
+
let e = setTimeout(() => _(d), 250);
|
|
342
342
|
return () => clearTimeout(e);
|
|
343
|
-
}, [V,
|
|
343
|
+
}, [V, d]), E(() => {
|
|
344
344
|
let e = JSON.stringify([
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
h,
|
|
346
|
+
v,
|
|
347
347
|
x,
|
|
348
348
|
[...C].sort()
|
|
349
349
|
]);
|
|
@@ -353,61 +353,61 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
353
353
|
}
|
|
354
354
|
H.current = e, F(1);
|
|
355
355
|
}, [
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
h,
|
|
357
|
+
v,
|
|
358
358
|
x,
|
|
359
359
|
C
|
|
360
360
|
]), E(() => {
|
|
361
|
-
|
|
362
|
-
query:
|
|
361
|
+
n?.({
|
|
362
|
+
query: h,
|
|
363
363
|
provider: x,
|
|
364
364
|
topics: [...C],
|
|
365
|
-
order:
|
|
365
|
+
order: v,
|
|
366
366
|
page: P
|
|
367
367
|
});
|
|
368
368
|
}, [
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
v,
|
|
370
|
+
n,
|
|
371
371
|
P,
|
|
372
372
|
x,
|
|
373
|
-
|
|
373
|
+
h,
|
|
374
374
|
C
|
|
375
375
|
]);
|
|
376
|
-
let U =
|
|
376
|
+
let U = u.find((e) => e.id === I) ?? u[0] ?? null, G = U?.owner ?? null, K = G ? u.filter((e) => e.owner.githubUsername === G.githubUsername) : [], ee = O(() => {
|
|
377
377
|
let e = /* @__PURE__ */ new Map();
|
|
378
|
-
for (let t of
|
|
378
|
+
for (let t of u) e.set(t.modelProvider, (e.get(t.modelProvider) || 0) + 1);
|
|
379
379
|
return [{
|
|
380
380
|
slug: "all",
|
|
381
|
-
count:
|
|
381
|
+
count: u.length
|
|
382
382
|
}, ...[...e.entries()].map(([e, t]) => ({
|
|
383
383
|
slug: e,
|
|
384
384
|
count: t
|
|
385
385
|
}))];
|
|
386
|
-
}, [
|
|
386
|
+
}, [u]);
|
|
387
387
|
E(() => {
|
|
388
|
-
I && !
|
|
389
|
-
}, [I,
|
|
388
|
+
I && !u.some((e) => e.id === I) && (L(null), B("browse"));
|
|
389
|
+
}, [I, u]);
|
|
390
390
|
let q = O(() => {
|
|
391
|
-
let e = ye(
|
|
392
|
-
return e ?
|
|
391
|
+
let e = ye(h);
|
|
392
|
+
return e ? l.collectives.filter((t) => [
|
|
393
393
|
t.name,
|
|
394
394
|
t.description,
|
|
395
395
|
t.linkedGithubOrg
|
|
396
396
|
].filter(Boolean).join(" ").toLowerCase().includes(e)) : null;
|
|
397
|
-
}, [
|
|
398
|
-
if (
|
|
399
|
-
|
|
397
|
+
}, [l.collectives, h]), J = u, re = C.size, ie = l.transcripts.total ?? u.length, ae = P, Y = l.transcripts.limit || u.length || 1, X = (e) => {
|
|
398
|
+
if (r) {
|
|
399
|
+
r(e);
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
402
|
L(e.id), B("detail");
|
|
403
403
|
}, Z = () => {
|
|
404
|
-
if (
|
|
405
|
-
|
|
404
|
+
if (i && G) {
|
|
405
|
+
i(G);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
U ? (L(U.id), B("profile")) :
|
|
408
|
+
U ? (L(U.id), B("profile")) : u[0] && (L(u[0].id), B("profile"));
|
|
409
409
|
}, ce = () => {
|
|
410
|
-
|
|
410
|
+
m(""), _(""), b("recent"), S("all"), T(/* @__PURE__ */ new Set()), F(1);
|
|
411
411
|
}, Q = O(() => G ? [...xe(K, (e) => e.projectName || "untitled project").entries()].map(([e, t]) => ({
|
|
412
412
|
project: e,
|
|
413
413
|
items: t
|
|
@@ -420,7 +420,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
420
420
|
};
|
|
421
421
|
}, [K, Q.length]);
|
|
422
422
|
return R === "detail" && U ? /* @__PURE__ */ N("div", {
|
|
423
|
-
className: `cex-root cex-detail ${
|
|
423
|
+
className: `cex-root cex-detail ${t}`.trim(),
|
|
424
424
|
children: [/* @__PURE__ */ N("div", {
|
|
425
425
|
className: "cex-detail-back",
|
|
426
426
|
children: [/* @__PURE__ */ N("button", {
|
|
@@ -473,7 +473,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
473
473
|
children: [/* @__PURE__ */ M("h2", {
|
|
474
474
|
className: "win-title cex-vtitle",
|
|
475
475
|
children: be(U.title || "untitled transcript")
|
|
476
|
-
}), /* @__PURE__ */ M(
|
|
476
|
+
}), /* @__PURE__ */ M(y, { visibility: U.visibility })]
|
|
477
477
|
}),
|
|
478
478
|
/* @__PURE__ */ N("p", {
|
|
479
479
|
className: "cex-vdesc",
|
|
@@ -583,7 +583,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
583
583
|
})]
|
|
584
584
|
})]
|
|
585
585
|
}),
|
|
586
|
-
/* @__PURE__ */ M(
|
|
586
|
+
/* @__PURE__ */ M(p, { tiles: [
|
|
587
587
|
{
|
|
588
588
|
key: "transcripts",
|
|
589
589
|
label: "transcripts",
|
|
@@ -605,7 +605,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
605
605
|
})]
|
|
606
606
|
})]
|
|
607
607
|
}) : R === "profile" && G ? /* @__PURE__ */ N("div", {
|
|
608
|
-
className: `cex-root cex-profile ${
|
|
608
|
+
className: `cex-root cex-profile ${t}`.trim(),
|
|
609
609
|
children: [
|
|
610
610
|
/* @__PURE__ */ N("div", {
|
|
611
611
|
className: "cex-detail-back",
|
|
@@ -659,7 +659,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
659
659
|
})]
|
|
660
660
|
})]
|
|
661
661
|
}),
|
|
662
|
-
/* @__PURE__ */ M(
|
|
662
|
+
/* @__PURE__ */ M(p, { tiles: [
|
|
663
663
|
{
|
|
664
664
|
key: "transcripts",
|
|
665
665
|
label: "transcripts",
|
|
@@ -719,7 +719,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
719
719
|
className: "cex-lib-rows",
|
|
720
720
|
children: t.map((e) => /* @__PURE__ */ M(Ee, {
|
|
721
721
|
transcript: e,
|
|
722
|
-
href:
|
|
722
|
+
href: o?.(e),
|
|
723
723
|
onOpen: X
|
|
724
724
|
}, e.id))
|
|
725
725
|
})]
|
|
@@ -728,7 +728,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
728
728
|
})
|
|
729
729
|
]
|
|
730
730
|
}) : /* @__PURE__ */ N("div", {
|
|
731
|
-
className: `cex-root ${
|
|
731
|
+
className: `cex-root ${t}`.trim(),
|
|
732
732
|
children: [/* @__PURE__ */ N("header", {
|
|
733
733
|
className: "cex-explore-head",
|
|
734
734
|
children: [
|
|
@@ -745,15 +745,15 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
745
745
|
children: [/* @__PURE__ */ M("input", {
|
|
746
746
|
className: "input",
|
|
747
747
|
type: "text",
|
|
748
|
-
value:
|
|
749
|
-
onChange: (e) =>
|
|
748
|
+
value: d,
|
|
749
|
+
onChange: (e) => m(e.target.value),
|
|
750
750
|
placeholder: "search transcripts, collectives, projects, models...",
|
|
751
751
|
"aria-label": "search transcripts, collectives, projects, models"
|
|
752
|
-
}),
|
|
752
|
+
}), d && /* @__PURE__ */ M("button", {
|
|
753
753
|
type: "button",
|
|
754
754
|
className: "cex-clear",
|
|
755
755
|
"aria-label": "clear search",
|
|
756
|
-
onClick: () =>
|
|
756
|
+
onClick: () => m(""),
|
|
757
757
|
children: /* @__PURE__ */ M(oe, {
|
|
758
758
|
size: 14,
|
|
759
759
|
"aria-hidden": "true"
|
|
@@ -763,13 +763,13 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
763
763
|
]
|
|
764
764
|
}), /* @__PURE__ */ N("div", {
|
|
765
765
|
className: "cex-explore-body",
|
|
766
|
-
children: [/* @__PURE__ */ M(
|
|
767
|
-
order:
|
|
766
|
+
children: [/* @__PURE__ */ M(f, {
|
|
767
|
+
order: v,
|
|
768
768
|
onOrder: (e) => b(e),
|
|
769
769
|
providers: ee,
|
|
770
770
|
activeProviders: x === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([x]),
|
|
771
771
|
onProvider: (e) => S((t) => t === e ? "all" : e),
|
|
772
|
-
topics:
|
|
772
|
+
topics: l.popularTags.map((e) => ({
|
|
773
773
|
tag: e.name,
|
|
774
774
|
count: e.usageCount
|
|
775
775
|
})),
|
|
@@ -804,8 +804,8 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
804
804
|
className: "cex-coll-grid",
|
|
805
805
|
children: q.map((e) => /* @__PURE__ */ M(De, {
|
|
806
806
|
collective: e,
|
|
807
|
-
href:
|
|
808
|
-
onOpen:
|
|
807
|
+
href: c?.(e),
|
|
808
|
+
onOpen: a
|
|
809
809
|
}, e.id))
|
|
810
810
|
})]
|
|
811
811
|
}),
|
|
@@ -852,7 +852,7 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
852
852
|
]
|
|
853
853
|
})]
|
|
854
854
|
}),
|
|
855
|
-
J.length === 0 ?
|
|
855
|
+
J.length === 0 ? h.trim() || x !== "all" || re ? /* @__PURE__ */ N("div", {
|
|
856
856
|
className: "empty cex-empty",
|
|
857
857
|
children: [
|
|
858
858
|
/* @__PURE__ */ M("div", {
|
|
@@ -888,18 +888,18 @@ function Oe({ data: t, className: r = "", onFiltersChange: i, onOpenTranscript:
|
|
|
888
888
|
className: "cex-grid",
|
|
889
889
|
children: J.map((e) => /* @__PURE__ */ M(Te, {
|
|
890
890
|
transcript: e,
|
|
891
|
-
href:
|
|
891
|
+
href: o?.(e),
|
|
892
892
|
onOpen: X
|
|
893
893
|
}, e.id))
|
|
894
894
|
}) : /* @__PURE__ */ M("div", {
|
|
895
895
|
className: "cex-list",
|
|
896
896
|
children: J.map((e) => /* @__PURE__ */ M(Ee, {
|
|
897
897
|
transcript: e,
|
|
898
|
-
href:
|
|
898
|
+
href: o?.(e),
|
|
899
899
|
onOpen: X
|
|
900
900
|
}, e.id))
|
|
901
901
|
}),
|
|
902
|
-
ie > Y && /* @__PURE__ */ M(
|
|
902
|
+
ie > Y && /* @__PURE__ */ M(g, {
|
|
903
903
|
page: ae,
|
|
904
904
|
totalItems: ie,
|
|
905
905
|
pageSize: Y,
|
|
@@ -1342,30 +1342,30 @@ function Re() {
|
|
|
1342
1342
|
project: t.name
|
|
1343
1343
|
})), e;
|
|
1344
1344
|
}, []);
|
|
1345
|
-
function
|
|
1345
|
+
function s(e) {
|
|
1346
1346
|
t((t) => {
|
|
1347
1347
|
let n = new Set(t);
|
|
1348
1348
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1349
1349
|
});
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function c(t) {
|
|
1352
1352
|
let n = t.transcripts.map((e) => e.id), r = n.filter((t) => e.has(t)).length;
|
|
1353
1353
|
return r === 0 ? "none" : r === n.length ? "all" : "some";
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
let n =
|
|
1355
|
+
function l(e) {
|
|
1356
|
+
let n = c(e);
|
|
1357
1357
|
t((t) => {
|
|
1358
1358
|
let r = new Set(t);
|
|
1359
1359
|
return e.transcripts.forEach((e) => n === "all" ? r.delete(e.id) : r.add(e.id)), r;
|
|
1360
1360
|
});
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function u(e) {
|
|
1363
1363
|
r((t) => {
|
|
1364
1364
|
let n = new Set(t);
|
|
1365
1365
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1366
1366
|
});
|
|
1367
1367
|
}
|
|
1368
|
-
let
|
|
1368
|
+
let d = [...e].map((e) => o[e]).filter(Boolean), f = d.filter((e) => e.visibility === "private").length;
|
|
1369
1369
|
return /* @__PURE__ */ N("div", {
|
|
1370
1370
|
className: "cmg-root",
|
|
1371
1371
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -1405,7 +1405,7 @@ function Re() {
|
|
|
1405
1405
|
className: "card cmg-contribute",
|
|
1406
1406
|
"aria-label": "your transcripts by project",
|
|
1407
1407
|
children: Ie.map((t) => {
|
|
1408
|
-
let r =
|
|
1408
|
+
let r = c(t), i = n.has(t.id);
|
|
1409
1409
|
return /* @__PURE__ */ N("div", {
|
|
1410
1410
|
className: "cmg-proj",
|
|
1411
1411
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -1417,14 +1417,14 @@ function Re() {
|
|
|
1417
1417
|
className: "check-box",
|
|
1418
1418
|
checked: r === "all",
|
|
1419
1419
|
ref: (e) => e && (e.indeterminate = r === "some"),
|
|
1420
|
-
onChange: () =>
|
|
1420
|
+
onChange: () => l(t),
|
|
1421
1421
|
"aria-label": `select all in ${t.name}`
|
|
1422
1422
|
})
|
|
1423
1423
|
}), /* @__PURE__ */ N("button", {
|
|
1424
1424
|
type: "button",
|
|
1425
1425
|
className: "cmg-proj-toggle",
|
|
1426
1426
|
"aria-expanded": i,
|
|
1427
|
-
onClick: () =>
|
|
1427
|
+
onClick: () => u(t.id),
|
|
1428
1428
|
children: [
|
|
1429
1429
|
M(i ? I : L, {
|
|
1430
1430
|
size: 15,
|
|
@@ -1462,7 +1462,7 @@ function Re() {
|
|
|
1462
1462
|
type: "checkbox",
|
|
1463
1463
|
className: "check-box",
|
|
1464
1464
|
checked: e.has(t.id),
|
|
1465
|
-
onChange: () =>
|
|
1465
|
+
onChange: () => s(t.id),
|
|
1466
1466
|
"aria-label": `select ${t.title}`
|
|
1467
1467
|
})
|
|
1468
1468
|
}),
|
|
@@ -1504,13 +1504,13 @@ function Re() {
|
|
|
1504
1504
|
children: e.size
|
|
1505
1505
|
}),
|
|
1506
1506
|
" selected",
|
|
1507
|
-
|
|
1507
|
+
f > 0 ? /* @__PURE__ */ N("span", {
|
|
1508
1508
|
className: "cmg-sel-warn",
|
|
1509
1509
|
children: [
|
|
1510
1510
|
", ",
|
|
1511
1511
|
/* @__PURE__ */ M("span", {
|
|
1512
1512
|
className: "tnum",
|
|
1513
|
-
children:
|
|
1513
|
+
children: f
|
|
1514
1514
|
}),
|
|
1515
1515
|
" private"
|
|
1516
1516
|
]
|
|
@@ -1534,20 +1534,20 @@ function Re() {
|
|
|
1534
1534
|
})]
|
|
1535
1535
|
})
|
|
1536
1536
|
]
|
|
1537
|
-
}), /* @__PURE__ */ M(
|
|
1537
|
+
}), /* @__PURE__ */ M(_, {
|
|
1538
1538
|
open: i,
|
|
1539
1539
|
title: /* @__PURE__ */ N(j, { children: [
|
|
1540
1540
|
"make ",
|
|
1541
|
-
|
|
1541
|
+
f > 1 ? "these" : "this",
|
|
1542
1542
|
" visible?"
|
|
1543
1543
|
] }),
|
|
1544
|
-
intro:
|
|
1544
|
+
intro: f > 0 ? /* @__PURE__ */ N("p", { children: [
|
|
1545
1545
|
/* @__PURE__ */ M("span", {
|
|
1546
1546
|
className: "tnum",
|
|
1547
|
-
children:
|
|
1547
|
+
children: f
|
|
1548
1548
|
}),
|
|
1549
1549
|
" private transcript",
|
|
1550
|
-
|
|
1550
|
+
f === 1 ? "" : "s",
|
|
1551
1551
|
" will become visible to members of ",
|
|
1552
1552
|
/* @__PURE__ */ M("b", { children: Le.name }),
|
|
1553
1553
|
". visibility will change from private to shared."
|
|
@@ -1561,9 +1561,9 @@ function Re() {
|
|
|
1561
1561
|
axes: [{
|
|
1562
1562
|
icon: H,
|
|
1563
1563
|
key: "visibility",
|
|
1564
|
-
value:
|
|
1565
|
-
scope:
|
|
1566
|
-
tone:
|
|
1564
|
+
value: f > 0 ? "private → shared" : "unchanged",
|
|
1565
|
+
scope: f > 0 ? `${f} transcript${f === 1 ? "" : "s"} newly exposed` : "no visibility change",
|
|
1566
|
+
tone: f > 0 ? "reveal" : "open"
|
|
1567
1567
|
}, {
|
|
1568
1568
|
icon: Q,
|
|
1569
1569
|
key: "shared with",
|
|
@@ -1571,14 +1571,14 @@ function Re() {
|
|
|
1571
1571
|
scope: `${Le.members} members can see it`,
|
|
1572
1572
|
tone: "open"
|
|
1573
1573
|
}],
|
|
1574
|
-
requireConsent:
|
|
1575
|
-
confirmLabel:
|
|
1574
|
+
requireConsent: f > 0,
|
|
1575
|
+
confirmLabel: f > 0 ? "contribute & make visible" : "contribute",
|
|
1576
1576
|
confirmIcon: P,
|
|
1577
1577
|
onCancel: () => a(!1),
|
|
1578
1578
|
onConfirm: () => a(!1),
|
|
1579
1579
|
children: /* @__PURE__ */ N("ul", {
|
|
1580
1580
|
className: "cmg-confirm-list",
|
|
1581
|
-
children: [
|
|
1581
|
+
children: [d.slice(0, 5).map((e) => /* @__PURE__ */ N("li", {
|
|
1582
1582
|
className: "cmg-confirm-tx",
|
|
1583
1583
|
children: [
|
|
1584
1584
|
/* @__PURE__ */ M(ProviderMark, { id: e.provider }),
|
|
@@ -1588,11 +1588,11 @@ function Re() {
|
|
|
1588
1588
|
}),
|
|
1589
1589
|
/* @__PURE__ */ M(Pe, { v: e.visibility })
|
|
1590
1590
|
]
|
|
1591
|
-
}, e.id)),
|
|
1591
|
+
}, e.id)), d.length > 5 ? /* @__PURE__ */ N("li", {
|
|
1592
1592
|
className: "cmg-confirm-more mono",
|
|
1593
1593
|
children: [
|
|
1594
1594
|
"…and ",
|
|
1595
|
-
|
|
1595
|
+
d.length - 5,
|
|
1596
1596
|
" more"
|
|
1597
1597
|
]
|
|
1598
1598
|
}) : null]
|
|
@@ -1655,8 +1655,8 @@ function We(e, t, n) {
|
|
|
1655
1655
|
children: e
|
|
1656
1656
|
}, e));
|
|
1657
1657
|
}
|
|
1658
|
-
function Ge({ data: e = {}, actions:
|
|
1659
|
-
let { collectives:
|
|
1658
|
+
function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
1659
|
+
let { collectives: n = [], linkedOrgs: i = [], title: s = "collectives", deck: c = "a collective is a group that can read the transcripts its members publish to it. link your repositories so pull requests find them.", crumb: l, caption: u = "collectives", createLabel: f = "new collective", createBusy: p = !1, whoCanPublish: m = ze, whoCanRead: h = Be } = e, { onCreateCollective: g, onOpenCollective: _, onSearchCollectives: v } = t, [y, b] = A(!1), [x, S] = A(""), [C, w] = A(""), [T, E] = A(m[0]?.value ?? ""), [O, k] = A(h[0]?.value ?? ""), [j, P] = A(""), [F, I] = A(""), L = D(), R = [
|
|
1660
1660
|
{
|
|
1661
1661
|
key: "name",
|
|
1662
1662
|
label: "name",
|
|
@@ -1695,7 +1695,7 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1695
1695
|
align: "right",
|
|
1696
1696
|
render: (e) => typeof e == "number" ? e.toLocaleString("en-US") : e
|
|
1697
1697
|
},
|
|
1698
|
-
...
|
|
1698
|
+
...n.some((e) => e.org !== void 0) ? [{
|
|
1699
1699
|
key: "org",
|
|
1700
1700
|
label: "github org",
|
|
1701
1701
|
render: (e, t) => t.org ? /* @__PURE__ */ N("span", {
|
|
@@ -1715,9 +1715,9 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1715
1715
|
return /* @__PURE__ */ N("div", {
|
|
1716
1716
|
className: "iu-page",
|
|
1717
1717
|
children: [
|
|
1718
|
-
|
|
1718
|
+
l ? /* @__PURE__ */ M("div", {
|
|
1719
1719
|
className: "cmg-crumb",
|
|
1720
|
-
children: /* @__PURE__ */ M(
|
|
1720
|
+
children: /* @__PURE__ */ M(d, { items: [{ label: l }] })
|
|
1721
1721
|
}) : null,
|
|
1722
1722
|
/* @__PURE__ */ N("header", {
|
|
1723
1723
|
className: "iu-page-head",
|
|
@@ -1725,7 +1725,7 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1725
1725
|
className: "iu-page-titlerow",
|
|
1726
1726
|
children: [/* @__PURE__ */ M("h2", {
|
|
1727
1727
|
className: "iu-page-title",
|
|
1728
|
-
children:
|
|
1728
|
+
children: s
|
|
1729
1729
|
}), /* @__PURE__ */ N("button", {
|
|
1730
1730
|
type: "button",
|
|
1731
1731
|
className: "btn btn-sm " + (y ? "btn-secondary" : "btn-primary"),
|
|
@@ -1737,12 +1737,12 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1737
1737
|
"aria-hidden": "true"
|
|
1738
1738
|
}),
|
|
1739
1739
|
" ",
|
|
1740
|
-
y ? "close" :
|
|
1740
|
+
y ? "close" : f
|
|
1741
1741
|
]
|
|
1742
1742
|
})]
|
|
1743
|
-
}),
|
|
1743
|
+
}), c ? /* @__PURE__ */ M("p", {
|
|
1744
1744
|
className: "iu-page-sub",
|
|
1745
|
-
children:
|
|
1745
|
+
children: c
|
|
1746
1746
|
}) : null]
|
|
1747
1747
|
}),
|
|
1748
1748
|
y && /* @__PURE__ */ N("section", {
|
|
@@ -1789,7 +1789,7 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1789
1789
|
name: "who-can-publish",
|
|
1790
1790
|
value: T,
|
|
1791
1791
|
onChange: E,
|
|
1792
|
-
options:
|
|
1792
|
+
options: m.map((e) => ({
|
|
1793
1793
|
...e,
|
|
1794
1794
|
rationale: e.help
|
|
1795
1795
|
}))
|
|
@@ -1834,7 +1834,7 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1834
1834
|
children: [/* @__PURE__ */ M("button", {
|
|
1835
1835
|
type: "button",
|
|
1836
1836
|
className: "btn btn-sm btn-primary",
|
|
1837
|
-
disabled: !x.trim() ||
|
|
1837
|
+
disabled: !x.trim() || p,
|
|
1838
1838
|
"aria-describedby": L,
|
|
1839
1839
|
onClick: () => g?.({
|
|
1840
1840
|
name: x,
|
|
@@ -1843,23 +1843,23 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1843
1843
|
access: O,
|
|
1844
1844
|
org: j
|
|
1845
1845
|
}),
|
|
1846
|
-
children:
|
|
1846
|
+
children: p ? "creating" : "create collective"
|
|
1847
1847
|
}), /* @__PURE__ */ M("span", {
|
|
1848
1848
|
id: L,
|
|
1849
1849
|
className: "cmg-form-hint mono",
|
|
1850
|
-
children:
|
|
1850
|
+
children: m.find((e) => e.value === T)?.help
|
|
1851
1851
|
})]
|
|
1852
1852
|
})
|
|
1853
1853
|
]
|
|
1854
1854
|
}),
|
|
1855
1855
|
/* @__PURE__ */ N("div", {
|
|
1856
1856
|
className: "cmg-section",
|
|
1857
|
-
children: [/* @__PURE__ */ M(
|
|
1858
|
-
caption: `${
|
|
1857
|
+
children: [/* @__PURE__ */ M(r, {
|
|
1858
|
+
caption: `${u} ${n.length}`,
|
|
1859
1859
|
columns: R,
|
|
1860
|
-
rows:
|
|
1860
|
+
rows: n,
|
|
1861
1861
|
rowKey: (e) => e.id
|
|
1862
|
-
}),
|
|
1862
|
+
}), n.some((e) => e.mode === "curated") ? /* @__PURE__ */ M("p", {
|
|
1863
1863
|
className: "cmg-note",
|
|
1864
1864
|
children: "in a curated collective, each transcript you publish waits for the owner to approve it."
|
|
1865
1865
|
}) : null]
|
|
@@ -1883,7 +1883,7 @@ function Ge({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1883
1883
|
onSubmit: (e) => {
|
|
1884
1884
|
e.preventDefault(), v(F);
|
|
1885
1885
|
},
|
|
1886
|
-
children: [/* @__PURE__ */ M(
|
|
1886
|
+
children: [/* @__PURE__ */ M(o, {
|
|
1887
1887
|
label: "collective or github org",
|
|
1888
1888
|
type: "search",
|
|
1889
1889
|
iconLeft: ae,
|
|
@@ -1922,7 +1922,7 @@ function qe(e = {}) {
|
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
1924
|
function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
1925
|
-
let { owners:
|
|
1925
|
+
let { owners: i = [], linkedRepos: a = [], hrefFor: o } = e, s = qe(e.collective), { onSettings: l, onContribute: u, onReview: f, onOpenTranscript: p, onOpenPullRequest: m, onLinkRepos: h, onShowMore: g } = n, [_, y] = A(!1), x = D(), C = s.transcriptCount ?? s.transcripts.length, w = [
|
|
1926
1926
|
{
|
|
1927
1927
|
key: "title",
|
|
1928
1928
|
label: "title",
|
|
@@ -1966,8 +1966,8 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1966
1966
|
label: "pull requests",
|
|
1967
1967
|
render: (e, t) => t.pullRequests?.length ? /* @__PURE__ */ N("span", {
|
|
1968
1968
|
className: "cmg-prs",
|
|
1969
|
-
children: [/* @__PURE__ */ M(
|
|
1970
|
-
items: We(t.pullRequests,
|
|
1969
|
+
children: [/* @__PURE__ */ M(b, {
|
|
1970
|
+
items: We(t.pullRequests, m, o),
|
|
1971
1971
|
label: "pull requests",
|
|
1972
1972
|
noun: ["pull request", "pull requests"]
|
|
1973
1973
|
}), t.repo && /* @__PURE__ */ M("span", {
|
|
@@ -2005,7 +2005,7 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
2005
2005
|
children: [
|
|
2006
2006
|
/* @__PURE__ */ M("div", {
|
|
2007
2007
|
className: "cmg-crumb-content",
|
|
2008
|
-
children: /* @__PURE__ */ M(
|
|
2008
|
+
children: /* @__PURE__ */ M(d, { items: [{
|
|
2009
2009
|
label: "collectives",
|
|
2010
2010
|
href: o?.("collectives")
|
|
2011
2011
|
}, { label: s.name }] })
|
|
@@ -2028,7 +2028,7 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
2028
2028
|
size: 14,
|
|
2029
2029
|
"aria-hidden": "true"
|
|
2030
2030
|
}), " settings"]
|
|
2031
|
-
}), (u || f) && /* @__PURE__ */ M(
|
|
2031
|
+
}), (u || f) && /* @__PURE__ */ M(v, {
|
|
2032
2032
|
icon: re,
|
|
2033
2033
|
ariaLabel: "more",
|
|
2034
2034
|
size: "sm",
|
|
@@ -2063,7 +2063,7 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
2063
2063
|
})]
|
|
2064
2064
|
}, e.key))
|
|
2065
2065
|
}),
|
|
2066
|
-
/* @__PURE__ */ M(
|
|
2066
|
+
/* @__PURE__ */ M(t, {
|
|
2067
2067
|
items: s.stats,
|
|
2068
2068
|
label: `${s.name} in numbers`
|
|
2069
2069
|
}),
|
|
@@ -2071,24 +2071,33 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
2071
2071
|
className: "cmg-home",
|
|
2072
2072
|
children: [/* @__PURE__ */ N("div", {
|
|
2073
2073
|
className: "cmg-home-main",
|
|
2074
|
-
children: [/* @__PURE__ */ M(
|
|
2074
|
+
children: [/* @__PURE__ */ M(r, {
|
|
2075
2075
|
caption: `transcripts ${C}`,
|
|
2076
2076
|
columns: w,
|
|
2077
2077
|
rows: s.transcripts,
|
|
2078
|
-
rowKey: (e) => e.id
|
|
2079
|
-
|
|
2080
|
-
pagination: {
|
|
2081
|
-
pageIndex: 0,
|
|
2082
|
-
pageSize: Math.max(1, C)
|
|
2083
|
-
}
|
|
2084
|
-
}), C > s.transcripts.length && v && /* @__PURE__ */ M("div", {
|
|
2078
|
+
rowKey: (e) => e.id
|
|
2079
|
+
}), /* @__PURE__ */ N("div", {
|
|
2085
2080
|
className: "iu-page-foot",
|
|
2086
|
-
children: /* @__PURE__ */
|
|
2081
|
+
children: [/* @__PURE__ */ N("span", {
|
|
2082
|
+
className: "iu-page-count",
|
|
2083
|
+
children: [
|
|
2084
|
+
"showing ",
|
|
2085
|
+
/* @__PURE__ */ M("span", {
|
|
2086
|
+
className: "tnum",
|
|
2087
|
+
children: s.transcripts.length
|
|
2088
|
+
}),
|
|
2089
|
+
" of ",
|
|
2090
|
+
/* @__PURE__ */ M("span", {
|
|
2091
|
+
className: "tnum",
|
|
2092
|
+
children: C
|
|
2093
|
+
})
|
|
2094
|
+
]
|
|
2095
|
+
}), C > s.transcripts.length && g && /* @__PURE__ */ M("button", {
|
|
2087
2096
|
type: "button",
|
|
2088
2097
|
className: "btn btn-secondary btn-sm",
|
|
2089
|
-
onClick: () =>
|
|
2098
|
+
onClick: () => g(),
|
|
2090
2099
|
children: "show more"
|
|
2091
|
-
})
|
|
2100
|
+
})]
|
|
2092
2101
|
})]
|
|
2093
2102
|
}), /* @__PURE__ */ N("aside", {
|
|
2094
2103
|
className: "cmg-rail",
|
|
@@ -2122,10 +2131,10 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
2122
2131
|
}),
|
|
2123
2132
|
" repos linked"
|
|
2124
2133
|
] }) : null,
|
|
2125
|
-
s.role === "owner" &&
|
|
2134
|
+
s.role === "owner" && h && /* @__PURE__ */ M("button", {
|
|
2126
2135
|
type: "button",
|
|
2127
2136
|
className: "btn btn-ghost btn-sm",
|
|
2128
|
-
onClick: () =>
|
|
2137
|
+
onClick: () => y(!0),
|
|
2129
2138
|
children: "manage"
|
|
2130
2139
|
})
|
|
2131
2140
|
]
|
|
@@ -2161,15 +2170,15 @@ function Je({ data: e = {}, actions: n = {} } = {}) {
|
|
|
2161
2170
|
})]
|
|
2162
2171
|
})
|
|
2163
2172
|
]
|
|
2164
|
-
}),
|
|
2165
|
-
open:
|
|
2166
|
-
onClose: () =>
|
|
2167
|
-
owners:
|
|
2173
|
+
}), h && /* @__PURE__ */ M(c, {
|
|
2174
|
+
open: _,
|
|
2175
|
+
onClose: () => y(!1),
|
|
2176
|
+
owners: i,
|
|
2168
2177
|
initialSelected: a,
|
|
2169
2178
|
title: `link repositories from ${s.org?.login ?? "github"}`,
|
|
2170
2179
|
description: `pull requests in linked repos show the transcripts published to ${s.name}.`,
|
|
2171
2180
|
onSave: (e) => {
|
|
2172
|
-
|
|
2181
|
+
h(e), y(!1);
|
|
2173
2182
|
}
|
|
2174
2183
|
})] });
|
|
2175
2184
|
}
|
|
@@ -2189,27 +2198,27 @@ function Xe(e, t) {
|
|
|
2189
2198
|
}
|
|
2190
2199
|
var Ze = (e, t) => t.some((t) => t.value === e) ? e : "";
|
|
2191
2200
|
function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
2192
|
-
let { owners: n = [], linkedRepos: r = [], showOnPullRequests:
|
|
2201
|
+
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: a = !1, whoCanPublish: s = ze, whoCanRead: u = Be, memberLeavesChoices: f = Ye, hrefFor: p } = e, h = qe(e.collective), g = (e) => (n) => t.onCommit ? t.onCommit(e, n) : Promise.resolve(), [_, v] = A(!1), [y, b] = A(""), x = !!(t.onTransferOwnership || t.onDelete), S = [
|
|
2193
2202
|
"general",
|
|
2194
2203
|
"access",
|
|
2195
2204
|
"members",
|
|
2196
2205
|
"github orgs",
|
|
2197
2206
|
"pull requests",
|
|
2198
2207
|
...x ? ["danger zone"] : []
|
|
2199
|
-
], C = (e) => `cmg-settings-${e.replace(/ /g, "-")}`, w = (e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "), T =
|
|
2208
|
+
], C = (e) => `cmg-settings-${e.replace(/ /g, "-")}`, w = (e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "), T = p?.("account");
|
|
2200
2209
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("div", {
|
|
2201
2210
|
className: "iu-page cmg-settings",
|
|
2202
2211
|
children: [
|
|
2203
2212
|
/* @__PURE__ */ M("div", {
|
|
2204
2213
|
className: "cmg-crumb-content",
|
|
2205
|
-
children: /* @__PURE__ */ M(
|
|
2214
|
+
children: /* @__PURE__ */ M(d, { items: [
|
|
2206
2215
|
{
|
|
2207
2216
|
label: "collectives",
|
|
2208
|
-
href:
|
|
2217
|
+
href: p?.("collectives")
|
|
2209
2218
|
},
|
|
2210
2219
|
{
|
|
2211
|
-
label:
|
|
2212
|
-
href:
|
|
2220
|
+
label: h.name,
|
|
2221
|
+
href: p?.("collective", h.id)
|
|
2213
2222
|
},
|
|
2214
2223
|
{ label: "settings" }
|
|
2215
2224
|
] })
|
|
@@ -2220,7 +2229,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2220
2229
|
className: "iu-page-title",
|
|
2221
2230
|
children: [/* @__PURE__ */ M("span", {
|
|
2222
2231
|
className: "iu-page-title-content",
|
|
2223
|
-
children:
|
|
2232
|
+
children: h.name
|
|
2224
2233
|
}), ", settings"]
|
|
2225
2234
|
}), /* @__PURE__ */ M("p", {
|
|
2226
2235
|
className: "iu-page-sub",
|
|
@@ -2235,73 +2244,73 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2235
2244
|
children: e
|
|
2236
2245
|
}, e))
|
|
2237
2246
|
}),
|
|
2238
|
-
/* @__PURE__ */ N(
|
|
2247
|
+
/* @__PURE__ */ N(m, {
|
|
2239
2248
|
label: "general",
|
|
2240
2249
|
defaultOpen: !0,
|
|
2241
2250
|
id: C("general"),
|
|
2242
|
-
children: [/* @__PURE__ */ M(
|
|
2251
|
+
children: [/* @__PURE__ */ M(l, {
|
|
2243
2252
|
label: "name",
|
|
2244
2253
|
control: "text",
|
|
2245
|
-
value:
|
|
2246
|
-
onCommit:
|
|
2247
|
-
}), /* @__PURE__ */ M(
|
|
2254
|
+
value: h.name,
|
|
2255
|
+
onCommit: g("name")
|
|
2256
|
+
}), /* @__PURE__ */ M(l, {
|
|
2248
2257
|
label: "purpose",
|
|
2249
2258
|
control: "text",
|
|
2250
|
-
value:
|
|
2251
|
-
onCommit:
|
|
2259
|
+
value: h.purpose ?? "",
|
|
2260
|
+
onCommit: g("purpose")
|
|
2252
2261
|
})]
|
|
2253
2262
|
}),
|
|
2254
|
-
/* @__PURE__ */ N(
|
|
2263
|
+
/* @__PURE__ */ N(m, {
|
|
2255
2264
|
label: "access",
|
|
2256
2265
|
defaultOpen: !0,
|
|
2257
2266
|
id: C("access"),
|
|
2258
|
-
children: [/* @__PURE__ */ M(
|
|
2267
|
+
children: [/* @__PURE__ */ M(l, {
|
|
2259
2268
|
label: "who can publish",
|
|
2260
|
-
help: w(
|
|
2269
|
+
help: w(s),
|
|
2261
2270
|
control: "select",
|
|
2262
|
-
value: Ze(
|
|
2263
|
-
options: Xe(
|
|
2264
|
-
onCommit:
|
|
2265
|
-
}), /* @__PURE__ */ M(
|
|
2271
|
+
value: Ze(h.mode, s),
|
|
2272
|
+
options: Xe(h.mode, s),
|
|
2273
|
+
onCommit: g("mode")
|
|
2274
|
+
}), /* @__PURE__ */ M(l, {
|
|
2266
2275
|
label: "who can read",
|
|
2267
2276
|
help: "members read and publish. contributors publish, and read only if who can read allows it.",
|
|
2268
2277
|
control: "select",
|
|
2269
|
-
value: Ze(
|
|
2270
|
-
options: Xe(
|
|
2271
|
-
onCommit:
|
|
2278
|
+
value: Ze(h.access, u),
|
|
2279
|
+
options: Xe(h.access, u),
|
|
2280
|
+
onCommit: g("access")
|
|
2272
2281
|
})]
|
|
2273
2282
|
}),
|
|
2274
|
-
/* @__PURE__ */ N(
|
|
2283
|
+
/* @__PURE__ */ N(m, {
|
|
2275
2284
|
label: "members",
|
|
2276
2285
|
defaultOpen: !0,
|
|
2277
|
-
count:
|
|
2286
|
+
count: h.memberCount ?? null,
|
|
2278
2287
|
noun: ["member", "members"],
|
|
2279
2288
|
id: C("members"),
|
|
2280
2289
|
children: [
|
|
2281
2290
|
t.onInvite && /* @__PURE__ */ N("form", {
|
|
2282
2291
|
className: "srow cmg-invite",
|
|
2283
2292
|
onSubmit: (e) => {
|
|
2284
|
-
e.preventDefault(), t.onInvite(
|
|
2293
|
+
e.preventDefault(), t.onInvite(y), b("");
|
|
2285
2294
|
},
|
|
2286
|
-
children: [/* @__PURE__ */ M(
|
|
2295
|
+
children: [/* @__PURE__ */ M(o, {
|
|
2287
2296
|
label: "invite by github username",
|
|
2288
|
-
value:
|
|
2289
|
-
onChange: (e) =>
|
|
2297
|
+
value: y,
|
|
2298
|
+
onChange: (e) => b(e.target.value),
|
|
2290
2299
|
placeholder: "github username"
|
|
2291
2300
|
}), /* @__PURE__ */ M("button", {
|
|
2292
2301
|
type: "submit",
|
|
2293
2302
|
className: "btn btn-secondary btn-sm",
|
|
2294
|
-
disabled: !
|
|
2303
|
+
disabled: !y.trim(),
|
|
2295
2304
|
children: "invite"
|
|
2296
2305
|
})]
|
|
2297
2306
|
}),
|
|
2298
2307
|
/* @__PURE__ */ M("ul", {
|
|
2299
2308
|
className: "cmg-member-list",
|
|
2300
2309
|
"aria-label": "members",
|
|
2301
|
-
children:
|
|
2310
|
+
children: h.members.map((e) => /* @__PURE__ */ N("li", {
|
|
2302
2311
|
className: "cmg-member",
|
|
2303
2312
|
children: [
|
|
2304
|
-
/* @__PURE__ */ M(
|
|
2313
|
+
/* @__PURE__ */ M(i, {
|
|
2305
2314
|
name: e.name ?? e.handle,
|
|
2306
2315
|
size: "sm"
|
|
2307
2316
|
}),
|
|
@@ -2347,20 +2356,20 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2347
2356
|
]
|
|
2348
2357
|
}, e.handle))
|
|
2349
2358
|
}),
|
|
2350
|
-
/* @__PURE__ */ M(
|
|
2359
|
+
/* @__PURE__ */ M(l, {
|
|
2351
2360
|
label: "when a member leaves",
|
|
2352
2361
|
help: "what happens to the transcripts they published here.",
|
|
2353
2362
|
control: "select",
|
|
2354
|
-
value: Ze(
|
|
2355
|
-
options: Xe(
|
|
2356
|
-
onCommit:
|
|
2363
|
+
value: Ze(h.memberLeaves, f),
|
|
2364
|
+
options: Xe(h.memberLeaves, f),
|
|
2365
|
+
onCommit: g("memberLeaves")
|
|
2357
2366
|
})
|
|
2358
2367
|
]
|
|
2359
2368
|
}),
|
|
2360
|
-
/* @__PURE__ */ M(
|
|
2369
|
+
/* @__PURE__ */ M(m, {
|
|
2361
2370
|
label: "github orgs",
|
|
2362
2371
|
defaultOpen: !0,
|
|
2363
|
-
count:
|
|
2372
|
+
count: h.org === void 0 ? null : +!!h.org,
|
|
2364
2373
|
noun: ["org", "orgs"],
|
|
2365
2374
|
id: C("github orgs"),
|
|
2366
2375
|
children: /* @__PURE__ */ N("div", {
|
|
@@ -2369,18 +2378,18 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2369
2378
|
className: "srow-text-col",
|
|
2370
2379
|
children: [/* @__PURE__ */ M("span", {
|
|
2371
2380
|
className: "srow-label",
|
|
2372
|
-
children:
|
|
2381
|
+
children: h.org ? h.org.login : h.org === null ? "no org linked" : "github org"
|
|
2373
2382
|
}), /* @__PURE__ */ N("span", {
|
|
2374
2383
|
className: "srow-help",
|
|
2375
|
-
children: [typeof
|
|
2384
|
+
children: [typeof h.org?.total == "number" ? /* @__PURE__ */ N(j, { children: [
|
|
2376
2385
|
/* @__PURE__ */ M("span", {
|
|
2377
2386
|
className: "tnum",
|
|
2378
|
-
children:
|
|
2387
|
+
children: h.org.linked ?? 0
|
|
2379
2388
|
}),
|
|
2380
2389
|
" of ",
|
|
2381
2390
|
/* @__PURE__ */ M("span", {
|
|
2382
2391
|
className: "tnum",
|
|
2383
|
-
children:
|
|
2392
|
+
children: h.org.total
|
|
2384
2393
|
}),
|
|
2385
2394
|
" repos linked. "
|
|
2386
2395
|
] }) : null, "a collective links one github org today."]
|
|
@@ -2388,22 +2397,22 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2388
2397
|
}), t.onLinkRepos && /* @__PURE__ */ M("button", {
|
|
2389
2398
|
type: "button",
|
|
2390
2399
|
className: "btn btn-secondary btn-sm",
|
|
2391
|
-
onClick: () =>
|
|
2400
|
+
onClick: () => v(!0),
|
|
2392
2401
|
children: "manage"
|
|
2393
2402
|
})]
|
|
2394
2403
|
})
|
|
2395
2404
|
}),
|
|
2396
|
-
/* @__PURE__ */ N(
|
|
2405
|
+
/* @__PURE__ */ N(m, {
|
|
2397
2406
|
label: "pull requests",
|
|
2398
2407
|
defaultOpen: !0,
|
|
2399
2408
|
count: 1,
|
|
2400
2409
|
id: C("pull requests"),
|
|
2401
|
-
children: [/* @__PURE__ */ M(
|
|
2410
|
+
children: [/* @__PURE__ */ M(l, {
|
|
2402
2411
|
label: "show transcripts on pull requests",
|
|
2403
2412
|
help: "adds a peasant / prompts comment and check on pull requests in this collective's repos, listing which commits have transcripts. it never blocks merging.",
|
|
2404
2413
|
control: "switch",
|
|
2405
|
-
value:
|
|
2406
|
-
onCommit:
|
|
2414
|
+
value: a,
|
|
2415
|
+
onCommit: g("showOnPullRequests")
|
|
2407
2416
|
}), /* @__PURE__ */ N("p", {
|
|
2408
2417
|
className: "srow-note",
|
|
2409
2418
|
children: [
|
|
@@ -2417,7 +2426,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2417
2426
|
]
|
|
2418
2427
|
})]
|
|
2419
2428
|
}),
|
|
2420
|
-
x && /* @__PURE__ */ N(
|
|
2429
|
+
x && /* @__PURE__ */ N(m, {
|
|
2421
2430
|
label: "danger zone",
|
|
2422
2431
|
defaultOpen: !0,
|
|
2423
2432
|
count: null,
|
|
@@ -2439,13 +2448,13 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2439
2448
|
className: "srow-help",
|
|
2440
2449
|
children: [
|
|
2441
2450
|
"delete ",
|
|
2442
|
-
|
|
2451
|
+
h.name,
|
|
2443
2452
|
" for ",
|
|
2444
|
-
typeof
|
|
2453
|
+
typeof h.memberCount == "number" ? /* @__PURE__ */ N(j, { children: [
|
|
2445
2454
|
"all ",
|
|
2446
2455
|
/* @__PURE__ */ M("span", {
|
|
2447
2456
|
className: "tnum",
|
|
2448
|
-
children:
|
|
2457
|
+
children: h.memberCount
|
|
2449
2458
|
}),
|
|
2450
2459
|
" members"
|
|
2451
2460
|
] }) : "all its members",
|
|
@@ -2460,14 +2469,14 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2460
2469
|
})]
|
|
2461
2470
|
})
|
|
2462
2471
|
]
|
|
2463
|
-
}), t.onLinkRepos && /* @__PURE__ */ M(
|
|
2464
|
-
open:
|
|
2465
|
-
onClose: () =>
|
|
2472
|
+
}), t.onLinkRepos && /* @__PURE__ */ M(c, {
|
|
2473
|
+
open: _,
|
|
2474
|
+
onClose: () => v(!1),
|
|
2466
2475
|
owners: n,
|
|
2467
2476
|
initialSelected: r,
|
|
2468
|
-
title: `link repositories from ${
|
|
2477
|
+
title: `link repositories from ${h.org?.login ?? "github"}`,
|
|
2469
2478
|
onSave: (e) => {
|
|
2470
|
-
t.onLinkRepos(e),
|
|
2479
|
+
t.onLinkRepos(e), v(!1);
|
|
2471
2480
|
}
|
|
2472
2481
|
})] });
|
|
2473
2482
|
}
|
|
@@ -2516,8 +2525,8 @@ function rt(e) {
|
|
|
2516
2525
|
timeZone: "UTC"
|
|
2517
2526
|
}).format(t).toLowerCase();
|
|
2518
2527
|
}
|
|
2519
|
-
function it({ data:
|
|
2520
|
-
let { collective:
|
|
2528
|
+
function it({ data: t = tt, actions: r = {}, demoRoleSwitcher: i = !1 } = {}) {
|
|
2529
|
+
let { collective: a = $e, providerShare: o = [], pendingReview: c = [], members: l = [], redactions: d = [], browseRows: f = [], roleOptions: m = [], initialRole: g = "", initialShowRedaction: _ = !1, initialBrowseGated: v = !1, stats: y = et } = t || tt, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onContribute: w, onToggleBrowse: T } = r || {}, [E, D] = A(g || a.role || ""), [k, j] = A(!!_), [P, F] = A(!!v), I = E || a.role || "guest", R = I === "owner", z = I === "guest", B = i && m.length > 0, V = O(() => B ? m : [], [B, m]), W = (e) => {
|
|
2521
2530
|
D(e), b?.(e);
|
|
2522
2531
|
};
|
|
2523
2532
|
return /* @__PURE__ */ M("div", {
|
|
@@ -2543,7 +2552,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2543
2552
|
}),
|
|
2544
2553
|
/* @__PURE__ */ M("span", {
|
|
2545
2554
|
className: "cur",
|
|
2546
|
-
children:
|
|
2555
|
+
children: a.name || "collective"
|
|
2547
2556
|
})
|
|
2548
2557
|
]
|
|
2549
2558
|
}), /* @__PURE__ */ N("div", {
|
|
@@ -2551,11 +2560,11 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2551
2560
|
children: [/* @__PURE__ */ N("div", { children: [
|
|
2552
2561
|
/* @__PURE__ */ M("h2", {
|
|
2553
2562
|
className: "cmg-title",
|
|
2554
|
-
children:
|
|
2563
|
+
children: a.name || "collective"
|
|
2555
2564
|
}),
|
|
2556
2565
|
/* @__PURE__ */ M("p", {
|
|
2557
2566
|
className: "cmg-deck",
|
|
2558
|
-
children:
|
|
2567
|
+
children: a.description || "shared collective governance"
|
|
2559
2568
|
}),
|
|
2560
2569
|
/* @__PURE__ */ N("span", {
|
|
2561
2570
|
className: "cmg-orgpill mono",
|
|
@@ -2565,7 +2574,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2565
2574
|
"aria-hidden": "true"
|
|
2566
2575
|
}),
|
|
2567
2576
|
" ",
|
|
2568
|
-
|
|
2577
|
+
a.linkedGithubOrg || "not linked"
|
|
2569
2578
|
]
|
|
2570
2579
|
})
|
|
2571
2580
|
] }), /* @__PURE__ */ N("div", {
|
|
@@ -2637,40 +2646,40 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2637
2646
|
/* @__PURE__ */ N("div", {
|
|
2638
2647
|
className: "cmg-tiles",
|
|
2639
2648
|
children: [
|
|
2640
|
-
/* @__PURE__ */ M(
|
|
2649
|
+
/* @__PURE__ */ M(e, {
|
|
2641
2650
|
label: "contributions",
|
|
2642
|
-
value:
|
|
2651
|
+
value: a.acceptanceMode || "open",
|
|
2643
2652
|
tone: "teal"
|
|
2644
2653
|
}),
|
|
2645
|
-
/* @__PURE__ */ M(
|
|
2654
|
+
/* @__PURE__ */ M(e, {
|
|
2646
2655
|
label: "access",
|
|
2647
|
-
value:
|
|
2656
|
+
value: a.dataAccess || "members only",
|
|
2648
2657
|
tone: "amber"
|
|
2649
2658
|
}),
|
|
2650
|
-
/* @__PURE__ */ M(
|
|
2659
|
+
/* @__PURE__ */ M(e, {
|
|
2651
2660
|
label: "your role",
|
|
2652
2661
|
value: I
|
|
2653
2662
|
})
|
|
2654
2663
|
]
|
|
2655
2664
|
}),
|
|
2656
|
-
/* @__PURE__ */ M(
|
|
2665
|
+
/* @__PURE__ */ M(p, { tiles: [
|
|
2657
2666
|
{
|
|
2658
2667
|
key: "transcripts",
|
|
2659
2668
|
label: "transcripts",
|
|
2660
|
-
value:
|
|
2661
|
-
sub: `across ${
|
|
2669
|
+
value: y.transcripts,
|
|
2670
|
+
sub: `across ${y.projects}`
|
|
2662
2671
|
},
|
|
2663
2672
|
{
|
|
2664
2673
|
key: "tokens",
|
|
2665
2674
|
label: "tokens",
|
|
2666
|
-
value:
|
|
2667
|
-
sub:
|
|
2675
|
+
value: y.tokens,
|
|
2676
|
+
sub: y.turns
|
|
2668
2677
|
},
|
|
2669
2678
|
{
|
|
2670
2679
|
key: "contributors",
|
|
2671
2680
|
label: "contributors",
|
|
2672
|
-
value:
|
|
2673
|
-
sub:
|
|
2681
|
+
value: y.contributors,
|
|
2682
|
+
sub: y.hours
|
|
2674
2683
|
}
|
|
2675
2684
|
] }),
|
|
2676
2685
|
/* @__PURE__ */ N("div", {
|
|
@@ -2678,31 +2687,31 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2678
2687
|
children: [/* @__PURE__ */ N("main", {
|
|
2679
2688
|
className: "cmg-d-main",
|
|
2680
2689
|
children: [
|
|
2681
|
-
|
|
2690
|
+
o.length > 0 ? /* @__PURE__ */ N("section", {
|
|
2682
2691
|
className: "card cmg-share",
|
|
2683
2692
|
"aria-labelledby": "cmg-share-h",
|
|
2684
2693
|
children: [/* @__PURE__ */ M("h3", {
|
|
2685
2694
|
id: "cmg-share-h",
|
|
2686
2695
|
className: "cmg-sub",
|
|
2687
2696
|
children: "provider share"
|
|
2688
|
-
}), /* @__PURE__ */ M(
|
|
2697
|
+
}), /* @__PURE__ */ M(n, {
|
|
2689
2698
|
label: "provider share",
|
|
2690
2699
|
total: 100,
|
|
2691
|
-
data:
|
|
2700
|
+
data: o.map((e) => ({
|
|
2692
2701
|
label: Ae(e.id),
|
|
2693
2702
|
value: e.pct
|
|
2694
2703
|
}))
|
|
2695
2704
|
})]
|
|
2696
2705
|
}) : null,
|
|
2697
|
-
|
|
2706
|
+
c.length > 0 ? /* @__PURE__ */ M("div", {
|
|
2698
2707
|
style: {
|
|
2699
2708
|
overflow: "auto",
|
|
2700
2709
|
maxWidth: "100%"
|
|
2701
2710
|
},
|
|
2702
|
-
children: /* @__PURE__ */ M(
|
|
2711
|
+
children: /* @__PURE__ */ M(u, {
|
|
2703
2712
|
title: "pending review",
|
|
2704
2713
|
emptyLabel: "no shares awaiting review.",
|
|
2705
|
-
items:
|
|
2714
|
+
items: c.map((e) => ({
|
|
2706
2715
|
id: e.id,
|
|
2707
2716
|
kind: "share",
|
|
2708
2717
|
who: e.title || "untitled transcript",
|
|
@@ -2710,7 +2719,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2710
2719
|
}))
|
|
2711
2720
|
})
|
|
2712
2721
|
}) : null,
|
|
2713
|
-
|
|
2722
|
+
d.length > 0 ? /* @__PURE__ */ N("section", {
|
|
2714
2723
|
className: "card cmg-redact-sec",
|
|
2715
2724
|
"aria-labelledby": "cmg-redact-h",
|
|
2716
2725
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -2734,14 +2743,14 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2734
2743
|
})]
|
|
2735
2744
|
}), k ? /* @__PURE__ */ M("div", {
|
|
2736
2745
|
className: "cmg-redact-list",
|
|
2737
|
-
children:
|
|
2746
|
+
children: d.map((e) => /* @__PURE__ */ N("article", {
|
|
2738
2747
|
className: "cmg-redact",
|
|
2739
2748
|
children: [
|
|
2740
2749
|
/* @__PURE__ */ N("div", {
|
|
2741
2750
|
className: "cmg-redact-head",
|
|
2742
2751
|
children: [/* @__PURE__ */ M("span", {
|
|
2743
2752
|
className: "cmg-redact-badges",
|
|
2744
|
-
children: /* @__PURE__ */ M(
|
|
2753
|
+
children: /* @__PURE__ */ M(s, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
|
|
2745
2754
|
}), /* @__PURE__ */ M("span", {
|
|
2746
2755
|
className: "cmg-redact-file mono",
|
|
2747
2756
|
children: e.file || "unknown"
|
|
@@ -2808,7 +2817,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2808
2817
|
}), " join as contributor"]
|
|
2809
2818
|
}) : null
|
|
2810
2819
|
]
|
|
2811
|
-
}) :
|
|
2820
|
+
}) : f.length > 0 ? /* @__PURE__ */ N("table", {
|
|
2812
2821
|
className: "dtable cmg-dtable",
|
|
2813
2822
|
children: [/* @__PURE__ */ M("thead", { children: /* @__PURE__ */ N("tr", { children: [
|
|
2814
2823
|
/* @__PURE__ */ M("th", {
|
|
@@ -2837,7 +2846,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2837
2846
|
scope: "col",
|
|
2838
2847
|
children: "date"
|
|
2839
2848
|
})
|
|
2840
|
-
] }) }), /* @__PURE__ */ M("tbody", { children:
|
|
2849
|
+
] }) }), /* @__PURE__ */ M("tbody", { children: f.map((e) => /* @__PURE__ */ N("tr", { children: [
|
|
2841
2850
|
/* @__PURE__ */ M("td", { children: e.title || "untitled transcript" }),
|
|
2842
2851
|
/* @__PURE__ */ M("td", {
|
|
2843
2852
|
className: "mono",
|
|
@@ -2880,7 +2889,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2880
2889
|
})]
|
|
2881
2890
|
})
|
|
2882
2891
|
]
|
|
2883
|
-
}),
|
|
2892
|
+
}), l.length > 0 ? /* @__PURE__ */ M("aside", {
|
|
2884
2893
|
className: "sidebar cmg-d-rail",
|
|
2885
2894
|
"aria-label": "collective sidebar",
|
|
2886
2895
|
children: /* @__PURE__ */ M("div", {
|
|
@@ -2891,7 +2900,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2891
2900
|
children: /* @__PURE__ */ M(h, {
|
|
2892
2901
|
title: "members",
|
|
2893
2902
|
roles: ["member", "contributor"],
|
|
2894
|
-
members:
|
|
2903
|
+
members: l.map((e) => ({
|
|
2895
2904
|
handle: e.handle || e.githubUsername || "@unknown",
|
|
2896
2905
|
name: e.name || e.displayName || e.githubUsername || "unknown",
|
|
2897
2906
|
role: e.role || "member",
|