Plugin Directory

Changeset 3384899


Ignore:
Timestamp:
10/27/2025 12:20:28 AM (4 months ago)
Author:
notificationmaster
Message:

simple version

Location:
notification-master
Files:
810 added
6 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • notification-master/trunk/dist/index.asset.php

    r3364111 r3384899  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => '84cd8e0f26301394c9f4');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => '0305e129861e8b25ad46');
  • notification-master/trunk/dist/index.js

    r3364111 r3384899  
    4040date:(0,l.sprintf)((0,l.__)("Published on %s","notification-master"),dN(i)),actions:(0,a.jsxs)("div",{className:"notification-master__integration--actions",children:[uN(e.trigger)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(RS,{title:(0,l.__)("Edit","notification-master"),children:(0,a.jsx)(gu,{type:"primary",icon:(0,a.jsx)(fE,{}),onClick:()=>{O(sN("notifications",n))},shape:"circle"})}),(0,a.jsx)(RS,{title:(0,l.__)("Duplicate","notification-master"),children:(0,a.jsx)(gu,{type:"primary",icon:(0,a.jsx)(cE,{}),onClick:()=>(async e=>{if(R&&E!==e){_(e);try{const n=R.find((t=>t.id===e));if(!n)return;const o={
    4141// translators: %s: post title
    42 title:(0,l.sprintf)((0,l.__)("(Copy) %s","notification-master"),n.title.rendered),trigger:n.trigger,connections:n.connections,status:"draft"};(await M("postType","ntfm_notification",o)).id?j({type:"success",message:(0,l.__)("Notification duplicated successfully","notification-master")}):j({type:"error",message:(0,l.__)("Could not duplicate notification","notification-master")}),t(1)}catch(e){j({type:"error",message:(0,l.__)("Could not duplicate notification","notification-master")})}_(null)}})(n),shape:"circle",loading:E===n})})]}),(0,a.jsx)(jk,{title:(0,l.__)("Are you sure?","notification-master"),onConfirm:()=>(async e=>{try{const t=await I("postType","ntfm_notification",e.toString(),{});j(t?{type:"success",message:(0,l.__)("Notification deleted successfully","notification-master")}:{type:"error",message:(0,l.__)("Could not delete notification","notification-master")})}catch(e){j({type:"error",message:(0,l.__)("Could not delete notification","notification-master")})}})(n),okText:(0,l.__)("Yes","notification-master"),cancelText:(0,l.__)("No","notification-master"),children:(0,a.jsx)(RS,{title:(0,l.__)("Delete","notification-master"),children:(0,a.jsx)(gu,{type:"primary",danger:!0,icon:(0,a.jsx)(MQ,{}),shape:"circle"})})})]})}})(e))):[],pagination:{total:D,current:e,pageSize:n,showSizeChanger:!0,showQuickJumper:!0,onChange:(e,n)=>{t(e),o(n)}},rowSelection:{selectedRowKeys:C,onChange:e=>{S(e)}},locale:{emptyText:[(0,a.jsx)($I,{image:$I.PRESENTED_IMAGE_SIMPLE,description:(0,l.__)("No notifications found","notification-master")},"empty")]}})]})]})}},{path:"/notifications/:id",slug:"notifications",title:(0,l.__)("Notifications","notification-master"),component:()=>{const{id:e}=J(),[t,n]=(0,s.useState)("new"===e),[o,r]=(0,s.useState)(!1),[i,c]=(0,s.useState)(!1),d=Q(),{addNotice:f}=(0,u.useDispatch)("notification-master/core"),{deleteEntityRecord:h}=(0,u.useDispatch)("core");if(YL(t?(0,l.__)("New Notification","notification-master"):(0,l.__)("Edit Notification","notification-master")),!e)return null;const{editedRecord:m,hasResolved:g,hasEdits:v,save:b,edit:y}="new"===e?(()=>{const e={date:"",date_gmt:"",guid:{rendered:"",raw:""},id:0,connections:{},link:"",modified:"",modified_gmt:"",password:"",slug:"",status:"draft",template:"",title:(0,l.__)("New Notification","notification-master"),trigger:"",triggerGroup:"",type:""},{saveEntityRecord:t}=(0,u.useDispatch)(GL.store),[n,o]=(0,s.useState)(e),r=(0,GL.useEntityRecord)("postType","ntfm_notification",n.id);return 0===n.id?{record:n,save:()=>{const e={title:n.title,status:n.status,trigger:n.trigger,connections:n.connections};return 0!==n.id&&(e.id=n.id),t("postType","ntfm_notification",e)},edit:e=>{o({...n,...e})},hasResolved:!0,hasEdits:!0,editedRecord:n}:r})():(0,GL.useEntityRecord)("postType","ntfm_notification",e);return function(e,t=!0){!function(e,t=!0){const{navigator:n}=(0,p.useContext)(W);(0,p.useEffect)((()=>{if(!t)return;const o=n.block((t=>{const n={...t,retry(){o(),t.retry()}};e(n)}));return o}),[n,e,t])}((0,p.useCallback)((t=>{window.confirm(e)&&t.retry()}),[e]),t)}((0,l.__)("Are you sure you want to leave this page?","notification-master"),t||o||i||!t&&v),g?(0,a.jsx)(qQ,{value:{record:m,onEdit:y,onSave:async()=>{if(!o){r(!0);try{const t=await b();t?(f({type:"success",message:(0,l.__)("Notification saved successfully","notification-master")}),"new"===e&&(window.history.replaceState(null,"",sN("notifications",t.id)),n(!1),t.title=t?.title?.rendered,y(t))):f({type:"error",message:(0,l.__)("Failed to save notification","notification-master")})}catch(e){f({type:"error",message:e?.data?.params?.connections||(0,l.__)("Failed to save notification","notification-master")})}r(!1)}},isSaving:o,isNew:t,hasEdits:v,onDelete:async()=>{if(!i){c(!0);try{await h("postType","ntfm_notification",e)?(f({type:"success",message:(0,l.__)("Notification deleted successfully","notification-master")}),d(sN("notifications"))):f({type:"error",message:(0,l.__)("Failed to delete notification","notification-master")})}catch(e){f({type:"error",message:(0,l.__)("Failed to delete notification","notification-master")})}c(!1)}},isDeleting:i},children:(0,a.jsxs)("div",{className:"notification-master__notification",children:[(0,a.jsxs)("div",{className:"notification-master__notification--header",children:[(0,a.jsx)(gu,{type:"text",onClick:()=>{d(sN("notifications"))},icon:(0,a.jsx)(VQ,{}),size:"large",children:(0,l.__)("Back to Notifications","notification-master")}),(0,a.jsx)("h2",{className:"notification-master-heading",children:t?"New Notification":"Edit Notification"})]}),(0,a.jsxs)("div",{className:"notification-master__notification--content",children:[(0,a.jsx)(OJ,{}),(0,a.jsx)(jJ,{})]})]})}):(0,a.jsx)("div",{className:"notification-master__notification--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})})},hidden:!0},{path:"/webpush-subscriptions",slug:"webpush-subscriptions",title:(0,l.__)("Subscriptions","notification-master"),component:()=>(YL((0,l.__)("Subscriptions","notification-master")),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Tp,{justify:"space-between",align:"center",style:{marginBottom:20,padding:"25px 20px",backgroundColor:"#fff",borderRadius:5},children:[(0,a.jsxs)("h2",{className:"notification-master-heading",style:{margin:0},children:[(0,a.jsx)(Tj,{component:DJ,width:20,height:20}),(0,l.__)("Manage Web Push Subscriptions","notification-master")]}),(0,a.jsxs)(Tp,{gap:10,align:"center",children:[(0,a.jsx)(J_.Text,{strong:!0,style:{fontSize:16},children:(0,l.__)("Total Subscriptions","notification-master")}),(0,a.jsx)(uC,{showZero:!0,count:nE.subscriptionCount,style:{backgroundColor:"#52c41a"},className:"notification-master__badge--subscriptions"})]})]}),(0,a.jsxs)("div",{className:"notification-master__Subscriptions",children:[!nE.isPro&&(0,a.jsxs)("div",{className:"notification-master__subscriptions--pro",style:{position:"relative"},children:[(0,a.jsx)("div",{className:"notification-master__subscriptions--pro--bg",style:{backgroundImage:`url(${nE.assetsUrl}/images/bg.png)`},children:(0,a.jsx)("img",{src:`${nE.assetsUrl}/images/bg.png`,alt:""})}),(0,a.jsx)("div",{className:"notification-master__subscriptions--pro--content",style:{position:"absolute",width:"40%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",backgroundColor:"rgba(255, 255, 255, 0.9)",borderRadius:5,padding:20,boxShadow:"0 0 10px rgba(0, 0, 0, 0.1)",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,a.jsx)(kN,{icon:(0,a.jsx)("img",{src:`${nE.assetsUrl}/images/logo.gif`,alt:"",style:{width:100}}),title:[(0,a.jsx)(J_.Title,{level:3,style:{textTransform:"capitalize"},children:(0,l.__)("Transform Your Notifications Like Never Before 🚀","notification-master")},"title"),(0,a.jsx)(J_.Text,{children:(0,l.__)("Upgrade to Notification Master Pro and experience next-level notifications! Unlock exclusive features, seamless integrations, and powerful capabilities designed to keep you ahead. Take the leap today and redefine your communication strategy 🔥.","notification-master")},"text")],extra:(0,a.jsx)(gu,{type:"primary",style:{backgroundColor:"#E67A18",fontWeight:600,borderRadius:5,textTransform:"uppercase"},size:"large",onClick:()=>{window.open(`${nE.ntfmSiteUrl}/pricing`,"_blank")},children:(0,l.__)("Upgrade to Pro","notification-master")})})})]}),(0,c.applyFilters)("NotificationMaster.SubscriptionsPage",null)]})]}))},{path:"/settings/:tab?",slug:"settings",title:(0,l.__)("Settings","notification-master"),component:()=>{const{settings:e,isResolving:t}=(0,u.useSelect)((e=>{const{hasFinishedResolution:t,getSettings:n}=e("notification-master/core"),o=n();return{isResolving:!t("getSettings"),settings:o}}),[]),{addNotice:n}=(0,u.useDispatch)("notification-master/core"),[o,r]=(0,s.useState)(!1),{tab:i}=J(),c=Q();if(YL((0,l.__)("Settings","notification-master")),t)return(0,a.jsx)("div",{className:"notification-master__settings--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})});const d=[{key:"general",label:(0,l.__)("General","notification-master"),children:(0,a.jsx)(TH,{}),icon:(0,a.jsx)(JL,{})},{key:"triggers",label:(0,l.__)("Triggers","notification-master"),children:(0,a.jsx)(NH,{}),icon:(0,a.jsx)(nz,{})},{key:"webpush",label:(0,l.__)("Web Push","notification-master"),children:(0,a.jsx)(XK,{}),icon:(0,a.jsx)(iz,{})}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h2",{className:"notification-master-heading",children:[(0,a.jsx)(Tj,{component:lz,width:20,height:20}),(0,l.__)("Settings","notification-master")]}),(0,a.jsx)("div",{className:"notification-master__settings",children:(0,a.jsx)(PH,{defaultActiveKey:i||"general",items:d,onChange:e=>{c(sN("settings",null,e))},tabBarStyle:{marginBottom:0,padding:"10px 20px 0 20px",fontSize:16,fontWeight:500,color:"var(--notification-master-help-text-color)"},tabBarExtraContent:(0,a.jsx)(gu,{type:"primary",onClick:async()=>{if(!o){r(!0);try{await Bj()({path:"/ntfm/v1/settings",method:"POST",data:{settings:e}}),n({type:"success",message:(0,l.__)("Settings saved successfully","notification-master")}),window.location.reload()}catch(e){n({type:"error",message:(0,l.__)("Failed to save settings","notification-master")})}finally{r(!1)}}},loading:o,children:(0,l.__)("Save","notification-master")})})})]})}},{path:"/notification-log",slug:"notification-log",title:(0,l.__)("Notification Log","notification-master"),component:()=>{const[e,t]=(0,s.useState)(!0),[n,o]=(0,s.useState)([]),[r,i]=(0,s.useState)(10),[c,d]=(0,s.useState)(1),[f,p]=(0,s.useState)(null),[h,m]=(0,s.useState)(!1),[g,v]=(0,s.useState)(0),{addNotice:b}=(0,u.useDispatch)("notification-master/core"),[y,x]=(0,s.useState)([]),[w,C]=(0,s.useState)(""),[S,E]=(0,s.useState)(!1);YL((0,l.__)("Notification Log","notification-master"));const _=async()=>{t(!0);try{const e=await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/notification-logs",{per_page:r,page:c})});e&&(o((0,Xp.isArray)(e?.logs)?e.logs:[]),v(e?.count||0))}catch(e){b({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}t(!1)};if((0,s.useEffect)((()=>{_()}),[r,c]),e&&(0,Xp.isEmpty)(n))return(0,a.jsx)("div",{className:"notification-master__log--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})});const k=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}return(0,Xp.isObject)(e)?$(e):e},$=(e,t="")=>{const n={},o={...e};"email"===t&&delete o.body;for(const e in o)"notification_name"!==e&&"trigger"!==e&&"trigger_name"!==e&&(0,Xp.set)(n,e,k(o[e]));return n};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h2",{className:"notification-master-heading",children:[(0,a.jsx)(Tj,{component:PJ,width:20,height:20}),(0,l.__)("Notification Log","notification-master")]}),(0,a.jsx)("div",{className:"notification-master__log",children:(0,Xp.isEmpty)(n)?(0,a.jsx)(J_.Title,{level:5,style:{textAlign:"center"},children:(0,l.__)("No logs found.","notification-master")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Tp,{gap:20,justify:"space-between",children:[(0,a.jsxs)(Tp,{gap:"small",children:[(0,a.jsx)(wP,{options:[{label:(0,l.__)("Bulk Actions","notification-master"),value:"",disabled:!0},{label:(0,l.__)("Delete","notification-master"),value:"delete"}],value:w,onChange:e=>C(e)}),(0,a.jsx)(gu,{type:"primary",onClick:()=>(async e=>{if("delete"===e){if((0,Xp.isEmpty)(y))return void b({type:"error",message:(0,l.__)("Please select a log.","notification-master")});E(!0);try{await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/notification-logs"),method:"DELETE",data:{ids:y}}),x([]),_()}catch(e){b({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}finally{E(!1)}}})(w),loading:S,children:(0,l.__)("Apply","notification-master")})]}),(0,a.jsx)(Tp,{align:"center",style:{marginBottom:"1rem"},children:(0,a.jsx)(jk,{title:(0,l.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!h){m(!0);try{await Bj()({path:"/ntfm/v1/notification-logs",method:"DELETE"}),o([])}catch(e){b({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,l.__)("Yes","notification-master"),cancelText:(0,l.__)("No","notification-master"),children:(0,a.jsx)(gu,{type:"primary",danger:!0,children:(0,l.__)("Delete All","notification-master")})})})]}),(0,a.jsx)($Q,{columns:TJ,dataSource:n.map((e=>({...e,log_status:(0,a.jsx)(J_.Text,{type:"error"===e.status?"danger":"success",children:e.status}),notification:(0,a.jsx)(J_.Text,{children:e.content.notification_name}),date:dN(e.date),view:(0,a.jsx)(RS,{title:(0,l.__)("View","notification-master"),children:(0,a.jsx)(gu,{type:"primary",shape:"circle",icon:(0,a.jsx)(ik,{}),onClick:()=>p(e)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,l.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{d(e),i(t)}},loading:e,rowKey:"id",style:{width:"100%"},rowSelection:{selectedRowKeys:y,onChange:e=>x(e)}})]})}),(0,a.jsx)(wp,{title:(0,l.__)("Log Details","notification-master"),open:!!f,onCancel:()=>p(null),footer:null,width:800,children:(0,a.jsxs)("div",{className:"notification-master__log--view",children:[(0,a.jsxs)(Tp,{gap:10,children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Name","notification-master")," : "]}),(0,a.jsx)(J_.Text,{children:f?.content.notification_name})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Trigger","notification-master")," : "]}),(0,a.jsxs)(J_.Text,{children:[f?.content.trigger_name," ",`"${f?.content.trigger}"`]})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Integration","notification-master")," : "]}),(0,a.jsx)(J_.Text,{children:f?.integration})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Status","notification-master")," : "]}),(0,a.jsx)(J_.Text,{type:"error"===f?.status?"danger":"success",children:f?.status})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Date","notification-master")," : "]}),(0,a.jsx)(J_.Text,{children:f?.date})]}),(0,a.jsxs)(Tp,{style:{marginTop:"1rem",flexDirection:"column"},children:[(0,a.jsx)(J_.Text,{strong:!0,children:(0,l.__)("Details","notification-master")}),(0,a.jsxs)("pre",{style:{overflowX:"auto"},children:[JSON.stringify($(f?.content,f?.integration),null,2),"email"===f?.integration&&(0,a.jsx)(nV,{style:{marginTop:"1rem"},defaultActiveKey:["1"],items:[{label:(0,l.__)("Email Content","notification-master"),key:"1",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:f?.content.body}})}]})]})]})]})})]})}},{path:"/debug-log",slug:"debug-log",title:(0,l.__)("Debug Log","notification-master"),component:()=>{const[e,t]=(0,s.useState)(!0),[n,o]=(0,s.useState)([]),[r,i]=(0,s.useState)(10),[c,d]=(0,s.useState)(1),[f,p]=(0,s.useState)(null),[h,m]=(0,s.useState)(!1),[g,v]=(0,s.useState)(0),[b,y]=(0,s.useState)(!1),{addNotice:x}=(0,u.useDispatch)("notification-master/core"),[w,C]=(0,s.useState)([]),[S,E]=(0,s.useState)(""),[_,k]=(0,s.useState)(!1);YL((0,l.__)("Debug Log","notification-master"));const $=async()=>{try{const e=await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/logs",{per_page:r,page:c})});e?(o((0,Xp.isArray)(e?.logs)?e.logs:[]),v(e?.count||0)):x({type:"error",message:(0,l.__)("An error occurred","notification-master")})}catch(e){x({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}t(!1)};return(0,s.useEffect)((()=>{$()}),[r,c]),e?(0,a.jsx)("div",{className:"notification-master__log--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h2",{className:"notification-master-heading",children:[(0,a.jsx)(Tj,{component:PJ,width:20,height:20}),(0,l.__)("Debug Log","notification-master")]}),(0,a.jsx)("div",{className:"notification-master__log",children:(0,Xp.isEmpty)(n)?(0,a.jsx)(J_.Title,{level:5,style:{textAlign:"center"},children:(0,l.__)("No logs found.","notification-master")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Tp,{gap:20,justify:"space-between",children:[(0,a.jsxs)(Tp,{gap:"small",children:[(0,a.jsx)(wP,{options:[{label:(0,l.__)("Bulk Actions","notification-master"),value:"",disabled:!0},{label:(0,l.__)("Delete","notification-master"),value:"delete"}],value:S,onChange:e=>E(e)}),(0,a.jsx)(gu,{type:"primary",onClick:()=>(async e=>{if("delete"===e){if((0,Xp.isEmpty)(w))return void x({type:"error",message:(0,l.__)("Please select a log.","notification-master")});k(!0);try{await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/logs"),method:"DELETE",data:{ids:w}}),C([]),$()}catch(e){x({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}finally{k(!1)}}})(S),loading:_,children:(0,l.__)("Apply","notification-master")})]}),(0,a.jsxs)(Tp,{align:"center",style:{marginBottom:"1rem"},children:[(0,a.jsx)(gu,{type:"primary",onClick:async()=>{if(b)return;y(!0);const e=await Bj()({path:"/ntfm/v1/logs/export",method:"GET",parse:!1});if(e){const t=await e.blob(),n=window.URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download="logs.json",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n)}y(!1)},style:{marginRight:"1rem"},loading:b,children:(0,l.__)("Export All","notification-master")}),(0,a.jsx)(jk,{title:(0,l.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!h){m(!0);try{await Bj()({path:"/ntfm/v1/logs",method:"DELETE"}),o([])}catch(e){x({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,l.__)("Yes","notification-master"),cancelText:(0,l.__)("No","notification-master"),children:(0,a.jsx)(gu,{type:"primary",danger:!0,children:(0,l.__)("Delete All","notification-master")})})]})]}),(0,a.jsx)($Q,{columns:NJ,dataSource:n.map((e=>({...e,log_type:(0,a.jsx)(J_.Text,{type:"error"===e.type?"danger":"debug"===e.type?"warning":"secondary",children:e.type.toUpperCase()}),date:dN(e.date),view:(0,a.jsx)(RS,{title:(0,l.__)("View","notification-master"),children:(0,a.jsx)(gu,{type:"primary",shape:"circle",icon:(0,a.jsx)(ik,{}),onClick:()=>p(e.id)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,l.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{d(e),i(t)}},rowKey:"id",style:{width:"100%"},rowSelection:{selectedRowKeys:w,onChange:e=>C(e)}})]})}),(0,a.jsx)(wp,{title:(0,l.__)("Log Details","notification-master"),open:!!f,onCancel:()=>p(null),footer:null,width:600,children:(0,a.jsx)("pre",{style:{maxHeight:"400px",overflowX:"auto"},children:(e=>{const t={};for(const n in e)if("notification_name"!==n&&"trigger"!==n&&"trigger_name"!==n)if("string"==typeof e[n])try{(0,Xp.set)(t,n,JSON.parse(e[n]))}catch(o){(0,Xp.set)(t,n,e[n])}else(0,Xp.set)(t,n,e[n]);return JSON.stringify(t,null,2)})(n.find((e=>e.id===f))?.content)})})]})}}]),LJ=()=>{const{notices:e}=(0,u.useSelect)((e=>({notices:e("notification-master/core").getNotices()}))),{deleteNotice:t}=(0,u.useDispatch)("notification-master/core"),[n,o]=Kl.useNotification();return(0,s.useEffect)((()=>{(0,Xp.size)(e)&&(0,Xp.map)(e,((e,o)=>{const{message:r,description:i,type:a,duration:s}=e;n[a]({message:r,duration:s||6,description:i,onClose:()=>t(o),placement:"bottomRight"})}))}),[e]),o},zJ=({children:e})=>(0,a.jsx)(Xa,{theme:{token:{colorPrimary:"#E67A18",fontSize:14},components:{Button:{borderRadius:4,colorPrimary:"#312a30",colorPrimaryHover:"#E67A18",defaultShadow:"none",primaryShadow:"none",algorithm:!1},Input:{paddingBlock:14,paddingInline:14},Typography:{colorLink:"#E67A18"}}},children:e}),FJ=({slug:e,component:t})=>{const{proAlert:n}=(0,u.useSelect)((e=>({proAlert:e("notification-master/core").getProAlert()}))),{toggleProAlert:o}=(0,u.useDispatch)("notification-master/core"),r=Q(),i=(0,s.useCallback)(((e,t)=>n=>{n.preventDefault(),r(sN(e)),t?.classList.add("current"),Array.from(t?.parentElement?.children||[]).forEach((e=>{e!==t&&e.classList.remove("current")}))}),[]);return(0,s.useEffect)((()=>{const e=new Map;return(0,Xp.map)((0,Xp.filter)(BJ,(e=>!e.hidden)),"slug").forEach((t=>{const n=t,o=document.querySelector(`.wp-submenu-wrap a[href*="ntfm-${n}"]`);if(!o||!o.parentElement)return;const r=i(n,o.parentElement);e.set(o,r),o.addEventListener("click",r)})),()=>{e.forEach(((e,t)=>{t.removeEventListener("click",e)}))}}),[i]),(0,a.jsxs)("div",{className:`notification-master-page notification-master-page__${e}`,children:[(0,a.jsx)(wp,{title:!1,open:n,onCancel:()=>o(!1),footer:null,zIndex:9999999,children:(0,a.jsx)($N,{})}),(0,a.jsx)(tE,{icon:(0,a.jsx)(Pw,{}),onClick:()=>{const e=nE.ntfmSiteUrl;window.open(`${e}/docs/getting-started`,"_blank")},tooltip:(0,l.__)("Help","notification-master")}),(0,a.jsx)(LJ,{}),(0,a.jsx)(fN,{}),!nE.isPro&&(0,a.jsx)(Tp,{justify:"center",style:{margin:"20px 0"},children:(0,a.jsx)(Up,{message:(0,a.jsxs)(a.Fragment,{children:["🚨 ",(0,a.jsx)("strong",{children:(0,l.__)("30% OFF All Plans! 🎉","notification-master")})," ",(0,l.__)("Unlock Notification Master Pro for your WordPress site at an unbeatable price! 🔥","notification-master"),"⏳ ",(0,a.jsx)("a",{href:"https://notification-master.com/pricing/",target:"_blank",rel:"noopener noreferrer",children:(0,l.__)("Grab your deal now!","notification-master")})," ",(0,l.__)("Don’t miss out on this limited-time offer!","notification-master")]}),type:"warning",showIcon:!1})}),(0,a.jsx)(zJ,{children:(0,a.jsx)(jw.div,{className:"notification-master-page__content",children:(0,a.jsx)(t,{})})})]})},HJ=window.wp.dataControls,VJ="SET_SETTINGS",WJ="UPDATE_SETTING",KJ="ADD_NOTICE",qJ="DELETE_NOTICE",UJ="SET_TOTAL_NOTIFICATIONS",XJ="TOGGLE_PRO_ALERT",GJ="TOGGLE_MERGE_TAGS",YJ=e=>({type:VJ,settings:e}),ZJ=(e,t)=>({type:WJ,key:e,value:t}),QJ=e=>({type:KJ,notice:e}),JJ=e=>({type:qJ,id:e}),e0=e=>({type:UJ,total:e}),t0=e=>({type:XJ,status:e}),n0=e=>({type:GJ,status:e}),o0=e=>e.settings,r0=e=>e.notices,i0=(e,t)=>e.notices[t],a0=e=>e.totalNotifications,s0=e=>e.proAlert,l0=e=>e.mergeTags,c0=()=>async({dispatch:e})=>{const t=await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/settings")});e.setSettings(t)},u0=e=>async({dispatch:t})=>{const n=await Bj()({path:(0,oE.addQueryArgs)(`/ntfm/v1/integrations/${e}`)});t.receiveIntegration(e,n)},d0=()=>async({dispatch:e})=>{const t=parseInt(nE.totalNotifications)||0;e.setTotalNotifications(t)},f0={settings:{},notices:{},totalNotifications:0,proAlert:!1,mergeTags:!1},p0={reducer:(e=f0,t)=>{switch(t.type){case VJ:return{...e,settings:t.settings};case WJ:return{...e,settings:{...e.settings,[t.key]:t.value}};case KJ:const n=Math.random().toString(36).substr(2,9),o={...t.notice,noteId:n};return{...e,notices:{...e.notices,[n]:o}};case qJ:const r={...e.notices};return r[t.id]&&delete r[t.id],{...e,notices:r};case UJ:return{...e,totalNotifications:t.total};case XJ:return{...e,proAlert:t.status};case GJ:return{...e,mergeTags:!e.mergeTags};default:return e}},actions:o,selectors:r,controls:HJ.controls,resolvers:i},h0=(0,u.createReduxStore)("notification-master/core",p0);(0,u.register)(h0),(0,s.render)((0,a.jsx)((()=>(0,a.jsx)("div",{className:"notification-master__pages",children:(0,a.jsx)(ge,{history:aN(),children:(0,a.jsx)(de,{children:BJ.map((e=>(0,a.jsx)(ce,{path:e.path,element:(0,a.jsx)(FJ,{...e})},e.slug)))})})})),{}),document.getElementById("notification-master-admin"))},609:e=>{"use strict";e.exports=window.React},634:()=>{},942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=(t,n,r,i)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,r,i]=e[u],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(u)},n=globalThis.webpackChunknotification_master=globalThis.webpackChunknotification_master||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[350],(()=>o(557)));r=o.O(r)})();
     42title:(0,l.sprintf)((0,l.__)("(Copy) %s","notification-master"),n.title.rendered),trigger:n.trigger,connections:n.connections,status:"draft"};(await M("postType","ntfm_notification",o)).id?j({type:"success",message:(0,l.__)("Notification duplicated successfully","notification-master")}):j({type:"error",message:(0,l.__)("Could not duplicate notification","notification-master")}),t(1)}catch(e){j({type:"error",message:(0,l.__)("Could not duplicate notification","notification-master")})}_(null)}})(n),shape:"circle",loading:E===n})})]}),(0,a.jsx)(jk,{title:(0,l.__)("Are you sure?","notification-master"),onConfirm:()=>(async e=>{try{const t=await I("postType","ntfm_notification",e.toString(),{});j(t?{type:"success",message:(0,l.__)("Notification deleted successfully","notification-master")}:{type:"error",message:(0,l.__)("Could not delete notification","notification-master")})}catch(e){j({type:"error",message:(0,l.__)("Could not delete notification","notification-master")})}})(n),okText:(0,l.__)("Yes","notification-master"),cancelText:(0,l.__)("No","notification-master"),children:(0,a.jsx)(RS,{title:(0,l.__)("Delete","notification-master"),children:(0,a.jsx)(gu,{type:"primary",danger:!0,icon:(0,a.jsx)(MQ,{}),shape:"circle"})})})]})}})(e))):[],pagination:{total:D,current:e,pageSize:n,showSizeChanger:!0,showQuickJumper:!0,onChange:(e,n)=>{t(e),o(n)}},rowSelection:{selectedRowKeys:C,onChange:e=>{S(e)}},locale:{emptyText:[(0,a.jsx)($I,{image:$I.PRESENTED_IMAGE_SIMPLE,description:(0,l.__)("No notifications found","notification-master")},"empty")]}})]})]})}},{path:"/notifications/:id",slug:"notifications",title:(0,l.__)("Notifications","notification-master"),component:()=>{const{id:e}=J(),[t,n]=(0,s.useState)("new"===e),[o,r]=(0,s.useState)(!1),[i,c]=(0,s.useState)(!1),d=Q(),{addNotice:f}=(0,u.useDispatch)("notification-master/core"),{deleteEntityRecord:h}=(0,u.useDispatch)("core");if(YL(t?(0,l.__)("New Notification","notification-master"):(0,l.__)("Edit Notification","notification-master")),!e)return null;const{editedRecord:m,hasResolved:g,hasEdits:v,save:b,edit:y}="new"===e?(()=>{const e={date:"",date_gmt:"",guid:{rendered:"",raw:""},id:0,connections:{},link:"",modified:"",modified_gmt:"",password:"",slug:"",status:"draft",template:"",title:(0,l.__)("New Notification","notification-master"),trigger:"",triggerGroup:"",type:""},{saveEntityRecord:t}=(0,u.useDispatch)(GL.store),[n,o]=(0,s.useState)(e),r=(0,GL.useEntityRecord)("postType","ntfm_notification",n.id);return 0===n.id?{record:n,save:()=>{const e={title:n.title,status:n.status,trigger:n.trigger,connections:n.connections};return 0!==n.id&&(e.id=n.id),t("postType","ntfm_notification",e)},edit:e=>{o({...n,...e})},hasResolved:!0,hasEdits:!0,editedRecord:n}:r})():(0,GL.useEntityRecord)("postType","ntfm_notification",e);return function(e,t=!0){!function(e,t=!0){const{navigator:n}=(0,p.useContext)(W);(0,p.useEffect)((()=>{if(!t)return;const o=n.block((t=>{const n={...t,retry(){o(),t.retry()}};e(n)}));return o}),[n,e,t])}((0,p.useCallback)((t=>{window.confirm(e)&&t.retry()}),[e]),t)}((0,l.__)("Are you sure you want to leave this page?","notification-master"),t||o||i||!t&&v),g?(0,a.jsx)(qQ,{value:{record:m,onEdit:y,onSave:async()=>{if(!o){r(!0);try{const t=await b();t?(f({type:"success",message:(0,l.__)("Notification saved successfully","notification-master")}),"new"===e&&(window.history.replaceState(null,"",sN("notifications",t.id)),n(!1),t.title=t?.title?.rendered,y(t))):f({type:"error",message:(0,l.__)("Failed to save notification","notification-master")})}catch(e){f({type:"error",message:e?.data?.params?.connections||(0,l.__)("Failed to save notification","notification-master")})}r(!1)}},isSaving:o,isNew:t,hasEdits:v,onDelete:async()=>{if(!i){c(!0);try{await h("postType","ntfm_notification",e)?(f({type:"success",message:(0,l.__)("Notification deleted successfully","notification-master")}),d(sN("notifications"))):f({type:"error",message:(0,l.__)("Failed to delete notification","notification-master")})}catch(e){f({type:"error",message:(0,l.__)("Failed to delete notification","notification-master")})}c(!1)}},isDeleting:i},children:(0,a.jsxs)("div",{className:"notification-master__notification",children:[(0,a.jsxs)("div",{className:"notification-master__notification--header",children:[(0,a.jsx)(gu,{type:"text",onClick:()=>{d(sN("notifications"))},icon:(0,a.jsx)(VQ,{}),size:"large",children:(0,l.__)("Back to Notifications","notification-master")}),(0,a.jsx)("h2",{className:"notification-master-heading",children:t?"New Notification":"Edit Notification"})]}),(0,a.jsxs)("div",{className:"notification-master__notification--content",children:[(0,a.jsx)(OJ,{}),(0,a.jsx)(jJ,{})]})]})}):(0,a.jsx)("div",{className:"notification-master__notification--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})})},hidden:!0},{path:"/webpush-subscriptions",slug:"webpush-subscriptions",title:(0,l.__)("Subscriptions","notification-master"),component:()=>(YL((0,l.__)("Subscriptions","notification-master")),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Tp,{justify:"space-between",align:"center",style:{marginBottom:20,padding:"25px 20px",backgroundColor:"#fff",borderRadius:5},children:[(0,a.jsxs)("h2",{className:"notification-master-heading",style:{margin:0},children:[(0,a.jsx)(Tj,{component:DJ,width:20,height:20}),(0,l.__)("Manage Web Push Subscriptions","notification-master")]}),(0,a.jsxs)(Tp,{gap:10,align:"center",children:[(0,a.jsx)(J_.Text,{strong:!0,style:{fontSize:16},children:(0,l.__)("Total Subscriptions","notification-master")}),(0,a.jsx)(uC,{showZero:!0,count:nE.subscriptionCount,style:{backgroundColor:"#52c41a"},className:"notification-master__badge--subscriptions"})]})]}),(0,a.jsxs)("div",{className:"notification-master__Subscriptions",children:[!nE.isPro&&(0,a.jsxs)("div",{className:"notification-master__subscriptions--pro",style:{position:"relative"},children:[(0,a.jsx)("div",{className:"notification-master__subscriptions--pro--bg",style:{backgroundImage:`url(${nE.assetsUrl}/images/bg.png)`},children:(0,a.jsx)("img",{src:`${nE.assetsUrl}/images/bg.png`,alt:""})}),(0,a.jsx)("div",{className:"notification-master__subscriptions--pro--content",style:{position:"absolute",width:"40%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",backgroundColor:"rgba(255, 255, 255, 0.9)",borderRadius:5,padding:20,boxShadow:"0 0 10px rgba(0, 0, 0, 0.1)",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,a.jsx)(kN,{icon:(0,a.jsx)("img",{src:`${nE.assetsUrl}/images/logo.gif`,alt:"",style:{width:100}}),title:[(0,a.jsx)(J_.Title,{level:3,style:{textTransform:"capitalize"},children:(0,l.__)("Transform Your Notifications Like Never Before 🚀","notification-master")},"title"),(0,a.jsx)(J_.Text,{children:(0,l.__)("Upgrade to Notification Master Pro and experience next-level notifications! Unlock exclusive features, seamless integrations, and powerful capabilities designed to keep you ahead. Take the leap today and redefine your communication strategy 🔥.","notification-master")},"text")],extra:(0,a.jsx)(gu,{type:"primary",style:{backgroundColor:"#E67A18",fontWeight:600,borderRadius:5,textTransform:"uppercase"},size:"large",onClick:()=>{window.open(`${nE.ntfmSiteUrl}/pricing`,"_blank")},children:(0,l.__)("Upgrade to Pro","notification-master")})})})]}),(0,c.applyFilters)("NotificationMaster.SubscriptionsPage",null)]})]}))},{path:"/settings/:tab?",slug:"settings",title:(0,l.__)("Settings","notification-master"),component:()=>{const{settings:e,isResolving:t}=(0,u.useSelect)((e=>{const{hasFinishedResolution:t,getSettings:n}=e("notification-master/core"),o=n();return{isResolving:!t("getSettings"),settings:o}}),[]),{addNotice:n}=(0,u.useDispatch)("notification-master/core"),[o,r]=(0,s.useState)(!1),{tab:i}=J(),c=Q();if(YL((0,l.__)("Settings","notification-master")),t)return(0,a.jsx)("div",{className:"notification-master__settings--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})});const d=[{key:"general",label:(0,l.__)("General","notification-master"),children:(0,a.jsx)(TH,{}),icon:(0,a.jsx)(JL,{})},{key:"triggers",label:(0,l.__)("Triggers","notification-master"),children:(0,a.jsx)(NH,{}),icon:(0,a.jsx)(nz,{})},{key:"webpush",label:(0,l.__)("Web Push","notification-master"),children:(0,a.jsx)(XK,{}),icon:(0,a.jsx)(iz,{})}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h2",{className:"notification-master-heading",children:[(0,a.jsx)(Tj,{component:lz,width:20,height:20}),(0,l.__)("Settings","notification-master")]}),(0,a.jsx)("div",{className:"notification-master__settings",children:(0,a.jsx)(PH,{defaultActiveKey:i||"general",items:d,onChange:e=>{c(sN("settings",null,e))},tabBarStyle:{marginBottom:0,padding:"10px 20px 0 20px",fontSize:16,fontWeight:500,color:"var(--notification-master-help-text-color)"},tabBarExtraContent:(0,a.jsx)(gu,{type:"primary",onClick:async()=>{if(!o){r(!0);try{await Bj()({path:"/ntfm/v1/settings",method:"POST",data:{settings:e}}),n({type:"success",message:(0,l.__)("Settings saved successfully","notification-master")}),window.location.reload()}catch(e){n({type:"error",message:(0,l.__)("Failed to save settings","notification-master")})}finally{r(!1)}}},loading:o,children:(0,l.__)("Save","notification-master")})})})]})}},{path:"/notification-log",slug:"notification-log",title:(0,l.__)("Notification Log","notification-master"),component:()=>{const[e,t]=(0,s.useState)(!0),[n,o]=(0,s.useState)([]),[r,i]=(0,s.useState)(10),[c,d]=(0,s.useState)(1),[f,p]=(0,s.useState)(null),[h,m]=(0,s.useState)(!1),[g,v]=(0,s.useState)(0),{addNotice:b}=(0,u.useDispatch)("notification-master/core"),[y,x]=(0,s.useState)([]),[w,C]=(0,s.useState)(""),[S,E]=(0,s.useState)(!1);YL((0,l.__)("Notification Log","notification-master"));const _=async()=>{t(!0);try{const e=await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/notification-logs",{per_page:r,page:c})});e&&(o((0,Xp.isArray)(e?.logs)?e.logs:[]),v(e?.count||0))}catch(e){b({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}t(!1)};if((0,s.useEffect)((()=>{_()}),[r,c]),e&&(0,Xp.isEmpty)(n))return(0,a.jsx)("div",{className:"notification-master__log--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})});const k=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}return(0,Xp.isObject)(e)?$(e):e},$=(e,t="")=>{const n={},o={...e};"email"===t&&delete o.body;for(const e in o)"notification_name"!==e&&"trigger"!==e&&"trigger_name"!==e&&(0,Xp.set)(n,e,k(o[e]));return n};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h2",{className:"notification-master-heading",children:[(0,a.jsx)(Tj,{component:PJ,width:20,height:20}),(0,l.__)("Notification Log","notification-master")]}),(0,a.jsx)("div",{className:"notification-master__log",children:(0,Xp.isEmpty)(n)?(0,a.jsx)(J_.Title,{level:5,style:{textAlign:"center"},children:(0,l.__)("No logs found.","notification-master")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Tp,{gap:20,justify:"space-between",children:[(0,a.jsxs)(Tp,{gap:"small",children:[(0,a.jsx)(wP,{options:[{label:(0,l.__)("Bulk Actions","notification-master"),value:"",disabled:!0},{label:(0,l.__)("Delete","notification-master"),value:"delete"}],value:w,onChange:e=>C(e)}),(0,a.jsx)(gu,{type:"primary",onClick:()=>(async e=>{if("delete"===e){if((0,Xp.isEmpty)(y))return void b({type:"error",message:(0,l.__)("Please select a log.","notification-master")});E(!0);try{await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/notification-logs"),method:"DELETE",data:{ids:y}}),x([]),_()}catch(e){b({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}finally{E(!1)}}})(w),loading:S,children:(0,l.__)("Apply","notification-master")})]}),(0,a.jsx)(Tp,{align:"center",style:{marginBottom:"1rem"},children:(0,a.jsx)(jk,{title:(0,l.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!h){m(!0);try{await Bj()({path:"/ntfm/v1/notification-logs",method:"DELETE"}),o([])}catch(e){b({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,l.__)("Yes","notification-master"),cancelText:(0,l.__)("No","notification-master"),children:(0,a.jsx)(gu,{type:"primary",danger:!0,children:(0,l.__)("Delete All","notification-master")})})})]}),(0,a.jsx)($Q,{columns:TJ,dataSource:n.map((e=>({...e,log_status:(0,a.jsx)(J_.Text,{type:"error"===e.status?"danger":"success",children:e.status}),notification:(0,a.jsx)(J_.Text,{children:e.content.notification_name}),date:dN(e.date),view:(0,a.jsx)(RS,{title:(0,l.__)("View","notification-master"),children:(0,a.jsx)(gu,{type:"primary",shape:"circle",icon:(0,a.jsx)(ik,{}),onClick:()=>p(e)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,l.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{d(e),i(t)}},loading:e,rowKey:"id",style:{width:"100%"},rowSelection:{selectedRowKeys:y,onChange:e=>x(e)}})]})}),(0,a.jsx)(wp,{title:(0,l.__)("Log Details","notification-master"),open:!!f,onCancel:()=>p(null),footer:null,width:800,children:(0,a.jsxs)("div",{className:"notification-master__log--view",children:[(0,a.jsxs)(Tp,{gap:10,children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Name","notification-master")," : "]}),(0,a.jsx)(J_.Text,{children:f?.content.notification_name})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Trigger","notification-master")," : "]}),(0,a.jsxs)(J_.Text,{children:[f?.content.trigger_name," ",`"${f?.content.trigger}"`]})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Integration","notification-master")," : "]}),(0,a.jsx)(J_.Text,{children:f?.integration})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Status","notification-master")," : "]}),(0,a.jsx)(J_.Text,{type:"error"===f?.status?"danger":"success",children:f?.status})]}),(0,a.jsxs)(Tp,{gap:10,style:{marginTop:"1rem"},children:[(0,a.jsxs)(J_.Text,{strong:!0,children:[(0,l.__)("Date","notification-master")," : "]}),(0,a.jsx)(J_.Text,{children:f?.date})]}),(0,a.jsxs)(Tp,{style:{marginTop:"1rem",flexDirection:"column"},children:[(0,a.jsx)(J_.Text,{strong:!0,children:(0,l.__)("Details","notification-master")}),(0,a.jsxs)("pre",{style:{overflowX:"auto"},children:[JSON.stringify($(f?.content,f?.integration),null,2),"email"===f?.integration&&(0,a.jsx)(nV,{style:{marginTop:"1rem"},defaultActiveKey:["1"],items:[{label:(0,l.__)("Email Content","notification-master"),key:"1",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:f?.content.body}})}]})]})]})]})})]})}},{path:"/debug-log",slug:"debug-log",title:(0,l.__)("Debug Log","notification-master"),component:()=>{const[e,t]=(0,s.useState)(!0),[n,o]=(0,s.useState)([]),[r,i]=(0,s.useState)(10),[c,d]=(0,s.useState)(1),[f,p]=(0,s.useState)(null),[h,m]=(0,s.useState)(!1),[g,v]=(0,s.useState)(0),[b,y]=(0,s.useState)(!1),{addNotice:x}=(0,u.useDispatch)("notification-master/core"),[w,C]=(0,s.useState)([]),[S,E]=(0,s.useState)(""),[_,k]=(0,s.useState)(!1);YL((0,l.__)("Debug Log","notification-master"));const $=async()=>{try{const e=await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/logs",{per_page:r,page:c})});e?(o((0,Xp.isArray)(e?.logs)?e.logs:[]),v(e?.count||0)):x({type:"error",message:(0,l.__)("An error occurred","notification-master")})}catch(e){x({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}t(!1)};return(0,s.useEffect)((()=>{$()}),[r,c]),e?(0,a.jsx)("div",{className:"notification-master__log--loading",children:(0,a.jsx)(XL,{color:"var(--notification-master-color-primary)"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h2",{className:"notification-master-heading",children:[(0,a.jsx)(Tj,{component:PJ,width:20,height:20}),(0,l.__)("Debug Log","notification-master")]}),(0,a.jsx)("div",{className:"notification-master__log",children:(0,Xp.isEmpty)(n)?(0,a.jsx)(J_.Title,{level:5,style:{textAlign:"center"},children:(0,l.__)("No logs found.","notification-master")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Tp,{gap:20,justify:"space-between",children:[(0,a.jsxs)(Tp,{gap:"small",children:[(0,a.jsx)(wP,{options:[{label:(0,l.__)("Bulk Actions","notification-master"),value:"",disabled:!0},{label:(0,l.__)("Delete","notification-master"),value:"delete"}],value:S,onChange:e=>E(e)}),(0,a.jsx)(gu,{type:"primary",onClick:()=>(async e=>{if("delete"===e){if((0,Xp.isEmpty)(w))return void x({type:"error",message:(0,l.__)("Please select a log.","notification-master")});k(!0);try{await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/logs"),method:"DELETE",data:{ids:w}}),C([]),$()}catch(e){x({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}finally{k(!1)}}})(S),loading:_,children:(0,l.__)("Apply","notification-master")})]}),(0,a.jsxs)(Tp,{align:"center",style:{marginBottom:"1rem"},children:[(0,a.jsx)(gu,{type:"primary",onClick:async()=>{if(b)return;y(!0);const e=await Bj()({path:"/ntfm/v1/logs/export",method:"GET",parse:!1});if(e){const t=await e.blob(),n=window.URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download="logs.json",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n)}y(!1)},style:{marginRight:"1rem"},loading:b,children:(0,l.__)("Export All","notification-master")}),(0,a.jsx)(jk,{title:(0,l.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!h){m(!0);try{await Bj()({path:"/ntfm/v1/logs",method:"DELETE"}),o([])}catch(e){x({type:"error",message:e?.message||(0,l.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,l.__)("Yes","notification-master"),cancelText:(0,l.__)("No","notification-master"),children:(0,a.jsx)(gu,{type:"primary",danger:!0,children:(0,l.__)("Delete All","notification-master")})})]})]}),(0,a.jsx)($Q,{columns:NJ,dataSource:n.map((e=>({...e,log_type:(0,a.jsx)(J_.Text,{type:"error"===e.type?"danger":"debug"===e.type?"warning":"secondary",children:e.type.toUpperCase()}),date:dN(e.date),view:(0,a.jsx)(RS,{title:(0,l.__)("View","notification-master"),children:(0,a.jsx)(gu,{type:"primary",shape:"circle",icon:(0,a.jsx)(ik,{}),onClick:()=>p(e.id)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,l.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{d(e),i(t)}},rowKey:"id",style:{width:"100%"},rowSelection:{selectedRowKeys:w,onChange:e=>C(e)}})]})}),(0,a.jsx)(wp,{title:(0,l.__)("Log Details","notification-master"),open:!!f,onCancel:()=>p(null),footer:null,width:600,children:(0,a.jsx)("pre",{style:{maxHeight:"400px",overflowX:"auto"},children:(e=>{const t={};for(const n in e)if("notification_name"!==n&&"trigger"!==n&&"trigger_name"!==n)if("string"==typeof e[n])try{(0,Xp.set)(t,n,JSON.parse(e[n]))}catch(o){(0,Xp.set)(t,n,e[n])}else(0,Xp.set)(t,n,e[n]);return JSON.stringify(t,null,2)})(n.find((e=>e.id===f))?.content)})})]})}}]),LJ=()=>{const{notices:e}=(0,u.useSelect)((e=>({notices:e("notification-master/core").getNotices()}))),{deleteNotice:t}=(0,u.useDispatch)("notification-master/core"),[n,o]=Kl.useNotification();return(0,s.useEffect)((()=>{(0,Xp.size)(e)&&(0,Xp.map)(e,((e,o)=>{const{message:r,description:i,type:a,duration:s}=e;n[a]({message:r,duration:s||6,description:i,onClose:()=>t(o),placement:"bottomRight"})}))}),[e]),o},zJ=({children:e})=>(0,a.jsx)(Xa,{theme:{token:{colorPrimary:"#E67A18",fontSize:14},components:{Button:{borderRadius:4,colorPrimary:"#312a30",colorPrimaryHover:"#E67A18",defaultShadow:"none",primaryShadow:"none",algorithm:!1},Input:{paddingBlock:14,paddingInline:14},Typography:{colorLink:"#E67A18"}}},children:e}),FJ=({slug:e,component:t})=>{const{proAlert:n}=(0,u.useSelect)((e=>({proAlert:e("notification-master/core").getProAlert()}))),{toggleProAlert:o}=(0,u.useDispatch)("notification-master/core"),r=Q(),i=(0,s.useCallback)(((e,t)=>n=>{n.preventDefault(),r(sN(e)),t?.classList.add("current"),Array.from(t?.parentElement?.children||[]).forEach((e=>{e!==t&&e.classList.remove("current")}))}),[]);return(0,s.useEffect)((()=>{const e=new Map;return(0,Xp.map)((0,Xp.filter)(BJ,(e=>!e.hidden)),"slug").forEach((t=>{const n=t,o=document.querySelector(`.wp-submenu-wrap a[href*="ntfm-${n}"]`);if(!o||!o.parentElement)return;const r=i(n,o.parentElement);e.set(o,r),o.addEventListener("click",r)})),()=>{e.forEach(((e,t)=>{t.removeEventListener("click",e)}))}}),[i]),(0,a.jsxs)("div",{className:`notification-master-page notification-master-page__${e}`,children:[(0,a.jsx)(wp,{title:!1,open:n,onCancel:()=>o(!1),footer:null,zIndex:9999999,children:(0,a.jsx)($N,{})}),(0,a.jsx)(tE,{icon:(0,a.jsx)(Pw,{}),onClick:()=>{const e=nE.ntfmSiteUrl;window.open(`${e}/docs/getting-started`,"_blank")},tooltip:(0,l.__)("Help","notification-master")}),(0,a.jsx)(LJ,{}),(0,a.jsx)(fN,{}),!nE.isPro&&(0,a.jsx)(Tp,{justify:"center",style:{margin:"20px 0"},children:(0,a.jsx)(Up,{className:"halloween-sale-alert",message:(0,a.jsxs)(a.Fragment,{children:["🎃 ",(0,a.jsx)("strong",{children:(0,l.__)("Spooky Halloween Sale! 40% OFF All Plans! 👻","notification-master")})," ",(0,l.__)("Unlock frighteningly powerful features with Notification Master Pro!","notification-master"),"🦇 ",(0,l.__)("Use code:","notification-master")," ",(0,a.jsx)("span",{className:"halloween-coupon",children:"HALLOWEEN40"})," ",(0,l.__)("at checkout","notification-master"),"⏳ ",(0,a.jsx)("a",{href:"https://notification-master.com/pricing/",target:"_blank",rel:"noopener noreferrer",children:(0,l.__)("Claim your haunted discount now!","notification-master")})," ",(0,l.__)("Offer vanishes soon! 🕷️","notification-master")]}),type:"warning",showIcon:!1})}),(0,a.jsx)(zJ,{children:(0,a.jsx)(jw.div,{className:"notification-master-page__content",children:(0,a.jsx)(t,{})})})]})},HJ=window.wp.dataControls,VJ="SET_SETTINGS",WJ="UPDATE_SETTING",KJ="ADD_NOTICE",qJ="DELETE_NOTICE",UJ="SET_TOTAL_NOTIFICATIONS",XJ="TOGGLE_PRO_ALERT",GJ="TOGGLE_MERGE_TAGS",YJ=e=>({type:VJ,settings:e}),ZJ=(e,t)=>({type:WJ,key:e,value:t}),QJ=e=>({type:KJ,notice:e}),JJ=e=>({type:qJ,id:e}),e0=e=>({type:UJ,total:e}),t0=e=>({type:XJ,status:e}),n0=e=>({type:GJ,status:e}),o0=e=>e.settings,r0=e=>e.notices,i0=(e,t)=>e.notices[t],a0=e=>e.totalNotifications,s0=e=>e.proAlert,l0=e=>e.mergeTags,c0=()=>async({dispatch:e})=>{const t=await Bj()({path:(0,oE.addQueryArgs)("/ntfm/v1/settings")});e.setSettings(t)},u0=e=>async({dispatch:t})=>{const n=await Bj()({path:(0,oE.addQueryArgs)(`/ntfm/v1/integrations/${e}`)});t.receiveIntegration(e,n)},d0=()=>async({dispatch:e})=>{const t=parseInt(nE.totalNotifications)||0;e.setTotalNotifications(t)},f0={settings:{},notices:{},totalNotifications:0,proAlert:!1,mergeTags:!1},p0={reducer:(e=f0,t)=>{switch(t.type){case VJ:return{...e,settings:t.settings};case WJ:return{...e,settings:{...e.settings,[t.key]:t.value}};case KJ:const n=Math.random().toString(36).substr(2,9),o={...t.notice,noteId:n};return{...e,notices:{...e.notices,[n]:o}};case qJ:const r={...e.notices};return r[t.id]&&delete r[t.id],{...e,notices:r};case UJ:return{...e,totalNotifications:t.total};case XJ:return{...e,proAlert:t.status};case GJ:return{...e,mergeTags:!e.mergeTags};default:return e}},actions:o,selectors:r,controls:HJ.controls,resolvers:i},h0=(0,u.createReduxStore)("notification-master/core",p0);(0,u.register)(h0),(0,s.render)((0,a.jsx)((()=>(0,a.jsx)("div",{className:"notification-master__pages",children:(0,a.jsx)(ge,{history:aN(),children:(0,a.jsx)(de,{children:BJ.map((e=>(0,a.jsx)(ce,{path:e.path,element:(0,a.jsx)(FJ,{...e})},e.slug)))})})})),{}),document.getElementById("notification-master-admin"))},609:e=>{"use strict";e.exports=window.React},634:()=>{},942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=(t,n,r,i)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,r,i]=e[u],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(u)},n=globalThis.webpackChunknotification_master=globalThis.webpackChunknotification_master||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[350],(()=>o(557)));r=o.O(r)})();
  • notification-master/trunk/dist/style.css

    r3334303 r3384899  
    55
    66
    7 #notification-master-admin{--notification-master-color-primary: #e67a18;--notification-master-color-secondary: #f6f6f6;--notification-master-color-text: #6e6c6f;--notification-master-color-text-light: #fff;--notification-master-color-light: #fff;--notification-master-color-text-dark: #312a30;--notification-master-color-dark: #312a30;--notification-master-heading-color: #312a30;--notification-master-help-text-color: #a2a0a3;--notification-master-border-color: #eaeaea;margin-left:-20px;font-family:"Poppins",sans-serif}#notification-master-admin .notification-master-page__content{width:90%;max-width:1200px;margin:0 auto;padding:20px;box-sizing:border-box}#notification-master-admin .notification-master-page__content>div{box-sizing:border-box}@media screen and (max-width: 768px){#notification-master-admin .notification-master-page__content{width:100%}}#notification-master-admin .notification-master__settings--loading{display:flex;align-items:center;justify-content:center;height:100vh}#notification-master-admin input[type=text],#notification-master-admin input[type=email]{background:#fff;border-width:1px;border-style:solid;border-color:#d9d9d9;min-height:35px}#notification-master-admin input[type=text].ant-input-lg,#notification-master-admin input[type=email].ant-input-lg{padding:7px 11px}.notification-master-heading{font-size:22px;font-weight:600;color:var(--notification-master-heading-color);margin-bottom:1rem;display:flex;align-items:center}.notification-master-heading svg{fill:var(--notification-master-color-primary);margin-right:10px}.notification-master__back{display:flex;align-items:center;margin-bottom:1rem}.ant-table-wrapper{overflow-x:auto}.ant-table-wrapper .ant-table{min-width:650px}.ant-table-wrapper .ant-table-container{overflow-x:auto}.ant-table-wrapper .ant-table-content{overflow-x:auto}.ant-table-wrapper .ant-table-cell{vertical-align:middle}.ant-table-wrapper .ant-table-thead>tr>th{white-space:nowrap;background-color:#f5f5f5;font-weight:600}.ant-table-wrapper .ant-table-tbody>tr>td{transition:background .2s}.ant-table-wrapper .ant-table-row:hover .ant-table-cell{background-color:#f0f7ff}@media screen and (max-width: 992px){.notification-master-page__content{width:95%}.ant-table-wrapper .ant-table{min-width:600px}.ant-table-wrapper .ant-table-cell{padding:12px 16px;font-size:14px}}@media screen and (max-width: 768px){.notification-master-page__content{width:98%;padding:15px 10px}.notification-master-heading{font-size:18px;margin-bottom:15px}.notification-master-heading .anticon{margin-right:5px}.ant-table{font-size:13px;overflow-x:auto}.ant-table .ant-table-container{overflow-x:auto}.ant-table .ant-table-content{overflow-x:auto}.ant-table .ant-btn{padding:0 8px;height:28px;font-size:13px;margin:2px}.ant-table th{white-space:nowrap}.ant-pagination{font-size:13px}.ant-pagination .ant-pagination-item{min-width:26px;height:26px;line-height:24px}.ant-table-wrapper{overflow-x:auto}.ant-table-wrapper .ant-table{min-width:500px}.ant-table-wrapper .ant-table-cell{padding:10px 12px;font-size:13px}.ant-table-wrapper .ant-table-thead>tr>th{padding:10px 12px;font-size:13px}}@media screen and (max-width: 480px){.notification-master-page__content{width:100%;padding:10px 5px}.notification-master-heading{font-size:16px;margin-bottom:10px}.ant-form-item{margin-bottom:12px}.ant-table-wrapper .ant-table{min-width:450px}.ant-table-wrapper .ant-table-cell{padding:8px 10px;font-size:12px;white-space:nowrap}.ant-table-wrapper .ant-table-thead .ant-table-cell{font-size:12px;font-weight:600;padding:8px 10px}.ant-table-wrapper .ant-table-pagination{margin:12px 0;font-size:12px}.ant-table-wrapper .ant-table-row .ant-btn{padding:0 6px;height:24px;font-size:12px}}
     7#notification-master-admin{--notification-master-color-primary: #e67a18;--notification-master-color-secondary: #f6f6f6;--notification-master-color-text: #6e6c6f;--notification-master-color-text-light: #fff;--notification-master-color-light: #fff;--notification-master-color-text-dark: #312a30;--notification-master-color-dark: #312a30;--notification-master-heading-color: #312a30;--notification-master-help-text-color: #a2a0a3;--notification-master-border-color: #eaeaea;margin-left:-20px;font-family:"Poppins",sans-serif}#notification-master-admin .notification-master-page__content{width:90%;max-width:1200px;margin:0 auto;padding:20px;box-sizing:border-box}#notification-master-admin .notification-master-page__content>div{box-sizing:border-box}@media screen and (max-width: 768px){#notification-master-admin .notification-master-page__content{width:100%}}#notification-master-admin .notification-master__settings--loading{display:flex;align-items:center;justify-content:center;height:100vh}#notification-master-admin input[type=text],#notification-master-admin input[type=email]{background:#fff;border-width:1px;border-style:solid;border-color:#d9d9d9;min-height:35px}#notification-master-admin input[type=text].ant-input-lg,#notification-master-admin input[type=email].ant-input-lg{padding:7px 11px}.notification-master-heading{font-size:22px;font-weight:600;color:var(--notification-master-heading-color);margin-bottom:1rem;display:flex;align-items:center}.notification-master-heading svg{fill:var(--notification-master-color-primary);margin-right:10px}.notification-master__back{display:flex;align-items:center;margin-bottom:1rem}.ant-table-wrapper{overflow-x:auto}.ant-table-wrapper .ant-table{min-width:650px}.ant-table-wrapper .ant-table-container{overflow-x:auto}.ant-table-wrapper .ant-table-content{overflow-x:auto}.ant-table-wrapper .ant-table-cell{vertical-align:middle}.ant-table-wrapper .ant-table-thead>tr>th{white-space:nowrap;background-color:#f5f5f5;font-weight:600}.ant-table-wrapper .ant-table-tbody>tr>td{transition:background .2s}.ant-table-wrapper .ant-table-row:hover .ant-table-cell{background-color:#f0f7ff}@media screen and (max-width: 992px){.notification-master-page__content{width:95%}.ant-table-wrapper .ant-table{min-width:600px}.ant-table-wrapper .ant-table-cell{padding:12px 16px;font-size:14px}}@media screen and (max-width: 768px){.notification-master-page__content{width:98%;padding:15px 10px}.notification-master-heading{font-size:18px;margin-bottom:15px}.notification-master-heading .anticon{margin-right:5px}.ant-table{font-size:13px;overflow-x:auto}.ant-table .ant-table-container{overflow-x:auto}.ant-table .ant-table-content{overflow-x:auto}.ant-table .ant-btn{padding:0 8px;height:28px;font-size:13px;margin:2px}.ant-table th{white-space:nowrap}.ant-pagination{font-size:13px}.ant-pagination .ant-pagination-item{min-width:26px;height:26px;line-height:24px}.ant-table-wrapper{overflow-x:auto}.ant-table-wrapper .ant-table{min-width:500px}.ant-table-wrapper .ant-table-cell{padding:10px 12px;font-size:13px}.ant-table-wrapper .ant-table-thead>tr>th{padding:10px 12px;font-size:13px}}@media screen and (max-width: 480px){.notification-master-page__content{width:100%;padding:10px 5px}.notification-master-heading{font-size:16px;margin-bottom:10px}.ant-form-item{margin-bottom:12px}.ant-table-wrapper .ant-table{min-width:450px}.ant-table-wrapper .ant-table-cell{padding:8px 10px;font-size:12px;white-space:nowrap}.ant-table-wrapper .ant-table-thead .ant-table-cell{font-size:12px;font-weight:600;padding:8px 10px}.ant-table-wrapper .ant-table-pagination{margin:12px 0;font-size:12px}.ant-table-wrapper .ant-table-row .ant-btn{padding:0 6px;height:24px;font-size:12px}}.halloween-sale-alert{background:linear-gradient(135deg, #2a2440 0%, #3d3555 50%, #2a2440 100%) !important;border:1px solid #d97941 !important;border-radius:8px !important;box-shadow:0 2px 8px rgba(217,121,65,.15) !important;position:relative;overflow:hidden;max-width:1200px}.halloween-sale-alert::before{content:"";position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(45deg, transparent 30%, rgba(217, 121, 65, 0.05) 50%, transparent 70%);animation:hauntedShine 6s linear infinite}.halloween-sale-alert .ant-alert-message{color:#e8e6ea !important;font-size:15px;line-height:1.8;position:relative;z-index:1}.halloween-sale-alert .ant-alert-message strong{color:#f5a76a;font-size:17px;animation:spookyPulse 3s ease-in-out infinite}.halloween-sale-alert .ant-alert-message a{color:#f5a76a;font-weight:600;text-decoration:underline;transition:all .3s ease}.halloween-sale-alert .ant-alert-message a:hover{color:#ffc08a}.halloween-sale-alert .halloween-coupon{display:inline-block;background:linear-gradient(135deg, #d97941 0%, #e89460 100%);color:#2a2440;padding:4px 12px;border-radius:6px;font-weight:bold;font-size:16px;margin:0 6px;letter-spacing:1px;box-shadow:0 2px 6px rgba(217,121,65,.3);animation:couponFloat 3s ease-in-out infinite;border:1px solid #f5a76a}@keyframes spookyPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.03)}}@keyframes couponFloat{0%,100%{transform:translateY(0px)}50%{transform:translateY(-2px)}}@keyframes hauntedShine{0%{transform:translate(-50%, -50%) rotate(0deg)}100%{transform:translate(-50%, -50%) rotate(360deg)}}@media screen and (max-width: 768px){.halloween-sale-alert .ant-alert-message{font-size:13px}.halloween-sale-alert .ant-alert-message strong{font-size:14px}.halloween-sale-alert .halloween-coupon{font-size:14px;padding:3px 10px}}@media screen and (max-width: 480px){.halloween-sale-alert .ant-alert-message{font-size:12px}.halloween-sale-alert .ant-alert-message strong{font-size:13px}.halloween-sale-alert .halloween-coupon{font-size:13px;padding:2px 8px;margin:0 4px}}
    88.notification-master-page__home .notification-master-page__content .notification-master__stats{display:flex;flex-wrap:wrap;gap:20px}.notification-master-page__home .notification-master-page__content .notification-master__stats>div{background-color:var(--notification-master-color-light)}.notification-master-page__home .notification-master-page__content .notification-master__stats--loading{display:flex;justify-content:center;align-items:center;height:100%}.notification-master-page__home .notification-master-page__content .notification-master__stats--chart{flex:2;padding:20px;min-height:300px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview{flex:1;padding:10px;min-height:200px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header{display:flex;justify-content:space-between;align-items:center}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header .notification-master-heading{display:block}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header .notification-master-heading p{font-size:14px;color:var(--notification-master-help-text-color);margin-bottom:20px;font-weight:400}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header .notification-master-heading p::after{content:"";display:block;width:45%;height:1px;background-color:var(--notification-master-help-text-color);margin-top:10px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header--count{font-size:18px;color:var(--notification-master-color-primary);margin-left:20px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header a{color:var(--notification-master-heading-color);font-size:14px;text-decoration:none}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header a:hover{text-decoration:underline}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--content{display:flex;justify-content:space-between}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--item{display:flex;flex-direction:column;align-items:center;margin-bottom:20px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--item--name{display:flex;justify-content:space-between;margin-bottom:5px;margin-top:10px;text-align:center}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--item--name>span:first-child{font-size:16px;font-weight:400;color:var(--notification-master-heading-color)}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--item--count{font-size:14px;color:var(--notification-master-color-primary);margin-left:20px}@media screen and (max-width: 768px){.notification-master-page__home .notification-master-page__content .notification-master__stats{flex-direction:column}.notification-master-page__home .notification-master-page__content .notification-master__stats--chart{min-height:200px;padding:10px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview{padding:10px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header{flex-direction:column;align-items:flex-start}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--header a{margin-top:10px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--content{flex-direction:column;align-items:center;gap:20px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--item{width:100%;margin-bottom:20px;max-width:200px}.notification-master-page__home .notification-master-page__content .notification-master__stats--overview--item--name{margin-top:8px;width:100%;justify-content:center}}
    99.notification-master-page__settings .notification-master__settings{position:relative;background-color:var(--notification-master-color-light)}.notification-master-page__settings .notification-master__settings .ant-tabs-tab-btn{color:var(--notification-master-color-text);font-size:16px}.notification-master-page__settings .notification-master__settings--header{padding:10px;border-bottom:1px solid var(--notification-master-border-color)}.notification-master-page__settings .notification-master__settings--tabs .ant-tabs-nav{margin-bottom:20px}.notification-master-page__settings .notification-master__settings--tabs .ant-tabs-tab{padding:12px 16px;margin-right:8px}.notification-master-page__settings .notification-master__settings--item{padding:20px;border-bottom:1px solid var(--notification-master-border-color);display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.notification-master-page__settings .notification-master__settings--item--title h5{color:var(--notification-master-heading-color);margin-top:0}.notification-master-page__settings .notification-master__settings--item--title span{color:var(--notification-master-help-text-color);font-size:14px}.notification-master-page__settings .notification-master__settings--item:last-child{margin-bottom:0}.notification-master-page__settings .notification-master__settings--item--has-subitem{border-bottom:none;padding-bottom:0}.notification-master-page__settings .notification-master__settings--item--block{display:block}.notification-master-page__settings .notification-master__settings--item--block .notification-master__settings--item--title{margin-bottom:10px}.notification-master-page__settings .notification-master__settings--item .ant-select-selection-search-input{outline:none;border:none;box-shadow:none}.notification-master-page__settings .notification-master__settings--item .ant-select-selection-search-input:focus{outline:none;border:none;box-shadow:none}.notification-master-page__settings .notification-master__settings--footer{width:100%;padding:20px;background-color:var(--notification-master-color-light);box-sizing:border-box;transition:position .3s ease-in-out;display:flex;justify-content:flex-end;gap:15px;border-top:1px solid var(--notification-master-border-color);margin-top:20px}.notification-master-page__settings .notification-master__settings--footer--sticky{position:fixed;bottom:0;box-shadow:0px -2px 5px 0px rgba(0,0,0,.1);z-index:100}.notification-master-page__settings .notification-master__settings--footer .ant-btn{min-width:100px}.notification-master__integration--loading{display:flex;justify-content:center;align-items:center;height:100vh;width:100%}@media screen and (max-width: 992px){.notification-master__settings--tabs .ant-tabs-nav{margin-bottom:20px}.notification-master__settings--tabs .ant-tabs-tab{padding:10px 12px}.notification-master__settings--item{padding:18px}.notification-master__settings--footer{padding:18px}}@media screen and (max-width: 768px){.notification-master__settings--tabs .ant-tabs-nav{margin-bottom:15px;padding:0 5px}.notification-master__settings--tabs .ant-tabs-tab{padding:8px 10px;font-size:14px;margin-right:5px}.notification-master__settings--tabs .ant-tabs-ink-bar{height:3px}.notification-master__settings--tabs .ant-tabs-nav-list{gap:5px}.notification-master__settings--item{flex-direction:column;padding:15px}.notification-master__settings--item--title{margin-bottom:10px;width:100%}.notification-master__settings--item--title h5{font-size:16px !important}.notification-master__settings--item--switch{width:100%}.notification-master__settings--item--switch .ant-input{width:100%}.notification-master__settings--item--select{width:100%}.notification-master__settings--item--select .ant-select{width:100%}.notification-master__settings--footer{padding:15px;display:flex;justify-content:space-between;gap:15px;position:sticky;bottom:0;z-index:100;box-shadow:0px -2px 5px 0px rgba(0,0,0,.1)}.notification-master__settings--footer .ant-btn{flex:1;min-width:120px;padding:0 15px}}@media screen and (max-width: 480px){.notification-master__settings--tabs .ant-tabs-nav{margin-bottom:12px}.notification-master__settings--tabs .ant-tabs-tab{padding:6px 8px;font-size:13px;margin-right:2px}.notification-master__settings--item{padding:12px;margin-bottom:8px}.notification-master__settings--item--title h5{font-size:15px !important;margin-bottom:5px}.notification-master__settings--item--title span{font-size:12px}.notification-master__settings--footer{padding:12px;gap:10px}.notification-master__settings--footer .ant-btn{min-width:0;margin:0;font-size:13px;height:32px;padding:0 10px}}
  • notification-master/trunk/includes/admin/class-admin.php

    r3189998 r3384899  
    7272        // Remove notices.
    7373        add_action( 'admin_notices', array( $this, 'remove_notices' ), 1 );
     74
     75        // Initialize Halloween notice.
     76        new Halloween_Notice();
    7477    }
    7578
  • notification-master/trunk/notifications-master.php

    r3364905 r3384899  
    55 * Description: Enhance user engagement. Trigger notifications for events, support multiple channels like email and Discord, and personalize with dynamic merge tags. Easy setup and customization.
    66 *
    7  * Version: 1.6.6
     7 * Version: 1.6.7
    88 *
    99 * Author: Notification Master
     
    2626
    2727// Define notification-master constants.
    28 define( 'NOTIFICATION_MASTER_VERSION', '1.6.6' );
     28define( 'NOTIFICATION_MASTER_VERSION', '1.6.7' );
    2929define( 'NOTIFICATION_MASTER_FILE', __FILE__ );
    3030define( 'NOTIFICATION_MASTER_DIR', plugin_dir_path( __FILE__ ) );
  • notification-master/trunk/readme.txt

    r3364914 r3384899  
    33Donate link: https://notification-master.com
    44Tags: web push, email, notifications, sms, whatsapp
    5 Stable tag: 1.6.6
     5Stable tag: 1.6.7
    66Requires at least: 4.9
    77Tested up to: 6.8
     
    128128* **[API & Webhooks](https://notification-master.com/docs/webhook/)** - Advanced integrations
    129129
    130 == External Services ==
    131 
    132 This plugin connects to several external services to provide notification functionality. Below is a comprehensive list of all third-party services used:
    133 
    134 ### **Notification Master Key Generation Service**
    135 - **Service**: Notification Master's VAPID key generation API
    136 - **Purpose**: Generates secure VAPID keys for web push notifications
    137 - **Data Sent**: Your website URL for key pairing
    138 - **When**: Only when you click "Generate Keys" in Web Push settings
    139 - **Service URL**: https://notification-master.com
    140 - **Terms of Service**: https://notification-master.com/terms/
    141 - **Privacy Policy**: https://notification-master.com/privacy-policy/
    142 
    143 ### **Instagram API (Meta)**
    144 - **Service**: Instagram Basic Display API and Instagram Graph API
    145 - **Purpose**: Auto-posting content to Instagram accounts
    146 - **Data Sent**: Access tokens, post content, images, and captions
    147 - **When**: When Instagram integration is configured and notifications are triggered
    148 - **Service URLs**:
    149   - https://api.instagram.com/oauth/access_token
    150   - https://graph.instagram.com/
    151 - **Terms of Service**: https://developers.facebook.com/terms/
    152 - **Privacy Policy**: https://www.facebook.com/privacy/policy/
    153 
    154 ### **Discord Webhooks**
    155 - **Service**: Discord webhook API
    156 - **Purpose**: Sending notifications to Discord channels
    157 - **Data Sent**: Message content, embeds, and webhook URLs you configure
    158 - **When**: When Discord integration is enabled and notifications are triggered
    159 - **Service URL**: https://discord.com/api/webhooks/
    160 - **Terms of Service**: https://discord.com/terms
    161 - **Privacy Policy**: https://discord.com/privacy
    162 
    163 ### **Facebook Graph API (Meta)**
    164 - **Service**: Facebook Graph API
    165 - **Purpose**: Posting notifications to Facebook pages
    166 - **Data Sent**: Page access tokens, post content, and media you configure
    167 - **When**: When Facebook integration is enabled and notifications are triggered
    168 - **Service URL**: https://graph.facebook.com/
    169 - **Terms of Service**: https://developers.facebook.com/terms/
    170 - **Privacy Policy**: https://www.facebook.com/privacy/policy/
    171 
    172 ### **Custom Webhooks**
    173 - **Service**: User-defined webhook endpoints
    174 - **Purpose**: Sending notifications to custom API endpoints
    175 - **Data Sent**: Notification data to URLs you configure
    176 - **When**: When webhook integration is enabled and notifications are triggered
    177 - **Note**: Terms and privacy policies depend on the specific services you configure
    178 
    179 **Important**: All external service integrations are optional and only used when you explicitly configure them. No data is sent to external services unless you actively set up and enable specific integrations. You maintain full control over what data is shared and with which services.
    180 
    181130== Installation ==
    182131
     
    233182
    234183== Changelog ==
     184
     185= 1.6.7 =
     186* Added: Changed admin notice text.
    235187
    236188= 1.6.6 =
Note: See TracChangeset for help on using the changeset viewer.