@umituz/web-dashboard 7.0.0 → 7.1.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/web-dashboard",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Installable app skeleton for the fleet — layouts, analytics (dependency-free SVG charts), calendar, onboarding flow permissions/module registry; udb-* stylesheet on design-system tokens",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -3,26 +3,10 @@ import { render, screen, fireEvent } from "@testing-library/react";
|
|
|
3
3
|
import { MemoryRouter, Routes, Route } from "react-router";
|
|
4
4
|
import { Home } from "lucide-react";
|
|
5
5
|
import { DashboardLayout } from "./DashboardLayout";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
navigation: "Navigation",
|
|
11
|
-
searchResults: "Search results",
|
|
12
|
-
header: {
|
|
13
|
-
switchToLight: "Switch to light",
|
|
14
|
-
switchToDark: "Switch to dark",
|
|
15
|
-
notificationsTitle: "Notifications",
|
|
16
|
-
markAllRead: "Mark all read",
|
|
17
|
-
dismissNotification: "Dismiss",
|
|
18
|
-
noNotifications: "No notifications",
|
|
19
|
-
profile: "Profile",
|
|
20
|
-
settings: "Settings",
|
|
21
|
-
logout: "Log out",
|
|
22
|
-
guestName: "Guest",
|
|
23
|
-
},
|
|
24
|
-
sidebar: { system: "System" },
|
|
25
|
-
};
|
|
6
|
+
import { defaultLayoutLabels } from "./labels";
|
|
7
|
+
import type { DashboardLayoutConfig } from "../types/layout";
|
|
8
|
+
|
|
9
|
+
const labels = defaultLayoutLabels;
|
|
26
10
|
|
|
27
11
|
const config: DashboardLayoutConfig = {
|
|
28
12
|
sidebarGroups: [
|
|
@@ -140,4 +124,15 @@ describe("DashboardLayout (command palette)", () => {
|
|
|
140
124
|
const own = await screen.findByRole("option", { name: "Home" });
|
|
141
125
|
expect(own.textContent).toBe("Home");
|
|
142
126
|
});
|
|
127
|
+
|
|
128
|
+
it("supports a search-only palette without static groups (7.1)", async () => {
|
|
129
|
+
renderAt("/", {
|
|
130
|
+
config: {
|
|
131
|
+
...config,
|
|
132
|
+
commandPalette: { includeSidebar: false, search: async () => [] },
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
fireEvent.keyDown(window, { key: "k", metaKey: true });
|
|
136
|
+
expect(await screen.findByRole("dialog")).toBeTruthy();
|
|
137
|
+
});
|
|
143
138
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DashboardLayoutLabels } from '../types/layout';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* English shell labels — the reference text for `DashboardLayout`.
|
|
5
|
+
* Hosts rendering English pass this constant instead of re-declaring the
|
|
6
|
+
* thirteen strings; localized hosts build their own object from the same
|
|
7
|
+
* shape.
|
|
8
|
+
*/
|
|
9
|
+
export const defaultLayoutLabels: DashboardLayoutLabels = {
|
|
10
|
+
skipToContent: 'Skip to content',
|
|
11
|
+
navigation: 'Navigation',
|
|
12
|
+
searchResults: 'Search results',
|
|
13
|
+
header: {
|
|
14
|
+
switchToLight: 'Switch to light',
|
|
15
|
+
switchToDark: 'Switch to dark',
|
|
16
|
+
notificationsTitle: 'Notifications',
|
|
17
|
+
markAllRead: 'Mark all read',
|
|
18
|
+
dismissNotification: 'Dismiss',
|
|
19
|
+
noNotifications: 'No notifications',
|
|
20
|
+
profile: 'Profile',
|
|
21
|
+
settings: 'Settings',
|
|
22
|
+
logout: 'Log out',
|
|
23
|
+
guestName: 'Guest',
|
|
24
|
+
},
|
|
25
|
+
sidebar: { system: 'System' },
|
|
26
|
+
};
|
|
@@ -57,7 +57,8 @@ export interface HeaderSearchAction {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export interface CommandPaletteConfig {
|
|
60
|
-
groups
|
|
60
|
+
/** Static entry groups; palettes driven purely by `search` may omit them. */
|
|
61
|
+
groups?: import("@umituz/web-design-system/organisms").CommandGroup[];
|
|
61
62
|
placeholder?: string;
|
|
62
63
|
emptyLabel?: string;
|
|
63
64
|
label?: string;
|