@skillcdn/console 0.3.1 → 0.3.2

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 (116) hide show
  1. package/README.md +2 -2
  2. package/dist/api.d.ts +3 -3
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +3 -3
  5. package/dist/api.js.map +1 -1
  6. package/dist/cli/cli.d.ts +4 -0
  7. package/dist/cli/cli.d.ts.map +1 -1
  8. package/dist/cli/cli.js +105 -18
  9. package/dist/cli/cli.js.map +1 -1
  10. package/dist/cli/format.d.ts.map +1 -1
  11. package/dist/cli/format.js +9 -7
  12. package/dist/cli/format.js.map +1 -1
  13. package/dist/cli/help.d.ts.map +1 -1
  14. package/dist/cli/help.js +13 -11
  15. package/dist/cli/help.js.map +1 -1
  16. package/dist/cli/main.js +1 -0
  17. package/dist/cli/main.js.map +1 -1
  18. package/dist/client.d.ts +13 -8
  19. package/dist/client.d.ts.map +1 -1
  20. package/dist/client.js +10 -2
  21. package/dist/client.js.map +1 -1
  22. package/dist/compat.d.ts +28 -6
  23. package/dist/compat.d.ts.map +1 -1
  24. package/dist/compat.js +55 -14
  25. package/dist/compat.js.map +1 -1
  26. package/dist/components/board.d.ts.map +1 -1
  27. package/dist/components/board.js +6 -4
  28. package/dist/components/board.js.map +1 -1
  29. package/dist/components/calendar.d.ts +13 -7
  30. package/dist/components/calendar.d.ts.map +1 -1
  31. package/dist/components/calendar.js +36 -24
  32. package/dist/components/calendar.js.map +1 -1
  33. package/dist/components/picker.d.ts +39 -0
  34. package/dist/components/picker.d.ts.map +1 -0
  35. package/dist/components/picker.js +155 -0
  36. package/dist/components/picker.js.map +1 -0
  37. package/dist/components/task-form.d.ts +18 -4
  38. package/dist/components/task-form.d.ts.map +1 -1
  39. package/dist/components/task-form.js +56 -13
  40. package/dist/components/task-form.js.map +1 -1
  41. package/dist/components/task-list.js +2 -2
  42. package/dist/components/task-list.js.map +1 -1
  43. package/dist/components/task-view.d.ts +7 -1
  44. package/dist/components/task-view.d.ts.map +1 -1
  45. package/dist/components/task-view.js +6 -5
  46. package/dist/components/task-view.js.map +1 -1
  47. package/dist/components/ui.d.ts +7 -0
  48. package/dist/components/ui.d.ts.map +1 -1
  49. package/dist/components/ui.js +11 -0
  50. package/dist/components/ui.js.map +1 -1
  51. package/dist/components/work.d.ts.map +1 -1
  52. package/dist/components/work.js +5 -3
  53. package/dist/components/work.js.map +1 -1
  54. package/dist/console.css +163 -11
  55. package/dist/console.d.ts.map +1 -1
  56. package/dist/console.js +24 -4
  57. package/dist/console.js.map +1 -1
  58. package/dist/data.d.ts +11 -1
  59. package/dist/data.d.ts.map +1 -1
  60. package/dist/data.js +22 -1
  61. package/dist/data.js.map +1 -1
  62. package/dist/i18n/en.d.ts +11 -3
  63. package/dist/i18n/en.d.ts.map +1 -1
  64. package/dist/i18n/en.js +16 -8
  65. package/dist/i18n/en.js.map +1 -1
  66. package/dist/i18n/ko.d.ts.map +1 -1
  67. package/dist/i18n/ko.js +17 -9
  68. package/dist/i18n/ko.js.map +1 -1
  69. package/dist/index.d.ts +3 -2
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +3 -2
  72. package/dist/index.js.map +1 -1
  73. package/dist/limits.d.ts +2 -0
  74. package/dist/limits.d.ts.map +1 -1
  75. package/dist/limits.js +2 -0
  76. package/dist/limits.js.map +1 -1
  77. package/dist/schemas.d.ts +12 -11
  78. package/dist/schemas.d.ts.map +1 -1
  79. package/dist/schemas.js +11 -8
  80. package/dist/schemas.js.map +1 -1
  81. package/dist/vocabulary.d.ts +2 -0
  82. package/dist/vocabulary.d.ts.map +1 -1
  83. package/dist/vocabulary.js +2 -0
  84. package/dist/vocabulary.js.map +1 -1
  85. package/docs/specs/cli.md +9 -9
  86. package/docs/specs/rest.md +14 -14
  87. package/package.json +1 -1
  88. package/skills/building-a-console/SKILL.md +2 -2
  89. package/skills/deploying-a-console/SKILL.md +2 -2
  90. package/skills/deploying-a-console/references/resources.md +1 -1
  91. package/skills/working-the-board/SKILL.md +3 -3
  92. package/skills/working-the-board/references/terms.md +2 -2
  93. package/src/api.ts +5 -0
  94. package/src/cli/cli.ts +131 -18
  95. package/src/cli/format.ts +11 -7
  96. package/src/cli/help.ts +15 -11
  97. package/src/cli/main.ts +1 -0
  98. package/src/client.ts +23 -10
  99. package/src/compat.ts +63 -14
  100. package/src/components/board.tsx +10 -4
  101. package/src/components/calendar.tsx +68 -32
  102. package/src/components/picker.tsx +297 -0
  103. package/src/components/task-form.tsx +149 -63
  104. package/src/components/task-list.tsx +2 -2
  105. package/src/components/task-view.tsx +23 -9
  106. package/src/components/ui.tsx +25 -0
  107. package/src/components/work.tsx +6 -4
  108. package/src/console.tsx +29 -3
  109. package/src/data.ts +44 -1
  110. package/src/i18n/en.ts +16 -8
  111. package/src/i18n/ko.ts +17 -9
  112. package/src/index.ts +16 -1
  113. package/src/limits.ts +2 -0
  114. package/src/schemas.ts +11 -7
  115. package/src/styles/console.css +163 -11
  116. package/src/vocabulary.ts +3 -0
