@objectstack/console 17.0.0-rc.2 → 17.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/assets/{AdapterProvider-CtRy19L4.js → AdapterProvider-Bur-uZKZ.js} +1 -1
- package/dist/assets/{ApiConsolePage-CGg1YX-S.js → ApiConsolePage-D0rZy0lx.js} +1 -1
- package/dist/assets/{AppDocsIndex-BhbMTMti.js → AppDocsIndex-CQo6tZPY.js} +1 -1
- package/dist/assets/{AppManagementPage-H6lFpmYT.js → AppManagementPage-jLhhl_WS.js} +1 -1
- package/dist/assets/{ApprovalsInboxPage-CbWL6D_v.js → ApprovalsInboxPage-COyyj1KQ.js} +1 -1
- package/dist/assets/{CreateViewDialog-Dt1MUhLX.js → CreateViewDialog-C6sZGaIB.js} +1 -1
- package/dist/assets/{DashboardView-OZHG8o0x.js → DashboardView-S5Fshq0v.js} +1 -1
- package/dist/assets/{FlowRunsPage-DTUvw7r2.js → FlowRunsPage-DGyj2PBP.js} +1 -1
- package/dist/assets/{InterfaceListPage-bZdYVg1W.js → InterfaceListPage-DcFmVgXg.js} +1 -1
- package/dist/assets/{MarketplacePackagePage-MX3QKebj.js → MarketplacePackagePage-DZkqNaao.js} +1 -1
- package/dist/assets/{MetadataProvider-87BSQkFa.js → MetadataProvider-D9fSVVZp.js} +1 -1
- package/dist/assets/{ObjectDataPage-JASSibf6.js → ObjectDataPage-BZ4pf0ji.js} +1 -1
- package/dist/assets/{PageView-DwZUXknG.js → PageView-B8qkF17f.js} +1 -1
- package/dist/assets/{PublicFormsPage-Cu_VttTH.js → PublicFormsPage-C3z0TH0k.js} +1 -1
- package/dist/assets/{RecordFormPage-qcCOHj3T.js → RecordFormPage-CyAjEE1O.js} +1 -1
- package/dist/assets/{ReportDefaultInspector-Byof8OYm.js → ReportDefaultInspector-BqgFtk2E.js} +1 -1
- package/dist/assets/{ReportView-D91loQjH.js → ReportView-CfQ-Z9TJ.js} +1 -1
- package/dist/assets/{SearchResultsPage-Dzm_0iUD.js → SearchResultsPage-Ct2q9Lrf.js} +1 -1
- package/dist/assets/{SystemHubPage-B3uHe11N.js → SystemHubPage-BSunYA-X.js} +1 -1
- package/dist/assets/{createDerive-DmbuzviK.js → createDerive-CGF05Hgy.js} +1 -1
- package/dist/assets/{data-adapter-sj_1S7TJ.js → data-adapter-rnhaIuyx.js} +2 -2
- package/dist/assets/{index-rkbFgKQu.js → index-U6sSlA28.js} +1 -1
- package/dist/assets/{metadata-admin-DA08xWlg.js → metadata-admin-Ci8bBNxq.js} +1 -1
- package/dist/assets/{runtime-metadata-persistence-BsgvioOn.js → runtime-metadata-persistence-BjYxldgR.js} +1 -1
- package/dist/assets/{src-D0ueU0ix.js → src-CSrGzA_t.js} +2 -2
- package/dist/assets/{src-Chkzn0bG.js → src-DzTCerTm.js} +1 -1
- package/dist/assets/{use-book-data-CAZ23DZb.js → use-book-data-D8LHn21q.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{f as t,m as n,r,y as i}from"./vendor-react-DpRf6e0g.js";import{g as a}from"./infrastructure-PXm1h5tB.js";import{N as o}from"./framework-UESyszCj.js";import{Cr as s,Gi as c,Sc as l,Yi as u,_c as d,_r as f,br as p,ei as m,go as h,oo as g,ti as _,vi as v,vr as y,wc as b,wi as x,xo as S,xr as C,xs as w,yr as T,zi as E}from"./ui-components-BbC0qTrK.js";import"./src-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{f as t,m as n,r,y as i}from"./vendor-react-DpRf6e0g.js";import{g as a}from"./infrastructure-PXm1h5tB.js";import{N as o}from"./framework-UESyszCj.js";import{Cr as s,Gi as c,Sc as l,Yi as u,_c as d,_r as f,br as p,ei as m,go as h,oo as g,ti as _,vi as v,vr as y,wc as b,wi as x,xo as S,xr as C,xs as w,yr as T,zi as E}from"./ui-components-BbC0qTrK.js";import"./src-CSrGzA_t.js";var D=e(i(),1),O=r();function k(){let e=t(),{appName:r}=n(),i=r?`/apps/${r}`:``,k=o(),A=a(),[j,M]=(0,D.useState)({users:null,orgs:null,positions:null,permissions:null,auditLogs:null}),[N,P]=(0,D.useState)(!0),F=(0,D.useCallback)(async()=>{if(k){P(!0);try{let[e,t,n,r,i]=await Promise.all([k.find(`sys_user`).catch(()=>({data:[]})),k.find(`sys_org`).catch(()=>({data:[]})),k.find(`sys_position`).catch(()=>({data:[]})),k.find(`sys_permission`).catch(()=>({data:[]})),k.find(`sys_audit_log`).catch(()=>({data:[]}))]);M({users:e.data?.length??0,orgs:t.data?.length??0,positions:n.data?.length??0,permissions:r.data?.length??0,auditLogs:i.data?.length??0})}catch{}finally{P(!1)}}},[k]);(0,D.useEffect)(()=>{F()},[F]);let I=[{title:`Applications`,description:`Manage all configured applications`,icon:h,href:`${i}/system/apps`,countLabel:``,count:null},{title:`Metadata`,description:`Browse and edit every metadata type the platform exposes`,icon:w,href:`${i}/component/metadata/directory`,countLabel:``,count:null},{title:`Datasources`,description:`Connect external databases and sync their tables in as objects`,icon:l,href:`${i}/component/metadata/resource?type=datasource`,countLabel:``,count:null}],L=[{title:`Users`,description:`Manage system users and accounts`,icon:m,href:`${i}/system/users`,countLabel:`users`,count:j.users},{title:`Organizations`,description:`Manage organizations and teams`,icon:d,href:`${i}/system/organizations`,countLabel:`organizations`,count:j.orgs},{title:`Positions`,description:`Configure positions and access levels`,icon:E,href:`${i}/system/positions`,countLabel:`positions`,count:j.positions},{title:`Permissions`,description:`Manage permission rules and assignments`,icon:S,href:`${i}/system/permissions`,countLabel:`permissions`,count:j.permissions},{title:`Audit Log`,description:`View system activity and changes`,icon:u,href:`${i}/system/audit-log`,countLabel:`entries`,count:j.auditLogs},{title:`AI Approvals`,description:`Review actions AI agents propose before they execute`,icon:b,href:`${i}/system/ai-approvals`,countLabel:``,count:null},{title:`App Marketplace`,description:`Browse and install approved apps from the ObjectStack catalog`,icon:x,href:`${i}/system/marketplace`,countLabel:``,count:null,adminOnly:!0},{title:`Settings`,description:`Configure mail, branding, feature flags, and more`,icon:c,href:`${i}/system/settings`,countLabel:``,count:null},{title:`Developer`,description:`API console, flow runs, and public form management`,icon:v,href:`${i}/developer`,countLabel:``,count:null},{title:`Profile`,description:`View and edit your account settings`,icon:_,href:`${i}/system/profile`,countLabel:``,count:null}],R=[...I,...L].filter(e=>!e.adminOnly||A);return(0,O.jsxs)(`div`,{className:`flex flex-col gap-6 p-4 sm:p-6`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:`System Settings`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Manage applications, users, positions, permissions, and system configuration`})]}),N&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,role:`status`,"aria-live":`polite`,children:[(0,O.jsx)(g,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),`Loading statistics...`]}),(0,O.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:R.map(t=>{let n=t.icon;return(0,O.jsxs)(f,{className:`cursor-pointer transition-colors hover:bg-accent/50`,onClick:()=>e(t.href),"data-testid":`hub-card-${t.title.toLowerCase().replace(/\s+/g,`-`)}`,role:`link`,tabIndex:0,"aria-label":`${t.title}: ${t.description}`,onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e(t.href))},children:[(0,O.jsxs)(p,{className:`flex flex-row items-center gap-3 pb-2`,children:[(0,O.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,O.jsx)(n,{className:`h-5 w-5`})}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(C,{className:`text-base`,children:t.title}),(0,O.jsx)(T,{className:`text-xs`,children:t.description})]})]}),(0,O.jsx)(y,{className:`pt-0`,children:t.count!==null&&(0,O.jsxs)(s,{variant:`secondary`,children:[t.count,` `,t.countLabel]})})]},t.title)})})]})}export{k as SystemHubPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{y as t}from"./vendor-react-DpRf6e0g.js";import{n,s as r}from"./MetadataProvider-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{y as t}from"./vendor-react-DpRf6e0g.js";import{n,s as r}from"./MetadataProvider-D9fSVVZp.js";var i=e(t(),1);function a(e){let t=r();return(0,i.useMemo)(()=>n({previewDrafts:t,environmentId:e}),[e,t])}function o(e){let t=new Set(e.map(e=>e.type));return e.filter(e=>{if(!/[A-Z]/.test(e.type))return!0;let n=e.type.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`);return!(n!==e.type&&t.has(n))})}function s(e){let[t,n]=(0,i.useState)(!0),[r,a]=(0,i.useState)(null),[s,c]=(0,i.useState)([]);return(0,i.useEffect)(()=>{let t=!1;return n(!0),a(null),(async()=>{try{let r=await e.listTypes(),i;if(Array.isArray(r))i=r.map(e=>typeof e==`string`?{type:e}:e);else{let e=r?.entries;i=Array.isArray(e)&&e.length>0?e:(r?.types??[]).map(e=>({type:e}))}t||(c(o(i)),n(!1))}catch(e){t||(a(e?.message??String(e)),n(!1))}})(),()=>{t=!0}},[e]),{loading:t,error:r,entries:s}}function c(e,t,n=[`name`,`label`,`description`]){if(!t)return!0;let r=t.toLowerCase();for(let t of n){let n=e[t];if(typeof n==`string`&&n.toLowerCase().includes(r))return!0}return!1}function l(e,t=`error`,n){let[r,a]=(0,i.useState)(!0),[o,s]=(0,i.useState)(null),[c,l]=(0,i.useState)({entries:[],total:0,scannedTypes:0,scannedItems:0,stats:{}}),[u,d]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let r=!1;return a(!0),s(null),(async()=>{try{let i=await e.diagnostics(n?{severity:t,packageId:n}:{severity:t});if(r)return;l(i),a(!1)}catch(e){if(r)return;s(e?.message??String(e)),l({entries:[],total:0,scannedTypes:0,scannedItems:0,stats:{}}),a(!1)}})(),()=>{r=!0}},[e,t,n,u]),{loading:r,error:o,summary:c,byType:(0,i.useMemo)(()=>{let e={};for(let t of c.entries)(t.diagnostics?.errors?.length??0)>0&&(e[t.type]=(e[t.type]??0)+1);return e},[c]),warnByType:(0,i.useMemo)(()=>{let e={};for(let t of c.entries){let n=t.diagnostics?.errors?.length??0,r=t.diagnostics?.warnings?.length??0;n===0&&r>0&&(e[t.type]=(e[t.type]??0)+1)}return e},[c]),countsByType:(0,i.useMemo)(()=>{let e={};for(let[t,n]of Object.entries(c.stats??{}))e[t]=n.count;return e},[c]),lockedByType:(0,i.useMemo)(()=>{let e={};for(let[t,n]of Object.entries(c.stats??{}))typeof n.locked==`number`&&n.locked>0&&(e[t]=n.locked);return e},[c]),packagesByType:(0,i.useMemo)(()=>{let e={};for(let[t,n]of Object.entries(c.stats??{}))e[t]=n.packages??[];return e},[c]),allPackages:(0,i.useMemo)(()=>{let e=new Set;for(let t of Object.values(c.stats??{}))for(let n of t.packages??[])e.add(n);return[...e].sort()},[c]),reload:()=>d(e=>e+1)}}function u(e){if(typeof e!=`string`)return``;let t=e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);return/^\d/.test(t)&&(t=`n_${t}`),t.length>64&&(t=t.slice(0,64).replace(/_+$/g,``)),t}function d(e){if(typeof e!=`string`)return``;let t=e.trim();return t?!/[A-Za-z]/.test(t)||/(s|ses|xes|zes|ches|shes|ies)$/i.test(t)?t:/[^aeiou]y$/i.test(t)?t.replace(/y$/i,`ies`):/(s|x|z|ch|sh)$/i.test(t)?`${t}es`:`${t}s`:``}function f(e){return typeof e==`string`?e.replace(/[_-]+/g,` `).split(/\s+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):``}function p(e){if(typeof e!=`string`)return``;let t=e.trim().match(/^[^\s_-]+/);return t?t[0]:``}function m(e,t){let n=typeof t==`string`?t:t==null?``:String(t);switch(e){case`slugify`:return u(n);case`plural-en`:return d(n);case`titlecase`:return f(n);case`first-token`:return p(n);default:return n}}function h(e){let{rules:t,draft:n,onPatch:r,enabled:a=!0}=e,o=(0,i.useRef)(new Set),s=(0,i.useRef)({}),c=(0,i.useCallback)(e=>{o.current.add(e)},[]);return(0,i.useEffect)(()=>{if(!a||!t||t.length===0)return;let e={},i=s.current,c={};for(let r of t){let t=n[r.from];if(c[r.from]=t,Object.is(i[r.from],t)||r.untilUserEdits!==!1&&o.current.has(r.to)||r.to in e)continue;let a=m(r.transform,t);n[r.to]!==a&&(e[r.to]=a)}s.current={...i,...c},Object.keys(e).length>0&&r(e)},[n,a]),{markTouched:c,touched:o.current}}function g(e,t){let n=e?Object.keys(e):[],r=[],i=e=>{!r.includes(e)&&n.includes(e)&&r.push(e)};for(let e of n)t?.includes(e)&&i(e);for(let e of[`label`,`pluralLabel`,`name`,`description`])i(e);return r}export{l as a,c as i,u as n,a as o,h as r,s,g as t};
|