itmar-block-packages 1.3.20 → 1.4.0

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 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.0 =
18
+ - 指定した投稿タイプの投稿に含まれる特定のブロックの属性を書き換えるコンポーネントであるUpdateAllPostsBlockAttributesコンポーネントを追加
19
+
20
+ = 1.3.21 =
21
+ - FieldChoiceControlで先頭の投稿にアイキャッチ画像が設定されていないとき、フィールド選択のトグルボタンが表示されないという不具合を修正
22
+
17
23
  = 1.3.20 =
18
24
  - PageSelectControlでhomeUrlをエディタのホームURLに固定しないようにした。
19
25
 
@@ -884,4 +890,42 @@ Hslオブジェクトのlightnessの値
884
890
  16進数のRGB表記を受け取り、それを10進数のRGBオブジェクトに変換するためのユーティリティ関数です。
885
891
  #### 引数
886
892
  - `strRgb16` string
887
- #000000形式の16進数の文字列又はrgb(0,0,0) 形式の文字列
893
+ #000000形式の16進数の文字列又はrgb(0,0,0) 形式の文字列
894
+
895
+ ## 指定した投稿タイプの投稿に含まれる特定のブロックの属性を書き換えるコンポーネント
896
+ ### UpdateAllPostsBlockAttributes
897
+ #### 引数
898
+ - `postType` string
899
+ WordPressのRestAPIで使用するrest_baseに相当する文字列
900
+ - `blockName` string
901
+ ブロックの名称。投稿本文に含まれるブロックの名前を指定
902
+ - `newAttributes` object
903
+ 新しいブロックの属性をオブジェクトで指定
904
+ - `onProcessEnd` function
905
+ 処理が完了したときに実行するコールバック関数
906
+ - `onProcessCancel` function
907
+ 処理が中断されたときに実行するコールバック関数
908
+ ```
909
+ <UpdateAllPostsBlockAttributes
910
+ postType={rest_base}
911
+ blockName="itmar/markdown-block"
912
+ newAttributes={{
913
+ element_style_obj: element_style_obj,
914
+ backgroundColor: backgroundColor,
915
+ backgroundGradient: backgroundGradient,
916
+ default_val: default_val,
917
+ mobile_val: mobile_val,
918
+ radius_value: radius_value,
919
+ border_value: border_value,
920
+ }}
921
+ onProcessEnd={closeProgress}
922
+ onProcessCancel={() => {
923
+ dispatch("core/notices").createNotice(
924
+ "error",
925
+ __("Processing was interrupted.", "markdown-block"),
926
+ { type: "snackbar" },
927
+ );
928
+ }}
929
+ />
930
+ ```
931
+
@@ -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' => 'c2d779360ec4624f6165');
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' => '8a9b799afec20fc0d3e4');