adminizer 4.2.0-build.71 → 4.2.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.
@@ -1 +1 @@
1
- import{c as p,q as i,j as m}from"./app.js";import{A as s}from"./app-layout-DecN527i.js";import e from"./add-form-u6CCTy3n.js";import"./app-shell-DHzMWA1L.js";import"./app-sidebar-4JFP8UdU.js";import"./nav-main-BUp9qA8R.js";import"./material-icon-DsiW0iQG.js";import"./app-sidebar-header-CIKLfLsF.js";import"./breadcrumbs-Bo2z-LNC.js";import"./nav-user-DeF3SDRj.js";import"./user-info-CAgkqARx.js";import"./user-menu-content-BxL0QMC9.js";import"./theme-switcher-D8T9NgWG.js";import"./use-appearance-CXP5cHaQ.js";import"./icon-C_X2cQ6W.js";import"./field-renderer-CFBp-IrC.js";import"./dynamic-controls-CSVVCONh.js";import"./multi-select-BbKSrMw2.js";import"./form-state-702tb_BV.js";import"./input-error-Bab-HPbn.js";const a=[];function v(){const t=p.c(2),r=i();let o;return t[0]!==r?(o=m.jsx(s,{breadcrumbs:a,children:m.jsx(e,{page:r,catalog:!1})}),t[0]=r,t[1]=o):o=t[1],o}export{v as default};
1
+ import{c as p,q as i,j as m}from"./app.js";import{A as s}from"./app-layout-DecN527i.js";import e from"./add-form-BjackXJe.js";import"./app-shell-DHzMWA1L.js";import"./app-sidebar-4JFP8UdU.js";import"./nav-main-BUp9qA8R.js";import"./material-icon-DsiW0iQG.js";import"./app-sidebar-header-CIKLfLsF.js";import"./breadcrumbs-Bo2z-LNC.js";import"./nav-user-DeF3SDRj.js";import"./user-info-CAgkqARx.js";import"./user-menu-content-BxL0QMC9.js";import"./theme-switcher-D8T9NgWG.js";import"./use-appearance-CXP5cHaQ.js";import"./icon-C_X2cQ6W.js";import"./field-renderer-BHo944Cn.js";import"./dynamic-controls-CSVVCONh.js";import"./multi-select-BbKSrMw2.js";import"./form-state-702tb_BV.js";import"./input-error-Bab-HPbn.js";const a=[];function v(){const t=p.c(2),r=i();let o;return t[0]!==r?(o=m.jsx(s,{breadcrumbs:a,children:m.jsx(e,{page:r,catalog:!1})}),t[0]=r,t[1]=o):o=t[1],o}export{v as default};
@@ -1 +1 @@
1
- import{r as f,c as L,j as t,a as O,R as A,U as M,V as P,aH as D,W as U,a1 as J,B as E,$ as G,aG as H,L as R,d as q,h as K,o as Q}from"./app.js";import{Icon as V}from"./icon-C_X2cQ6W.js";import{F as z}from"./field-renderer-CFBp-IrC.js";import{r as S,h as $,g as k}from"./form-state-702tb_BV.js";import T from"./input-error-Bab-HPbn.js";import"./dynamic-controls-CSVVCONh.js";import"./multi-select-BbKSrMw2.js";var F=new Map,C=new WeakMap,B=0,W=void 0;function X(s){return s?(C.has(s)||(B+=1,C.set(s,B.toString())),C.get(s)):"0"}function Y(s){return Object.keys(s).sort().filter(e=>s[e]!==void 0).map(e=>`${e}_${e==="root"?X(s.root):s[e]}`).toString()}function Z(s){const e=Y(s);let n=F.get(e);if(!n){const c=new Map;let l;const i=new IntersectionObserver(o=>{o.forEach(a=>{var d;const m=a.isIntersecting&&l.some(u=>a.intersectionRatio>=u);s.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=m),(d=c.get(a.target))==null||d.forEach(u=>{u(m,a)})})},s);l=i.thresholds||(Array.isArray(s.threshold)?s.threshold:[s.threshold||0]),n={id:e,observer:i,elements:c},F.set(e,n)}return n}function _(s,e,n={},c=W){if(typeof window.IntersectionObserver>"u"&&c!==void 0){const d=s.getBoundingClientRect();return e(c,{isIntersecting:c,target:s,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:d,intersectionRect:d,rootBounds:d}),()=>{}}const{id:l,observer:i,elements:o}=Z(n),a=o.get(s)||[];return o.has(s)||o.set(s,a),a.push(e),i.observe(s),function(){a.splice(a.indexOf(e),1),a.length===0&&(o.delete(s),i.unobserve(s)),o.size===0&&(i.disconnect(),F.delete(l))}}function ee({threshold:s,delay:e,trackVisibility:n,rootMargin:c,root:l,triggerOnce:i,skip:o,initialInView:a,fallbackInView:d,onChange:m}={}){var u;const[p,j]=f.useState(null),h=f.useRef(m),[x,N]=f.useState({inView:!!a,entry:void 0});h.current=m,f.useEffect(()=>{if(o||!p)return;let b;return b=_(p,(r,g)=>{N({inView:r,entry:g}),h.current&&h.current(r,g),g.isIntersecting&&i&&b&&(b(),b=void 0)},{root:l,rootMargin:c,threshold:s,trackVisibility:n,delay:e},d),()=>{b&&b()}},[Array.isArray(s)?s.toString():s,p,l,c,i,o,n,d,e]);const w=(u=x.entry)==null?void 0:u.target,y=f.useRef(void 0);!p&&w&&!i&&!o&&y.current!==w&&(y.current=w,N({inView:!!a,entry:void 0}));const v=[j,x.inView,x.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const I=f.memo(s=>{const e=L.c(8),{field:n}=s,c=`${n.type}-${n.name}`;let l;e[0]!==n.label||e[1]!==c?(l=t.jsx(O,{htmlFor:c,children:n.label}),e[0]=n.label,e[1]=c,e[2]=l):l=e[2];let i;e[3]!==n.tooltip?(i=n.tooltip&&t.jsx(A,{children:t.jsxs(M,{children:[t.jsx(P,{onClick:te,children:t.jsx(V,{iconNode:D,className:"text-primary w-5 h-5 cursor-pointer"})}),t.jsx(U,{align:"center",side:"top",className:"z-[1002]",children:t.jsx("p",{children:n.tooltip})})]})}),e[3]=n.tooltip,e[4]=i):i=e[4];let o;return e[5]!==l||e[6]!==i?(o=t.jsxs("div",{className:"flex gap-3",children:[l,i]}),e[5]=l,e[6]=i,e[7]=o):o=e[7],o}),se=f.memo(s=>{const e=L.c(12),{field:n,value:c,onChange:l,processing:i,notFound:o,search:a}=s;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={triggerOnce:!0,rootMargin:"100px 0px"},e[0]=d):d=e[0];const[m,u]=ee(d);let p;e[1]!==n||e[2]!==u||e[3]!==o||e[4]!==l||e[5]!==i||e[6]!==a||e[7]!==c?(p=u?t.jsx(z,{field:n,value:c,onChange:l,notFound:o,search:a,processing:i}):t.jsx(Q,{className:"w-full h-[250px] rounded-sm"}),e[1]=n,e[2]=u,e[3]=o,e[4]=l,e[5]=i,e[6]=a,e[7]=c,e[8]=p):p=e[8];let j;return e[9]!==m||e[10]!==p?(j=t.jsx("div",{ref:m,className:"grid gap-4 w-full",children:p}),e[9]=m,e[10]=p,e[11]=j):j=e[11],j}),de=({page:s,catalog:e,callback:n,openNewWindow:c,openNewWindowLabel:l,isNavigation:i})=>{const{fields:o,btnBack:a,view:d,notFound:m}=s.props,{data:u,setData:p,post:j,processing:h}=J({...Object.fromEntries(o.map(r=>[r.name,r.value??void 0])),jsonPopupCatalog:e}),[x,N]=f.useState(!1),[w,y]=f.useState(c??!1);f.useEffect(()=>(y(c??!1),S(),p({...Object.fromEntries(o.map(r=>[r.name,r.value??void 0])),jsonPopupCatalog:e}),()=>S()),[o,e,c]);const v=f.useCallback((r,g)=>{p(r,g)},[]),b=async r=>{if(r.preventDefault(),e){N(!0);const g=await K.post(s.props.postLink,u);g.status===200&&n&&(i?n(g.data.record,w):n(g.data.record))}else j(s.props.postLink)};return t.jsxs("div",{className:"p-4 w-full",children:[!e&&t.jsxs("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4",children:[t.jsx(E,{className:"w-fit",asChild:!0,children:t.jsxs(G,{href:a.link,preserveScroll:!0,children:[t.jsx(V,{iconNode:H}),a.title]})}),t.jsxs(E,{variant:"green",type:"submit",className:"w-fit lg:hidden",form:"addUserForm",disabled:x||h||s.props.view||$(),children:[x||h&&t.jsx(R,{className:"h-4 w-4 animate-spin"}),s.props.btnSave.title]})]}),t.jsx("form",{id:"addUserForm",onSubmit:b,className:d?"cursor-not-allowed":"",children:t.jsxs("div",{className:`grid lg:grid-cols-[1fr_150px] gap-4 max-w-[1144px] pb-8 ${e?"lg:grid-cols-[1fr_200px]":"lg:grid-cols-[1fr_150px]"}`,children:[t.jsx("div",{className:"flex flex-col gap-10",children:o.map(r=>t.jsx("div",{className:`grid gap-4 w-full ${d?"pointer-events-none":""}`,children:r.type==="markdown"||r.type==="table"||r.type==="jsonEditor"||r.type==="codeEditor"||r.type==="geoJson"?t.jsxs(t.Fragment,{children:[t.jsx(I,{field:r}),t.jsx(T,{message:k(`${r.type}-${r.name}`)}),t.jsx(se,{field:r,value:u[r.name],onChange:v,processing:x||h||d,notFound:m,search:s.props.search})]}):t.jsxs(t.Fragment,{children:[t.jsx(I,{field:r}),t.jsx(T,{message:k(`${r.type}-${r.name}`)}),t.jsx(z,{field:r,value:u[r.name],onChange:v,processing:x||h||d,notFound:m,search:s.props.search})]})},r.name))}),t.jsxs("div",{className:`p-4 rounded-md h-fit sticky shadow ${e?"top-0 grid gap-4":"top-[84px] hidden lg:block"}`,children:[i&&t.jsxs("div",{className:"flex gap-4 items-center",children:[t.jsx(q,{id:"targetBlank",checked:w,onCheckedChange:r=>y(!!r),className:"cursor-pointer size-5"}),t.jsx(O,{htmlFor:"targetBlank",children:l})]}),t.jsxs(E,{variant:"green",type:"submit",className:"w-fit",disabled:x||h||s.props.view||$(),children:[(x||h)&&t.jsx(R,{className:"h-4 w-4 animate-spin"}),s.props.btnSave.title]})]})]})})]})};function te(s){return s.preventDefault()}export{I as LabelRenderer,se as LazyField,de as default};
1
+ import{r as f,c as L,j as t,a as O,R as A,U as M,V as P,aH as D,W as U,a1 as J,B as E,$ as G,aG as H,L as R,d as q,h as K,o as Q}from"./app.js";import{Icon as V}from"./icon-C_X2cQ6W.js";import{F as z}from"./field-renderer-BHo944Cn.js";import{r as S,h as $,g as k}from"./form-state-702tb_BV.js";import T from"./input-error-Bab-HPbn.js";import"./dynamic-controls-CSVVCONh.js";import"./multi-select-BbKSrMw2.js";var F=new Map,C=new WeakMap,B=0,W=void 0;function X(s){return s?(C.has(s)||(B+=1,C.set(s,B.toString())),C.get(s)):"0"}function Y(s){return Object.keys(s).sort().filter(e=>s[e]!==void 0).map(e=>`${e}_${e==="root"?X(s.root):s[e]}`).toString()}function Z(s){const e=Y(s);let n=F.get(e);if(!n){const c=new Map;let l;const i=new IntersectionObserver(o=>{o.forEach(a=>{var d;const m=a.isIntersecting&&l.some(u=>a.intersectionRatio>=u);s.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=m),(d=c.get(a.target))==null||d.forEach(u=>{u(m,a)})})},s);l=i.thresholds||(Array.isArray(s.threshold)?s.threshold:[s.threshold||0]),n={id:e,observer:i,elements:c},F.set(e,n)}return n}function _(s,e,n={},c=W){if(typeof window.IntersectionObserver>"u"&&c!==void 0){const d=s.getBoundingClientRect();return e(c,{isIntersecting:c,target:s,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:d,intersectionRect:d,rootBounds:d}),()=>{}}const{id:l,observer:i,elements:o}=Z(n),a=o.get(s)||[];return o.has(s)||o.set(s,a),a.push(e),i.observe(s),function(){a.splice(a.indexOf(e),1),a.length===0&&(o.delete(s),i.unobserve(s)),o.size===0&&(i.disconnect(),F.delete(l))}}function ee({threshold:s,delay:e,trackVisibility:n,rootMargin:c,root:l,triggerOnce:i,skip:o,initialInView:a,fallbackInView:d,onChange:m}={}){var u;const[p,j]=f.useState(null),h=f.useRef(m),[x,N]=f.useState({inView:!!a,entry:void 0});h.current=m,f.useEffect(()=>{if(o||!p)return;let b;return b=_(p,(r,g)=>{N({inView:r,entry:g}),h.current&&h.current(r,g),g.isIntersecting&&i&&b&&(b(),b=void 0)},{root:l,rootMargin:c,threshold:s,trackVisibility:n,delay:e},d),()=>{b&&b()}},[Array.isArray(s)?s.toString():s,p,l,c,i,o,n,d,e]);const w=(u=x.entry)==null?void 0:u.target,y=f.useRef(void 0);!p&&w&&!i&&!o&&y.current!==w&&(y.current=w,N({inView:!!a,entry:void 0}));const v=[j,x.inView,x.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const I=f.memo(s=>{const e=L.c(8),{field:n}=s,c=`${n.type}-${n.name}`;let l;e[0]!==n.label||e[1]!==c?(l=t.jsx(O,{htmlFor:c,children:n.label}),e[0]=n.label,e[1]=c,e[2]=l):l=e[2];let i;e[3]!==n.tooltip?(i=n.tooltip&&t.jsx(A,{children:t.jsxs(M,{children:[t.jsx(P,{onClick:te,children:t.jsx(V,{iconNode:D,className:"text-primary w-5 h-5 cursor-pointer"})}),t.jsx(U,{align:"center",side:"top",className:"z-[1002]",children:t.jsx("p",{children:n.tooltip})})]})}),e[3]=n.tooltip,e[4]=i):i=e[4];let o;return e[5]!==l||e[6]!==i?(o=t.jsxs("div",{className:"flex gap-3",children:[l,i]}),e[5]=l,e[6]=i,e[7]=o):o=e[7],o}),se=f.memo(s=>{const e=L.c(12),{field:n,value:c,onChange:l,processing:i,notFound:o,search:a}=s;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={triggerOnce:!0,rootMargin:"100px 0px"},e[0]=d):d=e[0];const[m,u]=ee(d);let p;e[1]!==n||e[2]!==u||e[3]!==o||e[4]!==l||e[5]!==i||e[6]!==a||e[7]!==c?(p=u?t.jsx(z,{field:n,value:c,onChange:l,notFound:o,search:a,processing:i}):t.jsx(Q,{className:"w-full h-[250px] rounded-sm"}),e[1]=n,e[2]=u,e[3]=o,e[4]=l,e[5]=i,e[6]=a,e[7]=c,e[8]=p):p=e[8];let j;return e[9]!==m||e[10]!==p?(j=t.jsx("div",{ref:m,className:"grid gap-4 w-full",children:p}),e[9]=m,e[10]=p,e[11]=j):j=e[11],j}),de=({page:s,catalog:e,callback:n,openNewWindow:c,openNewWindowLabel:l,isNavigation:i})=>{const{fields:o,btnBack:a,view:d,notFound:m}=s.props,{data:u,setData:p,post:j,processing:h}=J({...Object.fromEntries(o.map(r=>[r.name,r.value??void 0])),jsonPopupCatalog:e}),[x,N]=f.useState(!1),[w,y]=f.useState(c??!1);f.useEffect(()=>(y(c??!1),S(),p({...Object.fromEntries(o.map(r=>[r.name,r.value??void 0])),jsonPopupCatalog:e}),()=>S()),[o,e,c]);const v=f.useCallback((r,g)=>{p(r,g)},[]),b=async r=>{if(r.preventDefault(),e){N(!0);const g=await K.post(s.props.postLink,u);g.status===200&&n&&(i?n(g.data.record,w):n(g.data.record))}else j(s.props.postLink)};return t.jsxs("div",{className:"p-4 w-full",children:[!e&&t.jsxs("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4",children:[t.jsx(E,{className:"w-fit",asChild:!0,children:t.jsxs(G,{href:a.link,preserveScroll:!0,children:[t.jsx(V,{iconNode:H}),a.title]})}),t.jsxs(E,{variant:"green",type:"submit",className:"w-fit lg:hidden",form:"addUserForm",disabled:x||h||s.props.view||$(),children:[x||h&&t.jsx(R,{className:"h-4 w-4 animate-spin"}),s.props.btnSave.title]})]}),t.jsx("form",{id:"addUserForm",onSubmit:b,className:d?"cursor-not-allowed":"",children:t.jsxs("div",{className:`grid lg:grid-cols-[1fr_150px] gap-4 max-w-[1144px] pb-8 ${e?"lg:grid-cols-[1fr_200px]":"lg:grid-cols-[1fr_150px]"}`,children:[t.jsx("div",{className:"flex flex-col gap-10",children:o.map(r=>t.jsx("div",{className:`grid gap-4 w-full ${d?"pointer-events-none":""}`,children:r.type==="markdown"||r.type==="table"||r.type==="jsonEditor"||r.type==="codeEditor"||r.type==="geoJson"?t.jsxs(t.Fragment,{children:[t.jsx(I,{field:r}),t.jsx(T,{message:k(`${r.type}-${r.name}`)}),t.jsx(se,{field:r,value:u[r.name],onChange:v,processing:x||h||d,notFound:m,search:s.props.search})]}):t.jsxs(t.Fragment,{children:[t.jsx(I,{field:r}),t.jsx(T,{message:k(`${r.type}-${r.name}`)}),t.jsx(z,{field:r,value:u[r.name],onChange:v,processing:x||h||d,notFound:m,search:s.props.search})]})},r.name))}),t.jsxs("div",{className:`p-4 rounded-md h-fit sticky shadow ${e?"top-0 grid gap-4":"top-[84px] hidden lg:block"}`,children:[i&&t.jsxs("div",{className:"flex gap-4 items-center",children:[t.jsx(q,{id:"targetBlank",checked:w,onCheckedChange:r=>y(!!r),className:"cursor-pointer size-5"}),t.jsx(O,{htmlFor:"targetBlank",children:l})]}),t.jsxs(E,{variant:"green",type:"submit",className:"w-fit",disabled:x||h||s.props.view||$(),children:[(x||h)&&t.jsx(R,{className:"h-4 w-4 animate-spin"}),s.props.btnSave.title]})]})]})})]})};function te(s){return s.preventDefault()}export{I as LabelRenderer,se as LazyField,de as default};