@oneclick.dev/cms-core-modules 0.0.59 → 0.0.61

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.
Files changed (147) hide show
  1. package/dist/{Components-D9yIIosM.mjs → Components-C83O-xlF.mjs} +1 -1
  2. package/dist/{ContentEditor-DCmt_y_R.js → ContentEditor-BAepN3Yd.js} +51 -34
  3. package/dist/{ContentEditor-CtGeIzC4.mjs → ContentEditor-BPjWW3d1.mjs} +12341 -10099
  4. package/dist/Create-Bh4g6QW4.js +1 -0
  5. package/dist/{Create-Bwf1RXdG.mjs → Create-Cf7pvh5G.mjs} +38 -39
  6. package/dist/DateFormatter-BPPBZp1j.js +1 -0
  7. package/dist/{CalendarDate-CRT2Viyt.mjs → DateFormatter-DsmlAuYV.mjs} +353 -256
  8. package/dist/{Detail-CpfOQChd.mjs → Detail-B4b_FLDa.mjs} +2 -2
  9. package/dist/{Detail-B-PnkcXD.mjs → Detail-BGD75ul4.mjs} +2 -2
  10. package/dist/{Detail-Dd_OkpcN.js → Detail-BayNaAg9.js} +1 -1
  11. package/dist/{Detail-C4E1T87K.mjs → Detail-Byk781b4.mjs} +3 -3
  12. package/dist/{Detail-Cd5CBVN0.js → Detail-CnK-qbhE.js} +1 -1
  13. package/dist/Detail-CtbWzq-R.js +1 -0
  14. package/dist/{Detail-CNfTDUE5.js → Detail-Cxd2VMOl.js} +1 -1
  15. package/dist/{Detail-BVlGSjOq.mjs → Detail-D10shmpK.mjs} +6 -7
  16. package/dist/{Detail-CwagT6gQ.mjs → Detail-U0mgLKt6.mjs} +2 -2
  17. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs +75 -0
  18. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js +1 -0
  19. package/dist/{Entries-zyhycw1M.mjs → Entries-C6Di46My.mjs} +1 -1
  20. package/dist/{Find-BPR0uU-Z.mjs → Find-B4sAEx0B.mjs} +2 -2
  21. package/dist/{Find-BidEQJxT.js → Find-Ds6OvuH6.js} +1 -1
  22. package/dist/{GlobalStyling-BLQ_1W2y.mjs → GlobalStyling-C9VthHWK.mjs} +1 -1
  23. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs +396 -0
  24. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +1 -0
  25. package/dist/Overview-B-8TLLjh.js +1 -0
  26. package/dist/{Overview-CDN88OSM.mjs → Overview-BCpJNiEB.mjs} +1 -1
  27. package/dist/Overview-B_99j5eA.js +1 -0
  28. package/dist/{Overview-BLsZMHNW.mjs → Overview-CIa1E-HH.mjs} +1 -1
  29. package/dist/{Overview-D1nJLBe1.mjs → Overview-CgViRnNc.mjs} +1 -1
  30. package/dist/Overview-DtWvKB3W.mjs +327 -0
  31. package/dist/Overview-HvlDEgqi.mjs +862 -0
  32. package/dist/{Overview-BH3NwvNX.mjs → Overview-Su8ZUbMs.mjs} +3 -3
  33. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +345 -0
  34. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +2093 -0
  35. package/dist/{TableView-CS13LLxk.mjs → TableView-DlhHyuUZ.mjs} +48394 -36321
  36. package/dist/TableView-_2cP-w_7.js +312 -0
  37. package/dist/{TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs → TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs} +5 -5
  38. package/dist/{View-C7axVP9t.mjs → View-DDXN0tKD.mjs} +7 -7
  39. package/dist/View-DfzaVOzS.js +1 -0
  40. package/dist/agenda-D81m29_4.mjs +1135 -0
  41. package/dist/agenda-uzPPxgsW.js +1 -0
  42. package/dist/availability-B-tRp8hB.mjs +629 -0
  43. package/dist/availability-BiBbzEIM.js +1 -0
  44. package/dist/{exceptions-D3b18TiY.mjs → exceptions-BFchkR06.mjs} +70 -71
  45. package/dist/exceptions-C-DPRNQa.js +1 -0
  46. package/dist/index-4tjmIans.js +1 -0
  47. package/dist/index-AmUV8LZQ.mjs +176 -0
  48. package/dist/index-BDaVYdkD.mjs +7763 -0
  49. package/dist/{index-DT1wWnUk.mjs → index-BWDwEd8D.mjs} +1 -1
  50. package/dist/{index-CImCyE3L.mjs → index-BfBBm9uY.mjs} +1 -1
  51. package/dist/{index-DMoyoaks.mjs → index-Bkq58CeQ.mjs} +2 -2
  52. package/dist/{index-DI6mydpm.mjs → index-CABh6Qn6.mjs} +2 -2
  53. package/dist/{index-CQiY-oTN.mjs → index-CQkOH2_3.mjs} +1 -1
  54. package/dist/{index-Bwi1mtkq.mjs → index-CU-tbS5W.mjs} +1 -1
  55. package/dist/{index-BzuHN-r8.mjs → index-Cpnn_Pxd.mjs} +1 -1
  56. package/dist/index-CxETuRsG.js +1 -0
  57. package/dist/{index-DyCHxFp3.mjs → index-DRqJOqUR.mjs} +502 -449
  58. package/dist/index-DTago6vW-Bhr8E1Y6.js +88 -0
  59. package/dist/index-DTago6vW-CnomHQ_S.mjs +4123 -0
  60. package/dist/index-DfV8-6ON.js +245 -0
  61. package/dist/index-Dnn2SCSl.js +1 -0
  62. package/dist/{index-BEGU8Kme.mjs → index-Dpl9sU6a.mjs} +2 -2
  63. package/dist/index-Uf7TwBuW.mjs +110 -0
  64. package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-BshejgNP.mjs} +400 -363
  65. package/dist/index-YMaY4uuk-BxVT7IpO.js +1 -0
  66. package/dist/{index--jjEzba7.mjs → index-cOnxXTbF.mjs} +1 -1
  67. package/dist/index-hlylYYgy.mjs +24 -0
  68. package/dist/index.cjs.js +1 -1
  69. package/dist/index.mjs +98 -81
  70. package/dist/orders-Bh8w0ueq.mjs +346 -0
  71. package/dist/orders-Dt0zMz97.js +1 -0
  72. package/dist/payment-BQaAqQ5q.js +1 -0
  73. package/dist/payment-BbWByERf.mjs +1080 -0
  74. package/dist/regular-1LXNPviB.js +1 -0
  75. package/dist/regular-_05oq5Tx.mjs +1101 -0
  76. package/dist/regular-slots-Bs3WJB3U.js +1 -0
  77. package/dist/regular-slots-C2NYxLPn.mjs +222 -0
  78. package/dist/resources-DgPnEv76.mjs +811 -0
  79. package/dist/resources-eb0pivDL.js +1 -0
  80. package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +2 -2
  81. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +92 -0
  82. package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
  83. package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +10 -0
  84. package/dist/src/appointments/components/edit/{EventDialog.vue.d.ts → EventDialog/ResendConfirmationDialog.vue.d.ts} +1 -1
  85. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +51 -0
  86. package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
  87. package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
  88. package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +15 -7
  89. package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +2 -0
  90. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +68 -0
  91. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +15 -0
  92. package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
  93. package/dist/src/appointments/config.d.ts +30 -0
  94. package/dist/src/appointments/index.d.ts +32 -5
  95. package/dist/src/appointments/pages/edit/agenda.vue.d.ts +1 -1
  96. package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -1
  97. package/dist/src/appointments/pages/edit/index.vue.d.ts +1 -1
  98. package/dist/src/appointments/pages/edit/orders.vue.d.ts +64 -0
  99. package/dist/src/appointments/pages/edit/payment.vue.d.ts +1 -1
  100. package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +1 -1
  101. package/dist/src/appointments/pages/edit/resources.vue.d.ts +1 -1
  102. package/dist/src/appointments/routes.d.ts +2 -5
  103. package/dist/src/appointments/types.d.ts +16 -0
  104. package/dist/src/appointments/utils/printReservation.d.ts +45 -0
  105. package/dist/src/content-manager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
  106. package/dist/src/content-manager/components/content-editor/PageSettings.vue.d.ts +2 -0
  107. package/dist/src/content-manager/components/content-editor/SidebarSectionWrapper.vue.d.ts +11 -1
  108. package/dist/src/content-manager/types.d.ts +5 -0
  109. package/dist/{vee-validate-zod-BPQyEfpF.js → vee-validate-zod-ByykgYKJ.js} +1 -1
  110. package/dist/{vee-validate-zod-IXkfh-6Q.mjs → vee-validate-zod-CcOwoF6y.mjs} +4 -4
  111. package/package.json +4 -2
  112. package/dist/CalendarDate-CWtpXgpD.js +0 -1
  113. package/dist/Create-BP8TX6rj.js +0 -1
  114. package/dist/DateFormatter-BbcSwTs4.js +0 -1
  115. package/dist/DateFormatter-CbO0PVUK.mjs +0 -99
  116. package/dist/Detail-DUo6qKqO.js +0 -1
  117. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +0 -1
  118. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +0 -55
  119. package/dist/Overview-BNMZ9MUK.js +0 -1
  120. package/dist/Overview-CEPodGCn.mjs +0 -311
  121. package/dist/Overview-CvquDPhB.js +0 -1
  122. package/dist/Overview-D67UjG6n.mjs +0 -947
  123. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +0 -1
  124. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +0 -392
  125. package/dist/TableView-Dv4YXBD1.js +0 -111
  126. package/dist/View-7qb_ohVo.js +0 -1
  127. package/dist/agenda-B49oKGeh.mjs +0 -706
  128. package/dist/agenda-DipQ5IWP.js +0 -1
  129. package/dist/availability-C7q9tq6l.js +0 -1
  130. package/dist/availability-DeCkqiu8.mjs +0 -613
  131. package/dist/exceptions-DJ9zWX3k.js +0 -1
  132. package/dist/index-CKPshlZ8-CIz1tDwX.js +0 -1
  133. package/dist/index-DUeFrD-B.js +0 -1
  134. package/dist/index-DsnoK4ia.mjs +0 -579
  135. package/dist/index-WL1P6d3j.js +0 -1
  136. package/dist/index-_mG-aU3Z.mjs +0 -87
  137. package/dist/index-_sQDF1pH.js +0 -1
  138. package/dist/index-klI238nT.mjs +0 -24
  139. package/dist/payment-kTjsV0Jj.js +0 -1
  140. package/dist/payment-zpCM0LD-.mjs +0 -981
  141. package/dist/regular-C4_3YXqx.mjs +0 -602
  142. package/dist/regular-DFwPEbZO.js +0 -1
  143. package/dist/regular-slots-4ooEpICB.mjs +0 -67
  144. package/dist/regular-slots-BAVGbomI.js +0 -1
  145. package/dist/resources-MpQkSstv.mjs +0 -563
  146. package/dist/resources-iM28T3dD.js +0 -1
  147. package/dist/src/appointments/components/edit/RegularSlotEditor.vue.d.ts +0 -16
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),m=require("lucide-vue-next"),q={class:"flex gap-4 mb-2 justify-between"},A={class:"flex flex-col items-start p-4"},J={class:"flex gap-4 mb-2 justify-between"},W={class:"grid grid-cols-7 gap-4 py-4"},K={class:"grid grid-cols-2 gap-4"},R={class:"flex gap-4"},Q={class:"flex flex-col gap-2"},X=e.defineComponent({__name:"RegularSlotEditor",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(_,{emit:T}){const w=_,k=T,r=e.computed({get:()=>w.modelValue,set:d=>{k("update:modelValue",d)}}),v=[{value:1,name:"Monday",short:"Mon"},{value:2,name:"Tuesday",short:"Tue"},{value:3,name:"Wednesday",short:"Wed"},{value:4,name:"Thursday",short:"Thu"},{value:5,name:"Friday",short:"Fri"},{value:6,name:"Saturday",short:"Sat"},{value:0,name:"Sunday",short:"Sun"}],n=e.reactive({startTime:"",endTime:"",duration:0,days:{1:!1,2:!1,3:!1,4:!1,5:!1,6:!1,0:!1}}),S=d=>{r.value[d]=[]},c=e.ref(!1);function b(){n.startTime="10:00",n.endTime="18:00",n.duration=30,n.days={1:!1,2:!1,3:!1,4:!1,5:!1,6:!1,0:!1},c.value=!0}const h=()=>{n.duration>0&&(n.duration-=15)},D=()=>{n.duration+=15},E=()=>{const d=n.startTime.split(":").map(l=>parseInt(l)),t=n.endTime.split(":").map(l=>parseInt(l)),V=d[0]*60+d[1],f=t[0]*60+t[1];for(const l in n.days)if(n.days[l]){r.value[l]=[];for(let s=V;s+n.duration<=f;s+=n.duration){const C=Math.floor(s/60).toString().padStart(2,"0"),g=(s%60).toString().padStart(2,"0"),N=Math.floor((s+n.duration)/60).toString().padStart(2,"0"),u=((s+n.duration)%60).toString().padStart(2,"0");r.value[l].push({id:Date.now()+Math.random(),startTime:`${C}:${g}`,endTime:`${N}:${u}`})}}c.value=!1};return(d,t)=>{const V=e.resolveComponent("TabsTrigger"),f=e.resolveComponent("TabsList"),l=e.resolveComponent("Button"),s=e.resolveComponent("DropdownMenuTrigger"),C=e.resolveComponent("DropdownMenuItem"),g=e.resolveComponent("DropdownMenuContent"),N=e.resolveComponent("DropdownMenu"),u=e.resolveComponent("Input"),M=e.resolveComponent("Item"),x=e.resolveComponent("Card"),y=e.resolveComponent("DialogTrigger"),B=e.resolveComponent("DialogTitle"),I=e.resolveComponent("DialogHeader"),p=e.resolveComponent("Label"),$=e.resolveComponent("InputGroupInput"),G=e.resolveComponent("InputGroupAddon"),F=e.resolveComponent("InputGroup"),U=e.resolveComponent("Checkbox"),L=e.resolveComponent("DialogFooter"),z=e.resolveComponent("DialogContent"),H=e.resolveComponent("Dialog"),O=e.resolveComponent("TabsContent"),P=e.resolveComponent("Tabs");return e.openBlock(),e.createBlock(P,{"default-value":1},{default:e.withCtx(()=>[e.createVNode(f,{class:"grid w-full grid-cols-7"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,a=>e.createVNode(V,{key:a.value,value:a.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.short),1)]),_:2},1032,["value"])),64))]),_:1}),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,a=>e.createVNode(O,{key:a.value,value:a.value},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(l,{variant:"ghost",onClick:o=>S(a.value),disabled:r.value[a.value].length===0},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Trash2),{class:"size-4"}),e.createTextVNode(" Clear "+e.toDisplayString(a.name)+" Slots ",1)]),_:2},1032,["onClick","disabled"]),e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(s,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(l,{variant:"ghost",disabled:r.value[a.value].length===0},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Clipboard),{class:"size-4"}),e.createTextVNode(" Copy "+e.toDisplayString(a.name)+" Slots to ",1)]),_:2},1032,["disabled"])]),_:2},1024),e.createVNode(g,{class:"w-56"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,o=>e.createVNode(C,{key:o.value,onClick:i=>r.value[o.value]=JSON.parse(JSON.stringify(r.value[a.value])),disabled:o.value===a.value},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(o.name),1)]),_:2},1032,["onClick","disabled"])),64))]),_:2},1024)]),_:2},1024)]),e.createVNode(x,{class:"mb-4 py-0"},{default:e.withCtx(()=>[e.createElementVNode("div",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[a.value],o=>(e.openBlock(),e.createBlock(M,{key:o.id,class:"mb-2"},{default:e.withCtx(()=>[e.createVNode(u,{class:"w-32",modelValue:o.startTime,"onUpdate:modelValue":i=>o.startTime=i,type:"time"},null,8,["modelValue","onUpdate:modelValue"]),t[9]||(t[9]=e.createElementVNode("span",{class:"mx-2"},"to",-1)),e.createVNode(u,{class:"w-32",modelValue:o.endTime,"onUpdate:modelValue":i=>o.endTime=i,type:"time"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(l,{variant:"ghost",size:"icon",onClick:i=>r.value[a.value]=r.value[a.value].filter(j=>j.id!==o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Trash2),{class:"size-4"})]),_:1},8,["onClick"])]),_:2},1024))),128)),e.createVNode(l,{onClick:o=>r.value[a.value].push({id:Date.now(),startTime:"",endTime:""}),variant:"outline"},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode(" + Add Time Slot ",-1)])]),_:1},8,["onClick"])])]),_:2},1024),e.createElementVNode("div",J,[e.createVNode(H,{open:c.value,"onUpdate:open":t[8]||(t[8]=o=>c.value=o)},{default:e.withCtx(()=>[e.createVNode(y,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(l,{variant:"outline",onClick:t[0]||(t[0]=o=>b())},{default:e.withCtx(()=>[e.createVNode(e.unref(m.ClockPlus),{class:"size-4"}),t[11]||(t[11]=e.createTextVNode(" Generate Time Slots ",-1))]),_:1})]),_:1}),e.createVNode(z,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(I,null,{default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("Generate Time Slots",-1)])]),_:1})]),_:1}),e.createElementVNode("div",W,[e.createVNode(x,{class:"col-span-5 px-4"},{default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createElementVNode("div",null,[e.createVNode(p,{class:"font-medium mb-2",for:"generate-time-dialog-start"},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("Start Time",-1)])]),_:1}),e.createVNode(u,{type:"time",id:"generate-time-dialog-start",modelValue:n.startTime,"onUpdate:modelValue":t[1]||(t[1]=o=>n.startTime=o)},null,8,["modelValue"])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"font-medium mb-2",for:"generate-time-dialog-end"},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode("End Time",-1)])]),_:1}),e.createVNode(u,{type:"time",id:"generate-time-dialog-end",modelValue:n.endTime,"onUpdate:modelValue":t[2]||(t[2]=o=>n.endTime=o)},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"font-medium mb-2",for:"generate-time-dialog-duration"},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("Service Duration",-1)])]),_:1}),e.createElementVNode("div",R,[e.createVNode(l,{variant:"outline",onClick:t[3]||(t[3]=o=>h())},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Minus),{class:"size-4"})]),_:1}),e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode($,{type:"number",placeholder:"0",class:"no-spinner",step:"15",min:"0",id:"generate-time-dialog-duration",modelValue:n.duration,"onUpdate:modelValue":t[4]||(t[4]=o=>n.duration=o)},null,8,["modelValue"]),e.createVNode(G,{align:"inline-end"},{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode(" mins ",-1)])]),_:1})]),_:1}),e.createVNode(l,{variant:"outline",onClick:t[5]||(t[5]=o=>D())},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-4"})]),_:1})])])]),_:1}),e.createVNode(x,{class:"col-span-2 px-4"},{default:e.withCtx(()=>[e.createVNode(p,{class:"font-medium text-xs"},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode("Generate slots for",-1)])]),_:1}),e.createElementVNode("div",Q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,o=>e.createElementVNode("div",{class:"flex items-center",key:o.value},[e.createVNode(U,{id:`generate-time-dialog-${o.value}`,modelValue:n.days[o.value],"onUpdate:modelValue":i=>n.days[o.value]=i},null,8,["id","modelValue","onUpdate:modelValue"]),e.createVNode(p,{for:`generate-time-dialog-${o.value}`,class:"ml-2 text-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.name),1)]),_:2},1032,["for"])])),64))])]),_:2},1024)]),e.createVNode(L,null,{default:e.withCtx(()=>[e.createVNode(l,{variant:"outline",onClick:t[6]||(t[6]=o=>c.value=!1)},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(l,{onClick:t[7]||(t[7]=o=>E())},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode(" Generate ",-1)])]),_:1})]),_:1})]),_:2},1024)]),_:2},1032,["open"])])]),_:2},1032,["value"])),64))]),_:1})}}});exports._sfc_main=X;
@@ -1,392 +0,0 @@
1
- import { defineComponent as te, computed as ne, reactive as le, ref as oe, resolveComponent as a, createBlock as y, openBlock as v, withCtx as n, createVNode as e, createElementBlock as C, Fragment as b, renderList as V, createTextVNode as i, toDisplayString as S, createElementVNode as d, unref as g } from "vue";
2
- import { Trash2 as G, Clipboard as ae, ClockPlus as se, Minus as ue, Plus as ie } from "lucide-vue-next";
3
- const de = { class: "flex gap-4 mb-2 justify-between" }, re = { class: "flex flex-col items-start p-4" }, me = { class: "flex gap-4 mb-2 justify-between" }, pe = { class: "grid grid-cols-7 gap-4 py-4" }, fe = { class: "grid grid-cols-2 gap-4" }, ve = { class: "flex gap-4" }, ce = { class: "flex flex-col gap-2" }, Te = /* @__PURE__ */ te({
4
- __name: "RegularSlotEditor",
5
- props: {
6
- modelValue: {
7
- type: Object,
8
- required: !0
9
- }
10
- },
11
- emits: ["update:modelValue"],
12
- setup(U, { emit: z }) {
13
- const E = U, F = z, r = ne({
14
- get: () => E.modelValue,
15
- set: (p) => {
16
- F("update:modelValue", p);
17
- }
18
- }), D = [
19
- { value: 1, name: "Monday", short: "Mon" },
20
- { value: 2, name: "Tuesday", short: "Tue" },
21
- { value: 3, name: "Wednesday", short: "Wed" },
22
- { value: 4, name: "Thursday", short: "Thu" },
23
- { value: 5, name: "Friday", short: "Fri" },
24
- { value: 6, name: "Saturday", short: "Sat" },
25
- { value: 0, name: "Sunday", short: "Sun" }
26
- ], o = le({
27
- startTime: "",
28
- endTime: "",
29
- duration: 0,
30
- days: {
31
- 1: !1,
32
- 2: !1,
33
- 3: !1,
34
- 4: !1,
35
- 5: !1,
36
- 6: !1,
37
- 0: !1
38
- }
39
- }), B = (p) => {
40
- r.value[p] = [];
41
- }, _ = oe(!1);
42
- function L() {
43
- o.startTime = "10:00", o.endTime = "18:00", o.duration = 30, o.days = {
44
- 1: !1,
45
- 2: !1,
46
- 3: !1,
47
- 4: !1,
48
- 5: !1,
49
- 6: !1,
50
- 0: !1
51
- }, _.value = !0;
52
- }
53
- const N = () => {
54
- o.duration > 0 && (o.duration -= 15);
55
- }, H = () => {
56
- o.duration += 15;
57
- }, O = () => {
58
- const p = o.startTime.split(":").map((s) => parseInt(s)), t = o.endTime.split(":").map((s) => parseInt(s)), k = p[0] * 60 + p[1], x = t[0] * 60 + t[1];
59
- for (const s in o.days)
60
- if (o.days[s]) {
61
- r.value[s] = [];
62
- for (let m = k; m + o.duration <= x; m += o.duration) {
63
- const w = Math.floor(m / 60).toString().padStart(2, "0"), M = (m % 60).toString().padStart(2, "0"), I = Math.floor((m + o.duration) / 60).toString().padStart(2, "0"), c = ((m + o.duration) % 60).toString().padStart(2, "0");
64
- r.value[s].push({
65
- id: Date.now() + Math.random(),
66
- startTime: `${w}:${M}`,
67
- endTime: `${I}:${c}`
68
- });
69
- }
70
- }
71
- _.value = !1;
72
- };
73
- return (p, t) => {
74
- const k = a("TabsTrigger"), x = a("TabsList"), s = a("Button"), m = a("DropdownMenuTrigger"), w = a("DropdownMenuItem"), M = a("DropdownMenuContent"), I = a("DropdownMenu"), c = a("Input"), P = a("Item"), $ = a("Card"), j = a("DialogTrigger"), A = a("DialogTitle"), J = a("DialogHeader"), T = a("Label"), W = a("InputGroupInput"), q = a("InputGroupAddon"), K = a("InputGroup"), R = a("Checkbox"), Q = a("DialogFooter"), X = a("DialogContent"), Y = a("Dialog"), Z = a("TabsContent"), h = a("Tabs");
75
- return v(), y(h, { "default-value": 1 }, {
76
- default: n(() => [
77
- e(x, { class: "grid w-full grid-cols-7" }, {
78
- default: n(() => [
79
- (v(), C(b, null, V(D, (u) => e(k, {
80
- key: u.value,
81
- value: u.value
82
- }, {
83
- default: n(() => [
84
- i(S(u.short), 1)
85
- ]),
86
- _: 2
87
- }, 1032, ["value"])), 64))
88
- ]),
89
- _: 1
90
- }),
91
- (v(), C(b, null, V(D, (u) => e(Z, {
92
- key: u.value,
93
- value: u.value
94
- }, {
95
- default: n(() => [
96
- d("div", de, [
97
- e(s, {
98
- variant: "ghost",
99
- onClick: (l) => B(u.value),
100
- disabled: r.value[u.value].length === 0
101
- }, {
102
- default: n(() => [
103
- e(g(G), { class: "size-4" }),
104
- i(" Clear " + S(u.name) + " Slots ", 1)
105
- ]),
106
- _: 2
107
- }, 1032, ["onClick", "disabled"]),
108
- e(I, null, {
109
- default: n(() => [
110
- e(m, { "as-child": "" }, {
111
- default: n(() => [
112
- e(s, {
113
- variant: "ghost",
114
- disabled: r.value[u.value].length === 0
115
- }, {
116
- default: n(() => [
117
- e(g(ae), { class: "size-4" }),
118
- i(" Copy " + S(u.name) + " Slots to ", 1)
119
- ]),
120
- _: 2
121
- }, 1032, ["disabled"])
122
- ]),
123
- _: 2
124
- }, 1024),
125
- e(M, { class: "w-56" }, {
126
- default: n(() => [
127
- (v(), C(b, null, V(D, (l) => e(w, {
128
- key: l.value,
129
- onClick: (f) => r.value[l.value] = JSON.parse(JSON.stringify(r.value[u.value])),
130
- disabled: l.value === u.value
131
- }, {
132
- default: n(() => [
133
- d("span", null, S(l.name), 1)
134
- ]),
135
- _: 2
136
- }, 1032, ["onClick", "disabled"])), 64))
137
- ]),
138
- _: 2
139
- }, 1024)
140
- ]),
141
- _: 2
142
- }, 1024)
143
- ]),
144
- e($, { class: "mb-4 py-0" }, {
145
- default: n(() => [
146
- d("div", re, [
147
- (v(!0), C(b, null, V(r.value[u.value], (l) => (v(), y(P, {
148
- key: l.id,
149
- class: "mb-2"
150
- }, {
151
- default: n(() => [
152
- e(c, {
153
- class: "w-32",
154
- modelValue: l.startTime,
155
- "onUpdate:modelValue": (f) => l.startTime = f,
156
- type: "time"
157
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
158
- t[9] || (t[9] = d("span", { class: "mx-2" }, "to", -1)),
159
- e(c, {
160
- class: "w-32",
161
- modelValue: l.endTime,
162
- "onUpdate:modelValue": (f) => l.endTime = f,
163
- type: "time"
164
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
165
- e(s, {
166
- variant: "ghost",
167
- size: "icon",
168
- onClick: (f) => r.value[u.value] = r.value[u.value].filter((ee) => ee.id !== l.id)
169
- }, {
170
- default: n(() => [
171
- e(g(G), { class: "size-4" })
172
- ]),
173
- _: 1
174
- }, 8, ["onClick"])
175
- ]),
176
- _: 2
177
- }, 1024))), 128)),
178
- e(s, {
179
- onClick: (l) => r.value[u.value].push({ id: Date.now(), startTime: "", endTime: "" }),
180
- variant: "outline"
181
- }, {
182
- default: n(() => [...t[10] || (t[10] = [
183
- i(" + Add Time Slot ", -1)
184
- ])]),
185
- _: 1
186
- }, 8, ["onClick"])
187
- ])
188
- ]),
189
- _: 2
190
- }, 1024),
191
- d("div", me, [
192
- e(Y, {
193
- open: _.value,
194
- "onUpdate:open": t[8] || (t[8] = (l) => _.value = l)
195
- }, {
196
- default: n(() => [
197
- e(j, { "as-child": "" }, {
198
- default: n(() => [
199
- e(s, {
200
- variant: "outline",
201
- onClick: t[0] || (t[0] = (l) => L())
202
- }, {
203
- default: n(() => [
204
- e(g(se), { class: "size-4" }),
205
- t[11] || (t[11] = i(" Generate Time Slots ", -1))
206
- ]),
207
- _: 1
208
- })
209
- ]),
210
- _: 1
211
- }),
212
- e(X, { class: "sm:max-w-2xl" }, {
213
- default: n(() => [
214
- e(J, null, {
215
- default: n(() => [
216
- e(A, null, {
217
- default: n(() => [...t[12] || (t[12] = [
218
- i("Generate Time Slots", -1)
219
- ])]),
220
- _: 1
221
- })
222
- ]),
223
- _: 1
224
- }),
225
- d("div", pe, [
226
- e($, { class: "col-span-5 px-4" }, {
227
- default: n(() => [
228
- d("div", fe, [
229
- d("div", null, [
230
- e(T, {
231
- class: "font-medium mb-2",
232
- for: "generate-time-dialog-start"
233
- }, {
234
- default: n(() => [...t[13] || (t[13] = [
235
- i("Start Time", -1)
236
- ])]),
237
- _: 1
238
- }),
239
- e(c, {
240
- type: "time",
241
- id: "generate-time-dialog-start",
242
- modelValue: o.startTime,
243
- "onUpdate:modelValue": t[1] || (t[1] = (l) => o.startTime = l)
244
- }, null, 8, ["modelValue"])
245
- ]),
246
- d("div", null, [
247
- e(T, {
248
- class: "font-medium mb-2",
249
- for: "generate-time-dialog-end"
250
- }, {
251
- default: n(() => [...t[14] || (t[14] = [
252
- i("End Time", -1)
253
- ])]),
254
- _: 1
255
- }),
256
- e(c, {
257
- type: "time",
258
- id: "generate-time-dialog-end",
259
- modelValue: o.endTime,
260
- "onUpdate:modelValue": t[2] || (t[2] = (l) => o.endTime = l)
261
- }, null, 8, ["modelValue"])
262
- ])
263
- ]),
264
- d("div", null, [
265
- e(T, {
266
- class: "font-medium mb-2",
267
- for: "generate-time-dialog-duration"
268
- }, {
269
- default: n(() => [...t[15] || (t[15] = [
270
- i("Service Duration", -1)
271
- ])]),
272
- _: 1
273
- }),
274
- d("div", ve, [
275
- e(s, {
276
- variant: "outline",
277
- onClick: t[3] || (t[3] = (l) => N())
278
- }, {
279
- default: n(() => [
280
- e(g(ue), { class: "size-4" })
281
- ]),
282
- _: 1
283
- }),
284
- e(K, null, {
285
- default: n(() => [
286
- e(W, {
287
- type: "number",
288
- placeholder: "0",
289
- class: "no-spinner",
290
- step: "15",
291
- min: "0",
292
- id: "generate-time-dialog-duration",
293
- modelValue: o.duration,
294
- "onUpdate:modelValue": t[4] || (t[4] = (l) => o.duration = l)
295
- }, null, 8, ["modelValue"]),
296
- e(q, { align: "inline-end" }, {
297
- default: n(() => [...t[16] || (t[16] = [
298
- i(" mins ", -1)
299
- ])]),
300
- _: 1
301
- })
302
- ]),
303
- _: 1
304
- }),
305
- e(s, {
306
- variant: "outline",
307
- onClick: t[5] || (t[5] = (l) => H())
308
- }, {
309
- default: n(() => [
310
- e(g(ie), { class: "size-4" })
311
- ]),
312
- _: 1
313
- })
314
- ])
315
- ])
316
- ]),
317
- _: 1
318
- }),
319
- e($, { class: "col-span-2 px-4" }, {
320
- default: n(() => [
321
- e(T, { class: "font-medium text-xs" }, {
322
- default: n(() => [...t[17] || (t[17] = [
323
- i("Generate slots for", -1)
324
- ])]),
325
- _: 1
326
- }),
327
- d("div", ce, [
328
- (v(), C(b, null, V(D, (l) => d("div", {
329
- class: "flex items-center",
330
- key: l.value
331
- }, [
332
- e(R, {
333
- id: `generate-time-dialog-${l.value}`,
334
- modelValue: o.days[l.value],
335
- "onUpdate:modelValue": (f) => o.days[l.value] = f
336
- }, null, 8, ["id", "modelValue", "onUpdate:modelValue"]),
337
- e(T, {
338
- for: `generate-time-dialog-${l.value}`,
339
- class: "ml-2 text-sm"
340
- }, {
341
- default: n(() => [
342
- i(S(l.name), 1)
343
- ]),
344
- _: 2
345
- }, 1032, ["for"])
346
- ])), 64))
347
- ])
348
- ]),
349
- _: 2
350
- }, 1024)
351
- ]),
352
- e(Q, null, {
353
- default: n(() => [
354
- e(s, {
355
- variant: "outline",
356
- onClick: t[6] || (t[6] = (l) => _.value = !1)
357
- }, {
358
- default: n(() => [...t[18] || (t[18] = [
359
- i(" Cancel ", -1)
360
- ])]),
361
- _: 1
362
- }),
363
- e(s, {
364
- onClick: t[7] || (t[7] = (l) => O())
365
- }, {
366
- default: n(() => [...t[19] || (t[19] = [
367
- i(" Generate ", -1)
368
- ])]),
369
- _: 1
370
- })
371
- ]),
372
- _: 1
373
- })
374
- ]),
375
- _: 2
376
- }, 1024)
377
- ]),
378
- _: 2
379
- }, 1032, ["open"])
380
- ])
381
- ]),
382
- _: 2
383
- }, 1032, ["value"])), 64))
384
- ]),
385
- _: 1
386
- });
387
- };
388
- }
389
- });
390
- export {
391
- Te as _
392
- };