@peasant-labs/fairtrade 0.0.30 → 0.0.32
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/{GraphLegend-CxEDHRXa.js → GraphLegend-BkZT0lH-.js} +4 -4
- package/dist/lib/commons.js +102 -102
- package/dist/lib/components.css +1 -1
- package/dist/lib/graph.js +1 -1
- package/dist/lib/tokens.css +51 -48
- package/dist/lib/tokens.json +61 -48
- package/dist/lib/types/AppSidebar.d.ts +215 -0
- package/dist/lib/types/index.d.ts +7 -0
- package/dist/lib/{ui-BaKO2zmG.js → ui-DQAltgPx.js} +2205 -1820
- package/dist/lib/ui.js +4 -4
- package/package.json +5 -3
package/dist/lib/commons.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ot as e, Tt as t, ht as n, lt as r, pt as i, ut as a } from "./GraphLegend-
|
|
2
|
-
import {
|
|
1
|
+
import { Ot as e, Tt as t, ht as n, lt as r, pt as i, ut as a } from "./GraphLegend-BkZT0lH-.js";
|
|
2
|
+
import { $n as o, Dt as s, Et as c, Ot as l, Wn as u, an as d, cn as f, ft as p, ht as m, ir as h, jt as g, kt as _, ln as v, mt as y, or as b, rr as x, sn as S, ut as C, wt as w, xr as T } from "./ui-DQAltgPx.js";
|
|
3
3
|
import { useEffect as E, useId as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
4
4
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowRight as P, Check as F, ChevronDown as I, ChevronRight as L, ClipboardCheck as R, Compass as z, Copy as B, ExternalLink as V, Eye as H, EyeOff as U, FileText as W, FolderGit2 as G, GitBranch as K, Hash as ee, LayoutGrid as te, List as ne, Lock as q, LogOut as J, MoreHorizontal as re, Plus as ie, Search as ae, SearchX as oe, Settings as Y, ShieldAlert as X, Upload as Z, User as se, UserPlus as ce, Users as Q, X as $ } from "lucide-react";
|
|
@@ -1534,7 +1534,7 @@ function Re() {
|
|
|
1534
1534
|
})]
|
|
1535
1535
|
})
|
|
1536
1536
|
]
|
|
1537
|
-
}), /* @__PURE__ */ M(
|
|
1537
|
+
}), /* @__PURE__ */ M(v, {
|
|
1538
1538
|
open: i,
|
|
1539
1539
|
title: /* @__PURE__ */ N(j, { children: [
|
|
1540
1540
|
"make ",
|
|
@@ -1656,7 +1656,7 @@ function We(e, t, n) {
|
|
|
1656
1656
|
}, e));
|
|
1657
1657
|
}
|
|
1658
1658
|
function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
1659
|
-
let { collectives: n = [], linkedOrgs: r = [], title: i = "collectives", deck: a = "a collective is a group that can read the transcripts its members publish to it. link your repositories so pull requests find them.", crumb: o, caption: s = "collectives", createLabel: c = "new collective", createBusy:
|
|
1659
|
+
let { collectives: n = [], linkedOrgs: r = [], title: i = "collectives", deck: a = "a collective is a group that can read the transcripts its members publish to it. link your repositories so pull requests find them.", crumb: o, caption: s = "collectives", createLabel: c = "new collective", createBusy: l = !1, whoCanPublish: d = ze, whoCanRead: p = Be } = e, { onCreateCollective: m, onOpenCollective: h, onSearchCollectives: g } = t, [_, v] = A(!1), [y, x] = A(""), [S, C] = A(""), [w, E] = A(d[0]?.value ?? ""), [O, k] = A(p[0]?.value ?? ""), [j, P] = A(""), [F, I] = A(""), L = D(), R = [
|
|
1660
1660
|
{
|
|
1661
1661
|
key: "name",
|
|
1662
1662
|
label: "name",
|
|
@@ -1717,7 +1717,7 @@ function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1717
1717
|
children: [
|
|
1718
1718
|
o ? /* @__PURE__ */ M("div", {
|
|
1719
1719
|
className: "cmg-crumb",
|
|
1720
|
-
children: /* @__PURE__ */ M(
|
|
1720
|
+
children: /* @__PURE__ */ M(b, { items: [{ label: o }] })
|
|
1721
1721
|
}) : null,
|
|
1722
1722
|
/* @__PURE__ */ N("header", {
|
|
1723
1723
|
className: "iu-page-head",
|
|
@@ -1766,7 +1766,7 @@ function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1766
1766
|
className: "input",
|
|
1767
1767
|
type: "text",
|
|
1768
1768
|
value: y,
|
|
1769
|
-
onChange: (e) =>
|
|
1769
|
+
onChange: (e) => x(e.target.value)
|
|
1770
1770
|
})]
|
|
1771
1771
|
}),
|
|
1772
1772
|
/* @__PURE__ */ N("label", {
|
|
@@ -1783,13 +1783,13 @@ function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1783
1783
|
}),
|
|
1784
1784
|
/* @__PURE__ */ M("div", {
|
|
1785
1785
|
className: "cmg-field",
|
|
1786
|
-
children: /* @__PURE__ */ M(
|
|
1786
|
+
children: /* @__PURE__ */ M(f, {
|
|
1787
1787
|
variant: "select",
|
|
1788
1788
|
label: "who can publish",
|
|
1789
1789
|
name: "who-can-publish",
|
|
1790
|
-
value:
|
|
1790
|
+
value: w,
|
|
1791
1791
|
onChange: E,
|
|
1792
|
-
options:
|
|
1792
|
+
options: d.map((e) => ({
|
|
1793
1793
|
...e,
|
|
1794
1794
|
rationale: e.help
|
|
1795
1795
|
}))
|
|
@@ -1797,7 +1797,7 @@ function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1797
1797
|
}),
|
|
1798
1798
|
/* @__PURE__ */ M("div", {
|
|
1799
1799
|
className: "cmg-field",
|
|
1800
|
-
children: /* @__PURE__ */ M(
|
|
1800
|
+
children: /* @__PURE__ */ M(f, {
|
|
1801
1801
|
variant: "select",
|
|
1802
1802
|
label: "who can read",
|
|
1803
1803
|
name: "who-can-read",
|
|
@@ -1834,27 +1834,27 @@ function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1834
1834
|
children: [/* @__PURE__ */ M("button", {
|
|
1835
1835
|
type: "button",
|
|
1836
1836
|
className: "btn btn-sm btn-primary",
|
|
1837
|
-
disabled: !y.trim() ||
|
|
1837
|
+
disabled: !y.trim() || l,
|
|
1838
1838
|
"aria-describedby": L,
|
|
1839
1839
|
onClick: () => m?.({
|
|
1840
1840
|
name: y,
|
|
1841
1841
|
purpose: S,
|
|
1842
|
-
mode:
|
|
1842
|
+
mode: w,
|
|
1843
1843
|
access: O,
|
|
1844
1844
|
org: j
|
|
1845
1845
|
}),
|
|
1846
|
-
children:
|
|
1846
|
+
children: l ? "creating" : "create collective"
|
|
1847
1847
|
}), /* @__PURE__ */ M("span", {
|
|
1848
1848
|
id: L,
|
|
1849
1849
|
className: "cmg-form-hint mono",
|
|
1850
|
-
children:
|
|
1850
|
+
children: d.find((e) => e.value === w)?.help
|
|
1851
1851
|
})]
|
|
1852
1852
|
})
|
|
1853
1853
|
]
|
|
1854
1854
|
}),
|
|
1855
1855
|
/* @__PURE__ */ N("div", {
|
|
1856
1856
|
className: "cmg-section",
|
|
1857
|
-
children: [/* @__PURE__ */ M(
|
|
1857
|
+
children: [/* @__PURE__ */ M(u, {
|
|
1858
1858
|
caption: `${s} ${n.length}`,
|
|
1859
1859
|
columns: R,
|
|
1860
1860
|
rows: n,
|
|
@@ -1883,7 +1883,7 @@ function Ge({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1883
1883
|
onSubmit: (e) => {
|
|
1884
1884
|
e.preventDefault(), g(F);
|
|
1885
1885
|
},
|
|
1886
|
-
children: [/* @__PURE__ */ M(
|
|
1886
|
+
children: [/* @__PURE__ */ M(T, {
|
|
1887
1887
|
label: "collective or github org",
|
|
1888
1888
|
type: "search",
|
|
1889
1889
|
iconLeft: ae,
|
|
@@ -1922,7 +1922,7 @@ function qe(e = {}) {
|
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
1924
|
function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
1925
|
-
let { owners: n = [], linkedRepos: r = [], hrefFor: a } = e, o = qe(e.collective), { onSettings:
|
|
1925
|
+
let { owners: n = [], linkedRepos: r = [], hrefFor: a } = e, o = qe(e.collective), { onSettings: s, onContribute: l, onReview: d, onOpenTranscript: f, onOpenPullRequest: m, onLinkRepos: g, onShowMore: _ } = t, [v, y] = A(!1), x = D(), S = o.transcriptCount ?? o.transcripts.length, C = [
|
|
1926
1926
|
{
|
|
1927
1927
|
key: "title",
|
|
1928
1928
|
label: "title",
|
|
@@ -1966,7 +1966,7 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1966
1966
|
label: "pull requests",
|
|
1967
1967
|
render: (e, t) => t.pullRequests?.length ? /* @__PURE__ */ N("span", {
|
|
1968
1968
|
className: "cmg-prs",
|
|
1969
|
-
children: [/* @__PURE__ */ M(
|
|
1969
|
+
children: [/* @__PURE__ */ M(w, {
|
|
1970
1970
|
items: We(t.pullRequests, m, a),
|
|
1971
1971
|
label: "pull requests",
|
|
1972
1972
|
noun: ["pull request", "pull requests"]
|
|
@@ -1983,7 +1983,7 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1983
1983
|
key: "when",
|
|
1984
1984
|
label: "when"
|
|
1985
1985
|
}
|
|
1986
|
-
],
|
|
1986
|
+
], T = [
|
|
1987
1987
|
{
|
|
1988
1988
|
key: "read",
|
|
1989
1989
|
title: "who can read",
|
|
@@ -2005,7 +2005,7 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2005
2005
|
children: [
|
|
2006
2006
|
/* @__PURE__ */ M("div", {
|
|
2007
2007
|
className: "cmg-crumb-content",
|
|
2008
|
-
children: /* @__PURE__ */ M(
|
|
2008
|
+
children: /* @__PURE__ */ M(b, { items: [{
|
|
2009
2009
|
label: "collectives",
|
|
2010
2010
|
href: a?.("collectives")
|
|
2011
2011
|
}, { label: o.name }] })
|
|
@@ -2016,27 +2016,27 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2016
2016
|
className: "iu-page-titlerow",
|
|
2017
2017
|
children: [/* @__PURE__ */ M("h2", {
|
|
2018
2018
|
className: "iu-page-title iu-page-title-content",
|
|
2019
|
-
id:
|
|
2019
|
+
id: x,
|
|
2020
2020
|
children: o.name
|
|
2021
2021
|
}), /* @__PURE__ */ N("span", {
|
|
2022
2022
|
className: "cmg-actions",
|
|
2023
|
-
children: [o.role === "owner" &&
|
|
2023
|
+
children: [o.role === "owner" && s && /* @__PURE__ */ N("button", {
|
|
2024
2024
|
type: "button",
|
|
2025
2025
|
className: "btn btn-secondary btn-sm",
|
|
2026
|
-
onClick: () =>
|
|
2026
|
+
onClick: () => s(),
|
|
2027
2027
|
children: [/* @__PURE__ */ M(Y, {
|
|
2028
2028
|
size: 14,
|
|
2029
2029
|
"aria-hidden": "true"
|
|
2030
2030
|
}), " settings"]
|
|
2031
|
-
}), (
|
|
2031
|
+
}), (l || d) && /* @__PURE__ */ M(h, {
|
|
2032
2032
|
icon: re,
|
|
2033
2033
|
ariaLabel: "more",
|
|
2034
2034
|
size: "sm",
|
|
2035
2035
|
align: "end",
|
|
2036
|
-
items: [...
|
|
2036
|
+
items: [...l ? [{
|
|
2037
2037
|
label: "publish several transcripts",
|
|
2038
2038
|
icon: Z,
|
|
2039
|
-
onSelect: () =>
|
|
2039
|
+
onSelect: () => l()
|
|
2040
2040
|
}] : [], ...d ? [{
|
|
2041
2041
|
label: "review transcripts",
|
|
2042
2042
|
icon: R,
|
|
@@ -2049,10 +2049,10 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2049
2049
|
children: o.purpose
|
|
2050
2050
|
}) : null]
|
|
2051
2051
|
}),
|
|
2052
|
-
|
|
2052
|
+
T.length > 0 && /* @__PURE__ */ M("ul", {
|
|
2053
2053
|
className: "cmg-policies",
|
|
2054
2054
|
"aria-label": "how this collective works",
|
|
2055
|
-
children:
|
|
2055
|
+
children: T.map((e) => /* @__PURE__ */ N("li", {
|
|
2056
2056
|
className: "cmg-policy",
|
|
2057
2057
|
children: [/* @__PURE__ */ M("h3", {
|
|
2058
2058
|
className: "cmg-policy-title",
|
|
@@ -2063,7 +2063,7 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2063
2063
|
})]
|
|
2064
2064
|
}, e.key))
|
|
2065
2065
|
}),
|
|
2066
|
-
/* @__PURE__ */ M(
|
|
2066
|
+
/* @__PURE__ */ M(c, {
|
|
2067
2067
|
items: o.stats,
|
|
2068
2068
|
label: `${o.name} in numbers`
|
|
2069
2069
|
}),
|
|
@@ -2071,8 +2071,8 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2071
2071
|
className: "cmg-home",
|
|
2072
2072
|
children: [/* @__PURE__ */ N("div", {
|
|
2073
2073
|
className: "cmg-home-main",
|
|
2074
|
-
children: [/* @__PURE__ */ M(
|
|
2075
|
-
caption: `transcripts ${
|
|
2074
|
+
children: [/* @__PURE__ */ M(u, {
|
|
2075
|
+
caption: `transcripts ${S}`,
|
|
2076
2076
|
columns: C,
|
|
2077
2077
|
rows: o.transcripts,
|
|
2078
2078
|
rowKey: (e) => e.id
|
|
@@ -2089,13 +2089,13 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2089
2089
|
" of ",
|
|
2090
2090
|
/* @__PURE__ */ M("span", {
|
|
2091
2091
|
className: "tnum",
|
|
2092
|
-
children:
|
|
2092
|
+
children: S
|
|
2093
2093
|
})
|
|
2094
2094
|
]
|
|
2095
|
-
}),
|
|
2095
|
+
}), S > o.transcripts.length && _ && /* @__PURE__ */ M("button", {
|
|
2096
2096
|
type: "button",
|
|
2097
2097
|
className: "btn btn-secondary btn-sm",
|
|
2098
|
-
onClick: () =>
|
|
2098
|
+
onClick: () => _(),
|
|
2099
2099
|
children: "show more"
|
|
2100
2100
|
})]
|
|
2101
2101
|
})]
|
|
@@ -2131,10 +2131,10 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2131
2131
|
}),
|
|
2132
2132
|
" repos linked"
|
|
2133
2133
|
] }) : null,
|
|
2134
|
-
o.role === "owner" &&
|
|
2134
|
+
o.role === "owner" && g && /* @__PURE__ */ M("button", {
|
|
2135
2135
|
type: "button",
|
|
2136
2136
|
className: "btn btn-ghost btn-sm",
|
|
2137
|
-
onClick: () =>
|
|
2137
|
+
onClick: () => y(!0),
|
|
2138
2138
|
children: "manage"
|
|
2139
2139
|
})
|
|
2140
2140
|
]
|
|
@@ -2170,15 +2170,15 @@ function Je({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2170
2170
|
})]
|
|
2171
2171
|
})
|
|
2172
2172
|
]
|
|
2173
|
-
}),
|
|
2174
|
-
open:
|
|
2175
|
-
onClose: () =>
|
|
2173
|
+
}), g && /* @__PURE__ */ M(p, {
|
|
2174
|
+
open: v,
|
|
2175
|
+
onClose: () => y(!1),
|
|
2176
2176
|
owners: n,
|
|
2177
2177
|
initialSelected: r,
|
|
2178
2178
|
title: `link repositories from ${o.org?.login ?? "github"}`,
|
|
2179
2179
|
description: `pull requests in linked repos show the transcripts published to ${o.name}.`,
|
|
2180
2180
|
onSave: (e) => {
|
|
2181
|
-
|
|
2181
|
+
g(e), y(!1);
|
|
2182
2182
|
}
|
|
2183
2183
|
})] });
|
|
2184
2184
|
}
|
|
@@ -2198,27 +2198,27 @@ function Xe(e, t) {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
var Ze = (e, t) => t.some((t) => t.value === e) ? e : "";
|
|
2200
2200
|
function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
2201
|
-
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: i = !1, whoCanPublish: a = ze, whoCanRead:
|
|
2201
|
+
let { owners: n = [], linkedRepos: r = [], showOnPullRequests: i = !1, whoCanPublish: a = ze, whoCanRead: s = Be, memberLeavesChoices: c = Ye, hrefFor: l } = e, u = qe(e.collective), d = (e) => (n) => t.onCommit ? t.onCommit(e, n) : Promise.resolve(), [f, h] = A(!1), [g, _] = A(""), v = !!(t.onTransferOwnership || t.onDelete), x = [
|
|
2202
2202
|
"general",
|
|
2203
2203
|
"access",
|
|
2204
2204
|
"members",
|
|
2205
2205
|
"github orgs",
|
|
2206
2206
|
"pull requests",
|
|
2207
|
-
...
|
|
2208
|
-
], S = (e) => `cmg-settings-${e.replace(/ /g, "-")}`, C = (e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "),
|
|
2207
|
+
...v ? ["danger zone"] : []
|
|
2208
|
+
], S = (e) => `cmg-settings-${e.replace(/ /g, "-")}`, C = (e) => e.filter((e) => e.help).map((e) => `${e.label}: ${e.help}`).join(" "), w = l?.("account");
|
|
2209
2209
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("div", {
|
|
2210
2210
|
className: "iu-page cmg-settings",
|
|
2211
2211
|
children: [
|
|
2212
2212
|
/* @__PURE__ */ M("div", {
|
|
2213
2213
|
className: "cmg-crumb-content",
|
|
2214
|
-
children: /* @__PURE__ */ M(
|
|
2214
|
+
children: /* @__PURE__ */ M(b, { items: [
|
|
2215
2215
|
{
|
|
2216
2216
|
label: "collectives",
|
|
2217
|
-
href:
|
|
2217
|
+
href: l?.("collectives")
|
|
2218
2218
|
},
|
|
2219
2219
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
href:
|
|
2220
|
+
label: u.name,
|
|
2221
|
+
href: l?.("collective", u.id)
|
|
2222
2222
|
},
|
|
2223
2223
|
{ label: "settings" }
|
|
2224
2224
|
] })
|
|
@@ -2229,7 +2229,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2229
2229
|
className: "iu-page-title",
|
|
2230
2230
|
children: [/* @__PURE__ */ M("span", {
|
|
2231
2231
|
className: "iu-page-title-content",
|
|
2232
|
-
children:
|
|
2232
|
+
children: u.name
|
|
2233
2233
|
}), ", settings"]
|
|
2234
2234
|
}), /* @__PURE__ */ M("p", {
|
|
2235
2235
|
className: "iu-page-sub",
|
|
@@ -2239,28 +2239,28 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2239
2239
|
/* @__PURE__ */ M("nav", {
|
|
2240
2240
|
className: "cmg-settings-nav",
|
|
2241
2241
|
"aria-label": "settings sections",
|
|
2242
|
-
children:
|
|
2242
|
+
children: x.map((e) => /* @__PURE__ */ M("a", {
|
|
2243
2243
|
href: `#${S(e)}`,
|
|
2244
2244
|
children: e
|
|
2245
2245
|
}, e))
|
|
2246
2246
|
}),
|
|
2247
|
-
/* @__PURE__ */ N(
|
|
2247
|
+
/* @__PURE__ */ N(y, {
|
|
2248
2248
|
label: "general",
|
|
2249
2249
|
defaultOpen: !0,
|
|
2250
2250
|
id: S("general"),
|
|
2251
2251
|
children: [/* @__PURE__ */ M(m, {
|
|
2252
2252
|
label: "name",
|
|
2253
2253
|
control: "text",
|
|
2254
|
-
value:
|
|
2254
|
+
value: u.name,
|
|
2255
2255
|
onCommit: d("name")
|
|
2256
2256
|
}), /* @__PURE__ */ M(m, {
|
|
2257
2257
|
label: "purpose",
|
|
2258
2258
|
control: "text",
|
|
2259
|
-
value:
|
|
2259
|
+
value: u.purpose ?? "",
|
|
2260
2260
|
onCommit: d("purpose")
|
|
2261
2261
|
})]
|
|
2262
2262
|
}),
|
|
2263
|
-
/* @__PURE__ */ N(
|
|
2263
|
+
/* @__PURE__ */ N(y, {
|
|
2264
2264
|
label: "access",
|
|
2265
2265
|
defaultOpen: !0,
|
|
2266
2266
|
id: S("access"),
|
|
@@ -2268,22 +2268,22 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2268
2268
|
label: "who can publish",
|
|
2269
2269
|
help: C(a),
|
|
2270
2270
|
control: "select",
|
|
2271
|
-
value: Ze(
|
|
2272
|
-
options: Xe(
|
|
2271
|
+
value: Ze(u.mode, a),
|
|
2272
|
+
options: Xe(u.mode, a),
|
|
2273
2273
|
onCommit: d("mode")
|
|
2274
2274
|
}), /* @__PURE__ */ M(m, {
|
|
2275
2275
|
label: "who can read",
|
|
2276
2276
|
help: "members read and publish. contributors publish, and read only if who can read allows it.",
|
|
2277
2277
|
control: "select",
|
|
2278
|
-
value: Ze(
|
|
2279
|
-
options: Xe(
|
|
2278
|
+
value: Ze(u.access, s),
|
|
2279
|
+
options: Xe(u.access, s),
|
|
2280
2280
|
onCommit: d("access")
|
|
2281
2281
|
})]
|
|
2282
2282
|
}),
|
|
2283
|
-
/* @__PURE__ */ N(
|
|
2283
|
+
/* @__PURE__ */ N(y, {
|
|
2284
2284
|
label: "members",
|
|
2285
2285
|
defaultOpen: !0,
|
|
2286
|
-
count:
|
|
2286
|
+
count: u.memberCount ?? null,
|
|
2287
2287
|
noun: ["member", "members"],
|
|
2288
2288
|
id: S("members"),
|
|
2289
2289
|
children: [
|
|
@@ -2292,7 +2292,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2292
2292
|
onSubmit: (e) => {
|
|
2293
2293
|
e.preventDefault(), t.onInvite(g), _("");
|
|
2294
2294
|
},
|
|
2295
|
-
children: [/* @__PURE__ */ M(
|
|
2295
|
+
children: [/* @__PURE__ */ M(T, {
|
|
2296
2296
|
label: "invite by github username",
|
|
2297
2297
|
value: g,
|
|
2298
2298
|
onChange: (e) => _(e.target.value),
|
|
@@ -2307,10 +2307,10 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2307
2307
|
/* @__PURE__ */ M("ul", {
|
|
2308
2308
|
className: "cmg-member-list",
|
|
2309
2309
|
"aria-label": "members",
|
|
2310
|
-
children:
|
|
2310
|
+
children: u.members.map((e) => /* @__PURE__ */ N("li", {
|
|
2311
2311
|
className: "cmg-member",
|
|
2312
2312
|
children: [
|
|
2313
|
-
/* @__PURE__ */ M(
|
|
2313
|
+
/* @__PURE__ */ M(o, {
|
|
2314
2314
|
name: e.name ?? e.handle,
|
|
2315
2315
|
size: "sm"
|
|
2316
2316
|
}),
|
|
@@ -2360,16 +2360,16 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2360
2360
|
label: "when a member leaves",
|
|
2361
2361
|
help: "what happens to the transcripts they published here.",
|
|
2362
2362
|
control: "select",
|
|
2363
|
-
value: Ze(
|
|
2364
|
-
options: Xe(
|
|
2363
|
+
value: Ze(u.memberLeaves, c),
|
|
2364
|
+
options: Xe(u.memberLeaves, c),
|
|
2365
2365
|
onCommit: d("memberLeaves")
|
|
2366
2366
|
})
|
|
2367
2367
|
]
|
|
2368
2368
|
}),
|
|
2369
|
-
/* @__PURE__ */ M(
|
|
2369
|
+
/* @__PURE__ */ M(y, {
|
|
2370
2370
|
label: "github orgs",
|
|
2371
2371
|
defaultOpen: !0,
|
|
2372
|
-
count:
|
|
2372
|
+
count: u.org === void 0 ? null : +!!u.org,
|
|
2373
2373
|
noun: ["org", "orgs"],
|
|
2374
2374
|
id: S("github orgs"),
|
|
2375
2375
|
children: /* @__PURE__ */ N("div", {
|
|
@@ -2378,18 +2378,18 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2378
2378
|
className: "srow-text-col",
|
|
2379
2379
|
children: [/* @__PURE__ */ M("span", {
|
|
2380
2380
|
className: "srow-label",
|
|
2381
|
-
children:
|
|
2381
|
+
children: u.org ? u.org.login : u.org === null ? "no org linked" : "github org"
|
|
2382
2382
|
}), /* @__PURE__ */ N("span", {
|
|
2383
2383
|
className: "srow-help",
|
|
2384
|
-
children: [typeof
|
|
2384
|
+
children: [typeof u.org?.total == "number" ? /* @__PURE__ */ N(j, { children: [
|
|
2385
2385
|
/* @__PURE__ */ M("span", {
|
|
2386
2386
|
className: "tnum",
|
|
2387
|
-
children:
|
|
2387
|
+
children: u.org.linked ?? 0
|
|
2388
2388
|
}),
|
|
2389
2389
|
" of ",
|
|
2390
2390
|
/* @__PURE__ */ M("span", {
|
|
2391
2391
|
className: "tnum",
|
|
2392
|
-
children:
|
|
2392
|
+
children: u.org.total
|
|
2393
2393
|
}),
|
|
2394
2394
|
" repos linked. "
|
|
2395
2395
|
] }) : null, "a collective links one github org today."]
|
|
@@ -2402,7 +2402,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2402
2402
|
})]
|
|
2403
2403
|
})
|
|
2404
2404
|
}),
|
|
2405
|
-
/* @__PURE__ */ N(
|
|
2405
|
+
/* @__PURE__ */ N(y, {
|
|
2406
2406
|
label: "pull requests",
|
|
2407
2407
|
defaultOpen: !0,
|
|
2408
2408
|
count: 1,
|
|
@@ -2417,16 +2417,16 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2417
2417
|
className: "srow-note",
|
|
2418
2418
|
children: [
|
|
2419
2419
|
"automatic linking is now a personal setting, in ",
|
|
2420
|
-
|
|
2420
|
+
w ? /* @__PURE__ */ M("a", {
|
|
2421
2421
|
className: "link",
|
|
2422
|
-
href:
|
|
2422
|
+
href: w,
|
|
2423
2423
|
children: "your settings"
|
|
2424
2424
|
}) : "your settings",
|
|
2425
2425
|
"."
|
|
2426
2426
|
]
|
|
2427
2427
|
})]
|
|
2428
2428
|
}),
|
|
2429
|
-
|
|
2429
|
+
v && /* @__PURE__ */ N(y, {
|
|
2430
2430
|
label: "danger zone",
|
|
2431
2431
|
defaultOpen: !0,
|
|
2432
2432
|
count: null,
|
|
@@ -2448,13 +2448,13 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2448
2448
|
className: "srow-help",
|
|
2449
2449
|
children: [
|
|
2450
2450
|
"delete ",
|
|
2451
|
-
|
|
2451
|
+
u.name,
|
|
2452
2452
|
" for ",
|
|
2453
|
-
typeof
|
|
2453
|
+
typeof u.memberCount == "number" ? /* @__PURE__ */ N(j, { children: [
|
|
2454
2454
|
"all ",
|
|
2455
2455
|
/* @__PURE__ */ M("span", {
|
|
2456
2456
|
className: "tnum",
|
|
2457
|
-
children:
|
|
2457
|
+
children: u.memberCount
|
|
2458
2458
|
}),
|
|
2459
2459
|
" members"
|
|
2460
2460
|
] }) : "all its members",
|
|
@@ -2474,7 +2474,7 @@ function Qe({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2474
2474
|
onClose: () => h(!1),
|
|
2475
2475
|
owners: n,
|
|
2476
2476
|
initialSelected: r,
|
|
2477
|
-
title: `link repositories from ${
|
|
2477
|
+
title: `link repositories from ${u.org?.login ?? "github"}`,
|
|
2478
2478
|
onSave: (e) => {
|
|
2479
2479
|
t.onLinkRepos(e), h(!1);
|
|
2480
2480
|
}
|
|
@@ -2526,8 +2526,8 @@ function rt(e) {
|
|
|
2526
2526
|
}).format(t).toLowerCase();
|
|
2527
2527
|
}
|
|
2528
2528
|
function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
2529
|
-
let { collective: r = $e, providerShare: i = [], pendingReview: a = [], members:
|
|
2530
|
-
D(e),
|
|
2529
|
+
let { collective: r = $e, providerShare: i = [], pendingReview: a = [], members: o = [], redactions: c = [], browseRows: u = [], roleOptions: f = [], initialRole: p = "", initialShowRedaction: m = !1, initialBrowseGated: h = !1, stats: g = et } = e || tt, { onRoleChange: v, onJoin: y, onLeave: b, onSettings: C, onContribute: w, onToggleBrowse: T } = t || {}, [E, D] = A(p || r.role || ""), [k, j] = A(!!m), [P, F] = A(!!h), I = E || r.role || "guest", R = I === "owner", z = I === "guest", B = n && f.length > 0, V = O(() => B ? f : [], [B, f]), W = (e) => {
|
|
2530
|
+
D(e), v?.(e);
|
|
2531
2531
|
};
|
|
2532
2532
|
return /* @__PURE__ */ M("div", {
|
|
2533
2533
|
className: "cmg-root",
|
|
@@ -2539,7 +2539,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2539
2539
|
children: [/* @__PURE__ */ N("div", {
|
|
2540
2540
|
className: "crumb cmg-crumb",
|
|
2541
2541
|
children: [
|
|
2542
|
-
"
|
|
2542
|
+
"online ",
|
|
2543
2543
|
/* @__PURE__ */ M(L, {
|
|
2544
2544
|
size: 14,
|
|
2545
2545
|
"aria-hidden": "true"
|
|
@@ -2606,7 +2606,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2606
2606
|
z ? /* @__PURE__ */ N("button", {
|
|
2607
2607
|
type: "button",
|
|
2608
2608
|
className: "btn btn-sm btn-primary",
|
|
2609
|
-
onClick: () =>
|
|
2609
|
+
onClick: () => y?.(),
|
|
2610
2610
|
children: [/* @__PURE__ */ M(ce, {
|
|
2611
2611
|
size: 14,
|
|
2612
2612
|
"aria-hidden": "true"
|
|
@@ -2621,10 +2621,10 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2621
2621
|
"aria-hidden": "true"
|
|
2622
2622
|
}), " contribute"]
|
|
2623
2623
|
}) : null,
|
|
2624
|
-
(I === "member" || I === "contributor") &&
|
|
2624
|
+
(I === "member" || I === "contributor") && b ? /* @__PURE__ */ N("button", {
|
|
2625
2625
|
type: "button",
|
|
2626
2626
|
className: "btn btn-sm btn-danger",
|
|
2627
|
-
onClick: () =>
|
|
2627
|
+
onClick: () => b?.(),
|
|
2628
2628
|
children: [/* @__PURE__ */ M(J, {
|
|
2629
2629
|
size: 14,
|
|
2630
2630
|
"aria-hidden": "true"
|
|
@@ -2646,17 +2646,17 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2646
2646
|
/* @__PURE__ */ N("div", {
|
|
2647
2647
|
className: "cmg-tiles",
|
|
2648
2648
|
children: [
|
|
2649
|
-
/* @__PURE__ */ M(
|
|
2649
|
+
/* @__PURE__ */ M(s, {
|
|
2650
2650
|
label: "contributions",
|
|
2651
2651
|
value: r.acceptanceMode || "open",
|
|
2652
2652
|
tone: "teal"
|
|
2653
2653
|
}),
|
|
2654
|
-
/* @__PURE__ */ M(
|
|
2654
|
+
/* @__PURE__ */ M(s, {
|
|
2655
2655
|
label: "access",
|
|
2656
2656
|
value: r.dataAccess || "members only",
|
|
2657
2657
|
tone: "amber"
|
|
2658
2658
|
}),
|
|
2659
|
-
/* @__PURE__ */ M(
|
|
2659
|
+
/* @__PURE__ */ M(s, {
|
|
2660
2660
|
label: "your role",
|
|
2661
2661
|
value: I
|
|
2662
2662
|
})
|
|
@@ -2666,20 +2666,20 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2666
2666
|
{
|
|
2667
2667
|
key: "transcripts",
|
|
2668
2668
|
label: "transcripts",
|
|
2669
|
-
value:
|
|
2670
|
-
sub: `across ${
|
|
2669
|
+
value: g.transcripts,
|
|
2670
|
+
sub: `across ${g.projects}`
|
|
2671
2671
|
},
|
|
2672
2672
|
{
|
|
2673
2673
|
key: "tokens",
|
|
2674
2674
|
label: "tokens",
|
|
2675
|
-
value:
|
|
2676
|
-
sub:
|
|
2675
|
+
value: g.tokens,
|
|
2676
|
+
sub: g.turns
|
|
2677
2677
|
},
|
|
2678
2678
|
{
|
|
2679
2679
|
key: "contributors",
|
|
2680
2680
|
label: "contributors",
|
|
2681
|
-
value:
|
|
2682
|
-
sub:
|
|
2681
|
+
value: g.contributors,
|
|
2682
|
+
sub: g.hours
|
|
2683
2683
|
}
|
|
2684
2684
|
] }),
|
|
2685
2685
|
/* @__PURE__ */ N("div", {
|
|
@@ -2694,7 +2694,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2694
2694
|
id: "cmg-share-h",
|
|
2695
2695
|
className: "cmg-sub",
|
|
2696
2696
|
children: "provider share"
|
|
2697
|
-
}), /* @__PURE__ */ M(
|
|
2697
|
+
}), /* @__PURE__ */ M(l, {
|
|
2698
2698
|
label: "provider share",
|
|
2699
2699
|
total: 100,
|
|
2700
2700
|
data: i.map((e) => ({
|
|
@@ -2708,7 +2708,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2708
2708
|
overflow: "auto",
|
|
2709
2709
|
maxWidth: "100%"
|
|
2710
2710
|
},
|
|
2711
|
-
children: /* @__PURE__ */ M(
|
|
2711
|
+
children: /* @__PURE__ */ M(S, {
|
|
2712
2712
|
title: "pending review",
|
|
2713
2713
|
emptyLabel: "no shares awaiting review.",
|
|
2714
2714
|
items: a.map((e) => ({
|
|
@@ -2719,7 +2719,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2719
2719
|
}))
|
|
2720
2720
|
})
|
|
2721
2721
|
}) : null,
|
|
2722
|
-
|
|
2722
|
+
c.length > 0 ? /* @__PURE__ */ N("section", {
|
|
2723
2723
|
className: "card cmg-redact-sec",
|
|
2724
2724
|
"aria-labelledby": "cmg-redact-h",
|
|
2725
2725
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -2743,14 +2743,14 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2743
2743
|
})]
|
|
2744
2744
|
}), k ? /* @__PURE__ */ M("div", {
|
|
2745
2745
|
className: "cmg-redact-list",
|
|
2746
|
-
children:
|
|
2746
|
+
children: c.map((e) => /* @__PURE__ */ N("article", {
|
|
2747
2747
|
className: "cmg-redact",
|
|
2748
2748
|
children: [
|
|
2749
2749
|
/* @__PURE__ */ N("div", {
|
|
2750
2750
|
className: "cmg-redact-head",
|
|
2751
2751
|
children: [/* @__PURE__ */ M("span", {
|
|
2752
2752
|
className: "cmg-redact-badges",
|
|
2753
|
-
children: /* @__PURE__ */ M(
|
|
2753
|
+
children: /* @__PURE__ */ M(x, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
|
|
2754
2754
|
}), /* @__PURE__ */ M("span", {
|
|
2755
2755
|
className: "cmg-redact-file mono",
|
|
2756
2756
|
children: e.file || "unknown"
|
|
@@ -2810,7 +2810,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2810
2810
|
z ? /* @__PURE__ */ N("button", {
|
|
2811
2811
|
type: "button",
|
|
2812
2812
|
className: "btn btn-sm btn-primary",
|
|
2813
|
-
onClick: () =>
|
|
2813
|
+
onClick: () => y?.(),
|
|
2814
2814
|
children: [/* @__PURE__ */ M(ce, {
|
|
2815
2815
|
size: 14,
|
|
2816
2816
|
"aria-hidden": "true"
|
|
@@ -2889,7 +2889,7 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2889
2889
|
})]
|
|
2890
2890
|
})
|
|
2891
2891
|
]
|
|
2892
|
-
}),
|
|
2892
|
+
}), o.length > 0 ? /* @__PURE__ */ M("aside", {
|
|
2893
2893
|
className: "sidebar cmg-d-rail",
|
|
2894
2894
|
"aria-label": "collective sidebar",
|
|
2895
2895
|
children: /* @__PURE__ */ M("div", {
|
|
@@ -2897,10 +2897,10 @@ function it({ data: e = tt, actions: t = {}, demoRoleSwitcher: n = !1 } = {}) {
|
|
|
2897
2897
|
overflow: "auto",
|
|
2898
2898
|
maxWidth: "100%"
|
|
2899
2899
|
},
|
|
2900
|
-
children: /* @__PURE__ */ M(
|
|
2900
|
+
children: /* @__PURE__ */ M(d, {
|
|
2901
2901
|
title: "members",
|
|
2902
2902
|
roles: ["member", "contributor"],
|
|
2903
|
-
members:
|
|
2903
|
+
members: o.map((e) => ({
|
|
2904
2904
|
handle: e.handle || e.githubUsername || "@unknown",
|
|
2905
2905
|
name: e.name || e.displayName || e.githubUsername || "unknown",
|
|
2906
2906
|
role: e.role || "member",
|