@abpjs/ui 0.2.0-next.25 → 0.2.0-next.28
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/CHANGELOG.md +26 -0
- package/dist/agent.js +3 -3
- package/dist/agent.js.map +1 -1
- package/dist/index.d.ts +40 -2
- package/dist/index.js +905 -654
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0-next.28
|
|
4
|
+
|
|
5
|
+
A prerelease under npm's `next` tag.
|
|
6
|
+
|
|
7
|
+
- agent: an empty chat list and an empty "mine" list draw `art="agent"`.
|
|
8
|
+
|
|
9
|
+
## 0.2.0-next.27
|
|
10
|
+
|
|
11
|
+
A prerelease under npm's `next` tag. (0.2.0-next.26 was tagged but never published: a test list was malformed.)
|
|
12
|
+
|
|
13
|
+
- `EmptyState variant="page"`: for a page whose whole main content is empty. In place of the icon it draws
|
|
14
|
+
`illustration`, the feature the page is about: `records`, `board`, `views`, `dashboards`, `dashboard`, `reports`,
|
|
15
|
+
`calendar`, `timeline`, `gantt`, `backlog`, `queue`, `comments` or `files`. The drawing is a clear card with softer
|
|
16
|
+
cards either side that fade into the surface. A search that finds nothing (`no-results`, `no-filter-match`) adds a
|
|
17
|
+
small search mark. Errors never get the drawing.
|
|
18
|
+
- `EmptyState art`: a small flat drawing in place of the icon, for an empty list in a panel or a settings card:
|
|
19
|
+
`records`, `search`, `done`, `bell`, `handover`, `agent` or `error`.
|
|
20
|
+
- `EmptyState layout="inline"`: the drawing, the words and the action on one line, on a quiet surface. The action
|
|
21
|
+
wraps under the words when there's no room.
|
|
22
|
+
- The drawings use only the theme's tokens (neutral, accent, amber, green) in light and dark, and are decorative
|
|
23
|
+
(`aria-hidden`). A `no-results` or `no-filter-match` empty state is a polite live region, and an `error` one is an
|
|
24
|
+
alert.
|
|
25
|
+
- `PageIllustration`, `EmptyArtDrawing`, `EmptyIllustration` and `EmptyArt` are exported.
|
|
26
|
+
- agent: the chat panel spans the page, not the window (its positioner is 100% wide, not 100vw), so the page's
|
|
27
|
+
scrollbar no longer pushes it past the screen's edge.
|
|
28
|
+
|
|
3
29
|
## 0.2.0-next.25
|
|
4
30
|
|
|
5
31
|
A prerelease under npm's `next` tag.
|
package/dist/agent.js
CHANGED
|
@@ -1731,7 +1731,7 @@ function AgentChatPanel({ itemHref }) {
|
|
|
1731
1731
|
trapFocus: false,
|
|
1732
1732
|
preventScroll: false,
|
|
1733
1733
|
onOpenChange: (e) => !e.open && close(),
|
|
1734
|
-
children: /* @__PURE__ */ jsx14(Portal, { children: /* @__PURE__ */ jsx14(Drawer.Positioner, { pointerEvents: "none", children: /* @__PURE__ */ jsxs13(Drawer.Content, { pointerEvents: "auto", borderStartWidth: "1px", borderColor: "border.muted", "data-testid": "agent-chat", children: [
|
|
1734
|
+
children: /* @__PURE__ */ jsx14(Portal, { children: /* @__PURE__ */ jsx14(Drawer.Positioner, { pointerEvents: "none", width: "100%", children: /* @__PURE__ */ jsxs13(Drawer.Content, { pointerEvents: "auto", borderStartWidth: "1px", borderColor: "border.muted", "data-testid": "agent-chat", children: [
|
|
1735
1735
|
view.kind === "list" ? /* @__PURE__ */ jsx14(ChatList, { onOpen: (id) => setView({ kind: "chat", id }), onNew: () => setView({ kind: "new", target: {} }) }) : view.kind === "new" ? /* @__PURE__ */ jsx14(NewChat, { target: view.target, onBack: () => setView({ kind: "list" }), onStarted: (id) => setView({ kind: "chat", id }) }) : /* @__PURE__ */ jsx14(ChatView, { id: view.id, onBack: () => setView({ kind: "list" }), onMissing: view.opened ? () => setView({ kind: "list" }) : void 0 }, view.id),
|
|
1736
1736
|
/* @__PURE__ */ jsx14(Drawer.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(CloseButton, { size: "sm", "aria-label": t("chat.close") }) })
|
|
1737
1737
|
] }) }) })
|
|
@@ -1756,7 +1756,7 @@ function ChatList({ onOpen, onNew }) {
|
|
|
1756
1756
|
/* @__PURE__ */ jsxs13(Drawer.Body, { px: "0", children: [
|
|
1757
1757
|
/* @__PURE__ */ jsx14(Box3, { px: "5", pb: "3", children: /* @__PURE__ */ jsx14(Button10, { size: "sm", variant: "primary", onClick: onNew, "data-testid": "agent-chat-new", children: t("chat.new") }) }),
|
|
1758
1758
|
chats.error && /* @__PURE__ */ jsx14(Box3, { px: "5", children: /* @__PURE__ */ jsx14(InlineAlert9, { tone: "danger", children: chats.error }) }),
|
|
1759
|
-
chats.data?.length === 0 && /* @__PURE__ */ jsx14(EmptyState, { size: "sm", title: t("chat.none"), description: t("chat.noneHint") }),
|
|
1759
|
+
chats.data?.length === 0 && /* @__PURE__ */ jsx14(EmptyState, { size: "sm", art: "agent", title: t("chat.none"), description: t("chat.noneHint") }),
|
|
1760
1760
|
/* @__PURE__ */ jsx14(Stack13, { gap: "0", as: "ul", listStyleType: "none", "aria-label": t("chat.chats"), children: chats.data?.map((c) => /* @__PURE__ */ jsx14(Box3, { as: "li", borderTopWidth: "1px", borderColor: "border.muted", children: /* @__PURE__ */ jsxs13(
|
|
1761
1761
|
chakra4.button,
|
|
1762
1762
|
{
|
|
@@ -2085,7 +2085,7 @@ function AgentBadge({ person, label }) {
|
|
|
2085
2085
|
function AgentQuestionsPanel({ itemHref }) {
|
|
2086
2086
|
const t = useAgentTexts();
|
|
2087
2087
|
const questions = useApiQuery10("agent", "/questions");
|
|
2088
|
-
return /* @__PURE__ */ jsx15(ItemHrefProvider, { value: itemHref, children: /* @__PURE__ */ jsx15(Panel6, { title: t("mine.title"), description: t("mine.hint"), "data-testid": "agent-questions", children: questions.data?.length === 0 ? /* @__PURE__ */ jsx15(EmptyState2, { size: "sm", title: t("mine.none") }) : /* @__PURE__ */ jsx15(Stack14, { gap: "4", as: "ul", listStyleType: "none", children: (questions.data ?? []).map((q) => /* @__PURE__ */ jsx15(Box4, { as: "li", children: /* @__PURE__ */ jsxs14(Stack14, { gap: "1.5", children: [
|
|
2088
|
+
return /* @__PURE__ */ jsx15(ItemHrefProvider, { value: itemHref, children: /* @__PURE__ */ jsx15(Panel6, { title: t("mine.title"), description: t("mine.hint"), "data-testid": "agent-questions", children: questions.data?.length === 0 ? /* @__PURE__ */ jsx15(EmptyState2, { size: "sm", art: "agent", title: t("mine.none") }) : /* @__PURE__ */ jsx15(Stack14, { gap: "4", as: "ul", listStyleType: "none", children: (questions.data ?? []).map((q) => /* @__PURE__ */ jsx15(Box4, { as: "li", children: /* @__PURE__ */ jsxs14(Stack14, { gap: "1.5", children: [
|
|
2089
2089
|
/* @__PURE__ */ jsxs14(Text14, { textStyle: "sm", fontWeight: "medium", children: [
|
|
2090
2090
|
q.agent?.displayName ?? q.agentKey,
|
|
2091
2091
|
q.itemKey && /* @__PURE__ */ jsxs14(Fragment3, { children: [
|