@object-ui/layout 16.1.0 → 17.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +124 -0
- package/dist/AppSchemaRenderer.d.ts +2 -2
- package/dist/Page.d.ts +2 -2
- package/dist/index.js +1 -2
- package/dist/index.umd.cjs +1 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,129 @@
|
|
|
1
1
|
# @object-ui/layout
|
|
2
2
|
|
|
3
|
+
## 17.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b5b97e2: fix(types,layout): nav item type `component` joins `NavigationItemType` and its zod enum — objectui#2918
|
|
8
|
+
|
|
9
|
+
The renderers have carried a full `type: 'component'` implementation (Phase 3b:
|
|
10
|
+
`componentRef` colon-split to `/component/<ns>/<name>`, `params` serialised as
|
|
11
|
+
querystring, `metadata:*` special-cases) — but the vocabulary never gained the
|
|
12
|
+
member, and `@objectstack/spec` has had `ComponentNavItem` all along. The zod
|
|
13
|
+
enum was the part that bit: `NavigationItemTypeSchema` rejected
|
|
14
|
+
`type: 'component'` at validation time, so authors could not declare one and
|
|
15
|
+
the renderer half was unreachable — dead on arrival rather than dead code.
|
|
16
|
+
|
|
17
|
+
- `NavigationItemType` and `NavigationItemTypeSchema` gain `'component'`;
|
|
18
|
+
`NavigationItem` gains the fields the renderer consumes, `componentRef` and
|
|
19
|
+
`params` (also used by `type: 'page'`), mirroring spec's `ComponentNavItem` —
|
|
20
|
+
declared in zod too, so parse no longer strips them.
|
|
21
|
+
- The `(item as any).componentRef` / `params` casts in `NavigationRenderer`
|
|
22
|
+
and `AppSchemaRenderer` become typed access.
|
|
23
|
+
- `NavigationDesigner`'s exhaustive type-meta map gains a `component` badge
|
|
24
|
+
(new `appDesigner.navTypeComponent` key in all 10 locales).
|
|
25
|
+
- `@object-ui/layout` gains `type-check` (src + tests) with the #2915 `paths`
|
|
26
|
+
override; its DEBT entry in `check-type-check-coverage.mjs` is deleted.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [62311b6]
|
|
29
|
+
- Updated dependencies [fc0272a]
|
|
30
|
+
- Updated dependencies [9e7349e]
|
|
31
|
+
- Updated dependencies [8864971]
|
|
32
|
+
- Updated dependencies [c785740]
|
|
33
|
+
- Updated dependencies [b41f401]
|
|
34
|
+
- Updated dependencies [19e9fa0]
|
|
35
|
+
- Updated dependencies [95b7214]
|
|
36
|
+
- Updated dependencies [7d9734d]
|
|
37
|
+
- Updated dependencies [6ae818e]
|
|
38
|
+
- Updated dependencies [9eb932b]
|
|
39
|
+
- Updated dependencies [746dd00]
|
|
40
|
+
- Updated dependencies [aebfa4f]
|
|
41
|
+
- Updated dependencies [38ca8be]
|
|
42
|
+
- Updated dependencies [68ef584]
|
|
43
|
+
- Updated dependencies [4952edf]
|
|
44
|
+
- Updated dependencies [7f0252e]
|
|
45
|
+
- Updated dependencies [c4d7b20]
|
|
46
|
+
- Updated dependencies [c769d3d]
|
|
47
|
+
- Updated dependencies [7639a61]
|
|
48
|
+
- Updated dependencies [94e63ef]
|
|
49
|
+
- Updated dependencies [c735bf7]
|
|
50
|
+
- Updated dependencies [02aef0c]
|
|
51
|
+
- Updated dependencies [6f29aa5]
|
|
52
|
+
- Updated dependencies [c4db402]
|
|
53
|
+
- Updated dependencies [5319bf1]
|
|
54
|
+
- Updated dependencies [49e5671]
|
|
55
|
+
- Updated dependencies [9a04d25]
|
|
56
|
+
- Updated dependencies [b5b97e2]
|
|
57
|
+
- Updated dependencies [f59f2c1]
|
|
58
|
+
- Updated dependencies [07de839]
|
|
59
|
+
- Updated dependencies [2a40b5e]
|
|
60
|
+
- Updated dependencies [df613fa]
|
|
61
|
+
- Updated dependencies [4874117]
|
|
62
|
+
- Updated dependencies [ad0183a]
|
|
63
|
+
- Updated dependencies [ce08d55]
|
|
64
|
+
- Updated dependencies [eb4b740]
|
|
65
|
+
- Updated dependencies [5b084eb]
|
|
66
|
+
- Updated dependencies [aa1240a]
|
|
67
|
+
- Updated dependencies [2374a49]
|
|
68
|
+
- Updated dependencies [390c071]
|
|
69
|
+
- Updated dependencies [d10f526]
|
|
70
|
+
- Updated dependencies [2d5d594]
|
|
71
|
+
- Updated dependencies [ea7f477]
|
|
72
|
+
- Updated dependencies [379728f]
|
|
73
|
+
- Updated dependencies [7f23cd0]
|
|
74
|
+
- Updated dependencies [0ded602]
|
|
75
|
+
- Updated dependencies [24e0e0a]
|
|
76
|
+
- Updated dependencies [3a6cf24]
|
|
77
|
+
- Updated dependencies [aa35561]
|
|
78
|
+
- Updated dependencies [03bd53b]
|
|
79
|
+
- Updated dependencies [3c1f321]
|
|
80
|
+
- Updated dependencies [a045a32]
|
|
81
|
+
- Updated dependencies [912496d]
|
|
82
|
+
- Updated dependencies [80edbd4]
|
|
83
|
+
- Updated dependencies [9867281]
|
|
84
|
+
- @object-ui/core@17.1.0
|
|
85
|
+
- @object-ui/components@17.1.0
|
|
86
|
+
- @object-ui/react@17.1.0
|
|
87
|
+
- @object-ui/types@17.1.0
|
|
88
|
+
|
|
89
|
+
## 17.0.0
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [7b21891]
|
|
94
|
+
- Updated dependencies [952b978]
|
|
95
|
+
- Updated dependencies [de5e40c]
|
|
96
|
+
- Updated dependencies [1767124]
|
|
97
|
+
- Updated dependencies [8ecf5a6]
|
|
98
|
+
- Updated dependencies [7b35e4b]
|
|
99
|
+
- Updated dependencies [8fb1295]
|
|
100
|
+
- Updated dependencies [e16ed2d]
|
|
101
|
+
- Updated dependencies [f9bbddb]
|
|
102
|
+
- Updated dependencies [dfd3705]
|
|
103
|
+
- Updated dependencies [c77108c]
|
|
104
|
+
- Updated dependencies [2735de6]
|
|
105
|
+
- Updated dependencies [c19ac11]
|
|
106
|
+
- Updated dependencies [6dee2cb]
|
|
107
|
+
- Updated dependencies [c7cff19]
|
|
108
|
+
- Updated dependencies [cd09a7b]
|
|
109
|
+
- Updated dependencies [f1abf0e]
|
|
110
|
+
- Updated dependencies [f05b84e]
|
|
111
|
+
- Updated dependencies [2f947e4]
|
|
112
|
+
- Updated dependencies [7d46648]
|
|
113
|
+
- Updated dependencies [9b53d72]
|
|
114
|
+
- Updated dependencies [662bdf9]
|
|
115
|
+
- Updated dependencies [059a052]
|
|
116
|
+
- Updated dependencies [53642d4]
|
|
117
|
+
- Updated dependencies [8aae006]
|
|
118
|
+
- Updated dependencies [c6cfdf1]
|
|
119
|
+
- Updated dependencies [d147a13]
|
|
120
|
+
- Updated dependencies [c6aaed8]
|
|
121
|
+
- Updated dependencies [dc334da]
|
|
122
|
+
- @object-ui/components@17.0.0
|
|
123
|
+
- @object-ui/react@17.0.0
|
|
124
|
+
- @object-ui/types@17.0.0
|
|
125
|
+
- @object-ui/core@17.0.0
|
|
126
|
+
|
|
3
127
|
## 16.1.0
|
|
4
128
|
|
|
5
129
|
### Patch Changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AppComponentSchema, NavigationItem } from '@object-ui/types';
|
|
3
3
|
import { VisibilityEvaluator, PermissionChecker, CapabilityChecker } from './NavigationRenderer';
|
|
4
4
|
/** Mobile navigation display mode */
|
|
5
5
|
export type MobileNavMode = 'drawer' | 'bottom_nav' | 'hamburger';
|
|
6
6
|
export interface AppSchemaRendererProps {
|
|
7
7
|
/** The AppSchema JSON to render */
|
|
8
|
-
schema:
|
|
8
|
+
schema: AppComponentSchema;
|
|
9
9
|
/** Base URL prefix for generated hrefs (e.g. "/apps/crm") */
|
|
10
10
|
basePath?: string;
|
|
11
11
|
/** Mobile navigation mode @default "drawer" */
|
package/dist/Page.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PageNodeSchema } from '@object-ui/types';
|
|
3
3
|
export declare function Page({ schema, className, style, id, ...props }: {
|
|
4
|
-
schema:
|
|
4
|
+
schema: PageNodeSchema;
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
id?: string;
|
package/dist/index.js
CHANGED
|
@@ -537,8 +537,7 @@ function Ke({ item: e, basePath: t, evalVis: n, checkPerm: r, checkCap: i, onAct
|
|
|
537
537
|
}
|
|
538
538
|
function Q({ item: e, basePath: n, evalVis: r, checkPerm: o, checkCap: u, onAction: d, enablePinning: p, onPinToggle: m, dragListeners: h, resolveObjectLabel: y, resolveDashboardLabel: b, resolveGroupLabel: x, resolveViewLabel: E, resolveItemLabel: D, t: O, templateContext: k }) {
|
|
539
539
|
let j = M(), N = j ? "min-h-[44px] text-[15px] gap-3 rounded-xl" : void 0, F = A("shrink-0", j ? "h-5 w-5" : "h-4 w-4"), te = (() => {
|
|
540
|
-
|
|
541
|
-
if (typeof t == "boolean") return t;
|
|
540
|
+
if (typeof e.expanded == "boolean") return e.expanded;
|
|
542
541
|
if (typeof e.defaultOpen == "boolean") return e.defaultOpen;
|
|
543
542
|
})(), ie = e.type === "group" ? e.children?.length ?? 0 : 0, I = t.useContext(Z), [L, ae] = i(t.useMemo(() => {
|
|
544
543
|
if (e.type !== "group" || !I) return !1;
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@object-ui/core"),require("react"),require("@object-ui/components"),require("lucide-react"),require("@object-ui/react"),require("react/jsx-runtime"),require("react-router-dom"),require("@dnd-kit/core"),require("@dnd-kit/sortable"),require("@dnd-kit/utilities"),require("@object-ui/types")):typeof define==`function`&&define.amd?define([`exports`,`@object-ui/core`,`react`,`@object-ui/components`,`lucide-react`,`@object-ui/react`,`react/jsx-runtime`,`react-router-dom`,`@dnd-kit/core`,`@dnd-kit/sortable`,`@dnd-kit/utilities`,`@object-ui/types`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ObjectUILayout={},e._object_ui_core,e.react,e._object_ui_components,e.lucide_react,e._object_ui_react,e.react_jsx_runtime,e.react_router_dom,e._dnd_kit_core,e._dnd_kit_sortable,e._dnd_kit_utilities,e._object_ui_types))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var f=Object.create,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,g=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,v=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=h(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_.call(e,s)&&s!==n&&p(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=m(t,s))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:f(g(e)),v(t||!e||!e.__esModule?p(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var y=e=>{let t=e?.name??e?.full_name??e?.display_name??e?.label??e?.title??e?.subject;return t!=null&&String(t).trim()?String(t):[e?.salutation,e?.first_name,e?.last_name].filter(e=>typeof e==`string`&&e.trim()).map(e=>e.trim()).join(` `)||(typeof e?.email==`string`&&e.email.trim()?e.email.trim():null)},b=(e,t)=>!e||typeof e!=`string`?e??``:e.includes(`{`)?e.replace(/\{([a-zA-Z0-9_.]+)\}/g,(e,n)=>{let r=n.split(`.`).reduce((e,t)=>e==null?e:e[t],t);return r==null?``:typeof r==`object`?y(r)??``:String(r)}).replace(/\s*[-–—|/·,:]\s*(?=\s*[-–—|/·,:]|$)/g,``).replace(/^\s*[-–—|/·,:]\s*/,``).replace(/\s+/g,` `).trim():e;function x({title:e,subtitle:t,description:s,icon:c,action:l,actions:u,showBack:d,schema:f,className:p,children:m,...h}){let g=(0,a.useRecordContext)(),_=typeof e==`string`&&/\{[a-zA-Z0-9_.]+\}/.test(e),v=b(e,g?.data)||(_?``:e),y=t??s,x=typeof y==`string`&&/\{[a-zA-Z0-9_.]+\}/.test(y),S=b(y,g?.data)||(x?``:y),C=!!g?.recordId,w=!!g?.embedded,T=d??(C&&!w),E=n.default.useCallback(()=>{if(typeof window>`u`)return;let e=window.location.pathname,t=e.replace(/\/record\/[^/]+\/?$/,``);t===e?window.history.length>1&&window.history.back():(window.history.pushState({},``,t+window.location.search),window.dispatchEvent(new PopStateEvent(`popstate`)))},[]),D=Array.isArray(f?.children)?f.children.filter(Boolean).map((e,t)=>(0,o.jsx)(a.SchemaRenderer,{schema:e},e?.id||`pgh-child-${t}`)):null,O=Array.isArray(u)&&u.length>0&&u||Array.isArray(f?.actions)&&f.actions.length>0&&f.actions||Array.isArray(f?.properties?.actions)&&f.properties.actions.length>0&&f.properties.actions||null,k=l||m||(O?(0,o.jsx)(a.SchemaRenderer,{schema:{type:`record:quick_actions`,properties:{actions:O,location:`record_header`,align:`end`,inline:!0}}}):null)||D;return(0,o.jsx)(`div`,{className:(0,r.cn)(`flex flex-col gap-3 pb-4 border-b`,p),...h,children:(0,o.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[T&&(0,o.jsx)(r.Button,{type:`button`,variant:`ghost`,size:`icon`,onClick:E,"aria-label":`Back to list`,className:`flex-shrink-0 -ml-2`,children:(0,o.jsx)(i.ArrowLeft,{className:`size-4`})}),c&&(v||S)&&(0,o.jsx)(`div`,{className:`flex-shrink-0 grid place-items-center size-10 rounded-md bg-primary/10 text-primary`,children:typeof c==`string`?(0,o.jsx)(r.LazyIcon,{name:c,className:`size-5`}):c}),(0,o.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[v?(0,o.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight md:text-3xl truncate`,children:v}):null,S&&(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground truncate`,children:S})]}),k&&(0,o.jsx)(`div`,{className:`flex items-center gap-2 ml-auto`,children:k})]})})}function S(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return null;let n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,i=parseInt(t[3],16)/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=0,c=0,l=(a+o)/2;if(a!==o){let e=a-o;switch(c=l>.5?e/(2-a-o):e/(a+o),a){case n:s=((r-i)/e+(r<i?6:0))/6;break;case r:s=((i-n)/e+2)/6;break;case i:s=((n-r)/e+4)/6;break}}return{h:s*360,s:c*100,l:l*100}}function C(e){let t=S(e);return t?`${Math.round(t.h)} ${Math.round(t.s)}% ${Math.round(t.l)}%`:null}function w(e){let t=S(e);if(!t)return null;let n=Math.max(t.l,65),r=t.s>80?Math.max(t.s-10,70):t.s;return`${Math.round(t.h)} ${Math.round(r)}% ${Math.round(n)}%`}function T(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return`0 0% 100%`;let n=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},r=n(parseInt(t[1],16)),i=n(parseInt(t[2],16)),a=n(parseInt(t[3],16));return .2126*r+.7152*i+.0722*a>.6?`222 47% 11%`:`0 0% 100%`}function E(e,t){(0,n.useEffect)(()=>{let n=document.documentElement,r=()=>n.classList.contains(`dark`),i=()=>{if(e?.primaryColor){let t=C(e.primaryColor),i=w(e.primaryColor),a=r()&&i||t;a&&(n.style.setProperty(`--brand-primary`,e.primaryColor),n.style.setProperty(`--brand-primary-hsl`,t||a),n.style.setProperty(`--primary`,a),n.style.setProperty(`--primary-foreground`,r()?`222 47% 11%`:T(e.primaryColor)),n.style.setProperty(`--ring`,a),n.style.setProperty(`--sidebar-primary`,a),n.style.setProperty(`--sidebar-ring`,a))}else n.style.removeProperty(`--brand-primary`),n.style.removeProperty(`--brand-primary-hsl`),n.style.removeProperty(`--primary`),n.style.removeProperty(`--primary-foreground`),n.style.removeProperty(`--ring`),n.style.removeProperty(`--sidebar-primary`),n.style.removeProperty(`--sidebar-ring`);if(e?.accentColor){let t=C(e.accentColor),i=w(e.accentColor),a=r()&&i||t;a&&(n.style.setProperty(`--brand-accent`,e.accentColor),n.style.setProperty(`--brand-accent-hsl`,t||a),n.style.setProperty(`--accent`,a),n.style.setProperty(`--accent-foreground`,r()?`222 47% 11%`:T(e.accentColor)))}else n.style.removeProperty(`--brand-accent`),n.style.removeProperty(`--brand-accent-hsl`),n.style.removeProperty(`--accent`),n.style.removeProperty(`--accent-foreground`)};i();let a=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`class`){i();break}});if(a.observe(n,{attributes:!0,attributeFilter:[`class`]}),e?.favicon){let t=document.querySelector(`#favicon`)||document.querySelector(`link[rel="icon"]`);t&&(t.href=e.favicon)}return t&&(document.title=t),()=>{a.disconnect(),n.style.removeProperty(`--brand-primary`),n.style.removeProperty(`--brand-primary-hsl`),n.style.removeProperty(`--brand-accent`),n.style.removeProperty(`--brand-accent-hsl`),n.style.removeProperty(`--primary`),n.style.removeProperty(`--primary-foreground`),n.style.removeProperty(`--ring`),n.style.removeProperty(`--sidebar-primary`),n.style.removeProperty(`--sidebar-ring`),n.style.removeProperty(`--accent`),n.style.removeProperty(`--accent-foreground`)}},[e?.primaryColor,e?.accentColor,e?.favicon,t])}function D({sidebar:e,navbar:t,children:n,className:i,defaultOpen:a=!0,branding:s,rightRail:c}){return E(s,s?.title),(0,o.jsxs)(r.SidebarProvider,{defaultOpen:a,className:`!flex-col h-svh overflow-hidden`,children:[(0,o.jsx)(`header`,{className:`sticky top-0 z-30 flex h-14 w-full shrink-0 items-center gap-2 border-b bg-background px-2 sm:px-4`,children:t}),(0,o.jsxs)(`div`,{className:`flex flex-1 min-h-0 w-full`,children:[e,(0,o.jsx)(r.SidebarInset,{className:`min-w-0`,children:(0,o.jsx)(`main`,{className:(0,r.cn)(`flex-1 min-w-0 overflow-auto p-3 sm:p-4 md:p-6 pb-20 sm:pb-4 md:pb-6`,i),children:n})}),c]})]})}function O({className:e,children:t,...n}){return(0,o.jsx)(`div`,{className:(0,r.cn)(`rounded-xl border bg-card text-card-foreground shadow`,e),...n,children:(0,o.jsx)(`div`,{className:`p-6`,children:t})})}var k={xs:{1:`grid-cols-1`,2:`grid-cols-2`,3:`grid-cols-3`,4:`grid-cols-4`,6:`grid-cols-6`,12:`grid-cols-12`},sm:{1:`sm:grid-cols-1`,2:`sm:grid-cols-2`,3:`sm:grid-cols-3`,4:`sm:grid-cols-4`,6:`sm:grid-cols-6`,12:`sm:grid-cols-12`},md:{1:`md:grid-cols-1`,2:`md:grid-cols-2`,3:`md:grid-cols-3`,4:`md:grid-cols-4`,6:`md:grid-cols-6`,12:`md:grid-cols-12`},lg:{1:`lg:grid-cols-1`,2:`lg:grid-cols-2`,3:`lg:grid-cols-3`,4:`lg:grid-cols-4`,6:`lg:grid-cols-6`,12:`lg:grid-cols-12`},xl:{1:`xl:grid-cols-1`,2:`xl:grid-cols-2`,3:`xl:grid-cols-3`,4:`xl:grid-cols-4`,6:`xl:grid-cols-6`,12:`xl:grid-cols-12`},"2xl":{1:`2xl:grid-cols-1`,2:`2xl:grid-cols-2`,3:`2xl:grid-cols-3`,4:`2xl:grid-cols-4`,6:`2xl:grid-cols-6`,12:`2xl:grid-cols-12`}};function A(e){if(!e)return`grid-cols-1`;let t=[];for(let[n,r]of Object.entries(e)){let e=k[n];if(e&&r){let n=Object.keys(e).map(Number).reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e);t.push(e[n])}}return t.join(` `)||`grid-cols-1`}var j={0:`gap-0`,1:`gap-1`,2:`gap-2`,3:`gap-3`,4:`gap-4`,5:`gap-5`,6:`gap-6`,8:`gap-8`},M=({columns:e,gap:t=4,className:n,children:i})=>(0,o.jsx)(`div`,{className:(0,r.cn)(`grid`,A(e),typeof t==`number`?j[t]||`gap-${t}`:``,n),children:i});function N(e){return e?(0,r.getLazyIcon)(e):i.FileText}function P(e,t){if(typeof e==`string`)return e;if(t){let n=t(e.key,{defaultValue:e.defaultValue,...e.params});if(n&&n!==e.key)return n}return e.defaultValue||e.key}function F(e,t,n,r,i,a,o){let s=P(e.label,n);if(typeof e.label!=`string`)return s;let c=e=>!!e&&s.trim().toLowerCase()!==e.trim().toLowerCase();if(e.type===`object`&&e.objectName){if(e.viewName)return c(e.viewName)?s:a?a(e.objectName,e.viewName,s):s;if(c(e.objectName))return s;if(t)return t(e.objectName,s)}if(e.type===`dashboard`&&e.dashboardName){if(c(e.dashboardName))return s;if(r)return r(e.dashboardName,s)}if(e.type===`group`&&e.id){if(c(e.id))return s;if(i)return i(e.id,s)}return o&&e.id&&!c(e.id)?o(e.id,s):s}var I=e=>!(e===!1||e===`false`),L=()=>!0,R=()=>!0,z=/\{(current_user_id|current_org_id|[a-z][a-z0-9_]*)\}/g;function B(e,t){if(!e.includes(`{`))return e;let n=!1,r=e.replace(z,(e,r)=>{let i;return i=r===`current_user_id`?t?.currentUserId:r===`current_org_id`?t?.currentOrgId:t?.contextValues?.[r],i||(n=!0,``)});return n?null:r}function V(e,t,n){switch(e.type){case`object`:{let r=`${t}/${e.objectName??``}`,i=e.recordId;if(i){let t=B(i,n);if(t){let n=`${r}/record/${encodeURIComponent(t)}`;return{href:e.recordMode===`edit`?`${n}/edit`:n,external:!1}}}let a=e.filters;if(a&&typeof a==`object`&&!Array.isArray(a)){let e=new URLSearchParams;for(let[t,r]of Object.entries(a)){if(r==null||t===``)continue;let i=B(String(r),n);i!==null&&e.set(`filter[${t}]`,i)}let t=e.toString();return{href:t?`${r}/data?${t}`:`${r}/data`,external:!1}}return{href:e.viewName?`${r}/view/${e.viewName}`:r,external:!1}}case`dashboard`:return{href:e.dashboardName?`${t}/dashboard/${e.dashboardName}`:`#`,external:!1};case`page`:{if(!e.pageName)return{href:`#`,external:!1};let r=e.params,i=`${t}/page/${e.pageName}`;if(r&&typeof r==`object`){let e=new URLSearchParams;for(let[t,i]of Object.entries(r))if(i!=null)if(typeof i==`string`){let r=B(i,n);r!==null&&e.set(t,r)}else e.set(t,JSON.stringify(i));let t=e.toString();t&&(i+=`?${t}`)}return{href:i,external:!1}}case`report`:return{href:e.reportName?`${t}/report/${e.reportName}`:`#`,external:!1};case`url`:return{href:e.url??`#`,external:e.target===`_blank`};case`component`:{let r=e.componentRef;if(!r)return{href:`#`,external:!1};let i=r.split(`:`).filter(Boolean);if(i.length===0)return{href:`#`,external:!1};let a=e.params;if(i[0]===`metadata`){let e=i[1],r=a&&typeof a.type==`string`?a.type:void 0,o=a&&typeof a.name==`string`?a.name:void 0,s=``;if(a&&typeof a==`object`){let e=new URLSearchParams;for(let[t,r]of Object.entries(a))if(!(t===`type`||t===`name`)&&r!=null)if(typeof r==`string`){let i=B(r,n);i&&e.set(t,i)}else e.set(t,JSON.stringify(r));let t=e.toString();t&&(s=`?${t}`)}return e===`directory`||!e?{href:`${t}/metadata${s}`,external:!1}:e===`resource`&&r?{href:`${t}/metadata${o?`/${encodeURIComponent(r)}/${encodeURIComponent(o)}`:`/${encodeURIComponent(r)}`}${s}`,external:!1}:{href:`${t}/metadata${s}`,external:!1}}let o=`${t}/component/${i.join(`/`)}`;if(a&&typeof a==`object`){let e=new URLSearchParams;for(let[t,n]of Object.entries(a))n!=null&&e.set(t,typeof n==`string`?n:JSON.stringify(n));let t=e.toString();t&&(o+=`?${t}`)}return{href:o,external:!1}}default:return{href:`#`,external:!1}}}var ee=50,te=40,ne=30,H=25,U=10,W=5;function re(e){let t=new Map;return new URLSearchParams(e).forEach((e,n)=>{let r=/^filter\[(.+)\]$/.exec(n);r&&r[1]&&e!==``&&t.set(r[1],e)}),t}function G(e,t){return t.startsWith(`${e}.`)?t.slice(e.length+1):t}function ie(e,t,n,r,i){let{href:a,external:o}=V(e,r,i);if(o||a===`#`)return 0;if(e.type===`object`&&e.objectName){let a=`${r}/${e.objectName}`;if(t!==a&&!t.startsWith(`${a}/`))return 0;let o=t===a?[]:t.slice(a.length+1).split(`/`),s=e.recordId;if(s){let e=B(s,i);if(e)return o[0]===`record`&&decodeURIComponent(o[1]??``)===e?ee:0}let c=e.filters;if(c&&typeof c==`object`&&!Array.isArray(c)){if(o[0]!==`data`)return 0;let e=new Map;for(let[t,n]of Object.entries(c)){if(n==null||t===``)continue;let r=B(String(n),i);r!==null&&e.set(t,r)}if(e.size!==n.size)return 0;for(let[t,r]of e)if(n.get(t)!==r)return 0;return te}return e.viewName?o[0]!==`view`||!o[1]?0:G(e.objectName,decodeURIComponent(o[1]))===G(e.objectName,e.viewName)?ne:0:o.length===0?H:U}let s=a.split(`?`)[0];if(t===s)return H;let c=e.componentRef;return c&&c.split(`:`)[1]===`directory`?0:t.startsWith(`${s}/`)?W:0}function K(e,t,n,r,i){let a=re(n),o=null,s=0,c=e=>{if(e)for(let n of e){if(n.type===`group`){c(n.children);continue}let e=ie(n,t,a,r,i);e>s&&(o=n,s=e)}};return c(e),o}var q=n.default.createContext(null);function J(e,t){if(!t.trim())return e;let n=t.toLowerCase().trim();return e.reduce((e,r)=>{if(r.type===`separator`)return e;if(r.type===`group`&&r.children?.length){let n=J(r.children,t);return n.length>0&&e.push({...r,children:n}),e}return P(r.label).toLowerCase().includes(n)&&e.push(r),e},[])}var ae=5;function oe({item:e,basePath:t,evalVis:n,checkPerm:r,checkCap:i,onAction:a,enablePinning:s,onPinToggle:c,enableReorder:d,resolveObjectLabel:f,resolveDashboardLabel:p,resolveGroupLabel:m,resolveViewLabel:h,resolveItemLabel:g,t:_,templateContext:v}){let{attributes:y,listeners:b,setNodeRef:x,transform:S,transition:C,isDragging:w}=(0,l.useSortable)({id:e.id,disabled:!d});return(0,o.jsx)(`div`,{ref:x,style:{transform:u.CSS.Transform.toString(S),transition:C,opacity:w?.5:void 0,zIndex:w?10:void 0},...y,children:(0,o.jsx)(Y,{item:e,basePath:t,evalVis:n,checkPerm:r,checkCap:i,onAction:a,enablePinning:s,onPinToggle:c,dragListeners:d?b:void 0,resolveObjectLabel:f,resolveDashboardLabel:p,resolveGroupLabel:m,resolveViewLabel:h,resolveItemLabel:g,t:_,templateContext:v})})}function Y({item:e,basePath:t,evalVis:a,checkPerm:c,checkCap:l,onAction:u,enablePinning:d,onPinToggle:f,dragListeners:p,resolveObjectLabel:m,resolveDashboardLabel:h,resolveGroupLabel:g,resolveViewLabel:_,resolveItemLabel:v,t:y,templateContext:b}){let x=(0,r.useIsMobile)(),S=x?`min-h-[44px] text-[15px] gap-3 rounded-xl`:void 0,C=(0,r.cn)(`shrink-0`,x?`h-5 w-5`:`h-4 w-4`),w=(()=>{let t=e.expanded;if(typeof t==`boolean`)return t;if(typeof e.defaultOpen==`boolean`)return e.defaultOpen})(),T=e.type===`group`?e.children?.length??0:0,E=n.default.useContext(q),[D,O]=(0,n.useState)(n.default.useMemo(()=>{if(e.type!==`group`||!E)return!1;let t=e=>!!e?.some(e=>e.id===E||e.type===`group`&&t(e.children));return t(e.children)},[e,E])?!0:w??!(T>=8));if(!a(e.visible)||e.requiredPermissions?.length&&!c(e.requiredPermissions))return null;let k=e.requiresObject,A=e.requiresService;if(k&&!l(`object`,k)||A&&!l(`service`,A))return null;if(e.type===`separator`)return(0,o.jsx)(r.Separator,{className:`my-2`});if(e.type===`group`){let n=(e.children??[]).slice().sort((e,t)=>(e.order??0)-(t.order??0)),s=F(e,m,y,h,g,_,v);return(0,o.jsx)(r.Collapsible,{open:D,onOpenChange:O,children:(0,o.jsxs)(r.SidebarGroup,{children:[(0,o.jsx)(r.SidebarGroupLabel,{asChild:!0,children:(0,o.jsxs)(r.CollapsibleTrigger,{className:(0,r.cn)(`flex w-full items-center justify-between`,x&&`min-h-[44px] text-[15px] rounded-xl`),children:[s,(0,o.jsx)(i.ChevronRight,{className:(0,r.cn)(`ml-auto transition-transform`,x?`h-5 w-5`:`h-4 w-4`,D&&`rotate-90`)})]})}),(0,o.jsx)(r.CollapsibleContent,{children:(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:n.map(e=>(0,o.jsx)(Y,{item:e,basePath:t,evalVis:a,checkPerm:c,checkCap:l,onAction:u,enablePinning:d,onPinToggle:f,resolveObjectLabel:m,resolveDashboardLabel:h,resolveGroupLabel:g,resolveViewLabel:_,resolveItemLabel:v,t:y,templateContext:b},e.id))})})})]})})}if(e.type===`action`){let n=N(e.icon),a=P(e.label,y);return(0,o.jsxs)(r.SidebarMenuItem,{children:[p&&(0,o.jsx)(`span`,{className:`absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground`,"aria-label":y?y(`console.nav.dragToReorder`,{defaultValue:`Drag to reorder`}):`Drag to reorder`,...p,children:(0,o.jsx)(i.GripVertical,{className:`h-3.5 w-3.5`})}),(0,o.jsxs)(r.SidebarMenuButton,{tooltip:a,onClick:()=>u?.(e),className:S,children:[(0,o.jsx)(n,{className:C}),(0,o.jsx)(`span`,{children:a}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant??`default`,className:`ml-auto text-[10px] px-1.5 py-0`,children:e.badge})]}),d&&f&&(0,o.jsx)(r.SidebarMenuAction,{showOnHover:!0,onClick:()=>f(e.id,!e.pinned,e,t),"aria-label":y?y(e.pinned?`console.nav.unpinItem`:`console.nav.pinItem`,{defaultValue:e.pinned?`Unpin ${a}`:`Pin ${a}`,name:a}):e.pinned?`Unpin ${a}`:`Pin ${a}`,children:e.pinned?(0,o.jsx)(i.PinOff,{className:`h-3.5 w-3.5`}):(0,o.jsx)(i.Pin,{className:`h-3.5 w-3.5`})})]})}let j=N(e.icon),{href:M,external:I}=V(e,t,b),L=E!==null&&e.id===E,R=F(e,m,y,h,g,_,v),z=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(j,{className:C}),(0,o.jsx)(`span`,{children:R}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant??`default`,className:`ml-auto text-[10px] px-1.5 py-0`,children:e.badge})]});return(0,o.jsxs)(r.SidebarMenuItem,{children:[p&&(0,o.jsx)(`span`,{className:`absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground`,"aria-label":y?y(`console.nav.dragToReorder`,{defaultValue:`Drag to reorder`}):`Drag to reorder`,...p,children:(0,o.jsx)(i.GripVertical,{className:`h-3.5 w-3.5`})}),(0,o.jsx)(r.SidebarMenuButton,{asChild:!0,isActive:L,tooltip:R,className:S,children:I?(0,o.jsx)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,children:z}):(0,o.jsx)(s.Link,{to:M,children:z})}),d&&f&&(0,o.jsx)(r.SidebarMenuAction,{showOnHover:!0,onClick:()=>f(e.id,!e.pinned,e,t),"aria-label":y?y(e.pinned?`console.nav.unpinItem`:`console.nav.pinItem`,{defaultValue:e.pinned?`Unpin ${R}`:`Pin ${R}`,name:R}):e.pinned?`Unpin ${R}`:`Pin ${R}`,children:e.pinned?(0,o.jsx)(i.PinOff,{className:`h-3.5 w-3.5`}):(0,o.jsx)(i.Pin,{className:`h-3.5 w-3.5`})})]})}function X({items:e,basePath:t=``,evaluateVisibility:a=I,checkPermission:u=L,checkCapability:d=R,onAction:f,searchQuery:p,enablePinning:m,onPinToggle:h,enableReorder:g,onReorder:_,resolveObjectLabel:v,resolveDashboardLabel:y,resolveGroupLabel:b,resolveViewLabel:x,resolveItemLabel:S,t:C,templateContext:w}){let T=(0,s.useLocation)(),E=(0,n.useMemo)(()=>K(e,T.pathname,T.search,t,w)?.id??null,[e,T.pathname,T.search,t,w]),D=(0,n.useMemo)(()=>p?J(e,p):e,[e,p]),O=(0,n.useMemo)(()=>Z(D),[D]),k=D.slice().sort((e,t)=>(e.order??0)-(t.order??0)),A=(0,c.useSensors)((0,c.useSensor)(c.PointerSensor,{activationConstraint:{distance:ae}}),(0,c.useSensor)(c.KeyboardSensor)),j=e=>{let{active:t,over:n}=e;if(!n||t.id===n.id||!_)return;let r=k.findIndex(e=>e.id===t.id),i=k.findIndex(e=>e.id===n.id);r===-1||i===-1||_((0,l.arrayMove)(k,r,i).map((e,t)=>({...e,order:t})))},M={basePath:t,evalVis:a,checkPerm:u,checkCap:d,onAction:f,enablePinning:m,onPinToggle:h,resolveObjectLabel:v,resolveDashboardLabel:y,resolveGroupLabel:b,resolveViewLabel:x,resolveItemLabel:S,t:C,templateContext:w},N=k.some(e=>e.type===`group`),P=O.length>0&&m?(0,o.jsxs)(r.SidebarGroup,{children:[(0,o.jsxs)(r.SidebarGroupLabel,{className:`flex items-center gap-1.5`,children:[(0,o.jsx)(i.Star,{className:`h-3.5 w-3.5`}),C?C(`console.nav.favorites`,{defaultValue:`Favorites`}):`Favorites`]}),(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:O.map(e=>(0,o.jsx)(Y,{item:e,...M},`fav-${e.id}`))})})]}):null;if(!N){let e=k.filter(e=>e.type!==`group`).map(e=>e.id),t=g?(0,o.jsx)(c.DndContext,{sensors:A,collisionDetection:c.closestCenter,onDragEnd:j,children:(0,o.jsx)(l.SortableContext,{items:e,strategy:l.verticalListSortingStrategy,children:(0,o.jsx)(r.SidebarMenu,{children:k.map(e=>(0,o.jsx)(oe,{item:e,enableReorder:g,...M},e.id))})})}):(0,o.jsx)(r.SidebarMenu,{children:k.map(e=>(0,o.jsx)(Y,{item:e,...M},e.id))});return(0,o.jsxs)(q.Provider,{value:E,children:[P,(0,o.jsx)(r.SidebarGroup,{children:(0,o.jsx)(r.SidebarGroupContent,{children:t})})]})}let F=[],z=[],B=e=>{if(z.length===0)return;let t=z;z=[],F.push((0,o.jsx)(r.SidebarGroup,{children:(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:t.map(e=>(0,o.jsx)(Y,{item:e,...M},e.id))})})},e))};return k.forEach((e,t)=>{e.type===`group`?(B(`leaf-${t}`),F.push((0,o.jsx)(Y,{item:e,...M},e.id))):z.push(e)}),B(`leaf-end`),(0,o.jsxs)(q.Provider,{value:E,children:[P,F]})}function Z(e){let t=[];for(let n of e)n.pinned&&n.type!==`group`&&n.type!==`separator`&&t.push(n),n.children?.length&&t.push(...Z(n.children));return t}function se({areas:e,activeAreaId:t,onAreaChange:n,evalVis:a,checkPerm:s}){let c=e.filter(e=>!(!a(e.visible)||e.requiredPermissions?.length&&!s(e.requiredPermissions)));return c.length<=1?null:(0,o.jsxs)(r.SidebarGroup,{children:[(0,o.jsxs)(r.SidebarGroupLabel,{className:`flex items-center gap-1.5`,children:[(0,o.jsx)(i.Layers,{className:`h-3.5 w-3.5`}),`Area`]}),(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:c.map(e=>{let i=N(e.icon);return(0,o.jsx)(r.SidebarMenuItem,{children:(0,o.jsxs)(r.SidebarMenuButton,{isActive:e.id===t,tooltip:P(e.label),onClick:()=>n(e.id),children:[(0,o.jsx)(i,{className:`h-4 w-4`}),(0,o.jsx)(`span`,{children:P(e.label)})]})},e.id)})})})]})}function ce({items:e,basePath:t}){let n=(0,s.useLocation)(),r=e=>{let t=[];for(let n of e)n.type!==`separator`&&(n.type===`group`?t.push(...r(n.children||[])):t.push(n));return t},i=r(e).slice(0,5);return i.length===0?null:(0,o.jsx)(`div`,{className:`fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background/95 backdrop-blur-sm px-2 py-1 sm:hidden safe-area-bottom`,role:`navigation`,"aria-label":`Mobile navigation`,children:i.map(e=>{let r=N(e.icon),i=`#`;if(e.type===`object`)i=`${t}/${e.objectName}`,e.viewName&&(i+=`/view/${e.viewName}`);else if(e.type===`dashboard`)i=e.dashboardName?`${t}/dashboard/${e.dashboardName}`:`#`;else if(e.type===`page`)i=e.pageName?`${t}/page/${e.pageName}`:`#`;else if(e.type===`report`)i=e.reportName?`${t}/report/${e.reportName}`:`#`;else if(e.type===`url`)i=e.url??`#`;else if(e.type===`component`){let n=e.componentRef;if(n){i=`${t}/component/${n.split(`:`).filter(Boolean).join(`/`)}`;let r=e.params;if(r){let e=new URLSearchParams;for(let[t,n]of Object.entries(r))n!=null&&e.set(t,typeof n==`string`?n:JSON.stringify(n));let t=e.toString();t&&(i+=`?${t}`)}}}let a=i!==`#`&&n.pathname.startsWith(i);return(0,o.jsxs)(s.Link,{to:i,className:`flex flex-col items-center gap-0.5 px-2 py-1.5 transition-colors min-w-[44px] min-h-[44px] justify-center ${a?`text-primary`:`text-muted-foreground hover:text-foreground`}`,children:[(0,o.jsx)(r,{className:`h-5 w-5`}),(0,o.jsx)(`span`,{className:`text-[10px] truncate max-w-[60px]`,children:P(e.label)})]},e.id)})})}function le({schema:e,basePath:t,evalVis:i,checkPerm:a,checkCap:s,onAction:c,sidebarHeader:l,sidebarFooter:u,sidebarExtra:d,activeAreaId:f,setActiveAreaId:p,resolvedNavigation:m,enableSearch:h,enablePinning:g,onPinToggle:_,enableReorder:v,onReorder:y}){let b=N(e.logo),x=e.areas??[],[S,C]=(0,n.useState)(``);return(0,o.jsxs)(r.Sidebar,{collapsible:`icon`,children:[(0,o.jsxs)(r.SidebarHeader,{children:[l??(0,o.jsx)(r.SidebarMenu,{children:(0,o.jsx)(r.SidebarMenuItem,{children:(0,o.jsxs)(r.SidebarMenuButton,{size:`lg`,tooltip:e.title??e.name,children:[(0,o.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground`,children:e.logo&&e.logo.startsWith(`http`)?(0,o.jsx)(`img`,{src:e.logo,alt:e.title??``,className:`size-6 object-contain`}):(0,o.jsx)(b,{className:`size-4`})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-semibold`,children:e.title??e.name??`App`}),e.description&&(0,o.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.description})]})]})})}),h&&(0,o.jsx)(r.SidebarInput,{placeholder:`Search navigation…`,value:S,onChange:e=>C(e.target.value),"aria-label":`Search navigation`})]}),(0,o.jsxs)(r.SidebarContent,{children:[x.length>1&&f&&(0,o.jsx)(se,{areas:x,activeAreaId:f,onAreaChange:p,evalVis:i,checkPerm:a}),(0,o.jsx)(X,{items:m,basePath:t,evaluateVisibility:i,checkPermission:a,checkCapability:s,onAction:c,searchQuery:S,enablePinning:g,onPinToggle:_,enableReorder:v,onReorder:y}),d]}),u&&(0,o.jsx)(r.SidebarFooter,{children:u})]})}function Q({schema:e,basePath:t=``,mobileNavMode:r=`drawer`,evaluateVisibility:i,checkPermission:a,checkCapability:s,onAction:c,navbar:l,sidebarHeader:u,sidebarFooter:f,sidebarExtra:p,children:m,className:h,defaultOpen:g=!0,enableSearch:_,enablePinning:v,onPinToggle:y,enableReorder:b,onReorder:x}){let S=i??(e=>!(e===!1||e===`false`)),C=a??(()=>!0),w=s??(()=>!0),T=(0,n.useMemo)(()=>(e.menu??[]).map((e,t)=>(0,d.menuItemToNavigationItem)(e,t)),[e.menu]),E=e.navigation??T,O=e.areas??[],[k,A]=(0,n.useState)(()=>O.length>0?O[0].id:null),j=O.map(e=>e.id).join(`,`);(0,n.useEffect)(()=>{O.length>0?A(e=>O.some(t=>t.id===e)?e:O[0].id):A(null)},[e.name,j]);let M=O.find(e=>e.id===k)?.navigation??E,N={title:e.title,favicon:e.favicon,logo:e.logo};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D,{sidebar:(0,o.jsx)(le,{schema:e,basePath:t,evalVis:S,checkPerm:C,checkCap:w,onAction:c,sidebarHeader:u,sidebarFooter:f,sidebarExtra:p,activeAreaId:k,setActiveAreaId:A,resolvedNavigation:M,enableSearch:_,enablePinning:v,onPinToggle:y,enableReorder:b,onReorder:x}),navbar:l,className:h,defaultOpen:g,branding:N,children:m}),r===`bottom_nav`&&(0,o.jsx)(ce,{items:M,basePath:t})]})}var ue=e=>e?Array.isArray(e)?e:[e]:[];function de({schema:e,className:t,style:n,id:i,...s}){let c=ue(e.children);return(0,o.jsxs)(`div`,{id:i||e.id,className:(0,r.cn)(`flex flex-col h-full space-y-4`,t),style:n,children:[(0,o.jsx)(x,{title:e.title,description:e.description}),(0,o.jsx)(`div`,{className:`flex-1 overflow-auto`,children:c.map((e,t)=>(0,o.jsx)(a.SchemaRenderer,{schema:e,...s},e?.id||t))})]})}function fe(e){return`items`in e&&!(`href`in e)}function pe({item:e,pathname:t}){return e.children&&e.children.length>0?(0,o.jsx)(r.Collapsible,{asChild:!0,defaultOpen:!0,className:`group/collapsible`,children:(0,o.jsxs)(r.SidebarMenuItem,{children:[(0,o.jsx)(r.CollapsibleTrigger,{asChild:!0,children:(0,o.jsxs)(r.SidebarMenuButton,{tooltip:e.title,className:`motion-safe:transition-colors motion-safe:duration-150`,children:[e.icon&&(0,o.jsx)(e.icon,{}),(0,o.jsx)(`span`,{children:e.title}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant||`default`,className:`ml-auto mr-1 h-5 min-w-5 px-1 text-xs`,children:e.badge}),(0,o.jsx)(i.ChevronRight,{className:`ml-auto h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`})]})}),(0,o.jsx)(r.CollapsibleContent,{className:`motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:slide-out-to-top-1 motion-safe:data-[state=open]:slide-in-from-top-1 motion-safe:duration-150`,children:(0,o.jsx)(r.SidebarMenuSub,{children:e.children.map(e=>(0,o.jsx)(r.SidebarMenuSubItem,{children:(0,o.jsx)(r.SidebarMenuSubButton,{asChild:!0,isActive:t===e.href,className:`motion-safe:transition-colors motion-safe:duration-150`,children:(0,o.jsxs)(s.NavLink,{to:e.href,children:[e.icon&&(0,o.jsx)(e.icon,{}),(0,o.jsx)(`span`,{children:e.title}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant||`default`,className:`ml-auto h-5 min-w-5 px-1 text-xs`,children:e.badge})]})})},e.href))})})]})}):(0,o.jsx)(r.SidebarMenuItem,{children:(0,o.jsx)(r.SidebarMenuButton,{asChild:!0,isActive:t===e.href,tooltip:e.title,className:`motion-safe:transition-colors motion-safe:duration-150`,children:(0,o.jsxs)(s.NavLink,{to:e.href,children:[e.icon&&(0,o.jsx)(e.icon,{}),(0,o.jsx)(`span`,{children:e.title}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant||`default`,className:`ml-auto h-5 min-w-5 px-1 text-xs`,children:e.badge})]})})})}function me({items:e,title:t=`Application`,className:a,collapsible:c=`icon`,searchEnabled:l=!1,searchPlaceholder:u=`Search…`}){let d=(0,s.useLocation)(),[f,p]=n.default.useState(``),m=n.default.useMemo(()=>e.length===0?[]:fe(e[0])?e.map(e=>({groupLabel:e.label,items:e.items})):[{items:e}],[e]),h=n.default.useMemo(()=>{if(!f)return m;let e=f.toLowerCase();return m.map(t=>({...t,items:t.items.filter(t=>t.title.toLowerCase().includes(e)||t.children?.some(t=>t.title.toLowerCase().includes(e)))})).filter(e=>e.items.length>0)},[m,f]);return(0,o.jsx)(r.Sidebar,{className:a,collapsible:c,children:(0,o.jsxs)(r.SidebarContent,{children:[l&&(0,o.jsx)(`div`,{className:`px-3 py-2`,children:(0,o.jsxs)(`div`,{className:`relative`,children:[(0,o.jsx)(i.Search,{className:`absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground`}),(0,o.jsx)(r.Input,{type:`search`,placeholder:u,value:f,onChange:e=>p(e.target.value),className:`pl-8 h-9`})]})}),h.map((e,n)=>(0,o.jsxs)(r.SidebarGroup,{children:[n>0&&(0,o.jsx)(`div`,{className:`mx-3 mb-1 h-px bg-sidebar-border/60`,"aria-hidden":!0}),(0,o.jsx)(r.SidebarGroupLabel,{className:`text-[10px] font-semibold uppercase tracking-wider text-sidebar-foreground/60`,children:e.groupLabel||t}),(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:e.items.map(e=>(0,o.jsx)(pe,{item:e,pathname:d.pathname},e.href))})})]},e.groupLabel||n))]})})}function $(){t.ComponentRegistry.register(`page-header`,x,{namespace:`layout`,label:`Page Header`,category:`Layout`,inputs:[{name:`title`,type:`string`},{name:`description`,type:`string`}]}),t.ComponentRegistry.register(`page:card`,O,{namespace:`layout`,skipFallback:!0,label:`Page Card`,category:`Layout`,isContainer:!0}),t.ComponentRegistry.register(`app-shell`,D,{namespace:`layout`,label:`App Shell`,category:`Layout`}),t.ComponentRegistry.register(`responsive-grid`,M,{namespace:`layout`,label:`Responsive Grid`,category:`Layout`,isContainer:!0,inputs:[{name:`columns`,type:`object`},{name:`gap`,type:`number`}]}),t.ComponentRegistry.register(`navigation-renderer`,X,{namespace:`layout`,label:`Navigation Renderer`,category:`Layout`,inputs:[{name:`items`,type:`object`},{name:`basePath`,type:`string`}]}),t.ComponentRegistry.register(`app-schema-renderer`,Q,{namespace:`layout`,label:`App Schema Renderer`,category:`Layout`,isContainer:!0,inputs:[{name:`schema`,type:`object`},{name:`basePath`,type:`string`},{name:`mobileNavMode`,type:`string`}]})}try{$()}catch{}e.AppSchemaRenderer=Q,e.AppShell=D,e.NavigationRenderer=X,e.Page=de,e.PageCard=O,e.PageHeader=x,e.ResponsiveGrid=M,e.SidebarNav=me,e.filterNavigationItems=J,e.registerLayout=$,e.resolveActiveNavItem=K,e.resolveHref=V,e.resolveIcon=N,e.resolveLabel=P,e.useAppShellBranding=E});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@object-ui/core"),require("react"),require("@object-ui/components"),require("lucide-react"),require("@object-ui/react"),require("react/jsx-runtime"),require("react-router-dom"),require("@dnd-kit/core"),require("@dnd-kit/sortable"),require("@dnd-kit/utilities"),require("@object-ui/types")):typeof define==`function`&&define.amd?define([`exports`,`@object-ui/core`,`react`,`@object-ui/components`,`lucide-react`,`@object-ui/react`,`react/jsx-runtime`,`react-router-dom`,`@dnd-kit/core`,`@dnd-kit/sortable`,`@dnd-kit/utilities`,`@object-ui/types`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ObjectUILayout={},e._object_ui_core,e.react,e._object_ui_components,e.lucide_react,e._object_ui_react,e.react_jsx_runtime,e.react_router_dom,e._dnd_kit_core,e._dnd_kit_sortable,e._dnd_kit_utilities,e._object_ui_types))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var f=Object.create,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,g=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,v=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=h(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_.call(e,s)&&s!==n&&p(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=m(t,s))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:f(g(e)),v(t||!e||!e.__esModule?p(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var y=e=>{let t=e?.name??e?.full_name??e?.display_name??e?.label??e?.title??e?.subject;return t!=null&&String(t).trim()?String(t):[e?.salutation,e?.first_name,e?.last_name].filter(e=>typeof e==`string`&&e.trim()).map(e=>e.trim()).join(` `)||(typeof e?.email==`string`&&e.email.trim()?e.email.trim():null)},b=(e,t)=>!e||typeof e!=`string`?e??``:e.includes(`{`)?e.replace(/\{([a-zA-Z0-9_.]+)\}/g,(e,n)=>{let r=n.split(`.`).reduce((e,t)=>e==null?e:e[t],t);return r==null?``:typeof r==`object`?y(r)??``:String(r)}).replace(/\s*[-–—|/·,:]\s*(?=\s*[-–—|/·,:]|$)/g,``).replace(/^\s*[-–—|/·,:]\s*/,``).replace(/\s+/g,` `).trim():e;function x({title:e,subtitle:t,description:s,icon:c,action:l,actions:u,showBack:d,schema:f,className:p,children:m,...h}){let g=(0,a.useRecordContext)(),_=typeof e==`string`&&/\{[a-zA-Z0-9_.]+\}/.test(e),v=b(e,g?.data)||(_?``:e),y=t??s,x=typeof y==`string`&&/\{[a-zA-Z0-9_.]+\}/.test(y),S=b(y,g?.data)||(x?``:y),C=!!g?.recordId,w=!!g?.embedded,T=d??(C&&!w),E=n.default.useCallback(()=>{if(typeof window>`u`)return;let e=window.location.pathname,t=e.replace(/\/record\/[^/]+\/?$/,``);t===e?window.history.length>1&&window.history.back():(window.history.pushState({},``,t+window.location.search),window.dispatchEvent(new PopStateEvent(`popstate`)))},[]),D=Array.isArray(f?.children)?f.children.filter(Boolean).map((e,t)=>(0,o.jsx)(a.SchemaRenderer,{schema:e},e?.id||`pgh-child-${t}`)):null,O=Array.isArray(u)&&u.length>0&&u||Array.isArray(f?.actions)&&f.actions.length>0&&f.actions||Array.isArray(f?.properties?.actions)&&f.properties.actions.length>0&&f.properties.actions||null,k=l||m||(O?(0,o.jsx)(a.SchemaRenderer,{schema:{type:`record:quick_actions`,properties:{actions:O,location:`record_header`,align:`end`,inline:!0}}}):null)||D;return(0,o.jsx)(`div`,{className:(0,r.cn)(`flex flex-col gap-3 pb-4 border-b`,p),...h,children:(0,o.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[T&&(0,o.jsx)(r.Button,{type:`button`,variant:`ghost`,size:`icon`,onClick:E,"aria-label":`Back to list`,className:`flex-shrink-0 -ml-2`,children:(0,o.jsx)(i.ArrowLeft,{className:`size-4`})}),c&&(v||S)&&(0,o.jsx)(`div`,{className:`flex-shrink-0 grid place-items-center size-10 rounded-md bg-primary/10 text-primary`,children:typeof c==`string`?(0,o.jsx)(r.LazyIcon,{name:c,className:`size-5`}):c}),(0,o.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[v?(0,o.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight md:text-3xl truncate`,children:v}):null,S&&(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground truncate`,children:S})]}),k&&(0,o.jsx)(`div`,{className:`flex items-center gap-2 ml-auto`,children:k})]})})}function S(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return null;let n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,i=parseInt(t[3],16)/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=0,c=0,l=(a+o)/2;if(a!==o){let e=a-o;switch(c=l>.5?e/(2-a-o):e/(a+o),a){case n:s=((r-i)/e+(r<i?6:0))/6;break;case r:s=((i-n)/e+2)/6;break;case i:s=((n-r)/e+4)/6;break}}return{h:s*360,s:c*100,l:l*100}}function C(e){let t=S(e);return t?`${Math.round(t.h)} ${Math.round(t.s)}% ${Math.round(t.l)}%`:null}function w(e){let t=S(e);if(!t)return null;let n=Math.max(t.l,65),r=t.s>80?Math.max(t.s-10,70):t.s;return`${Math.round(t.h)} ${Math.round(r)}% ${Math.round(n)}%`}function T(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return`0 0% 100%`;let n=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},r=n(parseInt(t[1],16)),i=n(parseInt(t[2],16)),a=n(parseInt(t[3],16));return .2126*r+.7152*i+.0722*a>.6?`222 47% 11%`:`0 0% 100%`}function E(e,t){(0,n.useEffect)(()=>{let n=document.documentElement,r=()=>n.classList.contains(`dark`),i=()=>{if(e?.primaryColor){let t=C(e.primaryColor),i=w(e.primaryColor),a=r()&&i||t;a&&(n.style.setProperty(`--brand-primary`,e.primaryColor),n.style.setProperty(`--brand-primary-hsl`,t||a),n.style.setProperty(`--primary`,a),n.style.setProperty(`--primary-foreground`,r()?`222 47% 11%`:T(e.primaryColor)),n.style.setProperty(`--ring`,a),n.style.setProperty(`--sidebar-primary`,a),n.style.setProperty(`--sidebar-ring`,a))}else n.style.removeProperty(`--brand-primary`),n.style.removeProperty(`--brand-primary-hsl`),n.style.removeProperty(`--primary`),n.style.removeProperty(`--primary-foreground`),n.style.removeProperty(`--ring`),n.style.removeProperty(`--sidebar-primary`),n.style.removeProperty(`--sidebar-ring`);if(e?.accentColor){let t=C(e.accentColor),i=w(e.accentColor),a=r()&&i||t;a&&(n.style.setProperty(`--brand-accent`,e.accentColor),n.style.setProperty(`--brand-accent-hsl`,t||a),n.style.setProperty(`--accent`,a),n.style.setProperty(`--accent-foreground`,r()?`222 47% 11%`:T(e.accentColor)))}else n.style.removeProperty(`--brand-accent`),n.style.removeProperty(`--brand-accent-hsl`),n.style.removeProperty(`--accent`),n.style.removeProperty(`--accent-foreground`)};i();let a=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`class`){i();break}});if(a.observe(n,{attributes:!0,attributeFilter:[`class`]}),e?.favicon){let t=document.querySelector(`#favicon`)||document.querySelector(`link[rel="icon"]`);t&&(t.href=e.favicon)}return t&&(document.title=t),()=>{a.disconnect(),n.style.removeProperty(`--brand-primary`),n.style.removeProperty(`--brand-primary-hsl`),n.style.removeProperty(`--brand-accent`),n.style.removeProperty(`--brand-accent-hsl`),n.style.removeProperty(`--primary`),n.style.removeProperty(`--primary-foreground`),n.style.removeProperty(`--ring`),n.style.removeProperty(`--sidebar-primary`),n.style.removeProperty(`--sidebar-ring`),n.style.removeProperty(`--accent`),n.style.removeProperty(`--accent-foreground`)}},[e?.primaryColor,e?.accentColor,e?.favicon,t])}function D({sidebar:e,navbar:t,children:n,className:i,defaultOpen:a=!0,branding:s,rightRail:c}){return E(s,s?.title),(0,o.jsxs)(r.SidebarProvider,{defaultOpen:a,className:`!flex-col h-svh overflow-hidden`,children:[(0,o.jsx)(`header`,{className:`sticky top-0 z-30 flex h-14 w-full shrink-0 items-center gap-2 border-b bg-background px-2 sm:px-4`,children:t}),(0,o.jsxs)(`div`,{className:`flex flex-1 min-h-0 w-full`,children:[e,(0,o.jsx)(r.SidebarInset,{className:`min-w-0`,children:(0,o.jsx)(`main`,{className:(0,r.cn)(`flex-1 min-w-0 overflow-auto p-3 sm:p-4 md:p-6 pb-20 sm:pb-4 md:pb-6`,i),children:n})}),c]})]})}function O({className:e,children:t,...n}){return(0,o.jsx)(`div`,{className:(0,r.cn)(`rounded-xl border bg-card text-card-foreground shadow`,e),...n,children:(0,o.jsx)(`div`,{className:`p-6`,children:t})})}var k={xs:{1:`grid-cols-1`,2:`grid-cols-2`,3:`grid-cols-3`,4:`grid-cols-4`,6:`grid-cols-6`,12:`grid-cols-12`},sm:{1:`sm:grid-cols-1`,2:`sm:grid-cols-2`,3:`sm:grid-cols-3`,4:`sm:grid-cols-4`,6:`sm:grid-cols-6`,12:`sm:grid-cols-12`},md:{1:`md:grid-cols-1`,2:`md:grid-cols-2`,3:`md:grid-cols-3`,4:`md:grid-cols-4`,6:`md:grid-cols-6`,12:`md:grid-cols-12`},lg:{1:`lg:grid-cols-1`,2:`lg:grid-cols-2`,3:`lg:grid-cols-3`,4:`lg:grid-cols-4`,6:`lg:grid-cols-6`,12:`lg:grid-cols-12`},xl:{1:`xl:grid-cols-1`,2:`xl:grid-cols-2`,3:`xl:grid-cols-3`,4:`xl:grid-cols-4`,6:`xl:grid-cols-6`,12:`xl:grid-cols-12`},"2xl":{1:`2xl:grid-cols-1`,2:`2xl:grid-cols-2`,3:`2xl:grid-cols-3`,4:`2xl:grid-cols-4`,6:`2xl:grid-cols-6`,12:`2xl:grid-cols-12`}};function A(e){if(!e)return`grid-cols-1`;let t=[];for(let[n,r]of Object.entries(e)){let e=k[n];if(e&&r){let n=Object.keys(e).map(Number).reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e);t.push(e[n])}}return t.join(` `)||`grid-cols-1`}var j={0:`gap-0`,1:`gap-1`,2:`gap-2`,3:`gap-3`,4:`gap-4`,5:`gap-5`,6:`gap-6`,8:`gap-8`},M=({columns:e,gap:t=4,className:n,children:i})=>(0,o.jsx)(`div`,{className:(0,r.cn)(`grid`,A(e),typeof t==`number`?j[t]||`gap-${t}`:``,n),children:i});function N(e){return e?(0,r.getLazyIcon)(e):i.FileText}function P(e,t){if(typeof e==`string`)return e;if(t){let n=t(e.key,{defaultValue:e.defaultValue,...e.params});if(n&&n!==e.key)return n}return e.defaultValue||e.key}function F(e,t,n,r,i,a,o){let s=P(e.label,n);if(typeof e.label!=`string`)return s;let c=e=>!!e&&s.trim().toLowerCase()!==e.trim().toLowerCase();if(e.type===`object`&&e.objectName){if(e.viewName)return c(e.viewName)?s:a?a(e.objectName,e.viewName,s):s;if(c(e.objectName))return s;if(t)return t(e.objectName,s)}if(e.type===`dashboard`&&e.dashboardName){if(c(e.dashboardName))return s;if(r)return r(e.dashboardName,s)}if(e.type===`group`&&e.id){if(c(e.id))return s;if(i)return i(e.id,s)}return o&&e.id&&!c(e.id)?o(e.id,s):s}var I=e=>!(e===!1||e===`false`),L=()=>!0,R=()=>!0,z=/\{(current_user_id|current_org_id|[a-z][a-z0-9_]*)\}/g;function B(e,t){if(!e.includes(`{`))return e;let n=!1,r=e.replace(z,(e,r)=>{let i;return i=r===`current_user_id`?t?.currentUserId:r===`current_org_id`?t?.currentOrgId:t?.contextValues?.[r],i||(n=!0,``)});return n?null:r}function V(e,t,n){switch(e.type){case`object`:{let r=`${t}/${e.objectName??``}`,i=e.recordId;if(i){let t=B(i,n);if(t){let n=`${r}/record/${encodeURIComponent(t)}`;return{href:e.recordMode===`edit`?`${n}/edit`:n,external:!1}}}let a=e.filters;if(a&&typeof a==`object`&&!Array.isArray(a)){let e=new URLSearchParams;for(let[t,r]of Object.entries(a)){if(r==null||t===``)continue;let i=B(String(r),n);i!==null&&e.set(`filter[${t}]`,i)}let t=e.toString();return{href:t?`${r}/data?${t}`:`${r}/data`,external:!1}}return{href:e.viewName?`${r}/view/${e.viewName}`:r,external:!1}}case`dashboard`:return{href:e.dashboardName?`${t}/dashboard/${e.dashboardName}`:`#`,external:!1};case`page`:{if(!e.pageName)return{href:`#`,external:!1};let r=e.params,i=`${t}/page/${e.pageName}`;if(r&&typeof r==`object`){let e=new URLSearchParams;for(let[t,i]of Object.entries(r))if(i!=null)if(typeof i==`string`){let r=B(i,n);r!==null&&e.set(t,r)}else e.set(t,JSON.stringify(i));let t=e.toString();t&&(i+=`?${t}`)}return{href:i,external:!1}}case`report`:return{href:e.reportName?`${t}/report/${e.reportName}`:`#`,external:!1};case`url`:return{href:e.url??`#`,external:e.target===`_blank`};case`component`:{let r=e.componentRef;if(!r)return{href:`#`,external:!1};let i=r.split(`:`).filter(Boolean);if(i.length===0)return{href:`#`,external:!1};let a=e.params;if(i[0]===`metadata`){let e=i[1],r=a&&typeof a.type==`string`?a.type:void 0,o=a&&typeof a.name==`string`?a.name:void 0,s=``;if(a&&typeof a==`object`){let e=new URLSearchParams;for(let[t,r]of Object.entries(a))if(!(t===`type`||t===`name`)&&r!=null)if(typeof r==`string`){let i=B(r,n);i&&e.set(t,i)}else e.set(t,JSON.stringify(r));let t=e.toString();t&&(s=`?${t}`)}return e===`directory`||!e?{href:`${t}/metadata${s}`,external:!1}:e===`resource`&&r?{href:`${t}/metadata${o?`/${encodeURIComponent(r)}/${encodeURIComponent(o)}`:`/${encodeURIComponent(r)}`}${s}`,external:!1}:{href:`${t}/metadata${s}`,external:!1}}let o=`${t}/component/${i.join(`/`)}`;if(a&&typeof a==`object`){let e=new URLSearchParams;for(let[t,n]of Object.entries(a))n!=null&&e.set(t,typeof n==`string`?n:JSON.stringify(n));let t=e.toString();t&&(o+=`?${t}`)}return{href:o,external:!1}}default:return{href:`#`,external:!1}}}var ee=50,te=40,ne=30,H=25,U=10,W=5;function re(e){let t=new Map;return new URLSearchParams(e).forEach((e,n)=>{let r=/^filter\[(.+)\]$/.exec(n);r&&r[1]&&e!==``&&t.set(r[1],e)}),t}function G(e,t){return t.startsWith(`${e}.`)?t.slice(e.length+1):t}function ie(e,t,n,r,i){let{href:a,external:o}=V(e,r,i);if(o||a===`#`)return 0;if(e.type===`object`&&e.objectName){let a=`${r}/${e.objectName}`;if(t!==a&&!t.startsWith(`${a}/`))return 0;let o=t===a?[]:t.slice(a.length+1).split(`/`),s=e.recordId;if(s){let e=B(s,i);if(e)return o[0]===`record`&&decodeURIComponent(o[1]??``)===e?ee:0}let c=e.filters;if(c&&typeof c==`object`&&!Array.isArray(c)){if(o[0]!==`data`)return 0;let e=new Map;for(let[t,n]of Object.entries(c)){if(n==null||t===``)continue;let r=B(String(n),i);r!==null&&e.set(t,r)}if(e.size!==n.size)return 0;for(let[t,r]of e)if(n.get(t)!==r)return 0;return te}return e.viewName?o[0]!==`view`||!o[1]?0:G(e.objectName,decodeURIComponent(o[1]))===G(e.objectName,e.viewName)?ne:0:o.length===0?H:U}let s=a.split(`?`)[0];if(t===s)return H;let c=e.componentRef;return c&&c.split(`:`)[1]===`directory`?0:t.startsWith(`${s}/`)?W:0}function K(e,t,n,r,i){let a=re(n),o=null,s=0,c=e=>{if(e)for(let n of e){if(n.type===`group`){c(n.children);continue}let e=ie(n,t,a,r,i);e>s&&(o=n,s=e)}};return c(e),o}var q=n.default.createContext(null);function J(e,t){if(!t.trim())return e;let n=t.toLowerCase().trim();return e.reduce((e,r)=>{if(r.type===`separator`)return e;if(r.type===`group`&&r.children?.length){let n=J(r.children,t);return n.length>0&&e.push({...r,children:n}),e}return P(r.label).toLowerCase().includes(n)&&e.push(r),e},[])}var ae=5;function oe({item:e,basePath:t,evalVis:n,checkPerm:r,checkCap:i,onAction:a,enablePinning:s,onPinToggle:c,enableReorder:d,resolveObjectLabel:f,resolveDashboardLabel:p,resolveGroupLabel:m,resolveViewLabel:h,resolveItemLabel:g,t:_,templateContext:v}){let{attributes:y,listeners:b,setNodeRef:x,transform:S,transition:C,isDragging:w}=(0,l.useSortable)({id:e.id,disabled:!d});return(0,o.jsx)(`div`,{ref:x,style:{transform:u.CSS.Transform.toString(S),transition:C,opacity:w?.5:void 0,zIndex:w?10:void 0},...y,children:(0,o.jsx)(Y,{item:e,basePath:t,evalVis:n,checkPerm:r,checkCap:i,onAction:a,enablePinning:s,onPinToggle:c,dragListeners:d?b:void 0,resolveObjectLabel:f,resolveDashboardLabel:p,resolveGroupLabel:m,resolveViewLabel:h,resolveItemLabel:g,t:_,templateContext:v})})}function Y({item:e,basePath:t,evalVis:a,checkPerm:c,checkCap:l,onAction:u,enablePinning:d,onPinToggle:f,dragListeners:p,resolveObjectLabel:m,resolveDashboardLabel:h,resolveGroupLabel:g,resolveViewLabel:_,resolveItemLabel:v,t:y,templateContext:b}){let x=(0,r.useIsMobile)(),S=x?`min-h-[44px] text-[15px] gap-3 rounded-xl`:void 0,C=(0,r.cn)(`shrink-0`,x?`h-5 w-5`:`h-4 w-4`),w=(()=>{if(typeof e.expanded==`boolean`)return e.expanded;if(typeof e.defaultOpen==`boolean`)return e.defaultOpen})(),T=e.type===`group`?e.children?.length??0:0,E=n.default.useContext(q),[D,O]=(0,n.useState)(n.default.useMemo(()=>{if(e.type!==`group`||!E)return!1;let t=e=>!!e?.some(e=>e.id===E||e.type===`group`&&t(e.children));return t(e.children)},[e,E])?!0:w??!(T>=8));if(!a(e.visible)||e.requiredPermissions?.length&&!c(e.requiredPermissions))return null;let k=e.requiresObject,A=e.requiresService;if(k&&!l(`object`,k)||A&&!l(`service`,A))return null;if(e.type===`separator`)return(0,o.jsx)(r.Separator,{className:`my-2`});if(e.type===`group`){let n=(e.children??[]).slice().sort((e,t)=>(e.order??0)-(t.order??0)),s=F(e,m,y,h,g,_,v);return(0,o.jsx)(r.Collapsible,{open:D,onOpenChange:O,children:(0,o.jsxs)(r.SidebarGroup,{children:[(0,o.jsx)(r.SidebarGroupLabel,{asChild:!0,children:(0,o.jsxs)(r.CollapsibleTrigger,{className:(0,r.cn)(`flex w-full items-center justify-between`,x&&`min-h-[44px] text-[15px] rounded-xl`),children:[s,(0,o.jsx)(i.ChevronRight,{className:(0,r.cn)(`ml-auto transition-transform`,x?`h-5 w-5`:`h-4 w-4`,D&&`rotate-90`)})]})}),(0,o.jsx)(r.CollapsibleContent,{children:(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:n.map(e=>(0,o.jsx)(Y,{item:e,basePath:t,evalVis:a,checkPerm:c,checkCap:l,onAction:u,enablePinning:d,onPinToggle:f,resolveObjectLabel:m,resolveDashboardLabel:h,resolveGroupLabel:g,resolveViewLabel:_,resolveItemLabel:v,t:y,templateContext:b},e.id))})})})]})})}if(e.type===`action`){let n=N(e.icon),a=P(e.label,y);return(0,o.jsxs)(r.SidebarMenuItem,{children:[p&&(0,o.jsx)(`span`,{className:`absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground`,"aria-label":y?y(`console.nav.dragToReorder`,{defaultValue:`Drag to reorder`}):`Drag to reorder`,...p,children:(0,o.jsx)(i.GripVertical,{className:`h-3.5 w-3.5`})}),(0,o.jsxs)(r.SidebarMenuButton,{tooltip:a,onClick:()=>u?.(e),className:S,children:[(0,o.jsx)(n,{className:C}),(0,o.jsx)(`span`,{children:a}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant??`default`,className:`ml-auto text-[10px] px-1.5 py-0`,children:e.badge})]}),d&&f&&(0,o.jsx)(r.SidebarMenuAction,{showOnHover:!0,onClick:()=>f(e.id,!e.pinned,e,t),"aria-label":y?y(e.pinned?`console.nav.unpinItem`:`console.nav.pinItem`,{defaultValue:e.pinned?`Unpin ${a}`:`Pin ${a}`,name:a}):e.pinned?`Unpin ${a}`:`Pin ${a}`,children:e.pinned?(0,o.jsx)(i.PinOff,{className:`h-3.5 w-3.5`}):(0,o.jsx)(i.Pin,{className:`h-3.5 w-3.5`})})]})}let j=N(e.icon),{href:M,external:I}=V(e,t,b),L=E!==null&&e.id===E,R=F(e,m,y,h,g,_,v),z=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(j,{className:C}),(0,o.jsx)(`span`,{children:R}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant??`default`,className:`ml-auto text-[10px] px-1.5 py-0`,children:e.badge})]});return(0,o.jsxs)(r.SidebarMenuItem,{children:[p&&(0,o.jsx)(`span`,{className:`absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground`,"aria-label":y?y(`console.nav.dragToReorder`,{defaultValue:`Drag to reorder`}):`Drag to reorder`,...p,children:(0,o.jsx)(i.GripVertical,{className:`h-3.5 w-3.5`})}),(0,o.jsx)(r.SidebarMenuButton,{asChild:!0,isActive:L,tooltip:R,className:S,children:I?(0,o.jsx)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,children:z}):(0,o.jsx)(s.Link,{to:M,children:z})}),d&&f&&(0,o.jsx)(r.SidebarMenuAction,{showOnHover:!0,onClick:()=>f(e.id,!e.pinned,e,t),"aria-label":y?y(e.pinned?`console.nav.unpinItem`:`console.nav.pinItem`,{defaultValue:e.pinned?`Unpin ${R}`:`Pin ${R}`,name:R}):e.pinned?`Unpin ${R}`:`Pin ${R}`,children:e.pinned?(0,o.jsx)(i.PinOff,{className:`h-3.5 w-3.5`}):(0,o.jsx)(i.Pin,{className:`h-3.5 w-3.5`})})]})}function X({items:e,basePath:t=``,evaluateVisibility:a=I,checkPermission:u=L,checkCapability:d=R,onAction:f,searchQuery:p,enablePinning:m,onPinToggle:h,enableReorder:g,onReorder:_,resolveObjectLabel:v,resolveDashboardLabel:y,resolveGroupLabel:b,resolveViewLabel:x,resolveItemLabel:S,t:C,templateContext:w}){let T=(0,s.useLocation)(),E=(0,n.useMemo)(()=>K(e,T.pathname,T.search,t,w)?.id??null,[e,T.pathname,T.search,t,w]),D=(0,n.useMemo)(()=>p?J(e,p):e,[e,p]),O=(0,n.useMemo)(()=>Z(D),[D]),k=D.slice().sort((e,t)=>(e.order??0)-(t.order??0)),A=(0,c.useSensors)((0,c.useSensor)(c.PointerSensor,{activationConstraint:{distance:ae}}),(0,c.useSensor)(c.KeyboardSensor)),j=e=>{let{active:t,over:n}=e;if(!n||t.id===n.id||!_)return;let r=k.findIndex(e=>e.id===t.id),i=k.findIndex(e=>e.id===n.id);r===-1||i===-1||_((0,l.arrayMove)(k,r,i).map((e,t)=>({...e,order:t})))},M={basePath:t,evalVis:a,checkPerm:u,checkCap:d,onAction:f,enablePinning:m,onPinToggle:h,resolveObjectLabel:v,resolveDashboardLabel:y,resolveGroupLabel:b,resolveViewLabel:x,resolveItemLabel:S,t:C,templateContext:w},N=k.some(e=>e.type===`group`),P=O.length>0&&m?(0,o.jsxs)(r.SidebarGroup,{children:[(0,o.jsxs)(r.SidebarGroupLabel,{className:`flex items-center gap-1.5`,children:[(0,o.jsx)(i.Star,{className:`h-3.5 w-3.5`}),C?C(`console.nav.favorites`,{defaultValue:`Favorites`}):`Favorites`]}),(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:O.map(e=>(0,o.jsx)(Y,{item:e,...M},`fav-${e.id}`))})})]}):null;if(!N){let e=k.filter(e=>e.type!==`group`).map(e=>e.id),t=g?(0,o.jsx)(c.DndContext,{sensors:A,collisionDetection:c.closestCenter,onDragEnd:j,children:(0,o.jsx)(l.SortableContext,{items:e,strategy:l.verticalListSortingStrategy,children:(0,o.jsx)(r.SidebarMenu,{children:k.map(e=>(0,o.jsx)(oe,{item:e,enableReorder:g,...M},e.id))})})}):(0,o.jsx)(r.SidebarMenu,{children:k.map(e=>(0,o.jsx)(Y,{item:e,...M},e.id))});return(0,o.jsxs)(q.Provider,{value:E,children:[P,(0,o.jsx)(r.SidebarGroup,{children:(0,o.jsx)(r.SidebarGroupContent,{children:t})})]})}let F=[],z=[],B=e=>{if(z.length===0)return;let t=z;z=[],F.push((0,o.jsx)(r.SidebarGroup,{children:(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:t.map(e=>(0,o.jsx)(Y,{item:e,...M},e.id))})})},e))};return k.forEach((e,t)=>{e.type===`group`?(B(`leaf-${t}`),F.push((0,o.jsx)(Y,{item:e,...M},e.id))):z.push(e)}),B(`leaf-end`),(0,o.jsxs)(q.Provider,{value:E,children:[P,F]})}function Z(e){let t=[];for(let n of e)n.pinned&&n.type!==`group`&&n.type!==`separator`&&t.push(n),n.children?.length&&t.push(...Z(n.children));return t}function se({areas:e,activeAreaId:t,onAreaChange:n,evalVis:a,checkPerm:s}){let c=e.filter(e=>!(!a(e.visible)||e.requiredPermissions?.length&&!s(e.requiredPermissions)));return c.length<=1?null:(0,o.jsxs)(r.SidebarGroup,{children:[(0,o.jsxs)(r.SidebarGroupLabel,{className:`flex items-center gap-1.5`,children:[(0,o.jsx)(i.Layers,{className:`h-3.5 w-3.5`}),`Area`]}),(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:c.map(e=>{let i=N(e.icon);return(0,o.jsx)(r.SidebarMenuItem,{children:(0,o.jsxs)(r.SidebarMenuButton,{isActive:e.id===t,tooltip:P(e.label),onClick:()=>n(e.id),children:[(0,o.jsx)(i,{className:`h-4 w-4`}),(0,o.jsx)(`span`,{children:P(e.label)})]})},e.id)})})})]})}function ce({items:e,basePath:t}){let n=(0,s.useLocation)(),r=e=>{let t=[];for(let n of e)n.type!==`separator`&&(n.type===`group`?t.push(...r(n.children||[])):t.push(n));return t},i=r(e).slice(0,5);return i.length===0?null:(0,o.jsx)(`div`,{className:`fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background/95 backdrop-blur-sm px-2 py-1 sm:hidden safe-area-bottom`,role:`navigation`,"aria-label":`Mobile navigation`,children:i.map(e=>{let r=N(e.icon),i=`#`;if(e.type===`object`)i=`${t}/${e.objectName}`,e.viewName&&(i+=`/view/${e.viewName}`);else if(e.type===`dashboard`)i=e.dashboardName?`${t}/dashboard/${e.dashboardName}`:`#`;else if(e.type===`page`)i=e.pageName?`${t}/page/${e.pageName}`:`#`;else if(e.type===`report`)i=e.reportName?`${t}/report/${e.reportName}`:`#`;else if(e.type===`url`)i=e.url??`#`;else if(e.type===`component`){let n=e.componentRef;if(n){i=`${t}/component/${n.split(`:`).filter(Boolean).join(`/`)}`;let r=e.params;if(r){let e=new URLSearchParams;for(let[t,n]of Object.entries(r))n!=null&&e.set(t,typeof n==`string`?n:JSON.stringify(n));let t=e.toString();t&&(i+=`?${t}`)}}}let a=i!==`#`&&n.pathname.startsWith(i);return(0,o.jsxs)(s.Link,{to:i,className:`flex flex-col items-center gap-0.5 px-2 py-1.5 transition-colors min-w-[44px] min-h-[44px] justify-center ${a?`text-primary`:`text-muted-foreground hover:text-foreground`}`,children:[(0,o.jsx)(r,{className:`h-5 w-5`}),(0,o.jsx)(`span`,{className:`text-[10px] truncate max-w-[60px]`,children:P(e.label)})]},e.id)})})}function le({schema:e,basePath:t,evalVis:i,checkPerm:a,checkCap:s,onAction:c,sidebarHeader:l,sidebarFooter:u,sidebarExtra:d,activeAreaId:f,setActiveAreaId:p,resolvedNavigation:m,enableSearch:h,enablePinning:g,onPinToggle:_,enableReorder:v,onReorder:y}){let b=N(e.logo),x=e.areas??[],[S,C]=(0,n.useState)(``);return(0,o.jsxs)(r.Sidebar,{collapsible:`icon`,children:[(0,o.jsxs)(r.SidebarHeader,{children:[l??(0,o.jsx)(r.SidebarMenu,{children:(0,o.jsx)(r.SidebarMenuItem,{children:(0,o.jsxs)(r.SidebarMenuButton,{size:`lg`,tooltip:e.title??e.name,children:[(0,o.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground`,children:e.logo&&e.logo.startsWith(`http`)?(0,o.jsx)(`img`,{src:e.logo,alt:e.title??``,className:`size-6 object-contain`}):(0,o.jsx)(b,{className:`size-4`})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-semibold`,children:e.title??e.name??`App`}),e.description&&(0,o.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.description})]})]})})}),h&&(0,o.jsx)(r.SidebarInput,{placeholder:`Search navigation…`,value:S,onChange:e=>C(e.target.value),"aria-label":`Search navigation`})]}),(0,o.jsxs)(r.SidebarContent,{children:[x.length>1&&f&&(0,o.jsx)(se,{areas:x,activeAreaId:f,onAreaChange:p,evalVis:i,checkPerm:a}),(0,o.jsx)(X,{items:m,basePath:t,evaluateVisibility:i,checkPermission:a,checkCapability:s,onAction:c,searchQuery:S,enablePinning:g,onPinToggle:_,enableReorder:v,onReorder:y}),d]}),u&&(0,o.jsx)(r.SidebarFooter,{children:u})]})}function Q({schema:e,basePath:t=``,mobileNavMode:r=`drawer`,evaluateVisibility:i,checkPermission:a,checkCapability:s,onAction:c,navbar:l,sidebarHeader:u,sidebarFooter:f,sidebarExtra:p,children:m,className:h,defaultOpen:g=!0,enableSearch:_,enablePinning:v,onPinToggle:y,enableReorder:b,onReorder:x}){let S=i??(e=>!(e===!1||e===`false`)),C=a??(()=>!0),w=s??(()=>!0),T=(0,n.useMemo)(()=>(e.menu??[]).map((e,t)=>(0,d.menuItemToNavigationItem)(e,t)),[e.menu]),E=e.navigation??T,O=e.areas??[],[k,A]=(0,n.useState)(()=>O.length>0?O[0].id:null),j=O.map(e=>e.id).join(`,`);(0,n.useEffect)(()=>{O.length>0?A(e=>O.some(t=>t.id===e)?e:O[0].id):A(null)},[e.name,j]);let M=O.find(e=>e.id===k)?.navigation??E,N={title:e.title,favicon:e.favicon,logo:e.logo};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(D,{sidebar:(0,o.jsx)(le,{schema:e,basePath:t,evalVis:S,checkPerm:C,checkCap:w,onAction:c,sidebarHeader:u,sidebarFooter:f,sidebarExtra:p,activeAreaId:k,setActiveAreaId:A,resolvedNavigation:M,enableSearch:_,enablePinning:v,onPinToggle:y,enableReorder:b,onReorder:x}),navbar:l,className:h,defaultOpen:g,branding:N,children:m}),r===`bottom_nav`&&(0,o.jsx)(ce,{items:M,basePath:t})]})}var ue=e=>e?Array.isArray(e)?e:[e]:[];function de({schema:e,className:t,style:n,id:i,...s}){let c=ue(e.children);return(0,o.jsxs)(`div`,{id:i||e.id,className:(0,r.cn)(`flex flex-col h-full space-y-4`,t),style:n,children:[(0,o.jsx)(x,{title:e.title,description:e.description}),(0,o.jsx)(`div`,{className:`flex-1 overflow-auto`,children:c.map((e,t)=>(0,o.jsx)(a.SchemaRenderer,{schema:e,...s},e?.id||t))})]})}function fe(e){return`items`in e&&!(`href`in e)}function pe({item:e,pathname:t}){return e.children&&e.children.length>0?(0,o.jsx)(r.Collapsible,{asChild:!0,defaultOpen:!0,className:`group/collapsible`,children:(0,o.jsxs)(r.SidebarMenuItem,{children:[(0,o.jsx)(r.CollapsibleTrigger,{asChild:!0,children:(0,o.jsxs)(r.SidebarMenuButton,{tooltip:e.title,className:`motion-safe:transition-colors motion-safe:duration-150`,children:[e.icon&&(0,o.jsx)(e.icon,{}),(0,o.jsx)(`span`,{children:e.title}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant||`default`,className:`ml-auto mr-1 h-5 min-w-5 px-1 text-xs`,children:e.badge}),(0,o.jsx)(i.ChevronRight,{className:`ml-auto h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`})]})}),(0,o.jsx)(r.CollapsibleContent,{className:`motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:slide-out-to-top-1 motion-safe:data-[state=open]:slide-in-from-top-1 motion-safe:duration-150`,children:(0,o.jsx)(r.SidebarMenuSub,{children:e.children.map(e=>(0,o.jsx)(r.SidebarMenuSubItem,{children:(0,o.jsx)(r.SidebarMenuSubButton,{asChild:!0,isActive:t===e.href,className:`motion-safe:transition-colors motion-safe:duration-150`,children:(0,o.jsxs)(s.NavLink,{to:e.href,children:[e.icon&&(0,o.jsx)(e.icon,{}),(0,o.jsx)(`span`,{children:e.title}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant||`default`,className:`ml-auto h-5 min-w-5 px-1 text-xs`,children:e.badge})]})})},e.href))})})]})}):(0,o.jsx)(r.SidebarMenuItem,{children:(0,o.jsx)(r.SidebarMenuButton,{asChild:!0,isActive:t===e.href,tooltip:e.title,className:`motion-safe:transition-colors motion-safe:duration-150`,children:(0,o.jsxs)(s.NavLink,{to:e.href,children:[e.icon&&(0,o.jsx)(e.icon,{}),(0,o.jsx)(`span`,{children:e.title}),e.badge!=null&&(0,o.jsx)(r.Badge,{variant:e.badgeVariant||`default`,className:`ml-auto h-5 min-w-5 px-1 text-xs`,children:e.badge})]})})})}function me({items:e,title:t=`Application`,className:a,collapsible:c=`icon`,searchEnabled:l=!1,searchPlaceholder:u=`Search…`}){let d=(0,s.useLocation)(),[f,p]=n.default.useState(``),m=n.default.useMemo(()=>e.length===0?[]:fe(e[0])?e.map(e=>({groupLabel:e.label,items:e.items})):[{items:e}],[e]),h=n.default.useMemo(()=>{if(!f)return m;let e=f.toLowerCase();return m.map(t=>({...t,items:t.items.filter(t=>t.title.toLowerCase().includes(e)||t.children?.some(t=>t.title.toLowerCase().includes(e)))})).filter(e=>e.items.length>0)},[m,f]);return(0,o.jsx)(r.Sidebar,{className:a,collapsible:c,children:(0,o.jsxs)(r.SidebarContent,{children:[l&&(0,o.jsx)(`div`,{className:`px-3 py-2`,children:(0,o.jsxs)(`div`,{className:`relative`,children:[(0,o.jsx)(i.Search,{className:`absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground`}),(0,o.jsx)(r.Input,{type:`search`,placeholder:u,value:f,onChange:e=>p(e.target.value),className:`pl-8 h-9`})]})}),h.map((e,n)=>(0,o.jsxs)(r.SidebarGroup,{children:[n>0&&(0,o.jsx)(`div`,{className:`mx-3 mb-1 h-px bg-sidebar-border/60`,"aria-hidden":!0}),(0,o.jsx)(r.SidebarGroupLabel,{className:`text-[10px] font-semibold uppercase tracking-wider text-sidebar-foreground/60`,children:e.groupLabel||t}),(0,o.jsx)(r.SidebarGroupContent,{children:(0,o.jsx)(r.SidebarMenu,{children:e.items.map(e=>(0,o.jsx)(pe,{item:e,pathname:d.pathname},e.href))})})]},e.groupLabel||n))]})})}function $(){t.ComponentRegistry.register(`page-header`,x,{namespace:`layout`,label:`Page Header`,category:`Layout`,inputs:[{name:`title`,type:`string`},{name:`description`,type:`string`}]}),t.ComponentRegistry.register(`page:card`,O,{namespace:`layout`,skipFallback:!0,label:`Page Card`,category:`Layout`,isContainer:!0}),t.ComponentRegistry.register(`app-shell`,D,{namespace:`layout`,label:`App Shell`,category:`Layout`}),t.ComponentRegistry.register(`responsive-grid`,M,{namespace:`layout`,label:`Responsive Grid`,category:`Layout`,isContainer:!0,inputs:[{name:`columns`,type:`object`},{name:`gap`,type:`number`}]}),t.ComponentRegistry.register(`navigation-renderer`,X,{namespace:`layout`,label:`Navigation Renderer`,category:`Layout`,inputs:[{name:`items`,type:`object`},{name:`basePath`,type:`string`}]}),t.ComponentRegistry.register(`app-schema-renderer`,Q,{namespace:`layout`,label:`App Schema Renderer`,category:`Layout`,isContainer:!0,inputs:[{name:`schema`,type:`object`},{name:`basePath`,type:`string`},{name:`mobileNavMode`,type:`string`}]})}try{$()}catch{}e.AppSchemaRenderer=Q,e.AppShell=D,e.NavigationRenderer=X,e.Page=de,e.PageCard=O,e.PageHeader=x,e.ResponsiveGrid=M,e.SidebarNav=me,e.filterNavigationItems=J,e.registerLayout=$,e.resolveActiveNavItem=K,e.resolveHref=V,e.resolveIcon=N,e.resolveLabel=P,e.useAppShellBranding=E});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/layout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.umd.cjs",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"@dnd-kit/utilities": "^3.2.2",
|
|
20
20
|
"clsx": "^2.1.1",
|
|
21
21
|
"lucide-react": "^1.25.0",
|
|
22
|
-
"react": "19.2.
|
|
23
|
-
"react-dom": "19.2.
|
|
22
|
+
"react": "19.2.8",
|
|
23
|
+
"react-dom": "19.2.8",
|
|
24
24
|
"tailwind-merge": "^3.6.0",
|
|
25
|
-
"@object-ui/components": "
|
|
26
|
-
"@object-ui/core": "
|
|
27
|
-
"@object-ui/react": "
|
|
28
|
-
"@object-ui/types": "
|
|
25
|
+
"@object-ui/components": "17.1.0",
|
|
26
|
+
"@object-ui/core": "17.1.0",
|
|
27
|
+
"@object-ui/react": "17.1.0",
|
|
28
|
+
"@object-ui/types": "17.1.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@vitejs/plugin-react": "^6.0.
|
|
36
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
37
37
|
"react-router-dom": "^7.18.1",
|
|
38
38
|
"vite": "^8.1.5",
|
|
39
39
|
"vite-plugin-dts": "^5.0.3"
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "vite build",
|
|
78
|
+
"type-check": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
78
79
|
"lint": "eslint ."
|
|
79
80
|
}
|
|
80
81
|
}
|