@object-ui/console 1.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/LICENSE +21 -0
- package/README.md +118 -0
- package/dist/assets/AdvancedChartImpl-DAS1mU9o.js +7 -0
- package/dist/assets/AdvancedChartImpl-DAS1mU9o.js.br +0 -0
- package/dist/assets/AdvancedChartImpl-DAS1mU9o.js.gz +0 -0
- package/dist/assets/AuditLogPage-BQW_Xbnm.js +1 -0
- package/dist/assets/AuditLogPage-BQW_Xbnm.js.br +0 -0
- package/dist/assets/AuditLogPage-BQW_Xbnm.js.gz +0 -0
- package/dist/assets/ChartImpl-2ivTljUi.js +1 -0
- package/dist/assets/ChartImpl-2ivTljUi.js.br +0 -0
- package/dist/assets/ChartImpl-2ivTljUi.js.gz +0 -0
- package/dist/assets/DashboardView-Dt-4VhH6.js +1 -0
- package/dist/assets/DashboardView-Dt-4VhH6.js.br +0 -0
- package/dist/assets/DashboardView-Dt-4VhH6.js.gz +0 -0
- package/dist/assets/ForgotPasswordPage-zr9S5vrE.js +1 -0
- package/dist/assets/KanbanEnhanced-BlGp--J7.js +1 -0
- package/dist/assets/KanbanEnhanced-BlGp--J7.js.br +0 -0
- package/dist/assets/KanbanEnhanced-BlGp--J7.js.gz +0 -0
- package/dist/assets/KanbanImpl-B5wWMXrJ.js +1 -0
- package/dist/assets/KanbanImpl-B5wWMXrJ.js.br +0 -0
- package/dist/assets/KanbanImpl-B5wWMXrJ.js.gz +0 -0
- package/dist/assets/LoginPage-H688gsah.js +1 -0
- package/dist/assets/MarkdownImpl-BshtTFK2.js +29 -0
- package/dist/assets/MarkdownImpl-BshtTFK2.js.br +0 -0
- package/dist/assets/MarkdownImpl-BshtTFK2.js.gz +0 -0
- package/dist/assets/OrgManagementPage-x3qIkxHL.js +1 -0
- package/dist/assets/OrgManagementPage-x3qIkxHL.js.br +0 -0
- package/dist/assets/OrgManagementPage-x3qIkxHL.js.gz +0 -0
- package/dist/assets/PageView-BRN1h8QD.js +1 -0
- package/dist/assets/PageView-BRN1h8QD.js.br +0 -0
- package/dist/assets/PageView-BRN1h8QD.js.gz +0 -0
- package/dist/assets/ProfilePage-DjAiGvFb.js +1 -0
- package/dist/assets/ProfilePage-DjAiGvFb.js.br +0 -0
- package/dist/assets/ProfilePage-DjAiGvFb.js.gz +0 -0
- package/dist/assets/RecordDetailView-Bfu7541n.js +1 -0
- package/dist/assets/RecordDetailView-Bfu7541n.js.br +0 -0
- package/dist/assets/RecordDetailView-Bfu7541n.js.gz +0 -0
- package/dist/assets/RegisterPage-CR91Lc7x.js +1 -0
- package/dist/assets/ReportView-CwWsv2yl.js +1 -0
- package/dist/assets/ReportView-CwWsv2yl.js.br +0 -0
- package/dist/assets/ReportView-CwWsv2yl.js.gz +0 -0
- package/dist/assets/RoleManagementPage-DnWuzxKJ.js +1 -0
- package/dist/assets/RoleManagementPage-DnWuzxKJ.js.br +0 -0
- package/dist/assets/RoleManagementPage-DnWuzxKJ.js.gz +0 -0
- package/dist/assets/SearchResultsPage-DBpjAlh2.js +1 -0
- package/dist/assets/SearchResultsPage-DBpjAlh2.js.br +0 -0
- package/dist/assets/SearchResultsPage-DBpjAlh2.js.gz +0 -0
- package/dist/assets/UserManagementPage-o0_K0dzR.js +1 -0
- package/dist/assets/UserManagementPage-o0_K0dzR.js.br +0 -0
- package/dist/assets/UserManagementPage-o0_K0dzR.js.gz +0 -0
- package/dist/assets/ViewDesignerPage-BbwrZa9D.js +1 -0
- package/dist/assets/ViewDesignerPage-BbwrZa9D.js.br +0 -0
- package/dist/assets/ViewDesignerPage-BbwrZa9D.js.gz +0 -0
- package/dist/assets/data-adapter-Cn800k4a.js +1 -0
- package/dist/assets/data-adapter-Cn800k4a.js.br +0 -0
- package/dist/assets/data-adapter-Cn800k4a.js.gz +0 -0
- package/dist/assets/framework-mHWN965c.js +10 -0
- package/dist/assets/framework-mHWN965c.js.br +0 -0
- package/dist/assets/framework-mHWN965c.js.gz +0 -0
- package/dist/assets/index-BjEGJcpx.js +56 -0
- package/dist/assets/index-BjEGJcpx.js.br +0 -0
- package/dist/assets/index-BjEGJcpx.js.gz +0 -0
- package/dist/assets/index-CUnVdETN.css +1 -0
- package/dist/assets/index-CUnVdETN.css.br +0 -0
- package/dist/assets/index-CUnVdETN.css.gz +0 -0
- package/dist/assets/infrastructure-aS2LF8OZ.js +1 -0
- package/dist/assets/infrastructure-aS2LF8OZ.js.br +0 -0
- package/dist/assets/infrastructure-aS2LF8OZ.js.gz +0 -0
- package/dist/assets/maplibre-gl-D2AsLM0J.js +811 -0
- package/dist/assets/maplibre-gl-D2AsLM0J.js.br +0 -0
- package/dist/assets/maplibre-gl-D2AsLM0J.js.gz +0 -0
- package/dist/assets/plugins-core-CcBSZCjG.js +4 -0
- package/dist/assets/plugins-core-CcBSZCjG.js.br +0 -0
- package/dist/assets/plugins-core-CcBSZCjG.js.gz +0 -0
- package/dist/assets/plugins-views-DQwkCaaO.js +60 -0
- package/dist/assets/plugins-views-DQwkCaaO.js.br +0 -0
- package/dist/assets/plugins-views-DQwkCaaO.js.gz +0 -0
- package/dist/assets/plugins-views-P3eB-els.css +1 -0
- package/dist/assets/plugins-views-P3eB-els.css.br +0 -0
- package/dist/assets/plugins-views-P3eB-els.css.gz +0 -0
- package/dist/assets/systemObjects-DSpePIIy.js +1 -0
- package/dist/assets/systemObjects-DSpePIIy.js.br +2 -0
- package/dist/assets/systemObjects-DSpePIIy.js.gz +0 -0
- package/dist/assets/ui-components-DVonQS7H.js +31 -0
- package/dist/assets/ui-components-DVonQS7H.js.br +0 -0
- package/dist/assets/ui-components-DVonQS7H.js.gz +0 -0
- package/dist/assets/ui-components-GrNdJOi1.css +1 -0
- package/dist/assets/ui-components-GrNdJOi1.css.br +0 -0
- package/dist/assets/ui-components-GrNdJOi1.css.gz +0 -0
- package/dist/assets/ui-layout-BENIRxAF.js +1 -0
- package/dist/assets/ui-layout-BENIRxAF.js.br +0 -0
- package/dist/assets/ui-layout-BENIRxAF.js.gz +0 -0
- package/dist/assets/vendor-charts-CSvoW-yB.js +65 -0
- package/dist/assets/vendor-charts-CSvoW-yB.js.br +0 -0
- package/dist/assets/vendor-charts-CSvoW-yB.js.gz +0 -0
- package/dist/assets/vendor-dndkit-DRGpK6sP.js +5 -0
- package/dist/assets/vendor-dndkit-DRGpK6sP.js.br +0 -0
- package/dist/assets/vendor-dndkit-DRGpK6sP.js.gz +0 -0
- package/dist/assets/vendor-i18n-D5KbMT7w.js +9 -0
- package/dist/assets/vendor-i18n-D5KbMT7w.js.br +0 -0
- package/dist/assets/vendor-i18n-D5KbMT7w.js.gz +0 -0
- package/dist/assets/vendor-icons-CQ8b-fGy.js +8671 -0
- package/dist/assets/vendor-icons-CQ8b-fGy.js.br +0 -0
- package/dist/assets/vendor-icons-CQ8b-fGy.js.gz +0 -0
- package/dist/assets/vendor-objectstack-DqojdwYW.js +37 -0
- package/dist/assets/vendor-objectstack-DqojdwYW.js.br +0 -0
- package/dist/assets/vendor-objectstack-DqojdwYW.js.gz +0 -0
- package/dist/assets/vendor-radix-BbeYj_o4.js +56 -0
- package/dist/assets/vendor-radix-BbeYj_o4.js.br +0 -0
- package/dist/assets/vendor-radix-BbeYj_o4.js.gz +0 -0
- package/dist/assets/vendor-react-Dy_xkBQQ.js +60 -0
- package/dist/assets/vendor-react-Dy_xkBQQ.js.br +0 -0
- package/dist/assets/vendor-react-Dy_xkBQQ.js.gz +0 -0
- package/dist/assets/vendor-ui-utils-h6yAcIi9.js +1 -0
- package/dist/assets/vendor-ui-utils-h6yAcIi9.js.br +0 -0
- package/dist/assets/vendor-ui-utils-h6yAcIi9.js.gz +0 -0
- package/dist/assets/vendor-zod-Dpl-cylz.js +39 -0
- package/dist/assets/vendor-zod-Dpl-cylz.js.br +0 -0
- package/dist/assets/vendor-zod-Dpl-cylz.js.gz +0 -0
- package/dist/index.html +49 -0
- package/dist/index.html.br +0 -0
- package/dist/index.html.gz +0 -0
- package/dist/manifest.json +19 -0
- package/dist/mockServiceWorker.js +349 -0
- package/dist/mockServiceWorker.js.br +0 -0
- package/dist/mockServiceWorker.js.gz +0 -0
- package/dist/stats.html +4949 -0
- package/package.json +98 -0
- package/plugin.ts +177 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ObjectQL
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# ObjectStack Console
|
|
2
|
+
|
|
3
|
+
The standard runtime UI for ObjectStack applications. This package provides the **Console** — a full-featured enterprise admin interface that renders from JSON metadata alone, requiring zero custom pages.
|
|
4
|
+
|
|
5
|
+
> **Version:** 0.5.1 | **Spec:** @objectstack/spec v3.0.0 | [Full Roadmap →](./CONSOLE_ROADMAP.md)
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Server-Driven UI**: Renders objects, views, dashboards, reports, and pages from JSON schemas
|
|
10
|
+
- **Multi-App Support**: Switch between apps defined in your stack, each with its own branding
|
|
11
|
+
- **Plugin Architecture**: 15+ view plugins (grid, kanban, calendar, timeline, chart, map, gantt, gallery, etc.)
|
|
12
|
+
- **Expression Engine**: Dynamic visibility, disabled, and hidden expressions evaluated at runtime
|
|
13
|
+
- **CRUD Operations**: Create, edit, delete records via schema-driven forms and dialogs
|
|
14
|
+
- **Command Palette**: `⌘+K` for quick navigation across apps and objects
|
|
15
|
+
- **Dark/Light Theme**: System-aware theme with per-app branding (logo, colors, favicon)
|
|
16
|
+
- **Developer Tools**: Built-in metadata inspector with collapsible sections and copy-to-clipboard support
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# From the repository root
|
|
22
|
+
pnpm install
|
|
23
|
+
|
|
24
|
+
# Start development server (with MSW mock backend)
|
|
25
|
+
pnpm dev
|
|
26
|
+
|
|
27
|
+
# Build for production
|
|
28
|
+
pnpm build
|
|
29
|
+
|
|
30
|
+
# Run tests
|
|
31
|
+
pnpm test
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The console opens at **http://localhost:5173** with a simulated backend (CRM + Todo + Kitchen Sink demo data).
|
|
35
|
+
|
|
36
|
+
## Running Modes
|
|
37
|
+
|
|
38
|
+
The console supports two distinct running modes:
|
|
39
|
+
|
|
40
|
+
### 1. Development Mode (Standalone)
|
|
41
|
+
**Command:** `pnpm dev`
|
|
42
|
+
|
|
43
|
+
- Runs Vite dev server directly with Hot Module Replacement (HMR)
|
|
44
|
+
- Uses Mock Service Worker (MSW) to intercept API calls in the browser
|
|
45
|
+
- Fast development cycle with instant feedback
|
|
46
|
+
- Best for UI development and testing
|
|
47
|
+
- Opens at http://localhost:5173
|
|
48
|
+
|
|
49
|
+
### 2. Plugin Mode (Production-like)
|
|
50
|
+
**Command:** `pnpm start`
|
|
51
|
+
|
|
52
|
+
- Runs via `@objectstack/cli serve` with ObjectStack runtime
|
|
53
|
+
- Serves the console as a UI plugin from `dist/` directory
|
|
54
|
+
- Tests plugin integration and routing
|
|
55
|
+
- Simulates production deployment pattern
|
|
56
|
+
- Useful for testing the plugin architecture
|
|
57
|
+
- Opens at http://localhost:3000 (default CLI port)
|
|
58
|
+
|
|
59
|
+
Both modes support the same features and use the same codebase. Choose development mode for fast iteration, and plugin mode to verify deployment behavior.
|
|
60
|
+
|
|
61
|
+
## ObjectStack Spec Compliance
|
|
62
|
+
|
|
63
|
+
### AppSchema Support
|
|
64
|
+
- ✅ `name`, `label`, `icon` — Basic app metadata
|
|
65
|
+
- ✅ `description`, `version` — Optional app information
|
|
66
|
+
- ✅ `homePageId` — Custom landing page configuration
|
|
67
|
+
- ✅ `requiredPermissions` — Permission-based access control
|
|
68
|
+
- ✅ `branding.logo`, `branding.primaryColor`, `branding.favicon` — App branding
|
|
69
|
+
|
|
70
|
+
### Navigation Support
|
|
71
|
+
- ✅ `object` — Navigate to object list views
|
|
72
|
+
- ✅ `dashboard` — Navigate to dashboards
|
|
73
|
+
- ✅ `page` — Navigate to custom pages
|
|
74
|
+
- ✅ `report` — Navigate to reports
|
|
75
|
+
- ✅ `url` — External URL navigation with target support
|
|
76
|
+
- ✅ `group` — Nested navigation groups with collapse
|
|
77
|
+
- ✅ `visible` / `visibleOn` — Expression-based visibility conditions
|
|
78
|
+
|
|
79
|
+
### Object Operations
|
|
80
|
+
- ✅ Multi-view switching (grid, kanban, calendar, timeline, chart, map, gantt, gallery)
|
|
81
|
+
- ✅ Create / Read / Update / Delete via ObjectForm
|
|
82
|
+
- ✅ Search, filter, sort across all view types
|
|
83
|
+
- ✅ Record detail page and drawer preview
|
|
84
|
+
- ✅ Metadata inspector for developers
|
|
85
|
+
|
|
86
|
+
## Architecture
|
|
87
|
+
|
|
88
|
+
The console is a thin orchestration layer on top of the ObjectUI plugin system:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Console App
|
|
92
|
+
├── @object-ui/react — SchemaRenderer (JSON → Component)
|
|
93
|
+
├── @object-ui/components — Shadcn UI primitives
|
|
94
|
+
├── @object-ui/layout — AppShell, Sidebar
|
|
95
|
+
├── @object-ui/core — ExpressionEvaluator, ActionRunner
|
|
96
|
+
├── @object-ui/data-objectstack — API adapter (auto-reconnect, caching)
|
|
97
|
+
├── @object-ui/plugin-view — ObjectView (multi-view container)
|
|
98
|
+
├── @object-ui/plugin-form — ObjectForm (CRUD forms)
|
|
99
|
+
├── @object-ui/plugin-grid — DataGrid (AG Grid)
|
|
100
|
+
├── @object-ui/plugin-kanban — Kanban board
|
|
101
|
+
├── @object-ui/plugin-calendar— Calendar view
|
|
102
|
+
├── @object-ui/plugin-dashboard — Dashboard renderer
|
|
103
|
+
├── @object-ui/plugin-report — Report viewer/builder
|
|
104
|
+
└── 8 more view plugins...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Documentation
|
|
108
|
+
|
|
109
|
+
| Document | Description |
|
|
110
|
+
|----------|-------------|
|
|
111
|
+
| [Console Roadmap](./CONSOLE_ROADMAP.md) | Full development plan with phases, timeline, and verified status |
|
|
112
|
+
| [Getting Started Guide](../../content/docs/guide/console.md) | User-facing documentation |
|
|
113
|
+
| [Architecture Guide](../../content/docs/guide/console-architecture.md) | Technical deep-dive |
|
|
114
|
+
| [UI Improvement Proposal](./docs/UI_IMPROVEMENT_PROPOSAL.md) | Modern UI design improvements for metadata inspector |
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
MIT
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{r as g,j as e}from"./vendor-react-Dy_xkBQQ.js";import{T,L as W,a as H,P as R,c as F,d as G,e as E,f as X,g as Y,h as Z,i as q,S as M,C as N,X as O,Y as D,Z as U,j as J,A as Q,k as V,B as z,b as ee,l as te,m as ne}from"./vendor-charts-CSvoW-yB.js";import"./vendor-ui-utils-h6yAcIi9.js";import"./vendor-i18n-D5KbMT7w.js";const j=(...a)=>a.filter(Boolean).join(" "),re={light:"",dark:".dark"},I=g.createContext(null);function B(){const a=g.useContext(I);if(!a)throw new Error("useChart must be used within a <ChartContainer />");return a}function y({id:a,className:t,children:n,config:r,...l}){const c=g.useId(),o=`chart-${a||c.replace(/:/g,"")}`;return e.jsx(I.Provider,{value:{config:r},children:e.jsxs("div",{"data-slot":"chart","data-chart":o,className:j("flex w-full h-[350px] justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground",t),...l,children:[e.jsx(ae,{id:o,config:r}),e.jsx(H,{width:"100%",height:"100%",children:n})]})})}const ae=({id:a,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?e.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(re).map(([r,l])=>`
|
|
2
|
+
${l} [data-chart=${a}] {
|
|
3
|
+
${n.map(([c,o])=>{const u=o.theme?.[r]||o.color;return u?` --color-${c}: ${u};`:null}).join(`
|
|
4
|
+
`)}
|
|
5
|
+
}
|
|
6
|
+
`).join(`
|
|
7
|
+
`)}}):null},C=T;function w({active:a,payload:t,className:n,indicator:r="dot",hideLabel:l=!1,hideIndicator:c=!1,label:o,labelFormatter:u,labelClassName:h,formatter:m,color:s,nameKey:d,labelKey:f}){const{config:x}=B(),v=g.useMemo(()=>{if(l||!t?.length)return null;const[i]=t,k=`${f||i?.dataKey||i?.name||"value"}`,P=$(x,i,k),p=!f&&typeof o=="string"?x[o]?.label||o:P?.label;return u?e.jsx("div",{className:j("font-medium",h),children:u(p,t)}):p?e.jsx("div",{className:j("font-medium",h),children:p}):null},[o,u,t,l,h,x,f]);if(!a||!t?.length)return null;const b=t.length===1&&r!=="dot";return e.jsxs("div",{className:j("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",n),children:[b?null:v,e.jsx("div",{className:"grid gap-1.5",children:t.filter(i=>i.type!=="none").map((i,k)=>{const P=`${d||i.name||i.dataKey||"value"}`,p=$(x,i,P),A=s||i.payload.fill||i.color;return e.jsx("div",{className:j("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",r==="dot"?"items-center":""),children:m&&i?.value!==void 0&&i.name?m(i.value,i.name,i,k,i.payload):e.jsxs(e.Fragment,{children:[p?.icon?e.jsx(p.icon,{}):!c&&e.jsx("div",{className:j("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",r==="dot"?"h-2.5 w-2.5":"",r==="line"?"w-1":"",r==="dashed"?"w-0 border-[1.5px] border-dashed bg-transparent":"",b&&r==="dashed"?"my-0.5":""),style:{"--color-bg":A,"--color-border":A}}),e.jsxs("div",{className:j("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[e.jsxs("div",{className:"grid gap-1.5",children:[b?v:null,e.jsx("span",{className:"text-muted-foreground",children:p?.label||i.name})]}),i.value&&e.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:i.value.toLocaleString()})]})]})},i.dataKey)})})]})}const K=W;function L({className:a,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:l}){const{config:c}=B();return n?.length?e.jsx("div",{className:j("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",a),children:n.filter(o=>o.type!=="none").map(o=>{const u=`${l||o.dataKey||"value"}`,h=$(c,o,u);return e.jsxs("div",{className:j("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[h?.icon&&!t?e.jsx(h.icon,{}):e.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:o.color}}),h?.label]},o.value)})}):null}function $(a,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let l=n;return n in t&&typeof t[n]=="string"?l=t[n]:r&&n in r&&typeof r[n]=="string"&&(l=r[n]),l in a?a[l]:a[n]}const _="hsl(var(--primary))",se={slate:"#64748b",gray:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"},S=a=>se[a]||a;function ce({chartType:a="bar",data:t=[],config:n={},xAxisKey:r="name",series:l=[],className:c=""}){const[o,u]=g.useState(!1);g.useEffect(()=>{const s=()=>u(window.innerWidth<640);return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]);const h={bar:z,line:V,area:Q,pie:R,donut:R,radar:E,scatter:M}[a]||z;console.log("📈 Rendering Chart:",{chartType:a,dataLength:t.length,config:n,series:l,xAxisKey:r});const m=()=>["hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"];if(a==="pie"||a==="donut"){const s=a==="donut"?60:0;return e.jsx(y,{config:n,className:c,children:e.jsxs(R,{children:[e.jsx(C,{cursor:!1,content:e.jsx(w,{hideLabel:!0})}),e.jsx(F,{data:t,dataKey:l[0]?.dataKey||"value",nameKey:r||"name",innerRadius:s,strokeWidth:5,paddingAngle:2,outerRadius:80,children:t.map((d,f)=>{let x=n[d[r]]?.color;if(!x){const v=m();x=v[f%v.length]}return e.jsx(G,{fill:S(x)},`cell-${f}`)})}),e.jsx(K,{content:e.jsx(L,{nameKey:r}),...o&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}})]})})}return a==="radar"?e.jsx(y,{config:n,className:c,children:e.jsxs(E,{data:t,children:[e.jsx(X,{}),e.jsx(Y,{dataKey:r}),e.jsx(Z,{}),e.jsx(C,{content:e.jsx(w,{})}),e.jsx(K,{content:e.jsx(L,{}),...o&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map(s=>{const d=S(n[s.dataKey]?.color||_);return e.jsx(q,{dataKey:s.dataKey,stroke:d,fill:d,fillOpacity:.6},s.dataKey)})]})}):a==="scatter"?e.jsx(y,{config:n,className:c,children:e.jsxs(M,{children:[e.jsx(N,{vertical:!1}),e.jsx(O,{type:"number",dataKey:r,name:String(n[r]?.label||r),tickLine:!1,axisLine:!1,interval:o?Math.ceil(t.length/5):0}),e.jsx(D,{type:"number",dataKey:l[0]?.dataKey||"value",name:String(n[l[0]?.dataKey]?.label||l[0]?.dataKey),tickLine:!1,axisLine:!1}),e.jsx(U,{type:"number",range:[60,400]}),e.jsx(C,{content:e.jsx(w,{})}),e.jsx(K,{content:e.jsx(L,{}),...o&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map((s,d)=>{const f=m(),x=S(n[s.dataKey]?.color||f[d%f.length]);return e.jsx(J,{name:n[s.dataKey]?.label||s.dataKey,data:t,fill:x},s.dataKey)})]})}):e.jsx(y,{config:n,className:c,children:e.jsxs(h,{data:t,children:[e.jsx(N,{vertical:!1}),e.jsx(O,{dataKey:r,tickLine:!1,tickMargin:10,axisLine:!1,interval:o?Math.ceil(t.length/5):0,tickFormatter:s=>s&&typeof s=="string"?s.slice(0,3):s}),e.jsx(C,{content:e.jsx(w,{})}),e.jsx(K,{content:e.jsx(L,{}),...o&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map(s=>{const d=S(n[s.dataKey]?.color||_);return a==="bar"?e.jsx(ee,{dataKey:s.dataKey,fill:d,radius:4},s.dataKey):a==="line"?e.jsx(te,{type:"monotone",dataKey:s.dataKey,stroke:d,strokeWidth:2,dot:!1},s.dataKey):a==="area"?e.jsx(ne,{type:"monotone",dataKey:s.dataKey,fill:d,stroke:d,fillOpacity:.4},s.dataKey):null})]})})}export{ce as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-react-Dy_xkBQQ.js";import{Y as l,Z as m,a1 as d}from"./ui-components-DVonQS7H.js";import"./framework-mHWN965c.js";import"./vendor-ui-utils-h6yAcIi9.js";import{s as n}from"./systemObjects-DSpePIIy.js";import{bx as a}from"./vendor-icons-CQ8b-fGy.js";import"./vendor-radix-BbeYj_o4.js";import"./vendor-i18n-D5KbMT7w.js";import"./vendor-charts-CSvoW-yB.js";const t=n.find(s=>s.name==="sys_audit_log");function N(){return e.jsxs("div",{className:"flex flex-col gap-4 sm:gap-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"bg-primary/10 p-2 rounded-md shrink-0",children:e.jsx(a,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Audit Log"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:"View system activity and user actions"})]})]}),e.jsx(l,{children:e.jsx(m,{className:"p-0",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsx("tr",{className:"border-b bg-muted/50",children:t.views[0].columns.map(s=>{const r=t.fields.find(i=>i.name===s);return e.jsx("th",{className:"h-10 px-3 sm:px-4 text-left font-medium text-muted-foreground whitespace-nowrap",children:r?.label??s},s)})})}),e.jsx("tbody",{children:e.jsx("tr",{children:e.jsx("td",{className:"p-4 sm:p-6 text-center text-sm text-muted-foreground",colSpan:t.views[0].columns.length,children:e.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[e.jsx(a,{className:"h-8 w-8 text-muted-foreground/50"}),e.jsx("p",{children:"Connect to ObjectStack server to load audit logs."}),e.jsx(d,{variant:"secondary",className:"text-xs",children:"Read-only"})]})})})})]})})})})]})}export{N as AuditLogPage};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./vendor-react-Dy_xkBQQ.js";import{a as l,B as n,C as d,X as f,Y as p,T as x,L as u,b as c}from"./vendor-charts-CSvoW-yB.js";import"./vendor-ui-utils-h6yAcIi9.js";import"./vendor-i18n-D5KbMT7w.js";function y({data:e=[],dataKey:s="value",xAxisKey:a="name",height:t=400,className:i="",color:o="hsl(var(--primary))"}){return r.jsx("div",{className:`p-2 sm:p-3 md:p-4 rounded-xl border border-border bg-card/40 backdrop-blur-sm shadow-lg shadow-background/5 ${i}`,children:r.jsx(l,{width:"100%",height:t,children:r.jsxs(n,{data:e,margin:{top:10,right:10,left:10,bottom:5},children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[r.jsx("stop",{offset:"0%",stopColor:o,stopOpacity:1}),r.jsx("stop",{offset:"90%",stopColor:o,stopOpacity:.6}),r.jsx("stop",{offset:"100%",stopColor:o,stopOpacity:.3})]}),r.jsxs("filter",{id:"glow",height:"130%",children:[r.jsx("feGaussianBlur",{in:"SourceAlpha",stdDeviation:"3",result:"blur"}),r.jsx("feOffset",{in:"blur",dx:"0",dy:"0",result:"offsetBlur"}),r.jsx("feFlood",{floodColor:o,floodOpacity:"0.5",result:"offsetColor"}),r.jsx("feComposite",{in:"offsetColor",in2:"offsetBlur",operator:"in",result:"offsetBlur"}),r.jsxs("feMerge",{children:[r.jsx("feMergeNode",{in:"offsetBlur"}),r.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),r.jsx(d,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),r.jsx(f,{dataKey:a,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12,fontFamily:"monospace"},tickLine:!1,axisLine:{stroke:"hsl(var(--border))"},dy:10}),r.jsx(p,{tick:{fill:"hsl(var(--muted-foreground))",fontSize:12,fontFamily:"monospace"},tickLine:!1,axisLine:!1}),r.jsx(x,{cursor:{fill:"hsl(var(--muted))",opacity:.2},contentStyle:{backgroundColor:"hsl(var(--popover))",borderColor:"hsl(var(--border))",color:"hsl(var(--popover-foreground))",borderRadius:"8px",fontFamily:"monospace",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"},itemStyle:{color:"hsl(var(--primary))"}}),r.jsx(u,{wrapperStyle:{paddingTop:"20px",fontFamily:"monospace"}}),r.jsx(c,{dataKey:s,fill:"url(#barGradient)",radius:[4,4,0,0],filter:"url(#glow)",animationDuration:1500})]})})})}export{y as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,h as x,r as i}from"./vendor-react-Dy_xkBQQ.js";import{a as h}from"./plugins-views-DQwkCaaO.js";import{a9 as e,aH as p,aI as f,aJ as u}from"./ui-components-DVonQS7H.js";import"./framework-mHWN965c.js";import"./vendor-ui-utils-h6yAcIi9.js";import{u as j,b as g,r as d,M as N,a as b}from"./index-BjEGJcpx.js";import{aD as w}from"./vendor-icons-CQ8b-fGy.js";import"./vendor-charts-CSvoW-yB.js";import"./vendor-i18n-D5KbMT7w.js";import"./vendor-radix-BbeYj_o4.js";import"./plugins-core-CcBSZCjG.js";import"./data-adapter-Cn800k4a.js";import"./vendor-objectstack-DqojdwYW.js";import"./vendor-zod-Dpl-cylz.js";import"./infrastructure-aS2LF8OZ.js";import"./ui-layout-BENIRxAF.js";function v({cards:t=6}){return s.jsxs("div",{className:"w-full space-y-6 p-4 sm:p-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(e,{className:"h-7 w-56"}),s.jsx(e,{className:"h-4 w-80"})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:Array.from({length:4}).map((l,r)=>s.jsxs("div",{className:"rounded-lg border p-4 space-y-2",children:[s.jsx(e,{className:"h-4 w-20"}),s.jsx(e,{className:"h-8 w-24"}),s.jsx(e,{className:"h-3 w-16"})]},`stat-${r}`))}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:t}).map((l,r)=>s.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(e,{className:"h-5 w-32"}),s.jsx(e,{className:"h-5 w-5 rounded-full"})]}),s.jsx(e,{className:"h-40 w-full"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(e,{className:"h-3 w-16"}),s.jsx(e,{className:"h-3 w-12"})]})]},`widget-${r}`))})]})}function F({dataSource:t}){const{dashboardName:l}=x(),{showDebug:r,toggleDebug:m}=j(),[c,o]=i.useState(!0);i.useEffect(()=>{o(!0),queueMicrotask(()=>o(!1))},[l]);const a=g.dashboards?.find(n=>n.name===l);return c?s.jsx(v,{}):a?s.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:[s.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:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h1",{className:"text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate",children:d(a.label)||a.name}),a.description&&s.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:d(a.description)})]}),s.jsx("div",{className:"shrink-0",children:s.jsx(N,{open:r,onToggle:m})})]}),s.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col sm:flex-row relative",children:[s.jsx("div",{className:"flex-1 overflow-auto p-4 sm:p-6",children:s.jsx(h,{schema:a,dataSource:t})}),s.jsx(b,{open:r,sections:[{title:"Dashboard Configuration",data:a}]})]})]}):s.jsx("div",{className:"h-full flex items-center justify-center p-8",children:s.jsxs(p,{children:[s.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:s.jsx(w,{className:"h-6 w-6 text-muted-foreground"})}),s.jsx(f,{children:"Dashboard Not Found"}),s.jsxs(u,{children:['The dashboard "',l,'" could not be found. It may have been removed or renamed.']})]})})}export{F as DashboardView};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./vendor-react-Dy_xkBQQ.js";import{F as o}from"./infrastructure-aS2LF8OZ.js";import"./vendor-i18n-D5KbMT7w.js";function i(){return r.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 py-8",children:r.jsx(o,{loginUrl:"/login"})})}export{i as ForgotPasswordPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e}from"./vendor-react-Dy_xkBQQ.js";import{u as F}from"./plugins-core-CcBSZCjG.js";import{u as H,a as K,D as P,c as Y,b as M,d as U,P as Z,e as z,S as q,v as G,C as J}from"./vendor-dndkit-DRGpK6sP.js";import{B as Q,a1 as I,Y as W,$ as X,a0 as _,ab as ee,Z as se}from"./ui-components-DVonQS7H.js";import"./framework-mHWN965c.js";import"./vendor-ui-utils-h6yAcIi9.js";import{a as te,C as re,T as ae}from"./vendor-icons-CQ8b-fGy.js";import"./plugins-views-DQwkCaaO.js";import"./vendor-charts-CSvoW-yB.js";import"./vendor-i18n-D5KbMT7w.js";import"./vendor-radix-BbeYj_o4.js";const k=(...s)=>s.filter(Boolean).join(" ");function E({card:s}){const{attributes:x,listeners:o,setNodeRef:m,transform:r,transition:g,isDragging:v}=z({id:s.id}),f={transform:J.Transform.toString(r),transition:g,opacity:v?.5:void 0};return e.jsx("div",{ref:m,style:f,...x,...o,children:e.jsxs(W,{className:"mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group",children:[e.jsxs(X,{className:"p-4",children:[e.jsx(_,{className:"text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors",children:s.title}),s.description&&e.jsx(ee,{className:"text-xs text-muted-foreground font-mono",children:s.description})]}),s.badges&&s.badges.length>0&&e.jsx(se,{className:"p-4 pt-0",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:s.badges.map((l,a)=>e.jsx(I,{variant:l.variant||"default",className:"text-xs",children:l.label},a))})})]})})}function ie({cards:s,parentRef:x}){const o=F({count:s.length,getScrollElement:()=>x.current,estimateSize:()=>120,overscan:5});return e.jsx("div",{style:{height:`${o.getTotalSize()}px`,width:"100%",position:"relative"},children:o.getVirtualItems().map(m=>{const r=s[m.index];return e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${m.start}px)`},children:e.jsx(E,{card:r})},r.id)})})}function ne({column:s,cards:x,onToggle:o,enableVirtual:m}){const r=x||[],g=c.useRef(null),{setNodeRef:v}=z({id:s.id,data:{type:"column"}}),f=s.limit&&r.length>=s.limit,l=s.limit&&r.length>=s.limit*.8;return e.jsxs("div",{ref:v,className:k("flex flex-col flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl transition-all",s.collapsed?"w-16":"w-80",s.className),children:[e.jsxs("div",{className:"p-4 border-b border-border/50 bg-muted/20 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Q,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o(!s.collapsed),children:s.collapsed?e.jsx(te,{className:"h-4 w-4"}):e.jsx(re,{className:"h-4 w-4"})}),!s.collapsed&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase truncate",children:s.title}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:k("font-mono text-xs",f?"text-destructive":l?"text-yellow-500":"text-muted-foreground"),children:[r.length,s.limit&&` / ${s.limit}`]}),f&&e.jsx(I,{variant:"destructive",className:"text-xs",children:"Full"}),l&&!f&&e.jsx(ae,{className:"h-3 w-3 text-yellow-500"})]})]})]}),s.collapsed&&e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("span",{className:"font-mono text-xs font-bold text-primary/90 [writing-mode:vertical-rl] rotate-180",children:s.title}),e.jsx(I,{variant:"secondary",className:"text-xs",children:r.length})]})]}),!s.collapsed&&e.jsx("div",{ref:g,className:"flex-1 p-4 overflow-y-auto",style:{maxHeight:"600px"},children:e.jsx(q,{items:r.map(a=>a.id),strategy:G,children:m?e.jsx(ie,{cards:r,parentRef:g}):e.jsx("div",{className:"space-y-2",children:r.map(a=>e.jsx(E,{card:a},a.id))})})})]})}function ve({columns:s,onCardMove:x,onColumnToggle:o,enableVirtualScrolling:m=!1,virtualScrollThreshold:r=50,className:g}){const[v,f]=c.useState(null),l=c.useMemo(()=>(s||[]).map(t=>({...t,cards:t.cards||[]})),[s]),[a,S]=c.useState(l);c.useEffect(()=>{S(l)},[l]);const T=H(K(Z,{activationConstraint:{distance:8}})),V=t=>{const{active:i}=t,n=$(i.id);f(n)},L=t=>{const{active:i,over:n}=t;if(f(null),!n)return;const d=i.id,b=n.id;if(d===b)return;const u=B(d),j=B(b)||O(b);if(!(!u||!j))if(u.id===j.id){const h=[...u.cards],C=h.findIndex(p=>p.id===d),D=h.findIndex(p=>p.id===b),R=U(h,C,D);S(p=>p.map(N=>N.id===u.id?{...N,cards:R}:N))}else{const h=[...u.cards],C=[...j.cards],D=h.findIndex(w=>w.id===d),p=b===j.id?C.length:C.findIndex(w=>w.id===b),[N]=h.splice(D,1);C.splice(p,0,N),S(w=>w.map(y=>y.id===u.id?{...y,cards:h}:y.id===j.id?{...y,cards:C}:y)),x&&x(d,u.id,j.id,p)}},$=c.useCallback(t=>{for(const i of a){const n=i.cards.find(d=>d.id===t);if(n)return n}return null},[a]),B=c.useCallback(t=>a.find(i=>i.cards.some(n=>n.id===t))||null,[a]),O=c.useCallback(t=>a.find(i=>i.id===t)||null,[a]),A=c.useCallback((t,i)=>{S(n=>n.map(d=>d.id===t?{...d,collapsed:i}:d)),o?.(t,i)},[o]);return e.jsxs(P,{sensors:T,collisionDetection:Y,onDragStart:V,onDragEnd:L,children:[e.jsx("div",{className:k("flex gap-4 overflow-x-auto p-4",g),children:a.map(t=>{const i=m&&t.cards.length>r;return e.jsx(ne,{column:t,cards:t.cards,onToggle:n=>A(t.id,n),enableVirtual:i},t.id)})}),e.jsx(M,{children:v?e.jsx(E,{card:v}):null})]})}export{ve as KanbanEnhanced,ve as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as h}from"./vendor-react-Dy_xkBQQ.js";import{u as H,a as B,D as L,c as Y,b as Z,d as q,T as z,P as G,e as E,S as J,v as M,C as Q}from"./vendor-dndkit-DRGpK6sP.js";import{a1 as K,aP as U,Y as V,$ as W,a0 as X,ab as _,Z as ee}from"./ui-components-DVonQS7H.js";import{i as se,j as re}from"./framework-mHWN965c.js";import"./vendor-ui-utils-h6yAcIi9.js";import"./vendor-icons-CQ8b-fGy.js";import"./vendor-radix-BbeYj_o4.js";import"./vendor-i18n-D5KbMT7w.js";import"./vendor-charts-CSvoW-yB.js";const P=(...s)=>s.filter(Boolean).join(" ");function T({card:s,onCardClick:i}){const{attributes:x,listeners:n,setNodeRef:a,transform:o,transition:c,isDragging:C}=E({id:s.id}),d={transform:Q.Transform.toString(o),transition:c,opacity:C?.5:void 0};return e.jsx("div",{ref:a,style:d,...x,...n,role:"listitem","aria-label":s.title,onClick:()=>i?.(s),children:e.jsxs(V,{className:"mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group touch-manipulation",children:[e.jsxs(W,{className:"p-2 sm:p-4",children:[e.jsx(X,{className:"text-xs sm:text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors",children:s.title}),s.description&&e.jsx(_,{className:"text-xs text-muted-foreground font-mono line-clamp-2 sm:line-clamp-none",children:s.description})]}),s.badges&&s.badges.length>0&&e.jsx(ee,{className:"p-2 sm:p-4 pt-0",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:s.badges.map((b,S)=>e.jsx(K,{variant:b.variant||"default",className:"text-xs",children:b.label},S))})})]})})}function ae({column:s,cards:i,onCardClick:x}){const n=i||[],{setNodeRef:a}=E({id:s.id,data:{type:"column"}}),o=s.limit&&n.length>=s.limit;return e.jsxs("div",{ref:a,role:"group","aria-label":s.title,className:P("flex flex-col w-[85vw] sm:w-80 flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl snap-start",s.className),children:[e.jsx("div",{className:"p-3 sm:p-4 border-b border-border/50 bg-muted/20",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{id:`kanban-col-${s.id}`,className:"font-mono text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase truncate",children:s.title}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-mono text-xs text-muted-foreground","aria-label":`${n.length} cards${s.limit?` of ${s.limit} maximum`:""}`,children:[n.length,s.limit&&` / ${s.limit}`]}),o&&e.jsx(K,{variant:"destructive",className:"text-xs",children:"Full"})]})]})}),e.jsx(U,{className:"flex-1 p-4",children:e.jsx(J,{items:n.map(c=>c.id),strategy:M,children:e.jsx("div",{className:"space-y-2",role:"list","aria-label":`${s.title} cards`,children:n.map(c=>e.jsx(T,{card:c,onCardClick:x},c.id))})})})]})}function te({children:s}){const i=re();return e.jsx(e.Fragment,{children:s(i)})}function ue({columns:s,onCardMove:i,onCardClick:x,className:n}){return se()?e.jsx(te,{children:o=>e.jsx($,{columns:s,onCardMove:i,onCardClick:x,className:n,dnd:o})}):e.jsx($,{columns:s,onCardMove:i,onCardClick:x,className:n,dnd:null})}function $({columns:s,onCardMove:i,onCardClick:x,className:n,dnd:a}){const[o,c]=h.useState(null),C=h.useMemo(()=>(s||[]).map(r=>({...r,cards:r.cards||[]})),[s]),[d,b]=h.useState(C);h.useEffect(()=>{b(C)},[C]);const S=H(B(G,{activationConstraint:{distance:5}}),B(z,{activationConstraint:{delay:200,tolerance:5}})),O=r=>{const{active:m}=r,t=A(m.id);if(c(t),a&&t){const l=w(t.id);l&&a.startDrag({id:t.id,type:"kanban-card",data:t,sourceId:l.id})}},R=r=>{const{active:m,over:t}=r;if(c(null),!t){a&&a.endDrag();return}const l=m.id,v=t.id;if(l===v){a&&a.endDrag();return}const u=w(l),p=w(v)||F(v);if(!u||!p){a&&a.endDrag();return}if(u.id===p.id){const g=[...u.cards],j=g.findIndex(f=>f.id===l),I=g.findIndex(f=>f.id===v),k=q(g,j,I);b(f=>f.map(D=>D.id===u.id?{...D,cards:k}:D))}else{const g=[...u.cards],j=[...p.cards],I=g.findIndex(N=>N.id===l),f=v===p.id?j.length:j.findIndex(N=>N.id===v),[D]=g.splice(I,1);j.splice(f,0,D),b(N=>N.map(y=>y.id===u.id?{...y,cards:g}:y.id===p.id?{...y,cards:j}:y)),i&&i(l,u.id,p.id,f)}a&&a.endDrag(p.id)},A=h.useCallback(r=>{for(const m of d){const t=m.cards.find(l=>l.id===r);if(t)return t}return null},[d]),w=h.useCallback(r=>d.find(m=>m.cards.some(t=>t.id===r))||null,[d]),F=h.useCallback(r=>d.find(m=>m.id===r)||null,[d]);return e.jsxs(L,{sensors:S,collisionDetection:Y,onDragStart:O,onDragEnd:R,children:[e.jsxs("div",{className:"flex sm:hidden items-center justify-between px-3 pb-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[d.length," columns"]}),e.jsx("span",{children:"← Swipe to navigate →"})]}),e.jsx("div",{className:P("flex gap-3 sm:gap-4 overflow-x-auto snap-x snap-mandatory p-2 sm:p-4 [-webkit-overflow-scrolling:touch]",n),role:"region","aria-label":"Kanban board",children:d.map(r=>e.jsx(ae,{column:r,cards:r.cards,onCardClick:x},r.id))}),e.jsx(Z,{children:e.jsx("div",{"aria-live":"assertive","aria-label":o?`Dragging ${o.title}`:void 0,children:o?e.jsx(T,{card:o}):null})})]})}export{ue as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as s,j as r}from"./vendor-react-Dy_xkBQQ.js";import{L as o}from"./infrastructure-aS2LF8OZ.js";import"./vendor-i18n-D5KbMT7w.js";function a(){const e=s();return r.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 py-8",children:r.jsx(o,{onSuccess:()=>e("/"),registerUrl:"/register",forgotPasswordUrl:"/forgot-password"})})}export{a as LoginPage};
|