@automattic/newspack-blocks 1.56.0-alpha.1 → 1.56.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/babel/327b351d78afdd3c7f442963f1634277.json.gz +0 -0
- package/.cache/babel/f8927e8b2f574ec7172578d626af18ec.json.gz +0 -0
- package/CHANGELOG.md +12 -0
- package/newspack-blocks.php +2 -2
- package/package.json +1 -1
- package/src/blocks/donate/streamlined/index.ts +3 -0
- package/src/blocks/donate/streamlined/utils.ts +1 -1
- package/src/types/index.d.ts +11 -0
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
- package/.cache/babel/83c9bbff52ba08a4a45203d42ac7c49c.json.gz +0 -0
- package/.cache/babel/96e971543db88cf6833b3d827f855d8d.json.gz +0 -0
|
Binary file
|
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [1.56.0-alpha.2](https://github.com/Automattic/newspack-blocks/compare/v1.56.0-alpha.1...v1.56.0-alpha.2) (2022-08-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* ensure amount is always defined for totalAmount calculation ([#1227](https://github.com/Automattic/newspack-blocks/issues/1227)) ([b1910dc](https://github.com/Automattic/newspack-blocks/commit/b1910dc117140c489d6a8ff960722e9693cd3327))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **donate:** refresh reader authentication ([#1236](https://github.com/Automattic/newspack-blocks/issues/1236)) ([f21904b](https://github.com/Automattic/newspack-blocks/commit/f21904b59a3a9d4295f74f34eebf3e9b8773cb4c))
|
|
12
|
+
|
|
1
13
|
# [1.56.0-alpha.1](https://github.com/Automattic/newspack-blocks/compare/v1.55.0...v1.56.0-alpha.1) (2022-08-10)
|
|
2
14
|
|
|
3
15
|
|
package/newspack-blocks.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Author URI: https://newspack.blog/
|
|
8
8
|
* Text Domain: newspack-blocks
|
|
9
9
|
* Domain Path: /languages
|
|
10
|
-
* Version: 1.56.0-alpha.
|
|
10
|
+
* Version: 1.56.0-alpha.2
|
|
11
11
|
*
|
|
12
12
|
* @package Newspack_Blocks
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
|
|
16
16
|
define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
|
|
17
17
|
define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
|
|
18
|
-
define( 'NEWSPACK_BLOCKS__VERSION', '1.56.0-alpha.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '1.56.0-alpha.2' );
|
|
19
19
|
|
|
20
20
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
|
|
21
21
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
|
package/package.json
CHANGED
|
@@ -310,6 +310,9 @@ export const processStreamlinedElements = ( parentElement = document ) =>
|
|
|
310
310
|
await payWithToken( stripeTokenCreationResult.token, {
|
|
311
311
|
payment_method_id: paymentMethodCreationResult.paymentMethod.id,
|
|
312
312
|
} );
|
|
313
|
+
if ( window.newspackReaderActivation?.refreshAuthentication ) {
|
|
314
|
+
window.newspackReaderActivation.refreshAuthentication();
|
|
315
|
+
}
|
|
313
316
|
} );
|
|
314
317
|
} );
|
|
315
318
|
|
|
@@ -125,7 +125,7 @@ export const getTotalAmount = (
|
|
|
125
125
|
{ convertToSubunit } = { convertToSubunit: false }
|
|
126
126
|
) => {
|
|
127
127
|
const settings = getSettings( formElement );
|
|
128
|
-
const { amount, agree_to_pay_fees: paysFees } = getDonationFormValues( formElement );
|
|
128
|
+
const { amount = '0', agree_to_pay_fees: paysFees } = getDonationFormValues( formElement );
|
|
129
129
|
|
|
130
130
|
const processAmount = ( amountToProcess: number ) =>
|
|
131
131
|
convertToSubunit
|
package/src/types/index.d.ts
CHANGED
|
@@ -7,6 +7,17 @@ declare global {
|
|
|
7
7
|
assets_path: string;
|
|
8
8
|
is_rendering_streamlined_block?: boolean;
|
|
9
9
|
};
|
|
10
|
+
newspackReaderActivation: {
|
|
11
|
+
on: function;
|
|
12
|
+
off: function;
|
|
13
|
+
setReaderEmail: function;
|
|
14
|
+
setAuthenticated: function;
|
|
15
|
+
refreshAuthentication: function;
|
|
16
|
+
getReader: function;
|
|
17
|
+
hasAuthLink: function;
|
|
18
|
+
setAuthStrategy: function;
|
|
19
|
+
getAuthStrategy: function;
|
|
20
|
+
};
|
|
10
21
|
}
|
|
11
22
|
|
|
12
23
|
type PostId = number;
|
package/vendor/autoload.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// autoload_real.php @generated by Composer
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class ComposerAutoloaderInit70bde7b853bc8f51a97bf1e05a4c5617
|
|
6
6
|
{
|
|
7
7
|
private static $loader;
|
|
8
8
|
|
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit2e2946922b4387469ce564fa00ebe047
|
|
|
22
22
|
return self::$loader;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
spl_autoload_register(array('
|
|
25
|
+
spl_autoload_register(array('ComposerAutoloaderInit70bde7b853bc8f51a97bf1e05a4c5617', 'loadClassLoader'), true, true);
|
|
26
26
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
|
27
|
-
spl_autoload_unregister(array('
|
|
27
|
+
spl_autoload_unregister(array('ComposerAutoloaderInit70bde7b853bc8f51a97bf1e05a4c5617', 'loadClassLoader'));
|
|
28
28
|
|
|
29
29
|
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
|
30
30
|
if ($useStaticLoader) {
|
|
31
31
|
require __DIR__ . '/autoload_static.php';
|
|
32
32
|
|
|
33
|
-
call_user_func(\Composer\Autoload\
|
|
33
|
+
call_user_func(\Composer\Autoload\ComposerStaticInit70bde7b853bc8f51a97bf1e05a4c5617::getInitializer($loader));
|
|
34
34
|
} else {
|
|
35
35
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
|
36
36
|
foreach ($map as $namespace => $path) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
namespace Composer\Autoload;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class ComposerStaticInit70bde7b853bc8f51a97bf1e05a4c5617
|
|
8
8
|
{
|
|
9
9
|
public static $classMap = array (
|
|
10
10
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -13,7 +13,7 @@ class ComposerStaticInit2e2946922b4387469ce564fa00ebe047
|
|
|
13
13
|
public static function getInitializer(ClassLoader $loader)
|
|
14
14
|
{
|
|
15
15
|
return \Closure::bind(function () use ($loader) {
|
|
16
|
-
$loader->classMap =
|
|
16
|
+
$loader->classMap = ComposerStaticInit70bde7b853bc8f51a97bf1e05a4c5617::$classMap;
|
|
17
17
|
|
|
18
18
|
}, null, ClassLoader::class);
|
|
19
19
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
'type' => 'wordpress-plugin',
|
|
6
6
|
'install_path' => __DIR__ . '/../../',
|
|
7
7
|
'aliases' => array(),
|
|
8
|
-
'reference' => '
|
|
8
|
+
'reference' => '201b1285f7408307e0280131778b93274c5dd668',
|
|
9
9
|
'name' => 'automattic/newspack-blocks',
|
|
10
10
|
'dev' => false,
|
|
11
11
|
),
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
'type' => 'wordpress-plugin',
|
|
17
17
|
'install_path' => __DIR__ . '/../../',
|
|
18
18
|
'aliases' => array(),
|
|
19
|
-
'reference' => '
|
|
19
|
+
'reference' => '201b1285f7408307e0280131778b93274c5dd668',
|
|
20
20
|
'dev_requirement' => false,
|
|
21
21
|
),
|
|
22
22
|
),
|
|
Binary file
|
|
Binary file
|