@@ -0,0 +1,39 @@
1
+ import { type ReactNode } from "react";
2
+ /** How many items one page of a picker holds: enough to find the one meant, few enough to read at a glance. */
3
+ export declare const PICKER_PAGE_LIMIT = 10;
4
+ export interface PickerPage<T> {
5
+ readonly items: readonly T[];
6
+ readonly more: boolean;
7
+ }
8
+ /** What the words find, from `offset` on; the first page of everything while the words are empty. */
9
+ export type PickerSearch<T> = (query: string, page: {
10
+ readonly limit: number;
11
+ readonly offset: number;
12
+ }, signal: AbortSignal) => Promise<PickerPage<T>>;
13
+ /**
14
+ * Whether the list opens above the field: only where the window has no room for it below the
15
+ * field and more room above than below; else below, as a list does.
16
+ */
17
+ export declare function opensAbove(field: {
18
+ readonly top: number;
19
+ readonly bottom: number;
20
+ }, listHeight: number, windowHeight: number): boolean;
21
+ export interface PickerProps<T> {
22
+ /** What is chosen, if anything. */
23
+ readonly value: T | undefined;
24
+ /** What stands for a choice made but not read back yet: shown in the chip's place, and cleared as one. */
25
+ readonly held?: ReactNode | undefined;
26
+ readonly search: PickerSearch<T>;
27
+ readonly keyOf: (item: T) => string;
28
+ /** How an item reads, in the list and once chosen. */
29
+ readonly render: (item: T) => ReactNode;
30
+ readonly onChange: (item: T | undefined) => void;
31
+ /** The field's name, for the input and the list. */
32
+ readonly label: string;
33
+ readonly placeholder: string;
34
+ readonly disabled?: boolean | undefined;
35
+ /** What the search may answer with but cannot be chosen: a task, as its own parent. */
36
+ readonly exclude?: ((item: T) => boolean) | undefined;
37
+ }
38
+ export declare function Picker<T>(props: PickerProps<T>): import("react").JSX.Element;
39
+ //# sourceMappingURL=picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picker.d.ts","sourceRoot":"","sources":["../../src/components/picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAUf,+GAA+G;AAC/G,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAIpC,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED,qGAAqG;AACrG,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACzD,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAK5B;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACxD,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,OAAO,CAIT;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IAC9B,0GAA0G;IAC1G,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IACpC,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,uFAAuF;IACvF,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACvD;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,+BAkO9C"}
@@ -0,0 +1,155 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useId, useLayoutEffect, useRef, useState, } from "react";
3
+ import { useWords } from "../i18n/index.js";
4
+ import { cx } from "./ui.js";
5
+ // Choosing one thing out of a listing too long to offer whole (ADR-0037): the task a new one is
6
+ // part of, the goal it works towards. The picker asks for what the words typed find, a page at a
7
+ // time, and never holds the listing: the first page as soon as the field is entered, the words'
8
+ // page once the typing rests, the next page on a press. What is chosen stands in the field's
9
+ // place, and a press clears it. Takes a search and nothing else from the network.
10
+ /** How many items one page of a picker holds: enough to find the one meant, few enough to read at a glance. */
11
+ export const PICKER_PAGE_LIMIT = 10;
12
+ /** How long the typing rests before the words are searched. */
13
+ const SEARCH_DELAY_MS = 200;
14
+ /** How far the list stands from the field, in pixels, as the stylesheet has it. */
15
+ const LIST_GAP = 4;
16
+ /**
17
+ * Whether the list opens above the field: only where the window has no room for it below the
18
+ * field and more room above than below; else below, as a list does.
19
+ */
20
+ export function opensAbove(field, listHeight, windowHeight) {
21
+ const below = windowHeight - field.bottom - LIST_GAP;
22
+ const over = field.top - LIST_GAP;
23
+ return listHeight > below && over > below;
24
+ }
25
+ export function Picker(props) {
26
+ const words = useWords().common;
27
+ const listId = useId();
28
+ const [query, setQuery] = useState("");
29
+ const [open, setOpen] = useState(false);
30
+ const [items, setItems] = useState([]);
31
+ const [more, setMore] = useState(false);
32
+ const [loading, setLoading] = useState(false);
33
+ const [active, setActive] = useState(-1);
34
+ const [above, setAbove] = useState(false);
35
+ const field = useRef(null);
36
+ const list = useRef(null);
37
+ // The search and the exclusion as the page last gave them, read at the moment of a request,
38
+ // so that a page rendering again starts no search over.
39
+ const search = useRef(props.search);
40
+ search.current = props.search;
41
+ const exclude = useRef(props.exclude);
42
+ exclude.current = props.exclude;
43
+ const latest = useRef(query);
44
+ latest.current = query;
45
+ // The list opens below the field, and above it only where the window has no room below and
46
+ // more above: measured before anything is painted, once it is open and again whenever what it
47
+ // holds changes its height, so that it never shows below for a frame on its way up.
48
+ // biome-ignore lint/correctness/useExhaustiveDependencies: the items, the loading and the more are what changes the list's height
49
+ useLayoutEffect(() => {
50
+ if (!open || field.current === null || list.current === null) {
51
+ return;
52
+ }
53
+ setAbove(opensAbove(field.current.getBoundingClientRect(), list.current.offsetHeight, window.innerHeight));
54
+ }, [open, items, loading, more]);
55
+ // The words' page once the typing rests; the first page of everything at once on entering.
56
+ useEffect(() => {
57
+ if (!open) {
58
+ return;
59
+ }
60
+ const controller = new AbortController();
61
+ const timer = setTimeout(() => {
62
+ setLoading(true);
63
+ search
64
+ .current(query, { limit: PICKER_PAGE_LIMIT, offset: 0 }, controller.signal)
65
+ .then((page) => {
66
+ if (!controller.signal.aborted) {
67
+ setItems(page.items.filter((item) => exclude.current?.(item) !== true));
68
+ setMore(page.more);
69
+ setActive(-1);
70
+ setLoading(false);
71
+ }
72
+ })
73
+ .catch(() => {
74
+ if (!controller.signal.aborted) {
75
+ setItems([]);
76
+ setMore(false);
77
+ setLoading(false);
78
+ }
79
+ });
80
+ }, query === "" ? 0 : SEARCH_DELAY_MS);
81
+ return () => {
82
+ clearTimeout(timer);
83
+ controller.abort();
84
+ };
85
+ }, [open, query]);
86
+ /** The next page of the same words, put under the ones shown; dropped when the words moved on. */
87
+ const loadMore = () => {
88
+ const wanted = query;
89
+ setLoading(true);
90
+ search
91
+ .current(wanted, { limit: PICKER_PAGE_LIMIT, offset: items.length }, new AbortController().signal)
92
+ .then((page) => {
93
+ if (wanted !== latest.current) {
94
+ return;
95
+ }
96
+ setItems((current) => [
97
+ ...current,
98
+ ...page.items.filter((item) => exclude.current?.(item) !== true),
99
+ ]);
100
+ setMore(page.more);
101
+ setLoading(false);
102
+ })
103
+ .catch(() => {
104
+ if (wanted === latest.current) {
105
+ setMore(false);
106
+ setLoading(false);
107
+ }
108
+ });
109
+ };
110
+ const choose = (item) => {
111
+ props.onChange(item);
112
+ setQuery("");
113
+ setOpen(false);
114
+ };
115
+ const onKeyDown = (event) => {
116
+ if (event.key === "ArrowDown") {
117
+ event.preventDefault();
118
+ if (!open) {
119
+ setOpen(true);
120
+ return;
121
+ }
122
+ setActive((current) => (items.length === 0 ? -1 : (current + 1) % items.length));
123
+ }
124
+ else if (event.key === "ArrowUp") {
125
+ event.preventDefault();
126
+ setActive((current) => items.length === 0 ? -1 : current <= 0 ? items.length - 1 : current - 1);
127
+ }
128
+ else if (event.key === "Enter") {
129
+ // A choice, or nothing: the form around the field is never sent by this key.
130
+ event.preventDefault();
131
+ const chosen = active >= 0 ? items[active] : undefined;
132
+ if (chosen !== undefined) {
133
+ choose(chosen);
134
+ }
135
+ }
136
+ else if (event.key === "Escape" && open) {
137
+ event.preventDefault();
138
+ setOpen(false);
139
+ }
140
+ };
141
+ if (props.value !== undefined || props.held !== undefined) {
142
+ return (_jsxs("div", { className: "sc-picker sc-picker-chosen", children: [_jsx("span", { className: "sc-picker-value", children: props.value === undefined ? props.held : props.render(props.value) }), _jsx("button", { type: "button", className: "sc-picker-clear", "aria-label": words.remove, disabled: props.disabled, onClick: () => props.onChange(undefined), children: _jsx("span", { "aria-hidden": "true", children: "\u00D7" }) })] }));
143
+ }
144
+ return (_jsxs("div", { className: "sc-picker", children: [_jsx("input", { ref: field, className: "sc-input", type: "text", role: "combobox", "aria-label": props.label, "aria-expanded": open, "aria-controls": listId, "aria-autocomplete": "list", "aria-activedescendant": active >= 0 ? `${listId}-${active}` : undefined, autoComplete: "off", placeholder: props.placeholder, value: query, disabled: props.disabled, onChange: (event) => {
145
+ setQuery(event.target.value);
146
+ setOpen(true);
147
+ }, onFocus: () => setOpen(true), onBlur: () => setOpen(false), onKeyDown: onKeyDown }), open && (_jsxs("div", { ref: list, className: cx("sc-picker-list", above && "sc-picker-list-above"), id: listId, role: "listbox", "aria-label": props.label, children: [items.map((item, index) => (_jsx("div", { id: `${listId}-${index}`, role: "option", tabIndex: -1, "aria-selected": index === active, className: cx("sc-picker-option", index === active && "sc-picker-option-active"), onMouseDown: (event) => {
148
+ event.preventDefault();
149
+ choose(item);
150
+ }, onMouseEnter: () => setActive(index), children: props.render(item) }, props.keyOf(item)))), !loading && items.length === 0 && (_jsx("div", { className: "sc-picker-note sc-muted", children: words.picker.nothingFound })), loading && _jsx("div", { className: "sc-picker-note sc-muted", children: words.picker.searching }), more && !loading && (_jsx("div", { className: "sc-picker-note", children: _jsx("button", { type: "button", className: "sc-button sc-button-ghost sc-button-sm", onMouseDown: (event) => {
151
+ event.preventDefault();
152
+ loadMore();
153
+ }, children: words.picker.more }) }))] }))] }));
154
+ }
155
+ //# sourceMappingUR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CAAC,cAAc,EAAE,CAAC;gCACvB,QAAQ,EAAE,CAAC;4BACb,CAAC,YAEA,KAAK,CAAC,MAAM,CAAC,IAAI,GACX,GACL,CACP,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -1,18 +1,32 @@
1
+ import { type ReactNode } from "react";
1
2
  import { type RestCategory, type RestGoal, type RestPerson, type RestTask, type RestTaskInput } from "../api.js";
