@object-ui/console 3.1.3 → 3.1.5

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.
Files changed (132) hide show
  1. package/dist/assets/AddressField-BLYuFwUv.js +1 -0
  2. package/dist/assets/AdvancedChartImpl-Dvg6YIfN.js +7 -0
  3. package/dist/assets/AppManagementPage-C5q5QBar.js +1 -0
  4. package/dist/assets/AuditLogPage-BpLFTD-b.js +1 -0
  5. package/dist/assets/AuthPageLayout-DDjJTsQ6.js +1 -0
  6. package/dist/assets/AutoNumberField-DLmi_0fk.js +1 -0
  7. package/dist/assets/AvatarField-BfoEDA_D.js +1 -0
  8. package/dist/assets/BooleanField-W3_x7RAZ.js +1 -0
  9. package/dist/assets/ChartImpl-Cwo6IWnY.js +1 -0
  10. package/dist/assets/CodeField-BWFqblAU.js +1 -0
  11. package/dist/assets/ColorField-Y8WM1wXE.js +1 -0
  12. package/dist/assets/CreateAppPage-A-VfItcx.js +1 -0
  13. package/dist/assets/CurrencyField-BeuE1bRa.js +1 -0
  14. package/dist/assets/DashboardDesignPage-N8NL-jkM.js +1 -0
  15. package/dist/assets/DashboardView-Dy0d2kFj.js +1 -0
  16. package/dist/assets/DateField-2Lf9jstN.js +1 -0
  17. package/dist/assets/DateTimeField-BkMuhOZJ.js +1 -0
  18. package/dist/assets/EditAppPage-B6HL4COW.js +1 -0
  19. package/dist/assets/EmailField-CP_O7tmo.js +1 -0
  20. package/dist/assets/FileField-CcczwlRk.js +1 -0
  21. package/dist/assets/ForgotPasswordPage-Slo6CHvD.js +1 -0
  22. package/dist/assets/FormulaField-DLdg1ImO.js +1 -0
  23. package/dist/assets/GeolocationField-DqeMjnyo.js +1 -0
  24. package/dist/assets/GridField-DaWMYyuc.js +1 -0
  25. package/dist/assets/ImageField-DAn05d1y.js +1 -0
  26. package/dist/assets/KanbanEnhanced-Dj7Qccu2.js +1 -0
  27. package/dist/assets/KanbanImpl-D9BbG_RT.js +1 -0
  28. package/dist/assets/LocationField-DYHVF_gq.js +1 -0
  29. package/dist/assets/LoginPage-D2CqpSi0.js +1 -0
  30. package/dist/assets/LookupField-BF9vCmht.js +1 -0
  31. package/dist/assets/MarkdownImpl-B0Iew7iJ.js +29 -0
  32. package/dist/assets/MasterDetailField-Dw4RRQ5W.js +1 -0
  33. package/dist/assets/NumberField-BKuVHBrN.js +1 -0
  34. package/dist/assets/ObjectField-z00gmFEc.js +1 -0
  35. package/dist/assets/OrgManagementPage-BqtqRi_6.js +1 -0
  36. package/dist/assets/PageDesignPage-BzIL8o0u.js +1 -0
  37. package/dist/assets/PageView-eCi7zkJr.js +2 -0
  38. package/dist/assets/PasswordField-B_rXL4g9.js +1 -0
  39. package/dist/assets/PercentField-Bn_SIbNe.js +1 -0
  40. package/dist/assets/PermissionManagementPage-BmI-0QXt.js +1 -0
  41. package/dist/assets/PhoneField-DuheMaUR.js +1 -0
  42. package/dist/assets/ProfilePage-CUo-xIgl.js +1 -0
  43. package/dist/assets/QRCodeField-IPS2Rpmi.js +1 -0
  44. package/dist/assets/RatingField-M6qZlpA4.js +1 -0
  45. package/dist/assets/RecordDetailView-CFVPmfrM.js +1 -0
  46. package/dist/assets/RegisterPage-D7PJIabW.js +1 -0
  47. package/dist/assets/ReportView-DNOPIpWM.js +1 -0
  48. package/dist/assets/RichTextField-CDGy9V9x.js +1 -0
  49. package/dist/assets/RoleManagementPage-DwtqyfDW.js +1 -0
  50. package/dist/assets/SearchResultsPage-BxzOkRnL.js +1 -0
  51. package/dist/assets/SelectField-F6UDlyvf.js +1 -0
  52. package/dist/assets/SignatureField-CHN7xBII.js +1 -0
  53. package/dist/assets/SliderField-BOfEMQyU.js +1 -0
  54. package/dist/assets/SummaryField-CZ8KzmBZ.js +1 -0
  55. package/dist/assets/SystemHubPage-RFiJSMgW.js +1 -0
  56. package/dist/assets/TextAreaField-1E39zZ_x.js +1 -0
  57. package/dist/assets/TextField-CwuU0Crc.js +1 -0
  58. package/dist/assets/TimeField-CEWXxhLE.js +1 -0
  59. package/dist/assets/UrlField-BtUImn9B.js +1 -0
  60. package/dist/assets/UserField-DSSEoy5L.js +1 -0
  61. package/dist/assets/UserManagementPage-BBS1vYGa.js +1 -0
  62. package/dist/assets/VectorField-BjfQeTZT.js +1 -0
  63. package/dist/assets/data-adapter-wZ81OFjZ.js +39 -0
  64. package/dist/assets/framework-DJlDX9E6.js +1 -0
  65. package/dist/assets/index-D9-L0QBO.css +2 -0
  66. package/dist/assets/index-DDpLaQOV.js +8 -0
  67. package/dist/assets/infrastructure-C6Ph6Ug0.js +3 -0
  68. package/dist/assets/maplibre-gl-DsUGuDud.js +756 -0
  69. package/dist/assets/plugins-core-Cfhp_BXE.css +2 -0
  70. package/dist/assets/plugins-core-PiAAytWV.js +136 -0
  71. package/dist/assets/plugins-views-CE0VP3vl.js +62 -0
  72. package/dist/assets/plugins-views-DnNKJB60.css +1 -0
  73. package/dist/assets/rolldown-runtime-Dw2cE7zH.js +1 -0
  74. package/dist/assets/skeletons-DcGqw3b1.js +1 -0
  75. package/dist/assets/src-oeWLmiqa.js +1 -0
  76. package/dist/assets/systemObjects-5--4zaiX.js +1 -0
  77. package/dist/assets/ui-layout-DdDX0gzI.js +3 -0
  78. package/dist/assets/vendor-charts-Bl5l0H2K.js +3 -0
  79. package/dist/assets/vendor-objectstack-BtztJIHv.js +1 -0
  80. package/dist/assets/vendor-react-BwtAzZZ3.js +9 -0
  81. package/dist/index.html +15 -24
  82. package/dist/mockServiceWorker.js +1 -1
  83. package/package.json +44 -44
  84. package/dist/assets/AdvancedChartImpl-BvIFxlPf.js +0 -7
  85. package/dist/assets/AppManagementPage-6bzxYNlP.js +0 -1
  86. package/dist/assets/AuditLogPage-qCzdxaNq.js +0 -1
  87. package/dist/assets/AuthPageLayout-DkrxSZOE.js +0 -1
  88. package/dist/assets/ChartImpl-DYQ9eXJz.js +0 -1
  89. package/dist/assets/CreateAppPage-DNKskVHK.js +0 -1
  90. package/dist/assets/DashboardDesignPage-T9tEAHAx.js +0 -1
  91. package/dist/assets/DashboardView-jCJCERzJ.js +0 -1
  92. package/dist/assets/EditAppPage-UGT9V29B.js +0 -1
  93. package/dist/assets/ForgotPasswordPage-Ca0lLZwY.js +0 -1
  94. package/dist/assets/KanbanEnhanced-CyIdmKhW.js +0 -1
  95. package/dist/assets/KanbanImpl-PGPpv-gu.js +0 -1
  96. package/dist/assets/LoginPage-BR2RpoGG.js +0 -1
  97. package/dist/assets/MarkdownImpl-eDhoPCJp.js +0 -29
  98. package/dist/assets/OrgManagementPage-DjT2mZ2x.js +0 -1
  99. package/dist/assets/PageDesignPage-DTEQcEuR.js +0 -1
  100. package/dist/assets/PageView-CFJhE0CN.js +0 -2
  101. package/dist/assets/PermissionManagementPage-C_FPnvGW.js +0 -1
  102. package/dist/assets/ProfilePage-CQkgvEEi.js +0 -1
  103. package/dist/assets/RecordDetailView-ClpxNRz2.js +0 -1
  104. package/dist/assets/RegisterPage-6IYU4bdp.js +0 -1
  105. package/dist/assets/ReportView-DecAJ58u.js +0 -1
  106. package/dist/assets/RoleManagementPage-v0ia3MGn.js +0 -1
  107. package/dist/assets/SearchResultsPage-CaSb54ho.js +0 -1
  108. package/dist/assets/SystemHubPage-PNaxZEht.js +0 -1
  109. package/dist/assets/UserManagementPage-KAZy5fgy.js +0 -1
  110. package/dist/assets/data-adapter-DCM4pdG4.js +0 -1
  111. package/dist/assets/framework-jBjO8CT3.js +0 -10
  112. package/dist/assets/index-BwkHrw9s.js +0 -1
  113. package/dist/assets/index-DXak0mZe.css +0 -1
  114. package/dist/assets/index-tta28Q_N.js +0 -9
  115. package/dist/assets/infrastructure-CWeiQ12V.js +0 -1
  116. package/dist/assets/maplibre-gl-CENyyZ0G.js +0 -811
  117. package/dist/assets/plugins-core-BV7ym-7D.js +0 -8
  118. package/dist/assets/plugins-views-P3eB-els.css +0 -1
  119. package/dist/assets/plugins-views-gxDbTdkX.js +0 -62
  120. package/dist/assets/systemObjects-DSpePIIy.js +0 -1
  121. package/dist/assets/ui-components-BCiSmwiC.css +0 -1
  122. package/dist/assets/ui-components-BRpbeVr1.js +0 -36
  123. package/dist/assets/ui-layout-VeUu0ZVf.js +0 -1
  124. package/dist/assets/vendor-charts-DthMRf4E.js +0 -60
  125. package/dist/assets/vendor-dndkit-_-PfuStg.js +0 -5
  126. package/dist/assets/vendor-i18n-B3GHNV0X.js +0 -9
  127. package/dist/assets/vendor-icons-CnLeuN7Z.js +0 -8566
  128. package/dist/assets/vendor-objectstack-BkRCrdfn.js +0 -34
  129. package/dist/assets/vendor-radix-BPVlBHPl.js +0 -56
  130. package/dist/assets/vendor-react-Dvo_9NuO.js +0 -60
  131. package/dist/assets/vendor-ui-utils-CU11aiRA.js +0 -1
  132. package/dist/assets/vendor-zod-CZmssJWz.js +0 -39
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/console",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "description": "ObjectStack Console - The standard runtime UI for ObjectStack applications",
5
5
  "type": "module",
