@quidgest/ui 0.17.5 → 0.17.7
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/dist/json/api.json +1 -1
- package/dist/ui.css +1 -1
- package/dist/ui.esm.js +72 -73
- package/dist/ui.js +73 -74
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +73 -74
- package/dist/ui.scss +2 -2
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +347 -349
- package/package.json +6 -4
package/dist/ui.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.17.
|
|
2
|
+
* Quidgest UI v0.17.7
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QuidgestUI={},e.Vue)}(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})
|
|
7
7
|
var o=Object.defineProperty,l=(e,t)=>{let l={}
|
|
8
8
|
for(var n in e)o(l,n,{get:e[n],enumerable:!0})
|
|
9
9
|
return t||o(l,Symbol.toStringTag,{value:"Module"}),l},n={primary:"#008ad2",primaryLight:"#cde5ff",primaryDark:"#006398",secondary:"#001d31",secondaryLight:"#e6eef3",secondaryDark:"#001425",highlight:"#ff8241",highlightLight:"#ffe4d6",highlightDark:"#cc4700",info:"#17a2b8",infoLight:"#bceff7",infoDark:"#11798a",success:"#28a745",successLight:"#c2f0cd",successDark:"#1e7d34",warning:"#ffa900",warningLight:"#ffeabf",warningDark:"#bf7f00",danger:"#b71c1c",dangerLight:"#f7cccc",dangerDark:"#891515",background:"#fff",container:"#fff",neutral:"#7c858d",neutralLight:"#c4c5ca",neutralDark:"#40474f",onPrimary:"#fff",onPrimaryLight:"#202428",onPrimaryDark:"#fff",onSecondary:"#fff",onSecondaryLight:"#202428",onSecondaryDark:"#fff",onHighlight:"#fff",onHighlightLight:"#202428",onHighlightDark:"#fff",onInfo:"#fff",onInfoLight:"#202428",onInfoDark:"#fff",onSuccess:"#fff",onSuccessLight:"#202428",onSuccessDark:"#fff",onWarning:"#fff",onWarningLight:"#202428",onWarningDark:"#fff",onDanger:"#fff",onDangerLight:"#202428",onDangerDark:"#fff",onBackground:"#202428",onContainer:"#202428",onNeutral:"#fff",onNeutralLight:"#202428",onNeutralDark:"#fff"},a={primary:"#4da6e0",primaryLight:"#1a2832",primaryDark:"#87c5f0",secondary:"#b8d4e6",secondaryLight:"#1a2832",secondaryDark:"#e6f2ff",highlight:"#ff9966",highlightLight:"#2d1a0f",highlightDark:"#ffb899",info:"#4cb8d1",infoLight:"#1f2a2d",infoDark:"#7dcce0",success:"#5cb85c",successLight:"#1e2a20",successDark:"#85d085",warning:"#ffcc4d",warningLight:"#332a1a",warningDark:"#ffd966",danger:"#e74c3c",dangerLight:"#2d1a1a",dangerDark:"#f17066",background:"#121212",container:"#1e1e1e",neutral:"#9ca3ab",neutralLight:"#2a2d31",neutralDark:"#c8ced6",onPrimary:"#000",onPrimaryLight:"#e0e0e0",onPrimaryDark:"#000",onSecondary:"#000",onSecondaryLight:"#e0e0e0",onSecondaryDark:"#000",onHighlight:"#000",onHighlightLight:"#e0e0e0",onHighlightDark:"#000",onInfo:"#000",onInfoLight:"#e0e0e0",onInfoDark:"#000",onSuccess:"#000",onSuccessLight:"#e0e0e0",onSuccessDark:"#000",onWarning:"#000",onWarningLight:"#e0e0e0",onWarningDark:"#000",onDanger:"#000",onDangerLight:"#e0e0e0",onDangerDark:"#000",onBackground:"#e0e0e0",onContainer:"#e0e0e0",onNeutral:"#000",onNeutralLight:"#e0e0e0",onNeutralDark:"#000"},r=l({defaultDarkColorScheme:()=>a,defaultLightColorScheme:()=>n})
|
|
@@ -610,7 +610,7 @@ return o.setMonth(o.getMonth()+t),o}function Sl(e){return new Date(e.getFullYear
|
|
|
610
610
|
let y=0
|
|
611
611
|
const k=(0,t.ref)("date"),b=(0,t.ref)((new Date).getMonth()),B=(0,t.ref)((new Date).getFullYear()),w=(0,t.ref)((new Date).getFullYear())
|
|
612
612
|
let _=null,x=!1,C=!1,q=!1,V=null
|
|
613
|
-
function E(){queueMicrotask(()=>{requestAnimationFrame(()=>{const e=
|
|
613
|
+
function E(){queueMicrotask(()=>{requestAnimationFrame(()=>{const e=ct(),t=document.activeElement
|
|
614
614
|
e&&(t===e||t instanceof Node&&$.value?.contains(t))&&(x=!0)})})}const S=(0,t.useTemplateRef)("field"),$=(0,t.useTemplateRef)("menu"),M=(0,t.useTemplateRef)("calendar"),N=(0,t.useTemplateRef)("monthHeader"),D=(0,t.useTemplateRef)("yearHeader"),L=(0,t.useTemplateRef)("toggleTime"),z=new Map,T=new Map
|
|
615
615
|
function P(e){if(!e)return null
|
|
616
616
|
if(e instanceof HTMLElement)return e
|
|
@@ -620,7 +620,7 @@ return zo.findIndex(e=>{const n=l.texts[e]??e
|
|
|
620
620
|
return(t?n.substring(0,3):n).toLowerCase()===o})},getWeekdayIndex:(e,t)=>{const o=e.toLowerCase()
|
|
621
621
|
for(let n=0;n<7;n++){const e=To[(n+6)%7],a=l.texts[e]??e
|
|
622
622
|
if((t?a.substring(0,3):a).toLowerCase()===o)return n}return null}})),A=(0,t.computed)(()=>{const e=r.value
|
|
623
|
-
return e?e instanceof Date?e:Array.isArray(e)&&e.length>0?e[0]:"string"==typeof e?
|
|
623
|
+
return e?e instanceof Date?e:Array.isArray(e)&&e.length>0?e[0]:"string"==typeof e?Oe(e):null:null}),F=(0,t.computed)(()=>{const e=r.value
|
|
624
624
|
return Array.isArray(e)&&e.length>1?e[1]:null}),I=(0,t.ref)(null),Q=(0,t.ref)(null),H=(0,t.ref)(null),U=(0,t.ref)(!1),W=(0,t.computed)(()=>U.value&&I.value?H.value&&H.value<I.value?H.value:I.value:A.value),O=(0,t.computed)(()=>{if(!l.range)return A.value
|
|
625
625
|
if(!U.value||!I.value)return F.value
|
|
626
626
|
const e=H.value??Q.value
|
|
@@ -630,7 +630,7 @@ return t?n.substring(0,3):n}})),Y=(0,t.computed)(()=>{const e=r.value
|
|
|
630
630
|
if(!e)return""
|
|
631
631
|
if(Array.isArray(e))return e.map(e=>e instanceof Date?_l(e,l.format,j.value):e).join(" - ")
|
|
632
632
|
if(e instanceof Date)return _l(e,l.format,j.value)
|
|
633
|
-
if("string"==typeof e){const t=
|
|
633
|
+
if("string"==typeof e){const t=Oe(e)
|
|
634
634
|
return t?_l(t,l.format,j.value):String(e)}return String(e)}),K=(0,t.computed)(()=>h.value??Y.value)
|
|
635
635
|
function G(){v.value=K.value}(0,t.watch)(K,()=>{f.value||G()},{immediate:!0})
|
|
636
636
|
const J=(0,t.computed)(()=>{const e=Sl(new Date(B.value,b.value,1)),t=kl(b.value,B.value),o=(e.getDay()+6)%7,l=[],n=0===b.value?11:b.value-1,a=0===b.value?B.value-1:B.value,r=kl(n,a)
|
|
@@ -646,11 +646,11 @@ function oe(e,t=0){const o=zo[e],n=l.texts[o]??zo[e]
|
|
|
646
646
|
return t<=0?n:n.substring(0,t)}function le(e){let t=e-Math.floor(13),o=t+Yl
|
|
647
647
|
return t<Ol&&(t=Ol,o=Math.min(t+Yl,jl)),o>jl&&(o=jl,t=Math.max(Ol,o-Yl)),{startYear:t,endYear:o}}function ne(){ie.value&&(w.value-=Yl)}function ae(){se.value&&(w.value+=Yl)}const re=(0,t.computed)(()=>le(w.value)),ie=(0,t.computed)(()=>re.value.startYear>Ol),se=(0,t.computed)(()=>re.value.endYear<jl),ce=(0,t.computed)(()=>0===b.value?B.value-1:B.value),ue=(0,t.computed)(()=>11===b.value?B.value+1:B.value),de=(0,t.computed)(()=>ce.value>=Ol),pe=(0,t.computed)(()=>ue.value<=jl),me=(0,t.computed)(()=>function(e){const{startYear:t,endYear:o}=le(e)
|
|
648
648
|
return Array.from({length:o-t+1},(e,o)=>t+o)}(w.value)),fe=(0,t.computed)(()=>d.value?l.icons.clock:l.icons.calendar),he=(0,t.computed)(()=>nl(l.format)),ge=(0,t.computed)(()=>`${he.value} - ${he.value}`)
|
|
649
|
-
Ho(()=>S?.value?.inputRef,()=>l.range?ge.value:he.value),(0,t.watch)(()=>S?.value?.inputRef,(e,t,o)=>{const l=
|
|
650
|
-
V=l,l&&(l.addEventListener("click",
|
|
649
|
+
Ho(()=>S?.value?.inputRef,()=>l.range?ge.value:he.value),(0,t.watch)(()=>S?.value?.inputRef,(e,t,o)=>{const l=st(e)
|
|
650
|
+
V=l,l&&(l.addEventListener("click",at),l.addEventListener("paste",Je,!0),o(()=>{V=null,l.removeEventListener("click",at),l.removeEventListener("paste",Je,!0)}))},{flush:"post"}),(0,t.watch)(r,()=>{h.value=null,G()})
|
|
651
651
|
const ye=(0,t.computed)(()=>{return l.clearable&&!l.readonly&&!l.disabled&&(void 0!==(e=r.value)&&("string"==typeof e?e.trim().length>0:e instanceof Date||!!Array.isArray(e)&&e.length>0))
|
|
652
652
|
var e})
|
|
653
|
-
function ke(){ye.value&&($e(),r.value=void 0,v.value="",
|
|
653
|
+
function ke(){ye.value&&($e(),r.value=void 0,v.value="",wt())}function be(e){l.range&&U.value&&I.value&&(e.getFullYear()<Ol||e.getFullYear()>jl||(H.value=new Date(e)))}function Be(){H.value=null}function we(e){const t=e.currentTarget,o=e.relatedTarget
|
|
654
654
|
!t||o&&t.contains(o)||Be()}function _e(e){if(!l.range||!U.value||!I.value)return
|
|
655
655
|
const t=e.touches.item(0)
|
|
656
656
|
if(!t)return
|
|
@@ -659,7 +659,7 @@ if(!o)return
|
|
|
659
659
|
const n=Number(o.dataset.dayIndex)
|
|
660
660
|
if(Number.isNaN(n))return
|
|
661
661
|
const a=J.value[n]
|
|
662
|
-
a&&be(a.date)}function xe(e,t){B.value=e,t&&
|
|
662
|
+
a&&be(a.date)}function xe(e,t){B.value=e,t&>("year")}function Ce(e,t){b.value=e,t&>("month")}function qe(){de.value&&(0===b.value?(Ce(11),xe(B.value-1)):Ce(b.value-1))}function Ve(){pe.value&&(11===b.value?(Ce(0),xe(B.value+1)):Ce(b.value+1))}function Ee(){Ce((new Date).getMonth()),xe((new Date).getFullYear()),ht()}function Se(e){return l.range?1===e?F.value??Q.value:A.value??I.value:A.value}function $e(){I.value=null,Q.value=null,H.value=null,U.value=!1}function Me(){if(!l.range||!d.value)return
|
|
663
663
|
const e=r.value
|
|
664
664
|
if(!Array.isArray(e)||e.length<2)return
|
|
665
665
|
const t=e[0],o=e[1]
|
|
@@ -675,23 +675,24 @@ o&&n&&(r.value=1===e?[o,t]:[t,n])}(e,n)}function De(e){const t=Se(e)
|
|
|
675
675
|
if(!t)return u.value?12:0
|
|
676
676
|
const o=t.getHours()
|
|
677
677
|
return u.value?o%12||12:o}function Le(e){return Se(e)?.getSeconds()??0}function ze(e){const t=Se(e)
|
|
678
|
-
return!!t&&t.getHours()>=12}function Te(e,t){return t?12===e?12:e+12:12===e?0:e}function Pe(e
|
|
678
|
+
return!!t&&t.getHours()>=12}function Te(e,t){return t?12===e?12:e+12:12===e?0:e}function Pe(e,t){const o=e>=12,l=e%12||12
|
|
679
|
+
return 1===t?l>=12?Te(1,o):11===l?Te(12,!o):Te(l+1,o):l<=1?Te(12,o):12===l?Te(11,!o):Te(l-1,o)}function Re(e){return(e??"").replace(/\D/g,"")}function Ae(e){return Math.min(59,Math.max(0,e))}function Fe(e,t){const o=Re(e).slice(0,2)
|
|
679
680
|
if(""===o)return
|
|
680
681
|
const l=Number.parseInt(o,10)
|
|
681
682
|
if(Number.isNaN(l))return
|
|
682
683
|
const n=u.value?(a=l,Math.min(12,Math.max(1,a))):function(e){return Math.min(23,Math.max(0,e))}(l)
|
|
683
684
|
var a
|
|
684
|
-
Ne(t,e=>{u.value?e.setHours(Te(n,e.getHours()>=12)):e.setHours(n)})}function
|
|
685
|
+
Ne(t,e=>{u.value?e.setHours(Te(n,e.getHours()>=12)):e.setHours(n)})}function Ie(e,t){const o=Re(e).slice(0,2)
|
|
685
686
|
if(""===o)return
|
|
686
687
|
const l=Number.parseInt(o,10)
|
|
687
688
|
if(Number.isNaN(l))return
|
|
688
|
-
const n=
|
|
689
|
-
Ne(t,e=>{e.setMinutes(n)})}function
|
|
689
|
+
const n=Ae(l)
|
|
690
|
+
Ne(t,e=>{e.setMinutes(n)})}function Qe(e,t){const o=Re(e).slice(0,2)
|
|
690
691
|
if(""===o)return
|
|
691
692
|
const l=Number.parseInt(o,10)
|
|
692
693
|
if(Number.isNaN(l))return
|
|
693
|
-
const n=
|
|
694
|
-
Ne(t,e=>{e.setSeconds(n)})}async function
|
|
694
|
+
const n=Ae(l)
|
|
695
|
+
Ne(t,e=>{e.setSeconds(n)})}async function He(e,o,l){if(e.ctrlKey||e.altKey||e.metaKey)return
|
|
695
696
|
if(!/^\d$/.test(e.key))return
|
|
696
697
|
const n=e.target
|
|
697
698
|
if(!n)return
|
|
@@ -700,130 +701,128 @@ if(null===a||null===r||a!==r)return
|
|
|
700
701
|
if(n.maxLength<=0||n.value.length<n.maxLength||a>=n.value.length)return
|
|
701
702
|
e.preventDefault()
|
|
702
703
|
const i=`${n.value.slice(0,a)}${e.key}${n.value.slice(a+1)}`
|
|
703
|
-
"hours"===o?
|
|
704
|
+
"hours"===o?Fe(i,l):"minutes"===o?Ie(i,l):Qe(i,l)
|
|
704
705
|
const s=Math.min(a+1,n.maxLength)
|
|
705
|
-
await(0,t.nextTick)(),n.setSelectionRange(s,s)}async function
|
|
706
|
+
await(0,t.nextTick)(),n.setSelectionRange(s,s)}async function Ue(e,o,l,n){if(!e)return
|
|
706
707
|
const a=Wo(o,l,n),r=()=>e.setSelectionRange(a,a)
|
|
707
|
-
r(),await(0,t.nextTick)(),r(),await new Promise(e=>{requestAnimationFrame(()=>{r(),e()})})}async function
|
|
708
|
+
r(),await(0,t.nextTick)(),r(),await new Promise(e=>{requestAnimationFrame(()=>{r(),e()})})}async function We(e,t,o,l){o!==t?(v.value=o,await Ue(e,t,o,l)):v.value!==o&&(v.value=o)}function Oe(e,t){const o=e.trim()
|
|
708
709
|
if(!o)return null
|
|
709
710
|
const n=xl(o,l.format,R.value)
|
|
710
711
|
if(n)return n
|
|
711
712
|
const a=dl(o)
|
|
712
713
|
if(a)return a
|
|
713
|
-
const r=
|
|
714
|
-
return r||(t?.complete?gl(o,l.format,R.value):null)}async function
|
|
714
|
+
const r=it(o)
|
|
715
|
+
return r||(t?.complete?gl(o,l.format,R.value):null)}async function je(e){if(y>0)return
|
|
715
716
|
if(l.readonly||l.disabled)return void G()
|
|
716
|
-
const t=
|
|
717
|
+
const t=ct(),o=t?.selectionStart??0,n=e??""
|
|
717
718
|
if(!n)return r.value=void 0,h.value=null,v.value="",void(g.value=!1)
|
|
718
|
-
if(l.range){const e=
|
|
719
|
+
if(l.range){const e=Ye(n)
|
|
719
720
|
if(e)return r.value=e,h.value=null,v.value=e.map(e=>_l(e,l.format,j.value)).join(" - "),void(g.value=!1)
|
|
720
721
|
const a=Uo(n,ge.value)
|
|
721
|
-
await
|
|
722
|
-
const i=
|
|
722
|
+
await We(t,n,a,o),h.value=a
|
|
723
|
+
const i=Ye(a)
|
|
723
724
|
if(i){r.value=i,h.value=null
|
|
724
725
|
const e=i.map(e=>_l(e,l.format,j.value)).join(" - ")
|
|
725
|
-
e!==a&&(v.value=e,await
|
|
726
|
-
if(a){const e=
|
|
726
|
+
e!==a&&(v.value=e,await Ue(t,a,e,o)),g.value=!1}return}const a=Oe(n)
|
|
727
|
+
if(a){const e=Ze(a,n)
|
|
727
728
|
return r.value=e,h.value=null,v.value=_l(e,l.format,j.value),void(g.value=!1)}const i=jo(Uo(n,he.value),l.format)
|
|
728
729
|
let s=i,c=xl(i,l.format,R.value)
|
|
729
730
|
if(!c){const e=xl(n,l.format,R.value)
|
|
730
|
-
e&&(s=n,c=e)}if(!c){const e=
|
|
731
|
-
e&&(c=xl(i,e,R.value)??xl(n,e,R.value))}if(await
|
|
731
|
+
e&&(s=n,c=e)}if(!c){const e=Ke(l.format)
|
|
732
|
+
e&&(c=xl(i,e,R.value)??xl(n,e,R.value))}if(await We(t,n,s,o),h.value=s,c){const e=Ze(c,n)
|
|
732
733
|
r.value=e,h.value=null
|
|
733
734
|
const a=_l(e,l.format,j.value)
|
|
734
|
-
a!==s&&(v.value=a,await
|
|
735
|
+
a!==s&&(v.value=a,await Ue(t,s,a,o)),g.value=!1}}function Ye(e,t){const o=e.split(" - ")
|
|
735
736
|
if(2!==o.length)return null
|
|
736
|
-
const l=e=>
|
|
737
|
-
return n&&a?a<n?[a,n]:[n,a]:null}function
|
|
738
|
-
return t&&t!==e?t:null}function
|
|
739
|
-
e.setHours(t.getHours(),t.getMinutes(),c.value?t.getSeconds():0,c.value?t.getMilliseconds():0)}function
|
|
740
|
-
if(void 0!==t&&(o=t,!s.value||
|
|
737
|
+
const l=e=>Oe(e,t),n=l(o[0]??""),a=l(o[1]??"")
|
|
738
|
+
return n&&a?a<n?[a,n]:[n,a]:null}function Ke(e){const t=e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i,"").trim()
|
|
739
|
+
return t&&t!==e?t:null}function Ge(e){const t=new Date
|
|
740
|
+
e.setHours(t.getHours(),t.getMinutes(),c.value?t.getSeconds():0,c.value?t.getMilliseconds():0)}function Ze(e,t){if(l.range||!s.value)return e
|
|
741
|
+
if(void 0!==t&&(o=t,!s.value||Oe(o)||hl(o,l.format)||/\dT\d|\d{1,2}:\d{2}/.test(o)))return e
|
|
741
742
|
var o
|
|
742
743
|
const n=new Date(e)
|
|
743
|
-
return
|
|
744
|
+
return Ge(n),n}function Je(e){if(l.readonly||l.disabled)return void e.preventDefault()
|
|
744
745
|
const o=e.clipboardData?.getData("text/plain")?.trim()||e.clipboardData?.getData("text")?.trim()||""
|
|
745
746
|
if(!o)return void e.preventDefault()
|
|
746
|
-
const n=function(e){if(l.range)return
|
|
747
|
+
const n=function(e){if(l.range)return Ye(e)
|
|
747
748
|
const t=xl(e,l.format,R.value)
|
|
748
|
-
if(t)return
|
|
749
|
+
if(t)return Ze(t,e)
|
|
749
750
|
const o=dl(e)
|
|
750
|
-
if(o)return
|
|
751
|
-
const n=
|
|
752
|
-
if(n)return
|
|
751
|
+
if(o)return Ze(o,e)
|
|
752
|
+
const n=it(e)
|
|
753
|
+
if(n)return Ze(n,e)
|
|
753
754
|
const a=gl(e,l.format,R.value)
|
|
754
|
-
if(a)return
|
|
755
|
-
const r=
|
|
755
|
+
if(a)return Ze(a,e)
|
|
756
|
+
const r=Ke(l.format)
|
|
756
757
|
if(r){const t=xl(e,r,R.value)
|
|
757
|
-
if(t)return
|
|
758
|
+
if(t)return Ze(t,e)}return null}(o)
|
|
758
759
|
n?(e.preventDefault(),async function(e){if(g.value=!1,h.value=null,Array.isArray(e)){const o=e.map(e=>_l(e,l.format,j.value)).join(" - ")
|
|
759
760
|
return y+=1,r.value=e,v.value=o,await(0,t.nextTick)(),void(y-=1)}const o=_l(e,l.format,j.value)
|
|
760
|
-
y+=1,r.value=e,v.value=o,await(0,t.nextTick)(),y-=1}(n)):e.preventDefault()}function
|
|
761
|
+
y+=1,r.value=e,v.value=o,await(0,t.nextTick)(),y-=1}(n)):e.preventDefault()}function Xe(e){if(!(e.target instanceof Node&&$.value?.contains(e.target)))return
|
|
761
762
|
C=!0
|
|
762
763
|
const t=function(e){const t=e.target
|
|
763
764
|
if(!(t instanceof Element&&$.value))return null
|
|
764
765
|
const o=t.closest("button, input, select, textarea, a[href], [tabindex], [contenteditable]")
|
|
765
766
|
return o&&$.value.contains(o)?o:null}(e)
|
|
766
767
|
var o
|
|
767
|
-
t&&((o=t).matches(":disabled")||"true"===o.getAttribute("aria-disabled")||"-1"===o.getAttribute("tabindex"))&&e.preventDefault()}function
|
|
768
|
+
t&&((o=t).matches(":disabled")||"true"===o.getAttribute("aria-disabled")||"-1"===o.getAttribute("tabindex"))&&e.preventDefault()}function et(){return $.value?Array.from($.value.querySelectorAll(Kl)).filter(e=>e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0):[]}function tt(e){if("Tab"!==e.key||!m.value)return
|
|
768
769
|
if(l.readonly||l.disabled)return
|
|
769
770
|
if(e.shiftKey)return x=!1,void(m.value=!1)
|
|
770
|
-
const[t]=
|
|
771
|
-
t&&(e.preventDefault(),C=!0,t.focus())}async function
|
|
772
|
-
const o=
|
|
771
|
+
const[t]=et()
|
|
772
|
+
t&&(e.preventDefault(),C=!0,t.focus())}async function ot(e){if("Tab"!==e.key)return
|
|
773
|
+
const o=et()
|
|
773
774
|
if(!o.length)return
|
|
774
775
|
const l=o[0],n=o[o.length-1],a=document.activeElement
|
|
775
776
|
if(e.shiftKey){if(a!==l)return
|
|
776
|
-
return e.preventDefault(),C=!0,void
|
|
777
|
+
return e.preventDefault(),C=!0,void wt()}a===n&&(e.preventDefault(),q=!0,m.value=!1,await(0,t.nextTick)(),function(){const e=ct()
|
|
777
778
|
if(!e)return
|
|
778
779
|
const t=Array.from(document.querySelectorAll(Kl)).filter(e=>e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0),o=t.indexOf(e)
|
|
779
|
-
o>=0&&o<t.length-1&&t[o+1]?.focus()}())}async function
|
|
780
|
+
o>=0&&o<t.length-1&&t[o+1]?.focus()}())}async function lt(e){if(function(){if(l.readonly||l.disabled)return!1
|
|
780
781
|
const e=h.value??v.value
|
|
781
782
|
if(!e)return!1
|
|
782
|
-
if(l.range){const t=
|
|
783
|
-
return t?(r.value=t,h.value=null,g.value=!1,v.value=t.map(e=>_l(e,l.format,j.value)).join(" - "),!0):(h.value=null,r.value=void 0,g.value=!0,v.value="",!1)}const t=jo(Uo(e,he.value),l.format),o=
|
|
783
|
+
if(l.range){const t=Ye(Uo(e,ge.value),{complete:!0})
|
|
784
|
+
return t?(r.value=t,h.value=null,g.value=!1,v.value=t.map(e=>_l(e,l.format,j.value)).join(" - "),!0):(h.value=null,r.value=void 0,g.value=!0,v.value="",!1)}const t=jo(Uo(e,he.value),l.format),o=Oe(e,{complete:!0})??gl(t,l.format,R.value)
|
|
784
785
|
if(!o)return h.value=null,r.value=void 0,g.value=!0,v.value="",!1
|
|
785
|
-
const n=Boolean(
|
|
786
|
+
const n=Boolean(Oe(e))||hl(t,l.format)?o:Ze(o,t)
|
|
786
787
|
r.value=n,h.value=null,g.value=!1,v.value=_l(n,l.format,j.value)}(),C)return void(C=!1)
|
|
787
788
|
const o=e?.relatedTarget
|
|
788
789
|
if(o instanceof Node&&$.value?.contains(o))return
|
|
789
790
|
await(0,t.nextTick)()
|
|
790
|
-
const n=
|
|
791
|
-
n!==a&&(a instanceof Node&&$.value?.contains(a)||(x=!1,m.value=!1,f.value=!1,G()))}function
|
|
791
|
+
const n=ct(),a=document.activeElement
|
|
792
|
+
n!==a&&(a instanceof Node&&$.value?.contains(a)||(x=!1,m.value=!1,f.value=!1,G()))}function nt(){l.readonly||l.disabled||(f.value=!0,x?x=!1:m.value||(m.value=!0))}function at(){l.readonly||l.disabled||(x=!1,m.value=!0)}function rt(e){e||E(),m.value=e}function it(e){const t=dl(e)
|
|
792
793
|
if(t)return t
|
|
793
794
|
const o=/[A-Za-z]/.test(e),l=/^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(e)
|
|
794
795
|
if(!o&&!l)return null
|
|
795
796
|
const n=new Date(e)
|
|
796
|
-
return Number.isNaN(n.getTime())?null:n}function
|
|
797
|
-
const e=
|
|
797
|
+
return Number.isNaN(n.getTime())?null:n}function st(e){return e instanceof HTMLInputElement?e:"object"==typeof e&&null!==e&&"value"in e&&e.value instanceof HTMLInputElement?e.value:null}function ct(){if(V)return V
|
|
798
|
+
const e=st(S.value?.inputRef)
|
|
798
799
|
if(e)return V=e,e
|
|
799
800
|
const t=P(S.value?.fieldRef)?.querySelector(".q-text-field__input")??null
|
|
800
|
-
return t?(V=t,t):null}function
|
|
801
|
-
$.value?.focus(),
|
|
802
|
-
"date"!==e&&
|
|
801
|
+
return t?(V=t,t):null}function ut(e){return e.isSelected||e.isRangeStart||e.isRangeEnd?"bold":e.isInRange?"tonal":"ghost"}function dt(e){$.value?.style.setProperty("--q-date-view-height",`${Math.max(0,e)}px`)}async function pt(){m.value&&!d.value?"date"===k.value&&(await(0,t.nextTick)(),dt(M.value?.getBoundingClientRect().height??0)):dt(0)}function mt(){_?.disconnect(),_=null}async function ft(){m.value&&!d.value&&"date"===k.value&&(await(0,t.nextTick)(),M.value&&(mt(),_=new MutationObserver(()=>{pt()}),_.observe(M.value,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),pt()))}function vt(){k.value="time",mt()}function ht(){k.value="date",ft()}async function gt(e){var o
|
|
802
|
+
$.value?.focus(),ht(),await(0,t.nextTick)(),o="year"===e?D.value:"month"===e?N.value:"time"===e?L.value:null,P(o)?.focus()}function yt(){const e=k.value
|
|
803
|
+
"date"!==e&>(e)}async function kt(){mt(),k.value="month",await(0,t.nextTick)()
|
|
803
804
|
const e=z.get(b.value)
|
|
804
|
-
e?.scrollIntoView({block:"center"}),e?.focus()}async function
|
|
805
|
-
if(x=!0,"date"===k.value||d.value)return e.preventDefault(),m.value=!1,await(0,t.nextTick)(),void
|
|
805
|
+
e?.scrollIntoView({block:"center"}),e?.focus()}async function bt(){mt(),w.value=B.value,k.value="year",await(0,t.nextTick)(),T.get(w.value)?.scrollIntoView({block:"center"})}async function Bt(e){if("Escape"!==e.key)return
|
|
806
|
+
if(x=!0,"date"===k.value||d.value)return e.preventDefault(),m.value=!1,await(0,t.nextTick)(),void xt()
|
|
806
807
|
e.preventDefault()
|
|
807
808
|
const o=k.value
|
|
808
|
-
await
|
|
809
|
-
return!!t&&(e===t||(!e||!e.isConnected||(!!function(e){return!e||e===document.body||e===document.documentElement}(e)||(!!$.value?.contains(e)||!function(e,t){return!e.closest(".q-date-time-picker__menu")&&!t.closest(".q-date-time-picker")?.contains(e)&&e instanceof HTMLElement&&(e.tabIndex>=0||e.matches('input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'))}(e,t)))))}function
|
|
810
|
-
const e=
|
|
811
|
-
e&&
|
|
809
|
+
await gt(o)}function wt(){ct()?.focus()}function _t(e){const t=ct()
|
|
810
|
+
return!!t&&(e===t||(!e||!e.isConnected||(!!function(e){return!e||e===document.body||e===document.documentElement}(e)||(!!$.value?.contains(e)||!function(e,t){return!e.closest(".q-date-time-picker__menu")&&!t.closest(".q-date-time-picker")?.contains(e)&&e instanceof HTMLElement&&(e.tabIndex>=0||e.matches('input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'))}(e,t)))))}function xt(){(0,t.nextTick)().then(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{!function(){if(q)return
|
|
811
|
+
const e=ct()
|
|
812
|
+
e&&_t(document.activeElement)&&(x=!0,e.focus())}()})})})}function Ct(){q?q=!1:xt()}function qt(){E()
|
|
812
813
|
const e=q
|
|
813
|
-
q&&(q=!1),e||(x=!0,
|
|
814
|
-
$e(),e?(document.addEventListener("keydown",
|
|
814
|
+
q&&(q=!1),e||(x=!0,xt())}return(0,t.watch)(r,()=>{A.value&&(Ce(A.value.getMonth()),xe(A.value.getFullYear()))}),(0,t.watch)(m,(e,t)=>{if(e&&!1===t?n("open"):e||!0!==t||n("close"),d.value)return mt(),dt(0),void(e?(document.addEventListener("keydown",Bt,{capture:!0}),vt()):(t&&(Me(),qt()),document.removeEventListener("keydown",Bt,{capture:!0})))
|
|
815
|
+
$e(),e?(document.addEventListener("keydown",Bt,{capture:!0}),function(){let e=A.value
|
|
815
816
|
const t=r.value
|
|
816
817
|
if(l.range&&Array.isArray(t)&&t.length>0){const o=t[0]
|
|
817
|
-
o instanceof Date?e=o:"string"==typeof o&&(e=xl(o,l.format,R.value))}e=e??new Date,Ce(e.getMonth()),xe(e.getFullYear()),
|
|
818
|
+
o instanceof Date?e=o:"string"==typeof o&&(e=xl(o,l.format,R.value))}e=e??new Date,Ce(e.getMonth()),xe(e.getFullYear()),ht()}(),ft()):(t&&qt(),document.removeEventListener("keydown",Bt,{capture:!0}),mt(),dt(0))}),(0,t.watch)(d,e=>{e&&mt(),m.value=!1,e&&dt(0),e?vt():ht()},{immediate:!0}),(0,t.onBeforeUnmount)(()=>{mt(),document.removeEventListener("keydown",Bt,{capture:!0})}),(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)((0,t.unref)(Rt),(0,t.mergeProps)({id:l.id,ref:"field","model-value":v.value,class:["q-date-time-picker",l.class],clearable:ye.value,"aria-label":l.label,label:l.label,"label-position":l.labelPosition,readonly:l.readonly,disabled:l.disabled,placeholder:i.value,required:l.required,size:l.size,invalid:l.invalid||g.value},e.$attrs,{onBlur:lt,"onClick:clear":wt,onFocusin:nt,onKeydown:tt,"onUpdate:modelValue":je}),(0,t.createSlots)({prepend:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-date-time-picker__input-icon"},fe.value),null,16)]),_:2},[e.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"extras")]),key:"0"}:void 0]),1040,["id","model-value","class","clearable","aria-label","label","label-position","readonly","disabled","placeholder","required","size","invalid"]),l.readonly||l.disabled?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Vo),{key:0,"model-value":m.value,anchor:S.value?.fieldRef,inline:l.inline,offset:8,placement:"bottom",trigger:"manual",arrow:"","non-modal":"",spy:"",onLeave:Ct,"onUpdate:modelValue":rt},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",{ref:"menu",class:"q-date-time-picker__menu",tabindex:"-1",onPointerdownCapture:Xe,onKeydown:ot},["date"===k.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ml,[(0,t.createElementVNode)("div",Nl,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",disabled:!de.value,title:l.texts.previousMonth,onClick:qe},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.back)),null,16)]),_:1},8,["disabled","title"]),(0,t.createVNode)((0,t.unref)(Z),{ref:"monthHeader","data-testid":"q-date-time-picker-month-header",variant:"ghost",label:oe(b.value,3),title:l.texts.pickMonth,onClick:kt},null,8,["label","title"]),(0,t.createVNode)((0,t.unref)(Z),{ref:"yearHeader","data-testid":"q-date-time-picker-year-header",variant:"ghost",label:B.value.toString(),title:l.texts.pickYear,onClick:bt},null,8,["label","title"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",disabled:!pe.value,title:l.texts.nextMonth,onClick:Ve},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.forward)),null,16)]),_:1},8,["disabled","title"])]),(0,t.createElementVNode)("div",Dl,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(ee.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:e,class:"q-date-time-picker__weekday"},(0,t.toDisplayString)(e),1))),128))]),(0,t.createElementVNode)("div",{class:"q-date-time-picker__days",onMouseleave:Be,onFocusout:we,onTouchstartPassive:_e,onTouchmovePassive:_e},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(J.value,(e,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:o,"data-day-index":o,class:(0,t.normalizeClass)(["q-date-time-picker__day",{"q-date-time-picker__day--other-month":!e.isCurrentMonth,"q-date-time-picker__day--today":e.isToday,"q-date-time-picker__day--selected":e.isSelected,"q-date-time-picker__day--in-range":e.isInRange,"q-date-time-picker__day--range-start":e.isRangeStart,"q-date-time-picker__day--range-end":e.isRangeEnd}]),label:e.date.getDate().toString(),variant:ut(e),disabled:e.isDisabled,onMouseenter:()=>be(e.date),onFocus:()=>be(e.date),onClick:()=>function(e){if(!l.readonly&&!l.disabled&&!(e.getFullYear()<Ol||e.getFullYear()>jl))if(l.range)if(U.value){const t=I.value??new Date(e),o=new Date(e),[l,n]=o<t?[o,t]:[t,o]
|
|
818
819
|
s.value&&n.setHours(23,59,c.value?59:0,0),r.value=[l,n],I.value=null,Q.value=null,H.value=null,U.value=!1}else{const t=new Date(e)
|
|
819
820
|
s.value&&I.value&&t.setHours(I.value.getHours(),I.value.getMinutes(),I.value.getSeconds(),I.value.getMilliseconds()),I.value=t,Q.value=null,H.value=null,U.value=!0}else{const t=new Date(e)
|
|
820
|
-
A.value&&!function(e){return 0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds()}(A.value)?t.setHours(A.value.getHours(),A.value.getMinutes(),A.value.getSeconds()):s.value&&
|
|
821
|
-
t.setHours(Te(o,e))})}(t??!1,e-1)},null,8,["model-value","false-label","true-label","onUpdate:modelValue"])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Tl,[(0,t.createElementVNode)("div",Pl,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.increaseHour,onClick:t=>{Ne(e-1,e=>{
|
|
822
|
-
e.setHours(Te(o,l))}else e.setHours(e.getHours()>=23?0:e.getHours()+1)})}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.up),null,16)]),_:1},8,["title","onClick"]),(0,t.createVNode)((0,t.unref)(Rt),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":(0,t.unref)(cl)(De(e-1)),onKeydown:t=>Qe(t,"hours",e-1),"onUpdate:modelValue":t=>Ae(t,e-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.decreaseHour,onClick:t=>{Ne(e-1,e=>{if(u.value){const t=e.getHours()%12||12,o=t<=1?12:t-1,l=e.getHours()>=12
|
|
823
|
-
e.setHours(Te(o,l))}else e.setHours(e.getHours()<=0?23:e.getHours()-1)})}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.down),null,16)]),_:1},8,["title","onClick"])]),o[1]||(o[1]=(0,t.createElementVNode)("div",{class:"q-date-time-picker__time-separator"},":",-1)),(0,t.createElementVNode)("div",Rl,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.increaseMinute,onClick:t=>{Ne(e-1,e=>{e.setMinutes(e.getMinutes()>=59?0:e.getMinutes()+1)})}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.up),null,16)]),_:1},8,["title","onClick"]),(0,t.createVNode)((0,t.unref)(Rt),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":(0,t.unref)(cl)((n=e-1,Se(n)?.getMinutes()??0)),onKeydown:t=>Qe(t,"minutes",e-1),"onUpdate:modelValue":t=>Fe(t,e-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.decreaseMinute,onClick:t=>function(e){Ne(e,e=>{e.setMinutes(e.getMinutes()<=0?59:e.getMinutes()-1)})}(e-1)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.down),null,16)]),_:1},8,["title","onClick"])]),c.value?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[o[0]||(o[0]=(0,t.createElementVNode)("div",{class:"q-date-time-picker__time-separator"},":",-1)),(0,t.createElementVNode)("div",Al,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.increaseSecond,onClick:t=>function(e){Ne(e,e=>{e.setSeconds(e.getSeconds()>=59?0:e.getSeconds()+1)})}(e-1)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.up),null,16)]),_:1},8,["title","onClick"]),(0,t.createVNode)((0,t.unref)(Rt),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":(0,t.unref)(cl)(Le(e-1)),onKeydown:t=>Qe(t,"seconds",e-1),"onUpdate:modelValue":t=>Ie(t,e-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.decreaseSecond,onClick:t=>function(e){Ne(e,e=>{e.setSeconds(e.getSeconds()<=0?59:e.getSeconds()-1)})}(e-1)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.down),null,16)]),_:1},8,["title","onClick"])])],64)):(0,t.createCommentVNode)("",!0)])])
|
|
821
|
+
A.value&&!function(e){return 0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds()}(A.value)?t.setHours(A.value.getHours(),A.value.getMinutes(),A.value.getSeconds()):s.value&&Ge(t),r.value=t}}(e.date)},null,8,["data-day-index","class","label","variant","disabled","onMouseenter","onFocus","onClick"]))),128))],32)],512)):"time"===k.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ll,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.range?2:1,e=>{return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:e,class:"q-date-time-picker__time-group"},[u.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",zl,[(0,t.createVNode)((0,t.unref)(Io),{"model-value":ze(e-1),"show-state-labels":"",size:"small","false-label":l.texts.am,"true-label":l.texts.pm,"onUpdate:modelValue":t=>function(e,t){Ne(t,t=>{const o=t.getHours()%12||12
|
|
822
|
+
t.setHours(Te(o,e))})}(t??!1,e-1)},null,8,["model-value","false-label","true-label","onUpdate:modelValue"])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Tl,[(0,t.createElementVNode)("div",Pl,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.increaseHour,onClick:t=>{Ne(e-1,e=>{u.value?e.setHours(Pe(e.getHours(),1)):e.setHours(e.getHours()>=23?0:e.getHours()+1)})}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.up),null,16)]),_:1},8,["title","onClick"]),(0,t.createVNode)((0,t.unref)(Rt),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":(0,t.unref)(cl)(De(e-1)),onKeydown:t=>He(t,"hours",e-1),"onUpdate:modelValue":t=>Fe(t,e-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.decreaseHour,onClick:t=>{Ne(e-1,e=>{u.value?e.setHours(Pe(e.getHours(),-1)):e.setHours(e.getHours()<=0?23:e.getHours()-1)})}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.down),null,16)]),_:1},8,["title","onClick"])]),o[1]||(o[1]=(0,t.createElementVNode)("div",{class:"q-date-time-picker__time-separator"},":",-1)),(0,t.createElementVNode)("div",Rl,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.increaseMinute,onClick:t=>{Ne(e-1,e=>{e.setMinutes(e.getMinutes()>=59?0:e.getMinutes()+1)})}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.up),null,16)]),_:1},8,["title","onClick"]),(0,t.createVNode)((0,t.unref)(Rt),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":(0,t.unref)(cl)((n=e-1,Se(n)?.getMinutes()??0)),onKeydown:t=>He(t,"minutes",e-1),"onUpdate:modelValue":t=>Ie(t,e-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.decreaseMinute,onClick:t=>function(e){Ne(e,e=>{e.setMinutes(e.getMinutes()<=0?59:e.getMinutes()-1)})}(e-1)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.down),null,16)]),_:1},8,["title","onClick"])]),c.value?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[o[0]||(o[0]=(0,t.createElementVNode)("div",{class:"q-date-time-picker__time-separator"},":",-1)),(0,t.createElementVNode)("div",Al,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.increaseSecond,onClick:t=>function(e){Ne(e,e=>{e.setSeconds(e.getSeconds()>=59?0:e.getSeconds()+1)})}(e-1)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.up),null,16)]),_:1},8,["title","onClick"]),(0,t.createVNode)((0,t.unref)(Rt),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":(0,t.unref)(cl)(Le(e-1)),onKeydown:t=>He(t,"seconds",e-1),"onUpdate:modelValue":t=>Qe(t,e-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",title:l.texts.decreaseSecond,onClick:t=>function(e){Ne(e,e=>{e.setSeconds(e.getSeconds()<=0?59:e.getSeconds()-1)})}(e-1)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({ref_for:!0},l.icons.down),null,16)]),_:1},8,["title","onClick"])])],64)):(0,t.createCommentVNode)("",!0)])])
|
|
824
823
|
var n}),128))])):"month"===k.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Fl,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(te.value,(e,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:o,ref_for:!0,ref:e=>function(e,t){const o=P(e)
|
|
825
824
|
o?z.set(t,o):z.delete(t)}(e,o),"data-testid":"q-date-time-picker-month-option","data-month-index":o,disabled:b.value===o,label:e,title:oe(o),variant:"ghost",onClick:()=>Ce(o,!0)},null,8,["data-month-index","disabled","label","title","onClick"]))),128))])):"year"===k.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Il,[(0,t.createElementVNode)("div",Ql,[(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",disabled:!ie.value,title:l.texts.previousYears,onClick:ne},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.back)),null,16)]),_:1},8,["disabled","title"]),(0,t.createElementVNode)("div",Hl,(0,t.toDisplayString)(re.value.startYear)+" - "+(0,t.toDisplayString)(re.value.endYear),1),(0,t.createVNode)((0,t.unref)(Z),{variant:"ghost",disabled:!se.value,title:l.texts.nextYears,onClick:ae},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.forward)),null,16)]),_:1},8,["disabled","title"])]),(0,t.createElementVNode)("div",Ul,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(me.value,(e,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:o,ref_for:!0,ref:t=>function(e,t){const o=P(e)
|
|
826
|
-
o?T.set(t,o):T.delete(t)}(t,e),"data-testid":"q-date-time-picker-year-option","data-year":e,disabled:B.value===e,label:e.toString(),title:e,variant:"ghost",onClick:()=>xe(e,!0)},null,8,["data-year","disabled","label","title","onClick"]))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Wl,[d.value?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:0,variant:"ghost",disabled:p.value,title:l.texts.today,onClick:Ee},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.today)),null,16)]),_:1},8,["disabled","title"])),s.value&&"date"===k.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:1,ref:"toggleTime","data-testid":"q-date-time-picker-toggle-time",variant:"ghost",title:l.texts.toggleMode,onClick:
|
|
825
|
+
o?T.set(t,o):T.delete(t)}(t,e),"data-testid":"q-date-time-picker-year-option","data-year":e,disabled:B.value===e,label:e.toString(),title:e,variant:"ghost",onClick:()=>xe(e,!0)},null,8,["data-year","disabled","label","title","onClick"]))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Wl,[d.value?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:0,variant:"ghost",disabled:p.value,title:l.texts.today,onClick:Ee},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.today)),null,16)]),_:1},8,["disabled","title"])),s.value&&"date"===k.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:1,ref:"toggleTime","data-testid":"q-date-time-picker-toggle-time",variant:"ghost",title:l.texts.toggleMode,onClick:vt},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.clock)),null,16)]),_:1},8,["title"])):"date"===k.value||d.value?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:2,"data-testid":"q-date-time-picker-toggle-date",variant:"ghost",title:l.texts.toggleMode,onClick:yt},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.calendar)),null,16)]),_:1},8,["title"])),l.clearable?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:3,"data-testid":"q-date-time-picker-clear",variant:"ghost",disabled:!ye.value,title:l.texts.clearValue,onClick:ke},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.delete)),null,16)]),_:1},8,["disabled","title"])):(0,t.createCommentVNode)("",!0)])],544)]),_:1},8,["model-value","anchor","inline"]))],64))}})),Zl=_((0,t.defineComponent)({__name:"QDefaultsProvider",props:{id:{},class:{},defaults:{}},setup:e=>(d((0,t.toRef)(e,"defaults")),(e,o)=>(0,t.renderSlot)(e.$slots,"default"))})),Jl=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],Xl={icon:"check-circle-outline"},en={close:{icon:"close"}},tn={key:0,class:"q-dialog__header"},on={key:0,class:"q-dialog__header-title"},ln={key:1,class:"q-dialog__body"},nn={key:0,class:"q-dialog__body-icon"},an={class:"q-dialog__body-text"},rn=["innerHTML"],sn={key:1},cn={key:0,class:"q-dialog__input"},un={key:2,class:"q-dialog__footer"},dn={key:0,class:"q-dialog__footer-buttons"},pn=(0,t.defineComponent)({__name:"QDialog",props:{id:{},class:{},modelValue:{type:Boolean},title:{},text:{},icon:{default:()=>Xl},buttons:{default:()=>Jl},backdropBlur:{type:Boolean,default:!0},size:{default:"small"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},focusWrap:{type:Boolean,default:!0},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!0},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},input:{},icons:{default:()=>en}},emits:["update:modelValue","action"],setup(e,{emit:o}){const l=e,n=o,a=(0,t.ref)(""),r=(0,t.ref)(""),i=(0,t.computed)(()=>["q-dialog",l.class]),s=(0,t.computed)(()=>`q-overlay--${l.size}`)
|
|
827
826
|
function c(){d(!0)}function u(){d(!1)}function d(e){n("update:modelValue",e)}return(e,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Vo),{id:l.id,"model-value":l.modelValue,"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:l.inline,attach:l.attach,"backdrop-blur":l.backdropBlur,"center-vertically":l.centerVertically,"focus-wrap":l.focusWrap,"initial-focus":l.initialFocus,"focus-within-on-activate":l.focusWithinOnActivate,"closing-focus":l.closingFocus,"return-focus-on-deactivate":l.returnFocusOnDeactivate,class:(0,t.normalizeClass)(s.value),onEnter:c,"onUpdate:modelValue":d},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(i.value)},[l.title||e.$slots.header||e.$slots["header.prepend"]||e.$slots["header.append"]?((0,t.openBlock)(),(0,t.createElementBlock)("div",tn,[(0,t.renderSlot)(e.$slots,"header",{},()=>[(0,t.renderSlot)(e.$slots,"header.prepend"),l.title?((0,t.openBlock)(),(0,t.createElementBlock)("span",on,(0,t.toDisplayString)(l.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"header.append")])])):(0,t.createCommentVNode)("",!0),l.icon||l.text||e.$slots.body?((0,t.openBlock)(),(0,t.createElementBlock)("div",ln,[(0,t.renderSlot)(e.$slots,"body",{},()=>[(0,t.renderSlot)(e.$slots,"body.icon",{},()=>[l.icon?((0,t.openBlock)(),(0,t.createElementBlock)("span",nn,[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icon)),null,16)])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",an,[l.html?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:l.text},null,8,rn)):((0,t.openBlock)(),(0,t.createElementBlock)("div",sn,(0,t.toDisplayString)(l.text),1))]),l.input?((0,t.openBlock)(),(0,t.createElementBlock)("div",cn,[(0,t.createVNode)((0,t.unref)(Rt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=e=>a.value=e),invalid:!!r.value,placeholder:l.input?.placeholder,size:"block"},{extras:(0,t.withCtx)(()=>[r.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(ve),{key:0,icon:"exclamation-sign"})):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(r.value),1)]),_:1},8,["modelValue","invalid","placeholder"])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"body.append")])])):(0,t.createCommentVNode)("",!0),l.buttons||e.$slots["footer.append"]?((0,t.openBlock)(),(0,t.createElementBlock)("div",un,[l.buttons?((0,t.openBlock)(),(0,t.createElementBlock)("span",dn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.buttons,e=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),(0,t.mergeProps)({ref_for:!0},e.props,{key:e.id,onClick:()=>function(e){if(n("action",e.id),e.action){if(l.input?.validator&&(r.value=l.input.validator((0,t.unref)(a)),(0,t.unref)(r)))return
|
|
828
827
|
e.action?.((0,t.unref)(a))}u()}(e)}),{default:(0,t.withCtx)(()=>[e.icon?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(ve),(0,t.mergeProps)({key:0,ref_for:!0},e.icon),null,16)):(0,t.createCommentVNode)("",!0)]),_:2},1040,["onClick"]))),128))])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"footer.append")])):(0,t.createCommentVNode)("",!0),l.dismissible?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z),{key:3,class:"q-dialog__close",variant:"text",onClick:u},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.normalizeProps)((0,t.guardReactiveProps)(l.icons.close)),null,16)]),_:1})):(0,t.createCommentVNode)("",!0)],2)]),_:3},8,["id","model-value","inline","attach","backdrop-blur","center-vertically","focus-wrap","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate","class"]))}}),mn=(0,t.reactive)({dialogs:[]})
|
|
829
828
|
function fn(){return{...mn,addDialog:function(e,t,o,l){const n=Ne(t).value
|
package/dist/ui.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.17.
|
|
2
|
+
* Quidgest UI v0.17.7
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1797,7 +1797,7 @@ $q-carousel-height-md: 300px;
|
|
|
1797
1797
|
}
|
|
1798
1798
|
.q-divider {
|
|
1799
1799
|
--q-divider-thickness: 1px;
|
|
1800
|
-
--q-divider-color: var(--q-theme-neutral);
|
|
1800
|
+
--q-divider-color: var(--q-theme-neutral-light);
|
|
1801
1801
|
display: flex;
|
|
1802
1802
|
align-items: center;
|
|
1803
1803
|
justify-content: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QDateTimePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDateTimePicker/QDateTimePicker.vue"],"names":[],"mappings":"AA0VA;
|
|
1
|
+
{"version":3,"file":"QDateTimePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDateTimePicker/QDateTimePicker.vue"],"names":[],"mappings":"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"}
|