3
+ import { type PickerSearch } from "./picker.js";
4
+ /** What words find among the tasks of the project, a page at a time. */
5
+ export type TaskSearch = PickerSearch<RestTask>;
6
+ /** What words find among the open goals of the project, a page at a time. */
7
+ export type GoalSearch = PickerSearch<RestGoal>;
2
8
  export interface TaskFormProps {
3
9
  readonly people: readonly RestPerson[];
4
10
  /** The task to change; left out, the form writes a new one. */
5
11
  readonly task?: RestTask | undefined;
6
- /** The tasks a new one may be part of. */
7
- readonly parents?: readonly RestTask[] | undefined;
12
+ /** The task this one is part of, as it stands, for the form to show it; the search finds another. */
13
+ readonly parent?: RestTask | undefined;
14
+ /** Left out, a task cannot be made part of one here. */
15
+ readonly findTasks?: TaskSearch | undefined;
8
16
  /** The categories of the workspace, to sort the task into one. */
9
17
  readonly categories?: readonly RestCategory[] | undefined;
10
- /** The goals of the project, for the task to work towards one. */
11
- readonly goals?: readonly RestGoal[] | undefined;
18
+ /** The goal the task works towards, as it stands, for the form to show it; the search finds another. */
19
+ readonly goal?: RestGoal | undefined;
20
+ /** Left out, no goal is offered. */
21
+ readonly findGoals?: GoalSearch | undefined;
12
22
  readonly busy?: boolean | undefined;
13
23
  readonly error?: string | undefined;
14
24
  readonly onSubmit: (input: RestTaskInput) => void;
15
25
  readonly onCancel?: (() => void) | undefined;
16
26
  }
27
+ /** A task as a picker names one: its number and its title, with its state. */
28
+ export declare function taskLabel(task: RestTask): ReactNode;
29
+ /** A goal as a picker names one: its title, with its state. */
30
+ export declare function goalLabel(goal: RestGoal): ReactNode;
17
31
  export declare function TaskForm(props: TaskFormProps): import("react").JSX.Element;
18
32
  //# sourceMappingURL=task-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-form.d.ts","sourceRoot":"","sources":["../../src/components/task-form.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,aAAa,EAGnB,MAAM,WAAW,CAAC;AAQnB,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC;IACnD,kEAAkE;IAClE,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC1D,kEAAkE;IAClE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CAC9C;AAOD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAuQ5C"}
