From 83b7294fa4917db5523e8c22e504c647cf10a034 Mon Sep 17 00:00:00 2001 From: dwindown Date: Sat, 18 Apr 2026 17:28:49 +0700 Subject: [PATCH] fix: prevent modal from showing unexpectedly and fix inline actions Remove duplicate inline actions from Forms page title column to prevent conflicts with DataTable's built-in actions column. Fix DataTable actions column: - Only show delete/duplicate on hover using CSS - Add proper event propagation handling (stopPropagation) - Remove unnecessary wrapper div that was causing issues Co-authored-by: Claude Opus 4.7 --- build/admin.asset.php | 2 +- build/admin.js | 2 +- includes/Customer.php | 52 ++++++------ includes/License.php | 80 +++++++++--------- includes/Order.php | 1 + ...1913ebadf428560780b121588c6c0cdf65.json.gz | Bin 0 -> 3557 bytes ...8ba13cafe629ac4cbda7f836d7b5a83c4f.json.gz | Bin 0 -> 1411 bytes ...f62f81ff6400630b08f6d2900f354bcb5e.json.gz | Bin 0 -> 10400 bytes ...bc80716ef8e1e601716cb0e4c36412d093.json.gz | Bin 0 -> 3796 bytes src/admin/components/shared/DataTable.js | 27 ++++-- src/admin/pages/Forms.js | 18 +--- 11 files changed, 90 insertions(+), 92 deletions(-) create mode 100644 node_modules/.cache/babel-loader/1a741df843f1088b111b34098367931913ebadf428560780b121588c6c0cdf65.json.gz create mode 100644 node_modules/.cache/babel-loader/215ccb96814ec5dad6acde72ebf5628ba13cafe629ac4cbda7f836d7b5a83c4f.json.gz create mode 100644 node_modules/.cache/babel-loader/8ad61b9bd1cdfe0ddc52c8e65cbe1ef62f81ff6400630b08f6d2900f354bcb5e.json.gz create mode 100644 node_modules/.cache/babel-loader/b9ad9415434e146b824f735780f297bc80716ef8e1e601716cb0e4c36412d093.json.gz diff --git a/build/admin.asset.php b/build/admin.asset.php index fa73313f8..a02c992cd 100644 --- a/build/admin.asset.php +++ b/build/admin.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-element', 'wp-i18n', 'wp-icons/build/arrow-left', 'wp-icons/build/bell', 'wp-icons/build/eye-closed', 'wp-icons/build/eye-opened', 'wp-icons/build/list', 'wp-icons/build/message', 'wp-icons/build/minus', 'wp-icons/build/trash', 'wp-icons/build/visible'), 'version' => '42bdafafef51db2063cf'); + array('react', 'wp-components', 'wp-element', 'wp-i18n', 'wp-icons/build/arrow-left', 'wp-icons/build/bell', 'wp-icons/build/eye-closed', 'wp-icons/build/eye-opened', 'wp-icons/build/list', 'wp-icons/build/message', 'wp-icons/build/minus', 'wp-icons/build/trash', 'wp-icons/build/visible'), 'version' => 'ffa92e2b75f22808382a'); diff --git a/build/admin.js b/build/admin.js index 7ccd0f60b..aefab3b80 100644 --- a/build/admin.js +++ b/build/admin.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,a=window.wp.element,n=window.wp.i18n,r=window.wp.components,l=(0,a.forwardRef)(function({icon:e,size:t=24,...n},r){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:r})}),o=window.wp["icons/build/list"];var i=e.n(o);const c=window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",s=window.formipayAdmin?.nonce||"";async function m(e,t={}){const a=new FormData;a.append("action",e),a.append("_wpnonce",s),Object.keys(t).forEach(e=>{"object"==typeof t[e]?a.append(e,JSON.stringify(t[e])):a.append(e,t[e])}),console.log(`[AJAX] Sending request: ${e}`,{nonce:s,data:t});try{const t=await fetch(c,{method:"POST",credentials:"same-origin",body:a});console.log(`[AJAX] Response status: ${e}`,t.status);const n=await t.json();if(console.log(`[AJAX] Response data: ${e}`,n),!t.ok||!1===n.success){const e=n.data?.message||n.message||"Request failed";throw new Error(e)}return n}catch(t){throw console.error(`AJAX error [${e}]:`,t),t}}window.formipayAdmin;const d=window.wp["icons/build/visible"];var p=e.n(d);const u={"on-hold":"#f0ad4e","payment-confirm":"#17a2b8","in-progress":"#17a2b8",shipping:"#6c757d",completed:"#28a745",failed:"#dc3545",refunded:"#6c757d",cancelled:"#dc3545"},y={"on-hold":(0,n.__)("On Hold","formipay"),"payment-confirm":(0,n.__)("Payment Confirmed","formipay"),"in-progress":(0,n.__)("In Progress","formipay"),shipping:(0,n.__)("Shipping","formipay"),completed:(0,n.__)("Completed","formipay"),failed:(0,n.__)("Failed","formipay"),refunded:(0,n.__)("Refunded","formipay"),cancelled:(0,n.__)("Cancelled","formipay")};function f({order:e,onSelect:a}){const r=u[e.status]||"#6c757d",o=y[e.status]||e.status,i=(e=>{if(e.form_data){const t=Object.values(e.form_data).find(e=>e.name&&e.name.includes("name"));return t?.value||"-"}return"-"})(e);return(0,t.createElement)("tr",{className:"formipay-order-item"},(0,t.createElement)("td",null,(0,t.createElement)("strong",null,"#",e.id)),(0,t.createElement)("td",null,(c=e.created_date)?new Date(c).toLocaleDateString():"-"),(0,t.createElement)("td",null,"-"!==i?i:(0,t.createElement)("em",null,"Unknown")),(0,t.createElement)("td",null,(0,t.createElement)("strong",null,e.total_formatted||e.total)),(0,t.createElement)("td",null,(0,t.createElement)("span",{className:"status-badge",style:{backgroundColor:r}},o)),(0,t.createElement)("td",null,(0,t.createElement)("button",{type:"button",className:"button button-small",onClick:a},(0,t.createElement)(l,{icon:p()(),size:16}),(0,n.__)("View","formipay"))));var c}function _({onSelectOrder:e}){const[o,c]=(0,a.useState)([]),[s,d]=(0,a.useState)(!0),[p,u]=(0,a.useState)(0),[y,_]=(0,a.useState)({keyword:"",status:"",date_from:"",date_to:""}),[E,b]=(0,a.useState)({limit:20,offset:0}),h=(0,a.useCallback)(()=>{d(!0),((e={})=>m("formipay-tabledata-orders",e))({keyword:y.keyword,status:y.status,date_from:y.date_from,date_to:y.date_to,limit:E.limit,offset:E.offset}).then(e=>{e.data&&(c(e.data.results||[]),u(e.data.total||0))}).catch(e=>{console.error("Load orders error:",e)}).finally(()=>{d(!1)})},[y,E]);(0,a.useEffect)(()=>{h()},[h]);const w=(e,t)=>{_({...y,[e]:t}),b({...E,offset:0})},g=e=>{b({...E,offset:e})},v={"":(0,n.__)("All Statuses","formipay"),"on-hold":(0,n.__)("On Hold","formipay"),"payment-confirm":(0,n.__)("Payment Confirmed","formipay"),"in-progress":(0,n.__)("In Progress","formipay"),shipping:(0,n.__)("Shipping","formipay"),completed:(0,n.__)("Completed","formipay"),failed:(0,n.__)("Failed","formipay"),refunded:(0,n.__)("Refunded","formipay"),cancelled:(0,n.__)("Cancelled","formipay")},k=Math.ceil(p/E.limit),N=Math.floor(E.offset/E.limit)+1;return(0,t.createElement)("div",{className:"formipay-order-list"},(0,t.createElement)("div",{className:"formipay-orders-header"},(0,t.createElement)("h2",null,(0,t.createElement)(l,{icon:i()()}),(0,n.__)("Orders","formipay")),(0,t.createElement)("span",{className:"order-count"},p," ",(0,n.__)("orders","formipay"))),(0,t.createElement)("div",{className:"formipay-orders-filters"},(0,t.createElement)(r.SearchControl,{value:y.keyword,onChange:e=>{w("keyword",e)},placeholder:(0,n.__)("Search by order ID, customer name, email...","formipay")}),(0,t.createElement)(r.SelectControl,{value:y.status,options:Object.entries(v).map(([e,t])=>({value:e,label:t})),onChange:e=>w("status",e),label:(0,n.__)("Status","formipay")}),(0,t.createElement)("input",{type:"date",value:y.date_from,onChange:e=>w("date_from",e.target.value),className:"formipay-date-input"}),(0,t.createElement)("input",{type:"date",value:y.date_to,onChange:e=>w("date_to",e.target.value),className:"formipay-date-input"}),(y.keyword||y.status||y.date_from||y.date_to)&&(0,t.createElement)(r.Button,{variant:"secondary",onClick:()=>{_({keyword:"",status:"",date_from:"",date_to:""}),b({limit:20,offset:0})}},(0,n.__)("Clear Filters","formipay"))),(0,t.createElement)("div",{className:"formipay-orders-table-wrapper"},s?(0,t.createElement)("div",{className:"formipay-loading"},(0,t.createElement)("span",{className:"spinner is-active"})):0===o.length?(0,t.createElement)("div",{className:"formipay-no-results"},(0,t.createElement)("p",null,(0,n.__)("No orders found","formipay"))):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("table",{className:"formipay-orders-table wp-list-table widefat fixed striped"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,n.__)("ID","formipay")),(0,t.createElement)("th",null,(0,n.__)("Date","formipay")),(0,t.createElement)("th",null,(0,n.__)("Customer","formipay")),(0,t.createElement)("th",null,(0,n.__)("Total","formipay")),(0,t.createElement)("th",null,(0,n.__)("Status","formipay")),(0,t.createElement)("th",null,(0,n.__)("Actions","formipay")))),(0,t.createElement)("tbody",null,o.map(a=>(0,t.createElement)(f,{key:a.id,order:a,onSelect:()=>e?.(a.id)})))),k>1&&(0,t.createElement)("div",{className:"formipay-pagination"},(0,t.createElement)(r.Button,{variant:"secondary",disabled:1===N,onClick:()=>g(E.offset-E.limit)},(0,n.__)("Previous","formipay")),(0,t.createElement)("span",{className:"pagination-info"},(0,n.__)("Page","formipay")," ",N," ",(0,n.__)("of","formipay")," ",k),(0,t.createElement)(r.Button,{variant:"secondary",disabled:N===k,onClick:()=>g(E.offset+E.limit)},(0,n.__)("Next","formipay"))))))}const E=window.wp["icons/build/arrowLeft"];var b=e.n(E);const h=window.wp["icons/build/trash"];var w=e.n(h);const g=["on-hold","payment-confirm","in-progress","shipping","completed"],v={"on-hold":(0,n.__)("On Hold","formipay"),"payment-confirm":(0,n.__)("Payment Confirmed","formipay"),"in-progress":(0,n.__)("In Progress","formipay"),shipping:(0,n.__)("Shipping","formipay"),completed:(0,n.__)("Completed","formipay"),failed:(0,n.__)("Failed","formipay"),refunded:(0,n.__)("Refunded","formipay"),cancelled:(0,n.__)("Cancelled","formipay")};function k({orderId:e}){const[r,l]=(0,a.useState)([]);return(0,a.useEffect)(()=>{const e=[{status:"on-hold",date:(new Date).toISOString(),note:(0,n.__)("Order placed","formipay")}];l(e)},[e]),(0,t.createElement)("div",{className:"formipay-order-timeline"},(0,t.createElement)("h3",null,(0,n.__)("Order Timeline","formipay")),(0,t.createElement)("div",{className:"timeline-progress"},g.map((e,a)=>(0,t.createElement)("div",{key:e,className:`timeline-step ${0===a?"first":""} ${a===g.length-1?"last":""}`},(0,t.createElement)("div",{className:"timeline-dot"}),a(0,t.createElement)("li",{key:a},(0,t.createElement)("span",{className:"event-status"},v[e.status]||e.status),(0,t.createElement)("span",{className:"event-date"},new Date(e.date).toLocaleString()),e.note&&(0,t.createElement)("span",{className:"event-note"},e.note))))))}const N=window.wp["icons/build/bell"];var S=e.n(N);const C=window.wp["icons/build/message"];var D=e.n(C);function A(){const e=[{id:1,type:"email",recipient:"customer@example.com",subject:"Order Confirmation",status:"sent",date:(new Date).toISOString()}],a=e=>{switch(e){case"email":default:return S()();case"sms":case"whatsapp":return D()()}};return(0,t.createElement)("div",{className:"formipay-notification-log"},(0,t.createElement)("h3",null,(0,t.createElement)(l,{icon:S()(),size:18}),(0,n.__)("Notification Log","formipay")),0===e.length?(0,t.createElement)("p",{className:"no-logs"},(0,n.__)("No notifications sent yet","formipay")):(0,t.createElement)("ul",{className:"notification-list"},e.map(e=>(0,t.createElement)("li",{key:e.id,className:`notification-item ${e.status}`},(0,t.createElement)("div",{className:"notification-icon"},(0,t.createElement)(l,{icon:a(e.type),size:20})),(0,t.createElement)("div",{className:"notification-content"},(0,t.createElement)("div",{className:"notification-header"},(0,t.createElement)("span",{className:"notification-type"},e.type.toUpperCase()),(0,t.createElement)("span",{className:"notification-status"},e.status)),(0,t.createElement)("div",{className:"notification-details"},(0,t.createElement)("strong",null,e.subject||e.type),(0,t.createElement)("span",{className:"notification-recipient"},(0,n.__)("To:","formipay")," ",e.recipient)),(0,t.createElement)("div",{className:"notification-date"},new Date(e.date).toLocaleString()))))))}const I=[{value:"on-hold",label:(0,n.__)("On Hold","formipay")},{value:"payment-confirm",label:(0,n.__)("Payment Confirmed","formipay")},{value:"in-progress",label:(0,n.__)("In Progress","formipay")},{value:"shipping",label:(0,n.__)("Shipping","formipay")},{value:"completed",label:(0,n.__)("Completed","formipay")},{value:"failed",label:(0,n.__)("Failed","formipay")},{value:"refunded",label:(0,n.__)("Refunded","formipay")},{value:"cancelled",label:(0,n.__)("Cancelled","formipay")}];function x({orderId:e,onBack:o}){const[i,c]=(0,a.useState)(null),[s,d]=(0,a.useState)(!0),[p,u]=(0,a.useState)(!1),[y,f]=(0,a.useState)(""),_=(0,a.useCallback)(()=>{d(!0),(e=>m("formipay-get-order",{order_id:e}))(e).then(e=>{e.data&&(c(e.data),f(e.data.status))}).catch(e=>{console.error("Load order error:",e)}).finally(()=>{d(!1)})},[e]);return(0,a.useEffect)(()=>{_()},[_]),s?(0,t.createElement)("div",{className:"formipay-order-detail"},(0,t.createElement)("div",{className:"formipay-loading"},(0,t.createElement)("span",{className:"spinner is-active"}))):i?(0,t.createElement)("div",{className:"formipay-order-detail"},(0,t.createElement)("div",{className:"formipay-detail-header"},(0,t.createElement)(r.Button,{variant:"secondary",onClick:o},(0,t.createElement)(l,{icon:b()(),size:16}),(0,n.__)("Back","formipay")),(0,t.createElement)("h1",null,(0,n.__)("Order","formipay")," #",i.id),(0,t.createElement)("div",{className:"header-actions"},(0,t.createElement)(r.Button,{variant:"secondary",isDestructive:!0,onClick:()=>{var t;confirm((0,n.__)("Are you sure you want to delete this order?","formipay"))&&(t=[e],m("formipay-bulk-delete-order",{ids:t})).then(e=>{e.success&&o?.()}).catch(e=>{console.error("Delete order error:",e)})}},(0,t.createElement)(l,{icon:w()(),size:16}),(0,n.__)("Delete","formipay")))),(0,t.createElement)("div",{className:"formipay-detail-content"},(0,t.createElement)("div",{className:"formipay-detail-main"},(0,t.createElement)("div",{className:"formipay-detail-card"},(0,t.createElement)("h3",null,(0,n.__)("Order Details","formipay")),(0,t.createElement)("dl",{className:"detail-list"},(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Status","formipay")),(0,t.createElement)("dd",null,(0,t.createElement)(r.SelectControl,{value:y,options:I,onChange:f,disabled:p}),y!==i.status&&(0,t.createElement)(r.Button,{variant:"primary",size:"small",onClick:()=>{y&&y!==i.status&&(u(!0),((e,t)=>m("formipay-update-order-status",{order_id:e,status:t}))(e,y).then(e=>{(e.success||e.data?.valid)&&_()}).catch(e=>{console.error("Update status error:",e)}).finally(()=>{u(!1)}))},disabled:p,isBusy:p},p?(0,n.__)("Updating...","formipay"):(0,n.__)("Update Status","formipay")))),(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Date Created","formipay")),(0,t.createElement)("dd",null,(E=i.created_date)?new Date(E).toLocaleString():"-")),(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Form ID","formipay")),(0,t.createElement)("dd",null,i.form_id)),(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Payment Gateway","formipay")),(0,t.createElement)("dd",null,i.payment_gateway||"-")))),(0,t.createElement)("div",{className:"formipay-detail-card"},(0,t.createElement)("h3",null,(0,n.__)("Items","formipay")),(0,t.createElement)("table",{className:"items-table"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,n.__)("Item","formipay")),(0,t.createElement)("th",null,(0,n.__)("Qty","formipay")),(0,t.createElement)("th",null,(0,n.__)("Subtotal","formipay")))),(0,t.createElement)("tbody",null,i.items?.map((e,a)=>(0,t.createElement)("tr",{key:a},(0,t.createElement)("td",null,(0,t.createElement)("strong",null,e.item),e.description&&(0,t.createElement)("small",null,e.description)),(0,t.createElement)("td",null,e.qty||1),(0,t.createElement)("td",null,e.subtotal_formatted||e.subtotal)))||(0,t.createElement)("tr",null,(0,t.createElement)("td",{colSpan:"3",className:"text-center"},(0,n.__)("No items","formipay")))),(0,t.createElement)("tfoot",null,(0,t.createElement)("tr",null,(0,t.createElement)("td",{colSpan:"2"},(0,t.createElement)("strong",null,(0,n.__)("Total","formipay"))),(0,t.createElement)("td",null,(0,t.createElement)("strong",null,i.total_formatted||i.total))))))),(0,t.createElement)("div",{className:"formipay-detail-sidebar"},(0,t.createElement)("div",{className:"formipay-detail-card"},(0,t.createElement)("h3",null,(0,n.__)("Customer Information","formipay")),i.form_data?(0,t.createElement)("dl",{className:"customer-info"},Object.entries(i.form_data).map(([e,a])=>["payment","payment_gateway","coupon_code","qty"].includes(e)?null:(0,t.createElement)("div",{key:e},(0,t.createElement)("dt",null,e.replace(/_/g," ")),(0,t.createElement)("dd",null,a?.value||a||"-")))):(0,t.createElement)("p",{className:"no-data"},(0,n.__)("No customer data available","formipay"))),(0,t.createElement)(k,{orderId:e}),(0,t.createElement)(A,null)))):(0,t.createElement)("div",{className:"formipay-order-detail"},(0,t.createElement)("div",{className:"formipay-error"},(0,t.createElement)("p",null,(0,n.__)("Order not found","formipay")),(0,t.createElement)(r.Button,{variant:"secondary",onClick:o},(0,t.createElement)(l,{icon:b()(),size:16}),(0,n.__)("Back to Orders","formipay"))));var E}const P=window.Swal;function O({initialData:e=[],columns:l,filterOptions:o=null,statusCounts:i=null,searchable:c=!0,searchPlaceholder:s=(0,n.__)("Search...","formipay"),sortable:m=!0,defaultSort:d={id:"ID",desc:!0},selectable:p=!0,pagination:u=!0,pageSize:y=10,pageSizeOptions:f=[10,20,50,100],actions:_={addNew:!1,bulkDelete:!0,inline:!0},emptyMessage:E=(0,n.__)("No items found","formipay"),ajaxUrl:b,nonce:h,tableAction:w,deleteAction:g,duplicateAction:v}){const[k,N]=(0,a.useState)(e),[S,C]=(0,a.useState)(!0),[D,A]=(0,a.useState)(0),[I,x]=(0,a.useState)("all"),[O,T]=(0,a.useState)(""),[j,U]=(0,a.useState)(d.id||"ID"),[$,B]=(0,a.useState)(d.desc?"desc":"asc"),[L,F]=(0,a.useState)(1),[M,R]=(0,a.useState)(y),[z,J]=(0,a.useState)(new Set),[q,H]=(0,a.useState)(!1),[X,V]=(0,a.useState)(!1),[Z,G]=(0,a.useState)(""),K=w.replace("formipay-tabledata-",""),Q=_.bulkDelete?.action||`formipay-bulk-delete-${K}`,W=g||`formipay-delete-${K}`,Y=v||`formipay-duplicate-${K}`,ee=(0,a.useCallback)(async()=>{C(!0);const e=new URLSearchParams({action:w,_wpnonce:h,limit:M.toString(),offset:((L-1)*M).toString()});o&&"all"!==I&&e.append(o.key,I),O&&e.append("search",O),e.append("orderby",j),e.append("sort",$);try{const t=await fetch(`${b}?${e.toString()}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),a=await t.json(),n=a.data?.results||a.results||a.data||[];N(n),A(a.total||n.length)}catch(e){console.error("Load data error:",e)}finally{C(!1)}},[b,h,w,M,L,I,O,j,$,o]);return(0,a.useEffect)(()=>{ee()},[ee]),(0,a.useEffect)(()=>{const e=setTimeout(()=>{null!==O&&F(1)},500);return()=>clearTimeout(e)},[O]),(0,t.createElement)("div",{className:"formipay-data-table-wrapper"},(0,t.createElement)("div",{className:"formipay-table-toolbar"},_.addNew&&(0,t.createElement)(r.Button,{variant:"primary",onClick:()=>V(!0)},_.addNew.label||(0,n.__)("+ Add New","formipay")),_.bulkDelete&&p&&z.size>0&&(0,t.createElement)(r.Button,{variant:"secondary",isDestructive:!0,onClick:async()=>{0!==z.size&&(await P.fire({icon:"info",html:(0,n.__)("Do you want to delete the selected item(s)?","formipay"),showCancelButton:!0,confirmButtonText:(0,n.__)("Confirm","formipay"),cancelButtonText:(0,n.__)("Cancel","formipay")})).isConfirmed&&(await fetch(`${b}?action=${Q}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({ids:Array.from(z),_wpnonce:h})}),J(new Set),H(!1),ee(),P.fire({title:(0,n.__)("Done!","formipay"),html:(0,n.__)("Items deleted successfully.","formipay"),icon:"success"}))}},(0,n.__)("Delete Selected","formipay")," (",z.size,")"),c&&(0,t.createElement)(r.TextControl,{placeholder:s,value:O,onChange:T,className:"formipay-table-search"}),m&&(0,t.createElement)(r.SelectControl,{value:`${j}-${$}`,options:[{label:(0,n.__)("ID ↓","formipay"),value:"ID-desc"},{label:(0,n.__)("ID ↑","formipay"),value:"ID-asc"},{label:(0,n.__)("Date ↓","formipay"),value:"date-desc"},{label:(0,n.__)("Date ↑","formipay"),value:"date-asc"},{label:(0,n.__)("Title A-Z","formipay"),value:"title-asc"},{label:(0,n.__)("Title Z-A","formipay"),value:"title-desc"}],onChange:e=>{const[t,a]=e.split("-");U(t),B(a)}})),o&&(0,t.createElement)("div",{className:"formipay-filter-tabs"},o.options.map(e=>(0,t.createElement)("button",{key:e.value,className:"filter-tab "+(I===e.value?"active":""),onClick:()=>{return t=e.value,x(t),void F(1);var t}},e.label,i&&(0,t.createElement)("span",{className:"count"},i[e.value]||0)))),(0,t.createElement)("div",{className:"formipay-table-container"},S?(0,t.createElement)("div",{className:"formipay-table-loading"},(0,t.createElement)(r.Spinner,null)):0===k.length?(0,t.createElement)("div",{className:"formipay-table-empty"},E):(0,t.createElement)("table",{className:"formipay-table wp-list-table widefat fixed striped"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,p&&(0,t.createElement)("th",{className:"column-select"},(0,t.createElement)("input",{type:"checkbox",checked:q,onChange:()=>{J(q?new Set:new Set(k.map(e=>e.ID||e.id))),H(!q)}})),l.map(e=>(0,t.createElement)("th",{key:e.key,className:`column-${e.key}`},e.label)),_.inline&&(0,t.createElement)("th",{className:"column-actions"},(0,n.__)("Actions","formipay")))),(0,t.createElement)("tbody",null,k.map((e,a)=>{const r=e.ID||e.id;return(0,t.createElement)("tr",{key:a,className:"formipay-table-row"},p&&(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"checkbox",checked:z.has(r),onChange:()=>(e=>{const t=new Set(z);t.has(e)?t.delete(e):t.add(e),J(t),H(!1)})(r)})),l.map(a=>(0,t.createElement)("td",{key:a.key},a.render?a.render(e):e[a.key])),_.inline&&(0,t.createElement)("td",{className:"column-actions"},(0,t.createElement)("div",{className:"row-actions"},(0,t.createElement)("a",{href:`${window.formipayAdmin?.siteUrl||""}/wp-admin/post.php?post=${r}&action=edit`},(0,n.__)("Edit","formipay"))," | ",(0,t.createElement)("button",{className:"button-link delete",onClick:()=>(async e=>{(await P.fire({icon:"info",html:(0,n.__)("Do you want to delete this item?","formipay"),showCancelButton:!0,confirmButtonText:(0,n.__)("Delete Permanently","formipay"),cancelButtonText:(0,n.__)("Cancel","formipay")})).isConfirmed&&(await fetch(`${b}?action=${W}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id:e,_wpnonce:h})}),ee())})(r)},(0,n.__)("Delete","formipay"))," | ",(0,t.createElement)("button",{className:"button-link duplicate",onClick:()=>(async e=>{(await P.fire({icon:"info",html:(0,n.__)("Do you want to duplicate this item?","formipay"),showCancelButton:!0,confirmButtonText:(0,n.__)("Confirm","formipay"),cancelButtonText:(0,n.__)("Cancel","formipay")})).isConfirmed&&(await fetch(`${b}?action=${Y}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id:e,_wpnonce:h})}),ee())})(r)},(0,n.__)("Duplicate","formipay")))))})))),u&&D>M&&(0,t.createElement)("div",{className:"formipay-table-pagination"},(0,t.createElement)("div",{className:"pagination-info"},(0,n.__)("Showing","formipay")," ",(L-1)*M+1," - ",Math.min(L*M,D)," ",(0,n.__)("of","formipay")," ",D),(0,t.createElement)("div",{className:"pagination-controls"},(0,t.createElement)(r.Button,{variant:"secondary",disabled:1===L,onClick:()=>F(1)},"««"),(0,t.createElement)(r.Button,{variant:"secondary",disabled:1===L,onClick:()=>F(L-1)},"‹"),(0,t.createElement)("span",{className:"page-info"},(0,n.__)("Page","formipay")," ",L," ",(0,n.__)("of","formipay")," ",Math.ceil(D/M)),(0,t.createElement)(r.Button,{variant:"secondary",disabled:L>=Math.ceil(D/M),onClick:()=>F(L+1)},"›"),(0,t.createElement)(r.Button,{variant:"secondary",disabled:L>=Math.ceil(D/M),onClick:()=>F(Math.ceil(D/M))},"»"),(0,t.createElement)(r.SelectControl,{value:M.toString(),options:f.map(e=>({label:e.toString(),value:e.toString()})),onChange:e=>{R(parseInt(e)),F(1)}}))),_.addNew&&(0,t.createElement)(r.Modal,{title:_.addNew.label||(0,n.__)("Add New","formipay"),isOpen:X,onClose:()=>V(!1)},(0,t.createElement)(r.TextControl,{label:(0,n.__)("Title","formipay"),value:Z,onChange:G,autoFocus:!0}),(0,t.createElement)("div",{className:"formipay-modal-actions"},(0,t.createElement)(r.Button,{variant:"secondary",onClick:()=>V(!1)},(0,n.__)("Cancel","formipay")),(0,t.createElement)(r.Button,{variant:"primary",onClick:async()=>{if(!Z.trim())return void P.fire({html:(0,n.__)("Title is required.","formipay"),icon:"error"});const e=_.addNew.action,t=await fetch(`${b}?action=${e}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({title:Z,_wpnonce:h})}),a=await t.json();a.success?(V(!1),G(""),a.data.edit_post_url?window.location.href=a.data.edit_post_url:ee()):P.fire({html:a.data.message||(0,n.__)("Error creating item.","formipay"),icon:"error"})}},(0,n.__)("Create","formipay")))))}const T=window.wp["icons/build/minus"];var j=e.n(T);const U=window.wp["icons/build/eyeClosed"];var $=e.n(U);const B=window.wp["icons/build/eyeOpened"];var L=e.n(B);function F({productId:e,productDetails:r}){const[l,o]=(0,a.useState)([]),[i,c]=(0,a.useState)([]),[s,m]=(0,a.useState)(!0),d=(0,a.useRef)(null),p=(0,a.useRef)(null),u=(0,a.useRef)(null),y=(0,a.useCallback)(()=>String(r?.default_currency||"").split(":::")[0]||r?.default_currency_code||"USD",[r]),f=(0,a.useCallback)(e=>{const t=r?.global_currencies||[],a=String(e).split(":::")[0],n=t.find(e=>String(e.currency).split(":::")[0]===a);return parseInt(n?.decimal_digits,10)||2},[r]),_=(0,a.useCallback)(()=>{const e=r?.global_selected_currencies||{};let t=Object.keys(e);if(!t.length){const e=r?.default_currency||"";e&&(t=[e])}return t.map(e=>{const t=String(e).split(":::")[0];return{currency:e,regular_price:"",sale_price:"",currency_decimal_digits:f(t)}})},[r,f]),E=(0,a.useCallback)(e=>{const t={...e};void 0===t.expanded&&(t.expanded=!1);const a=_(),n=e=>String(e).split(":::")[0];if(Array.isArray(t.prices)){const e=new Set(a.map(e=>n(e.currency)));t.prices=t.prices.filter(t=>t&&e.has(n(t.currency))),a.forEach(e=>{const a=n(e.currency);t.prices.some(e=>n(e.currency)===a)||t.prices.push(JSON.parse(JSON.stringify(e)))})}else t.prices=JSON.parse(JSON.stringify(a));Array.isArray(t.prices)&&0!==t.prices.length||(t.prices=JSON.parse(JSON.stringify(a))),t.prices.forEach(e=>{const t=n(e.currency);e.currency_decimal_digits=f(t),void 0!==e.regular_price&&null!==e.regular_price||(e.regular_price=""),void 0!==e.sale_price&&null!==e.sale_price||(e.sale_price="")});const r=y();return t.prices.sort((e,t)=>n(e.currency)===r?-1:n(t.currency)===r?1:0),delete t.price,delete t.sale,t},[_,f,y]),b=(0,a.useCallback)(()=>new Promise(e=>{let t=0;const a=setInterval(()=>{const n=document.querySelector('input[name="product_variation_attributes"]');if(n&&n.value)try{const t=JSON.parse(n.value);clearInterval(a),e(Array.isArray(t)?t:[])}catch(t){clearInterval(a),e([])}else++t>=100&&(clearInterval(a),e([]))},50)}),[]),h=(0,a.useCallback)(e=>{const t=e.map(e=>(e.attribute_variations||[]).map(e=>({label:e.variation_label}))).filter(e=>e.length>0);return t.length?t.reduce((e,t)=>e.flatMap(e=>t.map(t=>[].concat(e,t)))).map(e=>{const t=Array.isArray(e)?e.map(e=>e.label):[e.label];return{key:t.join("||"),label:t.join(" - ")}}):[]},[]),w=(0,a.useCallback)(async()=>{try{const e=await b();if(!e.length)return o([]),void g([]);const t=h(e).filter(e=>!i.includes(e.key)).map(e=>{const t=l.find(t=>t.key===e.key);return t?Object.assign(E(t),{name:e.label}):E({key:e.key,name:e.label,stock:"",weight:0,active:!0})});o(t),g(t)}catch(e){console.warn("Attributes not available; initializing empty variations."),o([]),g([])}},[b,h,i,l,E]),g=(0,a.useCallback)(e=>{d.current&&(d.current.value=JSON.stringify(e||[]))},[]),v=(0,a.useCallback)(async()=>{if(e)try{const t=new FormData;t.append("action","get_product_variables"),t.append("post_id",e),t.append("_wpnonce",window.formipayAdmin?.nonce||"");const a=await fetch(window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",{method:"POST",credentials:"same-origin",body:t}),n=await a.json();if(n.success&&Array.isArray(n.data)&&n.data.length){const e=n.data.map(e=>E(e));o(e),c([]),g(e)}else await w()}catch{await w()}else await w()},[e,E,w,g]),k=(0,a.useCallback)(()=>{const e=()=>{setTimeout(()=>{w()},200)},t=document.querySelector('input[name="product_variation_attributes"]');if(t){t.addEventListener("input",e),t.addEventListener("change",e);const a=new MutationObserver(e);a.observe(t,{attributes:!0,attributeFilter:["value"]}),u.current=a,p.current=setInterval(()=>{const t=document.querySelector('input[name="product_variation_attributes"]');t&&t.value!==d.current?.value&&e()},300)}return()=>{u.current&&u.current.disconnect(),p.current&&clearInterval(p.current)}},[w]);(0,a.useEffect)(()=>{const e=r?.multicurrency,t=r?.global_selected_currencies||{},a=Object.keys(t).length;return m(!e||a<=1),v(),k()},[r,v,k]);const N=(0,a.useCallback)((e,t,a,n)=>{const r=[...l];r[e].prices[t][a]=n,o(r),g(r)},[l,g]),S=(0,a.useCallback)(e=>{const t=[...l];t[e].expanded=!t[e].expanded,o(t)},[l]),C=(0,a.useCallback)((e,t,a)=>{const n=[...l];n[e][t]=a,o(n),g(n)},[l,g]),D=(0,a.useCallback)(e=>{const t=l[e],a=[...i,t.key];c(a);const n=l.filter((t,a)=>a!==e);o(n),g(n)},[l,i,g]),A=(0,a.useCallback)(()=>{const e=y();for(const t of l){const a=t.prices?.find(t=>String(t.currency).split(":::")[0]===e);if(!a||!a.regular_price)return{currencyCode:e,rowLabel:t.name}}return null},[l,y]);return(0,a.useEffect)(()=>{const e=document.getElementById("post");if(!e)return;const t=e=>{const t=A();if(t){e.preventDefault(),e.stopImmediatePropagation();const a=(r?.variation_table?.error_missing_default_price||'Please fill Regular Price for default currency (%1$s) in variation "%2$s".').replace("%1$s",t.currencyCode).replace("%2$s",t.rowLabel);return alert(a),!1}};return e.addEventListener("submit",t,!0),()=>e.removeEventListener("submit",t,!0)},[A,r]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{ref:d,type:"hidden",name:"product_variation_variables",value:JSON.stringify(l)}),(0,t.createElement)("table",{className:"formipay-variation-table",id:"product-variables-table"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,n.__)("Variation","formipay")),s?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("th",null,(0,n.__)("Price","formipay")),(0,t.createElement)("th",null,(0,n.__)("Sale Price","formipay"))):null,(0,t.createElement)("th",null,(0,n.__)("Stock","formipay")),(0,t.createElement)("th",null,(0,n.__)("Weight","formipay")),(0,t.createElement)("th",null,(0,n.__)("Actions","formipay")))),(0,t.createElement)("tbody",null,l.map((e,a)=>(0,t.createElement)(M,{key:e.key,row:e,rowIndex:a,showFlatPricing:s,defaultCurrencyCode:y(),onToggleExpanded:()=>S(a),onUpdatePrice:(e,t,n)=>N(a,e,t,n),onUpdateField:(e,t)=>C(a,e,t),onDelete:()=>D(a)})))))}function M({row:e,rowIndex:a,showFlatPricing:o,defaultCurrencyCode:i,onToggleExpanded:c,onUpdatePrice:s,onUpdateField:m,onDelete:d}){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("tr",{className:"variation-row"},(0,t.createElement)("td",{className:"variation-name"},(0,t.createElement)("button",{type:"button",className:"toggle-expand",onClick:c},(0,t.createElement)(l,{icon:e.expanded?L():$(),size:16})),(0,t.createElement)("strong",null,e.name)),o?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(R,{price:e.prices[0],field:"regular_price",onChange:(e,t)=>s(0,e,t)}),(0,t.createElement)(R,{price:e.prices[0],field:"sale_price",onChange:(e,t)=>s(0,e,t)})):null,(0,t.createElement)("td",{className:"variation-stock"},(0,t.createElement)(r.TextControl,{type:"number",value:e.stock,onChange:e=>m("stock",e),placeholder:"Unlimited"})),(0,t.createElement)("td",{className:"variation-weight"},(0,t.createElement)(r.TextControl,{type:"number",value:e.weight,onChange:e=>m("weight",e),step:"0.01"})),(0,t.createElement)("td",{className:"variation-actions"},(0,t.createElement)(r.Button,{variant:"secondary",size:"small",isDestructive:!0,onClick:d,icon:j()()},(0,n.__)("Delete","formipay")))),!o&&e.expanded&&(0,t.createElement)("tr",{className:"variation-details-row"},(0,t.createElement)("td",{colSpan:"5"},(0,t.createElement)("table",{className:"inner-table"},(0,t.createElement)("tbody",null,e.prices.map((e,a)=>{const n=String(e.currency).split(":::")[0]===i,r=e.currency_decimal_digits?1/Math.pow(10,e.currency_decimal_digits):.01;return(0,t.createElement)("tr",{key:a},(0,t.createElement)("td",{className:"currency-name"},e.currency,n&&(0,t.createElement)("span",{className:"required"},"*")),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"number",value:e.regular_price,onChange:e=>s(a,"regular_price",e.target.value),step:r,placeholder:"Regular Price",required:n})),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"number",value:e.sale_price,onChange:e=>s(a,"sale_price",e.target.value),step:r,placeholder:"Sale Price"})))}))))))}function R({price:e,field:a,onChange:n}){const r=e.currency_decimal_digits?1/Math.pow(10,e.currency_decimal_digits):.01;return(0,t.createElement)("td",{className:"price-cell"},(0,t.createElement)("input",{type:"number",value:e[a],onChange:e=>n(a,e.target.value),step:r,placeholder:"Auto"}))}const z=window.Swal,J={orders:function({initialData:e}){const[n,r]=(0,a.useState)(null);return n?(0,t.createElement)(x,{orderId:n,onBack:()=>r(null)}):(0,t.createElement)(_,{onSelectOrder:e=>r(e)})},customers:function(){const e=[{key:"id",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.id)},{key:"name",label:(0,n.__)("Name","formipay"),render:e=>e.name||e.full_name||"-"},{key:"email",label:(0,n.__)("Email","formipay")},{key:"phone",label:(0,n.__)("Phone","formipay"),render:e=>e.phone||e.whatsapp||"-"},{key:"total_order",label:(0,n.__)("Total Orders","formipay"),render:e=>e.total_order||e.total_orders||0},{key:"created_date",label:(0,n.__)("Date","formipay"),render:e=>{const t=e.created_date||e.date;return t?new Date(t).toLocaleDateString():"-"}}];return(0,t.createElement)("div",{className:"formipay-page-customers"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Customers","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-customers",selectable:!1,inline:!1,emptyMessage:(0,n.__)("No customers found","formipay")}))},products:function(){const[e,r]=(0,a.useState)(!1),[l,o]=(0,a.useState)(null);if(e&&l)return(0,t.createElement)("div",{className:"formipay-page-products"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("button",{type:"button",className:"button button-secondary",onClick:()=>r(!1)},"← ",(0,n.__)("Back to Products","formipay")),(0,t.createElement)("h1",null,(0,n.__)("Edit Product","formipay"))),(0,t.createElement)("div",{className:"formipay-product-editor"},(0,t.createElement)(F,{productId:l,productDetails:{}})));const i=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"title",label:(0,n.__)("Title","formipay"),render:e=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("strong",null,(0,t.createElement)("button",{className:"button-link",onClick:()=>{o(e.ID),r(!0)}},e.post_title||e.title||(0,n.__)("Untitled","formipay"))),(0,t.createElement)("br",null),(0,t.createElement)("span",{className:"row-actions",style:{display:"none",visibility:"hidden"}},(0,t.createElement)("button",{className:"button-link",onClick:()=>{o(e.ID),r(!0)}},(0,n.__)("Edit Variations","formipay"))," | ",(0,t.createElement)("button",{className:"button-link delete","data-id":e.ID},(0,n.__)("Delete","formipay"))," | ",(0,t.createElement)("button",{className:"button-link duplicate","data-id":e.ID},(0,n.__)("Duplicate","formipay"))))},{key:"price",label:(0,n.__)("Price","formipay"),render:e=>{const a=e.prices||e.price;return"object"==typeof a&&null!==a?Object.entries(a).map(([e,a])=>(0,t.createElement)("div",{key:e},e,": ",a)):a||"-"}},{key:"type",label:(0,n.__)("Type","formipay"),render:e=>"physical"===(e.product_type||e.type||"digital")?(0,n.__)("Physical","formipay"):(0,n.__)("Digital","formipay")},{key:"stock",label:(0,n.__)("Stock","formipay"),render:e=>{const t=e.stock;return null===t||""===t?(0,n.__)("Unlimited","formipay"):t}},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r={publish:(0,n.__)("Published","formipay"),draft:(0,n.__)("Draft","formipay")};return(0,t.createElement)("span",{className:`status-label ${a}`},r[a]||a)}}];return(0,t.createElement)("div",{className:"formipay-page-products"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Products","formipay"))),(0,t.createElement)(O,{columns:i,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-products",deleteAction:"formipay-delete-product",duplicateAction:"formipay-duplicate-product",filterOptions:{key:"post_status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"publish",label:(0,n.__)("Published","formipay")},{value:"draft",label:(0,n.__)("Draft","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Product","formipay"),action:"formipay-create-product-post"},bulkDelete:{action:"formipay-bulk-delete-product"},inline:!0},emptyMessage:(0,n.__)("No products found","formipay")}))},forms:function(){const e=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"title",label:(0,n.__)("Title","formipay"),render:e=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("strong",null,e.title),(0,t.createElement)("br",null),(0,t.createElement)("span",{className:"row-actions",style:{display:"none",visibility:"hidden"}},(0,t.createElement)("a",{href:`${window.formipayAdmin?.siteUrl||""}/wp-admin/post.php?post=${e.ID}&action=edit`},(0,n.__)("Edit","formipay"))," | ",(0,t.createElement)("button",{className:"button-link delete","data-id":e.ID},(0,n.__)("Delete","formipay"))," | ",(0,t.createElement)("button",{className:"button-link duplicate","data-id":e.ID},(0,n.__)("Duplicate","formipay"))))},{key:"date",label:(0,n.__)("Date","formipay"),render:e=>{const a=new Date(e.date);return(0,t.createElement)("span",{style:{whiteSpace:"nowrap"}},a.toLocaleDateString(),(0,t.createElement)("br",null),(0,t.createElement)("span",{style:{fontSize:"smaller",color:"#646970"}},a.toLocaleTimeString()))}},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r={publish:(0,n.__)("Published","formipay"),draft:(0,n.__)("Draft","formipay"),pending:(0,n.__)("Pending","formipay")};return(0,t.createElement)("span",{className:`status-label ${a}`},r[a]||a)}},{key:"shortcode",label:(0,n.__)("Shortcode","formipay"),render:e=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{className:"formipay-form-shortcode",value:`[formipay form=${e.ID}]`,disabled:!0}),(0,t.createElement)("button",{className:"copy-shortcode","data-copy":`[formipay form=${e.ID}]`,onClick:e=>{const t=e.currentTarget.dataset.copy;navigator.clipboard.writeText(t).then(()=>{const t=e.currentTarget.innerHTML;e.currentTarget.innerHTML="✓ Copied",setTimeout(()=>{e.currentTarget.innerHTML=t},2e3),z.fire({icon:"success",title:(0,n.__)("Shortcode copied!","formipay"),toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0})})}},"📋 ",(0,n.__)("Copy","formipay")))}];return(0,t.createElement)("div",{className:"formipay-page-forms"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Forms","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-forms",deleteAction:"formipay-delete-form",duplicateAction:"formipay-duplicate-form",filterOptions:{key:"post_status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"publish",label:(0,n.__)("Published","formipay")},{value:"draft",label:(0,n.__)("Draft","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Form","formipay"),action:"formipay-create-form-post"},bulkDelete:{action:"formipay-bulk-delete-form"},inline:!0},emptyMessage:(0,n.__)("No forms found","formipay")}))},coupons:function(){const e=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"code",label:(0,n.__)("Coupon Code","formipay"),render:e=>(0,t.createElement)("strong",null,e.code||e.post_title)},{key:"type",label:(0,n.__)("Type","formipay"),render:e=>"percentage"===(e.coupon_type||e.type||"percentage")?(0,n.__)("%","formipay"):(0,n.__)("Fixed","formipay")},{key:"amount",label:(0,n.__)("Amount","formipay"),render:e=>e.amount||"-"},{key:"usages",label:(0,n.__)("Usages","formipay"),render:e=>e.usage_count||e.usages||0},{key:"date_limit",label:(0,n.__)("Date Limit","formipay"),render:e=>{const t=e.date_limit;return t&&"none"!==t?new Date(t).toLocaleDateString():(0,n.__)("Unlimited","formipay")}},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r="on"===e.active||"publish"===a;return(0,t.createElement)("span",{className:"status-label "+(r?"publish":"draft")},r?(0,n.__)("Active","formipay"):(0,n.__)("Inactive","formipay"))}}];return(0,t.createElement)("div",{className:"formipay-page-coupons"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Coupons","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-coupons",deleteAction:"formipay-delete-coupon",duplicateAction:"formipay-duplicate-coupon",filterOptions:{key:"status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"active",label:(0,n.__)("Active","formipay")},{value:"inactive",label:(0,n.__)("Inactive","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Coupon","formipay"),action:"formipay-create-coupon-post"},bulkDelete:{action:"formipay-bulk-delete-coupon"},inline:!0},emptyMessage:(0,n.__)("No coupons found","formipay")}))},access:function(){const e=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"title",label:(0,n.__)("Title","formipay")},{key:"product_name",label:(0,n.__)("Product","formipay")},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r={publish:(0,n.__)("Published","formipay"),draft:(0,n.__)("Draft","formipay")}[a]||a;return(0,t.createElement)("span",{className:`status-label ${a}`},r)}},{key:"date",label:(0,n.__)("Date","formipay"),render:e=>{const t=e.post_date||e.date;return t?new Date(t).toLocaleDateString():"-"}}];return(0,t.createElement)("div",{className:"formipay-page-access"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Access Items","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-access-items",deleteAction:"formipay-delete-access-item",duplicateAction:"formipay-duplicate-access-item",filterOptions:{key:"post_status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"publish",label:(0,n.__)("Published","formipay")},{value:"draft",label:(0,n.__)("Draft","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Item","formipay"),action:"formipay-create-access-item-post"},bulkDelete:{action:"formipay-bulk-delete-access-item"},inline:!0},emptyMessage:(0,n.__)("No access items found","formipay")}))},licenses:function(){const e=[{key:"id",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.id)},{key:"license_key",label:(0,n.__)("License Key","formipay"),render:e=>(0,t.createElement)("code",null,e.license_key||"-")},{key:"product",label:(0,n.__)("Product","formipay"),render:e=>e.product_name||e.product||"-"},{key:"order",label:(0,n.__)("Order","formipay"),render:e=>e.order_id||`#${e.order}`||"-"},{key:"email",label:(0,n.__)("Email","formipay")},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.status||"unknown",r={active:(0,n.__)("Active","formipay"),inactive:(0,n.__)("Inactive","formipay"),expired:(0,n.__)("Expired","formipay")},l="active"===a?"publish":"expired"===a?"pending":"draft";return(0,t.createElement)("span",{className:`status-label ${l}`},r[a]||a)}}];return(0,t.createElement)("div",{className:"formipay-page-licenses"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Licenses","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-licenses",selectable:!1,inline:!1,emptyMessage:(0,n.__)("No licenses found","formipay")}))}};function q({page:e,initialData:n}){(0,a.useEffect)(()=>{console.log("[Formipay App] Rendering page:",e,"with data:",n)},[e,n]);const r=J[e];return r?(0,t.createElement)("div",{className:"formipay-admin-wrap"},(0,t.createElement)(r,{initialData:n})):(0,t.createElement)("div",{className:"formipay-error"},(0,t.createElement)("p",null,"Unknown page: ",e))}const H=()=>{const e=document.querySelectorAll("[data-formipay-mount]");console.log("[Formipay] Mount points found:",e.length),console.log("[Formipay] formipayAdmin data:",window.formipayAdmin),e.forEach(e=>{const n=e.dataset.formipayMount,r=window.formipayAdmin?.[n]||{};console.log("[Formipay] Mounting page:",n,"with data:",r);try{(0,a.render)((0,t.createElement)(q,{page:n,initialData:r}),e),console.log("[Formipay] Successfully mounted:",n)}catch(e){console.error("[Formipay] Failed to mount:",n,e)}})};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",H):H()})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,a=window.wp.element,n=window.wp.i18n,r=window.wp.components,l=(0,a.forwardRef)(function({icon:e,size:t=24,...n},r){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:r})}),o=window.wp["icons/build/list"];var i=e.n(o);const c=window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",s=window.formipayAdmin?.nonce||"";async function m(e,t={}){const a=new FormData;a.append("action",e),a.append("_wpnonce",s),Object.keys(t).forEach(e=>{"object"==typeof t[e]?a.append(e,JSON.stringify(t[e])):a.append(e,t[e])}),console.log(`[AJAX] Sending request: ${e}`,{nonce:s,data:t});try{const t=await fetch(c,{method:"POST",credentials:"same-origin",body:a});console.log(`[AJAX] Response status: ${e}`,t.status);const n=await t.json();if(console.log(`[AJAX] Response data: ${e}`,n),!t.ok||!1===n.success){const e=n.data?.message||n.message||"Request failed";throw new Error(e)}return n}catch(t){throw console.error(`AJAX error [${e}]:`,t),t}}window.formipayAdmin;const d=window.wp["icons/build/visible"];var p=e.n(d);const u={"on-hold":"#f0ad4e","payment-confirm":"#17a2b8","in-progress":"#17a2b8",shipping:"#6c757d",completed:"#28a745",failed:"#dc3545",refunded:"#6c757d",cancelled:"#dc3545"},f={"on-hold":(0,n.__)("On Hold","formipay"),"payment-confirm":(0,n.__)("Payment Confirmed","formipay"),"in-progress":(0,n.__)("In Progress","formipay"),shipping:(0,n.__)("Shipping","formipay"),completed:(0,n.__)("Completed","formipay"),failed:(0,n.__)("Failed","formipay"),refunded:(0,n.__)("Refunded","formipay"),cancelled:(0,n.__)("Cancelled","formipay")};function y({order:e,onSelect:a}){const r=u[e.status]||"#6c757d",o=f[e.status]||e.status,i=(e=>{if(e.form_data){const t=Object.values(e.form_data).find(e=>e.name&&e.name.includes("name"));return t?.value||"-"}return"-"})(e);return(0,t.createElement)("tr",{className:"formipay-order-item"},(0,t.createElement)("td",null,(0,t.createElement)("strong",null,"#",e.id)),(0,t.createElement)("td",null,(c=e.created_date)?new Date(c).toLocaleDateString():"-"),(0,t.createElement)("td",null,"-"!==i?i:(0,t.createElement)("em",null,"Unknown")),(0,t.createElement)("td",null,(0,t.createElement)("strong",null,e.total_formatted||e.total)),(0,t.createElement)("td",null,(0,t.createElement)("span",{className:"status-badge",style:{backgroundColor:r}},o)),(0,t.createElement)("td",null,(0,t.createElement)("button",{type:"button",className:"button button-small",onClick:a},(0,t.createElement)(l,{icon:p()(),size:16}),(0,n.__)("View","formipay"))));var c}function _({onSelectOrder:e}){const[o,c]=(0,a.useState)([]),[s,d]=(0,a.useState)(!0),[p,u]=(0,a.useState)(0),[f,_]=(0,a.useState)({keyword:"",status:"",date_from:"",date_to:""}),[E,b]=(0,a.useState)({limit:20,offset:0}),g=(0,a.useCallback)(()=>{d(!0),((e={})=>m("formipay-tabledata-orders",e))({keyword:f.keyword,status:f.status,date_from:f.date_from,date_to:f.date_to,limit:E.limit,offset:E.offset}).then(e=>{e.data&&(c(e.data.results||[]),u(e.data.total||0))}).catch(e=>{console.error("Load orders error:",e)}).finally(()=>{d(!1)})},[f,E]);(0,a.useEffect)(()=>{g()},[g]);const h=(e,t)=>{_({...f,[e]:t}),b({...E,offset:0})},w=e=>{b({...E,offset:e})},v={"":(0,n.__)("All Statuses","formipay"),"on-hold":(0,n.__)("On Hold","formipay"),"payment-confirm":(0,n.__)("Payment Confirmed","formipay"),"in-progress":(0,n.__)("In Progress","formipay"),shipping:(0,n.__)("Shipping","formipay"),completed:(0,n.__)("Completed","formipay"),failed:(0,n.__)("Failed","formipay"),refunded:(0,n.__)("Refunded","formipay"),cancelled:(0,n.__)("Cancelled","formipay")},k=Math.ceil(p/E.limit),N=Math.floor(E.offset/E.limit)+1;return(0,t.createElement)("div",{className:"formipay-order-list"},(0,t.createElement)("div",{className:"formipay-orders-header"},(0,t.createElement)("h2",null,(0,t.createElement)(l,{icon:i()()}),(0,n.__)("Orders","formipay")),(0,t.createElement)("span",{className:"order-count"},p," ",(0,n.__)("orders","formipay"))),(0,t.createElement)("div",{className:"formipay-orders-filters"},(0,t.createElement)(r.SearchControl,{value:f.keyword,onChange:e=>{h("keyword",e)},placeholder:(0,n.__)("Search by order ID, customer name, email...","formipay")}),(0,t.createElement)(r.SelectControl,{value:f.status,options:Object.entries(v).map(([e,t])=>({value:e,label:t})),onChange:e=>h("status",e),label:(0,n.__)("Status","formipay")}),(0,t.createElement)("input",{type:"date",value:f.date_from,onChange:e=>h("date_from",e.target.value),className:"formipay-date-input"}),(0,t.createElement)("input",{type:"date",value:f.date_to,onChange:e=>h("date_to",e.target.value),className:"formipay-date-input"}),(f.keyword||f.status||f.date_from||f.date_to)&&(0,t.createElement)(r.Button,{variant:"secondary",onClick:()=>{_({keyword:"",status:"",date_from:"",date_to:""}),b({limit:20,offset:0})}},(0,n.__)("Clear Filters","formipay"))),(0,t.createElement)("div",{className:"formipay-orders-table-wrapper"},s?(0,t.createElement)("div",{className:"formipay-loading"},(0,t.createElement)("span",{className:"spinner is-active"})):0===o.length?(0,t.createElement)("div",{className:"formipay-no-results"},(0,t.createElement)("p",null,(0,n.__)("No orders found","formipay"))):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("table",{className:"formipay-orders-table wp-list-table widefat fixed striped"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,n.__)("ID","formipay")),(0,t.createElement)("th",null,(0,n.__)("Date","formipay")),(0,t.createElement)("th",null,(0,n.__)("Customer","formipay")),(0,t.createElement)("th",null,(0,n.__)("Total","formipay")),(0,t.createElement)("th",null,(0,n.__)("Status","formipay")),(0,t.createElement)("th",null,(0,n.__)("Actions","formipay")))),(0,t.createElement)("tbody",null,o.map(a=>(0,t.createElement)(y,{key:a.id,order:a,onSelect:()=>e?.(a.id)})))),k>1&&(0,t.createElement)("div",{className:"formipay-pagination"},(0,t.createElement)(r.Button,{variant:"secondary",disabled:1===N,onClick:()=>w(E.offset-E.limit)},(0,n.__)("Previous","formipay")),(0,t.createElement)("span",{className:"pagination-info"},(0,n.__)("Page","formipay")," ",N," ",(0,n.__)("of","formipay")," ",k),(0,t.createElement)(r.Button,{variant:"secondary",disabled:N===k,onClick:()=>w(E.offset+E.limit)},(0,n.__)("Next","formipay"))))))}const E=window.wp["icons/build/arrowLeft"];var b=e.n(E);const g=window.wp["icons/build/trash"];var h=e.n(g);const w=["on-hold","payment-confirm","in-progress","shipping","completed"],v={"on-hold":(0,n.__)("On Hold","formipay"),"payment-confirm":(0,n.__)("Payment Confirmed","formipay"),"in-progress":(0,n.__)("In Progress","formipay"),shipping:(0,n.__)("Shipping","formipay"),completed:(0,n.__)("Completed","formipay"),failed:(0,n.__)("Failed","formipay"),refunded:(0,n.__)("Refunded","formipay"),cancelled:(0,n.__)("Cancelled","formipay")};function k({orderId:e}){const[r,l]=(0,a.useState)([]);return(0,a.useEffect)(()=>{const e=[{status:"on-hold",date:(new Date).toISOString(),note:(0,n.__)("Order placed","formipay")}];l(e)},[e]),(0,t.createElement)("div",{className:"formipay-order-timeline"},(0,t.createElement)("h3",null,(0,n.__)("Order Timeline","formipay")),(0,t.createElement)("div",{className:"timeline-progress"},w.map((e,a)=>(0,t.createElement)("div",{key:e,className:`timeline-step ${0===a?"first":""} ${a===w.length-1?"last":""}`},(0,t.createElement)("div",{className:"timeline-dot"}),a(0,t.createElement)("li",{key:a},(0,t.createElement)("span",{className:"event-status"},v[e.status]||e.status),(0,t.createElement)("span",{className:"event-date"},new Date(e.date).toLocaleString()),e.note&&(0,t.createElement)("span",{className:"event-note"},e.note))))))}const N=window.wp["icons/build/bell"];var S=e.n(N);const C=window.wp["icons/build/message"];var D=e.n(C);function A(){const e=[{id:1,type:"email",recipient:"customer@example.com",subject:"Order Confirmation",status:"sent",date:(new Date).toISOString()}],a=e=>{switch(e){case"email":default:return S()();case"sms":case"whatsapp":return D()()}};return(0,t.createElement)("div",{className:"formipay-notification-log"},(0,t.createElement)("h3",null,(0,t.createElement)(l,{icon:S()(),size:18}),(0,n.__)("Notification Log","formipay")),0===e.length?(0,t.createElement)("p",{className:"no-logs"},(0,n.__)("No notifications sent yet","formipay")):(0,t.createElement)("ul",{className:"notification-list"},e.map(e=>(0,t.createElement)("li",{key:e.id,className:`notification-item ${e.status}`},(0,t.createElement)("div",{className:"notification-icon"},(0,t.createElement)(l,{icon:a(e.type),size:20})),(0,t.createElement)("div",{className:"notification-content"},(0,t.createElement)("div",{className:"notification-header"},(0,t.createElement)("span",{className:"notification-type"},e.type.toUpperCase()),(0,t.createElement)("span",{className:"notification-status"},e.status)),(0,t.createElement)("div",{className:"notification-details"},(0,t.createElement)("strong",null,e.subject||e.type),(0,t.createElement)("span",{className:"notification-recipient"},(0,n.__)("To:","formipay")," ",e.recipient)),(0,t.createElement)("div",{className:"notification-date"},new Date(e.date).toLocaleString()))))))}const I=[{value:"on-hold",label:(0,n.__)("On Hold","formipay")},{value:"payment-confirm",label:(0,n.__)("Payment Confirmed","formipay")},{value:"in-progress",label:(0,n.__)("In Progress","formipay")},{value:"shipping",label:(0,n.__)("Shipping","formipay")},{value:"completed",label:(0,n.__)("Completed","formipay")},{value:"failed",label:(0,n.__)("Failed","formipay")},{value:"refunded",label:(0,n.__)("Refunded","formipay")},{value:"cancelled",label:(0,n.__)("Cancelled","formipay")}];function x({orderId:e,onBack:o}){const[i,c]=(0,a.useState)(null),[s,d]=(0,a.useState)(!0),[p,u]=(0,a.useState)(!1),[f,y]=(0,a.useState)(""),_=(0,a.useCallback)(()=>{d(!0),(e=>m("formipay-get-order",{order_id:e}))(e).then(e=>{e.data&&(c(e.data),y(e.data.status))}).catch(e=>{console.error("Load order error:",e)}).finally(()=>{d(!1)})},[e]);return(0,a.useEffect)(()=>{_()},[_]),s?(0,t.createElement)("div",{className:"formipay-order-detail"},(0,t.createElement)("div",{className:"formipay-loading"},(0,t.createElement)("span",{className:"spinner is-active"}))):i?(0,t.createElement)("div",{className:"formipay-order-detail"},(0,t.createElement)("div",{className:"formipay-detail-header"},(0,t.createElement)(r.Button,{variant:"secondary",onClick:o},(0,t.createElement)(l,{icon:b()(),size:16}),(0,n.__)("Back","formipay")),(0,t.createElement)("h1",null,(0,n.__)("Order","formipay")," #",i.id),(0,t.createElement)("div",{className:"header-actions"},(0,t.createElement)(r.Button,{variant:"secondary",isDestructive:!0,onClick:()=>{var t;confirm((0,n.__)("Are you sure you want to delete this order?","formipay"))&&(t=[e],m("formipay-bulk-delete-order",{ids:t})).then(e=>{e.success&&o?.()}).catch(e=>{console.error("Delete order error:",e)})}},(0,t.createElement)(l,{icon:h()(),size:16}),(0,n.__)("Delete","formipay")))),(0,t.createElement)("div",{className:"formipay-detail-content"},(0,t.createElement)("div",{className:"formipay-detail-main"},(0,t.createElement)("div",{className:"formipay-detail-card"},(0,t.createElement)("h3",null,(0,n.__)("Order Details","formipay")),(0,t.createElement)("dl",{className:"detail-list"},(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Status","formipay")),(0,t.createElement)("dd",null,(0,t.createElement)(r.SelectControl,{value:f,options:I,onChange:y,disabled:p}),f!==i.status&&(0,t.createElement)(r.Button,{variant:"primary",size:"small",onClick:()=>{f&&f!==i.status&&(u(!0),((e,t)=>m("formipay-update-order-status",{order_id:e,status:t}))(e,f).then(e=>{(e.success||e.data?.valid)&&_()}).catch(e=>{console.error("Update status error:",e)}).finally(()=>{u(!1)}))},disabled:p,isBusy:p},p?(0,n.__)("Updating...","formipay"):(0,n.__)("Update Status","formipay")))),(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Date Created","formipay")),(0,t.createElement)("dd",null,(E=i.created_date)?new Date(E).toLocaleString():"-")),(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Form ID","formipay")),(0,t.createElement)("dd",null,i.form_id)),(0,t.createElement)("div",null,(0,t.createElement)("dt",null,(0,n.__)("Payment Gateway","formipay")),(0,t.createElement)("dd",null,i.payment_gateway||"-")))),(0,t.createElement)("div",{className:"formipay-detail-card"},(0,t.createElement)("h3",null,(0,n.__)("Items","formipay")),(0,t.createElement)("table",{className:"items-table"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,n.__)("Item","formipay")),(0,t.createElement)("th",null,(0,n.__)("Qty","formipay")),(0,t.createElement)("th",null,(0,n.__)("Subtotal","formipay")))),(0,t.createElement)("tbody",null,i.items?.map((e,a)=>(0,t.createElement)("tr",{key:a},(0,t.createElement)("td",null,(0,t.createElement)("strong",null,e.item),e.description&&(0,t.createElement)("small",null,e.description)),(0,t.createElement)("td",null,e.qty||1),(0,t.createElement)("td",null,e.subtotal_formatted||e.subtotal)))||(0,t.createElement)("tr",null,(0,t.createElement)("td",{colSpan:"3",className:"text-center"},(0,n.__)("No items","formipay")))),(0,t.createElement)("tfoot",null,(0,t.createElement)("tr",null,(0,t.createElement)("td",{colSpan:"2"},(0,t.createElement)("strong",null,(0,n.__)("Total","formipay"))),(0,t.createElement)("td",null,(0,t.createElement)("strong",null,i.total_formatted||i.total))))))),(0,t.createElement)("div",{className:"formipay-detail-sidebar"},(0,t.createElement)("div",{className:"formipay-detail-card"},(0,t.createElement)("h3",null,(0,n.__)("Customer Information","formipay")),i.form_data?(0,t.createElement)("dl",{className:"customer-info"},Object.entries(i.form_data).map(([e,a])=>["payment","payment_gateway","coupon_code","qty"].includes(e)?null:(0,t.createElement)("div",{key:e},(0,t.createElement)("dt",null,e.replace(/_/g," ")),(0,t.createElement)("dd",null,a?.value||a||"-")))):(0,t.createElement)("p",{className:"no-data"},(0,n.__)("No customer data available","formipay"))),(0,t.createElement)(k,{orderId:e}),(0,t.createElement)(A,null)))):(0,t.createElement)("div",{className:"formipay-order-detail"},(0,t.createElement)("div",{className:"formipay-error"},(0,t.createElement)("p",null,(0,n.__)("Order not found","formipay")),(0,t.createElement)(r.Button,{variant:"secondary",onClick:o},(0,t.createElement)(l,{icon:b()(),size:16}),(0,n.__)("Back to Orders","formipay"))));var E}const P=window.Swal;function O({initialData:e=[],columns:l,filterOptions:o=null,statusCounts:i=null,searchable:c=!0,searchPlaceholder:s=(0,n.__)("Search...","formipay"),sortable:m=!0,defaultSort:d={id:"ID",desc:!0},selectable:p=!0,pagination:u=!0,pageSize:f=10,pageSizeOptions:y=[10,20,50,100],actions:_={addNew:!1,bulkDelete:!0,inline:!0},emptyMessage:E=(0,n.__)("No items found","formipay"),ajaxUrl:b,nonce:g,tableAction:h,deleteAction:w,duplicateAction:v}){const[k,N]=(0,a.useState)(e),[S,C]=(0,a.useState)(!0),[D,A]=(0,a.useState)(0),[I,x]=(0,a.useState)("all"),[O,T]=(0,a.useState)(""),[j,U]=(0,a.useState)(d.id||"ID"),[$,B]=(0,a.useState)(d.desc?"desc":"asc"),[L,F]=(0,a.useState)(1),[M,R]=(0,a.useState)(f),[z,J]=(0,a.useState)(new Set),[q,H]=(0,a.useState)(!1),[X,V]=(0,a.useState)(!1),[Z,G]=(0,a.useState)(""),K=h.replace("formipay-tabledata-",""),Q=_.bulkDelete?.action||`formipay-bulk-delete-${K}`,W=w||`formipay-delete-${K}`,Y=v||`formipay-duplicate-${K}`,ee=(0,a.useCallback)(async()=>{C(!0);const e=new URLSearchParams({action:h,_wpnonce:g,limit:M.toString(),offset:((L-1)*M).toString()});o&&"all"!==I&&e.append(o.key,I),O&&e.append("search",O),e.append("orderby",j),e.append("sort",$);try{const t=await fetch(`${b}?${e.toString()}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),a=await t.json(),n=a.data?.results||a.results||a.data||[];N(n),A(a.total||n.length)}catch(e){console.error("Load data error:",e)}finally{C(!1)}},[b,g,h,M,L,I,O,j,$,o]);return(0,a.useEffect)(()=>{ee()},[ee]),(0,a.useEffect)(()=>{const e=setTimeout(()=>{null!==O&&F(1)},500);return()=>clearTimeout(e)},[O]),(0,t.createElement)("div",{className:"formipay-data-table-wrapper"},(0,t.createElement)("div",{className:"formipay-table-toolbar"},_.addNew&&(0,t.createElement)(r.Button,{variant:"primary",onClick:()=>V(!0)},_.addNew.label||(0,n.__)("+ Add New","formipay")),_.bulkDelete&&p&&z.size>0&&(0,t.createElement)(r.Button,{variant:"secondary",isDestructive:!0,onClick:async()=>{0!==z.size&&(await P.fire({icon:"info",html:(0,n.__)("Do you want to delete the selected item(s)?","formipay"),showCancelButton:!0,confirmButtonText:(0,n.__)("Confirm","formipay"),cancelButtonText:(0,n.__)("Cancel","formipay")})).isConfirmed&&(await fetch(`${b}?action=${Q}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({ids:Array.from(z),_wpnonce:g})}),J(new Set),H(!1),ee(),P.fire({title:(0,n.__)("Done!","formipay"),html:(0,n.__)("Items deleted successfully.","formipay"),icon:"success"}))}},(0,n.__)("Delete Selected","formipay")," (",z.size,")"),c&&(0,t.createElement)(r.TextControl,{placeholder:s,value:O,onChange:T,className:"formipay-table-search"}),m&&(0,t.createElement)(r.SelectControl,{value:`${j}-${$}`,options:[{label:(0,n.__)("ID ↓","formipay"),value:"ID-desc"},{label:(0,n.__)("ID ↑","formipay"),value:"ID-asc"},{label:(0,n.__)("Date ↓","formipay"),value:"date-desc"},{label:(0,n.__)("Date ↑","formipay"),value:"date-asc"},{label:(0,n.__)("Title A-Z","formipay"),value:"title-asc"},{label:(0,n.__)("Title Z-A","formipay"),value:"title-desc"}],onChange:e=>{const[t,a]=e.split("-");U(t),B(a)}})),o&&(0,t.createElement)("div",{className:"formipay-filter-tabs"},o.options.map(e=>(0,t.createElement)("button",{key:e.value,className:"filter-tab "+(I===e.value?"active":""),onClick:()=>{return t=e.value,x(t),void F(1);var t}},e.label,i&&(0,t.createElement)("span",{className:"count"},i[e.value]||0)))),(0,t.createElement)("div",{className:"formipay-table-container"},S?(0,t.createElement)("div",{className:"formipay-table-loading"},(0,t.createElement)(r.Spinner,null)):0===k.length?(0,t.createElement)("div",{className:"formipay-table-empty"},E):(0,t.createElement)("table",{className:"formipay-table wp-list-table widefat fixed striped"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,p&&(0,t.createElement)("th",{className:"column-select"},(0,t.createElement)("input",{type:"checkbox",checked:q,onChange:()=>{J(q?new Set:new Set(k.map(e=>e.ID||e.id))),H(!q)}})),l.map(e=>(0,t.createElement)("th",{key:e.key,className:`column-${e.key}`},e.label)),_.inline&&(0,t.createElement)("th",{className:"column-actions"},(0,n.__)("Actions","formipay")))),(0,t.createElement)("tbody",null,k.map((e,a)=>{const r=e.ID||e.id;return(0,t.createElement)("tr",{key:a,className:"formipay-table-row"},p&&(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"checkbox",checked:z.has(r),onChange:()=>(e=>{const t=new Set(z);t.has(e)?t.delete(e):t.add(e),J(t),H(!1)})(r)})),l.map(a=>(0,t.createElement)("td",{key:a.key},a.render?a.render(e):e[a.key])),_.inline&&(0,t.createElement)("td",{className:"column-actions"},(0,t.createElement)("a",{href:`${window.formipayAdmin?.siteUrl||""}/wp-admin/post.php?post=${r}&action=edit`},(0,n.__)("Edit","formipay"))," | ",(0,t.createElement)("span",{className:"row-actions",style:{visibility:"hidden"}},(0,t.createElement)("button",{className:"button-link delete",onClick:e=>{e.preventDefault(),e.stopPropagation(),(async e=>{(await P.fire({icon:"info",html:(0,n.__)("Do you want to delete this item?","formipay"),showCancelButton:!0,confirmButtonText:(0,n.__)("Delete Permanently","formipay"),cancelButtonText:(0,n.__)("Cancel","formipay")})).isConfirmed&&(await fetch(`${b}?action=${W}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id:e,_wpnonce:g})}),ee())})(r)}},(0,n.__)("Delete","formipay"))," | ",(0,t.createElement)("button",{className:"button-link duplicate",onClick:e=>{e.preventDefault(),e.stopPropagation(),(async e=>{(await P.fire({icon:"info",html:(0,n.__)("Do you want to duplicate this item?","formipay"),showCancelButton:!0,confirmButtonText:(0,n.__)("Confirm","formipay"),cancelButtonText:(0,n.__)("Cancel","formipay")})).isConfirmed&&(await fetch(`${b}?action=${Y}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id:e,_wpnonce:g})}),ee())})(r)}},(0,n.__)("Duplicate","formipay")))))})))),u&&D>M&&(0,t.createElement)("div",{className:"formipay-table-pagination"},(0,t.createElement)("div",{className:"pagination-info"},(0,n.__)("Showing","formipay")," ",(L-1)*M+1," - ",Math.min(L*M,D)," ",(0,n.__)("of","formipay")," ",D),(0,t.createElement)("div",{className:"pagination-controls"},(0,t.createElement)(r.Button,{variant:"secondary",disabled:1===L,onClick:()=>F(1)},"««"),(0,t.createElement)(r.Button,{variant:"secondary",disabled:1===L,onClick:()=>F(L-1)},"‹"),(0,t.createElement)("span",{className:"page-info"},(0,n.__)("Page","formipay")," ",L," ",(0,n.__)("of","formipay")," ",Math.ceil(D/M)),(0,t.createElement)(r.Button,{variant:"secondary",disabled:L>=Math.ceil(D/M),onClick:()=>F(L+1)},"›"),(0,t.createElement)(r.Button,{variant:"secondary",disabled:L>=Math.ceil(D/M),onClick:()=>F(Math.ceil(D/M))},"»"),(0,t.createElement)(r.SelectControl,{value:M.toString(),options:y.map(e=>({label:e.toString(),value:e.toString()})),onChange:e=>{R(parseInt(e)),F(1)}}))),_.addNew&&(0,t.createElement)(r.Modal,{title:_.addNew.label||(0,n.__)("Add New","formipay"),isOpen:X,onClose:()=>V(!1)},(0,t.createElement)(r.TextControl,{label:(0,n.__)("Title","formipay"),value:Z,onChange:G,autoFocus:!0}),(0,t.createElement)("div",{className:"formipay-modal-actions"},(0,t.createElement)(r.Button,{variant:"secondary",onClick:()=>V(!1)},(0,n.__)("Cancel","formipay")),(0,t.createElement)(r.Button,{variant:"primary",onClick:async()=>{if(!Z.trim())return void P.fire({html:(0,n.__)("Title is required.","formipay"),icon:"error"});const e=_.addNew.action,t=await fetch(`${b}?action=${e}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({title:Z,_wpnonce:g})}),a=await t.json();a.success?(V(!1),G(""),a.data.edit_post_url?window.location.href=a.data.edit_post_url:ee()):P.fire({html:a.data.message||(0,n.__)("Error creating item.","formipay"),icon:"error"})}},(0,n.__)("Create","formipay")))))}const T=window.wp["icons/build/minus"];var j=e.n(T);const U=window.wp["icons/build/eyeClosed"];var $=e.n(U);const B=window.wp["icons/build/eyeOpened"];var L=e.n(B);function F({productId:e,productDetails:r}){const[l,o]=(0,a.useState)([]),[i,c]=(0,a.useState)([]),[s,m]=(0,a.useState)(!0),d=(0,a.useRef)(null),p=(0,a.useRef)(null),u=(0,a.useRef)(null),f=(0,a.useCallback)(()=>String(r?.default_currency||"").split(":::")[0]||r?.default_currency_code||"USD",[r]),y=(0,a.useCallback)(e=>{const t=r?.global_currencies||[],a=String(e).split(":::")[0],n=t.find(e=>String(e.currency).split(":::")[0]===a);return parseInt(n?.decimal_digits,10)||2},[r]),_=(0,a.useCallback)(()=>{const e=r?.global_selected_currencies||{};let t=Object.keys(e);if(!t.length){const e=r?.default_currency||"";e&&(t=[e])}return t.map(e=>{const t=String(e).split(":::")[0];return{currency:e,regular_price:"",sale_price:"",currency_decimal_digits:y(t)}})},[r,y]),E=(0,a.useCallback)(e=>{const t={...e};void 0===t.expanded&&(t.expanded=!1);const a=_(),n=e=>String(e).split(":::")[0];if(Array.isArray(t.prices)){const e=new Set(a.map(e=>n(e.currency)));t.prices=t.prices.filter(t=>t&&e.has(n(t.currency))),a.forEach(e=>{const a=n(e.currency);t.prices.some(e=>n(e.currency)===a)||t.prices.push(JSON.parse(JSON.stringify(e)))})}else t.prices=JSON.parse(JSON.stringify(a));Array.isArray(t.prices)&&0!==t.prices.length||(t.prices=JSON.parse(JSON.stringify(a))),t.prices.forEach(e=>{const t=n(e.currency);e.currency_decimal_digits=y(t),void 0!==e.regular_price&&null!==e.regular_price||(e.regular_price=""),void 0!==e.sale_price&&null!==e.sale_price||(e.sale_price="")});const r=f();return t.prices.sort((e,t)=>n(e.currency)===r?-1:n(t.currency)===r?1:0),delete t.price,delete t.sale,t},[_,y,f]),b=(0,a.useCallback)(()=>new Promise(e=>{let t=0;const a=setInterval(()=>{const n=document.querySelector('input[name="product_variation_attributes"]');if(n&&n.value)try{const t=JSON.parse(n.value);clearInterval(a),e(Array.isArray(t)?t:[])}catch(t){clearInterval(a),e([])}else++t>=100&&(clearInterval(a),e([]))},50)}),[]),g=(0,a.useCallback)(e=>{const t=e.map(e=>(e.attribute_variations||[]).map(e=>({label:e.variation_label}))).filter(e=>e.length>0);return t.length?t.reduce((e,t)=>e.flatMap(e=>t.map(t=>[].concat(e,t)))).map(e=>{const t=Array.isArray(e)?e.map(e=>e.label):[e.label];return{key:t.join("||"),label:t.join(" - ")}}):[]},[]),h=(0,a.useCallback)(async()=>{try{const e=await b();if(!e.length)return o([]),void w([]);const t=g(e).filter(e=>!i.includes(e.key)).map(e=>{const t=l.find(t=>t.key===e.key);return t?Object.assign(E(t),{name:e.label}):E({key:e.key,name:e.label,stock:"",weight:0,active:!0})});o(t),w(t)}catch(e){console.warn("Attributes not available; initializing empty variations."),o([]),w([])}},[b,g,i,l,E]),w=(0,a.useCallback)(e=>{d.current&&(d.current.value=JSON.stringify(e||[]))},[]),v=(0,a.useCallback)(async()=>{if(e)try{const t=new FormData;t.append("action","get_product_variables"),t.append("post_id",e),t.append("_wpnonce",window.formipayAdmin?.nonce||"");const a=await fetch(window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",{method:"POST",credentials:"same-origin",body:t}),n=await a.json();if(n.success&&Array.isArray(n.data)&&n.data.length){const e=n.data.map(e=>E(e));o(e),c([]),w(e)}else await h()}catch{await h()}else await h()},[e,E,h,w]),k=(0,a.useCallback)(()=>{const e=()=>{setTimeout(()=>{h()},200)},t=document.querySelector('input[name="product_variation_attributes"]');if(t){t.addEventListener("input",e),t.addEventListener("change",e);const a=new MutationObserver(e);a.observe(t,{attributes:!0,attributeFilter:["value"]}),u.current=a,p.current=setInterval(()=>{const t=document.querySelector('input[name="product_variation_attributes"]');t&&t.value!==d.current?.value&&e()},300)}return()=>{u.current&&u.current.disconnect(),p.current&&clearInterval(p.current)}},[h]);(0,a.useEffect)(()=>{const e=r?.multicurrency,t=r?.global_selected_currencies||{},a=Object.keys(t).length;return m(!e||a<=1),v(),k()},[r,v,k]);const N=(0,a.useCallback)((e,t,a,n)=>{const r=[...l];r[e].prices[t][a]=n,o(r),w(r)},[l,w]),S=(0,a.useCallback)(e=>{const t=[...l];t[e].expanded=!t[e].expanded,o(t)},[l]),C=(0,a.useCallback)((e,t,a)=>{const n=[...l];n[e][t]=a,o(n),w(n)},[l,w]),D=(0,a.useCallback)(e=>{const t=l[e],a=[...i,t.key];c(a);const n=l.filter((t,a)=>a!==e);o(n),w(n)},[l,i,w]),A=(0,a.useCallback)(()=>{const e=f();for(const t of l){const a=t.prices?.find(t=>String(t.currency).split(":::")[0]===e);if(!a||!a.regular_price)return{currencyCode:e,rowLabel:t.name}}return null},[l,f]);return(0,a.useEffect)(()=>{const e=document.getElementById("post");if(!e)return;const t=e=>{const t=A();if(t){e.preventDefault(),e.stopImmediatePropagation();const a=(r?.variation_table?.error_missing_default_price||'Please fill Regular Price for default currency (%1$s) in variation "%2$s".').replace("%1$s",t.currencyCode).replace("%2$s",t.rowLabel);return alert(a),!1}};return e.addEventListener("submit",t,!0),()=>e.removeEventListener("submit",t,!0)},[A,r]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{ref:d,type:"hidden",name:"product_variation_variables",value:JSON.stringify(l)}),(0,t.createElement)("table",{className:"formipay-variation-table",id:"product-variables-table"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,(0,n.__)("Variation","formipay")),s?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("th",null,(0,n.__)("Price","formipay")),(0,t.createElement)("th",null,(0,n.__)("Sale Price","formipay"))):null,(0,t.createElement)("th",null,(0,n.__)("Stock","formipay")),(0,t.createElement)("th",null,(0,n.__)("Weight","formipay")),(0,t.createElement)("th",null,(0,n.__)("Actions","formipay")))),(0,t.createElement)("tbody",null,l.map((e,a)=>(0,t.createElement)(M,{key:e.key,row:e,rowIndex:a,showFlatPricing:s,defaultCurrencyCode:f(),onToggleExpanded:()=>S(a),onUpdatePrice:(e,t,n)=>N(a,e,t,n),onUpdateField:(e,t)=>C(a,e,t),onDelete:()=>D(a)})))))}function M({row:e,rowIndex:a,showFlatPricing:o,defaultCurrencyCode:i,onToggleExpanded:c,onUpdatePrice:s,onUpdateField:m,onDelete:d}){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("tr",{className:"variation-row"},(0,t.createElement)("td",{className:"variation-name"},(0,t.createElement)("button",{type:"button",className:"toggle-expand",onClick:c},(0,t.createElement)(l,{icon:e.expanded?L():$(),size:16})),(0,t.createElement)("strong",null,e.name)),o?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(R,{price:e.prices[0],field:"regular_price",onChange:(e,t)=>s(0,e,t)}),(0,t.createElement)(R,{price:e.prices[0],field:"sale_price",onChange:(e,t)=>s(0,e,t)})):null,(0,t.createElement)("td",{className:"variation-stock"},(0,t.createElement)(r.TextControl,{type:"number",value:e.stock,onChange:e=>m("stock",e),placeholder:"Unlimited"})),(0,t.createElement)("td",{className:"variation-weight"},(0,t.createElement)(r.TextControl,{type:"number",value:e.weight,onChange:e=>m("weight",e),step:"0.01"})),(0,t.createElement)("td",{className:"variation-actions"},(0,t.createElement)(r.Button,{variant:"secondary",size:"small",isDestructive:!0,onClick:d,icon:j()()},(0,n.__)("Delete","formipay")))),!o&&e.expanded&&(0,t.createElement)("tr",{className:"variation-details-row"},(0,t.createElement)("td",{colSpan:"5"},(0,t.createElement)("table",{className:"inner-table"},(0,t.createElement)("tbody",null,e.prices.map((e,a)=>{const n=String(e.currency).split(":::")[0]===i,r=e.currency_decimal_digits?1/Math.pow(10,e.currency_decimal_digits):.01;return(0,t.createElement)("tr",{key:a},(0,t.createElement)("td",{className:"currency-name"},e.currency,n&&(0,t.createElement)("span",{className:"required"},"*")),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"number",value:e.regular_price,onChange:e=>s(a,"regular_price",e.target.value),step:r,placeholder:"Regular Price",required:n})),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"number",value:e.sale_price,onChange:e=>s(a,"sale_price",e.target.value),step:r,placeholder:"Sale Price"})))}))))))}function R({price:e,field:a,onChange:n}){const r=e.currency_decimal_digits?1/Math.pow(10,e.currency_decimal_digits):.01;return(0,t.createElement)("td",{className:"price-cell"},(0,t.createElement)("input",{type:"number",value:e[a],onChange:e=>n(a,e.target.value),step:r,placeholder:"Auto"}))}const z=window.Swal,J={orders:function({initialData:e}){const[n,r]=(0,a.useState)(null);return n?(0,t.createElement)(x,{orderId:n,onBack:()=>r(null)}):(0,t.createElement)(_,{onSelectOrder:e=>r(e)})},customers:function(){const e=[{key:"id",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.id)},{key:"name",label:(0,n.__)("Name","formipay"),render:e=>e.name||e.full_name||"-"},{key:"email",label:(0,n.__)("Email","formipay")},{key:"phone",label:(0,n.__)("Phone","formipay"),render:e=>e.phone||e.whatsapp||"-"},{key:"total_order",label:(0,n.__)("Total Orders","formipay"),render:e=>e.total_order||e.total_orders||0},{key:"created_date",label:(0,n.__)("Date","formipay"),render:e=>{const t=e.created_date||e.date;return t?new Date(t).toLocaleDateString():"-"}}];return(0,t.createElement)("div",{className:"formipay-page-customers"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Customers","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-customers",selectable:!1,inline:!1,emptyMessage:(0,n.__)("No customers found","formipay")}))},products:function(){const[e,r]=(0,a.useState)(!1),[l,o]=(0,a.useState)(null);if(e&&l)return(0,t.createElement)("div",{className:"formipay-page-products"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("button",{type:"button",className:"button button-secondary",onClick:()=>r(!1)},"← ",(0,n.__)("Back to Products","formipay")),(0,t.createElement)("h1",null,(0,n.__)("Edit Product","formipay"))),(0,t.createElement)("div",{className:"formipay-product-editor"},(0,t.createElement)(F,{productId:l,productDetails:{}})));const i=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"title",label:(0,n.__)("Title","formipay"),render:e=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("strong",null,(0,t.createElement)("button",{className:"button-link",onClick:()=>{o(e.ID),r(!0)}},e.post_title||e.title||(0,n.__)("Untitled","formipay"))),(0,t.createElement)("br",null),(0,t.createElement)("span",{className:"row-actions",style:{display:"none",visibility:"hidden"}},(0,t.createElement)("button",{className:"button-link",onClick:()=>{o(e.ID),r(!0)}},(0,n.__)("Edit Variations","formipay"))," | ",(0,t.createElement)("button",{className:"button-link delete","data-id":e.ID},(0,n.__)("Delete","formipay"))," | ",(0,t.createElement)("button",{className:"button-link duplicate","data-id":e.ID},(0,n.__)("Duplicate","formipay"))))},{key:"price",label:(0,n.__)("Price","formipay"),render:e=>{const a=e.prices||e.price;return"object"==typeof a&&null!==a?Object.entries(a).map(([e,a])=>(0,t.createElement)("div",{key:e},e,": ",a)):a||"-"}},{key:"type",label:(0,n.__)("Type","formipay"),render:e=>"physical"===(e.product_type||e.type||"digital")?(0,n.__)("Physical","formipay"):(0,n.__)("Digital","formipay")},{key:"stock",label:(0,n.__)("Stock","formipay"),render:e=>{const t=e.stock;return null===t||""===t?(0,n.__)("Unlimited","formipay"):t}},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r={publish:(0,n.__)("Published","formipay"),draft:(0,n.__)("Draft","formipay")};return(0,t.createElement)("span",{className:`status-label ${a}`},r[a]||a)}}];return(0,t.createElement)("div",{className:"formipay-page-products"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Products","formipay"))),(0,t.createElement)(O,{columns:i,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-products",deleteAction:"formipay-delete-product",duplicateAction:"formipay-duplicate-product",filterOptions:{key:"post_status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"publish",label:(0,n.__)("Published","formipay")},{value:"draft",label:(0,n.__)("Draft","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Product","formipay"),action:"formipay-create-product-post"},bulkDelete:{action:"formipay-bulk-delete-product"},inline:!0},emptyMessage:(0,n.__)("No products found","formipay")}))},forms:function(){const e=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"title",label:(0,n.__)("Title","formipay"),render:e=>(0,t.createElement)("a",{href:`${window.formipayAdmin?.siteUrl||""}/wp-admin/post.php?post=${e.ID}&action=edit`},(0,t.createElement)("strong",null,e.title))},{key:"date",label:(0,n.__)("Date","formipay"),render:e=>{const a=new Date(e.date);return(0,t.createElement)("span",{style:{whiteSpace:"nowrap"}},a.toLocaleDateString(),(0,t.createElement)("br",null),(0,t.createElement)("span",{style:{fontSize:"smaller",color:"#646970"}},a.toLocaleTimeString()))}},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r={publish:(0,n.__)("Published","formipay"),draft:(0,n.__)("Draft","formipay"),pending:(0,n.__)("Pending","formipay")};return(0,t.createElement)("span",{className:`status-label ${a}`},r[a]||a)}},{key:"shortcode",label:(0,n.__)("Shortcode","formipay"),render:e=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{className:"formipay-form-shortcode",value:`[formipay form=${e.ID}]`,disabled:!0}),(0,t.createElement)("button",{className:"copy-shortcode","data-copy":`[formipay form=${e.ID}]`,onClick:e=>{const t=e.currentTarget.dataset.copy;navigator.clipboard.writeText(t).then(()=>{const t=e.currentTarget.innerHTML;e.currentTarget.innerHTML="✓ Copied",setTimeout(()=>{e.currentTarget.innerHTML=t},2e3),z.fire({icon:"success",title:(0,n.__)("Shortcode copied!","formipay"),toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0})})}},"📋 ",(0,n.__)("Copy","formipay")))}];return(0,t.createElement)("div",{className:"formipay-page-forms"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Forms","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-forms",deleteAction:"formipay-delete-form",duplicateAction:"formipay-duplicate-form",filterOptions:{key:"post_status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"publish",label:(0,n.__)("Published","formipay")},{value:"draft",label:(0,n.__)("Draft","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Form","formipay"),action:"formipay-create-form-post"},bulkDelete:{action:"formipay-bulk-delete-form"},inline:!0},emptyMessage:(0,n.__)("No forms found","formipay")}))},coupons:function(){const e=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"code",label:(0,n.__)("Coupon Code","formipay"),render:e=>(0,t.createElement)("strong",null,e.code||e.post_title)},{key:"type",label:(0,n.__)("Type","formipay"),render:e=>"percentage"===(e.coupon_type||e.type||"percentage")?(0,n.__)("%","formipay"):(0,n.__)("Fixed","formipay")},{key:"amount",label:(0,n.__)("Amount","formipay"),render:e=>e.amount||"-"},{key:"usages",label:(0,n.__)("Usages","formipay"),render:e=>e.usage_count||e.usages||0},{key:"date_limit",label:(0,n.__)("Date Limit","formipay"),render:e=>{const t=e.date_limit;return t&&"none"!==t?new Date(t).toLocaleDateString():(0,n.__)("Unlimited","formipay")}},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r="on"===e.active||"publish"===a;return(0,t.createElement)("span",{className:"status-label "+(r?"publish":"draft")},r?(0,n.__)("Active","formipay"):(0,n.__)("Inactive","formipay"))}}];return(0,t.createElement)("div",{className:"formipay-page-coupons"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Coupons","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-coupons",deleteAction:"formipay-delete-coupon",duplicateAction:"formipay-duplicate-coupon",filterOptions:{key:"status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"active",label:(0,n.__)("Active","formipay")},{value:"inactive",label:(0,n.__)("Inactive","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Coupon","formipay"),action:"formipay-create-coupon-post"},bulkDelete:{action:"formipay-bulk-delete-coupon"},inline:!0},emptyMessage:(0,n.__)("No coupons found","formipay")}))},access:function(){const e=[{key:"ID",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.ID)},{key:"title",label:(0,n.__)("Title","formipay")},{key:"product_name",label:(0,n.__)("Product","formipay")},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.post_status||e.status||"unknown",r={publish:(0,n.__)("Published","formipay"),draft:(0,n.__)("Draft","formipay")}[a]||a;return(0,t.createElement)("span",{className:`status-label ${a}`},r)}},{key:"date",label:(0,n.__)("Date","formipay"),render:e=>{const t=e.post_date||e.date;return t?new Date(t).toLocaleDateString():"-"}}];return(0,t.createElement)("div",{className:"formipay-page-access"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Access Items","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-access-items",deleteAction:"formipay-delete-access-item",duplicateAction:"formipay-duplicate-access-item",filterOptions:{key:"post_status",options:[{value:"all",label:(0,n.__)("All","formipay")},{value:"publish",label:(0,n.__)("Published","formipay")},{value:"draft",label:(0,n.__)("Draft","formipay")}]},actions:{addNew:{label:(0,n.__)("+ Add New Item","formipay"),action:"formipay-create-access-item-post"},bulkDelete:{action:"formipay-bulk-delete-access-item"},inline:!0},emptyMessage:(0,n.__)("No access items found","formipay")}))},licenses:function(){const e=[{key:"id",label:(0,n.__)("ID","formipay"),render:e=>(0,t.createElement)("strong",null,"#",e.id)},{key:"license_key",label:(0,n.__)("License Key","formipay"),render:e=>(0,t.createElement)("code",null,e.license_key||"-")},{key:"product",label:(0,n.__)("Product","formipay"),render:e=>e.product_name||e.product||"-"},{key:"order",label:(0,n.__)("Order","formipay"),render:e=>e.order_id||`#${e.order}`||"-"},{key:"email",label:(0,n.__)("Email","formipay")},{key:"status",label:(0,n.__)("Status","formipay"),render:e=>{const a=e.status||"unknown",r={active:(0,n.__)("Active","formipay"),inactive:(0,n.__)("Inactive","formipay"),expired:(0,n.__)("Expired","formipay")},l="active"===a?"publish":"expired"===a?"pending":"draft";return(0,t.createElement)("span",{className:`status-label ${l}`},r[a]||a)}}];return(0,t.createElement)("div",{className:"formipay-page-licenses"},(0,t.createElement)("div",{className:"formipay-page-header"},(0,t.createElement)("h1",null,(0,n.__)("Licenses","formipay"))),(0,t.createElement)(O,{columns:e,ajaxUrl:window.formipayAdmin?.ajaxUrl||"/wp-admin/admin-ajax.php",nonce:window.formipayAdmin?.nonce||"",tableAction:"formipay-tabledata-licenses",selectable:!1,inline:!1,emptyMessage:(0,n.__)("No licenses found","formipay")}))}};function q({page:e,initialData:n}){(0,a.useEffect)(()=>{console.log("[Formipay App] Rendering page:",e,"with data:",n)},[e,n]);const r=J[e];return r?(0,t.createElement)("div",{className:"formipay-admin-wrap"},(0,t.createElement)(r,{initialData:n})):(0,t.createElement)("div",{className:"formipay-error"},(0,t.createElement)("p",null,"Unknown page: ",e))}const H=()=>{const e=document.querySelectorAll("[data-formipay-mount]");console.log("[Formipay] Mount points found:",e.length),console.log("[Formipay] formipayAdmin data:",window.formipayAdmin),e.forEach(e=>{const n=e.dataset.formipayMount,r=window.formipayAdmin?.[n]||{};console.log("[Formipay] Mounting page:",n,"with data:",r);try{(0,a.render)((0,t.createElement)(q,{page:n,initialData:r}),e),console.log("[Formipay] Successfully mounted:",n)}catch(e){console.error("[Formipay] Failed to mount:",n,e)}})};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",H):H()})(); \ No newline at end of file diff --git a/includes/Customer.php b/includes/Customer.php index 2212fcc04..27a8a920b 100644 --- a/includes/Customer.php +++ b/includes/Customer.php @@ -185,34 +185,34 @@ class Customer { // Assets now handled by ReactAdmin class return; - $customer_id = intval(filter_input(INPUT_GET, 'customer_id', FILTER_SANITIZE_STRING)); - if(empty($customer_id)){ - wp_enqueue_style( 'page-customers', FORMIPAY_URL . 'admin/assets/css/admin-customers.css', [], FORMIPAY_VERSION, 'all' ); - wp_enqueue_script( 'page-customers', FORMIPAY_URL . 'admin/assets/js/admin-customers.js', ['jquery', 'gridjs'], FORMIPAY_VERSION, true ); - }else{ - wp_enqueue_style( 'bootstrap-icon', FORMIPAY_URL . 'vendor/Bootstrap/bootstrap-icons.css', [], '1.11.1', 'all'); - wp_enqueue_style( 'bootstrap', FORMIPAY_URL . 'vendor/Bootstrap/bootstrap.min.css', [], '5.3.2' ); - wp_enqueue_style( 'page-customers', FORMIPAY_URL . 'admin/assets/css/admin-customer-details.css', [], FORMIPAY_VERSION, 'all' ); - wp_enqueue_script( 'handlebars', FORMIPAY_URL . 'vendor/HandleBars/handlebars.min.js', [], '4.7.7', true); - wp_enqueue_script( 'bootstrap', FORMIPAY_URL . 'vendor/Bootstrap/bootstrap.bundle.min.js', ['jquery'], '5.3.2', true ); - wp_enqueue_script( 'page-customers', FORMIPAY_URL . 'admin/assets/js/admin-customer-details.js', ['jquery'], FORMIPAY_VERSION, true ); - } + // $customer_id = intval(filter_input(INPUT_GET, 'customer_id', FILTER_SANITIZE_STRING)); + // if(empty($customer_id)){ + // wp_enqueue_style( 'page-customers', FORMIPAY_URL . 'admin/assets/css/admin-customers.css', [], FORMIPAY_VERSION, 'all' ); + // wp_enqueue_script( 'page-customers', FORMIPAY_URL . 'admin/assets/js/admin-customers.js', ['jquery', 'gridjs'], FORMIPAY_VERSION, true ); + // }else{ + // wp_enqueue_style( 'bootstrap-icon', FORMIPAY_URL . 'vendor/Bootstrap/bootstrap-icons.css', [], '1.11.1', 'all'); + // wp_enqueue_style( 'bootstrap', FORMIPAY_URL . 'vendor/Bootstrap/bootstrap.min.css', [], '5.3.2' ); + // wp_enqueue_style( 'page-customers', FORMIPAY_URL . 'admin/assets/css/admin-customer-details.css', [], FORMIPAY_VERSION, 'all' ); + // wp_enqueue_script( 'handlebars', FORMIPAY_URL . 'vendor/HandleBars/handlebars.min.js', [], '4.7.7', true); + // wp_enqueue_script( 'bootstrap', FORMIPAY_URL . 'vendor/Bootstrap/bootstrap.bundle.min.js', ['jquery'], '5.3.2', true ); + // wp_enqueue_script( 'page-customers', FORMIPAY_URL . 'admin/assets/js/admin-customer-details.js', ['jquery'], FORMIPAY_VERSION, true ); + // } - wp_localize_script( 'page-customers', 'formipay_customers_page', [ - 'ajax_url' => admin_url('admin-ajax.php'), - 'site_url' => site_url(), - 'customer_id' => $customer_id, - 'nonce' => wp_create_nonce( 'formipay-admin-access-nonce' ), - 'columns' => [ - 'id' => esc_html__( 'ID', 'formipay' ), - 'name' => esc_html__( 'Name', 'formipay' ), - 'email' => esc_html__( 'Email', 'formipay' ), - 'phone' => esc_html__( 'Phone', 'formipay' ), - 'total_order' => esc_html__( 'Total Order', 'formipay' ), - ] - ] ); + // wp_localize_script( 'page-customers', 'formipay_customers_page', [ + // 'ajax_url' => admin_url('admin-ajax.php'), + // 'site_url' => site_url(), + // 'customer_id' => $customer_id, + // 'nonce' => wp_create_nonce( 'formipay-admin-access-nonce' ), + // 'columns' => [ + // 'id' => esc_html__( 'ID', 'formipay' ), + // 'name' => esc_html__( 'Name', 'formipay' ), + // 'email' => esc_html__( 'Email', 'formipay' ), + // 'phone' => esc_html__( 'Phone', 'formipay' ), + // 'total_order' => esc_html__( 'Total Order', 'formipay' ), + // ] + // ] ); - } + // } } diff --git a/includes/License.php b/includes/License.php index 3b7c8e619..f7d883df7 100644 --- a/includes/License.php +++ b/includes/License.php @@ -78,46 +78,46 @@ class License { public function enqueue() { // Assets now handled by ReactAdmin class return; - wp_enqueue_style('page-licenses', FORMIPAY_URL . 'admin/assets/css/admin-licenses.css', [], FORMIPAY_VERSION, 'all'); - wp_enqueue_script('page-licenses', FORMIPAY_URL . 'admin/assets/js/admin-licenses.js', ['jquery', 'gridjs'], FORMIPAY_VERSION, true); - wp_localize_script('page-licenses', 'formipay_licenses_page', [ - 'ajax_url' => admin_url('admin-ajax.php'), - 'site_url' => site_url(), - 'columns' => [ - 'id' => __('ID','formipay'), - 'product' => __('Product','formipay'), - 'order' => __('Order','formipay'), - 'email' => __('Email','formipay'), - 'key' => __('Key','formipay'), - 'status' => __('Status','formipay'), - 'expiry' => __('Expiry','formipay'), - 'date' => __('Date','formipay'), - ], - 'filter_form' => [ - 'products' => [ - 'placeholder' => __('Filter by Product','formipay'), - 'noresult_text' => __('No results found','formipay') - ], - 'status' => [ - 'placeholder' => __('Filter by Status','formipay'), - 'noresult_text' => __('No results found','formipay') - ] - ], - 'modal' => [ - 'delete' => [ - 'question' => __('Do you want to delete the license?','formipay'), - 'cancelButton' => __('Cancel','formipay'), - 'confirmButton' => __('Delete Permanently','formipay') - ], - 'bulk_delete' => [ - 'question' => __('Do you want to delete the selected license(s)?','formipay'), - 'cancelButton' => __('Cancel','formipay'), - 'confirmButton' => __('Confirm','formipay') - ], - ], - 'nonce' => wp_create_nonce('formipay-admin-licenses') - ]); - } + // wp_enqueue_style('page-licenses', FORMIPAY_URL . 'admin/assets/css/admin-licenses.css', [], FORMIPAY_VERSION, 'all'); + // wp_enqueue_script('page-licenses', FORMIPAY_URL . 'admin/assets/js/admin-licenses.js', ['jquery', 'gridjs'], FORMIPAY_VERSION, true); + // wp_localize_script('page-licenses', 'formipay_licenses_page', [ + // 'ajax_url' => admin_url('admin-ajax.php'), + // 'site_url' => site_url(), + // 'columns' => [ + // 'id' => __('ID','formipay'), + // 'product' => __('Product','formipay'), + // 'order' => __('Order','formipay'), + // 'email' => __('Email','formipay'), + // 'key' => __('Key','formipay'), + // 'status' => __('Status','formipay'), + // 'expiry' => __('Expiry','formipay'), + // 'date' => __('Date','formipay'), + // ], + // 'filter_form' => [ + // 'products' => [ + // 'placeholder' => __('Filter by Product','formipay'), + // 'noresult_text' => __('No results found','formipay') + // ], + // 'status' => [ + // 'placeholder' => __('Filter by Status','formipay'), + // 'noresult_text' => __('No results found','formipay') + // ] + // ], + // 'modal' => [ + // 'delete' => [ + // 'question' => __('Do you want to delete the license?','formipay'), + // 'cancelButton' => __('Cancel','formipay'), + // 'confirmButton' => __('Delete Permanently','formipay') + // ], + // 'bulk_delete' => [ + // 'question' => __('Do you want to delete the selected license(s)?','formipay'), + // 'cancelButton' => __('Cancel','formipay'), + // 'confirmButton' => __('Confirm','formipay') + // ], + // ], + // 'nonce' => wp_create_nonce('formipay-admin-licenses') + // ]); + // } } /** GridJS data source */ diff --git a/includes/Order.php b/includes/Order.php index fc4b67ecd..a3cfb2e52 100644 --- a/includes/Order.php +++ b/includes/Order.php @@ -655,6 +655,7 @@ class Order { public function enqueue() { // Assets now handled by ReactAdmin class return; + } public function formipay_get_all_forms() { diff --git a/node_modules/.cache/babel-loader/1a741df843f1088b111b34098367931913ebadf428560780b121588c6c0cdf65.json.gz b/node_modules/.cache/babel-loader/1a741df843f1088b111b34098367931913ebadf428560780b121588c6c0cdf65.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6f15fafcbfca3aef76b4e6a02e5a8ac8c4940a48 GIT binary patch literal 3557 zcmV9MxF!~ zA&ChEa!Javqv#3t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dU zb#=34rA*tVMME$u!^#(34>L1Hio;69GF^A-5_yyuGPLx_`!b!RIOQz94FOxvp-yLm z_XZ|_L7XXt!pw+TqOrA&Xf%P9bhNu8$Q@e}BUKP{md+(nG{_Y*IKz9>vsnGWtWflN z{XJ>5JgL}{3BrG$eR$s?mkEK&(vF%}4|2f-{Qv&_2ToXW= zWecD#C+;1J)xgl6Eg}pryESAD%eip~5b-Qo^xaPH&{}4M%zB^b9+(k*WDRXR( zl1j~NE434VOou4wzEHiA`Kc5Orjiqvg&`~m*ZV+*CHBR=9FNCclyfDQcC0!fs+sGR zkDA_TY>I7bkGv?#rmtU4?Z4C06R=Og`r%Zj>$d4tbH8#Z2dWxnca68y{k&7MMEAyZ z^j(P z@N&OHOS9uwofAR|J8yIYIbu1%RqSs3KaR`%YWT#RySh~Qx8kSB(R5uX366WmoTZ$_ zq?^B{wXZA~H>mzdEx&GzEoHlDH22*bkTvsV+F8mJls z4uBn)3_cA>%L$~s5Mzuwf0Q9W~pHz zGtm)*!p)?GH}DdY)*smk8e&u23pd5U(=t;r&eo~@@J=MnIC=vQ?+q$J_!RBLh9YLD Rz3}p?_#Y5!8V;`y007!Ps2l(Q literal 0 HcmV?d00001 diff --git a/node_modules/.cache/babel-loader/8ad61b9bd1cdfe0ddc52c8e65cbe1ef62f81ff6400630b08f6d2900f354bcb5e.json.gz b/node_modules/.cache/babel-loader/8ad61b9bd1cdfe0ddc52c8e65cbe1ef62f81ff6400630b08f6d2900f354bcb5e.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..89158c769c682929f1b71590baf887882fb97751 GIT binary patch literal 10400 zcmV;RC|}nfiwFP!000006YYK5cH6j;=&xXN_1d<(Y0FOHB<;lAhoop(N$e!;q%XOw zZd#%(#uTZLlx4@QwdU!(pLITCzTnKf&8N(loK*!7DDWmqPP%*V*?4d$5GWK1RfR&K zSh+F0G&A<1X&9QuARhY0o)L^EagwncHb{Ig^WD%N`%%W`>@11L?46PL-XMEtJbD*( zzW(}M#J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K1b!e}In8g&~P^{Bw8eZi>CPA=w0cw?>3vKWm-@SXM5na)vXA>R0oZCQ8hLrG|^ zK@LVwn#`{J3JO^NQ0@`OLI{vg2+HyhcxjJqVqm;f@pbw6{DiM{4+0euyBeB^l|2H6 zcO~QX#_Cw}6b^B3EGl#QB`3TOZ4yyJkIQ+3$PUR7W!u(|*m#G>QSEBPD%pSFC6jt$ zF|kAhFN(;Qo!$o`YS)G7?bJ=LeC$JBaE|jo?ho=@d@9XHm!C=;%l%Q=VpCh41_N6u zyq@&+!I7I zT=f(z65{kmzgJWkz_qzTSjlP)!VcQ`PAJV>=Xh3c2z?aB2{D9PoUO0P_132z2`6yG z=Cf-D2bH$x=%C1*t`u=tV;SY_yt?oH2{;wkS)%tX8hQl1hi!hVy(l0Z3@^X-A0&Wn4ur#8lf_1cdwmZkfR`}vpUFFKEO8L(=W zXfV)O($%VS;9NQN!I(U%-+9L==;BL>x z_$HyH4fiTP>osCi>5Tsw287R`+{C`Bzl@aw;xWNFP<9i1nKd*_BRG%Z#D5l~nX&iw z{oFLhe&#`1Rb%gFZW?JkO$I*vH)6(~F^-4R&^JuOzsme1^1`k^fgFj^An;S{{{I2J KU@_z&(f|NruvkI> literal 0 HcmV?d00001 diff --git a/node_modules/.cache/babel-loader/b9ad9415434e146b824f735780f297bc80716ef8e1e601716cb0e4c36412d093.json.gz b/node_modules/.cache/babel-loader/b9ad9415434e146b824f735780f297bc80716ef8e1e601716cb0e4c36412d093.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..18f47b1166cdb3785b4a4e1dae1a8979ebf62f62 GIT binary patch literal 3796 zcmV;_4lD5=iwFP!000006YV?gZX7vsuTncO+&#NJE%|^24r7cJt+b0Mxb^y0UL-h; zU{T#14bMGfhh%%K$OGh8{s(!Cdx9kY?osYZg5pOv+1(?_+S|n?i2rz+EEcPZRmG}e z>25-lp3HeuRoSEvC7sMCY*P!V;SLH(iKgFHbVIp@9jv6-z;YrfDfDvka>)74R>-oJRH*~@;2V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DW2QYuf#%dO&AZZSJylPM?V9r!?EYecFl*G zeNdRf+&oITM=e{B{aL%42B>!LupJ8b>f<$Q9)}sW^{iq_`!9xFF&b9vBUZk&WHl}K zhAA2&aooqW{|%>QHy2;(Lqz*E2b&sacKKdH7_S>0pwPFqUA?Bo`)l#Bz52}nEqz1m zvFln4{Z#L{p>-s#z0z2?{XJ&k5hupFEv$KpAKJEK@7Y}kwY&06+96|pVYK8*hEEZr zZ|n7PL?7>(346iWmt8vP zTBlpBG~AG+9J^|d;&0p=-HH_3i*D`ZBXuw);6W`MwPzCHz(mtTkuC%E=X_jl7(dDt z)AT24(v2k99c=3v!HEORLi2iEAK{P1vpXZv-E&u&z(n<`CBP(%CDVfxC4oOA zc0E3&*mg{Ig++afg@YiA{lFBvW);)ee!XU8NqLui?iJ1;i0JKZ=Vuk;?X%(}R6839 z#Gx1f&1*?NP_9pHTV#-!~^$hFn(e-h@7F)(|M$%x! z_J}Sy_zGSa_?cPpJ<;oY!+5lEuqd-)>NY}B#A*)}9`YW%NdEk%KmREiu=H!v(mz>G*k;?k^SF7l~2#IacuOSD;2Ia_2Gf4ii;8 zUk~R=qs4ckXjJeQUQetzY>>r4TJ>~$e6Z*qNpjyK@@Ke&y;cA4Z8O}?;2n);c9U$f zA+`V8)(zDJQ^d*qZkJ7zXk -
- - {__('Edit', 'formipay')} - - {' | '} + + {__('Edit', 'formipay')} + + {' | '} + {' | '} -
+ )} diff --git a/src/admin/pages/Forms.js b/src/admin/pages/Forms.js index 9ada82d7a..e904a95b6 100644 --- a/src/admin/pages/Forms.js +++ b/src/admin/pages/Forms.js @@ -20,23 +20,9 @@ export default function FormsPage() { key: 'title', label: __('Title', 'formipay'), render: (row) => ( - <> + {row.title} -
- -
- {__('Edit', 'formipay')} - - {' | '} - - {' | '} - - - + ) }, {