6
6
  "main": "./plugin.js",
@@ -22,65 +22,65 @@
22
22
  "@dnd-kit/core": "^6.3.1",
23
23
  "@dnd-kit/sortable": "^10.0.0",
24
24
  "@dnd-kit/utilities": "^3.2.2",
25
- "@objectstack/cli": "^3.2.6",
26
- "@objectstack/client": "^3.2.6",
27
- "@objectstack/driver-memory": "^3.2.6",
28
- "@objectstack/objectql": "^3.2.6",
29
- "@objectstack/plugin-msw": "^3.2.6",
30
- "@objectstack/runtime": "^3.2.6",
31
- "@objectstack/spec": "^3.2.6",
32
- "@tailwindcss/postcss": "^4.2.1",
25
+ "@objectstack/cli": "^3.3.0",
26
+ "@objectstack/client": "^3.3.0",
27
+ "@objectstack/driver-memory": "^3.3.0",
28
+ "@objectstack/objectql": "^3.3.0",
29
+ "@objectstack/plugin-msw": "^3.3.0",
30
+ "@objectstack/runtime": "^3.3.0",
31
+ "@objectstack/spec": "^3.3.0",
32
+ "@tailwindcss/postcss": "^4.2.2",
33
33
  "@testing-library/jest-dom": "^6.9.1",
34
34
  "@testing-library/react": "^16.3.2",
35
35
  "@testing-library/user-event": "^14.6.1",
36
- "@types/node": "^25.4.0",
36
+ "@types/node": "^25.5.0",
37
37
  "@types/react": "19.2.14",
38
38
  "@types/react-dom": "19.2.3",
39
- "@vitejs/plugin-react": "^5.1.4",
40
- "@vitest/ui": "^4.0.18",
39
+ "@vitejs/plugin-react": "^6.0.1",
40
+ "@vitest/ui": "^4.1.0",
41
41
  "autoprefixer": "^10.4.27",
42
- "happy-dom": "^20.8.3",
42
+ "happy-dom": "^20.8.4",
43
43
  "lucide-react": "^0.577.0",
44
- "msw": "^2.12.10",
44
+ "msw": "^2.12.14",
45
45
  "postcss": "^8.5.8",
46
46
  "react": "19.2.4",
47
47
  "react-dom": "19.2.4",
48
48
  "react-router-dom": "^7.13.1",
49
49
  "sonner": "^2.0.7",
50
- "tailwindcss": "^4.2.1",
50
+ "tailwindcss": "^4.2.2",
51
51
  "typescript": "^5.9.3",
52
- "vite": "^6.4.1",
53
- "vitest": "^4.0.18",
54
- "@object-ui/auth": "3.1.3",
55
- "@object-ui/collaboration": "3.1.3",
56
- "@object-ui/components": "3.1.3",
57
- "@object-ui/core": "3.1.3",
58
- "@object-ui/data-objectstack": "3.1.3",
52
+ "vite": "^8.0.1",
53
+ "vitest": "^4.1.0",
54
+ "@object-ui/auth": "3.1.5",
55
+ "@object-ui/collaboration": "3.1.5",
56
+ "@object-ui/components": "3.1.5",
57
+ "@object-ui/core": "3.1.5",
58
+ "@object-ui/data-objectstack": "3.1.5",
59
59
  "@object-ui/example-crm": "3.1.0",
60
60
  "@object-ui/example-kitchen-sink": "3.1.0",
61
61
  "@object-ui/example-todo": "3.1.0",
62
- "@object-ui/fields": "3.1.3",
63
- "@object-ui/i18n": "3.1.3",
64
- "@object-ui/layout": "3.1.3",
65
- "@object-ui/mobile": "3.1.3",
66
- "@object-ui/permissions": "3.1.3",
67
- "@object-ui/plugin-calendar": "3.1.3",
68
- "@object-ui/plugin-charts": "3.1.3",
69
- "@object-ui/plugin-dashboard": "3.1.3",
70
- "@object-ui/plugin-designer": "3.1.3",
71
- "@object-ui/plugin-detail": "3.1.3",
72
- "@object-ui/plugin-form": "3.1.3",
73
- "@object-ui/plugin-gantt": "3.1.3",
74
- "@object-ui/plugin-grid": "3.1.3",
75
- "@object-ui/plugin-kanban": "3.1.3",
76
- "@object-ui/plugin-list": "3.1.3",
77
- "@object-ui/plugin-map": "3.1.3",
78
- "@object-ui/plugin-markdown": "3.1.3",
79
- "@object-ui/plugin-report": "3.1.3",
80
- "@object-ui/plugin-timeline": "3.1.3",
81
- "@object-ui/plugin-view": "3.1.3",
82
- "@object-ui/react": "3.1.3",
83
- "@object-ui/types": "3.1.3"
62
+ "@object-ui/fields": "3.1.5",
63
+ "@object-ui/i18n": "3.1.5",
64
+ "@object-ui/layout": "3.1.5",
65
+ "@object-ui/mobile": "3.1.5",
66
+ "@object-ui/permissions": "3.1.5",
67
+ "@object-ui/plugin-calendar": "3.1.5",
68
+ "@object-ui/plugin-charts": "3.1.5",
69
+ "@object-ui/plugin-dashboard": "3.1.5",
70
+ "@object-ui/plugin-designer": "3.1.5",
71
+ "@object-ui/plugin-detail": "3.1.5",
72
+ "@object-ui/plugin-form": "3.1.5",
73
+ "@object-ui/plugin-gantt": "3.1.5",
74
+ "@object-ui/plugin-grid": "3.1.5",
75
+ "@object-ui/plugin-kanban": "3.1.5",
76
+ "@object-ui/plugin-list": "3.1.5",
77
+ "@object-ui/plugin-map": "3.1.5",
78
+ "@object-ui/plugin-markdown": "3.1.5",
79
+ "@object-ui/plugin-report": "3.1.5",
80
+ "@object-ui/plugin-timeline": "3.1.5",
81
+ "@object-ui/plugin-view": "3.1.5",
82
+ "@object-ui/react": "3.1.5",
83
+ "@object-ui/types": "3.1.5"
84
84
  },
