@object-ui/console 3.1.2 → 3.1.4
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/dist/assets/AddressField-BLYuFwUv.js +1 -0
- package/dist/assets/AdvancedChartImpl-Dvg6YIfN.js +7 -0
- package/dist/assets/AppManagementPage-C3hg63SY.js +1 -0
- package/dist/assets/AuditLogPage-BQ8vLOcD.js +1 -0
- package/dist/assets/AuthPageLayout-DDjJTsQ6.js +1 -0
- package/dist/assets/AutoNumberField-DLmi_0fk.js +1 -0
- package/dist/assets/AvatarField-BfoEDA_D.js +1 -0
- package/dist/assets/BooleanField-W3_x7RAZ.js +1 -0
- package/dist/assets/ChartImpl-Cwo6IWnY.js +1 -0
- package/dist/assets/CodeField-BWFqblAU.js +1 -0
- package/dist/assets/ColorField-Y8WM1wXE.js +1 -0
- package/dist/assets/CreateAppPage-Do3sVvxx.js +1 -0
- package/dist/assets/CurrencyField-BeuE1bRa.js +1 -0
- package/dist/assets/DashboardDesignPage-B2PH_3Ly.js +1 -0
- package/dist/assets/DashboardView-DxTi63mN.js +1 -0
- package/dist/assets/DateField-2Lf9jstN.js +1 -0
- package/dist/assets/DateTimeField-BkMuhOZJ.js +1 -0
- package/dist/assets/EditAppPage-j0L1x2UT.js +1 -0
- package/dist/assets/EmailField-CP_O7tmo.js +1 -0
- package/dist/assets/FileField-CcczwlRk.js +1 -0
- package/dist/assets/ForgotPasswordPage-Slo6CHvD.js +1 -0
- package/dist/assets/FormulaField-DLdg1ImO.js +1 -0
- package/dist/assets/GeolocationField-DqeMjnyo.js +1 -0
- package/dist/assets/GridField-DaWMYyuc.js +1 -0
- package/dist/assets/ImageField-DAn05d1y.js +1 -0
- package/dist/assets/KanbanEnhanced-Dj7Qccu2.js +1 -0
- package/dist/assets/KanbanImpl-D9BbG_RT.js +1 -0
- package/dist/assets/LocationField-DYHVF_gq.js +1 -0
- package/dist/assets/LoginPage-D2CqpSi0.js +1 -0
- package/dist/assets/LookupField-BF9vCmht.js +1 -0
- package/dist/assets/MarkdownImpl-B0Iew7iJ.js +29 -0
- package/dist/assets/MasterDetailField-Dw4RRQ5W.js +1 -0
- package/dist/assets/NumberField-BKuVHBrN.js +1 -0
- package/dist/assets/ObjectField-z00gmFEc.js +1 -0
- package/dist/assets/OrgManagementPage-BTNWvRHI.js +1 -0
- package/dist/assets/PageDesignPage-B62v76Qo.js +1 -0
- package/dist/assets/PageView-CzF68bdQ.js +2 -0
- package/dist/assets/PasswordField-B_rXL4g9.js +1 -0
- package/dist/assets/PercentField-Bn_SIbNe.js +1 -0
- package/dist/assets/PermissionManagementPage-PWrxdXgQ.js +1 -0
- package/dist/assets/PhoneField-DuheMaUR.js +1 -0
- package/dist/assets/ProfilePage-CUo-xIgl.js +1 -0
- package/dist/assets/QRCodeField-IPS2Rpmi.js +1 -0
- package/dist/assets/RatingField-M6qZlpA4.js +1 -0
- package/dist/assets/RecordDetailView-FkYkjMEZ.js +1 -0
- package/dist/assets/RegisterPage-D7PJIabW.js +1 -0
- package/dist/assets/ReportView-pQJYBCo1.js +1 -0
- package/dist/assets/RichTextField-CDGy9V9x.js +1 -0
- package/dist/assets/RoleManagementPage-cNU9Z5K1.js +1 -0
- package/dist/assets/SearchResultsPage-DJU7W1Zx.js +1 -0
- package/dist/assets/SelectField-F6UDlyvf.js +1 -0
- package/dist/assets/SignatureField-CHN7xBII.js +1 -0
- package/dist/assets/SliderField-BOfEMQyU.js +1 -0
- package/dist/assets/SummaryField-CZ8KzmBZ.js +1 -0
- package/dist/assets/SystemHubPage-BxKsLijB.js +1 -0
- package/dist/assets/TextAreaField-1E39zZ_x.js +1 -0
- package/dist/assets/TextField-CwuU0Crc.js +1 -0
- package/dist/assets/TimeField-CEWXxhLE.js +1 -0
- package/dist/assets/UrlField-BtUImn9B.js +1 -0
- package/dist/assets/UserField-DSSEoy5L.js +1 -0
- package/dist/assets/UserManagementPage-D2qUebpD.js +1 -0
- package/dist/assets/VectorField-BjfQeTZT.js +1 -0
- package/dist/assets/data-adapter-wZ81OFjZ.js +39 -0
- package/dist/assets/framework-DJlDX9E6.js +1 -0
- package/dist/assets/index-D9-L0QBO.css +2 -0
- package/dist/assets/index-RiB5-8aY.js +8 -0
- package/dist/assets/infrastructure-C6Ph6Ug0.js +3 -0
- package/dist/assets/maplibre-gl-DsUGuDud.js +756 -0
- package/dist/assets/plugins-core-Cfhp_BXE.css +2 -0
- package/dist/assets/plugins-core-PiAAytWV.js +136 -0
- package/dist/assets/plugins-views-CE0VP3vl.js +62 -0
- package/dist/assets/plugins-views-DnNKJB60.css +1 -0
- package/dist/assets/rolldown-runtime-Dw2cE7zH.js +1 -0
- package/dist/assets/skeletons-DcGqw3b1.js +1 -0
- package/dist/assets/src-oeWLmiqa.js +1 -0
- package/dist/assets/systemObjects-5--4zaiX.js +1 -0
- package/dist/assets/ui-layout-DdDX0gzI.js +3 -0
- package/dist/assets/vendor-charts-Bl5l0H2K.js +3 -0
- package/dist/assets/vendor-objectstack-BtztJIHv.js +1 -0
- package/dist/assets/vendor-react-BwtAzZZ3.js +9 -0
- package/dist/index.html +15 -24
- package/dist/mockServiceWorker.js +1 -1
- package/package.json +47 -47
- package/dist/assets/AdvancedChartImpl-D711bBuO.js +0 -7
- package/dist/assets/AppManagementPage-CaWUYaXX.js +0 -1
- package/dist/assets/AuditLogPage-CB1qkThp.js +0 -1
- package/dist/assets/AuthPageLayout-9l5xWV_-.js +0 -1
- package/dist/assets/ChartImpl-B9B4Fnbe.js +0 -1
- package/dist/assets/CreateAppPage-DLRU3TEg.js +0 -1
- package/dist/assets/DashboardDesignPage-DGz-5xrK.js +0 -1
- package/dist/assets/DashboardView-v834XbaQ.js +0 -1
- package/dist/assets/EditAppPage-DocDqKMS.js +0 -1
- package/dist/assets/ForgotPasswordPage-8ypvh4-X.js +0 -1
- package/dist/assets/KanbanEnhanced-Cw4oddBv.js +0 -1
- package/dist/assets/KanbanImpl-D6ggfmB0.js +0 -1
- package/dist/assets/LoginPage-XakThPoT.js +0 -1
- package/dist/assets/MarkdownImpl-C0wRapHT.js +0 -29
- package/dist/assets/OrgManagementPage-Df5167oO.js +0 -1
- package/dist/assets/PageDesignPage-BzM4EsXt.js +0 -1
- package/dist/assets/PageView-CpIQvLmr.js +0 -2
- package/dist/assets/PermissionManagementPage-CZH3URJU.js +0 -1
- package/dist/assets/ProfilePage-BvIbbebc.js +0 -1
- package/dist/assets/RecordDetailView-BNnPf0DG.js +0 -1
- package/dist/assets/RegisterPage-CIeFN9rY.js +0 -1
- package/dist/assets/ReportView-DYhXezmy.js +0 -1
- package/dist/assets/RoleManagementPage-D0X7HlqJ.js +0 -1
- package/dist/assets/SearchResultsPage-CoMB32KW.js +0 -1
- package/dist/assets/SystemHubPage-Cvl3VKcV.js +0 -1
- package/dist/assets/UserManagementPage-5k8BQxT1.js +0 -1
- package/dist/assets/data-adapter-Bif-TtZA.js +0 -1
- package/dist/assets/framework-52FGgFF6.js +0 -10
- package/dist/assets/index-D5i0wk-G.js +0 -1
- package/dist/assets/index-fjkakZm9.js +0 -9
- package/dist/assets/index-h9Jznm67.css +0 -1
- package/dist/assets/infrastructure-Dn7jNPwf.js +0 -1
- package/dist/assets/maplibre-gl-DVmJFhI2.js +0 -811
- package/dist/assets/plugins-core-CP8uPw4p.js +0 -8
- package/dist/assets/plugins-views-DZCu8Ex3.js +0 -62
- package/dist/assets/plugins-views-P3eB-els.css +0 -1
- package/dist/assets/systemObjects-DSpePIIy.js +0 -1
- package/dist/assets/ui-components-BE4yvyhE.js +0 -36
- package/dist/assets/ui-components-CxztIKgM.css +0 -1
- package/dist/assets/ui-layout-CYnH69Z2.js +0 -1
- package/dist/assets/vendor-charts-BLNOCZWl.js +0 -65
- package/dist/assets/vendor-dndkit-CX1oDZqy.js +0 -5
- package/dist/assets/vendor-i18n-E3-WitRV.js +0 -9
- package/dist/assets/vendor-icons-ndICq8DC.js +0 -8561
- package/dist/assets/vendor-objectstack-CatrkstC.js +0 -34
- package/dist/assets/vendor-radix-C6qchjxv.js +0 -56
- package/dist/assets/vendor-react-9M-xu2bR.js +0 -60
- package/dist/assets/vendor-ui-utils-3tkeUVaX.js +0 -1
- package/dist/assets/vendor-zod-C5j6C2CQ.js +0 -39
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{E as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as AddressField};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,w as n}from"./framework-DJlDX9E6.js";import{Mn as r,Wi as i,ca as a}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";import{_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,y as T}from"./vendor-charts-Bl5l0H2K.js";var E=e(t(),1),D=n(),O=(...e)=>e.filter(Boolean).join(` `),k={light:``,dark:`.dark`},A=E.createContext(null);function j(){let e=E.useContext(A);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function M({id:e,className:t,children:n,config:r,...i}){let o=E.useId(),s=`chart-${e||o.replace(/:/g,``)}`;return(0,D.jsx)(A.Provider,{value:{config:r},children:(0,D.jsxs)(`div`,{"data-slot":`chart`,"data-chart":s,className:O(`flex w-full h-[350px] justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground`,t),...i,children:[(0,D.jsx)(N,{id:s,config:r}),(0,D.jsx)(a,{width:`100%`,height:`100%`,children:n})]})})}var N=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?(0,D.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(k).map(([t,r])=>`
|
|
2
|
+
${r} [data-chart=${e}] {
|
|
3
|
+
${n.map(([e,n])=>{let r=n.theme?.[t]||n.color;return r?` --color-${e}: ${r};`:null}).join(`
|
|
4
|
+
`)}
|
|
5
|
+
}
|
|
6
|
+
`).join(`
|
|
7
|
+
`)}}):null},P=r;function F({active:e,payload:t,className:n,indicator:r=`dot`,hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:d,labelKey:f}){let{config:p}=j(),m=E.useMemo(()=>{if(i||!t?.length)return null;let[e]=t,n=R(p,e,`${f||e?.dataKey||e?.name||`value`}`),r=!f&&typeof o==`string`?p[o]?.label||o:n?.label;return s?(0,D.jsx)(`div`,{className:O(`font-medium`,c),children:s(r,t)}):r?(0,D.jsx)(`div`,{className:O(`font-medium`,c),children:r}):null},[o,s,t,i,c,p,f]);if(!e||!t?.length)return null;let h=t.length===1&&r!==`dot`;return(0,D.jsxs)(`div`,{className:O(`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:[h?null:m,(0,D.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=R(p,e,`${d||e.name||e.dataKey||`value`}`),i=u||e.payload.fill||e.color;return(0,D.jsx)(`div`,{className:O(`[&>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:l&&e?.value!==void 0&&e.name?l(e.value,e.name,e,t,e.payload):(0,D.jsxs)(D.Fragment,{children:[n?.icon?(0,D.jsx)(n.icon,{}):!a&&(0,D.jsx)(`div`,{className:O(`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`:``,h&&r===`dashed`?`my-0.5`:``),style:{"--color-bg":i,"--color-border":i}}),(0,D.jsxs)(`div`,{className:O(`flex flex-1 justify-between leading-none`,h?`items-end`:`items-center`),children:[(0,D.jsxs)(`div`,{className:`grid gap-1.5`,children:[h?m:null,(0,D.jsx)(`span`,{className:`text-muted-foreground`,children:n?.label||e.name})]}),e.value&&(0,D.jsx)(`span`,{className:`text-foreground font-mono font-medium tabular-nums`,children:e.value.toLocaleString()})]})]})},e.dataKey)})})]})}var I=i;function L({className:e,hideIcon:t=!1,payload:n,verticalAlign:r=`bottom`,nameKey:i}){let{config:a}=j();return n?.length?(0,D.jsx)(`div`,{className:O(`flex items-center justify-center gap-4`,r===`top`?`pb-3`:`pt-3`,e),children:n.filter(e=>e.type!==`none`).map(e=>{let n=R(a,e,`${i||e.dataKey||`value`}`);return(0,D.jsxs)(`div`,{className:O(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`),children:[n?.icon&&!t?(0,D.jsx)(n.icon,{}):(0,D.jsx)(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),n?.label]},e.value)})}):null}function R(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var z=`hsl(var(--primary))`,B={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`},V=e=>B[e]||e;function H({chartType:e=`bar`,data:t=[],config:n={},xAxisKey:r=`name`,series:i=[],className:a=``}){let O=Array.isArray(t)?t:[],[k,A]=E.useState(!1);E.useEffect(()=>{let e=()=>A(window.innerWidth<640);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let j={bar:s,line:v,area:S,pie:m,donut:m,radar:b,scatter:_,combo:s}[e]||s;console.log(`📈 Rendering Chart:`,{chartType:e,dataLength:O.length,config:n,series:i,xAxisKey:r});let N=()=>[`hsl(var(--chart-1))`,`hsl(var(--chart-2))`,`hsl(var(--chart-3))`,`hsl(var(--chart-4))`,`hsl(var(--chart-5))`];if(e===`pie`||e===`donut`){let t=e===`donut`?60:0;return(0,D.jsx)(M,{config:n,className:a,children:(0,D.jsxs)(m,{children:[(0,D.jsx)(P,{cursor:!1,content:(0,D.jsx)(F,{hideLabel:!0})}),(0,D.jsx)(f,{data:O,dataKey:i[0]?.dataKey||`value`,nameKey:r||`name`,innerRadius:t,strokeWidth:5,paddingAngle:2,outerRadius:80,children:O.map((e,t)=>{let i=n[e[r]]?.color;if(!i){let e=N();i=e[t%e.length]}return(0,D.jsx)(c,{fill:V(i)},`cell-${t}`)})}),(0,D.jsx)(I,{content:(0,D.jsx)(L,{nameKey:r}),...k&&{verticalAlign:`bottom`,wrapperStyle:{fontSize:`11px`,paddingTop:`8px`}}})]})})}return e===`radar`?(0,D.jsx)(M,{config:n,className:a,children:(0,D.jsxs)(b,{data:O,children:[(0,D.jsx)(T,{}),(0,D.jsx)(o,{dataKey:r}),(0,D.jsx)(w,{}),(0,D.jsx)(P,{content:(0,D.jsx)(F,{})}),(0,D.jsx)(I,{content:(0,D.jsx)(L,{}),...k&&{verticalAlign:`bottom`,wrapperStyle:{fontSize:`11px`,paddingTop:`8px`}}}),i.map(e=>{let t=V(n[e.dataKey]?.color||z);return(0,D.jsx)(p,{dataKey:e.dataKey,stroke:t,fill:t,fillOpacity:.6},e.dataKey)})]})}):e===`scatter`?(0,D.jsx)(M,{config:n,className:a,children:(0,D.jsxs)(_,{children:[(0,D.jsx)(g,{vertical:!1}),(0,D.jsx)(h,{type:`number`,dataKey:r,name:String(n[r]?.label||r),tickLine:!1,axisLine:!1,interval:k?Math.ceil(O.length/5):0}),(0,D.jsx)(l,{type:`number`,dataKey:i[0]?.dataKey||`value`,name:String(n[i[0]?.dataKey]?.label||i[0]?.dataKey),tickLine:!1,axisLine:!1}),(0,D.jsx)(x,{type:`number`,range:[60,400]}),(0,D.jsx)(P,{content:(0,D.jsx)(F,{})}),(0,D.jsx)(I,{content:(0,D.jsx)(L,{}),...k&&{verticalAlign:`bottom`,wrapperStyle:{fontSize:`11px`,paddingTop:`8px`}}}),i.map((e,t)=>{let r=N(),i=V(n[e.dataKey]?.color||r[t%r.length]);return(0,D.jsx)(C,{name:n[e.dataKey]?.label||e.dataKey,data:O,fill:i},e.dataKey)})]})}):e===`combo`?(0,D.jsx)(M,{config:n,className:a,children:(0,D.jsxs)(s,{data:O,children:[(0,D.jsx)(g,{vertical:!1}),(0,D.jsx)(h,{dataKey:r,tickLine:!1,tickMargin:10,axisLine:!1,interval:k?Math.ceil(O.length/5):0,tickFormatter:e=>e&&typeof e==`string`?e.slice(0,3):e}),(0,D.jsx)(l,{yAxisId:`left`,tickLine:!1,axisLine:!1}),(0,D.jsx)(l,{yAxisId:`right`,orientation:`right`,tickLine:!1,axisLine:!1}),(0,D.jsx)(P,{content:(0,D.jsx)(F,{})}),(0,D.jsx)(I,{content:(0,D.jsx)(L,{}),...k&&{verticalAlign:`bottom`,wrapperStyle:{fontSize:`11px`,paddingTop:`8px`}}}),i.map((e,t)=>{let r=V(n[e.dataKey]?.color||z),i=e.chartType||(t===0?`bar`:`line`),a=i===`bar`?`left`:`right`;return i===`line`?(0,D.jsx)(y,{yAxisId:a,type:`monotone`,dataKey:e.dataKey,stroke:r,strokeWidth:2,dot:!1},e.dataKey):i===`area`?(0,D.jsx)(d,{yAxisId:a,type:`monotone`,dataKey:e.dataKey,fill:r,stroke:r,fillOpacity:.4},e.dataKey):(0,D.jsx)(u,{yAxisId:a,dataKey:e.dataKey,fill:r,radius:4},e.dataKey)})]})}):(0,D.jsx)(M,{config:n,className:a,children:(0,D.jsxs)(j,{data:O,children:[(0,D.jsx)(g,{vertical:!1}),(0,D.jsx)(h,{dataKey:r,tickLine:!1,tickMargin:10,axisLine:!1,interval:k?Math.ceil(O.length/5):0,tickFormatter:e=>e&&typeof e==`string`?e.slice(0,3):e}),(0,D.jsx)(P,{content:(0,D.jsx)(F,{})}),(0,D.jsx)(I,{content:(0,D.jsx)(L,{}),...k&&{verticalAlign:`bottom`,wrapperStyle:{fontSize:`11px`,paddingTop:`8px`}}}),i.map(t=>{let r=V(n[t.dataKey]?.color||z);return e===`bar`?(0,D.jsx)(u,{dataKey:t.dataKey,fill:r,radius:4},t.dataKey):e===`line`?(0,D.jsx)(y,{type:`monotone`,dataKey:t.dataKey,stroke:r,strokeWidth:2,dot:!1},t.dataKey):e===`area`?(0,D.jsx)(d,{type:`monotone`,dataKey:t.dataKey,fill:r,stroke:r,fillOpacity:.4},t.dataKey):null})]})})}export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,w as n}from"./framework-DJlDX9E6.js";import{Bs as r,Co as i,Gs as a,Jo as o,Lc as s,Ms as c,Po as l,So as u,St as d,ds as f,fs as p,gc as m,on as h,ps as g,vs as _}from"./plugins-core-PiAAytWV.js";import"./data-adapter-wZ81OFjZ.js";import{l as v,u as y}from"./ui-layout-DdDX0gzI.js";import"./infrastructure-C6Ph6Ug0.js";import{c as b,o as x}from"./index-RiB5-8aY.js";var S=e(t(),1),C=n();function w(){let e=v(),{appName:t}=y(),n=t?`/apps/${t}`:``,{apps:w,refresh:T}=b(),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(new Set),[A,j]=(0,S.useState)(null),[M,N]=(0,S.useState)(!1),P=(w||[]).filter(e=>{if(!E)return!0;let t=E.toLowerCase();return(e.name||``).toLowerCase().includes(t)||(e.label||``).toLowerCase().includes(t)||(e.description||``).toLowerCase().includes(t)}),F=(0,S.useCallback)(e=>{k(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),I=(0,S.useCallback)(()=>{O.size===P.length?k(new Set):k(new Set(P.map(e=>e.name)))},[O.size,P]),L=(0,S.useCallback)(async e=>{N(!0);try{let t=e.active===!1;d.success(`${e.label||e.name} ${t?`enabled`:`disabled`}`),await T()}catch{d.error(`Failed to toggle app status`)}finally{N(!1)}},[T]),R=(0,S.useCallback)(async e=>{N(!0);try{d.success(`${e.label||e.name} set as default`),await T()}catch{d.error(`Failed to set default app`)}finally{N(!1)}},[T]),z=(0,S.useCallback)(async e=>{if(A!==e.name){j(e.name);return}N(!0);try{d.success(`${e.label||e.name} deleted`),j(null),await T()}catch{d.error(`Failed to delete app`)}finally{N(!1)}},[A,T]),B=(0,S.useCallback)(async e=>{N(!0);try{d.success(`${O.size} apps ${e?`enabled`:`disabled`}`),k(new Set),await T()}catch{d.error(`Bulk operation failed`)}finally{N(!1)}},[O,T]);return(0,C.jsxs)(`div`,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:`Applications`}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Manage all configured applications`})]}),(0,C.jsxs)(o,{onClick:()=>e(`${n}/create-app`),"data-testid":`create-app-btn`,children:[(0,C.jsx)(r,{className:`h-4 w-4 mr-2`}),`New App`]})]}),(0,C.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[(0,C.jsxs)(`div`,{className:`relative flex-1 max-w-sm`,children:[(0,C.jsx)(c,{className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,C.jsx)(h,{placeholder:`Search apps...`,value:E,onChange:e=>D(e.target.value),className:`pl-8`,"data-testid":`app-search-input`})]}),O.size>0&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsxs)(l,{variant:`secondary`,children:[O.size,` selected`]}),(0,C.jsx)(o,{variant:`outline`,size:`sm`,onClick:()=>B(!0),disabled:M,children:`Enable`}),(0,C.jsx)(o,{variant:`outline`,size:`sm`,onClick:()=>B(!1),disabled:M,children:`Disable`})]})]}),P.length>0&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:O.size===P.length&&P.length>0,onChange:I,className:`rounded border-input`,"aria-label":`Select all apps`}),(0,C.jsxs)(`span`,{children:[`Select all (`,P.length,`)`]})]}),P.length===0?(0,C.jsxs)(`div`,{className:`text-center py-12 text-muted-foreground`,"data-testid":`no-apps-message`,children:[(0,C.jsx)(m,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,C.jsx)(`p`,{children:`No apps found.`})]}):(0,C.jsx)(`div`,{className:`grid gap-3`,children:P.map(t=>{let r=t.active!==!1,c=t.isDefault===!0,d=A===t.name;return(0,C.jsx)(u,{className:r?``:`opacity-60`,"data-testid":`app-card-${t.name}`,children:(0,C.jsxs)(i,{className:`flex items-center gap-3 py-3 px-4`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:O.has(t.name),onChange:()=>F(t.name),className:`rounded border-input shrink-0`,"aria-label":`Select ${t.label||t.name}`}),(0,C.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,C.jsx)(m,{className:`h-4 w-4`})}),(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(`span`,{className:`font-medium truncate`,children:x(t.label)||t.name}),c&&(0,C.jsx)(l,{variant:`default`,className:`text-xs`,children:`Default`}),(0,C.jsx)(l,{variant:r?`secondary`:`outline`,className:`text-xs`,children:r?`Active`:`Inactive`})]}),t.description&&(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:x(t.description)})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,C.jsx)(o,{variant:`ghost`,size:`icon`,title:`Open app`,onClick:()=>e(`/apps/${t.name}`),children:(0,C.jsx)(s,{className:`h-4 w-4`})}),(0,C.jsx)(o,{variant:`ghost`,size:`icon`,title:`Edit app`,onClick:()=>e(`${n}/edit-app/${t.name}`),children:(0,C.jsx)(a,{className:`h-4 w-4`})}),(0,C.jsx)(o,{variant:`ghost`,size:`icon`,title:r?`Disable app`:`Enable app`,onClick:()=>L(t),disabled:M,children:r?(0,C.jsx)(p,{className:`h-4 w-4`}):(0,C.jsx)(g,{className:`h-4 w-4`})}),(0,C.jsx)(o,{variant:`ghost`,size:`icon`,title:`Set as default`,onClick:()=>R(t),disabled:M||c,children:(0,C.jsx)(_,{className:`h-4 w-4 ${c?`fill-current text-yellow-500`:``}`})}),(0,C.jsx)(o,{variant:`ghost`,size:`icon`,title:d?`Click again to confirm delete`:`Delete app`,onClick:()=>z(t),disabled:M,className:d?`text-destructive`:``,children:(0,C.jsx)(f,{className:`h-4 w-4`})})]})]})},t.name)})})]})}export{w as AppManagementPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,w as n}from"./framework-DJlDX9E6.js";import{Co as r,Ns as i,Po as a,So as o,St as s,dc as c}from"./plugins-core-PiAAytWV.js";import"./data-adapter-wZ81OFjZ.js";import"./infrastructure-C6Ph6Ug0.js";import{s as l}from"./index-RiB5-8aY.js";import{t as u}from"./systemObjects-5--4zaiX.js";var d=e(t(),1),f=n(),p=u.find(e=>e.name===`sys_audit_log`),m=p.views[0].columns;function h(){let e=l(),[t,n]=(0,d.useState)([]),[u,h]=(0,d.useState)(!0),g=(0,d.useCallback)(async()=>{if(e){h(!0);try{n((await e.find(`sys_audit_log`,{$orderby:{createdAt:`desc`}})).data||[])}catch{s.error(`Failed to load audit logs`)}finally{h(!1)}}},[e]);return(0,d.useEffect)(()=>{g()},[g]),(0,f.jsxs)(`div`,{className:`flex flex-col gap-4 sm:gap-6 p-4 sm:p-6`,children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,f.jsx)(`div`,{className:`bg-primary/10 p-2 rounded-md shrink-0`,children:(0,f.jsx)(i,{className:`h-5 w-5 text-primary`})}),(0,f.jsxs)(`div`,{className:`min-w-0`,children:[(0,f.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:`Audit Log`}),(0,f.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5`,children:`View system activity and user actions`})]})]}),(0,f.jsx)(o,{children:(0,f.jsx)(r,{className:`p-0`,children:(0,f.jsx)(`div`,{className:`overflow-x-auto`,children:(0,f.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsx)(`tr`,{className:`border-b bg-muted/50`,children:m.map(e=>(0,f.jsx)(`th`,{className:`h-10 px-3 sm:px-4 text-left font-medium text-muted-foreground whitespace-nowrap`,children:p.fields.find(t=>t.name===e)?.label??e},e))})}),(0,f.jsx)(`tbody`,{children:u?(0,f.jsx)(`tr`,{children:(0,f.jsx)(`td`,{className:`p-6 text-center`,colSpan:m.length,children:(0,f.jsx)(c,{className:`h-6 w-6 animate-spin mx-auto text-muted-foreground`})})}):t.length===0?(0,f.jsx)(`tr`,{children:(0,f.jsx)(`td`,{className:`p-4 sm:p-6 text-center text-sm text-muted-foreground`,colSpan:m.length,children:(0,f.jsxs)(`div`,{className:`flex flex-col items-center gap-2 py-4`,children:[(0,f.jsx)(i,{className:`h-8 w-8 text-muted-foreground/50`}),(0,f.jsx)(`p`,{children:`No audit logs found.`}),(0,f.jsx)(a,{variant:`secondary`,className:`text-xs`,children:`Read-only`})]})})}):t.map(e=>(0,f.jsx)(`tr`,{className:`border-b hover:bg-muted/50 transition-colors`,children:m.map(t=>(0,f.jsx)(`td`,{className:`h-10 px-3 sm:px-4 whitespace-nowrap`,children:String(e[t]??``)},t))},e.id||e._id))})]})})})})]})}export{h as AuditLogPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./framework-DJlDX9E6.js";var t=e();function n({children:e}){return(0,t.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,t.jsx)(`div`,{className:`hidden lg:flex lg:w-1/2 items-center justify-center bg-primary p-12`,children:(0,t.jsxs)(`div`,{className:`max-w-md space-y-6 text-primary-foreground`,children:[(0,t.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,t.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:(0,t.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`})}),(0,t.jsx)(`span`,{className:`text-2xl font-bold`,children:`ObjectStack`})]}),(0,t.jsx)(`h2`,{className:`text-3xl font-bold leading-tight`,children:`Build powerful business applications, faster.`}),(0,t.jsx)(`p`,{className:`text-lg opacity-90`,children:`The universal platform for enterprise data management, workflows, and analytics.`})]})}),(0,t.jsx)(`div`,{className:`flex w-full lg:w-1/2 items-center justify-center bg-background px-6 py-12`,children:e})]})}export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{I as e}from"./plugins-core-PiAAytWV.js";export{e as AutoNumberField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{D as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as AvatarField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{tt as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as BooleanField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./framework-DJlDX9E6.js";import{Mn as t,Wi as n,ca as r}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";import{a as i,c as a,d as o,l as s,m as c}from"./vendor-charts-Bl5l0H2K.js";var l=e();function u({data:e=[],dataKey:u=`value`,xAxisKey:d=`name`,height:f=400,className:p=``,color:m=`hsl(var(--primary))`}){return(0,l.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 ${p}`,children:(0,l.jsx)(r,{width:`100%`,height:f,children:(0,l.jsxs)(i,{data:e,margin:{top:10,right:10,left:10,bottom:5},children:[(0,l.jsxs)(`defs`,{children:[(0,l.jsxs)(`linearGradient`,{id:`barGradient`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,l.jsx)(`stop`,{offset:`0%`,stopColor:m,stopOpacity:1}),(0,l.jsx)(`stop`,{offset:`90%`,stopColor:m,stopOpacity:.6}),(0,l.jsx)(`stop`,{offset:`100%`,stopColor:m,stopOpacity:.3})]}),(0,l.jsxs)(`filter`,{id:`glow`,height:`130%`,children:[(0,l.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`3`,result:`blur`}),(0,l.jsx)(`feOffset`,{in:`blur`,dx:`0`,dy:`0`,result:`offsetBlur`}),(0,l.jsx)(`feFlood`,{floodColor:m,floodOpacity:`0.5`,result:`offsetColor`}),(0,l.jsx)(`feComposite`,{in:`offsetColor`,in2:`offsetBlur`,operator:`in`,result:`offsetBlur`}),(0,l.jsxs)(`feMerge`,{children:[(0,l.jsx)(`feMergeNode`,{in:`offsetBlur`}),(0,l.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),(0,l.jsx)(c,{strokeDasharray:`3 3`,stroke:`hsl(var(--border))`,vertical:!1}),(0,l.jsx)(s,{dataKey:d,tick:{fill:`hsl(var(--muted-foreground))`,fontSize:12,fontFamily:`monospace`},tickLine:!1,axisLine:{stroke:`hsl(var(--border))`},dy:10}),(0,l.jsx)(a,{tick:{fill:`hsl(var(--muted-foreground))`,fontSize:12,fontFamily:`monospace`},tickLine:!1,axisLine:!1}),(0,l.jsx)(t,{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))`}}),(0,l.jsx)(n,{wrapperStyle:{paddingTop:`20px`,fontFamily:`monospace`}}),(0,l.jsx)(o,{dataKey:u,fill:`url(#barGradient)`,radius:[4,4,0,0],filter:`url(#glow)`,animationDuration:1500})]})})})}export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{O as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as CodeField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{j as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as ColorField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,n,w as r}from"./framework-DJlDX9E6.js";import{St as i}from"./plugins-core-PiAAytWV.js";import"./data-adapter-wZ81OFjZ.js";import{l as a,u as o}from"./ui-layout-DdDX0gzI.js";import"./infrastructure-C6Ph6Ug0.js";import{c as s,s as c}from"./index-RiB5-8aY.js";import{n as l}from"./src-oeWLmiqa.js";var u=e(t(),1),d=r(),f=`objectui-app-wizard-draft`;function p(){let e=a(),{appName:t}=o(),{objects:r,refresh:p}=s(),m=c(),h=(r||[]).map(e=>({name:e.name,label:e.label||e.name,icon:e.icon,selected:!1})),g=(0,u.useCallback)(()=>{try{let e=localStorage.getItem(f);if(e)return JSON.parse(e)}catch{}},[]),_=(0,u.useCallback)(async t=>{try{let r=n(t),a=m?.getClient();a&&await a.meta.saveItem(`app`,t.name,r),localStorage.removeItem(f),i.success(`Application "${t.title}" created successfully`),await p?.(),e(`/apps/${t.name}`)}catch(e){i.error(e?.message||`Failed to create application`)}},[e,p,m]),v=(0,u.useCallback)(()=>{e(t?`/apps/${t}`:`/`)},[e,t]),y=(0,u.useCallback)(e=>{try{localStorage.setItem(f,JSON.stringify(e)),i.info(`Draft saved`)}catch{}},[]);return(0,d.jsx)(`div`,{className:`mx-auto max-w-4xl py-8 px-4`,"data-testid":`create-app-page`,children:(0,d.jsx)(l,{availableObjects:h,initialDraft:g(),onComplete:_,onCancel:v,onSaveDraft:y})})}export{p as CreateAppPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{Y as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as CurrencyField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,w as n}from"./framework-DJlDX9E6.js";import{St as r,gl as i}from"./plugins-core-PiAAytWV.js";import"./data-adapter-wZ81OFjZ.js";import{l as a,u as o}from"./ui-layout-DdDX0gzI.js";import"./infrastructure-C6Ph6Ug0.js";import{c as s,s as c}from"./index-RiB5-8aY.js";import{t as l}from"./src-oeWLmiqa.js";var u=e(t(),1),d=n();function f(){let e=a(),{dashboardName:t}=o(),n=c(),{dashboards:f,refresh:p}=s(),m=f?.find(e=>e.name===t),[h,g]=(0,u.useState)(()=>m||{type:`dashboard`,name:t??``,title:t??``,columns:2,widgets:[]}),_=(0,u.useRef)(h);_.current=h;let v=(0,u.useCallback)(async e=>{try{if(n)return await n.update(`sys_dashboard`,t,e),p().catch(()=>{}),!0}catch{}return!1},[n,t,p]),y=(0,u.useCallback)(async e=>{g(e),await v(e)},[v]);(0,u.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&e.key===`s`&&(e.preventDefault(),v(_.current).then(e=>{e&&r.success(`Dashboard saved`)}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let b=(0,u.useCallback)(e=>{let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),i=URL.createObjectURL(n),a=document.createElement(`a`);a.href=i,a.download=`${t||`dashboard`}.json`,a.click(),URL.revokeObjectURL(i),r.success(`Dashboard schema exported`)},[t]),x=(0,u.useCallback)(e=>{r.success(`Dashboard schema imported`),y(e)},[y]);return m?(0,d.jsxs)(`div`,{className:`h-full flex flex-col`,"data-testid":`dashboard-design-page`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-4 py-3 sm:px-6`,children:[(0,d.jsx)(`button`,{type:`button`,onClick:()=>e(-1),className:`rounded p-1.5 text-muted-foreground hover:text-foreground`,"aria-label":`Go back`,"data-testid":`dashboard-design-back`,children:(0,d.jsx)(i,{className:`h-4 w-4`})}),(0,d.jsxs)(`h1`,{className:`text-lg font-semibold tracking-tight truncate`,children:[`Edit Dashboard: `,m.label||m.title||t]})]}),(0,d.jsx)(`div`,{className:`flex-1 overflow-auto p-4 sm:p-6`,children:(0,d.jsx)(l,{schema:h,onChange:y,onExport:b,onImport:x})})]}):(0,d.jsxs)(`div`,{className:`h-full flex items-center justify-center text-muted-foreground`,children:[`Dashboard "`,t,`" not found`]})}export{f as DashboardDesignPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,w as n}from"./framework-DJlDX9E6.js";import{Bs as r,Gs as i,Jo as a,al as o,ct as s,ds as c,gc as l,gs as u,hc as ee,lt as d,ol as f,rl as p,st as te,us as m}from"./plugins-core-PiAAytWV.js";import"./data-adapter-wZ81OFjZ.js";import{u as ne}from"./ui-layout-DdDX0gzI.js";import{p as h}from"./infrastructure-C6Ph6Ug0.js";import{a as g,i as _,r as v}from"./plugins-views-CE0VP3vl.js";import{c as y,i as b,o as x,r as S,s as C}from"./index-RiB5-8aY.js";import{n as w}from"./skeletons-DcGqw3b1.js";var T=e(t(),1),E=n(),D=[{type:`metric`,label:`KPI Metric`,Icon:m},{type:`bar`,label:`Bar Chart`,Icon:f},{type:`line`,label:`Line Chart`,Icon:o},{type:`pie`,label:`Pie Chart`,Icon:p},{type:`table`,label:`Table`,Icon:u},{type:`grid`,label:`Grid`,Icon:l}],O=0;function k(){return O+=1,`widget_${Date.now()}_${O}`}function A(e){return!e.widgets?.length||!e.widgets.some(e=>!e.id)?e:{...e,widgets:e.widgets.map(e=>e.id?e:{...e,id:k()})}}function j(e){let t=D.find(t=>t.type===e);return t?`New ${t.label}`:`New Widget`}function M(e){return{title:e.title??``,description:e.description??``,type:e.type??`metric`,object:e.object??``,categoryField:e.categoryField??``,valueField:e.valueField??``,aggregate:e.aggregate??`count`,layoutW:e.layout?.w??1,layoutH:e.layout?.h??1,colorVariant:e.colorVariant??`default`,actionUrl:e.actionUrl??``}}function N(e,t){return{title:e.title,description:e.description,type:e.type,object:e.object,categoryField:e.categoryField,valueField:e.valueField,aggregate:e.aggregate,layout:{...t.layout||{},w:e.layoutW,h:e.layoutH},colorVariant:e.colorVariant,actionUrl:e.actionUrl}}function P(e){return{columns:e.columns??3,gap:e.gap??4,rowHeight:String(e.rowHeight??`120`),refreshInterval:String(e.refreshInterval??`0`),title:e.title??``,showDescription:e.showDescription??!0,theme:e.theme??`auto`}}function F({dataSource:e}){let{dashboardName:t}=ne(),{showDebug:n}=b(),o=C(),{t:l}=h(),[u,f]=(0,T.useState)(!0),[p,m]=(0,T.useState)(!1),[O,F]=(0,T.useState)(null),[I,L]=(0,T.useState)(0);(0,T.useEffect)(()=>{f(!0),U(null),m(!1),F(null),queueMicrotask(()=>f(!1))},[t]);let{dashboards:R,objects:z,refresh:B}=y(),V=R?.find(e=>e.name===t),[H,U]=(0,T.useState)(null);(0,T.useEffect)(()=>{p||U(null)},[V]);let W=(0,T.useCallback)(async e=>{try{o&&(await o.update(`sys_dashboard`,t,e),B().catch(()=>{}))}catch(e){console.warn(`[DashboardView] Auto-save failed:`,e)}},[o,t,B]),G=(0,T.useCallback)(()=>{U(A(V)),m(!0),L(e=>e+1)},[V]),K=(0,T.useCallback)(()=>{m(!1),F(null)},[]),q=(0,T.useCallback)(e=>{if(!H)return;let t=k(),n={id:t,title:j(e),type:e,layout:{x:0,y:H.widgets?.length??0,w:H.columns??2,h:1}},r={...H,widgets:[...H.widgets||[],n]};U(r),W(r),F(t),L(e=>e+1)},[H,W]),J=(0,T.useCallback)(e=>{if(!H)return;let t={...H,widgets:H.widgets.filter(t=>t.id!==e)};U(t),W(t),O===e&&F(null)},[H,O,W]),Y=(0,T.useMemo)(()=>P(H||V),[I]),X=(0,T.useCallback)(e=>{if(!H)return;let t={...H,columns:e.columns,gap:e.gap,rowHeight:e.rowHeight,refreshInterval:Number(e.refreshInterval)||0,title:e.title,showDescription:e.showDescription,theme:e.theme};U(t),W(t),L(e=>e+1)},[H,W]),Z=(0,T.useCallback)((e,t)=>{H&&U(n=>n&&(e===`refreshInterval`?{...n,refreshInterval:Number(t)||0}:{...n,[e]:t}))},[H]),Q=H?.widgets?.find(e=>e.id===O),re=(0,T.useMemo)(()=>Q?M(Q):{},[O,I]),ie=(0,T.useCallback)(e=>{if(!H||!O||!Q)return;let t=N(e,Q),n={...H,widgets:H.widgets.map(e=>e.id===O?{...e,...t}:e)};U(n),W(n),L(e=>e+1)},[H,O,Q,W]),ae=(0,T.useCallback)((e,t)=>{O&&U(n=>{if(!n)return n;let r=n.widgets?.find(e=>e.id===O);if(!r)return n;let i=M(r);i[e]=t;let a=N(i,r);return{...n,widgets:n.widgets.map(e=>e.id===O?{...e,...a}:e)}})},[O]),oe=(0,T.useMemo)(()=>{if(z?.length)return z.map(e=>({value:e.name,label:e.label||e.name}))},[z]),se=(0,T.useMemo)(()=>{let e=Q?.object;if(!e||!z?.length)return;let t=z.find(t=>t.name===e);if(!t?.fields)return;let n=t.fields;return Array.isArray(n)?n.filter(e=>e.name).map(e=>({value:e.name,label:e.label||e.name})):Object.entries(n).map(([e,t])=>({value:e,label:t.label||e}))},[Q?.object,z]);if(u)return(0,E.jsx)(w,{});if(!V)return(0,E.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,E.jsxs)(te,{children:[(0,E.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,E.jsx)(ee,{className:`h-6 w-6 text-muted-foreground`})}),(0,E.jsx)(d,{children:`Dashboard Not Found`}),(0,E.jsxs)(s,{children:[`The dashboard "`,t,`" could not be found. It may have been removed or renamed.`]})]})});let $=H||V;return(0,E.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden bg-background`,children:[(0,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:[(0,E.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,E.jsx)(`h1`,{className:`text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate`,children:x(V.label,l)||V.name}),V.description&&(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 line-clamp-2`,children:x(V.description,l)})]}),(0,E.jsxs)(`div`,{className:`shrink-0 flex items-center gap-1.5`,children:[p&&(0,E.jsx)(`div`,{className:`flex items-center gap-1 mr-2`,"data-testid":`dashboard-widget-toolbar`,children:D.map(({type:e,label:t,Icon:n})=>(0,E.jsxs)(`button`,{type:`button`,"data-testid":`dashboard-add-${e}`,onClick:()=>q(e),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 ${t}`,children:[(0,E.jsx)(r,{className:`h-3 w-3`}),(0,E.jsx)(n,{className:`h-3 w-3`})]},e))}),(0,E.jsxs)(`button`,{type:`button`,onClick:G,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:[(0,E.jsx)(i,{className:`h-3.5 w-3.5`}),`Edit`]})]})]}),(0,E.jsxs)(`div`,{className:`flex-1 overflow-hidden flex flex-col sm:flex-row relative`,children:[(0,E.jsx)(`div`,{className:`flex-1 min-w-0 overflow-auto p-0 sm:p-6`,children:(0,E.jsx)(g,{schema:$,dataSource:e,designMode:p,selectedWidgetId:O,onWidgetClick:F})}),Q?(0,E.jsx)(v,{open:p,onClose:K,config:re,onSave:ie,onFieldChange:ae,availableObjects:oe,availableFields:se,headerExtra:(0,E.jsx)(a,{size:`sm`,variant:`ghost`,onClick:()=>J(O),className:`h-7 w-7 p-0 text-destructive hover:text-destructive`,"data-testid":`widget-delete-button`,title:`Delete widget`,children:(0,E.jsx)(c,{className:`h-3.5 w-3.5`})})},O):(0,E.jsx)(_,{open:p,onClose:K,config:Y,onSave:X,onFieldChange:Z}),(0,E.jsx)(S,{open:n,sections:[{title:`Dashboard Configuration`,data:$}]})]})]})}export{F as DashboardView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{$ as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as DateField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{G as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as DateTimeField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,n,w as r}from"./framework-DJlDX9E6.js";import{St as i}from"./plugins-core-PiAAytWV.js";import"./data-adapter-wZ81OFjZ.js";import{l as a,u as o}from"./ui-layout-DdDX0gzI.js";import"./infrastructure-C6Ph6Ug0.js";import{c as s,s as c}from"./index-RiB5-8aY.js";import{n as l}from"./src-oeWLmiqa.js";var u=e(t(),1),d=r();function f(){let e=a(),{appName:t,editAppName:r}=o(),{apps:f,objects:p,refresh:m}=s(),h=c(),g=r||t,_=f.find(e=>e.name===g),v=(p||[]).map(e=>({name:e.name,label:e.label||e.name,icon:e.icon,selected:_?.navigation?.some(t=>t.type===`object`&&t.objectName===e.name)??!1})),y=(0,u.useMemo)(()=>{if(_)return{name:_.name,title:_.title||_.label||``,description:_.description||``,icon:_.icon||``,layout:_.layout||`sidebar`,navigation:_.navigation||[],branding:{logo:_.branding?.logo||_.logo||``,primaryColor:_.branding?.primaryColor||`#3b82f6`,favicon:_.branding?.favicon||_.favicon||``}}},[_]),b=(0,u.useCallback)(async t=>{try{let r=n(t),a={..._,...r},o=h?.getClient();o&&await o.meta.saveItem(`app`,t.name,a),i.success(`Application "${t.title}" updated successfully`),await m?.(),e(`/apps/${t.name}`)}catch(e){i.error(e?.message||`Failed to update application`)}},[e,m,h,_]),x=(0,u.useCallback)(()=>{e(t?`/apps/${t}`:`/`)},[e,t]),S=(0,u.useCallback)(e=>{try{localStorage.setItem(`objectui-edit-draft-${g}`,JSON.stringify(e)),i.info(`Draft saved`)}catch{}},[g]);return _?(0,d.jsx)(`div`,{className:`mx-auto max-w-4xl py-8 px-4`,"data-testid":`edit-app-page`,children:(0,d.jsx)(l,{availableObjects:v,initialDraft:y,onComplete:b,onCancel:x,onSaveDraft:S})}):(0,d.jsx)(`div`,{className:`mx-auto max-w-4xl py-8 px-4 text-center`,"data-testid":`edit-app-not-found`,children:(0,d.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Application "`,g,`" not found.`]})})}export{f as EditAppPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{Q as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as EmailField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{V as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as FileField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./framework-DJlDX9E6.js";import"./data-adapter-wZ81OFjZ.js";import{i as t}from"./ui-layout-DdDX0gzI.js";import{i as n,p as r}from"./infrastructure-C6Ph6Ug0.js";import{t as i}from"./AuthPageLayout-DDjJTsQ6.js";var a=e(),o=({href:e,className:n,children:r})=>(0,a.jsx)(t,{to:e,className:n,children:r});function s(){let{t:e}=r();return(0,a.jsx)(i,{children:(0,a.jsx)(n,{loginUrl:`/login`,title:e(`auth.forgotPassword.title`),description:e(`auth.forgotPassword.description`),linkComponent:o,labels:{emailLabel:e(`auth.forgotPassword.emailLabel`),emailPlaceholder:e(`auth.forgotPassword.emailPlaceholder`),submitButton:e(`auth.forgotPassword.submitButton`),submittingButton:e(`auth.forgotPassword.submittingButton`),successTitle:e(`auth.forgotPassword.successTitle`),successDescription:e(`auth.forgotPassword.successDescription`),backToSignInText:e(`auth.forgotPassword.backToSignInText`),rememberPasswordText:e(`auth.forgotPassword.rememberPasswordText`),signInText:e(`auth.forgotPassword.signInText`)}})})}export{s as ForgotPasswordPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{R as e}from"./plugins-core-PiAAytWV.js";export{e as FormulaField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{T as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as GeolocationField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{M as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as GridField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{B as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as ImageField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,w as n}from"./framework-DJlDX9E6.js";import{$c as r,Bs as i,Co as a,Eo as o,Jo as s,Po as c,So as l,To as u,_ as d,c as f,d as p,g as m,l as h,ls as g,o as _,on as v,p as y,r as b,s as x,tl as S,u as C,v as w,wo as T,y as E}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";var D=e(t(),1),O=n(),k=(...e)=>e.filter(Boolean).join(` `);function A(e,t){if(!t||t.length===0)return{};for(let n of t){let t=e[n.field];if(t==null)continue;let r=!1,i=String(t);switch(n.operator){case`equals`:r=i===String(n.value);break;case`not_equals`:r=i!==String(n.value);break;case`contains`:r=i.toLowerCase().includes(String(n.value).toLowerCase());break;case`in`:r=Array.isArray(n.value)&&n.value.includes(i);break}if(r)return{...n.backgroundColor?{backgroundColor:n.backgroundColor}:{},...n.borderColor?{borderColor:n.borderColor}:{}}}return{}}function j({card:e,conditionalFormatting:t}){let{attributes:n,listeners:r,setNodeRef:i,transform:s,transition:d,isDragging:p}=f({id:e.id}),m={transform:E.Transform.toString(s),transition:d,opacity:p?.5:void 0},h=A(e,t);return(0,O.jsx)(`div`,{ref:i,style:m,...n,...r,children:(0,O.jsxs)(l,{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:h,children:[e.coverImage&&(0,O.jsx)(`div`,{className:`w-full h-32 overflow-hidden rounded-t-lg`,children:(0,O.jsx)(`img`,{src:e.coverImage,alt:``,className:`w-full h-full object-cover`,loading:`lazy`})}),(0,O.jsxs)(u,{className:`p-4`,children:[(0,O.jsx)(o,{className:`text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors`,children:e.title}),e.description&&(0,O.jsx)(T,{className:`text-xs text-muted-foreground font-mono`,children:e.description})]}),e.badges&&e.badges.length>0&&(0,O.jsx)(a,{className:`p-4 pt-0`,children:(0,O.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.badges.map((e,t)=>(0,O.jsx)(c,{variant:e.variant||`default`,className:`text-xs`,children:e.label},t))})})]})})}function M({cards:e,parentRef:t,conditionalFormatting:n}){let r=b({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>120,overscan:5});return(0,O.jsx)(`div`,{style:{height:`${r.getTotalSize()}px`,width:`100%`,position:`relative`},children:r.getVirtualItems().map(t=>{let r=e[t.index];return(0,O.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${t.start}px)`},children:(0,O.jsx)(j,{card:r,conditionalFormatting:n})},r.id)})})}function N({columnId:e,onAdd:t}){let[n,r]=D.useState(!1),[a,o]=D.useState(``),c=D.useRef(null),l=()=>{let n=a.trim();n&&(t(e,n),o(``)),r(!1)};return n?(0,O.jsx)(`div`,{className:`mt-2 space-y-2`,children:(0,O.jsx)(v,{ref:c,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),l()):e.key===`Escape`&&(o(``),r(!1))},onBlur:l,placeholder:`Enter card title...`,className:`text-sm`,autoFocus:!0})}):(0,O.jsxs)(s,{variant:`ghost`,size:`sm`,className:`w-full mt-2 text-muted-foreground hover:text-foreground`,onClick:()=>{r(!0),setTimeout(()=>c.current?.focus(),0)},children:[(0,O.jsx)(i,{className:`h-4 w-4 mr-1`}),`Add Card`]})}function P({column:e,cards:t,onToggle:n,enableVirtual:i,quickAdd:a,onQuickAdd:o,conditionalFormatting:l}){let u=t||[],d=D.useRef(null),{setNodeRef:p}=f({id:e.id,data:{type:`column`}}),m=e.limit&&u.length>=e.limit,v=e.limit&&u.length>=e.limit*.8;return(0,O.jsxs)(`div`,{ref:p,className:k(`flex flex-col flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl transition-all`,e.collapsed?`w-16`:`w-80`,e.className),children:[(0,O.jsxs)(`div`,{className:`p-4 border-b border-border/50 bg-muted/20 flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0`,children:[(0,O.jsx)(s,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>n(!e.collapsed),children:e.collapsed?(0,O.jsx)(r,{className:`h-4 w-4`}):(0,O.jsx)(S,{className:`h-4 w-4`})}),!e.collapsed&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`h3`,{className:`font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase truncate`,children:e.title}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(`span`,{className:k(`font-mono text-xs`,m?`text-destructive`:v?`text-yellow-500`:`text-muted-foreground`),children:[u.length,e.limit&&` / ${e.limit}`]}),m&&(0,O.jsx)(c,{variant:`destructive`,className:`text-xs`,children:`Full`}),v&&!m&&(0,O.jsx)(g,{className:`h-3 w-3 text-yellow-500`})]})]})]}),e.collapsed&&(0,O.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,O.jsx)(`span`,{className:`font-mono text-xs font-bold text-primary/90 [writing-mode:vertical-rl] rotate-180`,children:e.title}),(0,O.jsx)(c,{variant:`secondary`,className:`text-xs`,children:u.length})]})]}),!e.collapsed&&(0,O.jsxs)(`div`,{ref:d,className:`flex-1 p-4 overflow-y-auto`,style:{maxHeight:`600px`},children:[(0,O.jsx)(_,{items:u.map(e=>e.id),strategy:h,children:i?(0,O.jsx)(M,{cards:u,parentRef:d,conditionalFormatting:l}):(0,O.jsx)(`div`,{className:`space-y-2`,children:u.map(e=>(0,O.jsx)(j,{card:e,conditionalFormatting:l},e.id))})}),a&&o&&(0,O.jsx)(N,{columnId:e.id,onAdd:o})]})]})}function F({columns:e,onCardMove:t,onColumnToggle:n,enableVirtualScrolling:r=!1,virtualScrollThreshold:i=50,className:a,quickAdd:o,onQuickAdd:s,conditionalFormatting:c}){let[l,u]=D.useState(null),f=D.useMemo(()=>(e||[]).map(e=>({...e,cards:e.cards||[]})),[e]),[h,g]=D.useState(f);D.useEffect(()=>{g(f)},[f]);let _=w(d(y,{activationConstraint:{distance:8}})),v=e=>{let{active:t}=e;u(S(t.id))},b=e=>{let{active:n,over:r}=e;if(u(null),!r)return;let i=n.id,a=r.id;if(i===a)return;let o=T(i),s=T(a)||E(a);if(!(!o||!s))if(o.id===s.id){let e=[...o.cards],t=x(e,e.findIndex(e=>e.id===i),e.findIndex(e=>e.id===a));g(e=>e.map(e=>e.id===o.id?{...e,cards:t}:e))}else{let e=[...o.cards],n=[...s.cards],r=e.findIndex(e=>e.id===i),c=a===s.id?n.length:n.findIndex(e=>e.id===a),[l]=e.splice(r,1);n.splice(c,0,l),g(t=>t.map(t=>t.id===o.id?{...t,cards:e}:t.id===s.id?{...t,cards:n}:t)),t&&t(i,o.id,s.id,c)}},S=D.useCallback(e=>{for(let t of h){let n=t.cards.find(t=>t.id===e);if(n)return n}return null},[h]),T=D.useCallback(e=>h.find(t=>t.cards.some(t=>t.id===e))||null,[h]),E=D.useCallback(e=>h.find(t=>t.id===e)||null,[h]),A=D.useCallback((e,t)=>{g(n=>n.map(n=>n.id===e?{...n,collapsed:t}:n)),n?.(e,t)},[n]);return(0,O.jsxs)(C,{sensors:_,collisionDetection:m,onDragStart:v,onDragEnd:b,children:[(0,O.jsx)(`div`,{className:k(`flex gap-4 overflow-x-auto p-4`,a),children:h.map(e=>{let t=r&&e.cards.length>i;return(0,O.jsx)(P,{column:e,cards:e.cards,onToggle:t=>A(e.id,t),enableVirtual:t,quickAdd:o,onQuickAdd:s,conditionalFormatting:c},e.id)})}),(0,O.jsx)(p,{children:l?(0,O.jsx)(j,{card:l,conditionalFormatting:c}):null})]})}export{F as KanbanEnhanced,F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{N as t,c as n,s as r,w as i}from"./framework-DJlDX9E6.js";import{Bs as a,Co as o,Eo as s,Jo as c,Po as l,So as u,To as d,_ as f,c as p,d as m,g as h,l as g,m as _,nn as v,o as y,on as b,p as x,s as S,u as C,v as w,wo as T,y as E}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";var D=e(t(),1),O=i(),k=(...e)=>e.filter(Boolean).join(` `),A=`Uncategorized`;function j(e,t){if(!t||t.length===0)return{};for(let n of t){let t=e[n.field];if(t==null)continue;let r=!1,i=String(t);switch(n.operator){case`equals`:r=i===String(n.value);break;case`not_equals`:r=i!==String(n.value);break;case`contains`:r=i.toLowerCase().includes(String(n.value).toLowerCase());break;case`in`:r=Array.isArray(n.value)&&n.value.includes(i);break}if(r)return{...n.backgroundColor?{backgroundColor:n.backgroundColor}:{},...n.borderColor?{borderColor:n.borderColor}:{}}}return{}}function M({card:e,onCardClick:t,conditionalFormatting:n}){let{attributes:r,listeners:i,setNodeRef:a,transform:c,transition:f,isDragging:m}=p({id:e.id}),h={transform:E.Transform.toString(c),transition:f,opacity:m?.5:void 0},g=j(e,n);return(0,O.jsx)(`div`,{ref:a,style:h,...r,...i,role:`listitem`,"aria-label":e.title,onClick:()=>t?.(e),children:(0,O.jsxs)(u,{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:g,children:[e.coverImage&&(0,O.jsx)(`div`,{className:`w-full h-32 overflow-hidden rounded-t-lg`,children:(0,O.jsx)(`img`,{src:e.coverImage,alt:``,className:`w-full h-full object-cover`,loading:`lazy`})}),(0,O.jsxs)(d,{className:`p-2 sm:p-4`,children:[(0,O.jsx)(s,{className:`text-xs sm:text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors`,children:e.title}),e.description&&(0,O.jsx)(T,{className:`text-xs text-muted-foreground font-mono line-clamp-2 sm:line-clamp-none`,children:e.description})]}),e.badges&&e.badges.length>0&&(0,O.jsx)(o,{className:`p-2 sm:p-4 pt-0`,children:(0,O.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.badges.map((e,t)=>(0,O.jsx)(l,{variant:e.variant||`default`,className:`text-xs`,children:e.label},t))})})]})})}function N({columnId:e,onAdd:t}){let[n,r]=D.useState(!1),[i,o]=D.useState(``),s=D.useRef(null),l=()=>{let n=i.trim();n&&(t(e,n),o(``)),r(!1)};return n?(0,O.jsx)(`div`,{className:`mt-2 space-y-2`,children:(0,O.jsx)(b,{ref:s,value:i,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),l()):e.key===`Escape`&&(o(``),r(!1))},onBlur:l,placeholder:`Enter card title...`,className:`text-sm`,autoFocus:!0})}):(0,O.jsxs)(c,{variant:`ghost`,size:`sm`,className:`w-full mt-2 text-muted-foreground hover:text-foreground`,onClick:()=>{r(!0),setTimeout(()=>s.current?.focus(),0)},children:[(0,O.jsx)(a,{className:`h-4 w-4 mr-1`}),`Add Card`]})}function P({column:e,cards:t,onCardClick:n,quickAdd:r,onQuickAdd:i,conditionalFormatting:a}){let o=t||[],{setNodeRef:s}=p({id:e.id,data:{type:`column`}}),c=e.limit&&o.length>=e.limit;return(0,O.jsxs)(`div`,{ref:s,role:`group`,"aria-label":e.title,className:k(`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`,e.className),children:[(0,O.jsx)(`div`,{className:`p-3 sm:p-4 border-b border-border/50 bg-muted/30 rounded-t-lg`,children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsx)(`h3`,{id:`kanban-col-${e.id}`,className:`font-mono text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase truncate`,children:e.title}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(l,{variant:`secondary`,className:`text-xs font-mono tabular-nums`,children:[o.length,e.limit&&` / ${e.limit}`]}),c&&(0,O.jsx)(l,{variant:`destructive`,className:`text-xs`,children:`Full`})]})]})}),(0,O.jsxs)(v,{className:`flex-1 p-4`,children:[(0,O.jsx)(y,{items:o.map(e=>e.id),strategy:g,children:(0,O.jsxs)(`div`,{className:`space-y-2`,role:`list`,"aria-label":`${e.title} cards`,children:[o.length===0&&(0,O.jsx)(`div`,{className:`flex flex-col items-center justify-center py-8 text-muted-foreground/50`,children:(0,O.jsx)(`span`,{className:`text-xs font-mono`,children:`No cards`})}),o.map(e=>(0,O.jsx)(M,{card:e,onCardClick:n,conditionalFormatting:a},e.id))]})}),r&&i&&(0,O.jsx)(N,{columnId:e.id,onAdd:i})]})]})}function F({children:e}){return(0,O.jsx)(O.Fragment,{children:e(r())})}function I({columns:e,onCardMove:t,onCardClick:r,className:i,quickAdd:a,onQuickAdd:o,coverImageField:s,conditionalFormatting:c,swimlaneField:l}){return n()?(0,O.jsx)(F,{children:n=>(0,O.jsx)(L,{columns:e,onCardMove:t,onCardClick:r,className:i,dnd:n,quickAdd:a,onQuickAdd:o,coverImageField:s,conditionalFormatting:c,swimlaneField:l})}):(0,O.jsx)(L,{columns:e,onCardMove:t,onCardClick:r,className:i,dnd:null,quickAdd:a,onQuickAdd:o,coverImageField:s,conditionalFormatting:c,swimlaneField:l})}function L({columns:e,onCardMove:t,onCardClick:n,className:r,dnd:i,quickAdd:a,onQuickAdd:o,coverImageField:s,conditionalFormatting:c,swimlaneField:l}){let[u,d]=D.useState(null),p=l?`objectui:kanban-collapsed:${l}`:null,[v,b]=D.useState(()=>{if(!p)return new Set;try{let e=localStorage.getItem(p);if(e){let t=JSON.parse(e);if(Array.isArray(t))return new Set(t.filter(e=>typeof e==`string`))}}catch{}return new Set}),T=D.useMemo(()=>(e||[]).map(e=>({...e,cards:e.cards||[]})),[e]),[E,j]=D.useState(T);D.useEffect(()=>{j(T)},[T]);let N=D.useMemo(()=>{if(!l)return null;let e=E.flatMap(e=>e.cards),t=new Set;return e.forEach(e=>{let n=e[l];t.add(n==null?A:String(n))}),Array.from(t).sort()},[E,l]),F=D.useCallback(e=>{b(t=>{let n=new Set(t);if(n.has(e)?n.delete(e):n.add(e),p)try{localStorage.setItem(p,JSON.stringify([...n]))}catch{}return n})},[p]),I=w(f(x,{activationConstraint:{distance:5}}),f(_,{activationConstraint:{delay:200,tolerance:5}})),L=e=>{let{active:t}=e,n=z(t.id);if(d(n),i&&n){let e=B(n.id);e&&i.startDrag({id:n.id,type:`kanban-card`,data:n,sourceId:e.id})}},R=e=>{let{active:n,over:r}=e;if(d(null),!r){i&&i.endDrag();return}let a=n.id,o=r.id;if(a===o){i&&i.endDrag();return}let s=B(a),c=B(o)||V(o);if(!s||!c){i&&i.endDrag();return}if(s.id===c.id){let e=[...s.cards],t=S(e,e.findIndex(e=>e.id===a),e.findIndex(e=>e.id===o));j(e=>e.map(e=>e.id===s.id?{...e,cards:t}:e))}else{let e=[...s.cards],n=[...c.cards],r=e.findIndex(e=>e.id===a),i=o===c.id?n.length:n.findIndex(e=>e.id===o),[l]=e.splice(r,1);n.splice(i,0,l),j(t=>t.map(t=>t.id===s.id?{...t,cards:e}:t.id===c.id?{...t,cards:n}:t)),t&&t(a,s.id,c.id,i)}i&&i.endDrag(c.id)},z=D.useCallback(e=>{for(let t of E){let n=t.cards.find(t=>t.id===e);if(n)return n}return null},[E]),B=D.useCallback(e=>E.find(t=>t.cards.some(t=>t.id===e))||null,[E]),V=D.useCallback(e=>E.find(t=>t.id===e)||null,[E]);return(0,O.jsxs)(C,{sensors:I,collisionDetection:h,onDragStart:L,onDragEnd:R,children:[(0,O.jsxs)(`div`,{className:`flex sm:hidden items-center justify-between px-3 pb-2 text-xs text-muted-foreground`,children:[(0,O.jsxs)(`span`,{children:[E.length,` columns`]}),(0,O.jsx)(`span`,{children:`← Swipe to navigate →`})]}),N?(0,O.jsxs)(`div`,{className:k(`flex flex-col gap-1 p-2 sm:p-4 min-w-0 overflow-hidden`,r),role:`region`,"aria-label":`Kanban board with swimlanes`,children:[(0,O.jsx)(`div`,{className:`flex gap-3 sm:gap-4 pl-36 sm:pl-44 overflow-x-auto`,children:E.map(e=>(0,O.jsxs)(`div`,{className:`w-[85vw] sm:w-80 flex-shrink-0 text-center`,children:[(0,O.jsx)(`span`,{className:`font-mono text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase`,children:e.title}),(0,O.jsxs)(`span`,{className:`ml-2 font-mono text-xs text-muted-foreground`,children:[`(`,e.cards.length,`)`]})]},e.id))}),N.map(e=>{let t=v.has(e),r=E.reduce((t,n)=>t+n.cards.filter(t=>(t[l]==null?A:String(t[l]))===e).length,0);return(0,O.jsxs)(`div`,{className:`border rounded-lg bg-muted/10`,children:[(0,O.jsxs)(`button`,{className:`w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-muted/30 transition-colors`,onClick:()=>F(e),"aria-expanded":!t,children:[(0,O.jsx)(`span`,{className:k(`transition-transform text-xs`,t?``:`rotate-90`),children:`▶`}),(0,O.jsx)(`span`,{className:`font-mono text-xs font-semibold text-muted-foreground uppercase tracking-wider`,children:e}),(0,O.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:[`(`,r,`)`]})]}),!t&&(0,O.jsx)(`div`,{className:`flex gap-3 sm:gap-4 overflow-x-auto px-2 pb-3 pl-36 sm:pl-44`,children:E.map(t=>{let r=t.cards.filter(t=>(t[l]==null?A:String(t[l]))===e);return(0,O.jsx)(`div`,{className:`w-[85vw] sm:w-80 flex-shrink-0 min-h-[60px] rounded-md bg-card/20 p-2`,children:(0,O.jsx)(y,{items:r.map(e=>e.id),strategy:g,children:(0,O.jsx)(`div`,{className:`space-y-2`,role:`list`,"aria-label":`${t.title} - ${e} cards`,children:r.map(e=>(0,O.jsx)(M,{card:e,onCardClick:n,conditionalFormatting:c},e.id))})})},t.id)})})]},e)})]}):(0,O.jsx)(`div`,{className:k(`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`,r),role:`region`,"aria-label":`Kanban board`,children:E.map(e=>(0,O.jsx)(P,{column:e,cards:e.cards,onCardClick:n,quickAdd:a,onQuickAdd:o,conditionalFormatting:c},e.id))}),(0,O.jsx)(m,{children:(0,O.jsx)(`div`,{"aria-live":`assertive`,"aria-label":u?`Dragging ${u.title}`:void 0,children:u?(0,O.jsx)(M,{card:u,conditionalFormatting:c}):null})})]})}export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{z as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as LocationField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./framework-DJlDX9E6.js";import"./data-adapter-wZ81OFjZ.js";import{i as t,l as n}from"./ui-layout-DdDX0gzI.js";import{o as r,p as i}from"./infrastructure-C6Ph6Ug0.js";import{t as a}from"./AuthPageLayout-DDjJTsQ6.js";var o=e(),s=({href:e,className:n,children:r})=>(0,o.jsx)(t,{to:e,className:n,children:r});function c(){let e=n(),{t}=i();return(0,o.jsx)(a,{children:(0,o.jsx)(r,{onSuccess:()=>e(`/`),registerUrl:`/register`,forgotPasswordUrl:`/forgot-password`,title:t(`auth.login.title`),description:t(`auth.login.description`),linkComponent:s,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{c as LoginPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./framework-DJlDX9E6.js";import{K as e}from"./plugins-core-PiAAytWV.js";import"./infrastructure-C6Ph6Ug0.js";export{e as LookupField};
|