@umituz/web-dashboard 8.8.0 → 8.8.1

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": "8.8.0",
3
+ "version": "8.8.1",
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",
@@ -49,6 +49,18 @@ describe('Calendar', () => {
49
49
  expect(screen.getByText('Sunday, March 15, 2026')).toBeTruthy();
50
50
  });
51
51
 
52
+ it('stays in the month view when the day view is not offered', () => {
53
+ render(
54
+ <Calendar
55
+ items={[{ id: 'Expiry', dayKey: '2026-03-15', title: 'Expiry' }]}
56
+ initialCursor="2026-03-10"
57
+ views={['month', 'agenda']}
58
+ />,
59
+ );
60
+ fireEvent.click(screen.getByRole('button', { name: '2026-03-15' }));
61
+ expect(screen.getByText('March 2026')).toBeTruthy();
62
+ });
63
+
52
64
  it('respects a controlled view', () => {
53
65
  mount({ view: 'day' });
54
66
  expect(screen.getByText('Tuesday, March 10, 2026')).toBeTruthy();
@@ -106,7 +106,7 @@ export const Calendar = ({
106
106
 
107
107
  const handleSelectDay = (dayKey: string) => {
108
108
  applyCursor(dayKey);
109
- if (activeView !== 'day') applyView('day');
109
+ if (activeView !== 'day' && views.includes('day')) applyView('day');
110
110
  onSelectDay?.(dayKey);
111
111
  };
112
112