@peasant-labs/fairtrade 0.0.20 → 0.0.21
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/commons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as e, Dn as t, Ft as n, Nt as r, Pt as i, Wn as a, Xn as o, Yn as s, Zn as c, at as l, it as u, jn as d, jt as f, kt as p, qn as m, rt as h, st as g, tt as _ } from "./ui-w7Ju5ccI.js";
|
|
2
2
|
import { dt as v, lt as y, xt as b } from "./GraphLegend-BB0V2w59.js";
|
|
3
3
|
import { useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
4
4
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
@@ -338,8 +338,8 @@ function Se({ collective: e, href: t, onOpen: n }) {
|
|
|
338
338
|
children: r
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
function Ce({ data:
|
|
342
|
-
let u = ve(
|
|
341
|
+
function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript: r, onOpenProfile: i, onOpenCollective: a, transcriptHref: o, profileHref: s, collectiveHref: c }) {
|
|
342
|
+
let u = ve(e), f = u.transcripts.transcripts, [p, m] = T(""), [h, y] = T(""), [b, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(() => ye(u.transcripts.page)), [L, R] = T(null), [z, V] = T("browse"), H = w(!0), U = w(null);
|
|
343
343
|
x(() => {
|
|
344
344
|
if (H.current) {
|
|
345
345
|
H.current = !1, y(p);
|
|
@@ -365,7 +365,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
365
365
|
E,
|
|
366
366
|
A
|
|
367
367
|
]), x(() => {
|
|
368
|
-
|
|
368
|
+
n?.({
|
|
369
369
|
query: h,
|
|
370
370
|
provider: E,
|
|
371
371
|
topics: [...A],
|
|
@@ -374,7 +374,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
374
374
|
});
|
|
375
375
|
}, [
|
|
376
376
|
b,
|
|
377
|
-
|
|
377
|
+
n,
|
|
378
378
|
P,
|
|
379
379
|
E,
|
|
380
380
|
h,
|
|
@@ -402,14 +402,14 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
402
402
|
t.linkedGithubOrg
|
|
403
403
|
].filter(Boolean).join(" ").toLowerCase().includes(e)) : null;
|
|
404
404
|
}, [u.collectives, h]), J = f, ie = A.size, Y = u.transcripts.total ?? f.length, X = P, Z = u.transcripts.limit || f.length || 1, oe = (e) => {
|
|
405
|
-
if (
|
|
406
|
-
|
|
405
|
+
if (r) {
|
|
406
|
+
r(e);
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
R(e.id), V("detail");
|
|
410
410
|
}, se = () => {
|
|
411
|
-
if (
|
|
412
|
-
|
|
411
|
+
if (i && G) {
|
|
412
|
+
i(G);
|
|
413
413
|
return;
|
|
414
414
|
}
|
|
415
415
|
W ? (R(W.id), V("profile")) : f[0] && (R(f[0].id), V("profile"));
|
|
@@ -427,7 +427,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
427
427
|
};
|
|
428
428
|
}, [K, Q.length]);
|
|
429
429
|
return z === "detail" && W ? /* @__PURE__ */ O("div", {
|
|
430
|
-
className: `cex-root cex-detail ${
|
|
430
|
+
className: `cex-root cex-detail ${t}`.trim(),
|
|
431
431
|
children: [/* @__PURE__ */ O("div", {
|
|
432
432
|
className: "cex-detail-back",
|
|
433
433
|
children: [/* @__PURE__ */ O("button", {
|
|
@@ -590,7 +590,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
590
590
|
})]
|
|
591
591
|
})]
|
|
592
592
|
}),
|
|
593
|
-
/* @__PURE__ */ D(
|
|
593
|
+
/* @__PURE__ */ D(l, { tiles: [
|
|
594
594
|
{
|
|
595
595
|
key: "transcripts",
|
|
596
596
|
label: "transcripts",
|
|
@@ -612,7 +612,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
612
612
|
})]
|
|
613
613
|
})]
|
|
614
614
|
}) : z === "profile" && G ? /* @__PURE__ */ O("div", {
|
|
615
|
-
className: `cex-root cex-profile ${
|
|
615
|
+
className: `cex-root cex-profile ${t}`.trim(),
|
|
616
616
|
children: [
|
|
617
617
|
/* @__PURE__ */ O("div", {
|
|
618
618
|
className: "cex-detail-back",
|
|
@@ -666,7 +666,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
666
666
|
})]
|
|
667
667
|
})]
|
|
668
668
|
}),
|
|
669
|
-
/* @__PURE__ */ D(
|
|
669
|
+
/* @__PURE__ */ D(l, { tiles: [
|
|
670
670
|
{
|
|
671
671
|
key: "transcripts",
|
|
672
672
|
label: "transcripts",
|
|
@@ -726,7 +726,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
726
726
|
className: "cex-lib-rows",
|
|
727
727
|
children: t.map((e) => /* @__PURE__ */ D(xe, {
|
|
728
728
|
transcript: e,
|
|
729
|
-
href:
|
|
729
|
+
href: o?.(e),
|
|
730
730
|
onOpen: oe
|
|
731
731
|
}, e.id))
|
|
732
732
|
})]
|
|
@@ -735,7 +735,7 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
735
735
|
})
|
|
736
736
|
]
|
|
737
737
|
}) : /* @__PURE__ */ O("div", {
|
|
738
|
-
className: `cex-root ${
|
|
738
|
+
className: `cex-root ${t}`.trim(),
|
|
739
739
|
children: [/* @__PURE__ */ O("header", {
|
|
740
740
|
className: "cex-explore-head",
|
|
741
741
|
children: [
|
|
@@ -811,8 +811,8 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
811
811
|
className: "cex-coll-grid",
|
|
812
812
|
children: q.map((e) => /* @__PURE__ */ D(Se, {
|
|
813
813
|
collective: e,
|
|
814
|
-
href:
|
|
815
|
-
onOpen:
|
|
814
|
+
href: c?.(e),
|
|
815
|
+
onOpen: a
|
|
816
816
|
}, e.id))
|
|
817
817
|
})]
|
|
818
818
|
}),
|
|
@@ -895,18 +895,18 @@ function Ce({ data: t, className: n = "", onFiltersChange: r, onOpenTranscript:
|
|
|
895
895
|
className: "cex-grid",
|
|
896
896
|
children: J.map((e) => /* @__PURE__ */ D(be, {
|
|
897
897
|
transcript: e,
|
|
898
|
-
href:
|
|
898
|
+
href: o?.(e),
|
|
899
899
|
onOpen: oe
|
|
900
900
|
}, e.id))
|
|
901
901
|
}) : /* @__PURE__ */ D("div", {
|
|
902
902
|
className: "cex-list",
|
|
903
903
|
children: J.map((e) => /* @__PURE__ */ D(xe, {
|
|
904
904
|
transcript: e,
|
|
905
|
-
href:
|
|
905
|
+
href: o?.(e),
|
|
906
906
|
onOpen: oe
|
|
907
907
|
}, e.id))
|
|
908
908
|
}),
|
|
909
|
-
Y > Z && /* @__PURE__ */ D(
|
|
909
|
+
Y > Z && /* @__PURE__ */ D(d, {
|
|
910
910
|
page: X,
|
|
911
911
|
totalItems: Y,
|
|
912
912
|
pageSize: Z,
|
|
@@ -1370,7 +1370,7 @@ function Fe({ mode: e }) {
|
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
1372
|
function Ie({ data: e = {}, actions: t = {} } = {}) {
|
|
1373
|
-
let { collectives: n = Pe, linkedOrgs: r = Ne, title:
|
|
1373
|
+
let { collectives: n = Pe, linkedOrgs: r = Ne, title: a = "collectives", deck: o = "groups that govern shared data together.", crumb: s = "collectives", createLabel: c = "new collective", createBusy: l = !1 } = e, { onCreateCollective: u, onOpenCollective: d } = t, [f, p] = T(!1), [m, h] = T(""), [g, _] = T(""), [v, y] = T("open"), [b, x] = T("members_only"), [C, w] = T(""), k = S();
|
|
1374
1374
|
return /* @__PURE__ */ D("div", {
|
|
1375
1375
|
className: "cmg-root",
|
|
1376
1376
|
children: /* @__PURE__ */ O("div", {
|
|
@@ -1387,7 +1387,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1387
1387
|
" ",
|
|
1388
1388
|
/* @__PURE__ */ D("span", {
|
|
1389
1389
|
className: "cur",
|
|
1390
|
-
children:
|
|
1390
|
+
children: s
|
|
1391
1391
|
})
|
|
1392
1392
|
]
|
|
1393
1393
|
}),
|
|
@@ -1395,10 +1395,10 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1395
1395
|
className: "cmg-head",
|
|
1396
1396
|
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
|
|
1397
1397
|
className: "cmg-title",
|
|
1398
|
-
children:
|
|
1398
|
+
children: a
|
|
1399
1399
|
}), /* @__PURE__ */ D("p", {
|
|
1400
1400
|
className: "cmg-deck",
|
|
1401
|
-
children:
|
|
1401
|
+
children: o
|
|
1402
1402
|
})] }), /* @__PURE__ */ O("button", {
|
|
1403
1403
|
type: "button",
|
|
1404
1404
|
className: "btn btn-sm " + (f ? "btn-secondary" : "btn-primary"),
|
|
@@ -1450,7 +1450,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1450
1450
|
}),
|
|
1451
1451
|
/* @__PURE__ */ D("div", {
|
|
1452
1452
|
className: "cmg-field",
|
|
1453
|
-
children: /* @__PURE__ */ D(
|
|
1453
|
+
children: /* @__PURE__ */ D(i, {
|
|
1454
1454
|
variant: "select",
|
|
1455
1455
|
label: "acceptance mode",
|
|
1456
1456
|
name: "acceptance-mode",
|
|
@@ -1461,7 +1461,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1461
1461
|
}),
|
|
1462
1462
|
/* @__PURE__ */ D("div", {
|
|
1463
1463
|
className: "cmg-field",
|
|
1464
|
-
children: /* @__PURE__ */ D(
|
|
1464
|
+
children: /* @__PURE__ */ D(i, {
|
|
1465
1465
|
variant: "select",
|
|
1466
1466
|
label: "data access policy",
|
|
1467
1467
|
name: "data-access",
|
|
@@ -1850,7 +1850,7 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1850
1850
|
name: "AI Research Team",
|
|
1851
1851
|
description: "Sharing transcripts related to AI research",
|
|
1852
1852
|
linkedGithubOrg: "@anthropic-labs"
|
|
1853
|
-
}, providerShare:
|
|
1853
|
+
}, providerShare: i = Re, pendingReview: a = ze, members: o = Be, redactions: s = Ve, browseRows: c = [
|
|
1854
1854
|
{
|
|
1855
1855
|
title: "Building a REST API from scratch",
|
|
1856
1856
|
contributor: "@alice-dev",
|
|
@@ -1878,14 +1878,14 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1878
1878
|
tokens: "121K",
|
|
1879
1879
|
date: "Jun 12"
|
|
1880
1880
|
}
|
|
1881
|
-
], roleOptions:
|
|
1881
|
+
], roleOptions: d = Le, initialRole: p = "owner", initialShowRedaction: m = !0, initialBrowseGated: g = !1, targetCollective: _ = Ke, stats: v = {
|
|
1882
1882
|
transcripts: "248",
|
|
1883
1883
|
projects: "31 projects",
|
|
1884
1884
|
tokens: "4.2M",
|
|
1885
1885
|
turns: "18.4K turns",
|
|
1886
1886
|
contributors: "12",
|
|
1887
1887
|
hours: "63h total"
|
|
1888
|
-
} } = e, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = t, [A, j] = T(
|
|
1888
|
+
} } = e, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = t, [A, j] = T(p), [F, I] = T(m), [L, z] = T(g), B = A === "owner", H = A === "guest", U = (e) => {
|
|
1889
1889
|
j(e), b?.(e);
|
|
1890
1890
|
};
|
|
1891
1891
|
return /* @__PURE__ */ D("div", {
|
|
@@ -1943,7 +1943,7 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1943
1943
|
className: "cmg-roleswitch",
|
|
1944
1944
|
role: "group",
|
|
1945
1945
|
"aria-label": "view as role",
|
|
1946
|
-
children:
|
|
1946
|
+
children: d.map((e) => /* @__PURE__ */ D("button", {
|
|
1947
1947
|
type: "button",
|
|
1948
1948
|
className: "cmg-roleseg",
|
|
1949
1949
|
"aria-pressed": A === e,
|
|
@@ -2010,7 +2010,7 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2010
2010
|
})
|
|
2011
2011
|
]
|
|
2012
2012
|
}),
|
|
2013
|
-
/* @__PURE__ */ D(
|
|
2013
|
+
/* @__PURE__ */ D(l, { tiles: [
|
|
2014
2014
|
{
|
|
2015
2015
|
key: "transcripts",
|
|
2016
2016
|
label: "transcripts",
|
|
@@ -2042,10 +2042,10 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2042
2042
|
id: "cmg-share-h",
|
|
2043
2043
|
className: "cmg-sub",
|
|
2044
2044
|
children: "provider share"
|
|
2045
|
-
}), /* @__PURE__ */ D(
|
|
2045
|
+
}), /* @__PURE__ */ D(u, {
|
|
2046
2046
|
label: "provider share",
|
|
2047
2047
|
total: 100,
|
|
2048
|
-
data:
|
|
2048
|
+
data: i.map((e) => ({
|
|
2049
2049
|
label: Te(e.id),
|
|
2050
2050
|
value: e.pct
|
|
2051
2051
|
}))
|
|
@@ -2056,10 +2056,10 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2056
2056
|
overflow: "auto",
|
|
2057
2057
|
maxWidth: "100%"
|
|
2058
2058
|
},
|
|
2059
|
-
children: /* @__PURE__ */ D(
|
|
2059
|
+
children: /* @__PURE__ */ D(r, {
|
|
2060
2060
|
title: "pending review",
|
|
2061
2061
|
emptyLabel: "no shares awaiting review.",
|
|
2062
|
-
items:
|
|
2062
|
+
items: a.map((e) => ({
|
|
2063
2063
|
id: e.id,
|
|
2064
2064
|
kind: "share",
|
|
2065
2065
|
who: e.title,
|
|
@@ -2210,7 +2210,7 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2210
2210
|
overflow: "auto",
|
|
2211
2211
|
maxWidth: "100%"
|
|
2212
2212
|
},
|
|
2213
|
-
children: /* @__PURE__ */ D(
|
|
2213
|
+
children: /* @__PURE__ */ D(r, {
|
|
2214
2214
|
title: "pending requests",
|
|
2215
2215
|
emptyLabel: "no pending requests.",
|
|
2216
2216
|
items: [{
|
|
@@ -2225,10 +2225,10 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2225
2225
|
overflow: "auto",
|
|
2226
2226
|
maxWidth: "100%"
|
|
2227
2227
|
},
|
|
2228
|
-
children: /* @__PURE__ */ D(
|
|
2228
|
+
children: /* @__PURE__ */ D(f, {
|
|
2229
2229
|
title: "members",
|
|
2230
2230
|
roles: ["member", "contributor"],
|
|
2231
|
-
members:
|
|
2231
|
+
members: o.map((e) => ({
|
|
2232
2232
|
handle: e.handle,
|
|
2233
2233
|
name: e.name,
|
|
2234
2234
|
role: e.role,
|
|
@@ -2264,7 +2264,7 @@ function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2264
2264
|
});
|
|
2265
2265
|
}
|
|
2266
2266
|
function We() {
|
|
2267
|
-
let [
|
|
2267
|
+
let [n, r] = T("AI Research Team"), [i, l] = T("Sharing transcripts related to AI research"), [u, d] = T("curated"), [h, g] = T("members_only"), [_, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
|
|
2268
2268
|
return /* @__PURE__ */ D("div", {
|
|
2269
2269
|
className: "cmg-root cmg-settings",
|
|
2270
2270
|
children: /* @__PURE__ */ O("div", {
|
|
@@ -2299,7 +2299,7 @@ function We() {
|
|
|
2299
2299
|
}), /* @__PURE__ */ D("p", {
|
|
2300
2300
|
className: "cmg-deck",
|
|
2301
2301
|
children: "edit how this collective accepts contributions and shares data."
|
|
2302
|
-
})] }), /* @__PURE__ */ D(
|
|
2302
|
+
})] }), /* @__PURE__ */ D(t, { children: "settings" })]
|
|
2303
2303
|
})
|
|
2304
2304
|
}),
|
|
2305
2305
|
/* @__PURE__ */ O("div", {
|
|
@@ -2323,25 +2323,25 @@ function We() {
|
|
|
2323
2323
|
}), /* @__PURE__ */ O("div", {
|
|
2324
2324
|
className: "cmg-settings-stack",
|
|
2325
2325
|
children: [
|
|
2326
|
-
/* @__PURE__ */ D(
|
|
2326
|
+
/* @__PURE__ */ D(s, {
|
|
2327
2327
|
label: "Name",
|
|
2328
2328
|
id: "cmg-name",
|
|
2329
|
-
value:
|
|
2329
|
+
value: n,
|
|
2330
2330
|
onChange: (e) => r(e.target.value),
|
|
2331
2331
|
required: !0
|
|
2332
2332
|
}),
|
|
2333
|
-
/* @__PURE__ */ D(
|
|
2333
|
+
/* @__PURE__ */ D(c, {
|
|
2334
2334
|
label: "Description",
|
|
2335
2335
|
id: "cmg-description",
|
|
2336
|
-
value:
|
|
2337
|
-
onChange: (e) =>
|
|
2336
|
+
value: i,
|
|
2337
|
+
onChange: (e) => l(e.target.value),
|
|
2338
2338
|
rows: 2
|
|
2339
2339
|
}),
|
|
2340
|
-
/* @__PURE__ */ D(
|
|
2340
|
+
/* @__PURE__ */ D(o, {
|
|
2341
2341
|
label: "Acceptance mode",
|
|
2342
2342
|
id: "cmg-acceptance",
|
|
2343
|
-
value:
|
|
2344
|
-
onChange: (e) =>
|
|
2343
|
+
value: u,
|
|
2344
|
+
onChange: (e) => d(e.target.value),
|
|
2345
2345
|
options: [
|
|
2346
2346
|
{
|
|
2347
2347
|
value: "open",
|
|
@@ -2357,7 +2357,7 @@ function We() {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
]
|
|
2359
2359
|
}),
|
|
2360
|
-
/* @__PURE__ */ D(
|
|
2360
|
+
/* @__PURE__ */ D(o, {
|
|
2361
2361
|
label: "Data access",
|
|
2362
2362
|
id: "cmg-access",
|
|
2363
2363
|
value: h,
|
|
@@ -2391,7 +2391,7 @@ function We() {
|
|
|
2391
2391
|
}),
|
|
2392
2392
|
/* @__PURE__ */ D("div", {
|
|
2393
2393
|
className: "sw-toggle-row",
|
|
2394
|
-
children: /* @__PURE__ */ D(
|
|
2394
|
+
children: /* @__PURE__ */ D(a, {
|
|
2395
2395
|
id: "cmg-display-members",
|
|
2396
2396
|
checked: _,
|
|
2397
2397
|
onChange: (e) => v(e)
|
|
@@ -2399,7 +2399,7 @@ function We() {
|
|
|
2399
2399
|
})
|
|
2400
2400
|
]
|
|
2401
2401
|
}),
|
|
2402
|
-
/* @__PURE__ */ D(
|
|
2402
|
+
/* @__PURE__ */ D(m, {
|
|
2403
2403
|
name: "cmg-deletion-policy",
|
|
2404
2404
|
ariaLabel: "Transcript retention on leave",
|
|
2405
2405
|
value: y,
|
|
@@ -2436,19 +2436,19 @@ function We() {
|
|
|
2436
2436
|
type: "submit",
|
|
2437
2437
|
className: "btn btn-sm btn-primary",
|
|
2438
2438
|
children: "save changes"
|
|
2439
|
-
}), /* @__PURE__ */ D(
|
|
2439
|
+
}), /* @__PURE__ */ D(p, {
|
|
2440
2440
|
label: "reset form",
|
|
2441
2441
|
onConfirm: () => S(!1)
|
|
2442
2442
|
})]
|
|
2443
2443
|
})
|
|
2444
2444
|
]
|
|
2445
2445
|
})]
|
|
2446
|
-
}), /* @__PURE__ */ O(
|
|
2446
|
+
}), /* @__PURE__ */ O(e, {
|
|
2447
2447
|
title: "danger zone",
|
|
2448
2448
|
children: [/* @__PURE__ */ D("p", {
|
|
2449
2449
|
className: "mono",
|
|
2450
2450
|
children: "deleting this collective removes the governance settings and member roster."
|
|
2451
|
-
}), /* @__PURE__ */ D(
|
|
2451
|
+
}), /* @__PURE__ */ D(p, {
|
|
2452
2452
|
label: "delete collective",
|
|
2453
2453
|
confirmLabel: "delete",
|
|
2454
2454
|
onConfirm: () => S(!1)
|
|
@@ -2462,7 +2462,7 @@ function We() {
|
|
|
2462
2462
|
overflow: "auto",
|
|
2463
2463
|
maxWidth: "100%"
|
|
2464
2464
|
},
|
|
2465
|
-
children: /* @__PURE__ */ D(
|
|
2465
|
+
children: /* @__PURE__ */ D(f, {
|
|
2466
2466
|
title: "members",
|
|
2467
2467
|
roles: ["member", "contributor"],
|
|
2468
2468
|
members: [
|
|
@@ -2550,7 +2550,7 @@ var Ge = [
|
|
|
2550
2550
|
members: 12
|
|
2551
2551
|
};
|
|
2552
2552
|
function qe() {
|
|
2553
|
-
let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [
|
|
2553
|
+
let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [r, i] = T(() => new Set(Ge.map((e) => e.id))), [a, o] = T(!1), s = C(() => {
|
|
2554
2554
|
let e = {};
|
|
2555
2555
|
return Ge.forEach((t) => t.transcripts.forEach((n) => e[n.id] = {
|
|
2556
2556
|
...n,
|
|
@@ -2620,7 +2620,7 @@ function qe() {
|
|
|
2620
2620
|
className: "card cmg-contribute",
|
|
2621
2621
|
"aria-label": "your transcripts by project",
|
|
2622
2622
|
children: Ge.map((t) => {
|
|
2623
|
-
let
|
|
2623
|
+
let n = l(t), i = r.has(t.id);
|
|
2624
2624
|
return /* @__PURE__ */ O("div", {
|
|
2625
2625
|
className: "cmg-proj",
|
|
2626
2626
|
children: [/* @__PURE__ */ O("div", {
|
|
@@ -2630,8 +2630,8 @@ function qe() {
|
|
|
2630
2630
|
children: /* @__PURE__ */ D("input", {
|
|
2631
2631
|
type: "checkbox",
|
|
2632
2632
|
className: "check-box",
|
|
2633
|
-
checked:
|
|
2634
|
-
ref: (e) => e && (e.indeterminate =
|
|
2633
|
+
checked: n === "all",
|
|
2634
|
+
ref: (e) => e && (e.indeterminate = n === "some"),
|
|
2635
2635
|
onChange: () => u(t),
|
|
2636
2636
|
"aria-label": `select all in ${t.name}`
|
|
2637
2637
|
})
|
|
@@ -2749,7 +2749,7 @@ function qe() {
|
|
|
2749
2749
|
})]
|
|
2750
2750
|
})
|
|
2751
2751
|
]
|
|
2752
|
-
}), /* @__PURE__ */ D(
|
|
2752
|
+
}), /* @__PURE__ */ D(n, {
|
|
2753
2753
|
open: a,
|
|
2754
2754
|
title: /* @__PURE__ */ O(E, { children: [
|
|
2755
2755
|
"make ",
|
|
@@ -2858,8 +2858,8 @@ function Qe(e) {
|
|
|
2858
2858
|
day: "numeric"
|
|
2859
2859
|
}).format(t);
|
|
2860
2860
|
}
|
|
2861
|
-
function $e({ data: e = Xe, actions:
|
|
2862
|
-
let { collective:
|
|
2861
|
+
function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
|
|
2862
|
+
let { collective: a = Je, providerShare: o = [], pendingReview: s = [], members: c = [], redactions: d = [], browseRows: p = [], roleOptions: m = [], initialRole: g = "", initialShowRedaction: _ = !1, initialBrowseGated: v = !1, stats: y = Ye } = e || Xe, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: w, onContribute: E, onToggleBrowse: k } = n || {}, [A, j] = T(g || a.role || ""), [M, P] = T(!!_), [F, I] = T(!!v), L = A || a.role || "guest", B = L === "owner", H = L === "guest", U = i && m.length > 0, ee = C(() => U ? m : [], [U, m]), te = (e) => {
|
|
2863
2863
|
j(e), b?.(e);
|
|
2864
2864
|
};
|
|
2865
2865
|
return /* @__PURE__ */ D("div", {
|
|
@@ -2885,7 +2885,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2885
2885
|
}),
|
|
2886
2886
|
/* @__PURE__ */ D("span", {
|
|
2887
2887
|
className: "cur",
|
|
2888
|
-
children:
|
|
2888
|
+
children: a.name || "collective"
|
|
2889
2889
|
})
|
|
2890
2890
|
]
|
|
2891
2891
|
}), /* @__PURE__ */ O("div", {
|
|
@@ -2893,11 +2893,11 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2893
2893
|
children: [/* @__PURE__ */ O("div", { children: [
|
|
2894
2894
|
/* @__PURE__ */ D("h2", {
|
|
2895
2895
|
className: "cmg-title",
|
|
2896
|
-
children:
|
|
2896
|
+
children: a.name || "collective"
|
|
2897
2897
|
}),
|
|
2898
2898
|
/* @__PURE__ */ D("p", {
|
|
2899
2899
|
className: "cmg-deck",
|
|
2900
|
-
children:
|
|
2900
|
+
children: a.description || "shared collective governance"
|
|
2901
2901
|
}),
|
|
2902
2902
|
/* @__PURE__ */ O("span", {
|
|
2903
2903
|
className: "cmg-orgpill mono",
|
|
@@ -2907,7 +2907,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2907
2907
|
"aria-hidden": "true"
|
|
2908
2908
|
}),
|
|
2909
2909
|
" ",
|
|
2910
|
-
|
|
2910
|
+
a.linkedGithubOrg || "not linked"
|
|
2911
2911
|
]
|
|
2912
2912
|
})
|
|
2913
2913
|
] }), /* @__PURE__ */ O("div", {
|
|
@@ -2981,12 +2981,12 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2981
2981
|
children: [
|
|
2982
2982
|
/* @__PURE__ */ D(h, {
|
|
2983
2983
|
label: "contributions",
|
|
2984
|
-
value:
|
|
2984
|
+
value: a.acceptanceMode || "open",
|
|
2985
2985
|
tone: "teal"
|
|
2986
2986
|
}),
|
|
2987
2987
|
/* @__PURE__ */ D(h, {
|
|
2988
2988
|
label: "access",
|
|
2989
|
-
value:
|
|
2989
|
+
value: a.dataAccess || "members only",
|
|
2990
2990
|
tone: "amber"
|
|
2991
2991
|
}),
|
|
2992
2992
|
/* @__PURE__ */ D(h, {
|
|
@@ -2995,7 +2995,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2995
2995
|
})
|
|
2996
2996
|
]
|
|
2997
2997
|
}),
|
|
2998
|
-
/* @__PURE__ */ D(
|
|
2998
|
+
/* @__PURE__ */ D(l, { tiles: [
|
|
2999
2999
|
{
|
|
3000
3000
|
key: "transcripts",
|
|
3001
3001
|
label: "transcripts",
|
|
@@ -3020,17 +3020,17 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3020
3020
|
children: [/* @__PURE__ */ O("main", {
|
|
3021
3021
|
className: "cmg-d-main",
|
|
3022
3022
|
children: [
|
|
3023
|
-
|
|
3023
|
+
o.length > 0 ? /* @__PURE__ */ O("section", {
|
|
3024
3024
|
className: "card cmg-share",
|
|
3025
3025
|
"aria-labelledby": "cmg-share-h",
|
|
3026
3026
|
children: [/* @__PURE__ */ D("h3", {
|
|
3027
3027
|
id: "cmg-share-h",
|
|
3028
3028
|
className: "cmg-sub",
|
|
3029
3029
|
children: "provider share"
|
|
3030
|
-
}), /* @__PURE__ */ D(
|
|
3030
|
+
}), /* @__PURE__ */ D(u, {
|
|
3031
3031
|
label: "provider share",
|
|
3032
3032
|
total: 100,
|
|
3033
|
-
data:
|
|
3033
|
+
data: o.map((e) => ({
|
|
3034
3034
|
label: Te(e.id),
|
|
3035
3035
|
value: e.pct
|
|
3036
3036
|
}))
|
|
@@ -3041,7 +3041,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3041
3041
|
overflow: "auto",
|
|
3042
3042
|
maxWidth: "100%"
|
|
3043
3043
|
},
|
|
3044
|
-
children: /* @__PURE__ */ D(
|
|
3044
|
+
children: /* @__PURE__ */ D(r, {
|
|
3045
3045
|
title: "pending review",
|
|
3046
3046
|
emptyLabel: "no shares awaiting review.",
|
|
3047
3047
|
items: s.map((e) => ({
|
|
@@ -3052,7 +3052,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3052
3052
|
}))
|
|
3053
3053
|
})
|
|
3054
3054
|
}) : null,
|
|
3055
|
-
|
|
3055
|
+
d.length > 0 ? /* @__PURE__ */ O("section", {
|
|
3056
3056
|
className: "card cmg-redact-sec",
|
|
3057
3057
|
"aria-labelledby": "cmg-redact-h",
|
|
3058
3058
|
children: [/* @__PURE__ */ O("div", {
|
|
@@ -3076,14 +3076,14 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3076
3076
|
})]
|
|
3077
3077
|
}), M ? /* @__PURE__ */ D("div", {
|
|
3078
3078
|
className: "cmg-redact-list",
|
|
3079
|
-
children:
|
|
3079
|
+
children: d.map((e) => /* @__PURE__ */ O("article", {
|
|
3080
3080
|
className: "cmg-redact",
|
|
3081
3081
|
children: [
|
|
3082
3082
|
/* @__PURE__ */ O("div", {
|
|
3083
3083
|
className: "cmg-redact-head",
|
|
3084
3084
|
children: [/* @__PURE__ */ D("span", {
|
|
3085
3085
|
className: "cmg-redact-badges",
|
|
3086
|
-
children: /* @__PURE__ */ D(
|
|
3086
|
+
children: /* @__PURE__ */ D(t, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
|
|
3087
3087
|
}), /* @__PURE__ */ D("span", {
|
|
3088
3088
|
className: "cmg-redact-file mono",
|
|
3089
3089
|
children: e.file || "unknown"
|
|
@@ -3150,7 +3150,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3150
3150
|
}), " join as contributor"]
|
|
3151
3151
|
}) : null
|
|
3152
3152
|
]
|
|
3153
|
-
}) :
|
|
3153
|
+
}) : p.length > 0 ? /* @__PURE__ */ O("table", {
|
|
3154
3154
|
className: "dtable cmg-dtable",
|
|
3155
3155
|
children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", { children: [
|
|
3156
3156
|
/* @__PURE__ */ D("th", {
|
|
@@ -3179,7 +3179,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3179
3179
|
scope: "col",
|
|
3180
3180
|
children: "date"
|
|
3181
3181
|
})
|
|
3182
|
-
] }) }), /* @__PURE__ */ D("tbody", { children:
|
|
3182
|
+
] }) }), /* @__PURE__ */ D("tbody", { children: p.map((e) => /* @__PURE__ */ O("tr", { children: [
|
|
3183
3183
|
/* @__PURE__ */ D("td", { children: e.title || "untitled transcript" }),
|
|
3184
3184
|
/* @__PURE__ */ D("td", {
|
|
3185
3185
|
className: "mono",
|
|
@@ -3230,7 +3230,7 @@ function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3230
3230
|
overflow: "auto",
|
|
3231
3231
|
maxWidth: "100%"
|
|
3232
3232
|
},
|
|
3233
|
-
children: /* @__PURE__ */ D(
|
|
3233
|
+
children: /* @__PURE__ */ D(f, {
|
|
3234
3234
|
title: "members",
|
|
3235
3235
|
roles: ["member", "contributor"],
|
|
3236
3236
|
members: c.map((e) => ({
|