1
+ {"version":3,"file":"task-form.d.ts","sourceRoot":"","sources":["../../src/components/task-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AACjE,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,QAAQ,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,GAAG,SAAS,CAMnD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BA8T5C"}
@@ -1,8 +1,17 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { MAX_BODY_LENGTH, MAX_LINK_LABEL_LENGTH, MAX_LINKS, MAX_TITLE_LENGTH, MAX_URL_LENGTH, TASK_PRIORITIES, TASK_STATES, } from "../api.js";
3
+ import { MAX_BODY_LENGTH, MAX_LINK_LABEL_LENGTH, MAX_LINKS, MAX_TITLE_LENGTH, MAX_URL_LENGTH, MAX_WORKERS, TASK_PRIORITIES, TASK_STATES, } from "../api.js";
4
4
  import { useWords } from "../i18n/index.js";
5
- import { Button, personName } from "./ui.js";
5
+ import { Picker } from "./picker.js";
6
+ import { Button, GoalStateBadge, PersonChip, personName, StateBadge } from "./ui.js";
7
+ /** A task as a picker names one: its number and its title, with its state. */
8
+ export function taskLabel(task) {
9
+ return (_jsxs(_Fragment, { children: [_jsxs("span", { className: "sc-card-number", children: ["#", task.number] }), " ", task.title, " ", _jsx(StateBadge, { state: task.state })] }));
10
+ }
11
+ /** A goal as a picker names one: its title, with its state. */
12
+ export function goalLabel(goal) {
13
+ return (_jsxs(_Fragment, { children: [goal.title, " ", _jsx(GoalStateBadge, { state: goal.state })] }));
14
+ }
6
15
  export function TaskForm(props) {
7
16
  const words = useWords();
8
17
  const form = words.task.form;
@@ -11,10 +20,14 @@ export function TaskForm(props) {
11
20
  const [body, setBody] = useState(task?.body ?? "");
12
21
  const [state, setState] = useState(task?.state ?? "idea");
13
22
  const [priority, setPriority] = useState(task?.priority ?? "normal");
14
- const [assigneeId, setAssigneeId] = useState(task?.assignee?.id ?? "");
15
- const [parentId, setParentId] = useState(task?.parentId ?? "");
23
+ const [workerIds, setWorkerIds] = useState(task?.workers.map((worker) => worker.id) ?? []);
24
+ // What is chosen is kept by id, so that a parent or a goal the page has not read back yet is
25
+ // kept as it is rather than dropped; the one chosen here is kept whole, to be shown.
26
+ const [parentId, setParentId] = useState(task?.parentId ?? null);
27
+ const [parentChosen, setParentChosen] = useState(undefined);
28
+ const [goalId, setGoalId] = useState(task?.goalId ?? null);
29
+ const [goalChosen, setGoalChosen] = useState(undefined);
16
30
  const [category, setCategory] = useState(task?.category?.key ?? "");
17
- const [goalId, setGoalId] = useState(task?.goalId ?? "");
18
31
  const [startsOn, setStartsOn] = useState(task?.startsOn ?? "");
19
32
  const [dueOn, setDueOn] = useState(task?.dueOn ?? "");
20
33
  const [links, setLinks] = useState(task?.links.map((link) => ({ url: link.url, label: link.label ?? "" })) ?? []);
@@ -25,10 +38,10 @@ export function TaskForm(props) {
25
38
  body,
26
39
  state,
27
40
  priority,
28
- assigneeId: assigneeId === "" ? null : assigneeId,
29
- parentId: parentId === "" ? null : parentId,
41
+ workerIds: [...workerIds],
42
+ parentId,
30
43
  category: category === "" ? null : category,
31
- goalId: goalId === "" ? null : goalId,
44
+ goalId,
32
45
  startsOn: startsOn === "" ? null : startsOn,
33
46
  dueOn: dueOn === "" ? null : dueOn,
34
47
  links: links
@@ -39,11 +52,41 @@ export function TaskForm(props) {
39
52
  })),
40
53
  });
41
54
  };
42
- const parents = (props.parents ?? []).filter((candidate) => candidate.id !== task?.id);
55
+ // A worker is one of the people, or one the task had who is no longer among them.
56
+ const personOf = (id) => props.people.find((person) => person.id === id) ??
57
+ task?.workers.find((worker) => worker.id === id);
58
+ const chosenWorkers = workerIds.flatMap((id) => {
59
+ const person = personOf(id);
60
+ return person === undefined ? [] : [person];
61
+ });
62
+ const otherPeople = props.people.filter((person) => !workerIds.includes(person.id));
63
+ const parent = parentId === null
64
+ ? undefined
65
+ : parentChosen?.id === parentId
66
+ ? parentChosen
67
+ : props.parent?.id === parentId
68
+ ? props.parent
69
+ : undefined;
70
+ const goal = goalId === null
71
+ ? undefined
72
+ : goalChosen?.id === goalId
73
+ ? goalChosen
74
+ : props.goal?.id === goalId
75
+ ? props.goal
76
+ : undefined;
77
+ const held = _jsx("span", { className: "sc-muted", children: "\u2026" });
43
78
  const categories = props.categories ?? [];
44
- // A goal let go is not offered, unless the task is on it already.
45
- const goals = (props.goals ?? []).filter((goal) => goal.state !== "dropped" || goal.id === task?.goalId);
46
79
  const datesInOrder = startsOn === "" || dueOn === "" || startsOn <= dueOn;
