@featherk/composables 0.5.6 → 0.6.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
- (function(z,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@vueuse/integrations/useFocusTrap")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/integrations/useFocusTrap"],t):(z=typeof globalThis<"u"?globalThis:z||self,t(z.FeatherKComposables={},z.Vue,z.useFocusTrap))})(this,(function(z,t,ye){"use strict";const ge=e=>{const n=t.ref(null);let d=!1,P=null,F=null;const U=[],N=".k-table-row[data-grid-row-index] [tabindex]",p=()=>e?.value?.columns,g=l=>{const S=l.key||l.code;[" ","Spacebar","Space","Enter"].includes(S)&&(l.preventDefault(),l.stopPropagation(),n.value=l.target,l.target.click())},T=l=>{if(!n.value)return;if(l.code==="Escape"){l.preventDefault(),l.stopPropagation(),n.value&&n.value.focus();return}const S=Array.from(document.querySelectorAll(".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item")),i=document.querySelector(".k-filter-menu-container");if(i){if(l.code==="Tab"){const u=[".k-filter-menu-container .k-dropdownlist[tabindex='0']",".k-filter-menu-container input.k-input-inner:not([tabindex='-1']):not([disabled])",".k-filter-menu-container button:not([tabindex='-1']):not([disabled])"],f=Array.from(i.querySelectorAll(u.join(",")));if(f.length===0)return;const A=f.findIndex($=>$===document.activeElement);let w;A===-1?w=0:l.shiftKey?w=(A-1+f.length)%f.length:w=(A+1)%f.length,l.preventDefault(),l.stopPropagation(),f[w]?.focus();return}}else if(l.code==="ArrowUp"||l.code==="ArrowDown"){l.preventDefault(),l.stopPropagation();const u=S.findIndex(A=>A===document.activeElement);let f=u;l.code==="ArrowUp"?f=u>0?u-1:S.length-1:l.code==="ArrowDown"&&(f=u<S.length-1?u+1:0),S[f]?.focus();return}l.code==="Tab"&&(l.preventDefault(),l.stopPropagation(),l.shiftKey?(n.value?.previousElementSibling).focus():(n.value?.nextElementSibling).focus())},b=()=>{P=new MutationObserver(l=>{l.forEach(S=>{S.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){const u=i;if(u.classList.contains("k-animation-container")){const A=n.value;A&&(A.dataset.featherKSortable==="true"||t.nextTick(()=>{u.querySelectorAll(".k-columnmenu-item-wrapper").forEach(Y=>{Y.textContent?.toLowerCase().includes("sort")&&Y.remove()})})),u.addEventListener("keydown",T),t.nextTick(()=>{const w=()=>{const $=Array.from(u.querySelectorAll(".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"));if($.length===1)$[0].focus(),$[0].click(),w.attempts=0;else if($.length>1){w.attempts=0;return}else w.attempts===void 0&&(w.attempts=0),w.attempts++<3&&setTimeout(w,200)};w()})}u.querySelectorAll(".k-animation-container").forEach(A=>{A.addEventListener("keydown",T)})}}),S.removedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){const u=i;u.classList.contains("k-animation-container")&&u.removeEventListener("keydown",T),u.querySelectorAll(".k-animation-container").forEach(A=>{A.removeEventListener("keydown",T)})}})})}),P.observe(document.body,{childList:!0,subtree:!0})},L=l=>{if(!l.type||!l)return;const S=l.target;if(S){if(l.code==="Escape"){const i=document.activeElement?.closest(".k-table-row[data-grid-row-index]");if(i){l.preventDefault(),l.stopPropagation();try{Array.from(e?.value.$el.querySelectorAll(".k-table-row[data-grid-row-index]")).forEach(f=>f.setAttribute("tabindex","-1"))}catch{}i.setAttribute("tabindex","0"),i.focus();return}}if(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Enter","Space"].includes(l.code)){if(l.preventDefault(),S.classList.contains("k-grid-header-menu")&&S.classList.contains("k-grid-column-menu")){n.value=S;return}const i=S.closest(".k-table-row[data-grid-row-index]");if(i){if(["ArrowDown","ArrowUp"].includes(l.code)){const u=(A,w)=>{let $=w==="next"?A.nextElementSibling:A.previousElementSibling;for(;$;){const Y=$;try{if(Y.hasAttribute&&Y.classList.contains("k-table-row"))return Y}catch{}$=w==="next"?$.nextElementSibling:$.previousElementSibling}return null},f=l.code==="ArrowDown"?u(i,"next"):u(i,"previous");f&&(i.setAttribute("tabindex","-1"),f.setAttribute("tabindex","0"),f.focus());return}if(["ArrowLeft","ArrowRight"].includes(l.code)){l.preventDefault();const u=i.querySelectorAll(N);if(u.length===0)return;let f=Array.from(u).findIndex(A=>A===document.activeElement);if(f===-1&&document.activeElement===i){u[0].focus();return}l.code==="ArrowRight"?f=f===u.length-1?0:f+1:l.code==="ArrowLeft"&&(f=f===u.length-1?f-1:u.length-1),u[f].focus();return}}}}},E=()=>{t.nextTick(()=>{const l=e.value.$el.closest(".k-grid");l&&l.classList.add("fk-grid")})},x=()=>{if(!F)try{const l=()=>{try{const u=Array.from(e.value.$el.querySelectorAll(".k-table-row[data-grid-row-index]"));if(!u||u.length===0||u.filter(w=>w.getAttribute("tabindex")==="0").length===1)return;const A=u.find(w=>w===document.activeElement||w.contains(document.activeElement));if(u.forEach(w=>w.setAttribute("tabindex","-1")),A){A.setAttribute("tabindex","0");return}u[0].setAttribute("tabindex","0")}catch(u){console.error("ensureSingleTabindex error:",u)}},S=Array.from(e.value.$el.querySelectorAll(".k-table-row[data-grid-row-index]"));S.length>0&&S.forEach((u,f)=>{u.setAttribute("tabindex",f===0?"0":"-1")});const i=e.value.$el.querySelector(".k-table-tbody");i&&(F=new MutationObserver(()=>{l()}),F.observe(i,{childList:!0,subtree:!0}))}catch(l){console.error("Error setting up row navigation:",l)}},I=()=>{t.nextTick(()=>{const S=document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");S&&S.forEach(i=>{i.setAttribute("role","button"),i.addEventListener("keydown",g)}),b(),h()})},O=()=>{const S=document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");S&&S.forEach(i=>{i.removeEventListener("keydown",g)}),P&&(P.disconnect(),P=null),F&&(F.disconnect(),F=null),U.forEach(i=>i()),U.length=0},h=()=>{document.querySelectorAll(".k-grid-header .k-table-thead th").forEach((i,u)=>{const f=i.querySelector(".k-grid-header-menu.k-grid-column-menu");if(!f)return;const A=p();if(A&&A[u]){const o=A[u].field??"";i.setAttribute("data-feather-k-field",o),i.setAttribute("data-feather-k-filterable",A[u].filterable===!1?"false":"true"),i.setAttribute("data-feather-k-sortable",A[u].sortable===!1?"false":"true")}const w=i.dataset.featherKFilterable!=="false",$=i.dataset.featherKSortable!=="false";f.setAttribute("tabindex","-1"),w||$?i.style.cursor="pointer":i.style.cursor="default",w?(i.setAttribute("tabindex","0"),i.setAttribute("role","button"),i.setAttribute("aria-haspopup","menu")):(i.setAttribute("tabindex","0"),i.setAttribute("role","columnheader"),i.removeAttribute("aria-haspopup"));const Y=o=>{o.target?.closest(".k-column-resizer")||(n.value=i,f.click())},a=o=>{if(w)n.value=i,o.preventDefault(),o.stopPropagation(),Y(o);else if($){n.value=i;const c=new KeyboardEvent("keydown",{key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0});i.dispatchEvent(c)}};i.addEventListener("click",a),U.push(()=>{i.removeEventListener("click",a)});const v=o=>{if((o.code==="Enter"||o.code==="Space")&&(w||$)){if(n.value=i,n.value.focus(),w)o.preventDefault(),o.stopPropagation(),Y(o);else if($){const c=i.querySelector(".k-link");c&&c.click()}}};i.addEventListener("keydown",v,!0),U.push(()=>{i.removeEventListener("keydown",v,!0)})});const S=document.querySelector(".k-grid-header .k-table-thead");if(S){const i=u=>{const f=u.target.closest("th");f&&(u.code==="Enter"||u.code==="Space")&&f.dataset.featherKFilterable==="false"&&f.dataset.featherKSortable==="false"&&(u.preventDefault(),u.stopImmediatePropagation())};S.addEventListener("keydown",i,!0),U.push(()=>{S.removeEventListener("keydown",i,!0)})}},D=function(l,S){const i=l?.event.event.target,u=p();if(!i||!u)return;const f=i.classList.contains("k-link"),A=i.classList.contains("k-columnmenu-item"),w=u.find($=>$.field===l.event.field)?.sortable&&!0;if(!f){if(A&&!w){(l.event.sort&&void 0)?.filter(Y=>Y.field!==l.event.field);return}typeof S=="function"&&t.nextTick(()=>{n.value&&n.value.focus(),S(l)})}},q=()=>{if(!d)try{E(),x(),I(),d=!0}catch(l){console.error("initA11y failed:",l),O()}};return t.onBeforeUnmount(()=>{O()}),{activeFilterButton:n,handleGridKeyDown:L,handleSortChange:D,initA11y:q}};function he(e){const n=t.ref(""),d=t.ref(void 0),P=t.ref(!!e.debug),F=t.ref(e.dateFormat??"mm/dd/yyyy"),U=["ArrowUp","ArrowDown"],N=["ArrowLeft","ArrowRight"],p=t.computed(()=>(n.value??"").replace(/\D/g,"")),g=a=>a<=2?"mm":a<=5?"dd":p.value.length<=10?"yyyy":"mm",T=t.computed(()=>{const a=n.value&&n.value.substring(0,2).replace(/\D/g,"0")||"0";return parseInt(a).toString().padStart(2,"0")}),b=t.computed(()=>{const a=n.value&&n.value.substring(3,5).replace(/\D/g,"0")||"0";return parseInt(a).toString().padStart(2,"0")}),L=t.computed(()=>{const a=n.value&&n.value.substring(6,10).replace(/\D/g,"0")||"0";return parseInt(a).toString().padStart(4,"0")}),E=a=>{if(p.value.length===0){e.onChange({value:null,event:a});return}if(p.value.length<8){e.onChange({value:null,event:a});return}if((n.value??"").length===10&&p.value.length===8){const[v,o,c]=n.value.split("/"),m=parseInt(v),k=parseInt(o),M=parseInt(c);if(D(M,m,k)){const H=new Date(M,m-1,k);x(H)?e.onChange({value:H,event:a}):e.onChange({value:null,event:a})}else e.onChange({value:null,event:a})}},x=a=>{const v=e.minDate?.value??void 0,o=e.maxDate?.value??void 0;return!(v&&a<v||o&&a>o)},I=t.computed(()=>{if((n.value??"").length===10&&p.value.length===8){const[a,v,o]=(n.value??"").split("/"),c=parseInt(a),m=parseInt(v),k=parseInt(o);if(D(k,c,m))return new Date(k,c-1,m)}return null}),O=t.computed(()=>(n.value??"").length===10&&p.value.length===8),h=(a,v)=>new Date(a,v,0).getDate(),D=(a,v,o)=>v>=1&&v<=12&&a>=1900&&o>=1&&o<=h(a,v),q=a=>{n.value=a.value;const v=a.event?.target;d.value=v?.selectionStart??0,E(a)},l=a=>{d.value=a.target.selectionStart??0},S=(a,v,o)=>{const c=v?.selectionStart??d.value??0;d.value=c;let m=parseInt(T.value),k=parseInt(b.value),M=parseInt(L.value);if(!(p.value.length>=8)||!D(M,m,k)){const s=new Date;m=s.getMonth()+1,k=s.getDate(),M=s.getFullYear(),n.value=`${String(m).padStart(2,"0")}/${String(k).padStart(2,"0")}/${String(M)}`;const y=new Date(M,m-1,k);e.onChange({value:x(y)?y:null,event:o}),t.nextTick(()=>{requestAnimationFrame(()=>{const C=document.getElementById(e.id),R=d.value??0;C&&(C.focus(),C.setSelectionRange(R,R))})});return}const B=g(c);if(B==="mm")m=a==="ArrowUp"?m<12?m+1:1:m>1?m-1:12;else if(B==="dd"){const s=new Date(M,m,0).getDate();k=a==="ArrowUp"?k<s?k+1:1:k>1?k-1:s}else B==="yyyy"&&(M=a==="ArrowUp"?M+1:Math.max(1,M-1));n.value=`${String(m).padStart(2,"0")}/${String(k).padStart(2,"0")}/${String(M)}`;const[V,Q,J]=n.value.split("/"),r=new Date(parseInt(J),parseInt(V)-1,parseInt(Q));r.toString()!=="Invalid Date"&&parseInt(J)>=1e3?e.onChange({value:x(r)?r:null,event:o}):e.onChange({value:null,event:o}),t.nextTick(()=>{requestAnimationFrame(()=>{const s=document.getElementById(e.id),y=d.value??0;s&&(s.focus(),s.setSelectionRange(y,y))})})},i=a=>{if(a.code==="Space"||a.key===" "){e.onShowCalendar(a);return}if(U.includes(a.key)){a.preventDefault();const v=a.target;S(a.key,v,a)}},u=a=>{a.preventDefault();const v=a.deltaY<0?"ArrowUp":"ArrowDown";S(v,a.target,a)},f=a=>{const v=a.target;if(N.includes(a.key)){d.value=v?.selectionStart??0;return}U.includes(a.key)&&(a.preventDefault(),d.value=v?.selectionStart??0)};e.externalValue&&t.watch(e.externalValue,a=>{if(a){const v=new Date(a);if(v.toString()!=="Invalid Date"){const o=(v.getMonth()+1).toString().padStart(2,"0"),c=v.getDate().toString().padStart(2,"0"),m=v.getFullYear().toString();n.value=`${o}/${c}/${m}`;return}}},{immediate:!0});const A=t.computed(()=>[["Date",`${T.value} / ${b.value} / ${L.value}`],["Digits only",p.value],["min",e.minDate?.value.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})??null],["max",e.maxDate?.value.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})??null]]),w=t.computed(()=>{if(!O.value)return!0;const a=I.value;return a?x(a):!1}),$=t.computed(()=>{if(w.value)return"";if(O.value&&!I.value)return`Must be in ${F.value} format.`;const a=e.minDate?.value?e.minDate.value.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):null,v=e.maxDate?.value?e.maxDate.value.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):null;return a&&v?`Must be between ${a} and ${v}.`:a?`Must be on or after ${a}.`:v?`Must be on or before ${v}.`:""}),Y=()=>{t.nextTick(()=>{const a=document.getElementById(e.id);if(!a){console.warn(`ID (#${e.id}) not found for styling.`);return}const v=a.closest(".k-datepicker");if(v)v.classList.add("fk-datepicker");else{console.warn(`.k-datepicker parent not found for #${e.id} styling.`);return}})};return t.onMounted(()=>{Y()}),{raw:n,cursorPos:d,debugEnabled:P,debugLines:A,placeholder:F,isValid:w,validationMessage:$,digitsOnly:p,month:t.readonly(T),day:t.readonly(b),year:t.readonly(L),datePart:g,handleChange:q,handleKeyDown:i,handleWheel:u,handleKeyUp:f,handleClick:l}}function ve(e){const n=t.ref(""),d=t.ref(void 0),P=t.ref(!!e.debug),F=t.ref(!1),U=t.computed(()=>(n.value??"").replace(/\D/g,"")),N=(r,s)=>new Date(r,s,0).getDate(),p=(r,s,y)=>s>=1&&s<=12&&r>=1e3&&y>=1&&y<=N(r,s),g=r=>{if(!r)return null;const s=e.min??new Date(-864e13),y=e.max??new Date(864e13);return r<s||r>y?null:r},T=(r,s)=>e.allowReverse??!1?!0:r<=s,b=t.computed(()=>(n.value?.length??0)>=23&&U.value.length>=16),L=r=>{if((r??"").length<23||U.value.length<16)return{start:null,end:null};const s=r.substring(0,10),y=r.substring(13,23),[C,R,W]=s.split("/").map(X=>parseInt(X||"0",10)),[oe,ee,te]=y.split("/").map(X=>parseInt(X||"0",10)),ne=new Date(W,C-1,R),ae=new Date(te,oe-1,ee),ue=p(W,C,R)&&ne.toString()!=="Invalid Date",ce=p(te,oe,ee)&&ae.toString()!=="Invalid Date";return{start:ue?ne:null,end:ce?ae:null}},E=e.externalValid??t.ref(void 0),x=t.computed(()=>L(n.value)),I=t.computed(()=>{const r=g(x.value.start),s=g(x.value.end);return{start:r,end:s}}),O=t.computed(()=>{if(!b.value)return;const r=I.value.start,s=I.value.end;if(!r||!s)return;const y=R=>Date.UTC(R.getFullYear(),R.getMonth(),R.getDate()),C=Math.abs(y(s)-y(r));return Math.round(C/864e5)}),h=t.computed(()=>{const{start:r,end:s}=x.value;if(!b.value)return;if(!r||!s||!I.value.start||!I.value.end)return!1;const y=I.value.start,C=I.value.end;return!(!T(y,C)||typeof e.maxSpanDays=="number"&&O.value!==void 0&&O.value>e.maxSpanDays)}),D=t.computed(()=>{const{start:r,end:s}=x.value;if(!b.value)return"incomplete";if(!r||!s)return"invalid-date";if(!I.value.start||!I.value.end)return"out-of-bounds";const y=I.value.start,C=I.value.end;return T(y,C)?typeof e.maxSpanDays=="number"&&O.value!==void 0&&O.value>e.maxSpanDays?"span-exceeds-limit":"valid":"reversed-range"}),q=t.computed(()=>{switch(D.value){case"invalid-date":return"Enter valid start and end dates.";case"out-of-bounds":return"Must be within the allowed range.";case"reversed-range":return"Must be in sequential order.";case"span-exceeds-limit":return typeof e.maxSpanDays=="number"?`Exceeds maximum of ${e.maxSpanDays} days.`:"Exceeds maximum allowed span.";case"valid":default:return""}});t.watch(h,r=>{(e.manageValid??!0)&&(E.value=r)},{immediate:!0});const l=["ArrowUp","ArrowDown"],S=["ArrowLeft","ArrowRight"],i=(r,s)=>String(r).padStart(s,"0"),u=r=>`${i(r.getMonth()+1,2)}/${i(r.getDate(),2)}/${i(r.getFullYear(),4)}`,f=r=>r<=2?{side:"start",part:"mm"}:r<=5?{side:"start",part:(r<=3,"dd")}:r<=11?{side:"start",part:"yyyy"}:r<=15?{side:"end",part:"mm"}:r<=18?{side:"end",part:"dd"}:{side:"end",part:"yyyy"},A=(r,s,y)=>{const C=s?.selectionStart??d.value??0;d.value=C;const{start:R,end:W}=L(n.value);if(!R&&!W){const K=new Date,_=u(K);n.value=`${_} - ${_}`,e.onChange({value:{start:K,end:K},event:y}),t.nextTick(()=>{requestAnimationFrame(()=>{const j=document.getElementById(e.id),G=d.value??0;j&&(j.focus(),j.setSelectionRange(G,G))})});return}const oe=new Date,ee=f(C);let te=R?new Date(R):new Date(oe),ne=W?new Date(W):new Date(oe);const ae=(K,_)=>{if(_==="mm"){const j=K.getMonth()+1,G=r==="ArrowUp"?j<12?j+1:1:j>1?j-1:12;K.setMonth(G-1);const le=N(K.getFullYear(),G);K.getDate()>le&&K.setDate(le)}else if(_==="dd"){const j=N(K.getFullYear(),K.getMonth()+1),G=K.getDate(),le=r==="ArrowUp"?G<j?G+1:1:G>1?G-1:j;K.setDate(le)}else if(_==="yyyy"){const j=K.getFullYear();K.setFullYear(r==="ArrowUp"?j+1:Math.max(1,j-1));const G=N(K.getFullYear(),K.getMonth()+1);K.getDate()>G&&K.setDate(G)}};ee.side==="start"?ae(te,ee.part):ae(ne,ee.part);const ue=u(te),ce=u(ne);n.value=`${ue} - ${ce}`;const X=g(te),de=g(ne);X&&de&&T(X,de)?e.onChange({value:{start:X,end:de},event:y}):e.onChange({value:null,event:y}),t.nextTick(()=>{requestAnimationFrame(()=>{const K=document.getElementById(e.id),_=d.value??0;K&&(K.focus(),K.setSelectionRange(_,_))})})},w=r=>{const{start:s,end:y}=L(n.value);if(!s||!y){e.onChange({value:null,event:r});return}const C=g(s),R=g(y);if(!C||!R){e.onChange({value:null,event:r});return}if(!T(C,R)){e.onChange({value:null,event:r});return}e.onChange({value:{start:C,end:R},event:r})},$=r=>{n.value=r.value;const s=r.event?.target;d.value=s?.selectionStart??0,w(r)},Y=r=>{d.value=r.target.selectionStart??0},a=r=>{if(r.code==="Space"||r.key===" "){r.preventDefault(),e.onShowCalendar(r);return}if(l.includes(r.key)){r.preventDefault();const s=r.target;A(r.key,s,r)}},v=r=>{r.preventDefault();const s=r.deltaY<0?"ArrowUp":"ArrowDown";A(s,r.target,r)},o=r=>{if(S.includes(r.key)||l.includes(r.key)){r.preventDefault();const s=r.target;d.value=s?.selectionStart??0}};e.externalValue&&t.watch(e.externalValue,r=>{const s=r?.start??null,y=r?.end??null;if(s&&y){if(n.value=`${u(s)} - ${u(y)}`,e.isOpen?.value&&F.value&&e.onRequestClose){const C=typeof e.closeDelay=="number"?e.closeDelay:e.closeDelay?.value??0;setTimeout(()=>{e.onRequestClose?.(),F.value=!1},C)}return}},{immediate:!0});const c=t.computed(()=>n.value&&n.value.substring(0,2).replace(/\D/g,"0")||"0"),m=t.computed(()=>n.value&&n.value.substring(3,5).replace(/\D/g,"0")||"0"),k=t.computed(()=>n.value&&n.value.substring(6,10).replace(/\D/g,"0")||"0"),M=t.computed(()=>n.value&&n.value.substring(13,15).replace(/\D/g,"0")||"0"),H=t.computed(()=>n.value&&n.value.substring(16,18).replace(/\D/g,"0")||"0"),B=t.computed(()=>n.value&&n.value.substring(19,23).replace(/\D/g,"0")||"0"),V=t.computed(()=>{const{start:r,end:s}=L(n.value);return[{label:"Raw",value:n.value},{label:"Start",value:`${String(c.value).padStart(2,"0")} / ${String(m.value).padStart(2,"0")} / ${String(k.value).padStart(4,"0")}`},{label:"End",value:`${String(M.value).padStart(2,"0")} / ${String(H.value).padStart(2,"0")} / ${String(B.value).padStart(4,"0")}`},{label:"Digits only",value:U.value},{label:"Mask complete",value:`${b.value}`},{label:"Parsed",value:`${r?r.toDateString():"-"} | ${s?s.toDateString():"-"}`},{label:"Valid (managed)",value:`${E.value??"-"}`},{label:"Span (days)",value:`${O.value??"-"}`},{label:"Reason",value:`${D.value??"-"}`},{label:"Cursor in",value:`${d.value??"-"} (${(()=>{const y=d.value??0,C=f(y);return`${C.side}.${C.part}`})()})`}]}),Q=()=>{t.nextTick(()=>{const r=document.getElementById(e.id);if(!r){console.warn(`#${e.id} not found for styling.`);return}const s=r.closest("div");s?s.classList.add("fk-daterangepicker"):console.warn(`Parent div of #${e.id} not found for styling.`)})};t.onMounted(()=>{Q()});const J=()=>{t.nextTick(()=>{try{const r=Array.from(document.querySelectorAll(".k-animation-container"));if(!r.length)return;const y=[...r].reverse().find(W=>W.querySelector(".k-calendar"))?.querySelector(".k-calendar");if(!y)return;const C=y.querySelectorAll(".k-calendar-table");let R=!1;C.forEach(W=>{W.tabIndex===0&&(R?W.tabIndex=-1:R=!0)})}catch(r){console.warn(r)}})};return e.isOpen&&t.watch(e.isOpen,r=>{r&&setTimeout(()=>J(),0)},{immediate:!1}),{raw:n,cursorPos:d,debugEnabled:P,debugLines:V,digitsOnly:U,valid:E,validComputed:t.readonly(h),reason:t.readonly(D),validationMessage:t.readonly(q),spanDays:t.readonly(O),month1:t.readonly(c),day1:t.readonly(m),year1:t.readonly(k),month2:t.readonly(M),day2:t.readonly(H),year2:t.readonly(B),handleChange:$,handleKeyDown:a,handleWheel:v,handleKeyUp:o,handleClick:Y,onCalendarChange:()=>{F.value=!0}}}function Se(e){const n=t.ref(""),d=t.ref(void 0),P=t.ref(!!e.debug),F=t.ref(e.timeFormat??"hh:mm AM"),U=["ArrowUp","ArrowDown"],N=["ArrowLeft","ArrowRight"],p=t.computed(()=>(n.value??"").replace(/\D/g,"")),g={H:/[0-9]/,h:/[0-9]/,M:/[0-9]/,m:/[0-9]/,A:/[AaPp]/,a:/[Mm]/},T=o=>o<=2?"hh":o<=5?"mm":"ampm",b=t.computed(()=>{const o=n.value&&n.value.substring(0,2).replace(/\D/g,"0")||"0",c=parseInt(o);return Math.min(Math.max(c,0),23)}),L=t.computed(()=>{const o=n.value&&n.value.substring(3,5).replace(/\D/g,"0")||"0",c=parseInt(o);return Math.min(Math.max(c,0),59)}),E=t.computed(()=>(n.value?.substring(6,8)||"AM").toUpperCase().startsWith("P")?"PM":"AM"),x=t.computed(()=>/^(\d{2}):(\d{2})\s([AP]M)$/i.test(n.value??"")),I=(o,c,m)=>{let k=o%12;return k===0&&(k=12),`${String(k).padStart(2,"0")}:${String(c).padStart(2,"0")} ${m}`},O=o=>{const c=o.match(/^(\d{2}):(\d{2})\s([AP]M)$/i);if(!c)return null;const m=parseInt(c[1]),k=parseInt(c[2]),M=c[3].toUpperCase();if(m<1||m>12||k<0||k>59)return null;let H=m%12;M==="PM"&&(H+=12);const B=new Date;return B.setSeconds(0,0),B.setHours(H),B.setMinutes(k),B},h=o=>{if(p.value.length===0){e.onChange({value:null,event:o});return}if(!x.value){e.onChange({value:null,event:o});return}const c=O(n.value);c&&q(c)?e.onChange({value:c,event:o}):e.onChange({value:null,event:o})},D=o=>o.getHours()*60+o.getMinutes(),q=o=>{const c=e.minTime?.value??void 0,m=e.maxTime?.value??void 0,k=D(o);if(c){const M=D(c);if(k<M)return!1}if(m){const M=D(m);if(k>M)return!1}return!0},l=o=>{n.value=o.value;const c=o.event?.target;d.value=c?.selectionStart??0;try{const m=d.value??0;if(T(m)==="ampm"&&(n.value??"").length>=8){const k=n.value.charAt(6);/[Aa]/.test(k)?(n.value=`${n.value.slice(0,6)}AM${n.value.slice(8)}`,t.nextTick(()=>{requestAnimationFrame(()=>{const M=document.getElementById(e.id);M&&(M.focus(),M.setSelectionRange(8,8))})})):/[Pp]/.test(k)&&(n.value=`${n.value.slice(0,6)}PM${n.value.slice(8)}`,t.nextTick(()=>{requestAnimationFrame(()=>{const M=document.getElementById(e.id);M&&(M.focus(),M.setSelectionRange(8,8))})}))}}catch{}h(o)},S=o=>{d.value=o.target.selectionStart??0},i=(o,c,m)=>{const k=c?.selectionStart??d.value??0;d.value=k;const M=T(k),H=(n.value??"").match(/^(\d{2}):(\d{2})\s([AP]M)$/i);if(!H){if((n.value??"").length===0||p.value.length===0){const r=new Date,s=r.getHours(),y=s>=12?"PM":"AM";n.value=I(s,r.getMinutes(),y);const C=O(n.value);C&&q(C)?e.onChange({value:C,event:m}):e.onChange({value:null,event:m}),t.nextTick(()=>{requestAnimationFrame(()=>{const R=document.getElementById(e.id),W=d.value??0;R&&(R.focus(),R.setSelectionRange(W,W))})})}return}let B=parseInt(H[1]),V=parseInt(H[2]),Q=H[3].toUpperCase();if(M==="hh")o==="ArrowUp"?B=B<12?B+1:1:B=B>1?B-1:12;else if(M==="mm"){const r=e.minuteStepRef?.value??e.minuteStep??1;if(r===1)o==="ArrowUp"?V=V<59?V+1:0:V=V>0?V-1:59;else if(o==="ArrowUp"){const s=V%r;let y=s===0?V+r:V+(r-s);y>=60&&(y=0),V=y}else{const s=V%r;let y=s===0?V-r:V-s;y<0&&(y=60-r),V=y}}else M==="ampm"&&(Q=Q==="AM"?"PM":"AM");n.value=`${String(B).padStart(2,"0")}:${String(V).padStart(2,"0")} ${Q}`;const J=O(n.value);J&&q(J)?e.onChange({value:J,event:m}):e.onChange({value:null,event:m}),t.nextTick(()=>{requestAnimationFrame(()=>{const r=document.getElementById(e.id),s=d.value??0;r&&(r.focus(),r.setSelectionRange(s,s))})})},u=o=>{if(o.code==="Space"||o.key===" "){e.onShowPicker(o);return}if(U.includes(o.key)){o.preventDefault();const c=o.target;i(o.key,c,o)}},f=o=>{o.preventDefault();const c=o.deltaY<0?"ArrowUp":"ArrowDown";i(c,o.target,o)},A=o=>{const c=o.target;if(N.includes(o.key)){d.value=c?.selectionStart??0;return}U.includes(o.key)&&(o.preventDefault(),d.value=c?.selectionStart??0)};e.externalValue&&t.watch(e.externalValue,o=>{if(o){const c=new Date(o);if(c.toString()!=="Invalid Date"){const m=c.getHours(),k=m>=12?"PM":"AM";n.value=I(m,c.getMinutes(),k);return}}},{immediate:!0});const w=t.computed(()=>[["Time",n.value||"--:-- --"],["Hour (12h)",b.value],["Minute",L.value],["Period",E.value],["Digits only",p.value],["min",e.minTime?.value.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})??null],["max",e.maxTime?.value.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})??null]]),$=t.computed(()=>O(n.value)??null),Y=t.computed(()=>{if(!x.value)return!0;const o=$.value;return o?q(o):!1}),a=t.computed(()=>{if(Y.value)return"";if(x.value&&!$.value)return`Must be in ${F.value} format.`;const o={hour:"2-digit",minute:"2-digit"},c=e.minTime?.value?e.minTime.value.toLocaleTimeString("en-US",o):null,m=e.maxTime?.value?e.maxTime.value.toLocaleTimeString("en-US",o):null;return c&&m?`Must be between ${c} and ${m}.`:c?`Must be ${c} or later.`:m?`Must be ${m} or earlier.`:""}),v=()=>{t.nextTick(()=>{const o=document.getElementById(e.id);if(!o){console.warn(`#${e.id} not found for styling.`);return}const c=o.closest(".k-timepicker");c?c.classList.add("fk-timepicker"):console.warn(`.k-timepicker parent of #${e.id} not found for styling.`)})};return t.onMounted(()=>{v()}),{raw:n,rules:g,debugEnabled:P,debugLines:w,placeholder:F,isValid:Y,validationMessage:a,isComplete:x,inRangeTime:q,hour:t.readonly(b),minute:t.readonly(L),period:t.readonly(E),handleChange:l,handleKeyDown:u,handleKeyUp:A,handleClick:S,handleWheel:f}}function be(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const fe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const we=Object.prototype.toString,ke=e=>we.call(e)==="[object Object]",Z=()=>{},De=Ae();function Ae(){var e,n;return fe&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window?.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ie(e){return Array.isArray(e)?e:[e]}function Ee(e,n,d){return t.watch(e,n,{...d,immediate:!0})}const me=fe?window:void 0;function re(e){var n;const d=t.toValue(e);return(n=d?.$el)!=null?n:d}function se(...e){const n=[],d=()=>{n.forEach(p=>p()),n.length=0},P=(p,g,T,b)=>(p.addEventListener(g,T,b),()=>p.removeEventListener(g,T,b)),F=t.computed(()=>{const p=ie(t.toValue(e[0])).filter(g=>g!=null);return p.every(g=>typeof g!="string")?p:void 0}),U=Ee(()=>{var p,g;return[(g=(p=F.value)==null?void 0:p.map(T=>re(T)))!=null?g:[me].filter(T=>T!=null),ie(t.toValue(F.value?e[1]:e[0])),ie(t.unref(F.value?e[2]:e[1])),t.toValue(F.value?e[3]:e[2])]},([p,g,T,b])=>{if(d(),!p?.length||!g?.length||!T?.length)return;const L=ke(b)?{...b}:b;n.push(...p.flatMap(E=>g.flatMap(x=>T.map(I=>P(E,x,I,L)))))},{flush:"post"}),N=()=>{U(),d()};return be(d),N}let pe=!1;function xe(e,n,d={}){const{window:P=me,ignore:F=[],capture:U=!0,detectIframe:N=!1,controls:p=!1}=d;if(!P)return p?{stop:Z,cancel:Z,trigger:Z}:Z;if(De&&!pe){pe=!0;const h={passive:!0};Array.from(P.document.body.children).forEach(D=>D.addEventListener("click",Z,h)),P.document.documentElement.addEventListener("click",Z,h)}let g=!0;const T=h=>t.toValue(F).some(D=>{if(typeof D=="string")return Array.from(P.document.querySelectorAll(D)).some(q=>q===h.target||h.composedPath().includes(q));{const q=re(D);return q&&(h.target===q||h.composedPath().includes(q))}});function b(h){const D=t.toValue(h);return D&&D.$.subTree.shapeFlag===16}function L(h,D){const q=t.toValue(h),l=q.$.subTree&&q.$.subTree.children;return l==null||!Array.isArray(l)?!1:l.some(S=>S.el===D.target||D.composedPath().includes(S.el))}const E=h=>{const D=re(e);if(h.target!=null&&!(!(D instanceof Element)&&b(e)&&L(e,h))&&!(!D||D===h.target||h.composedPath().includes(D))){if("detail"in h&&h.detail===0&&(g=!T(h)),!g){g=!0;return}n(h)}};let x=!1;const I=[se(P,"click",h=>{x||(x=!0,setTimeout(()=>{x=!1},0),E(h))},{passive:!0,capture:U}),se(P,"pointerdown",h=>{const D=re(e);g=!T(h)&&!!(D&&!h.composedPath().includes(D))},{passive:!0}),N&&se(P,"blur",h=>{setTimeout(()=>{var D;const q=re(e);((D=P.document.activeElement)==null?void 0:D.tagName)==="IFRAME"&&!q?.contains(P.document.activeElement)&&n(h)},0)},{passive:!0})].filter(Boolean),O=()=>I.forEach(h=>h());return p?{stop:O,cancel:()=>{g=!1},trigger:h=>{g=!0,E(h),g=!1}}:O}function Me(e){const n=t.shallowRef(null),d=[".k-animation-container .k-popup",".k-popup",".k-timepicker-popup",".k-menu-popup"],P=Array.isArray(e.popupSelector)?e.popupSelector:[e.popupSelector??d].flat(),F=b=>b?typeof e.initialFocus=="string"?b.querySelector(e.initialFocus)??b:typeof e.initialFocus=="function"?e.initialFocus(b)??b:b.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')??b:null,{activate:U,deactivate:N}=ye.useFocusTrap(n,{escapeDeactivates:!1,clickOutsideDeactivates:!1,fallbackFocus:()=>n.value,initialFocus:()=>F(n.value),...e.focusTrapOptions??{}});let p=null,g=t.ref(null);const T=()=>{if(e.resolvePopupEl)return e.resolvePopupEl();const b=(E,x)=>{const I=Array.from(E.querySelectorAll(x));if(!I.length)return null;const O=I.filter(h=>h.offsetParent!==null||h.getClientRects().length>0);return O[O.length-1]??I[I.length-1]??null},L=e.triggerEl?.value?.closest?.(".k-animation-container")??document.body;for(const E of P){const x=b(L,E);if(x)return x}for(const E of P){const x=b(document,E);if(x)return x}return null};return xe(n,b=>{g.value="outside",e.isOpen.value&&e.onRequestClose?.("outside",b)}),t.watch(()=>e.isOpen.value,b=>{b?(g.value=null,t.nextTick(()=>{const L=T();L&&(n.value=L,setTimeout(()=>U(),0),p||(p=E=>{E.key==="Escape"&&(g.value="escape",e.isOpen.value&&e.onRequestClose?.("escape",E))},document.addEventListener("keydown",p,!0)))})):(N(),p&&(document.removeEventListener("keydown",p,!0),p=null),n.value=null,g.value==="outside"&&t.nextTick(()=>{const L=()=>{const E=e.triggerEl?.value,x=E?.querySelector("input"),I=document.activeElement;I&&(I===x||E&&E.contains(I))&&(x??E)?.blur?.()};requestAnimationFrame(()=>setTimeout(L,0))}),e.returnFocusToTrigger!==!1&&g.value==="escape"&&e.triggerEl?.value&&(console.log("Returning focus to trigger element:",e.triggerEl.value),t.nextTick(()=>{const L=()=>{const E=e.triggerEl?.value;if(!E)return;(E.querySelector("input")??E)?.focus?.()};requestAnimationFrame(()=>setTimeout(L,0))})))}),{popupRef:n,activate:U,deactivate:N,lastCloseReason:t.readonly(g),setPopupEl:b=>n.value=b}}z.useGridA11y=ge,z.useMaskedDateInput=he,z.useMaskedDateRangeInput=ve,z.useMaskedTimeInput=Se,z.usePopupTrap=Me,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(Q,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@vueuse/integrations/useFocusTrap")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/integrations/useFocusTrap"],t):(Q=typeof globalThis<"u"?globalThis:Q||self,t(Q.FeatherKComposables={},Q.Vue,Q.useFocusTrap))})(this,(function(Q,t,we){"use strict";const ke=e=>{const r=t.ref(null);let f=!1,q=null,F=null;const V=[],N=".k-table-row[data-grid-row-index] [tabindex]",E=()=>e?.value?.columns,D=l=>{const d=l.key||l.code;[" ","Spacebar","Space","Enter"].includes(d)&&(l.preventDefault(),l.stopPropagation(),r.value=l.target,l.target.click())},v=l=>{if(!r.value)return;if(l.code==="Escape"){l.preventDefault(),l.stopPropagation(),r.value&&r.value.focus();return}const d=Array.from(document.querySelectorAll(".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item")),i=document.querySelector(".k-filter-menu-container");if(i){if(l.code==="Tab"){const s=[".k-filter-menu-container .k-dropdownlist[tabindex='0']",".k-filter-menu-container input.k-input-inner:not([tabindex='-1']):not([disabled])",".k-filter-menu-container button:not([tabindex='-1']):not([disabled])"],p=Array.from(i.querySelectorAll(s.join(",")));if(p.length===0)return;const M=p.findIndex(P=>P===document.activeElement);let k;M===-1?k=0:l.shiftKey?k=(M-1+p.length)%p.length:k=(M+1)%p.length,l.preventDefault(),l.stopPropagation(),p[k]?.focus();return}}else if(l.code==="ArrowUp"||l.code==="ArrowDown"){l.preventDefault(),l.stopPropagation();const s=d.findIndex(M=>M===document.activeElement);let p=s;l.code==="ArrowUp"?p=s>0?s-1:d.length-1:l.code==="ArrowDown"&&(p=s<d.length-1?s+1:0),d[p]?.focus();return}l.code==="Tab"&&(l.preventDefault(),l.stopPropagation(),l.shiftKey?(r.value?.previousElementSibling).focus():(r.value?.nextElementSibling).focus())},A=()=>{q=new MutationObserver(l=>{l.forEach(d=>{d.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){const s=i;if(s.classList.contains("k-animation-container")){const M=r.value;M&&(M.dataset.featherKSortable==="true"||t.nextTick(()=>{s.querySelectorAll(".k-columnmenu-item-wrapper").forEach(H=>{H.textContent?.toLowerCase().includes("sort")&&H.remove()})})),s.addEventListener("keydown",v),t.nextTick(()=>{const k=()=>{const P=Array.from(s.querySelectorAll(".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"));if(P.length===1)P[0].focus(),P[0].click(),k.attempts=0;else if(P.length>1){k.attempts=0;return}else k.attempts===void 0&&(k.attempts=0),k.attempts++<3&&setTimeout(k,200)};k()})}s.querySelectorAll(".k-animation-container").forEach(M=>{M.addEventListener("keydown",v)})}}),d.removedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){const s=i;s.classList.contains("k-animation-container")&&s.removeEventListener("keydown",v),s.querySelectorAll(".k-animation-container").forEach(M=>{M.removeEventListener("keydown",v)})}})})}),q.observe(document.body,{childList:!0,subtree:!0})},$=l=>{if(!l.type||!l)return;const d=l.target;if(d){if(l.code==="Escape"){const i=document.activeElement?.closest(".k-table-row[data-grid-row-index]");if(i){l.preventDefault(),l.stopPropagation();try{Array.from(e?.value.$el.querySelectorAll(".k-table-row[data-grid-row-index]")).forEach(p=>p.setAttribute("tabindex","-1"))}catch{}i.setAttribute("tabindex","0"),i.focus();return}}if(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Enter","Space"].includes(l.code)){if(l.preventDefault(),d.classList.contains("k-grid-header-menu")&&d.classList.contains("k-grid-column-menu")){r.value=d;return}const i=d.closest(".k-table-row[data-grid-row-index]");if(i){if(["ArrowDown","ArrowUp"].includes(l.code)){const s=(M,k)=>{let P=k==="next"?M.nextElementSibling:M.previousElementSibling;for(;P;){const H=P;try{if(H.hasAttribute&&H.classList.contains("k-table-row"))return H}catch{}P=k==="next"?P.nextElementSibling:P.previousElementSibling}return null},p=l.code==="ArrowDown"?s(i,"next"):s(i,"previous");p&&(i.setAttribute("tabindex","-1"),p.setAttribute("tabindex","0"),p.focus());return}if(["ArrowLeft","ArrowRight"].includes(l.code)){l.preventDefault();const s=i.querySelectorAll(N);if(s.length===0)return;let p=Array.from(s).findIndex(M=>M===document.activeElement);if(p===-1&&document.activeElement===i){s[0].focus();return}l.code==="ArrowRight"?p=p===s.length-1?0:p+1:l.code==="ArrowLeft"&&(p=p===s.length-1?p-1:s.length-1),s[p].focus();return}}}}},x=()=>{t.nextTick(()=>{const l=e.value.$el.closest(".k-grid");l&&l.classList.add("fk-grid")})},w=()=>{if(!F)try{const l=()=>{try{const s=Array.from(e.value.$el.querySelectorAll(".k-table-row[data-grid-row-index]"));if(!s||s.length===0||s.filter(k=>k.getAttribute("tabindex")==="0").length===1)return;const M=s.find(k=>k===document.activeElement||k.contains(document.activeElement));if(s.forEach(k=>k.setAttribute("tabindex","-1")),M){M.setAttribute("tabindex","0");return}s[0].setAttribute("tabindex","0")}catch(s){console.error("ensureSingleTabindex error:",s)}},d=Array.from(e.value.$el.querySelectorAll(".k-table-row[data-grid-row-index]"));d.length>0&&d.forEach((s,p)=>{s.setAttribute("tabindex",p===0?"0":"-1")});const i=e.value.$el.querySelector(".k-table-tbody");i&&(F=new MutationObserver(()=>{l()}),F.observe(i,{childList:!0,subtree:!0}))}catch(l){console.error("Error setting up row navigation:",l)}},L=()=>{t.nextTick(()=>{const d=document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");d&&d.forEach(i=>{i.setAttribute("role","button"),i.addEventListener("keydown",D)}),A(),m()})},C=()=>{const d=document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");d&&d.forEach(i=>{i.removeEventListener("keydown",D)}),q&&(q.disconnect(),q=null),F&&(F.disconnect(),F=null),V.forEach(i=>i()),V.length=0},m=()=>{document.querySelectorAll(".k-grid-header .k-table-thead th").forEach((i,s)=>{const p=i.querySelector(".k-grid-header-menu.k-grid-column-menu");if(!p)return;const M=E();if(M&&M[s]){const K=M[s].field??"";i.setAttribute("data-feather-k-field",K),i.setAttribute("data-feather-k-filterable",M[s].filterable===!1?"false":"true"),i.setAttribute("data-feather-k-sortable",M[s].sortable===!1?"false":"true")}const k=i.dataset.featherKFilterable!=="false",P=i.dataset.featherKSortable!=="false";p.setAttribute("tabindex","-1"),k||P?i.style.cursor="pointer":i.style.cursor="default",k?(i.setAttribute("tabindex","0"),i.setAttribute("role","button"),i.setAttribute("aria-haspopup","menu")):(i.setAttribute("tabindex","0"),i.setAttribute("role","columnheader"),i.removeAttribute("aria-haspopup"));const H=K=>{K.target?.closest(".k-column-resizer")||(r.value=i,p.click())},G=K=>{if(k)r.value=i,K.preventDefault(),K.stopPropagation(),H(K);else if(P){r.value=i;const Z=new KeyboardEvent("keydown",{key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0});i.dispatchEvent(Z)}};i.addEventListener("click",G),V.push(()=>{i.removeEventListener("click",G)});const X=K=>{if((K.code==="Enter"||K.code==="Space")&&(k||P)){if(r.value=i,r.value.focus(),k)K.preventDefault(),K.stopPropagation(),H(K);else if(P){const Z=i.querySelector(".k-link");Z&&Z.click()}}};i.addEventListener("keydown",X,!0),V.push(()=>{i.removeEventListener("keydown",X,!0)})});const d=document.querySelector(".k-grid-header .k-table-thead");if(d){const i=s=>{const p=s.target.closest("th");p&&(s.code==="Enter"||s.code==="Space")&&p.dataset.featherKFilterable==="false"&&p.dataset.featherKSortable==="false"&&(s.preventDefault(),s.stopImmediatePropagation())};d.addEventListener("keydown",i,!0),V.push(()=>{d.removeEventListener("keydown",i,!0)})}},S=function(l,d){const i=l?.event.event.target,s=E();if(!i||!s)return;const p=i.classList.contains("k-link"),M=i.classList.contains("k-columnmenu-item"),k=s.find(P=>P.field===l.event.field)?.sortable&&!0;if(!p){if(M&&!k){(l.event.sort&&void 0)?.filter(H=>H.field!==l.event.field);return}typeof d=="function"&&t.nextTick(()=>{r.value&&r.value.focus(),d(l)})}},O=()=>{if(!f)try{x(),w(),L(),f=!0}catch(l){console.error("initA11y failed:",l),C()}};return t.onBeforeUnmount(()=>{C()}),{activeFilterButton:r,handleGridKeyDown:$,handleSortChange:S,initA11y:O}};function De(e){const r=t.ref(""),f=t.ref(void 0),q=t.ref(!!e.debug),F=t.ref(e.dateFormat??"mm/dd/yyyy"),V=t.computed(()=>!!e.required),N=t.ref(!1),E=["ArrowUp","ArrowDown"],D=["ArrowLeft","ArrowRight"],v=t.computed(()=>(r.value??"").replace(/\D/g,"")),A=a=>a<=2?"mm":a<=5?"dd":v.value.length<=10?"yyyy":"mm",$=t.computed(()=>{const a=r.value&&r.value.substring(0,2).replace(/\D/g,"0")||"0";return parseInt(a).toString().padStart(2,"0")}),x=t.computed(()=>{const a=r.value&&r.value.substring(3,5).replace(/\D/g,"0")||"0";return parseInt(a).toString().padStart(2,"0")}),w=t.computed(()=>{const a=r.value&&r.value.substring(6,10).replace(/\D/g,"0")||"0";return parseInt(a).toString().padStart(4,"0")}),L=a=>{if(v.value.length===0){e.onChange({value:null,event:a});return}if(v.value.length<8){e.onChange({value:null,event:a});return}if((r.value??"").length===10&&v.value.length===8){const[y,o,u]=r.value.split("/"),g=parseInt(y),h=parseInt(o),T=parseInt(u);if(l(T,g,h)){const _=new Date(T,g-1,h);C(_)?e.onChange({value:_,event:a}):e.onChange({value:null,event:a})}else e.onChange({value:null,event:a})}},C=a=>{const y=e.min??void 0,o=e.max??void 0;return!(y&&a<y||o&&a>o)},m=t.computed(()=>{if((r.value??"").length===10&&v.value.length===8){const[a,y,o]=(r.value??"").split("/"),u=parseInt(a),g=parseInt(y),h=parseInt(o);if(l(h,u,g))return new Date(h,u-1,g)}return null}),S=t.computed(()=>(r.value??"").length===10&&v.value.length===8),O=(a,y)=>new Date(a,y,0).getDate(),l=(a,y,o)=>y>=1&&y<=12&&a>=1900&&o>=1&&o<=O(a,y),d=a=>{r.value=a.value;const y=a.event?.target;f.value=y?.selectionStart??0,L(a)},i=a=>{f.value=a.target.selectionStart??0},s=(a,y,o)=>{const u=y?.selectionStart??f.value??0;f.value=u;let g=parseInt($.value),h=parseInt(x.value),T=parseInt(w.value);if(!(v.value.length>=8)||!l(T,g,h)){const R=e.defaultValue??new Date;g=R.getMonth()+1,h=R.getDate(),T=R.getFullYear(),r.value=`${String(g).padStart(2,"0")}/${String(h).padStart(2,"0")}/${String(T)}`;const n=new Date(T,g-1,h);e.onChange({value:C(n)?n:null,event:o}),t.nextTick(()=>{requestAnimationFrame(()=>{const c=document.getElementById(e.id),b=f.value??0;c&&(c.focus(),c.setSelectionRange(b,b))})});return}const W=A(u);if(W==="mm")g=a==="ArrowUp"?g<12?g+1:1:g>1?g-1:12;else if(W==="dd"){const R=new Date(T,g,0).getDate();h=a==="ArrowUp"?h<R?h+1:1:h>1?h-1:R}else W==="yyyy"&&(T=a==="ArrowUp"?T+1:Math.max(1,T-1));r.value=`${String(g).padStart(2,"0")}/${String(h).padStart(2,"0")}/${String(T)}`;const[B,ne,re]=r.value.split("/"),Y=new Date(parseInt(re),parseInt(B)-1,parseInt(ne));Y.toString()!=="Invalid Date"&&parseInt(re)>=1e3?e.onChange({value:C(Y)?Y:null,event:o}):e.onChange({value:null,event:o}),t.nextTick(()=>{requestAnimationFrame(()=>{const R=document.getElementById(e.id),n=f.value??0;R&&(R.focus(),R.setSelectionRange(n,n))})})},p=a=>{if(a.code==="Space"||a.key===" "){e.onShowCalendar(a);return}if(E.includes(a.key)){a.preventDefault();const y=a.target;s(a.key,y,a)}},M=a=>{a.preventDefault();const y=a.deltaY<0?"ArrowUp":"ArrowDown";s(y,a.target,a)},k=a=>{const y=a.target;if(D.includes(a.key)){f.value=y?.selectionStart??0;return}E.includes(a.key)&&(a.preventDefault(),f.value=y?.selectionStart??0)},P=a=>{N.value=!0,V.value&&!e.defaultValue&&e.externalValue&&e.externalValue.value===void 0&&v.value.length===0&&(e.externalValue.value="");const y=a.target;y&&(f.value=y.selectionStart??0)};e.externalValue&&t.watch(e.externalValue,a=>{if(a){const y=new Date(a);if(y.toString()!=="Invalid Date"){const o=(y.getMonth()+1).toString().padStart(2,"0"),u=y.getDate().toString().padStart(2,"0"),g=y.getFullYear().toString();r.value=`${o}/${u}/${g}`;return}}},{immediate:!0});const H=t.computed(()=>[["Date",`${$.value} / ${x.value} / ${w.value}`],["Digits only",v.value],["min",e.min?.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})??null],["max",e.max?.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})??null]]),G=t.computed(()=>{if(!V.value){if(!S.value)return!0;const y=m.value;return y?C(y):!1}if(!N.value)return!0;const a=m.value;return!S.value||!a?!1:C(a)}),X=t.computed(()=>{if(!V.value){if(!S.value)return;const y=m.value;return y?C(y)?"valid":"out-of-bounds":"invalid-date"}if(!N.value)return;if(v.value.length===0||!S.value)return"incomplete";const a=m.value;return a?C(a)?"valid":"out-of-bounds":"invalid-date"}),K=t.computed(()=>{const a=X.value;if(!a||a==="valid")return"";if(a==="incomplete")return"Required";if(a==="invalid-date")return`Must be in ${F.value} format.`;const y=e.min?e.min.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):null,o=e.max?e.max.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):null;if(a==="out-of-bounds"){if(y&&o)return`Must be between ${y} and ${o}.`;if(y)return`Must be on or after ${y}.`;if(o)return`Must be on or before ${o}.`}return""}),Z=()=>{t.nextTick(()=>{const a=document.getElementById(e.id);if(!a){console.warn(`ID (#${e.id}) not found for styling.`);return}const y=a.closest(".k-datepicker");if(y)y.classList.add("fk-datepicker");else{console.warn(`.k-datepicker parent not found for #${e.id} styling.`);return}})};return t.onMounted(()=>{Z()}),{raw:r,cursorPos:f,debugEnabled:q,debugLines:H,placeholder:F,isValid:G,reason:t.readonly(X),validationMessage:K,digitsOnly:v,month:t.readonly($),day:t.readonly(x),year:t.readonly(w),datePart:A,handleChange:d,handleKeyDown:p,handleWheel:M,handleKeyUp:k,handleClick:i,handleBlur:P}}function Ae(e){const r=t.ref(""),f=t.ref(void 0),q=t.ref(!!e.debug),F=t.ref(!1),N=365*(1440*60*1e3),E=new Date,D=new Date(E.getTime()-N),v=new Date(E.getTime()+N);e.min=e.min??D,e.max=e.max??v;const A=t.computed(()=>(r.value??"").replace(/\D/g,"")),$=(n,c)=>new Date(n,c,0).getDate(),x=(n,c,b)=>c>=1&&c<=12&&n>=1e3&&b>=1&&b<=$(n,c),w=n=>Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),L=n=>{if(!n)return null;const c=e.min,b=e.max,I=w(n);return I<w(c)||I>w(b)?null:n},C=(n,c)=>e.allowReverse??!1?!0:n<=c,m=t.computed(()=>(r.value?.length??0)>=23&&A.value.length>=16),S=n=>{if((n??"").length<23||A.value.length<16)return{start:null,end:null};const c=n.substring(0,10),b=n.substring(13,23),[I,j,ee]=c.split("/").map(oe=>parseInt(oe||"0",10)),[ce,le,ie]=b.split("/").map(oe=>parseInt(oe||"0",10)),se=new Date(ee,I-1,j),de=new Date(ie,ce-1,le),ye=x(ee,I,j)&&se.toString()!=="Invalid Date",ge=x(ie,ce,le)&&de.toString()!=="Invalid Date";return{start:ye?se:null,end:ge?de:null}},O=e.externalValid??t.ref(void 0),l=t.computed(()=>S(r.value)),d=t.computed(()=>{const n=L(l.value.start),c=L(l.value.end);return{start:n,end:c}}),i=t.computed(()=>{if(!m.value)return;const n=d.value.start,c=d.value.end;if(!n||!c)return;const b=j=>Date.UTC(j.getFullYear(),j.getMonth(),j.getDate()),I=Math.abs(b(c)-b(n));return Math.round(I/864e5)}),s=t.computed(()=>{const{start:n,end:c}=l.value;if(!m.value)return;if(!n||!c||!d.value.start||!d.value.end)return!1;const b=d.value.start,I=d.value.end;return!(!C(b,I)||typeof e.maxSpanDays=="number"&&i.value!==void 0&&i.value>e.maxSpanDays)}),p=t.computed(()=>{const{start:n,end:c}=l.value;if(!m.value)return"incomplete";if(!n||!c)return"invalid-date";if(!d.value.start||!d.value.end)return"out-of-bounds";const b=d.value.start,I=d.value.end;return C(b,I)?typeof e.maxSpanDays=="number"&&i.value!==void 0&&i.value>e.maxSpanDays?"span-exceeds-limit":"valid":"reversed-range"}),M=t.computed(()=>{const{start:n,end:c}=l.value,{min:b,max:I}=e;switch(console.table({start:n,end:c,min:b,max:I}),p.value){case"incomplete":return"Required";case"invalid-date":return"One or both dates invalid.";case"reversed-range":return"End Date must be on or after Start Date.";case"out-of-bounds":return n&&c&&(w(n)<w(b)||w(c)<w(b)||w(n)>w(I)||w(c)>w(I))?`Dates must be between ${G(b)} and ${G(I)}.`:"Dates must be within the allowed range.";case"span-exceeds-limit":return typeof e.maxSpanDays=="number"?`Date range exceeds ${e.maxSpanDays} days.`:"Date range exceeds maximum allowed span.";case"valid":default:return""}});t.watch(s,n=>{(e.manageValid??!0)&&(O.value=n)},{immediate:!0});const k=["ArrowUp","ArrowDown"],P=["ArrowLeft","ArrowRight"],H=(n,c)=>String(n).padStart(c,"0"),G=n=>`${H(n.getMonth()+1,2)}/${H(n.getDate(),2)}/${H(n.getFullYear(),4)}`,X=n=>n<=2?{side:"start",part:"mm"}:n<=5?{side:"start",part:(n<=3,"dd")}:n<=11?{side:"start",part:"yyyy"}:n<=15?{side:"end",part:"mm"}:n<=18?{side:"end",part:"dd"}:{side:"end",part:"yyyy"},K=(n,c,b)=>{const I=c?.selectionStart??f.value??0;f.value=I;const{start:j,end:ee}=S(r.value);if(!j&&!ee){const U=new Date,te=G(U);r.value=`${te} - ${te}`,e.onChange({value:{start:U,end:U},event:b}),t.nextTick(()=>{requestAnimationFrame(()=>{const z=document.getElementById(e.id),J=f.value??0;z&&(z.focus(),z.setSelectionRange(J,J))})});return}const ce=new Date,le=X(I);let ie=j?new Date(j):new Date(ce),se=ee?new Date(ee):new Date(ce);const de=(U,te)=>{if(te==="mm"){const z=U.getMonth()+1,J=n==="ArrowUp"?z<12?z+1:1:z>1?z-1:12;U.setMonth(J-1);const fe=$(U.getFullYear(),J);U.getDate()>fe&&U.setDate(fe)}else if(te==="dd"){const z=$(U.getFullYear(),U.getMonth()+1),J=U.getDate(),fe=n==="ArrowUp"?J<z?J+1:1:J>1?J-1:z;U.setDate(fe)}else if(te==="yyyy"){const z=U.getFullYear();U.setFullYear(n==="ArrowUp"?z+1:Math.max(1,z-1));const J=$(U.getFullYear(),U.getMonth()+1);U.getDate()>J&&U.setDate(J)}};le.side==="start"?de(ie,le.part):de(se,le.part);const ye=G(ie),ge=G(se);r.value=`${ye} - ${ge}`;const oe=L(ie),he=L(se);oe&&he&&C(oe,he)?e.onChange({value:{start:oe,end:he},event:b}):e.onChange({value:null,event:b}),t.nextTick(()=>{requestAnimationFrame(()=>{const U=document.getElementById(e.id),te=f.value??0;U&&(U.focus(),U.setSelectionRange(te,te))})})},Z=n=>{const{start:c,end:b}=S(r.value);if(!c||!b){e.onChange({value:null,event:n});return}const I=L(c),j=L(b);if(!I||!j){e.onChange({value:null,event:n});return}if(!C(I,j)){e.onChange({value:null,event:n});return}e.onChange({value:{start:I,end:j},event:n})},a=n=>{r.value=n.value;const c=n.event?.target;f.value=c?.selectionStart??0,Z(n)},y=n=>{f.value=n.target.selectionStart??0},o=n=>{if(n.code==="Space"||n.key===" "){n.preventDefault(),e.onShowCalendar(n);return}if(n.key==="ArrowDown"&&n.altKey){n.preventDefault(),e.onShowCalendar(n);return}if(k.includes(n.key)){n.preventDefault();const c=n.target;K(n.key,c,n)}},u=n=>{n.preventDefault();const c=n.deltaY<0?"ArrowUp":"ArrowDown";K(c,n.target,n)},g=n=>{if(P.includes(n.key)||k.includes(n.key)){n.preventDefault();const c=n.target;f.value=c?.selectionStart??0}};e.externalValue&&t.watch(e.externalValue,n=>{const c=n?.start??null,b=n?.end??null;if(c&&b){if(r.value=`${G(c)} - ${G(b)}`,e.isOpen?.value&&F.value&&e.onRequestClose){const I=typeof e.closeDelay=="number"?e.closeDelay:e.closeDelay?.value??0;setTimeout(()=>{e.onRequestClose?.(),F.value=!1},I)}return}},{immediate:!0});const h=t.computed(()=>r.value&&r.value.substring(0,2).replace(/\D/g,"0")||"0"),T=t.computed(()=>r.value&&r.value.substring(3,5).replace(/\D/g,"0")||"0"),_=t.computed(()=>r.value&&r.value.substring(6,10).replace(/\D/g,"0")||"0"),W=t.computed(()=>r.value&&r.value.substring(13,15).replace(/\D/g,"0")||"0"),B=t.computed(()=>r.value&&r.value.substring(16,18).replace(/\D/g,"0")||"0"),ne=t.computed(()=>r.value&&r.value.substring(19,23).replace(/\D/g,"0")||"0"),re=t.computed(()=>{const{start:n,end:c}=S(r.value);return[{label:"Raw",value:r.value},{label:"Min Date",value:`${e.min?e.min.toDateString():"-"}`},{label:"Max Date",value:`${e.max?e.max.toDateString():"-"}`},{label:"Start",value:`${String(h.value).padStart(2,"0")} / ${String(T.value).padStart(2,"0")} / ${String(_.value).padStart(4,"0")}`},{label:"End",value:`${String(W.value).padStart(2,"0")} / ${String(B.value).padStart(2,"0")} / ${String(ne.value).padStart(4,"0")}`},{label:"Digits only",value:A.value},{label:"Mask complete",value:`${m.value}`},{label:"Parsed",value:`${n?n.toDateString():"-"} | ${c?c.toDateString():"-"}`},{label:"Valid (managed)",value:`${O.value??"-"}`},{label:"Span (days)",value:`${i.value??"-"}`},{label:"Reason",value:`${p.value??"-"}`},{label:"Cursor in",value:`${f.value??"-"} (${(()=>{const b=f.value??0,I=X(b);return`${I.side}.${I.part}`})()})`}]}),Y=()=>{t.nextTick(()=>{const n=document.getElementById(e.id);if(!n){console.warn(`#${e.id} not found for styling.`);return}const c=n.closest("div");c?c.classList.add("fk-daterangepicker"):console.warn(`Parent div of #${e.id} not found for styling.`)})};t.onMounted(()=>{Y()});const R=()=>{t.nextTick(()=>{try{const n=Array.from(document.querySelectorAll(".k-animation-container"));if(!n.length)return;const b=[...n].reverse().find(ee=>ee.querySelector(".k-calendar"))?.querySelector(".k-calendar");if(!b)return;const I=b.querySelectorAll(".k-calendar-table");let j=!1;I.forEach(ee=>{ee.tabIndex===0&&(j?ee.tabIndex=-1:j=!0)})}catch(n){console.warn(n)}})};return e.isOpen&&t.watch(e.isOpen,n=>{n&&setTimeout(()=>R(),0)},{immediate:!1}),{raw:r,cursorPos:f,debugEnabled:q,debugLines:re,digitsOnly:A,valid:O,validComputed:t.readonly(s),reason:t.readonly(p),validationMessage:t.readonly(M),spanDays:t.readonly(i),month1:t.readonly(h),day1:t.readonly(T),year1:t.readonly(_),month2:t.readonly(W),day2:t.readonly(B),year2:t.readonly(ne),handleChange:a,handleKeyDown:o,handleWheel:u,handleKeyUp:g,handleClick:y,onCalendarChange:()=>{F.value=!0}}}function Ee(e){const r=t.ref(""),f=t.ref(void 0),q=t.ref(!!e.debug),F=t.ref(e.timeFormat??"hh:mm AM"),V=t.computed(()=>!!e.required),N=t.ref(!1),E=["ArrowUp","ArrowDown"],D=["ArrowLeft","ArrowRight"],v=t.computed(()=>(r.value??"").replace(/\D/g,"")),A={H:/[0-9]/,h:/[0-9]/,M:/[0-9]/,m:/[0-9]/,A:/[AaPp]/,a:/[Mm]/},$=o=>o<=2?"hh":o<=5?"mm":"ampm",x=t.computed(()=>{const o=r.value&&r.value.substring(0,2).replace(/\D/g,"0")||"0",u=parseInt(o);return Math.min(Math.max(u,0),23)}),w=t.computed(()=>{const o=r.value&&r.value.substring(3,5).replace(/\D/g,"0")||"0",u=parseInt(o);return Math.min(Math.max(u,0),59)}),L=t.computed(()=>(r.value?.substring(6,8)||"AM").toUpperCase().startsWith("P")?"PM":"AM"),C=t.computed(()=>/^(\d{2}):(\d{2})\s([AP]M)$/i.test(r.value??"")),m=(o,u,g)=>{let h=o%12;return h===0&&(h=12),`${String(h).padStart(2,"0")}:${String(u).padStart(2,"0")} ${g}`},S=o=>{const u=o.match(/^(\d{2}):(\d{2})\s([AP]M)$/i);if(!u)return null;const g=parseInt(u[1]),h=parseInt(u[2]),T=u[3].toUpperCase();if(g<1||g>12||h<0||h>59)return null;let _=g%12;T==="PM"&&(_+=12);const W=new Date;return W.setSeconds(0,0),W.setHours(_),W.setMinutes(h),W},O=o=>{if(v.value.length===0){e.onChange({value:null,event:o});return}if(!C.value){e.onChange({value:null,event:o});return}const u=S(r.value);u&&d(u)?e.onChange({value:u,event:o}):e.onChange({value:null,event:o})},l=o=>o.getHours()*60+o.getMinutes(),d=o=>{const u=e.min??void 0,g=e.max??void 0,h=l(o);if(u){const T=l(u);if(h<T)return!1}if(g){const T=l(g);if(h>T)return!1}return!0},i=o=>{r.value=o.value;const u=o.event?.target;f.value=u?.selectionStart??0;try{const g=f.value??0;if($(g)==="ampm"&&(r.value??"").length>=8){const h=r.value.charAt(6);/[Aa]/.test(h)?(r.value=`${r.value.slice(0,6)}AM${r.value.slice(8)}`,t.nextTick(()=>{requestAnimationFrame(()=>{const T=document.getElementById(e.id);T&&(T.focus(),T.setSelectionRange(8,8))})})):/[Pp]/.test(h)&&(r.value=`${r.value.slice(0,6)}PM${r.value.slice(8)}`,t.nextTick(()=>{requestAnimationFrame(()=>{const T=document.getElementById(e.id);T&&(T.focus(),T.setSelectionRange(8,8))})}))}}catch{}O(o)},s=o=>{f.value=o.target.selectionStart??0},p=(o,u,g)=>{const h=u?.selectionStart??f.value??0;f.value=h;const T=$(h),_=(r.value??"").match(/^(\d{2}):(\d{2})\s([AP]M)$/i);if(!_){if((r.value??"").length===0||v.value.length===0){const Y=new Date,R=Y.getHours(),n=R>=12?"PM":"AM";r.value=m(R,Y.getMinutes(),n);const c=S(r.value);c&&d(c)?e.onChange({value:c,event:g}):e.onChange({value:null,event:g}),t.nextTick(()=>{requestAnimationFrame(()=>{const b=document.getElementById(e.id),I=f.value??0;b&&(b.focus(),b.setSelectionRange(I,I))})})}return}let W=parseInt(_[1]),B=parseInt(_[2]),ne=_[3].toUpperCase();if(T==="hh")o==="ArrowUp"?W=W<12?W+1:1:W=W>1?W-1:12;else if(T==="mm"){const Y=e.minuteStepRef?.value??e.minuteStep??1;if(Y===1)o==="ArrowUp"?B=B<59?B+1:0:B=B>0?B-1:59;else if(o==="ArrowUp"){const R=B%Y;let n=R===0?B+Y:B+(Y-R);n>=60&&(n=0),B=n}else{const R=B%Y;let n=R===0?B-Y:B-R;n<0&&(n=60-Y),B=n}}else T==="ampm"&&(ne=ne==="AM"?"PM":"AM");r.value=`${String(W).padStart(2,"0")}:${String(B).padStart(2,"0")} ${ne}`;const re=S(r.value);re&&d(re)?e.onChange({value:re,event:g}):e.onChange({value:null,event:g}),t.nextTick(()=>{requestAnimationFrame(()=>{const Y=document.getElementById(e.id),R=f.value??0;Y&&(Y.focus(),Y.setSelectionRange(R,R))})})},M=o=>{if(o.code==="Space"||o.key===" "){e.onShowPicker(o);return}if(E.includes(o.key)){o.preventDefault();const u=o.target;p(o.key,u,o)}},k=o=>{o.preventDefault();const u=o.deltaY<0?"ArrowUp":"ArrowDown";p(u,o.target,o)},P=o=>{const u=o.target;if(D.includes(o.key)){f.value=u?.selectionStart??0;return}E.includes(o.key)&&(o.preventDefault(),f.value=u?.selectionStart??0)},H=o=>{N.value=!0,V.value&&e.externalValue&&e.externalValue.value===void 0&&v.value.length===0&&(e.externalValue.value="");const u=o.target;u&&(f.value=u.selectionStart??0)};e.externalValue&&t.watch(e.externalValue,o=>{if(o){const u=new Date(o);if(u.toString()!=="Invalid Date"){const g=u.getHours(),h=g>=12?"PM":"AM";r.value=m(g,u.getMinutes(),h);return}}},{immediate:!0});const G=t.computed(()=>[["Time",r.value||"--:-- --"],["Hour (12h)",x.value],["Minute",w.value],["Period",L.value],["Digits only",v.value],["min",e.min?.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})??null],["max",e.max?.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})??null],["valid",K.value],["reason",Z.value],["validationMessage",a.value]]),X=t.computed(()=>S(r.value)??null),K=t.computed(()=>{if(!V.value){if(!C.value)return!0;const u=X.value;return u?d(u):!1}if(!N.value)return!0;const o=X.value;return!C.value||!o?!1:d(o)}),Z=t.computed(()=>{if(!V.value){if(!C.value)return;const u=X.value;return u?d(u)?"valid":"out-of-bounds":"invalid-time"}if(!N.value)return;if(v.value.length===0||!C.value)return"incomplete";const o=X.value;return o?d(o)?"valid":"out-of-bounds":"invalid-time"}),a=t.computed(()=>{const o=Z.value;if(!o||o==="valid")return"";if(o==="incomplete")return"Required";if(o==="invalid-time")return`Must be in ${F.value} format.`;const u={hour:"2-digit",minute:"2-digit"},g=e.min?e.min.toLocaleTimeString("en-US",u):null,h=e.max?e.max.toLocaleTimeString("en-US",u):null;if(o==="out-of-bounds"){if(g&&h)return`Must be between ${g} and ${h}.`;if(g)return`Must be ${g} or later.`;if(h)return`Must be ${h} or earlier.`}return""}),y=()=>{t.nextTick(()=>{const o=document.getElementById(e.id);if(!o){console.warn(`#${e.id} not found for styling.`);return}const u=o.closest(".k-timepicker");u?u.classList.add("fk-timepicker"):console.warn(`.k-timepicker parent of #${e.id} not found for styling.`)})};return t.onMounted(()=>{y()}),{raw:r,rules:A,debugEnabled:q,debugLines:G,placeholder:F,isValid:K,reason:t.readonly(Z),validationMessage:a,isComplete:C,inRangeTime:d,cursorPos:f,hour:t.readonly(x),minute:t.readonly(w),period:t.readonly(L),handleChange:i,handleKeyDown:M,handleKeyUp:P,handleClick:s,handleWheel:k,handleBlur:H}}function xe(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const ve=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=Object.prototype.toString,Te=e=>Me.call(e)==="[object Object]",ae=()=>{},Ie=Ce();function Ce(){var e,r;return ve&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((r=window?.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function me(e){return Array.isArray(e)?e:[e]}function $e(e,r,f){return t.watch(e,r,{...f,immediate:!0})}const be=ve?window:void 0;function ue(e){var r;const f=t.toValue(e);return(r=f?.$el)!=null?r:f}function pe(...e){const r=[],f=()=>{r.forEach(E=>E()),r.length=0},q=(E,D,v,A)=>(E.addEventListener(D,v,A),()=>E.removeEventListener(D,v,A)),F=t.computed(()=>{const E=me(t.toValue(e[0])).filter(D=>D!=null);return E.every(D=>typeof D!="string")?E:void 0}),V=$e(()=>{var E,D;return[(D=(E=F.value)==null?void 0:E.map(v=>ue(v)))!=null?D:[be].filter(v=>v!=null),me(t.toValue(F.value?e[1]:e[0])),me(t.unref(F.value?e[2]:e[1])),t.toValue(F.value?e[3]:e[2])]},([E,D,v,A])=>{if(f(),!E?.length||!D?.length||!v?.length)return;const $=Te(A)?{...A}:A;r.push(...E.flatMap(x=>D.flatMap(w=>v.map(L=>q(x,w,L,$)))))},{flush:"post"}),N=()=>{V(),f()};return xe(f),N}let Se=!1;function Le(e,r,f={}){const{window:q=be,ignore:F=[],capture:V=!0,detectIframe:N=!1,controls:E=!1}=f;if(!q)return E?{stop:ae,cancel:ae,trigger:ae}:ae;if(Ie&&!Se){Se=!0;const m={passive:!0};Array.from(q.document.body.children).forEach(S=>S.addEventListener("click",ae,m)),q.document.documentElement.addEventListener("click",ae,m)}let D=!0;const v=m=>t.toValue(F).some(S=>{if(typeof S=="string")return Array.from(q.document.querySelectorAll(S)).some(O=>O===m.target||m.composedPath().includes(O));{const O=ue(S);return O&&(m.target===O||m.composedPath().includes(O))}});function A(m){const S=t.toValue(m);return S&&S.$.subTree.shapeFlag===16}function $(m,S){const O=t.toValue(m),l=O.$.subTree&&O.$.subTree.children;return l==null||!Array.isArray(l)?!1:l.some(d=>d.el===S.target||S.composedPath().includes(d.el))}const x=m=>{const S=ue(e);if(m.target!=null&&!(!(S instanceof Element)&&A(e)&&$(e,m))&&!(!S||S===m.target||m.composedPath().includes(S))){if("detail"in m&&m.detail===0&&(D=!v(m)),!D){D=!0;return}r(m)}};let w=!1;const L=[pe(q,"click",m=>{w||(w=!0,setTimeout(()=>{w=!1},0),x(m))},{passive:!0,capture:V}),pe(q,"pointerdown",m=>{const S=ue(e);D=!v(m)&&!!(S&&!m.composedPath().includes(S))},{passive:!0}),N&&pe(q,"blur",m=>{setTimeout(()=>{var S;const O=ue(e);((S=q.document.activeElement)==null?void 0:S.tagName)==="IFRAME"&&!O?.contains(q.document.activeElement)&&r(m)},0)},{passive:!0})].filter(Boolean),C=()=>L.forEach(m=>m());return E?{stop:C,cancel:()=>{D=!1},trigger:m=>{D=!0,x(m),D=!1}}:C}function Pe(e){const r=t.shallowRef(null),f=[".k-animation-container .k-popup",".k-popup",".k-timepicker-popup",".k-menu-popup"],q=Array.isArray(e.popupSelector)?e.popupSelector:[e.popupSelector??f].flat(),F=A=>A?typeof e.initialFocus=="string"?A.querySelector(e.initialFocus)??A:typeof e.initialFocus=="function"?e.initialFocus(A)??A:A.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')??A:null,{activate:V,deactivate:N}=we.useFocusTrap(r,{escapeDeactivates:!1,clickOutsideDeactivates:!1,fallbackFocus:()=>r.value,initialFocus:()=>F(r.value),...e.focusTrapOptions??{}});let E=null,D=t.ref(null);const v=()=>{if(e.resolvePopupEl)return e.resolvePopupEl();const A=(x,w)=>{const L=Array.from(x.querySelectorAll(w));if(!L.length)return null;const C=L.filter(m=>m.offsetParent!==null||m.getClientRects().length>0);return C[C.length-1]??L[L.length-1]??null},$=e.triggerEl?.value?.closest?.(".k-animation-container")??document.body;for(const x of q){const w=A($,x);if(w)return w}for(const x of q){const w=A(document,x);if(w)return w}return null};return Le(r,A=>{D.value="outside",e.isOpen.value&&e.onRequestClose?.("outside",A)}),t.watch(()=>e.isOpen.value,A=>{A?(D.value=null,t.nextTick(()=>{const $=v();$&&(r.value=$,setTimeout(()=>V(),0),E||(E=x=>{x.key==="Escape"&&(D.value="escape",e.isOpen.value&&e.onRequestClose?.("escape",x))},document.addEventListener("keydown",E,!0)))})):(N(),E&&(document.removeEventListener("keydown",E,!0),E=null),r.value=null,D.value==="outside"&&t.nextTick(()=>{const $=()=>{const x=e.triggerEl?.value,w=x?.querySelector("input"),L=document.activeElement;L&&(L===w||x&&x.contains(L))&&(w??x)?.blur?.()};requestAnimationFrame(()=>setTimeout($,0))}),e.returnFocusToTrigger!==!1&&D.value==="escape"&&e.triggerEl?.value&&(console.log("Returning focus to trigger element:",e.triggerEl.value),t.nextTick(()=>{const $=()=>{const x=e.triggerEl?.value;if(!x)return;(x.querySelector("input")??x)?.focus?.()};requestAnimationFrame(()=>setTimeout($,0))})))}),{popupRef:r,activate:V,deactivate:N,lastCloseReason:t.readonly(D),setPopupEl:A=>r.value=A}}Q.useGridA11y=ke,Q.useMaskedDateInput=De,Q.useMaskedDateRangeInput=Ae,Q.useMaskedTimeInput=Ee,Q.usePopupTrap=Pe,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})}));
@@ -11,8 +11,10 @@ export declare function useMaskedTimeInput(args: {
11
11
  minuteStep?: 1 | 5 | 10 | 15 | 20 | 30;
12
12
  minuteStepRef?: Ref<1 | 5 | 10 | 15 | 20 | 30 | undefined>;
13
13
  timeFormat?: string;
14
- minTime?: Ref<Date | null | undefined>;
15
- maxTime?: Ref<Date | null | undefined>;
14
+ min?: Date | null | undefined;
15
+ max?: Date | null | undefined;
16
+ /** When true, empty/incomplete value is considered invalid after blur */
17
+ required?: boolean;
16
18
  debug?: boolean;
17
19
  }): {
18
20
  raw: Ref<string, string>;
@@ -25,12 +27,14 @@ export declare function useMaskedTimeInput(args: {
25
27
  readonly a: RegExp;
26
28
  };
27
29
  debugEnabled: Ref<boolean, boolean>;
28
- debugLines: import("vue").ComputedRef<(string | number)[][]>;
30
+ debugLines: import("vue").ComputedRef<((string | number)[] | (string | boolean)[])[]>;
29
31
  placeholder: Ref<string, string>;
30
32
  isValid: import("vue").ComputedRef<boolean>;
33
+ reason: Readonly<Ref<string, string>>;
31
34
  validationMessage: import("vue").ComputedRef<string>;
32
35
  isComplete: import("vue").ComputedRef<boolean>;
33
36
  inRangeTime: (d: Date) => boolean;
37
+ cursorPos: Ref<number, number>;
34
38
  hour: Readonly<Ref<number, number>>;
35
39
  minute: Readonly<Ref<number, number>>;
36
40
  period: Readonly<Ref<"AM" | "PM", "AM" | "PM">>;
@@ -39,4 +43,5 @@ export declare function useMaskedTimeInput(args: {
39
43
  handleKeyUp: (event: KeyboardEvent) => void;
40
44
  handleClick: (event: MouseEvent) => void;
41
45
  handleWheel: (event: WheelEvent) => void;
46
+ handleBlur: (event: FocusEvent) => void;
42
47
  };
@@ -6,6 +6,8 @@ Composable for a masked single-date input that pairs naturally with Kendo Vue `M
6
6
 
7
7
  This composable is designed to preserve the user's raw input: it does not coerce or rewrite what the user has typed in `onChange`. It only emits a parsed `Date` when the input is complete and valid.
8
8
 
9
+ When `required` is enabled, the composable defers required-validation until after blur: a blank or incomplete value is treated as valid while the field is focused, and only after blur will it flag the value as incomplete/required.
10
+
9
11
  ## Prerequisites
10
12
 
11
13
  - Vue 3 Composition API
@@ -33,8 +35,10 @@ const masked = useMaskedDateInput({
33
35
  onChange: ({ value }) => { selectedDate.value = value ?? undefined; },
34
36
  onShowCalendar: () => (showPicker.value = true),
35
37
  externalValue: selectedDate as any,
36
- minDate: ref(MIN_DATE),
37
- maxDate: ref(MAX_DATE),
38
+ min: ref(MIN_DATE),
39
+ max: ref(MAX_DATE),
40
+ required: true,
41
+ // defaultValue: new Date(), // optional baseline for steppers
38
42
  });
39
43
 
40
44
  // Destructure only values used as component props
@@ -68,7 +72,7 @@ const { isValid, validationMessage, debugEnabled, debugLines } = masked;
68
72
  @keyup="masked.handleKeyUp"
69
73
  @click="masked.handleClick"
70
74
  @wheel="masked.handleWheel"
71
- @blur="() => props.onBlur()"
75
+ @blur="(e) => { masked.handleBlur(e); props.onBlur(); }"
72
76
  />
73
77
 
74
78
  <div v-if="debugEnabled" class="composable-debugging debug-info">
@@ -105,7 +109,9 @@ Creates a controller for a masked single-date input.
105
109
  - Does not mutate the user's raw string.
106
110
  - `onShowCalendar: (e: KeyboardEvent) => void`: Called when Space is pressed on the input; use this to open a calendar/popup.
107
111
  - `externalValue?: Ref<string | Date | null | undefined>`: Reactive external source for the selected date (e.g., calendar `v-model`). When it updates to a valid date, the composable mirrors it into `raw` without clobbering in‑progress typing.
108
- - `minDate?: Ref<Date | null | undefined>` / `maxDate?: Ref<Date | null | undefined>`: Bounds for validation.
112
+ - `min?: Date | null | undefined` / `max?: Date | null | undefined`: Bounds for validation. These are plain `Date` values (not `Ref<Date>`), since min/max do not require reactivity.
113
+ - `required?: boolean`: When `true`, the field is treated as required. While focused, blank/incomplete values are not flagged as invalid; after blur, a blank or incomplete value is considered invalid with reason `"incomplete"` and validation message `"Required"`.
114
+ - `defaultValue?: Date | null`: Optional default date for the field. When steppers (ArrowUp/ArrowDown or wheel) are used on an invalid/incomplete input, this date is used as the baseline instead of always using "today".
109
115
  - `dateFormat?: string`: Placeholder/format hint (default: `mm/dd/yyyy`).
110
116
  - `debug?: boolean`: Enables internal debug reporting (e.g., `debugLines`).
111
117
 
@@ -116,8 +122,17 @@ Creates a controller for a masked single-date input.
116
122
  - `placeholder: Ref<string>`: Format placeholder (defaults to `mm/dd/yyyy`).
117
123
  - `digitsOnly: Computed<string>`: Raw string stripped of non-digits.
118
124
  - `month`, `day`, `year`: Readonly computed parts (strings, zero-padded) for diagnostics.
119
- - `isValid: Computed<boolean>`: Validity considering completeness, parsability, and min/max bounds.
120
- - `validationMessage: Computed<string>`: Human-readable message for invalid states (format or range messages).
125
+ - `isValid: Computed<boolean>`: Validity considering completeness, parsability, min/max bounds, and (when enabled) required state.
126
+ - `reason: Computed<string | undefined>`: Machine-readable reason for the current validation state:
127
+ - `"incomplete"` (required + blank/incomplete after blur)
128
+ - `"invalid-date"` (complete but not a real date)
129
+ - `"out-of-bounds"` (outside min/max)
130
+ - `"valid"` (everything OK)
131
+ - `undefined` (no reason yet, e.g., optional + incomplete while typing)
132
+ - `validationMessage: Computed<string>`: Human-readable message for invalid states:
133
+ - `"Required"` when `reason === "incomplete"`.
134
+ - `Must be in mm/dd/yyyy format.` (or your custom `dateFormat`) when `reason === "invalid-date"`.
135
+ - Range messages (between/on or after/on or before) when `reason === "out-of-bounds"`.
121
136
  - `datePart(pos: number): 'mm' | 'dd' | 'yyyy'`: Helper to determine focused part from caret position.
122
137
  - Event handlers to wire to the input:
123
138
  - `handleChange(event)`
@@ -125,6 +140,7 @@ Creates a controller for a masked single-date input.
125
140
  - `handleWheel(event)` — Prevents page scroll; interprets wheel as steppers (up/down) for the focused part.
126
141
  - `handleKeyUp(event)` — Maintains caret position after cursor keys/steppers.
127
142
  - `handleClick(event)` — Captures caret position on click for restoring.
143
+ - `handleBlur(event)` — Marks the field as touched (used for required logic) and, when `required` is true and no `defaultValue` is provided, converts an `externalValue` of `undefined` with a blank mask into an empty string so downstream validation can treat it as incomplete/required.
128
144
  - Debug:
129
145
  - `debugEnabled: Ref<boolean>`
130
146
  - `debugLines: Computed<Array<[label: string, value: string]>>`
@@ -132,7 +148,7 @@ Creates a controller for a masked single-date input.
132
148
  ## Behavior Details
133
149
 
134
150
  - **Mask and parsing**: Expects `00/00/0000`. Parsing requires the input to be complete (10 chars including slashes, 8 digits) and form a real calendar date (e.g., Feb 29 checks).
135
- - **Emission policy**: Emits `Date` only when the raw is complete, valid, and within `minDate`/`maxDate`. Otherwise emits `null`. Empty input emits `null`.
151
+ - **Emission policy**: Emits `Date` only when the raw is complete, valid, and within `min`/`max`. Otherwise emits `null`. Empty input emits `null`.
136
152
  - **Min/Max validation**: If provided, dates outside bounds are considered invalid (`isValid=false`) and produce a range `validationMessage`.
137
153
  - **Steppers**: ArrowUp/ArrowDown and mouse wheel increment/decrement the focused part (`mm`, `dd`, `yyyy`) with wrapping (months and days). If raw is incomplete/invalid, steppers initialize to today, emit that date (if in range), and restore caret.
138
154
  - **Caret persistence**: After programmatic updates (including steppers), the caret is restored to the prior position to preserve typing flow.
@@ -27,8 +27,8 @@ const selectedTime = ref<Date | null | undefined>();
27
27
  const showPicker = ref(false);
28
28
 
29
29
  // Example bounds (customize for your app)
30
- const minTime = ref(new Date(new Date().setHours(8, 0, 0, 0))); // 8:00 AM
31
- const maxTime = ref(new Date(new Date().setHours(17, 0, 0, 0))); // 5:00 PM
30
+ const minTime = new Date(new Date().setHours(8, 0, 0, 0)); // 8:00 AM
31
+ const maxTime = new Date(new Date().setHours(17, 0, 0, 0)); // 5:00 PM
32
32
 
33
33
  const masked = useMaskedTimeInput({
34
34
  id: "startTime",
@@ -36,8 +36,9 @@ const masked = useMaskedTimeInput({
36
36
  onShowPicker: () => (showPicker.value = true), // Space opens the time menu
37
37
  externalValue: selectedTime, // Mirror TimePicker selection into the mask
38
38
  minuteStep: 5,
39
- minTime,
40
- maxTime,
39
+ min: minTime,
40
+ max: maxTime,
41
+ required: true,
41
42
  });
42
43
 
43
44
  // Destructure for simpler template bindings
@@ -75,6 +76,7 @@ const {
75
76
  @keyup="masked.handleKeyUp"
76
77
  @click="masked.handleClick"
77
78
  @wheel="masked.handleWheel"
79
+ @blur="masked.handleBlur"
78
80
  />
79
81
  </template>
80
82
  </TimePicker>
@@ -110,7 +112,8 @@ Creates a controller for a masked single-time input.
110
112
  - `minuteStep?: 1 | 5 | 10 | 15 | 20 | 30`: Stepping granularity when ArrowUp/ArrowDown are used in the minutes segment.
111
113
  - `minuteStepRef?: Ref<1 | 5 | 10 | 15 | 20 | 30 | undefined>`: Reactive alternative to update step granularity at runtime.
112
114
  - `timeFormat?: string`: Placeholder/format hint (default: `hh:mm AM`).
113
- - `minTime?: Ref<Date | null | undefined>` / `maxTime?: Ref<Date | null | undefined>`: Bounds for validation.
115
+ - `min?: Date | null | undefined` / `max?: Date | null | undefined`: Bounds for validation. These are plain `Date` values (not `Ref<Date>`), since min/max do not require reactivity.
116
+ - `required?: boolean`: When `true`, the field is treated as required. While focused, blank/incomplete values are not flagged as invalid; after blur, a blank or incomplete value is considered invalid with reason `"incomplete"` and validation message `"Required"`.
114
117
  - `debug?: boolean`: Enables internal debug reporting (e.g., `debugLines`).
115
118
 
116
119
  #### Returns
@@ -122,14 +125,24 @@ Creates a controller for a masked single-time input.
122
125
  - `digitsOnly: Computed<string>`: Raw string stripped of non-digits.
123
126
  - `hour`, `minute`, `period`: Readonly computed parts (numeric hour/minute, `AM`/`PM`).
124
127
  - `isComplete: Computed<boolean>`: `true` when the raw string matches `^(\d{2}):(\d{2})\s([AP]M)$`.
125
- - `isValid: Computed<boolean>`: Validity considering completeness, parsability, and min/max bounds.
126
- - `validationMessage: Computed<string>`: Human-readable message for invalid states (format or range messages).
128
+ - `isValid: Computed<boolean>`: Validity considering completeness, parsability, min/max bounds, and (when enabled) required state.
129
+ - `reason: Computed<string | undefined>`: Machine-readable reason for the current validation state:
130
+ - `"incomplete"` (required + blank/incomplete after blur)
131
+ - `"invalid-time"` (complete but not a real time)
132
+ - `"out-of-bounds"` (outside min/max)
133
+ - `"valid"` (everything OK)
134
+ - `undefined` (no reason yet, e.g., optional + incomplete while typing)
135
+ - `validationMessage: Computed<string>`: Human-readable message for invalid states:
136
+ - `"Required"` when `reason === "incomplete"`.
137
+ - `Must be in hh:mm AM format.` (or your custom `timeFormat`) when `reason === "invalid-time"`.
138
+ - Range messages (between/on or after/on or before) when `reason === "out-of-bounds"`.
127
139
  - Event handlers to wire to the input:
128
140
  - `handleChange(event)` — Assigns `raw`, tracks caret, fills `AM/PM` when appropriate, emits parsed time when valid.
129
141
  - `handleKeyDown(event)` — Space opens the picker via `onShowPicker`; ArrowUp/ArrowDown act as steppers.
130
142
  - `handleWheel(event)` — Prevents page scroll; interprets wheel as steppers (up/down) for the focused part.
131
143
  - `handleKeyUp(event)` — Maintains caret position after cursor keys/steppers.
132
144
  - `handleClick(event)` — Captures caret position on click for restoring.
145
+ - `handleBlur(event)` — Marks the field as touched (used for required logic) and, when `required` is true, converts an `externalValue` of `undefined` with a blank mask into an empty string so downstream validation can treat it as incomplete/required.
133
146
 
134
147
  - Debug:
135
148
  - `debugEnabled: Ref<boolean>`
@@ -139,7 +152,7 @@ Creates a controller for a masked single-time input.
139
152
 
140
153
  - **Mask and parsing**: Expects `00:00 AM`. Parsing requires the input to be complete and form a real time (`01–12` hours, `00–59` minutes), with `AM/PM`. Parsed output is a `Date` for today at the chosen time.
141
154
  - **AM/PM convenience**: When caret is in the AM/PM segment and a user types `A/a` or `P/p`, the composable auto-completes to `AM`/`PM`.
142
- - **Emission policy**: Emits `Date` only when the raw is complete, valid, and within `minTime`/`maxTime`. Otherwise emits `null`. Empty input emits `null`.
155
+ - **Emission policy**: Emits `Date` only when the raw is complete, valid, and within `min`/`max`. Otherwise emits `null`. Empty input emits `null`. When `required` is enabled, a blank or incomplete value is only considered invalid after blur.
143
156
  - **Min/Max validation**: Bounds are evaluated by minutes since midnight. Times outside bounds are invalid (`isValid=false`) and produce a range `validationMessage`.
144
157
  - **Steppers**: ArrowUp/ArrowDown and mouse wheel increment/decrement the focused part (hours, minutes with `minuteStep`, or `AM/PM`). If raw is incomplete/invalid, steppers initialize to a sensible baseline before emitting.
145
158
  - **Caret persistence**: After programmatic updates (including steppers), the caret is restored to the prior position to preserve typing flow.
@@ -182,7 +195,7 @@ If you use `timeInput`, the slot will not render and you may waste time debuggin
182
195
 
183
196
  ## Tips
184
197
 
185
- - Keep `minTime`/`maxTime` aligned with your `TimePicker` configuration for consistent validation.
198
+ - Keep `min`/`max` aligned with your `TimePicker` configuration for consistent validation.
186
199
  - Use `debug: true` and display `debugLines` during integration to verify caret, parsed values, and masks.
187
200
  - Avoid mutating `raw` externally except through `v-model`; let the composable manage its value and emit parsed times.
188
201
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featherk/composables",
3
- "version": "0.5.6",
3
+ "version": "0.6.0",
4
4
  "main": "dist/featherk-composables.umd.js",
5
5
  "module": "dist/featherk-composables.es.js",
6
6
  "types": "dist/index.d.ts",