@peasant-labs/fairtrade 0.0.40 → 0.0.42
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/THIRD_PARTY_NOTICES.md +14 -0
- package/dist/lib/{GraphLegend-nwqBLEcI.js → GraphLegend-CBKZsRta.js} +1259 -1399
- package/dist/lib/adapter-Dulh38C2.js +1214 -0
- package/dist/lib/commons.js +202 -201
- package/dist/lib/components.css +1 -1
- package/dist/lib/graph.js +474 -471
- package/dist/lib/share-fonts/AtkinsonHyperlegible-Bold.ttf +0 -0
- package/dist/lib/share-fonts/AtkinsonHyperlegible-Regular.ttf +0 -0
- package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Bold.ttf +0 -0
- package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Regular.ttf +0 -0
- package/dist/lib/share-fonts/OFL-AtkinsonHyperlegible.txt +92 -0
- package/dist/lib/share-fonts/OFL-AtkinsonHyperlegibleMono.txt +93 -0
- package/dist/lib/share.js +1311 -0
- package/dist/lib/time-CpVBzcqQ.js +157 -0
- package/dist/lib/types/AppSidebar.d.ts +2 -0
- package/dist/lib/types/BrandMark.d.ts +2 -6
- package/dist/lib/types/Menu.d.ts +7 -1
- package/dist/lib/types/brand-geometry.d.ts +22 -0
- package/dist/lib/types/commons/providers.d.ts +1 -1
- package/dist/lib/types/graph/CodeMapComposition.d.ts +4 -1
- package/dist/lib/types/graph/CodeMapNavigator.d.ts +5 -1
- package/dist/lib/types/share/ShareCard.d.ts +40 -0
- package/dist/lib/types/share/data.d.ts +54 -0
- package/dist/lib/types/share/fonts.d.ts +16 -0
- package/dist/lib/types/share/index.d.ts +5 -0
- package/dist/lib/types/share/marks.d.ts +23 -0
- package/dist/lib/types/share/metrics.d.ts +10 -0
- package/dist/lib/types/transcript/title.d.ts +21 -0
- package/dist/lib/types/ui/brand-geometry.d.ts +22 -0
- package/dist/lib/types/ui/format.d.ts +35 -0
- package/dist/lib/types/ui/provider-policy.d.ts +27 -0
- package/dist/lib/types/ui/transcript/adapter.d.ts +66 -0
- package/dist/lib/types/ui/transcript/adapter.parse.d.ts +103 -0
- package/dist/lib/types/ui/transcript/analytics.d.ts +213 -0
- package/dist/lib/types/ui/transcript/time.d.ts +47 -0
- package/dist/lib/types/ui/transcript/title.d.ts +84 -0
- package/dist/lib/types/ui/transcript/usage.d.ts +19 -0
- package/dist/lib/types/ui/transcript/view-model.d.ts +700 -0
- package/dist/lib/types/ui/transcript/wire-types.d.ts +63 -0
- package/dist/lib/{ui-DMUCYaeU.js → ui-BxiVcGs3.js} +3724 -4913
- package/dist/lib/ui.js +7 -5
- package/package.json +18 -6
package/dist/lib/commons.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Dt as e, Tt as t, ft as n, mt as r } from "./GraphLegend-CBKZsRta.js";
|
|
2
|
+
import { G as i, Gt as a, Hn as o, J as s, Kt as c, Ln as l, On as u, Q as d, Ut as f, Vn as p, Wn as m, Z as h, ar as g, dt as _, ft as v, lt as y, mt as b, q as x, qt as S, st as C, ut as w } from "./ui-BxiVcGs3.js";
|
|
3
|
+
import { p as T } from "./time-CpVBzcqQ.js";
|
|
3
4
|
import { i as E, o as D, r as O } from "./format-B3uT2wzU.js";
|
|
4
5
|
import { useEffect as k, useId as A, useMemo as j, useRef as M, useState as N } from "react";
|
|
5
6
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
@@ -204,7 +205,7 @@ function je(e) {
|
|
|
204
205
|
return Number.isInteger(e) && e >= 1 ? e : 1;
|
|
205
206
|
}
|
|
206
207
|
function Me({ transcript: e, href: t, onOpen: n }) {
|
|
207
|
-
let
|
|
208
|
+
let a = /* @__PURE__ */ I(P, { children: [
|
|
208
209
|
/* @__PURE__ */ I("div", {
|
|
209
210
|
className: "card-head",
|
|
210
211
|
children: [/* @__PURE__ */ I("span", {
|
|
@@ -216,7 +217,7 @@ function Me({ transcript: e, href: t, onOpen: n }) {
|
|
|
216
217
|
className: "mono",
|
|
217
218
|
children: e.modelName || e.modelProvider
|
|
218
219
|
})]
|
|
219
|
-
}), /* @__PURE__ */ F(
|
|
220
|
+
}), /* @__PURE__ */ F(i, { visibility: e.visibility })]
|
|
220
221
|
}),
|
|
221
222
|
/* @__PURE__ */ F("h3", {
|
|
222
223
|
className: "cex-title",
|
|
@@ -252,16 +253,16 @@ function Me({ transcript: e, href: t, onOpen: n }) {
|
|
|
252
253
|
href: t,
|
|
253
254
|
className: "card cex-tcard",
|
|
254
255
|
onClick: (t) => ke(t, n, e),
|
|
255
|
-
children:
|
|
256
|
+
children: a
|
|
256
257
|
}) : /* @__PURE__ */ F("button", {
|
|
257
258
|
type: "button",
|
|
258
259
|
className: "card cex-tcard",
|
|
259
260
|
onClick: () => n?.(e),
|
|
260
|
-
children:
|
|
261
|
+
children: a
|
|
261
262
|
});
|
|
262
263
|
}
|
|
263
264
|
function Ne({ transcript: e, href: t, onOpen: n }) {
|
|
264
|
-
let
|
|
265
|
+
let a = /* @__PURE__ */ I(P, { children: [
|
|
265
266
|
/* @__PURE__ */ I("span", {
|
|
266
267
|
className: "cex-trow-model",
|
|
267
268
|
children: [/* @__PURE__ */ F(r, { harness: e.modelProvider }), /* @__PURE__ */ F("b", { children: e.modelName || e.modelProvider })]
|
|
@@ -282,18 +283,18 @@ function Ne({ transcript: e, href: t, onOpen: n }) {
|
|
|
282
283
|
className: "cex-trow-date mono tnum",
|
|
283
284
|
children: we(e.sessionStart || e.sessionEnd || "")
|
|
284
285
|
}),
|
|
285
|
-
/* @__PURE__ */ F(
|
|
286
|
+
/* @__PURE__ */ F(i, { visibility: e.visibility })
|
|
286
287
|
] });
|
|
287
288
|
return t ? /* @__PURE__ */ F("a", {
|
|
288
289
|
href: t,
|
|
289
290
|
className: "row cex-trow",
|
|
290
291
|
onClick: (t) => ke(t, n, e),
|
|
291
|
-
children:
|
|
292
|
+
children: a
|
|
292
293
|
}) : /* @__PURE__ */ F("button", {
|
|
293
294
|
type: "button",
|
|
294
295
|
className: "row cex-trow",
|
|
295
296
|
onClick: () => n?.(e),
|
|
296
|
-
children:
|
|
297
|
+
children: a
|
|
297
298
|
});
|
|
298
299
|
}
|
|
299
300
|
function Pe({ collective: e, href: t, onOpen: n }) {
|
|
@@ -332,21 +333,21 @@ function Pe({ collective: e, href: t, onOpen: n }) {
|
|
|
332
333
|
children: r
|
|
333
334
|
});
|
|
334
335
|
}
|
|
335
|
-
function Fe({ data: e, className:
|
|
336
|
-
let f = Ae(e), p = f.transcripts.transcripts, [m,
|
|
336
|
+
function Fe({ data: e, className: n = "", onFiltersChange: a, onOpenTranscript: o, onOpenProfile: s, onOpenCollective: c, transcriptHref: l, profileHref: u, collectiveHref: d }) {
|
|
337
|
+
let f = Ae(e), p = f.transcripts.transcripts, [m, h] = N(""), [g, _] = N(""), [y, x] = N("recent"), [S, C] = N("all"), [w, T] = N(() => /* @__PURE__ */ new Set()), [E, D] = N("grid"), [O, A] = N(() => je(f.transcripts.page)), [P, L] = N(null), [R, z] = N("browse"), B = M(!0), V = M(null);
|
|
337
338
|
k(() => {
|
|
338
339
|
if (B.current) {
|
|
339
|
-
B.current = !1,
|
|
340
|
+
B.current = !1, _(m);
|
|
340
341
|
return;
|
|
341
342
|
}
|
|
342
|
-
let e = setTimeout(() =>
|
|
343
|
+
let e = setTimeout(() => _(m), 250);
|
|
343
344
|
return () => clearTimeout(e);
|
|
344
345
|
}, [B, m]), k(() => {
|
|
345
346
|
let e = JSON.stringify([
|
|
346
|
-
|
|
347
|
+
g,
|
|
347
348
|
y,
|
|
348
|
-
|
|
349
|
-
[...
|
|
349
|
+
S,
|
|
350
|
+
[...w].sort()
|
|
350
351
|
]);
|
|
351
352
|
if (V.current === null || V.current === e) {
|
|
352
353
|
V.current = e;
|
|
@@ -354,25 +355,25 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
354
355
|
}
|
|
355
356
|
V.current = e, A(1);
|
|
356
357
|
}, [
|
|
357
|
-
|
|
358
|
+
g,
|
|
358
359
|
y,
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
S,
|
|
361
|
+
w
|
|
361
362
|
]), k(() => {
|
|
362
|
-
|
|
363
|
-
query:
|
|
364
|
-
provider:
|
|
365
|
-
topics: [...
|
|
363
|
+
a?.({
|
|
364
|
+
query: g,
|
|
365
|
+
provider: S,
|
|
366
|
+
topics: [...w],
|
|
366
367
|
order: y,
|
|
367
368
|
page: O
|
|
368
369
|
});
|
|
369
370
|
}, [
|
|
370
371
|
y,
|
|
371
|
-
|
|
372
|
+
a,
|
|
372
373
|
O,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
S,
|
|
375
|
+
g,
|
|
376
|
+
w
|
|
376
377
|
]);
|
|
377
378
|
let U = p.find((e) => e.id === P) ?? p[0] ?? null, W = U?.owner ?? null, G = W ? p.filter((e) => e.owner.githubUsername === W.githubUsername) : [], ee = j(() => {
|
|
378
379
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -389,26 +390,26 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
389
390
|
P && !p.some((e) => e.id === P) && (L(null), z("browse"));
|
|
390
391
|
}, [P, p]);
|
|
391
392
|
let K = j(() => {
|
|
392
|
-
let e = Ee(
|
|
393
|
+
let e = Ee(g);
|
|
393
394
|
return e ? f.collectives.filter((t) => [
|
|
394
395
|
t.name,
|
|
395
396
|
t.description,
|
|
396
397
|
t.linkedGithubOrg
|
|
397
398
|
].filter(Boolean).join(" ").toLowerCase().includes(e)) : null;
|
|
398
|
-
}, [f.collectives,
|
|
399
|
-
if (
|
|
400
|
-
|
|
399
|
+
}, [f.collectives, g]), q = p, ne = w.size, J = f.transcripts.total ?? p.length, re = O, Y = f.transcripts.limit || p.length || 1, X = (e) => {
|
|
400
|
+
if (o) {
|
|
401
|
+
o(e);
|
|
401
402
|
return;
|
|
402
403
|
}
|
|
403
404
|
L(e.id), z("detail");
|
|
404
405
|
}, oe = () => {
|
|
405
|
-
if (
|
|
406
|
-
|
|
406
|
+
if (s && W) {
|
|
407
|
+
s(W);
|
|
407
408
|
return;
|
|
408
409
|
}
|
|
409
410
|
U ? (L(U.id), z("profile")) : p[0] && (L(p[0].id), z("profile"));
|
|
410
411
|
}, se = () => {
|
|
411
|
-
|
|
412
|
+
h(""), _(""), x("recent"), C("all"), T(/* @__PURE__ */ new Set()), A(1);
|
|
412
413
|
}, Z = j(() => W ? [...Oe(G, (e) => e.projectName || "untitled project").entries()].map(([e, t]) => ({
|
|
413
414
|
project: e,
|
|
414
415
|
items: t
|
|
@@ -421,7 +422,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
421
422
|
};
|
|
422
423
|
}, [G, Z.length]);
|
|
423
424
|
return R === "detail" && U ? /* @__PURE__ */ I("div", {
|
|
424
|
-
className: `cex-root cex-detail ${
|
|
425
|
+
className: `cex-root cex-detail ${n}`.trim(),
|
|
425
426
|
children: [/* @__PURE__ */ I("div", {
|
|
426
427
|
className: "cex-detail-back",
|
|
427
428
|
children: [/* @__PURE__ */ I("button", {
|
|
@@ -474,7 +475,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
474
475
|
children: [/* @__PURE__ */ F("h2", {
|
|
475
476
|
className: "win-title cex-vtitle",
|
|
476
477
|
children: De(U.title || "untitled transcript")
|
|
477
|
-
}), /* @__PURE__ */ F(
|
|
478
|
+
}), /* @__PURE__ */ F(i, { visibility: U.visibility })]
|
|
478
479
|
}),
|
|
479
480
|
/* @__PURE__ */ I("p", {
|
|
480
481
|
className: "cex-vdesc",
|
|
@@ -584,7 +585,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
584
585
|
})]
|
|
585
586
|
})]
|
|
586
587
|
}),
|
|
587
|
-
/* @__PURE__ */ F(
|
|
588
|
+
/* @__PURE__ */ F(v, { tiles: [
|
|
588
589
|
{
|
|
589
590
|
key: "transcripts",
|
|
590
591
|
label: "transcripts",
|
|
@@ -606,7 +607,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
606
607
|
})]
|
|
607
608
|
})]
|
|
608
609
|
}) : R === "profile" && W ? /* @__PURE__ */ I("div", {
|
|
609
|
-
className: `cex-root cex-profile ${
|
|
610
|
+
className: `cex-root cex-profile ${n}`.trim(),
|
|
610
611
|
children: [
|
|
611
612
|
/* @__PURE__ */ I("div", {
|
|
612
613
|
className: "cex-detail-back",
|
|
@@ -660,7 +661,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
660
661
|
})]
|
|
661
662
|
})]
|
|
662
663
|
}),
|
|
663
|
-
/* @__PURE__ */ F(
|
|
664
|
+
/* @__PURE__ */ F(v, { tiles: [
|
|
664
665
|
{
|
|
665
666
|
key: "transcripts",
|
|
666
667
|
label: "transcripts",
|
|
@@ -729,7 +730,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
729
730
|
})
|
|
730
731
|
]
|
|
731
732
|
}) : /* @__PURE__ */ I("div", {
|
|
732
|
-
className: `cex-root ${
|
|
733
|
+
className: `cex-root ${n}`.trim(),
|
|
733
734
|
children: [/* @__PURE__ */ I("header", {
|
|
734
735
|
className: "cex-explore-head",
|
|
735
736
|
children: [/* @__PURE__ */ F("h2", {
|
|
@@ -741,14 +742,14 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
741
742
|
className: "input",
|
|
742
743
|
type: "text",
|
|
743
744
|
value: m,
|
|
744
|
-
onChange: (e) =>
|
|
745
|
+
onChange: (e) => h(e.target.value),
|
|
745
746
|
placeholder: "search transcripts",
|
|
746
747
|
"aria-label": "search transcripts, collectives, projects, models"
|
|
747
748
|
}), m && /* @__PURE__ */ F("button", {
|
|
748
749
|
type: "button",
|
|
749
750
|
className: "cex-clear",
|
|
750
751
|
"aria-label": "clear search",
|
|
751
|
-
onClick: () =>
|
|
752
|
+
onClick: () => h(""),
|
|
752
753
|
children: /* @__PURE__ */ F(ce, {
|
|
753
754
|
size: 14,
|
|
754
755
|
"aria-hidden": "true"
|
|
@@ -757,17 +758,17 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
757
758
|
})]
|
|
758
759
|
}), /* @__PURE__ */ I("div", {
|
|
759
760
|
className: "cex-explore-body",
|
|
760
|
-
children: [/* @__PURE__ */ F(
|
|
761
|
+
children: [/* @__PURE__ */ F(b, {
|
|
761
762
|
order: y,
|
|
762
|
-
onOrder: (e) =>
|
|
763
|
+
onOrder: (e) => x(e),
|
|
763
764
|
providers: ee,
|
|
764
|
-
activeProviders:
|
|
765
|
-
onProvider: (e) =>
|
|
765
|
+
activeProviders: S === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([S]),
|
|
766
|
+
onProvider: (e) => C((t) => t === e ? "all" : e),
|
|
766
767
|
topics: f.popularTags.map((e) => ({
|
|
767
768
|
tag: e.name,
|
|
768
769
|
count: e.usageCount
|
|
769
770
|
})),
|
|
770
|
-
activeTopics:
|
|
771
|
+
activeTopics: w,
|
|
771
772
|
onTopic: (e) => {
|
|
772
773
|
T((t) => {
|
|
773
774
|
let n = new Set(t);
|
|
@@ -846,7 +847,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
846
847
|
]
|
|
847
848
|
})]
|
|
848
849
|
}),
|
|
849
|
-
q.length === 0 ?
|
|
850
|
+
q.length === 0 ? g.trim() || S !== "all" || ne ? /* @__PURE__ */ I("div", {
|
|
850
851
|
className: "empty cex-empty",
|
|
851
852
|
children: [
|
|
852
853
|
/* @__PURE__ */ F("div", {
|
|
@@ -893,7 +894,7 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
893
894
|
onOpen: X
|
|
894
895
|
}, e.id))
|
|
895
896
|
}),
|
|
896
|
-
J > Y && /* @__PURE__ */ F(
|
|
897
|
+
J > Y && /* @__PURE__ */ F(t, {
|
|
897
898
|
page: re,
|
|
898
899
|
totalItems: J,
|
|
899
900
|
pageSize: Y,
|
|
@@ -910,8 +911,8 @@ function Fe({ data: e, className: t = "", onFiltersChange: i, onOpenTranscript:
|
|
|
910
911
|
function Ie(e) {
|
|
911
912
|
return String(e || "unknown").replace(/[-_]+/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
912
913
|
}
|
|
913
|
-
function Le(
|
|
914
|
-
return e
|
|
914
|
+
function Le(e) {
|
|
915
|
+
return T(e);
|
|
915
916
|
}
|
|
916
917
|
//#endregion
|
|
917
918
|
//#region src/mockups/inuse/CommonsManage.jsx
|
|
@@ -1356,7 +1357,7 @@ function Ge() {
|
|
|
1356
1357
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1357
1358
|
});
|
|
1358
1359
|
}
|
|
1359
|
-
let d = [...e].map((e) => o[e]).filter(Boolean),
|
|
1360
|
+
let d = [...e].map((e) => o[e]).filter(Boolean), f = d.filter((e) => e.visibility === "private").length;
|
|
1360
1361
|
return /* @__PURE__ */ I("div", {
|
|
1361
1362
|
className: "cmg-root",
|
|
1362
1363
|
children: [/* @__PURE__ */ I("div", {
|
|
@@ -1492,13 +1493,13 @@ function Ge() {
|
|
|
1492
1493
|
children: e.size
|
|
1493
1494
|
}),
|
|
1494
1495
|
" selected",
|
|
1495
|
-
|
|
1496
|
+
f > 0 ? /* @__PURE__ */ I("span", {
|
|
1496
1497
|
className: "cmg-sel-warn",
|
|
1497
1498
|
children: [
|
|
1498
1499
|
", ",
|
|
1499
1500
|
/* @__PURE__ */ F("span", {
|
|
1500
1501
|
className: "tnum",
|
|
1501
|
-
children:
|
|
1502
|
+
children: f
|
|
1502
1503
|
}),
|
|
1503
1504
|
" private"
|
|
1504
1505
|
]
|
|
@@ -1522,20 +1523,20 @@ function Ge() {
|
|
|
1522
1523
|
})]
|
|
1523
1524
|
})
|
|
1524
1525
|
]
|
|
1525
|
-
}), /* @__PURE__ */ F(
|
|
1526
|
+
}), /* @__PURE__ */ F(S, {
|
|
1526
1527
|
open: i,
|
|
1527
1528
|
title: /* @__PURE__ */ I(P, { children: [
|
|
1528
1529
|
"make ",
|
|
1529
|
-
|
|
1530
|
+
f > 1 ? "these" : "this",
|
|
1530
1531
|
" visible?"
|
|
1531
1532
|
] }),
|
|
1532
|
-
intro:
|
|
1533
|
+
intro: f > 0 ? /* @__PURE__ */ I("p", { children: [
|
|
1533
1534
|
/* @__PURE__ */ F("span", {
|
|
1534
1535
|
className: "tnum",
|
|
1535
|
-
children:
|
|
1536
|
+
children: f
|
|
1536
1537
|
}),
|
|
1537
1538
|
" private transcript",
|
|
1538
|
-
|
|
1539
|
+
f === 1 ? "" : "s",
|
|
1539
1540
|
" will become visible to members of ",
|
|
1540
1541
|
/* @__PURE__ */ F("b", { children: We.name }),
|
|
1541
1542
|
". visibility will change from private to shared."
|
|
@@ -1549,9 +1550,9 @@ function Ge() {
|
|
|
1549
1550
|
axes: [{
|
|
1550
1551
|
icon: G,
|
|
1551
1552
|
key: "visibility",
|
|
1552
|
-
value:
|
|
1553
|
-
scope:
|
|
1554
|
-
tone:
|
|
1553
|
+
value: f > 0 ? "private → shared" : "unchanged",
|
|
1554
|
+
scope: f > 0 ? `${f} transcript${f === 1 ? "" : "s"} newly exposed` : "no visibility change",
|
|
1555
|
+
tone: f > 0 ? "reveal" : "open"
|
|
1555
1556
|
}, {
|
|
1556
1557
|
icon: $,
|
|
1557
1558
|
key: "shared with",
|
|
@@ -1559,8 +1560,8 @@ function Ge() {
|
|
|
1559
1560
|
scope: `${We.members} members can see it`,
|
|
1560
1561
|
tone: "open"
|
|
1561
1562
|
}],
|
|
1562
|
-
requireConsent:
|
|
1563
|
-
confirmLabel:
|
|
1563
|
+
requireConsent: f > 0,
|
|
1564
|
+
confirmLabel: f > 0 ? "contribute & make visible" : "contribute",
|
|
1564
1565
|
confirmIcon: L,
|
|
1565
1566
|
onCancel: () => a(!1),
|
|
1566
1567
|
onConfirm: () => a(!1),
|
|
@@ -1644,7 +1645,7 @@ function Ze(e, t, n) {
|
|
|
1644
1645
|
}, e));
|
|
1645
1646
|
}
|
|
1646
1647
|
function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
1647
|
-
let { collectives: n = [], linkedOrgs: r = [], title: i = "collectives", deck: a, crumb: o, caption: s = "collectives", createLabel:
|
|
1648
|
+
let { collectives: n = [], linkedOrgs: r = [], title: i = "collectives", deck: a, crumb: o, caption: s = "collectives", createLabel: l = "new collective", createBusy: d = !1, whoCanPublish: f = Ke, whoCanRead: p = qe } = e, { onCreateCollective: h, onOpenCollective: _, onSearchCollectives: v } = t, [y, b] = N(!1), [x, S] = N(""), [C, w] = N(""), [T, E] = N(f[0]?.value ?? ""), [O, k] = N(p[0]?.value ?? ""), [j, M] = N(""), [P, L] = N(""), R = A(), z = [
|
|
1648
1649
|
{
|
|
1649
1650
|
key: "name",
|
|
1650
1651
|
label: "name",
|
|
@@ -1653,7 +1654,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1653
1654
|
children: [/* @__PURE__ */ F("button", {
|
|
1654
1655
|
type: "button",
|
|
1655
1656
|
className: "cmg-table-link",
|
|
1656
|
-
onClick: () =>
|
|
1657
|
+
onClick: () => _?.(t.id),
|
|
1657
1658
|
children: t.name
|
|
1658
1659
|
}), t.desc ? /* @__PURE__ */ F("span", {
|
|
1659
1660
|
className: "cmg-cell-desc",
|
|
@@ -1705,7 +1706,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1705
1706
|
children: [
|
|
1706
1707
|
o ? /* @__PURE__ */ F("div", {
|
|
1707
1708
|
className: "cmg-crumb",
|
|
1708
|
-
children: /* @__PURE__ */ F(
|
|
1709
|
+
children: /* @__PURE__ */ F(m, { items: [{ label: o }] })
|
|
1709
1710
|
}) : null,
|
|
1710
1711
|
/* @__PURE__ */ I("header", {
|
|
1711
1712
|
className: "iu-page-head",
|
|
@@ -1716,16 +1717,16 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1716
1717
|
children: i
|
|
1717
1718
|
}), /* @__PURE__ */ I("button", {
|
|
1718
1719
|
type: "button",
|
|
1719
|
-
className: "btn btn-sm " + (
|
|
1720
|
-
"aria-expanded":
|
|
1721
|
-
onClick: () =>
|
|
1720
|
+
className: "btn btn-sm " + (y ? "btn-secondary" : "btn-primary"),
|
|
1721
|
+
"aria-expanded": y,
|
|
1722
|
+
onClick: () => b((e) => !e),
|
|
1722
1723
|
children: [
|
|
1723
1724
|
/* @__PURE__ */ F(se, {
|
|
1724
1725
|
size: 14,
|
|
1725
1726
|
"aria-hidden": "true"
|
|
1726
1727
|
}),
|
|
1727
1728
|
" ",
|
|
1728
|
-
|
|
1729
|
+
y ? "close" : l
|
|
1729
1730
|
]
|
|
1730
1731
|
})]
|
|
1731
1732
|
}), a ? /* @__PURE__ */ F("p", {
|
|
@@ -1733,7 +1734,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1733
1734
|
children: a
|
|
1734
1735
|
}) : null]
|
|
1735
1736
|
}),
|
|
1736
|
-
|
|
1737
|
+
y && /* @__PURE__ */ I("section", {
|
|
1737
1738
|
className: "cmg-form card",
|
|
1738
1739
|
"aria-labelledby": `${R}-form`,
|
|
1739
1740
|
children: [
|
|
@@ -1753,8 +1754,8 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1753
1754
|
}), /* @__PURE__ */ F("input", {
|
|
1754
1755
|
className: "input",
|
|
1755
1756
|
type: "text",
|
|
1756
|
-
value:
|
|
1757
|
-
onChange: (e) =>
|
|
1757
|
+
value: x,
|
|
1758
|
+
onChange: (e) => S(e.target.value)
|
|
1758
1759
|
})]
|
|
1759
1760
|
}),
|
|
1760
1761
|
/* @__PURE__ */ I("label", {
|
|
@@ -1765,19 +1766,19 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1765
1766
|
}), /* @__PURE__ */ F("textarea", {
|
|
1766
1767
|
className: "input",
|
|
1767
1768
|
rows: 2,
|
|
1768
|
-
value:
|
|
1769
|
-
onChange: (e) =>
|
|
1769
|
+
value: C,
|
|
1770
|
+
onChange: (e) => w(e.target.value)
|
|
1770
1771
|
})]
|
|
1771
1772
|
}),
|
|
1772
1773
|
/* @__PURE__ */ F("div", {
|
|
1773
1774
|
className: "cmg-field",
|
|
1774
|
-
children: /* @__PURE__ */ F(
|
|
1775
|
+
children: /* @__PURE__ */ F(c, {
|
|
1775
1776
|
variant: "select",
|
|
1776
1777
|
label: "who can publish",
|
|
1777
1778
|
name: "who-can-publish",
|
|
1778
|
-
value:
|
|
1779
|
+
value: T,
|
|
1779
1780
|
onChange: E,
|
|
1780
|
-
options:
|
|
1781
|
+
options: f.map((e) => ({
|
|
1781
1782
|
...e,
|
|
1782
1783
|
rationale: e.help
|
|
1783
1784
|
}))
|
|
@@ -1785,13 +1786,13 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1785
1786
|
}),
|
|
1786
1787
|
/* @__PURE__ */ F("div", {
|
|
1787
1788
|
className: "cmg-field",
|
|
1788
|
-
children: /* @__PURE__ */ F(
|
|
1789
|
+
children: /* @__PURE__ */ F(c, {
|
|
1789
1790
|
variant: "select",
|
|
1790
1791
|
label: "who can read",
|
|
1791
1792
|
name: "who-can-read",
|
|
1792
1793
|
value: O,
|
|
1793
1794
|
onChange: k,
|
|
1794
|
-
options:
|
|
1795
|
+
options: p
|
|
1795
1796
|
})
|
|
1796
1797
|
}),
|
|
1797
1798
|
/* @__PURE__ */ I("label", {
|
|
@@ -1822,27 +1823,27 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1822
1823
|
children: [/* @__PURE__ */ F("button", {
|
|
1823
1824
|
type: "button",
|
|
1824
1825
|
className: "btn btn-sm btn-primary",
|
|
1825
|
-
disabled: !
|
|
1826
|
+
disabled: !x.trim() || d,
|
|
1826
1827
|
"aria-describedby": R,
|
|
1827
|
-
onClick: () =>
|
|
1828
|
-
name:
|
|
1829
|
-
purpose:
|
|
1830
|
-
mode:
|
|
1828
|
+
onClick: () => h?.({
|
|
1829
|
+
name: x,
|
|
1830
|
+
purpose: C,
|
|
1831
|
+
mode: T,
|
|
1831
1832
|
access: O,
|
|
1832
1833
|
org: j
|
|
1833
1834
|
}),
|
|
1834
|
-
children:
|
|
1835
|
+
children: d ? "creating" : "create collective"
|
|
1835
1836
|
}), /* @__PURE__ */ F("span", {
|
|
1836
1837
|
id: R,
|
|
1837
1838
|
className: "cmg-form-hint mono",
|
|
1838
|
-
children:
|
|
1839
|
+
children: f.find((e) => e.value === T)?.help
|
|
1839
1840
|
})]
|
|
1840
1841
|
})
|
|
1841
1842
|
]
|
|
1842
1843
|
}),
|
|
1843
1844
|
/* @__PURE__ */ I("div", {
|
|
1844
1845
|
className: "cmg-section",
|
|
1845
|
-
children: [/* @__PURE__ */ F(
|
|
1846
|
+
children: [/* @__PURE__ */ F(u, {
|
|
1846
1847
|
caption: `${s} ${n.length}`,
|
|
1847
1848
|
columns: z,
|
|
1848
1849
|
rows: n,
|
|
@@ -1852,7 +1853,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1852
1853
|
children: "in a curated collective, each transcript you publish waits for the owner to approve it."
|
|
1853
1854
|
}) : null]
|
|
1854
1855
|
}),
|
|
1855
|
-
|
|
1856
|
+
v && /* @__PURE__ */ I("section", {
|
|
1856
1857
|
className: "cmg-section",
|
|
1857
1858
|
"aria-labelledby": `${R}-find`,
|
|
1858
1859
|
children: [/* @__PURE__ */ F("h3", {
|
|
@@ -1863,9 +1864,9 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1863
1864
|
className: "cmg-find",
|
|
1864
1865
|
role: "search",
|
|
1865
1866
|
onSubmit: (e) => {
|
|
1866
|
-
e.preventDefault(),
|
|
1867
|
+
e.preventDefault(), v(P);
|
|
1867
1868
|
},
|
|
1868
|
-
children: [/* @__PURE__ */ F(
|
|
1869
|
+
children: [/* @__PURE__ */ F(g, {
|
|
1869
1870
|
label: "collective or github org",
|
|
1870
1871
|
type: "search",
|
|
1871
1872
|
iconLeft: Z,
|
|
@@ -1903,14 +1904,14 @@ function et(e = {}) {
|
|
|
1903
1904
|
};
|
|
1904
1905
|
}
|
|
1905
1906
|
function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
1906
|
-
let { owners:
|
|
1907
|
+
let { owners: r = [], linkedRepos: i = [], hrefFor: a } = e, s = et(e.collective), { onSettings: c, onContribute: l, onReview: d, onOpenTranscript: f, onOpenPullRequest: p, onLinkRepos: h, onShowMore: g } = t, [_, v] = N(!1), b = A(), S = s.transcriptCount ?? s.transcripts.length, w = [
|
|
1907
1908
|
{
|
|
1908
1909
|
key: "title",
|
|
1909
1910
|
label: "title",
|
|
1910
1911
|
width: "18rem",
|
|
1911
1912
|
render: (e, t) => /* @__PURE__ */ I("span", {
|
|
1912
1913
|
className: "iu-session",
|
|
1913
|
-
children: [/* @__PURE__ */ F(
|
|
1914
|
+
children: [/* @__PURE__ */ F(n, {
|
|
1914
1915
|
harness: t.harness,
|
|
1915
1916
|
accent: !0
|
|
1916
1917
|
}), /* @__PURE__ */ I("span", {
|
|
@@ -1947,8 +1948,8 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1947
1948
|
label: "pull requests",
|
|
1948
1949
|
render: (e, t) => t.pullRequests?.length ? /* @__PURE__ */ I("span", {
|
|
1949
1950
|
className: "cmg-prs",
|
|
1950
|
-
children: [/* @__PURE__ */ F(
|
|
1951
|
-
items: Ze(t.pullRequests,
|
|
1951
|
+
children: [/* @__PURE__ */ F(C, {
|
|
1952
|
+
items: Ze(t.pullRequests, p, a),
|
|
1952
1953
|
label: "pull requests",
|
|
1953
1954
|
noun: ["pull request", "pull requests"]
|
|
1954
1955
|
}), t.repo && /* @__PURE__ */ F("span", {
|
|
@@ -1986,7 +1987,7 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1986
1987
|
children: [
|
|
1987
1988
|
/* @__PURE__ */ F("div", {
|
|
1988
1989
|
className: "cmg-crumb-content",
|
|
1989
|
-
children: /* @__PURE__ */ F(
|
|
1990
|
+
children: /* @__PURE__ */ F(m, { items: [{
|
|
1990
1991
|
label: "collectives",
|
|
1991
1992
|
href: a?.("collectives")
|
|
1992
1993
|
}, { label: s.name }] })
|
|
@@ -2001,23 +2002,23 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2001
2002
|
children: s.name
|
|
2002
2003
|
}), /* @__PURE__ */ I("span", {
|
|
2003
2004
|
className: "cmg-actions",
|
|
2004
|
-
children: [s.role === "owner" &&
|
|
2005
|
+
children: [s.role === "owner" && c && /* @__PURE__ */ I("button", {
|
|
2005
2006
|
type: "button",
|
|
2006
2007
|
className: "btn btn-secondary btn-sm",
|
|
2007
|
-
onClick: () =>
|
|
2008
|
+
onClick: () => c(),
|
|
2008
2009
|
children: [/* @__PURE__ */ F(Q, {
|
|
2009
2010
|
size: 14,
|
|
2010
2011
|
"aria-hidden": "true"
|
|
2011
2012
|
}), " settings"]
|
|
2012
|
-
}), (
|
|
2013
|
+
}), (l || d) && /* @__PURE__ */ F(o, {
|
|
2013
2014
|
icon: oe,
|
|
2014
2015
|
ariaLabel: "more",
|
|
2015
2016
|
size: "sm",
|
|
2016
2017
|
align: "end",
|
|
2017
|
-
items: [...
|
|
2018
|
+
items: [...l ? [{
|
|
2018
2019
|
label: "publish several transcripts",
|
|
2019
2020
|
icon: fe,
|
|
2020
|
-
onSelect: () =>
|
|
2021
|
+
onSelect: () => l()
|
|
2021
2022
|
}] : [], ...d ? [{
|
|
2022
2023
|
label: "review transcripts",
|
|
2023
2024
|
icon: V,
|
|
@@ -2044,7 +2045,7 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2044
2045
|
})]
|
|
2045
2046
|
}, e.key))
|
|
2046
2047
|
}),
|
|
2047
|
-
/* @__PURE__ */ F(
|
|
2048
|
+
/* @__PURE__ */ F(y, {
|
|
2048
2049
|
items: s.stats,
|
|
2049
2050
|
label: `${s.name} in numbers`
|
|
2050
2051
|
}),
|
|
@@ -2052,8 +2053,8 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2052
2053
|
className: "cmg-home",
|
|
2053
2054
|
children: [/* @__PURE__ */ I("div", {
|
|
2054
2055
|
className: "cmg-home-main",
|
|
2055
|
-
children: [/* @__PURE__ */ F(
|
|
2056
|
-
caption: `transcripts ${
|
|
2056
|
+
children: [/* @__PURE__ */ F(u, {
|
|
2057
|
+
caption: `transcripts ${S}`,
|
|
2057
2058
|
columns: w,
|
|
2058
2059
|
rows: s.transcripts,
|
|
2059
2060
|
rowKey: (e) => e.id
|
|
@@ -2070,10 +2071,10 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2070
2071
|
" of ",
|
|
2071
2072
|
/* @__PURE__ */ F("span", {
|
|
2072
2073
|
className: "tnum",
|
|
2073
|
-
children:
|
|
2074
|
+
children: S
|
|
2074
2075
|
})
|
|
2075
2076
|
]
|
|
2076
|
-
}),
|
|
2077
|
+
}), S > s.transcripts.length && g && /* @__PURE__ */ F("button", {
|
|
2077
2078
|
type: "button",
|
|
2078
2079
|
className: "btn btn-secondary btn-sm",
|
|
2079
2080
|
onClick: () => g(),
|
|
@@ -2113,7 +2114,7 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2113
2114
|
s.role === "owner" && h && /* @__PURE__ */ F("button", {
|
|
2114
2115
|
type: "button",
|
|
2115
2116
|
className: "btn btn-ghost btn-sm",
|
|
2116
|
-
onClick: () =>
|
|
2117
|
+
onClick: () => v(!0),
|
|
2117
2118
|
children: "manage"
|
|
2118
2119
|
})
|
|
2119
2120
|
]
|
|
@@ -2144,15 +2145,15 @@ function tt({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2144
2145
|
})]
|
|
2145
2146
|
})
|
|
2146
2147
|
]
|
|
2147
|
-
}), h && /* @__PURE__ */ F(
|
|
2148
|
-
open:
|
|
2149
|
-
onClose: () =>
|
|
2150
|
-
owners:
|
|
2151
|
-
initialSelected:
|
|
2148
|
+
}), h && /* @__PURE__ */ F(x, {
|
|
2149
|
+
open: _,
|
|
2150
|
+
onClose: () => v(!1),
|
|
2151
|
+
owners: r,
|
|
2152
|
+
initialSelected: i,
|
|
2152
2153
|
title: `link repositories from ${s.org?.login ?? "github"}`,
|
|
2153
2154
|
description: `pull requests in linked repos show the transcripts published to ${s.name}.`,
|
|
2154
2155
|
onSave: (e) => {
|
|
2155
|
-
h(e),
|
|
2156
|
+
h(e), v(!1);
|
|
2156
2157
|
}
|
|
2157
2158
|
})] });
|
|
2158
2159
|
}
|
|
@@ -2172,7 +2173,7 @@ function rt(e, t) {
|
|
|
2172
2173
|
}
|
|
2173
2174
|
var it = (e, t) => t.some((t) => t.value === e) ? e : "";
|
|
2174
2175
|
function at() {
|
|
2175
|
-
return /* @__PURE__ */ F(
|
|
2176
|
+
return /* @__PURE__ */ F(e, { name: "github" });
|
|
2176
2177
|
}
|
|
2177
2178
|
var ot = {
|
|
2178
2179
|
general: ue,
|
|
@@ -2183,27 +2184,27 @@ var ot = {
|
|
|
2183
2184
|
"danger zone": de
|
|
2184
2185
|
};
|
|
2185
2186
|
function st({ data: e = {}, actions: t = {} } = {}) {
|
|
2186
|
-
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: i = !1, whoCanPublish: a = Ke, whoCanRead: o = qe, memberLeavesChoices:
|
|
2187
|
+
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: i = !1, whoCanPublish: a = Ke, whoCanRead: o = qe, memberLeavesChoices: c = nt, hrefFor: u } = e, f = et(e.collective), p = (e) => (n) => t.onCommit ? t.onCommit(e, n) : Promise.resolve(), [_, v] = N(!1), [y, b] = N(""), S = !!(t.onTransferOwnership || t.onDelete), C = [
|
|
2187
2188
|
"general",
|
|
2188
2189
|
"access",
|
|
2189
2190
|
"members",
|
|
2190
2191
|
"github orgs",
|
|
2191
2192
|
"pull requests",
|
|
2192
|
-
...
|
|
2193
|
-
],
|
|
2193
|
+
...S ? ["danger zone"] : []
|
|
2194
|
+
], w = (e) => `cmg-settings-${e.replace(/ /g, "-")}`;
|
|
2194
2195
|
return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ I("div", {
|
|
2195
2196
|
className: "iu-page cmg-settings",
|
|
2196
2197
|
children: [
|
|
2197
2198
|
/* @__PURE__ */ F("div", {
|
|
2198
2199
|
className: "cmg-crumb-content",
|
|
2199
|
-
children: /* @__PURE__ */ F(
|
|
2200
|
+
children: /* @__PURE__ */ F(m, { items: [
|
|
2200
2201
|
{
|
|
2201
2202
|
label: "collectives",
|
|
2202
|
-
href:
|
|
2203
|
+
href: u?.("collectives")
|
|
2203
2204
|
},
|
|
2204
2205
|
{
|
|
2205
|
-
label:
|
|
2206
|
-
href:
|
|
2206
|
+
label: f.name,
|
|
2207
|
+
href: u?.("collective", f.id)
|
|
2207
2208
|
},
|
|
2208
2209
|
{ label: "settings" }
|
|
2209
2210
|
] })
|
|
@@ -2214,87 +2215,87 @@ function st({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2214
2215
|
className: "iu-page-title",
|
|
2215
2216
|
children: [/* @__PURE__ */ F("span", {
|
|
2216
2217
|
className: "iu-page-title-content",
|
|
2217
|
-
children:
|
|
2218
|
+
children: f.name
|
|
2218
2219
|
}), ", settings"]
|
|
2219
2220
|
})
|
|
2220
2221
|
}),
|
|
2221
|
-
/* @__PURE__ */ I(
|
|
2222
|
-
sections:
|
|
2223
|
-
id:
|
|
2222
|
+
/* @__PURE__ */ I(s, {
|
|
2223
|
+
sections: C.map((e) => ({
|
|
2224
|
+
id: w(e),
|
|
2224
2225
|
label: e,
|
|
2225
|
-
href: `#${
|
|
2226
|
+
href: `#${w(e)}`,
|
|
2226
2227
|
icon: ot[e]
|
|
2227
2228
|
})),
|
|
2228
|
-
currentId: C
|
|
2229
|
+
currentId: w(C[0]),
|
|
2229
2230
|
spy: !0,
|
|
2230
2231
|
children: [
|
|
2231
|
-
/* @__PURE__ */ I(
|
|
2232
|
+
/* @__PURE__ */ I(h, {
|
|
2232
2233
|
label: "general",
|
|
2233
2234
|
defaultOpen: !0,
|
|
2234
|
-
id:
|
|
2235
|
-
children: [/* @__PURE__ */ F(
|
|
2235
|
+
id: w("general"),
|
|
2236
|
+
children: [/* @__PURE__ */ F(d, {
|
|
2236
2237
|
label: "name",
|
|
2237
2238
|
control: "text",
|
|
2238
|
-
value:
|
|
2239
|
-
onCommit:
|
|
2240
|
-
}), /* @__PURE__ */ F(
|
|
2239
|
+
value: f.name,
|
|
2240
|
+
onCommit: p("name")
|
|
2241
|
+
}), /* @__PURE__ */ F(d, {
|
|
2241
2242
|
label: "purpose",
|
|
2242
2243
|
control: "text",
|
|
2243
|
-
value:
|
|
2244
|
-
onCommit:
|
|
2244
|
+
value: f.purpose ?? "",
|
|
2245
|
+
onCommit: p("purpose")
|
|
2245
2246
|
})]
|
|
2246
2247
|
}),
|
|
2247
|
-
/* @__PURE__ */ I(
|
|
2248
|
+
/* @__PURE__ */ I(h, {
|
|
2248
2249
|
label: "access",
|
|
2249
2250
|
defaultOpen: !0,
|
|
2250
|
-
id:
|
|
2251
|
-
children: [/* @__PURE__ */ F(
|
|
2251
|
+
id: w("access"),
|
|
2252
|
+
children: [/* @__PURE__ */ F(d, {
|
|
2252
2253
|
label: "who can publish",
|
|
2253
2254
|
help: ((e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "))(a),
|
|
2254
2255
|
control: "select",
|
|
2255
|
-
value: it(
|
|
2256
|
-
options: rt(
|
|
2257
|
-
onCommit:
|
|
2258
|
-
}), /* @__PURE__ */ F(
|
|
2256
|
+
value: it(f.mode, a),
|
|
2257
|
+
options: rt(f.mode, a),
|
|
2258
|
+
onCommit: p("mode")
|
|
2259
|
+
}), /* @__PURE__ */ F(d, {
|
|
2259
2260
|
label: "who can read",
|
|
2260
2261
|
help: "members read and publish. contributors publish, and read only if who can read allows it.",
|
|
2261
2262
|
control: "select",
|
|
2262
|
-
value: it(
|
|
2263
|
-
options: rt(
|
|
2264
|
-
onCommit:
|
|
2263
|
+
value: it(f.access, o),
|
|
2264
|
+
options: rt(f.access, o),
|
|
2265
|
+
onCommit: p("access")
|
|
2265
2266
|
})]
|
|
2266
2267
|
}),
|
|
2267
|
-
/* @__PURE__ */ I(
|
|
2268
|
+
/* @__PURE__ */ I(h, {
|
|
2268
2269
|
label: "members",
|
|
2269
2270
|
defaultOpen: !0,
|
|
2270
|
-
count:
|
|
2271
|
+
count: f.memberCount ?? null,
|
|
2271
2272
|
noun: ["member", "members"],
|
|
2272
|
-
id:
|
|
2273
|
+
id: w("members"),
|
|
2273
2274
|
children: [
|
|
2274
2275
|
t.onInvite && /* @__PURE__ */ I("form", {
|
|
2275
2276
|
className: "srow cmg-invite",
|
|
2276
2277
|
onSubmit: (e) => {
|
|
2277
|
-
e.preventDefault(), t.onInvite(
|
|
2278
|
+
e.preventDefault(), t.onInvite(y), b("");
|
|
2278
2279
|
},
|
|
2279
|
-
children: [/* @__PURE__ */ F(
|
|
2280
|
+
children: [/* @__PURE__ */ F(g, {
|
|
2280
2281
|
label: "invite by github username",
|
|
2281
|
-
value:
|
|
2282
|
-
onChange: (e) =>
|
|
2282
|
+
value: y,
|
|
2283
|
+
onChange: (e) => b(e.target.value),
|
|
2283
2284
|
placeholder: "github username"
|
|
2284
2285
|
}), /* @__PURE__ */ F("button", {
|
|
2285
2286
|
type: "submit",
|
|
2286
2287
|
className: "btn btn-secondary btn-sm",
|
|
2287
|
-
disabled: !
|
|
2288
|
+
disabled: !y.trim(),
|
|
2288
2289
|
children: "invite"
|
|
2289
2290
|
})]
|
|
2290
2291
|
}),
|
|
2291
2292
|
/* @__PURE__ */ F("ul", {
|
|
2292
2293
|
className: "cmg-member-list",
|
|
2293
2294
|
"aria-label": "members",
|
|
2294
|
-
children:
|
|
2295
|
+
children: f.members.map((e) => /* @__PURE__ */ I("li", {
|
|
2295
2296
|
className: "cmg-member",
|
|
2296
2297
|
children: [
|
|
2297
|
-
/* @__PURE__ */ F(
|
|
2298
|
+
/* @__PURE__ */ F(l, {
|
|
2298
2299
|
name: e.name ?? e.handle,
|
|
2299
2300
|
size: "sm"
|
|
2300
2301
|
}),
|
|
@@ -2340,40 +2341,40 @@ function st({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2340
2341
|
]
|
|
2341
2342
|
}, e.handle))
|
|
2342
2343
|
}),
|
|
2343
|
-
/* @__PURE__ */ F(
|
|
2344
|
+
/* @__PURE__ */ F(d, {
|
|
2344
2345
|
label: "when a member leaves",
|
|
2345
2346
|
help: "what happens to the transcripts they published here.",
|
|
2346
2347
|
control: "select",
|
|
2347
|
-
value: it(
|
|
2348
|
-
options: rt(
|
|
2349
|
-
onCommit:
|
|
2348
|
+
value: it(f.memberLeaves, c),
|
|
2349
|
+
options: rt(f.memberLeaves, c),
|
|
2350
|
+
onCommit: p("memberLeaves")
|
|
2350
2351
|
})
|
|
2351
2352
|
]
|
|
2352
2353
|
}),
|
|
2353
|
-
/* @__PURE__ */ F(
|
|
2354
|
+
/* @__PURE__ */ F(h, {
|
|
2354
2355
|
label: "github orgs",
|
|
2355
2356
|
defaultOpen: !0,
|
|
2356
|
-
count:
|
|
2357
|
+
count: f.org === void 0 ? null : +!!f.org,
|
|
2357
2358
|
noun: ["org", "orgs"],
|
|
2358
|
-
id:
|
|
2359
|
+
id: w("github orgs"),
|
|
2359
2360
|
children: /* @__PURE__ */ I("div", {
|
|
2360
2361
|
className: "srow",
|
|
2361
2362
|
children: [/* @__PURE__ */ I("span", {
|
|
2362
2363
|
className: "srow-text-col",
|
|
2363
2364
|
children: [/* @__PURE__ */ F("span", {
|
|
2364
2365
|
className: "srow-label",
|
|
2365
|
-
children:
|
|
2366
|
+
children: f.org ? f.org.login : f.org === null ? "no org linked" : "github org"
|
|
2366
2367
|
}), /* @__PURE__ */ I("span", {
|
|
2367
2368
|
className: "srow-help",
|
|
2368
|
-
children: [typeof
|
|
2369
|
+
children: [typeof f.org?.total == "number" ? /* @__PURE__ */ I(P, { children: [
|
|
2369
2370
|
/* @__PURE__ */ F("span", {
|
|
2370
2371
|
className: "tnum",
|
|
2371
|
-
children:
|
|
2372
|
+
children: f.org.linked ?? 0
|
|
2372
2373
|
}),
|
|
2373
2374
|
" of ",
|
|
2374
2375
|
/* @__PURE__ */ F("span", {
|
|
2375
2376
|
className: "tnum",
|
|
2376
|
-
children:
|
|
2377
|
+
children: f.org.total
|
|
2377
2378
|
}),
|
|
2378
2379
|
" repos linked. "
|
|
2379
2380
|
] }) : null, "a collective links one github org today."]
|
|
@@ -2381,29 +2382,29 @@ function st({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2381
2382
|
}), t.onLinkRepos && /* @__PURE__ */ F("button", {
|
|
2382
2383
|
type: "button",
|
|
2383
2384
|
className: "btn btn-secondary btn-sm",
|
|
2384
|
-
onClick: () =>
|
|
2385
|
+
onClick: () => v(!0),
|
|
2385
2386
|
children: "manage"
|
|
2386
2387
|
})]
|
|
2387
2388
|
})
|
|
2388
2389
|
}),
|
|
2389
|
-
/* @__PURE__ */ F(
|
|
2390
|
+
/* @__PURE__ */ F(h, {
|
|
2390
2391
|
label: "pull requests",
|
|
2391
2392
|
defaultOpen: !0,
|
|
2392
2393
|
count: 1,
|
|
2393
|
-
id:
|
|
2394
|
-
children: /* @__PURE__ */ F(
|
|
2394
|
+
id: w("pull requests"),
|
|
2395
|
+
children: /* @__PURE__ */ F(d, {
|
|
2395
2396
|
label: "show transcripts on pull requests",
|
|
2396
2397
|
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.",
|
|
2397
2398
|
control: "switch",
|
|
2398
2399
|
value: i,
|
|
2399
|
-
onCommit:
|
|
2400
|
+
onCommit: p("showOnPullRequests")
|
|
2400
2401
|
})
|
|
2401
2402
|
}),
|
|
2402
|
-
|
|
2403
|
+
S && /* @__PURE__ */ I(h, {
|
|
2403
2404
|
label: "danger zone",
|
|
2404
2405
|
defaultOpen: !0,
|
|
2405
2406
|
count: null,
|
|
2406
|
-
id:
|
|
2407
|
+
id: w("danger zone"),
|
|
2407
2408
|
children: [t.onTransferOwnership && /* @__PURE__ */ I("div", {
|
|
2408
2409
|
className: "srow",
|
|
2409
2410
|
children: [/* @__PURE__ */ F("span", {
|
|
@@ -2421,13 +2422,13 @@ function st({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2421
2422
|
className: "srow-help",
|
|
2422
2423
|
children: [
|
|
2423
2424
|
"delete ",
|
|
2424
|
-
|
|
2425
|
+
f.name,
|
|
2425
2426
|
" for ",
|
|
2426
|
-
typeof
|
|
2427
|
+
typeof f.memberCount == "number" ? /* @__PURE__ */ I(P, { children: [
|
|
2427
2428
|
"all ",
|
|
2428
2429
|
/* @__PURE__ */ F("span", {
|
|
2429
2430
|
className: "tnum",
|
|
2430
|
-
children:
|
|
2431
|
+
children: f.memberCount
|
|
2431
2432
|
}),
|
|
2432
2433
|
" members"
|
|
2433
2434
|
] }) : "all its members",
|
|
@@ -2444,14 +2445,14 @@ function st({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2444
2445
|
]
|
|
2445
2446
|
})
|
|
2446
2447
|
]
|
|
2447
|
-
}), t.onLinkRepos && /* @__PURE__ */ F(
|
|
2448
|
-
open:
|
|
2449
|
-
onClose: () =>
|
|
2448
|
+
}), t.onLinkRepos && /* @__PURE__ */ F(x, {
|
|
2449
|
+
open: _,
|
|
2450
|
+
onClose: () => v(!1),
|
|
2450
2451
|
owners: n,
|
|
2451
2452
|
initialSelected: r,
|
|
2452
|
-
title: `link repositories from ${
|
|
2453
|
+
title: `link repositories from ${f.org?.login ?? "github"}`,
|
|
2453
2454
|
onSave: (e) => {
|
|
2454
|
-
t.onLinkRepos(e),
|
|
2455
|
+
t.onLinkRepos(e), v(!1);
|
|
2455
2456
|
}
|
|
2456
2457
|
})] });
|
|
2457
2458
|
}
|
|
@@ -2501,8 +2502,8 @@ function ft(e) {
|
|
|
2501
2502
|
}).format(t).toLowerCase();
|
|
2502
2503
|
}
|
|
2503
2504
|
function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
2504
|
-
let { collective: r = ct, providerShare: i = [], pendingReview: o = [], members: s = [], redactions: c = [], browseRows: l = [], roleOptions:
|
|
2505
|
-
D(e),
|
|
2505
|
+
let { collective: r = ct, providerShare: i = [], pendingReview: o = [], members: s = [], redactions: c = [], browseRows: l = [], roleOptions: u = [], initialRole: d = "", initialShowRedaction: m = !1, initialBrowseGated: h = !1, stats: g = lt } = e || ut, { onRoleChange: y, onJoin: b, onLeave: x, onSettings: S, onContribute: C, onToggleBrowse: T } = t || {}, [E, D] = N(d || r.role || ""), [O, k] = N(!!m), [A, M] = N(!!h), P = E || r.role || "guest", L = P === "owner", R = P === "guest", z = n && u.length > 0, V = j(() => z ? u : [], [z, u]), H = (e) => {
|
|
2506
|
+
D(e), y?.(e);
|
|
2506
2507
|
};
|
|
2507
2508
|
return /* @__PURE__ */ F("div", {
|
|
2508
2509
|
className: "cmg-root",
|
|
@@ -2587,10 +2588,10 @@ function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2587
2588
|
"aria-hidden": "true"
|
|
2588
2589
|
}), " join as contributor"]
|
|
2589
2590
|
}) : null,
|
|
2590
|
-
(P === "member" || P === "contributor") &&
|
|
2591
|
+
(P === "member" || P === "contributor") && C ? /* @__PURE__ */ I("button", {
|
|
2591
2592
|
type: "button",
|
|
2592
2593
|
className: "btn btn-sm btn-primary",
|
|
2593
|
-
onClick: () =>
|
|
2594
|
+
onClick: () => C?.(),
|
|
2594
2595
|
children: [/* @__PURE__ */ F(le, {
|
|
2595
2596
|
size: 14,
|
|
2596
2597
|
"aria-hidden": "true"
|
|
@@ -2621,40 +2622,40 @@ function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2621
2622
|
/* @__PURE__ */ I("div", {
|
|
2622
2623
|
className: "cmg-tiles",
|
|
2623
2624
|
children: [
|
|
2624
|
-
/* @__PURE__ */ F(
|
|
2625
|
+
/* @__PURE__ */ F(w, {
|
|
2625
2626
|
label: "contributions",
|
|
2626
2627
|
value: r.acceptanceMode || "open",
|
|
2627
2628
|
tone: "teal"
|
|
2628
2629
|
}),
|
|
2629
|
-
/* @__PURE__ */ F(
|
|
2630
|
+
/* @__PURE__ */ F(w, {
|
|
2630
2631
|
label: "access",
|
|
2631
2632
|
value: r.dataAccess || "members only",
|
|
2632
2633
|
tone: "amber"
|
|
2633
2634
|
}),
|
|
2634
|
-
/* @__PURE__ */ F(
|
|
2635
|
+
/* @__PURE__ */ F(w, {
|
|
2635
2636
|
label: "your role",
|
|
2636
2637
|
value: P
|
|
2637
2638
|
})
|
|
2638
2639
|
]
|
|
2639
2640
|
}),
|
|
2640
|
-
/* @__PURE__ */ F(
|
|
2641
|
+
/* @__PURE__ */ F(v, { tiles: [
|
|
2641
2642
|
{
|
|
2642
2643
|
key: "transcripts",
|
|
2643
2644
|
label: "transcripts",
|
|
2644
|
-
value:
|
|
2645
|
-
sub: `across ${
|
|
2645
|
+
value: g.transcripts,
|
|
2646
|
+
sub: `across ${g.projects}`
|
|
2646
2647
|
},
|
|
2647
2648
|
{
|
|
2648
2649
|
key: "tokens",
|
|
2649
2650
|
label: "tokens",
|
|
2650
|
-
value:
|
|
2651
|
-
sub:
|
|
2651
|
+
value: g.tokens,
|
|
2652
|
+
sub: g.turns
|
|
2652
2653
|
},
|
|
2653
2654
|
{
|
|
2654
2655
|
key: "contributors",
|
|
2655
2656
|
label: "contributors",
|
|
2656
|
-
value:
|
|
2657
|
-
sub:
|
|
2657
|
+
value: g.contributors,
|
|
2658
|
+
sub: g.hours
|
|
2658
2659
|
}
|
|
2659
2660
|
] }),
|
|
2660
2661
|
/* @__PURE__ */ I("div", {
|
|
@@ -2669,7 +2670,7 @@ function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2669
2670
|
id: "cmg-share-h",
|
|
2670
2671
|
className: "cmg-sub",
|
|
2671
2672
|
children: "provider share"
|
|
2672
|
-
}), /* @__PURE__ */ F(
|
|
2673
|
+
}), /* @__PURE__ */ F(_, {
|
|
2673
2674
|
label: "provider share",
|
|
2674
2675
|
total: 100,
|
|
2675
2676
|
data: i.map((e) => ({
|
|
@@ -2683,7 +2684,7 @@ function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2683
2684
|
overflow: "auto",
|
|
2684
2685
|
maxWidth: "100%"
|
|
2685
2686
|
},
|
|
2686
|
-
children: /* @__PURE__ */ F(
|
|
2687
|
+
children: /* @__PURE__ */ F(a, {
|
|
2687
2688
|
title: "pending review",
|
|
2688
2689
|
emptyLabel: "no shares awaiting review.",
|
|
2689
2690
|
items: o.map((e) => ({
|
|
@@ -2725,7 +2726,7 @@ function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2725
2726
|
className: "cmg-redact-head",
|
|
2726
2727
|
children: [/* @__PURE__ */ F("span", {
|
|
2727
2728
|
className: "cmg-redact-badges",
|
|
2728
|
-
children: /* @__PURE__ */ F(
|
|
2729
|
+
children: /* @__PURE__ */ F(p, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
|
|
2729
2730
|
}), /* @__PURE__ */ F("span", {
|
|
2730
2731
|
className: "cmg-redact-file mono",
|
|
2731
2732
|
children: e.file || "unknown"
|
|
@@ -2872,7 +2873,7 @@ function pt({ data: e = ut, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2872
2873
|
overflow: "auto",
|
|
2873
2874
|
maxWidth: "100%"
|
|
2874
2875
|
},
|
|
2875
|
-
children: /* @__PURE__ */ F(
|
|
2876
|
+
children: /* @__PURE__ */ F(f, {
|
|
2876
2877
|
title: "members",
|
|
2877
2878
|
roles: ["member", "contributor"],
|
|
2878
2879
|
members: s.map((e) => ({
|