47
- return (_jsxs("form", { className: "sc-form", onSubmit: submit, children: [_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.title }), _jsx("input", { className: "sc-input", value: title, placeholder: form.titlePlaceholder, maxLength: MAX_TITLE_LENGTH, required: true, onChange: (event) => setTitle(event.target.value) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.body }), _jsx("textarea", { className: "sc-input sc-textarea", value: body, maxLength: MAX_BODY_LENGTH, rows: 6, placeholder: form.bodyPlaceholder, onChange: (event) => setBody(event.target.value) })] }), _jsxs("div", { className: "sc-field-row", children: [_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.state }), _jsx("select", { className: "sc-input", value: state, onChange: (event) => setState(event.target.value), children: TASK_STATES.map((candidate) => (_jsx("option", { value: candidate, children: words.vocabulary.state[candidate] }, candidate))) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.priority }), _jsx("select", { className: "sc-input", value: priority, onChange: (event) => setPriority(event.target.value), children: TASK_PRIORITIES.map((candidate) => (_jsx("option", { value: candidate, children: words.vocabulary.priority[candidate] }, candidate))) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.assignee }), _jsxs("select", { className: "sc-input", value: assigneeId, onChange: (event) => setAssigneeId(event.target.value), children: [_jsx("option", { value: "", children: words.common.nobody }), props.people.map((person) => (_jsx("option", { value: person.id, children: personName(person) }, person.id)))] })] }), categories.length > 0 && (_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.category }), _jsxs("select", { className: "sc-input", value: category, onChange: (event) => setCategory(event.target.value), children: [_jsx("option", { value: "", children: form.noCategory }), categories.map((candidate) => (_jsx("option", { value: candidate.key, children: candidate.name }, candidate.key)))] })] }))] }), _jsxs("div", { className: "sc-field-row", children: [_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.startsOn }), _jsx("input", { className: "sc-input", type: "date", value: startsOn, onChange: (event) => setStartsOn(event.target.value) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.dueOn }), _jsx("input", { className: "sc-input", type: "date", value: dueOn, min: startsOn === "" ? undefined : startsOn, onChange: (event) => setDueOn(event.target.value) })] }), goals.length > 0 && (_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.goal }), _jsxs("select", { className: "sc-input", value: goalId, onChange: (event) => setGoalId(event.target.value), children: [_jsx("option", { value: "", children: form.noGoal }), goals.map((goal) => (_jsx("option", { value: goal.id, children: goal.title }, goal.id)))] })] })), parents.length > 0 && (_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.partOf }), _jsxs("select", { className: "sc-input", value: parentId, onChange: (event) => setParentId(event.target.value), children: [_jsx("option", { value: "", children: words.common.nothing }), parents.map((candidate) => (_jsxs("option", { value: candidate.id, children: ["#", candidate.number, " ", candidate.title] }, candidate.id)))] })] }))] }), _jsxs("fieldset", { className: "sc-field sc-links", children: [_jsx("legend", { className: "sc-field-label", children: form.links }), links.map((link, index) => (_jsxs("div", { className: "sc-link-row", children: [_jsx("input", { className: "sc-input", type: "url", placeholder: "https://", pattern: "https://.*", maxLength: MAX_URL_LENGTH, value: link.url, onChange: (event) => setLinks(links.map((entry, at) => at === index ? { ...entry, url: event.target.value } : entry)) }), _jsx("input", { className: "sc-input", placeholder: form.label, maxLength: MAX_LINK_LABEL_LENGTH, value: link.label, onChange: (event) => setLinks(links.map((entry, at) => at === index ? { ...entry, label: event.target.value } : entry)) }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setLinks(links.filter((_, at) => at !== index)), children: words.common.remove })] }, index))), links.length < MAX_LINKS && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setLinks([...links, { url: "", label: "" }]), children: form.addLink }))] }), props.error !== undefined && (_jsx("p", { className: "sc-form-error", role: "alert", children: props.error })), _jsxs("div", { className: "sc-form-actions", children: [_jsx(Button, { type: "submit", variant: "primary", disabled: props.busy === true || title.trim() === "" || !datesInOrder, children: task === undefined ? form.write : words.common.save }), props.onCancel !== undefined && (_jsx(Button, { variant: "ghost", onClick: props.onCancel, children: words.common.cancel }))] })] }));
80
+ return (_jsxs("form", { className: "sc-form", onSubmit: submit, children: [_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.title }), _jsx("input", { className: "sc-input", value: title, placeholder: form.titlePlaceholder, maxLength: MAX_TITLE_LENGTH, required: true, onChange: (event) => setTitle(event.target.value) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.body }), _jsx("textarea", { className: "sc-input sc-textarea", value: body, maxLength: MAX_BODY_LENGTH, rows: 6, placeholder: form.bodyPlaceholder, onChange: (event) => setBody(event.target.value) })] }), _jsxs("div", { className: "sc-field-row", children: [_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.state }), _jsx("select", { className: "sc-input", value: state, onChange: (event) => setState(event.target.value), children: TASK_STATES.map((candidate) => (_jsx("option", { value: candidate, children: words.vocabulary.state[candidate] }, candidate))) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.priority }), _jsx("select", { className: "sc-input", value: priority, onChange: (event) => setPriority(event.target.value), children: TASK_PRIORITIES.map((candidate) => (_jsx("option", { value: candidate, children: words.vocabulary.priority[candidate] }, candidate))) })] }), categories.length > 0 && (_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.category }), _jsxs("select", { className: "sc-input", value: category, onChange: (event) => setCategory(event.target.value), children: [_jsx("option", { value: "", children: form.noCategory }), categories.map((candidate) => (_jsx("option", { value: candidate.key, children: candidate.name }, candidate.key)))] })] }))] }), _jsxs("fieldset", { className: "sc-field sc-workers-field", children: [_jsx("legend", { className: "sc-field-label", children: form.workers }), _jsxs("div", { className: "sc-chips", children: [chosenWorkers.map((person) => (_jsxs("span", { className: "sc-chip", children: [_jsx(PersonChip, { person: person }), _jsx("button", { type: "button", className: "sc-chip-remove", "aria-label": `${words.common.remove}: ${personName(person)}`, onClick: () => setWorkerIds(workerIds.filter((id) => id !== person.id)), children: _jsx("span", { "aria-hidden": "true", children: "\u00D7" }) })] }, person.id))), chosenWorkers.length === 0 && _jsx("span", { className: "sc-muted", children: words.common.nobody }), otherPeople.length > 0 && workerIds.length < MAX_WORKERS && (_jsxs("select", { className: "sc-input sc-chip-add", "aria-label": form.addWorker, value: "", onChange: (event) => {
81
+ if (event.target.value !== "") {
82
+ setWorkerIds([...workerIds, event.target.value]);
83
+ }
84
+ }, children: [_jsx("option", { value: "", children: form.addWorker }), otherPeople.map((person) => (_jsx("option", { value: person.id, children: personName(person) }, person.id)))] }))] })] }), _jsxs("div", { className: "sc-field-row", children: [_jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.startsOn }), _jsx("input", { className: "sc-input", type: "date", value: startsOn, onChange: (event) => setStartsOn(event.target.value) })] }), _jsxs("label", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.dueOn }), _jsx("input", { className: "sc-input", type: "date", value: dueOn, min: startsOn === "" ? undefined : startsOn, onChange: (event) => setDueOn(event.target.value) })] }), props.findGoals !== undefined && (_jsxs("div", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.goal }), _jsx(Picker, { value: goal, held: goalId === null ? undefined : held, search: props.findGoals, keyOf: (candidate) => candidate.id, render: goalLabel, label: form.goal, placeholder: form.searchGoals, disabled: props.busy, onChange: (chosen) => {
85
+ setGoalChosen(chosen);
86
+ setGoalId(chosen?.id ?? null);
87
+ } })] })), props.findTasks !== undefined && (_jsxs("div", { className: "sc-field", children: [_jsx("span", { className: "sc-field-label", children: form.partOf }), _jsx(Picker, { value: parent, held: parentId === null ? undefined : held, search: props.findTasks, keyOf: (candidate) => candidate.id, render: taskLabel, label: form.partOf, placeholder: form.searchTasks, disabled: props.busy, exclude: (candidate) => candidate.id === task?.id, onChange: (chosen) => {
88
+ setParentChosen(chosen);
89
+ setParentId(chosen?.id ?? null);
90
+ } })] }))] }), _jsxs("fieldset", { className: "sc-field sc-links", children: [_jsx("legend", { className: "sc-field-label", children: form.links }), links.map((link, index) => (_jsxs("div", { className: "sc-link-row", children: [_jsx("input", { className: "sc-input", type: "url", placeholder: "https://", pattern: "https://.*", maxLength: MAX_URL_LENGTH, value: link.url, onChange: (event) => setLinks(links.map((entry, at) => at === index ? { ...entry, url: event.target.value } : entry)) }), _jsx("input", { className: "sc-input", placeholder: form.label, maxLength: MAX_LINK_LABEL_LENGTH, value: link.label, onChange: (event) => setLinks(links.map((entry, at) => at === index ? { ...entry, label: event.target.value } : entry)) }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setLinks(links.filter((_, at) => at !== index)), children: words.common.remove })] }, index))), links.length < MAX_LINKS && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setLinks([...links, { url: "", label: "" }]), children: form.addLink }))] }), props.error !== undefined && (_jsx("p", { className: "sc-form-error", role: "alert", children: props.error })), _jsxs("div", { className: "sc-form-actions", children: [_jsx(Button, { type: "submit", variant: "primary", disabled: props.busy === true || title.trim() === "" || !datesInOrder, children: task === undefined ? form.write : words.common.save }), props.onCancel !== undefined && (_jsx(Button, { variant: "ghost", onClick: props.onCancel, children: words.common.cancel }))] })] }));
48
91
  }
