1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[8960],{89097:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(69307),r=n(70444);const a=(0,o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(r.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}))},98552:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(69307),r=n(94333),a=n(7862),s=n.n(a),l=n(92819),i=n(9818),c=n(75606),d=n(86020),m=n(67221),u=n(81921),p=n(14599),h=n(17844),v=n(73463);class _ extends o.Component{constructor(){super(),this.onDateSelect=this.onDateSelect.bind(this),this.onFilterSelect=this.onFilterSelect.bind(this),this.onAdvancedFilterAction=this.onAdvancedFilterAction.bind(this)}onDateSelect(e){const{report:t,addCesSurveyForAnalytics:n}=this.props;n(),(0,p.recordEvent)("datepicker_update",{report:t,...(0,l.omitBy)(e,l.isUndefined)})}onFilterSelect(e){const{report:t,addCesSurveyForAnalytics:n}=this.props,o=e.filter||e["filter-variations"];["single_product","single_category","single_coupon","single_variation"].includes(o)&&n();const r={report:t,filter:e.filter||"all"};"single_product"===e.filter&&(r.filter_variation=e["filter-variations"]||"all"),(0,p.recordEvent)("analytics_filter",r)}onAdvancedFilterAction(e,t){const{report:n,addCesSurveyForAnalytics:o}=this.props;switch(e){case"add":(0,p.recordEvent)("analytics_filters_add",{report:n,filter:t.key});break;case"remove":(0,p.recordEvent)("analytics_filters_remove",{report:n,filter:t.key});break;case"filter":const e=Object.keys(t).reduce(((e,n)=>(e[(0,l.snakeCase)(n)]=t[n],e)),{});o(),(0,p.recordEvent)("analytics_filters_filter",{report:n,...e});break;case"clear_all":(0,p.recordEvent)("analytics_filters_clear_all",{report:n});break;case"match":(0,p.recordEvent)("analytics_filters_all_any",{report:n,value:t.match})}}render(){const{advancedFilters:e,filters:t,path:n,query:r,showDatePicker:a,defaultDateRange:s}=this.props,{period:l,compare:i,before:c,after:m}=(0,u.getDateParamsFromQuery)(r,s),{primary:p,secondary:h}=(0,u.getCurrentDates)(r,s),_={period:l,compare:i,before:c,after:m,primaryDate:p,secondaryDate:h},f=this.context;return(0,o.createElement)(d.ReportFilters,{query:r,siteLocale:v.MV.siteLocale,currency:f.getCurrencyConfig(),path:n,filters:t,advancedFilters:e,showDatePicker:a,onDateSelect:this.onDateSelect,onFilterSelect:this.onFilterSelect,onAdvancedFilterAction:this.onAdvancedFilterAction,dateQuery:_,isoDateFormat:u.isoDateFormat})}}_.contextType=h.CurrencyContext;const f=(0,r.compose)((0,i.withSelect)((e=>{const{woocommerce_default_date_range:t}=e(m.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings");return{defaultDateRange:t}})),(0,i.withDispatch)((e=>{const{addCesSurveyForAnalytics:t}=e(c.STORE_KEY);return{addCesSurveyForAnalytics:t}})))(_);_.propTypes={advancedFilters:s().object,filters:s().array,path:s().string.isRequired,query:s().object,showDatePicker:s().bool,report:s().string.isRequired}},70943:(e,t,n)=>{n.r(t),n.d(t,{default:()=>j});var o=n(69307),r=n(65736),a=n(94333),s=n(92819),l=n(55609),i=n(92694),c=n(70444);const d=(0,o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(c.Path,{d:"M2 12C2 6.44444 6.44444 2 12 2C17.5556 2 22 6.44444 22 12C22 17.5556 17.5556 22 12 22C6.44444 22 2 17.5556 2 12ZM13 11V7H11V11H7V13H11V17H13V13H17V11H13Z"}));var m=n(23374),u=n(9818),p=n(86020),h=n(67221),v=n(10431),_=n(81921),f=n(14599),g=n(17844),y=n(89097);const w=(0,o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(c.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"}));var b=n(36886);const k=(0,o.lazy)((()=>Promise.all([n.e(9616),n.e(2397)]).then(n.bind(n,15646)))),E=(0,o.lazy)((()=>n.e(727).then(n.bind(n,21175)))),C=(0,o.lazy)((()=>n.e(2624).then(n.bind(n,77853)))),S=(0,i.applyFilters)("woocommerce_dashboard_default_sections",[{key:"store-performance",component:e=>(0,o.createElement)(o.Suspense,{fallback:(0,o.createElement)(p.Spinner,nu
|