@isardsat/editorial-admin 6.6.1 → 6.6.2
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 +1 -0
- package/build/client/assets/{Loading-BiO3HJmZ.js → Loading-135S8vAs.js} +1 -1
- package/build/client/assets/{URLInput-CFnU0U1n.js → URLInput-D0_7cCau.js} +1 -1
- package/build/client/assets/{authSlice-O1tz7SK1.js → authSlice-DbkAmWS9.js} +158 -158
- package/build/client/assets/{button-494fplqA.js → button-1K9v0DJg.js} +1 -1
- package/build/client/assets/{dashboard-DqU-WlEe.js → dashboard-ChM5vL1Y.js} +1 -1
- package/build/client/assets/{dashboard._collection-LAkj-iO9.js → dashboard._collection-yuvHUjkD.js} +1 -1
- package/build/client/assets/{dashboard._collection._document-Cqsuu-0-.js → dashboard._collection._document-MyRkrosI.js} +1 -1
- package/build/client/assets/{dashboard._collection.new-SI3Dkpds.js → dashboard._collection.new-B8E4HzA_.js} +1 -1
- package/build/client/assets/{dashboard._layout-BUGw8Wsg.js → dashboard._layout-CptxApKG.js} +2 -2
- package/build/client/assets/dashboard.files-DSuCEWNU.js +1 -0
- package/build/client/assets/{date-picker-D7MFHjcF.js → date-picker-BM6MlSuC.js} +1 -1
- package/build/client/assets/{datetime-picker-DzApRNz_.js → datetime-picker-RYlN_N5T.js} +1 -1
- package/build/client/assets/files-DZvtTqEL.js +26 -0
- package/build/client/assets/home-DEZ1iD3I.js +1 -0
- package/build/client/assets/{index-CqaffZUS.js → index-B_LZxNEG.js} +1 -1
- package/build/client/assets/{index-BNiwB2Xo.js → index-C4koMhA2.js} +1 -1
- package/build/client/assets/{index-CQ2mjYJl.js → index-COYoknn5.js} +1 -1
- package/build/client/assets/{index-Blx_6p83.js → index-DfWKcpIl.js} +1 -1
- package/build/client/assets/{index-gfXi4hAm.js → index-Dfe-gVs7.js} +1 -1
- package/build/client/assets/{index-DgN6jnv0.js → index-opRxY4qB.js} +1 -1
- package/build/client/assets/{index-N8jzdZDg.js → index-ufEogtin.js} +1 -1
- package/build/client/assets/{itemForm-BcDnRX3X.js → itemForm-CE-2cG5-.js} +3 -3
- package/build/client/assets/manifest-ef1d0485.js +1 -0
- package/build/client/assets/{markdownEditor-DQtQQZeo.js → markdownEditor-EbpqJ4d2.js} +51 -51
- package/build/client/assets/{popover-DDQEIzon.js → popover--B9JRpo3.js} +1 -1
- package/build/client/assets/root-Dltr_VS9.js +1 -0
- package/build/client/assets/{types-qmeOZPBc.js → types-D9rc6L8-.js} +1 -1
- package/build/client/assets/{utils-5cV-49hI.js → utils-BLOeDrX7.js} +1 -1
- package/build/client/index.html +2 -2
- package/package.json +2 -2
- package/build/client/assets/FilePicker-CWQ8ELBw.js +0 -1
- package/build/client/assets/dashboard.files-YptTPTFT.js +0 -1
- package/build/client/assets/files-DrzVVLDE.js +0 -26
- package/build/client/assets/home-BtNh5JTT.js +0 -1
- package/build/client/assets/hooks-BA9LC00C.js +0 -1
- package/build/client/assets/manifest-384b5d21.js +0 -1
- package/build/client/assets/root-DtBI39a7.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a,B as et,p as g}from"./chunk-EF7DTUVF-CaKisB5m.js";import{d as Se,P as x,a as A,f as tt,u as nt,c as rt,b as ie,g as ot}from"./index-BNiwB2Xo.js";import{u as _,b as at}from"./index-DgN6jnv0.js";import{R as it}from"./index-BJ-ODQ_I.js";import{_ as N,a as we,b as st}from"./tslib.es6-De9GV7Vy.js";var ct=et[" useId ".trim().toString()]||(()=>{}),ut=0;function Z(e){const[t,n]=a.useState(ct());return Se(()=>{n(r=>r??String(ut++))},[e]),e||(t?`radix-${t}`:"")}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function lt(e,t=globalThis?.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var dt="DismissableLayer",oe="dismissableLayer.update",ft="dismissableLayer.pointerDownOutside",vt="dismissableLayer.focusOutside",le,De=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Re=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(De),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=_(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=gt(p=>{const O=p.target,W=[...l.branches].some(z=>z.contains(O));!S||W||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),P=pt(p=>{const O=p.target;[...l.branches].some(z=>z.contains(O))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return lt(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),de())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(oe,p),()=>document.removeEventListener(oe,p)},[]),g.jsx(x.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,w.onPointerDownCapture)})});Re.displayName=dt;var ht="DismissableLayerBranch",mt=a.forwardRef((e,t)=>{const n=a.useContext(De),r=a.useRef(null),o=_(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(x.div,{...e,ref:o})});mt.displayName=ht;function gt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){Pe(ft,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&Pe(vt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(oe);document.dispatchEvent(e)}function Pe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tt(o,i):o.dispatchEvent(i)}var q="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Et="FocusScope",Oe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=B(o),d=B(i),v=a.useRef(null),h=_(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:T(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||T(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&T(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){he.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(q,fe);s.addEventListener(q,l),s.dispatchEvent(m),m.defaultPrevented||(yt(Dt(xe(s)),{select:!0}),document.activeElement===c&&T(s))}return()=>{s.removeEventListener(q,l),setTimeout(()=>{const m=new CustomEvent(Q,fe);s.addEventListener(Q,d),s.dispatchEvent(m),m.defaultPrevented||T(c??document.body,{select:!0}),s.removeEventListener(Q,d),he.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=bt(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&T(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&T(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(x.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Oe.displayName=Et;function yt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(T(r,{select:t}),document.activeElement!==n)return}function bt(e){const t=xe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Ct(n,{upTo:t}))return n}function Ct(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function St(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&St(e)&&t&&e.select()}}var he=wt();function wt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=me(e,t),e.unshift(t)},remove(t){e=me(e,t),e[0]?.resume()}}}function me(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dt(e){return e.filter(t=>t.tagName!=="A")}var Rt="Portal",Te=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);Se(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?it.createPortal(g.jsx(x.div,{...r,ref:t}),u):null});Te.displayName=Rt;var J=0;function Pt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ge()),document.body.insertAdjacentElement("beforeend",e[1]??ge()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",V="width-before-scroll-bar",Ot="with-scroll-bars-hidden",xt="--removed-body-scroll-bar-size";function ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tt(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Nt=typeof window<"u"?a.useLayoutEffect:a.useEffect,pe=new WeakMap;function At(e,t){var n=Tt(null,function(r){return e.forEach(function(o){return ee(o,r)})});return Nt(function(){var r=pe.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||ee(s,null)}),i.forEach(function(s){o.has(s)||ee(s,u)})}pe.set(n,e)},[e]),n}function It(e){return e}function Lt(e,t){t===void 0&&(t=It);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function Mt(e){e===void 0&&(e={});var t=Lt(null);return t.options=N({async:!0,ssr:!1},e),t}var Ne=function(e){var t=e.sideCar,n=we(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,N({},n))};Ne.isSideCarExport=!0;function Ft(e,t){return e.useMedium(t),Ne}var Ae=Mt(),te=function(){},X=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=we(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=At([n,t]),p=N(N({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),N(N({},p),{ref:P})):a.createElement(b,N({},p,{className:E,ref:P}),s))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};X.classNames={fullWidth:V,zeroRight:G};var kt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _t(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kt();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_t())&&(Wt(t,n),Bt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ut=function(){var e=jt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ie=function(){var e=Ut(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Ht=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Gt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Ht(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vt=Ie(),k="data-scroll-locked",Yt=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{a,B as et,p as g}from"./chunk-EF7DTUVF-CaKisB5m.js";import{d as Se,P as x,a as A,f as tt,u as nt,c as rt,b as ie,g as ot}from"./index-C4koMhA2.js";import{u as _,b as at}from"./index-opRxY4qB.js";import{R as it}from"./index-BJ-ODQ_I.js";import{_ as N,a as we,b as st}from"./tslib.es6-De9GV7Vy.js";var ct=et[" useId ".trim().toString()]||(()=>{}),ut=0;function Z(e){const[t,n]=a.useState(ct());return Se(()=>{n(r=>r??String(ut++))},[e]),e||(t?`radix-${t}`:"")}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function lt(e,t=globalThis?.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var dt="DismissableLayer",oe="dismissableLayer.update",ft="dismissableLayer.pointerDownOutside",vt="dismissableLayer.focusOutside",le,De=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Re=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(De),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=_(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=gt(p=>{const O=p.target,W=[...l.branches].some(z=>z.contains(O));!S||W||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),P=pt(p=>{const O=p.target;[...l.branches].some(z=>z.contains(O))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return lt(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),de())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(oe,p),()=>document.removeEventListener(oe,p)},[]),g.jsx(x.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,w.onPointerDownCapture)})});Re.displayName=dt;var ht="DismissableLayerBranch",mt=a.forwardRef((e,t)=>{const n=a.useContext(De),r=a.useRef(null),o=_(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(x.div,{...e,ref:o})});mt.displayName=ht;function gt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){Pe(ft,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&Pe(vt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(oe);document.dispatchEvent(e)}function Pe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tt(o,i):o.dispatchEvent(i)}var q="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Et="FocusScope",Oe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=B(o),d=B(i),v=a.useRef(null),h=_(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:T(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||T(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&T(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){he.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(q,fe);s.addEventListener(q,l),s.dispatchEvent(m),m.defaultPrevented||(yt(Dt(xe(s)),{select:!0}),document.activeElement===c&&T(s))}return()=>{s.removeEventListener(q,l),setTimeout(()=>{const m=new CustomEvent(Q,fe);s.addEventListener(Q,d),s.dispatchEvent(m),m.defaultPrevented||T(c??document.body,{select:!0}),s.removeEventListener(Q,d),he.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=bt(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&T(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&T(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(x.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Oe.displayName=Et;function yt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(T(r,{select:t}),document.activeElement!==n)return}function bt(e){const t=xe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Ct(n,{upTo:t}))return n}function Ct(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function St(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&St(e)&&t&&e.select()}}var he=wt();function wt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=me(e,t),e.unshift(t)},remove(t){e=me(e,t),e[0]?.resume()}}}function me(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dt(e){return e.filter(t=>t.tagName!=="A")}var Rt="Portal",Te=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);Se(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?it.createPortal(g.jsx(x.div,{...r,ref:t}),u):null});Te.displayName=Rt;var J=0;function Pt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ge()),document.body.insertAdjacentElement("beforeend",e[1]??ge()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",V="width-before-scroll-bar",Ot="with-scroll-bars-hidden",xt="--removed-body-scroll-bar-size";function ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tt(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Nt=typeof window<"u"?a.useLayoutEffect:a.useEffect,pe=new WeakMap;function At(e,t){var n=Tt(null,function(r){return e.forEach(function(o){return ee(o,r)})});return Nt(function(){var r=pe.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||ee(s,null)}),i.forEach(function(s){o.has(s)||ee(s,u)})}pe.set(n,e)},[e]),n}function It(e){return e}function Lt(e,t){t===void 0&&(t=It);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function Mt(e){e===void 0&&(e={});var t=Lt(null);return t.options=N({async:!0,ssr:!1},e),t}var Ne=function(e){var t=e.sideCar,n=we(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,N({},n))};Ne.isSideCarExport=!0;function Ft(e,t){return e.useMedium(t),Ne}var Ae=Mt(),te=function(){},X=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=we(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=At([n,t]),p=N(N({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),N(N({},p),{ref:P})):a.createElement(b,N({},p,{className:E,ref:P}),s))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};X.classNames={fullWidth:V,zeroRight:G};var kt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _t(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kt();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_t())&&(Wt(t,n),Bt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ut=function(){var e=jt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ie=function(){var e=Ut(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Ht=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Gt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Ht(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vt=Ie(),k="data-scroll-locked",Yt=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Ot,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -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-D_8_LM-x.js","assets/chunk-EF7DTUVF-CaKisB5m.js","assets/utils-BLOeDrX7.js","assets/files-DZvtTqEL.js","assets/index-opRxY4qB.js","assets/upload-C84AIRF5.js","assets/createLucideIcon-BweVylaW.js","assets/trash-BPu8wmdf.js","assets/chevron-down-CtNmiOMb.js","assets/button-1K9v0DJg.js","assets/types-D9rc6L8-.js","assets/index-C4koMhA2.js","assets/index-BJ-ODQ_I.js","assets/external-link-LWykkN17.js","assets/x-BI8YVnoZ.js","assets/markdownEditor-EbpqJ4d2.js","assets/authSlice-DbkAmWS9.js","assets/tslib.es6-De9GV7Vy.js","assets/index-ufEogtin.js","assets/index-COYoknn5.js","assets/index-B_LZxNEG.js","assets/index-DfWKcpIl.js","assets/markdownEditor-D2iPtBtk.css","assets/date-picker-BM6MlSuC.js","assets/popover--B9JRpo3.js","assets/chevron-right-haBQNeuE.js","assets/calendar-DVBBYeOW.js","assets/datetime-picker-RYlN_N5T.js","assets/URLInput-D0_7cCau.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-1K9v0DJg.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-D9rc6L8-.js";import{c as re,a as oe}from"./index-C4koMhA2.js";import{u as I,a as se}from"./index-opRxY4qB.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-ufEogtin.js";import{a as x,q as ge,r as fe}from"./utils-BLOeDrX7.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-D_8_LM-x.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),Qe=A.lazy(()=>y(()=>import("./markdownEditor-EbpqJ4d2.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-BM6MlSuC.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-RYlN_N5T.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-D0_7cCau.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};
|
|
@@ -0,0 +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-Dltr_VS9.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/index-BJ-ODQ_I.js","/assets/authSlice-DbkAmWS9.js","/assets/utils-BLOeDrX7.js","/assets/Loading-135S8vAs.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-DEZ1iD3I.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/Loading-135S8vAs.js","/assets/button-1K9v0DJg.js","/assets/types-D9rc6L8-.js","/assets/authSlice-DbkAmWS9.js","/assets/utils-BLOeDrX7.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-opRxY4qB.js","/assets/index-C4koMhA2.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-CptxApKG.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/authSlice-DbkAmWS9.js","/assets/utils-BLOeDrX7.js","/assets/index-ufEogtin.js","/assets/x-BI8YVnoZ.js","/assets/button-1K9v0DJg.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-opRxY4qB.js","/assets/index-DfWKcpIl.js","/assets/index-C4koMhA2.js","/assets/chevron-down-CtNmiOMb.js","/assets/upload-C84AIRF5.js","/assets/external-link-LWykkN17.js","/assets/Loading-135S8vAs.js","/assets/chevron-right-haBQNeuE.js","/assets/tslib.es6-De9GV7Vy.js","/assets/index-BJ-ODQ_I.js","/assets/index-B_LZxNEG.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-ChM5vL1Y.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/utils-BLOeDrX7.js","/assets/index-Dfe-gVs7.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-B8E4HzA_.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/itemForm-CE-2cG5-.js","/assets/utils-BLOeDrX7.js","/assets/button-1K9v0DJg.js","/assets/index-opRxY4qB.js","/assets/types-D9rc6L8-.js","/assets/index-C4koMhA2.js","/assets/index-BJ-ODQ_I.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-ufEogtin.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-yuvHUjkD.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/button-1K9v0DJg.js","/assets/utils-BLOeDrX7.js","/assets/index-Dfe-gVs7.js","/assets/createLucideIcon-BweVylaW.js","/assets/calendar-DVBBYeOW.js","/assets/trash-BPu8wmdf.js","/assets/external-link-LWykkN17.js","/assets/index-opRxY4qB.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-MyRkrosI.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/itemForm-CE-2cG5-.js","/assets/utils-BLOeDrX7.js","/assets/button-1K9v0DJg.js","/assets/index-opRxY4qB.js","/assets/types-D9rc6L8-.js","/assets/index-C4koMhA2.js","/assets/index-BJ-ODQ_I.js","/assets/createLucideIcon-BweVylaW.js","/assets/index-ufEogtin.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-DSuCEWNU.js","imports":["/assets/chunk-EF7DTUVF-CaKisB5m.js","/assets/files-DZvtTqEL.js","/assets/utils-BLOeDrX7.js","/assets/index-opRxY4qB.js","/assets/upload-C84AIRF5.js","/assets/createLucideIcon-BweVylaW.js","/assets/trash-BPu8wmdf.js","/assets/chevron-down-CtNmiOMb.js"],"css":[]}},"url":"/assets/manifest-ef1d0485.js","version":"ef1d0485"};
|