49
92
  //# sourceMappingURL=task-form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-form.js","sourceRoot":"","sources":["../../src/components/task-form.tsx"],"names":[],"mappings":";AAAA,OAA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s as _jsxs } from "react/jsx-runtime";
2
2
  import { useWords } from "../i18n/index.js";
3
3
  import { ShowMore, usePaged } from "./paged.js";
4
- import { Avatar, Badge, CategoryBadge, DueBadge, StateBadge } from "./ui.js";
4
+ import { Badge, CategoryBadge, DueBadge, StateBadge, Workers } from "./ui.js";
5
5
  export function TaskList(props) {
6
6
  const words = useWords();
7
7
  const { shown, rest, more } = usePaged(props.tasks);
@@ -10,7 +10,7 @@ export function TaskList(props) {
10
10
  }
11
11
  return (_jsxs(_Fragment, { children: [_jsx("ul", { className: "sc-task-rows", "aria-label": props.label, children: shown.map((task) => {
12
12
  const project = props.projectOf?.(task);
13
- return (_jsxs("li", { className: "sc-task-row", children: [_jsxs("a", { className: "sc-task-row-title", href: props.taskHref(task), children: [_jsxs("span", { className: "sc-card-number", children: ["#", task.number] }), " ", task.title] }), project !== undefined && project !== null && (_jsx("span", { className: "sc-task-row-project", children: project })), _jsxs("span", { className: "sc-task-row-meta", children: [task.category !== null && _jsx(CategoryBadge, { category: task.category }), props.showState === true && _jsx(StateBadge, { state: task.state }), task.openDecisions > 0 && (_jsx(Badge, { tone: "warning", title: words.board.decisionsTitle, children: words.board.decisions(task.openDecisions) })), task.dueOn !== null && (_jsx(DueBadge, { dueOn: task.dueOn, state: task.state, today: props.today })), task.assignee !== null && _jsx(Avatar, { person: task.assignee, size: "sm" })] })] }, task.id));
13
+ return (_jsxs("li", { className: "sc-task-row", children: [_jsxs("a", { className: "sc-task-row-title", href: props.taskHref(task), children: [_jsxs("span", { className: "sc-card-number", children: ["#", task.number] }), " ", task.title] }), project !== undefined && project !== null && (_jsx("span", { className: "sc-task-row-project", children: project })), _jsxs("span", { className: "sc-task-row-meta", children: [task.category !== null && _jsx(CategoryBadge, { category: task.category }), props.showState === true && _jsx(StateBadge, { state: task.state }), task.openDecisions > 0 && (_jsx(Badge, { tone: "warning", title: words.board.decisionsTitle, children: words.board.decisions(task.openDecisions) })), task.dueOn !== null && (_jsx(DueBadge, { dueOn: task.dueOn, state: task.state, today: props.today })), _jsx(Workers, { workers: task.workers, size: "sm" })] })] }, task.id));
14
14
  }) }), _jsx(ShowMore, { rest: rest, onMore: more })] }));
15
15
  }
16
16
  //# sourceMappingURL=task-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-list.js","sourceRoot":"","sources":["../../src/components/task-list.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAoB7E,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,4BAAG,KAAK,CAAC,KAAK,IAAI,IAAI,GAAI,CAAC;IACpC,CAAC;IACD,OAAO,CACL,8BACE,aAAI,SAAS,EAAC,cAAc,gBAAa,KAAK,CAAC,KAAK,YACjD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;oBAClB,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC;oBACxC,OAAO,CACL,cAAkB,SAAS,EAAC,aAAa,aACvC,aAAG,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,aACzD,gBAAM,SAAS,EAAC,gBAAgB,kBAAG,IAAI,CAAC,MAAM,IAAQ,OAAE,IAAI,CAAC,KAAK,IAChE,EACH,OAAO,KAAK,SAAS,IAAI,OAAO,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EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,cAAc,YACpD,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,GACpC,CACT,EACA,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CACtB,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CACvE,EACD,KAAC,OAAO,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAC,IAAI,GAAG,IACvC,KAnBA,IAAI,CAAC,EAAE,CAoBX,CACN,CAAC;gBACJ,CAAC,CAAC,GACC,EACL,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAI,IACrC,CACJ,CAAC;AACJ,CAAC"}
@@ -1,11 +1,17 @@
1
1
  import type { RestAnswerInput, RestCategory, RestComment, RestDecision, RestDecisionInput, RestDecisionPatch, RestEvent, RestGoal, RestPerson, RestRun, RestTask, RestTaskInput, TaskState } from "../api.js";
2
2
  import type { TaskFormKind } from "../router.js";
3
3
  import { type CommentDraft } from "./comments.js";