85
85
  "msw": {
86
86
  "workerDirectory": [
@@ -1,7 +0,0 @@
1
- import{r as m,j as e}from"./vendor-react-Dvo_9NuO.js";import{T as G,L as X,R as Y,P as M,b as Z,c as q,d as N,e as U,f as D,g as J,h as Q,S as _,C as P,X as $,Y as E,Z as V,i as ee,B as S,j as T,A as W,a as B,k as te,l as ae}from"./vendor-charts-DthMRf4E.js";import"./vendor-ui-utils-CU11aiRA.js";import"./vendor-i18n-B3GHNV0X.js";const p=(...r)=>r.filter(Boolean).join(" "),ne={light:"",dark:".dark"},F=m.createContext(null);function H(){const r=m.useContext(F);if(!r)throw new Error("useChart must be used within a <ChartContainer />");return r}function y({id:r,className:o,children:a,config:n,...l}){const x=m.useId(),s=`chart-${r||x.replace(/:/g,"")}`;return e.jsx(F.Provider,{value:{config:n},children:e.jsxs("div",{"data-slot":"chart","data-chart":s,className:p("flex w-full h-[350px] justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground",o),...l,children:[e.jsx(re,{id:s,config:n}),e.jsx(Y,{width:"100%",height:"100%",children:a})]})})}const re=({id:r,config:o})=>{const a=Object.entries(o).filter(([,n])=>n.theme||n.color);return a.length?e.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(ne).map(([n,l])=>`
2
- ${l} [data-chart=${r}] {
3
- ${a.map(([x,s])=>{const d=s.theme?.[n]||s.color;return d?` --color-${x}: ${d};`:null}).join(`
4
- `)}
5
- }
6
- `).join(`
7
- `)}}):null},b=G;function v({active:r,payload:o,className:a,indicator:n="dot",hideLabel:l=!1,hideIndicator:x=!1,label:s,labelFormatter:d,labelClassName:j,formatter:w,color:k,nameKey:t,labelKey:c}){const{config:u}=H(),f=m.useMemo(()=>{if(l||!o?.length)return null;const[i]=o,A=`${c||i?.dataKey||i?.name||"value"}`,R=O(u,i,A),g=!c&&typeof s=="string"?u[s]?.label||s:R?.label;return d?e.jsx("div",{className:p("font-medium",j),children:d(g,o)}):g?e.jsx("div",{className:p("font-medium",j),children:g}):null},[s,d,o,l,j,u,c]);if(!r||!o?.length)return null;const h=o.length===1&&n!=="dot";return e.jsxs("div",{className:p("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",a),children:[h?null:f,e.jsx("div",{className:"grid gap-1.5",children:o.filter(i=>i.type!=="none").map((i,A)=>{const R=`${t||i.name||i.dataKey||"value"}`,g=O(u,i,R),z=k||i.payload.fill||i.color;return e.jsx("div",{className:p("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",n==="dot"?"items-center":""),children:w&&i?.value!==void 0&&i.name?w(i.value,i.name,i,A,i.payload):e.jsxs(e.Fragment,{children:[g?.icon?e.jsx(g.icon,{}):!x&&e.jsx("div",{className:p("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",n==="dot"?"h-2.5 w-2.5":"",n==="line"?"w-1":"",n==="dashed"?"w-0 border-[1.5px] border-dashed bg-transparent":"",h&&n==="dashed"?"my-0.5":""),style:{"--color-bg":z,"--color-border":z}}),e.jsxs("div",{className:p("flex flex-1 justify-between leading-none",h?"items-end":"items-center"),children:[e.jsxs("div",{className:"grid gap-1.5",children:[h?f:null,e.jsx("span",{className:"text-muted-foreground",children:g?.label||i.name})]}),i.value&&e.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:i.value.toLocaleString()})]})]})},i.dataKey)})})]})}const C=X;function K({className:r,hideIcon:o=!1,payload:a,verticalAlign:n="bottom",nameKey:l}){const{config:x}=H();return a?.length?e.jsx("div",{className:p("flex items-center justify-center gap-4",n==="top"?"pb-3":"pt-3",r),children:a.filter(s=>s.type!=="none").map(s=>{const d=`${l||s.dataKey||"value"}`,j=O(x,s,d);return e.jsxs("div",{className:p("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[j?.icon&&!o?e.jsx(j.icon,{}):e.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),j?.label]},s.value)})}):null}function O(r,o,a){if(typeof o!="object"||o===null)return;const n="payload"in o&&typeof o.payload=="object"&&o.payload!==null?o.payload:void 0;let l=a;return a in o&&typeof o[a]=="string"?l=o[a]:n&&a in n&&typeof n[a]=="string"&&(l=n[a]),l in r?r[l]:r[a]}const I="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"},L=r=>se[r]||r;function ce({chartType:r="bar",data:o=[],config:a={},xAxisKey:n="name",series:l=[],className:x=""}){const s=Array.isArray(o)?o:[],[d,j]=m.useState(!1);m.useEffect(()=>{const t=()=>j(window.innerWidth<640);return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const w={bar:S,line:ae,area:te,pie:M,donut:M,radar:N,scatter:_,combo:S}[r]||S;console.log("📈 Rendering Chart:",{chartType:r,dataLength:s.length,config:a,series:l,xAxisKey:n});const k=()=>["hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"];if(r==="pie"||r==="donut"){const t=r==="donut"?60:0;return e.jsx(y,{config:a,className:x,children:e.jsxs(M,{children:[e.jsx(b,{cursor:!1,content:e.jsx(v,{hideLabel:!0})}),e.jsx(Z,{data:s,dataKey:l[0]?.dataKey||"value",nameKey:n||"name",innerRadius:t,strokeWidth:5,paddingAngle:2,outerRadius:80,children:s.map((c,u)=>{let f=a[c[n]]?.color;if(!f){const h=k();f=h[u%h.length]}return e.jsx(q,{fill:L(f)},`cell-${u}`)})}),e.jsx(C,{content:e.jsx(K,{nameKey:n}),...d&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}})]})})}return r==="radar"?e.jsx(y,{config:a,className:x,children:e.jsxs(N,{data:s,children:[e.jsx(U,{}),e.jsx(D,{dataKey:n}),e.jsx(J,{}),e.jsx(b,{content:e.jsx(v,{})}),e.jsx(C,{content:e.jsx(K,{}),...d&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map(t=>{const c=L(a[t.dataKey]?.color||I);return e.jsx(Q,{dataKey:t.dataKey,stroke:c,fill:c,fillOpacity:.6},t.dataKey)})]})}):r==="scatter"?e.jsx(y,{config:a,className:x,children:e.jsxs(_,{children:[e.jsx(P,{vertical:!1}),e.jsx($,{type:"number",dataKey:n,name:String(a[n]?.label||n),tickLine:!1,axisLine:!1,interval:d?Math.ceil(s.length/5):0}),e.jsx(E,{type:"number",dataKey:l[0]?.dataKey||"value",name:String(a[l[0]?.dataKey]?.label||l[0]?.dataKey),tickLine:!1,axisLine:!1}),e.jsx(V,{type:"number",range:[60,400]}),e.jsx(b,{content:e.jsx(v,{})}),e.jsx(C,{content:e.jsx(K,{}),...d&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map((t,c)=>{const u=k(),f=L(a[t.dataKey]?.color||u[c%u.length]);return e.jsx(ee,{name:a[t.dataKey]?.label||t.dataKey,data:s,fill:f},t.dataKey)})]})}):r==="combo"?e.jsx(y,{config:a,className:x,children:e.jsxs(S,{data:s,children:[e.jsx(P,{vertical:!1}),e.jsx($,{dataKey:n,tickLine:!1,tickMargin:10,axisLine:!1,interval:d?Math.ceil(s.length/5):0,tickFormatter:t=>t&&typeof t=="string"?t.slice(0,3):t}),e.jsx(E,{yAxisId:"left",tickLine:!1,axisLine:!1}),e.jsx(E,{yAxisId:"right",orientation:"right",tickLine:!1,axisLine:!1}),e.jsx(b,{content:e.jsx(v,{})}),e.jsx(C,{content:e.jsx(K,{}),...d&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map((t,c)=>{const u=L(a[t.dataKey]?.color||I),f=t.chartType||(c===0?"bar":"line"),h=f==="bar"?"left":"right";return f==="line"?e.jsx(T,{yAxisId:h,type:"monotone",dataKey:t.dataKey,stroke:u,strokeWidth:2,dot:!1},t.dataKey):f==="area"?e.jsx(W,{yAxisId:h,type:"monotone",dataKey:t.dataKey,fill:u,stroke:u,fillOpacity:.4},t.dataKey):e.jsx(B,{yAxisId:h,dataKey:t.dataKey,fill:u,radius:4},t.dataKey)})]})}):e.jsx(y,{config:a,className:x,children:e.jsxs(w,{data:s,children:[e.jsx(P,{vertical:!1}),e.jsx($,{dataKey:n,tickLine:!1,tickMargin:10,axisLine:!1,interval:d?Math.ceil(s.length/5):0,tickFormatter:t=>t&&typeof t=="string"?t.slice(0,3):t}),e.jsx(b,{content:e.jsx(v,{})}),e.jsx(C,{content:e.jsx(K,{}),...d&&{verticalAlign:"bottom",wrapperStyle:{fontSize:"11px",paddingTop:"8px"}}}),l.map(t=>{const c=L(a[t.dataKey]?.color||I);return r==="bar"?e.jsx(B,{dataKey:t.dataKey,fill:c,radius:4},t.dataKey):r==="line"?e.jsx(T,{type:"monotone",dataKey:t.dataKey,stroke:c,strokeWidth:2,dot:!1},t.dataKey):r==="area"?e.jsx(W,{type:"monotone",dataKey:t.dataKey,fill:c,stroke:c,fillOpacity:.4},t.dataKey):null})]})})}export{ce as default};
@@ -1 +0,0 @@
1
- import{f as L,h as E,r as t,j as e}from"./vendor-react-Dvo_9NuO.js";import{B as o,ab as P,G as p,C as B,v as I}from"./ui-components-BRpbeVr1.js";import"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import{b as d}from"./vendor-ui-utils-CU11aiRA.js";import{b as F,r as w}from"./index-tta28Q_N.js";import{m as M,S as Q,ai as y,$ as G,at as R,bc as T,bd as q,Q as O,l as H}from"./vendor-icons-CnLeuN7Z.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-charts-DthMRf4E.js";import"./infrastructure-CWeiQ12V.js";import"./vendor-zod-CZmssJWz.js";import"./plugins-core-BV7ym-7D.js";import"./vendor-dndkit-_-PfuStg.js";import"./plugins-views-gxDbTdkX.js";import"./data-adapter-DCM4pdG4.js";import"./ui-layout-VeUu0ZVf.js";function re(){const u=L(),{appName:g}=E(),j=g?`/apps/${g}`:"",{apps:C,refresh:i}=F(),[h,k]=t.useState(""),[n,x]=t.useState(new Set),[f,b]=t.useState(null),[m,c]=t.useState(!1),l=(C||[]).filter(s=>{if(!h)return!0;const a=h.toLowerCase();return(s.name||"").toLowerCase().includes(a)||(s.label||"").toLowerCase().includes(a)||(s.description||"").toLowerCase().includes(a)}),S=t.useCallback(s=>{x(a=>{const r=new Set(a);return r.has(s)?r.delete(s):r.add(s),r})},[]),$=t.useCallback(()=>{n.size===l.length?x(new Set):x(new Set(l.map(s=>s.name)))},[n.size,l]),z=t.useCallback(async s=>{c(!0);try{const a=s.active===!1;d.success(`${s.label||s.name} ${a?"enabled":"disabled"}`),await i()}catch{d.error("Failed to toggle app status")}finally{c(!1)}},[i]),A=t.useCallback(async s=>{c(!0);try{d.success(`${s.label||s.name} set as default`),await i()}catch{d.error("Failed to set default app")}finally{c(!1)}},[i]),D=t.useCallback(async s=>{if(f!==s.name){b(s.name);return}c(!0);try{d.success(`${s.label||s.name} deleted`),b(null),await i()}catch{d.error("Failed to delete app")}finally{c(!1)}},[f,i]),v=t.useCallback(async s=>{c(!0);try{d.success(`${n.size} apps ${s?"enabled":"disabled"}`),x(new Set),await i()}catch{d.error("Bulk operation failed")}finally{c(!1)}},[n,i]);return e.jsxs("div",{className:"flex flex-col gap-4 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Applications"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage all configured applications"})]}),e.jsxs(o,{onClick:()=>u(`${j}/create-app`),"data-testid":"create-app-btn",children:[e.jsx(M,{className:"h-4 w-4 mr-2"}),"New App"]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(Q,{className:"pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(P,{placeholder:"Search apps...",value:h,onChange:s=>k(s.target.value),className:"pl-8","data-testid":"app-search-input"})]}),n.size>0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(p,{variant:"secondary",children:[n.size," selected"]}),e.jsx(o,{variant:"outline",size:"sm",onClick:()=>v(!0),disabled:m,children:"Enable"}),e.jsx(o,{variant:"outline",size:"sm",onClick:()=>v(!1),disabled:m,children:"Disable"})]})]}),l.length>0&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx("input",{type:"checkbox",checked:n.size===l.length&&l.length>0,onChange:$,className:"rounded border-input","aria-label":"Select all apps"}),e.jsxs("span",{children:["Select all (",l.length,")"]})]}),l.length===0?e.jsxs("div",{className:"text-center py-12 text-muted-foreground","data-testid":"no-apps-message",children:[e.jsx(y,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No apps found."})]}):e.jsx("div",{className:"grid gap-3",children:l.map(s=>{const a=s.active!==!1,r=s.isDefault===!0,N=f===s.name;return e.jsx(B,{className:a?"":"opacity-60","data-testid":`app-card-${s.name}`,children:e.jsxs(I,{className:"flex items-center gap-3 py-3 px-4",children:[e.jsx("input",{type:"checkbox",checked:n.has(s.name),onChange:()=>S(s.name),className:"rounded border-input shrink-0","aria-label":`Select ${s.label||s.name}`}),e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(y,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium truncate",children:w(s.label)||s.name}),r&&e.jsx(p,{variant:"default",className:"text-xs",children:"Default"}),e.jsx(p,{variant:a?"secondary":"outline",className:"text-xs",children:a?"Active":"Inactive"})]}),s.description&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:w(s.description)})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[e.jsx(o,{variant:"ghost",size:"icon",title:"Open app",onClick:()=>u(`/apps/${s.name}`),children:e.jsx(G,{className:"h-4 w-4"})}),e.jsx(o,{variant:"ghost",size:"icon",title:"Edit app",onClick:()=>u(`${j}/edit-app/${s.name}`),children:e.jsx(R,{className:"h-4 w-4"})}),e.jsx(o,{variant:"ghost",size:"icon",title:a?"Disable app":"Enable app",onClick:()=>z(s),disabled:m,children:a?e.jsx(T,{className:"h-4 w-4"}):e.jsx(q,{className:"h-4 w-4"})}),e.jsx(o,{variant:"ghost",size:"icon",title:"Set as default",onClick:()=>A(s),disabled:m||r,children:e.jsx(O,{className:`h-4 w-4 ${r?"fill-current text-yellow-500":""}`})}),e.jsx(o,{variant:"ghost",size:"icon",title:N?"Click again to confirm delete":"Delete app",onClick:()=>D(s),disabled:m,className:N?"text-destructive":"",children:e.jsx(H,{className:"h-4 w-4"})})]})]})},s.name)})})]})}export{re as AppManagementPage};
@@ -1 +0,0 @@
1
- import{r,j as e}from"./vendor-react-Dvo_9NuO.js";import{C as u,v as h,G as f}from"./ui-components-BRpbeVr1.js";import"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import{b as j}from"./vendor-ui-utils-CU11aiRA.js";import{a as g}from"./index-tta28Q_N.js";import{s as N}from"./systemObjects-DSpePIIy.js";import{bb as n,L as b}from"./vendor-icons-CnLeuN7Z.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-charts-DthMRf4E.js";import"./infrastructure-CWeiQ12V.js";import"./vendor-zod-CZmssJWz.js";import"./plugins-core-BV7ym-7D.js";import"./vendor-dndkit-_-PfuStg.js";import"./plugins-views-gxDbTdkX.js";import"./data-adapter-DCM4pdG4.js";import"./ui-layout-VeUu0ZVf.js";const m=N.find(s=>s.name==="sys_audit_log"),i=m.views[0].columns;function V(){const s=g(),[o,c]=r.useState([]),[x,d]=r.useState(!0),l=r.useCallback(async()=>{if(s){d(!0);try{const t=await s.find("sys_audit_log",{$orderby:{createdAt:"desc"}});c(t.data||[])}catch{j.error("Failed to load audit logs")}finally{d(!1)}}},[s]);return r.useEffect(()=>{l()},[l]),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(n,{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(u,{children:e.jsx(h,{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:i.map(t=>{const a=m.fields.find(p=>p.name===t);return e.jsx("th",{className:"h-10 px-3 sm:px-4 text-left font-medium text-muted-foreground whitespace-nowrap",children:a?.label??t},t)})})}),e.jsx("tbody",{children:x?e.jsx("tr",{children:e.jsx("td",{className:"p-6 text-center",colSpan:i.length,children:e.jsx(b,{className:"h-6 w-6 animate-spin mx-auto text-muted-foreground"})})}):o.length===0?e.jsx("tr",{children:e.jsx("td",{className:"p-4 sm:p-6 text-center text-sm text-muted-foreground",colSpan:i.length,children:e.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[e.jsx(n,{className:"h-8 w-8 text-muted-foreground/50"}),e.jsx("p",{children:"No audit logs found."}),e.jsx(f,{variant:"secondary",className:"text-xs",children:"Read-only"})]})})}):o.map(t=>e.jsx("tr",{className:"border-b hover:bg-muted/50 transition-colors",children:i.map(a=>e.jsx("td",{className:"h-10 px-3 sm:px-4 whitespace-nowrap",children:String(t[a]??"")},a))},t.id||t._id))})]})})})})]})}export{V as AuditLogPage};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-react-Dvo_9NuO.js";function t({children:s}){return e.jsxs("div",{className:"flex min-h-screen",children:[e.jsx("div",{className:"hidden lg:flex lg:w-1/2 items-center justify-center bg-primary p-12",children:e.jsxs("div",{className:"max-w-md space-y-6 text-primary-foreground",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-10 w-10",children:e.jsx("path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"})}),e.jsx("span",{className:"text-2xl font-bold",children:"ObjectStack"})]}),e.jsx("h2",{className:"text-3xl font-bold leading-tight",children:"Build powerful business applications, faster."}),e.jsx("p",{className:"text-lg opacity-90",children:"The universal platform for enterprise data management, workflows, and analytics."})]})}),e.jsx("div",{className:"flex w-full lg:w-1/2 items-center justify-center bg-background px-6 py-12",children:s})]})}export{t as A};
@@ -1 +0,0 @@
1
- import{j as r}from"./vendor-react-Dvo_9NuO.js";import{R as l,B as n,C as d,X as f,Y as p,T as x,L as u,a as c}from"./vendor-charts-DthMRf4E.js";import"./vendor-ui-utils-CU11aiRA.js";import"./vendor-i18n-B3GHNV0X.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};
@@ -1 +0,0 @@
1
- import{f as C,h as v,r as e,j as n}from"./vendor-react-Dvo_9NuO.js";import{AppCreationWizard as x}from"./index-BwkHrw9s.js";import{z as S}from"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import{b,a as y}from"./index-tta28Q_N.js";import{b as s}from"./vendor-ui-utils-CU11aiRA.js";import"./vendor-icons-CnLeuN7Z.js";import"./infrastructure-CWeiQ12V.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-zod-CZmssJWz.js";import"./ui-components-BRpbeVr1.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-charts-DthMRf4E.js";import"./plugins-core-BV7ym-7D.js";import"./vendor-dndkit-_-PfuStg.js";import"./plugins-views-gxDbTdkX.js";import"./data-adapter-DCM4pdG4.js";import"./ui-layout-VeUu0ZVf.js";const p="objectui-app-wizard-draft";function K(){const t=C(),{appName:r}=v(),{objects:l,refresh:i}=b(),c=y(),f=(l||[]).map(a=>({name:a.name,label:a.label||a.name,icon:a.icon,selected:!1})),u=e.useCallback(()=>{try{const a=localStorage.getItem(p);if(a)return JSON.parse(a)}catch{}},[]),d=e.useCallback(async a=>{try{const o=S(a),m=c?.getClient();m&&await m.meta.saveItem("app",a.name,o),localStorage.removeItem(p),s.success(`Application "${a.title}" created successfully`),await i?.(),t(`/apps/${a.name}`)}catch(o){s.error(o?.message||"Failed to create application")}},[t,i,c]),g=e.useCallback(()=>{t(r?`/apps/${r}`:"/")},[t,r]),h=e.useCallback(a=>{try{localStorage.setItem(p,JSON.stringify(a)),s.info("Draft saved")}catch{}},[]);return n.jsx("div",{className:"mx-auto max-w-4xl py-8 px-4","data-testid":"create-app-page",children:n.jsx(x,{availableObjects:f,initialDraft:u(),onComplete:d,onCancel:g,onSaveDraft:h})})}export{K as CreateAppPage};
@@ -1 +0,0 @@
1
- import{f as j,h as v,r as s,j as a}from"./vendor-react-Dvo_9NuO.js";import{DashboardEditor as w}from"./index-BwkHrw9s.js";import{b as h}from"./vendor-ui-utils-CU11aiRA.js";import{a as k,b as D}from"./index-tta28Q_N.js";import{A as E}from"./vendor-icons-CnLeuN7Z.js";import"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import"./vendor-zod-CZmssJWz.js";import"./ui-components-BRpbeVr1.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-charts-DthMRf4E.js";import"./infrastructure-CWeiQ12V.js";import"./plugins-core-BV7ym-7D.js";import"./vendor-dndkit-_-PfuStg.js";import"./plugins-views-gxDbTdkX.js";import"./data-adapter-DCM4pdG4.js";import"./ui-layout-VeUu0ZVf.js";function z(){const f=j(),{dashboardName:t}=v(),d=k(),{dashboards:b,refresh:u}=D(),r=b?.find(e=>e.name===t),[i,x]=s.useState(()=>r||{type:"dashboard",name:t??"",title:t??"",columns:2,widgets:[]}),p=s.useRef(i);p.current=i;const n=s.useCallback(async e=>{try{if(d)return await d.update("sys_dashboard",t,e),u().catch(()=>{}),!0}catch{}return!1},[d,t,u]),l=s.useCallback(async e=>{x(e),await n(e)},[n]);s.useEffect(()=>{const e=o=>{(o.ctrlKey||o.metaKey)&&o.key==="s"&&(o.preventDefault(),n(p.current).then(c=>{c&&h.success("Dashboard saved")}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n]);const g=s.useCallback(e=>{const o=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),c=URL.createObjectURL(o),m=document.createElement("a");m.href=c,m.download=`${t||"dashboard"}.json`,m.click(),URL.revokeObjectURL(c),h.success("Dashboard schema exported")},[t]),y=s.useCallback(e=>{h.success("Dashboard schema imported"),l(e)},[l]);return r?a.jsxs("div",{className:"h-full flex flex-col","data-testid":"dashboard-design-page",children:[a.jsxs("div",{className:"flex items-center gap-3 border-b px-4 py-3 sm:px-6",children:[a.jsx("button",{type:"button",onClick:()=>f(-1),className:"rounded p-1.5 text-muted-foreground hover:text-foreground","aria-label":"Go back","data-testid":"dashboard-design-back",children:a.jsx(E,{className:"h-4 w-4"})}),a.jsxs("h1",{className:"text-lg font-semibold tracking-tight truncate",children:["Edit Dashboard: ",r.label||r.title||t]})]}),a.jsx("div",{className:"flex-1 overflow-auto p-4 sm:p-6",children:a.jsx(w,{schema:i,onChange:l,onExport:g,onImport:y})})]}):a.jsxs("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:['Dashboard "',t,'" not found']})}export{z as DashboardDesignPage};
@@ -1 +0,0 @@
1
- import{j as e,h as X,r as i}from"./vendor-react-Dvo_9NuO.js";import{a as J,W as Q,b as Z}from"./plugins-views-gxDbTdkX.js";import{p as m,b7 as ee,b8 as te,b9 as ae,B as se}from"./ui-components-BRpbeVr1.js";import"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import{u as re}from"./infrastructure-CWeiQ12V.js";import"./vendor-ui-utils-CU11aiRA.js";import{u as ne,a as le,b as ie,r as F,M as oe}from"./index-tta28Q_N.js";import{aX as de,u as ce,aY as ue,b5 as me,b6 as he,b7 as ge,ai as fe,m as be,at as pe,l as xe}from"./vendor-icons-CnLeuN7Z.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-charts-DthMRf4E.js";import"./vendor-zod-CZmssJWz.js";import"./plugins-core-BV7ym-7D.js";import"./vendor-dndkit-_-PfuStg.js";import"./data-adapter-DCM4pdG4.js";import"./ui-layout-VeUu0ZVf.js";function je({cards:t=6}){return e.jsxs("div",{className:"w-full space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{className:"h-7 w-56"}),e.jsx(m,{className:"h-4 w-80"})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:Array.from({length:4}).map((d,c)=>e.jsxs("div",{className:"rounded-lg border p-4 space-y-2",children:[e.jsx(m,{className:"h-4 w-20"}),e.jsx(m,{className:"h-8 w-24"}),e.jsx(m,{className:"h-3 w-16"})]},`stat-${c}`))}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:t}).map((d,c)=>e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(m,{className:"h-5 w-32"}),e.jsx(m,{className:"h-5 w-5 rounded-full"})]}),e.jsx(m,{className:"h-40 w-full"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m,{className:"h-3 w-16"}),e.jsx(m,{className:"h-3 w-12"})]})]},`widget-${c}`))})]})}const T=[{type:"metric",label:"KPI Metric",Icon:ce},{type:"bar",label:"Bar Chart",Icon:ue},{type:"line",label:"Line Chart",Icon:me},{type:"pie",label:"Pie Chart",Icon:he},{type:"table",label:"Table",Icon:ge},{type:"grid",label:"Grid",Icon:fe}];let P=0;function V(){return P+=1,`widget_${Date.now()}_${P}`}function we(t){return!t.widgets?.length||!t.widgets.some(c=>!c.id)?t:{...t,widgets:t.widgets.map(c=>c.id?c:{...c,id:V()})}}function ve(t){const d=T.find(c=>c.type===t);return d?`New ${d.label}`:"New Widget"}function E(t){return{title:t.title??"",description:t.description??"",type:t.type??"metric",object:t.object??"",categoryField:t.categoryField??"",valueField:t.valueField??"",aggregate:t.aggregate??"count",layoutW:t.layout?.w??1,layoutH:t.layout?.h??1,colorVariant:t.colorVariant??"default",actionUrl:t.actionUrl??""}}function M(t,d){return{title:t.title,description:t.description,type:t.type,object:t.object,categoryField:t.categoryField,valueField:t.valueField,aggregate:t.aggregate,layout:{...d.layout||{},w:t.layoutW,h:t.layoutH},colorVariant:t.colorVariant,actionUrl:t.actionUrl}}function ye(t){return{columns:t.columns??3,gap:t.gap??4,rowHeight:String(t.rowHeight??"120"),refreshInterval:String(t.refreshInterval??"0"),title:t.title??"",showDescription:t.showDescription??!0,theme:t.theme??"auto"}}function He({dataSource:t}){const{dashboardName:d}=X(),{showDebug:c}=ne(),y=le(),{t:C}=re(),[A,S]=i.useState(!0),[x,N]=i.useState(!1),[o,j]=i.useState(null),[k,v]=i.useState(0);i.useEffect(()=>{S(!0),h(null),N(!1),j(null),queueMicrotask(()=>S(!1))},[d]);const{dashboards:L,objects:b,refresh:I}=ie(),u=L?.find(a=>a.name===d),[n,h]=i.useState(null);i.useEffect(()=>{x||h(null)},[u]);const g=i.useCallback(async a=>{try{y&&(await y.update("sys_dashboard",d,a),I().catch(()=>{}))}catch(l){console.warn("[DashboardView] Auto-save failed:",l)}},[y,d,I]),O=i.useCallback(()=>{h(we(u)),N(!0),v(a=>a+1)},[u]),D=i.useCallback(()=>{N(!1),j(null)},[]),$=i.useCallback(a=>{if(!n)return;const l=V(),s={id:l,title:ve(a),type:a,layout:{x:0,y:n.widgets?.length??0,w:n.columns??2,h:1}},r={...n,widgets:[...n.widgets||[],s]};h(r),g(r),j(l),v(p=>p+1)},[n,g]),H=i.useCallback(a=>{if(!n)return;const l={...n,widgets:n.widgets.filter(s=>s.id!==a)};h(l),g(l),o===a&&j(null)},[n,o,g]),_=i.useMemo(()=>ye(n||u),[k]),U=i.useCallback(a=>{if(!n)return;const l={...n,columns:a.columns,gap:a.gap,rowHeight:a.rowHeight,refreshInterval:Number(a.refreshInterval)||0,title:a.title,showDescription:a.showDescription,theme:a.theme};h(l),g(l),v(s=>s+1)},[n,g]),B=i.useCallback((a,l)=>{n&&h(s=>s&&(a==="refreshInterval"?{...s,refreshInterval:Number(l)||0}:{...s,[a]:l}))},[n]),f=n?.widgets?.find(a=>a.id===o),G=i.useMemo(()=>f?E(f):{},[o,k]),R=i.useCallback(a=>{if(!n||!o||!f)return;const l=M(a,f),s={...n,widgets:n.widgets.map(r=>r.id===o?{...r,...l}:r)};h(s),g(s),v(r=>r+1)},[n,o,f,g]),Y=i.useCallback((a,l)=>{o&&h(s=>{if(!s)return s;const r=s.widgets?.find(w=>w.id===o);if(!r)return s;const p=E(r);p[a]=l;const K=M(p,r);return{...s,widgets:s.widgets.map(w=>w.id===o?{...w,...K}:w)}})},[o]),q=i.useMemo(()=>{if(b?.length)return b.map(a=>({value:a.name,label:a.label||a.name}))},[b]),z=i.useMemo(()=>{const a=f?.object;if(!a||!b?.length)return;const l=b.find(r=>r.name===a);if(!l?.fields)return;const s=l.fields;return Array.isArray(s)?s.filter(r=>r.name).map(r=>({value:r.name,label:r.label||r.name})):Object.entries(s).map(([r,p])=>({value:r,label:p.label||r}))},[f?.object,b]);if(A)return e.jsx(je,{});if(!u)return e.jsx("div",{className:"h-full flex items-center justify-center p-8",children:e.jsxs(ee,{children:[e.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:e.jsx(de,{className:"h-6 w-6 text-muted-foreground"})}),e.jsx(te,{children:"Dashboard Not Found"}),e.jsxs(ae,{children:['The dashboard "',d,'" could not be found. It may have been removed or renamed.']})]})});const W=n||u;return e.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:[e.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:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h1",{className:"text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate",children:F(u.label,C)||u.name}),u.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:F(u.description,C)})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-1.5",children:[x&&e.jsx("div",{className:"flex items-center gap-1 mr-2","data-testid":"dashboard-widget-toolbar",children:T.map(({type:a,label:l,Icon:s})=>e.jsxs("button",{type:"button","data-testid":`dashboard-add-${a}`,onClick:()=>$(a),className:"inline-flex items-center gap-1 rounded-md border border-input bg-background px-2 py-1.5 text-[11px] font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground",title:`Add ${l}`,children:[e.jsx(be,{className:"h-3 w-3"}),e.jsx(s,{className:"h-3 w-3"})]},a))}),e.jsxs("button",{type:"button",onClick:O,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":"dashboard-edit-button",children:[e.jsx(pe,{className:"h-3.5 w-3.5"}),"Edit"]})]})]}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col sm:flex-row relative",children:[e.jsx("div",{className:"flex-1 min-w-0 overflow-auto p-0 sm:p-6",children:e.jsx(J,{schema:W,dataSource:t,designMode:x,selectedWidgetId:o,onWidgetClick:j})}),f?e.jsx(Q,{open:x,onClose:D,config:G,onSave:R,onFieldChange:Y,availableObjects:q,availableFields:z,headerExtra:e.jsx(se,{size:"sm",variant:"ghost",onClick:()=>H(o),className:"h-7 w-7 p-0 text-destructive hover:text-destructive","data-testid":"widget-delete-button",title:"Delete widget",children:e.jsx(xe,{className:"h-3.5 w-3.5"})})},o):e.jsx(Z,{open:x,onClose:D,config:_,onSave:U,onFieldChange:B}),e.jsx(oe,{open:c,sections:[{title:"Dashboard Configuration",data:W}]})]})]})}export{He as DashboardView};
@@ -1 +0,0 @@
1
- import{f as C,h as N,r,j as s}from"./vendor-react-Dvo_9NuO.js";import{AppCreationWizard as A}from"./index-BwkHrw9s.js";import{z as j}from"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import{b as S,a as w}from"./index-tta28Q_N.js";import{b as p}from"./vendor-ui-utils-CU11aiRA.js";import"./vendor-icons-CnLeuN7Z.js";import"./infrastructure-CWeiQ12V.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-zod-CZmssJWz.js";import"./ui-components-BRpbeVr1.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-charts-DthMRf4E.js";import"./plugins-core-BV7ym-7D.js";import"./vendor-dndkit-_-PfuStg.js";import"./plugins-views-gxDbTdkX.js";import"./data-adapter-DCM4pdG4.js";import"./ui-layout-VeUu0ZVf.js";function K(){const o=C(),{appName:i,editAppName:d}=N(),{apps:u,objects:f,refresh:m}=S(),c=w(),n=d||i,a=u.find(t=>t.name===n),g=(f||[]).map(t=>({name:t.name,label:t.label||t.name,icon:t.icon,selected:a?.navigation?.some(e=>e.type==="object"&&e.objectName===t.name)??!1})),x=r.useMemo(()=>{if(a)return{name:a.name,title:a.title||a.label||"",description:a.description||"",icon:a.icon||"",layout:a.layout||"sidebar",navigation:a.navigation||[],branding:{logo:a.branding?.logo||a.logo||"",primaryColor:a.branding?.primaryColor||"#3b82f6",favicon:a.branding?.favicon||a.favicon||""}}},[a]),b=r.useCallback(async t=>{try{const e=j(t),y={...a,...e},l=c?.getClient();l&&await l.meta.saveItem("app",t.name,y),p.success(`Application "${t.title}" updated successfully`),await m?.(),o(`/apps/${t.name}`)}catch(e){p.error(e?.message||"Failed to update application")}},[o,m,c,a]),v=r.useCallback(()=>{o(i?`/apps/${i}`:"/")},[o,i]),h=r.useCallback(t=>{try{localStorage.setItem(`objectui-edit-draft-${n}`,JSON.stringify(t)),p.info("Draft saved")}catch{}},[n]);return a?s.jsx("div",{className:"mx-auto max-w-4xl py-8 px-4","data-testid":"edit-app-page",children:s.jsx(A,{availableObjects:g,initialDraft:x,onComplete:b,onCancel:v,onSaveDraft:h})}):s.jsx("div",{className:"mx-auto max-w-4xl py-8 px-4 text-center","data-testid":"edit-app-not-found",children:s.jsxs("p",{className:"text-muted-foreground",children:['Application "',n,'" not found.']})})}export{K as EditAppPage};
@@ -1 +0,0 @@
1
- import{j as t,L as a}from"./vendor-react-Dvo_9NuO.js";import{u as e,F as i}from"./infrastructure-CWeiQ12V.js";import{A as n}from"./AuthPageLayout-DkrxSZOE.js";import"./vendor-i18n-B3GHNV0X.js";const u=({href:o,className:s,children:r})=>t.jsx(a,{to:o,className:s,children:r});function d(){const{t:o}=e();return t.jsx(n,{children:t.jsx(i,{loginUrl:"/login",title:o("auth.forgotPassword.title"),description:o("auth.forgotPassword.description"),linkComponent:u,labels:{emailLabel:o("auth.forgotPassword.emailLabel"),emailPlaceholder:o("auth.forgotPassword.emailPlaceholder"),submitButton:o("auth.forgotPassword.submitButton"),submittingButton:o("auth.forgotPassword.submittingButton"),successTitle:o("auth.forgotPassword.successTitle"),successDescription:o("auth.forgotPassword.successDescription"),backToSignInText:o("auth.forgotPassword.backToSignInText"),rememberPasswordText:o("auth.forgotPassword.rememberPasswordText"),signInText:o("auth.forgotPassword.signInText")}})})}export{d as ForgotPasswordPage};
@@ -1 +0,0 @@
1
- import{r as f,j as e}from"./vendor-react-Dvo_9NuO.js";import{u as H}from"./plugins-core-BV7ym-7D.js";import{u as G,a as M,P as U,D as Y,e as _,f as J,b as Q,d as V,S as W,v as X,C as Z}from"./vendor-dndkit-_-PfuStg.js";import{B as L,G as R,C as ee,s as se,u as te,t as re,v as ae,ab as ne}from"./ui-components-BRpbeVr1.js";import"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import"./vendor-ui-utils-CU11aiRA.js";import{a as ie,C as oe,T as le,m as de}from"./vendor-icons-CnLeuN7Z.js";import"./infrastructure-CWeiQ12V.js";import"./vendor-i18n-B3GHNV0X.js";import"./plugins-views-gxDbTdkX.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-charts-DthMRf4E.js";import"./vendor-zod-CZmssJWz.js";const z=(...s)=>s.filter(Boolean).join(" ");function ce(s,l){if(!l||l.length===0)return{};for(const t of l){const i=s[t.field];if(i==null)continue;let n=!1;const a=String(i);switch(t.operator){case"equals":n=a===String(t.value);break;case"not_equals":n=a!==String(t.value);break;case"contains":n=a.toLowerCase().includes(String(t.value).toLowerCase());break;case"in":n=Array.isArray(t.value)&&t.value.includes(a);break}if(n)return{...t.backgroundColor?{backgroundColor:t.backgroundColor}:{},...t.borderColor?{borderColor:t.borderColor}:{}}}return{}}function A({card:s,conditionalFormatting:l}){const{attributes:t,listeners:i,setNodeRef:n,transform:a,transition:p,isDragging:d}=V({id:s.id}),h={transform:Z.Transform.toString(a),transition:p,opacity:d?.5:void 0},o=ce(s,l);return e.jsx("div",{ref:n,style:h,...t,...i,children:e.jsxs(ee,{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",style:o,children:[s.coverImage&&e.jsx("div",{className:"w-full h-32 overflow-hidden rounded-t-lg",children:e.jsx("img",{src:s.coverImage,alt:"",className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs(se,{className:"p-4",children:[e.jsx(te,{className:"text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors",children:s.title}),s.description&&e.jsx(re,{className:"text-xs text-muted-foreground font-mono",children:s.description})]}),s.badges&&s.badges.length>0&&e.jsx(ae,{className:"p-4 pt-0",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:s.badges.map((g,v)=>e.jsx(R,{variant:g.variant||"default",className:"text-xs",children:g.label},v))})})]})})}function ue({cards:s,parentRef:l,conditionalFormatting:t}){const i=H({count:s.length,getScrollElement:()=>l.current,estimateSize:()=>120,overscan:5});return e.jsx("div",{style:{height:`${i.getTotalSize()}px`,width:"100%",position:"relative"},children:i.getVirtualItems().map(n=>{const a=s[n.index];return e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${n.start}px)`},children:e.jsx(A,{card:a,conditionalFormatting:t})},a.id)})})}function me({columnId:s,onAdd:l}){const[t,i]=f.useState(!1),[n,a]=f.useState(""),p=f.useRef(null),d=()=>{const o=n.trim();o&&(l(s,o),a("")),i(!1)},h=o=>{o.key==="Enter"?(o.preventDefault(),d()):o.key==="Escape"&&(a(""),i(!1))};return t?e.jsx("div",{className:"mt-2 space-y-2",children:e.jsx(ne,{ref:p,value:n,onChange:o=>a(o.target.value),onKeyDown:h,onBlur:d,placeholder:"Enter card title...",className:"text-sm",autoFocus:!0})}):e.jsxs(L,{variant:"ghost",size:"sm",className:"w-full mt-2 text-muted-foreground hover:text-foreground",onClick:()=>{i(!0),setTimeout(()=>p.current?.focus(),0)},children:[e.jsx(de,{className:"h-4 w-4 mr-1"}),"Add Card"]})}function fe({column:s,cards:l,onToggle:t,enableVirtual:i,quickAdd:n,onQuickAdd:a,conditionalFormatting:p}){const d=l||[],h=f.useRef(null),{setNodeRef:o}=V({id:s.id,data:{type:"column"}}),g=s.limit&&d.length>=s.limit,v=s.limit&&d.length>=s.limit*.8;return e.jsxs("div",{ref:o,className:z("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(L,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(!s.collapsed),children:s.collapsed?e.jsx(ie,{className:"h-4 w-4"}):e.jsx(oe,{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:z("font-mono text-xs",g?"text-destructive":v?"text-yellow-500":"text-muted-foreground"),children:[d.length,s.limit&&` / ${s.limit}`]}),g&&e.jsx(R,{variant:"destructive",className:"text-xs",children:"Full"}),v&&!g&&e.jsx(le,{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(R,{variant:"secondary",className:"text-xs",children:d.length})]})]}),!s.collapsed&&e.jsxs("div",{ref:h,className:"flex-1 p-4 overflow-y-auto",style:{maxHeight:"600px"},children:[e.jsx(W,{items:d.map(m=>m.id),strategy:X,children:i?e.jsx(ue,{cards:d,parentRef:h,conditionalFormatting:p}):e.jsx("div",{className:"space-y-2",children:d.map(m=>e.jsx(A,{card:m,conditionalFormatting:p},m.id))})}),n&&a&&e.jsx(me,{columnId:s.id,onAdd:a})]})]})}function Ie({columns:s,onCardMove:l,onColumnToggle:t,enableVirtualScrolling:i=!1,virtualScrollThreshold:n=50,className:a,quickAdd:p,onQuickAdd:d,conditionalFormatting:h}){const[o,g]=f.useState(null),v=f.useMemo(()=>(s||[]).map(r=>({...r,cards:r.cards||[]})),[s]),[m,I]=f.useState(v);f.useEffect(()=>{I(v)},[v]);const K=G(M(U,{activationConstraint:{distance:8}})),O=r=>{const{active:c}=r,u=$(c.id);g(u)},P=r=>{const{active:c,over:u}=r;if(g(null),!u)return;const x=c.id,w=u.id;if(x===w)return;const b=B(x),y=B(w)||q(w);if(!(!b||!y))if(b.id===y.id){const j=[...b.cards],N=j.findIndex(C=>C.id===x),E=j.findIndex(C=>C.id===w),T=Q(j,N,E);I(C=>C.map(S=>S.id===b.id?{...S,cards:T}:S))}else{const j=[...b.cards],N=[...y.cards],E=j.findIndex(k=>k.id===x),C=w===y.id?N.length:N.findIndex(k=>k.id===w),[S]=j.splice(E,1);N.splice(C,0,S),I(k=>k.map(D=>D.id===b.id?{...D,cards:j}:D.id===y.id?{...D,cards:N}:D)),l&&l(x,b.id,y.id,C)}},$=f.useCallback(r=>{for(const c of m){const u=c.cards.find(x=>x.id===r);if(u)return u}return null},[m]),B=f.useCallback(r=>m.find(c=>c.cards.some(u=>u.id===r))||null,[m]),q=f.useCallback(r=>m.find(c=>c.id===r)||null,[m]),F=f.useCallback((r,c)=>{I(u=>u.map(x=>x.id===r?{...x,collapsed:c}:x)),t?.(r,c)},[t]);return e.jsxs(Y,{sensors:K,collisionDetection:_,onDragStart:O,onDragEnd:P,children:[e.jsx("div",{className:z("flex gap-4 overflow-x-auto p-4",a),children:m.map(r=>{const c=i&&r.cards.length>n;return e.jsx(fe,{column:r,cards:r.cards,onToggle:u=>F(r.id,u),enableVirtual:c,quickAdd:p,onQuickAdd:d,conditionalFormatting:h},r.id)})}),e.jsx(J,{children:o?e.jsx(A,{card:o,conditionalFormatting:h}):null})]})}export{Ie as KanbanEnhanced,Ie as default};
@@ -1 +0,0 @@
1
- import{j as e,r as p}from"./vendor-react-Dvo_9NuO.js";import{u as Q,a as V,T as F,P as ee,D as se,e as te,S as _,v as q,f as re,b as ae,d as G,C as ne}from"./vendor-dndkit-_-PfuStg.js";import{C as oe,s as ie,u as le,t as de,v as ce,G as $,bp as ue,B as me,ab as fe}from"./ui-components-BRpbeVr1.js";import{p as xe,q as pe}from"./framework-jBjO8CT3.js";import"./vendor-objectstack-BkRCrdfn.js";import"./vendor-ui-utils-CU11aiRA.js";import{m as ge}from"./vendor-icons-CnLeuN7Z.js";import"./vendor-radix-BPVlBHPl.js";import"./vendor-i18n-B3GHNV0X.js";import"./vendor-charts-DthMRf4E.js";import"./infrastructure-CWeiQ12V.js";import"./vendor-zod-CZmssJWz.js";const E=(...s)=>s.filter(Boolean).join(" "),T="Uncategorized";function he(s,c){if(!c||c.length===0)return{};for(const o of c){const u=s[o.field];if(u==null)continue;let r=!1;const m=String(u);switch(o.operator){case"equals":r=m===String(o.value);break;case"not_equals":r=m!==String(o.value);break;case"contains":r=m.toLowerCase().includes(String(o.value).toLowerCase());break;case"in":r=Array.isArray(o.value)&&o.value.includes(m);break}if(r)return{...o.backgroundColor?{backgroundColor:o.backgroundColor}:{},...o.borderColor?{borderColor:o.borderColor}:{}}}return{}}function O({card:s,onCardClick:c,conditionalFormatting:o}){const{attributes:u,listeners:r,setNodeRef:m,transform:f,transition:b,isDragging:g}=G({id:s.id}),n={transform:ne.Transform.toString(f),transition:b,opacity:g?.5:void 0},v=he(s,o);return e.jsx("div",{ref:m,style:n,...u,...r,role:"listitem","aria-label":s.title,onClick:()=>c?.(s),children:e.jsxs(oe,{className:"mb-2 cursor-grab active:cursor-grabbing border-border border-l-4 border-l-primary/40 bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group touch-manipulation",style:v,children:[s.coverImage&&e.jsx("div",{className:"w-full h-32 overflow-hidden rounded-t-lg",children:e.jsx("img",{src:s.coverImage,alt:"",className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs(ie,{className:"p-2 sm:p-4",children:[e.jsx(le,{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(de,{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(ce,{className:"p-2 sm:p-4 pt-0",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:s.badges.map((w,C)=>e.jsx($,{variant:w.variant||"default",className:"text-xs",children:w.label},C))})})]})})}function be({columnId:s,onAdd:c}){const[o,u]=p.useState(!1),[r,m]=p.useState(""),f=p.useRef(null),b=()=>{const n=r.trim();n&&(c(s,n),m("")),u(!1)},g=n=>{n.key==="Enter"?(n.preventDefault(),b()):n.key==="Escape"&&(m(""),u(!1))};return o?e.jsx("div",{className:"mt-2 space-y-2",children:e.jsx(fe,{ref:f,value:r,onChange:n=>m(n.target.value),onKeyDown:g,onBlur:b,placeholder:"Enter card title...",className:"text-sm",autoFocus:!0})}):e.jsxs(me,{variant:"ghost",size:"sm",className:"w-full mt-2 text-muted-foreground hover:text-foreground",onClick:()=>{u(!0),setTimeout(()=>f.current?.focus(),0)},children:[e.jsx(ge,{className:"h-4 w-4 mr-1"}),"Add Card"]})}function ve({column:s,cards:c,onCardClick:o,quickAdd:u,onQuickAdd:r,conditionalFormatting:m}){const f=c||[],{setNodeRef:b}=G({id:s.id,data:{type:"column"}}),g=s.limit&&f.length>=s.limit;return e.jsxs("div",{ref:b,role:"group","aria-label":s.title,className:E("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/30 rounded-t-lg",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($,{variant:"secondary",className:"text-xs font-mono tabular-nums",children:[f.length,s.limit&&` / ${s.limit}`]}),g&&e.jsx($,{variant:"destructive",className:"text-xs",children:"Full"})]})]})}),e.jsxs(ue,{className:"flex-1 p-4",children:[e.jsx(_,{items:f.map(n=>n.id),strategy:q,children:e.jsxs("div",{className:"space-y-2",role:"list","aria-label":`${s.title} cards`,children:[f.length===0&&e.jsx("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground/50",children:e.jsx("span",{className:"text-xs font-mono",children:"No cards"})}),f.map(n=>e.jsx(O,{card:n,onCardClick:o,conditionalFormatting:m},n.id))]})}),u&&r&&e.jsx(be,{columnId:s.id,onAdd:r})]})]})}function je({children:s}){const c=pe();return e.jsx(e.Fragment,{children:s(c)})}function Le({columns:s,onCardMove:c,onCardClick:o,className:u,quickAdd:r,onQuickAdd:m,coverImageField:f,conditionalFormatting:b,swimlaneField:g}){return xe()?e.jsx(je,{children:v=>e.jsx(z,{columns:s,onCardMove:c,onCardClick:o,className:u,dnd:v,quickAdd:r,onQuickAdd:m,coverImageField:f,conditionalFormatting:b,swimlaneField:g})}):e.jsx(z,{columns:s,onCardMove:c,onCardClick:o,className:u,dnd:null,quickAdd:r,onQuickAdd:m,coverImageField:f,conditionalFormatting:b,swimlaneField:g})}function z({columns:s,onCardMove:c,onCardClick:o,className:u,dnd:r,quickAdd:m,onQuickAdd:f,coverImageField:b,conditionalFormatting:g,swimlaneField:n}){const[v,w]=p.useState(null),C=n?`objectui:kanban-collapsed:${n}`:null,[H,J]=p.useState(()=>{if(!C)return new Set;try{const t=localStorage.getItem(C);if(t){const i=JSON.parse(t);if(Array.isArray(i))return new Set(i.filter(a=>typeof a=="string"))}}catch{}return new Set}),A=p.useMemo(()=>(s||[]).map(t=>({...t,cards:t.cards||[]})),[s]),[x,B]=p.useState(A);p.useEffect(()=>{B(A)},[A]);const R=p.useMemo(()=>{if(!n)return null;const t=x.flatMap(a=>a.cards),i=new Set;return t.forEach(a=>{const l=a[n];i.add(l!=null?String(l):T)}),Array.from(i).sort()},[x,n]),M=p.useCallback(t=>{J(i=>{const a=new Set(i);if(a.has(t)?a.delete(t):a.add(t),C)try{localStorage.setItem(C,JSON.stringify([...a]))}catch{}return a})},[C]),U=Q(V(ee,{activationConstraint:{distance:5}}),V(F,{activationConstraint:{delay:200,tolerance:5}})),Z=t=>{const{active:i}=t,a=X(i.id);if(w(a),r&&a){const l=K(a.id);l&&r.startDrag({id:a.id,type:"kanban-card",data:a,sourceId:l.id})}},W=t=>{const{active:i,over:a}=t;if(w(null),!a){r&&r.endDrag();return}const l=i.id,h=a.id;if(l===h){r&&r.endDrag();return}const d=K(l),y=K(h)||Y(h);if(!d||!y){r&&r.endDrag();return}if(d.id===y.id){const N=[...d.cards],S=N.findIndex(j=>j.id===l),L=N.findIndex(j=>j.id===h),P=ae(N,S,L);B(j=>j.map(D=>D.id===d.id?{...D,cards:P}:D))}else{const N=[...d.cards],S=[...y.cards],L=N.findIndex(k=>k.id===l),j=h===y.id?S.length:S.findIndex(k=>k.id===h),[D]=N.splice(L,1);S.splice(j,0,D),B(k=>k.map(I=>I.id===d.id?{...I,cards:N}:I.id===y.id?{...I,cards:S}:I)),c&&c(l,d.id,y.id,j)}r&&r.endDrag(y.id)},X=p.useCallback(t=>{for(const i of x){const a=i.cards.find(l=>l.id===t);if(a)return a}return null},[x]),K=p.useCallback(t=>x.find(i=>i.cards.some(a=>a.id===t))||null,[x]),Y=p.useCallback(t=>x.find(i=>i.id===t)||null,[x]);return e.jsxs(se,{sensors:U,collisionDetection:te,onDragStart:Z,onDragEnd:W,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:[x.length," columns"]}),e.jsx("span",{children:"← Swipe to navigate →"})]}),R?e.jsxs("div",{className:E("flex flex-col gap-1 p-2 sm:p-4 min-w-0 overflow-hidden",u),role:"region","aria-label":"Kanban board with swimlanes",children:[e.jsx("div",{className:"flex gap-3 sm:gap-4 pl-36 sm:pl-44 overflow-x-auto",children:x.map(t=>e.jsxs("div",{className:"w-[85vw] sm:w-80 flex-shrink-0 text-center",children:[e.jsx("span",{className:"font-mono text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase",children:t.title}),e.jsxs("span",{className:"ml-2 font-mono text-xs text-muted-foreground",children:["(",t.cards.length,")"]})]},t.id))}),R.map(t=>{const i=H.has(t),a=x.reduce((l,h)=>l+h.cards.filter(d=>(d[n]!=null?String(d[n]):T)===t).length,0);return e.jsxs("div",{className:"border rounded-lg bg-muted/10",children:[e.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-muted/30 transition-colors",onClick:()=>M(t),"aria-expanded":!i,children:[e.jsx("span",{className:E("transition-transform text-xs",i?"":"rotate-90"),children:"▶"}),e.jsx("span",{className:"font-mono text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:t}),e.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["(",a,")"]})]}),!i&&e.jsx("div",{className:"flex gap-3 sm:gap-4 overflow-x-auto px-2 pb-3 pl-36 sm:pl-44",children:x.map(l=>{const h=l.cards.filter(d=>(d[n]!=null?String(d[n]):T)===t);return e.jsx("div",{className:"w-[85vw] sm:w-80 flex-shrink-0 min-h-[60px] rounded-md bg-card/20 p-2",children:e.jsx(_,{items:h.map(d=>d.id),strategy:q,children:e.jsx("div",{className:"space-y-2",role:"list","aria-label":`${l.title} - ${t} cards`,children:h.map(d=>e.jsx(O,{card:d,onCardClick:o,conditionalFormatting:g},d.id))})})},l.id)})})]},t)})]}):e.jsx("div",{className:E("flex gap-3 sm:gap-4 overflow-x-auto snap-x snap-mandatory p-2 sm:p-4 bg-muted/10 rounded-lg [-webkit-overflow-scrolling:touch] min-w-0",u),role:"region","aria-label":"Kanban board",children:x.map(t=>e.jsx(ve,{column:t,cards:t.cards,onCardClick:o,quickAdd:m,onQuickAdd:f,conditionalFormatting:g},t.id))}),e.jsx(re,{children:e.jsx("div",{"aria-live":"assertive","aria-label":v?`Dragging ${v.title}`:void 0,children:v?e.jsx(O,{card:v,conditionalFormatting:g}):null})})]})}export{Le as default};
@@ -1 +0,0 @@
1
- import{f as s,j as a,L as e}from"./vendor-react-Dvo_9NuO.js";import{u as n,L as r}from"./infrastructure-CWeiQ12V.js";import{A as l}from"./AuthPageLayout-DkrxSZOE.js";import"./vendor-i18n-B3GHNV0X.js";const u=({href:o,className:t,children:i})=>a.jsx(e,{to:o,className:t,children:i});function p(){const o=s(),{t}=n();return a.jsx(l,{children:a.jsx(r,{onSuccess:()=>o("/"),registerUrl:"/register",forgotPasswordUrl:"/forgot-password",title:t("auth.login.title"),description:t("auth.login.description"),linkComponent:u,labels:{emailLabel:t("auth.login.emailLabel"),emailPlaceholder:t("auth.login.emailPlaceholder"),passwordLabel:t("auth.login.passwordLabel"),passwordPlaceholder:t("auth.login.passwordPlaceholder"),forgotPasswordText:t("auth.login.forgotPasswordText"),submitButton:t("auth.login.submitButton"),submittingButton:t("auth.login.submittingButton"),noAccountText:t("auth.login.noAccountText"),signUpText:t("auth.login.signUpText")}})})}export{p as LoginPage};