From 9bbcfbd718dfea4074ec043864db36222d41dc36 Mon Sep 17 00:00:00 2001 From: Derrick Koo Date: Tue, 5 Jul 2022 12:55:00 -0600 Subject: [PATCH] fix: resolve merge conflict with release --- CHANGELOG.md | 7 + newspack-blocks.php | 4 +- package-lock.json | 1182 +++---------------------- package.json | 4 +- src/blocks/author-profile/edit.js | 35 +- src/blocks/author-profile/editor.scss | 2 +- 6 files changed, 153 insertions(+), 1081 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a158faad6..ef62f921b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.53.1](https://github.com/Automattic/newspack-blocks/compare/v1.53.0...v1.53.1) (2022-07-05) + + +### Bug Fixes + +* guest author selection in Author Profile block ([#1188](https://github.com/Automattic/newspack-blocks/issues/1188)) ([085efaf](https://github.com/Automattic/newspack-blocks/commit/085efaf431b70ad15514a0d33c7ad0ce0697387e)) + # [1.53.0](https://github.com/Automattic/newspack-blocks/compare/v1.52.0...v1.53.0) (2022-06-27) diff --git a/newspack-blocks.php b/newspack-blocks.php index 1caa05b41..a5b51f869 100755 --- a/newspack-blocks.php +++ b/newspack-blocks.php @@ -7,7 +7,7 @@ * Author URI: https://newspack.blog/ * Text Domain: newspack-blocks * Domain Path: /languages - * Version: 1.53.0 + * Version: 1.53.1 * * @package Newspack_Blocks */ @@ -15,7 +15,7 @@ define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ ); define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' ); define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) ); -define( 'NEWSPACK_BLOCKS__VERSION', '1.53.0' ); +define( 'NEWSPACK_BLOCKS__VERSION', '1.53.1' ); require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php'; diff --git a/package-lock.json b/package-lock.json index a29370f07..5e1facaba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { - "name": "newspack-blocks", - "version": "1.53.0", + "name": "@automattic/newspack-blocks", + "version": "1.53.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "newspack-blocks", - "version": "1.53.0", + "name": "@automattic/newspack-blocks", + "version": "1.53.1", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { "@stripe/stripe-js": "^1.32.0", "classnames": "^2.3.1", "lodash": "^4.17.21", - "newspack-components": "^2.0.3", + "newspack-components": "^2.1.0", "react": "^17.0.2", "redux": "^4.2.0", "redux-saga": "^1.1.3", @@ -150,6 +150,7 @@ }, "node_modules/@babel/compat-data": { "version": "7.16.4", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -157,6 +158,7 @@ }, "node_modules/@babel/core": { "version": "7.16.5", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.16.0", @@ -185,6 +187,7 @@ }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.0", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -192,6 +195,7 @@ }, "node_modules/@babel/generator": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.16.7", @@ -227,6 +231,7 @@ }, "node_modules/@babel/helper-compilation-targets": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.16.4", @@ -243,6 +248,7 @@ }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.0", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -311,6 +317,7 @@ }, "node_modules/@babel/helper-environment-visitor": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.16.7" @@ -332,6 +339,7 @@ }, "node_modules/@babel/helper-function-name": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-get-function-arity": "^7.16.7", @@ -344,6 +352,7 @@ }, "node_modules/@babel/helper-get-function-arity": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.16.7" @@ -354,6 +363,7 @@ }, "node_modules/@babel/helper-hoist-variables": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.16.7" @@ -385,6 +395,7 @@ }, "node_modules/@babel/helper-module-transforms": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.16.7", @@ -448,6 +459,7 @@ }, "node_modules/@babel/helper-simple-access": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.16.7" @@ -469,6 +481,7 @@ }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.16.7" @@ -486,6 +499,7 @@ }, "node_modules/@babel/helper-validator-option": { "version": "7.16.7", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -507,6 +521,7 @@ }, "node_modules/@babel/helpers": { "version": "7.16.5", + "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.16.0", @@ -531,6 +546,7 @@ }, "node_modules/@babel/parser": { "version": "7.16.7", + "dev": true, "license": "MIT", "bin": { "parser": "bin/babel-parser.js" @@ -1815,6 +1831,7 @@ }, "node_modules/@babel/template": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.16.7", @@ -1827,6 +1844,7 @@ }, "node_modules/@babel/traverse": { "version": "7.16.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.16.7", @@ -6074,26 +6092,6 @@ "node": ">=0.10.0" } }, - "node_modules/array.prototype.filter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", - "integrity": "sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==", - "dev": true, - "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.find": { "version": "2.1.2", "license": "MIT", @@ -6672,6 +6670,7 @@ }, "node_modules/browserslist": { "version": "4.17.6", + "dev": true, "license": "MIT", "dependencies": { "caniuse-lite": "^1.0.30001274", @@ -6848,6 +6847,7 @@ }, "node_modules/caniuse-lite": { "version": "1.0.30001278", + "dev": true, "license": "CC-BY-4.0", "funding": { "type": "opencollective", @@ -6941,267 +6941,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cheerio": { - "version": "1.0.0-rc.11", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.11.tgz", - "integrity": "sha512-bQwNaDIBKID5ts/DsdhxrjqFXYfLw4ste+wMKqWA8DyKcS4qwsPP4Bk8ZNaTJjvpiX/qW3BT4sU7d6Bh5i+dag==", - "dev": true, - "peer": true, - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "peer": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio-select/node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "peer": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio-select/node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio-select/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "peer": true - }, - "node_modules/cheerio-select/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "peer": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/entities": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", - "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "peer": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "peer": true - }, - "node_modules/cheerio/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "peer": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/entities": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", - "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "entities": "^4.3.0" - } - }, - "node_modules/cheerio/node_modules/parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", - "dev": true, - "peer": true, - "dependencies": { - "entities": "^4.3.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/chokidar": { "version": "3.5.2", "dev": true, @@ -8601,6 +8340,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -8857,13 +8597,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", - "dev": true, - "peer": true - }, "node_modules/doctrine": { "version": "3.0.0", "dev": true, @@ -9034,6 +8767,7 @@ }, "node_modules/electron-to-chromium": { "version": "1.3.890", + "dev": true, "license": "ISC" }, "node_modules/emittery": { @@ -9127,40 +8861,6 @@ "node": ">=4" } }, - "node_modules/enzyme": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", - "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", - "dev": true, - "peer": true, - "dependencies": { - "array.prototype.flat": "^1.2.3", - "cheerio": "^1.0.0-rc.3", - "enzyme-shallow-equal": "^1.0.1", - "function.prototype.name": "^1.1.2", - "has": "^1.0.3", - "html-element-map": "^1.2.0", - "is-boolean-object": "^1.0.1", - "is-callable": "^1.1.5", - "is-number-object": "^1.0.4", - "is-regex": "^1.0.5", - "is-string": "^1.0.5", - "is-subset": "^0.1.1", - "lodash.escape": "^4.0.1", - "lodash.isequal": "^4.5.0", - "object-inspect": "^1.7.0", - "object-is": "^1.0.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.1", - "object.values": "^1.1.1", - "raf": "^3.4.1", - "rst-selector-parser": "^2.2.3", - "string.prototype.trim": "^1.2.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/enzyme-matchers": { "version": "7.1.2", "dev": true, @@ -9206,13 +8906,6 @@ "dev": true, "license": "MIT" }, - "node_modules/enzyme/node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true, - "peer": true - }, "node_modules/equivalent-key-map": { "version": "0.2.2", "license": "MIT" @@ -9271,13 +8964,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true, - "peer": true - }, "node_modules/es-module-lexer": { "version": "0.9.3", "dev": true, @@ -9326,6 +9012,7 @@ }, "node_modules/escalade": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -10737,6 +10424,7 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -10976,6 +10664,7 @@ }, "node_modules/globals": { "version": "11.12.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -11330,20 +11019,6 @@ "dev": true, "license": "MIT" }, - "node_modules/html-element-map": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", - "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", - "dev": true, - "peer": true, - "dependencies": { - "array.prototype.filter": "^1.0.0", - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/html-encoding-sniffer": { "version": "2.0.1", "dev": true, @@ -15100,6 +14775,7 @@ }, "node_modules/jsesc": { "version": "2.5.2", + "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -15143,6 +14819,7 @@ }, "node_modules/json5": { "version": "2.2.0", + "dev": true, "license": "MIT", "dependencies": { "minimist": "^1.2.5" @@ -15722,25 +15399,11 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.escape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", - "integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==", - "dev": true, - "peer": true - }, "node_modules/lodash.escaperegexp": { "version": "4.1.2", "dev": true, "license": "MIT" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true, - "peer": true - }, "node_modules/lodash.get": { "version": "4.4.2", "dev": true, @@ -16593,6 +16256,7 @@ }, "node_modules/minimist": { "version": "1.2.5", + "dev": true, "license": "MIT" }, "node_modules/minimist-options": { @@ -16725,19 +16389,13 @@ "node": "*" } }, - "node_modules/moo": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", - "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==", - "dev": true, - "peer": true - }, "node_modules/mousetrap": { "version": "1.6.5", "license": "Apache-2.0 WITH LLVM-exception" }, "node_modules/ms": { "version": "2.1.2", + "dev": true, "license": "MIT" }, "node_modules/mute-stream": { @@ -16788,36 +16446,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", - "dev": true, - "peer": true, - "dependencies": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" - }, - "bin": { - "nearley-railroad": "bin/nearley-railroad.js", - "nearley-test": "bin/nearley-test.js", - "nearley-unparse": "bin/nearley-unparse.js", - "nearleyc": "bin/nearleyc.js" - }, - "funding": { - "type": "individual", - "url": "https://nearley.js.org/#give-to-nearley" - } - }, - "node_modules/nearley/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "peer": true - }, "node_modules/neo-async": { "version": "2.6.2", "dev": true, @@ -16829,8 +16457,9 @@ "license": "MIT" }, "node_modules/newspack-components": { - "version": "2.0.3", - "license": "GPL-2.0-or-later", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/newspack-components/-/newspack-components-2.1.0.tgz", + "integrity": "sha512-dda8pMjyWZdLg0zGDTYabo5KtdHnwyw4YjX42oJWMiqcNo58gaTmOHlPGKzKggFXCwrMFHm4Q2A2YXKodgImNQ==", "dependencies": { "@wordpress/base-styles": "^4.0.0", "@wordpress/components": "^19.0.1", @@ -16858,19 +16487,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/newspack-components/node_modules/react": { - "version": "16.14.0", - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/newspack-components/node_modules/react-daterange-picker": { "version": "2.0.1", "license": "Apache-2.0", @@ -16892,29 +16508,6 @@ "react-dom": "0.14.x || 15.x.x || 16.x.x" } }, - "node_modules/newspack-components/node_modules/react-dom": { - "version": "16.14.0", - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - }, - "peerDependencies": { - "react": "^16.14.0" - } - }, - "node_modules/newspack-components/node_modules/scheduler": { - "version": "0.19.1", - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, "node_modules/newspack-scripts": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/newspack-scripts/-/newspack-scripts-3.3.2.tgz", @@ -17909,6 +17502,7 @@ }, "node_modules/node-releases": { "version": "2.0.1", + "dev": true, "license": "MIT" }, "node_modules/normalize-package-data": { @@ -21353,75 +20947,6 @@ "dev": true, "license": "MIT" }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "peer": true, - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "peer": true - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/entities": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", - "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", - "dev": true, - "peer": true, - "dependencies": { - "entities": "^4.3.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/pascalcase": { "version": "0.1.1", "dev": true, @@ -21488,6 +21013,7 @@ }, "node_modules/picocolors": { "version": "1.0.0", + "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -23458,37 +22984,6 @@ "node": ">=8" } }, - "node_modules/raf": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", - "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", - "dev": true, - "peer": true, - "dependencies": { - "performance-now": "^2.1.0" - } - }, - "node_modules/railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", - "dev": true, - "peer": true - }, - "node_modules/randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "dev": true, - "peer": true, - "dependencies": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/randombytes": { "version": "2.1.0", "dev": true, @@ -24633,17 +24128,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rst-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", - "integrity": "sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA==", - "dev": true, - "peer": true, - "dependencies": { - "lodash.flattendeep": "^4.4.0", - "nearley": "^2.7.10" - } - }, "node_modules/rsvp": { "version": "4.8.5", "dev": true, @@ -26207,24 +25691,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz", - "integrity": "sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ==", - "dev": true, - "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/string.prototype.trimend": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", @@ -28636,10 +28102,12 @@ } }, "@babel/compat-data": { - "version": "7.16.4" + "version": "7.16.4", + "dev": true }, "@babel/core": { "version": "7.16.5", + "dev": true, "requires": { "@babel/code-frame": "^7.16.0", "@babel/generator": "^7.16.5", @@ -28659,12 +28127,14 @@ }, "dependencies": { "semver": { - "version": "6.3.0" + "version": "6.3.0", + "dev": true } } }, "@babel/generator": { "version": "7.16.7", + "dev": true, "requires": { "@babel/types": "^7.16.7", "jsesc": "^2.5.1", @@ -28688,6 +28158,7 @@ }, "@babel/helper-compilation-targets": { "version": "7.16.7", + "dev": true, "requires": { "@babel/compat-data": "^7.16.4", "@babel/helper-validator-option": "^7.16.7", @@ -28696,7 +28167,8 @@ }, "dependencies": { "semver": { - "version": "6.3.0" + "version": "6.3.0", + "dev": true } } }, @@ -28743,6 +28215,7 @@ }, "@babel/helper-environment-visitor": { "version": "7.16.7", + "dev": true, "requires": { "@babel/types": "^7.16.7" } @@ -28756,6 +28229,7 @@ }, "@babel/helper-function-name": { "version": "7.16.7", + "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.16.7", "@babel/template": "^7.16.7", @@ -28764,12 +28238,14 @@ }, "@babel/helper-get-function-arity": { "version": "7.16.7", + "dev": true, "requires": { "@babel/types": "^7.16.7" } }, "@babel/helper-hoist-variables": { "version": "7.16.7", + "dev": true, "requires": { "@babel/types": "^7.16.7" } @@ -28789,6 +28265,7 @@ }, "@babel/helper-module-transforms": { "version": "7.16.7", + "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-module-imports": "^7.16.7", @@ -28832,6 +28309,7 @@ }, "@babel/helper-simple-access": { "version": "7.16.7", + "dev": true, "requires": { "@babel/types": "^7.16.7" } @@ -28845,6 +28323,7 @@ }, "@babel/helper-split-export-declaration": { "version": "7.16.7", + "dev": true, "requires": { "@babel/types": "^7.16.7" } @@ -28853,7 +28332,8 @@ "version": "7.16.7" }, "@babel/helper-validator-option": { - "version": "7.16.7" + "version": "7.16.7", + "dev": true }, "@babel/helper-wrap-function": { "version": "7.16.7", @@ -28867,6 +28347,7 @@ }, "@babel/helpers": { "version": "7.16.5", + "dev": true, "requires": { "@babel/template": "^7.16.0", "@babel/traverse": "^7.16.5", @@ -28882,7 +28363,8 @@ } }, "@babel/parser": { - "version": "7.16.7" + "version": "7.16.7", + "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.16.7", @@ -29635,6 +29117,7 @@ }, "@babel/template": { "version": "7.16.7", + "dev": true, "requires": { "@babel/code-frame": "^7.16.7", "@babel/parser": "^7.16.7", @@ -29643,6 +29126,7 @@ }, "@babel/traverse": { "version": "7.16.7", + "dev": true, "requires": { "@babel/code-frame": "^7.16.7", "@babel/generator": "^7.16.7", @@ -30673,8 +30157,7 @@ }, "@octokit/plugin-request-log": { "version": "1.0.4", - "dev": true, - "requires": {} + "dev": true }, "@octokit/plugin-rest-endpoint-methods": { "version": "5.13.0", @@ -31664,8 +31147,7 @@ }, "@webpack-cli/configtest": { "version": "1.1.0", - "dev": true, - "requires": {} + "dev": true }, "@webpack-cli/info": { "version": "1.4.0", @@ -31676,8 +31158,7 @@ }, "@webpack-cli/serve": { "version": "1.6.0", - "dev": true, - "requires": {} + "dev": true }, "@wojtekmaj/enzyme-adapter-react-17": { "version": "0.6.5", @@ -31730,8 +31211,7 @@ }, "@wordpress/babel-plugin-import-jsx-pragma": { "version": "3.1.0", - "dev": true, - "requires": {} + "dev": true }, "@wordpress/babel-preset-default": { "version": "6.5.0", @@ -32422,13 +31902,11 @@ }, "acorn-import-assertions": { "version": "1.8.0", - "dev": true, - "requires": {} + "dev": true }, "acorn-jsx": { "version": "5.3.2", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -32480,8 +31958,7 @@ }, "ajv-keywords": { "version": "3.5.2", - "dev": true, - "requires": {} + "dev": true }, "alphanum-sort": { "version": "1.0.2", @@ -32593,20 +32070,6 @@ "version": "0.3.2", "dev": true }, - "array.prototype.filter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", - "integrity": "sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==", - "dev": true, - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - } - }, "array.prototype.find": { "version": "2.1.2", "requires": { @@ -32987,6 +32450,7 @@ }, "browserslist": { "version": "4.17.6", + "dev": true, "requires": { "caniuse-lite": "^1.0.30001274", "electron-to-chromium": "^1.3.886", @@ -33106,7 +32570,8 @@ } }, "caniuse-lite": { - "version": "1.0.30001278" + "version": "1.0.30001278", + "dev": true }, "capture-exit": { "version": "2.0.0", @@ -33160,192 +32625,6 @@ "version": "0.7.0", "dev": true }, - "cheerio": { - "version": "1.0.0-rc.11", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.11.tgz", - "integrity": "sha512-bQwNaDIBKID5ts/DsdhxrjqFXYfLw4ste+wMKqWA8DyKcS4qwsPP4Bk8ZNaTJjvpiX/qW3BT4sU7d6Bh5i+dag==", - "dev": true, - "peer": true, - "requires": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "tslib": "^2.4.0" - }, - "dependencies": { - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "peer": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "peer": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "peer": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "peer": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - } - }, - "entities": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", - "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==", - "dev": true, - "peer": true - }, - "htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", - "dev": true, - "peer": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "entities": "^4.3.0" - } - }, - "parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", - "dev": true, - "peer": true, - "requires": { - "entities": "^4.3.0" - } - } - } - }, - "cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "peer": true, - "requires": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "dependencies": { - "css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "peer": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - } - }, - "css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "peer": true - }, - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "peer": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "peer": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "peer": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "peer": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - } - }, - "entities": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", - "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==", - "dev": true, - "peer": true - }, - "nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "peer": true, - "requires": { - "boolbase": "^1.0.0" - } - } - } - }, "chokidar": { "version": "3.5.2", "dev": true, @@ -34315,6 +33594,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "requires": { "ms": "2.1.2" } @@ -34471,13 +33751,6 @@ "direction": { "version": "1.0.4" }, - "discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", - "dev": true, - "peer": true - }, "doctrine": { "version": "3.0.0", "dev": true, @@ -34605,7 +33878,8 @@ } }, "electron-to-chromium": { - "version": "1.3.890" + "version": "1.3.890", + "dev": true }, "emittery": { "version": "0.8.1", @@ -34664,46 +33938,6 @@ "version": "7.8.1", "dev": true }, - "enzyme": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", - "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", - "dev": true, - "peer": true, - "requires": { - "array.prototype.flat": "^1.2.3", - "cheerio": "^1.0.0-rc.3", - "enzyme-shallow-equal": "^1.0.1", - "function.prototype.name": "^1.1.2", - "has": "^1.0.3", - "html-element-map": "^1.2.0", - "is-boolean-object": "^1.0.1", - "is-callable": "^1.1.5", - "is-number-object": "^1.0.4", - "is-regex": "^1.0.5", - "is-string": "^1.0.5", - "is-subset": "^0.1.1", - "lodash.escape": "^4.0.1", - "lodash.isequal": "^4.5.0", - "object-inspect": "^1.7.0", - "object-is": "^1.0.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.1", - "object.values": "^1.1.1", - "raf": "^3.4.1", - "rst-selector-parser": "^2.2.3", - "string.prototype.trim": "^1.2.1" - }, - "dependencies": { - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true, - "peer": true - } - } - }, "enzyme-matchers": { "version": "7.1.2", "dev": true, @@ -34781,13 +34015,6 @@ "unbox-primitive": "^1.0.2" } }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true, - "peer": true - }, "es-module-lexer": { "version": "0.9.3", "dev": true @@ -34824,7 +34051,8 @@ } }, "escalade": { - "version": "3.1.1" + "version": "3.1.1", + "dev": true }, "escape-string-regexp": { "version": "4.0.0" @@ -35004,8 +34232,7 @@ }, "eslint-config-prettier": { "version": "8.3.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.6", @@ -35742,7 +34969,8 @@ "version": "1.2.2" }, "gensync": { - "version": "1.0.0-beta.2" + "version": "1.0.0-beta.2", + "dev": true }, "get-caller-file": { "version": "2.0.5", @@ -35900,7 +35128,8 @@ } }, "globals": { - "version": "11.12.0" + "version": "11.12.0", + "dev": true }, "globby": { "version": "11.1.0", @@ -36137,17 +35366,6 @@ "version": "1.0.0", "dev": true }, - "html-element-map": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", - "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", - "dev": true, - "peer": true, - "requires": { - "array.prototype.filter": "^1.0.0", - "call-bind": "^1.0.2" - } - }, "html-encoding-sniffer": { "version": "2.0.1", "dev": true, @@ -36228,8 +35446,7 @@ }, "icss-utils": { "version": "5.1.0", - "dev": true, - "requires": {} + "dev": true }, "identity-obj-proxy": { "version": "3.0.0", @@ -38016,8 +37233,7 @@ }, "jest-pnp-resolver": { "version": "1.2.2", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.4.0", @@ -38602,7 +37818,8 @@ } }, "jsesc": { - "version": "2.5.2" + "version": "2.5.2", + "dev": true }, "json-parse-better-errors": { "version": "1.0.2", @@ -38633,6 +37850,7 @@ }, "json5": { "version": "2.2.0", + "dev": true, "requires": { "minimist": "^1.2.5" } @@ -38994,24 +38212,10 @@ "version": "4.0.8", "dev": true }, - "lodash.escape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", - "integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==", - "dev": true, - "peer": true - }, "lodash.escaperegexp": { "version": "4.1.2", "dev": true }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true, - "peer": true - }, "lodash.get": { "version": "4.4.2", "dev": true @@ -39561,7 +38765,8 @@ } }, "minimist": { - "version": "1.2.5" + "version": "1.2.5", + "dev": true }, "minimist-options": { "version": "4.1.0", @@ -39639,18 +38844,12 @@ "moment": ">= 2.9.0" } }, - "moo": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", - "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==", - "dev": true, - "peer": true - }, "mousetrap": { "version": "1.6.5" }, "ms": { - "version": "2.1.2" + "version": "2.1.2", + "dev": true }, "mute-stream": { "version": "0.0.7", @@ -39686,28 +38885,6 @@ "version": "1.4.0", "dev": true }, - "nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", - "dev": true, - "peer": true, - "requires": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "peer": true - } - } - }, "neo-async": { "version": "2.6.2", "dev": true @@ -39717,7 +38894,9 @@ "dev": true }, "newspack-components": { - "version": "2.0.3", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/newspack-components/-/newspack-components-2.1.0.tgz", + "integrity": "sha512-dda8pMjyWZdLg0zGDTYabo5KtdHnwyw4YjX42oJWMiqcNo58gaTmOHlPGKzKggFXCwrMFHm4Q2A2YXKodgImNQ==", "requires": { "@wordpress/base-styles": "^4.0.0", "@wordpress/components": "^19.0.1", @@ -39738,15 +38917,6 @@ "side-channel": "^1.0.4" } }, - "react": { - "version": "16.14.0", - "peer": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, "react-daterange-picker": { "version": "2.0.1", "requires": { @@ -39757,24 +38927,6 @@ "prop-types": "^15.6.0", "react-addons-pure-render-mixin": "^15.6.2" } - }, - "react-dom": { - "version": "16.14.0", - "peer": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "scheduler": { - "version": "0.19.1", - "peer": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } } } }, @@ -40191,8 +39343,7 @@ }, "eslint-plugin-react-hooks": { "version": "4.3.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-utils": { "version": "3.0.0", @@ -40291,8 +39442,7 @@ }, "postcss-safe-parser": { "version": "6.0.0", - "dev": true, - "requires": {} + "dev": true }, "semver": { "version": "6.3.0", @@ -40427,7 +39577,8 @@ "dev": true }, "node-releases": { - "version": "2.0.1" + "version": "2.0.1", + "dev": true }, "normalize-package-data": { "version": "3.0.3", @@ -42839,53 +41990,6 @@ "version": "6.0.1", "dev": true }, - "parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "peer": true, - "requires": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "peer": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "peer": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "entities": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", - "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==", - "dev": true, - "peer": true - }, - "parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", - "dev": true, - "peer": true, - "requires": { - "entities": "^4.3.0" - } - } - } - }, "pascalcase": { "version": "0.1.1", "dev": true @@ -42928,7 +42032,8 @@ "dev": true }, "picocolors": { - "version": "1.0.0" + "version": "1.0.0", + "dev": true }, "picomatch": { "version": "2.3.1", @@ -43236,8 +42341,7 @@ }, "postcss-focus-within": { "version": "5.0.1", - "dev": true, - "requires": {} + "dev": true }, "postcss-html": { "version": "0.36.0", @@ -43490,8 +42594,7 @@ }, "postcss-modules-extract-imports": { "version": "3.0.0", - "dev": true, - "requires": {} + "dev": true }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -44003,8 +43106,7 @@ }, "postcss-syntax": { "version": "0.36.2", - "dev": true, - "requires": {} + "dev": true }, "postcss-unique-selectors": { "version": "4.0.1", @@ -44187,34 +43289,6 @@ "version": "4.0.1", "dev": true }, - "raf": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", - "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", - "dev": true, - "peer": true, - "requires": { - "performance-now": "^2.1.0" - } - }, - "railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", - "dev": true, - "peer": true - }, - "randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "dev": true, - "peer": true, - "requires": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - } - }, "randombytes": { "version": "2.1.0", "dev": true, @@ -44273,8 +43347,7 @@ } }, "react-colorful": { - "version": "5.5.0", - "requires": {} + "version": "5.5.0" }, "react-dates": { "version": "17.2.0", @@ -44342,8 +43415,7 @@ } }, "react-resize-aware": { - "version": "3.1.1", - "requires": {} + "version": "3.1.1" }, "react-router": { "version": "5.2.1", @@ -44396,8 +43468,7 @@ } }, "react-use-gesture": { - "version": "9.1.3", - "requires": {} + "version": "9.1.3" }, "react-with-direction": { "version": "1.4.0", @@ -44588,8 +43659,7 @@ } }, "reakit-utils": { - "version": "0.15.2", - "requires": {} + "version": "0.15.2" }, "reakit-warning": { "version": "0.6.2", @@ -44989,17 +44059,6 @@ "glob": "^7.1.3" } }, - "rst-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", - "integrity": "sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA==", - "dev": true, - "peer": true, - "requires": { - "lodash.flattendeep": "^4.4.0", - "nearley": "^2.7.10" - } - }, "rsvp": { "version": "4.8.5", "dev": true @@ -46084,18 +45143,6 @@ "side-channel": "^1.0.4" } }, - "string.prototype.trim": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz", - "integrity": "sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ==", - "dev": true, - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, "string.prototype.trimend": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", @@ -46379,13 +45426,11 @@ }, "stylelint-config-prettier": { "version": "9.0.3", - "dev": true, - "requires": {} + "dev": true }, "stylelint-config-recommended": { "version": "3.0.0", - "dev": true, - "requires": {} + "dev": true }, "stylelint-config-recommended-scss": { "version": "4.3.0", @@ -46396,8 +45441,7 @@ "dependencies": { "stylelint-config-recommended": { "version": "5.0.0", - "dev": true, - "requires": {} + "dev": true } } }, @@ -47205,8 +46249,7 @@ "dev": true }, "use-memo-one": { - "version": "1.1.2", - "requires": {} + "version": "1.1.2" }, "util-deprecate": { "version": "1.0.2", @@ -47538,8 +46581,7 @@ }, "ws": { "version": "7.5.5", - "dev": true, - "requires": {} + "dev": true }, "xml-name-validator": { "version": "3.0.0", diff --git a/package.json b/package.json index 6c2cea9a5..62f292ee4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/newspack-blocks", - "version": "1.53.0", + "version": "1.53.1", "author": "Automattic", "devDependencies": { "@rushstack/eslint-patch": "^1.1.3", @@ -20,7 +20,7 @@ "@stripe/stripe-js": "^1.32.0", "classnames": "^2.3.1", "lodash": "^4.17.21", - "newspack-components": "^2.0.3", + "newspack-components": "^2.1.0", "react": "^17.0.2", "redux": "^4.2.0", "redux-saga": "^1.1.3", diff --git a/src/blocks/author-profile/edit.js b/src/blocks/author-profile/edit.js index 79c06d1bb..bc06b1123 100644 --- a/src/blocks/author-profile/edit.js +++ b/src/blocks/author-profile/edit.js @@ -133,6 +133,7 @@ export const avatarSizeOptions = [ const AuthorProfile = ( { attributes, setAttributes } ) => { const [ author, setAuthor ] = useState( null ); + const [ suggestions, setSuggestions ] = useState( null ); const [ error, setError ] = useState( null ); const [ isLoading, setIsLoading ] = useState( false ); const [ maxItemsToSuggest, setMaxItemsToSuggest ] = useState( 0 ); @@ -155,7 +156,7 @@ const AuthorProfile = ( { attributes, setAttributes } ) => { if ( 0 !== authorId ) { getAuthorById(); } - }, [ authorId, avatarHideDefault ] ); + }, [ authorId, avatarHideDefault, isGuestAuthor ] ); const getAuthorById = async () => { setError( null ); @@ -367,6 +368,7 @@ const AuthorProfile = ( { attributes, setAttributes } ) => { ) : ( } label={ __( 'Author Profile', 'newspack-blocks' ) } > @@ -389,8 +391,11 @@ const AuthorProfile = ( { attributes, setAttributes } ) => { 'newspack-blocks' ) } fetchSuggestions={ async ( search = null, offset = 0 ) => { + // Reset suggestions in state. + setSuggestions( null ); + // If we already have a selected author, no need to fetch suggestions. - if ( authorId ) { + if ( authorId && ! error ) { return []; } @@ -399,7 +404,6 @@ const AuthorProfile = ( { attributes, setAttributes } ) => { path: addQueryArgs( '/newspack-blocks/v1/authors', { search, offset, - isGuestAuthor: true, fields: 'id,name', } ), } ); @@ -412,17 +416,36 @@ const AuthorProfile = ( { attributes, setAttributes } ) => { setMaxItemsToSuggest( total ); } - return authors.map( _author => ( { + const _suggestions = authors.map( _author => ( { value: _author.id, label: decodeEntities( _author.name ) || __( '(no name)', 'newspack' ), isGuestAuthor: _author.is_guest, } ) ); + + setSuggestions( _suggestions ); + + return _suggestions; } } maxItemsToSuggest={ maxItemsToSuggest } onChange={ items => { + let selectionIsGuest = false; + const selection = items[ 0 ]; + + // We need to check whether the selected author is a guest author or not. + if ( suggestions ) { + suggestions.forEach( suggestion => { + if ( + parseInt( selection?.value ) === parseInt( suggestion?.value ) && + suggestion?.isGuestAuthor + ) { + selectionIsGuest = true; + } + } ); + } + setAttributes( { - authorId: parseInt( items[ 0 ]?.value || 0 ), - isGuestAuthor: items[ 0 ]?.isGuestAuthor || false, + authorId: parseInt( selection?.value || 0 ), + isGuestAuthor: selectionIsGuest, } ); } } postTypeLabel={ __( 'author', 'newspack-blocks' ) } diff --git a/src/blocks/author-profile/editor.scss b/src/blocks/author-profile/editor.scss index 1bd28ce48..98bdb8a83 100644 --- a/src/blocks/author-profile/editor.scss +++ b/src/blocks/author-profile/editor.scss @@ -1,7 +1,7 @@ @import './view'; .editor-styles-wrapper { - .wp-block-newspack-blocks-author-profile { + .newspack-blocks-author-profile { .components-notice { margin: 0 0 2rem 0; width: 100%;