4
+ import { type GoalSearch, type TaskSearch } from "./task-form.js";
4
5
  export interface TaskViewProps {
5
6
  readonly task: RestTask;
6
7
  readonly people: readonly RestPerson[];
7
- /** Every task of the board, for the breakdown and for what this one may be part of. */
8
+ /** The current tasks of the board, for the breakdown and for naming what this one is part of. */
8
9
  readonly tasks: readonly RestTask[];
10
+ /** The task this one is part of, when the page has it: one put away is not among `tasks`. Left out, it is looked for among them. */
11
+ readonly parent?: RestTask | undefined;
12
+ /** What words find among the tasks and the open goals of the project, for the form (ADR-0037); left out, the form offers neither. */
13
+ readonly findTasks?: TaskSearch | undefined;
14
+ readonly findGoals?: GoalSearch | undefined;
9
15
  readonly decisions: readonly RestDecision[];
10
16
  /** The runs of the board, or of this task; the ones on this task are shown.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AAC;IACd,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7D,iHAAiH;IACjH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5D,0GAA0G;IAC1G,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAClE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAuS5C"}
@@ -12,9 +12,10 @@ export function TaskView(props) {
12
12
  const words = useWords();
13
13
  const { tag } = useLanguage();
14
14
  const { task } = props;
15
- const parent = task.parentId === null
16
- ? undefined
17
- : props.tasks.find((candidate) => candidate.id === task.parentId);
15
+ const parent = props.parent ??
16
+ (task.parentId === null
17
+ ? undefined
18
+ : props.tasks.find((candidate) => candidate.id === task.parentId));
18
19
  const subtasks = props.tasks.filter((candidate) => candidate.parentId === task.id);
19
20
  const about = props.decisions.filter((decision) => decision.taskId === task.id);
20
21
  const runs = (props.runs ?? []).filter((run) => run.taskId === task.id);
@@ -24,11 +25,11 @@ export function TaskView(props) {
24
25
  : props.goals?.find((candidate) => candidate.id === task.goalId);
25
26
  const day = (value) => formatDay(value, tag);
26
27
  if (props.form === "edit") {
27
- return (_jsxs("div", { className: "sc-task sc-task-editing", children: [_jsxs("h1", { className: "sc-task-title", children: [_jsxs("span", { className: "sc-card-number", children: ["#", task.number] }), " ", task.title] }), _jsx(TaskForm, { people: props.people, task: task, parents: props.tasks, categories: props.categories, goals: props.goals, busy: props.busy, error: props.error, onSubmit: (input) => props.onChange(task, input), onCancel: props.onCancel })] }));
28
+ return (_jsxs("div", { className: "sc-task sc-task-editing", children: [_jsxs("h1", { className: "sc-task-title", children: [_jsxs("span", { className: "sc-card-number", children: ["#", task.number] }), " ", task.title] }), _jsx(TaskForm, { people: props.people, task: task, parent: parent, findTasks: props.findTasks, categories: props.categories, goal: goal, findGoals: props.findGoals, busy: props.busy, error: props.error, onSubmit: (input) => props.onChange(task, input), onCancel: props.onCancel })] }));
28
29
  }
29
30
  return (_jsxs("div", { className: "sc-task", children: [_jsxs("header", { className: "sc-task-header", children: [parent !== undefined && (_jsxs("p", { className: "sc-task-parent", children: [words.task.partOf, " ", _jsxs("a", { href: props.taskHref(parent), children: ["#", parent.number, " ", parent.title] })] })), _jsxs("h1", { className: "sc-task-title", children: [_jsxs("span", { className: "sc-card-number", children: ["#", task.number] }), " ", task.title] }), _jsxs("div", { className: "sc-task-badges", children: [_jsx(StateBadge, { state: task.state }), task.archivedAt !== null && _jsx(Badge, { tone: "neutral", children: words.task.archived }), task.category !== null && _jsx(CategoryBadge, { category: task.category }), _jsx(PriorityBadge, { priority: task.priority }), task.dueOn !== null && (_jsx(DueBadge, { dueOn: task.dueOn, state: task.state, today: props.today }))] })] }), _jsxs("div", { className: "sc-task-body", children: [_jsxs("div", { className: "sc-task-main", children: [props.error !== undefined && (_jsx("p", { className: "sc-form-error", role: "alert", children: props.error })), task.body.length > 0 ? (_jsx(Markdown, { source: task.body, docHref: props.docHref })) : (_jsx("p", { className: "sc-muted", children: words.task.nothingMore })), task.links.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.task.links, children: [_jsx("h2", { className: "sc-section-title", children: words.task.links }), _jsx("ul", { className: "sc-link-list", children: task.links.map((link) => (_jsx("li", { children: _jsx("a", { href: link.url, target: "_blank", rel: "noopener noreferrer nofollow", children: link.label ?? link.url }) }, link.url))) })] })), props.form === "ask" && (_jsxs("section", { className: "sc-task-section", "aria-label": words.task.raiseDecision, children: [_jsx("h2", { className: "sc-section-title", children: words.task.raiseDecision }), _jsx(DecisionForm, { tasks: props.tasks, taskId: task.id, busy: props.busy, onSubmit: props.onRaiseDecision, onCancel: props.onCancel })] })), (runs.length > 0 ||
30
31
  about.length > 0 ||
31
32
  comments.length > 0 ||
32
- props.onComment !== undefined) && (_jsxs("section", { className: "sc-task-section", "aria-label": words.comments.title, children: [_jsx("h2", { className: "sc-section-title", children: words.comments.title }), _jsx(TaskThread, { task: task, comments: comments, runs: runs, decisions: about, fileHref: props.fileHref, decisionHref: props.decisionHref, docHref: props.docHref, onAnswer: props.onAnswer, onUpdateDecision: props.onUpdateDecision, onAbandonRun: props.onAbandonRun, onComment: props.onComment, busy: props.busy, empty: _jsx("p", { className: "sc-muted", children: words.comments.empty }) })] })), props.history !== undefined && props.history.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.task.history, children: [_jsx("h2", { className: "sc-section-title", children: words.task.history }), _jsx(EventFeed, { events: props.history })] })), subtasks.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.task.subtasks, children: [_jsx("h2", { className: "sc-section-title", children: words.task.partOfIt }), _jsx("ul", { className: "sc-subtasks", children: subtasks.map((subtask) => (_jsxs("li", { children: [_jsxs("a", { href: props.taskHref(subtask), children: [_jsxs("span", { className: "sc-card-number", children: ["#", subtask.number] }), " ", subtask.title] }), " ", _jsx(StateBadge, { state: subtask.state })] }, subtask.id))) })] }))] }), _jsxs("aside", { className: "sc-task-aside", "aria-label": words.task.facts, children: [_jsxs("dl", { className: "sc-facts", children: [_jsxs("div", { children: [_jsx("dt", { children: words.task.state }), _jsx("dd", { children: _jsx("select", { className: "sc-input", "aria-label": words.task.state, value: task.state, disabled: props.busy === true, onChange: (event) => props.onMove(task, event.target.value), children: TASK_STATES.map((state) => (_jsx("option", { value: state, children: words.vocabulary.state[state] }, state))) }) })] }), _jsxs("div", { children: [_jsx("dt", { children: words.task.form.priority }), _jsx("dd", { children: words.vocabulary.priority[task.priority] })] }), task.category !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.category }), _jsx("dd", { children: _jsx(CategoryBadge, { category: task.category }) })] })), task.goalId !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.goal }), _jsx("dd", { children: props.goalHref === undefined ? ((goal?.title ?? task.goalId)) : (_jsx("a", { href: props.goalHref(task.goalId), children: goal?.title ?? task.goalId })) })] })), _jsxs("div", { children: [_jsx("dt", { children: words.task.owner }), _jsx("dd", { children: _jsx(PersonChip, { person: task.owner }) })] }), _jsxs("div", { children: [_jsx("dt", { children: words.task.assignee }), _jsx("dd", { children: task.assignee === null ? (_jsx("span", { className: "sc-muted", children: words.common.nobody })) : (_jsx(PersonChip, { person: task.assignee })) })] }), (task.startsOn !== null || task.dueOn !== null) && (_jsxs("div", { children: [_jsx("dt", { children: words.task.plan }), _jsx("dd", { children: words.task.planned(task.startsOn === null ? undefined : day(task.startsOn), task.dueOn === null ? undefined : day(task.dueOn)) })] })), task.startedAt !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.started }), _jsx("dd", { children: _jsx(Time, { iso: task.startedAt }) })] })), task.doneAt !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.done }), _jsx("dd", { children: _jsx(Time, { iso: task.doneAt }) })] })), task.archivedAt !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.archivedAt }), _jsx("dd", { children: _jsx(Time, { iso: task.archivedAt }) })] })), _jsxs("div", { children: [_jsx("dt", { children: words.task.written }), _jsx("dd", { children: _jsx(Time, { iso: task.createdAt }) })] }), _jsxs("div", { children: [_jsx("dt", { children: words.task.changed }), _jsx("dd", { children: _jsx(Time, { iso: task.updatedAt }) })] })] }), props.formHref !== undefined && (_jsxs("div", { className: "sc-task-actions", children: [_jsx("a", { className: "sc-button sc-button-secondary", href: props.formHref("edit"), children: words.common.edit }), _jsx("a", { className: "sc-button sc-button-secondary", href: props.formHref("ask"), children: words.task.raiseDecision }), props.onArchive !== undefined && task.archivedAt === null && (_jsx(Button, { variant: "secondary", disabled: props.busy === true, onClick: () => props.onArchive?.(task), children: words.task.archive })), props.onRestore !== undefined && task.archivedAt !== null && (_jsx(Button, { variant: "secondary", disabled: props.busy === true, onClick: () => props.onRestore?.(task), children: words.task.restore }))] }))] })] })] }));
33
+ props.onComment !== undefined) && (_jsxs("section", { className: "sc-task-section", "aria-label": words.comments.title, children: [_jsx("h2", { className: "sc-section-title", children: words.comments.title }), _jsx(TaskThread, { task: task, comments: comments, runs: runs, decisions: about, fileHref: props.fileHref, decisionHref: props.decisionHref, docHref: props.docHref, onAnswer: props.onAnswer, onUpdateDecision: props.onUpdateDecision, onAbandonRun: props.onAbandonRun, onComment: props.onComment, busy: props.busy, empty: _jsx("p", { className: "sc-muted", children: words.comments.empty }) })] })), props.history !== undefined && props.history.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.task.history, children: [_jsx("h2", { className: "sc-section-title", children: words.task.history }), _jsx(EventFeed, { events: props.history })] })), subtasks.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.task.subtasks, children: [_jsx("h2", { className: "sc-section-title", children: words.task.partOfIt }), _jsx("ul", { className: "sc-subtasks", children: subtasks.map((subtask) => (_jsxs("li", { children: [_jsxs("a", { href: props.taskHref(subtask), children: [_jsxs("span", { className: "sc-card-number", children: ["#", subtask.number] }), " ", subtask.title] }), " ", _jsx(StateBadge, { state: subtask.state })] }, subtask.id))) })] }))] }), _jsxs("aside", { className: "sc-task-aside", "aria-label": words.task.facts, children: [_jsxs("dl", { className: "sc-facts", children: [_jsxs("div", { children: [_jsx("dt", { children: words.task.state }), _jsx("dd", { children: _jsx("select", { className: "sc-input", "aria-label": words.task.state, value: task.state, disabled: props.busy === true, onChange: (event) => props.onMove(task, event.target.value), children: TASK_STATES.map((state) => (_jsx("option", { value: state, children: words.vocabulary.state[state] }, state))) }) })] }), _jsxs("div", { children: [_jsx("dt", { children: words.task.form.priority }), _jsx("dd", { children: words.vocabulary.priority[task.priority] })] }), task.category !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.category }), _jsx("dd", { children: _jsx(CategoryBadge, { category: task.category }) })] })), task.goalId !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.goal }), _jsx("dd", { children: props.goalHref === undefined ? ((goal?.title ?? task.goalId)) : (_jsx("a", { href: props.goalHref(task.goalId), children: goal?.title ?? task.goalId })) })] })), _jsxs("div", { children: [_jsx("dt", { children: words.task.owner }), _jsx("dd", { children: _jsx(PersonChip, { person: task.owner }) })] }), _jsxs("div", { children: [_jsx("dt", { children: words.task.workers }), _jsx("dd", { children: task.workers.length === 0 ? (_jsx("span", { className: "sc-muted", children: words.common.nobody })) : (_jsx("ul", { className: "sc-worker-list", children: task.workers.map((worker) => (_jsx("li", { children: _jsx(PersonChip, { person: worker }) }, worker.id))) })) })] }), (task.startsOn !== null || task.dueOn !== null) && (_jsxs("div", { children: [_jsx("dt", { children: words.task.plan }), _jsx("dd", { children: words.task.planned(task.startsOn === null ? undefined : day(task.startsOn), task.dueOn === null ? undefined : day(task.dueOn)) })] })), task.startedAt !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.started }), _jsx("dd", { children: _jsx(Time, { iso: task.startedAt }) })] })), task.doneAt !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.done }), _jsx("dd", { children: _jsx(Time, { iso: task.doneAt }) })] })), task.archivedAt !== null && (_jsxs("div", { children: [_jsx("dt", { children: words.task.archivedAt }), _jsx("dd", { children: _jsx(Time, { iso: task.archivedAt }) })] })), _jsxs("div", { children: [_jsx("dt", { children: words.task.written }), _jsx("dd", { children: _jsx(Time, { iso: task.createdAt }) })] }), _jsxs("div", { children: [_jsx("dt", { children: words.task.changed }), _jsx("dd", { children: _jsx(Time, { iso: task.updatedAt }) })] })] }), props.formHref !== undefined && (_jsxs("div", { className: "sc-task-actions", children: [_jsx("a", { className: "sc-button sc-button-secondary", href: props.formHref("edit"), children: words.common.edit }), _jsx("a", { className: "sc-button sc-button-secondary", href: props.formHref("ask"), children: words.task.raiseDecision }), props.onArchive !== undefined && task.archivedAt === null && (_jsx(Button, { variant: "secondary", disabled: props.busy === true, onClick: () => props.onArchive?.(task), children: words.task.archive })), props.onRestore !== undefined && task.archivedAt !== null && (_jsx(Button, { variant: "secondary", disabled: props.busy === true, onClick: () => props.onRestore?.(task), children: words.task.restore }))] }))] })] })] }));
33
34
  }
34
35
  //# sourceMappingURL=task-view.js.map