@isardsat/editorial-admin 6.6.2 → 6.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{FilePicker-D_8_LM-x.js → FilePicker-Dd0_TkEg.js} +1 -1
- package/build/client/assets/{Loading-135S8vAs.js → Loading-BsRbgW--.js} +1 -1
- package/build/client/assets/{URLInput-D0_7cCau.js → URLInput-DAvqcRfP.js} +1 -1
- package/build/client/assets/{authSlice-DbkAmWS9.js → authSlice-tIqx9OEB.js} +1 -1
- package/build/client/assets/{button-1K9v0DJg.js → button-BGHUMWDX.js} +1 -1
- package/build/client/assets/dashboard-BgukdHmI.js +1 -0
- package/build/client/assets/{dashboard._collection-yuvHUjkD.js → dashboard._collection-C3PwVUY_.js} +1 -1
- package/build/client/assets/dashboard._collection._document-D6q5k-Kf.js +1 -0
- package/build/client/assets/dashboard._collection.new-DGIvigrJ.js +1 -0
- package/build/client/assets/{dashboard._layout-CptxApKG.js → dashboard._layout-BJ3aBcCE.js} +10 -10
- package/build/client/assets/{dashboard.files-DSuCEWNU.js → dashboard.files-NMQ4Pzxd.js} +1 -1
- package/build/client/assets/{date-picker-BM6MlSuC.js → date-picker-CSMApwxu.js} +1 -1
- package/build/client/assets/{datetime-picker-RYlN_N5T.js → datetime-picker-D57VpP_6.js} +1 -1
- package/build/client/assets/{files-DZvtTqEL.js → files-Qh5oy2Yj.js} +1 -1
- package/build/client/assets/{home-DEZ1iD3I.js → home-B4RFD4yZ.js} +1 -1
- package/build/client/assets/{index-B_LZxNEG.js → index-BDqB5AyL.js} +1 -1
- package/build/client/assets/{index-ufEogtin.js → index-Bb8pHI6J.js} +1 -1
- package/build/client/assets/{index-COYoknn5.js → index-CaJfqerH.js} +1 -1
- package/build/client/assets/{index-C4koMhA2.js → index-Ct_4ArX8.js} +1 -1
- package/build/client/assets/{index-opRxY4qB.js → index-DO7DtA1Q.js} +1 -1
- package/build/client/assets/{index-Dfe-gVs7.js → index-g23Or4wZ.js} +1 -1
- package/build/client/assets/{index-DfWKcpIl.js → index-kynsXaDO.js} +1 -1
- package/build/client/assets/{itemForm-CE-2cG5-.js → itemForm-Cg4BG9pI.js} +3 -3
- package/build/client/assets/{manifest-ef1d0485.js → manifest-bbc74605.js} +1 -1
- package/build/client/assets/{markdownEditor-EbpqJ4d2.js → markdownEditor-BRduGGxR.js} +1 -1
- package/build/client/assets/{popover--B9JRpo3.js → popover-BhUEX64-.js} +1 -1
- package/build/client/assets/{root-Dltr_VS9.js → root-BJWxWRqp.js} +1 -1
- package/build/client/assets/{types-D9rc6L8-.js → types-CBu8yk7G.js} +1 -1
- package/build/client/assets/{utils-BLOeDrX7.js → utils-C_m54IzT.js} +1 -1
- package/build/client/index.html +2 -2
- package/package.json +2 -2
- package/build/client/assets/dashboard-ChM5vL1Y.js +0 -1
- package/build/client/assets/dashboard._collection._document-MyRkrosI.js +0 -1
- package/build/client/assets/dashboard._collection.new-B8E4HzA_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,p as x,B as y}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as E,b}from"./index-
|
|
1
|
+
import{a as c,p as x,B as y}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as E,b}from"./index-DO7DtA1Q.js";import{a as w}from"./index-BJ-ODQ_I.js";function D(e,t){const n=c.createContext(t),r=i=>{const{children:u,...s}=i,a=c.useMemo(()=>s,Object.values(s));return x.jsx(n.Provider,{value:a,children:u})};r.displayName=e+"Provider";function o(i){const u=c.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function j(e,t=[]){let n=[];function r(i,u){const s=c.createContext(u),a=n.length;n=[...n,u];const f=d=>{const{scope:p,children:m,...v}=d,S=p?.[e]?.[a]||s,g=c.useMemo(()=>v,Object.values(v));return x.jsx(S.Provider,{value:g,children:m})};f.displayName=i+"Provider";function l(d,p){const m=p?.[e]?.[a]||s,v=c.useContext(m);if(v)return v;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,l]}const o=()=>{const i=n.map(u=>c.createContext(u));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,P(o,...t)]}function P(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const u=r.reduce((s,{useScope:a,scopeName:f})=>{const d=a(i)[`__scope${f}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}function L(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var N=globalThis?.document?c.useLayoutEffect:()=>{},C=y[" useInsertionEffect ".trim().toString()]||N;function W({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,u]=A({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:o;{const l=c.useRef(e!==void 0);c.useEffect(()=>{const d=l.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=s},[s,r])}const f=c.useCallback(l=>{if(s){const d=R(l)?l(e):l;d!==e&&u.current?.(d)}else i(l)},[s,e,i,u]);return[a,f]}function A({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return C(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function R(e){return typeof e=="function"}function F(e){const[t,n]=c.useState(void 0);return N(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let u,s;if("borderBoxSize"in i){const a=i.borderBoxSize,f=Array.isArray(a)?a[0]:a;u=f.inlineSize,s=f.blockSize}else u=e.offsetWidth,s=e.offsetHeight;n({width:u,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function M(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var O=e=>{const{present:t,children:n}=e,r=T(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=E(r.ref,I(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};O.displayName="Presence";function T(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),u=e?"mounted":"unmounted",[s,a]=M(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const f=h(r.current);i.current=s==="mounted"?f:"none"},[s]),N(()=>{const f=r.current,l=o.current;if(l!==e){const p=i.current,m=h(f);e?a("MOUNT"):m==="none"||f?.display==="none"?a("UNMOUNT"):a(l&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),N(()=>{if(t){let f;const l=t.ownerDocument.defaultView??window,d=m=>{const S=h(r.current).includes(m.animationName);if(m.target===t&&S&&(a("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",f=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=m=>{m.target===t&&(i.current=h(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function h(e){return e?.animationName||"none"}function I(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=U.reduce((e,t)=>{const n=b(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:u,...s}=o,a=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function B(e,t){e&&w.flushSync(()=>e.dispatchEvent(t))}export{k as P,L as a,O as b,j as c,N as d,F as e,B as f,D as g,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,p as y}from"./chunk-EF7DTUVF-CaKisB5m.js";import{
|
|
1
|
+
import{a as s,p as y}from"./chunk-EF7DTUVF-CaKisB5m.js";import{n as h}from"./utils-C_m54IzT.js";function C(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function x(...n){return t=>{let e=!1;const l=n.map(r=>{const o=C(r,t);return!e&&typeof o=="function"&&(e=!0),o});if(e)return()=>{for(let r=0;r<l.length;r++){const o=l[r];typeof o=="function"?o():C(n[r],null)}}}}function I(...n){return s.useCallback(x(...n),n)}function N(n){const t=R(n),e=s.forwardRef((l,r)=>{const{children:o,...u}=l,a=s.Children.toArray(o),f=a.find(j);if(f){const i=f.props.children,c=a.map(d=>d===f?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:d);return y.jsx(t,{...u,ref:r,children:s.isValidElement(i)?s.cloneElement(i,void 0,c):null})}return y.jsx(t,{...u,ref:r,children:o})});return e.displayName=`${n}.Slot`,e}var W=N("Slot");function R(n){const t=s.forwardRef((e,l)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const u=_(r),a=O(o,r.props);return r.type!==s.Fragment&&(a.ref=l?x(l,u):u),s.cloneElement(r,a)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var E=Symbol("radix.slottable");function k(n){const t=({children:e})=>y.jsx(y.Fragment,{children:e});return t.displayName=`${n}.Slottable`,t.__radixId=E,t}function j(n){return s.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===E}function O(n,t){const e={...t};for(const l in t){const r=n[l],o=t[l];/^on[A-Z]/.test(l)?r&&o?e[l]=(...a)=>{const f=o(...a);return r(...a),f}:r&&(e[l]=r):l==="style"?e[l]={...r,...o}:l==="className"&&(e[l]=[r,o].filter(Boolean).join(" "))}return{...n,...e}}function _(n){let t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?n.ref:(t=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?n.props.ref:n.props.ref||n.ref)}const S=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,b=h,T=(n,t)=>e=>{var l;if(t?.variants==null)return b(n,e?.class,e?.className);const{variants:r,defaultVariants:o}=t,u=Object.keys(r).map(i=>{const c=e?.[i],d=o?.[i];if(c===null)return null;const m=S(c)||S(d);return r[i][m]}),a=e&&Object.entries(e).reduce((i,c)=>{let[d,m]=c;return m===void 0||(i[d]=m),i},{}),f=t==null||(l=t.compoundVariants)===null||l===void 0?void 0:l.reduce((i,c)=>{let{class:d,className:m,...V}=c;return Object.entries(V).every(g=>{let[p,v]=g;return Array.isArray(v)?v.includes({...o,...a}[p]):{...o,...a}[p]===v})?[...i,d,m]:i},[]);return b(n,u,f,e?.class,e?.className)};export{W as S,k as a,N as b,T as c,I as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as y,a as X}from"./chunk-EF7DTUVF-CaKisB5m.js";import{a as E}from"./utils-
|
|
1
|
+
import{p as y,a as X}from"./chunk-EF7DTUVF-CaKisB5m.js";import{a as E}from"./utils-C_m54IzT.js";function ut({className:e,...o}){return y.jsx("div",{"data-slot":"table-container",className:"flex relative",children:y.jsx("div",{"data-slot":"table",className:E("flex-1 caption-bottom text-sm",e),...o})})}function at({className:e,...o}){return y.jsx("div",{"data-slot":"table-header",className:E("[&_tr]:border-b",e),...o})}function gt({className:e,...o}){return y.jsx("div",{"data-slot":"table-body",className:E("[&_tr:last-child]:border-0",e),...o})}function dt({className:e,...o}){return y.jsx("div",{"data-slot":"table-row",className:E("hover:bg-muted/50 data-[state=selected]:bg-muted transition-colors",e),...o})}function ct({className:e,...o}){return y.jsx("div",{"data-slot":"table-head",className:E("flex items-center text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}function ft({className:e,...o}){return y.jsx("div",{"data-slot":"table-cell",className:E("p-2 align-middle whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}/**
|
|
2
2
|
* table-core
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) TanStack
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,p as u}from"./chunk-EF7DTUVF-CaKisB5m.js";import{P as j,c as Q,u as Z,a as m,b as H}from"./index-
|
|
1
|
+
import{a,p as u}from"./chunk-EF7DTUVF-CaKisB5m.js";import{P as j,c as Q,u as Z,a as m,b as H}from"./index-Ct_4ArX8.js";import{u as G,a as ee}from"./index-DO7DtA1Q.js";import{u as te,e as oe,i as re}from"./index-Bb8pHI6J.js";import{c as V,R as ne,A as ae,a as se,C as ie}from"./index-BDqB5AyL.js";var le="Separator",M="horizontal",ce=["horizontal","vertical"],F=a.forwardRef((e,o)=>{const{decorative:t,orientation:r=M,...n}=e,s=ue(r)?r:M,d=t?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return u.jsx(j.div,{"data-orientation":s,...d,...n,ref:o})});F.displayName=le;function ue(e){return ce.includes(e)}var Ie=F,pe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",U=a.forwardRef((e,o)=>u.jsx(j.span,{...e,ref:o,style:{...pe,...e.style}}));U.displayName=de;var fe=U,[_,ke]=Q("Tooltip",[V]),A=V(),Y="TooltipProvider",ve=700,D="tooltip.open",[he,N]=_(Y),B=e=>{const{__scopeTooltip:o,delayDuration:t=ve,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=e,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const f=i.current;return()=>window.clearTimeout(f)},[]),u.jsx(he,{scope:o,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(f=>{d.current=f},[]),disableHoverableContent:n,children:s})};B.displayName=Y;var R="Tooltip",[xe,O]=_(R),z=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=e,i=N(R,e.__scopeTooltip),f=A(o),[c,v]=a.useState(null),h=te(),p=a.useRef(0),x=l??i.disableHoverableContent,y=d??i.delayDuration,T=a.useRef(!1),[C,g]=Z({prop:r,defaultProp:n??!1,onChange:S=>{S?(i.onOpen(),document.dispatchEvent(new CustomEvent(D))):i.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>C?T.current?"delayed-open":"instant-open":"closed",[C]),E=a.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,g(!0)},[g]),P=a.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),k=a.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,g(!0),p.current=0},y)},[y,g]);return a.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsx(ne,{...f,children:u.jsx(xe,{scope:o,contentId:h,open:C,stateAttribute:w,trigger:c,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?k():E()},[i.isOpenDelayedRef,k,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(p.current),p.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};z.displayName=R;var L="TooltipTrigger",$=a.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=O(L,t),s=N(L,t),l=A(t),d=a.useRef(null),i=G(o,d,n.onTriggerChange),f=a.useRef(!1),c=a.useRef(!1),v=a.useCallback(()=>f.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),u.jsx(ae,{asChild:!0,...l,children:u.jsx(j.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:m(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:m(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:m(e.onPointerDown,()=>{n.open&&n.onClose(),f.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:m(e.onFocus,()=>{f.current||n.onOpen()}),onBlur:m(e.onBlur,n.onClose),onClick:m(e.onClick,n.onClose)})})});$.displayName=L;var I="TooltipPortal",[Te,ye]=_(I,{forceMount:void 0}),q=e=>{const{__scopeTooltip:o,forceMount:t,children:r,container:n}=e,s=O(I,o);return u.jsx(Te,{scope:o,forceMount:t,children:u.jsx(H,{present:t||s.open,children:u.jsx(oe,{asChild:!0,container:n,children:r})})})};q.displayName=I;var b="TooltipContent",W=a.forwardRef((e,o)=>{const t=ye(b,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=e,l=O(b,e.__scopeTooltip);return u.jsx(H,{present:r||l.open,children:l.disableHoverableContent?u.jsx(X,{side:n,...s,ref:o}):u.jsx(ge,{side:n,...s,ref:o})})}),ge=a.forwardRef((e,o)=>{const t=O(b,e.__scopeTooltip),r=N(b,e.__scopeTooltip),n=a.useRef(null),s=G(o,n),[l,d]=a.useState(null),{trigger:i,onClose:f}=t,c=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),p=a.useCallback((x,y)=>{const T=x.currentTarget,C={x:x.clientX,y:x.clientY},g=we(C,T.getBoundingClientRect()),w=Ee(C,g),E=Pe(y.getBoundingClientRect()),P=Oe([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(i&&c){const x=T=>p(T,c),y=T=>p(T,i);return i.addEventListener("pointerleave",x),c.addEventListener("pointerleave",y),()=>{i.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",y)}}},[i,c,p,h]),a.useEffect(()=>{if(l){const x=y=>{const T=y.target,C={x:y.clientX,y:y.clientY},g=i?.contains(T)||c?.contains(T),w=!Re(C,l);g?h():w&&(h(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[i,c,l,f,h]),u.jsx(X,{...e,ref:s})}),[Ce,me]=_(R,{isInside:!1}),be=ee("TooltipContent"),X=a.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=e,i=O(b,t),f=A(t),{onClose:c}=i;return a.useEffect(()=>(document.addEventListener(D,c),()=>document.removeEventListener(D,c)),[c]),a.useEffect(()=>{if(i.trigger){const v=h=>{h.target?.contains(i.trigger)&&c()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,c]),u.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:c,children:u.jsxs(ie,{"data-state":i.stateAttribute,...f,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(be,{children:r}),u.jsx(Ce,{scope:t,isInside:!0,children:u.jsx(fe,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var K="TooltipArrow",J=a.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=A(t);return me(K,t).isInside?null:u.jsx(se,{...n,...r,ref:o})});J.displayName=K;function we(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),s=Math.abs(o.left-e.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ee(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function Pe(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function Re(e,o){const{x:t,y:r}=e;let n=!1;for(let s=0,l=o.length-1;s<o.length;l=s++){const d=o[s],i=o[l],f=d.x,c=d.y,v=i.x,h=i.y;c>r!=h>r&&t<(v-f)*(r-c)/(h-c)+f&&(n=!n)}return n}function Oe(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(o)}function _e(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const s=o[o.length-1],l=o[o.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var Se=B,Me=z,He=$,Ge=q,Ve=W,Fe=J;export{Fe as A,Ve as C,Se as P,Ie as R,He as T,pe as V,Me as a,Ge as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilePicker-
|
|
2
|
-
import{a as p,p as e,A as K,R as A}from"./chunk-EF7DTUVF-CaKisB5m.js";import{b as T,B as J}from"./button-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilePicker-Dd0_TkEg.js","assets/chunk-EF7DTUVF-CaKisB5m.js","assets/utils-C_m54IzT.js","assets/files-Qh5oy2Yj.js","assets/index-DO7DtA1Q.js","assets/upload-C84AIRF5.js","assets/createLucideIcon-BweVylaW.js","assets/trash-BPu8wmdf.js","assets/chevron-down-CtNmiOMb.js","assets/button-BGHUMWDX.js","assets/types-CBu8yk7G.js","assets/index-Ct_4ArX8.js","assets/index-BJ-ODQ_I.js","assets/external-link-LWykkN17.js","assets/x-BI8YVnoZ.js","assets/markdownEditor-BRduGGxR.js","assets/authSlice-tIqx9OEB.js","assets/tslib.es6-De9GV7Vy.js","assets/index-Bb8pHI6J.js","assets/index-CaJfqerH.js","assets/index-BDqB5AyL.js","assets/index-kynsXaDO.js","assets/markdownEditor-D2iPtBtk.css","assets/date-picker-CSMApwxu.js","assets/popover-BhUEX64-.js","assets/chevron-right-haBQNeuE.js","assets/calendar-DVBBYeOW.js","assets/datetime-picker-D57VpP_6.js","assets/URLInput-DAvqcRfP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as p,p as e,A as K,R as A}from"./chunk-EF7DTUVF-CaKisB5m.js";import{b as T,B as J}from"./button-BGHUMWDX.js";import{s as v,b as Q,l as X,o as Z,u as ee,t as te,F as ae,a as N,c as C,d as b,e as E,I as P,f as _,C as R,g as w}from"./types-CBu8yk7G.js";import{c as re,a as oe}from"./index-Ct_4ArX8.js";import{u as I,a as se}from"./index-DO7DtA1Q.js";import{c as L,R as ne,W as le,C as ie,T as ce,D as de,a as M,P as ue,O as pe,b as me}from"./index-Bb8pHI6J.js";import{a as x,p as ge,q as fe}from"./utils-C_m54IzT.js";import{c as he}from"./createLucideIcon-BweVylaW.js";/**
|
|
3
3
|
* @license lucide-react v0.487.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
@@ -10,4 +10,4 @@ You can add a description to the \`${j}\` by passing a \`${B}\` component as a c
|
|
|
10
10
|
|
|
11
11
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${j}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
12
12
|
|
|
13
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{document.getElementById(a.current?.getAttribute("aria-describedby"))||console.warn(o)},[o,a]),null},Re=F,Oe=$,Te=V,Ie=z,Le=H,Me=Y,ke=U,Fe=G;function $e({...a}){return e.jsx(Re,{"data-slot":"alert-dialog",...a})}function Ve({...a}){return e.jsx(Oe,{"data-slot":"alert-dialog-portal",...a})}function ze({className:a,...o}){return e.jsx(Te,{"data-slot":"alert-dialog-overlay",className:x("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...o})}function qe({className:a,...o}){return e.jsxs(Ve,{children:[e.jsx(ze,{}),e.jsx(Ie,{"data-slot":"alert-dialog-content",className:x("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...o})]})}function Ue({className:a,...o}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:x("flex flex-col gap-2 text-center sm:text-left",a),...o})}function Be({className:a,...o}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:x("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...o})}function Ge({className:a,...o}){return e.jsx(ke,{"data-slot":"alert-dialog-title",className:x("text-lg font-semibold",a),...o})}function He({className:a,...o}){return e.jsx(Fe,{"data-slot":"alert-dialog-description",className:x("text-muted-foreground text-sm",a),...o})}function We({className:a,...o}){return e.jsx(Le,{className:x(T(),a),...o})}function Ye({className:a,...o}){return e.jsx(Me,{className:x(T({variant:"outline"}),a),...o})}function Ke({hasUnsavedChanges:a,title:o="Unsaved Changes",description:s="You have unsaved changes. Are you sure you want to leave this page? Your changes will be lost.",stayButtonText:l="Stay on Page",leaveButtonText:u="Leave Page"}){const f=K(({currentLocation:h,nextLocation:t})=>a&&h.pathname!==t.pathname),[m,g]=p.useState(!1),n=()=>{f.state==="blocked"&&f.proceed()},d=()=>{f.state==="blocked"&&f.reset()};return p.useEffect(()=>{g(f.state==="blocked")},[f.state,m]),p.useEffect(()=>{const h=t=>{a&&(t.preventDefault(),t.returnValue="")};return a&&window.addEventListener("beforeunload",h),()=>{window.removeEventListener("beforeunload",h)}},[a]),e.jsx($e,{open:m,onOpenChange:g,children:e.jsxs(qe,{children:[e.jsxs(Ue,{children:[e.jsx(Ge,{children:o}),e.jsx(He,{children:s})]}),e.jsxs(Be,{children:[e.jsx(Ye,{onClick:d,children:l}),e.jsx(We,{onClick:n,children:u})]})]})})}const Je=A.lazy(()=>y(()=>import("./FilePicker-
|
|
13
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{document.getElementById(a.current?.getAttribute("aria-describedby"))||console.warn(o)},[o,a]),null},Re=F,Oe=$,Te=V,Ie=z,Le=H,Me=Y,ke=U,Fe=G;function $e({...a}){return e.jsx(Re,{"data-slot":"alert-dialog",...a})}function Ve({...a}){return e.jsx(Oe,{"data-slot":"alert-dialog-portal",...a})}function ze({className:a,...o}){return e.jsx(Te,{"data-slot":"alert-dialog-overlay",className:x("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...o})}function qe({className:a,...o}){return e.jsxs(Ve,{children:[e.jsx(ze,{}),e.jsx(Ie,{"data-slot":"alert-dialog-content",className:x("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...o})]})}function Ue({className:a,...o}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:x("flex flex-col gap-2 text-center sm:text-left",a),...o})}function Be({className:a,...o}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:x("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...o})}function Ge({className:a,...o}){return e.jsx(ke,{"data-slot":"alert-dialog-title",className:x("text-lg font-semibold",a),...o})}function He({className:a,...o}){return e.jsx(Fe,{"data-slot":"alert-dialog-description",className:x("text-muted-foreground text-sm",a),...o})}function We({className:a,...o}){return e.jsx(Le,{className:x(T(),a),...o})}function Ye({className:a,...o}){return e.jsx(Me,{className:x(T({variant:"outline"}),a),...o})}function Ke({hasUnsavedChanges:a,title:o="Unsaved Changes",description:s="You have unsaved changes. Are you sure you want to leave this page? Your changes will be lost.",stayButtonText:l="Stay on Page",leaveButtonText:u="Leave Page"}){const f=K(({currentLocation:h,nextLocation:t})=>a&&h.pathname!==t.pathname),[m,g]=p.useState(!1),n=()=>{f.state==="blocked"&&f.proceed()},d=()=>{f.state==="blocked"&&f.reset()};return p.useEffect(()=>{g(f.state==="blocked")},[f.state,m]),p.useEffect(()=>{const h=t=>{a&&(t.preventDefault(),t.returnValue="")};return a&&window.addEventListener("beforeunload",h),()=>{window.removeEventListener("beforeunload",h)}},[a]),e.jsx($e,{open:m,onOpenChange:g,children:e.jsxs(qe,{children:[e.jsxs(Ue,{children:[e.jsx(Ge,{children:o}),e.jsx(He,{children:s})]}),e.jsxs(Be,{children:[e.jsx(Ye,{onClick:d,children:l}),e.jsx(We,{onClick:n,children:u})]})]})})}const Je=A.lazy(()=>y(()=>import("./FilePicker-Dd0_TkEg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),Qe=A.lazy(()=>y(()=>import("./markdownEditor-BRduGGxR.js"),__vite__mapDeps([15,1,16,17,2,12,18,11,4,10,6,19,20,21,22]))),Xe=A.lazy(()=>y(()=>import("./date-picker-CSMApwxu.js"),__vite__mapDeps([23,1,9,4,2,24,6,25,8,19,11,12,18,17,20,26]))),Ze=A.lazy(()=>y(()=>import("./datetime-picker-D57VpP_6.js"),__vite__mapDeps([27,1,9,4,2,24,6,25,8,19,11,12,18,17,20,10,26]))),et=A.lazy(()=>y(()=>import("./URLInput-DAvqcRfP.js"),__vite__mapDeps([28,1,10,4,2,11,12,6,13])));function dt({itemType:a,fields:o,data:s,isNew:l}){const[u]=ge(),[f]=fe(),m=p.useCallback(t=>({id:s?.id??"",isDraft:String(l?!0:s?.isDraft??!1),...Object.fromEntries(Object.keys(t).map(r=>[r,s?.[r]??(t[r].type==="boolean"?!1:"")]))}),[s,o]),g=p.useMemo(()=>{const t={id:v().min(1,"ID is required").regex(/^[a-z0-9-]+$/,"ID can only include lowercase letters and numbers"),isDraft:v()};return Object.entries(o).forEach(([r,i])=>{let c;switch(i.type){case"boolean":c=Q();break;case"number":c=v().refine(S=>!isNaN(Number(S)),"Must be a valid number");break;case"url":c=v().url("Must be a valid URL");break;case"date":c=v();break;case"datetime":c=v();break;default:c=v()}i.isRequired?i.type!=="boolean"&&(c=c.min(1,`${i.displayName} is required`)):c=c.optional().or(X("")),t[r]=c}),Z(t)},[o]),n=ee({resolver:te(g),defaultValues:m(o)});p.useEffect(()=>{if(!n)return;const t=window.location.hash;t&&n.setFocus(t.substring(1))},[n]),p.useEffect(()=>{const t=r=>{(r.ctrlKey||r.metaKey)&&r.key==="s"&&(r.preventDefault(),(n.formState.isDirty||l)&&n.handleSubmit(d)())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[n,l,d]);async function d(t){const r={...t,isDraft:t.isDraft==="true",type:a};l?u(r):f(r)}const h=p.useMemo(()=>Object.entries(o).filter(([,t])=>t.type==="boolean"),[o]);return e.jsxs(ae,{...n,children:[e.jsxs("form",{onSubmit:n.handleSubmit(d),className:"space-y-4 max-w-[800px] w-[800px]",children:[e.jsx(N,{name:"id",control:n.control,rules:{required:!0},render:({field:t})=>e.jsxs(C,{id:"id",className:x(s?.id==="default"&&"hidden"),children:[e.jsx(b,{className:"flex gap-1 items-baseline",children:"ID"}),e.jsx(E,{children:e.jsx(P,{placeholder:"item-id",...n.register("id"),...t,onChange:r=>{const i=r.target.value.toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/[^a-z0-9-]/g,"");t.onChange(i)},onBlur:r=>{const i=r.target.value.trim().replace(/^-+|-+$/g,"");t.onChange(i)}})}),e.jsx(_,{})]})}),e.jsx(N,{name:"isDraft",control:n.control,render:({field:t})=>e.jsxs(C,{id:"isDraft",className:x("flex flex-col items-start",s?.id==="default"&&"hidden"),children:[e.jsxs("div",{className:"flex flex-row space-x-2",children:[e.jsx(E,{children:e.jsx(R,{id:"isDraft",...n.register("isDraft"),checked:t.value==="true",onCheckedChange:r=>{t.onChange(r===!0?"true":"false")}})}),e.jsx(b,{className:"flex gap-1 items-baseline",children:"Draft"})]}),e.jsx(w,{children:"Draft items are not visible on the published site"}),e.jsx(_,{})]})}),h.length>0&&e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(b,{children:"Flags"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-4",children:h.map(([t,r])=>e.jsx(N,{name:t,control:n.control,render:({field:i})=>e.jsxs(C,{className:"flex flex-col items-start",children:[e.jsxs("div",{className:"flex flex-row space-x-2",children:[e.jsx(E,{children:e.jsx(R,{id:t,...n.register(t),checked:i.value==="true",onCheckedChange:c=>{i.onChange(c===!0?"true":"false")}})}),e.jsx(b,{className:"flex gap-1 items-baseline",children:r.displayName})]}),r.displayExtra&&e.jsx(w,{children:r.displayExtra}),e.jsx(_,{})]})},t))})]}),Object.entries(o).filter(([,t])=>t.type!=="boolean").map(([t,r])=>e.jsx(N,{name:t,control:n.control,rules:{required:r.isRequired},render:({field:i})=>e.jsxs(C,{id:t,children:[e.jsxs(b,{className:"flex gap-1 items-baseline",children:[r.displayName,!r.isRequired&&e.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),e.jsx(E,{children:r.type==="markdown"?e.jsx(Qe,{name:t,register:n.register,className:"h-52",markdown:i.value,onChange:(c,S)=>{S||i.onChange(c)},placeholder:r.placeholder,fieldDisplayName:r.displayName}):r.type==="url"?e.jsx(et,{id:t,...n.register(t),placeholder:r.placeholder??"https://example.website/",...i}):r.type==="string"&&r.isUploadedFile?e.jsx(Je,{id:t,name:t,register:n.register,value:i.value,onChange:i.onChange}):r.type==="date"?e.jsx(Xe,{...n.register(t),date:i.value?new Date(i.value):void 0,onDateChange:c=>{i.onChange(c?c.toISOString():void 0)},placeholder:r.placeholder??"Select date"}):r.type==="datetime"?e.jsx(Ze,{id:t,...n.register(t),date:i.value?new Date(i.value):void 0,onDateTimeChange:c=>{i.onChange(c?c.toISOString():void 0)},placeholder:r.placeholder??"Select date and time"}):e.jsx(P,{...n.register(t),placeholder:r.placeholder,...i})}),r.displayExtra&&e.jsx(w,{children:r.displayExtra}),e.jsx(_,{})]})},t)),e.jsxs(J,{disabled:!n.formState.isDirty&&!l,type:"submit",children:[e.jsx(De,{})," ",n.watch("isDraft")==="true"?"Save Draft":"Save"]})]}),e.jsx(Ke,{hasUnsavedChanges:n.formState.isDirty})]})}export{dt as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-Be049MAC.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/index-BJ-ODQ_I.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-Be049MAC.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/index-BJ-ODQ_I.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-BJWxWRqp.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/index-BJ-ODQ_I.js","/assets/authSlice-tIqx9OEB.js","/assets/utils-C_m54IzT.js","/assets/Loading-BsRbgW--.js","/assets/tslib.es6-De9GV7Vy.js","/assets/createLucideIcon-BweVylaW.js"],"css":["/assets/root-BctYpWwq.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-B4RFD4yZ.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/Loading-BsRbgW--.js","/assets/button-BGHUMWDX.js","/assets/types-CBu8yk7G.js","/assets/authSlice-tIqx9OEB.js","/assets/utils-C_m54IzT.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-DO7DtA1Q.js","/assets/index-Ct_4ArX8.js","/assets/index-BJ-ODQ_I.js","/assets/tslib.es6-De9GV7Vy.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-BJ3aBcCE.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/authSlice-tIqx9OEB.js","/assets/utils-C_m54IzT.js","/assets/index-Bb8pHI6J.js","/assets/x-BI8YVnoZ.js","/assets/button-BGHUMWDX.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-DO7DtA1Q.js","/assets/index-kynsXaDO.js","/assets/index-Ct_4ArX8.js","/assets/chevron-down-CtNmiOMb.js","/assets/upload-C84AIRF5.js","/assets/external-link-LWykkN17.js","/assets/Loading-BsRbgW--.js","/assets/chevron-right-haBQNeuE.js","/assets/tslib.es6-De9GV7Vy.js","/assets/index-BJ-ODQ_I.js","/assets/index-BDqB5AyL.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-BgukdHmI.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/utils-C_m54IzT.js","/assets/index-g23Or4wZ.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-DGIvigrJ.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/itemForm-Cg4BG9pI.js","/assets/utils-C_m54IzT.js","/assets/button-BGHUMWDX.js","/assets/index-DO7DtA1Q.js","/assets/types-CBu8yk7G.js","/assets/index-Ct_4ArX8.js","/assets/index-BJ-ODQ_I.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-Bb8pHI6J.js","/assets/tslib.es6-De9GV7Vy.js"],"css":[]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-C3PwVUY_.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/button-BGHUMWDX.js","/assets/utils-C_m54IzT.js","/assets/index-g23Or4wZ.js","/assets/createLucideIcon-BweVylaW.js","/assets/calendar-DVBBYeOW.js","/assets/trash-BPu8wmdf.js","/assets/external-link-LWykkN17.js","/assets/index-DO7DtA1Q.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-D6q5k-Kf.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/itemForm-Cg4BG9pI.js","/assets/utils-C_m54IzT.js","/assets/button-BGHUMWDX.js","/assets/index-DO7DtA1Q.js","/assets/types-CBu8yk7G.js","/assets/index-Ct_4ArX8.js","/assets/index-BJ-ODQ_I.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-Bb8pHI6J.js","/assets/tslib.es6-De9GV7Vy.js"],"css":[]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-NMQ4Pzxd.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/files-Qh5oy2Yj.js","/assets/utils-C_m54IzT.js","/assets/index-DO7DtA1Q.js","/assets/upload-C84AIRF5.js","/assets/createLucideIcon-BweVylaW.js","/assets/trash-BPu8wmdf.js","/assets/chevron-down-CtNmiOMb.js"],"css":[]}},"url":"/assets/manifest-bbc74605.js","version":"bbc74605"};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as M,R as C,p as V,C as xv,D as k0}from"./chunk-EF7DTUVF-CaKisB5m.js";import{d as K3,h as J3}from"./authSlice-
|
|
1
|
+
import{a as M,R as C,p as V,C as xv,D as k0}from"./chunk-EF7DTUVF-CaKisB5m.js";import{d as K3,h as J3}from"./authSlice-tIqx9OEB.js";import{r as e9,a as kc}from"./utils-C_m54IzT.js";import{a as na}from"./index-BJ-ODQ_I.js";import{u as Wh,d as bv,R as t9,P as n9,O as r9,C as i9,T as s9,a as o9,e as l9,h as a9,f as c9,g as u9,F as h9,i as f9}from"./index-Bb8pHI6J.js";import{h as d9,u as yv,i as p9}from"./types-CBu8yk7G.js";import{_ as v0}from"./tslib.es6-De9GV7Vy.js";import{R as g9,A as m9,P as O9,C as x9,a as b9}from"./index-CaJfqerH.js";import{R as y9,V as S9,P as Sv,a as kv,T as vv,b as wv,C as Cv,A as k9}from"./index-kynsXaDO.js";import{c as Fa,P as ut,a as Ke,u as mo,d as Ei}from"./index-Ct_4ArX8.js";import{u as vn,b as Sp}from"./index-DO7DtA1Q.js";import{c as _v,R as v9,A as w9,C as C9,a as _9}from"./index-BDqB5AyL.js";import{c as Tv}from"./createLucideIcon-BweVylaW.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as f,a as _,p as R}from"./chunk-EF7DTUVF-CaKisB5m.js";import{b as Qe,B as sn}from"./button-
|
|
1
|
+
import{R as f,a as _,p as R}from"./chunk-EF7DTUVF-CaKisB5m.js";import{b as Qe,B as sn}from"./button-BGHUMWDX.js";import{a as W}from"./utils-C_m54IzT.js";import{c as cn}from"./createLucideIcon-BweVylaW.js";import{C as un}from"./chevron-right-haBQNeuE.js";import{C as dn}from"./chevron-down-CtNmiOMb.js";import{R as ln,T as fn,P as hn,C as mn}from"./index-CaJfqerH.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,p as e,w as m,q as h,M as p,L as x,S as g,t as j,O as b,i as E}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as y,o as w,r as S,f as F,g as L,s as u,a as v,b as A,i as N,c as P}from"./authSlice-
|
|
1
|
+
import{a as c,p as e,w as m,q as h,M as p,L as x,S as g,t as j,O as b,i as E}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as y,o as w,r as S,f as F,g as L,s as u,a as v,b as A,i as N,c as P}from"./authSlice-tIqx9OEB.js";import{u as l,c as R,s as z,e as o,P as C}from"./utils-C_m54IzT.js";import{L as I}from"./Loading-BsRbgW--.js";import"./tslib.es6-De9GV7Vy.js";import"./createLucideIcon-BweVylaW.js";function k(){const r=y(),{data:t}=l();return c.useEffect(()=>{const a=w(A,async s=>{if(s&&t?.firebase){const i=s.email?.replace(/[.@]/g,"_"),n=S(F,`${t.firebase.dbUsersPath}/${i}`),f=(await L(n)).val();r(u({uid:s.uid,email:s.email,role:f}))}else r(u(void 0));r(v(!1))});return()=>a()},[r,t]),null}function q({children:r}){const[t,a]=c.useState(!1),{data:s,error:i,isLoading:n}=l();return c.useEffect(()=>{if(!n){if(i){console.error("Failed to fetch firebase config:",i);return}if(s)try{if(!s.firebase)throw new Error("Firebase configuration not found in admin config");N(s.firebase),a(!0)}catch(d){console.error("Failed to initialize Firebase:",d)}}},[s,i,n]),i?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold text-red-600 mb-2",children:"Firebase Initialization Error"}),e.jsx("p",{className:"text-gray-600",children:i instanceof Error?i.message:"Failed to fetch admin config"})]})}):n||!t?e.jsx(I,{}):e.jsx(e.Fragment,{children:r})}function B(){const r=R({reducer:{auth:P,[o.reducerPath]:o.reducer},middleware:t=>t().concat(o.middleware)});return z(r.dispatch),r}function D({children:r}){const t=c.useRef(null);return t.current||(t.current=B(),t.current.dispatch(o.endpoints.getConfig.initiate())),e.jsx(C,{store:t.current,children:r})}const G=()=>[];function K({}){return[{title:"Editorial Admin"},{name:"robots",content:"noindex"}]}function Q({children:r}){return e.jsxs("html",{lang:"en",className:"min-h-screen",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),e.jsx(p,{}),e.jsx(x,{})]}),e.jsxs("body",{className:"h-full min-h-screen bg-background font-sans antialiased",children:[e.jsx(D,{children:e.jsxs(q,{children:[e.jsx(k,{}),r]})}),e.jsx(g,{}),e.jsx(j,{})]})]})}const H=m(function(){return e.jsx(b,{})}),J=h(function({error:t}){let a="Oops!",s="An unexpected error occurred.",i;return E(t)&&(a=t.status===404?"404":"Error",s=t.status===404?"The requested page could not be found.":t.statusText||s),e.jsxs("main",{className:"pt-16 p-4 container mx-auto",children:[e.jsx("h1",{children:a}),e.jsx("p",{children:s}),i]})});export{J as ErrorBoundary,Q as Layout,H as default,G as links,K as meta};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z,p as L,R as O}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as vr,S as ss}from"./index-
|
|
1
|
+
import{a as z,p as L,R as O}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as vr,S as ss}from"./index-DO7DtA1Q.js";import{c as as,b as ns,P as nt,u as is,a as Wt,e as os}from"./index-Ct_4ArX8.js";import{a as Ee}from"./utils-C_m54IzT.js";import{c as ds}from"./createLucideIcon-BweVylaW.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|