Skip to content

Commit 999bd00

Browse files
retrofoxmatticbot
authored andcommitted
Premium Analytics: declare the chart type attribute in widget.json (#53778)
* resolve toggle group icon references by name jpa/toggle-group takes jpa/<name> icons; drops the chart-line copies * carry widget attributes through the registry mirrors gutenberg#82485; an element keeps its icon reference * declare the chart type attribute in widget.json the module keeps only what JSON cannot carry; CHART_TYPE_ELEMENTS goes * keep the traffic chart interval ahead of the chart type the manifest orders the settings; a module-only one is listed by id * simplify widget attribute def * Update projects/packages/premium-analytics/changelog/update-pa-widget-attributes-registry Co-authored-by: louwie17 <lourensschep@gmail.com> * udpate jsdoc * carry widget attributes through the registry mirrors gutenberg#82485; an element keeps its icon reference * Update projects/packages/premium-analytics/changelog/update-pa-widget-attributes-registry Co-authored-by: louwie17 <lourensschep@gmail.com> * udpate jsdoc * keep the chart type attributes on their widgets the icon-reference form ships with the field alone; widgets move to widget.json in the follow-up, and the contract takes 1.15.0 after the registry landed at 1.14.0 * make resolveOptionIcons private, trim comments * list reportParams ahead of chartType in manifests * update the chart type alias comments * remove unused @wordpress/icons dependency --------- Co-authored-by: louwie17 <lourensschep@gmail.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/39400036462 Upstream-Ref: Automattic/jetpack@36c50b2
1 parent 579d24f commit 999bd00

30 files changed

Lines changed: 32 additions & 139 deletions

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.1-alpha] - unreleased
9+
10+
This is an alpha version! The changes listed here are not final.
11+
812
## [0.2.0] - 2026-10-19
913
### Added
1014
- Add the columns widgets: revenue by customer type, sales by device, total returns and sales by coupon, with the bookings variants of the first two; the store ones are placed on the WooCommerce tab by default. [#53477]
@@ -62,5 +66,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6266

6367
- Initial version.
6468

69+
[0.2.1-alpha]: https://github.com/Automattic/jetpack-woocommerce-stats/compare/v0.2.0...v0.2.1-alpha
6570
[0.2.0]: https://github.com/Automattic/jetpack-woocommerce-stats/compare/v0.1.0...v0.2.0
6671
[0.1.0]: https://github.com/Automattic/jetpack-woocommerce-stats/compare/v0.1.0-alpha...v0.1.0

‎build/constants.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
*/
1010

1111
return array(
12-
'version' => '0.2.0',
12+
'version' => '0.2.1-alpha',
1313
'build_url' => plugin_dir_url( __FILE__ ),
1414
);

‎build/i18n-manifest.json‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,18 @@
22
"bundles": [
33
"build/modules/store-performance-bookings/index.js",
44
"build/widgets/average-items-per-order/render.js",
5-
"build/widgets/average-items-per-order/widget.js",
65
"build/widgets/average-order-value/render.js",
7-
"build/widgets/average-order-value/widget.js",
86
"build/widgets/bookings-by-device/render.js",
97
"build/widgets/bookings-by-status/render.js",
108
"build/widgets/bookings-over-time/render.js",
11-
"build/widgets/bookings-over-time/widget.js",
129
"build/widgets/bookings-revenue-by-customer-type/render.js",
1310
"build/widgets/conversion-rate/render.js",
1411
"build/widgets/coupon-usage-over-time/render.js",
1512
"build/widgets/gross-sales-over-time/render.js",
16-
"build/widgets/gross-sales-over-time/widget.js",
1713
"build/widgets/net-sales-over-time/render.js",
18-
"build/widgets/net-sales-over-time/widget.js",
1914
"build/widgets/new-vs-returning-customer/render.js",
2015
"build/widgets/orders-fulfillment/render.js",
2116
"build/widgets/orders-over-time/render.js",
22-
"build/widgets/orders-over-time/widget.js",
2317
"build/widgets/payment-status/render.js",
2418
"build/widgets/revenue-by-customer-type/render.js",
2519
"build/widgets/sales-by-coupon/render.js",
@@ -35,9 +29,7 @@
3529
"build/widgets/top-performing-products/render.js",
3630
"build/widgets/total-returns/render.js",
3731
"build/widgets/total-sales-over-time/render.js",
38-
"build/widgets/total-sales-over-time/widget.js",
3932
"build/widgets/visitors-by-location/render.js",
40-
"build/widgets/visitors-over-time/render.js",
41-
"build/widgets/visitors-over-time/widget.js"
33+
"build/widgets/visitors-over-time/render.js"
4234
]
4335
}

