@peasant-labs/fairtrade 0.0.36 → 0.0.38
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/lib/{ChartLine-Cycmpjep.js → ChartLine-MZVbpUu1.js} +1 -1
- package/dist/lib/analytics.css +1 -1
- package/dist/lib/analytics.js +191 -191
- package/dist/lib/commons.js +175 -186
- package/dist/lib/components.css +1 -1
- package/dist/lib/graph.css +1 -1
- package/dist/lib/graph.js +94 -85
- package/dist/lib/tokens.css +1 -0
- package/dist/lib/tokens.json +4 -0
- package/dist/lib/types/AppSidebar.d.ts +43 -16
- package/dist/lib/types/CliOnboard.d.ts +7 -1
- package/dist/lib/types/Publish.d.ts +20 -3
- package/dist/lib/types/Settings.d.ts +4 -1
- package/dist/lib/types/StepsWaterfall.d.ts +1 -1
- package/dist/lib/types/graph/ChangeDetail.d.ts +3 -1
- package/dist/lib/types/graph/Changes.d.ts +3 -1
- package/dist/lib/types/transcript/adapter.d.ts +7 -0
- package/dist/lib/types/transcript/index.d.ts +2 -2
- package/dist/lib/types/transcript/time.d.ts +29 -4
- package/dist/lib/{ui-CfdUlwCE.js → ui-DIoBcgLp.js} +1869 -1752
- package/dist/lib/ui.js +3 -3
- package/package.json +5 -3
package/dist/lib/commons.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { At as e, Ot as t, Tt as n, ht as r, lt as i, pt as a, ut as o } from "./GraphLegend-7PmEpBZQ.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Dt as s, Et as c, Or as l, Ot as u, Zn as d, ct as f, dr as p, dt as m, fn as h, gn as g, hn as _, ht as v, jt as y, kt as b, mn as x, mt as S, or as C, pr as w, ur as T, ut as E, wt as D } from "./ui-DIoBcgLp.js";
|
|
3
3
|
import { useEffect as O, useId as k, useMemo as A, useRef as j, useState as M } from "react";
|
|
4
4
|
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowRight as I, Check as L, ChevronDown as R, ChevronRight as z, ClipboardCheck as B, Compass as V, Copy as H, ExternalLink as U, Eye as W, EyeOff as G, FileText as ee, FolderGit2 as K, GitBranch as q, GitPullRequest as J, Hash as te, KeyRound as Y, LayoutGrid as ne, List as re, Lock as ie, LogOut as ae, MoreHorizontal as X, Plus as oe, Search as se, SearchX as ce, Settings as Z, ShieldAlert as Q, SlidersHorizontal as le, TriangleAlert as ue, Upload as de, User as fe, UserPlus as pe, Users as $, X as me } from "lucide-react";
|
|
@@ -215,7 +215,7 @@ function je({ transcript: e, href: t, onOpen: n }) {
|
|
|
215
215
|
className: "mono",
|
|
216
216
|
children: e.modelName || e.modelProvider
|
|
217
217
|
})]
|
|
218
|
-
}), /* @__PURE__ */ P(
|
|
218
|
+
}), /* @__PURE__ */ P(f, { visibility: e.visibility })]
|
|
219
219
|
}),
|
|
220
220
|
/* @__PURE__ */ P("h3", {
|
|
221
221
|
className: "cex-title",
|
|
@@ -281,7 +281,7 @@ function Me({ transcript: e, href: t, onOpen: n }) {
|
|
|
281
281
|
className: "cex-trow-date mono tnum",
|
|
282
282
|
children: Ce(e.sessionStart || e.sessionEnd || "")
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */ P(
|
|
284
|
+
/* @__PURE__ */ P(f, { visibility: e.visibility })
|
|
285
285
|
] });
|
|
286
286
|
return t ? /* @__PURE__ */ P("a", {
|
|
287
287
|
href: t,
|
|
@@ -331,21 +331,21 @@ function Ne({ collective: e, href: t, onOpen: n }) {
|
|
|
331
331
|
children: r
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript: a, onOpenProfile: o, onOpenCollective: s, transcriptHref: c, profileHref:
|
|
335
|
-
let
|
|
334
|
+
function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript: a, onOpenProfile: o, onOpenCollective: s, transcriptHref: c, profileHref: l, collectiveHref: u }) {
|
|
335
|
+
let d = ke(e), p = d.transcripts.transcripts, [m, h] = M(""), [g, _] = M(""), [v, x] = M("recent"), [S, C] = M("all"), [w, T] = M(() => /* @__PURE__ */ new Set()), [E, D] = M("grid"), [k, N] = M(() => Ae(d.transcripts.page)), [I, L] = M(null), [R, z] = M("browse"), B = j(!0), H = j(null);
|
|
336
336
|
O(() => {
|
|
337
337
|
if (B.current) {
|
|
338
|
-
B.current = !1,
|
|
338
|
+
B.current = !1, _(m);
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
let e = setTimeout(() =>
|
|
341
|
+
let e = setTimeout(() => _(m), 250);
|
|
342
342
|
return () => clearTimeout(e);
|
|
343
343
|
}, [B, m]), O(() => {
|
|
344
344
|
let e = JSON.stringify([
|
|
345
345
|
g,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
[...
|
|
346
|
+
v,
|
|
347
|
+
S,
|
|
348
|
+
[...w].sort()
|
|
349
349
|
]);
|
|
350
350
|
if (H.current === null || H.current === e) {
|
|
351
351
|
H.current = e;
|
|
@@ -354,24 +354,24 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
354
354
|
H.current = e, N(1);
|
|
355
355
|
}, [
|
|
356
356
|
g,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
357
|
+
v,
|
|
358
|
+
S,
|
|
359
|
+
w
|
|
360
360
|
]), O(() => {
|
|
361
361
|
i?.({
|
|
362
362
|
query: g,
|
|
363
|
-
provider:
|
|
364
|
-
topics: [...
|
|
365
|
-
order:
|
|
363
|
+
provider: S,
|
|
364
|
+
topics: [...w],
|
|
365
|
+
order: v,
|
|
366
366
|
page: k
|
|
367
367
|
});
|
|
368
368
|
}, [
|
|
369
|
-
|
|
369
|
+
v,
|
|
370
370
|
i,
|
|
371
371
|
k,
|
|
372
|
-
|
|
372
|
+
S,
|
|
373
373
|
g,
|
|
374
|
-
|
|
374
|
+
w
|
|
375
375
|
]);
|
|
376
376
|
let U = p.find((e) => e.id === I) ?? p[0] ?? null, W = U?.owner ?? null, G = W ? p.filter((e) => e.owner.githubUsername === W.githubUsername) : [], K = A(() => {
|
|
377
377
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -389,12 +389,12 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
389
389
|
}, [I, p]);
|
|
390
390
|
let q = A(() => {
|
|
391
391
|
let e = Te(g);
|
|
392
|
-
return e ?
|
|
392
|
+
return e ? d.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
|
-
}, [
|
|
397
|
+
}, [d.collectives, g]), J = p, te = w.size, Y = d.transcripts.total ?? p.length, ie = k, ae = d.transcripts.limit || p.length || 1, X = (e) => {
|
|
398
398
|
if (a) {
|
|
399
399
|
a(e);
|
|
400
400
|
return;
|
|
@@ -407,7 +407,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
407
407
|
}
|
|
408
408
|
U ? (L(U.id), z("profile")) : p[0] && (L(p[0].id), z("profile"));
|
|
409
409
|
}, se = () => {
|
|
410
|
-
h(""),
|
|
410
|
+
h(""), _(""), x("recent"), C("all"), T(/* @__PURE__ */ new Set()), N(1);
|
|
411
411
|
}, Z = A(() => W ? [...De(G, (e) => e.projectName || "untitled project").entries()].map(([e, t]) => ({
|
|
412
412
|
project: e,
|
|
413
413
|
items: t
|
|
@@ -473,7 +473,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
473
473
|
children: [/* @__PURE__ */ P("h2", {
|
|
474
474
|
className: "win-title cex-vtitle",
|
|
475
475
|
children: Ee(U.title || "untitled transcript")
|
|
476
|
-
}), /* @__PURE__ */ P(
|
|
476
|
+
}), /* @__PURE__ */ P(f, { visibility: U.visibility })]
|
|
477
477
|
}),
|
|
478
478
|
/* @__PURE__ */ F("p", {
|
|
479
479
|
className: "cex-vdesc",
|
|
@@ -583,7 +583,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
583
583
|
})]
|
|
584
584
|
})]
|
|
585
585
|
}),
|
|
586
|
-
/* @__PURE__ */ P(
|
|
586
|
+
/* @__PURE__ */ P(b, { tiles: [
|
|
587
587
|
{
|
|
588
588
|
key: "transcripts",
|
|
589
589
|
label: "transcripts",
|
|
@@ -659,7 +659,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
659
659
|
})]
|
|
660
660
|
})]
|
|
661
661
|
}),
|
|
662
|
-
/* @__PURE__ */ P(
|
|
662
|
+
/* @__PURE__ */ P(b, { tiles: [
|
|
663
663
|
{
|
|
664
664
|
key: "transcripts",
|
|
665
665
|
label: "transcripts",
|
|
@@ -741,7 +741,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
741
741
|
type: "text",
|
|
742
742
|
value: m,
|
|
743
743
|
onChange: (e) => h(e.target.value),
|
|
744
|
-
placeholder: "search transcripts
|
|
744
|
+
placeholder: "search transcripts",
|
|
745
745
|
"aria-label": "search transcripts, collectives, projects, models"
|
|
746
746
|
}), m && /* @__PURE__ */ P("button", {
|
|
747
747
|
type: "button",
|
|
@@ -756,19 +756,19 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
756
756
|
})]
|
|
757
757
|
}), /* @__PURE__ */ F("div", {
|
|
758
758
|
className: "cex-explore-body",
|
|
759
|
-
children: [/* @__PURE__ */ P(
|
|
760
|
-
order:
|
|
761
|
-
onOrder: (e) =>
|
|
759
|
+
children: [/* @__PURE__ */ P(y, {
|
|
760
|
+
order: v,
|
|
761
|
+
onOrder: (e) => x(e),
|
|
762
762
|
providers: K,
|
|
763
|
-
activeProviders:
|
|
764
|
-
onProvider: (e) =>
|
|
765
|
-
topics:
|
|
763
|
+
activeProviders: S === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([S]),
|
|
764
|
+
onProvider: (e) => C((t) => t === e ? "all" : e),
|
|
765
|
+
topics: d.popularTags.map((e) => ({
|
|
766
766
|
tag: e.name,
|
|
767
767
|
count: e.usageCount
|
|
768
768
|
})),
|
|
769
|
-
activeTopics:
|
|
769
|
+
activeTopics: w,
|
|
770
770
|
onTopic: (e) => {
|
|
771
|
-
|
|
771
|
+
T((t) => {
|
|
772
772
|
let n = new Set(t);
|
|
773
773
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
774
774
|
});
|
|
@@ -797,7 +797,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
797
797
|
className: "cex-coll-grid",
|
|
798
798
|
children: q.map((e) => /* @__PURE__ */ P(Ne, {
|
|
799
799
|
collective: e,
|
|
800
|
-
href:
|
|
800
|
+
href: u?.(e),
|
|
801
801
|
onOpen: s
|
|
802
802
|
}, e.id))
|
|
803
803
|
})]
|
|
@@ -820,7 +820,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
820
820
|
/* @__PURE__ */ F("button", {
|
|
821
821
|
type: "button",
|
|
822
822
|
className: "bs-seg-opt",
|
|
823
|
-
"aria-pressed":
|
|
823
|
+
"aria-pressed": E === "grid",
|
|
824
824
|
"aria-label": "grid view",
|
|
825
825
|
onClick: () => D("grid"),
|
|
826
826
|
children: [/* @__PURE__ */ P(ne, { size: 14 }), " grid"]
|
|
@@ -828,7 +828,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
828
828
|
/* @__PURE__ */ F("button", {
|
|
829
829
|
type: "button",
|
|
830
830
|
className: "bs-seg-opt",
|
|
831
|
-
"aria-pressed":
|
|
831
|
+
"aria-pressed": E === "list",
|
|
832
832
|
"aria-label": "list view",
|
|
833
833
|
onClick: () => D("list"),
|
|
834
834
|
children: [/* @__PURE__ */ P(re, { size: 14 }), " list"]
|
|
@@ -845,7 +845,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
845
845
|
]
|
|
846
846
|
})]
|
|
847
847
|
}),
|
|
848
|
-
J.length === 0 ? g.trim() ||
|
|
848
|
+
J.length === 0 ? g.trim() || S !== "all" || te ? /* @__PURE__ */ F("div", {
|
|
849
849
|
className: "empty cex-empty",
|
|
850
850
|
children: [
|
|
851
851
|
/* @__PURE__ */ P("div", {
|
|
@@ -877,7 +877,7 @@ function Pe({ data: e, className: n = "", onFiltersChange: i, onOpenTranscript:
|
|
|
877
877
|
/* @__PURE__ */ P("h3", { children: "the commons is empty" }),
|
|
878
878
|
/* @__PURE__ */ P("p", { children: "no transcripts have been shared yet. once contributors publish, they show up here." })
|
|
879
879
|
]
|
|
880
|
-
}) :
|
|
880
|
+
}) : E === "grid" ? /* @__PURE__ */ P("div", {
|
|
881
881
|
className: "cex-grid",
|
|
882
882
|
children: J.map((e) => /* @__PURE__ */ P(je, {
|
|
883
883
|
transcript: e,
|
|
@@ -1521,7 +1521,7 @@ function We() {
|
|
|
1521
1521
|
})]
|
|
1522
1522
|
})
|
|
1523
1523
|
]
|
|
1524
|
-
}), /* @__PURE__ */ P(
|
|
1524
|
+
}), /* @__PURE__ */ P(g, {
|
|
1525
1525
|
open: i,
|
|
1526
1526
|
title: /* @__PURE__ */ F(N, { children: [
|
|
1527
1527
|
"make ",
|
|
@@ -1643,7 +1643,7 @@ function Xe(e, t, n) {
|
|
|
1643
1643
|
}, e));
|
|
1644
1644
|
}
|
|
1645
1645
|
function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
1646
|
-
let { collectives: n = [], linkedOrgs: r = [], title: i = "collectives", deck: a, crumb: o, caption: s = "collectives", createLabel: c = "new collective", createBusy:
|
|
1646
|
+
let { collectives: n = [], linkedOrgs: r = [], title: i = "collectives", deck: a, crumb: o, caption: s = "collectives", createLabel: c = "new collective", createBusy: u = !1, whoCanPublish: f = Ge, whoCanRead: p = Ke } = e, { onCreateCollective: m, onOpenCollective: h, onSearchCollectives: g } = t, [v, y] = M(!1), [b, x] = M(""), [S, C] = M(""), [T, E] = M(f[0]?.value ?? ""), [D, O] = M(p[0]?.value ?? ""), [A, j] = M(""), [N, I] = M(""), L = k(), R = [
|
|
1647
1647
|
{
|
|
1648
1648
|
key: "name",
|
|
1649
1649
|
label: "name",
|
|
@@ -1652,7 +1652,7 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1652
1652
|
children: [/* @__PURE__ */ P("button", {
|
|
1653
1653
|
type: "button",
|
|
1654
1654
|
className: "cmg-table-link",
|
|
1655
|
-
onClick: () =>
|
|
1655
|
+
onClick: () => h?.(t.id),
|
|
1656
1656
|
children: t.name
|
|
1657
1657
|
}), t.desc ? /* @__PURE__ */ P("span", {
|
|
1658
1658
|
className: "cmg-cell-desc",
|
|
@@ -1704,7 +1704,7 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1704
1704
|
children: [
|
|
1705
1705
|
o ? /* @__PURE__ */ P("div", {
|
|
1706
1706
|
className: "cmg-crumb",
|
|
1707
|
-
children: /* @__PURE__ */ P(
|
|
1707
|
+
children: /* @__PURE__ */ P(w, { items: [{ label: o }] })
|
|
1708
1708
|
}) : null,
|
|
1709
1709
|
/* @__PURE__ */ F("header", {
|
|
1710
1710
|
className: "iu-page-head",
|
|
@@ -1715,16 +1715,16 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1715
1715
|
children: i
|
|
1716
1716
|
}), /* @__PURE__ */ F("button", {
|
|
1717
1717
|
type: "button",
|
|
1718
|
-
className: "btn btn-sm " + (
|
|
1719
|
-
"aria-expanded":
|
|
1720
|
-
onClick: () =>
|
|
1718
|
+
className: "btn btn-sm " + (v ? "btn-secondary" : "btn-primary"),
|
|
1719
|
+
"aria-expanded": v,
|
|
1720
|
+
onClick: () => y((e) => !e),
|
|
1721
1721
|
children: [
|
|
1722
1722
|
/* @__PURE__ */ P(oe, {
|
|
1723
1723
|
size: 14,
|
|
1724
1724
|
"aria-hidden": "true"
|
|
1725
1725
|
}),
|
|
1726
1726
|
" ",
|
|
1727
|
-
|
|
1727
|
+
v ? "close" : c
|
|
1728
1728
|
]
|
|
1729
1729
|
})]
|
|
1730
1730
|
}), a ? /* @__PURE__ */ P("p", {
|
|
@@ -1732,7 +1732,7 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1732
1732
|
children: a
|
|
1733
1733
|
}) : null]
|
|
1734
1734
|
}),
|
|
1735
|
-
|
|
1735
|
+
v && /* @__PURE__ */ F("section", {
|
|
1736
1736
|
className: "cmg-form card",
|
|
1737
1737
|
"aria-labelledby": `${L}-form`,
|
|
1738
1738
|
children: [
|
|
@@ -1752,8 +1752,8 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1752
1752
|
}), /* @__PURE__ */ P("input", {
|
|
1753
1753
|
className: "input",
|
|
1754
1754
|
type: "text",
|
|
1755
|
-
value:
|
|
1756
|
-
onChange: (e) =>
|
|
1755
|
+
value: b,
|
|
1756
|
+
onChange: (e) => x(e.target.value)
|
|
1757
1757
|
})]
|
|
1758
1758
|
}),
|
|
1759
1759
|
/* @__PURE__ */ F("label", {
|
|
@@ -1764,19 +1764,19 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1764
1764
|
}), /* @__PURE__ */ P("textarea", {
|
|
1765
1765
|
className: "input",
|
|
1766
1766
|
rows: 2,
|
|
1767
|
-
value:
|
|
1768
|
-
onChange: (e) =>
|
|
1767
|
+
value: S,
|
|
1768
|
+
onChange: (e) => C(e.target.value)
|
|
1769
1769
|
})]
|
|
1770
1770
|
}),
|
|
1771
1771
|
/* @__PURE__ */ P("div", {
|
|
1772
1772
|
className: "cmg-field",
|
|
1773
|
-
children: /* @__PURE__ */ P(
|
|
1773
|
+
children: /* @__PURE__ */ P(_, {
|
|
1774
1774
|
variant: "select",
|
|
1775
1775
|
label: "who can publish",
|
|
1776
1776
|
name: "who-can-publish",
|
|
1777
|
-
value:
|
|
1778
|
-
onChange:
|
|
1779
|
-
options:
|
|
1777
|
+
value: T,
|
|
1778
|
+
onChange: E,
|
|
1779
|
+
options: f.map((e) => ({
|
|
1780
1780
|
...e,
|
|
1781
1781
|
rationale: e.help
|
|
1782
1782
|
}))
|
|
@@ -1784,13 +1784,13 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1784
1784
|
}),
|
|
1785
1785
|
/* @__PURE__ */ P("div", {
|
|
1786
1786
|
className: "cmg-field",
|
|
1787
|
-
children: /* @__PURE__ */ P(
|
|
1787
|
+
children: /* @__PURE__ */ P(_, {
|
|
1788
1788
|
variant: "select",
|
|
1789
1789
|
label: "who can read",
|
|
1790
1790
|
name: "who-can-read",
|
|
1791
|
-
value:
|
|
1791
|
+
value: D,
|
|
1792
1792
|
onChange: O,
|
|
1793
|
-
options:
|
|
1793
|
+
options: p
|
|
1794
1794
|
})
|
|
1795
1795
|
}),
|
|
1796
1796
|
/* @__PURE__ */ F("label", {
|
|
@@ -1821,27 +1821,27 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1821
1821
|
children: [/* @__PURE__ */ P("button", {
|
|
1822
1822
|
type: "button",
|
|
1823
1823
|
className: "btn btn-sm btn-primary",
|
|
1824
|
-
disabled: !
|
|
1824
|
+
disabled: !b.trim() || u,
|
|
1825
1825
|
"aria-describedby": L,
|
|
1826
|
-
onClick: () =>
|
|
1827
|
-
name:
|
|
1828
|
-
purpose:
|
|
1829
|
-
mode:
|
|
1830
|
-
access:
|
|
1826
|
+
onClick: () => m?.({
|
|
1827
|
+
name: b,
|
|
1828
|
+
purpose: S,
|
|
1829
|
+
mode: T,
|
|
1830
|
+
access: D,
|
|
1831
1831
|
org: A
|
|
1832
1832
|
}),
|
|
1833
|
-
children:
|
|
1833
|
+
children: u ? "creating" : "create collective"
|
|
1834
1834
|
}), /* @__PURE__ */ P("span", {
|
|
1835
1835
|
id: L,
|
|
1836
1836
|
className: "cmg-form-hint mono",
|
|
1837
|
-
children:
|
|
1837
|
+
children: f.find((e) => e.value === T)?.help
|
|
1838
1838
|
})]
|
|
1839
1839
|
})
|
|
1840
1840
|
]
|
|
1841
1841
|
}),
|
|
1842
1842
|
/* @__PURE__ */ F("div", {
|
|
1843
1843
|
className: "cmg-section",
|
|
1844
|
-
children: [/* @__PURE__ */ P(
|
|
1844
|
+
children: [/* @__PURE__ */ P(d, {
|
|
1845
1845
|
caption: `${s} ${n.length}`,
|
|
1846
1846
|
columns: R,
|
|
1847
1847
|
rows: n,
|
|
@@ -1851,7 +1851,7 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1851
1851
|
children: "in a curated collective, each transcript you publish waits for the owner to approve it."
|
|
1852
1852
|
}) : null]
|
|
1853
1853
|
}),
|
|
1854
|
-
|
|
1854
|
+
g && /* @__PURE__ */ F("section", {
|
|
1855
1855
|
className: "cmg-section",
|
|
1856
1856
|
"aria-labelledby": `${L}-find`,
|
|
1857
1857
|
children: [/* @__PURE__ */ P("h3", {
|
|
@@ -1862,9 +1862,9 @@ function Ze({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1862
1862
|
className: "cmg-find",
|
|
1863
1863
|
role: "search",
|
|
1864
1864
|
onSubmit: (e) => {
|
|
1865
|
-
e.preventDefault(),
|
|
1865
|
+
e.preventDefault(), g(N);
|
|
1866
1866
|
},
|
|
1867
|
-
children: [/* @__PURE__ */ P(
|
|
1867
|
+
children: [/* @__PURE__ */ P(l, {
|
|
1868
1868
|
label: "collective or github org",
|
|
1869
1869
|
type: "search",
|
|
1870
1870
|
iconLeft: se,
|
|
@@ -1902,7 +1902,7 @@ function $e(e = {}) {
|
|
|
1902
1902
|
};
|
|
1903
1903
|
}
|
|
1904
1904
|
function et({ data: e = {}, actions: t = {} } = {}) {
|
|
1905
|
-
let { owners: n = [], linkedRepos: r = [], hrefFor: i } = e, o = $e(e.collective), { onSettings: s, onContribute: l, onReview:
|
|
1905
|
+
let { owners: n = [], linkedRepos: r = [], hrefFor: i } = e, o = $e(e.collective), { onSettings: s, onContribute: l, onReview: u, onOpenTranscript: f, onOpenPullRequest: m, onLinkRepos: h, onShowMore: g } = t, [_, v] = M(!1), y = k(), b = o.transcriptCount ?? o.transcripts.length, x = [
|
|
1906
1906
|
{
|
|
1907
1907
|
key: "title",
|
|
1908
1908
|
label: "title",
|
|
@@ -1946,8 +1946,8 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1946
1946
|
label: "pull requests",
|
|
1947
1947
|
render: (e, t) => t.pullRequests?.length ? /* @__PURE__ */ F("span", {
|
|
1948
1948
|
className: "cmg-prs",
|
|
1949
|
-
children: [/* @__PURE__ */ P(
|
|
1950
|
-
items: Xe(t.pullRequests,
|
|
1949
|
+
children: [/* @__PURE__ */ P(D, {
|
|
1950
|
+
items: Xe(t.pullRequests, m, i),
|
|
1951
1951
|
label: "pull requests",
|
|
1952
1952
|
noun: ["pull request", "pull requests"]
|
|
1953
1953
|
}), t.repo && /* @__PURE__ */ P("span", {
|
|
@@ -1963,7 +1963,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1963
1963
|
key: "when",
|
|
1964
1964
|
label: "when"
|
|
1965
1965
|
}
|
|
1966
|
-
],
|
|
1966
|
+
], S = [
|
|
1967
1967
|
{
|
|
1968
1968
|
key: "read",
|
|
1969
1969
|
title: "who can read",
|
|
@@ -1985,7 +1985,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1985
1985
|
children: [
|
|
1986
1986
|
/* @__PURE__ */ P("div", {
|
|
1987
1987
|
className: "cmg-crumb-content",
|
|
1988
|
-
children: /* @__PURE__ */ P(
|
|
1988
|
+
children: /* @__PURE__ */ P(w, { items: [{
|
|
1989
1989
|
label: "collectives",
|
|
1990
1990
|
href: i?.("collectives")
|
|
1991
1991
|
}, { label: o.name }] })
|
|
@@ -1996,7 +1996,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1996
1996
|
className: "iu-page-titlerow",
|
|
1997
1997
|
children: [/* @__PURE__ */ P("h2", {
|
|
1998
1998
|
className: "iu-page-title iu-page-title-content",
|
|
1999
|
-
id:
|
|
1999
|
+
id: y,
|
|
2000
2000
|
children: o.name
|
|
2001
2001
|
}), /* @__PURE__ */ F("span", {
|
|
2002
2002
|
className: "cmg-actions",
|
|
@@ -2008,7 +2008,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2008
2008
|
size: 14,
|
|
2009
2009
|
"aria-hidden": "true"
|
|
2010
2010
|
}), " settings"]
|
|
2011
|
-
}), (l ||
|
|
2011
|
+
}), (l || u) && /* @__PURE__ */ P(p, {
|
|
2012
2012
|
icon: X,
|
|
2013
2013
|
ariaLabel: "more",
|
|
2014
2014
|
size: "sm",
|
|
@@ -2017,10 +2017,10 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2017
2017
|
label: "publish several transcripts",
|
|
2018
2018
|
icon: de,
|
|
2019
2019
|
onSelect: () => l()
|
|
2020
|
-
}] : [], ...
|
|
2020
|
+
}] : [], ...u ? [{
|
|
2021
2021
|
label: "review transcripts",
|
|
2022
2022
|
icon: B,
|
|
2023
|
-
onSelect: () =>
|
|
2023
|
+
onSelect: () => u()
|
|
2024
2024
|
}] : []]
|
|
2025
2025
|
})]
|
|
2026
2026
|
})]
|
|
@@ -2029,10 +2029,10 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2029
2029
|
children: o.purpose
|
|
2030
2030
|
}) : null]
|
|
2031
2031
|
}),
|
|
2032
|
-
|
|
2032
|
+
S.length > 0 && /* @__PURE__ */ P("ul", {
|
|
2033
2033
|
className: "cmg-policies",
|
|
2034
2034
|
"aria-label": "how this collective works",
|
|
2035
|
-
children:
|
|
2035
|
+
children: S.map((e) => /* @__PURE__ */ F("li", {
|
|
2036
2036
|
className: "cmg-policy",
|
|
2037
2037
|
children: [/* @__PURE__ */ P("h3", {
|
|
2038
2038
|
className: "cmg-policy-title",
|
|
@@ -2043,7 +2043,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2043
2043
|
})]
|
|
2044
2044
|
}, e.key))
|
|
2045
2045
|
}),
|
|
2046
|
-
/* @__PURE__ */ P(
|
|
2046
|
+
/* @__PURE__ */ P(c, {
|
|
2047
2047
|
items: o.stats,
|
|
2048
2048
|
label: `${o.name} in numbers`
|
|
2049
2049
|
}),
|
|
@@ -2051,9 +2051,9 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2051
2051
|
className: "cmg-home",
|
|
2052
2052
|
children: [/* @__PURE__ */ F("div", {
|
|
2053
2053
|
className: "cmg-home-main",
|
|
2054
|
-
children: [/* @__PURE__ */ P(
|
|
2055
|
-
caption: `transcripts ${
|
|
2056
|
-
columns:
|
|
2054
|
+
children: [/* @__PURE__ */ P(d, {
|
|
2055
|
+
caption: `transcripts ${b}`,
|
|
2056
|
+
columns: x,
|
|
2057
2057
|
rows: o.transcripts,
|
|
2058
2058
|
rowKey: (e) => e.id
|
|
2059
2059
|
}), /* @__PURE__ */ F("div", {
|
|
@@ -2069,10 +2069,10 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2069
2069
|
" of ",
|
|
2070
2070
|
/* @__PURE__ */ P("span", {
|
|
2071
2071
|
className: "tnum",
|
|
2072
|
-
children:
|
|
2072
|
+
children: b
|
|
2073
2073
|
})
|
|
2074
2074
|
]
|
|
2075
|
-
}),
|
|
2075
|
+
}), b > o.transcripts.length && g && /* @__PURE__ */ P("button", {
|
|
2076
2076
|
type: "button",
|
|
2077
2077
|
className: "btn btn-secondary btn-sm",
|
|
2078
2078
|
onClick: () => g(),
|
|
@@ -2109,7 +2109,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2109
2109
|
}),
|
|
2110
2110
|
" repos linked"
|
|
2111
2111
|
] }) : null,
|
|
2112
|
-
o.role === "owner" &&
|
|
2112
|
+
o.role === "owner" && h && /* @__PURE__ */ P("button", {
|
|
2113
2113
|
type: "button",
|
|
2114
2114
|
className: "btn btn-ghost btn-sm",
|
|
2115
2115
|
onClick: () => v(!0),
|
|
@@ -2143,7 +2143,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2143
2143
|
})]
|
|
2144
2144
|
})
|
|
2145
2145
|
]
|
|
2146
|
-
}),
|
|
2146
|
+
}), h && /* @__PURE__ */ P(E, {
|
|
2147
2147
|
open: _,
|
|
2148
2148
|
onClose: () => v(!1),
|
|
2149
2149
|
owners: n,
|
|
@@ -2151,7 +2151,7 @@ function et({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2151
2151
|
title: `link repositories from ${o.org?.login ?? "github"}`,
|
|
2152
2152
|
description: `pull requests in linked repos show the transcripts published to ${o.name}.`,
|
|
2153
2153
|
onSave: (e) => {
|
|
2154
|
-
|
|
2154
|
+
h(e), v(!1);
|
|
2155
2155
|
}
|
|
2156
2156
|
})] });
|
|
2157
2157
|
}
|
|
@@ -2182,27 +2182,27 @@ var at = {
|
|
|
2182
2182
|
"danger zone": ue
|
|
2183
2183
|
};
|
|
2184
2184
|
function ot({ data: e = {}, actions: t = {} } = {}) {
|
|
2185
|
-
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: i = !1, whoCanPublish: a = Ge, whoCanRead: o = Ke, memberLeavesChoices: s = tt, hrefFor: c } = e,
|
|
2185
|
+
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: i = !1, whoCanPublish: a = Ge, whoCanRead: o = Ke, memberLeavesChoices: s = tt, hrefFor: c } = e, u = $e(e.collective), d = (e) => (n) => t.onCommit ? t.onCommit(e, n) : Promise.resolve(), [f, p] = M(!1), [h, g] = M(""), _ = !!(t.onTransferOwnership || t.onDelete), y = [
|
|
2186
2186
|
"general",
|
|
2187
2187
|
"access",
|
|
2188
2188
|
"members",
|
|
2189
2189
|
"github orgs",
|
|
2190
2190
|
"pull requests",
|
|
2191
|
-
...
|
|
2192
|
-
],
|
|
2191
|
+
..._ ? ["danger zone"] : []
|
|
2192
|
+
], b = (e) => `cmg-settings-${e.replace(/ /g, "-")}`;
|
|
2193
2193
|
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F("div", {
|
|
2194
2194
|
className: "iu-page cmg-settings",
|
|
2195
2195
|
children: [
|
|
2196
2196
|
/* @__PURE__ */ P("div", {
|
|
2197
2197
|
className: "cmg-crumb-content",
|
|
2198
|
-
children: /* @__PURE__ */ P(
|
|
2198
|
+
children: /* @__PURE__ */ P(w, { items: [
|
|
2199
2199
|
{
|
|
2200
2200
|
label: "collectives",
|
|
2201
2201
|
href: c?.("collectives")
|
|
2202
2202
|
},
|
|
2203
2203
|
{
|
|
2204
|
-
label:
|
|
2205
|
-
href: c?.("collective",
|
|
2204
|
+
label: u.name,
|
|
2205
|
+
href: c?.("collective", u.id)
|
|
2206
2206
|
},
|
|
2207
2207
|
{ label: "settings" }
|
|
2208
2208
|
] })
|
|
@@ -2213,87 +2213,87 @@ function ot({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2213
2213
|
className: "iu-page-title",
|
|
2214
2214
|
children: [/* @__PURE__ */ P("span", {
|
|
2215
2215
|
className: "iu-page-title-content",
|
|
2216
|
-
children:
|
|
2216
|
+
children: u.name
|
|
2217
2217
|
}), ", settings"]
|
|
2218
2218
|
})
|
|
2219
2219
|
}),
|
|
2220
|
-
/* @__PURE__ */ F(
|
|
2221
|
-
sections:
|
|
2222
|
-
id:
|
|
2220
|
+
/* @__PURE__ */ F(m, {
|
|
2221
|
+
sections: y.map((e) => ({
|
|
2222
|
+
id: b(e),
|
|
2223
2223
|
label: e,
|
|
2224
|
-
href: `#${
|
|
2224
|
+
href: `#${b(e)}`,
|
|
2225
2225
|
icon: at[e]
|
|
2226
2226
|
})),
|
|
2227
|
-
currentId:
|
|
2227
|
+
currentId: b(y[0]),
|
|
2228
2228
|
spy: !0,
|
|
2229
2229
|
children: [
|
|
2230
|
-
/* @__PURE__ */ F(
|
|
2230
|
+
/* @__PURE__ */ F(S, {
|
|
2231
2231
|
label: "general",
|
|
2232
2232
|
defaultOpen: !0,
|
|
2233
|
-
id:
|
|
2234
|
-
children: [/* @__PURE__ */ P(
|
|
2233
|
+
id: b("general"),
|
|
2234
|
+
children: [/* @__PURE__ */ P(v, {
|
|
2235
2235
|
label: "name",
|
|
2236
2236
|
control: "text",
|
|
2237
|
-
value:
|
|
2238
|
-
onCommit:
|
|
2239
|
-
}), /* @__PURE__ */ P(
|
|
2237
|
+
value: u.name,
|
|
2238
|
+
onCommit: d("name")
|
|
2239
|
+
}), /* @__PURE__ */ P(v, {
|
|
2240
2240
|
label: "purpose",
|
|
2241
2241
|
control: "text",
|
|
2242
|
-
value:
|
|
2243
|
-
onCommit:
|
|
2242
|
+
value: u.purpose ?? "",
|
|
2243
|
+
onCommit: d("purpose")
|
|
2244
2244
|
})]
|
|
2245
2245
|
}),
|
|
2246
|
-
/* @__PURE__ */ F(
|
|
2246
|
+
/* @__PURE__ */ F(S, {
|
|
2247
2247
|
label: "access",
|
|
2248
2248
|
defaultOpen: !0,
|
|
2249
|
-
id:
|
|
2250
|
-
children: [/* @__PURE__ */ P(
|
|
2249
|
+
id: b("access"),
|
|
2250
|
+
children: [/* @__PURE__ */ P(v, {
|
|
2251
2251
|
label: "who can publish",
|
|
2252
|
-
help:
|
|
2252
|
+
help: ((e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "))(a),
|
|
2253
2253
|
control: "select",
|
|
2254
|
-
value: rt(
|
|
2255
|
-
options: nt(
|
|
2256
|
-
onCommit:
|
|
2257
|
-
}), /* @__PURE__ */ P(
|
|
2254
|
+
value: rt(u.mode, a),
|
|
2255
|
+
options: nt(u.mode, a),
|
|
2256
|
+
onCommit: d("mode")
|
|
2257
|
+
}), /* @__PURE__ */ P(v, {
|
|
2258
2258
|
label: "who can read",
|
|
2259
2259
|
help: "members read and publish. contributors publish, and read only if who can read allows it.",
|
|
2260
2260
|
control: "select",
|
|
2261
|
-
value: rt(
|
|
2262
|
-
options: nt(
|
|
2263
|
-
onCommit:
|
|
2261
|
+
value: rt(u.access, o),
|
|
2262
|
+
options: nt(u.access, o),
|
|
2263
|
+
onCommit: d("access")
|
|
2264
2264
|
})]
|
|
2265
2265
|
}),
|
|
2266
|
-
/* @__PURE__ */ F(
|
|
2266
|
+
/* @__PURE__ */ F(S, {
|
|
2267
2267
|
label: "members",
|
|
2268
2268
|
defaultOpen: !0,
|
|
2269
|
-
count:
|
|
2269
|
+
count: u.memberCount ?? null,
|
|
2270
2270
|
noun: ["member", "members"],
|
|
2271
|
-
id:
|
|
2271
|
+
id: b("members"),
|
|
2272
2272
|
children: [
|
|
2273
2273
|
t.onInvite && /* @__PURE__ */ F("form", {
|
|
2274
2274
|
className: "srow cmg-invite",
|
|
2275
2275
|
onSubmit: (e) => {
|
|
2276
|
-
e.preventDefault(), t.onInvite(
|
|
2276
|
+
e.preventDefault(), t.onInvite(h), g("");
|
|
2277
2277
|
},
|
|
2278
|
-
children: [/* @__PURE__ */ P(
|
|
2278
|
+
children: [/* @__PURE__ */ P(l, {
|
|
2279
2279
|
label: "invite by github username",
|
|
2280
|
-
value:
|
|
2281
|
-
onChange: (e) =>
|
|
2280
|
+
value: h,
|
|
2281
|
+
onChange: (e) => g(e.target.value),
|
|
2282
2282
|
placeholder: "github username"
|
|
2283
2283
|
}), /* @__PURE__ */ P("button", {
|
|
2284
2284
|
type: "submit",
|
|
2285
2285
|
className: "btn btn-secondary btn-sm",
|
|
2286
|
-
disabled: !
|
|
2286
|
+
disabled: !h.trim(),
|
|
2287
2287
|
children: "invite"
|
|
2288
2288
|
})]
|
|
2289
2289
|
}),
|
|
2290
2290
|
/* @__PURE__ */ P("ul", {
|
|
2291
2291
|
className: "cmg-member-list",
|
|
2292
2292
|
"aria-label": "members",
|
|
2293
|
-
children:
|
|
2293
|
+
children: u.members.map((e) => /* @__PURE__ */ F("li", {
|
|
2294
2294
|
className: "cmg-member",
|
|
2295
2295
|
children: [
|
|
2296
|
-
/* @__PURE__ */ P(
|
|
2296
|
+
/* @__PURE__ */ P(C, {
|
|
2297
2297
|
name: e.name ?? e.handle,
|
|
2298
2298
|
size: "sm"
|
|
2299
2299
|
}),
|
|
@@ -2339,40 +2339,40 @@ function ot({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2339
2339
|
]
|
|
2340
2340
|
}, e.handle))
|
|
2341
2341
|
}),
|
|
2342
|
-
/* @__PURE__ */ P(
|
|
2342
|
+
/* @__PURE__ */ P(v, {
|
|
2343
2343
|
label: "when a member leaves",
|
|
2344
2344
|
help: "what happens to the transcripts they published here.",
|
|
2345
2345
|
control: "select",
|
|
2346
|
-
value: rt(
|
|
2347
|
-
options: nt(
|
|
2348
|
-
onCommit:
|
|
2346
|
+
value: rt(u.memberLeaves, s),
|
|
2347
|
+
options: nt(u.memberLeaves, s),
|
|
2348
|
+
onCommit: d("memberLeaves")
|
|
2349
2349
|
})
|
|
2350
2350
|
]
|
|
2351
2351
|
}),
|
|
2352
|
-
/* @__PURE__ */ P(
|
|
2352
|
+
/* @__PURE__ */ P(S, {
|
|
2353
2353
|
label: "github orgs",
|
|
2354
2354
|
defaultOpen: !0,
|
|
2355
|
-
count:
|
|
2355
|
+
count: u.org === void 0 ? null : +!!u.org,
|
|
2356
2356
|
noun: ["org", "orgs"],
|
|
2357
|
-
id:
|
|
2357
|
+
id: b("github orgs"),
|
|
2358
2358
|
children: /* @__PURE__ */ F("div", {
|
|
2359
2359
|
className: "srow",
|
|
2360
2360
|
children: [/* @__PURE__ */ F("span", {
|
|
2361
2361
|
className: "srow-text-col",
|
|
2362
2362
|
children: [/* @__PURE__ */ P("span", {
|
|
2363
2363
|
className: "srow-label",
|
|
2364
|
-
children:
|
|
2364
|
+
children: u.org ? u.org.login : u.org === null ? "no org linked" : "github org"
|
|
2365
2365
|
}), /* @__PURE__ */ F("span", {
|
|
2366
2366
|
className: "srow-help",
|
|
2367
|
-
children: [typeof
|
|
2367
|
+
children: [typeof u.org?.total == "number" ? /* @__PURE__ */ F(N, { children: [
|
|
2368
2368
|
/* @__PURE__ */ P("span", {
|
|
2369
2369
|
className: "tnum",
|
|
2370
|
-
children:
|
|
2370
|
+
children: u.org.linked ?? 0
|
|
2371
2371
|
}),
|
|
2372
2372
|
" of ",
|
|
2373
2373
|
/* @__PURE__ */ P("span", {
|
|
2374
2374
|
className: "tnum",
|
|
2375
|
-
children:
|
|
2375
|
+
children: u.org.total
|
|
2376
2376
|
}),
|
|
2377
2377
|
" repos linked. "
|
|
2378
2378
|
] }) : null, "a collective links one github org today."]
|
|
@@ -2385,35 +2385,24 @@ function ot({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2385
2385
|
})]
|
|
2386
2386
|
})
|
|
2387
2387
|
}),
|
|
2388
|
-
/* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ P(S, {
|
|
2389
2389
|
label: "pull requests",
|
|
2390
2390
|
defaultOpen: !0,
|
|
2391
2391
|
count: 1,
|
|
2392
|
-
id:
|
|
2393
|
-
children:
|
|
2392
|
+
id: b("pull requests"),
|
|
2393
|
+
children: /* @__PURE__ */ P(v, {
|
|
2394
2394
|
label: "show transcripts on pull requests",
|
|
2395
2395
|
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.",
|
|
2396
2396
|
control: "switch",
|
|
2397
2397
|
value: i,
|
|
2398
|
-
onCommit:
|
|
2399
|
-
})
|
|
2400
|
-
className: "srow-note",
|
|
2401
|
-
children: [
|
|
2402
|
-
"automatic linking is now a personal setting, in ",
|
|
2403
|
-
T ? /* @__PURE__ */ P("a", {
|
|
2404
|
-
className: "link",
|
|
2405
|
-
href: T,
|
|
2406
|
-
children: "your settings"
|
|
2407
|
-
}) : "your settings",
|
|
2408
|
-
"."
|
|
2409
|
-
]
|
|
2410
|
-
})]
|
|
2398
|
+
onCommit: d("showOnPullRequests")
|
|
2399
|
+
})
|
|
2411
2400
|
}),
|
|
2412
|
-
|
|
2401
|
+
_ && /* @__PURE__ */ F(S, {
|
|
2413
2402
|
label: "danger zone",
|
|
2414
2403
|
defaultOpen: !0,
|
|
2415
2404
|
count: null,
|
|
2416
|
-
id:
|
|
2405
|
+
id: b("danger zone"),
|
|
2417
2406
|
children: [t.onTransferOwnership && /* @__PURE__ */ F("div", {
|
|
2418
2407
|
className: "srow",
|
|
2419
2408
|
children: [/* @__PURE__ */ P("span", {
|
|
@@ -2431,13 +2420,13 @@ function ot({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2431
2420
|
className: "srow-help",
|
|
2432
2421
|
children: [
|
|
2433
2422
|
"delete ",
|
|
2434
|
-
|
|
2423
|
+
u.name,
|
|
2435
2424
|
" for ",
|
|
2436
|
-
typeof
|
|
2425
|
+
typeof u.memberCount == "number" ? /* @__PURE__ */ F(N, { children: [
|
|
2437
2426
|
"all ",
|
|
2438
2427
|
/* @__PURE__ */ P("span", {
|
|
2439
2428
|
className: "tnum",
|
|
2440
|
-
children:
|
|
2429
|
+
children: u.memberCount
|
|
2441
2430
|
}),
|
|
2442
2431
|
" members"
|
|
2443
2432
|
] }) : "all its members",
|
|
@@ -2454,12 +2443,12 @@ function ot({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2454
2443
|
]
|
|
2455
2444
|
})
|
|
2456
2445
|
]
|
|
2457
|
-
}), t.onLinkRepos && /* @__PURE__ */ P(
|
|
2446
|
+
}), t.onLinkRepos && /* @__PURE__ */ P(E, {
|
|
2458
2447
|
open: f,
|
|
2459
2448
|
onClose: () => p(!1),
|
|
2460
2449
|
owners: n,
|
|
2461
2450
|
initialSelected: r,
|
|
2462
|
-
title: `link repositories from ${
|
|
2451
|
+
title: `link repositories from ${u.org?.login ?? "github"}`,
|
|
2463
2452
|
onSave: (e) => {
|
|
2464
2453
|
t.onLinkRepos(e), p(!1);
|
|
2465
2454
|
}
|
|
@@ -2511,8 +2500,8 @@ function dt(e) {
|
|
|
2511
2500
|
}).format(t).toLowerCase();
|
|
2512
2501
|
}
|
|
2513
2502
|
function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
2514
|
-
let { collective: r = st, providerShare: i = [], pendingReview: a = [], members: o = [], redactions: c = [], browseRows: l = [], roleOptions:
|
|
2515
|
-
D(e),
|
|
2503
|
+
let { collective: r = st, providerShare: i = [], pendingReview: a = [], members: o = [], redactions: c = [], browseRows: l = [], roleOptions: d = [], initialRole: f = "", initialShowRedaction: p = !1, initialBrowseGated: m = !1, stats: g = ct } = e || lt, { onRoleChange: _, onJoin: v, onLeave: y, onSettings: S, onContribute: C, onToggleBrowse: w } = t || {}, [E, D] = M(f || r.role || ""), [O, k] = M(!!p), [j, N] = M(!!m), I = E || r.role || "guest", L = I === "owner", R = I === "guest", B = n && d.length > 0, V = A(() => B ? d : [], [B, d]), H = (e) => {
|
|
2504
|
+
D(e), _?.(e);
|
|
2516
2505
|
};
|
|
2517
2506
|
return /* @__PURE__ */ P("div", {
|
|
2518
2507
|
className: "cmg-root",
|
|
@@ -2591,7 +2580,7 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2591
2580
|
R ? /* @__PURE__ */ F("button", {
|
|
2592
2581
|
type: "button",
|
|
2593
2582
|
className: "btn btn-sm btn-primary",
|
|
2594
|
-
onClick: () =>
|
|
2583
|
+
onClick: () => v?.(),
|
|
2595
2584
|
children: [/* @__PURE__ */ P(pe, {
|
|
2596
2585
|
size: 14,
|
|
2597
2586
|
"aria-hidden": "true"
|
|
@@ -2606,10 +2595,10 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2606
2595
|
"aria-hidden": "true"
|
|
2607
2596
|
}), " contribute"]
|
|
2608
2597
|
}) : null,
|
|
2609
|
-
(I === "member" || I === "contributor") &&
|
|
2598
|
+
(I === "member" || I === "contributor") && y ? /* @__PURE__ */ F("button", {
|
|
2610
2599
|
type: "button",
|
|
2611
2600
|
className: "btn btn-sm btn-danger",
|
|
2612
|
-
onClick: () =>
|
|
2601
|
+
onClick: () => y?.(),
|
|
2613
2602
|
children: [/* @__PURE__ */ P(ae, {
|
|
2614
2603
|
size: 14,
|
|
2615
2604
|
"aria-hidden": "true"
|
|
@@ -2631,40 +2620,40 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2631
2620
|
/* @__PURE__ */ F("div", {
|
|
2632
2621
|
className: "cmg-tiles",
|
|
2633
2622
|
children: [
|
|
2634
|
-
/* @__PURE__ */ P(
|
|
2623
|
+
/* @__PURE__ */ P(s, {
|
|
2635
2624
|
label: "contributions",
|
|
2636
2625
|
value: r.acceptanceMode || "open",
|
|
2637
2626
|
tone: "teal"
|
|
2638
2627
|
}),
|
|
2639
|
-
/* @__PURE__ */ P(
|
|
2628
|
+
/* @__PURE__ */ P(s, {
|
|
2640
2629
|
label: "access",
|
|
2641
2630
|
value: r.dataAccess || "members only",
|
|
2642
2631
|
tone: "amber"
|
|
2643
2632
|
}),
|
|
2644
|
-
/* @__PURE__ */ P(
|
|
2633
|
+
/* @__PURE__ */ P(s, {
|
|
2645
2634
|
label: "your role",
|
|
2646
2635
|
value: I
|
|
2647
2636
|
})
|
|
2648
2637
|
]
|
|
2649
2638
|
}),
|
|
2650
|
-
/* @__PURE__ */ P(
|
|
2639
|
+
/* @__PURE__ */ P(b, { tiles: [
|
|
2651
2640
|
{
|
|
2652
2641
|
key: "transcripts",
|
|
2653
2642
|
label: "transcripts",
|
|
2654
|
-
value:
|
|
2655
|
-
sub: `across ${
|
|
2643
|
+
value: g.transcripts,
|
|
2644
|
+
sub: `across ${g.projects}`
|
|
2656
2645
|
},
|
|
2657
2646
|
{
|
|
2658
2647
|
key: "tokens",
|
|
2659
2648
|
label: "tokens",
|
|
2660
|
-
value:
|
|
2661
|
-
sub:
|
|
2649
|
+
value: g.tokens,
|
|
2650
|
+
sub: g.turns
|
|
2662
2651
|
},
|
|
2663
2652
|
{
|
|
2664
2653
|
key: "contributors",
|
|
2665
2654
|
label: "contributors",
|
|
2666
|
-
value:
|
|
2667
|
-
sub:
|
|
2655
|
+
value: g.contributors,
|
|
2656
|
+
sub: g.hours
|
|
2668
2657
|
}
|
|
2669
2658
|
] }),
|
|
2670
2659
|
/* @__PURE__ */ F("div", {
|
|
@@ -2679,7 +2668,7 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2679
2668
|
id: "cmg-share-h",
|
|
2680
2669
|
className: "cmg-sub",
|
|
2681
2670
|
children: "provider share"
|
|
2682
|
-
}), /* @__PURE__ */ P(
|
|
2671
|
+
}), /* @__PURE__ */ P(u, {
|
|
2683
2672
|
label: "provider share",
|
|
2684
2673
|
total: 100,
|
|
2685
2674
|
data: i.map((e) => ({
|
|
@@ -2693,7 +2682,7 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2693
2682
|
overflow: "auto",
|
|
2694
2683
|
maxWidth: "100%"
|
|
2695
2684
|
},
|
|
2696
|
-
children: /* @__PURE__ */ P(
|
|
2685
|
+
children: /* @__PURE__ */ P(x, {
|
|
2697
2686
|
title: "pending review",
|
|
2698
2687
|
emptyLabel: "no shares awaiting review.",
|
|
2699
2688
|
items: a.map((e) => ({
|
|
@@ -2735,7 +2724,7 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2735
2724
|
className: "cmg-redact-head",
|
|
2736
2725
|
children: [/* @__PURE__ */ P("span", {
|
|
2737
2726
|
className: "cmg-redact-badges",
|
|
2738
|
-
children: /* @__PURE__ */ P(
|
|
2727
|
+
children: /* @__PURE__ */ P(T, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
|
|
2739
2728
|
}), /* @__PURE__ */ P("span", {
|
|
2740
2729
|
className: "cmg-redact-file mono",
|
|
2741
2730
|
children: e.file || "unknown"
|
|
@@ -2795,7 +2784,7 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2795
2784
|
R ? /* @__PURE__ */ F("button", {
|
|
2796
2785
|
type: "button",
|
|
2797
2786
|
className: "btn btn-sm btn-primary",
|
|
2798
|
-
onClick: () =>
|
|
2787
|
+
onClick: () => v?.(),
|
|
2799
2788
|
children: [/* @__PURE__ */ P(pe, {
|
|
2800
2789
|
size: 14,
|
|
2801
2790
|
"aria-hidden": "true"
|
|
@@ -2882,7 +2871,7 @@ function ft({ data: e = lt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2882
2871
|
overflow: "auto",
|
|
2883
2872
|
maxWidth: "100%"
|
|
2884
2873
|
},
|
|
2885
|
-
children: /* @__PURE__ */ P(
|
|
2874
|
+
children: /* @__PURE__ */ P(h, {
|
|
2886
2875
|
title: "members",
|
|
2887
2876
|
roles: ["member", "contributor"],
|
|
2888
2877
|
members: o.map((e) => ({
|