@parallelworks/tandem-web 0.160.1 → 0.161.1

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.
Files changed (36) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +4 -0
  2. package/_virtual/_virtual_i18n/es/common.js +4 -0
  3. package/_virtual/_virtual_i18n/ja/common.js +4 -0
  4. package/_virtual/_virtual_i18n/ko/common.js +4 -0
  5. package/_virtual/_virtual_i18n/zh/common.js +4 -0
  6. package/api/mutations.js +16 -9
  7. package/api/queries.js +194 -140
  8. package/components/CommandPalette.js +5 -2
  9. package/components/CustomerRequests.js +81 -85
  10. package/components/DocLinkPicker.js +4 -1
  11. package/components/FavoritesNav.js +4 -1
  12. package/components/IssueFilters.js +90 -87
  13. package/components/IssueGroupList.js +72 -0
  14. package/components/IssueInsights.js +4 -1
  15. package/components/IssueRelations.js +8 -2
  16. package/components/IssueRow.js +73 -66
  17. package/components/IssueSection.js +30 -20
  18. package/components/NewIssueDialog.js +181 -175
  19. package/components/NewProjectDialog.js +64 -64
  20. package/components/Reports.js +4 -1
  21. package/components/TeamWorkflow.js +4 -1
  22. package/components/icons.js +61 -33
  23. package/lib/boardMove.js +13 -3
  24. package/lib/groupList.js +14 -0
  25. package/lib/issueMenu.js +8 -2
  26. package/lib/issuePicker.js +4 -1
  27. package/package.json +2 -1
  28. package/pages/issues.js +393 -340
  29. package/pages/triage.js +4 -1
  30. package/routes/_workspace/docs/_doc2.js +8 -2
  31. package/routes/_workspace/issues/_identifier2.js +8 -2
  32. package/routes/_workspace/issues/index.js +1 -1
  33. package/routes/_workspace/notifications2.js +4 -1
  34. package/routes/_workspace/teams/_key/settings2.js +180 -164
  35. package/routes/_workspace2.js +3 -3
  36. package/routes/_workspace3.js +11 -10
@@ -1,6 +1,6 @@
1
1
  import { useHost as e } from "../lib/host.js";
2
2
  import { useNavigate as t } from "../lib/router.js";
3
- import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o, teamsQuery as ee } from "../api/queries.js";
3
+ import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o, myTeamsQuery as ee } from "../api/queries.js";
4
4
  import { docPath as s, useDocActions as te } from "../lib/docs.js";
5
5
  import { AddIcon as c, AreaIcon as ne, CheckIcon as re, ChevronRightIcon as ie, CloseIcon as ae, CycleIcon as oe, FileTextIcon as l, InboxIcon as u, LibraryIcon as d, ListViewIcon as f, NotificationIcon as se, ProjectIcon as p, SearchIcon as ce, SettingsIcon as le, StatusIcon as ue, TriageIcon as de, UserIcon as m, UsersIcon as h } from "./icons.js";
6
6
  import { headingAnchor as fe, headings as pe } from "../lib/glossary.js";
@@ -120,7 +120,10 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
120
120
  items: G.issues.slice(0, 8).map((e) => ({
121
121
  id: e.id,
122
122
  label: `${e.identifier} ${e.title}`,
123
- icon: /* @__PURE__ */ S(ue, { category: e.status.category }),
123
+ icon: /* @__PURE__ */ S(ue, {
124
+ category: e.status.category,
125
+ step: e.status.step
126
+ }),
124
127
  run: X(`/${v}/issues/${e.identifier}`)
125
128
  }))
