@object-ui/app-shell 3.3.1 → 4.0.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/CHANGELOG.md +60 -0
- package/dist/chrome/CommandPalette.js +2 -16
- package/dist/layout/AppHeader.js +21 -9
- package/dist/layout/AppSidebar.js +7 -22
- package/dist/layout/AppSwitcher.js +1 -16
- package/dist/layout/ConsoleFloatingChatbot.d.ts +10 -0
- package/dist/layout/ConsoleFloatingChatbot.js +27 -0
- package/dist/layout/ConsoleLayout.d.ts +1 -0
- package/dist/layout/ConsoleLayout.js +6 -28
- package/dist/layout/UnifiedSidebar.d.ts +5 -0
- package/dist/layout/UnifiedSidebar.js +5 -29
- package/dist/providers/MetadataProvider.js +42 -2
- package/dist/utils/getIcon.d.ts +16 -2
- package/dist/utils/getIcon.js +40 -12
- package/dist/views/CreateViewDialog.d.ts +44 -0
- package/dist/views/CreateViewDialog.js +140 -0
- package/dist/views/DashboardView.js +31 -9
- package/dist/views/ObjectView.d.ts +0 -3
- package/dist/views/ObjectView.js +424 -80
- package/dist/views/ReportView.js +4 -3
- package/dist/views/ViewConfigPanel.d.ts +7 -5
- package/dist/views/ViewConfigPanel.js +9 -6
- package/dist/views/index.d.ts +1 -0
- package/dist/views/index.js +1 -0
- package/package.json +29 -27
- package/src/styles.css +16 -0
package/dist/views/ReportView.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
2
|
+
import { useState, useEffect, useCallback, useMemo, lazy, Suspense } from 'react';
|
|
3
3
|
import { useParams } from 'react-router-dom';
|
|
4
|
-
|
|
4
|
+
const ReportViewer = lazy(() => import('@object-ui/plugin-report').then((m) => ({ default: m.ReportViewer })));
|
|
5
|
+
const ReportConfigPanel = lazy(() => import('@object-ui/plugin-report').then((m) => ({ default: m.ReportConfigPanel })));
|
|
5
6
|
import { Empty, EmptyTitle, EmptyDescription } from '@object-ui/components';
|
|
6
7
|
import { Pencil, BarChart3, Loader2 } from 'lucide-react';
|
|
7
8
|
import { MetadataPanel, useMetadataInspector } from './MetadataInspector';
|
|
@@ -280,5 +281,5 @@ export function ReportView({ dataSource }) {
|
|
|
280
281
|
allowExport: true,
|
|
281
282
|
loading: dataLoading, // Loading state for data fetching
|
|
282
283
|
};
|
|
283
|
-
return (_jsxs("div", { className: "flex flex-col h-full overflow-hidden bg-background", children: [_jsxs("div", { className: "flex flex-col sm:flex-row justify-between sm:items-center gap-3 sm:gap-4 p-4 sm:p-6 border-b shrink-0", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h1", { className: "text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate", children: previewReport.title || previewReport.label || 'Report Viewer' }), previewReport.description && (_jsx("p", { className: "text-sm text-muted-foreground mt-1 line-clamp-2", children: previewReport.description }))] }), _jsx("div", { className: "shrink-0 flex items-center gap-1.5", children: _jsxs("button", { type: "button", onClick: handleOpenConfigPanel, className: "inline-flex items-center gap-1.5 rounded-md border border-input bg-background px-2.5 py-1.5 text-xs font-medium text-muted-foreground shadow-sm hover:bg-accent hover:text-accent-foreground", "data-testid": "report-edit-button", children: [_jsx(Pencil, { className: "h-3.5 w-3.5" }), "Edit"] }) })] }), _jsxs("div", { className: "flex-1 overflow-hidden flex flex-col sm:flex-row relative", children: [_jsx("div", { className: "flex-1 min-w-0 overflow-auto p-4 sm:p-6 lg:p-8 bg-muted/5", children: _jsx("div", { className: "max-w-5xl mx-auto shadow-sm border rounded-lg sm:rounded-xl bg-background overflow-hidden min-h-150", children: _jsx(ReportViewer, { schema: viewerSchema }) }) }), _jsx(ReportConfigPanel, { open: configPanelOpen, onClose: handleCloseConfigPanel, config: reportConfig, onSave: handleReportConfigSave, onFieldChange: handleReportFieldChange, availableFields: availableFields }), _jsx(MetadataPanel, { open: showDebug, sections: [{ title: 'Report Configuration', data: previewReport }] })] })] }));
|
|
284
|
+
return (_jsxs("div", { className: "flex flex-col h-full overflow-hidden bg-background", children: [_jsxs("div", { className: "flex flex-col sm:flex-row justify-between sm:items-center gap-3 sm:gap-4 p-4 sm:p-6 border-b shrink-0", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h1", { className: "text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate", children: previewReport.title || previewReport.label || 'Report Viewer' }), previewReport.description && (_jsx("p", { className: "text-sm text-muted-foreground mt-1 line-clamp-2", children: previewReport.description }))] }), _jsx("div", { className: "shrink-0 flex items-center gap-1.5", children: _jsxs("button", { type: "button", onClick: handleOpenConfigPanel, className: "inline-flex items-center gap-1.5 rounded-md border border-input bg-background px-2.5 py-1.5 text-xs font-medium text-muted-foreground shadow-sm hover:bg-accent hover:text-accent-foreground", "data-testid": "report-edit-button", children: [_jsx(Pencil, { className: "h-3.5 w-3.5" }), "Edit"] }) })] }), _jsxs("div", { className: "flex-1 overflow-hidden flex flex-col sm:flex-row relative", children: [_jsx("div", { className: "flex-1 min-w-0 overflow-auto p-4 sm:p-6 lg:p-8 bg-muted/5", children: _jsx("div", { className: "max-w-5xl mx-auto shadow-sm border rounded-lg sm:rounded-xl bg-background overflow-hidden min-h-150", children: _jsx(Suspense, { fallback: _jsx("div", { className: "p-8 text-sm text-muted-foreground", children: "Loading report\u2026" }), children: _jsx(ReportViewer, { schema: viewerSchema }) }) }) }), _jsx(Suspense, { fallback: null, children: _jsx(ReportConfigPanel, { open: configPanelOpen, onClose: handleCloseConfigPanel, config: reportConfig, onSave: handleReportConfigSave, onFieldChange: handleReportFieldChange, availableFields: availableFields }) }), _jsx(MetadataPanel, { open: showDebug, sections: [{ title: 'Report Configuration', data: previewReport }] })] })] }));
|
|
284
285
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ViewConfigPanel —
|
|
2
|
+
* ViewConfigPanel — Airtable-style simplified configuration panel.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Renders a focused, opinionated set of sections (Page / Data /
|
|
5
|
+
* Appearance / Toolbar / User actions / Navigation / Advanced) — matching
|
|
6
|
+
* Airtable's Interface designer right rail. Power-user sections (records,
|
|
7
|
+
* sharing, accessibility) are intentionally excluded to keep the panel
|
|
8
|
+
* approachable; they can be re-introduced later as a dedicated "advanced"
|
|
9
|
+
* settings dialog if needed.
|
|
8
10
|
*
|
|
9
11
|
* All changes are buffered in a local draft state. Clicking Save commits
|
|
10
12
|
* the draft via onSave; Discard resets to the original activeView.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* ViewConfigPanel —
|
|
3
|
+
* ViewConfigPanel — Airtable-style simplified configuration panel.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Renders a focused, opinionated set of sections (Page / Data /
|
|
6
|
+
* Appearance / Toolbar / User actions / Navigation / Advanced) — matching
|
|
7
|
+
* Airtable's Interface designer right rail. Power-user sections (records,
|
|
8
|
+
* sharing, accessibility) are intentionally excluded to keep the panel
|
|
9
|
+
* approachable; they can be re-introduced later as a dedicated "advanced"
|
|
10
|
+
* settings dialog if needed.
|
|
9
11
|
*
|
|
10
12
|
* All changes are buffered in a local draft state. Clicking Save commits
|
|
11
13
|
* the draft via onSave; Discard resets to the original activeView.
|
|
@@ -51,7 +53,7 @@ export function ViewConfigPanel({ open, onClose, mode = 'edit', activeView, obje
|
|
|
51
53
|
// Bridge: filter/sort → builder format
|
|
52
54
|
const filterGroupValue = useMemo(() => toFilterGroup(draft.filter), [draft.filter]);
|
|
53
55
|
const sortItemsValue = useMemo(() => toSortItems(draft.sort), [draft.sort]);
|
|
54
|
-
// Build schema
|
|
56
|
+
// Build schema — always essentials-only (Airtable-style focused layout).
|
|
55
57
|
const schema = useMemo(() => buildViewConfigSchema({
|
|
56
58
|
t,
|
|
57
59
|
fieldOptions,
|
|
@@ -59,6 +61,7 @@ export function ViewConfigPanel({ open, onClose, mode = 'edit', activeView, obje
|
|
|
59
61
|
updateField,
|
|
60
62
|
filterGroupValue,
|
|
61
63
|
sortItemsValue,
|
|
64
|
+
essentialOnly: true,
|
|
62
65
|
}), [t, fieldOptions, objectDef, updateField, filterGroupValue, sortItemsValue]);
|
|
63
66
|
// Override breadcrumb with dynamic view type
|
|
64
67
|
const viewType = draft.type || 'grid';
|
package/dist/views/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export { ActionConfirmDialog } from './ActionConfirmDialog';
|
|
|
8
8
|
export { ActionParamDialog } from './ActionParamDialog';
|
|
9
9
|
export { MetadataToggle, MetadataPanel } from './MetadataInspector';
|
|
10
10
|
export { ViewConfigPanel } from './ViewConfigPanel';
|
|
11
|
+
export { CreateViewDialog } from './CreateViewDialog';
|
|
11
12
|
export { DesignDrawer } from './DesignDrawer';
|
package/dist/views/index.js
CHANGED
|
@@ -8,4 +8,5 @@ export { ActionConfirmDialog } from './ActionConfirmDialog';
|
|
|
8
8
|
export { ActionParamDialog } from './ActionParamDialog';
|
|
9
9
|
export { MetadataToggle, MetadataPanel } from './MetadataInspector';
|
|
10
10
|
export { ViewConfigPanel } from './ViewConfigPanel';
|
|
11
|
+
export { CreateViewDialog } from './CreateViewDialog';
|
|
11
12
|
export { DesignDrawer } from './DesignDrawer';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/app-shell",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Minimal application shell for ObjectUI - framework-agnostic rendering engine",
|
|
@@ -21,39 +21,40 @@
|
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"import": "./dist/index.js",
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"./styles.css": "./src/styles.css"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"lucide-react": "^
|
|
28
|
+
"lucide-react": "^1.14.0",
|
|
28
29
|
"sonner": "^2.0.7",
|
|
29
|
-
"@object-ui/auth": "3.
|
|
30
|
-
"@object-ui/collaboration": "3.
|
|
31
|
-
"@object-ui/components": "3.
|
|
32
|
-
"@object-ui/core": "3.
|
|
33
|
-
"@object-ui/data-objectstack": "3.
|
|
34
|
-
"@object-ui/fields": "3.
|
|
35
|
-
"@object-ui/i18n": "3.
|
|
36
|
-
"@object-ui/layout": "3.
|
|
37
|
-
"@object-ui/permissions": "3.
|
|
38
|
-
"@object-ui/react": "3.
|
|
39
|
-
"@object-ui/types": "3.
|
|
30
|
+
"@object-ui/auth": "3.4.0",
|
|
31
|
+
"@object-ui/collaboration": "3.4.0",
|
|
32
|
+
"@object-ui/components": "3.4.0",
|
|
33
|
+
"@object-ui/core": "3.4.0",
|
|
34
|
+
"@object-ui/data-objectstack": "3.4.0",
|
|
35
|
+
"@object-ui/fields": "3.4.0",
|
|
36
|
+
"@object-ui/i18n": "3.4.0",
|
|
37
|
+
"@object-ui/layout": "3.4.0",
|
|
38
|
+
"@object-ui/permissions": "3.4.0",
|
|
39
|
+
"@object-ui/react": "3.4.0",
|
|
40
|
+
"@object-ui/types": "3.4.0"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
43
|
"react": "^18.0.0 || ^19.0.0",
|
|
43
44
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
44
45
|
"react-router-dom": "^6.0.0 || ^7.0.0",
|
|
45
|
-
"@object-ui/plugin-calendar": "3.
|
|
46
|
-
"@object-ui/plugin-charts": "3.
|
|
47
|
-
"@object-ui/plugin-chatbot": "3.
|
|
48
|
-
"@object-ui/plugin-dashboard": "3.
|
|
49
|
-
"@object-ui/plugin-designer": "3.
|
|
50
|
-
"@object-ui/plugin-detail": "3.
|
|
51
|
-
"@object-ui/plugin-form": "3.
|
|
52
|
-
"@object-ui/plugin-grid": "3.
|
|
53
|
-
"@object-ui/plugin-kanban": "3.
|
|
54
|
-
"@object-ui/plugin-list": "3.
|
|
55
|
-
"@object-ui/plugin-report": "3.
|
|
56
|
-
"@object-ui/plugin-view": "3.
|
|
46
|
+
"@object-ui/plugin-calendar": "3.4.0",
|
|
47
|
+
"@object-ui/plugin-charts": "3.4.0",
|
|
48
|
+
"@object-ui/plugin-chatbot": "3.4.0",
|
|
49
|
+
"@object-ui/plugin-dashboard": "3.4.0",
|
|
50
|
+
"@object-ui/plugin-designer": "3.4.0",
|
|
51
|
+
"@object-ui/plugin-detail": "3.4.0",
|
|
52
|
+
"@object-ui/plugin-form": "3.4.0",
|
|
53
|
+
"@object-ui/plugin-grid": "3.4.0",
|
|
54
|
+
"@object-ui/plugin-kanban": "3.4.0",
|
|
55
|
+
"@object-ui/plugin-list": "3.4.0",
|
|
56
|
+
"@object-ui/plugin-report": "3.4.0",
|
|
57
|
+
"@object-ui/plugin-view": "3.4.0"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@types/node": "^25.6.0",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"react-router-dom": "^7.14.2",
|
|
65
66
|
"sonner": "^2.0.7",
|
|
66
67
|
"typescript": "^6.0.3",
|
|
67
|
-
"vite": "^
|
|
68
|
+
"vite": "^8.0.10"
|
|
68
69
|
},
|
|
69
70
|
"keywords": [
|
|
70
71
|
"objectui",
|
|
@@ -84,6 +85,7 @@
|
|
|
84
85
|
},
|
|
85
86
|
"files": [
|
|
86
87
|
"dist",
|
|
88
|
+
"src/styles.css",
|
|
87
89
|
"README.md",
|
|
88
90
|
"CHANGELOG.md",
|
|
89
91
|
"LICENSE"
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @object-ui/app-shell shared Tailwind v4 styles.
|
|
3
|
+
*
|
|
4
|
+
* Import once per consumer right after `@import 'tailwindcss';`:
|
|
5
|
+
*
|
|
6
|
+
* @import 'tailwindcss';
|
|
7
|
+
* @import '@object-ui/app-shell/styles.css';
|
|
8
|
+
*
|
|
9
|
+
* Centralizing here keeps every host app (console, runner, starter, custom
|
|
10
|
+
* shells) on the same theming/variant contract.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/* Bind Tailwind's `dark:` variant to the `.dark` class on <html> (or any
|
|
14
|
+
* ancestor) instead of the OS `prefers-color-scheme`. Required so the
|
|
15
|
+
* in-app theme toggle fully controls light/dark UI under Tailwind v4. */
|
|
16
|
+
@custom-variant dark (&:where(.dark, .dark *));
|