itmar-block-packages 1.6.3 → 1.7.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,9 @@ import {関数名又はコンポーネント名} from "itmar-block-packages"
14
14
  npm i @wordpress/scripts@^27.6.0 --save-dev
15
15
 
16
16
  ## 更新履歴
17
+ = 1.7.0 =
18
+ - バリデーションチェック用の関数を集めるためのvalidationCheck.jsを新設し、URLの形式をチェックするisValidUrlWithUrlApiを加えた。
19
+
17
20
  = 1.6.3 =
18
21
  - IconSelectControlに設定できるアイコンをFontAwesomeに加え、画像、アバターを選択できるようにした
19
22
 
@@ -1135,4 +1138,16 @@ const handleZipSearch = async () => {
1135
1138
  };
1136
1139
  ```
1137
1140
 
1141
+ ## バリデーションチェックを行う関数
1142
+ ### `isValidUrlWithUrlApi`
1143
+ `isValidUrlWithUrlApi` は、引数で与えた文字列がURLの形式であるかどうかのバリデーションチェックをします。
1144
+
1145
+
1146
+ #### 使用例
1147
+ ```
1148
+ if (isValidUrlWithUrlApi(headingContent)) {
1149
+ setAttributes({ selectedPageUrl: headingContent });
1150
+ }
1151
+ ```
1152
+
1138
1153
 
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '2401f214e121f6353af9');
1
+ <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '931e44cdfd81bd73cb51');