@oneclick.dev/cms-core-modules 0.0.120 → 0.0.122
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/{ContentEditor-YFnqVZrX.js → ContentEditor-CoJjsV-m.js} +43 -43
- package/dist/{ContentEditor-W4YrQyBW.mjs → ContentEditor-DIwqplfB.mjs} +9952 -11359
- package/dist/{Detail-C8wQiDcv.js → Detail-BCUUNWvp.js} +1 -1
- package/dist/{Detail-CtItxMX4.mjs → Detail-B_scnidb.mjs} +1 -1
- package/dist/Detail-Cn9Bk0u0.mjs +852 -0
- package/dist/Detail-DGg_xXZc.js +1 -0
- package/dist/Detail-Dk8E6_uF.mjs +3731 -0
- package/dist/Detail-Sc2qZdxj.js +1 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-4_t0PPqM.mjs +78 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D1b9_iiN.js +1 -0
- package/dist/Overview-CVgViW3c.mjs +852 -0
- package/dist/Overview-DEF-z7Yb.js +1 -0
- package/dist/SendPush-CgSBEex2.js +1 -0
- package/dist/SendPush-CmbjcQBL.mjs +680 -0
- package/dist/{agenda-BusN9-XG.js → agenda-B54F8cEr.js} +1 -1
- package/dist/{agenda-CJXKaIo0.mjs → agenda-BCKDYOeF.mjs} +1 -1
- package/dist/{availability-UUKdgidr.js → availability-C4v46rha.js} +1 -1
- package/dist/{availability-BP6GACqo.mjs → availability-DVT1Mdxq.mjs} +1 -1
- package/dist/{booking-data-BHfLyOlu.js → booking-data-A5JrLY4j.js} +1 -1
- package/dist/{booking-data-WCBcpOOo.mjs → booking-data-lZvSYna2.mjs} +1 -1
- package/dist/{exceptions-B8r2psu2.mjs → exceptions-DJHfvADv.mjs} +1 -1
- package/dist/{exceptions-BazAiy2s.js → exceptions-DKc8fO1S.js} +1 -1
- package/dist/{index-BiKWKrEs.js → index-Bk3yLv_G.js} +1 -1
- package/dist/{index-Dnn2SCSl.js → index-CZau1wR8.js} +1 -1
- package/dist/{index-DRqJOqUR.mjs → index-DE8rdSjd.mjs} +0 -22
- package/dist/{index-DJxex3Dt.mjs → index-DU3Ib10Z.mjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +50 -37
- package/dist/languages-C_8yMQOH.mjs +4 -0
- package/dist/languages-Dqvk3X8G.js +1 -0
- package/dist/{orders-CAAuDhkQ.js → orders-BMosTk6r.js} +1 -1
- package/dist/{orders-B8C6u4iF.mjs → orders-CElKNc1v.mjs} +1 -1
- package/dist/{payment-BOOJ1O6M.mjs → payment-DSQ_2FIT.mjs} +1 -1
- package/dist/{payment-IxA9qiCV.js → payment-DlgYuea2.js} +1 -1
- package/dist/{refunds-CqGKm1NG.js → refunds-Cvw9N--u.js} +1 -1
- package/dist/{refunds-CI0qpJC0.mjs → refunds-xR936Ted.mjs} +1 -1
- package/dist/reports-BQT_GZzU.js +158 -0
- package/dist/reports-DksZCTOw.mjs +837 -0
- package/dist/{resources-dIZDh4Sz.mjs → resources-C-5BU9Ux.mjs} +1 -1
- package/dist/{resources-B75nXreU.js → resources-D04yKKVN.js} +1 -1
- package/dist/src/productCollections/components/detail/Subcollections.vue.d.ts +2 -0
- package/dist/src/productCollections/types.d.ts +1 -4
- package/dist/src/products/components/detail/variants/VariantList.vue.d.ts +48 -6
- package/dist/src/products/components/detail/variants/dialogs/VariantDialog.vue.d.ts +4 -0
- package/dist/src/push-notifications/config.d.ts +22 -0
- package/dist/src/push-notifications/index.d.ts +22 -0
- package/dist/src/push-notifications/types.d.ts +5 -0
- package/dist/{vee-validate-zod-CcOwoF6y.mjs → vee-validate-zod-SjDT8X35.mjs} +92 -90
- package/dist/{vee-validate-zod-ByykgYKJ.js → vee-validate-zod-VCmLnrtQ.js} +1 -1
- package/package.json +2 -2
- package/dist/Detail-C1Blq61w.mjs +0 -585
- package/dist/Detail-CPqug27l.js +0 -1
- package/dist/Detail-CjuhjPby.js +0 -1
- package/dist/Detail-Dnpnmy4-.mjs +0 -3477
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BXVf9gZW.mjs +0 -77
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CFFZ6r8i.js +0 -1
- package/dist/Overview-BWLxUksJ.mjs +0 -860
- package/dist/Overview-DAxCu9XC.js +0 -1
- package/dist/SendPush-COns44j7.js +0 -1
- package/dist/SendPush-CPIOjVX4.mjs +0 -184
- /package/dist/src/{productCollections/components/detail/SEO.vue.d.ts → appointments/pages/edit/reports.vue.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("lucide-vue-next"),_=require("@oneclick.dev/cms-kit"),X=require("./index-CxETuRsG.js"),j=require("./utils-Yd6F5mea.js"),y=require("./index-ijdf0d9-.js"),J={class:"grid @md:grid-cols-2 @2xl:grid-cols-3 @3xl:grid-cols-4 @4xl:grid-cols-5 @5xl:grid-cols-6 gap-6"},Y=["onClick","onContextmenu"],Z=["src"],ee={class:"font-semibold"},te={class:"text-sm text-muted-foreground flex items-center gap-2"},oe={class:"flex items-center gap-2"},ne={key:0},le=e.defineComponent({__name:"GridView",props:{products:{type:Array,required:!0}},setup(T){const o=e.inject("selection"),{navigateTo:f}=_.useModuleRoute(),{hasPermission:g}=_.useModulePermissions(),v=(i,l)=>{const u=l.ctrlKey||l.metaKey;if(!l.shiftKey)if(u||o.value.length>0){const x=o.value.indexOf(i.id);x>-1?o.value.splice(x,1):o.value.push(i.id)}else o.value=[],f(i.id)},n=i=>{i.target.closest(".GRID_ITEM")||(o.value=[])},d=(i,l)=>{l.ctrlKey||l.metaKey?o.value.includes(i.id)?o.value.splice(o.value.indexOf(i.id),1):o.value.push(i.id):o.value.includes(i.id)||(o.value=[i.id])};return(i,l)=>(e.openBlock(),e.createElementBlock("div",{class:"@container mb-4 flex-1 select-none",onClick:l[0]||(l[0]=u=>o.value=[]),onContextmenu:n},[e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.products,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,onClick:e.withModifiers(k=>v(u,k),["stop"]),onContextmenu:k=>d(u,k),class:"GRID_ITEM cursor-pointer"},[e.createElementVNode("div",{class:e.normalizeClass(["aspect-square bg-muted rounded-xl overflow-hidden mb-2 transition-all duration-200",{"outline outline-4 outline-primary/50":e.unref(o).includes(u.id)}])},[u.featuredMedia?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.featuredMedia,class:"w-full h-full object-cover pointer-events-none",draggable:"false"},null,8,Z)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",null,[e.createElementVNode("p",ee,e.toDisplayString(u.title),1),e.createElementVNode("p",te,[e.createElementVNode("span",oe,[u.status==="published"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l[1]||(l[1]=e.createElementVNode("span",{class:"block shrink-0 size-3 rounded-full bg-green-500"},null,-1)),l[2]||(l[2]=e.createTextVNode(" Published ",-1))],64)):u.status==="draft"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l[3]||(l[3]=e.createElementVNode("span",{class:"block shrink-0 size-3 rounded-full bg-blue-500"},null,-1)),l[4]||(l[4]=e.createTextVNode(" Draft ",-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l[5]||(l[5]=e.createElementVNode("span",{class:"block shrink-0 size-3 rounded-full bg-gray-300"},null,-1)),l[6]||(l[6]=e.createTextVNode(" Archived ",-1))],64))]),u.variantsTotal>1?(e.openBlock(),e.createElementBlock("span",ne,"| "+e.toDisplayString(u.variantsTotal)+" variants",1)):e.createCommentVNode("",!0)])])],40,Y))),128))])],32))}}),re={class:"flex items-center gap-2"},se={key:0,class:"bg-green-500 text-green-950 px-2 py-1 rounded-lg text-xs"},ae={key:1,class:"bg-blue-500 text-blue-950 px-2 py-1 rounded-lg text-xs"},ie={key:2,class:"bg-gray-500 text-gray-950 px-2 py-1 rounded-lg text-xs"},ce=e.defineComponent({__name:"ListView",props:{products:{type:Array,required:!0}},setup(T){const o=e.inject("selection"),{navigateTo:f}=_.useModuleRoute(),{hasPermission:g}=_.useModulePermissions(),v=(n,d)=>{n?o.value.push(d):o.value=o.value.filter(i=>i!==d)};return(n,d)=>{const i=e.resolveComponent("TableHead"),l=e.resolveComponent("TableRow"),u=e.resolveComponent("TableHeader"),k=e.resolveComponent("Checkbox"),x=e.resolveComponent("TableCell"),m=e.resolveComponent("AvatarImage"),t=e.resolveComponent("AvatarFallback"),p=e.resolveComponent("Avatar"),C=e.resolveComponent("TableBody"),V=e.resolveComponent("Table"),N=e.resolveComponent("Card");return e.openBlock(),e.createBlock(N,{class:"w-full py-4 px-4"},{default:e.withCtx(()=>[e.createVNode(V,{class:"rounded overflow-hidden"},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(l,null,{default:e.withCtx(()=>[e.unref(o)?.length>0?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),e.createVNode(i,null,{default:e.withCtx(()=>[...d[1]||(d[1]=[e.createTextVNode("Title",-1)])]),_:1}),e.createVNode(i,null,{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("Status",-1)])]),_:1}),e.createVNode(i,null,{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode(" Variants",-1)])]),_:1}),e.createVNode(i,null,{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("Price",-1)])]),_:1})]),_:1})]),_:1}),e.createVNode(C,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.products,c=>(e.openBlock(),e.createBlock(l,{key:c.id,onClick:w=>e.unref(f)(c.id),class:"cursor-pointer"},{default:e.withCtx(()=>[e.unref(o)?.length>0?(e.openBlock(),e.createBlock(x,{key:0},{default:e.withCtx(()=>[e.createVNode(k,{"model-value":e.unref(o)?.includes(c.id),"onUpdate:modelValue":w=>v(w,c.id),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["prevent","stop"]))},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(x,{class:"font-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",re,[e.createVNode(p,{class:"size-12 rounded-xl"},{default:e.withCtx(()=>[e.createVNode(m,{src:c.media?.[0],class:"object-cover"},null,8,["src"]),e.createVNode(t,{class:"rounded-xl"})]),_:2},1024),e.createElementVNode("span",null,e.toDisplayString(c.title),1)])]),_:2},1024),e.createVNode(x,null,{default:e.withCtx(()=>[c.status==="published"?(e.openBlock(),e.createElementBlock("span",se,"Published")):c.status==="draft"?(e.openBlock(),e.createElementBlock("span",ae,"Draft")):c.status==="archived"?(e.openBlock(),e.createElementBlock("span",ie,"Archived")):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(x,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.variantsTotal),1)]),_:2},1024),e.createVNode(x,{class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(" € "+e.toDisplayString(c.price||0),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})]),_:1})}}}),de={class:"truncate"},ue={key:0},me={key:1},pe={key:2},fe={key:3},ve={class:"relative w-full max-w-sm items-center"},Ce={class:"truncate"},xe={class:"truncate"},ge={class:"flex items-center space-x-2 mb-4"},Ve={class:"flex items-center space-x-2 mb-4"},Ne={class:"flex items-center space-x-2 mb-4"},ke=e.defineComponent({__name:"FilterPopover",setup(T){const o=e.inject("filter"),f=e.inject("collections"),g=()=>{o.value={collections:[],published:!0,draft:!0,archived:!1}};return(v,n)=>{const d=e.resolveComponent("Button"),i=e.resolveComponent("PopoverTrigger"),l=e.resolveComponent("ComboboxTrigger"),u=e.resolveComponent("ComboboxAnchor"),k=e.resolveComponent("ComboboxInput"),x=e.resolveComponent("ComboboxEmpty"),m=e.resolveComponent("ComboboxItemIndicator"),t=e.resolveComponent("ComboboxItem"),p=e.resolveComponent("ScrollArea"),C=e.resolveComponent("ComboboxGroup"),V=e.resolveComponent("ComboboxList"),N=e.resolveComponent("Combobox"),c=e.resolveComponent("Checkbox"),w=e.resolveComponent("PopoverContent"),h=e.resolveComponent("Popover");return e.openBlock(),e.createBlock(h,null,{default:e.withCtx(()=>[e.createVNode(i,{asChild:""},{default:e.withCtx(()=>[e.createVNode(d,{variant:"outline"},{default:e.withCtx(()=>[e.createVNode(e.unref(B.Filter),{class:"size-4"}),n[4]||(n[4]=e.createTextVNode(" Filter ",-1))]),_:1})]),_:1}),e.createVNode(w,{class:"w-64"},{default:e.withCtx(()=>[n[14]||(n[14]=e.createElementVNode("p",{class:"text-sm font-medium text-muted-foreground mb-4"}," Filter by Collection ",-1)),e.createVNode(N,{modelValue:e.unref(o).collections,"onUpdate:modelValue":n[0]||(n[0]=s=>e.unref(o).collections=s),by:"id",multiple:!0,class:"mb-6"},{default:e.withCtx(()=>[e.createVNode(u,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(l,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(d,{variant:"outline",class:"justify-between w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",de,[e.unref(o).collections.length===1?(e.openBlock(),e.createElementBlock("span",ue,e.toDisplayString(e.unref(f).find(s=>s.id===e.unref(o).collections[0])?.title),1)):e.unref(o).collections.length===2?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(e.unref(f).find(s=>s.id===e.unref(o).collections[0])?.title)+", "+e.toDisplayString(e.unref(f).find(s=>s.id===e.unref(o).collections[1])?.title),1)):e.unref(o).collections.length>2?(e.openBlock(),e.createElementBlock("span",pe,e.toDisplayString(e.unref(f).find(s=>s.id===e.unref(o).collections[0])?.title)+", "+e.toDisplayString(e.unref(f).find(s=>s.id===e.unref(o).collections[1])?.title)+" + "+e.toDisplayString(e.unref(o).collections.length-2),1)):(e.openBlock(),e.createElementBlock("span",fe,"Select collection"))]),e.createVNode(e.unref(B.ChevronsUpDown),{class:"ml-2 size-4 shrink-0 opacity-50"})]),_:1})]),_:1})]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("div",ve,[e.createVNode(k,{placeholder:"Select category..."})]),e.createVNode(x,null,{default:e.withCtx(()=>[...n[5]||(n[5]=[e.createTextVNode(" No category found. ",-1)])]),_:1}),e.unref(f)?.filter(s=>s.status==="published")?.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n[7]||(n[7]=e.createElementVNode("p",{class:"px-2 py-1.5 text-sm font-medium mt-2"},"Published",-1)),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"max-h-[200px] overflow-y-auto"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).filter(s=>s.status==="published"),s=>(e.openBlock(),e.createBlock(t,{key:s.id,value:s.id},{default:e.withCtx(()=>[n[6]||(n[6]=e.createElementVNode("span",{class:"size-2 rounded-full bg-green-500"},null,-1)),e.createElementVNode("span",Ce,e.toDisplayString(s.title),1),e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(e.unref(B.Check),{class:e.normalizeClass(e.unref(j.classNames)("ml-auto size-4"))},null,8,["class"])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})],64)):e.createCommentVNode("",!0),e.unref(f)?.filter(s=>s.status==="draft")?.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n[9]||(n[9]=e.createElementVNode("p",{class:"px-2 py-1.5 text-sm font-medium"},"Drafts",-1)),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"max-h-[200px] overflow-y-auto"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).filter(s=>s.status==="draft"),s=>(e.openBlock(),e.createBlock(t,{key:s.id,value:s.id},{default:e.withCtx(()=>[n[8]||(n[8]=e.createElementVNode("span",{class:"size-2 rounded-full bg-blue-500"},null,-1)),e.createElementVNode("span",xe,e.toDisplayString(s.title),1),e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(e.unref(B.Check),{class:e.normalizeClass(e.unref(j.classNames)("ml-auto size-4"))},null,8,["class"])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue"]),n[15]||(n[15]=e.createElementVNode("p",{class:"text-sm font-medium text-muted-foreground mb-4"}," Filter by Status ",-1)),e.createElementVNode("div",ge,[e.createVNode(c,{id:"chk_published_products",modelValue:e.unref(o).published,"onUpdate:modelValue":n[1]||(n[1]=s=>e.unref(o).published=s)},null,8,["modelValue"]),n[10]||(n[10]=e.createElementVNode("label",{for:"chk_published_products",class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}," Show published products ",-1))]),e.createElementVNode("div",Ve,[e.createVNode(c,{id:"chk_draft_products",modelValue:e.unref(o).draft,"onUpdate:modelValue":n[2]||(n[2]=s=>e.unref(o).draft=s)},null,8,["modelValue"]),n[11]||(n[11]=e.createElementVNode("label",{for:"chk_draft_products",class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}," Show draft products ",-1))]),e.createElementVNode("div",Ne,[e.createVNode(c,{id:"chk_archived_products",modelValue:e.unref(o).archived,"onUpdate:modelValue":n[3]||(n[3]=s=>e.unref(o).archived=s)},null,8,["modelValue"]),n[12]||(n[12]=e.createElementVNode("label",{for:"chk_archived_products",class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}," Show archived products ",-1))]),e.unref(o).collections.length>0||!e.unref(o).published||!e.unref(o).draft||e.unref(o).archived?(e.openBlock(),e.createBlock(d,{key:0,variant:"secondary",class:"ml-auto my-2",size:"sm",onClick:g},{default:e.withCtx(()=>[e.createVNode(e.unref(B.RotateCcw),{class:"size-3"}),n[13]||(n[13]=e.createElementVNode("span",{class:"ml-0.5 text-xs"},"Reset filters",-1))]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})}}}),be=e.defineComponent({__name:"ProductContextMenu",emits:["selectAll","duplicateProduct","deleteProduct","deleteSelection"],setup(T,{emit:o}){const f=o,g=e.inject("products"),v=e.inject("selection"),n=e.inject("config"),{hasPermission:d}=_.useModulePermissions(),{navigateTo:i}=_.useModuleRoute(),l=e.computed(()=>v.value?.length!==1?null:g.value?.find(m=>m.id===v.value[0])),u=m=>{let t=n.previewUrl;t=t.replace("{{ id","{{id"),t=t.replace("id }}","id}}"),t=t.replace("{{id}}",m.id),t=t.replace("{{ slug","{{slug"),t=t.replace("slug }}","slug}}"),t=t.replace("{{slug}}",m.slug),window.open(t,"_blank")},k=async(m,t)=>{try{if(!["draft","published","archived"].includes(t))return;await _.useFirebaseIntegration(n.project).update(n.productCollection,m.id,{status:t}),m.status=t,y.toast.success("Product status changed")}catch{y.toast.error("Failed to change product status")}},x=async m=>{try{if(!["draft","published","archived"].includes(m))return;const t=_.useFirebaseIntegration(n.project),p=[];v.value.forEach(async C=>{p.push(t.update(n.productCollection,C,{status:m}))}),y.toast.promise(Promise.all(p),{loading:`Changing status of ${v.value.length} products...`,success:()=>{const C=v.value.length;return v.value.forEach(V=>{g.value.find(N=>N.id==V).status=m}),v.value=[],`Product status changed for ${C} products`},error:C=>"Failed to change product status"})}catch{y.toast.error("Failed to change product status")}};return(m,t)=>{const p=e.resolveComponent("ContextMenuTrigger"),C=e.resolveComponent("ContextMenuShortcut"),V=e.resolveComponent("ContextMenuItem"),N=e.resolveComponent("ContextMenuContent"),c=e.resolveComponent("ContextMenuSeparator"),w=e.resolveComponent("ContextMenuSubTrigger"),h=e.resolveComponent("ContextMenuCheckboxItem"),s=e.resolveComponent("ContextMenuSubContent"),$=e.resolveComponent("ContextMenuSub"),z=e.resolveComponent("ContextMenu");return e.openBlock(),e.createBlock(z,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"flex flex-1"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default")]),_:3}),e.unref(v).length===0?(e.openBlock(),e.createBlock(N,{key:0,class:"w-64"},{default:e.withCtx(()=>[e.createVNode(V,{inset:"",onClick:t[0]||(t[0]=b=>f("selectAll"))},{default:e.withCtx(()=>[t[13]||(t[13]=e.createTextVNode(" Select all ",-1)),e.createVNode(C,null,{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("⌘ + A",-1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.unref(v).length===1&&l.value?(e.openBlock(),e.createBlock(N,{key:1,class:"w-64"},{default:e.withCtx(()=>[e.createVNode(V,{inset:"",onClick:t[1]||(t[1]=b=>e.unref(i)(l.value.id))},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode(" Edit product ",-1)])]),_:1}),e.createVNode(c),e.unref(n).previewUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(V,{inset:"",onClick:t[2]||(t[2]=b=>u(l.value))},{default:e.withCtx(()=>[t[15]||(t[15]=e.createTextVNode(" Preview product ",-1)),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(e.unref(B.ExternalLink),{class:"size-4"})]),_:1})]),_:1}),e.createVNode(c)],64)):e.createCommentVNode("",!0),e.createVNode(V,{inset:"",onClick:t[3]||(t[3]=b=>f("duplicateProduct",l.value))},{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode(" Duplicate product ",-1)])]),_:1}),e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(w,{inset:""},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode(" Change status ",-1)])]),_:1}),e.createVNode(s,{class:"w-48"},{default:e.withCtx(()=>[e.createVNode(h,{onClick:t[4]||(t[4]=b=>k(l.value,"draft")),modelValue:l.value.status==="draft"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-blue-500"},null,-1),e.createTextVNode(" Draft ",-1)])]),_:1},8,["modelValue"]),e.createVNode(h,{onClick:t[5]||(t[5]=b=>k(l.value,"published")),modelValue:l.value.status==="published"},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-green-500"},null,-1),e.createTextVNode(" Published ",-1)])]),_:1},8,["modelValue"]),e.createVNode(h,{onClick:t[6]||(t[6]=b=>k(l.value,"archived")),modelValue:l.value.status==="archived"},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-gray-300"},null,-1),e.createTextVNode(" Archived ",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1}),e.createVNode(V,{inset:"",variant:"destructive",onClick:t[7]||(t[7]=b=>f("deleteProduct",l.value))},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode(" Delete product ",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.unref(v).length>1?(e.openBlock(),e.createBlock(N,{key:2,class:"w-64"},{default:e.withCtx(()=>[e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(w,{inset:""},{default:e.withCtx(()=>[e.createTextVNode(" Change status ("+e.toDisplayString(e.unref(v).length)+") ",1)]),_:1}),e.createVNode(s,{class:"w-48"},{default:e.withCtx(()=>[e.createVNode(h,{onClick:t[8]||(t[8]=b=>x("draft"))},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-blue-500"},null,-1),e.createTextVNode(" Draft ",-1)])]),_:1}),e.createVNode(h,{onClick:t[9]||(t[9]=b=>x("published"))},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-green-500"},null,-1),e.createTextVNode(" Published ",-1)])]),_:1}),e.createVNode(h,{onClick:t[10]||(t[10]=b=>x("archived"))},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-gray-300"},null,-1),e.createTextVNode(" Archived ",-1)])]),_:1})]),_:1})]),_:1}),e.createVNode(V,{inset:"",variant:"destructive",onClick:t[11]||(t[11]=b=>f("deleteSelection"))},{default:e.withCtx(()=>[e.createTextVNode(" Delete products ("+e.toDisplayString(e.unref(v).length)+") ",1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),_e={class:"relative flex flex-col flex-1"},we={ref:"container",class:"flex items-center justify-between gap-4 w-full mt-12 mb-8"},he={class:"flex items-center gap-4"},ye={class:"text-lg whitespace-nowrap"},Be={class:"relative w-full max-w-sm items-center"},Ee={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},Pe={class:"flex items-center gap-4"},Te={class:"flex flex-1"},Se=e.defineComponent({__name:"Overview",props:{config:{type:Object,required:!0}},async setup(T){let o,f;const g=T,{hasPermission:v}=_.useModulePermissions(),{navigateTo:n}=_.useModuleRoute(),{confirm:d}=_.useConfirmation();_.useModuleBreadcrumbs(()=>[]);const i=_.useFirebaseIntegration(g.config.project),l=e.ref([]),u=async()=>{const a=await i.find(g.config.productCollection);l.value=a||[]},k=e.useTemplateRef("container"),{width:x}=X.useElementSize(k),m=e.ref("grid"),t=e.ref(1),p=e.ref([]),C=e.ref(""),V=e.ref([]);V.value=([o,f]=e.withAsyncContext(()=>h()),o=await o,f(),o);const N=e.computed(()=>m.value==="grid"?x.value<768?6:x.value<896?8:x.value<1024?10:12:10),c=e.computed(()=>l.value.filter(a=>!(S.value.collections.length>0&&!a.collections?.some(r=>S.value.collections.includes(r))||!S.value.published&&a.status==="published"||!S.value.draft&&a.status==="draft"||!S.value.archived&&a.status==="archived")).filter(a=>a.title.toLowerCase().includes(C.value.toLowerCase())||a.slug.toLowerCase().includes(C.value.toLowerCase())||a.id.toLowerCase().includes(C.value.toLowerCase()))),w=e.computed(()=>{if(c.value.length<=N.value)return c.value;const a=(t.value-1)*N.value,r=a+N.value;return c.value.slice(a,r)});async function h(){if(!g.config.collectionsCollection)return[];const a=g.config.collectionsCollection.split(":");return a.length!==2?[]:(await i.get(a[0]))?.[a[1]]||[]}async function s(a){return(await i.find(g.config.productCollection,{filters:[{field:"slug",operator:"==",value:a}]})).length>0}const $=()=>{p.value=w.value.map(a=>a.id)},z=async a=>{try{let r={...a},P=r.slug+"-copy",M=2;for(;await s(P);)P=r.slug+"-copy-"+M,M++;r.id=void 0,r.createdAt=new Date,r.updatedAt=new Date,r.slug=P,r.status="draft",r.title=r.title+" (copy)";const F=await i.add(g.config.productCollection,r);n(F.id),y.toast.success("Product duplicated")}catch{y.toast.error("Failed to duplicate product")}},b=async a=>{if(await d(`Are you sure you want to delete "${a.title}"?`))try{await i.remove(g.config.productCollection,a.id),l.value=l.value.filter(P=>P.id!==a.id),p.value=[],y.toast.success("Product deleted")}catch{y.toast.error("Failed to delete product")}},A=async()=>{if(await d(`Are you sure you want to delete all selected products (${p.value.length})?`))try{p.value.forEach(async r=>{await i.remove(g.config.productCollection,r)}),l.value=l.value.filter(r=>!p.value.includes(r.id)),p.value=[],y.toast.success("Products deleted")}catch{y.toast.error("Failed to delete products")}},S=e.ref({collections:[],published:!0,draft:!0,archived:!1});e.watch(S,()=>{t.value=1});const I=a=>{a.target?.matches("input, textarea")||a.target?.isContentEditable||(a.key==="Escape"&&(p.value=[]),(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="a"&&(a.preventDefault(),$()))};return e.onMounted(()=>{u(),window.addEventListener("keydown",I)}),e.onUnmounted(()=>{window.removeEventListener("keydown",I)}),e.provide("config",g.config),e.provide("filter",S),e.provide("products",l),e.provide("collections",V),e.provide("selection",p),(a,r)=>{const P=e.resolveComponent("Input"),M=e.resolveComponent("Button"),F=e.resolveComponent("SegmentedControlButton"),R=e.resolveComponent("SegmentedControl"),U=e.resolveComponent("PaginationFirst"),K=e.resolveComponent("PaginationPrev"),q=e.resolveComponent("PaginationListItem"),G=e.resolveComponent("PaginationEllipsis"),O=e.resolveComponent("PaginationNext"),H=e.resolveComponent("PaginationLast"),Q=e.resolveComponent("PaginationList"),W=e.resolveComponent("Pagination");return e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",we,[e.createElementVNode("div",he,[e.createElementVNode("p",ye,e.toDisplayString(c.value?.length)+" products",1),e.createElementVNode("div",Be,[e.createVNode(P,{id:"search",type:"text",placeholder:"Search...",class:"pl-8",onKeydown:r[0]||(r[0]=e.withKeys(E=>C.value="",["escape"])),modelValue:C.value,"onUpdate:modelValue":r[1]||(r[1]=E=>C.value=E)},null,8,["modelValue"]),e.createElementVNode("span",Ee,[e.createVNode(e.unref(B.Search),{class:"size-4 text-muted-foreground"})])])]),e.createElementVNode("div",Pe,[p.value.length>0?(e.openBlock(),e.createBlock(M,{key:0,variant:"destructive",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(" Delete Selection ("+e.toDisplayString(p.value.length)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.unref(v)("create-product")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(M,{variant:"outline",onClick:r[2]||(r[2]=E=>e.unref(n)("new"))},{default:e.withCtx(()=>[e.createVNode(e.unref(B.Plus),{class:"size-4"}),r[5]||(r[5]=e.createTextVNode(" New Product ",-1))]),_:1}),r[6]||(r[6]=e.createElementVNode("div",{class:"w-[1px] h-8 bg-border"},null,-1))],64)):e.createCommentVNode("",!0),e.createVNode(ke),r[7]||(r[7]=e.createElementVNode("div",{class:"w-[1px] h-8 bg-border"},null,-1)),e.createElementVNode("div",null,[e.createVNode(R,{modelValue:m.value,"onUpdate:modelValue":r[3]||(r[3]=E=>m.value=E),"aria-label":"View mode"},{default:e.withCtx(()=>[e.createVNode(F,{value:"grid"},{default:e.withCtx(()=>[e.createVNode(e.unref(B.LayoutGrid),{class:"size-4"})]),_:1}),e.createVNode(F,{value:"list"},{default:e.withCtx(()=>[e.createVNode(e.unref(B.List),{class:"size-4"})]),_:1})]),_:1},8,["modelValue"])])])],512),e.createElementVNode("div",Te,[e.createVNode(be,{onSelectAll:$,onDuplicateProduct:z,onDeleteProduct:b,onDeleteSelection:A},{default:e.withCtx(()=>[m.value==="grid"?(e.openBlock(),e.createBlock(le,{key:0,products:w.value},null,8,["products"])):(e.openBlock(),e.createBlock(ce,{key:1,products:w.value},null,8,["products"]))]),_:1})]),c.value?.length>N.value?(e.openBlock(),e.createBlock(W,{key:0,page:t.value,"onUpdate:page":r[4]||(r[4]=E=>t.value=E),"items-per-page":N.value,total:c.value?.length,"sibling-count":1,"show-edges":""},{default:e.withCtx(()=>[e.createVNode(Q,{class:"flex items-center gap-1"},{default:e.withCtx(({items:E})=>[e.createVNode(U),e.createVNode(K),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E,(D,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.type==="page"?(e.openBlock(),e.createBlock(q,{key:L,value:D.value,"as-child":""},{default:e.withCtx(()=>[e.createVNode(M,{class:"size-10 p-0",variant:D.value===t.value?"default":"outline"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.value),1)]),_:2},1032,["variant"])]),_:2},1032,["value"])):(e.openBlock(),e.createBlock(G,{key:D.type,index:L},null,8,["index"]))],64))),256)),e.createVNode(O),e.createVNode(H)]),_:1})]),_:1},8,["page","items-per-page","total"])):e.createCommentVNode("",!0)])}}});exports.default=Se;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("@oneclick.dev/cms-kit"),_=require("./_plugin-vue_export-helper-BHFhmbuH.js"),v={class:"preview-iphone"},V={class:"push-container"},f={class:"inner"},N={class:"head"},h={class:"app-name"},y={class:"body"},x={class:"push-title"},S={class:"push-message"},E=e.defineComponent({__name:"PreviewIPhone",props:{app:{type:String,required:!0},title:{type:String,required:!0},message:{type:String,required:!0}},setup(t){return(l,o)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",V,[e.createElementVNode("div",f,[e.createElementVNode("div",N,[e.createElementVNode("span",h,e.toDisplayString(t.app),1),o[0]||(o[0]=e.createElementVNode("span",null,"now",-1))]),e.createElementVNode("div",y,[e.createElementVNode("span",x,e.toDisplayString(t.title),1),e.createElementVNode("span",S,e.toDisplayString(t.message),1)])])])]))}}),w=_._export_sfc(E,[["__scopeId","data-v-8c84cde9"]]),C={class:"preview-android"},B={class:"push-container"},k={class:"inner"},P={class:"head"},$={class:"app-name"},q={class:"body"},b={class:"push-title"},T={class:"push-message"},D=e.defineComponent({__name:"PreviewAndroid",props:{app:{type:String,required:!0},title:{type:String,required:!0},message:{type:String,required:!0}},setup(t){return(l,o)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("div",B,[e.createElementVNode("div",k,[e.createElementVNode("div",P,[o[0]||(o[0]=e.createElementVNode("span",{class:"notification-badge"},null,-1)),e.createElementVNode("span",$,e.toDisplayString(t.app),1),o[1]||(o[1]=e.createElementVNode("span",null,null,-1))]),e.createElementVNode("div",q,[e.createElementVNode("span",b,e.toDisplayString(t.title),1),e.createElementVNode("span",T,e.toDisplayString(t.message),1)])])])]))}}),I=_._export_sfc(D,[["__scopeId","data-v-202b94a8"]]),M={class:"flex flex-col"},O=e.defineComponent({__name:"PushPreview",props:{app:{type:String,required:!0},title:{type:String,required:!0},message:{type:String,required:!0}},setup(t){const l=t,o=e.ref("ios"),i=e.computed(()=>l.title.length>0?l.title:"Notification Preview"),d=e.computed(()=>l.message.length>0?l.message:"Preview your push notification");return(r,s)=>{const p=e.resolveComponent("SegmentedControlButton"),n=e.resolveComponent("SegmentedControl");return e.openBlock(),e.createElementBlock("div",M,[e.createVNode(n,{modelValue:e.unref(o),"onUpdate:modelValue":s[0]||(s[0]=a=>e.isRef(o)?o.value=a:null),class:"mx-auto mb-3"},{default:e.withCtx(()=>[e.createVNode(p,{value:"ios"},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode(" iOS ",-1)])]),_:1}),e.createVNode(p,{value:"android"},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode(" Android ",-1)])]),_:1})]),_:1},8,["modelValue"]),e.unref(o)=="ios"?(e.openBlock(),e.createBlock(w,{key:0,app:t.app,title:e.unref(i),message:e.unref(d)},null,8,["app","title","message"])):(e.openBlock(),e.createBlock(I,{key:1,app:t.app,title:e.unref(i),message:e.unref(d)},null,8,["app","title","message"]))])}}}),A={class:"relative"},L={class:"flex gap-12 bg-background rounded-lg p-6 shadow"},U={class:"flex flex-col gap-2 w-96"},j=e.defineComponent({__name:"SendPush",props:{config:{type:Object,required:!0}},setup(t){const{hasPermission:l}=m.useModulePermissions(),{log:o,logWarning:i,logError:d}=m.useLogs(),r=e.ref(""),s=e.ref("");return(p,n)=>{const a=e.resolveComponent("Label"),u=e.resolveComponent("Input"),g=e.resolveComponent("Button");return e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",L,[e.createElementVNode("div",U,[e.createVNode(a,{for:"send_push_title"},{default:e.withCtx(()=>[...n[2]||(n[2]=[e.createTextVNode("Title",-1)])]),_:1}),e.createVNode(u,{type:"text",modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=c=>r.value=c),id:"send_push_title"},null,8,["modelValue"]),e.createVNode(a,{for:"send_push_message"},{default:e.withCtx(()=>[...n[3]||(n[3]=[e.createTextVNode("Message",-1)])]),_:1}),e.createVNode(u,{type:"text",modelValue:s.value,"onUpdate:modelValue":n[1]||(n[1]=c=>s.value=c),id:"send_push_message"},null,8,["modelValue"]),e.createVNode(g,null,{default:e.withCtx(()=>[...n[4]||(n[4]=[e.createTextVNode("Send Push",-1)])]),_:1})]),e.createVNode(O,{class:"preview",app:t.config.appName,title:r.value,message:s.value},null,8,["app","title","message"])])])}}});exports.default=j;
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, openBlock as r, createElementBlock as v, createElementVNode as e, toDisplayString as d, ref as x, computed as w, resolveComponent as p, createVNode as i, isRef as q, unref as a, withCtx as u, createTextVNode as c, createBlock as P } from "vue";
|
|
2
|
-
import { useModulePermissions as B, useLogs as C } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
-
const k = { class: "preview-iphone" }, I = { class: "push-container" }, N = { class: "inner" }, A = { class: "head" }, E = { class: "app-name" }, L = { class: "body" }, M = { class: "push-title" }, O = { class: "push-message" }, T = /* @__PURE__ */ g({
|
|
5
|
-
__name: "PreviewIPhone",
|
|
6
|
-
props: {
|
|
7
|
-
app: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: !0
|
|
10
|
-
},
|
|
11
|
-
title: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: !0
|
|
14
|
-
},
|
|
15
|
-
message: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: !0
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(t) {
|
|
21
|
-
return (l, s) => (r(), v("div", k, [
|
|
22
|
-
e("div", I, [
|
|
23
|
-
e("div", N, [
|
|
24
|
-
e("div", A, [
|
|
25
|
-
e("span", E, d(t.app), 1),
|
|
26
|
-
s[0] || (s[0] = e("span", null, "now", -1))
|
|
27
|
-
]),
|
|
28
|
-
e("div", L, [
|
|
29
|
-
e("span", M, d(t.title), 1),
|
|
30
|
-
e("span", O, d(t.message), 1)
|
|
31
|
-
])
|
|
32
|
-
])
|
|
33
|
-
])
|
|
34
|
-
]));
|
|
35
|
-
}
|
|
36
|
-
}), U = /* @__PURE__ */ V(T, [["__scopeId", "data-v-8c84cde9"]]), j = { class: "preview-android" }, D = { class: "push-container" }, R = { class: "inner" }, W = { class: "head" }, z = { class: "app-name" }, F = { class: "body" }, G = { class: "push-title" }, H = { class: "push-message" }, J = /* @__PURE__ */ g({
|
|
37
|
-
__name: "PreviewAndroid",
|
|
38
|
-
props: {
|
|
39
|
-
app: {
|
|
40
|
-
type: String,
|
|
41
|
-
required: !0
|
|
42
|
-
},
|
|
43
|
-
title: {
|
|
44
|
-
type: String,
|
|
45
|
-
required: !0
|
|
46
|
-
},
|
|
47
|
-
message: {
|
|
48
|
-
type: String,
|
|
49
|
-
required: !0
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
setup(t) {
|
|
53
|
-
return (l, s) => (r(), v("div", j, [
|
|
54
|
-
e("div", D, [
|
|
55
|
-
e("div", R, [
|
|
56
|
-
e("div", W, [
|
|
57
|
-
s[0] || (s[0] = e("span", { class: "notification-badge" }, null, -1)),
|
|
58
|
-
e("span", z, d(t.app), 1),
|
|
59
|
-
s[1] || (s[1] = e("span", null, null, -1))
|
|
60
|
-
]),
|
|
61
|
-
e("div", F, [
|
|
62
|
-
e("span", G, d(t.title), 1),
|
|
63
|
-
e("span", H, d(t.message), 1)
|
|
64
|
-
])
|
|
65
|
-
])
|
|
66
|
-
])
|
|
67
|
-
]));
|
|
68
|
-
}
|
|
69
|
-
}), K = /* @__PURE__ */ V(J, [["__scopeId", "data-v-202b94a8"]]), Q = { class: "flex flex-col" }, X = /* @__PURE__ */ g({
|
|
70
|
-
__name: "PushPreview",
|
|
71
|
-
props: {
|
|
72
|
-
app: {
|
|
73
|
-
type: String,
|
|
74
|
-
required: !0
|
|
75
|
-
},
|
|
76
|
-
title: {
|
|
77
|
-
type: String,
|
|
78
|
-
required: !0
|
|
79
|
-
},
|
|
80
|
-
message: {
|
|
81
|
-
type: String,
|
|
82
|
-
required: !0
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
setup(t) {
|
|
86
|
-
const l = t, s = x("ios"), f = w(() => l.title.length > 0 ? l.title : "Notification Preview"), h = w(() => l.message.length > 0 ? l.message : "Preview your push notification");
|
|
87
|
-
return (m, o) => {
|
|
88
|
-
const y = p("SegmentedControlButton"), n = p("SegmentedControl");
|
|
89
|
-
return r(), v("div", Q, [
|
|
90
|
-
i(n, {
|
|
91
|
-
modelValue: a(s),
|
|
92
|
-
"onUpdate:modelValue": o[0] || (o[0] = (_) => q(s) ? s.value = _ : null),
|
|
93
|
-
class: "mx-auto mb-3"
|
|
94
|
-
}, {
|
|
95
|
-
default: u(() => [
|
|
96
|
-
i(y, { value: "ios" }, {
|
|
97
|
-
default: u(() => [...o[1] || (o[1] = [
|
|
98
|
-
c(" iOS ", -1)
|
|
99
|
-
])]),
|
|
100
|
-
_: 1
|
|
101
|
-
}),
|
|
102
|
-
i(y, { value: "android" }, {
|
|
103
|
-
default: u(() => [...o[2] || (o[2] = [
|
|
104
|
-
c(" Android ", -1)
|
|
105
|
-
])]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
108
|
-
]),
|
|
109
|
-
_: 1
|
|
110
|
-
}, 8, ["modelValue"]),
|
|
111
|
-
a(s) == "ios" ? (r(), P(U, {
|
|
112
|
-
key: 0,
|
|
113
|
-
app: t.app,
|
|
114
|
-
title: a(f),
|
|
115
|
-
message: a(h)
|
|
116
|
-
}, null, 8, ["app", "title", "message"])) : (r(), P(K, {
|
|
117
|
-
key: 1,
|
|
118
|
-
app: t.app,
|
|
119
|
-
title: a(f),
|
|
120
|
-
message: a(h)
|
|
121
|
-
}, null, 8, ["app", "title", "message"]))
|
|
122
|
-
]);
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}), Y = { class: "relative" }, Z = { class: "flex gap-12 bg-background rounded-lg p-6 shadow" }, ee = { class: "flex flex-col gap-2 w-96" }, oe = /* @__PURE__ */ g({
|
|
126
|
-
__name: "SendPush",
|
|
127
|
-
props: {
|
|
128
|
-
config: {
|
|
129
|
-
type: Object,
|
|
130
|
-
required: !0
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
setup(t) {
|
|
134
|
-
const { hasPermission: l } = B(), { log: s, logWarning: f, logError: h } = C(), m = x(""), o = x("");
|
|
135
|
-
return (y, n) => {
|
|
136
|
-
const _ = p("Label"), $ = p("Input"), b = p("Button");
|
|
137
|
-
return r(), v("div", Y, [
|
|
138
|
-
e("div", Z, [
|
|
139
|
-
e("div", ee, [
|
|
140
|
-
i(_, { for: "send_push_title" }, {
|
|
141
|
-
default: u(() => [...n[2] || (n[2] = [
|
|
142
|
-
c("Title", -1)
|
|
143
|
-
])]),
|
|
144
|
-
_: 1
|
|
145
|
-
}),
|
|
146
|
-
i($, {
|
|
147
|
-
type: "text",
|
|
148
|
-
modelValue: m.value,
|
|
149
|
-
"onUpdate:modelValue": n[0] || (n[0] = (S) => m.value = S),
|
|
150
|
-
id: "send_push_title"
|
|
151
|
-
}, null, 8, ["modelValue"]),
|
|
152
|
-
i(_, { for: "send_push_message" }, {
|
|
153
|
-
default: u(() => [...n[3] || (n[3] = [
|
|
154
|
-
c("Message", -1)
|
|
155
|
-
])]),
|
|
156
|
-
_: 1
|
|
157
|
-
}),
|
|
158
|
-
i($, {
|
|
159
|
-
type: "text",
|
|
160
|
-
modelValue: o.value,
|
|
161
|
-
"onUpdate:modelValue": n[1] || (n[1] = (S) => o.value = S),
|
|
162
|
-
id: "send_push_message"
|
|
163
|
-
}, null, 8, ["modelValue"]),
|
|
164
|
-
i(b, null, {
|
|
165
|
-
default: u(() => [...n[4] || (n[4] = [
|
|
166
|
-
c("Send Push", -1)
|
|
167
|
-
])]),
|
|
168
|
-
_: 1
|
|
169
|
-
})
|
|
170
|
-
]),
|
|
171
|
-
i(X, {
|
|
172
|
-
class: "preview",
|
|
173
|
-
app: t.config.appName,
|
|
174
|
-
title: m.value,
|
|
175
|
-
message: o.value
|
|
176
|
-
}, null, 8, ["app", "title", "message"])
|
|
177
|
-
])
|
|
178
|
-
]);
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
export {
|
|
183
|
-
oe as default
|
|
184
|
-
};
|
|
File without changes
|