From afa6a6807f950bee099920df04b552b1eb4a0067 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Mon, 7 Oct 2024 17:07:31 +0300 Subject: [PATCH 01/10] fix: string translation --- inc/class-blocks-animation.php | 9 +++++++-- inc/render/class-review-block.php | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/inc/class-blocks-animation.php b/inc/class-blocks-animation.php index 9efb7b298..1920aca11 100644 --- a/inc/class-blocks-animation.php +++ b/inc/class-blocks-animation.php @@ -287,8 +287,13 @@ public function render_welcome_notice() { $notice_html .= '
'; $notice_html .= '

'; - /* translators: %s: Otter Blocks */ - $notice_html .= sprintf( __( 'Power Up Your Site with %1$s, %2$s, %3$s, and more!', 'otter-blocks' ), 'Add-on Blocks', 'Enhanced Animations', 'Visibility Conditions' ); + $notice_html .= sprintf( + /* translators: %1$s: Add-on Blocks, %2$s: Enhanced Animations, %3$s: Visibility Conditions */ + __( 'Power Up Your Site with %1$s, %2$s, %3$s, and more!', 'otter-blocks' ), + '' . __( 'Add-on Blocks', 'otter-blocks' ) . '', + '' . __( 'Enhanced Animations', 'otter-blocks' ) . '', + '' . __( 'Visibility Conditions', 'otter-blocks' ) . '' + ); $notice_html .= '

'; diff --git a/inc/render/class-review-block.php b/inc/render/class-review-block.php index 2967fe926..0f7db37c7 100644 --- a/inc/render/class-review-block.php +++ b/inc/render/class-review-block.php @@ -85,8 +85,12 @@ function() use ( $attributes, $post_id ) { $html .= '
'; $html .= $this->get_overall_stars( $this->get_overall_ratings( $attributes['features'] ), $scale ); $html .= '
'; - // translators: Overall rating from 1 to 10. - $html .= ' ' . sprintf( __( '%1$g out of %2$g', 'otter-blocks' ), $this->get_overall_ratings( $attributes['features'], $scale ), 10 / $scale ) . ''; + $html .= ' ' . sprintf( + // translators: %1$g is the overall rating, %2$g is the maximum rating. + __( '%1$g out of %2$g', 'otter-blocks' ), + $this->get_overall_ratings( $attributes['features'], $scale ), + 10 / $scale + ) . ''; $html .= '
'; if ( ( isset( $attributes['price'] ) && ! empty( $attributes['price'] ) ) || isset( $attributes['discounted'] ) ) { @@ -133,9 +137,12 @@ function() use ( $attributes, $post_id ) { $html .= '
'; $html .= $this->get_overall_stars( $feature['rating'], $scale ); $html .= '
'; - - // translators: Overall rating from 1 to 10. - $html .= ' ' . sprintf( __( '%1$g out of %2$g', 'otter-blocks' ), 1 <= round( $feature['rating'] / $scale, 1 ) ? round( $feature['rating'] / $scale, 1 ) : 1, 10 / $scale ) . ''; + $html .= ' ' . sprintf( + // translators: %1$g is the overall rating, %2$g is the maximum rating. + __( '%1$g out of %2$g', 'otter-blocks' ), + 1 <= round( $feature['rating'] / $scale, 1 ) ? round( $feature['rating'] / $scale, 1 ) : 1, + 10 / $scale + ) . ''; $html .= ' '; From dcab03d4fe882db1e107054e7ee1d5b67ce90cad Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Wed, 9 Oct 2024 15:17:35 +0300 Subject: [PATCH 02/10] fix: lint and its reported problems --- .eslintrc | 30 +- .github/workflows/update-translations.yml | 58 + inc/integrations/class-form-email.php | 31 +- package-lock.json | 1225 ++++++++++------- package.json | 6 +- plugins/otter-pro/otter-pro.php | 2 + src/animation/components/animation-popover.js | 12 +- src/animation/editor.js | 27 +- src/animation/frontend.js | 2 +- src/animation/frontend/count/index.js | 20 +- src/animation/frontend/typing/index.js | 4 +- src/animation/index.js | 4 +- src/animation/utils.js | 8 +- src/blocks/blocks/accordion/group/edit.js | 2 +- .../blocks/accordion/group/inspector.js | 4 +- src/blocks/blocks/accordion/item/edit.js | 4 +- src/blocks/blocks/advanced-heading/edit.js | 2 +- .../blocks/advanced-heading/inspector.js | 2 +- src/blocks/blocks/button-group/button/edit.js | 2 +- .../blocks/button-group/button/inspector.js | 4 +- .../blocks/button-group/group/controls.tsx | 4 +- .../blocks/button-group/group/deprecated.js | 2 +- src/blocks/blocks/button-group/group/edit.js | 2 +- .../blocks/button-group/group/inspector.js | 2 +- src/blocks/blocks/circle-counter/edit.js | 2 +- src/blocks/blocks/circle-counter/inspector.js | 4 +- src/blocks/blocks/content-generator/edit.js | 6 +- .../blocks/content-generator/inspector.js | 2 +- src/blocks/blocks/countdown/common.ts | 16 +- src/blocks/blocks/countdown/edit.tsx | 2 +- src/blocks/blocks/countdown/inspector.js | 6 +- src/blocks/blocks/countdown/save.tsx | 2 +- src/blocks/blocks/flip/edit.tsx | 12 +- src/blocks/blocks/flip/inspector.js | 2 +- src/blocks/blocks/font-awesome-icons/edit.js | 2 +- .../blocks/font-awesome-icons/inspector.js | 2 +- src/blocks/blocks/form/common.tsx | 4 +- src/blocks/blocks/form/edit.js | 8 +- src/blocks/blocks/form/file/index.js | 6 +- src/blocks/blocks/form/file/inspector.js | 4 +- .../blocks/form/hidden-field/inspector.js | 4 +- src/blocks/blocks/form/input/edit.js | 2 +- src/blocks/blocks/form/input/index.js | 14 +- src/blocks/blocks/form/input/inspector.js | 2 +- src/blocks/blocks/form/inspector.js | 4 +- .../blocks/form/multiple-choice/edit.js | 4 +- .../blocks/form/multiple-choice/index.js | 12 +- .../blocks/form/multiple-choice/inspector.js | 4 +- src/blocks/blocks/form/nonce/edit.js | 2 +- .../blocks/form/sortable-input-fields.tsx | 2 +- .../blocks/form/stripe-field/inspector.js | 6 +- src/blocks/blocks/form/textarea/edit.js | 2 +- src/blocks/blocks/form/textarea/index.js | 6 +- src/blocks/blocks/form/textarea/inspector.js | 2 +- src/blocks/blocks/google-map/edit.js | 2 +- src/blocks/blocks/google-map/inspector.js | 2 +- src/blocks/blocks/icon-list/edit.js | 2 +- src/blocks/blocks/icon-list/inspector.js | 2 +- src/blocks/blocks/icon-list/item/edit.js | 6 +- src/blocks/blocks/icon-list/item/inspector.js | 2 +- src/blocks/blocks/leaflet-map/edit.js | 4 +- src/blocks/blocks/leaflet-map/inspector.js | 2 +- src/blocks/blocks/leaflet-map/utility.js | 2 +- .../blocks/lottie/components/lottie-player.js | 6 +- src/blocks/blocks/lottie/edit.js | 2 +- src/blocks/blocks/lottie/inspector.js | 2 +- src/blocks/blocks/modal/index.js | 1 + src/blocks/blocks/popup/edit.js | 8 +- src/blocks/blocks/popup/inspector.js | 11 +- src/blocks/blocks/popup/save.js | 2 +- .../posts/components/design-layout-builder.js | 2 +- .../blocks/posts/components/layout/index.js | 2 +- .../blocks/posts/components/sortable.js | 9 +- src/blocks/blocks/posts/edit.js | 16 +- src/blocks/blocks/posts/inspector.js | 6 +- src/blocks/blocks/progress-bar/inspector.js | 4 +- src/blocks/blocks/review/edit.js | 25 +- src/blocks/blocks/review/inspector.js | 6 +- src/blocks/blocks/section/column/edit.js | 2 +- src/blocks/blocks/section/column/inspector.js | 2 +- .../blocks/section/columns/deprecated.js | 6 +- src/blocks/blocks/section/columns/edit.js | 4 +- .../blocks/section/columns/inspector.js | 34 +- .../components/layout-control/index.js | 10 +- src/blocks/blocks/sharing-icons/controls.js | 10 +- src/blocks/blocks/sharing-icons/edit.js | 2 +- src/blocks/blocks/sharing-icons/inspector.js | 4 +- src/blocks/blocks/slider/deprecated.js | 4 +- src/blocks/blocks/slider/edit.js | 6 +- src/blocks/blocks/slider/inspector.js | 2 +- src/blocks/blocks/stripe-checkout/edit.tsx | 21 +- src/blocks/blocks/stripe-checkout/index.js | 4 +- src/blocks/blocks/tabs/group/edit.js | 9 +- src/blocks/blocks/tabs/group/inspector.js | 2 +- src/blocks/blocks/timeline/group/edit.js | 2 +- src/blocks/blocks/timeline/group/inspector.js | 4 +- src/blocks/blocks/timeline/item/edit.js | 2 +- src/blocks/blocks/timeline/item/inspector.js | 4 +- src/blocks/blocks/timeline/item/save.js | 6 +- .../auto-disable-sync-attr/index.tsx | 10 +- .../block-appender-button/index.tsx | 9 +- .../button-dropdown-control/index.js | 8 +- .../color-dropdown-control/index.tsx | 10 +- .../components/google-fonts-control/index.js | 6 +- .../components/icon-picker-control/index.js | 7 +- .../components/inspector-header/index.js | 8 +- src/blocks/components/prompt/index.tsx | 21 +- src/blocks/components/prompt/prompt-input.tsx | 3 +- .../sync-control-dropdown/index.tsx | 13 +- .../components/toogle-group-control/index.js | 6 +- .../typography-selector-control/index.tsx | 9 +- src/blocks/frontend/accordion/index.js | 6 +- src/blocks/frontend/countdown/index.ts | 8 +- src/blocks/frontend/form/index.js | 54 +- src/blocks/frontend/form/message.js | 10 +- .../leaflet-map/leaflet-gesture-handling.js | 36 +- src/blocks/frontend/live-search/index.ts | 49 +- src/blocks/frontend/masonry/index.js | 4 +- src/blocks/frontend/progress-bar/index.js | 3 +- src/blocks/frontend/sticky/index.ts | 25 +- src/blocks/helpers/block-utility.js | 75 +- src/blocks/helpers/cookies.ts | 10 +- src/blocks/helpers/defered-wp-options-save.js | 10 +- src/blocks/helpers/detect-loading.js | 10 +- src/blocks/helpers/enhancement.js | 3 +- .../helpers/frontend-helper-functions.js | 38 +- src/blocks/helpers/google-fonts.js | 16 +- src/blocks/helpers/helper-functions.js | 133 +- src/blocks/helpers/icons.js | 2 +- src/blocks/helpers/prompt.ts | 26 +- src/blocks/helpers/use-settings.js | 23 +- src/blocks/helpers/utility-hooks.js | 8 +- src/blocks/index.js | 4 +- src/blocks/plugins/ai-content/index.tsx | 2 +- src/blocks/plugins/conditions/edit.js | 12 +- src/blocks/plugins/copy-paste/adaptors.ts | 47 +- src/blocks/plugins/copy-paste/copy-paste.ts | 6 +- .../plugins/copy-paste/core-adaptors.ts | 24 +- src/blocks/plugins/copy-paste/index.js | 10 +- src/blocks/plugins/copy-paste/utils.ts | 31 +- .../plugins/dynamic-content/link/fields.js | 2 +- .../plugins/dynamic-content/media/index.js | 32 +- .../dynamic-content/value/autocompleter.js | 2 +- .../plugins/dynamic-content/value/fields.js | 2 +- src/blocks/plugins/feedback/feedback-form.js | 4 +- src/blocks/plugins/feedback/index.js | 6 +- .../global-defaults/controls/button.js | 2 +- .../plugins/options/global-defaults/index.js | 2 +- src/blocks/plugins/options/index.js | 6 +- src/blocks/plugins/patterns-library/index.js | 2 +- .../plugins/patterns-library/library.js | 2 +- src/blocks/plugins/sticky/edit.tsx | 2 +- src/blocks/plugins/upsell-block/index.js | 2 +- src/blocks/test/e2e/blocks/accordion.spec.js | 4 +- src/blocks/test/e2e/blocks/ai-block.spec.js | 2 +- src/blocks/test/e2e/blocks/countdown.spec.js | 2 +- src/blocks/test/e2e/blocks/form.spec.js | 6 +- .../test/e2e/blocks/live-search.spec.js | 2 +- src/blocks/test/e2e/blocks/slider.spec.js | 4 +- src/blocks/test/e2e/blocks/tabs.spec.js | 4 +- src/blocks/test/unit/helper-functions.test.ts | 2 +- src/css/editor.js | 8 +- src/css/index.js | 1 + src/css/inject-css.js | 14 +- src/dashboard/components/Header.js | 8 +- src/dashboard/components/LicenseField.js | 8 +- src/dashboard/components/Main.js | 8 +- src/dashboard/components/NeveSidebarUpsell.js | 6 +- src/dashboard/components/Notices.js | 4 +- src/dashboard/components/Sidebar.js | 6 +- src/dashboard/components/pages/Blocks.js | 4 +- src/dashboard/components/pages/Dashboard.js | 10 +- .../components/pages/Integrations.js | 2 +- src/dashboard/components/pages/Upsell.js | 2 +- src/dashboard/index.js | 1 + src/onboarding/components/PalettePreview.js | 2 +- src/onboarding/components/steps/SiteInfo.js | 2 +- src/onboarding/store.js | 10 +- src/onboarding/utils.js | 13 +- src/pro/blocks/add-to-cart-button/edit.js | 2 +- src/pro/blocks/business-hours/edit.js | 2 +- src/pro/blocks/business-hours/inspector.js | 2 +- src/pro/blocks/business-hours/item/edit.js | 2 +- src/pro/blocks/file/edit.js | 2 +- src/pro/blocks/file/index.js | 6 +- src/pro/blocks/file/inspector.js | 6 +- src/pro/blocks/form-hidden-field/edit.js | 4 +- src/pro/blocks/form-hidden-field/inspector.js | 2 +- src/pro/blocks/form-stripe-field/edit.js | 4 +- src/pro/blocks/form-stripe-field/inspector.js | 2 +- src/pro/blocks/modal/edit.js | 2 +- src/pro/blocks/modal/inspector.js | 4 +- src/pro/blocks/review-comparison/edit.js | 4 +- src/pro/blocks/review-comparison/inspector.js | 2 +- src/pro/components/inactive/index.js | 1 + src/pro/components/webhook-editor/index.tsx | 4 +- src/pro/helpers/helper-functions.tsx | 2 +- src/pro/plugins/conditions/edit.js | 20 +- src/pro/plugins/conditions/index.js | 6 +- src/pro/plugins/countdown/index.tsx | 2 +- src/pro/plugins/dynamic-content/value-edit.js | 2 +- src/pro/plugins/form/index.js | 12 +- src/pro/plugins/index.js | 3 - 203 files changed, 1683 insertions(+), 1282 deletions(-) create mode 100644 .github/workflows/update-translations.yml diff --git a/.eslintrc b/.eslintrc index b150925f5..9a90fc4fc 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,9 +1,8 @@ { "env": { - "browser": true, - "es2021": true + "browser": true }, - "extends": "wordpress", + "extends": "plugin:@wordpress/eslint-plugin/recommended", "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaFeatures": { @@ -63,5 +62,30 @@ "objectsInObjects": false } ], + "prettier/prettier": ["off"], + "react-hooks/rules-of-hooks": ["warn"], + "dot-notation": ["off"], + "@wordpress/no-unsafe-wp-apis": ["warn"], + "no-undef": ["warn"], + "no-shadow": ["warn"], + "@typescript-eslint/no-shadow": "warn", + "@wordpress/no-base-control-with-label-without-id": ["warn"], + "no-unused-vars": ["warn"], + "@typescript-eslint/no-unused-vars": "warn", + "jsdoc/require-returns-description": ["warn"], + "no-unused-expressions": ["warn"], + "jsdoc/require-returns-type": ["warn"], + "no-nested-ternary": ["warn"], + "no-console": "warn", + "jsdoc/require-param-type": "warn", + "jsdoc/no-undefined-types": "warn", + "jsx-a11y/click-events-have-key-events": "warn", + "jsx-a11y/no-static-element-interactions": "warn", + "import/no-extraneous-dependencies": "warn", + "jsx-a11y/label-has-associated-control": "warn", + "jsx-a11y/alt-text": "warn", + "jsx-a11y/anchor-is-valid": "warn", + "jsx-a11y/no-noninteractive-element-interactions": "warn", + "jsx-a11y/no-autofocus": "warn" } } diff --git a/.github/workflows/update-translations.yml b/.github/workflows/update-translations.yml new file mode 100644 index 000000000..6bf5d0f61 --- /dev/null +++ b/.github/workflows/update-translations.yml @@ -0,0 +1,58 @@ +name: Dispatch Update to translations.themeisle.com + +on: + push: + tags: + - "*" + +jobs: + makepot: + name: Build, make pot file and upload to S3 + runs-on: ubuntu-latest + + steps: + - name: Check out source files + uses: actions/checkout@v4 + - name: Setup node 18 + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install composer deps + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + composer install --no-dev --prefer-dist --no-progress + - name: Install NPM deps + run: npm ci + - name: Build files + run: npm run build + - name: Build pot + run: npm run build:makepot + - name: Upload Latest Version to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.AWS_DEV_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_KEY_ARTIFACTS }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ARTIFACTS }} + SOURCE_DIR: languages/ + DEST_DIR: ${{ github.event.repository.name }}-translations/ + + dispatch-workflow: + runs-on: ubuntu-latest + needs: makepot + + steps: + - name: Dispatch workflow + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.BOT_TOKEN }} + repository: Codeinwp/themeisle-translations + event-type: update-potfile + client-payload: | + { + "ref": "${{ github.ref }}", + "potfile": "https://verti-artifacts.s3.amazonaws.com/${{ github.event.repository.name }}-translations/otter-pro.pot", + "slug": "otter-pro" + } diff --git a/inc/integrations/class-form-email.php b/inc/integrations/class-form-email.php index c73c06776..0383a19a7 100644 --- a/inc/integrations/class-form-email.php +++ b/inc/integrations/class-form-email.php @@ -262,27 +262,34 @@ public function build_error_body( $form_data ) { */ public function build_test_email( $form_data ) { return sprintf( - " + ' - + - + - - - %s%s + + + %s %s

- Location: link. + %s - ", - esc_html__( 'Mail From: ', 'otter-blocks' ), - sanitize_email( get_site_option( 'admin_email' ) ), - esc_html( __( 'This a test email. If you receive this email, your SMTP set-up is working for sending emails via Form Block.', 'otter-blocks' ) ), - $form_data->get_data_from_payload( 'site' ) + ', + sprintf( + // translators: %s is the admin email address. + __( 'Mail From: %s', 'otter-blocks' ), + sanitize_email( get_site_option( 'admin_email' ) ) + ), + esc_html__( 'This a test email. If you receive this email, your SMTP set-up is working for sending emails via Form Block.', 'otter-blocks' ), + sprintf( + // translators: %s is the URL of the site from which the email was sent. + __( 'Location: %s', 'otter-blocks' ), + '' . esc_html__( 'link', 'otter-blocks' ) . '' + ) ); } diff --git a/package-lock.json b/package-lock.json index 5a47f3275..6251110f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@types/object-hash": "^3.0.6", "@types/wordpress__block-editor": "^11.5.9", "@types/wordpress__components": "^23.0.11", + "@typescript-eslint/eslint-plugin": "^8.8.1", "@typescript-eslint/parser": "^8.0.0", "@wordpress/block-editor": "^13.3.0", "@wordpress/components": "^28.3.0", @@ -48,6 +49,7 @@ "@wordpress/e2e-tests": "^8.9.0", "@wordpress/element": "^6.9.0", "@wordpress/env": "^9.6.0", + "@wordpress/eslint-plugin": "^21.2.0", "@wordpress/scripts": "27.9.0", "conventional-changelog-simple-preset": "^1.0.24", "eslint-config-wordpress": "^2.0.0", @@ -6551,6 +6553,203 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.1.tgz", + "integrity": "sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/type-utils": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.1.tgz", + "integrity": "sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.1.tgz", + "integrity": "sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.1.tgz", + "integrity": "sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/parser": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.0.0.tgz", @@ -8273,196 +8472,58 @@ "node": ">=18" } }, - "node_modules/@wordpress/e2e-tests/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/api-fetch": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-7.9.0.tgz", + "integrity": "sha512-iqH4lNiH8FnIkJ8Nxx4KQYQMd4c/4OwZfjrk0ITwMK5PaVJHnFZ7xZV6ncMbgXbf0VjuPjfKMRmPzxICXw08IQ==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "@babel/runtime": "^7.16.0", + "@wordpress/i18n": "^5.9.0", + "@wordpress/url": "^4.9.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, - "node_modules/@wordpress/e2e-tests/node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/babel-preset-default": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.9.0.tgz", + "integrity": "sha512-qkhnRyku8FeiUGXfcMYfr/u2SG6NIj/9hWoe5Ubpay7gpX2A1H9+rLrTvABRiip7zit88JJ6b4VUqLL9Cr23bg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4" + "@babel/core": "^7.16.0", + "@babel/plugin-transform-react-jsx": "^7.16.0", + "@babel/plugin-transform-runtime": "^7.16.0", + "@babel/preset-env": "^7.16.0", + "@babel/preset-typescript": "^7.16.0", + "@babel/runtime": "^7.16.0", + "@wordpress/browserslist-config": "^6.9.0", + "@wordpress/warning": "^3.9.0", + "browserslist": "^4.21.10", + "core-js": "^3.31.0", + "react": "^18.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, - "node_modules/@wordpress/e2e-tests/node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/base-styles": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-5.9.0.tgz", + "integrity": "sha512-b0erDgc8I6NTjbHaPL4GTa3IbfHp4o1+Yx74oT6gLgV9i7Qd8UjBmsUDYIZTV1jqB/ch9DuaDqDaNYqW6tXpZg==", "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" - }, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, - "node_modules/@wordpress/e2e-tests/node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/api-fetch": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-7.9.0.tgz", - "integrity": "sha512-iqH4lNiH8FnIkJ8Nxx4KQYQMd4c/4OwZfjrk0ITwMK5PaVJHnFZ7xZV6ncMbgXbf0VjuPjfKMRmPzxICXw08IQ==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^5.9.0", - "@wordpress/url": "^4.9.0" - }, - "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/babel-preset-default": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.9.0.tgz", - "integrity": "sha512-qkhnRyku8FeiUGXfcMYfr/u2SG6NIj/9hWoe5Ubpay7gpX2A1H9+rLrTvABRiip7zit88JJ6b4VUqLL9Cr23bg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.16.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-runtime": "^7.16.0", - "@babel/preset-env": "^7.16.0", - "@babel/preset-typescript": "^7.16.0", - "@babel/runtime": "^7.16.0", - "@wordpress/browserslist-config": "^6.9.0", - "@wordpress/warning": "^3.9.0", - "browserslist": "^4.21.10", - "core-js": "^3.31.0", - "react": "^18.3.0" - }, - "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/base-styles": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-5.9.0.tgz", - "integrity": "sha512-b0erDgc8I6NTjbHaPL4GTa3IbfHp4o1+Yx74oT6gLgV9i7Qd8UjBmsUDYIZTV1jqB/ch9DuaDqDaNYqW6tXpZg==", - "dev": true, - "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/browserslist-config": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.9.0.tgz", - "integrity": "sha512-yv8KJrMZTvhY+PNWQ6CQVTUs/6sAVgim7AxGpgTkVzDYKvTeJKuZqeHzAWtHKTOG+ORIj/29XtpIOU85R9dkng==", + "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/browserslist-config": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.9.0.tgz", + "integrity": "sha512-yv8KJrMZTvhY+PNWQ6CQVTUs/6sAVgim7AxGpgTkVzDYKvTeJKuZqeHzAWtHKTOG+ORIj/29XtpIOU85R9dkng==", "dev": true, "engines": { "node": ">=18.12.0", @@ -8508,49 +8569,6 @@ "puppeteer-core": ">=11" } }, - "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/eslint-plugin": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-21.2.0.tgz", - "integrity": "sha512-jsqi1C96FV4wTGPtPVP/bj/rQtDgu4dHP5pKqtwCuPs7AU4pnUJPHut67Ass8POD+c4EvjPVhS8UDpBs2MeSJg==", - "dev": true, - "dependencies": { - "@babel/eslint-parser": "^7.16.0", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^8.9.0", - "@wordpress/prettier-config": "^4.9.0", - "cosmiconfig": "^7.0.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jest": "^27.2.3", - "eslint-plugin-jsdoc": "^46.4.6", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-playwright": "^0.15.3", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-react": "^7.27.0", - "eslint-plugin-react-hooks": "^4.3.0", - "globals": "^13.12.0", - "requireindex": "^1.2.0" - }, - "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" - }, - "peerDependencies": { - "@babel/core": ">=7", - "eslint": ">=8", - "prettier": ">=3", - "typescript": ">=4" - }, - "peerDependenciesMeta": { - "prettier": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, "node_modules/@wordpress/e2e-tests/node_modules/@wordpress/i18n": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.9.0.tgz", @@ -8834,15 +8852,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/@wordpress/e2e-tests/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/@wordpress/e2e-tests/node_modules/chromium-bidi": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", @@ -8880,213 +8889,73 @@ "integrity": "sha512-75fMas7PkYNDTmDyb6PRJCH7ILmHLp+BhrZGeMsa4bCh40DTxgCz2NRy5UDzII4C5KuD0oBMZ9vXKhEl6UD/3w==", "dev": true }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", + "node_modules/@wordpress/e2e-tests/node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "^5.10.0" + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "bin": { + "extract-zip": "cli.js" }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", - "eslint": "^7.0.0 || ^8.0.0", - "jest": "*" + "engines": { + "node": ">= 10.17.0" }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } + "optionalDependencies": { + "@types/yauzl": "^2.9.1" } }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "node_modules/@wordpress/e2e-tests/node_modules/file-entry-cache": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", + "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" + "flat-cache": "^5.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=18" } }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "node_modules/@wordpress/e2e-tests/node_modules/flat-cache": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", + "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "dependencies": { + "flatted": "^3.3.1", + "keyv": "^4.5.4" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "engines": { + "node": ">=18" } }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "node_modules/@wordpress/e2e-tests/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "pump": "^3.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=8" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "node_modules/@wordpress/e2e-tests/node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/eslint-plugin-playwright": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-0.15.3.tgz", - "integrity": "sha512-LQMW5y0DLK5Fnpya7JR1oAYL2/7Y9wDiYw6VZqlKqcRGSgjbVKNqxraphk7ra1U3Bb5EK444xMgUlQPbMg2M1g==", - "dev": true, - "peerDependencies": { - "eslint": ">=7", - "eslint-plugin-jest": ">=25" - }, - "peerDependenciesMeta": { - "eslint-plugin-jest": { - "optional": true - } - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/file-entry-cache": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", - "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", - "dev": true, - "dependencies": { - "flat-cache": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/flat-cache": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", - "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", - "dev": true, - "dependencies": { - "flatted": "^3.3.1", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@wordpress/e2e-tests/node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "dependencies": { - "global-prefix": "^3.0.0" + "global-prefix": "^3.0.0" }, "engines": { "node": ">=6" @@ -9106,21 +8975,6 @@ "node": ">=6" } }, - "node_modules/@wordpress/e2e-tests/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@wordpress/e2e-tests/node_modules/http-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", @@ -9210,21 +9064,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wordpress/e2e-tests/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@wordpress/e2e-tests/node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -9530,18 +9369,6 @@ "streamx": "^2.15.0" } }, - "node_modules/@wordpress/e2e-tests/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@wordpress/e2e-tests/node_modules/write-file-atomic": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", @@ -9644,16 +9471,17 @@ } }, "node_modules/@wordpress/eslint-plugin": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.1.0.tgz", - "integrity": "sha512-5eGpXEwaZsKbEh9040nVr4ggmrpPmltP+Ie4iGruWvCme6ZIFYw70CyWEV8S102IkqjH/BaH6d+CWg8tN7sc/g==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-21.2.0.tgz", + "integrity": "sha512-jsqi1C96FV4wTGPtPVP/bj/rQtDgu4dHP5pKqtwCuPs7AU4pnUJPHut67Ass8POD+c4EvjPVhS8UDpBs2MeSJg==", "dev": true, + "license": "GPL-2.0-or-later", "dependencies": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.42.0", - "@wordpress/prettier-config": "^3.15.0", + "@wordpress/babel-preset-default": "^8.9.0", + "@wordpress/prettier-config": "^4.9.0", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -9668,8 +9496,8 @@ "requireindex": "^1.2.0" }, "engines": { - "node": ">=14", - "npm": ">=6.14.4" + "node": ">=18.12.0", + "npm": ">=8.19.2" }, "peerDependencies": { "@babel/core": ">=7", @@ -9824,6 +9652,55 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/babel-preset-default": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.9.0.tgz", + "integrity": "sha512-qkhnRyku8FeiUGXfcMYfr/u2SG6NIj/9hWoe5Ubpay7gpX2A1H9+rLrTvABRiip7zit88JJ6b4VUqLL9Cr23bg==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/core": "^7.16.0", + "@babel/plugin-transform-react-jsx": "^7.16.0", + "@babel/plugin-transform-runtime": "^7.16.0", + "@babel/preset-env": "^7.16.0", + "@babel/preset-typescript": "^7.16.0", + "@babel/runtime": "^7.16.0", + "@wordpress/browserslist-config": "^6.9.0", + "@wordpress/warning": "^3.9.0", + "browserslist": "^4.21.10", + "core-js": "^3.31.0", + "react": "^18.3.0" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/browserslist-config": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.9.0.tgz", + "integrity": "sha512-yv8KJrMZTvhY+PNWQ6CQVTUs/6sAVgim7AxGpgTkVzDYKvTeJKuZqeHzAWtHKTOG+ORIj/29XtpIOU85R9dkng==", + "dev": true, + "license": "GPL-2.0-or-later", + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/prettier-config": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-4.9.0.tgz", + "integrity": "sha512-kxBTL/UZS1JEqzWWHo+h3q+ErvCtkiHm6GozUDgX9UlZXHAx/XAc24s4UaYXmZpjuH5hWO4sbp3xbj2ZI+Ohkg==", + "dev": true, + "license": "GPL-2.0-or-later", + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "peerDependencies": { + "prettier": ">=3" + } + }, "node_modules/@wordpress/eslint-plugin/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -10674,44 +10551,389 @@ "react-dom": "^18.0.0" } }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.26.0.tgz", - "integrity": "sha512-4KFyQ3IsYIJaIvOQ1qhAHhRISs9abNToF/bktfMNxQiEJsmbNn7lq/IbaY+shqwdBWVg8TQtLcL4MpSl0ISaxQ==", + "node_modules/@wordpress/scripts/node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", "dev": true, + "license": "MIT", "dependencies": { - "@wordpress/api-fetch": "^6.55.0", - "@wordpress/keycodes": "^3.58.0", - "@wordpress/url": "^3.59.0", - "change-case": "^4.1.2", - "form-data": "^4.0.0", - "get-port": "^5.1.1", - "lighthouse": "^10.4.0", - "mime": "^3.0.0", - "web-vitals": "^3.5.0" + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">=12" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@playwright/test": ">=1" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@wordpress/scripts/node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "node_modules/@wordpress/scripts/node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "node-fetch": "2.6.7" - } - }, - "node_modules/@wordpress/scripts/node_modules/devtools-protocol": { - "version": "0.0.981744", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@wordpress/scripts/node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@wordpress/scripts/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@wordpress/scripts/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@wordpress/scripts/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@wordpress/scripts/node_modules/@wordpress/e2e-test-utils-playwright": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.26.0.tgz", + "integrity": "sha512-4KFyQ3IsYIJaIvOQ1qhAHhRISs9abNToF/bktfMNxQiEJsmbNn7lq/IbaY+shqwdBWVg8TQtLcL4MpSl0ISaxQ==", + "dev": true, + "dependencies": { + "@wordpress/api-fetch": "^6.55.0", + "@wordpress/keycodes": "^3.58.0", + "@wordpress/url": "^3.59.0", + "change-case": "^4.1.2", + "form-data": "^4.0.0", + "get-port": "^5.1.1", + "lighthouse": "^10.4.0", + "mime": "^3.0.0", + "web-vitals": "^3.5.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "@playwright/test": ">=1" + } + }, + "node_modules/@wordpress/scripts/node_modules/@wordpress/eslint-plugin": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.1.0.tgz", + "integrity": "sha512-5eGpXEwaZsKbEh9040nVr4ggmrpPmltP+Ie4iGruWvCme6ZIFYw70CyWEV8S102IkqjH/BaH6d+CWg8tN7sc/g==", + "dev": true, + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/eslint-parser": "^7.16.0", + "@typescript-eslint/eslint-plugin": "^6.4.1", + "@typescript-eslint/parser": "^6.4.1", + "@wordpress/babel-preset-default": "^7.42.0", + "@wordpress/prettier-config": "^3.15.0", + "cosmiconfig": "^7.0.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-jest": "^27.2.3", + "eslint-plugin-jsdoc": "^46.4.6", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-playwright": "^0.15.3", + "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-react": "^7.27.0", + "eslint-plugin-react-hooks": "^4.3.0", + "globals": "^13.12.0", + "requireindex": "^1.2.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6.14.4" + }, + "peerDependencies": { + "@babel/core": ">=7", + "eslint": ">=8", + "prettier": ">=3", + "typescript": ">=4" + }, + "peerDependenciesMeta": { + "prettier": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@wordpress/scripts/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@wordpress/scripts/node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/@wordpress/scripts/node_modules/devtools-protocol": { + "version": "0.0.981744", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", "dev": true }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jest": { + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^5.10.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", + "eslint": "^7.0.0 || ^8.0.0", + "jest": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@wordpress/scripts/node_modules/eslint-plugin-playwright": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-0.15.3.tgz", + "integrity": "sha512-LQMW5y0DLK5Fnpya7JR1oAYL2/7Y9wDiYw6VZqlKqcRGSgjbVKNqxraphk7ra1U3Bb5EK444xMgUlQPbMg2M1g==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=7", + "eslint-plugin-jest": ">=25" + }, + "peerDependenciesMeta": { + "eslint-plugin-jest": { + "optional": true + } + } + }, "node_modules/@wordpress/scripts/node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -10747,6 +10969,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@wordpress/scripts/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@wordpress/scripts/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@wordpress/scripts/node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -10796,6 +11050,19 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "node_modules/@wordpress/scripts/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@wordpress/scripts/node_modules/web-vitals": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.2.tgz", diff --git a/package.json b/package.json index aa3fc3b56..572ddde2c 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,9 @@ "test:php:watch": "wp-env run --env-cwd='wp-content/plugins/otter-blocks' tests-cli composer run-script test:watch", "lint:php": "wp-env run --env-cwd='wp-content/plugins/otter-blocks' cli composer run-script lint", "format:php": "wp-env run --env-cwd='wp-content/plugins/otter-blocks' cli composer run-script format", - "wp-env": "wp-env" + "wp-env": "wp-env", + "build:makepot": "docker run --user root --rm --volume \"$(pwd):/var/www/html/otter-blocks\" wordpress:cli bash -c 'php -d memory_limit=512M \"$(which wp)\" --version --allow-root && wp i18n make-pot otter-blocks ./otter-blocks/languages/otter-pro.pot --include=src/pro,otter-pro,build/pro --allow-root --headers={\\\"Last-Translator\\\":\\\"friends@themeisle.com\\\"\\,\\\"Report-Msgid-Bugs-To\\\":\\\"https://github.com/Codeinwp/otter-blocks/issues\\\"\\,\\\"Project-Id-Version\\\":\\\"Otter-Blocks\\\"\\,\\\"POT-Creation-Date\\\":\\\"\\\"}'" + }, "repository": { "type": "git", @@ -90,6 +92,7 @@ "@types/object-hash": "^3.0.6", "@types/wordpress__block-editor": "^11.5.9", "@types/wordpress__components": "^23.0.11", + "@typescript-eslint/eslint-plugin": "^8.8.1", "@typescript-eslint/parser": "^8.0.0", "@wordpress/block-editor": "^13.3.0", "@wordpress/components": "^28.3.0", @@ -101,6 +104,7 @@ "@wordpress/e2e-tests": "^8.9.0", "@wordpress/element": "^6.9.0", "@wordpress/env": "^9.6.0", + "@wordpress/eslint-plugin": "^21.2.0", "@wordpress/scripts": "27.9.0", "conventional-changelog-simple-preset": "^1.0.24", "eslint-config-wordpress": "^2.0.0", diff --git a/plugins/otter-pro/otter-pro.php b/plugins/otter-pro/otter-pro.php index ad3d3216f..1ec972a60 100644 --- a/plugins/otter-pro/otter-pro.php +++ b/plugins/otter-pro/otter-pro.php @@ -125,3 +125,5 @@ function ( $compatibilities ) { return $compatibilities; } ); + +add_filter( 'otter-pro_sdk_enable_private_translations', '__return_true' ); diff --git a/src/animation/components/animation-popover.js b/src/animation/components/animation-popover.js index 95e299e08..588337ad6 100644 --- a/src/animation/components/animation-popover.js +++ b/src/animation/components/animation-popover.js @@ -17,8 +17,8 @@ import { useInstanceId } from '@wordpress/compose'; import { Fragment, useState } from '@wordpress/element'; /** - * Internal dependencies. - */ + * Internal dependencies. + */ import { categories } from '../data.js'; function AnimationPopover({ @@ -97,14 +97,14 @@ function AnimationPopover({ />
- { animationsList.map( ( animation ) => { + { animationsList.map( ( animation, index ) => { return ( - + { '' === currentInput && - categories.map( ( category ) => { + categories.map( ( category, catIndex ) => { return category.value === animation.value ? ( -
+
{ category.label }
) : ( diff --git a/src/animation/editor.js b/src/animation/editor.js index c66843523..c23c58d3d 100644 --- a/src/animation/editor.js +++ b/src/animation/editor.js @@ -7,22 +7,22 @@ import { Button, PanelBody, SelectControl, - ToggleControl + ToggleControl, + __experimentalUnitControl as UnitControl } from '@wordpress/components'; import { Fragment, useState, - useEffect + useEffect, + memo } from '@wordpress/element'; import { applyFilters } from '@wordpress/hooks'; -import { __experimentalUnitControl as UnitControl } from '@wordpress/components'; - /** - * Internal dependencies. - */ + * Internal dependencies. + */ import { animationsList, delayList, @@ -44,17 +44,16 @@ const AnimationType = { default: 'default' }; -import { memo } from '@wordpress/element'; import { useCSSNode } from '../blocks/helpers/block-utility.js'; /** * Update the animation config. * - * @param {string} type The type of animation. (e.g. count, typing, default) - * @param {string|undefined} oldValue The old value of the animation. - * @param {string|undefined} newValue The new value of the animation. - * @param {Function|undefined} callback The callback function which will be called after the animation is updated. - * @param {Object} attributes The attributes of the block. + * @param {string} type The type of animation. (e.g. count, typing, default) + * @param {string|undefined} oldValue The old value of the animation. + * @param {string|undefined} newValue The new value of the animation. + * @param {Function|undefined} callback The callback function which will be called after the animation is updated. + * @param {Object} attributes The attributes of the block. * @param {(x: Object) => void} setAttributes The setAttributes function of the block. */ export const updateAnimConfig = ( type, oldValue, newValue, callback, attributes, setAttributes ) => { @@ -136,7 +135,7 @@ function AnimationControls({ const updateAnimation = ( e ) => { let classes; - let animationValue = 'none' !== e ? e : ''; + const animationValue = 'none' !== e ? e : ''; if ( attributes.className ) { classes = attributes.className; @@ -179,7 +178,7 @@ function AnimationControls({ setAnimation( e ); setAttributes({ className: classes }); - let block = document.querySelector( `#block-${ clientId } .animated` ) || document.querySelector( `#block-${ clientId }.animated` ); + const block = document.querySelector( `#block-${ clientId } .animated` ) || document.querySelector( `#block-${ clientId }.animated` ); if ( block ) { outAnimation.forEach( ( i ) => { diff --git a/src/animation/frontend.js b/src/animation/frontend.js index 0025671f0..614a2ac6c 100644 --- a/src/animation/frontend.js +++ b/src/animation/frontend.js @@ -272,7 +272,7 @@ const animateElements = () => { }; const isElementInViewport = ( el ) => { - let scroll = window.scrollY || window.pageYOffset; + const scroll = window.scrollY || window.pageYOffset; const offset = calculateOffset( getTriggerOffset( el ) ); const boundsTop = el.getBoundingClientRect().top + scroll + offset; diff --git a/src/animation/frontend/count/index.js b/src/animation/frontend/count/index.js index 7ebbc74aa..c510ce8be 100644 --- a/src/animation/frontend/count/index.js +++ b/src/animation/frontend/count/index.js @@ -19,10 +19,10 @@ const speedConfig = { /** * Get the configuration option from the element CSS classes. * @param {HTMLDivElement} elem - * @returns Configuration options. + * @return Configuration options. */ const getConfiguration = ( elem ) => { - let parent = elem.parentElement; + const parent = elem.parentElement; for ( let i = 0; i < MAX_PARENT_SEARCH; ++i ) { if ( Array.from( parent.classList ).some( o => o.includes( 'o-count-' ) ) ) { const arr = Array.from( parent.classList ); @@ -52,7 +52,7 @@ const NUMBER_EXTRA_FORMAT = new Set( Array.from( ',' ) ); /** * Extract the number, prefix, and suffix. * @param {string} text The selected text - * @returns An object with the number, prefix and suffix + * @return An object with the number, prefix and suffix */ const extract = ( text ) => { const arr = Array.from( text ); @@ -64,7 +64,7 @@ const extract = ( text ) => { let isPrefix = true; let isSuffix = false; - for ( let x of arr ) { + for ( const x of arr ) { if ( NUMERIC_FORMATS.has( x ) ) { if ( isPrefix ) { isPrefix = false; @@ -76,15 +76,13 @@ const extract = ( text ) => { } else { number.push( x ); } + } else if ( isPrefix ) { + prefix.push( x ); } else { - if ( isPrefix ) { - prefix.push( x ); - } else { - if ( ! isSuffix ) { - isSuffix = true; - } - suffix.push( x ); + if ( ! isSuffix ) { + isSuffix = true; } + suffix.push( x ); } } diff --git a/src/animation/frontend/typing/index.js b/src/animation/frontend/typing/index.js index cd4fae4fd..381c99e59 100644 --- a/src/animation/frontend/typing/index.js +++ b/src/animation/frontend/typing/index.js @@ -22,10 +22,10 @@ const speedConfig = { /** * Get the configuration option from the element CSS classes. * @param {HTMLDivElement} elem - * @returns Configuration options. + * @return Configuration options. */ const getConfiguration = ( elem ) => { - let parent = elem.parentElement; + const parent = elem.parentElement; for ( let i = 0; i < MAX_PARENT_SEARCH; ++i ) { if ( Array.from( parent.classList ).some( o => o.includes( 'o-typing-' ) ) ) { const arr = Array.from( parent.classList ); diff --git a/src/animation/index.js b/src/animation/index.js index a80ae6971..b21fea478 100644 --- a/src/animation/index.js +++ b/src/animation/index.js @@ -18,8 +18,8 @@ import { addFilter } from '@wordpress/hooks'; import { select } from '@wordpress/data'; /** - * Internal dependencies. - */ + * Internal dependencies. + */ import './editor.scss'; import Edit from './editor.js'; diff --git a/src/animation/utils.js b/src/animation/utils.js index 018f5ae1d..edb3e12a2 100644 --- a/src/animation/utils.js +++ b/src/animation/utils.js @@ -1,8 +1,8 @@ /** * Create utility functions for an interval timer. - * @param {number} duration The duration, in seconds. + * @param {number} duration The duration, in seconds. * @param {number} deltaTime The time between two time ticks, in seconds. - * @returns Utility functions. + * @return Utility functions. */ export const makeInterval = ( duration, deltaTime ) => { @@ -21,7 +21,7 @@ export const makeInterval = ( duration, deltaTime ) => { /** * Start the interval. Get a callback function that execute at every tick and the one that execute at the end. - * @param {Function} callback Function that execute at every tick. + * @param {Function} callback Function that execute at every tick. * @param {Function} endCallback Function that execute at the end. */ const start = ( callback, endCallback ) => { @@ -45,7 +45,7 @@ export const makeInterval = ( duration, deltaTime ) => { /** * Specify a function to execute when the DOM is fully loaded. * - * @param {Callback} callback A function to execute after the DOM is ready. + * @param {()=>{}} callback A function to execute after the DOM is ready. * @return {void} */ export const domReady = ( callback ) => { diff --git a/src/blocks/blocks/accordion/group/edit.js b/src/blocks/blocks/accordion/group/edit.js index a1096d140..5399ca46a 100644 --- a/src/blocks/blocks/accordion/group/edit.js +++ b/src/blocks/blocks/accordion/group/edit.js @@ -42,7 +42,7 @@ const PREFIX_TO_FAMILY = { /** * Accordion Group component * @param {import('./types').AccordionGroupProps} props - * @returns + * @return */ const Edit = ({ name, diff --git a/src/blocks/blocks/accordion/group/inspector.js b/src/blocks/blocks/accordion/group/inspector.js index 4029e35c0..efc7a6c48 100644 --- a/src/blocks/blocks/accordion/group/inspector.js +++ b/src/blocks/blocks/accordion/group/inspector.js @@ -72,7 +72,7 @@ const gapCompatibility = { /** * * @param {import('./types.js').AccordionGroupInspectorProps} props - * @returns + * @return */ const Inspector = ({ clientId, @@ -137,7 +137,7 @@ const Inspector = ({ const changeBoxShadow = data => { const boxShadow = { ...attributes.boxShadow }; - Object.entries( data ).map( ([ key, val ] = data ) => { + Object.entries( data ).forEach( ([ key, val ] = data ) => { boxShadow[key] = val; }); diff --git a/src/blocks/blocks/accordion/item/edit.js b/src/blocks/blocks/accordion/item/edit.js index 2eec9702c..221a4e8f7 100644 --- a/src/blocks/blocks/accordion/item/edit.js +++ b/src/blocks/blocks/accordion/item/edit.js @@ -28,7 +28,7 @@ import { select } from '@wordpress/data'; /** * Accordion Item component * @param {import('./types.js').AccordionItemProps} props - * @returns + * @return */ const Edit = ({ clientId, @@ -50,7 +50,7 @@ const Edit = ({ const parentClientId = select( 'core/block-editor' ).getBlockParents( clientId ).at( -1 ); const parentBlock = select( 'core/block-editor' ).getBlock( parentClientId ); - setAttributes({ title: __( 'Accordion item ', 'otter-blocks' ) + parentBlock.innerBlocks.length }); + setAttributes({ title: __( 'Accordion item', 'otter-blocks' ) + parentBlock.innerBlocks.length }); } }, []); diff --git a/src/blocks/blocks/advanced-heading/edit.js b/src/blocks/blocks/advanced-heading/edit.js index 66ec6b6be..2cfab5e84 100644 --- a/src/blocks/blocks/advanced-heading/edit.js +++ b/src/blocks/blocks/advanced-heading/edit.js @@ -45,7 +45,7 @@ const { attributes: defaultAttributes } = metadata; /** * Advanced Heading component * @param {import('./types').AdvancedHeadingProps} props - * @returns + * @return */ const Edit = ({ attributes, diff --git a/src/blocks/blocks/advanced-heading/inspector.js b/src/blocks/blocks/advanced-heading/inspector.js index 84796c726..4bde8e75e 100644 --- a/src/blocks/blocks/advanced-heading/inspector.js +++ b/src/blocks/blocks/advanced-heading/inspector.js @@ -65,7 +65,7 @@ const fieldMapping = { /** * * @param {import('./types.js').AdvancedHeadingInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/button-group/button/edit.js b/src/blocks/blocks/button-group/button/edit.js index 3def04c01..0361c8668 100644 --- a/src/blocks/blocks/button-group/button/edit.js +++ b/src/blocks/blocks/button-group/button/edit.js @@ -39,7 +39,7 @@ const { attributes: defaultAttributes } = metadata; /** * Button component * @param {import('./types').ButtonGroupButtonProps} props - * @returns + * @return */ const Edit = ( props ) => { const { diff --git a/src/blocks/blocks/button-group/button/inspector.js b/src/blocks/blocks/button-group/button/inspector.js index 6d7520731..b85d8bbc9 100644 --- a/src/blocks/blocks/button-group/button/inspector.js +++ b/src/blocks/blocks/button-group/button/inspector.js @@ -54,7 +54,7 @@ const styles = [ /** * * @param {import('./types.js').ButtonGroupButtonInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, @@ -301,7 +301,7 @@ const Inspector = ({ label={ __( 'Background', 'otter-blocks' ) } colorValue={ attributes.background } gradientValue={ attributes.backgroundGradient } - onColorChange={ background => setAttributes({ background: background })} + onColorChange={ background => setAttributes({ background })} onGradientChange={ backgroundGradient => setAttributes({ backgroundGradient })} className="is-list" /> diff --git a/src/blocks/blocks/button-group/group/controls.tsx b/src/blocks/blocks/button-group/group/controls.tsx index 3e5d745ce..7d843cb48 100644 --- a/src/blocks/blocks/button-group/group/controls.tsx +++ b/src/blocks/blocks/button-group/group/controls.tsx @@ -2,13 +2,13 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { AlignmentToolbar, BlockControls } from '@wordpress/block-editor'; +import { BlockControls } from '@wordpress/block-editor'; import { DropdownMenu, ToolbarGroup } from '@wordpress/components'; /** * Internal dependencies */ -import { ButtonGroupInspectorProps } from './types'; +import type { ButtonGroupInspectorProps } from './types.d.ts'; import { useResponsiveAttributes } from '../../../helpers/utility-hooks'; import { alignCenter, alignLeft, alignRight, menu } from '@wordpress/icons'; diff --git a/src/blocks/blocks/button-group/group/deprecated.js b/src/blocks/blocks/button-group/group/deprecated.js index 8e85d08e7..172396a2d 100644 --- a/src/blocks/blocks/button-group/group/deprecated.js +++ b/src/blocks/blocks/button-group/group/deprecated.js @@ -161,7 +161,7 @@ const deprecated = [{ 'wp-block-themeisle-blocks-button', `wp-block-themeisle-blocks-button-${ i }` ) } - style={ buttonStyle } + style={ buttonStyle } rel="noreferrer" > { ( 'left' === attributes.data[i].iconType || 'only' === attributes.data[i].iconType ) && ( } block The block to copy. - * @returns {import('../../helpers/blocks.js').BlockProps} The copied block. + * @return {import('../../helpers/blocks.js').BlockProps|void} The copied block. */ const makeBlockCopy = ( block ) => { if ( undefined === block ) { @@ -185,7 +185,7 @@ const ContentGenerator = ({ const PRESETS = { form: { title: __( 'AI Form generator', 'otter-blocks' ), - placeholder: __( 'Start describing what form you need...', 'otter-blocks' ), + placeholder: __( 'Start describing what form you need…', 'otter-blocks' ), actions: ( props ) => { return ( @@ -209,7 +209,7 @@ const ContentGenerator = ({ }, textTransformation: { title: __( 'AI Content generator', 'otter-blocks' ), - placeholder: __( 'Start describing what content you need...', 'otter-blocks' ), + placeholder: __( 'Start describing what content you need…', 'otter-blocks' ), actions: ( props ) => { return ( diff --git a/src/blocks/blocks/content-generator/inspector.js b/src/blocks/blocks/content-generator/inspector.js index 948f8f815..7a88f8c77 100644 --- a/src/blocks/blocks/content-generator/inspector.js +++ b/src/blocks/blocks/content-generator/inspector.js @@ -8,7 +8,7 @@ import { /** * * @param {import('./types').ContentGeneratorInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/countdown/common.ts b/src/blocks/blocks/countdown/common.ts index bd52d0d94..56a533d11 100644 --- a/src/blocks/blocks/countdown/common.ts +++ b/src/blocks/blocks/countdown/common.ts @@ -1,4 +1,4 @@ -import { CountdownTimer } from './types'; +import type { CountdownTimer } from './types.d.ts'; import { __ } from '@wordpress/i18n'; const _MS_PER_SECONDS = 1000; @@ -10,7 +10,7 @@ const _MS_PER_DAY = _MS_PER_HOURS * 24; * Get the time from a timer structure * * @param timer The timer data strcture. - * @returns The time in miliseconds + * @return The time in miliseconds */ export const toTimer = ( timer: CountdownTimer = {}): number => { return ( parseInt( timer?.days || '0' ) * _MS_PER_DAY + parseInt( timer?.hours || '0' ) * _MS_PER_HOURS + parseInt( timer?.minutes || '0' ) * _MS_PER_MINUTES + parseInt( timer?.seconds || '0' ) * _MS_PER_SECONDS ) ?? 0; @@ -20,8 +20,8 @@ export const toTimer = ( timer: CountdownTimer = {}): number => { * Get the time interval from two dates. * * @param start The start date. - * @param end The end date. - * @returns + * @param end The end date. + * @return */ export const fromInterval = ( start?: string, end?: string ): number => { if ( ! start || ! end ) { @@ -36,9 +36,11 @@ export const fromInterval = ( start?: string, end?: string ): number => { /** * Get the time interval from the unix time * - * @param unixTime Time as UNIX - * @param settings Options to keep a components or/and allow negative time - * @returns An object with the values for days, hours, minutes, seconds + * @param unixTime Time as UNIX + * @param settings Options to keep a components or/and allow negative time + * @param settings.exclude + * @param settings.keepNeg + * @return An object with the values for days, hours, minutes, seconds */ export const getIntervalFromUnix = ( unixTime: number, settings: { exclude?: string[], keepNeg?: boolean }) => { unixTime ??= 0; // Check for null/undefined diff --git a/src/blocks/blocks/countdown/edit.tsx b/src/blocks/blocks/countdown/edit.tsx index 41bc082bf..accdf6976 100644 --- a/src/blocks/blocks/countdown/edit.tsx +++ b/src/blocks/blocks/countdown/edit.tsx @@ -43,7 +43,7 @@ import { } from '../../helpers/helper-functions.js'; import DisplayTime from './components/display-time'; import { fromInterval, toTimer } from './common'; -import { CountdownProps } from './types'; +import type { CountdownProps } from './types.d.ts'; const { attributes: defaultAttributes } = metadata; diff --git a/src/blocks/blocks/countdown/inspector.js b/src/blocks/blocks/countdown/inspector.js index 35e1d25ac..63d89803c 100644 --- a/src/blocks/blocks/countdown/inspector.js +++ b/src/blocks/blocks/countdown/inspector.js @@ -143,7 +143,7 @@ const EndActionPanel = () => ( /** * * @param {import('./types.js').CountdownInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, @@ -193,7 +193,7 @@ const Inspector = ({ - { applyFilters( 'otter.countdown.controls.settings', , { attributes: attributes, setAttributes: setAttributes }) } + { applyFilters( 'otter.countdown.controls.settings', , { attributes, setAttributes }) } { attributes.mode === undefined && ( - { applyFilters( 'otter.countdown.controls.end', , { attributes: attributes, setAttributes: setAttributes }) } + { applyFilters( 'otter.countdown.controls.end', , { attributes, setAttributes }) } diff --git a/src/blocks/blocks/countdown/save.tsx b/src/blocks/blocks/countdown/save.tsx index 7f275f9b8..bbab5f270 100644 --- a/src/blocks/blocks/countdown/save.tsx +++ b/src/blocks/blocks/countdown/save.tsx @@ -18,7 +18,7 @@ import { } from '../../helpers/helper-functions.js'; import { getIntervalFromUnix, timerSerialization } from './common'; import { isEmpty } from 'lodash'; -import { CountdownProps } from './types.js'; +import type { CountdownProps } from './types.d.ts'; const DisplayTimeComponent = ({ name, diff --git a/src/blocks/blocks/flip/edit.tsx b/src/blocks/blocks/flip/edit.tsx index 799cf1767..d56abfad1 100644 --- a/src/blocks/blocks/flip/edit.tsx +++ b/src/blocks/blocks/flip/edit.tsx @@ -36,7 +36,7 @@ import { } from '../../helpers/block-utility.js'; import { boxToCSS, getChoice, mergeBoxDefaultValues, stringToBox, _px } from '../../helpers/helper-functions.js'; import { isNumber } from 'lodash'; -import { type FlipProps } from './types'; +import type { FlipProps } from './types.d.ts'; import { useDarkBackground, useResponsiveAttributes @@ -47,7 +47,11 @@ const { attributes: defaultAttributes } = metadata; /** * Flip component * @param props - * @returns + * @param props.attributes + * @param props.setAttributes + * @param props.clientId + * @param props.isSelected + * @return */ const Edit = ({ attributes, @@ -162,8 +166,7 @@ const Edit = ({ currentSide={ currentSide } setSide={ setSide } /> - - {/** @ts-ignore */} +
) } diff --git a/src/blocks/blocks/flip/inspector.js b/src/blocks/blocks/flip/inspector.js index e9cc8e8d5..dbb35c029 100644 --- a/src/blocks/blocks/flip/inspector.js +++ b/src/blocks/blocks/flip/inspector.js @@ -95,7 +95,7 @@ const defaultFontSizes = [ /** * * @param {import('./types.js').FlipInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/font-awesome-icons/edit.js b/src/blocks/blocks/font-awesome-icons/edit.js index 02e2d31b3..5fe413a5e 100644 --- a/src/blocks/blocks/font-awesome-icons/edit.js +++ b/src/blocks/blocks/font-awesome-icons/edit.js @@ -44,7 +44,7 @@ export const alignHandler = ( align ) => { /** * Icons Component * @param {import('./types').IconsProps} props - * @returns + * @return */ const Edit = ({ name, diff --git a/src/blocks/blocks/font-awesome-icons/inspector.js b/src/blocks/blocks/font-awesome-icons/inspector.js index b8b6bd06f..1627f4d9f 100644 --- a/src/blocks/blocks/font-awesome-icons/inspector.js +++ b/src/blocks/blocks/font-awesome-icons/inspector.js @@ -64,7 +64,7 @@ const defaultFontSizes = [ /** * * @param {import('./types.js').IconInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/form/common.tsx b/src/blocks/blocks/form/common.tsx index d9c71b88c..73c61f01a 100644 --- a/src/blocks/blocks/form/common.tsx +++ b/src/blocks/blocks/form/common.tsx @@ -12,7 +12,7 @@ import { omit } from 'lodash'; import { createBlock } from '@wordpress/blocks'; import { dispatch } from '@wordpress/data'; -import { BlockProps } from '../../helpers/blocks'; +import type { BlockProps } from '../../helpers/blocks'; import { changeActiveStyle, getActiveStyle, getChoice } from '../../helpers/helper-functions'; import { Fragment } from '@wordpress/element'; import { SortableElement, SortableHandle } from 'react-sortable-hoc'; @@ -160,7 +160,7 @@ export const switchFormFieldTo = ( type?: string, clientId ?:string, attributes? const newBlock = createBlock( `themeisle-blocks/${ blockName }`, - omit({ ...attributes, type: type }, 'form-textarea' === blockName ? [ 'multipleSelection', 'options', 'type' ] : [ 'multipleSelection', 'options' ]) + omit({ ...attributes, type }, 'form-textarea' === blockName ? [ 'multipleSelection', 'options', 'type' ] : [ 'multipleSelection', 'options' ]) ); replaceBlock( clientId, newBlock ); diff --git a/src/blocks/blocks/form/edit.js b/src/blocks/blocks/form/edit.js index 8cf33231c..5478ad261 100644 --- a/src/blocks/blocks/form/edit.js +++ b/src/blocks/blocks/form/edit.js @@ -88,7 +88,7 @@ const formOptionsMap = { /** * Form component * @param {import('./type').FormProps} props - * @returns + * @return */ const Edit = ({ attributes, @@ -118,7 +118,7 @@ const Edit = ({ /** * Get global value if it is the case. * @param {import('../../common').SyncAttrs} field - * @returns + * @return */ const getSyncValue = field => { if ( attributes?.isSynced?.includes( field ) ) { @@ -651,7 +651,7 @@ const Edit = ({ } else { createNotice( 'error', - __( 'An error has occurred: ', 'otter-blocks' ) + ( res?.error || __( 'unknown', 'otter-blocks' ) ), + __( 'An error has occurred:', 'otter-blocks' ) + ( res?.error || __( 'unknown', 'otter-blocks' ) ), { isDismissible: true, type: 'snackbar' @@ -700,7 +700,7 @@ const Edit = ({ } else { createNotice( 'error', - __( 'An error has occurred: ', 'otter-blocks' ) + ( res?.error || __( 'unknown', 'otter-blocks' ) + __( '. Check your provider for confirmation.', 'otter-blocks' ) ), + __( 'An error has occurred:', 'otter-blocks' ) + ( res?.error || __( 'unknown', 'otter-blocks' ) + __( '. Check your provider for confirmation.', 'otter-blocks' ) ), { isDismissible: true, type: 'snackbar' diff --git a/src/blocks/blocks/form/file/index.js b/src/blocks/blocks/form/file/index.js index 8807192f3..fb9452045 100644 --- a/src/blocks/blocks/form/file/index.js +++ b/src/blocks/blocks/form/file/index.js @@ -2,11 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; - -import { registerBlockType } from '@wordpress/blocks'; - -import { createBlock } from '@wordpress/blocks'; - +import { registerBlockType, createBlock } from '@wordpress/blocks'; import { omit } from 'lodash'; /** diff --git a/src/blocks/blocks/form/file/inspector.js b/src/blocks/blocks/form/file/inspector.js index ec3980e92..acd93bd25 100644 --- a/src/blocks/blocks/form/file/inspector.js +++ b/src/blocks/blocks/form/file/inspector.js @@ -103,7 +103,7 @@ const ProPreview = ({ attributes }) => { { ! Boolean( window.themeisleGutenberg.hasPro ) && ( { __( 'Get more options with Otter Pro. ', 'otter-blocks' ) } } + notice={ { __( 'Get more options with Otter Pro.', 'otter-blocks' ) } } variant="upsell" /> ) } @@ -113,7 +113,7 @@ const ProPreview = ({ attributes }) => { /** * * @param {import('./types').FormFileInspectorProps} props - * @returns {JSX.Element} + * @return {JSX.Element} */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/form/hidden-field/inspector.js b/src/blocks/blocks/form/hidden-field/inspector.js index 4c01493d1..3be46e681 100644 --- a/src/blocks/blocks/form/hidden-field/inspector.js +++ b/src/blocks/blocks/form/hidden-field/inspector.js @@ -30,7 +30,7 @@ import { fieldTypesOptions, mappedNameInfo, switchFormFieldTo } from '../common' /** * * @param {import('./types').FormHiddenFieldInspectorPros} props - * @returns {JSX.Element} + * @return {JSX.Element} */ const Inspector = ({ attributes, @@ -92,7 +92,7 @@ const Inspector = ({ /> { __( 'Get more options with Otter Pro. ', 'otter-blocks' ) } } + notice={ { __( 'Get more options with Otter Pro.', 'otter-blocks' ) } } variant="upsell" /> diff --git a/src/blocks/blocks/form/input/edit.js b/src/blocks/blocks/form/input/edit.js index 945238aae..82d02cd4f 100644 --- a/src/blocks/blocks/form/input/edit.js +++ b/src/blocks/blocks/form/input/edit.js @@ -26,7 +26,7 @@ const { attributes: defaultAttributes } = metadata; /** * Form Input component * @param {import('./types').FormInputProps} props - * @returns + * @return */ const Edit = ({ attributes, diff --git a/src/blocks/blocks/form/input/index.js b/src/blocks/blocks/form/input/index.js index 830d35a3b..90c5043c9 100644 --- a/src/blocks/blocks/form/input/index.js +++ b/src/blocks/blocks/form/input/index.js @@ -2,11 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; - -import { registerBlockType } from '@wordpress/blocks'; - -import { createBlock } from '@wordpress/blocks'; - +import { registerBlockType, createBlock } from '@wordpress/blocks'; import { omit } from 'lodash'; /** @@ -39,7 +35,7 @@ registerBlockType( name, { { name: 'themeisle-blocks/form-input-email', description: __( 'Insert an email field', 'otter-blocks' ), - icon: icon, + icon, title: __( 'Email Field', 'otter-blocks' ), attributes: { type: 'email' @@ -48,7 +44,7 @@ registerBlockType( name, { { name: 'themeisle-blocks/form-input-date', description: __( 'Insert a date field', 'otter-blocks' ), - icon: icon, + icon, title: __( 'Date Field', 'otter-blocks' ), attributes: { type: 'date' @@ -57,7 +53,7 @@ registerBlockType( name, { { name: 'themeisle-blocks/form-input-number', description: __( 'Insert a number field', 'otter-blocks' ), - icon: icon, + icon, title: __( 'Number Field', 'otter-blocks' ), attributes: { type: 'number' @@ -66,7 +62,7 @@ registerBlockType( name, { { name: 'themeisle-blocks/form-input-url', description: __( 'Insert an URL field', 'otter-blocks' ), - icon: icon, + icon, title: __( 'URL Field', 'otter-blocks' ), attributes: { type: 'url', diff --git a/src/blocks/blocks/form/input/inspector.js b/src/blocks/blocks/form/input/inspector.js index c77ea273d..e03dae1c2 100644 --- a/src/blocks/blocks/form/input/inspector.js +++ b/src/blocks/blocks/form/input/inspector.js @@ -28,7 +28,7 @@ import { HTMLAnchorControl } from '../../../components'; /** * * @param {import('./types').FormInputProps} props - * @returns {JSX.Element} + * @return {JSX.Element} */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/form/inspector.js b/src/blocks/blocks/form/inspector.js index fb68a7bfa..0f1af355a 100644 --- a/src/blocks/blocks/form/inspector.js +++ b/src/blocks/blocks/form/inspector.js @@ -340,7 +340,7 @@ const FormOptions = ({ formOptions, setFormOption, attributes, setAttributes }) /** * * @param {import('./type.js').FormInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, @@ -454,7 +454,7 @@ const Inspector = ({ { 'loading' === loadingState?.formOptions && (
- { __( 'Loading the options. Please wait...', 'otter-blocks' ) } + { __( 'Loading the options. Please wait…', 'otter-blocks' ) }
) } diff --git a/src/blocks/blocks/form/multiple-choice/edit.js b/src/blocks/blocks/form/multiple-choice/edit.js index e7827fbcc..3160178d0 100644 --- a/src/blocks/blocks/form/multiple-choice/edit.js +++ b/src/blocks/blocks/form/multiple-choice/edit.js @@ -36,7 +36,7 @@ const Field = ({ fieldType, label, position, attributes, checked, onChange }) => -
- { /** translators: %s Rating score. */ sprintf( __( '%f out of %f', 'otter-blocks' ), Math.max( Math.abs( feature.rating / divide ).toFixed( 1 ) || 0, 1 ), 10 / divide ) } + { + sprintf( + /** translators: %1$f: Rating score, %2$f: Maximum possible score. */ + __( '%1$f out of %2$f', 'otter-blocks' ), + Math.max( Math.abs( feature.rating / divide ).toFixed( 1 ) || 0, 1 ), + 10 / divide + ) + }
{ ( isSelected || feature.description ) && ( changeFeature( index, { description }) } diff --git a/src/blocks/blocks/review/inspector.js b/src/blocks/blocks/review/inspector.js index c91a00753..cf4626669 100644 --- a/src/blocks/blocks/review/inspector.js +++ b/src/blocks/blocks/review/inspector.js @@ -174,7 +174,7 @@ const PanelItem = ({ /** * * @param {import('./type.js').ReviewInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, @@ -274,7 +274,7 @@ const Inspector = ({ const changeBoxShadow = data => { const boxShadow = { ...attributes.boxShadow }; - Object.entries( data ).map( ([ key, val ] = data ) => { + Object.entries( data ).forEach( ([ key, val ] = data ) => { boxShadow[key] = val; }); @@ -841,7 +841,7 @@ const Inspector = ({ initialOpen={ false } > { __( 'Get more options with Otter Pro. ', 'otter-blocks' ) } } + notice={ { __( 'Get more options with Otter Pro.', 'otter-blocks' ) } } variant="upsell" /> diff --git a/src/blocks/blocks/section/column/edit.js b/src/blocks/blocks/section/column/edit.js index bd207c408..e3872ee7c 100644 --- a/src/blocks/blocks/section/column/edit.js +++ b/src/blocks/blocks/section/column/edit.js @@ -45,7 +45,7 @@ const { attributes: defaultAttributes } = metadata; /** * Section Column component * @param {import('./types').SectionColumnProps} props - * @returns + * @return */ const Edit = ({ name, diff --git a/src/blocks/blocks/section/column/inspector.js b/src/blocks/blocks/section/column/inspector.js index 54df15f82..2c243f5e9 100644 --- a/src/blocks/blocks/section/column/inspector.js +++ b/src/blocks/blocks/section/column/inspector.js @@ -55,7 +55,7 @@ import { useTabSwitch } from '../../../helpers/block-utility'; /** * * @param {import('./types.js').SectionColumnInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, diff --git a/src/blocks/blocks/section/columns/deprecated.js b/src/blocks/blocks/section/columns/deprecated.js index 8a9ab3215..b9bfb62e0 100644 --- a/src/blocks/blocks/section/columns/deprecated.js +++ b/src/blocks/blocks/section/columns/deprecated.js @@ -1870,7 +1870,11 @@ const deprecated = [{ 'borderRadiusLeft' ]; - const isEligible = oldAttributes.some( attr => ! isUndefined( attributes[ attr ]) && ( 'number' === typeof attributes[ attr ] || null === typeof attributes[ attr ]) ) || ( undefined !== attributes.backgroundImageURL && undefined !== attributes.backgroundImageID ) || ( undefined !== attributes.backgroundOverlayImageURL && undefined !== attributes.backgroundOverlayImageID ) || ( undefined !== attributes.backgroundPosition && 'object' !== typeof attributes.backgroundPosition ) || ( undefined !== attributes.backgroundOverlayPosition && 'object' !== typeof attributes.backgroundOverlayPosition ) || undefined !== attributes.columnsGap; + const isEligible = oldAttributes.some( attr => ! isUndefined( attributes[ attr ]) && ( 'number' === typeof attributes[ attr ] || null === attributes[ attr ]) ) || + ( undefined !== attributes.backgroundImageURL && undefined !== attributes.backgroundImageID ) || + ( undefined !== attributes.backgroundOverlayImageURL && undefined !== attributes.backgroundOverlayImageID ) || ( undefined !== attributes.backgroundPosition && 'object' !== typeof attributes.backgroundPosition ) || + ( undefined !== attributes.backgroundOverlayPosition && 'object' !== typeof attributes.backgroundOverlayPosition ) + || undefined !== attributes.columnsGap; return isEligible; }, diff --git a/src/blocks/blocks/section/columns/edit.js b/src/blocks/blocks/section/columns/edit.js index 813cfa52a..8c2aaeb2d 100644 --- a/src/blocks/blocks/section/columns/edit.js +++ b/src/blocks/blocks/section/columns/edit.js @@ -61,7 +61,7 @@ const { attributes: defaultAttributes } = metadata; /** * * @param {import('./types').SectionProps} props - * @returns + * @return */ const Edit = ({ attributes, @@ -131,7 +131,7 @@ const Edit = ({ }; const updateColumnsWidth = ( columns, layout ) => { - ( sectionBlock.innerBlocks ).map( ( innerBlock, i ) => { + ( sectionBlock.innerBlocks ).forEach( ( innerBlock, i ) => { updateBlockAttributes( innerBlock.clientId, { columnWidth: layouts[columns][layout][i] }); diff --git a/src/blocks/blocks/section/columns/inspector.js b/src/blocks/blocks/section/columns/inspector.js index 7984478dc..49fec1d8a 100644 --- a/src/blocks/blocks/section/columns/inspector.js +++ b/src/blocks/blocks/section/columns/inspector.js @@ -64,7 +64,7 @@ import { useTabSwitch } from '../../../helpers/block-utility'; /** * * @param {import('../column/types.js').SectionColumnInspectorProps} props - * @returns + * @return */ const Inspector = ({ attributes, @@ -303,9 +303,9 @@ const Inspector = ({ }; const getDividerType = () => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { return attributes.dividerTopType; - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { return attributes.dividerBottomType; } @@ -315,17 +315,17 @@ const Inspector = ({ const dividerType = getDividerType(); const changeDividerType = value => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { setAttributes({ dividerTopType: value }); - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { setAttributes({ dividerBottomType: value }); } }; const getDividerColor = () => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { return attributes.dividerTopColor; - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { return attributes.dividerBottomColor; } @@ -333,15 +333,15 @@ const Inspector = ({ }; const changeDividerColor = value => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { setAttributes({ dividerTopColor: value }); - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { setAttributes({ dividerBottomColor: value }); } }; const getDividerWidth = () => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { switch ( getView ) { case 'Desktop': return attributes.dividerTopWidth ?? 100; @@ -350,7 +350,7 @@ const Inspector = ({ case 'Mobile': return attributes.dividerTopWidthMobile ?? attributes.dividerTopWidthTablet ?? attributes.dividerTopWidth ?? 100; } - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { switch ( getView ) { case 'Desktop': return attributes.dividerBottomWidth ?? 100; @@ -365,7 +365,7 @@ const Inspector = ({ }; const changeDividerWidth = value => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { switch ( getView ) { case 'Desktop': setAttributes({ dividerTopWidth: value }); @@ -377,7 +377,7 @@ const Inspector = ({ setAttributes({ dividerTopWidthMobile: value }); break; } - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { switch ( getView ) { case 'Desktop': setAttributes({ dividerBottomWidth: value }); @@ -393,7 +393,7 @@ const Inspector = ({ }; const getDividerHeight = () => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { switch ( getView ) { case 'Desktop': return attributes.dividerTopHeight; @@ -402,7 +402,7 @@ const Inspector = ({ case 'Mobile': return attributes.dividerTopHeightMobile; } - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { switch ( getView ) { case 'Desktop': return attributes.dividerBottomHeight; @@ -417,7 +417,7 @@ const Inspector = ({ }; const changeDividerHeight = value => { - if ( 'top' == dividerViewType ) { + if ( 'top' === dividerViewType ) { switch ( getView ) { case 'Desktop': setAttributes({ dividerTopHeight: value }); @@ -429,7 +429,7 @@ const Inspector = ({ setAttributes({ dividerTopHeightMobile: value }); break; } - } else if ( 'bottom' == dividerViewType ) { + } else if ( 'bottom' === dividerViewType ) { switch ( getView ) { case 'Desktop': setAttributes({ dividerBottomHeight: value }); diff --git a/src/blocks/blocks/section/components/layout-control/index.js b/src/blocks/blocks/section/components/layout-control/index.js index 70ce56d02..e06a444b7 100644 --- a/src/blocks/blocks/section/components/layout-control/index.js +++ b/src/blocks/blocks/section/components/layout-control/index.js @@ -103,7 +103,7 @@ const LayoutControl = ({ - { ( 'Mobile' == getView || 'Tablet' == getView ) && ( + { ( 'Mobile' === getView || 'Tablet' === getView ) && (