From 392ef878beda69c9701a8d7bb227bf0525ed6fa0 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Tue, 31 Oct 2023 09:03:02 -0500 Subject: [PATCH 01/13] WIP: issue-13 From fd7575a3c04fb6b11eba07a27001ea050d41ad35 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Thu, 2 Nov 2023 15:52:58 -0500 Subject: [PATCH 02/13] mostly working --- blocks/section/edit.tsx | 5 +- components/emailTypeSelector/index.tsx | 42 +++++++++---- components/multiplePostPicker/post-list.tsx | 14 ++--- .../multiplePostPicker/search-modal.tsx | 8 +-- .../multiplePostPicker/selected-list.tsx | 10 ++-- components/postPickerResult/index.tsx | 14 ++--- layouts/multi-story.html | 59 ------------------- layouts/single-story.html | 50 ---------------- package-lock.json | 11 +++- package.json | 4 +- .../newsletter-from-post/sent-newsletter.tsx | 4 +- plugins/newsletter-status/index.php | 7 --- .../newsletterStatusPanel.tsx | 4 +- src/assets.php | 12 ++++ src/class-email-types.php | 21 ++++--- 15 files changed, 94 insertions(+), 171 deletions(-) delete mode 100644 layouts/multi-story.html delete mode 100644 layouts/single-story.html diff --git a/blocks/section/edit.tsx b/blocks/section/edit.tsx index 9988f269..2b9be757 100644 --- a/blocks/section/edit.tsx +++ b/blocks/section/edit.tsx @@ -6,13 +6,12 @@ import { } from '@wordpress/block-editor'; import { dispatch, select } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; +import { PanelBody, PanelRow } from '@wordpress/components'; +import { useEffect } from '@wordpress/element'; import MultiplePostPicker from '@/components/multiplePostPicker'; import PostPickerResult from '@/components/postPickerResult'; import './index.scss'; -import { PanelBody, PanelRow } from '@wordpress/components'; - -import { useEffect } from '@wordpress/element'; interface EditProps { clientId: string; diff --git a/components/emailTypeSelector/index.tsx b/components/emailTypeSelector/index.tsx index 9c3bf3e2..5f0f8bc1 100644 --- a/components/emailTypeSelector/index.tsx +++ b/components/emailTypeSelector/index.tsx @@ -2,6 +2,7 @@ import { SelectControl } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { useEffect, useState } from '@wordpress/element'; import apiFetch from '@wordpress/api-fetch'; +import { WP_REST_API_Post } from 'wp-types'; // eslint-disable-line camelcase interface AdTag { tag_code: string; @@ -31,23 +32,24 @@ interface EmailTypeSelectorProps { interface Window { newsletterBuilder: { fromNames: Array; + templates: { + [key: number]: string; + }; }; } +interface Option { + label: string; + value: string; +} + const { newsletterBuilder: { fromNames = [], + templates: templatesMap = {}, } = {}, } = (window as any as Window); -const templatesMap = { - 'single-story.html': __('Single Story', 'wp-newsletter-builder'), - 'multi-story.html': __('Multi Story', 'wp-newsletter-builder'), - 'pro-single-story.html': __('Pro Single Story', 'wp-newsletter-builder'), - 'pro-multi-story.html': __('Pro Multi Story', 'wp-newsletter-builder'), - 'first-take.html': __('First Take', 'wp-newsletter-builder'), -}; - const fromOptions = fromNames.map((name: string) => ( { value: name, label: name } )); @@ -81,10 +83,22 @@ function EmailTypeSelector({ } }, [fromNameHandler, fromNameValue]); + const sortByLabel = (a: Option, b: Option): number => { + if (a.label < b.label) { + return -1; + } + if (a.label > b.label) { + return 1; + } + return 0; + }; + const typesToOptions = (rawTypes: TypeResult) => { const output = Object.keys(rawTypes).map((key: string) => ( { label: rawTypes[key].label, value: key } )); + output.sort(sortByLabel); + output.unshift({ label: __('Select a type', 'wp-newsletter-builder'), value: '' }); return output; }; @@ -95,8 +109,9 @@ function EmailTypeSelector({ return []; } const output = templates.map((value) => ( - { value, label: templatesMap[value as keyof typeof templatesMap] } + { value, label: templatesMap[parseInt(value, 10) as keyof typeof templatesMap] } )); + output.sort(sortByLabel); output.unshift({ label: __('Select a template', 'wp-newsletter-builder'), value: '' }); return output; }; @@ -110,9 +125,12 @@ function EmailTypeSelector({ const { image, from_name: fromName } = type; imageHandler(parseInt(image, 10)); fromNameHandler(fromName); - const response = await fetch(`/wp-content/plugins/wp-newsletter-builder/layouts/${value}`); - const html = await response.text(); - contentHandler(html); + apiFetch({ + path: `/wp/v2/nb_template/${value}?context=edit`, + }).then((response) => { + const { content } = response as WP_REST_API_Post; // eslint-disable-line camelcase + contentHandler(content.raw as string); + }); }; // Set the template to be the first option if there's only one option. diff --git a/components/multiplePostPicker/post-list.tsx b/components/multiplePostPicker/post-list.tsx index 2bb0b163..13885ace 100644 --- a/components/multiplePostPicker/post-list.tsx +++ b/components/multiplePostPicker/post-list.tsx @@ -3,15 +3,15 @@ import apiFetch from '@wordpress/api-fetch'; import { addQueryArgs } from '@wordpress/url'; import { __, sprintf } from '@wordpress/i18n'; import { Button, TextControl, Spinner } from '@wordpress/components'; -import type { WP_REST_API_Search_Results, WP_REST_API_Search_Result } from 'wp-types'; +import type { WP_REST_API_Search_Results, WP_REST_API_Search_Result } from 'wp-types'; // eslint-disable-line camelcase import './post-list.scss'; interface PostListProps { baseUrl: string; searchRender: (post: object) => JSX.Element; - selected?: WP_REST_API_Search_Result[]; - setSelected: (post: WP_REST_API_Search_Result) => void; + selected?: WP_REST_API_Search_Result[]; // eslint-disable-line camelcase + setSelected: (post: WP_REST_API_Search_Result) => void; // eslint-disable-line camelcase } interface Params { @@ -31,7 +31,7 @@ function PostList({ setSelected, }: PostListProps) { const [isUpdating, setIsUpdating] = useState(false); - const [listposts, setListposts] = useState([]); + const [listposts, setListposts] = useState([]); // eslint-disable-line camelcase, max-len const [initialLoad, setInitialLoad] = useState(false); const [totalPages, setTotalPages] = useState(0); const [pathParams, setPathParams] = useState({ @@ -83,18 +83,18 @@ function PostList({ )); // @ts-ignore const result = await response.json(); - let posts = result as any as WP_REST_API_Search_Results; + let posts = result as any as WP_REST_API_Search_Results; // eslint-disable-line camelcase if (params.page > 1) { posts = [ ...listposts, - ...result as any as WP_REST_API_Search_Results, + ...result as any as WP_REST_API_Search_Results, // eslint-disable-line camelcase ]; } if (cancelled) { return; } // @ts-ignore - setListposts(posts as any as WP_REST_API_Search_Results); + setListposts(posts as any as WP_REST_API_Search_Results); // eslint-disable-line camelcase setIsUpdating(false); }, [listposts, baseUrl]); diff --git a/components/multiplePostPicker/search-modal.tsx b/components/multiplePostPicker/search-modal.tsx index 2ddd30c4..fb46d8f2 100644 --- a/components/multiplePostPicker/search-modal.tsx +++ b/components/multiplePostPicker/search-modal.tsx @@ -7,7 +7,7 @@ import { import { __ } from '@wordpress/i18n'; -import type { WP_REST_API_Search_Result } from 'wp-types'; +import type { WP_REST_API_Search_Result } from 'wp-types'; // eslint-disable-line camelcase import './search-modal.scss'; import PostList from './post-list'; @@ -26,18 +26,18 @@ function SearchModal({ onUpdate, searchRender, }: SearchModalProps) { - const [selected, setSelected] = useState([]); + const [selected, setSelected] = useState([]); // eslint-disable-line camelcase, max-len const doSelect = () => { if (!selected) { return; } - const ids = selected.map((item: WP_REST_API_Search_Result) => item.id); + const ids = selected.map((item: WP_REST_API_Search_Result) => item.id); // eslint-disable-line camelcase, max-len onUpdate(ids as number[]); closeModal(); }; - const addToSelected = (newValue: WP_REST_API_Search_Result) => { + const addToSelected = (newValue: WP_REST_API_Search_Result) => { // eslint-disable-line camelcase setSelected([...selected, newValue]); }; diff --git a/components/multiplePostPicker/selected-list.tsx b/components/multiplePostPicker/selected-list.tsx index bb736dda..bebebe97 100644 --- a/components/multiplePostPicker/selected-list.tsx +++ b/components/multiplePostPicker/selected-list.tsx @@ -3,14 +3,14 @@ import SortableList, { SortableItem, SortableKnob } from 'react-easy-sort'; import { __ } from '@wordpress/i18n'; import { Button } from '@wordpress/components'; import { arrayMoveImmutable } from 'array-move'; -import type { WP_REST_API_Search_Result } from 'wp-types'; +import type { WP_REST_API_Search_Result } from 'wp-types'; // eslint-disable-line camelcase import './selected-list.scss'; interface SelectedListProps { searchRender: (post: object) => JSX.Element; - selected?: WP_REST_API_Search_Result[]; - setSelected: (posts: WP_REST_API_Search_Result[]) => void; + selected?: WP_REST_API_Search_Result[]; // eslint-disable-line camelcase + setSelected: (posts: WP_REST_API_Search_Result[]) => void; // eslint-disable-line camelcase } /** @@ -23,13 +23,13 @@ function SelectedList({ selected, setSelected, }: SelectedListProps) { - const removeFromSelected = (removeValue: WP_REST_API_Search_Result) => { + const removeFromSelected = (removeValue: WP_REST_API_Search_Result) => { // eslint-disable-line camelcase, max-len setSelected(selected ? selected.filter((item) => item.id !== removeValue.id) : []); }; const onSortEnd = (oldIndex: number, newIndex: number) => { const newSelected = arrayMoveImmutable( - [...selected as WP_REST_API_Search_Result[]], + [...selected as WP_REST_API_Search_Result[]], // eslint-disable-line camelcase oldIndex, newIndex, ); diff --git a/components/postPickerResult/index.tsx b/components/postPickerResult/index.tsx index b181f5ac..32fe60e6 100644 --- a/components/postPickerResult/index.tsx +++ b/components/postPickerResult/index.tsx @@ -1,26 +1,26 @@ import { SafeHtml } from '@alleyinteractive/block-editor-tools'; -import type { WP_REST_API_Search_Results } from 'wp-types'; +import type { WP_REST_API_Search_Results } from 'wp-types'; // eslint-disable-line camelcase import './index.scss'; -interface PostPickerResultProps extends WP_REST_API_Search_Results { +interface PostPickerResultProps extends WP_REST_API_Search_Results { // eslint-disable-line camelcase, max-len featured_image: string; post_date: string; title: string; } function PostPickerResult({ - featured_image, - post_date, + featured_image: featuredImage, + post_date: postDate, title, }: PostPickerResultProps) { return (
- {featured_image ? ( + {featuredImage ? ( ) : ( @@ -33,7 +33,7 @@ function PostPickerResult({ tag="div" /> - {post_date} + {postDate}
); diff --git a/layouts/multi-story.html b/layouts/multi-story.html deleted file mode 100644 index 67cd04a5..00000000 --- a/layouts/multi-story.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -
- - - - - - - -
- - - -
-
- -
- - - -
- -
- - -
- - - -
- - -
-
-
-
- - - -
-

-
-
-
- - - -
- - - -

Discover why entertainment executives and professionals rely on the WrapPRO platform daily for exclusive coverage, analysis, deeper reporting, and access to VIP events & screenings throughout the year.

- - - diff --git a/layouts/single-story.html b/layouts/single-story.html deleted file mode 100644 index 2e66d675..00000000 --- a/layouts/single-story.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -
- - -
- -
- - - -
- -
- - -
- - - -
- -
-
-
-
- - - -
-

-
-
-
- - - -
- - - -

Discover why entertainment executives and professionals rely on the WrapPRO platform daily for exclusive coverage, analysis, deeper reporting, and access to VIP events & screenings throughout the year.

- - - diff --git a/package-lock.json b/package-lock.json index b945e280..8d16fa69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,13 +72,15 @@ "cross-spawn": "^7.0.3", "dompurify": "^3.0.3", "entities": "^4.5.0", + "lodash": "^4.17.21", "prompts": "^2.4.2", "prop-types": "^15.8.1", "react": "18.2.0", "react-dom": "18.2.0", "react-easy-sort": "^1.6.0", "react-multi-select-component": "^4.3.4", - "uuid": "^9.0.1" + "uuid": "^9.0.1", + "wp-types": "^3.63.0" }, "devDependencies": { "@alleyinteractive/eslint-config": "^0.1.4", @@ -13580,7 +13582,8 @@ }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -28993,7 +28996,9 @@ } }, "lodash": { - "version": "4.17.21" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.debounce": { "version": "4.0.8" diff --git a/package.json b/package.json index d9b34941..dd94d36a 100644 --- a/package.json +++ b/package.json @@ -98,13 +98,15 @@ "cross-spawn": "^7.0.3", "dompurify": "^3.0.3", "entities": "^4.5.0", + "lodash": "^4.17.21", "prompts": "^2.4.2", "prop-types": "^15.8.1", "react": "18.2.0", "react-dom": "18.2.0", "react-easy-sort": "^1.6.0", "react-multi-select-component": "^4.3.4", - "uuid": "^9.0.1" + "uuid": "^9.0.1", + "wp-types": "^3.63.0" }, "devDependencies": { "@alleyinteractive/eslint-config": "^0.1.4", diff --git a/plugins/newsletter-from-post/sent-newsletter.tsx b/plugins/newsletter-from-post/sent-newsletter.tsx index bda78c5e..5c5adc70 100644 --- a/plugins/newsletter-from-post/sent-newsletter.tsx +++ b/plugins/newsletter-from-post/sent-newsletter.tsx @@ -6,7 +6,7 @@ import { Button, PanelRow, } from '@wordpress/components'; -import type { WP_REST_API_Post } from 'wp-types'; +import type { WP_REST_API_Post } from 'wp-types'; // eslint-disable-line camelcase import { usePost } from '@alleyinteractive/block-editor-tools'; @@ -14,7 +14,7 @@ interface SentNewsletterProps { postId: number; } -interface Post extends WP_REST_API_Post { +interface Post extends WP_REST_API_Post { // eslint-disable-line camelcase meta: { nb_newsletter_subject?: string; }; diff --git a/plugins/newsletter-status/index.php b/plugins/newsletter-status/index.php index 5aa5f7de..f7a1f190 100644 --- a/plugins/newsletter-status/index.php +++ b/plugins/newsletter-status/index.php @@ -27,13 +27,6 @@ function register_status_plugin_scripts() { true ); wp_set_script_translations( 'plugin-newsletter-status' ); - wp_localize_script( - 'plugin-newsletter-status', - 'newsletterBuilder', - [ - 'fromNames' => Campaign_Monitor_Client::instance()->get_from_names(), - ] - ); } add_action( 'init', __NAMESPACE__ . '\register_status_plugin_scripts' ); diff --git a/plugins/newsletter-status/newsletterStatusPanel.tsx b/plugins/newsletter-status/newsletterStatusPanel.tsx index 0ff08d56..c3be29cc 100644 --- a/plugins/newsletter-status/newsletterStatusPanel.tsx +++ b/plugins/newsletter-status/newsletterStatusPanel.tsx @@ -44,7 +44,7 @@ export default function NewsletterStatusPanel() { }, [fetchStatus]); const { - Status, + Status: statusString = '', Name = '', Recipients = null, TotalOpened = null, @@ -63,7 +63,7 @@ export default function NewsletterStatusPanel() { {__('Status', 'wp-newsletter-builder')}
- {Status} + {statusString}
{__('Campaign Name', 'wp-newsletter-builder')} diff --git a/src/assets.php b/src/assets.php index 5c99ba2a..73ea72e6 100644 --- a/src/assets.php +++ b/src/assets.php @@ -124,6 +124,17 @@ function action_enqueue_block_editor_assets() { return; } + $templates = get_posts( + [ + 'post_type' => 'nb_template', + 'posts_per_page' => -1, + 'orderby' => 'ID', ] + ); + $template_map = []; + + foreach( $templates as $template ) { + $template_map[ $template->ID ] = $template->post_title; + }; wp_enqueue_style( 'wp-newsletter-builder-editor', get_entry_asset_url( 'editor', 'index.css' ), @@ -135,6 +146,7 @@ function action_enqueue_block_editor_assets() { 'newsletterBuilder', [ 'fromNames' => Campaign_Monitor_Client::instance()->get_from_names(), + 'templates' => $template_map, ] ); } diff --git a/src/class-email-types.php b/src/class-email-types.php index fef3f0e8..2984ba81 100644 --- a/src/class-email-types.php +++ b/src/class-email-types.php @@ -70,16 +70,19 @@ public function presave( $value, $current_value = [] ) { 'preview_size' => 'full', ] ), - 'templates' => new \Fieldmanager_CheckBoxes( - __( 'Templates', 'wp-newsletter-builder' ), + 'templates' => new \Fieldmanager_Checkboxes( + 'Checkboxes', [ - 'options' => [ - 'single-story.html' => __( 'Single Story', 'wp-newsletter-builder' ), - 'multi-story.html' => __( 'Multi Story', 'wp-newsletter-builder' ), - 'pro-single-story.html' => __( 'Pro Single Story', 'wp-newsletter-builder' ), - 'pro-multi-story.html' => __( 'Pro Multi Story', 'wp-newsletter-builder' ), - 'first-take.html' => __( 'First Take', 'wp-newsletter-builder' ), - ], + 'datasource' => new \Fieldmanager_Datasource_Post( + [ + 'query_args' => [ + 'post_type' => 'nb_template', + 'posts_per_page' => -1, + 'orderby' => 'title', + ], + 'use_ajax' => false + ] + ) ] ), 'from_name' => new \Fieldmanager_Select( From db02d371589571a136bad60ccda30fdacee6d460 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Thu, 2 Nov 2023 16:41:21 -0500 Subject: [PATCH 03/13] eslit and phpcs --- .eslintrc.json | 13 +- .phpcs.xml | 2 +- .../multiplePostPicker/selected-list.scss | 1 + package-lock.json | 1335 ++--------------- .../newsletterStatusPanel.tsx | 2 +- src/assets.php | 12 +- src/class-email-types.php | 6 +- src/class-example-plugin.php | 15 - tests/class-test-case.php | 2 +- tests/feature/class-example-feature-test.php | 25 - tests/unit/class-example-unit-test.php | 24 - 11 files changed, 138 insertions(+), 1299 deletions(-) delete mode 100644 src/class-example-plugin.php delete mode 100644 tests/feature/class-example-feature-test.php delete mode 100644 tests/unit/class-example-unit-test.php diff --git a/.eslintrc.json b/.eslintrc.json index 4765012d..f44f08ce 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,5 +2,16 @@ "extends": ["@alleyinteractive/eslint-config/typescript-react"], "parserOptions": { "project": "./tsconfig.eslint.json" - } + }, + "settings": { + "import/resolver": "webpack" + }, + "overrides": [ + { + "files": ["*.tsx"], + "rules": { + "no-undef": "off" + } + } + ] } diff --git a/.phpcs.xml b/.phpcs.xml index 8eee4b32..f77fbf7f 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -37,7 +37,7 @@ - + diff --git a/components/multiplePostPicker/selected-list.scss b/components/multiplePostPicker/selected-list.scss index e09c41eb..f236d9c5 100644 --- a/components/multiplePostPicker/selected-list.scss +++ b/components/multiplePostPicker/selected-list.scss @@ -11,6 +11,7 @@ margin: 5px 0; min-height: 60px; user-select: none; + width: 100%; > span { cursor: move; diff --git a/package-lock.json b/package-lock.json index 8d16fa69..76855ac0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2588,70 +2588,6 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, - "node_modules/@csstools/css-parser-algorithms": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.2.tgz", - "integrity": "sha512-sLYGdAdEY2x7TSw9FtmdaTrh2wFtRJO5VMbBrA8tEqEod7GEggFmxTSK9XqExib3yMuYNcvcTdCZIP6ukdjAIA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "peer": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^2.2.1" - } - }, - "node_modules/@csstools/css-tokenizer": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz", - "integrity": "sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "peer": true, - "engines": { - "node": "^14 || ^16 || >=18" - } - }, - "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz", - "integrity": "sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "peer": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.3.2", - "@csstools/css-tokenizer": "^2.2.1" - } - }, "node_modules/@csstools/selector-specificity": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", @@ -7897,66 +7833,6 @@ "npm": ">=6" } }, - "node_modules/babel-plugin-module-resolver": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", - "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", - "dev": true, - "peer": true, - "dependencies": { - "find-babel-config": "^2.0.0", - "glob": "^8.0.3", - "pkg-up": "^3.1.0", - "reselect": "^4.1.7", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/babel-plugin-module-resolver/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, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.3.3", "license": "MIT", @@ -11054,20 +10930,6 @@ "version": "2.0.0", "license": "MIT" }, - "node_modules/find-babel-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", - "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", - "dev": true, - "peer": true, - "dependencies": { - "json5": "^2.1.1", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/find-cache-dir": { "version": "3.3.2", "license": "MIT", @@ -13476,12 +13338,6 @@ "node": ">= 8" } }, - "node_modules/known-css-properties": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz", - "integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==", - "peer": true - }, "node_modules/language-subtag-registry": { "version": "0.3.22", "license": "CC0-1.0" @@ -16262,13 +16118,6 @@ "version": "1.0.0", "license": "MIT" }, - "node_modules/reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", - "dev": true, - "peer": true - }, "node_modules/resolve": { "version": "1.22.1", "license": "MIT", @@ -17461,82 +17310,6 @@ "postcss": "^8.2.15" } }, - "node_modules/stylelint": { - "version": "15.10.3", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.10.3.tgz", - "integrity": "sha512-aBQMMxYvFzJJwkmg+BUUg3YfPyeuCuKo2f+LOw7yYbU8AZMblibwzp9OV4srHVeQldxvSFdz0/Xu8blq2AesiA==", - "peer": true, - "dependencies": { - "@csstools/css-parser-algorithms": "^2.3.1", - "@csstools/css-tokenizer": "^2.2.0", - "@csstools/media-query-list-parser": "^2.1.4", - "@csstools/selector-specificity": "^3.0.0", - "balanced-match": "^2.0.0", - "colord": "^2.9.3", - "cosmiconfig": "^8.2.0", - "css-functions-list": "^3.2.0", - "css-tree": "^2.3.1", - "debug": "^4.3.4", - "fast-glob": "^3.3.1", - "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^6.0.1", - "global-modules": "^2.0.0", - "globby": "^11.1.0", - "globjoin": "^0.1.4", - "html-tags": "^3.3.1", - "ignore": "^5.2.4", - "import-lazy": "^4.0.0", - "imurmurhash": "^0.1.4", - "is-plain-object": "^5.0.0", - "known-css-properties": "^0.28.0", - "mathml-tag-names": "^2.1.3", - "meow": "^10.1.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.27", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.13", - "postcss-value-parser": "^4.2.0", - "resolve-from": "^5.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "style-search": "^0.1.0", - "supports-hyperlinks": "^3.0.0", - "svg-tags": "^1.0.0", - "table": "^6.8.1", - "write-file-atomic": "^5.0.1" - }, - "bin": { - "stylelint": "bin/stylelint.mjs" - }, - "engines": { - "node": "^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" - } - }, - "node_modules/stylelint-config-sass-guidelines": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-10.0.0.tgz", - "integrity": "sha512-+Rr2Dd4b72CWA4qoj1Kk+y449nP/WJsrD0nzQAWkmPPIuyVcy2GMIcfNr0Z8JJOLjRvtlkKxa49FCNXMePBikQ==", - "dev": true, - "peer": true, - "dependencies": { - "postcss-scss": "^4.0.6", - "stylelint-scss": "^4.4.0" - }, - "engines": { - "node": "^14.13.1 || >=16.13.0 || >=18.0.0" - }, - "peerDependencies": { - "postcss": "^8.4.21", - "stylelint": "^15.2.0" - } - }, "node_modules/stylelint-scss": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.6.0.tgz", @@ -17552,505 +17325,94 @@ "stylelint": "^14.5.1 || ^15.0.0" } }, - "node_modules/stylelint/node_modules/@csstools/selector-specificity": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz", - "integrity": "sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "peer": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^6.0.13" - } - }, - "node_modules/stylelint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "peer": true - }, - "node_modules/stylelint/node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "peer": true + "node_modules/stylis": { + "version": "4.1.3", + "license": "MIT" }, - "node_modules/stylelint/node_modules/camelcase-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", - "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", - "peer": true, + "node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", "dependencies": { - "camelcase": "^6.3.0", - "map-obj": "^4.1.0", - "quick-lru": "^5.1.1", - "type-fest": "^1.2.1" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/stylelint/node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "peer": true, - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", "engines": { - "node": ">=14" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/stylelint/node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "peer": true, + "node_modules/svg-parser": { + "version": "2.0.4", + "license": "MIT" + }, + "node_modules/svg-tags": { + "version": "1.0.0" + }, + "node_modules/svgo": { + "version": "2.8.0", + "license": "MIT", "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" }, "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + "node": ">=10.13.0" } }, - "node_modules/stylelint/node_modules/decamelize": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", - "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", - "peer": true, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 10" } }, - "node_modules/stylelint/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==", - "peer": true, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + }, + "node_modules/table": { + "version": "6.8.1", + "license": "BSD-3-Clause", "dependencies": { - "global-prefix": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=6" + "node": ">=10.0.0" } }, - "node_modules/stylelint/node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "peer": true, + "node_modules/table/node_modules/ajv": { + "version": "8.11.2", + "license": "MIT", "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylelint/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "peer": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/stylelint/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stylelint/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stylelint/node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "peer": true - }, - "node_modules/stylelint/node_modules/meow": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", - "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", - "peer": true, - "dependencies": { - "@types/minimist": "^1.2.2", - "camelcase-keys": "^7.0.0", - "decamelize": "^5.0.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.2", - "read-pkg-up": "^8.0.0", - "redent": "^4.0.0", - "trim-newlines": "^4.0.2", - "type-fest": "^1.2.2", - "yargs-parser": "^20.2.9" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "peer": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stylelint/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/read-pkg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", - "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", - "peer": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^3.0.2", - "parse-json": "^5.2.0", - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/read-pkg-up": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", - "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", - "peer": true, - "dependencies": { - "find-up": "^5.0.0", - "read-pkg": "^6.0.0", - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/redent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", - "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", - "peer": true, - "dependencies": { - "indent-string": "^5.0.0", - "strip-indent": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "peer": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stylelint/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "peer": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/stylelint/node_modules/strip-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", - "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", - "peer": true, - "dependencies": { - "min-indent": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/trim-newlines": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz", - "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", - "peer": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/stylelint/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "peer": true - }, - "node_modules/stylelint/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/stylis": { - "version": "4.1.3", - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", - "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", - "peer": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svg-parser": { - "version": "2.0.4", - "license": "MIT" - }, - "node_modules/svg-tags": { - "version": "1.0.0" - }, - "node_modules/svgo": { - "version": "2.8.0", - "license": "MIT", - "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^4.1.3", - "css-tree": "^1.1.3", - "csso": "^4.2.0", - "picocolors": "^1.0.0", - "stable": "^0.1.8" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/svgo/node_modules/commander": { - "version": "7.2.0", - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" - }, - "node_modules/table": { - "version": "6.8.1", - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.11.2", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/table/node_modules/json-schema-traverse": { @@ -20036,8 +19398,7 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/@alleyinteractive/stylelint-config/-/stylelint-config-0.0.2.tgz", "integrity": "sha512-LQVsV6etd4kD70QIcSbKtyUmHPMwDS/HTtAkwlo7oQC7ygalvFgLE/mxkQ2RUqbK48yMMTbgFLOvVl3EzhuKzw==", - "dev": true, - "requires": {} + "dev": true }, "@alleyinteractive/tsconfig": { "version": "0.1.0", @@ -20580,8 +19941,7 @@ "@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "requires": {} + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==" }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -21442,31 +20802,10 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, - "@csstools/css-parser-algorithms": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.2.tgz", - "integrity": "sha512-sLYGdAdEY2x7TSw9FtmdaTrh2wFtRJO5VMbBrA8tEqEod7GEggFmxTSK9XqExib3yMuYNcvcTdCZIP6ukdjAIA==", - "peer": true, - "requires": {} - }, - "@csstools/css-tokenizer": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz", - "integrity": "sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg==", - "peer": true - }, - "@csstools/media-query-list-parser": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz", - "integrity": "sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ==", - "peer": true, - "requires": {} - }, "@csstools/selector-specificity": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", - "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", - "requires": {} + "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==" }, "@discoveryjs/json-ext": { "version": "0.5.7" @@ -21565,8 +20904,7 @@ "version": "0.8.0" }, "@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.0.0", - "requires": {} + "version": "1.0.0" }, "@emotion/utils": { "version": "1.2.0" @@ -22225,36 +21563,28 @@ } }, "@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-remove-jsx-attribute": { - "version": "6.5.0", - "requires": {} + "version": "6.5.0" }, "@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "6.5.0", - "requires": {} + "version": "6.5.0" }, "@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-transform-svg-component": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-preset": { "version": "6.5.1", @@ -23215,22 +22545,19 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "requires": {} + "dev": true }, "@webpack-cli/info": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "requires": {} + "dev": true }, "@webpack-cli/serve": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "requires": {} + "dev": true }, "@wordpress/a11y": { "version": "3.30.0", @@ -23284,8 +22611,7 @@ "@wordpress/babel-plugin-import-jsx-pragma": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.13.0.tgz", - "integrity": "sha512-IK8s2xbxLwWSD4COQICbTgbFziKc9Ed8fpWuxtQl3n+2xpyFIfWHvDEt5nGbotj96OEcxQ16h+aTqIcdon/fwQ==", - "requires": {} + "integrity": "sha512-IK8s2xbxLwWSD4COQICbTgbFziKc9Ed8fpWuxtQl3n+2xpyFIfWHvDEt5nGbotj96OEcxQ16h+aTqIcdon/fwQ==" }, "@wordpress/babel-preset-default": { "version": "7.14.0", @@ -24179,8 +23505,7 @@ "@wordpress/npm-package-json-lint-config": { "version": "4.15.0", "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.15.0.tgz", - "integrity": "sha512-lqCiOw4kdBLiHuhZ0AKpUAL0bZUmMu+go4BjM/s5IKocm/PIFUSM21CuaBaOla3IHaU8d0mzv0ZoRg8WpLAdjA==", - "requires": {} + "integrity": "sha512-lqCiOw4kdBLiHuhZ0AKpUAL0bZUmMu+go4BjM/s5IKocm/PIFUSM21CuaBaOla3IHaU8d0mzv0ZoRg8WpLAdjA==" }, "@wordpress/nux": { "version": "6.0.0", @@ -24270,8 +23595,7 @@ "@wordpress/prettier-config": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.13.0.tgz", - "integrity": "sha512-+/CiiWR2QKBkJcshyA6qTpCIo56U8cN9817Yb61dbd5WprDAGf5vFG0i2qsjovER+9r3DHi5iqtjv2qr752NRw==", - "requires": {} + "integrity": "sha512-+/CiiWR2QKBkJcshyA6qTpCIo56U8cN9817Yb61dbd5WprDAGf5vFG0i2qsjovER+9r3DHi5iqtjv2qr752NRw==" }, "@wordpress/primitives": { "version": "3.28.0", @@ -24410,8 +23734,7 @@ }, "dependencies": { "@webpack-cli/configtest": { - "version": "1.2.0", - "requires": {} + "version": "1.2.0" }, "@webpack-cli/info": { "version": "1.5.0", @@ -24420,8 +23743,7 @@ } }, "@webpack-cli/serve": { - "version": "1.7.0", - "requires": {} + "version": "1.7.0" }, "@wordpress/stylelint-config": { "version": "21.13.0", @@ -24698,8 +24020,7 @@ "stylelint-config-recommended": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz", - "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==", - "requires": {} + "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==" }, "stylelint-config-recommended-scss": { "version": "5.0.2", @@ -24916,8 +24237,7 @@ "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "requires": {} + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" }, "acorn-walk": { "version": "8.2.0" @@ -24943,8 +24263,7 @@ "ajv-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "requires": {} + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" }, "ajv-formats": { "version": "2.1.1", @@ -24967,8 +24286,7 @@ } }, "ajv-keywords": { - "version": "3.5.2", - "requires": {} + "version": "3.5.2" }, "ansi-escapes": { "version": "4.3.2", @@ -25240,56 +24558,6 @@ "resolve": "^1.19.0" } }, - "babel-plugin-module-resolver": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", - "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", - "dev": true, - "peer": true, - "requires": { - "find-babel-config": "^2.0.0", - "glob": "^8.0.3", - "pkg-up": "^3.1.0", - "reselect": "^4.1.7", - "resolve": "^1.22.1" - }, - "dependencies": { - "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, - "peer": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "peer": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "peer": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, "babel-plugin-polyfill-corejs2": { "version": "0.3.3", "requires": { @@ -25917,8 +25185,7 @@ "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==" }, "css-declaration-sorter": { - "version": "6.3.1", - "requires": {} + "version": "6.3.1" }, "css-functions-list": { "version": "3.2.0", @@ -26036,8 +25303,7 @@ } }, "cssnano-utils": { - "version": "3.1.0", - "requires": {} + "version": "3.1.0" }, "csso": { "version": "4.2.0", @@ -26146,8 +25412,7 @@ "dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "requires": {} + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==" }, "deep-equal": { "version": "2.2.0", @@ -26791,8 +26056,7 @@ "eslint-config-prettier": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", - "requires": {} + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==" }, "eslint-import-resolver-babel-module": { "version": "5.3.2", @@ -27055,8 +26319,7 @@ } }, "eslint-plugin-react-hooks": { - "version": "4.6.0", - "requires": {} + "version": "4.6.0" }, "eslint-scope": { "version": "5.1.1", @@ -27360,17 +26623,6 @@ } } }, - "find-babel-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", - "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", - "dev": true, - "peer": true, - "requires": { - "json5": "^2.1.1", - "path-exists": "^4.0.0" - } - }, "find-cache-dir": { "version": "3.3.2", "requires": { @@ -27894,8 +27146,7 @@ } }, "icss-utils": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "ieee754": { "version": "1.2.1" @@ -28594,8 +27845,7 @@ "jest-pnp-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "requires": {} + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==" }, "jest-regex-util": { "version": "29.6.3", @@ -28879,8 +28129,7 @@ "ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "requires": {} + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==" } } }, @@ -28928,12 +28177,6 @@ "klona": { "version": "2.0.5" }, - "known-css-properties": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz", - "integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==", - "peer": true - }, "language-subtag-registry": { "version": "0.3.22" }, @@ -29921,20 +29164,16 @@ } }, "postcss-discard-comments": { - "version": "5.1.2", - "requires": {} + "version": "5.1.2" }, "postcss-discard-duplicates": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-discard-empty": { - "version": "5.1.1", - "requires": {} + "version": "5.1.1" }, "postcss-discard-overridden": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-loader": { "version": "6.2.1", @@ -30017,8 +29256,7 @@ } }, "postcss-modules-extract-imports": { - "version": "3.0.0", - "requires": {} + "version": "3.0.0" }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -30041,8 +29279,7 @@ } }, "postcss-normalize-charset": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -30118,14 +29355,12 @@ "version": "0.1.1" }, "postcss-safe-parser": { - "version": "6.0.0", - "requires": {} + "version": "6.0.0" }, "postcss-scss": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz", - "integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==", - "requires": {} + "integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==" }, "postcss-selector-parser": { "version": "6.0.13", @@ -30322,8 +29557,7 @@ } }, "re-resizable": { - "version": "6.9.9", - "requires": {} + "version": "6.9.9" }, "react": { "version": "18.2.0", @@ -30342,8 +29576,7 @@ } }, "react-colorful": { - "version": "5.6.1", - "requires": {} + "version": "5.6.1" }, "react-dom": { "version": "18.2.0", @@ -30393,8 +29626,7 @@ "react-multi-select-component": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/react-multi-select-component/-/react-multi-select-component-4.3.4.tgz", - "integrity": "sha512-Ui/bzCbROF4WfKq3OKWyQJHmy/bd1mW7CQM+L83TfiltuVvHElhKEyPM3JzO9urIcWplBUKv+kyxqmEnd9jPcA==", - "requires": {} + "integrity": "sha512-Ui/bzCbROF4WfKq3OKWyQJHmy/bd1mW7CQM+L83TfiltuVvHElhKEyPM3JzO9urIcWplBUKv+kyxqmEnd9jPcA==" }, "react-refresh": { "version": "0.10.0" @@ -30482,8 +29714,7 @@ } }, "reakit-utils": { - "version": "0.15.2", - "requires": {} + "version": "0.15.2" }, "reakit-warning": { "version": "0.6.2", @@ -30612,13 +29843,6 @@ "requires-port": { "version": "1.0.0" }, - "reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", - "dev": true, - "peer": true - }, "resolve": { "version": "1.22.1", "requires": { @@ -31401,325 +30625,6 @@ "postcss-selector-parser": "^6.0.4" } }, - "stylelint": { - "version": "15.10.3", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.10.3.tgz", - "integrity": "sha512-aBQMMxYvFzJJwkmg+BUUg3YfPyeuCuKo2f+LOw7yYbU8AZMblibwzp9OV4srHVeQldxvSFdz0/Xu8blq2AesiA==", - "peer": true, - "requires": { - "@csstools/css-parser-algorithms": "^2.3.1", - "@csstools/css-tokenizer": "^2.2.0", - "@csstools/media-query-list-parser": "^2.1.4", - "@csstools/selector-specificity": "^3.0.0", - "balanced-match": "^2.0.0", - "colord": "^2.9.3", - "cosmiconfig": "^8.2.0", - "css-functions-list": "^3.2.0", - "css-tree": "^2.3.1", - "debug": "^4.3.4", - "fast-glob": "^3.3.1", - "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^6.0.1", - "global-modules": "^2.0.0", - "globby": "^11.1.0", - "globjoin": "^0.1.4", - "html-tags": "^3.3.1", - "ignore": "^5.2.4", - "import-lazy": "^4.0.0", - "imurmurhash": "^0.1.4", - "is-plain-object": "^5.0.0", - "known-css-properties": "^0.28.0", - "mathml-tag-names": "^2.1.3", - "meow": "^10.1.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.27", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.13", - "postcss-value-parser": "^4.2.0", - "resolve-from": "^5.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "style-search": "^0.1.0", - "supports-hyperlinks": "^3.0.0", - "svg-tags": "^1.0.0", - "table": "^6.8.1", - "write-file-atomic": "^5.0.1" - }, - "dependencies": { - "@csstools/selector-specificity": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz", - "integrity": "sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==", - "peer": true, - "requires": {} - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "peer": true - }, - "balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "peer": true - }, - "camelcase-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", - "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", - "peer": true, - "requires": { - "camelcase": "^6.3.0", - "map-obj": "^4.1.0", - "quick-lru": "^5.1.1", - "type-fest": "^1.2.1" - } - }, - "cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "peer": true, - "requires": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - } - }, - "css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "peer": true, - "requires": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - } - }, - "decamelize": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", - "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", - "peer": true - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "peer": true, - "requires": { - "global-prefix": "^3.0.0" - } - }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "peer": true, - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "peer": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "peer": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "peer": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "peer": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "peer": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "peer": true - }, - "meow": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", - "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", - "peer": true, - "requires": { - "@types/minimist": "^1.2.2", - "camelcase-keys": "^7.0.0", - "decamelize": "^5.0.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.2", - "read-pkg-up": "^8.0.0", - "redent": "^4.0.0", - "trim-newlines": "^4.0.2", - "type-fest": "^1.2.2", - "yargs-parser": "^20.2.9" - } - }, - "normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "peer": true, - "requires": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - } - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "peer": true - }, - "read-pkg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", - "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", - "peer": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^3.0.2", - "parse-json": "^5.2.0", - "type-fest": "^1.0.1" - } - }, - "read-pkg-up": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", - "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", - "peer": true, - "requires": { - "find-up": "^5.0.0", - "read-pkg": "^6.0.0", - "type-fest": "^1.0.1" - } - }, - "redent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", - "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", - "peer": true, - "requires": { - "indent-string": "^5.0.0", - "strip-indent": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "peer": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "peer": true - }, - "strip-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", - "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", - "peer": true, - "requires": { - "min-indent": "^1.0.1" - } - }, - "trim-newlines": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz", - "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==", - "peer": true - }, - "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "peer": true - }, - "write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", - "peer": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "peer": true - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "peer": true - } - } - }, - "stylelint-config-sass-guidelines": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-10.0.0.tgz", - "integrity": "sha512-+Rr2Dd4b72CWA4qoj1Kk+y449nP/WJsrD0nzQAWkmPPIuyVcy2GMIcfNr0Z8JJOLjRvtlkKxa49FCNXMePBikQ==", - "dev": true, - "peer": true, - "requires": { - "postcss-scss": "^4.0.6", - "stylelint-scss": "^4.4.0" - } - }, "stylelint-scss": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.6.0.tgz", @@ -31741,16 +30646,6 @@ "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", - "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", - "peer": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0" }, @@ -31969,8 +30864,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", - "dev": true, - "requires": {} + "dev": true }, "ts-jest": { "version": "29.1.1", @@ -32290,14 +31184,12 @@ } }, "use-memo-one": { - "version": "1.1.3", - "requires": {} + "version": "1.1.3" }, "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "requires": {} + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" }, "util-deprecate": { "version": "1.0.2" @@ -32437,8 +31329,7 @@ }, "dependencies": { "acorn-import-assertions": { - "version": "1.8.0", - "requires": {} + "version": "1.8.0" }, "enhanced-resolve": { "version": "5.12.0", @@ -32470,8 +31361,7 @@ "version": "7.2.0" }, "ws": { - "version": "7.5.9", - "requires": {} + "version": "7.5.9" } } }, @@ -32823,8 +31713,7 @@ } }, "ws": { - "version": "8.5.0", - "requires": {} + "version": "8.5.0" }, "xml-name-validator": { "version": "4.0.0", diff --git a/plugins/newsletter-status/newsletterStatusPanel.tsx b/plugins/newsletter-status/newsletterStatusPanel.tsx index c3be29cc..ea0b3d74 100644 --- a/plugins/newsletter-status/newsletterStatusPanel.tsx +++ b/plugins/newsletter-status/newsletterStatusPanel.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react'; +import React, { useCallback, useEffect, useState } from '@wordpress/element'; import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; import { __ } from '@wordpress/i18n'; import { select } from '@wordpress/data'; diff --git a/src/assets.php b/src/assets.php index 73ea72e6..e0e86844 100644 --- a/src/assets.php +++ b/src/assets.php @@ -124,15 +124,17 @@ function action_enqueue_block_editor_assets() { return; } - $templates = get_posts( + $templates = get_posts( // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts [ - 'post_type' => 'nb_template', - 'posts_per_page' => -1, - 'orderby' => 'ID', ] + 'post_type' => 'nb_template', + 'posts_per_page' => -1, + 'orderby' => 'ID', + 'suppress_filters' => false, + ] ); $template_map = []; - foreach( $templates as $template ) { + foreach ( $templates as $template ) { $template_map[ $template->ID ] = $template->post_title; }; wp_enqueue_style( diff --git a/src/class-email-types.php b/src/class-email-types.php index 2984ba81..161313c8 100644 --- a/src/class-email-types.php +++ b/src/class-email-types.php @@ -70,7 +70,7 @@ public function presave( $value, $current_value = [] ) { 'preview_size' => 'full', ] ), - 'templates' => new \Fieldmanager_Checkboxes( + 'templates' => new \Fieldmanager_Checkboxes( 'Checkboxes', [ 'datasource' => new \Fieldmanager_Datasource_Post( @@ -80,9 +80,9 @@ public function presave( $value, $current_value = [] ) { 'posts_per_page' => -1, 'orderby' => 'title', ], - 'use_ajax' => false + 'use_ajax' => false, ] - ) + ), ] ), 'from_name' => new \Fieldmanager_Select( diff --git a/src/class-example-plugin.php b/src/class-example-plugin.php deleted file mode 100644 index 198311ca..00000000 --- a/src/class-example-plugin.php +++ /dev/null @@ -1,15 +0,0 @@ -assertTrue( true ); - $this->assertNotEmpty( home_url() ); - } -} diff --git a/tests/unit/class-example-unit-test.php b/tests/unit/class-example-unit-test.php deleted file mode 100644 index 133db087..00000000 --- a/tests/unit/class-example-unit-test.php +++ /dev/null @@ -1,24 +0,0 @@ -assertTrue( true ); - } -} From 99434b1e471ea107e64d4bb3f412f605091d5173 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 09:16:09 -0600 Subject: [PATCH 04/13] making some tests pass --- .github/workflows/coding-quality.yml | 1 + blocks/footer/index.php | 1 - blocks/header/index.php | 1 - blocks/post/index.php | 1 - blocks/section/index.php | 1 - blocks/signup-form-list/index.php | 1 - blocks/signup-form/index.php | 1 - blocks/two-up-post/index.php | 1 - plugin.php | 2 +- src/assets.php | 18 ------------------ src/class-ads.php | 2 +- src/class-breaking-recipients.php | 2 +- src/class-rest-api-endpoints.php | 8 ++++---- src/meta.php | 4 ++-- 14 files changed, 10 insertions(+), 34 deletions(-) diff --git a/.github/workflows/coding-quality.yml b/.github/workflows/coding-quality.yml index dce22c0a..96255235 100644 --- a/.github/workflows/coding-quality.yml +++ b/.github/workflows/coding-quality.yml @@ -13,4 +13,5 @@ jobs: code-quality: uses: alleyinteractive/.github/.github/workflows/php-code-quality.yml@main with: + command: '' # TODO: enable this once phpstan will pass. php: '8.2' diff --git a/blocks/footer/index.php b/blocks/footer/index.php index 4eab9288..2d4b7277 100644 --- a/blocks/footer/index.php +++ b/blocks/footer/index.php @@ -17,6 +17,5 @@ function wp_newsletter_builder_footer_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_footer_block_init' ); diff --git a/blocks/header/index.php b/blocks/header/index.php index e7285645..3b52d954 100644 --- a/blocks/header/index.php +++ b/blocks/header/index.php @@ -17,6 +17,5 @@ function wp_newsletter_builder_header_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_header_block_init' ); diff --git a/blocks/post/index.php b/blocks/post/index.php index 117729fb..cf6e227f 100644 --- a/blocks/post/index.php +++ b/blocks/post/index.php @@ -17,6 +17,5 @@ function wp_newsletter_builder_post_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_post_block_init' ); diff --git a/blocks/section/index.php b/blocks/section/index.php index 64c94c28..8b95a476 100644 --- a/blocks/section/index.php +++ b/blocks/section/index.php @@ -17,6 +17,5 @@ function wp_newsletter_builder_section_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_section_block_init' ); diff --git a/blocks/signup-form-list/index.php b/blocks/signup-form-list/index.php index 8fb46fcb..1a97c0ec 100644 --- a/blocks/signup-form-list/index.php +++ b/blocks/signup-form-list/index.php @@ -17,6 +17,5 @@ function wp_newsletter_builder_signup_form_list_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_signup_form_list_block_init' ); diff --git a/blocks/signup-form/index.php b/blocks/signup-form/index.php index 58bb3385..3b1a06db 100644 --- a/blocks/signup-form/index.php +++ b/blocks/signup-form/index.php @@ -17,7 +17,6 @@ function wp_newsletter_builder_signup_form_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_signup_form_block_init' ); diff --git a/blocks/two-up-post/index.php b/blocks/two-up-post/index.php index 10008e20..31b50f66 100644 --- a/blocks/two-up-post/index.php +++ b/blocks/two-up-post/index.php @@ -17,6 +17,5 @@ function wp_newsletter_builder_two_up_post_block_init() { register_block_type( __DIR__ ); - } add_action( 'init', 'wp_newsletter_builder_two_up_post_block_init' ); diff --git a/plugin.php b/plugin.php index 3289b86e..10799900 100644 --- a/plugin.php +++ b/plugin.php @@ -32,7 +32,7 @@ if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) { \add_action( 'admin_notices', - function() { + function () { ?>

