Skip to content

Commit

Permalink
Merge pull request #1835 from vektor-inc/develop
Browse files Browse the repository at this point in the history
[ Change version ] 1.63.0.0
  • Loading branch information
kurudrive authored Oct 18, 2023
2 parents 56398fb + d2891ae commit d0a7660
Show file tree
Hide file tree
Showing 75 changed files with 33,949 additions and 20,746 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ module.exports = {
camelcase: 'off',
'@wordpress/no-unsafe-wp-apis': 'off',
'@wordpress/i18n-translator-comments': 'off',
'react-hooks/exhaustive-deps': 'off',
},
};
11 changes: 8 additions & 3 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename "$0")"
readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
Expand All @@ -19,13 +19,18 @@ if [ -z "$husky_skip_init" ]; then
. ~/.huskyrc
fi

export readonly husky_skip_init=1
readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi

if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi

exit $exitCode
fi
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.20.1
18.18.0
7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ module.exports = ( api ) => {
api.cache( true );

return {
presets: [ '@wordpress/babel-preset-default' ],
presets: [
['@babel/preset-env', {
"modules": "commonjs"
}],
'@wordpress/babel-preset-default'
],
plugins: [
'@emotion/babel-plugin',
'babel-plugin-inline-json-import'
Expand Down
2 changes: 2 additions & 0 deletions editor-css/_editor_before.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ button.image-button:not(.button-delete) {
@import "./editor_before_gridcolcard";
// edit custom css extension
@import "./editor_before_custom-css-extension";
// edit custom block variation
@import "./editor_before_custom-block-variation";
// archive-list
@import "./editor_before_archive-list";

Expand Down
44 changes: 44 additions & 0 deletions editor-css/_editor_before_custom-block-variation.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.custom_block_variation_modal {
.components-modal__content {
padding-bottom: 0;
}
.move-button-container {
display: flex;
flex-direction: column;
.components-button.has-icon {
height: 24px;
padding: 6px;
}
}
.block-mover-button.is-up-button svg {
top: 5px;
flex-shrink: 0;
position: relative;
}

.block-mover-button.is-down-button svg {
bottom: 5px;
flex-shrink: 0;
position: relative;
}
h4 {
margin-top: 0;
margin-bottom: 12px;
}
.block-variation-error-text {
margin-top: 8px;
margin-bottom: 0;
color: #c00;
}
.block-variation-category-list {
.components-base-control {
margin-bottom: 8px;
}
}
.components-base-control + .components-base-control{
margin-top: 8px;
}
.components-form-token-field__label{
font-size: 12px;
}
}
39 changes: 39 additions & 0 deletions inc/vk-blocks/class-vk-blocks-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,44 @@ public static function get_vk_blocks_options_properties() {
'icon_custom_lists' => array(
'type' => 'array',
),
'block_variation_lists' => array(
'type' => 'array',
'items' => array(
'type' => 'object',
'properties' => array(
'block_name' => array(
'type' => 'string',
),
'name' => array(
'type' => 'string',
),
'title' => array(
'type' => 'string',
),
'description' => array(
'type' => 'string',
),
'category' => array(
'type' => 'string',
),
'icon' => array(
'type' => 'string',
),
'attributes' => array(
'type' => 'string',
),
'innerBlocks' => array(
'type' => 'string',
),
'scope' => array(
'type' => 'array',
),
'keywords' => array(
'type' => 'array',
),
),
),
),
);
return $properties;
}
Expand Down Expand Up @@ -403,6 +441,7 @@ public static function get_vk_blocks_options_defaults( $activation = false ) {
'balloon_meta_lists' => array(),
'disable_block_style_lists' => array(),
'icon_custom_lists' => array(),
'block_variation_lists' => array(),
);
return $default;
}
Expand Down
1 change: 1 addition & 0 deletions inc/vk-blocks/view/class-vk-blocks-postlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public static function get_loop_query( $attributes ) {
if ( ! empty( $date_query ) ) {
$args['date_query'] = $date_query;
}
$args = apply_filters( 'vk_blocks_post_list_query_args', $args, $attributes );
return new WP_Query( $args );
}

Expand Down
1 change: 1 addition & 0 deletions inc/vk-blocks/vk-blocks-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function vk_blocks_blocks_assets() {
'show_custom_css_editor_flag' => $vk_blocks_options['show_custom_css_editor_flag'],
'balloon_meta_lists' => $vk_blocks_options['balloon_meta_lists'],
'custom_format_lists' => $vk_blocks_options['custom_format_lists'],
'block_variation_lists' => $vk_blocks_options['block_variation_lists'],
)
);

Expand Down
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global.TextEncoder = require("util").TextEncoder;
2 changes: 1 addition & 1 deletion languages/vk-blocks-pro-ja-vk-blocks-admin-js.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion languages/vk-blocks-pro-ja-vk-blocks-build-js.json

Large diffs are not rendered by default.

145 changes: 143 additions & 2 deletions languages/vk-blocks-pro-ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ msgstr "インポート成功"
msgid "Font Awesome Custom Lists Setting"
msgstr "Font Awesomeカスタムリスト設定"

#: src/admin/import-export/index.js:135
msgid "Custom Block Variation Setting"
msgstr "カスタムブロックバリエーション設定"

#: src/admin/import-export/index.js:141 inc/vk-blocks/admin/admin.php:119
msgid "Import Export Tool"
msgstr "インポート エクスポート ツール"
Expand Down Expand Up @@ -535,7 +539,7 @@ msgstr "単位"

#: src/admin/new-faq.js:23
msgid "Please specify a common accordion setting to be used in the FAQ block."
msgstr ""
msgstr "FAQ ブロックで使用する共通のアコーディオン設定を指定してください。"

#: src/admin/new-faq.js:40 src/blocks/faq2/edit.js:45
msgid "Disable accordion"
Expand Down Expand Up @@ -824,6 +828,26 @@ msgid ""
msgstr ""
"データが古い場合はキャッシュクリアしてください。通常1時間で更新されます。"

#: src/blocks/_pro/blog-card/edit/index.js:159
#: src/extensions/common/custom-block-variation/block-variation-explorer/index.js:20
msgid "Variation settings"
msgstr "バリエーション設定"

#: src/blocks/_pro/blog-card/edit/index.js:162
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:49
msgid "You can register the current block settings as block variations."
msgstr "現在のブロック設定をブロックバリエーションとして登録できます。"

#: src/blocks/_pro/blog-card/edit/index.js:168
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:54
msgid "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-variations/"
msgstr "https://ja.wordpress.org/team/handbook/block-editor/reference-guides/block-api/block-variations/"

#: src/blocks/_pro/blog-card/edit/index.js:175
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:61
msgid "Learn more about block variations"
msgstr "ブロックバリエーションについてさらに詳しく"

#: src/blocks/_pro/blog-card/edit/index.js:92
#, fuzzy
#| msgid "Edit Lock"
Expand Down Expand Up @@ -2103,8 +2127,9 @@ msgid "Wide"
msgstr "幅広"

#: src/blocks/button/edit.js:384
#: src/extensions/common/custom-block-variation/utils.js:31
msgid "Block"
msgstr "Block"
msgstr "ブロック"

#: src/blocks/button/edit.js:393
msgid "Button Width:"
Expand Down Expand Up @@ -2855,6 +2880,122 @@ msgstr "新着表示"
msgid "Link target"
msgstr "リンクターゲット"

#: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17
msgid "Create"
msgstr "作成"

#: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:21
msgid "Registered"
msgstr "登録済み"

#: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:56
msgid "Continue"
msgstr "続行"

#: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:66
msgid "There are unsaved changes. Do you want to continue ?"
msgstr "保存されていない変更があります。続行しますか?"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:115
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:137
msgid "scope is required"
msgstr "スコープは必須です"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:121
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:143
msgid "Category"
msgstr "カテゴリー"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:148
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:175
msgid "For the icon name, please enter alphanumeric characters without \"dashicons-\". Example: embed-generic"
msgstr "アイコンの名前は「dashicons-」を省いた英数字を入力してください。 例: embed-generic"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:159
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:186
msgid "Dashicons list"
msgstr "ダッシュアイコンリスト"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:164
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:191
msgid "Keyword"
msgstr "キーワード"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:166
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:193
msgid "Add keyword"
msgstr "キーワードを追加"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:57
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:78
msgid "Title (required)"
msgstr "タイトル (必須)"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:62
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:85
msgid "My variations"
msgstr "マイバリエーション"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:69
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:89
msgid "title is required"
msgstr "タイトルは必須です"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:74
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:94
msgid "Description"
msgstr "説明"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:82
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:104
msgid "Scope (required)"
msgstr "スコープ (必須)"

#: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:84
#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:106
msgid "You can set where registered variations are displayed. You can call it from the displayed location."
msgstr "登録したバリエーションをどこに表示するかを設定できます。表示した場所から呼び出せます。"

#: src/extensions/common/custom-block-variation/block-variation-list/item/title-area/delete-button/index.js:42
msgid "Are you sure you want to delete this variation?"
msgstr "このバリエーションを削除してもよろしいですか?"

#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/variation-name/index.js:33
msgid "name is required"
msgstr "名前は必須です"

#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/variation-name/index.js:51
msgid "Name/Unique ID (required)"
msgstr "名前/固有ID (必須)"

#: src/extensions/common/custom-block-variation/create-variation/block-variation-form/variation-name/index.js:60
msgid "my-variation"
msgstr "my-variation"

#: src/extensions/common/custom-block-variation/utils.js:11
msgid "Inserter"
msgstr "インサーター"

#: src/extensions/common/custom-block-variation/utils.js:13
msgid "Displayed on the inserter. <Link>Learn more about inserters</Link>."
msgstr "インサーターに表示されます。 <Link>インサーターについてさらに詳しく</Link>."

#: src/extensions/common/custom-block-variation/utils.js:20
msgid "https://wordpress.org/documentation/article/adding-a-new-block/#what-is-the-inserter"
msgstr "https://ja.wordpress.org/support/article/adding-a-new-block/#%e3%82%a4%e3%83%b3%e3%82%b5%e3%83%bc%e3%82%bf%e3%83%bc%e3%81%a8%e3%81%af"

#: src/extensions/common/custom-block-variation/utils.js:32
msgid "It will appear in the variation picker."
msgstr "バリエーションピッカーに表示されます。"

#: src/extensions/common/custom-block-variation/utils.js:36
msgid "Transform"
msgstr "変換"

#: src/extensions/common/custom-block-variation/utils.js:37
msgid "Displayed in block variation transformation."
msgstr "ブロックバリエーション変換で表示されます。"

#: src/extensions/common/custom-css-extension/index.js:187
msgid ""
"If selector is specified, it is replaced by a block-specific CSS class. If "
Expand Down
Loading

0 comments on commit d0a7660

Please sign in to comment.