diff --git a/composer.json b/composer.json index 7a77e5857..b9098cb1e 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "wordpress-plugin", "license": "GPL-2.0-or-later", "require": { - "automattic/jetpack-mu-wpcom": "^6.0.0" + "automattic/jetpack-mu-wpcom": "^6.0.1-alpha" }, "require-dev": { "yoast/phpunit-polyfills": "^1.1.1", diff --git a/composer.lock b/composer.lock index d9b291222..0de0bbdfd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c76721dd37e69b816bb2837c3818faa", + "content-hash": "4e8c52ed59dfdc0eea4b66d35fe8d8fd", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -12,7 +12,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats", - "reference": "3eb30c1d3cae4ee1f4d1124e5ed44aeab923ae4d" + "reference": "de96231050457309c4d52fa144daf995eb92b0b6" }, "require": { "php": ">=7.2" @@ -65,7 +65,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui", - "reference": "9d94665da072b0b4717703a6fe20d9d353b52102" + "reference": "afaabda82c82344d8bb4c941585d261c1412b901" }, "require": { "php": ">=7.2" @@ -130,7 +130,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-assets", - "reference": "4e36b4b9aebd44c1efc968fcd249c14370793ca7" + "reference": "325f89689b17cb32b55272978717f7bb9f276476" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -199,7 +199,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-blaze", - "reference": "e09ac142390461d29342e748d2a64041bdb0cd8a" + "reference": "aceff8f606ca6086dc20a2ba0eae967348a8ed0d" }, "require": { "automattic/jetpack-assets": "^4.0.1", @@ -280,7 +280,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-blocks", - "reference": "da2bed611b2224c23eef10994e4009a448ff7d51" + "reference": "6859698958a67f083b2f3ec083c1040ff061e114" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -342,7 +342,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-calypsoify", - "reference": "40c02ad52346a704ced49db56d236bf0b3266a2c" + "reference": "c37d10dd8f37511495e4643c27d0f422c8226029" }, "require": { "automattic/jetpack-assets": "^4.0.1", @@ -407,7 +407,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-classic-theme-helper", - "reference": "3f274a0592f3ab01e63ed9ba4ba17412825520cd" + "reference": "6b88576be9ec28f9e47dbeda412249da328625e4" }, "require": { "automattic/jetpack-assets": "^4.0.1", @@ -478,7 +478,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-compat", - "reference": "aa5509b4c1232dcf799befe143b3bb8ae0f15579" + "reference": "53c84106fcdce6f42d6d38569ea703cabc61e890" }, "require": { "php": ">=7.2" @@ -515,7 +515,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-connection", - "reference": "58fd951ca28d42e9eb1a6702bb54a01081734b4f" + "reference": "949dbd35cf55bd27c0e633bb2c6d8895f1f2a6ce" }, "require": { "automattic/jetpack-a8c-mc-stats": "^3.0.0", @@ -605,7 +605,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-constants", - "reference": "01a8dc9712f9e79dddf4f58e66a622e7b67fd94e" + "reference": "3bc760869f9e5f9d4a2b57ab55d4308bb1ed06c7" }, "require": { "php": ">=7.2" @@ -659,7 +659,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-device-detection", - "reference": "bc6231c70d31cca59a7b54f4db778cb1cb627deb" + "reference": "2ae8b30a027167ba6d9e61bbbf400deb1fa8e7e8" }, "require": { "php": ">=7.2" @@ -712,7 +712,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-google-analytics", - "reference": "7ac9f631d1482d6cc7edd2b5b9dff3a4807f9483" + "reference": "7cc7c42e0bfe87d5a66b305a338db93186713ecd" }, "require": { "automattic/jetpack-status": "^5.0.1", @@ -783,7 +783,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-ip", - "reference": "2ddaae6fefd881daacae1b5baf719fc5d4ec78a6" + "reference": "58823720775feb4cd7ff43ace97243d42e308d06" }, "require": { "php": ">=7.2" @@ -841,7 +841,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-jitm", - "reference": "b7f1c7bf1340f66fa17ffdf5d94762d5ea61860f" + "reference": "e4d8d11c4642be023ee04b335f0930f5c8ca059d" }, "require": { "automattic/jetpack-a8c-mc-stats": "^3.0.0", @@ -916,7 +916,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-logo", - "reference": "16ab50666c2b0a016969199a367af3e0ece5d02e" + "reference": "4d43cfd7292760f59ae443d6147541e6f90e5d92" }, "require": { "php": ">=7.2" @@ -969,7 +969,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-masterbar", - "reference": "eb111b75b4a70de7f9545469cbf76f213b04aaa9" + "reference": "3753d3cc678a7cf73055842f435bb64dc2941a2f" }, "require": { "automattic/jetpack-assets": "^4.0.1", @@ -1048,11 +1048,11 @@ }, { "name": "automattic/jetpack-mu-wpcom", - "version": "6.0.0", + "version": "6.0.1-alpha.1733362849", "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom", - "reference": "4488b84584a5e05b96b7ea92a20ecfa1baee3de4" + "reference": "278bc81956d75f2eb908ad069120c23256e95a3b" }, "require": { "automattic/jetpack-assets": "^4.0.1", @@ -1135,7 +1135,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-password-checker", - "reference": "770017def88748d769ee47ac19f057e410772618" + "reference": "1472d44ae83804815760c369c9a0d9fa04577050" }, "require": { "php": ">=7.2" @@ -1196,7 +1196,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-plans", - "reference": "9beaf1a3d004309ce00bf40586c8a50b7d83dfed" + "reference": "fc2f4865f85d20bbb22dc7417307822f9dd412a3" }, "require": { "automattic/jetpack-connection": "^6.1.1", @@ -1264,7 +1264,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-redirect", - "reference": "753f4b63a62bd7d4193f69197b5b34d9bef89cb3" + "reference": "9ec07a53721bdfa733e014f7acd9a26c4cc0242f" }, "require": { "automattic/jetpack-status": "^5.0.1", @@ -1319,7 +1319,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-roles", - "reference": "07fd84c2240e9a12ac73dcddbbf1afd9e243b2a1" + "reference": "523e3fb0d40c4c900d4964dc531b8bee1e28b18c" }, "require": { "php": ">=7.2" @@ -1373,7 +1373,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-stats", - "reference": "1141f0ba5e653f580c20f66804e9e1b6109e56f0" + "reference": "5f700ce8efc391cf0fd4eeee9fc1728e3b7f5959" }, "require": { "automattic/jetpack-connection": "^6.1.1", @@ -1440,7 +1440,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-stats-admin", - "reference": "a63e0326bb2a326d7e1512768e1d8add64e04c4e" + "reference": "ba1250715d73ca0dc10a18fa8c7067e99883224a" }, "require": { "automattic/jetpack-connection": "^6.1.1", @@ -1513,7 +1513,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-status", - "reference": "09721c532b6d3924a9d8c1cce3cfc048a83266c1" + "reference": "d51fefd2d7e90beb85370b2f32b63325a4dcb8aa" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -1577,7 +1577,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-sync", - "reference": "0b1a50d79c7f3d9ecd486ba68ac29d00d6564b40" + "reference": "2ed7682bd25e0b2a2b91da3eac28b32eab998881" }, "require": { "automattic/jetpack-connection": "^6.1.1", @@ -1655,7 +1655,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/scheduled-updates", - "reference": "328d3a1571e67b2da21bd3ee1c18943d9b7be580" + "reference": "14dba884a3df99d350699c8d6dee0968f806bb31" }, "require": { "automattic/jetpack-connection": "^6.1.1", @@ -1807,7 +1807,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-changelogger", - "reference": "c4f43010824807269981ee21b6d3ed6ec4fc2f19" + "reference": "95989b1fd5860f657acc31080adb2fc59abafc38" }, "require": { "php": ">=7.2.5", diff --git a/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md b/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md index f408523a2..d39834c2e 100644 --- a/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md +++ b/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.0.1-alpha] - unreleased + +This is an alpha version! The changes listed here are not final. + +### Fixed +- Load WPCOM sidebar notice async + ## [6.0.0] - 2024-12-04 ### Changed - Updated dependencies. [#40286] @@ -1316,6 +1323,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Testing initial package release. +[6.0.1-alpha]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v6.0.0...v6.0.1-alpha [6.0.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.66.0...v6.0.0 [5.66.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.65.0...v5.66.0 [5.65.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.64.0...v5.65.0 diff --git a/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.asset.php b/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.asset.php index c876e4dbd..c0492bb43 100644 --- a/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.asset.php +++ b/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.asset.php @@ -1 +1 @@ - array(), 'version' => '922c361b690dae5390ad'); + array(), 'version' => '58e5ab90569a6b59ac8e'); diff --git a/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.js b/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.js index f642ee51e..1ca052258 100644 --- a/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.js +++ b/vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-sidebar-notice/wpcom-sidebar-notice.js @@ -1 +1 @@ -(()=>{"use strict";var t={92299:(t,e,n)=>{n.d(e,{k:()=>i});const i=(t,e={},n=null,i=null)=>{const s=window.JP_CONNECTION_INITIAL_STATE?.userConnectionData?.currentUser??{},o=n??s.id,a=i??s.username,r=e.blogId??s.blogId;window._tkq=window._tkq||[],a&&o&&window._tkq.push(["identifyUser",o,a]),window._tkq.push(["recordEvent",t,{...e,blog_id:r}])}}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i=n(92299);const s=t=>{t&&(0,i.k)(t.name,t.props,wpcomSidebarNotice.user.ID,wpcomSidebarNotice.user.username)};document.addEventListener("DOMContentLoaded",(()=>{const t=document.querySelector("#adminmenu");if(!t||"undefined"==typeof wpcomSidebarNotice)return;t.insertAdjacentHTML("afterbegin",`\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`),s(wpcomSidebarNotice.tracks?.display);const e=t.firstElementChild;e.addEventListener("click",(t=>{t.target.classList.contains("upsell_banner__dismiss")||t.target.closest(".upsell_banner__dismiss")?(t.preventDefault(),wp.ajax.post("wpcom_dismiss_sidebar_notice",{id:e.dataset.id,feature_class:e.dataset.featureClass,_ajax_nonce:wpcomSidebarNotice.dismissNonce}),e.remove(),s(wpcomSidebarNotice.tracks?.dismiss)):s(wpcomSidebarNotice.tracks?.click)}))}))})(); \ No newline at end of file +(()=>{"use strict";var t={92299:(t,e,n)=>{n.d(e,{k:()=>s});const s=(t,e={},n=null,s=null)=>{const a=window.JP_CONNECTION_INITIAL_STATE?.userConnectionData?.currentUser??{},i=n??a.id,o=s??a.username,r=e.blogId??a.blogId;window._tkq=window._tkq||[],o&&i&&window._tkq.push(["identifyUser",i,o]),window._tkq.push(["recordEvent",t,{...e,blog_id:r}])}}},e={};function n(s){var a=e[s];if(void 0!==a)return a.exports;var i=e[s]={exports:{}};return t[s](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s=n(92299);const a=(t,e)=>{t&&(0,s.k)(t.name,t.props,e.user.ID,e.user.username)};document.addEventListener("DOMContentLoaded",(async()=>{try{const t=await fetch(`${wpcomSidebarNoticeConfig.ajaxUrl}?action=wpcom_fetch_sidebar_notice&nonce=${wpcomSidebarNoticeConfig.nonce}`);if(200===!t.status)return;const e=await t.json();e.success&&e.data&&(t=>{const e=document.querySelector("#adminmenu");if(!e||!t)return;e.insertAdjacentHTML("afterbegin",`\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`),a(t.tracks?.display);const n=e.firstElementChild;n.addEventListener("click",(e=>{e.target.classList.contains("upsell_banner__dismiss")||e.target.closest(".upsell_banner__dismiss")?(e.preventDefault(),wp.ajax.post("wpcom_dismiss_sidebar_notice",{id:n.dataset.id,feature_class:n.dataset.featureClass,_ajax_nonce:t.dismissNonce}),n.remove(),a(t.tracks?.dismiss)):a(t.tracks?.click)}))})(e.data)}catch(t){}}))})(); \ No newline at end of file diff --git a/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 05261495c..126192ca2 100644 --- a/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -15,7 +15,7 @@ * Jetpack_Mu_Wpcom main class. */ class Jetpack_Mu_Wpcom { - const PACKAGE_VERSION = '6.0.0'; + const PACKAGE_VERSION = '6.0.1-alpha'; const PKG_DIR = __DIR__ . '/../'; const BASE_DIR = __DIR__ . '/'; const BASE_FILE = __FILE__; diff --git a/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-sidebar-notice/wpcom-sidebar-notice.js b/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-sidebar-notice/wpcom-sidebar-notice.js index 1dcf50817..e036d3316 100644 --- a/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-sidebar-notice/wpcom-sidebar-notice.js +++ b/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-sidebar-notice/wpcom-sidebar-notice.js @@ -1,23 +1,23 @@ -/* global wp, wpcomSidebarNotice */ +/* global wp, wpcomSidebarNoticeConfig */ import { wpcomTrackEvent } from '../../common/tracks'; import './wpcom-sidebar-notice.scss'; -const wpcomSidebarNoticeRecordEvent = event => { +const wpcomSidebarNoticeRecordEvent = ( event, wpcomSidebarNoticeData ) => { if ( ! event ) { return; } wpcomTrackEvent( event.name, event.props, - wpcomSidebarNotice.user.ID, - wpcomSidebarNotice.user.username + wpcomSidebarNoticeData.user.ID, + wpcomSidebarNoticeData.user.username ); }; -const wpcomShowSidebarNotice = () => { +const wpcomShowSidebarNotice = wpcomSidebarNoticeData => { const adminMenu = document.querySelector( '#adminmenu' ); - if ( ! adminMenu || typeof wpcomSidebarNotice === 'undefined' ) { + if ( ! adminMenu || ! wpcomSidebarNoticeData ) { return; } @@ -28,21 +28,23 @@ const wpcomShowSidebarNotice = () => {