diff --git a/src/assets.php b/src/assets.php index e0e86844..fce73f9d 100644 --- a/src/assets.php +++ b/src/assets.php @@ -32,15 +32,6 @@ function action_wp_enqueue_scripts() { | https://github.com/alleyinteractive/wp-asset-manager | */ - - // wp_enqueue_script( - // 'wp-newsletter-builder-example-entry', - // get_entry_asset_url( 'example-entry' ), - // get_asset_dependency_array( 'example-entry' ), - // get_asset_version( 'example-entry' ), - // true - // ); - // wp_set_script_translations( 'wp-newsletter-builder-example-entry', 'wp-newsletter-builder' ); } /** @@ -92,15 +83,6 @@ function action_admin_enqueue_scripts() { | assets that are loaded only in the WordPress admin. | */ - - // wp_enqueue_script( - // 'wp-newsletter-builder-admin-handle', - // get_entry_asset_url( 'admin-handle' ), - // get_asset_dependency_array( 'admin-handle' ), - // get_asset_version( 'admin-handle' ), - // true - // ); - // wp_set_script_translations( 'wp-newsletter-builder-admin-handle', 'wp-newsletter-builder' ); } /** diff --git a/src/class-ads.php b/src/class-ads.php index 31d53529..338e4908 100644 --- a/src/class-ads.php +++ b/src/class-ads.php @@ -46,7 +46,7 @@ public function insert_ads( $content ): string { $email_types = $email_types_class->get_email_types(); $matching_types = array_filter( $email_types, - function( $email_type ) use ( $nb_email_type ) { + function ( $email_type ) use ( $nb_email_type ) { return $email_type['uuid4'] === $nb_email_type; } ); diff --git a/src/class-breaking-recipients.php b/src/class-breaking-recipients.php index 45947881..ffb6e7a8 100644 --- a/src/class-breaking-recipients.php +++ b/src/class-breaking-recipients.php @@ -83,7 +83,7 @@ public function get_breaking_recipients() { $lists = []; foreach ( $settings as $recipient_list ) { $lists[ $recipient_list['list'] ] = $options[ $recipient_list['list'] ]; - }; + } return $lists; } diff --git a/src/class-rest-api-endpoints.php b/src/class-rest-api-endpoints.php index 473dac23..822c3117 100644 --- a/src/class-rest-api-endpoints.php +++ b/src/class-rest-api-endpoints.php @@ -32,7 +32,7 @@ public function register_endpoints() { [ 'methods' => 'GET', 'callback' => [ $this, 'get_lists' ], - 'permission_callback' => function() { + 'permission_callback' => function () { return current_user_can( 'edit_posts' ); }, ] @@ -43,7 +43,7 @@ public function register_endpoints() { [ 'methods' => 'GET', 'callback' => [ $this, 'get_email_types' ], - 'permission_callback' => function() { + 'permission_callback' => function () { return current_user_can( 'edit_posts' ); }, ] @@ -54,7 +54,7 @@ public function register_endpoints() { [ 'methods' => 'GET', 'callback' => [ $this, 'get_footer_settings' ], - 'permission_callback' => function() { + 'permission_callback' => function () { return current_user_can( 'edit_posts' ); }, ] @@ -65,7 +65,7 @@ public function register_endpoints() { [ 'methods' => 'GET', 'callback' => [ $this, 'get_status' ], - 'permission_callback' => function() { + 'permission_callback' => function () { return current_user_can( 'edit_posts' ); }, ] diff --git a/src/meta.php b/src/meta.php index 1b5e4dc4..169c2875 100644 --- a/src/meta.php +++ b/src/meta.php @@ -29,12 +29,12 @@ function register_meta_helper( array $object_slugs, string $meta_key, array $args = [] -) : bool { +): bool { // Object type must be either post or term. if ( ! in_array( $object_type, [ 'post', 'term' ], true ) ) { throw new \InvalidArgumentException( - __( + __( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'Object type must be one of "post", "term".', 'wp-newsletter-builder' ) From e6fc520383cd78b58a9000a051e71447bc5dafe2 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 09:20:03 -0600 Subject: [PATCH 05/13] more fixes --- .github/workflows/coding-quality.yml | 17 ----------------- src/assets.php | 8 ++++---- src/meta.php | 2 +- 3 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/coding-quality.yml diff --git a/.github/workflows/coding-quality.yml b/.github/workflows/coding-quality.yml deleted file mode 100644 index 96255235..00000000 --- a/.github/workflows/coding-quality.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Code Quality - -on: - push: - branches: - - main - pull_request: - # Uncomment and edit the following to run on a schedule. - # schedule: - # - cron: '45 5 * * 0' # Run once per week at 5:45am UTC on Sundays. - -jobs: - code-quality: - uses: alleyinteractive/.github/.github/workflows/php-code-quality.yml@main - with: - command: '' # TODO: enable this once phpstan will pass. - php: '8.2' diff --git a/src/assets.php b/src/assets.php index fce73f9d..6094c5b3 100644 --- a/src/assets.php +++ b/src/assets.php @@ -118,7 +118,7 @@ function action_enqueue_block_editor_assets() { foreach ( $templates as $template ) { $template_map[ $template->ID ] = $template->post_title; - }; + } wp_enqueue_style( 'wp-newsletter-builder-editor', get_entry_asset_url( 'editor', 'index.css' ), @@ -141,7 +141,7 @@ function action_enqueue_block_editor_assets() { * @param string $path The file path to validate. * @return bool True if the path is valid and the file exists. */ -function validate_path( string $path ) : bool { +function validate_path( string $path ): bool { return 0 === validate_file( $path ) && file_exists( $path ); } @@ -197,7 +197,7 @@ function get_entry_asset_map( string $dir_entry_name ) { * * @return array The asset's dependency array. */ -function get_asset_dependency_array( string $dir_entry_name ) : array { +function get_asset_dependency_array( string $dir_entry_name ): array { $asset_arr = get_entry_asset_map( $dir_entry_name ); return $asset_arr['dependencies'] ?? []; } @@ -209,7 +209,7 @@ function get_asset_dependency_array( string $dir_entry_name ) : array { * * @return string The asset's version hash. */ -function get_asset_version( string $dir_entry_name ) : string { +function get_asset_version( string $dir_entry_name ): string { $asset_arr = get_entry_asset_map( $dir_entry_name ); return $asset_arr['version'] ?? '1.0'; } diff --git a/src/meta.php b/src/meta.php index 169c2875..f43801f5 100644 --- a/src/meta.php +++ b/src/meta.php @@ -34,7 +34,7 @@ function register_meta_helper( // Object type must be either post or term. if ( ! in_array( $object_type, [ 'post', 'term' ], true ) ) { throw new \InvalidArgumentException( - __( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + esc_html__( 'Object type must be one of "post", "term".', 'wp-newsletter-builder' ) From 923c1362fb8df9dc9fa3fae6a74a52dad8ad892f Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 09:28:02 -0600 Subject: [PATCH 06/13] fixing more tests --- .eslintrc.json | 6 ++++- package-lock.json | 66 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 55 insertions(+), 17 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f44f08ce..10465af1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,11 @@ "project": "./tsconfig.eslint.json" }, "settings": { - "import/resolver": "webpack" + "import/resolver": { + "webpack": { + "extensions": [".js", ".jsx", ".ts", ".tsx"] + } + } }, "overrides": [ { diff --git a/package-lock.json b/package-lock.json index 76855ac0..cd8385bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8818,11 +8818,11 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.0.tgz", - "integrity": "sha512-d/jBMPyYybkkLVypgtGv12R+pIFw4/f/IHtCTxWpZc8ofTYOPigIgmA6vu5rMHartZC+WuXhBUHfnyNUIQSYrg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz", + "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==", "engines": { - "node": ">=12.22" + "node": ">=12 || >=16" } }, "node_modules/css-loader": { @@ -11008,19 +11008,22 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "license": "MIT", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", + "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "node_modules/flatted": { - "version": "3.2.7", - "license": "ISC" + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "node_modules/follow-redirects": { "version": "1.15.2", @@ -13271,6 +13274,11 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "license": "MIT" @@ -13314,6 +13322,14 @@ "node": ">=4.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "3.2.2", "license": "MIT", @@ -25188,9 +25204,9 @@ "version": "6.3.1" }, "css-functions-list": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.0.tgz", - "integrity": "sha512-d/jBMPyYybkkLVypgtGv12R+pIFw4/f/IHtCTxWpZc8ofTYOPigIgmA6vu5rMHartZC+WuXhBUHfnyNUIQSYrg==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz", + "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==" }, "css-loader": { "version": "6.7.2", @@ -26671,14 +26687,19 @@ } }, "flat-cache": { - "version": "3.0.4", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", + "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", "requires": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" } }, "flatted": { - "version": "3.2.7" + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "follow-redirects": { "version": "1.15.2" @@ -28136,6 +28157,11 @@ "jsesc": { "version": "2.5.2" }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, "json-parse-even-better-errors": { "version": "2.3.1" }, @@ -28165,6 +28191,14 @@ "object.assign": "^4.1.3" } }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "requires": { + "json-buffer": "3.0.1" + } + }, "kind-of": { "version": "3.2.2", "requires": { From 71b8615ef911f7c2d5db793e56d455273ae4e05a Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 09:40:43 -0600 Subject: [PATCH 07/13] removing unit tests --- .github/workflows/unit-test.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index 213fbb43..00000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Testing Suite - -on: - push: - branches: - - develop - pull_request: - # Uncomment and edit the following to run on a schedule. - # schedule: - # - cron: '30 5 * * 0' # Run once per week at 5:30am UTC on Sundays. - -jobs: - php-tests: - strategy: - matrix: - php: [8.0, 8.1, 8.2] - wordpress: ["latest"] - uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main - with: - php: ${{ matrix.php }} - wordpress: ${{ matrix.wordpress }} From 0a7cb77028a2d992ece1700ac2eaae3525b2d8cf Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 12:30:31 -0600 Subject: [PATCH 08/13] adding files --- .github/workflows/unit-test.yml | 21 ++ src/class-wp-newsletter-builder.php | 309 ++++++++++++++++++++++++++++ 2 files changed, 330 insertions(+) create mode 100644 .github/workflows/unit-test.yml create mode 100644 src/class-wp-newsletter-builder.php diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 00000000..213fbb43 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,21 @@ +name: Testing Suite + +on: + push: + branches: + - develop + pull_request: + # Uncomment and edit the following to run on a schedule. + # schedule: + # - cron: '30 5 * * 0' # Run once per week at 5:30am UTC on Sundays. + +jobs: + php-tests: + strategy: + matrix: + php: [8.0, 8.1, 8.2] + wordpress: ["latest"] + uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main + with: + php: ${{ matrix.php }} + wordpress: ${{ matrix.wordpress }} diff --git a/src/class-wp-newsletter-builder.php b/src/class-wp-newsletter-builder.php new file mode 100644 index 00000000..1e266fea --- /dev/null +++ b/src/class-wp-newsletter-builder.php @@ -0,0 +1,309 @@ + [ + 'name' => __( 'Newsletters', 'wp-newsletter-builder' ), + 'singular_name' => __( 'Newsletter', 'wp-newsletter-builder' ), + ], + 'public' => true, + 'has_archive' => true, + 'rewrite' => [ 'slug' => 'nb-newsletters' ], + 'supports' => [ 'title', 'editor', 'custom-fields' ], + 'show_in_rest' => true, + 'exclude_from_search' => true, + 'template' => [ + [ + 'wp-newsletter-builder/email-settings', + [ + 'lock' => [ + 'move' => true, + 'remove' => true, + ], + ], + ], + ], + 'menu_icon' => 'dashicons-email-alt2', + ], + ); + + register_post_type( + 'nb_template', + [ + 'labels' => [ + 'name' => __( 'Templates', 'wp-newsletter-builder' ), + 'singular_name' => __( 'Template', 'wp-newsletter-builder' ), + ], + 'public' => true, + 'has_archive' => true, + 'rewrite' => [ 'slug' => 'nb-templates' ], + 'supports' => [ 'title', 'editor', 'custom-fields' ], + 'show_in_rest' => true, + 'exclude_from_search' => true, + 'template' => [ + [ + 'wp-newsletter-builder/email-settings', + [ + 'lock' => [ + 'move' => true, + 'remove' => true, + ], + ], + ], + ], + 'menu_icon' => 'dashicons-admin-customizer', + ], + ); + } + + /** + * Adds the local template file to the template hierarchy. + * + * @param string $template The existing template. + * @return string + */ + public function include_template( $template ) { + global $post; + + $local_path = WP_NEWSLETTER_BUILDER_DIR . '/single-nb_newsletter.php'; + + if ( + $post instanceof \WP_Post + && is_singular( 'nb_newsletter' ) + && file_exists( $local_path ) + && 0 === validate_file( $local_path ) + ) { + $template = $local_path; + } + + return $template; + } + + /** + * Sends the newsletter when the newsletter post is published. + * + * @param int $post_id The post id. + * @param \WP_Post $post The post. + * @param bool $update Whether this is an update. + * @param \WP_Post $post_before The post before the update. + */ + public function on_newsletter_after_insert_post( $post_id, $post, $update, $post_before ): void { + if ( 'nb_newsletter' !== $post->post_type ) { + return; + } + $new_status = $post->post_status; + $old_status = $post_before->post_status; + if ( $new_status === $old_status || 'publish' !== $new_status ) { + return; + } + $this->do_send( $post->ID ); + } + + /** + * Sends the breaking newsletter when the post is published. + * + * @param int $post_id The post id. + */ + public function on_after_insert_post( $post_id ): void { + $post = get_post( $post_id ); + if ( 'post' !== $post->post_type ) { + return; + } + if ( 'publish' !== $post->post_status ) { + return; + } + $should_send = get_post_meta( $post->ID, 'nb_breaking_should_send', true ); + if ( ! $should_send ) { + return; + } + + $nb_newsletter_subject = get_post_meta( $post->ID, 'nb_breaking_subject', true ); + if ( empty( $nb_newsletter_subject ) ) { + $nb_newsletter_subject = $post->post_title; + } + + $nb_newsletter_preview = get_post_meta( $post->ID, 'nb_breaking_preview', true ); + if ( empty( $nb_newsletter_preview ) ) { + $nb_newsletter_preview = $post->post_excerpt; + } + + // Publish the post, which should kick off the other transition listener to send the email. + $breaking_post_id = wp_insert_post( + [ + 'post_title' => "Breaking News {$post->ID}", + 'post_content' => get_post_meta( $post->ID, 'nb_breaking_content', true ), + 'post_status' => 'publish', + 'post_type' => 'nb_newsletter', + 'meta_input' => [ + 'nb_newsletter_email_type' => get_post_meta( $post->ID, 'nb_breaking_email_type', true ), + 'nb_newsletter_template' => get_post_meta( $post->ID, 'nb_breaking_template', true ), + 'nb_newsletter_from_name' => get_post_meta( $post->ID, 'nb_breaking_from_name', true ), + 'nb_newsletter_subject' => $nb_newsletter_subject, + 'nb_newsletter_preview' => $nb_newsletter_preview, + 'nb_newsletter_list' => get_post_meta( $post->ID, 'nb_breaking_list', true ), + 'nb_newsletter_header_img' => get_post_meta( $post->ID, 'nb_breaking_header_img', true ), + ], + ] + ); + if ( is_wp_error( $breaking_post_id ) ) { + return; + } + + $sent_emails = get_post_meta( $post->ID, 'nb_newsletter_sent_breaking_post_id', true ) ?? []; + if ( ! is_array( $sent_emails ) ) { + $sent_emails = [ $sent_emails ]; + } + $sent_emails[] = $breaking_post_id; + update_post_meta( $post->ID, 'nb_newsletter_sent_breaking_post_id', $sent_emails ); + delete_post_meta( $post->ID, 'nb_breaking_subject' ); + delete_post_meta( $post->ID, 'nb_breaking_preview' ); + delete_post_meta( $post->ID, 'nb_breaking_list' ); + delete_post_meta( $post->ID, 'nb_breaking_should_send' ); + + \wp_update_post( + [ + 'ID' => $breaking_post_id, + 'post_status' => 'publish', + ] + ); + } + + /** + * Override the HTML URL for the newsletter - return a public url if local, add auth if staging. + * + * @param string $url The existing url. + * @return string + */ + public function modify_html_url( $url ): string { + $url = str_replace( + [ + 'https://www.', + 'http://www.', + ], + [ + 'https://', + 'http://', + ], + $url + ); + $settings = get_option( 'nb_campaign_monitor_settings' ); + if ( ! empty( $settings['dev_settings']['static_preview_url'] ) ) { + return $settings['dev_settings']['static_preview_url']; + } + if ( + ! empty( $settings['dev_settings']['basic_auth_username'] ) && ! empty( $settings['dev_settings']['basic_auth_password'] ) + ) { + return str_replace( + '://', + sprintf( '://%s:%s@', $settings['dev_settings']['basic_auth_username'], $settings['dev_settings']['basic_auth_password'] ), + $url + ); + } + return $url; + } + + /** + * Sends the newsletter. + * + * @param int $post_id The post id. + * @return void + */ + public function do_send( $post_id ) { + $lists = get_post_meta( $post_id, 'nb_newsletter_list', true ); + if ( ! is_array( $lists ) ) { + $lists = [ $lists ]; + } + if ( empty( $lists ) ) { + return; + } + $campaign_id = get_post_meta( $post_id, 'nb_newsletter_campaign_id', true ); + $result = Campaign_Monitor_Client::instance()->create_campaign( $post_id, $lists ); + if ( 201 === $result['http_status_code'] ) { + update_post_meta( $post_id, 'nb_newsletter_campaign_id', $result['response'] ); + $send_result = Campaign_Monitor_Client::instance()->send_campaign( $result['response'] ); + update_post_meta( $post_id, 'nb_newsletter_send_result', $send_result ); + } + update_post_meta( $post_id, 'nb_newsletter_campaign_result', $result ); + } + + /** + * Modifies the query so we can view draft newsletters as well as published ones. + * + * @param \WP_Query $query The query. + * @return \WP_Query + */ + public function modify_query( $query ) { + if ( + $query->is_main_query() + && isset( $query->query_vars['post_type'] ) + && 'nb_newsletter' === $query->query_vars['post_type'] + ) { + $query->query['post_status'] = [ 'publish', 'draft' ]; + $query->query_vars['post_status'] = [ 'publish', 'draft' ]; + } + return $query; + } + + /** + * Displays an error message if Fieldmanager is not installed. + * + * @return void + */ + public function fieldmanager_not_found_error() { + ?> +
+

+ ', + '', + ); + ?> +

+
+ Date: Mon, 6 Nov 2023 12:39:37 -0600 Subject: [PATCH 09/13] adding tests/feature --- tests/feature/class-example-feature-test.php | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/feature/class-example-feature-test.php diff --git a/tests/feature/class-example-feature-test.php b/tests/feature/class-example-feature-test.php new file mode 100644 index 00000000..90fedd8d --- /dev/null +++ b/tests/feature/class-example-feature-test.php @@ -0,0 +1,25 @@ +assertTrue( true ); + $this->assertNotEmpty( home_url() ); + } +} From 340d033ade261a29381467a15a07c78c15c46a97 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 12:41:03 -0600 Subject: [PATCH 10/13] namespace --- tests/feature/class-example-feature-test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/feature/class-example-feature-test.php b/tests/feature/class-example-feature-test.php index 90fedd8d..6cf4f160 100644 --- a/tests/feature/class-example-feature-test.php +++ b/tests/feature/class-example-feature-test.php @@ -5,9 +5,9 @@ * @package wp-curate */ -namespace Alley\WP\WP_Curate\Tests\Feature; +namespace Alley\WP\WP_Newsletter_Builder\Tests\Feature; -use Alley\WP\WP_Curate\Tests\Test_Case; +use Alley\WP\WP_Newsletter_Builder\Tests\Test_Case; /** * A test suite for an example feature. From 67aa640e39498d3164d28a37647bbf4642300e3a Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 12:45:41 -0600 Subject: [PATCH 11/13] remove feature tests --- phpunit.xml | 3 --- tests/feature/class-example-feature-test.php | 25 -------------------- 2 files changed, 28 deletions(-) delete mode 100644 tests/feature/class-example-feature-test.php diff --git a/phpunit.xml b/phpunit.xml index ab2a15ee..d104cf0d 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,9 +8,6 @@ printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer" > - - tests/feature - tests/unit diff --git a/tests/feature/class-example-feature-test.php b/tests/feature/class-example-feature-test.php deleted file mode 100644 index 6cf4f160..00000000 --- a/tests/feature/class-example-feature-test.php +++ /dev/null @@ -1,25 +0,0 @@ -assertTrue( true ); - $this->assertNotEmpty( home_url() ); - } -} From a01bcae079435070253d0361c8d7cd88ba2ae582 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Mon, 6 Nov 2023 12:59:12 -0600 Subject: [PATCH 12/13] disable test suites --- phpunit.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index d104cf0d..c8d576ca 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -6,10 +6,4 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer" -> - - - tests/unit - - - +/> From febd51445ad8d3d565c89dff007611ee7fa94382 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Tue, 7 Nov 2023 08:57:07 -0600 Subject: [PATCH 13/13] version info --- CHANGELOG.md | 6 ++- components/postPickerResult/index.scss | 58 +++++++++++++------------- plugin.php | 2 +- 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b211179..d53b026a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `Newsletter Builder` will be documented in this file. -## 0.1.0 - 202X-XX-XX +## 0.2.0 - 2023-11-07 + +- Move templates from static files to using a custom post type + +## 0.1.0 - 2023-10-13 - Initial release diff --git a/components/postPickerResult/index.scss b/components/postPickerResult/index.scss index 4ecdac3f..c171dea2 100644 --- a/components/postPickerResult/index.scss +++ b/components/postPickerResult/index.scss @@ -1,35 +1,37 @@ -.alley-scripts-post-picker__post-list .alley-scripts-post-picker__post { - height: auto; - padding: 0 5px 0 0; - width: 99%; -} +.post-type-nb_newsletter { + .alley-scripts-post-picker__post-list .alley-scripts-post-picker__post { + height: auto; + padding: 0 5px 0 0; + width: 99%; + } -.nb-post-picker-result { - align-items: center; - display: flex; - flex-direction: row; - gap: 10px; - justify-content: flex-start; - width: 100%; + .nb-post-picker-result { + align-items: center; + display: flex; + flex-direction: row; + gap: 10px; + justify-content: flex-start; + width: 100%; - &-image__container { - height: 56px; - width: 100px; + &-image__container { + height: 56px; + width: 100px; - img { - max-height: 56px; - max-width: 100px; + img { + max-height: 56px; + max-width: 100px; + } } - } - &-title { - font-weight: 600; - margin: 5px 0; - text-align: left; - } + &-title { + font-weight: 600; + margin: 5px 0; + text-align: left; + } - &-date { - margin-left: auto; - text-align: right; + &-date { + margin-left: auto; + text-align: right; + } } -} \ No newline at end of file +} diff --git a/plugin.php b/plugin.php index 10799900..0f7d0585 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: Newsletter Builder * Plugin URI: https://github.com/alleyinteractive/wp-newsletter-builder * Description: Interface to manage email newsletters - * Version: 0.1.0 + * Version: 0.2.0 * Author: Alley Interactive * Author URI: https://github.com/alleyinteractive/wp-newsletter-builder * Requires at least: 5.9