‎build/widgets/average-items-per-order/widget.js‎

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'af296f1182289a320fb7');
1+
<?php return array('dependencies' => array(), 'version' => 'd7eda44813014efdb781');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var v=Object.create;var n=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var d=(t,a)=>()=>{try{return a||t((a={exports:{}}).exports,a),a.exports;}catch(e){throw a=0,e;}};var x=(t,a,e,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let f of k(a))!R.call(t,f)&&f!==e&&n(t,f,{get:()=>a[f],enumerable:!(p=L(a,f))||p.enumerable});return t;};var o=(t,a,e)=>(e=t!=null?v(C(t)):{},x(a||!t||!t.__esModule?n(e,"default",{value:t,enumerable:!0}):e,t));var h=d((S,c)=>{c.exports=window.wp.i18n;});var b=d((A,g)=>{g.exports=window.wp.primitives;});var r=d((D,y)=>{y.exports=window.ReactJSXRuntime;});var s=o(h(),1);var l=o(b(),1),m=o(r(),1),u=(0,m.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,m.jsx)(l.Path,{d:"M6.75 20V10M12 20V5M17.25 20V14",vectorEffect:"non-scaling-stroke"})});var i=o(r(),1),w=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M5.5 15.75L10 10.25L14 13.75L18.5 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});var T=[{value:"line",label:(0,s.__)("Line chart","jetpack-woocommerce-stats-pkg"),icon:w},{value:"bar",label:(0,s.__)("Bar chart","jetpack-woocommerce-stats-pkg"),icon:u}],H={attributes:[{id:"chartType",label:(0,s.__)("Chart type","jetpack-woocommerce-stats-pkg"),type:"jpa/toggle-group",elements:T,relevance:"high"}]};export{H as default};
1+
var t={};export{t as default};

‎build/widgets/average-order-value/widget.js‎

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd0a53bc1c8deb4d40fdd');
1+
<?php return array('dependencies' => array(), 'version' => 'd7eda44813014efdb781');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var v=Object.create;var n=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var d=(t,a)=>()=>{try{return a||t((a={exports:{}}).exports,a),a.exports;}catch(e){throw a=0,e;}};var x=(t,a,e,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let f of k(a))!R.call(t,f)&&f!==e&&n(t,f,{get:()=>a[f],enumerable:!(p=L(a,f))||p.enumerable});return t;};var o=(t,a,e)=>(e=t!=null?v(C(t)):{},x(a||!t||!t.__esModule?n(e,"default",{value:t,enumerable:!0}):e,t));var h=d((S,c)=>{c.exports=window.wp.i18n;});var b=d((A,g)=>{g.exports=window.wp.primitives;});var r=d((D,y)=>{y.exports=window.ReactJSXRuntime;});var s=o(h(),1);var l=o(b(),1),u=o(r(),1),m=(0,u.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,u.jsx)(l.Path,{d:"M6.75 20V10M12 20V5M17.25 20V14",vectorEffect:"non-scaling-stroke"})});var i=o(r(),1),w=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M5.5 15.75L10 10.25L14 13.75L18.5 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});var T=[{value:"line",label:(0,s.__)("Line chart","jetpack-woocommerce-stats-pkg"),icon:w},{value:"bar",label:(0,s.__)("Bar chart","jetpack-woocommerce-stats-pkg"),icon:m}],H={attributes:[{id:"chartType",label:(0,s.__)("Chart type","jetpack-woocommerce-stats-pkg"),type:"jpa/toggle-group",elements:T,relevance:"high"}]};export{H as default};
1+
var t={};export{t as default};

‎build/widgets/bookings-over-time/widget.js‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)