126
129
  }), t.push({
@@ -1,163 +1,159 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { customerRequestsQuery as n, customersQuery as r } from "../api/queries.js";
3
- import { AddIcon as i, CloseIcon as a, LinkIcon as o, UsersIcon as s } from "./icons.js";
4
- import { useCan as c } from "../lib/roles.js";
5
- import { Button as l, Card as u, ErrorText as d, IconButton as f, Input as p, Textarea as m } from "@parallelworks/ui";
6
- import { useId as h, useState as g } from "react";
7
- import { useErrorMessage as _ } from "@parallelworks/problem/react";
8
- import { useTranslations as v } from "use-intl";
9
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
10
- import { useMutation as x, useQuery as S, useQueryClient as C } from "@tanstack/react-query";
3
+ import { invalidateIssueLists as i } from "../api/mutations.js";
4
+ import { AddIcon as a, CloseIcon as o, LinkIcon as s, UsersIcon as c } from "./icons.js";
5
+ import { useCan as l } from "../lib/roles.js";
6
+ import { Button as u, Card as d, ErrorText as f, IconButton as p, Input as m, Textarea as h } from "@parallelworks/ui";
7
+ import { useId as g, useState as _ } from "react";
8
+ import { useErrorMessage as v } from "@parallelworks/problem/react";
9
+ import { useTranslations as y } from "use-intl";
10
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
+ import { useMutation as S, useQuery as C, useQueryClient as w } from "@tanstack/react-query";
11
12
  // src/components/CustomerRequests.tsx
12
- function w({ workspace: w, identifier: T, enabled: E }) {
13
- let D = v("customerRequests"), O = _(), k = C(), A = c(w, "manage_customers"), j = A && E, { data: M = [] } = S(n(w, T)), { data: N = [] } = S({
14
- ...r(w),
15
- enabled: j
16
- }), [P, F] = g(!1), [I, L] = g(""), [R, z] = g(""), [B, V] = g(""), H = h(), U = () => {
17
- k.invalidateQueries({ queryKey: n(w, T).queryKey }), k.invalidateQueries({ queryKey: r(w).queryKey }), k.invalidateQueries({ queryKey: [
18
- "workspace",
19
- w,
20
- "issues",
21
- "list"
22
- ] });
23
- }, W = x({
13
+ function T({ workspace: T, identifier: E, enabled: D }) {
14
+ let O = y("customerRequests"), k = v(), A = w(), j = l(T, "manage_customers"), M = j && D, { data: N = [] } = C(n(T, E)), { data: P = [] } = C({
15
+ ...r(T),
16
+ enabled: M
17
+ }), [F, I] = _(!1), [L, R] = _(""), [z, B] = _(""), [V, H] = _(""), U = g(), W = () => {
18
+ A.invalidateQueries({ queryKey: n(T, E).queryKey }), A.invalidateQueries({ queryKey: r(T).queryKey }), i(A, T);
19
+ }, G = S({
24
20
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/requests", {
25
21
  params: { path: {
26
- workspace: w,
27
- identifier: T
22
+ workspace: T,
23
+ identifier: E
28
24
  } },
29
25
  body: {
30
- customerName: I.trim(),
31
- quote: R.trim(),
32
- url: B.trim()
26
+ customerName: L.trim(),
27
+ quote: z.trim(),
28
+ url: V.trim()
33
29
  }
34
30
  })),
35
31
  onSuccess: () => {
36
- F(!1), L(""), z(""), V("");
32
+ I(!1), R(""), B(""), H("");
37
33
  },
38
- onSettled: U
39
- }), G = x({
34
+ onSettled: W
35
+ }), K = S({
40
36
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/requests/{requestId}", { params: { path: {
41
- workspace: w,
42
- identifier: T,
37
+ workspace: T,
38
+ identifier: E,
43
39
  requestId: n
44
40
  } } })),
45
- onSettled: U
41
+ onSettled: W
46
42
  });
