woocommerce/packages/woocommerce-admin/dist/chunks/analytics-report-customers.js

1 line
23 KiB
JavaScript
Raw Normal View History

2021-12-10 12:03:04 +00:00
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[9],{480:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return C}));var a=r(0),o=r(1),c=r.n(o),n=r(2),l=r(28),i=r(30),s=r(13),m=r(11),d=r(502);const{countries:u}=Object(s.f)("dataEndpoints",{countries:{}}),b=Object(i.applyFilters)("woocommerce_admin_customers_report_filters",[{label:Object(n.__)("Show",'woocommerce'),staticParams:["paged","per_page"],param:"filter",showFilters:()=>!0,filters:[{label:Object(n.__)("All Customers",'woocommerce'),value:"all"},{label:Object(n.__)("Single Customer",'woocommerce'),value:"select_customer",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_customer",chartMode:"item-comparison",path:["select_customer"],settings:{type:"customers",param:"customers",getLabels:d.c,labels:{placeholder:Object(n.__)("Type to search for a customer",'woocommerce'),button:Object(n.__)("Single Customer",'woocommerce')}}}]},{label:Object(n.__)("Advanced filters",'woocommerce'),value:"advanced"}]}]),_=Object(i.applyFilters)("woocommerce_admin_customers_report_advanced_filters",{title:Object(n._x)("Customers match {{select /}} filters","A sentence describing filters for Customers. See screen shot for context: https://cloudup.com/cCsm3GeXJbE",'woocommerce'),filters:{name:{labels:{add:Object(n.__)("Name",'woocommerce'),placeholder:Object(n.__)("Search",'woocommerce'),remove:Object(n.__)("Remove customer name filter",'woocommerce'),rule:Object(n.__)("Select a customer name filter match",'woocommerce'),title:Object(n.__)("{{title}}Name{{/title}} {{rule /}} {{filter /}}",'woocommerce'),filter:Object(n.__)("Select customer name",'woocommerce')},rules:[{value:"includes",label:Object(n._x)("Includes","customer names",'woocommerce')},{value:"excludes",label:Object(n._x)("Excludes","customer names",'woocommerce')}],input:{component:"Search",type:"customers",getLabels:Object(d.e)(m.NAMESPACE+"/customers",e=>({id:e.id,label:e.name}))}},country:{labels:{add:Object(n.__)("Country / Region",'woocommerce'),placeholder:Object(n.__)("Search",'woocommerce'),remove:Object(n.__)("Remove country / region filter",'woocommerce'),rule:Object(n.__)("Select a country / region filter match",'woocommerce'),title:Object(n.__)("{{title}}Country / Region{{/title}} {{rule /}} {{filter /}}",'woocommerce'),filter:Object(n.__)("Select country / region",'woocommerce')},rules:[{value:"includes",label:Object(n._x)("Includes","countries",'woocommerce')},{value:"excludes",label:Object(n._x)("Excludes","countries",'woocommerce')}],input:{component:"Search",type:"countries",getLabels:async e=>{const t=u.map(e=>({key:e.code,label:Object(l.decodeEntities)(e.name)})),r=e.split(",");return await t.filter(e=>r.includes(e.key))}}},username:{labels:{add:Object(n.__)("Username",'woocommerce'),placeholder:Object(n.__)("Search customer username",'woocommerce'),remove:Object(n.__)("Remove customer username filter",'woocommerce'),rule:Object(n.__)("Select a customer username filter match",'woocommerce'),title:Object(n.__)("{{title}}Username{{/title}} {{rule /}} {{filter /}}",'woocommerce'),filter:Object(n.__)("Select customer username",'woocommerce')},rules:[{value:"includes",label:Object(n._x)("Includes","customer usernames",'woocommerce')},{value:"excludes",label:Object(n._x)("Excludes","customer usernames",'woocommerce')}],input:{component:"Search",type:"usernames",getLabels:d.c}},email:{labels:{add:Object(n.__)("Email",'woocommerce'),placeholder:Object(n.__)("Search customer email",'woocommerce'),remove:Object(n.__)("Remove customer email filter",'woocommerce'),rule:Object(n.__)("Select a customer email filter match",'woocommerce'),title:Object(n.__)("{{title}}Email{{/title}} {{rule /}} {{filter /}}",'woocommerce'),filter:Object(n.__)("Select customer email",'woocommerce')},rules:[{value:"includes",label:Object(n._x)("Includes","customer emails",'woocommerce')},{value:"excludes",label:Object(n._x)("Excludes","customer emails",'woocommerce')}],input:{component:"Search",type:"emails",getLabels:Object(d.e)(m.NAMESPACE+"/customers",e=>({id:e.id,label:e.e