@anchrd/intel-ui 0.50.0 → 0.51.0
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/package.json +2 -2
- package/src/feed/feed.tsx +15 -6
- package/src/i18n/de.json +10 -0
- package/src/i18n/en.json +10 -0
- package/src/i18n/es.json +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anchrd/intel-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"typecheck": "tsc --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@anchrd/intel-contract": "^0.
|
|
36
|
+
"@anchrd/intel-contract": "^0.29.0",
|
|
37
37
|
"@blocknote/core": "^0.52.1",
|
|
38
38
|
"@blocknote/react": "^0.52.1",
|
|
39
39
|
"@blocknote/shadcn": "^0.52.1",
|
package/src/feed/feed.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FeedEvent, feedKindOf } from "@anchrd/intel-contract/feed";
|
|
2
2
|
import { useInfiniteQuery, useQueries } from "@tanstack/react-query";
|
|
3
3
|
import { useNavigate } from "@tanstack/react-router";
|
|
4
4
|
import { Check, Filter } from "lucide-react";
|
|
@@ -220,7 +220,16 @@ export function Feed() {
|
|
|
220
220
|
event={event}
|
|
221
221
|
person={people.get(event.actorId) ?? null}
|
|
222
222
|
isMe={event.actorId === me?.id}
|
|
223
|
-
|
|
223
|
+
// ⚠️ Which surface the card leads to is decided by the ACTION, through
|
|
224
|
+
// `feedKindOf`, and not by a field on the event. A flow does not open in the
|
|
225
|
+
// knowledge tree — sending one there lands on a selection nothing matches, an
|
|
226
|
+
// empty pane with no error, which is the worst of the three possible outcomes.
|
|
227
|
+
open={(resourceId) =>
|
|
228
|
+
void navigate({
|
|
229
|
+
to: feedKindOf(event.action) === "flow" ? "/flows" : "/nodes",
|
|
230
|
+
search: { select: resourceId },
|
|
231
|
+
})
|
|
232
|
+
}
|
|
224
233
|
/>
|
|
225
234
|
))}
|
|
226
235
|
</ul>
|
|
@@ -256,7 +265,7 @@ function FeedCard({
|
|
|
256
265
|
event: FeedEvent;
|
|
257
266
|
person: { name: string; isMachine: boolean } | null;
|
|
258
267
|
isMe: boolean;
|
|
259
|
-
open(
|
|
268
|
+
open(resourceId: string): void;
|
|
260
269
|
}) {
|
|
261
270
|
const i18n = useI18n();
|
|
262
271
|
// ⚠️ Never the raw id. A person we cannot name is "a user account", which is the wording every
|
|
@@ -293,7 +302,7 @@ function FeedCard({
|
|
|
293
302
|
</span>
|
|
294
303
|
<span className="grid min-w-0 flex-1 gap-1">
|
|
295
304
|
<span className="text-sm leading-snug">
|
|
296
|
-
{i18n.t(`feed.action.${event.action}`, { who, title: event.
|
|
305
|
+
{i18n.t(`feed.action.${event.action}`, { who, title: event.resourceTitle })}
|
|
297
306
|
</span>
|
|
298
307
|
{/* ⚠️ `min-w-0` is not decoration. A grid item defaults to `min-width: auto`, so without it
|
|
299
308
|
this row grows to whatever the path needs and pushes the button PAST the card's edge —
|
|
@@ -317,8 +326,8 @@ function FeedCard({
|
|
|
317
326
|
{mark !== null && (
|
|
318
327
|
<button
|
|
319
328
|
type="button"
|
|
320
|
-
onClick={() => open(event.
|
|
321
|
-
aria-label={i18n.t("feed.open", { title: event.
|
|
329
|
+
onClick={() => open(event.resourceId)}
|
|
330
|
+
aria-label={i18n.t("feed.open", { title: event.resourceTitle, mark })}
|
|
322
331
|
className="shrink-0 rounded bg-muted px-2 py-0.5 font-mono text-[11px] text-muted-foreground outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring"
|
|
323
332
|
>
|
|
324
333
|
{mark}
|
package/src/i18n/de.json
CHANGED
|
@@ -182,9 +182,19 @@
|
|
|
182
182
|
"common.unsavedLeave": "Ohne Speichern verlassen",
|
|
183
183
|
"common.unsavedStay": "Bleiben und speichern",
|
|
184
184
|
"common.unsavedTitle": "Ungespeicherte Änderungen",
|
|
185
|
+
"feed.action.flows.archive": "{who} hat den Flow {title} archiviert",
|
|
186
|
+
"feed.action.flows.create": "{who} hat den Flow {title} angelegt",
|
|
187
|
+
"feed.action.flows.publish": "{who} hat den Flow {title} veröffentlicht",
|
|
188
|
+
"feed.action.flows.purge": "{who} hat den Flow {title} endgültig gelöscht",
|
|
189
|
+
"feed.action.flows.revoke": "{who} hat eine Freigabe für den Flow {title} entzogen",
|
|
190
|
+
"feed.action.flows.save": "{who} hat den Flow {title} geändert",
|
|
191
|
+
"feed.action.flows.share": "{who} hat den Flow {title} freigegeben",
|
|
192
|
+
"feed.action.flows.unpublish": "{who} hat die Veröffentlichung des Flows {title} zurückgenommen",
|
|
193
|
+
"feed.action.flows.update": "{who} hat den Flow {title} umbenannt",
|
|
185
194
|
"feed.action.node.append": "{who} hat etwas an {title} angehängt",
|
|
186
195
|
"feed.action.node.archive": "{who} hat {title} archiviert",
|
|
187
196
|
"feed.action.node.create": "{who} hat {title} angelegt",
|
|
197
|
+
"feed.action.node.purge": "{who} hat {title} endgültig gelöscht",
|
|
188
198
|
"feed.action.node.revoke": "{who} hat eine Freigabe für {title} entzogen",
|
|
189
199
|
"feed.action.node.save": "{who} hat {title} geändert",
|
|
190
200
|
"feed.action.node.share": "{who} hat {title} freigegeben",
|
package/src/i18n/en.json
CHANGED
|
@@ -182,9 +182,19 @@
|
|
|
182
182
|
"common.unsavedLeave": "Leave without saving",
|
|
183
183
|
"common.unsavedStay": "Stay and save",
|
|
184
184
|
"common.unsavedTitle": "Unsaved changes",
|
|
185
|
+
"feed.action.flows.archive": "{who} archived the Flow {title}",
|
|
186
|
+
"feed.action.flows.create": "{who} created the Flow {title}",
|
|
187
|
+
"feed.action.flows.publish": "{who} published the Flow {title}",
|
|
188
|
+
"feed.action.flows.purge": "{who} deleted the Flow {title} for good",
|
|
189
|
+
"feed.action.flows.revoke": "{who} withdrew a share on the Flow {title}",
|
|
190
|
+
"feed.action.flows.save": "{who} changed the Flow {title}",
|
|
191
|
+
"feed.action.flows.share": "{who} shared the Flow {title}",
|
|
192
|
+
"feed.action.flows.unpublish": "{who} withdrew the Flow {title} from publication",
|
|
193
|
+
"feed.action.flows.update": "{who} renamed the Flow {title}",
|
|
185
194
|
"feed.action.node.append": "{who} appended to {title}",
|
|
186
195
|
"feed.action.node.archive": "{who} archived {title}",
|
|
187
196
|
"feed.action.node.create": "{who} created {title}",
|
|
197
|
+
"feed.action.node.purge": "{who} deleted {title} for good",
|
|
188
198
|
"feed.action.node.revoke": "{who} withdrew access to {title}",
|
|
189
199
|
"feed.action.node.save": "{who} changed {title}",
|
|
190
200
|
"feed.action.node.share": "{who} shared {title}",
|
package/src/i18n/es.json
CHANGED
|
@@ -182,9 +182,19 @@
|
|
|
182
182
|
"common.unsavedLeave": "Salir sin guardar",
|
|
183
183
|
"common.unsavedStay": "Quedarse y guardar",
|
|
184
184
|
"common.unsavedTitle": "Cambios sin guardar",
|
|
185
|
+
"feed.action.flows.archive": "{who} archivó el Flow {title}",
|
|
186
|
+
"feed.action.flows.create": "{who} creó el Flow {title}",
|
|
187
|
+
"feed.action.flows.publish": "{who} publicó el Flow {title}",
|
|
188
|
+
"feed.action.flows.purge": "{who} eliminó definitivamente el Flow {title}",
|
|
189
|
+
"feed.action.flows.revoke": "{who} retiró un acceso al Flow {title}",
|
|
190
|
+
"feed.action.flows.save": "{who} cambió el Flow {title}",
|
|
191
|
+
"feed.action.flows.share": "{who} compartió el Flow {title}",
|
|
192
|
+
"feed.action.flows.unpublish": "{who} retiró la publicación del Flow {title}",
|
|
193
|
+
"feed.action.flows.update": "{who} renombró el Flow {title}",
|
|
185
194
|
"feed.action.node.append": "{who} añadió algo a {title}",
|
|
186
195
|
"feed.action.node.archive": "{who} archivó {title}",
|
|
187
196
|
"feed.action.node.create": "{who} creó {title}",
|
|
197
|
+
"feed.action.node.purge": "{who} eliminó {title} definitivamente",
|
|
188
198
|
"feed.action.node.revoke": "{who} retiró el acceso a {title}",
|
|
189
199
|
"feed.action.node.save": "{who} cambió {title}",
|
|
190
200
|
"feed.action.node.share": "{who} compartió {title}",
|