47
- return M.length === 0 && !j ? null : /* @__PURE__ */ b("section", {
43
+ return N.length === 0 && !M ? null : /* @__PURE__ */ x("section", {
48
44
  className: "mt-6",
49
- "aria-label": D("label"),
45
+ "aria-label": O("label"),
50
46
  children: [
51
- /* @__PURE__ */ b("h2", {
47
+ /* @__PURE__ */ x("h2", {
52
48
  className: "flex items-center gap-2 text-xs font-medium text-muted-foreground",
53
- children: [D("label"), M.length > 0 && /* @__PURE__ */ y("span", {
49
+ children: [O("label"), N.length > 0 && /* @__PURE__ */ b("span", {
54
50
  className: "tabular-nums",
55
- children: M.length
51
+ children: N.length
56
52
  })]
57
53
  }),
58
- M.length > 0 && /* @__PURE__ */ y(u, {
54
+ N.length > 0 && /* @__PURE__ */ b(d, {
59
55
  size: "fill",
60
56
  padding: "none",
61
57
  divided: !0,
62
58
  interactive: !1,
63
- render: /* @__PURE__ */ y("ul", {}),
59
+ render: /* @__PURE__ */ b("ul", {}),
64
60
  className: "mt-1",
65
- children: M.map((e) => /* @__PURE__ */ b("li", {
61
+ children: N.map((e) => /* @__PURE__ */ x("li", {
66
62
  className: "flex items-start gap-2 px-3 py-2 text-sm",
67
63
  children: [
68
- /* @__PURE__ */ y(s, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
69
- /* @__PURE__ */ b("div", {
64
+ /* @__PURE__ */ b(c, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
65
+ /* @__PURE__ */ x("div", {
70
66
  className: "min-w-0 flex-1",
71
- children: [/* @__PURE__ */ y("span", {
67
+ children: [/* @__PURE__ */ b("span", {
72
68
  className: "font-medium",
73
69
  children: e.customer.name
74
- }), e.quote && /* @__PURE__ */ y("p", {
70
+ }), e.quote && /* @__PURE__ */ b("p", {
75
71
  className: "mt-0.5 whitespace-pre-wrap text-muted-foreground",
76
- children: D("quoted", { quote: e.quote })
72
+ children: O("quoted", { quote: e.quote })
77
73
  })]
78
74
  }),
79
- e.url && /* @__PURE__ */ b("a", {
75
+ e.url && /* @__PURE__ */ x("a", {
80
76
  href: e.url,
81
77
  target: "_blank",
82
78
  rel: "noreferrer",
83
79
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-primary hover:underline",
84
- children: [/* @__PURE__ */ y(o, { className: "size-3" }), D("source")]
80
+ children: [/* @__PURE__ */ b(s, { className: "size-3" }), O("source")]
85
81
  }),
86
- A && /* @__PURE__ */ y(f, {
82
+ j && /* @__PURE__ */ b(p, {
87
83
  variant: "ghost",
88
84
  size: "sm",
89
- icon: /* @__PURE__ */ y(a, {}),
90
- label: D("remove", { name: e.customer.name }),
91
- onClick: () => G.mutate(e.id),
85
+ icon: /* @__PURE__ */ b(o, {}),
86
+ label: O("remove", { name: e.customer.name }),
87
+ onClick: () => K.mutate(e.id),
92
88
  className: "-my-1"
93
89
  })
94
90
  ]
95
91
  }, e.id))
96
92
  }),
97
- j && (P ? /* @__PURE__ */ b("form", {
93
+ M && (F ? /* @__PURE__ */ x("form", {
98
94
  className: "mt-2 grid gap-2",
99
95
  onSubmit: (e) => {
100
- e.preventDefault(), I.trim() && W.mutate();
96
+ e.preventDefault(), L.trim() && G.mutate();
101
97
  },
102
98
  children: [
103
- /* @__PURE__ */ y(p, {
99
+ /* @__PURE__ */ b(m, {
104
100
  autoFocus: !0,
105
101
  required: !0,
106
- list: H,
107
- value: I,
108
- onChange: (e) => L(e.target.value),
109
- placeholder: D("customer"),
110
- "aria-label": D("customer"),
102
+ list: U,
103
+ value: L,
104
+ onChange: (e) => R(e.target.value),
105
+ placeholder: O("customer"),
106
+ "aria-label": O("customer"),
111
107
  maxLength: 200
112
108
  }),
113
- /* @__PURE__ */ y("datalist", {
114
- id: H,
115
- children: N.map((e) => /* @__PURE__ */ y("option", { value: e.name }, e.id))
109
+ /* @__PURE__ */ b("datalist", {
110
+ id: U,
111
+ children: P.map((e) => /* @__PURE__ */ b("option", { value: e.name }, e.id))
116
112
  }),
117
- /* @__PURE__ */ y(m, {
118
- value: R,
119
- onChange: (e) => z(e.target.value),
120
- placeholder: D("quote"),
121
- "aria-label": D("quote"),
113
+ /* @__PURE__ */ b(h, {
114
+ value: z,
115
+ onChange: (e) => B(e.target.value),
116
+ placeholder: O("quote"),
117
+ "aria-label": O("quote"),
122
118
  maxLength: 4e3,
123
119
  rows: 2
124
120
  }),
125
- /* @__PURE__ */ y(p, {
121
+ /* @__PURE__ */ b(m, {
126
122
  type: "url",
127
- value: B,
128
- onChange: (e) => V(e.target.value),
129
- placeholder: D("url"),
130
- "aria-label": D("url"),
123
+ value: V,
124
+ onChange: (e) => H(e.target.value),
125
+ placeholder: O("url"),
126
+ "aria-label": O("url"),
131
127
  maxLength: 2e3
132
128
  }),
133
- W.isError && /* @__PURE__ */ y(d, {
129
+ G.isError && /* @__PURE__ */ b(f, {
134
130
  size: "md",
135
- children: O(W.error)
131
+ children: k(G.error)
136
132
  }),
137
- /* @__PURE__ */ b("div", {
133
+ /* @__PURE__ */ x("div", {
138
134
  className: "flex justify-end gap-2",
139
- children: [/* @__PURE__ */ y(l, {
135
+ children: [/* @__PURE__ */ b(u, {
140
136
  type: "button",
141
137
  size: "sm",
142
- onClick: () => F(!1),
143
- children: D("cancel")
144
- }), /* @__PURE__ */ y(l, {
138
+ onClick: () => I(!1),
139
+ children: O("cancel")
140
+ }), /* @__PURE__ */ b(u, {
145
141
  type: "submit",
146
142
  size: "sm",
147
143
  variant: "primary",
148
- loading: W.isPending,
149
- disabled: !I.trim(),
150
- children: D("add")
144
+ loading: G.isPending,
145
+ disabled: !L.trim(),
146
+ children: O("add")
151
147
  })]
152
148
  })
153
149
  ]
154
- }) : /* @__PURE__ */ b("button", {
150
+ }) : /* @__PURE__ */ x("button", {
155
151
  type: "button",
156
- onClick: () => F(!0),
152
+ onClick: () => I(!0),
157
153
  className: "mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground",
158
- children: [/* @__PURE__ */ y(i, { className: "size-3.5" }), D("addRequest")]
154
+ children: [/* @__PURE__ */ b(a, { className: "size-3.5" }), O("addRequest")]
159
155
  }))
160
156
  ]
161
157
  });
162
158
  }
163
- export { w as CustomerRequests };
159
+ export { T as CustomerRequests };
@@ -141,7 +141,10 @@ function O({ editor: O }) {
141
141
  hint: e.heading ? e.doc.title : void 0
142
142
  } : e.kind === "issue" ? {
143
143
  key: `issue:${e.issue.id}`,
144
- icon: /* @__PURE__ */ C(s, { category: e.issue.status.category }),
144
+ icon: /* @__PURE__ */ C(s, {
145
+ category: e.issue.status.category,
146
+ step: e.issue.status.step
147
+ }),
145
148
  label: e.issue.title,
146
149
  hint: e.issue.identifier
147
150
  } : {
@@ -18,7 +18,10 @@ function C(e, t, m, h) {
18
18
  case "issue": return {
19
19
  href: `/${t}/issues/${e.issue?.identifier ?? ""}`,
20
20
  label: e.issue ? `${e.issue.identifier} ${e.issue.title}` : h("issue"),
21
- icon: e.issue ? /* @__PURE__ */ v(l, { category: e.issue.status.category }) : null
21
+ icon: e.issue ? /* @__PURE__ */ v(l, {
22
+ category: e.issue.status.category,
23
+ step: e.issue.status.step
24
+ }) : null
22
25
  };
23
26
  case "team": return {
24
27
  href: p(t, e.team?.key ?? "", "issues"),