itmar-block-packages 1.3.21 → 1.4.1
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/README.md +45 -1
- package/build/index.asset.php +1 -1
- package/build/index.js +2 -2
- package/package.json +1 -1
- package/src/UpdateAllPostsBlockAttributes.js +117 -0
- package/src/index.js +3 -0
- package/src/wordpressApi.js +0 -1
package/README.md
CHANGED
|
@@ -14,6 +14,12 @@ import {関数名又はコンポーネント名} from "itmar-block-packages"
|
|
|
14
14
|
npm i @wordpress/scripts@^27.6.0 --save-dev
|
|
15
15
|
|
|
16
16
|
## 更新履歴
|
|
17
|
+
= 1.4.1 =
|
|
18
|
+
- UpdateAllPostsBlockAttributesコンポーネントの宣言の誤りを修正
|
|
19
|
+
|
|
20
|
+
= 1.4.0 =
|
|
21
|
+
- 指定した投稿タイプの投稿に含まれる特定のブロックの属性を書き換えるコンポーネントであるUpdateAllPostsBlockAttributesコンポーネントを追加
|
|
22
|
+
|
|
17
23
|
= 1.3.21 =
|
|
18
24
|
- FieldChoiceControlで先頭の投稿にアイキャッチ画像が設定されていないとき、フィールド選択のトグルボタンが表示されないという不具合を修正
|
|
19
25
|
|
|
@@ -887,4 +893,42 @@ Hslオブジェクトのlightnessの値
|
|
|
887
893
|
16進数のRGB表記を受け取り、それを10進数のRGBオブジェクトに変換するためのユーティリティ関数です。
|
|
888
894
|
#### 引数
|
|
889
895
|
- `strRgb16` string
|
|
890
|
-
#000000形式の16進数の文字列又はrgb(0,0,0) 形式の文字列
|
|
896
|
+
#000000形式の16進数の文字列又はrgb(0,0,0) 形式の文字列
|
|
897
|
+
|
|
898
|
+
## 指定した投稿タイプの投稿に含まれる特定のブロックの属性を書き換えるコンポーネント
|
|
899
|
+
### UpdateAllPostsBlockAttributes
|
|
900
|
+
#### 引数
|
|
901
|
+
- `postType` string
|
|
902
|
+
WordPressのRestAPIで使用するrest_baseに相当する文字列
|
|
903
|
+
- `blockName` string
|
|
904
|
+
ブロックの名称。投稿本文に含まれるブロックの名前を指定
|
|
905
|
+
- `newAttributes` object
|
|
906
|
+
新しいブロックの属性をオブジェクトで指定
|
|
907
|
+
- `onProcessEnd` function
|
|
908
|
+
処理が完了したときに実行するコールバック関数
|
|
909
|
+
- `onProcessCancel` function
|
|
910
|
+
処理が中断されたときに実行するコールバック関数
|
|
911
|
+
```
|
|
912
|
+
<UpdateAllPostsBlockAttributes
|
|
913
|
+
postType={rest_base}
|
|
914
|
+
blockName="itmar/markdown-block"
|
|
915
|
+
newAttributes={{
|
|
916
|
+
element_style_obj: element_style_obj,
|
|
917
|
+
backgroundColor: backgroundColor,
|
|
918
|
+
backgroundGradient: backgroundGradient,
|
|
919
|
+
default_val: default_val,
|
|
920
|
+
mobile_val: mobile_val,
|
|
921
|
+
radius_value: radius_value,
|
|
922
|
+
border_value: border_value,
|
|
923
|
+
}}
|
|
924
|
+
onProcessEnd={closeProgress}
|
|
925
|
+
onProcessCancel={() => {
|
|
926
|
+
dispatch("core/notices").createNotice(
|
|
927
|
+
"error",
|
|
928
|
+
__("Processing was interrupted.", "markdown-block"),
|
|
929
|
+
{ type: "snackbar" },
|
|
930
|
+
);
|
|
931
|
+
}}
|
|
932
|
+
/>
|
|
933
|
+
```
|
|
934
|
+
|
package/build/index.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '79af53cfd6b49f1b6015');
|