@skillcdn/console 0.4.2 → 0.4.4
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/README.md +4 -4
- package/dist/api.d.ts +3 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +3 -3
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +120 -33
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +4 -2
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +38 -10
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +22 -15
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/plugin-check.d.ts +10 -1
- package/dist/cli/plugin-check.d.ts.map +1 -1
- package/dist/cli/plugin-check.js +45 -4
- package/dist/cli/plugin-check.js.map +1 -1
- package/dist/cli/plugin-cli.d.ts +1 -1
- package/dist/cli/plugin-cli.d.ts.map +1 -1
- package/dist/cli/plugin-cli.js +80 -5
- package/dist/cli/plugin-cli.js.map +1 -1
- package/dist/cli/plugin-init.d.ts +19 -0
- package/dist/cli/plugin-init.d.ts.map +1 -1
- package/dist/cli/plugin-init.js +141 -3
- package/dist/cli/plugin-init.js.map +1 -1
- package/dist/client.d.ts +7 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +18 -5
- package/dist/client.js.map +1 -1
- package/dist/compat.js +1 -1
- package/dist/components/board.d.ts +8 -0
- package/dist/components/board.d.ts.map +1 -1
- package/dist/components/board.js +3 -3
- package/dist/components/board.js.map +1 -1
- package/dist/components/comments.d.ts.map +1 -1
- package/dist/components/comments.js +1 -1
- package/dist/components/comments.js.map +1 -1
- package/dist/components/decision-form.d.ts +8 -1
- package/dist/components/decision-form.d.ts.map +1 -1
- package/dist/components/decision-form.js +57 -7
- package/dist/components/decision-form.js.map +1 -1
- package/dist/components/decision-list.d.ts +9 -1
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +53 -7
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +7 -1
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +2 -2
- package/dist/components/goals.js.map +1 -1
- package/dist/components/home.d.ts +35 -0
- package/dist/components/home.d.ts.map +1 -0
- package/dist/components/home.js +326 -0
- package/dist/components/home.js.map +1 -0
- package/dist/components/my-decisions.d.ts +2 -0
- package/dist/components/my-decisions.d.ts.map +1 -1
- package/dist/components/my-decisions.js +2 -2
- package/dist/components/my-decisions.js.map +1 -1
- package/dist/components/pack-connect.d.ts.map +1 -1
- package/dist/components/pack-connect.js +5 -4
- package/dist/components/pack-connect.js.map +1 -1
- package/dist/components/people.d.ts +2 -0
- package/dist/components/people.d.ts.map +1 -1
- package/dist/components/people.js +15 -2
- package/dist/components/people.js.map +1 -1
- package/dist/components/plugin-frame.d.ts +3 -12
- package/dist/components/plugin-frame.d.ts.map +1 -1
- package/dist/components/plugin-frame.js +53 -20
- package/dist/components/plugin-frame.js.map +1 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +151 -26
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts +0 -8
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +1 -13
- package/dist/components/projects.js.map +1 -1
- package/dist/components/task-view.d.ts +2 -1
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +2 -1
- package/dist/components/task-view.js.map +1 -1
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +5 -2
- package/dist/components/ui.js.map +1 -1
- package/dist/connect-page.d.ts.map +1 -1
- package/dist/connect-page.js +5 -6
- package/dist/connect-page.js.map +1 -1
- package/dist/console.css +764 -192
- package/dist/console.d.ts +10 -3
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +49 -28
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +6 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +31 -7
- package/dist/data.js.map +1 -1
- package/dist/docs-page.d.ts.map +1 -1
- package/dist/docs-page.js +6 -5
- package/dist/docs-page.js.map +1 -1
- package/dist/home-tiles.d.ts +92 -0
- package/dist/home-tiles.d.ts.map +1 -0
- package/dist/home-tiles.js +294 -0
- package/dist/home-tiles.js.map +1 -0
- package/dist/i18n/en.d.ts +180 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +181 -1
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/index.d.ts +4 -2
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +10 -11
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +176 -3
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +8 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +8 -0
- package/dist/limits.js.map +1 -1
- package/dist/plugin/bridge.d.ts +44 -3
- package/dist/plugin/bridge.d.ts.map +1 -1
- package/dist/plugin/bridge.js +26 -0
- package/dist/plugin/bridge.js.map +1 -1
- package/dist/plugin/capabilities.d.ts +7 -1
- package/dist/plugin/capabilities.d.ts.map +1 -1
- package/dist/plugin/capabilities.js +14 -1
- package/dist/plugin/capabilities.js.map +1 -1
- package/dist/plugin/context.d.ts +24 -1
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/define.d.ts +1 -0
- package/dist/plugin/define.d.ts.map +1 -1
- package/dist/plugin/define.js +1 -1
- package/dist/plugin/define.js.map +1 -1
- package/dist/plugin/limits.d.ts +5 -2
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +5 -2
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +83 -6
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +111 -7
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +76 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +23 -2
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/sandbox.d.ts +4 -3
- package/dist/plugin/sandbox.d.ts.map +1 -1
- package/dist/plugin/sandbox.js +33 -6
- package/dist/plugin/sandbox.js.map +1 -1
- package/dist/plugin/semver.d.ts +26 -0
- package/dist/plugin/semver.d.ts.map +1 -0
- package/dist/plugin/semver.js +76 -0
- package/dist/plugin/semver.js.map +1 -0
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +2 -1
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin/web.d.ts +10 -1
- package/dist/plugin/web.d.ts.map +1 -1
- package/dist/plugin/web.js +34 -0
- package/dist/plugin/web.js.map +1 -1
- package/dist/plugin.d.ts +3 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +3 -2
- package/dist/plugin.js.map +1 -1
- package/dist/rules.d.ts +2 -2
- package/dist/rules.js +3 -3
- package/dist/schemas.d.ts +574 -11
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +154 -25
- package/dist/schemas.js.map +1 -1
- package/dist/use-action.d.ts +8 -2
- package/dist/use-action.d.ts.map +1 -1
- package/dist/use-action.js +13 -6
- package/dist/use-action.js.map +1 -1
- package/dist/vocabulary.d.ts +3 -1
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +3 -0
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +4 -3
- package/docs/specs/plugins.md +49 -35
- package/docs/specs/rest.md +20 -18
- package/package.json +7 -7
- package/skills/building-a-plugin/SKILL.md +10 -9
- package/skills/planning-the-board/references/setting-up.md +2 -1
- package/skills/working-the-board/SKILL.md +3 -3
- package/src/api.ts +10 -0
- package/src/cli/cli.ts +162 -39
- package/src/cli/format.ts +54 -10
- package/src/cli/help.ts +23 -14
- package/src/cli/plugin-check.ts +68 -2
- package/src/cli/plugin-cli.ts +104 -6
- package/src/cli/plugin-init.ts +178 -3
- package/src/client.ts +36 -9
- package/src/compat.ts +1 -1
- package/src/components/board.tsx +3 -3
- package/src/components/comments.tsx +1 -0
- package/src/components/decision-form.tsx +166 -29
- package/src/components/decision-list.tsx +116 -15
- package/src/components/event-feed.tsx +7 -1
- package/src/components/goals.tsx +4 -1
- package/src/components/home.tsx +615 -0
- package/src/components/my-decisions.tsx +4 -1
- package/src/components/pack-connect.tsx +5 -4
- package/src/components/people.tsx +136 -54
- package/src/components/plugin-frame.tsx +62 -63
- package/src/components/plugin-settings.tsx +428 -87
- package/src/components/projects.tsx +0 -55
- package/src/components/task-view.tsx +9 -1
- package/src/components/ui.tsx +6 -2
- package/src/connect-page.tsx +5 -6
- package/src/console.tsx +98 -42
- package/src/data.ts +41 -11
- package/src/docs-page.tsx +6 -5
- package/src/home-tiles.ts +438 -0
- package/src/i18n/en.ts +185 -0
- package/src/i18n/index.ts +17 -14
- package/src/i18n/ko.ts +181 -3
- package/src/index.ts +7 -5
- package/src/limits.ts +8 -0
- package/src/plugin/bridge.ts +77 -1
- package/src/plugin/capabilities.ts +17 -1
- package/src/plugin/context.ts +24 -2
- package/src/plugin/define.ts +4 -1
- package/src/plugin/limits.ts +5 -2
- package/src/plugin/manifest.ts +154 -10
- package/src/plugin/rest-schemas.ts +27 -1
- package/src/plugin/sandbox.ts +36 -8
- package/src/plugin/semver.ts +89 -0
- package/src/plugin/testing.ts +2 -1
- package/src/plugin/web.ts +49 -0
- package/src/plugin.ts +18 -0
- package/src/rules.ts +3 -3
- package/src/schemas.ts +190 -28
- package/src/styles/console.css +764 -192
- package/src/use-action.ts +16 -7
- package/src/vocabulary.ts +4 -0
- package/template/plugin/console-plugin.json +3 -1
- package/template/plugin/package.json +3 -3
package/dist/console.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
-
import { type ConsoleClient, type RestProject } from "./api.js";
|
|
2
|
+
import { type ConsoleClient, type RestMe, type RestProject } from "./api.js";
|
|
3
3
|
import { type BoardProps } from "./components/board.js";
|
|
4
4
|
import { type CalendarProps } from "./components/calendar.js";
|
|
5
5
|
import { type CategoryListProps } from "./components/categories.js";
|
|
6
6
|
import { type DecisionListProps } from "./components/decision-list.js";
|
|
7
7
|
import { type EventFeedProps } from "./components/event-feed.js";
|
|
8
8
|
import { type GoalListProps } from "./components/goals.js";
|
|
9
|
+
import { type HomeGridProps } from "./components/home.js";
|
|
9
10
|
import { type PeopleListProps } from "./components/people.js";
|
|
10
|
-
import { type MemberListProps
|
|
11
|
+
import { type MemberListProps } from "./components/projects.js";
|
|
11
12
|
import { type Brand, type ShellProps } from "./components/shell.js";
|
|
12
13
|
import { type SignInProps } from "./components/sign-in.js";
|
|
13
14
|
import { type SkillListProps } from "./components/skills.js";
|
|
@@ -28,7 +29,7 @@ export interface ConsoleComponents {
|
|
|
28
29
|
readonly TokenList: ComponentType<TokenListProps>;
|
|
29
30
|
readonly PeopleList: ComponentType<PeopleListProps>;
|
|
30
31
|
readonly SkillList: ComponentType<SkillListProps>;
|
|
31
|
-
readonly
|
|
32
|
+
readonly HomeGrid: ComponentType<HomeGridProps>;
|
|
32
33
|
readonly MemberList: ComponentType<MemberListProps>;
|
|
33
34
|
readonly Calendar: ComponentType<CalendarProps>;
|
|
34
35
|
readonly GoalList: ComponentType<GoalListProps>;
|
|
@@ -91,6 +92,12 @@ export interface ConsoleApp {
|
|
|
91
92
|
/** Renders the console into `container`. Returns the way to take it down again. */
|
|
92
93
|
mount(container: Element): () => void;
|
|
93
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* The language to keep for a person the pages see for the first time (ADR-0065): the one their
|
|
97
|
+
* browser asks for, so that a plugin or an agent can write for them while they are away. Nothing
|
|
98
|
+
* for a person who has a language, for nobody, and where the pages only fall back on a language.
|
|
99
|
+
*/
|
|
100
|
+
export declare function languageToKeep(me: RestMe | undefined, browser: readonly string[], packs: readonly LanguagePack[]): string | undefined;
|
|
94
101
|
/**
|
|
95
102
|
* The pages a console that holds a token does not offer: the tokens themselves, and the
|
|
96
103
|
* approval of an agent's connection, which makes one; a person's own doing on the console's
|
package/dist/console.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,KAAK,aAAa,EAYlB,KAAK,MAAM,EAGX,KAAK,WAAW,EAcjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAuB,KAAK,UAAU,EAAsB,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAY,KAAK,aAAa,EAAY,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGlF,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAsB,KAAK,aAAa,EAAuB,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIpE,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGvF,OAAO,EA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OpD;AAqpED,wBAAgB,aAAa,CAAC,MAAM,GAAE,aAAkB,GAAG,UAAU,CAwXpE"}
|
package/dist/console.js
CHANGED
|
@@ -10,13 +10,14 @@ import { DecisionForm } from "./components/decision-form.js";
|
|
|
10
10
|
import { DecisionCard, DecisionList } from "./components/decision-list.js";
|
|
11
11
|
import { EventFeed } from "./components/event-feed.js";
|
|
12
12
|
import { GoalForm, GoalList, GoalView, goalMonth } from "./components/goals.js";
|
|
13
|
+
import { HomeGrid } from "./components/home.js";
|
|
13
14
|
import { MyDecisions } from "./components/my-decisions.js";
|
|
14
15
|
import { PackTokenWays } from "./components/pack-token.js";
|
|
15
16
|
import { PAGE_SIZE } from "./components/paged.js";
|
|
16
17
|
import { ListingForm, PeopleList } from "./components/people.js";
|
|
17
|
-
import { PluginFrame
|
|
18
|
+
import { PluginFrame } from "./components/plugin-frame.js";
|
|
18
19
|
import { PluginSettingsList, PluginSettingsView } from "./components/plugin-settings.js";
|
|
19
|
-
import { MemberList, ProjectForm,
|
|
20
|
+
import { MemberList, ProjectForm, ProjectMark, } from "./components/projects.js";
|
|
20
21
|
import { RemotePicturesContext } from "./components/remote-pictures.js";
|
|
21
22
|
import { GoalTimeline } from "./components/roadmap.js";
|
|
22
23
|
import { RulesForm, RulesView } from "./components/rules.js";
|
|
@@ -34,7 +35,7 @@ import { ConnectPage } from "./connect-page.js";
|
|
|
34
35
|
import { useConsoleData } from "./data.js";
|
|
35
36
|
import { monthOf, today } from "./dates.js";
|
|
36
37
|
import { DocsPage } from "./docs-page.js";
|
|
37
|
-
import { chooseLanguage, DEFAULT_LANGUAGES, LanguageContext, useWords, } from "./i18n/index.js";
|
|
38
|
+
import { browserPack, chooseLanguage, DEFAULT_LANGUAGES, LanguageContext, useWords, } from "./i18n/index.js";
|
|
38
39
|
import { pluginNavItems, pluginPagesAt, pluginWordOf } from "./plugin-nav.js";
|
|
39
40
|
import { boardHref, calendarHref, customPageHref, decisionHref, decisionsHref, docHref, goalHref, matchRoute, newDecisionHref, newGoalHref, newTaskHref, PATHS, personAgentsHref, personWorkHref, pluginHref, pluginSettingsHref, projectHref, projectSettingsHref, roadmapHref, settingsHref, signInFailureOf, taskHref, withoutSignInParam, workHref, } from "./router.js";
|
|
40
41
|
import { projectPath } from "./routes.js";
|
|
@@ -49,7 +50,7 @@ export const DEFAULT_COMPONENTS = {
|
|
|
49
50
|
TokenList,
|
|
50
51
|
PeopleList,
|
|
51
52
|
SkillList,
|
|
52
|
-
|
|
53
|
+
HomeGrid,
|
|
53
54
|
MemberList,
|
|
54
55
|
Calendar,
|
|
55
56
|
GoalList,
|
|
@@ -166,6 +167,12 @@ function useFollowLinks(navigation) {
|
|
|
166
167
|
}, [navigation]);
|
|
167
168
|
}
|
|
168
169
|
/** The key of the project a route is on, or nothing. */
|
|
170
|
+
/** The files chosen or pasted on a page, as the client sends them: each by its name, its bytes and its type where the browser knows one. */
|
|
171
|
+
const uploadsOf = (files) => files.map((file) => ({
|
|
172
|
+
name: file.name,
|
|
173
|
+
bytes: file,
|
|
174
|
+
...(file.type === "" ? {} : { contentType: file.type }),
|
|
175
|
+
}));
|
|
169
176
|
const projectOf = (route) => "project" in route ? route.project : undefined;
|
|
170
177
|
/** The field the pages lie on, for a page without the shell: signing in, and the wait before it. */
|
|
171
178
|
function Ground(props) {
|
|
@@ -178,6 +185,16 @@ function Ground(props) {
|
|
|
178
185
|
function holdsToken(data) {
|
|
179
186
|
return data.me !== undefined && data.me.agent !== null;
|
|
180
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* The language to keep for a person the pages see for the first time (ADR-0065): the one their
|
|
190
|
+
* browser asks for, so that a plugin or an agent can write for them while they are away. Nothing
|
|
191
|
+
* for a person who has a language, for nobody, and where the pages only fall back on a language.
|
|
192
|
+
*/
|
|
193
|
+
export function languageToKeep(me, browser, packs) {
|
|
194
|
+
return me?.person !== null && me?.person !== undefined && me.language === null
|
|
195
|
+
? browserPack(browser, packs)?.tag
|
|
196
|
+
: undefined;
|
|
197
|
+
}
|
|
181
198
|
/**
|
|
182
199
|
* The pages a console that holds a token does not offer: the tokens themselves, and the
|
|
183
200
|
* approval of an agent's connection, which makes one; a person's own doing on the console's
|
|
@@ -195,20 +212,21 @@ function NotWithToken() {
|
|
|
195
212
|
}
|
|
196
213
|
function ProjectsPage(props) {
|
|
197
214
|
const words = useWords().projects;
|
|
215
|
+
const homeWords = useWords().home;
|
|
198
216
|
const { data, components, navigation, client, language } = props;
|
|
199
217
|
const me = data.me;
|
|
200
|
-
|
|
201
|
-
const
|
|
218
|
+
// The person arranges the page (ADR-0061): the projects and the widgets, tiles on one grid.
|
|
219
|
+
const [arranging, setArranging] = useState(false);
|
|
202
220
|
const { busy, error, act } = useAction();
|
|
203
221
|
const href = (project) => projectHref(project.key);
|
|
204
222
|
// A project is made by an administrator (ADR-0045): a member sees the list alone, the form's
|
|
205
223
|
// address included.
|
|
206
224
|
const administrator = data.me?.person?.role === "admin";
|
|
207
225
|
const making = props.making && administrator;
|
|
208
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: words.title }), administrator && !making && (_jsx(LinkButton, { href: PATHS.newProject, variant: "primary", children: words.newProject }))] }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }),
|
|
226
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: words.title }), !arranging && (_jsxs("div", { className: "sc-page-actions", children: [me !== undefined && me.person !== null && (_jsx(Button, { size: "sm", variant: "ghost", onClick: () => setArranging(true), children: homeWords.edit })), administrator && !making && (_jsx(LinkButton, { href: PATHS.newProject, variant: "primary", children: words.newProject }))] }))] }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), making && (_jsx("section", { className: "sc-panel sc-panel-form", "aria-label": words.form.aria, children: _jsx(ProjectForm, { busy: busy, skillsSource: data.me?.workspace.skills.source, organizationAddress: data.me?.workspace.skills.address ?? null, onSubmit: (input, icon) => void act(async () => {
|
|
209
227
|
const made = await data.actions.createProject(input, icon instanceof File ? uploadOf(icon) : undefined);
|
|
210
228
|
navigation.replace(projectHref(made.key));
|
|
211
|
-
}), onCancel: () => navigation.back(PATHS.projects) }) })), _jsx(components.
|
|
229
|
+
}), onCancel: () => navigation.back(PATHS.projects) }) })), _jsx(components.HomeGrid, { projects: data.projects, plugins: data.plugins, home: me?.home, editing: arranging, onSave: (home) => data.actions.updateMe({ home }), onDone: () => setArranging(false), projectHref: href, onOpen: (project) => navigation.go(href(project)), nameOf: (name) => pluginWordOf(name, language), renderWidget: (tile, size) => me === undefined ? null : (_jsx(PluginFrame, { plugin: tile.plugin, widget: tile.widget.key, size: size, me: me, language: language, client: client, navigation: navigation, title: pluginWordOf(tile.widget.name, language) })), empty: _jsx(EmptyState, { title: words.empty.title, body: administrator ? words.empty.body : words.empty.bodyMember, action: administrator ? (_jsx(LinkButton, { href: PATHS.newProject, children: words.newProject })) : undefined }) })] }));
|
|
212
230
|
}
|
|
213
231
|
/**
|
|
214
232
|
* A plugin's page (ADR-0054): the sub-tabs of its pages at the level, where it has several, above
|
|
@@ -227,7 +245,7 @@ function PluginPage(props) {
|
|
|
227
245
|
return _jsx(EmptyState, { title: words.plugins.noPage.title, body: words.plugins.noPage.body });
|
|
228
246
|
}
|
|
229
247
|
const projectKey = route.level === "project" ? route.project : undefined;
|
|
230
|
-
return (_jsxs(_Fragment, { children: [pages.length > 1 && (_jsx("nav", { className: "sc-
|
|
248
|
+
return (_jsxs(_Fragment, { children: [pages.length > 1 && (_jsx("nav", { className: "sc-page-tabs", "aria-label": pluginWordOf(plugin.name, language), children: pages.map((candidate) => (_jsx("a", { href: pluginHref(plugin.key, candidate.key, projectKey), className: candidate.key === page.key ? "sc-tab sc-tab-current" : "sc-tab", "aria-current": candidate.key === page.key ? "page" : undefined, children: pluginWordOf(candidate.name, language) }, candidate.key))) })), _jsx(PluginFrame, { plugin: plugin, page: page.key, project: project, path: route.rest, me: data.me, language: language, client: client, navigation: navigation, events: project === undefined ? undefined : data.events, title: words.plugins.frame(pluginWordOf(page.name, language)) }, `${plugin.key}:${page.key}:${projectKey ?? ""}`)] }));
|
|
231
249
|
}
|
|
232
250
|
/**
|
|
233
251
|
* The plugins' settings (docs/specs/plugins.md, "The settings pages"): the list, or one plugin
|
|
@@ -250,9 +268,9 @@ function PluginSettingsPage(props) {
|
|
|
250
268
|
setFailure(undefined);
|
|
251
269
|
}
|
|
252
270
|
catch (error) {
|
|
253
|
-
setFailure(error
|
|
271
|
+
setFailure(errorWords(error, words.common.somethingWentWrong, words));
|
|
254
272
|
}
|
|
255
|
-
}, [client, key, words
|
|
273
|
+
}, [client, key, words]);
|
|
256
274
|
useEffect(() => {
|
|
257
275
|
setDetail(undefined);
|
|
258
276
|
void read();
|
|
@@ -421,8 +439,8 @@ function TaskPage(props) {
|
|
|
421
439
|
return (_jsx(components.TaskView, { task: task, people: data.people.filter(inWorkspace), tasks: data.tasks, parent: parent, findTasks: data.actions.findTasks, findGoals: data.actions.findGoals, decisions: data.decisions, runs: data.runs, comments: comments, history: history, categories: data.categories, goals: data.goals, taskHref: (candidate) => taskHref(key, candidate.number), decisionHref: (decisionId) => decisionHref(key, decisionId), goalHref: (goalId) => goalHref(key, goalId), fileHref: (fileId) => projectPath(key, "files", fileId), docHref: (path) => docHref(key, path), form: route.form, formHref: (form) => taskHref(key, task.number, form), onCancel: () => navigation.back(here), busy: busy, error: error, onChange: (target, patch) => void act(async () => {
|
|
422
440
|
await data.actions.updateTask(target.id, patch);
|
|
423
441
|
navigation.replace(here);
|
|
424
|
-
}), onMove: (target, state) => void act(() => data.actions.updateTask(target.id, { state })), onRaiseDecision: (input) => void act(async () => {
|
|
425
|
-
await data.actions.raiseDecision(input);
|
|
442
|
+
}), onMove: (target, state) => void act(() => data.actions.updateTask(target.id, { state })), onRaiseDecision: (input, files) => void act(async () => {
|
|
443
|
+
await data.actions.raiseDecision(input, uploadsOf(files));
|
|
426
444
|
navigation.replace(here);
|
|
427
445
|
}), onAnswer: (decision, input) => void act(() => data.actions.answerDecision(decision.id, input)), onUpdateDecision: (decision, patch) => void act(() => data.actions.updateDecision(decision.id, patch)), onAbandonRun: (run) => void act(() => data.actions.abandonRun(run.id)), onArchive: (target) => void act(async () => {
|
|
428
446
|
await data.actions.archiveTask(target.id);
|
|
@@ -430,14 +448,7 @@ function TaskPage(props) {
|
|
|
430
448
|
}), onRestore: (target) => void act(async () => {
|
|
431
449
|
setFetched(await data.actions.restoreTask(target.id));
|
|
432
450
|
}), onComment: (draft) => void act(async () => {
|
|
433
|
-
await data.actions.comment(task.id, {
|
|
434
|
-
body: draft.body,
|
|
435
|
-
files: draft.files.map((file) => ({
|
|
436
|
-
name: file.name,
|
|
437
|
-
bytes: file,
|
|
438
|
-
...(file.type === "" ? {} : { contentType: file.type }),
|
|
439
|
-
})),
|
|
440
|
-
});
|
|
451
|
+
await data.actions.comment(task.id, { body: draft.body, files: uploadsOf(draft.files) });
|
|
441
452
|
setComments(await taskComments(task.id));
|
|
442
453
|
}) }));
|
|
443
454
|
}
|
|
@@ -528,17 +539,17 @@ function ProjectPage(props) {
|
|
|
528
539
|
return (_jsx(DocsPage, { project: project, path: route.path, view: route.view, data: data, navigation: navigation }));
|
|
529
540
|
}
|
|
530
541
|
if (route.name === "decisions") {
|
|
531
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: words.decisions.title }), _jsx(LinkButton, { href: newDecisionHref(key), variant: "primary", children: words.decisions.raise })] }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), _jsx(components.DecisionList, { decisions: data.decisions, tasks: tasksById, taskHref: href, docHref: toDoc, decisionHref: (decision) => decisionHref(key, decision.id), page: route.page, pageHref: (page) => decisionsHref(key, page), onAnswer: onAnswer, onUpdate: onUpdate, busy: busy, empty: _jsx(EmptyState, { title: words.decisions.empty.title, body: words.decisions.empty.body }) })] }));
|
|
542
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: words.decisions.title }), _jsx(LinkButton, { href: newDecisionHref(key), variant: "primary", children: words.decisions.raise })] }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), _jsx(components.DecisionList, { decisions: data.decisions, tasks: tasksById, taskHref: href, docHref: toDoc, fileHref: (fileId) => projectPath(key, "files", fileId), decisionHref: (decision) => decisionHref(key, decision.id), page: route.page, pageHref: (page) => decisionsHref(key, page), onAnswer: onAnswer, onUpdate: onUpdate, busy: busy, empty: _jsx(EmptyState, { title: words.decisions.empty.title, body: words.decisions.empty.body }) })] }));
|
|
532
543
|
}
|
|
533
544
|
if (route.name === "new-decision") {
|
|
534
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.decisions.raise }) }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), _jsx("section", { className: "sc-panel sc-panel-form", "aria-label": words.decisions.raiseAria, children: _jsx(DecisionForm, { findTasks: data.actions.findTasks, deciders: data.members.map((member) => member.person), me: data.me?.person ?? undefined, busy: busy, onSubmit: (input) => void act(async () => {
|
|
535
|
-
const made = await data.actions.raiseDecision(input);
|
|
545
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.decisions.raise }) }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), _jsx("section", { className: "sc-panel sc-panel-form", "aria-label": words.decisions.raiseAria, children: _jsx(DecisionForm, { findTasks: data.actions.findTasks, deciders: data.members.map((member) => member.person), me: data.me?.person ?? undefined, busy: busy, onSubmit: (input, files) => void act(async () => {
|
|
546
|
+
const made = await data.actions.raiseDecision(input, uploadsOf(files));
|
|
536
547
|
navigation.replace(decisionHref(key, made.id));
|
|
537
548
|
}), onCancel: () => navigation.back(projectHref(key, "decisions")) }) })] }));
|
|
538
549
|
}
|
|
539
550
|
if (route.name === "decision") {
|
|
540
551
|
const decision = data.decisions.find((candidate) => candidate.id === route.id);
|
|
541
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: words.decisions.one }), _jsx(LinkButton, { href: projectHref(key, "decisions"), children: words.decisions.all })] }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), decision === undefined ? (_jsx(EmptyState, { title: words.decisions.noSuch.title, body: words.decisions.noSuch.body })) : (_jsx(DecisionCard, { decision: decision, task: decision.taskId === null ? undefined : tasksById.get(decision.taskId), taskHref: href, docHref: toDoc, onAnswer: onAnswer, onUpdate: onUpdate, busy: busy }))] }));
|
|
552
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: words.decisions.one }), _jsx(LinkButton, { href: projectHref(key, "decisions"), children: words.decisions.all })] }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), decision === undefined ? (_jsx(EmptyState, { title: words.decisions.noSuch.title, body: words.decisions.noSuch.body })) : (_jsx(DecisionCard, { decision: decision, task: decision.taskId === null ? undefined : tasksById.get(decision.taskId), taskHref: href, docHref: toDoc, fileHref: (fileId) => projectPath(key, "files", fileId), onAnswer: onAnswer, onUpdate: onUpdate, busy: busy }))] }));
|
|
542
553
|
}
|
|
543
554
|
if (route.name === "archive") {
|
|
544
555
|
return _jsx(ArchivePage, { project: project, data: data });
|
|
@@ -889,7 +900,7 @@ function MyDecisionsPage(props) {
|
|
|
889
900
|
addressed.reload();
|
|
890
901
|
raised.reload();
|
|
891
902
|
});
|
|
892
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.myDecisions.title }) }), problem !== undefined && _jsx(Callout, { tone: "danger", children: problem }), addressed.items === undefined || raised.items === undefined ? (problem === undefined && (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: words.myDecisions.loading }) }))) : addressed.items.length === 0 && raised.items.length === 0 ? (_jsx(EmptyState, { title: words.myDecisions.empty.title, body: words.myDecisions.empty.body })) : (_jsx(MyDecisions, { addressed: { items: addressed.items, more: addressed.more, onMore: addressed.readMore }, raised: { items: raised.items, more: raised.more, onMore: raised.readMore }, decisionHref: decisionHref, onAnswer: onAnswer, busy: busy || addressed.busy || raised.busy }))] }));
|
|
903
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.myDecisions.title }) }), problem !== undefined && _jsx(Callout, { tone: "danger", children: problem }), addressed.items === undefined || raised.items === undefined ? (problem === undefined && (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: words.myDecisions.loading }) }))) : addressed.items.length === 0 && raised.items.length === 0 ? (_jsx(EmptyState, { title: words.myDecisions.empty.title, body: words.myDecisions.empty.body })) : (_jsx(MyDecisions, { addressed: { items: addressed.items, more: addressed.more, onMore: addressed.readMore }, raised: { items: raised.items, more: raised.more, onMore: raised.readMore }, decisionHref: decisionHref, fileHref: (projectKey, fileId) => projectPath(projectKey, "files", fileId), onAnswer: onAnswer, busy: busy || addressed.busy || raised.busy }))] }));
|
|
893
904
|
}
|
|
894
905
|
function WorkPage(props) {
|
|
895
906
|
const words = useWords();
|
|
@@ -956,6 +967,8 @@ function WorkspacePage(props) {
|
|
|
956
967
|
? (person, role) => void act(() => data.actions.updatePerson(person.id, { role }))
|
|
957
968
|
: undefined, onChangeStatus: administrator
|
|
958
969
|
? (person, status) => void act(() => data.actions.updatePerson(person.id, { status }))
|
|
970
|
+
: undefined, onChangeManager: administrator
|
|
971
|
+
? (person, managerId) => void act(() => data.actions.updatePerson(person.id, { managerId }))
|
|
959
972
|
: undefined, onUnlist: administrator
|
|
960
973
|
? (listing) => void act(() => data.actions.removeListing(listing.id))
|
|
961
974
|
: undefined, workHref: oversees ? (person) => personWorkHref(person.id) : undefined, agentsHref: administrator ? (person) => personAgentsHref(person.id) : undefined })] }));
|
|
@@ -985,6 +998,7 @@ export function createConsole(config = {}) {
|
|
|
985
998
|
const fallbackTitle = config.title ?? "Console";
|
|
986
999
|
const languages = config.languages ?? DEFAULT_LANGUAGES;
|
|
987
1000
|
const pages = config.pages ?? [];
|
|
1001
|
+
// biome-ignore lint/correctness/noComponentHookFactories: createConsole runs once, when a console is built, never during a render; App is that console's one root component, closing over its config.
|
|
988
1002
|
function App(props) {
|
|
989
1003
|
const { location, navigation } = useNavigation(props.initialPath);
|
|
990
1004
|
useFollowLinks(navigation);
|
|
@@ -994,10 +1008,16 @@ export function createConsole(config = {}) {
|
|
|
994
1008
|
const failure = signInFailureOf(location.search);
|
|
995
1009
|
const title = data.me?.workspace.name ?? fallbackTitle;
|
|
996
1010
|
const viaToken = holdsToken(data);
|
|
997
|
-
// The language: the person's
|
|
1011
|
+
// The language: the person's own, else the browser's, else the first the console speaks.
|
|
998
1012
|
const chosen = data.me?.language;
|
|
999
1013
|
const pack = useMemo(() => chooseLanguage(chosen, typeof navigator === "undefined" ? [] : navigator.languages, languages), [chosen]);
|
|
1000
1014
|
const words = pack.messages;
|
|
1015
|
+
const toKeep = languageToKeep(data.me, typeof navigator === "undefined" ? [] : navigator.languages, languages);
|
|
1016
|
+
useEffect(() => {
|
|
1017
|
+
if (toKeep !== undefined) {
|
|
1018
|
+
void data.actions.updateMe({ language: toKeep }).catch(() => undefined);
|
|
1019
|
+
}
|
|
1020
|
+
}, [toKeep, data.actions]);
|
|
1001
1021
|
// An address that moved is shown at its new one, in its place.
|
|
1002
1022
|
useEffect(() => {
|
|
1003
1023
|
if (route.name === "moved") {
|
|
@@ -1012,7 +1032,7 @@ export function createConsole(config = {}) {
|
|
|
1012
1032
|
}, [title, data.project, pack.tag]);
|
|
1013
1033
|
let content;
|
|
1014
1034
|
if (data.me === undefined) {
|
|
1015
|
-
content = (_jsx(Ground, { children: _jsx("div", { className: "sc-loading", children: data.error === undefined ? (_jsx(Spinner, { label: words.common.loading })) : (_jsx(Callout, { tone: "danger", title: words.common.couldNotReach, action: _jsx(Button, { onClick: data.reload, children: words.common.tryAgain }), children: data.error })) }) }));
|
|
1035
|
+
content = (_jsx(Ground, { children: _jsx("div", { className: "sc-loading", children: data.error === undefined ? (_jsx(Spinner, { label: words.common.loading })) : (_jsx(Callout, { tone: "danger", title: words.common.couldNotReach, action: _jsx(Button, { onClick: data.reload, children: words.common.tryAgain }), children: errorWords(data.failure, data.error, words) })) }) }));
|
|
1016
1036
|
}
|
|
1017
1037
|
else if (data.me.person === null) {
|
|
1018
1038
|
content = (_jsx(Ground, { children: _jsx(components.SignIn, { title: title, brand: config.brand, providers: data.me.signIn, returnTo: withoutSignInParam(location.pathname, location.search), failure: failure }) }));
|
|
@@ -1031,6 +1051,7 @@ export function createConsole(config = {}) {
|
|
|
1031
1051
|
href: PATHS.decisions,
|
|
1032
1052
|
label: words.nav.myDecisions,
|
|
1033
1053
|
current: route.name === "my-decisions",
|
|
1054
|
+
count: data.me?.decisions?.waiting,
|
|
1034
1055
|
},
|
|
1035
1056
|
{
|
|
1036
1057
|
href: PATHS.people,
|