From b9f6afd6643db98b083c42e28a7052022b85779b Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Thu, 18 Mar 2021 09:46:54 +0100 Subject: [PATCH 01/12] First iteration of index.ts exports. --- .../schema-blocks/src/core/blocks/index.ts | 4 ++ packages/schema-blocks/src/core/index.ts | 2 + .../schema-blocks/src/functions/intialize.ts | 54 +++++++++++++++++ packages/schema-blocks/src/index.ts | 59 ++----------------- .../blocks/VariableTagRichText.ts | 2 +- .../src/instructions/blocks/index.ts | 4 ++ .../schema-blocks/src/instructions/index.ts | 4 +- 7 files changed, 72 insertions(+), 57 deletions(-) create mode 100644 packages/schema-blocks/src/core/blocks/index.ts create mode 100644 packages/schema-blocks/src/core/index.ts create mode 100644 packages/schema-blocks/src/functions/intialize.ts diff --git a/packages/schema-blocks/src/core/blocks/index.ts b/packages/schema-blocks/src/core/blocks/index.ts new file mode 100644 index 0000000000..1235702be2 --- /dev/null +++ b/packages/schema-blocks/src/core/blocks/index.ts @@ -0,0 +1,4 @@ +import BlockInstruction from "./BlockInstruction"; + +export { BlockInstruction }; + diff --git a/packages/schema-blocks/src/core/index.ts b/packages/schema-blocks/src/core/index.ts new file mode 100644 index 0000000000..173c179c24 --- /dev/null +++ b/packages/schema-blocks/src/core/index.ts @@ -0,0 +1,2 @@ +export { BlockInstruction } from "./blocks"; +export { BlockValidation, BlockValidationResult } from "./validation"; diff --git a/packages/schema-blocks/src/functions/intialize.ts b/packages/schema-blocks/src/functions/intialize.ts new file mode 100644 index 0000000000..a3b1467bca --- /dev/null +++ b/packages/schema-blocks/src/functions/intialize.ts @@ -0,0 +1,54 @@ +import logger, { LogLevel } from "./logger"; +import { registerBlockType } from "@wordpress/blocks"; +import { WarningBlock } from "../blocks/warning-block/configuration"; +import { processBlock, processSchema } from "./process"; +import filter from "./gutenberg/filter"; +import watch from "./gutenberg/watch"; + +/** + * Removes all whitespace including line breaks from a string. + * + * @param text The text to remove the whitespace from. + * + * @returns {string} The converted string. + */ +function removeWhitespace( text: string ): string { + return text.split( "\n" ).map( ( s: string ) => s.trim() ).join( "" ); +} + +/** + * Initializes the Schema templates and block templates. + * + * @param logLevel The required minimum severity for a log message to appear in logs. + */ +export default function initialize( logLevel: LogLevel = LogLevel.ERROR ) { + logger.setLogLevel( logLevel ); + + registerBlockType( "yoast/warning-block", WarningBlock ); + + jQuery( 'script[type="text/schema-template"]' ).each( function() { + try { + const template = removeWhitespace( this.innerHTML ); + const definition = processSchema( template ); + definition.register(); + } catch ( e ) { + logger.error( "Failed to parse schema-template", e, this ); + } + } ); + + // Filter in our schema definitions with Gutenberg. + filter(); + + jQuery( 'script[type="text/block-template"]' ).each( function() { + try { + const template = removeWhitespace( this.innerHTML ); + const definition = processBlock( template ); + definition.register(); + } catch ( e ) { + logger.error( "Failed to parse gutenberg-template", e, this ); + } + } ); + + // Watch Gutenberg for block changes that require schema updates. + watch(); +} diff --git a/packages/schema-blocks/src/index.ts b/packages/schema-blocks/src/index.ts index a77f597a52..b1fde75266 100644 --- a/packages/schema-blocks/src/index.ts +++ b/packages/schema-blocks/src/index.ts @@ -1,57 +1,8 @@ -import "./instructions"; -import { processSchema, processBlock } from "./functions/process"; -import watch from "./functions/gutenberg/watch"; -import filter from "./functions/gutenberg/filter"; -import { registerBlockType } from "@wordpress/blocks"; -import { WarningBlock } from "./blocks/warning-block/configuration"; -import logger, { LogLevel } from "./functions/logger"; +import initialize from "./functions/intialize"; -export { LogLevel }; +export { LogLevel } from "./functions/logger"; -/** - * Removes all whitespace including line breaks from a string. - * - * @param text The text to remove the whitespace from. - * - * @returns {string} The converted string. - */ -function removeWhitespace( text: string ): string { - return text.split( "\n" ).map( ( s: string ) => s.trim() ).join( "" ); -} +export { BlockInstruction, BlockValidation, BlockValidationResult } from "./core"; +export { VariableTagRichText } from "./instructions/blocks"; -/** - * Initializes the Schema templates and block templates. - * - * @param logLevel The required minimum severity for a log message to appear in logs. - */ -export default function initialize( logLevel: LogLevel = LogLevel.ERROR ) { - logger.setLogLevel( logLevel ); - - registerBlockType( "yoast/warning-block", WarningBlock ); - - jQuery( 'script[type="text/schema-template"]' ).each( function() { - try { - const template = removeWhitespace( this.innerHTML ); - const definition = processSchema( template ); - definition.register(); - } catch ( e ) { - logger.error( "Failed to parse schema-template", e, this ); - } - } ); - - // Filter in our schema definitions with Gutenberg. - filter(); - - jQuery( 'script[type="text/block-template"]' ).each( function() { - try { - const template = removeWhitespace( this.innerHTML ); - const definition = processBlock( template ); - definition.register(); - } catch ( e ) { - logger.error( "Failed to parse gutenberg-template", e, this ); - } - } ); - - // Watch Gutenberg for block changes that require schema updates. - watch(); -} +export default initialize; diff --git a/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts b/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts index 423e0d7227..234096e5af 100644 --- a/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts +++ b/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts @@ -9,7 +9,7 @@ import { arrayOrObjectToOptions } from "../../functions/select"; /** * VariableTagRichText instruction. */ -class VariableTagRichText extends RichTextBase { +export default class VariableTagRichText extends RichTextBase { public options: { tags: ( keyof HTMLElementTagNameMap )[] | Record; name: string; diff --git a/packages/schema-blocks/src/instructions/blocks/index.ts b/packages/schema-blocks/src/instructions/blocks/index.ts index d0df8e2afd..5089c95979 100644 --- a/packages/schema-blocks/src/instructions/blocks/index.ts +++ b/packages/schema-blocks/src/instructions/blocks/index.ts @@ -14,3 +14,7 @@ import "./TextInput"; import "./VariableTagRichText"; import "./Variation"; import "./VariationPicker"; + +import VariableTagRichText from "./VariableTagRichText"; + +export { VariableTagRichText }; diff --git a/packages/schema-blocks/src/instructions/index.ts b/packages/schema-blocks/src/instructions/index.ts index 3065c3ebee..0ce30e6fe9 100644 --- a/packages/schema-blocks/src/instructions/index.ts +++ b/packages/schema-blocks/src/instructions/index.ts @@ -1,2 +1,2 @@ -import "./blocks"; -import "./schema"; +export * from "./blocks"; +export * from "./schema"; From 5595b52998de2e1f65dc26720caa70f523b3a79d Mon Sep 17 00:00:00 2001 From: Joost Boomkamp Date: Thu, 18 Mar 2021 09:45:55 +0100 Subject: [PATCH 02/12] improve schema blocks exports --- .../src/blocks/BlockSuggestions.tsx | 2 +- .../src/blocks/warning-block/edit.ts | 4 +- packages/schema-blocks/src/core/Definition.ts | 6 +- .../schema-blocks/src/core/Instruction.ts | 5 +- packages/schema-blocks/src/core/Leaf.ts | 2 +- .../src/core/blocks/BlockDefinition.tsx | 10 +- .../core/blocks/BlockDefinitionRepository.ts | 2 +- .../src/core/blocks/BlockInstruction.ts | 13 +- .../src/core/blocks/BlockLeaf.ts | 4 +- .../schema-blocks/src/core/blocks/index.ts | 8 +- packages/schema-blocks/src/core/index.ts | 9 +- .../src/core/schema/SchemaDefinition.ts | 17 +- .../schema/SchemaDefinitionConfiguration.ts | 5 + .../src/core/schema/SchemaInstruction.ts | 7 +- .../src/core/schema/SchemaLeaf.ts | 4 +- .../schema-blocks/src/core/schema/index.ts | 4 + .../src/core/validation/index.ts | 14 +- .../src/functions/blocks/index.ts | 0 .../src/functions/blocks/parse.ts | 13 +- .../gutenberg/storeBlockValidation.ts | 2 +- .../src/functions/gutenberg/watch.ts | 6 +- .../gutenberg/watchers/warningWatcher.ts | 5 +- .../schema-blocks/src/functions/process.ts | 12 +- .../src/functions/schema/parse.ts | 17 +- .../functions/validators/innerBlocksValid.ts | 3 +- .../src/functions/validators/validateMany.ts | 4 +- .../src/instructions/blocks/Block.tsx | 4 +- .../src/instructions/blocks/ClassName.ts | 2 +- .../instructions/blocks/CurrencySelect.tsx | 10 +- .../src/instructions/blocks/Date.tsx | 62 +- .../instructions/blocks/InheritSidebar.tsx | 34 +- .../src/instructions/blocks/InnerBlocks.tsx | 70 +- .../src/instructions/blocks/RichText.ts | 4 +- .../src/instructions/blocks/Select.tsx | 61 +- .../instructions/blocks/SidebarCheckbox.tsx | 26 +- .../instructions/blocks/SidebarDuration.ts | 5 +- .../src/instructions/blocks/SidebarInput.ts | 5 +- .../src/instructions/blocks/SidebarSelect.ts | 6 +- .../src/instructions/blocks/TextInput.tsx | 33 +- .../blocks/VariableTagRichText.ts | 4 +- .../src/instructions/blocks/Variation.ts | 2 +- .../instructions/blocks/VariationPicker.tsx | 7 +- .../blocks/abstract/RichTextBase.ts | 7 +- .../blocks/abstract/SidebarBase.ts | 4 +- .../src/instructions/schema/Attribute.ts | 2 +- .../src/instructions/schema/BlockId.ts | 2 +- .../src/instructions/schema/HTML.ts | 2 +- .../src/instructions/schema/InnerBlocks.ts | 5 +- .../instructions/schema/InnerBlocksHTML.ts | 2 +- .../src/instructions/schema/InnerBlocksID.ts | 2 +- .../instructions/schema/JobEmploymentType.ts | 2 +- .../src/instructions/schema/List.ts | 2 +- .../src/instructions/schema/Permalink.ts | 3 +- .../src/instructions/schema/Schema.ts | 4 +- .../src/leaves/blocks/BlockElementLeaf.ts | 4 +- .../src/leaves/blocks/BlockInstructionLeaf.ts | 6 +- .../src/leaves/blocks/BlockRootLeaf.ts | 4 +- .../src/leaves/blocks/BlockTextLeaf.ts | 4 +- .../src/leaves/schema/SchemaArrayLeaf.ts | 4 +- .../src/leaves/schema/SchemaConstantLeaf.ts | 4 +- .../leaves/schema/SchemaInstructionLeaf.ts | 6 +- .../leaves/schema/SchemaInterpolatedLeaf.ts | 6 +- .../src/leaves/schema/SchemaObjectLeaf.ts | 5 +- .../tests/blocks/BlockSuggestions.test.ts | 2 +- .../tests/core/Definition.test.ts | 2 +- .../core/blocks/BlockInstruction.test.ts | 2 +- .../tests/functions/process.test.ts | 2 +- packages/schema-blocks/yarn.lock | 1461 +++++++++++++++-- 68 files changed, 1600 insertions(+), 462 deletions(-) create mode 100644 packages/schema-blocks/src/core/schema/SchemaDefinitionConfiguration.ts create mode 100644 packages/schema-blocks/src/core/schema/index.ts create mode 100644 packages/schema-blocks/src/functions/blocks/index.ts diff --git a/packages/schema-blocks/src/blocks/BlockSuggestions.tsx b/packages/schema-blocks/src/blocks/BlockSuggestions.tsx index 28c1378941..88fed92a38 100644 --- a/packages/schema-blocks/src/blocks/BlockSuggestions.tsx +++ b/packages/schema-blocks/src/blocks/BlockSuggestions.tsx @@ -67,7 +67,7 @@ function BlockSuggestionAdded( { blockTitle }: BlockSuggestionAddedDto ): ReactE * * @returns {ReactElement} The rendered sidebar section with block suggestions. */ -export default function RequiredBlocks( sidebarTitle: string, block: BlockInstance, suggestedBlocks: SuggestedBlockProperties[] ): ReactElement { +export function RequiredBlocks( sidebarTitle: string, block: BlockInstance, suggestedBlocks: SuggestedBlockProperties[] ): ReactElement { const suggestedBlockNames = suggestedBlocks .filter( suggestedBlock => typeof getBlockType( suggestedBlock.name ) !== "undefined" ) .map( suggestedBlock => suggestedBlock.name ); diff --git a/packages/schema-blocks/src/blocks/warning-block/edit.ts b/packages/schema-blocks/src/blocks/warning-block/edit.ts index ad9634c77e..6ca950cadb 100644 --- a/packages/schema-blocks/src/blocks/warning-block/edit.ts +++ b/packages/schema-blocks/src/blocks/warning-block/edit.ts @@ -16,11 +16,13 @@ export function edit( props: RenderEditProps ): JSX.Element { const { removedBlock, warningText, isRequired } = props.attributes; + const className: string = [ "yoast-warning-block", isRequired ? "required" : "recommended" ].join( " " ); + return createElement( "div", { key: "warning-div", - className: [ "yoast-warning-block", isRequired ? "required" : "recommended" ].join( " " ), + className: className, }, [ createElement( diff --git a/packages/schema-blocks/src/core/Definition.ts b/packages/schema-blocks/src/core/Definition.ts index 5d4e65bc59..8d2a82dee9 100644 --- a/packages/schema-blocks/src/core/Definition.ts +++ b/packages/schema-blocks/src/core/Definition.ts @@ -1,8 +1,8 @@ import { BlockValidation, BlockValidationResult } from "./validation"; import { BlockInstance } from "@wordpress/blocks"; import { isArray, mergeWith } from "lodash"; -import Instruction from "./Instruction"; -import Leaf from "./Leaf"; +import { Instruction } from "./Instruction"; +import { Leaf } from "./Leaf"; import logger from "../functions/logger"; export type DefinitionClass = { @@ -14,7 +14,7 @@ export type DefinitionClass = { /** * Definition class. */ -export default abstract class Definition { +export abstract class Definition { public separator: string; public template: string; public instructions: Record; diff --git a/packages/schema-blocks/src/core/Instruction.ts b/packages/schema-blocks/src/core/Instruction.ts index 9f7ffb8448..1810633987 100644 --- a/packages/schema-blocks/src/core/Instruction.ts +++ b/packages/schema-blocks/src/core/Instruction.ts @@ -1,6 +1,7 @@ import { BlockInstance } from "@wordpress/blocks"; -import logger from "../functions/logger"; import { BlockValidationResult, BlockValidation } from "./validation"; +import logger from "../functions/logger"; + export type InstructionPrimitive = string | number | boolean; export type InstructionValue = InstructionPrimitive | InstructionObject | InstructionArray; export type InstructionArray = readonly InstructionValue[]; @@ -15,7 +16,7 @@ export type InstructionOptions = InstructionObject & { /** * Abstract instruction class. */ -export default abstract class Instruction { +export abstract class Instruction { static registeredInstructions: Record>; public id: number; diff --git a/packages/schema-blocks/src/core/Leaf.ts b/packages/schema-blocks/src/core/Leaf.ts index 4a95065062..e032f89b37 100644 --- a/packages/schema-blocks/src/core/Leaf.ts +++ b/packages/schema-blocks/src/core/Leaf.ts @@ -1,6 +1,6 @@ /** * Leaf class */ -export default abstract class Leaf { +export abstract class Leaf { public parent: Leaf; } diff --git a/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx b/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx index a6fca8ca1a..98f3a962c7 100644 --- a/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx +++ b/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx @@ -1,9 +1,9 @@ import { createElement, Fragment, ReactElement } from "@wordpress/element"; import { registerBlockType, BlockConfiguration, BlockEditProps, BlockSaveProps } from "@wordpress/blocks"; import { InspectorControls } from "@wordpress/block-editor"; -import BlockInstruction from "./BlockInstruction"; -import Definition from "../Definition"; -import BlockRootLeaf from "../../leaves/blocks/BlockRootLeaf"; +import { BlockInstruction } from "./BlockInstruction"; +import { Definition } from "../Definition"; +import { BlockRootLeaf } from "../../leaves/blocks/BlockRootLeaf"; import parse from "../../functions/blocks/parse"; import { registerBlockDefinition } from "./BlockDefinitionRepository"; import { PanelBody } from "@wordpress/components"; @@ -26,7 +26,7 @@ export type MutableBlockConfiguration = { /** * BlockDefinition class. */ -export default class BlockDefinition extends Definition { +export class BlockDefinition extends Definition { public static separatorCharacters = [ "b", "c", "d", "f", "g", "h", "k", "m", "z" ]; public static parser = parse; @@ -84,7 +84,7 @@ export default class BlockDefinition extends Definition { configuration.edit = props => this.edit( props ); configuration.save = props => this.save( props ); - + logger.info( "registering block " + name ); // Register the block to WordPress. diff --git a/packages/schema-blocks/src/core/blocks/BlockDefinitionRepository.ts b/packages/schema-blocks/src/core/blocks/BlockDefinitionRepository.ts index 80905ab313..14deed5091 100644 --- a/packages/schema-blocks/src/core/blocks/BlockDefinitionRepository.ts +++ b/packages/schema-blocks/src/core/blocks/BlockDefinitionRepository.ts @@ -1,4 +1,4 @@ -import BlockDefinition from "./BlockDefinition"; +import { BlockDefinition } from "./BlockDefinition"; // Internal store of all known BlockDefinitions. const registeredBlockDefinitions: Record = {}; diff --git a/packages/schema-blocks/src/core/blocks/BlockInstruction.ts b/packages/schema-blocks/src/core/blocks/BlockInstruction.ts index 4df76a2dc9..eafa9c2b2f 100644 --- a/packages/schema-blocks/src/core/blocks/BlockInstruction.ts +++ b/packages/schema-blocks/src/core/blocks/BlockInstruction.ts @@ -1,22 +1,17 @@ -import BlockLeaf from "./BlockLeaf"; +import { BlockLeaf } from "./BlockLeaf"; import { RenderSaveProps, RenderEditProps } from "./BlockDefinition"; import { ReactElement } from "@wordpress/element"; import { BlockConfiguration, BlockInstance } from "@wordpress/blocks"; import { BlockValidationResult, BlockValidation } from "../validation"; -import Instruction, { InstructionOptions } from "../Instruction"; +import { Instruction } from "../Instruction"; import { attributeExists, attributeNotEmpty } from "../../functions/validators"; -import validateMany from "../../functions/validators/validateMany"; +import { validateMany } from "../../functions/validators/validateMany"; import logger from "../../functions/logger"; -export type BlockInstructionClass = { - new( id: number, options: InstructionOptions ): BlockInstruction; - options: InstructionOptions; -}; - /** * BlockInstruction class. */ -export default abstract class BlockInstruction extends Instruction { +export abstract class BlockInstruction extends Instruction { /* eslint-disable @typescript-eslint/no-unused-vars */ /** * Renders saving the element. diff --git a/packages/schema-blocks/src/core/blocks/BlockLeaf.ts b/packages/schema-blocks/src/core/blocks/BlockLeaf.ts index f8e804e1a0..0c3731ae28 100644 --- a/packages/schema-blocks/src/core/blocks/BlockLeaf.ts +++ b/packages/schema-blocks/src/core/blocks/BlockLeaf.ts @@ -1,10 +1,10 @@ import { RenderEditProps, RenderSaveProps } from "./BlockDefinition"; -import Leaf from "../Leaf"; +import { Leaf } from "../Leaf"; /** * BlockLeaf class */ -export default abstract class BlockLeaf extends Leaf { +export abstract class BlockLeaf extends Leaf { public parent: BlockLeaf; /** diff --git a/packages/schema-blocks/src/core/blocks/index.ts b/packages/schema-blocks/src/core/blocks/index.ts index 1235702be2..4cf83a3a96 100644 --- a/packages/schema-blocks/src/core/blocks/index.ts +++ b/packages/schema-blocks/src/core/blocks/index.ts @@ -1,4 +1,4 @@ -import BlockInstruction from "./BlockInstruction"; - -export { BlockInstruction }; - +export { BlockDefinition } from "./BlockDefinition"; +export { getBlockDefinition, registerBlockDefinition } from "./BlockDefinitionRepository"; +export { BlockInstruction } from "./BlockInstruction"; +export { BlockLeaf } from "./BlockLeaf"; diff --git a/packages/schema-blocks/src/core/index.ts b/packages/schema-blocks/src/core/index.ts index 173c179c24..bafcc1a8d2 100644 --- a/packages/schema-blocks/src/core/index.ts +++ b/packages/schema-blocks/src/core/index.ts @@ -1,2 +1,7 @@ -export { BlockInstruction } from "./blocks"; -export { BlockValidation, BlockValidationResult } from "./validation"; +export * from "./blocks"; +export * from "./schema"; +export * from "./validation"; + +export { Leaf } from "./Leaf"; +export { Instruction } from "./Instruction"; +export { Definition } from "./Definition"; diff --git a/packages/schema-blocks/src/core/schema/SchemaDefinition.ts b/packages/schema-blocks/src/core/schema/SchemaDefinition.ts index 9aff7c1a0f..f95d89e3c0 100644 --- a/packages/schema-blocks/src/core/schema/SchemaDefinition.ts +++ b/packages/schema-blocks/src/core/schema/SchemaDefinition.ts @@ -1,8 +1,9 @@ -import SchemaInstruction from "./SchemaInstruction"; -import SchemaLeaf from "./SchemaLeaf"; -import Definition from "../Definition"; -import parse from "../../functions/schema/parse"; +import { SchemaInstruction } from "./SchemaInstruction"; +import { SchemaLeaf } from "./SchemaLeaf"; +import { Definition } from "../Definition"; +import { parse } from "../../functions/schema/parse"; import { BlockInstance } from "@wordpress/blocks"; +import { SchemaDefinitionConfiguration } from "./SchemaDefinitionConfiguration"; export type SchemaPrimitive = string | number | boolean; export type SchemaValue = SchemaPrimitive | SchemaObject | SchemaArray; @@ -11,16 +12,10 @@ export type SchemaArray = SchemaValue[]; export const schemaDefinitions: Record = {}; -export type SchemaDefinitionConfiguration = { - name: string; - onlyNested?: boolean; - separateInGraph?: boolean; -}; - /** * Schema definition class. */ -export default class SchemaDefinition extends Definition { +export class SchemaDefinition extends Definition { public static separatorCharacters = [ "1", "2", "3", "4", "5", "6", "7", "8", "9" ]; public static parser = parse; diff --git a/packages/schema-blocks/src/core/schema/SchemaDefinitionConfiguration.ts b/packages/schema-blocks/src/core/schema/SchemaDefinitionConfiguration.ts new file mode 100644 index 0000000000..d9740fb11c --- /dev/null +++ b/packages/schema-blocks/src/core/schema/SchemaDefinitionConfiguration.ts @@ -0,0 +1,5 @@ +export type SchemaDefinitionConfiguration = { + name: string; + onlyNested?: boolean; + separateInGraph?: boolean; +}; diff --git a/packages/schema-blocks/src/core/schema/SchemaInstruction.ts b/packages/schema-blocks/src/core/schema/SchemaInstruction.ts index 1392184c57..d7581e4d29 100644 --- a/packages/schema-blocks/src/core/schema/SchemaInstruction.ts +++ b/packages/schema-blocks/src/core/schema/SchemaInstruction.ts @@ -1,5 +1,6 @@ -import { SchemaValue, SchemaDefinitionConfiguration } from "./SchemaDefinition"; -import Instruction, { InstructionOptions } from "../Instruction"; +import { SchemaValue } from "./SchemaDefinition"; +import { SchemaDefinitionConfiguration } from "./SchemaDefinitionConfiguration"; +import { Instruction, InstructionOptions } from "../Instruction"; import { BlockInstance } from "@wordpress/blocks"; import { BlockValidation, BlockValidationResult } from "../validation"; @@ -8,7 +9,7 @@ export type SchemaInstructionClass = { new( id: number, options: InstructionOpti /** * SchemaInstruction class. */ -export default abstract class SchemaInstruction extends Instruction { +export abstract class SchemaInstruction extends Instruction { /* eslint-disable @typescript-eslint/no-unused-vars */ /** * Renders schema. diff --git a/packages/schema-blocks/src/core/schema/SchemaLeaf.ts b/packages/schema-blocks/src/core/schema/SchemaLeaf.ts index bba6bf0603..179c4a88e0 100644 --- a/packages/schema-blocks/src/core/schema/SchemaLeaf.ts +++ b/packages/schema-blocks/src/core/schema/SchemaLeaf.ts @@ -1,11 +1,11 @@ import { SchemaValue } from "./SchemaDefinition"; -import Leaf from "../Leaf"; +import { Leaf } from "../Leaf"; import { BlockInstance } from "@wordpress/blocks"; /** * Leaf class */ -export default abstract class SchemaLeaf extends Leaf { +export abstract class SchemaLeaf extends Leaf { parent: SchemaLeaf; /** diff --git a/packages/schema-blocks/src/core/schema/index.ts b/packages/schema-blocks/src/core/schema/index.ts new file mode 100644 index 0000000000..77a1b4247b --- /dev/null +++ b/packages/schema-blocks/src/core/schema/index.ts @@ -0,0 +1,4 @@ +export { SchemaDefinition } from "./SchemaDefinition"; +export { SchemaDefinitionConfiguration } from "./SchemaDefinitionConfiguration"; +export { SchemaInstruction } from "./SchemaInstruction"; +export { SchemaLeaf } from "./SchemaLeaf"; diff --git a/packages/schema-blocks/src/core/validation/index.ts b/packages/schema-blocks/src/core/validation/index.ts index b9460b106d..86ea1172df 100644 --- a/packages/schema-blocks/src/core/validation/index.ts +++ b/packages/schema-blocks/src/core/validation/index.ts @@ -1,8 +1,6 @@ -import { BlockValidation } from "./BlockValidation"; -import { BlockValidationResult } from "./BlockValidationResult"; -import { RequiredBlockOption } from "./RequiredBlockOption"; -import { RequiredBlock } from "./RequiredBlock"; -import { RecommendedBlock } from "./RecommendedBlock"; -import { SuggestedBlockProperties } from "./SuggestedBlockProperties"; - -export { BlockValidation, BlockValidationResult, RequiredBlockOption, RequiredBlock, RecommendedBlock, SuggestedBlockProperties }; +export { BlockValidation } from "./BlockValidation"; +export { BlockValidationResult } from "./BlockValidationResult"; +export { RequiredBlockOption } from "./RequiredBlockOption"; +export { RequiredBlock } from "./RequiredBlock"; +export { RecommendedBlock } from "./RecommendedBlock"; +export { SuggestedBlockProperties } from "./SuggestedBlockProperties"; diff --git a/packages/schema-blocks/src/functions/blocks/index.ts b/packages/schema-blocks/src/functions/blocks/index.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/schema-blocks/src/functions/blocks/parse.ts b/packages/schema-blocks/src/functions/blocks/parse.ts index cf4a104795..5e750e66ad 100644 --- a/packages/schema-blocks/src/functions/blocks/parse.ts +++ b/packages/schema-blocks/src/functions/blocks/parse.ts @@ -1,12 +1,11 @@ import { flatMap } from "lodash"; - -import BlockLeaf from "../../core/blocks/BlockLeaf"; -import BlockDefinition from "../../core/blocks/BlockDefinition"; -import BlockInstructionLeaf from "../../leaves/blocks/BlockInstructionLeaf"; -import BlockTextLeaf from "../../leaves/blocks/BlockTextLeaf"; -import BlockElementLeaf from "../../leaves/blocks/BlockElementLeaf"; +import { BlockLeaf } from "../../core/blocks/BlockLeaf"; +import { BlockDefinition } from "../../core/blocks/BlockDefinition"; +import { BlockInstructionLeaf } from "../../leaves/blocks/BlockInstructionLeaf"; +import { BlockTextLeaf } from "../../leaves/blocks/BlockTextLeaf"; +import { BlockElementLeaf } from "../../leaves/blocks/BlockElementLeaf"; import { AllHTMLAttributes } from "@wordpress/element"; -import BlockRootLeaf from "../../leaves/blocks/BlockRootLeaf"; +import { BlockRootLeaf } from "../../leaves/blocks/BlockRootLeaf"; /** * Parses text into leaves. diff --git a/packages/schema-blocks/src/functions/gutenberg/storeBlockValidation.ts b/packages/schema-blocks/src/functions/gutenberg/storeBlockValidation.ts index b840352069..221cae3e9b 100644 --- a/packages/schema-blocks/src/functions/gutenberg/storeBlockValidation.ts +++ b/packages/schema-blocks/src/functions/gutenberg/storeBlockValidation.ts @@ -6,7 +6,7 @@ import logger from "../logger"; * Updates the store with information about whether a block is valid or why it isn't. * @param validations The blocks' validation results. */ -export default function storeBlockValidation( validations: BlockValidationResult[] ) { +export function storeBlockValidation( validations: BlockValidationResult[] ) { if ( validations.length < 1 ) { return; } diff --git a/packages/schema-blocks/src/functions/gutenberg/watch.ts b/packages/schema-blocks/src/functions/gutenberg/watch.ts index bcee7635ef..1df0965e5a 100644 --- a/packages/schema-blocks/src/functions/gutenberg/watch.ts +++ b/packages/schema-blocks/src/functions/gutenberg/watch.ts @@ -1,11 +1,11 @@ import { debounce, isEqual } from "lodash"; import { subscribe, select, dispatch } from "@wordpress/data"; -import SchemaDefinition, { schemaDefinitions } from "../../core/schema/SchemaDefinition"; +import { SchemaDefinition, schemaDefinitions } from "../../core/schema/SchemaDefinition"; import { BlockInstance } from "@wordpress/blocks"; -import warningWatcher from "./watchers/warningWatcher"; +import { warningWatcher } from "./watchers/warningWatcher"; import { getBlockDefinition } from "../../core/blocks/BlockDefinitionRepository"; import { BlockValidation, BlockValidationResult } from "../../core/validation"; -import storeBlockValidation from "./storeBlockValidation"; +import { storeBlockValidation } from "./storeBlockValidation"; import logger from "../logger"; let updatingSchema = false; diff --git a/packages/schema-blocks/src/functions/gutenberg/watchers/warningWatcher.ts b/packages/schema-blocks/src/functions/gutenberg/watchers/warningWatcher.ts index fa473c522e..c2c4a86582 100644 --- a/packages/schema-blocks/src/functions/gutenberg/watchers/warningWatcher.ts +++ b/packages/schema-blocks/src/functions/gutenberg/watchers/warningWatcher.ts @@ -1,12 +1,11 @@ import { dispatch } from "@wordpress/data"; import { BlockInstance, createBlock } from "@wordpress/blocks"; import { __, sprintf } from "@wordpress/i18n"; - import { getBlockDefinition } from "../../../core/blocks/BlockDefinitionRepository"; import InnerBlocks from "../../../instructions/blocks/InnerBlocks"; import recurseOverBlocks from "../../blocks/recurseOverBlocks"; import { mapBlocksRecursively } from "../../innerBlocksHelper"; -import BlockDefinition from "../../../core/blocks/BlockDefinition"; +import { BlockDefinition } from "../../../core/blocks/BlockDefinition"; import { InstructionObject } from "../../../core/Instruction"; import { getBlockType } from "../../BlockHelper"; import { RecommendedBlock, RequiredBlock } from "../../../core/validation"; @@ -191,7 +190,7 @@ function addWarningsForRecommendedBlocks( * @param blocks The current list of blocks. * @param previousBlocks The previous list of blocks. */ -export default function warningWatcher( blocks: BlockInstance[], previousBlocks: BlockInstance[] = [] ): void { +export function warningWatcher( blocks: BlockInstance[], previousBlocks: BlockInstance[] = [] ): void { const currentBlockIds: string[] = mapBlocksRecursively( blocks, block => block.clientId ); recurseOverBlocks( previousBlocks, ( block: BlockInstance ) => { diff --git a/packages/schema-blocks/src/functions/process.ts b/packages/schema-blocks/src/functions/process.ts index 54a9022204..9cdbd147c6 100644 --- a/packages/schema-blocks/src/functions/process.ts +++ b/packages/schema-blocks/src/functions/process.ts @@ -1,16 +1,16 @@ import { camelCase } from "lodash"; import { IToken } from "tokenizr"; -import BlockDefinition from "../core/blocks/BlockDefinition"; -import BlockInstruction from "../core/blocks/BlockInstruction"; -import Definition, { DefinitionClass } from "../core/Definition"; -import Instruction, { +import { BlockDefinition } from "../core/blocks/BlockDefinition"; +import { BlockInstruction } from "../core/blocks/BlockInstruction"; +import { Definition, DefinitionClass } from "../core/Definition"; +import { Instruction, InstructionArray, InstructionValue, InstructionPrimitive, InstructionObject, } from "../core/Instruction"; -import SchemaDefinition from "../core/schema/SchemaDefinition"; -import SchemaInstruction from "../core/schema/SchemaInstruction"; +import { SchemaDefinition } from "../core/schema/SchemaDefinition"; +import { SchemaInstruction } from "../core/schema/SchemaInstruction"; import { generateUniqueSeparator } from "./separator"; import tokenize from "./tokenize"; diff --git a/packages/schema-blocks/src/functions/schema/parse.ts b/packages/schema-blocks/src/functions/schema/parse.ts index edd074b5a1..66e0570583 100644 --- a/packages/schema-blocks/src/functions/schema/parse.ts +++ b/packages/schema-blocks/src/functions/schema/parse.ts @@ -1,12 +1,11 @@ import { mapValues } from "lodash"; - -import SchemaDefinition, { SchemaValue } from "../../core/schema/SchemaDefinition"; -import SchemaLeaf from "../../core/schema/SchemaLeaf"; -import SchemaObjectLeaf from "../../leaves/schema/SchemaObjectLeaf"; -import SchemaArrayLeaf from "../../leaves/schema/SchemaArrayLeaf"; -import SchemaInstructionLeaf from "../../leaves/schema/SchemaInstructionLeaf"; -import SchemaConstantLeaf from "../../leaves/schema/SchemaConstantLeaf"; -import SchemaInterpolatedLeaf from "../../leaves/schema/SchemaInterpolatedLeaf"; +import { SchemaDefinition, SchemaValue } from "../../core/schema/SchemaDefinition"; +import { SchemaLeaf } from "../../core/schema/SchemaLeaf"; +import { SchemaObjectLeaf } from "../../leaves/schema/SchemaObjectLeaf"; +import { SchemaArrayLeaf } from "../../leaves/schema/SchemaArrayLeaf"; +import { SchemaInstructionLeaf } from "../../leaves/schema/SchemaInstructionLeaf"; +import { SchemaConstantLeaf } from "../../leaves/schema/SchemaConstantLeaf"; +import { SchemaInterpolatedLeaf } from "../../leaves/schema/SchemaInterpolatedLeaf"; /** * Parses a JSON value. @@ -59,7 +58,7 @@ function parseValue( value: SchemaValue, definition: SchemaDefinition ): SchemaL * * @returns The parsed schema definition. */ -export default function parse( definition: SchemaDefinition ): SchemaDefinition { +export function parse( definition: SchemaDefinition ): SchemaDefinition { const value = JSON.parse( definition.template ); definition.tree = parseValue( value, definition ); diff --git a/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts b/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts index 3da4a6fa90..6d92b99a25 100644 --- a/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts +++ b/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts @@ -115,5 +115,4 @@ function validateInnerBlocks( blockInstance: BlockInstance, requiredBlocks: Requ return validationResults; } -export default validateInnerBlocks; -export { findMissingBlocks, findRedundantBlocks, validateInnerblockTree }; +export { validateInnerBlocks, findMissingBlocks, findRedundantBlocks, validateInnerblockTree }; diff --git a/packages/schema-blocks/src/functions/validators/validateMany.ts b/packages/schema-blocks/src/functions/validators/validateMany.ts index eb1d7ea6ac..f644ead66b 100644 --- a/packages/schema-blocks/src/functions/validators/validateMany.ts +++ b/packages/schema-blocks/src/functions/validators/validateMany.ts @@ -8,12 +8,10 @@ import { BlockValidation, BlockValidationResult } from "../../core/validation"; * * @returns {BlockValidationResult} The result of the validation. */ -function validateMany( validation: BlockValidationResult ): BlockValidationResult { +export function validateMany( validation: BlockValidationResult ): BlockValidationResult { validation.result = validation.issues.some( issue => ! isValidResult( issue.result ) ) ? BlockValidation.Invalid : BlockValidation.Valid; return validation; } - -export default validateMany; diff --git a/packages/schema-blocks/src/instructions/blocks/Block.tsx b/packages/schema-blocks/src/instructions/blocks/Block.tsx index ffacfafd68..d68a5550cd 100644 --- a/packages/schema-blocks/src/instructions/blocks/Block.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Block.tsx @@ -1,4 +1,4 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { BlockConfiguration } from "@wordpress/blocks"; /** @@ -33,4 +33,4 @@ class Block extends BlockInstruction { } } -BlockInstruction.register( "block", Block ); +BlockInstruction.register("block", Block); diff --git a/packages/schema-blocks/src/instructions/blocks/ClassName.ts b/packages/schema-blocks/src/instructions/blocks/ClassName.ts index 008009c015..76687638bf 100644 --- a/packages/schema-blocks/src/instructions/blocks/ClassName.ts +++ b/packages/schema-blocks/src/instructions/blocks/ClassName.ts @@ -1,4 +1,4 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderEditProps } from "../../core/blocks/BlockDefinition"; /** diff --git a/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx b/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx index 9802b31962..499d49b984 100644 --- a/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx +++ b/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx @@ -1,5 +1,5 @@ -import Select from "./Select"; -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { Select } from "./Select"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { InstructionOptions } from "../../core/Instruction"; import { arrayOrObjectToOptions } from "../../functions/select"; @@ -199,9 +199,9 @@ class CurrencySelect extends Select { id: number, options: InstructionOptions, ) { - super( id, options ); - this.options.options = arrayOrObjectToOptions( currencyCodes ); + super(id, options); + this.options.options = arrayOrObjectToOptions(currencyCodes); } } -BlockInstruction.register( "currency-select", CurrencySelect ); +BlockInstruction.register("currency-select", CurrencySelect); diff --git a/packages/schema-blocks/src/instructions/blocks/Date.tsx b/packages/schema-blocks/src/instructions/blocks/Date.tsx index 8cea35ca0f..736ca152da 100644 --- a/packages/schema-blocks/src/instructions/blocks/Date.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Date.tsx @@ -6,7 +6,7 @@ import { __experimentalGetSettings, dateI18n, getDate, format } from "@wordpress import { __ } from "@wordpress/i18n"; // Internal imports. -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; import { useCallback } from "react"; @@ -25,18 +25,18 @@ export default class Date extends BlockInstruction { * * @return The React components to show in the editor when editing this block. */ - edit( props: RenderEditProps ): JSX.Element { + edit(props: RenderEditProps): JSX.Element { const { attributes, setAttributes } = props; const dateFormat = Date.getDateFormat(); - const currentlySelectedDate = dateI18n( dateFormat, attributes[ this.options.name ] ); + const currentlySelectedDate = dateI18n(dateFormat, attributes[this.options.name]); - const [ selectedDate, setSelectedDate ] = useState( currentlySelectedDate ); + const [selectedDate, setSelectedDate] = useState(currentlySelectedDate); - let currentValue = __( "Select a date", "yoast-schema-blocks" ); - if ( attributes[ this.options.name ] ) { - currentValue = format( "Y-m-d", getDate() ); + let currentValue = __("Select a date", "yoast-schema-blocks"); + if (attributes[this.options.name]) { + currentValue = format("Y-m-d", getDate()); } /** @@ -44,14 +44,14 @@ export default class Date extends BlockInstruction { * * @param dateTime The selected date and time in the form 'yyyy-MM-ddThh:mm:ss' (only the date part is used). */ - const setDate = useCallback( ( dateTime: string ) => { - const date = dateTime ? dateTime.split( "T" )[ 0 ] : null; + const setDate = useCallback((dateTime: string) => { + const date = dateTime ? dateTime.split("T")[0] : null; - setAttributes( { - [ this.options.name ]: date, - } ); - setSelectedDate( dateI18n( dateFormat, date ) ); - }, [ props, dateFormat, setSelectedDate ] ); + setAttributes({ + [this.options.name]: date, + }); + setSelectedDate(dateI18n(dateFormat, date)); + }, [props, dateFormat, setSelectedDate]); /** * Render toggle. @@ -60,34 +60,34 @@ export default class Date extends BlockInstruction { * * @return The rendered toggle element. */ - const renderToggle = useCallback( ( renderProps: Dropdown.RenderProps ): JSX.Element => { + const renderToggle = useCallback((renderProps: Dropdown.RenderProps): JSX.Element => { return ; - }, [ selectedDate ] ); + }, [selectedDate]); /** * Renders the content of the dropdown element. * * @returns The rendered content of the dropdown element. */ - const renderContent = useCallback( (): JSX.Element => { + const renderContent = useCallback((): JSX.Element => { return
; - }, [ selectedDate, setDate ] ); + }, [selectedDate, setDate]); return ; } @@ -115,16 +115,16 @@ export default class Date extends BlockInstruction { * * @return The HTML to save to the database. */ - save( props: RenderSaveProps ): JSX.Element { - const date = props.attributes[ this.options.name ] as string; + save(props: RenderSaveProps): JSX.Element { + const date = props.attributes[this.options.name] as string; - if ( ! date ) { + if (!date) { return null; } const dateFormat = Date.getDateFormat(); - return
; + return
; } /** @@ -136,7 +136,7 @@ export default class Date extends BlockInstruction { configuration(): Partial { return { attributes: { - [ this.options.name ]: { + [this.options.name]: { type: "string", }, }, @@ -144,4 +144,4 @@ export default class Date extends BlockInstruction { } } -BlockInstruction.register( "date", Date ); +BlockInstruction.register("date", Date); diff --git a/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx b/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx index 34c49d890b..354b0bd995 100644 --- a/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx +++ b/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx @@ -1,11 +1,11 @@ import { createElement, Fragment, ReactElement } from "@wordpress/element"; -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { BlockEditProps, BlockConfiguration } from "@wordpress/blocks"; import { createBlockEditProps, getParentIdOfType } from "../../functions/gutenberg/block"; import { getBlockByClientId } from "../../functions/BlockHelper"; -import logger from "../../functions/logger"; import { getBlockDefinition } from "../../core/blocks/BlockDefinitionRepository"; import { InstructionOptions } from "../../core/Instruction"; +import logger from "../../functions/logger"; /** * Sidebar input instruction. @@ -24,28 +24,28 @@ export default class InheritSidebar extends BlockInstruction { * * @returns The sidebar element. */ - sidebar( props: BlockEditProps>, i: number ): ReactElement { + sidebar(props: BlockEditProps>, i: number): ReactElement { let parentIds: string[] = []; - if ( this.options.parents ) { - parentIds = getParentIdOfType( props.clientId, this.options.parents ); + if (this.options.parents) { + parentIds = getParentIdOfType(props.clientId, this.options.parents); } const elements: ReactElement[] = []; - if ( parentIds.length > 0 ) { - parentIds.forEach( parentId => { - const parentBlock = getBlockByClientId( parentId ); - const parentBlockDefinition = getBlockDefinition( parentBlock.name ); - if ( parentBlockDefinition ) { - logger.debug( this.options.name + " inherited sidebar from " + parentBlock.name + " definition" ); - const parentProps = createBlockEditProps( parentBlock ); - elements.push( ...parentBlockDefinition.sidebarElements( parentProps ) ); + if (parentIds.length > 0) { + parentIds.forEach(parentId => { + const parentBlock = getBlockByClientId(parentId); + const parentBlockDefinition = getBlockDefinition(parentBlock.name); + if (parentBlockDefinition) { + logger.debug(this.options.name + " inherited sidebar from " + parentBlock.name + " definition"); + const parentProps = createBlockEditProps(parentBlock); + elements.push(...parentBlockDefinition.sidebarElements(parentProps)); } - } ); + }); } return ( - { ...elements } + { ...elements} ); } @@ -59,7 +59,7 @@ export default class InheritSidebar extends BlockInstruction { configuration(): Partial { return { attributes: { - [ this.options.name ]: { + [this.options.name]: { parents: this.options.parents, }, }, @@ -67,4 +67,4 @@ export default class InheritSidebar extends BlockInstruction { } } -BlockInstruction.register( "inherit-sidebar", InheritSidebar ); +BlockInstruction.register("inherit-sidebar", InheritSidebar); diff --git a/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx b/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx index 68f9a7ae0a..18cd13cea0 100644 --- a/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx +++ b/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx @@ -3,14 +3,14 @@ import { createElement, ComponentClass, Fragment } from "@wordpress/element"; import { InnerBlocks as WordPressInnerBlocks } from "@wordpress/block-editor"; import { BlockInstance } from "@wordpress/blocks"; import { BlockValidation, BlockValidationResult } from "../../core/validation"; -import BlockInstruction from "../../core/blocks/BlockInstruction"; -import validateInnerBlocks from "../../functions/validators/innerBlocksValid"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; +import { validateInnerBlocks } from "../../functions/validators/innerBlocksValid"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; import { getBlockByClientId } from "../../functions/BlockHelper"; -import validateMany from "../../functions/validators/validateMany"; +import { validateMany } from "../../functions/validators/validateMany"; import { innerBlocksSidebar } from "../../functions/presenters/InnerBlocksSidebarPresenter"; import { InnerBlocksInstructionOptions } from "./InnerBlocksInstructionOptions"; -import BlockLeaf from "../../core/blocks/BlockLeaf"; +import { BlockLeaf } from "../../core/blocks/BlockLeaf"; /** * Custom props for InnerBlocks. @@ -37,8 +37,8 @@ export default class InnerBlocks extends BlockInstruction { * * @returns The inner blocks. */ - save( props: RenderSaveProps, leaf: BlockLeaf, i: number ): ReactElement | string { - return createElement( WordPressInnerBlocks.Content, { key: i } ); + save(props: RenderSaveProps, leaf: BlockLeaf, i: number): ReactElement | string { + return createElement(WordPressInnerBlocks.Content, { key: i }); } /** @@ -50,7 +50,7 @@ export default class InnerBlocks extends BlockInstruction { * * @returns The inner blocks. */ - edit( props: RenderEditProps, leaf: BlockLeaf, i: number ): ReactElement | string { + edit(props: RenderEditProps, leaf: BlockLeaf, i: number): ReactElement | string { const properties: React.ClassAttributes & InnerBlocksProps = { key: i, }; @@ -58,15 +58,15 @@ export default class InnerBlocks extends BlockInstruction { this.options.requiredBlocks = this.options.requiredBlocks || []; this.options.recommendedBlocks = this.options.recommendedBlocks || []; - this.renderAppender( properties ); + this.renderAppender(properties); - this.arrangeAllowedBlocks( properties ); + this.arrangeAllowedBlocks(properties); - if ( this.options.template ) { + if (this.options.template) { properties.template = this.options.template; } - return createElement( WordPressInnerBlocks, properties as WordPressInnerBlocks.Props ); + return createElement(WordPressInnerBlocks, properties as WordPressInnerBlocks.Props); } /** @@ -74,28 +74,28 @@ export default class InnerBlocks extends BlockInstruction { * * @param properties The properties of the innerblock. */ - private renderAppender( properties: React.ClassAttributes & InnerBlocksProps ) { - if ( this.options.appender === false ) { + private renderAppender(properties: React.ClassAttributes & InnerBlocksProps) { + if (this.options.appender === false) { properties.renderAppender = false; return; } - if ( this.options.appender === "button" ) { + if (this.options.appender === "button") { properties.renderAppender = () => { // The type definition of InnerBlocks are wrong so cast to fix them. - return createElement( ( WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass } ).ButtonBlockAppender ); + return createElement((WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass }).ButtonBlockAppender); }; } else { - properties.renderAppender = () => createElement( WordPressInnerBlocks.DefaultBlockAppender ); + properties.renderAppender = () => createElement(WordPressInnerBlocks.DefaultBlockAppender); } - if ( typeof this.options.appenderLabel === "string" ) { + if (typeof this.options.appenderLabel === "string") { properties.renderAppender = () => { return createElement( "div", { className: "yoast-labeled-inserter", "data-label": this.options.appenderLabel }, // The type definition of InnerBlocks are wrong so cast to fix them. - createElement( ( WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass } ).ButtonBlockAppender ), + createElement((WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass }).ButtonBlockAppender), ); }; } @@ -106,16 +106,16 @@ export default class InnerBlocks extends BlockInstruction { * * @param properties The properties of the current block. */ - private arrangeAllowedBlocks( properties: React.ClassAttributes & InnerBlocksProps ) { - properties.allowedBlocks = [ "yoast/warning-block" ]; + private arrangeAllowedBlocks(properties: React.ClassAttributes & InnerBlocksProps) { + properties.allowedBlocks = ["yoast/warning-block"]; - if ( this.options.allowedBlocks ) { - properties.allowedBlocks = this.options.allowedBlocks.concat( properties.allowedBlocks ); + if (this.options.allowedBlocks) { + properties.allowedBlocks = this.options.allowedBlocks.concat(properties.allowedBlocks); } properties.allowedBlocks = properties.allowedBlocks - .concat( this.options.requiredBlocks.map( block => block.name ) ) - .concat( this.options.recommendedBlocks.map( block => block.name ) ); + .concat(this.options.requiredBlocks.map(block => block.name)) + .concat(this.options.recommendedBlocks.map(block => block.name)); } /** @@ -125,21 +125,21 @@ export default class InnerBlocks extends BlockInstruction { * * @returns The sidebar element to render. */ - sidebar( props: RenderEditProps ): ReactElement { - const currentBlock = getBlockByClientId( props.clientId ); - if ( ! currentBlock ) { + sidebar(props: RenderEditProps): ReactElement { + const currentBlock = getBlockByClientId(props.clientId); + if (!currentBlock) { return null; } - const elements: ReactElement[] = innerBlocksSidebar( currentBlock, this.options ); + const elements: ReactElement[] = innerBlocksSidebar(currentBlock, this.options); - if ( elements && elements.length === 0 ) { + if (elements && elements.length === 0) { return null; } return ( - { ...elements } + { ...elements} ); } @@ -151,11 +151,11 @@ export default class InnerBlocks extends BlockInstruction { * * @returns {BlockValidationResult} The validation result. */ - validate( blockInstance: BlockInstance ): BlockValidationResult { - const validation = new BlockValidationResult( blockInstance.clientId, blockInstance.name, BlockValidation.Unknown ); - validation.issues = validateInnerBlocks( blockInstance, this.options.requiredBlocks ); - return validateMany( validation ); + validate(blockInstance: BlockInstance): BlockValidationResult { + const validation = new BlockValidationResult(blockInstance.clientId, blockInstance.name, BlockValidation.Unknown); + validation.issues = validateInnerBlocks(blockInstance, this.options.requiredBlocks); + return validateMany(validation); } } -BlockInstruction.register( "inner-blocks", InnerBlocks ); +BlockInstruction.register("inner-blocks", InnerBlocks); diff --git a/packages/schema-blocks/src/instructions/blocks/RichText.ts b/packages/schema-blocks/src/instructions/blocks/RichText.ts index 31457061fa..1b427886fa 100644 --- a/packages/schema-blocks/src/instructions/blocks/RichText.ts +++ b/packages/schema-blocks/src/instructions/blocks/RichText.ts @@ -1,6 +1,6 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderSaveProps, RenderEditProps } from "../../core/blocks/BlockDefinition"; -import RichTextBase, { RichTextSaveProps, RichTextEditProps } from "./abstract/RichTextBase"; +import { RichTextBase, RichTextSaveProps, RichTextEditProps } from "./abstract/RichTextBase"; /** * RichText instruction. diff --git a/packages/schema-blocks/src/instructions/blocks/Select.tsx b/packages/schema-blocks/src/instructions/blocks/Select.tsx index 82a621b54f..e990bee1e6 100644 --- a/packages/schema-blocks/src/instructions/blocks/Select.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Select.tsx @@ -1,15 +1,14 @@ import { createElement, ReactElement, useCallback } from "@wordpress/element"; import { BlockConfiguration, BlockInstance } from "@wordpress/blocks"; import { SelectControl } from "@wordpress/components"; - -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; import { attributeExists, attributeNotEmpty } from "../../functions/validators"; /** * Select (a drop-down box) instruction. */ -export default class Select extends BlockInstruction { +export class Select extends BlockInstruction { public options: { /** * The attribute name the value selected in the select control should be saved as. @@ -48,14 +47,14 @@ export default class Select extends BlockInstruction { * * @returns {JSX.Element} The element to render. */ - save( props: RenderSaveProps ): ReactElement | string { + save(props: RenderSaveProps): ReactElement | string { const { label, name, hideLabelFromVision } = this.options; - const value = props.attributes[ name ] as string; + const value = props.attributes[name] as string; - return - { ! hideLabelFromVision && { label }: } - { this.label( value ) + " " } + return + {!hideLabelFromVision && {label}:} + {this.label(value) + " "} ; } @@ -66,9 +65,9 @@ export default class Select extends BlockInstruction { * * @returns The label of the selected option. */ - protected label( value: string ): string { - const foundOption = this.options.options.find( option => option.value === value ); - if ( foundOption ) { + protected label(value: string): string { + const foundOption = this.options.options.find(option => option.value === value); + if (foundOption) { return foundOption.label; } return null; @@ -81,13 +80,13 @@ export default class Select extends BlockInstruction { * * @returns {JSX.Element} The element to render. */ - edit( props: RenderEditProps ): ReactElement | string { + edit(props: RenderEditProps): ReactElement | string { const { label, options, hideLabelFromVision, className, defaultValue } = this.options; - const value = props.attributes[ this.options.name ] as string; + const value = props.attributes[this.options.name] as string; - if ( ! value ) { - props.setAttributes( { [ this.options.name ]: defaultValue || options[ 0 ].value } ); + if (!value) { + props.setAttributes({ [this.options.name]: defaultValue || options[0].value }); } /** @@ -97,19 +96,19 @@ export default class Select extends BlockInstruction { */ const onChange = useCallback( newValue => { - props.setAttributes( { [ this.options.name ]: newValue } ); + props.setAttributes({ [this.options.name]: newValue }); }, - [ props ], + [props], ); return ; } @@ -121,7 +120,7 @@ export default class Select extends BlockInstruction { configuration(): Partial { return { attributes: { - [ this.options.name ]: { + [this.options.name]: { required: this.options.required === true, }, }, @@ -135,14 +134,14 @@ export default class Select extends BlockInstruction { * * @returns `true` if the instruction block is valid, `false` if the block contains errors. */ - valid( blockInstance: BlockInstance ): boolean { - if ( this.options.required === true ) { - return attributeExists( blockInstance, this.options.name as string ) && - attributeNotEmpty( blockInstance, this.options.name as string ); + valid(blockInstance: BlockInstance): boolean { + if (this.options.required === true) { + return attributeExists(blockInstance, this.options.name as string) && + attributeNotEmpty(blockInstance, this.options.name as string); } - return attributeExists( blockInstance, this.options.name as string ); + return attributeExists(blockInstance, this.options.name as string); } } -BlockInstruction.register( "select", Select ); +BlockInstruction.register("select", Select); diff --git a/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx b/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx index 447cccbd45..50ce6cc947 100644 --- a/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx +++ b/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx @@ -1,4 +1,4 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { BlockConfiguration } from "@wordpress/blocks"; import { CheckboxControl } from "@wordpress/components"; import { createElement, useCallback } from "@wordpress/element"; @@ -20,7 +20,7 @@ class SidebarCheckbox extends BlockInstruction { * * @returns The sidebar element. */ - sidebar( props: RenderEditProps ): JSX.Element { + sidebar(props: RenderEditProps): JSX.Element { const { name, label, help } = this.options; /** @@ -30,16 +30,16 @@ class SidebarCheckbox extends BlockInstruction { */ const onChange = useCallback( newValue => { - props.setAttributes( { [ this.options.name ]: newValue } ); + props.setAttributes({ [this.options.name]: newValue }); }, - [ props ], + [props], ); return ; } @@ -50,9 +50,9 @@ class SidebarCheckbox extends BlockInstruction { * * @returns {JSX.Element} The element to render. */ - save( props: RenderSaveProps ): JSX.Element | string { - const isChecked = props.attributes[ this.options.name ]; - if ( isChecked && this.options.output ) { + save(props: RenderSaveProps): JSX.Element | string { + const isChecked = props.attributes[this.options.name]; + if (isChecked && this.options.output) { return this.options.output; } return null; @@ -66,7 +66,7 @@ class SidebarCheckbox extends BlockInstruction { configuration(): Partial { return { attributes: { - [ this.options.name ]: { + [this.options.name]: { type: "boolean", }, }, @@ -74,4 +74,4 @@ class SidebarCheckbox extends BlockInstruction { } } -BlockInstruction.register( "sidebar-checkbox", SidebarCheckbox ); +BlockInstruction.register("sidebar-checkbox", SidebarCheckbox); diff --git a/packages/schema-blocks/src/instructions/blocks/SidebarDuration.ts b/packages/schema-blocks/src/instructions/blocks/SidebarDuration.ts index ea79d2a3e7..b5ba119523 100644 --- a/packages/schema-blocks/src/instructions/blocks/SidebarDuration.ts +++ b/packages/schema-blocks/src/instructions/blocks/SidebarDuration.ts @@ -1,11 +1,10 @@ import moment from "moment"; import { createElement, Fragment } from "@wordpress/element"; import { TextControl } from "@wordpress/components"; - -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderSaveProps, RenderEditProps } from "../../core/blocks/BlockDefinition"; import { BlockEditProps, BlockConfiguration } from "@wordpress/blocks"; -import SidebarBase, { SidebarBaseOptions } from "./abstract/SidebarBase"; +import { SidebarBase, SidebarBaseOptions } from "./abstract/SidebarBase"; import { __ } from "@wordpress/i18n"; /** diff --git a/packages/schema-blocks/src/instructions/blocks/SidebarInput.ts b/packages/schema-blocks/src/instructions/blocks/SidebarInput.ts index 8cdef87859..344b1a2f54 100644 --- a/packages/schema-blocks/src/instructions/blocks/SidebarInput.ts +++ b/packages/schema-blocks/src/instructions/blocks/SidebarInput.ts @@ -1,10 +1,9 @@ import { createElement } from "@wordpress/element"; import { TextControl } from "@wordpress/components"; - -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderSaveProps, RenderEditProps } from "../../core/blocks/BlockDefinition"; import { BlockEditProps, BlockConfiguration } from "@wordpress/blocks"; -import SidebarBase, { SidebarBaseOptions } from "./abstract/SidebarBase"; +import { SidebarBase, SidebarBaseOptions } from "./abstract/SidebarBase"; /** * Sidebar input instruction. diff --git a/packages/schema-blocks/src/instructions/blocks/SidebarSelect.ts b/packages/schema-blocks/src/instructions/blocks/SidebarSelect.ts index 2798990f53..a75796f1f0 100644 --- a/packages/schema-blocks/src/instructions/blocks/SidebarSelect.ts +++ b/packages/schema-blocks/src/instructions/blocks/SidebarSelect.ts @@ -1,11 +1,10 @@ import { BlockEditProps, BlockConfiguration } from "@wordpress/blocks"; import { createElement } from "@wordpress/element"; import { SelectControl } from "@wordpress/components"; - -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; import { arrayOrObjectToOptions } from "../../functions/select"; -import SidebarBase, { SidebarBaseOptions } from "./abstract/SidebarBase"; +import { SidebarBase, SidebarBaseOptions } from "./abstract/SidebarBase"; /** * SidebarSelect instruction. @@ -31,6 +30,7 @@ class SidebarSelect extends SidebarBase { options: arrayOrObjectToOptions( this.options.options ), onChange: value => props.setAttributes( { [ this.options.name ]: value } ), key: i, + multiple: this.options.multiple || false, }; if ( this.options.multiple === true ) { diff --git a/packages/schema-blocks/src/instructions/blocks/TextInput.tsx b/packages/schema-blocks/src/instructions/blocks/TextInput.tsx index ad1d2061b3..53edc3c7e8 100644 --- a/packages/schema-blocks/src/instructions/blocks/TextInput.tsx +++ b/packages/schema-blocks/src/instructions/blocks/TextInput.tsx @@ -1,7 +1,6 @@ import { TextControl } from "@wordpress/components"; import { createElement } from "@wordpress/element"; - -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; import { useCallback } from "react"; import { BlockConfiguration } from "@wordpress/blocks"; @@ -25,26 +24,26 @@ export default class TextInput extends BlockInstruction { * * @returns The rendered instruction. */ - edit( props: RenderEditProps ): React.ReactElement | string { + edit(props: RenderEditProps): React.ReactElement | string { const { hideLabelFromVision, label, type, placeholder } = this.options; - const value = props.attributes[ this.options.name ] as string; + const value = props.attributes[this.options.name] as string; const onChange = useCallback( newValue => { - props.setAttributes( { [ this.options.name ]: newValue } ); + props.setAttributes({ [this.options.name]: newValue }); }, - [ props ], + [props], ); return ; } @@ -55,8 +54,8 @@ export default class TextInput extends BlockInstruction { * * @returns The element to render. */ - save( props: RenderSaveProps ): React.ReactElement | string { - return props.attributes[ this.options.name ] as string; + save(props: RenderSaveProps): React.ReactElement | string { + return props.attributes[this.options.name] as string; } /** @@ -67,7 +66,7 @@ export default class TextInput extends BlockInstruction { configuration(): Partial { return { attributes: { - [ this.options.name ]: { + [this.options.name]: { type: "string", }, }, @@ -75,5 +74,5 @@ export default class TextInput extends BlockInstruction { } } -BlockInstruction.register( "text-input", TextInput ); +BlockInstruction.register("text-input", TextInput); diff --git a/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts b/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts index 234096e5af..71a8d32cc0 100644 --- a/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts +++ b/packages/schema-blocks/src/instructions/blocks/VariableTagRichText.ts @@ -1,6 +1,6 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderSaveProps, RenderEditProps } from "../../core/blocks/BlockDefinition"; -import RichTextBase, { RichTextEditProps, RichTextSaveProps } from "./abstract/RichTextBase"; +import { RichTextBase, RichTextEditProps, RichTextSaveProps } from "./abstract/RichTextBase"; import { BlockConfiguration, BlockEditProps } from "@wordpress/blocks"; import { createElement } from "@wordpress/element"; import { SelectControl } from "@wordpress/components"; diff --git a/packages/schema-blocks/src/instructions/blocks/Variation.ts b/packages/schema-blocks/src/instructions/blocks/Variation.ts index 4ce99e2a1a..9f58e41c49 100644 --- a/packages/schema-blocks/src/instructions/blocks/Variation.ts +++ b/packages/schema-blocks/src/instructions/blocks/Variation.ts @@ -1,4 +1,4 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { ExtendedBlockConfiguration } from "../../type-adapters/ExtendedBlockConfiguration"; export interface VariationInterface { diff --git a/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx b/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx index 5d3188636f..2dc2210359 100644 --- a/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx +++ b/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx @@ -1,13 +1,12 @@ -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { select, useDispatch, useSelect } from "@wordpress/data"; import { RenderEditProps } from "../../core/blocks/BlockDefinition"; -import BlockLeaf from "../../core/blocks/BlockLeaf"; +import { BlockLeaf } from "../../core/blocks/BlockLeaf"; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore -- __experimentalBlockVariationPicker is defined in the package, though no type info is available. import { __experimentalBlockVariationPicker as ExperimentalBlockVariationPicker, useBlockProps } from "@wordpress/block-editor"; import { get, map } from "lodash"; import { BlockInstance, createBlock } from "@wordpress/blocks"; -// eslint-disable-next-line @typescript-eslint/no-unused-vars import { createElement } from "@wordpress/element"; import { VariationInterface } from "./Variation"; import { BlockValidationResult } from "../../core/validation"; @@ -27,6 +26,8 @@ function includesAVariation( blockInstance: BlockInstance ): boolean { * VariationPicker instruction. */ class VariationPicker extends BlockInstruction { + + // eslint-disable-next-line @typescript-eslint/no-unused-vars /** * Renders the variation picker if the block doesn't have any inner blocks. * Otherwise, renders null. diff --git a/packages/schema-blocks/src/instructions/blocks/abstract/RichTextBase.ts b/packages/schema-blocks/src/instructions/blocks/abstract/RichTextBase.ts index d73c3800bc..a3ed4606f4 100644 --- a/packages/schema-blocks/src/instructions/blocks/abstract/RichTextBase.ts +++ b/packages/schema-blocks/src/instructions/blocks/abstract/RichTextBase.ts @@ -1,9 +1,8 @@ import { createElement } from "@wordpress/element"; import { RichText as WordPressRichText } from "@wordpress/block-editor"; - -import BlockInstruction from "../../../core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../../core/blocks/BlockInstruction"; import { RenderSaveProps, RenderEditProps } from "../../../core/blocks/BlockDefinition"; -import BlockLeaf from "../../../core/blocks/BlockLeaf"; +import { BlockLeaf } from "../../../core/blocks/BlockLeaf"; import { BlockConfiguration } from "@wordpress/blocks"; export interface RichTextSaveProps extends WordPressRichText.ContentProps { @@ -17,7 +16,7 @@ export interface RichTextEditProps extends WordPressRichText.Props> = { "class" /** * BlockElementLeaf class. */ -export default class BlockElementLeaf extends BlockLeaf { +export class BlockElementLeaf extends BlockLeaf { public tag: string; public attributes: Record, BlockLeaf[]>; public children: BlockLeaf[]; diff --git a/packages/schema-blocks/src/leaves/blocks/BlockInstructionLeaf.ts b/packages/schema-blocks/src/leaves/blocks/BlockInstructionLeaf.ts index 325a5deb99..72f796cab4 100644 --- a/packages/schema-blocks/src/leaves/blocks/BlockInstructionLeaf.ts +++ b/packages/schema-blocks/src/leaves/blocks/BlockInstructionLeaf.ts @@ -1,11 +1,11 @@ -import BlockLeaf from "../../core/blocks/BlockLeaf"; -import BlockInstruction from "../../core/blocks/BlockInstruction"; +import { BlockLeaf } from "../../core/blocks/BlockLeaf"; +import { BlockInstruction } from "../../core/blocks/BlockInstruction"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; /** * BlockInstructionLeaf class. */ -export default class BlockInstructionLeaf extends BlockLeaf { +export class BlockInstructionLeaf extends BlockLeaf { public instruction: BlockInstruction; /** diff --git a/packages/schema-blocks/src/leaves/blocks/BlockRootLeaf.ts b/packages/schema-blocks/src/leaves/blocks/BlockRootLeaf.ts index b4bbd534d3..63db144631 100644 --- a/packages/schema-blocks/src/leaves/blocks/BlockRootLeaf.ts +++ b/packages/schema-blocks/src/leaves/blocks/BlockRootLeaf.ts @@ -1,11 +1,11 @@ -import BlockLeaf from "../../core/blocks/BlockLeaf"; +import { BlockLeaf } from "../../core/blocks/BlockLeaf"; import { createElement, Fragment } from "@wordpress/element"; import { RenderSaveProps, RenderEditProps } from "../../core/blocks/BlockDefinition"; /** * BlockRootLeaf class. */ -export default class BlockRootLeaf extends BlockLeaf { +export class BlockRootLeaf extends BlockLeaf { public children: BlockLeaf[]; /** diff --git a/packages/schema-blocks/src/leaves/blocks/BlockTextLeaf.ts b/packages/schema-blocks/src/leaves/blocks/BlockTextLeaf.ts index 2c7cc7857a..0b0b83750c 100644 --- a/packages/schema-blocks/src/leaves/blocks/BlockTextLeaf.ts +++ b/packages/schema-blocks/src/leaves/blocks/BlockTextLeaf.ts @@ -1,9 +1,9 @@ -import BlockLeaf from "../../core/blocks/BlockLeaf"; +import { BlockLeaf } from "../../core/blocks/BlockLeaf"; /** * BlockTextLeaf class. */ -export default class BlockTextLeaf extends BlockLeaf { +export class BlockTextLeaf extends BlockLeaf { public value: string; /** diff --git a/packages/schema-blocks/src/leaves/schema/SchemaArrayLeaf.ts b/packages/schema-blocks/src/leaves/schema/SchemaArrayLeaf.ts index 103b0f9438..b0d43598e3 100644 --- a/packages/schema-blocks/src/leaves/schema/SchemaArrayLeaf.ts +++ b/packages/schema-blocks/src/leaves/schema/SchemaArrayLeaf.ts @@ -1,11 +1,11 @@ -import SchemaLeaf from "../../core/schema/SchemaLeaf"; +import { SchemaLeaf } from "../../core/schema/SchemaLeaf"; import { SchemaArray } from "../../core/schema/SchemaDefinition"; import { BlockInstance } from "@wordpress/blocks"; /** * SchemaArrayLeaf class */ -export default class SchemaArrayLeaf extends SchemaLeaf { +export class SchemaArrayLeaf extends SchemaLeaf { public array: SchemaLeaf[]; /** diff --git a/packages/schema-blocks/src/leaves/schema/SchemaConstantLeaf.ts b/packages/schema-blocks/src/leaves/schema/SchemaConstantLeaf.ts index 1723671913..7208ee80e0 100644 --- a/packages/schema-blocks/src/leaves/schema/SchemaConstantLeaf.ts +++ b/packages/schema-blocks/src/leaves/schema/SchemaConstantLeaf.ts @@ -1,10 +1,10 @@ -import SchemaLeaf from "../../core/schema/SchemaLeaf"; +import { SchemaLeaf } from "../../core/schema/SchemaLeaf"; import { SchemaPrimitive } from "../../core/schema/SchemaDefinition"; /** * SchemaConstantLeaf class */ -export default class SchemaConstantLeaf extends SchemaLeaf { +export class SchemaConstantLeaf extends SchemaLeaf { public constant: SchemaPrimitive; /** diff --git a/packages/schema-blocks/src/leaves/schema/SchemaInstructionLeaf.ts b/packages/schema-blocks/src/leaves/schema/SchemaInstructionLeaf.ts index 56673bffe7..c767bdec13 100644 --- a/packages/schema-blocks/src/leaves/schema/SchemaInstructionLeaf.ts +++ b/packages/schema-blocks/src/leaves/schema/SchemaInstructionLeaf.ts @@ -1,12 +1,12 @@ -import SchemaLeaf from "../../core/schema/SchemaLeaf"; +import { SchemaLeaf } from "../../core/schema/SchemaLeaf"; import { SchemaValue } from "../../core/schema/SchemaDefinition"; -import SchemaInstruction from "../../core/schema/SchemaInstruction"; +import { SchemaInstruction } from "../../core/schema/SchemaInstruction"; import { BlockInstance } from "@wordpress/blocks"; /** * SchemaInstructionLeaf class */ -export default class SchemaInstructionLeaf extends SchemaLeaf { +export class SchemaInstructionLeaf extends SchemaLeaf { public instruction: SchemaInstruction; /** diff --git a/packages/schema-blocks/src/leaves/schema/SchemaInterpolatedLeaf.ts b/packages/schema-blocks/src/leaves/schema/SchemaInterpolatedLeaf.ts index 26ae536344..e2deb7e8fc 100644 --- a/packages/schema-blocks/src/leaves/schema/SchemaInterpolatedLeaf.ts +++ b/packages/schema-blocks/src/leaves/schema/SchemaInterpolatedLeaf.ts @@ -1,12 +1,12 @@ import { BlockInstance } from "@wordpress/blocks"; -import SchemaLeaf from "../../core/schema/SchemaLeaf"; -import SchemaInstruction from "../../core/schema/SchemaInstruction"; +import { SchemaLeaf } from "../../core/schema/SchemaLeaf"; +import { SchemaInstruction } from "../../core/schema/SchemaInstruction"; import logger from "../../functions/logger"; /** * SchemaInterpolatedLeaf class */ -export default class SchemaInterpolatedLeaf extends SchemaLeaf { +export class SchemaInterpolatedLeaf extends SchemaLeaf { public values: Array; /** diff --git a/packages/schema-blocks/src/leaves/schema/SchemaObjectLeaf.ts b/packages/schema-blocks/src/leaves/schema/SchemaObjectLeaf.ts index 9d558ba6fb..7a72e64ed7 100644 --- a/packages/schema-blocks/src/leaves/schema/SchemaObjectLeaf.ts +++ b/packages/schema-blocks/src/leaves/schema/SchemaObjectLeaf.ts @@ -1,13 +1,12 @@ import { mapValues } from "lodash"; import { BlockInstance } from "@wordpress/blocks"; - -import SchemaLeaf from "../../core/schema/SchemaLeaf"; +import { SchemaLeaf } from "../../core/schema/SchemaLeaf"; import { SchemaObject } from "../../core/schema/SchemaDefinition"; /** * SchemaObjectLeaf class */ -export default class SchemaObjectLeaf extends SchemaLeaf { +export class SchemaObjectLeaf extends SchemaLeaf { public object: Record; /** diff --git a/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts b/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts index 33b23d559a..45984630ce 100644 --- a/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts +++ b/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts @@ -2,7 +2,7 @@ import { BlockInstance, createBlock } from "@wordpress/blocks"; import * as renderer from "react-test-renderer"; import { mount } from "enzyme"; import { RequiredBlock } from "../../src/core/validation"; -import BlockSuggestions from "../../src/blocks/BlockSuggestions"; +import { BlockSuggestions } from "../../src/blocks/BlockSuggestions"; import { insertBlock } from "../../src/functions/innerBlocksHelper"; jest.mock( "@wordpress/blocks", () => { diff --git a/packages/schema-blocks/tests/core/Definition.test.ts b/packages/schema-blocks/tests/core/Definition.test.ts index 34c1fb4873..be4170868d 100644 --- a/packages/schema-blocks/tests/core/Definition.test.ts +++ b/packages/schema-blocks/tests/core/Definition.test.ts @@ -1,4 +1,4 @@ -import BlockInstruction from "../../src/core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../src/core/blocks/BlockInstruction"; import Definition from "../../src/core/Definition"; import { BlockValidation, BlockValidationResult } from "../../src/core/validation"; import { BlockConfiguration, BlockInstance } from "@wordpress/blocks"; diff --git a/packages/schema-blocks/tests/core/blocks/BlockInstruction.test.ts b/packages/schema-blocks/tests/core/blocks/BlockInstruction.test.ts index 08c563325a..7e763224db 100644 --- a/packages/schema-blocks/tests/core/blocks/BlockInstruction.test.ts +++ b/packages/schema-blocks/tests/core/blocks/BlockInstruction.test.ts @@ -1,5 +1,5 @@ import { BlockInstance } from "@wordpress/blocks"; -import BlockInstruction from "../../../src/core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../../src/core/blocks/BlockInstruction"; import { BlockValidation } from "../../../src/core/validation"; /** diff --git a/packages/schema-blocks/tests/functions/process.test.ts b/packages/schema-blocks/tests/functions/process.test.ts index f77f077df6..4288995c31 100644 --- a/packages/schema-blocks/tests/functions/process.test.ts +++ b/packages/schema-blocks/tests/functions/process.test.ts @@ -2,7 +2,7 @@ import "../matchMedia.mock"; import process, { processBlock } from "../../src/functions/process"; import BlockDefinition from "../../src/core/blocks/BlockDefinition"; -import BlockInstruction from "../../src/core/blocks/BlockInstruction"; +import { BlockInstruction } from "../../src/core/blocks/BlockInstruction"; import "../../src/instructions/blocks/InnerBlocks"; import InnerBlocks from "../../src/instructions/blocks/InnerBlocks"; import { RequiredBlock, RequiredBlockOption } from "../../src/core/validation"; diff --git a/packages/schema-blocks/yarn.lock b/packages/schema-blocks/yarn.lock index e199cd36b6..5b14b6e477 100644 --- a/packages/schema-blocks/yarn.lock +++ b/packages/schema-blocks/yarn.lock @@ -9,6 +9,13 @@ dependencies: "@babel/highlight" "^7.10.4" +"@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" @@ -39,6 +46,22 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.0.tgz#bd00d4394ca22f220390c56a0b5b85568ec1ec0c" + integrity sha512-zBZfgvBB/ywjx0Rgc2+BwoH/3H+lDtlgD4hBOpEv5LxRnYsm/753iRuLepqnYlynpjC3AdQxtxsoeHJoEEwOAw== + dependencies: + "@babel/types" "^7.13.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" + integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== + dependencies: + "@babel/types" "^7.12.13" + "@babel/helper-function-name@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" @@ -48,6 +71,15 @@ "@babel/template" "^7.12.7" "@babel/types" "^7.12.11" +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" + "@babel/helper-get-function-arity@^7.12.10": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" @@ -55,6 +87,13 @@ dependencies: "@babel/types" "^7.12.10" +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== + dependencies: + "@babel/types" "^7.12.13" + "@babel/helper-member-expression-to-functions@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" @@ -120,6 +159,13 @@ dependencies: "@babel/types" "^7.12.11" +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== + dependencies: + "@babel/types" "^7.12.13" + "@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" @@ -143,11 +189,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" + integrity sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== +"@babel/parser@^7.12.13", "@babel/parser@^7.13.0": + version "7.13.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.4.tgz#340211b0da94a351a6f10e63671fa727333d13ab" + integrity sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -232,6 +292,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/runtime-corejs2@7.0.0-beta.56": + version "7.0.0-beta.56" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.0.0-beta.56.tgz#6df5fbaa78e4bfdc22dfc5b36493ef238d55a027" + integrity sha512-LE2R7zTLAgaM54y/XdyAMzHERY1lv1cyQll3IvgN2VrTVxdlUBO7t/cHpc5iwqqHI85/VRNfGtQZdO2PecCIqg== + dependencies: + core-js "^2.5.7" + regenerator-runtime "^0.12.0" + "@babel/runtime-corejs3@^7.10.2": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.12.5.tgz#ffee91da0eb4c6dae080774e94ba606368e414f4" @@ -240,7 +308,14 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.8.7": + version "7.13.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.7.tgz#d494e39d198ee9ca04f4dcb76d25d9d7a1dc961a" + integrity sha512-h+ilqoX998mRVM5FtB5ijRuHUDVt5l3yfoOi2uh18Z/O3hvyaHQ39NpxVkCIG5yFs+mLq/ewFp8Bss6zmWv6ZA== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== @@ -256,6 +331,30 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" +"@babel/template@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" + integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.0" + "@babel/types" "^7.13.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": version "7.12.12" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" @@ -280,11 +379,27 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.12.13", "@babel/types@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" + integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@choojs/findup@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@choojs/findup/-/findup-0.2.1.tgz#ac13c59ae7be6e1da64de0779a0a7f03d75615a3" + integrity sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw== + dependencies: + commander "^2.15.1" + "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" @@ -293,7 +408,7 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@emotion/cache@^10.0.17", "@emotion/cache@^10.0.27": +"@emotion/cache@^10.0.17", "@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": version "10.0.29" resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== @@ -315,7 +430,7 @@ "@emotion/sheet" "0.9.3" "@emotion/utils" "0.11.2" -"@emotion/core@^10.0.22": +"@emotion/core@^10.0.22", "@emotion/core@^10.0.9", "@emotion/core@^10.1.1": version "10.1.1" resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.1.1.tgz#c956c1365f2f2481960064bcb8c4732e5fb612c3" integrity sha512-ZMLG6qpXR8x031NXD8HJqugy/AZSkAuMxxqB46pmAR7ze47MhNJ56cdoX243QPZdGctrdfo+s08yZTiwaUcRKA== @@ -327,7 +442,7 @@ "@emotion/sheet" "0.9.4" "@emotion/utils" "0.11.3" -"@emotion/css@^10.0.22", "@emotion/css@^10.0.27": +"@emotion/css@^10.0.22", "@emotion/css@^10.0.27", "@emotion/css@^10.0.9": version "10.0.27" resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== @@ -341,7 +456,7 @@ resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== -"@emotion/is-prop-valid@0.8.8": +"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.1", "@emotion/is-prop-valid@^0.8.2", "@emotion/is-prop-valid@^0.8.8": version "0.8.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== @@ -419,7 +534,7 @@ resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@0.7.5": +"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.0": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== @@ -455,6 +570,11 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@itsjonq/is@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@itsjonq/is/-/is-0.0.2.tgz#eaa8e1ba341181c9de051887bbcfbda1c9692451" + integrity sha512-P0Ug+chfjCV1JV8MUxAGPz0BM76yDlR76AIfPwRZ6mAJW56k6b9j0s2cIcEsEAu0gNj/RJD1STw777AQyBN3CQ== + "@jest/console@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" @@ -703,6 +823,28 @@ dependencies: "@babel/types" "^7.3.0" +"@types/cheerio@*": + version "0.22.24" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.24.tgz#fcee47074aa221ac0f31ede0c72c0800bf3bf0aa" + integrity sha512-iKXt/cwltGvN06Dd6zwQG1U35edPwId9lmcSeYfcxSNvvNg4vysnFB+iBQNjj06tSVV7MBj0GWMQ7dwb4Z+p8Q== + dependencies: + "@types/node" "*" + +"@types/enzyme-adapter-react-16@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.6.tgz#8aca7ae2fd6c7137d869b6616e696d21bb8b0cec" + integrity sha512-VonDkZ15jzqDWL8mPFIQnnLtjwebuL9YnDkqeCDYnB4IVgwUm0mwKkqhrxLL6mb05xm7qqa3IE95m8CZE9imCg== + dependencies: + "@types/enzyme" "*" + +"@types/enzyme@*", "@types/enzyme@^3.10.8": + version "3.10.8" + resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.8.tgz#ad7ac9d3af3de6fd0673773123fafbc63db50d42" + integrity sha512-vlOuzqsTHxog6PV79+tvOHFb6hq4QZKMq1lLD9MaWD1oec2lHTKndn76XOpSwCA0oFTaIbKVPrgM3k78Jjd16g== + dependencies: + "@types/cheerio" "*" + "@types/react" "*" + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -796,6 +938,13 @@ dependencies: "@types/react" "^16" +"@types/react-test-renderer@^17.0.0": + version "17.0.1" + resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz#3120f7d1c157fba9df0118dae20cb0297ee0e06b" + integrity sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw== + dependencies: + "@types/react" "*" + "@types/react@*": version "17.0.0" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.0.tgz#5af3eb7fad2807092f0046a1302b7823e27919b8" @@ -850,7 +999,7 @@ "@wordpress/element" "^2.14.0" react-autosize-textarea "^7.0.0" -"@types/wordpress__blocks@*", "@types/wordpress__blocks@^6.4.4": +"@types/wordpress__blocks@*", "@types/wordpress__blocks@^6.4.12": version "6.4.12" resolved "https://registry.yarnpkg.com/@types/wordpress__blocks/-/wordpress__blocks-6.4.12.tgz#1b20ac173076ed5532f9820c9ce77a18bb1dd25f" integrity sha512-ezQoo4NTfVY/KiCA8kwUXBJhgyoPq1HtfpRk6NXxQOwcDyFK0zN0knCvLn5YqVx1u8j3fSblbkW4RcFOK1xGIQ== @@ -899,6 +1048,13 @@ "@types/react" "*" redux "^4.0.1" +"@types/wordpress__date@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/wordpress__date/-/wordpress__date-3.3.1.tgz#0f1e19334c850f03fd2bdbb0f9ad7b8d8f070659" + integrity sha512-F/2b7AleZBXB+3l+/GQlcIg9bXUVih/nBf4A2aPsP7owUk++HBY0zXJZqUcolWx75lvNOm2P94rO0n1+077+WA== + dependencies: + moment "^2.24.0" + "@types/wordpress__editor@^9.4.1": version "9.4.5" resolved "https://registry.yarnpkg.com/@types/wordpress__editor/-/wordpress__editor-9.4.5.tgz#423bfc911312ad8c25f46d60d20ae0652936a201" @@ -1019,7 +1175,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@wordpress/a11y@^2.11.0", "@wordpress/a11y@^2.14.0", "@wordpress/a11y@^2.5.1", "@wordpress/a11y@^2.9.0": +"@wordpress/a11y@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@wordpress/a11y/-/a11y-1.1.3.tgz#8af0d5b8788798edf43a6cb3d271164cc6fc8869" + integrity sha512-tOR3iog3V3pFgxsCB6oeH9En+wAfdwge4XijCzGwqqd/Nk2hj/A8VAYefktXTTIQW+EfKXm4CN/c1oEhJZmIaA== + dependencies: + "@babel/runtime-corejs2" "7.0.0-beta.56" + "@wordpress/dom-ready" "^1.2.0" + +"@wordpress/a11y@^2.14.0", "@wordpress/a11y@^2.5.1": version "2.14.0" resolved "https://registry.yarnpkg.com/@wordpress/a11y/-/a11y-2.14.0.tgz#69221b956886e290c4a4e47b8645927849befc46" integrity sha512-+nYTgB4dOEBxADt+nTGVe2WkaOmLXPrUhuZgosH46IbQw8zbY9Bej91x6DEi/cj+GCn6BLOZZYTHyAxWHeeHwA== @@ -1028,6 +1192,15 @@ "@wordpress/dom-ready" "^2.12.0" "@wordpress/i18n" "^3.17.0" +"@wordpress/a11y@^2.14.3": + version "2.14.3" + resolved "https://registry.yarnpkg.com/@wordpress/a11y/-/a11y-2.14.3.tgz#9bd07b8ac4fc0c70f333f08f6776c2fd7074b39a" + integrity sha512-5K/wyI8c9VhW+3sk54SPOwLLBF4rkj8gqUCH4NWI4TgsFMwPcMcIOf0o+vwKG9CkRKqzMs29apzJEbkiQf4TqA== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/dom-ready" "^2.12.1" + "@wordpress/i18n" "^3.18.0" + "@wordpress/api-fetch@^3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@wordpress/api-fetch/-/api-fetch-3.21.0.tgz#ad69a30e1e7e30e5a46c967a43fbc2680e947bda" @@ -1037,6 +1210,15 @@ "@wordpress/i18n" "^3.17.0" "@wordpress/url" "^2.20.0" +"@wordpress/api-fetch@^3.21.5": + version "3.21.5" + resolved "https://registry.yarnpkg.com/@wordpress/api-fetch/-/api-fetch-3.21.5.tgz#a550e45be5c9b937a163650f894286c93fc6601d" + integrity sha512-x99C2h7UqxL/pWyZ5AR8ZbbC1na5KZyaQuZ4IR6DuRb6O8vwBcCV3jMesh1A4R+cNxFQZNORlYuNT/bcvdhl1A== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/i18n" "^3.18.0" + "@wordpress/url" "^2.21.2" + "@wordpress/autop@^2.11.0": version "2.11.0" resolved "https://registry.yarnpkg.com/@wordpress/autop/-/autop-2.11.0.tgz#deabf36a660d6c769588ba9be46ff99ce2ce223d" @@ -1044,56 +1226,26 @@ dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/blob@^2.12.0", "@wordpress/blob@^2.8.0": +"@wordpress/autop@^2.11.1": + version "2.11.1" + resolved "https://registry.yarnpkg.com/@wordpress/autop/-/autop-2.11.1.tgz#771cf6d9af2607eeaefe68a2996a42266c5f8fde" + integrity sha512-3TUAtcDneDqZeYF0AqGDm2RD/8Ed9eCWZwnMScx6zyvr6llmuhd4QKmGrnq02Rd//rqTSbsJEeFIT6FACxzJnA== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/blob@^2.12.0": version "2.12.0" resolved "https://registry.yarnpkg.com/@wordpress/blob/-/blob-2.12.0.tgz#8028b223fa2c230a762096fa638f8cca3f161644" integrity sha512-st/5z9MFgRszNGFy33JMtmhhhKVIIQNVVq3bsiiyAZrutM07UzdDgPgqkT6mm9ceCOlMHuCL61TKOz32bO4yDg== dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/block-editor@^3.3.0": - version "3.11.0" - resolved "https://registry.yarnpkg.com/@wordpress/block-editor/-/block-editor-3.11.0.tgz#59e8d22eba615fbec3edf169542e5411de1fad8c" - integrity sha512-gphabkOnignleIC/PwF7vVpcMMVfkasv1BzCqt7XpIXyujWgXvK8qb3Wb/+x7/+tcTLTl/JPstQ+7tfYkra1xw== - dependencies: - "@babel/runtime" "^7.9.2" - "@wordpress/a11y" "^2.9.0" - "@wordpress/blob" "^2.8.0" - "@wordpress/blocks" "^6.16.0" - "@wordpress/components" "^9.6.0" - "@wordpress/compose" "^3.15.0" - "@wordpress/data" "^4.18.0" - "@wordpress/deprecated" "^2.8.0" - "@wordpress/dom" "^2.9.0" - "@wordpress/element" "^2.14.0" - "@wordpress/hooks" "^2.8.0" - "@wordpress/html-entities" "^2.7.0" - "@wordpress/i18n" "^3.12.0" - "@wordpress/icons" "^2.0.0" - "@wordpress/is-shallow-equal" "^2.0.0" - "@wordpress/keyboard-shortcuts" "^1.5.0" - "@wordpress/keycodes" "^2.12.0" - "@wordpress/priority-queue" "^1.6.0" - "@wordpress/rich-text" "^3.16.0" - "@wordpress/shortcode" "^2.7.0" - "@wordpress/token-list" "^1.10.0" - "@wordpress/url" "^2.15.0" - "@wordpress/viewport" "^2.17.0" - "@wordpress/wordcount" "^2.8.0" - classnames "^2.2.5" - css-mediaquery "^0.1.2" - diff "^4.0.2" - dom-scroll-into-view "^1.2.1" - inherits "^2.0.3" - lodash "^4.17.15" - memize "^1.1.0" - react-autosize-textarea "^3.0.2" - react-spring "^8.0.19" - redux-multi "^0.1.12" - refx "^3.0.0" - rememo "^3.0.0" - tinycolor2 "^1.4.1" - traverse "^0.6.6" +"@wordpress/blob@^2.12.1": + version "2.12.1" + resolved "https://registry.yarnpkg.com/@wordpress/blob/-/blob-2.12.1.tgz#9e1ef0e57c135190d5136c747ae844f8d423e8c0" + integrity sha512-6undS4OASjzY8YyNVoJp1jToQJd6hgvFLgcKugN5escOLqwsVJKbhFnUWBBSmtWLmcLOyTBXWQDp5ZUB8p35MQ== + dependencies: + "@babel/runtime" "^7.12.5" "@wordpress/block-editor@^5.2.0": version "5.2.0" @@ -1139,6 +1291,50 @@ tinycolor2 "^1.4.1" traverse "^0.6.6" +"@wordpress/block-editor@^5.2.1": + version "5.2.8" + resolved "https://registry.yarnpkg.com/@wordpress/block-editor/-/block-editor-5.2.8.tgz#78ebdae57a45a0b2df17df9ab814eec2ac1d7e4b" + integrity sha512-5VB5JNd4Y2G3R476Xjvt6JpSWzY69g+wxG/Ut1MYovKqyEO4LF3uLaoOLoP7SxET1ast8yKFDmPaAQj2X11F2w== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/a11y" "^2.14.3" + "@wordpress/blob" "^2.12.1" + "@wordpress/blocks" "^7.0.4" + "@wordpress/components" "^12.0.7" + "@wordpress/compose" "^3.24.4" + "@wordpress/data" "^4.26.7" + "@wordpress/data-controls" "^1.20.7" + "@wordpress/deprecated" "^2.11.1" + "@wordpress/dom" "^2.16.2" + "@wordpress/element" "^2.19.1" + "@wordpress/hooks" "^2.11.1" + "@wordpress/html-entities" "^2.10.1" + "@wordpress/i18n" "^3.18.0" + "@wordpress/icons" "^2.9.1" + "@wordpress/is-shallow-equal" "^3.0.1" + "@wordpress/keyboard-shortcuts" "^1.13.7" + "@wordpress/keycodes" "^2.18.3" + "@wordpress/notices" "^2.12.7" + "@wordpress/rich-text" "^3.24.7" + "@wordpress/shortcode" "^2.12.1" + "@wordpress/token-list" "^1.14.1" + "@wordpress/url" "^2.21.2" + "@wordpress/wordcount" "^2.14.1" + classnames "^2.2.5" + css-mediaquery "^0.1.2" + diff "^4.0.2" + dom-scroll-into-view "^1.2.1" + inherits "^2.0.3" + lodash "^4.17.19" + memize "^1.1.0" + react-autosize-textarea "^7.1.0" + react-merge-refs "^1.0.0" + react-spring "^8.0.19" + redux-multi "^0.1.12" + rememo "^3.0.0" + tinycolor2 "^1.4.2" + traverse "^0.6.6" + "@wordpress/block-serialization-default-parser@^3.9.0": version "3.9.0" resolved "https://registry.yarnpkg.com/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-3.9.0.tgz#2fa934c49ec5b4ce99126e85a59c1f314f603bbb" @@ -1146,7 +1342,14 @@ dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/blocks@^6.16.0", "@wordpress/blocks@^6.25.0", "@wordpress/blocks@^6.8.0": +"@wordpress/block-serialization-default-parser@^3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-3.9.1.tgz#9aac03ca5d8a850e9bde44e894c91686bb7a064d" + integrity sha512-Pr0JGWAX0xS3cP7kVBZCrzfVqgeVU0Nz8+FuIXAtKEyCtgCO+bbmdfGaaRMnlSh6lO6r7MZ7wjPMqdfoVMKl6Q== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/blocks@^6.25.0", "@wordpress/blocks@^6.8.0": version "6.25.0" resolved "https://registry.yarnpkg.com/@wordpress/blocks/-/blocks-6.25.0.tgz#705a66831bfa08f1c3e40365dbc1bc754183e5e0" integrity sha512-ItGs8/AbgHxd8tiQJ3kDjd9xxSw/rm7IxGmWp7W73OXtatnz9n5szmDbeM+n96jBpKje0hPp3nNvKMt1lQ3FxA== @@ -1174,6 +1377,34 @@ tinycolor2 "^1.4.1" uuid "^8.3.0" +"@wordpress/blocks@^7.0.4": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@wordpress/blocks/-/blocks-7.0.4.tgz#20ea258f12077c55073a7f431232fa0095dd20cd" + integrity sha512-+ojuo+MZRjpbjNWiDtGz9uhcdKefxzcV9c+MArb3HyXUI1ch68+5Ac2SXO5yNsfZXuyfftmHMENArYSGlud86Q== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/autop" "^2.11.1" + "@wordpress/blob" "^2.12.1" + "@wordpress/block-serialization-default-parser" "^3.9.1" + "@wordpress/compose" "^3.24.4" + "@wordpress/data" "^4.26.7" + "@wordpress/deprecated" "^2.11.1" + "@wordpress/dom" "^2.16.2" + "@wordpress/element" "^2.19.1" + "@wordpress/hooks" "^2.11.1" + "@wordpress/html-entities" "^2.10.1" + "@wordpress/i18n" "^3.18.0" + "@wordpress/icons" "^2.9.1" + "@wordpress/is-shallow-equal" "^3.0.1" + "@wordpress/shortcode" "^2.12.1" + hpq "^1.3.0" + lodash "^4.17.19" + rememo "^3.0.0" + showdown "^1.9.1" + simple-html-tokenizer "^0.5.7" + tinycolor2 "^1.4.2" + uuid "^8.3.0" + "@wordpress/components@^12.0.0": version "12.0.0" resolved "https://registry.yarnpkg.com/@wordpress/components/-/components-12.0.0.tgz#fc96adfd372bb2335f6aae7c032af5462f0bddb2" @@ -1216,6 +1447,53 @@ tinycolor2 "^1.4.1" uuid "^8.3.0" +"@wordpress/components@^12.0.7": + version "12.0.7" + resolved "https://registry.yarnpkg.com/@wordpress/components/-/components-12.0.7.tgz#fe6091711842801f517953c4f013485657c5da95" + integrity sha512-v1Ek599SK8kEj5duuEwQzYCpwOhDdi7/wVPaWffss+1NQEpqb2h/I59tc08aQlSraJIaex3bMlw0vO91WF1Owg== + dependencies: + "@babel/runtime" "^7.12.5" + "@emotion/core" "^10.1.1" + "@emotion/css" "^10.0.22" + "@emotion/native" "^10.0.22" + "@emotion/styled" "^10.0.23" + "@wordpress/a11y" "^2.14.3" + "@wordpress/compose" "^3.24.4" + "@wordpress/date" "^3.13.1" + "@wordpress/deprecated" "^2.11.1" + "@wordpress/dom" "^2.16.2" + "@wordpress/element" "^2.19.1" + "@wordpress/hooks" "^2.11.1" + "@wordpress/i18n" "^3.18.0" + "@wordpress/icons" "^2.9.1" + "@wordpress/is-shallow-equal" "^3.0.1" + "@wordpress/keycodes" "^2.18.3" + "@wordpress/primitives" "^1.11.1" + "@wordpress/rich-text" "^3.24.7" + "@wordpress/warning" "^1.3.1" + "@wp-g2/components" "^0.0.140" + "@wp-g2/context" "^0.0.140" + "@wp-g2/styles" "^0.0.140" + "@wp-g2/utils" "^0.0.140" + classnames "^2.2.5" + dom-scroll-into-view "^1.2.1" + downshift "^6.0.15" + gradient-parser "^0.1.5" + highlight-words-core "^1.2.2" + lodash "^4.17.19" + memize "^1.1.0" + moment "^2.22.1" + re-resizable "^6.4.0" + react-dates "^17.1.1" + react-merge-refs "^1.0.0" + react-resize-aware "^3.1.0" + react-spring "^8.0.20" + react-use-gesture "^9.0.0" + reakit "^1.3.5" + rememo "^3.0.0" + tinycolor2 "^1.4.2" + uuid "^8.3.0" + "@wordpress/components@^8.4.0": version "8.5.0" resolved "https://registry.yarnpkg.com/@wordpress/components/-/components-8.5.0.tgz#6955d6503d50a882947d81bcf613c73acf5cdb21" @@ -1251,46 +1529,7 @@ tinycolor2 "^1.4.1" uuid "^3.3.2" -"@wordpress/components@^9.6.0": - version "9.9.0" - resolved "https://registry.yarnpkg.com/@wordpress/components/-/components-9.9.0.tgz#102124c8eba0f0c59980e12447ad82e28ca98c4e" - integrity sha512-EtDQ7sf7GuEMo+oWW7CDob0YrVynxR+t0FXGDZw3IP8msKAvVmsCD0DoSEOfX/DTWNaaHstaw6xE4+Tgk1XUWQ== - dependencies: - "@babel/runtime" "^7.9.2" - "@emotion/core" "^10.0.22" - "@emotion/css" "^10.0.22" - "@emotion/native" "^10.0.22" - "@emotion/styled" "^10.0.23" - "@wordpress/a11y" "^2.11.0" - "@wordpress/compose" "^3.18.0" - "@wordpress/deprecated" "^2.9.0" - "@wordpress/dom" "^2.12.0" - "@wordpress/element" "^2.15.0" - "@wordpress/hooks" "^2.9.0" - "@wordpress/i18n" "^3.14.0" - "@wordpress/icons" "^2.3.0" - "@wordpress/is-shallow-equal" "^2.1.0" - "@wordpress/keycodes" "^2.14.0" - "@wordpress/primitives" "^1.6.0" - "@wordpress/rich-text" "^3.19.0" - "@wordpress/warning" "^1.2.0" - classnames "^2.2.5" - dom-scroll-into-view "^1.2.1" - downshift "^4.0.5" - gradient-parser "^0.1.5" - lodash "^4.17.15" - memize "^1.1.0" - moment "^2.22.1" - re-resizable "^6.4.0" - react-dates "^17.1.1" - react-spring "^8.0.20" - react-use-gesture "^7.0.15" - reakit "^1.1.0" - rememo "^3.0.0" - tinycolor2 "^1.4.1" - uuid "^7.0.2" - -"@wordpress/compose@^3.11.0", "@wordpress/compose@^3.15.0", "@wordpress/compose@^3.18.0", "@wordpress/compose@^3.23.0", "@wordpress/compose@^3.9.0": +"@wordpress/compose@^3.11.0", "@wordpress/compose@^3.23.0", "@wordpress/compose@^3.9.0": version "3.23.0" resolved "https://registry.yarnpkg.com/@wordpress/compose/-/compose-3.23.0.tgz#576c1b883db25119e6f2db60f12c55da4ff674b1" integrity sha512-TRoFmQ3BvLEU7XyFLGKk1wzgzNAc3Iu0dG7nAy/QEs9muboINAx4BjWJRHMXPo8k7rJW+yQ3fgMO2SAHFYdMDQ== @@ -1310,6 +1549,26 @@ react-resize-aware "^3.0.1" use-memo-one "^1.1.1" +"@wordpress/compose@^3.24.4": + version "3.24.4" + resolved "https://registry.yarnpkg.com/@wordpress/compose/-/compose-3.24.4.tgz#e7362fde834675812f9cb806f3b3e13d029bb4d0" + integrity sha512-4HRo2GeemN9X3BlMqMfgB+MgLHhg9hWMI1sHFOPtTlDGfX/aUgKaov483fqUERZ8BYx79jV+k9zA7+o8u+N6hA== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/deprecated" "^2.11.1" + "@wordpress/dom" "^2.16.2" + "@wordpress/element" "^2.19.1" + "@wordpress/is-shallow-equal" "^3.0.1" + "@wordpress/keycodes" "^2.18.3" + "@wordpress/priority-queue" "^1.10.1" + clipboard "^2.0.1" + lodash "^4.17.19" + memize "^1.1.0" + mousetrap "^1.6.5" + react-merge-refs "^1.0.0" + react-resize-aware "^3.1.0" + use-memo-one "^1.1.1" + "@wordpress/core-data@^2.25.0": version "2.25.0" resolved "https://registry.yarnpkg.com/@wordpress/core-data/-/core-data-2.25.0.tgz#0ae3d9723195d0f4cfa5eb8ae1bc4a9cd5246618" @@ -1340,7 +1599,17 @@ "@wordpress/data" "^4.26.0" "@wordpress/deprecated" "^2.11.0" -"@wordpress/data@^4.14.0", "@wordpress/data@^4.18.0", "@wordpress/data@^4.26.0": +"@wordpress/data-controls@^1.20.7": + version "1.20.7" + resolved "https://registry.yarnpkg.com/@wordpress/data-controls/-/data-controls-1.20.7.tgz#4df4781ad748c2fda583dd433f7372fe26ee2c06" + integrity sha512-81/Cbk7PXAKOf0ButPqSDUdUntu5ltQVhvdfEBbFOwUxPYHiRNlP05mFuGHSqR2yJPcZToW7g1qFj2UyEK66SA== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/api-fetch" "^3.21.5" + "@wordpress/data" "^4.26.7" + "@wordpress/deprecated" "^2.11.1" + +"@wordpress/data@^4.14.0", "@wordpress/data@^4.26.0": version "4.26.0" resolved "https://registry.yarnpkg.com/@wordpress/data/-/data-4.26.0.tgz#29ad00a6071642e8776d7ff97e3d7853db9e9f7d" integrity sha512-z6ZSThv7BnLBudQgcBKT/4AC0kaTOXmZv8kNc8M/Ly6TEgHOQUkypHr5hGSwAaFWma3ttKXcjLH8rtt35yhFtQ== @@ -1360,6 +1629,26 @@ turbo-combine-reducers "^1.0.2" use-memo-one "^1.1.1" +"@wordpress/data@^4.26.7": + version "4.26.7" + resolved "https://registry.yarnpkg.com/@wordpress/data/-/data-4.26.7.tgz#a0d247ed1e3a8658fab6f25e41d548ab260a6101" + integrity sha512-SMeRMdunJv+5aAQQzq/lh+qG+cl2lgWxQdVneETM6ew9T5D+U9xOGQKpvnbOj4qy9pQL2W03qEbnehFYMNNYUA== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/compose" "^3.24.4" + "@wordpress/deprecated" "^2.11.1" + "@wordpress/element" "^2.19.1" + "@wordpress/is-shallow-equal" "^3.0.1" + "@wordpress/priority-queue" "^1.10.1" + "@wordpress/redux-routine" "^3.13.1" + equivalent-key-map "^0.2.2" + is-promise "^4.0.0" + lodash "^4.17.19" + memize "^1.1.0" + redux "^4.0.0" + turbo-combine-reducers "^1.0.2" + use-memo-one "^1.1.1" + "@wordpress/date@^3.13.0": version "3.13.0" resolved "https://registry.yarnpkg.com/@wordpress/date/-/date-3.13.0.tgz#47e601aadb1645f47b427fb6940de21767de4b42" @@ -1369,7 +1658,16 @@ moment "^2.22.1" moment-timezone "^0.5.31" -"@wordpress/deprecated@^2.11.0", "@wordpress/deprecated@^2.6.1", "@wordpress/deprecated@^2.8.0", "@wordpress/deprecated@^2.9.0": +"@wordpress/date@^3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@wordpress/date/-/date-3.13.1.tgz#a2a760c3dd51f2be51aaeb549a56b01d47fdc088" + integrity sha512-q1AQVF8OuVx2U3Srv/qvQxgoIe0nUCLu0vYtzxDIo0VjKSxDFrs90EdFlat3CfwOiqbVowAvQFRTxTlGEV8LoQ== + dependencies: + "@babel/runtime" "^7.12.5" + moment "^2.22.1" + moment-timezone "^0.5.31" + +"@wordpress/deprecated@^2.11.0", "@wordpress/deprecated@^2.6.1": version "2.11.0" resolved "https://registry.yarnpkg.com/@wordpress/deprecated/-/deprecated-2.11.0.tgz#d721c74c4d2292e996005c1a0e17b4330cf44b02" integrity sha512-2wfl5J8Y3hZeqkD9QAuXTRxPeXm6x5rxsz+CAFG+SS1E9FYZdB0FnRmm26iza7oDo0n917SuM+QDJ5R8P0UxlA== @@ -1377,6 +1675,21 @@ "@babel/runtime" "^7.12.5" "@wordpress/hooks" "^2.11.0" +"@wordpress/deprecated@^2.11.1": + version "2.11.1" + resolved "https://registry.yarnpkg.com/@wordpress/deprecated/-/deprecated-2.11.1.tgz#c7b3f10b568cb0aa2de27caa9b92d90154a3842c" + integrity sha512-ri5M3TSAhonRN9G67KDwu8AXthrxay/1lLwBVbRA+6Dpj6hpC4qUBxOP4Yx5VLYOJEJW2YJx3w3G3XFYiyqfFg== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/hooks" "^2.11.1" + +"@wordpress/dom-ready@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@wordpress/dom-ready/-/dom-ready-1.2.0.tgz#d95877eb6f929532ec971983b55e731babb78d9c" + integrity sha512-ioQuy28Z3jJWwIVUANYoy83GjGYdy5wS6cmm8kiVIcScu1gYKkw4lbKi2Le9ynfOzHkCDeatMU8g9TX91hgbPw== + dependencies: + "@babel/runtime-corejs2" "7.0.0-beta.56" + "@wordpress/dom-ready@^2.12.0": version "2.12.0" resolved "https://registry.yarnpkg.com/@wordpress/dom-ready/-/dom-ready-2.12.0.tgz#d7bd6ab8bc8c7ed6dc85903e14922493d4f70066" @@ -1384,7 +1697,14 @@ dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/dom@^2.12.0", "@wordpress/dom@^2.16.0", "@wordpress/dom@^2.6.0", "@wordpress/dom@^2.9.0": +"@wordpress/dom-ready@^2.12.1": + version "2.12.1" + resolved "https://registry.yarnpkg.com/@wordpress/dom-ready/-/dom-ready-2.12.1.tgz#9c641f2f84eb9fd19e7d08653dac767779f46100" + integrity sha512-nprG8FFPexRZ3t3m0ATNmpZQ2OJ524IoUivwL+YT9cpdKMQ3jjd/aNac3jhnTzeol+OlDnGUxft0V0ch/j3AaQ== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/dom@^2.16.0", "@wordpress/dom@^2.6.0": version "2.16.0" resolved "https://registry.yarnpkg.com/@wordpress/dom/-/dom-2.16.0.tgz#8bd9dda66f65ca0592eafe8b3e71baa26083004a" integrity sha512-IjXPfv9SuEkVbmxD4eaxn01zZmYUxp/4wrMcsHAHGym59k/bN6uJOQprrU/tTiSR4Zlf8Jmo22HWmuL654k8zg== @@ -1392,6 +1712,14 @@ "@babel/runtime" "^7.12.5" lodash "^4.17.19" +"@wordpress/dom@^2.16.2": + version "2.16.2" + resolved "https://registry.yarnpkg.com/@wordpress/dom/-/dom-2.16.2.tgz#d72cd40342e439d6cb7f15148473222594cbd497" + integrity sha512-w95LZR98sqmxkXm5RtynXi+/tIb5vw2gSBAWlbc0OHhZkC2DC9oy6QDR0pthUUYCa3NJht4KMyhBbwN/cePq8w== + dependencies: + "@babel/runtime" "^7.12.5" + lodash "^4.17.19" + "@wordpress/editor@^9.12.2": version "9.25.0" resolved "https://registry.yarnpkg.com/@wordpress/editor/-/editor-9.25.0.tgz#b019d280ff8297ce030e83844326b9000937c044" @@ -1433,7 +1761,7 @@ refx "^3.0.0" rememo "^3.0.0" -"@wordpress/element@*", "@wordpress/element@^2.10.0", "@wordpress/element@^2.14.0", "@wordpress/element@^2.15.0", "@wordpress/element@^2.19.0", "@wordpress/element@^2.9.0": +"@wordpress/element@*", "@wordpress/element@^2.10.0", "@wordpress/element@^2.14.0", "@wordpress/element@^2.19.0", "@wordpress/element@^2.9.0": version "2.19.0" resolved "https://registry.yarnpkg.com/@wordpress/element/-/element-2.19.0.tgz#25388abdafc1ecf9eabea22c174798afb39f663f" integrity sha512-t6GnllujeJU2N7RagWvPSSki+VnIxUQktg+cDAFDWC4XHCVoZKgs/0B48yeZSvd9T/t4ry0aILh+zeEJ+5DuHg== @@ -1446,6 +1774,19 @@ react "^16.13.1" react-dom "^16.13.1" +"@wordpress/element@^2.19.1": + version "2.19.1" + resolved "https://registry.yarnpkg.com/@wordpress/element/-/element-2.19.1.tgz#1f66a4cc39d45db3bc1b928e4aaf3885bdd29e32" + integrity sha512-mjgFYJzSCNlQBFXvVP806pJiKh9nSIB+NeAVUVwMOntek4aCdKk+t4aTU2cRmktZI2QRySmy+lyDrY2aVkwdyg== + dependencies: + "@babel/runtime" "^7.12.5" + "@types/react" "^16.9.0" + "@types/react-dom" "^16.9.0" + "@wordpress/escape-html" "^1.11.1" + lodash "^4.17.19" + react "^16.13.1" + react-dom "^16.13.1" + "@wordpress/escape-html@^1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@wordpress/escape-html/-/escape-html-1.11.0.tgz#6e33fc4ab6d36940f62be4f6e58959ee69d301d8" @@ -1453,21 +1794,42 @@ dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/hooks@^2.11.0", "@wordpress/hooks@^2.6.0", "@wordpress/hooks@^2.7.0", "@wordpress/hooks@^2.8.0", "@wordpress/hooks@^2.9.0": +"@wordpress/escape-html@^1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@wordpress/escape-html/-/escape-html-1.11.1.tgz#831b54ad20d9cf55f1b6d97adfdc0dd1ba024913" + integrity sha512-kthpdAijVY1tSGnSy1kuKM5+L/u7uxzSBNDusqKcfeSgczfHlfKwkkA82SMHzsSR/WicXDaWBfcEMqfb4PENiQ== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/hooks@^2.11.0", "@wordpress/hooks@^2.6.0", "@wordpress/hooks@^2.7.0": version "2.11.0" resolved "https://registry.yarnpkg.com/@wordpress/hooks/-/hooks-2.11.0.tgz#a919fbaad710c34162eeef91a0ceaea99362f4bb" integrity sha512-TbvCrHcMiSZoyiflegEqVS3DDytDTpkms+yLUaGN4sMvNdR/Mv5s0WnNKyM0T49lbmZYPWlbWhwJ1F6hr/FQDg== dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/html-entities@^2.10.0", "@wordpress/html-entities@^2.7.0": +"@wordpress/hooks@^2.11.1": + version "2.11.1" + resolved "https://registry.yarnpkg.com/@wordpress/hooks/-/hooks-2.11.1.tgz#86ad30cb20a8212f8c119894ff197574c84360e4" + integrity sha512-20nsvmLH5/iw9P6M7kiEBBQ7X7G3pEbqED/aN5dqkMCklDyar+OZqYBzdpGGsthXVYgomfNy6QQZWELkGJbcbw== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/html-entities@^2.10.0": version "2.10.0" resolved "https://registry.yarnpkg.com/@wordpress/html-entities/-/html-entities-2.10.0.tgz#7352c2e294605d37323439d2bd7c4b0c5bf32fd1" integrity sha512-D6lWrDOOiI/a/uYZpXMqL9ErT1Q4cauLWRZK/E4kaNOkhRxEUtWFiDD+00HdIkrT5QYPIuWos4h4Vw/HHM8Cgg== dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/i18n@*", "@wordpress/i18n@^3.12.0", "@wordpress/i18n@^3.14.0", "@wordpress/i18n@^3.17.0", "@wordpress/i18n@^3.7.0", "@wordpress/i18n@^3.9.0": +"@wordpress/html-entities@^2.10.1": + version "2.10.1" + resolved "https://registry.yarnpkg.com/@wordpress/html-entities/-/html-entities-2.10.1.tgz#20821fa88fb69a064d609c28a91623835dc51717" + integrity sha512-7nQY4ftrB1/kCDnoi3qyr/lQILWTGaNOEfAZ4ky7MvQvQ+7HTblfx0syrSy5P/rsEBaIjv69+nyaNeYI+9EbOQ== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/i18n@*", "@wordpress/i18n@^3.17.0", "@wordpress/i18n@^3.7.0", "@wordpress/i18n@^3.9.0": version "3.17.0" resolved "https://registry.yarnpkg.com/@wordpress/i18n/-/i18n-3.17.0.tgz#cecc2853a857c7b5570f74fc8547a1e7adfa9d18" integrity sha512-CTZ0oezI6BT5GlmiE4X0fzRY6i7bNsX6hxiROkGlpREY6q4s1pnwhM8ggLIaP18Bvkb/HDkUEENDrv3iwM/LIQ== @@ -1479,7 +1841,31 @@ sprintf-js "^1.1.1" tannin "^1.2.0" -"@wordpress/icons@^2.0.0", "@wordpress/icons@^2.3.0", "@wordpress/icons@^2.9.0": +"@wordpress/i18n@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@wordpress/i18n/-/i18n-1.2.3.tgz#b6607d0823828a858a648bcc5e3884ec9186820a" + integrity sha512-ABa8cr3cfzS6YocxeBjrc1iHxt28S0EglX0heGKHUtyAQZEg5K+AtWCEJiqhthWpqnXkDEp9ZIqzXkRGhhHuYw== + dependencies: + "@babel/runtime-corejs2" "7.0.0-beta.56" + gettext-parser "^1.3.1" + jed "^1.1.1" + lodash "^4.17.10" + memize "^1.0.5" + +"@wordpress/i18n@^3.18.0": + version "3.18.0" + resolved "https://registry.yarnpkg.com/@wordpress/i18n/-/i18n-3.18.0.tgz#08f0ff63ef26fb6d2ac50683f4ad90d3b64b3960" + integrity sha512-e1uFWhWYnT0B6s3hyy+xS0S3bwabrvkZA84xxitiIcQvGnZDUPntqv6M9+VrgJVlmd2MR2TbCGJ5xKFAVFr/gA== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/hooks" "^2.11.1" + gettext-parser "^1.3.1" + lodash "^4.17.19" + memize "^1.1.0" + sprintf-js "^1.1.1" + tannin "^1.2.0" + +"@wordpress/icons@^2.9.0": version "2.9.0" resolved "https://registry.yarnpkg.com/@wordpress/icons/-/icons-2.9.0.tgz#6a4fb2e0f6a67a836f79050bfcc32489b747b4eb" integrity sha512-eQJQIaCLdmdo8iTjequNkB14Fzx3qLRbjzZTk26fnggG41L+uGRblIeheZDcHY/jPKDd2H4+v9c9/0LqfjuPCA== @@ -1488,6 +1874,15 @@ "@wordpress/element" "^2.19.0" "@wordpress/primitives" "^1.11.0" +"@wordpress/icons@^2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@wordpress/icons/-/icons-2.9.1.tgz#932389e4d602748707321684eda08cb923e2b814" + integrity sha512-SLP3cJpnY2jNvoCpbBiaM37N3vZmfqqJsNspkRQXuPkLqBLu576GV+WX7l1Eqq6i12/nLUfHu3blhOAQrNtxYQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/element" "^2.19.1" + "@wordpress/primitives" "^1.11.1" + "@wordpress/is-shallow-equal@^1.6.1": version "1.8.0" resolved "https://registry.yarnpkg.com/@wordpress/is-shallow-equal/-/is-shallow-equal-1.8.0.tgz#905f31599df92201e4d7601a42a45d430eb666f2" @@ -1495,13 +1890,6 @@ dependencies: "@babel/runtime" "^7.8.3" -"@wordpress/is-shallow-equal@^2.0.0", "@wordpress/is-shallow-equal@^2.1.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@wordpress/is-shallow-equal/-/is-shallow-equal-2.3.0.tgz#226a1490e050d20281518114bb83c9c1a360407a" - integrity sha512-BUVCYZNDoT5fRJGoam/nI2Sn8QELu5z/pFe7UL+szFqQqNnMibdWqN/KoW/YO7WLJqqqTRhAs/Fa51g4oXRyHQ== - dependencies: - "@babel/runtime" "^7.11.2" - "@wordpress/is-shallow-equal@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@wordpress/is-shallow-equal/-/is-shallow-equal-3.0.0.tgz#15d797d30eb5bb2f6033cd22f38c3d11406f01ba" @@ -1509,7 +1897,14 @@ dependencies: "@babel/runtime" "^7.12.5" -"@wordpress/keyboard-shortcuts@^1.13.0", "@wordpress/keyboard-shortcuts@^1.5.0": +"@wordpress/is-shallow-equal@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@wordpress/is-shallow-equal/-/is-shallow-equal-3.0.1.tgz#71ac9fa1ad4ac78e03ab343e9c96a9f37205b66a" + integrity sha512-enrOrfArOImeqT207i3ayZ0yPCnc/LvvvSPEd4aSPNV27zC7sTor/ksoN2NNyrGaC9P2pZ6IlkMEr+BCN02OXw== + dependencies: + "@babel/runtime" "^7.12.5" + +"@wordpress/keyboard-shortcuts@^1.13.0": version "1.13.0" resolved "https://registry.yarnpkg.com/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-1.13.0.tgz#0323935df764885c093064ed9c83a2b4a0fef83b" integrity sha512-Fj/TS/wYHX4y+ShbQLeQL1U6x1vxj7+8EZSwGwyg/UaALf/Z7xIEBqcrbErAO7lQA8zDhOynD8XA0A1zHDxaPQ== @@ -1522,7 +1917,20 @@ lodash "^4.17.19" rememo "^3.0.0" -"@wordpress/keycodes@^2.12.0", "@wordpress/keycodes@^2.14.0", "@wordpress/keycodes@^2.17.0", "@wordpress/keycodes@^2.7.0": +"@wordpress/keyboard-shortcuts@^1.13.7": + version "1.13.7" + resolved "https://registry.yarnpkg.com/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-1.13.7.tgz#1a906068c67751359afbe56bbf431cb2cda1baa5" + integrity sha512-asnqWiLjhuvKUr7lKj7Ve2iqYJDdnYTaumQKmuhXPUqtEPKvLa5iK/jZZQ1hlEZ25pwo1G7Bk3e93CfD0/0sFQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/compose" "^3.24.4" + "@wordpress/data" "^4.26.7" + "@wordpress/element" "^2.19.1" + "@wordpress/keycodes" "^2.18.3" + lodash "^4.17.19" + rememo "^3.0.0" + +"@wordpress/keycodes@^2.17.0", "@wordpress/keycodes@^2.7.0": version "2.17.0" resolved "https://registry.yarnpkg.com/@wordpress/keycodes/-/keycodes-2.17.0.tgz#210c9f02cbd7af438422be24ba9f82558c4ebea1" integrity sha512-tV8Cjb1E0kXPTTQnqQu0VZZSncRB8d6KVckOJqwk/uSC7+RjLhGnQU+rUft7AJDaZgRH01xLOJD79mDj5/1FLA== @@ -1531,6 +1939,15 @@ "@wordpress/i18n" "^3.17.0" lodash "^4.17.19" +"@wordpress/keycodes@^2.18.3": + version "2.18.3" + resolved "https://registry.yarnpkg.com/@wordpress/keycodes/-/keycodes-2.18.3.tgz#116ea96bcf507daff7d6ccb4ef3dcd508eb2d61e" + integrity sha512-Lenyw+K2KgiqddBv5fDCh2JRfXFrONWNvPfv1DKXzHXTvBSI0JkU1RVP5WZTcVuEtctCZWL5JbhrkG2I26w68g== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/i18n" "^3.18.0" + lodash "^4.17.19" + "@wordpress/media-utils@^1.19.0": version "1.19.0" resolved "https://registry.yarnpkg.com/@wordpress/media-utils/-/media-utils-1.19.0.tgz#ee062de798787944eb1f39815463df532344a05a" @@ -1553,7 +1970,17 @@ "@wordpress/data" "^4.26.0" lodash "^4.17.19" -"@wordpress/primitives@^1.11.0", "@wordpress/primitives@^1.6.0": +"@wordpress/notices@^2.12.7": + version "2.12.7" + resolved "https://registry.yarnpkg.com/@wordpress/notices/-/notices-2.12.7.tgz#1c8732a14dca579e891c35792735576314bb8ce8" + integrity sha512-O8Y78L0+vzjJOKTaKoT1H4Mp78CMwzip7J7DWkvwgZfreahqVibnh8yEbP0rVwaYXmOhP9jzjJ2A46Ai3/VGfQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/a11y" "^2.14.3" + "@wordpress/data" "^4.26.7" + lodash "^4.17.19" + +"@wordpress/primitives@^1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@wordpress/primitives/-/primitives-1.11.0.tgz#f117152a8f637142cf6adbcd0326092189fb8fa6" integrity sha512-RjWKYITSBi4RaQchmswI1qTF3n3M3QoGFoItRSnCajOHyNti4K1chPaBpr52ithnentfblF3zquR3J6ZnAkPjA== @@ -1562,13 +1989,29 @@ "@wordpress/element" "^2.19.0" classnames "^2.2.5" -"@wordpress/priority-queue@^1.10.0", "@wordpress/priority-queue@^1.6.0": +"@wordpress/primitives@^1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@wordpress/primitives/-/primitives-1.11.1.tgz#24eb34ab216a4fe1d40bc2210ecd38bb597f66ba" + integrity sha512-xYxcQ0JGnYjaSo1oXCapFl69jBjOPT8iuLf9RC1TulmZFnQsvqIv7Mu9VW9YPTg4gMXAavLD2EB+fqXdI1NNhQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/element" "^2.19.1" + classnames "^2.2.5" + +"@wordpress/priority-queue@^1.10.0": version "1.10.0" resolved "https://registry.yarnpkg.com/@wordpress/priority-queue/-/priority-queue-1.10.0.tgz#ea64e661fdd49bb773e906d22e536a46d0e909ad" integrity sha512-3ejPX/6ECUN1FAqbL1BvqP77aRrGx5C41HeNZZT9ZzErJWVGfE0NRFfCt7knT0/LumdERApHkswBp3DQ5J18RQ== dependencies: "@babel/runtime" "^7.12.5" +"@wordpress/priority-queue@^1.10.1": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@wordpress/priority-queue/-/priority-queue-1.10.1.tgz#626d48b50339a990b75c9bca4e48967d3d96f243" + integrity sha512-O7W4ktSW6egVtW4fvyUnnetNODbtjuKj6G7AyXUPNyrmKBma0g/nGIRed3iA7rOfLyjzyzh7ZkP0sSENXKAvQQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/redux-routine@^3.13.0": version "3.13.0" resolved "https://registry.yarnpkg.com/@wordpress/redux-routine/-/redux-routine-3.13.0.tgz#e883e7663724aabac912b2095a24c147711c7cd8" @@ -1579,6 +2022,16 @@ lodash "^4.17.19" rungen "^0.3.2" +"@wordpress/redux-routine@^3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@wordpress/redux-routine/-/redux-routine-3.13.1.tgz#2f58f63f65b71e527278c46f3651003a852dc6f8" + integrity sha512-4VPeA27BEmmiLW14EL0fZunxbiUrMKqnrbXH7KGQU6YOmarKWCw1efgD+jqpatW+3iUj38Fx4obnlVs40GcXsg== + dependencies: + "@babel/runtime" "^7.12.5" + is-promise "^4.0.0" + lodash "^4.17.19" + rungen "^0.3.2" + "@wordpress/reusable-blocks@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@wordpress/reusable-blocks/-/reusable-blocks-1.1.0.tgz#c17c78c210a75f646c279b88df586f287c851654" @@ -1597,7 +2050,7 @@ "@wordpress/url" "^2.20.0" lodash "^4.17.19" -"@wordpress/rich-text@^3.16.0", "@wordpress/rich-text@^3.19.0", "@wordpress/rich-text@^3.24.0", "@wordpress/rich-text@^3.9.0": +"@wordpress/rich-text@^3.24.0", "@wordpress/rich-text@^3.9.0": version "3.24.0" resolved "https://registry.yarnpkg.com/@wordpress/rich-text/-/rich-text-3.24.0.tgz#9a9652e908116ba3dcc04956a02de9494b6dc99c" integrity sha512-XKoRcUuUwqC4cnJM/rgamGfecAcYM6I6p2eMBTs826jgkgYZRoorMuxMkF9fyV4hbyUHhRpEvvc60KLek4kPlA== @@ -1616,6 +2069,25 @@ memize "^1.1.0" rememo "^3.0.0" +"@wordpress/rich-text@^3.24.7": + version "3.24.7" + resolved "https://registry.yarnpkg.com/@wordpress/rich-text/-/rich-text-3.24.7.tgz#d880555e49dea27661ae3dd1aeab60ce11d140de" + integrity sha512-+TfPPkHlevr34hmVnfvLjJ7GBGcb2RRFeO3ILr/efh67qKC9KdK/+1kbG99XdMSv3Q1CNLTskr8WgBwInMSjdw== + dependencies: + "@babel/runtime" "^7.12.5" + "@wordpress/compose" "^3.24.4" + "@wordpress/data" "^4.26.7" + "@wordpress/deprecated" "^2.11.1" + "@wordpress/dom" "^2.16.2" + "@wordpress/element" "^2.19.1" + "@wordpress/escape-html" "^1.11.1" + "@wordpress/is-shallow-equal" "^3.0.1" + "@wordpress/keycodes" "^2.18.3" + classnames "^2.2.5" + lodash "^4.17.19" + memize "^1.1.0" + rememo "^3.0.0" + "@wordpress/server-side-render@^1.20.0": version "1.20.0" resolved "https://registry.yarnpkg.com/@wordpress/server-side-render/-/server-side-render-1.20.0.tgz#68dbdb20b0298f27681edf889e5a37bf8ff82942" @@ -1631,7 +2103,7 @@ "@wordpress/url" "^2.20.0" lodash "^4.17.19" -"@wordpress/shortcode@^2.12.0", "@wordpress/shortcode@^2.7.0": +"@wordpress/shortcode@^2.12.0": version "2.12.0" resolved "https://registry.yarnpkg.com/@wordpress/shortcode/-/shortcode-2.12.0.tgz#c377f7fe3d4709e60af3b048ae229f19cdb6253b" integrity sha512-ZIFcbyRkogYOIeiMDr7X20VObTgwu9FuneBK6iUZn1Ic0EzOuZ8eOmMIo5M03+8+aQIVJxc/2kS1XGBj3N8kPQ== @@ -1640,7 +2112,16 @@ lodash "^4.17.19" memize "^1.1.0" -"@wordpress/token-list@^1.10.0", "@wordpress/token-list@^1.14.0": +"@wordpress/shortcode@^2.12.1": + version "2.12.1" + resolved "https://registry.yarnpkg.com/@wordpress/shortcode/-/shortcode-2.12.1.tgz#28de476ac6249c674f82acede946bede1a27a79c" + integrity sha512-87oQbaDKXRRU8Tdn5/O7ykK5eTkmTs1cg3DYtoNQImpA9UWUJtC27LYia1IRzc8CvWh1yz3vNRYWlHmaolkdFQ== + dependencies: + "@babel/runtime" "^7.12.5" + lodash "^4.17.19" + memize "^1.1.0" + +"@wordpress/token-list@^1.14.0": version "1.14.0" resolved "https://registry.yarnpkg.com/@wordpress/token-list/-/token-list-1.14.0.tgz#93298d637d561469c80696de545e0ca7e5b7f468" integrity sha512-HkKn8LpzmC3smGvDKsQiiEDwvwVg/I+doZdIPDDaxPF4MZib8TJgJSu1LGqqc3h6a1tIPcp0CggD+RUTnK7t5g== @@ -1648,7 +2129,15 @@ "@babel/runtime" "^7.12.5" lodash "^4.17.19" -"@wordpress/url@^2.15.0", "@wordpress/url@^2.20.0": +"@wordpress/token-list@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@wordpress/token-list/-/token-list-1.14.1.tgz#2285e547c46e181cb51478b261ec862bed570139" + integrity sha512-XlSNeRtlkvF43Dkh+GFTy7tBaYFCAgWAwSJEe2F9SvURjjU0HiXnuwTrzVt5saG5EITurz+HC1+xnJNt51HUIA== + dependencies: + "@babel/runtime" "^7.12.5" + lodash "^4.17.19" + +"@wordpress/url@^2.20.0": version "2.20.0" resolved "https://registry.yarnpkg.com/@wordpress/url/-/url-2.20.0.tgz#d9ecb0000c1974672f897e4ca05dc4c8937c997c" integrity sha512-7AczODTQEgDtSWdhNhGA+mTCzVNRIEDjmTYtEdM/wR+a/j1CBuwV8h6eSCJ5RIiuneWO9ljhqObzWVl0Bwk2Vw== @@ -1657,22 +2146,26 @@ lodash "^4.17.19" react-native-url-polyfill "^1.1.2" -"@wordpress/viewport@^2.17.0": - version "2.25.0" - resolved "https://registry.yarnpkg.com/@wordpress/viewport/-/viewport-2.25.0.tgz#ed8c17058c821daf036c9c24a105999d07597c31" - integrity sha512-LG18IAIzZVm4M4+JsWRYjd5cc7r0/3ibIsorKNQBuBmulMP/NcF9FzJneJRL4Um4uYe6+PPq0mBB5ImC90Y3fQ== +"@wordpress/url@^2.21.2": + version "2.21.2" + resolved "https://registry.yarnpkg.com/@wordpress/url/-/url-2.21.2.tgz#7689e7e633aeab74fbf6c16e4d051b2fd7872a2f" + integrity sha512-bLHg4pTo/9mQUkK1s1MU/Sjgnzfy2AkPvPn4ObGA8/4CFkMsDhQGAVhhw5YuezcxvaJkBiKJ+BxgFJ1QKksF6w== dependencies: "@babel/runtime" "^7.12.5" - "@wordpress/compose" "^3.23.0" - "@wordpress/data" "^4.26.0" lodash "^4.17.19" + react-native-url-polyfill "^1.1.2" -"@wordpress/warning@^1.2.0", "@wordpress/warning@^1.3.0": +"@wordpress/warning@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@wordpress/warning/-/warning-1.3.0.tgz#9254f77b0cc79b1b356c93d2b726be78d82588ad" integrity sha512-xwvgwqugc3zQawSPMMA09knAgap7IGgp0PxTXpFqizGFRIohoXFWERnPBZT0VsSCovqYS0ADcH+ZZgQ+BKAzLA== -"@wordpress/wordcount@^2.14.0", "@wordpress/wordcount@^2.8.0": +"@wordpress/warning@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@wordpress/warning/-/warning-1.3.1.tgz#67ff34034277249ffc9d360c88e77824f7be5615" + integrity sha512-MdZ/4k2KmdH4h71KfKUXPCm8eR4fnD1t9W70vIX5+MsdiA7uplkwcDWxybITYVOmVT0Zk4F5CJ29AcsJAvtgZg== + +"@wordpress/wordcount@^2.14.0": version "2.14.0" resolved "https://registry.yarnpkg.com/@wordpress/wordcount/-/wordcount-2.14.0.tgz#434cf0007bf6c6ab5bffa216b8242b8b97659ebf" integrity sha512-fB41ITyEJ7UWgze9GA3nMYT4YbEdOZDDjo2Np1caS7yE8OoecRXirubZ3E1M4cj2KTOIRU3ClDnhYBM7VArUQA== @@ -1680,6 +2173,120 @@ "@babel/runtime" "^7.12.5" lodash "^4.17.19" +"@wordpress/wordcount@^2.14.1": + version "2.14.1" + resolved "https://registry.yarnpkg.com/@wordpress/wordcount/-/wordcount-2.14.1.tgz#b123367ed9e9725f701b01e677feba80e323bbfc" + integrity sha512-Ns6880R5lBXsdz8TEjnSyKyAAOdGVnqRQJdteUGVPftXDMRCQclLwRgLAE+SBVsorQk1L56KuiQztbgTuFqBaw== + dependencies: + "@babel/runtime" "^7.12.5" + lodash "^4.17.19" + +"@wp-g2/components@^0.0.140": + version "0.0.140" + resolved "https://registry.yarnpkg.com/@wp-g2/components/-/components-0.0.140.tgz#5160c6ccbdae8685c8b93d8e7b5401b9208c9195" + integrity sha512-bychuhZ3wPSB457CHYcogoPQPlP/eUA9GoTo0Fv0rj7f44Gr9XlPoqVT+GQa3CmPnvSCAl1sjoe75Vkaoo/O1w== + dependencies: + "@popperjs/core" "^2.5.4" + "@wp-g2/context" "^0.0.140" + "@wp-g2/styles" "^0.0.140" + "@wp-g2/utils" "^0.0.140" + csstype "^3.0.3" + downshift "^6.0.15" + framer-motion "^2.1.0" + highlight-words-core "^1.2.2" + history "^4.9.0" + lodash "^4.17.19" + path-to-regexp "^1.7.0" + react-colorful "4.4.4" + react-textarea-autosize "^8.2.0" + react-use-gesture "^9.0.0" + reakit "1.1.0" + +"@wp-g2/context@^0.0.140": + version "0.0.140" + resolved "https://registry.yarnpkg.com/@wp-g2/context/-/context-0.0.140.tgz#a59b3b4761d134a65a73575ae610066141a94bb5" + integrity sha512-z32fxZ2tCVmYQC+wyyziyrhEvWBPFBQfUhUHF85JmTUPzQQeEPiLC3rgDAT0fUTFlJHinPJQq6871RDqFSwCUA== + dependencies: + "@wp-g2/styles" "^0.0.140" + "@wp-g2/utils" "^0.0.140" + lodash "^4.17.19" + +"@wp-g2/create-styles@^0.0.140": + version "0.0.140" + resolved "https://registry.yarnpkg.com/@wp-g2/create-styles/-/create-styles-0.0.140.tgz#40d061297319772284d0326ecaa853e4688fad8c" + integrity sha512-/60DxWjCAhsoYOqY7aiHVbkTAF+L6qZIyHyH50oNs9FTVkcRLHQFSC0kHgAam+Z9K3eImQ7hM52wfBDqae0q2Q== + dependencies: + "@emotion/core" "^10.1.1" + "@emotion/is-prop-valid" "^0.8.8" + "@wp-g2/utils" "^0.0.140" + create-emotion "^10.0.27" + emotion "^10.0.27" + emotion-theming "^10.0.27" + lodash "^4.17.19" + mitt "^2.1.0" + rtlcss "^2.6.2" + styled-griddie "^0.1.3" + +"@wp-g2/styles@^0.0.140": + version "0.0.140" + resolved "https://registry.yarnpkg.com/@wp-g2/styles/-/styles-0.0.140.tgz#638e375b691d35362219fbd688685d1f82c11f61" + integrity sha512-wAvtqQOqX2zYpfEdVK4l4abH/hUUgw/+8+E5PvPgrsvqFg8IehNSksnjNF5/IloLRGAH70d8ytjMuMnUK8PVYA== + dependencies: + "@wp-g2/create-styles" "^0.0.140" + "@wp-g2/utils" "^0.0.140" + +"@wp-g2/utils@^0.0.140": + version "0.0.140" + resolved "https://registry.yarnpkg.com/@wp-g2/utils/-/utils-0.0.140.tgz#daaf0f9869e8e7a1c2d9f11432ce4fbe5e7b5bc4" + integrity sha512-a4uYi/XQEDrOAIO3JUQ+L/oeSkgp+08pSy41xxQ1nIRHs7X+Du84X2EFQrvZfGBRuXuVlVuUIlN2e0IE8yUZKw== + dependencies: + copy-to-clipboard "^3.3.1" + create-emotion "^10.0.27" + deepmerge "^4.2.2" + fast-deep-equal "^3.1.3" + hoist-non-react-statics "^3.3.2" + json2mq "^0.2.0" + lodash "^4.17.19" + memize "^1.1.0" + react-merge-refs "^1.1.0" + react-resize-aware "^3.1.0" + reakit-warning "^0.5.5" + tinycolor2 "^1.4.2" + use-enhanced-state "^0.0.13" + use-isomorphic-layout-effect "^1.0.0" + +"@yoast/components@^2.15.0": + version "2.15.0" + resolved "https://registry.yarnpkg.com/@yoast/components/-/components-2.15.0.tgz#3c0ca0bf191a7d37ecdcddb50baf079506a84f47" + integrity sha512-4MJarBS1yIsVJQ0TU2zdAPhm5afcrRUpiH+ZpGYyDwmT7mBPwcj0m2Rc8EEB1YptHUOJoi4V2zL2z8p1g44gpA== + dependencies: + "@wordpress/a11y" "^1.1.3" + "@wordpress/i18n" "^1.2.3" + "@yoast/helpers" "^0.15.0" + "@yoast/style-guide" "^0.13.0" + interpolate-components "^1.1.1" + lodash "^4.17.11" + prop-types "^15.7.2" + react-modal "^3.8.1" + react-select "^3.1.0" + react-tabs "^2.3.0" + styled-components "^4.2.0" + +"@yoast/helpers@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@yoast/helpers/-/helpers-0.15.0.tgz#8111d41fa783932b49c579d44ceeb33921c63153" + integrity sha512-ofPqEmoMQEk1OZdnQITy9T11+7qaupl6WEvdhnETLmZzAoCNj2+C3InQap48oArlpxPT4Qn1LnksOKf0GsKDAA== + dependencies: + "@wordpress/i18n" "^1.2.3" + prop-types "^15.7.2" + styled-components "^2.4.1" + whatwg-fetch "1.1.1" + +"@yoast/style-guide@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@yoast/style-guide/-/style-guide-0.13.0.tgz#69e41ddacc62e378fbc98df9aebe1d63115ea047" + integrity sha512-6FpEKT/So8mixs+3ZuK9KJy0grsI0GKNLesGsyKEgx5ObRd9/vW7JLHiCJ+/DFgTKNQdzNRmcxrSTkSnV4DxLA== + abab@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" @@ -1853,6 +2460,11 @@ array.prototype.flatmap@^1.2.3: es-abstract "^1.18.0-next.1" function-bind "^1.1.1" +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" @@ -1890,7 +2502,7 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autosize@^4.0.0, autosize@^4.0.2: +autosize@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/autosize/-/autosize-4.0.2.tgz#073cfd07c8bf45da4b9fd153437f5bafbba1e4c9" integrity sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA== @@ -1975,6 +2587,16 @@ babel-plugin-macros@^2.0.0: cosmiconfig "^6.0.0" resolve "^1.12.0" +"babel-plugin-styled-components@>= 1": + version "1.12.0" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz#1dec1676512177de6b827211e9eda5a30db4f9b9" + integrity sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.11" + babel-plugin-syntax-jsx@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -2101,7 +2723,7 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer@^5.4.3: +buffer@^5.0.3, buffer@^5.4.3: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -2164,7 +2786,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.1.0: +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2211,7 +2833,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@^2.2.5: +classnames@^2.2.0, classnames@^2.2.5: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== @@ -2304,6 +2926,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@^2.15.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -2314,6 +2941,11 @@ compute-scroll-into-view@^1.0.14, compute-scroll-into-view@^1.0.9: resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.16.tgz#5b7bf4f7127ea2c19b750353d7ce6776a90ee088" integrity sha512-a85LHKY81oQnikatZYA90pufpZ6sQx++BoCxOEMsjpZx+ZnaKGQnCyCehTRr/1p9GBIAHTjcU9k71kSYWloLiQ== +compute-scroll-into-view@^1.0.16: + version "1.0.17" + resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.17.tgz#6a88f18acd9d42e9cf4baa6bec7e0522607ab7ab" + integrity sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg== + computed-style@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/computed-style/-/computed-style-0.1.4.tgz#7f344fd8584b2e425bedca4a1afc0e300bb05d74" @@ -2341,11 +2973,28 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +copy-to-clipboard@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" + integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== + dependencies: + toggle-selection "^1.0.6" + core-js-pure@^3.0.0: version "3.8.1" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.8.1.tgz#23f84048f366fdfcf52d3fd1c68fec349177d119" integrity sha512-Se+LaxqXlVXGvmexKGPvnUIYC1jwXu1H6Pkyb3uBM5d8/NELMYCHs/4/roD7721NxrTLyv7e5nXd5/QLBO+10g== +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= + +core-js@^2.5.7: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -2362,6 +3011,16 @@ cosmiconfig@^6.0.0: path-type "^4.0.0" yaml "^1.7.2" +create-emotion@^10.0.27: + version "10.0.27" + resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-10.0.27.tgz#cb4fa2db750f6ca6f9a001a33fbf1f6c46789503" + integrity sha512-fIK73w82HPPn/RsAij7+Zt8eCE8SptcJ3WoRMfxMtjteYxud8GDTKKld7MYwAX2TVhrw29uR1N/bVGxeStHILg== + dependencies: + "@emotion/cache" "^10.0.27" + "@emotion/serialize" "^0.11.15" + "@emotion/sheet" "0.9.4" + "@emotion/utils" "0.11.3" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -2392,7 +3051,7 @@ css-mediaquery@^0.1.2: resolved "https://registry.yarnpkg.com/css-mediaquery/-/css-mediaquery-0.1.2.tgz#6a2c37344928618631c54bd33cedd301da18bea0" integrity sha1-aiw3NEkoYYYxxUvTPO3TAdoYvqA= -css-to-react-native@^2.2.1: +css-to-react-native@^2.0.3, css-to-react-native@^2.2.1, css-to-react-native@^2.2.2: version "2.3.2" resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.2.tgz#e75e2f8f7aa385b4c3611c52b074b70a002f2e7d" integrity sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw== @@ -2428,6 +3087,11 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.5.tgz#7fdec6a28a67ae18647c51668a9ff95bb2fa7bb8" integrity sha512-uVDi8LpBUKQj6sdxNaTetL6FpeCqTjOvAQuQUa/qAqq8oOd4ivkbhgnqayl0dnPal8Tb/yB1tF+gOvCBiicaiQ== +csstype@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.7.tgz#2a5fb75e1015e84dd15692f71e89a1450290950b" + integrity sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g== + damerau-levenshtein@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791" @@ -2573,6 +3237,14 @@ document.contains@^1.0.1: dependencies: define-properties "^1.1.3" +dom-helpers@^5.0.1: + version "5.2.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.0.tgz#57fd054c5f8f34c52a3eeffdb7e7e93cd357d95b" + integrity sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ== + dependencies: + "@babel/runtime" "^7.8.7" + csstype "^3.0.2" + dom-scroll-into-view@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz#e8f36732dd089b0201a88d7815dc3f88e6d66c7e" @@ -2615,6 +3287,16 @@ downshift@^5.4.0: prop-types "^15.7.2" react-is "^16.13.1" +downshift@^6.0.15: + version "6.1.0" + resolved "https://registry.yarnpkg.com/downshift/-/downshift-6.1.0.tgz#f008063d9b63935910d9db12ead07979ab51ce66" + integrity sha512-MnEJERij+1pTVAsOPsH3q9MJGNIZuu2sT90uxOCEOZYH6sEzkVGtUcTBVDRQkE8y96zpB7uEbRn24aE9VpHnZg== + dependencies: + "@babel/runtime" "^7.12.5" + compute-scroll-into-view "^1.0.16" + prop-types "^15.7.2" + react-is "^17.0.1" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2643,7 +3325,24 @@ emoji-regex@^9.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.0.tgz#a26da8e832b16a9753309f25e35e3c0efb9a066a" integrity sha512-DNc3KFPK18bPdElMJnf/Pkv5TXhxFU3YFDEuGLDRtPmV4rkmCjBkCSEp22u6rBHdSN9Vlp/GK7k98prmE1Jgug== -encoding@^0.1.12: +emotion-theming@^10.0.27: + version "10.0.27" + resolved "https://registry.yarnpkg.com/emotion-theming/-/emotion-theming-10.0.27.tgz#1887baaec15199862c89b1b984b79806f2b9ab10" + integrity sha512-MlF1yu/gYh8u+sLUqA0YuA9JX0P4Hb69WlKc/9OLo+WCXuX6sy/KoIa+qJimgmr2dWqnypYKYPX37esjDBbhdw== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/weak-memoize" "0.2.5" + hoist-non-react-statics "^3.3.0" + +emotion@^10.0.27: + version "10.0.27" + resolved "https://registry.yarnpkg.com/emotion/-/emotion-10.0.27.tgz#f9ca5df98630980a23c819a56262560562e5d75e" + integrity sha512-2xdDzdWWzue8R8lu4G76uWX5WhyQuzATon9LmNeCy/2BHVC6dsEpfhN1a0qhELgtDVdjyEA6J8Y/VlI5ZnaH0g== + dependencies: + babel-plugin-emotion "^10.0.27" + create-emotion "^10.0.27" + +encoding@^0.1.11, encoding@^0.1.12: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -2922,6 +3621,11 @@ execa@^4.0.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +exenv@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" + integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50= + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -3005,7 +3709,7 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -3032,6 +3736,19 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fbjs@^0.8.4, fbjs@^0.8.9: + version "0.8.17" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" + integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -3123,6 +3840,26 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +framer-motion@^2.1.0: + version "2.9.5" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-2.9.5.tgz#bbb185325d531c57f494cf3f6cf7719fc2c225c7" + integrity sha512-epSX4Co1YbDv0mjfHouuY0q361TpHE7WQzCp/xMTilxy4kXd+Z23uJzPVorfzbm1a/9q1Yu8T5bndaw65NI4Tg== + dependencies: + framesync "^4.1.0" + hey-listen "^1.0.8" + popmotion "9.0.0-rc.20" + style-value-types "^3.1.9" + tslib "^1.10.0" + optionalDependencies: + "@emotion/is-prop-valid" "^0.8.2" + +framesync@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-4.1.0.tgz#69a8db3ca432dc70d6a76ba882684a1497ef068a" + integrity sha512-MmgZ4wCoeVxNbx2xp5hN/zPDCbLSKiDt4BbbslK7j/pM2lg5S0vhTNv1v8BCVb99JPIo6hXBFdwzU7Q4qcAaoQ== + dependencies: + hey-listen "^1.0.5" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3290,6 +4027,11 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -3343,7 +4085,34 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hoist-non-react-statics@^3.2.1, hoist-non-react-statics@^3.3.0: +hey-listen@^1.0.5, hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + +highlight-words-core@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/highlight-words-core/-/highlight-words-core-1.2.2.tgz#1eff6d7d9f0a22f155042a00791237791b1eeaaa" + integrity sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg== + +history@^4.9.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" + integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^3.0.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^1.0.1" + +hoist-non-react-statics@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" + integrity sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs= + +hoist-non-react-statics@^3.2.1, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -3472,6 +4241,15 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" +interpolate-components@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/interpolate-components/-/interpolate-components-1.1.1.tgz#699fff45d1525e98c7ce7b7159591d992b5dd6df" + integrity sha1-aZ//RdFSXpjHzntxWVkdmStd1t8= + dependencies: + react "^0.14.3 || ^15.1.0 || ^16.0.0" + react-addons-create-fragment "^0.14.3 || ^15.1.0" + react-dom "^0.14.3 || ^15.1.0 || ^16.0.0" + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -3618,7 +4396,7 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-plain-object@^2.0.3, is-plain-object@^2.0.4: +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== @@ -3642,7 +4420,7 @@ is-regex@^1.1.0, is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" -is-stream@^1.1.0: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -3674,6 +4452,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-what@^3.3.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" + integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -3686,6 +4469,11 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -3708,6 +4496,14 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3754,6 +4550,11 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" +jed@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/jed/-/jed-1.1.1.tgz#7a549bbd9ffe1585b0cd0a191e203055bee574b4" + integrity sha1-elSbvZ/+FYWwzQoZHiAwVb7ldLQ= + jest-changed-files@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" @@ -4207,6 +5008,13 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +json2mq@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/json2mq/-/json2mq-0.2.0.tgz#b637bd3ba9eabe122c83e9720483aeb10d2c904a" + integrity sha1-tje9O6nqvhIsg+lyBIOusQ0skEo= + dependencies: + string-convert "^0.2.0" + json5@2.x, json5@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" @@ -4328,7 +5136,12 @@ lodash@^4.1.1, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -loose-envify@^1.1.0, loose-envify@^1.4.0: +lodash@^4.17.10, lodash@^4.17.11: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -4378,6 +5191,18 @@ memize@^1.0.5, memize@^1.1.0: resolved "https://registry.yarnpkg.com/memize/-/memize-1.1.0.tgz#4a5a684ac6992a13b1299043f3e49b1af6a0b0d3" integrity sha512-K4FcPETOMTwe7KL2LK0orMhpOmWD2wRGwWWpbZy0fyArwsyIKR8YJVz8+efBAh3BO4zPqlSICu4vsLTRRqtFAg== +memoize-one@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== + +merge-anything@^2.2.4: + version "2.4.4" + resolved "https://registry.yarnpkg.com/merge-anything/-/merge-anything-2.4.4.tgz#6226b2ac3d3d3fc5fb9e8d23aa400df25f98fdf0" + integrity sha512-l5XlriUDJKQT12bH+rVhAHjwIuXWdAIecGwsYjv2LJo+dA1AeRTmeQS+3QBpO6lEthBMDi2IUMpLC1yyRvGlwQ== + dependencies: + is-what "^3.3.1" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -4439,6 +5264,11 @@ minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +mitt@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230" + integrity sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -4518,6 +5348,14 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4796,6 +5634,13 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -4825,6 +5670,16 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +popmotion@9.0.0-rc.20: + version "9.0.0-rc.20" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-9.0.0-rc.20.tgz#f3550042ae31957b5416793ae8723200951ad39d" + integrity sha512-f98sny03WuA+c8ckBjNNXotJD4G2utG/I3Q23NU69OEafrXtxxSukAaJBxzbtxwDvz3vtZK69pu9ojdkMoBNTg== + dependencies: + framesync "^4.1.0" + hey-listen "^1.0.8" + style-value-types "^3.1.9" + tslib "^1.10.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -4835,6 +5690,15 @@ postcss-value-parser@^3.3.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== +postcss@^6.0.23: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -4855,6 +5719,13 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== + dependencies: + asap "~2.0.3" + prompts@^2.0.1: version "2.4.0" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" @@ -4872,7 +5743,7 @@ prop-types-exact@^1.2.0: object.assign "^4.1.0" reflect.ownkeys "^0.2.0" -prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -4916,6 +5787,15 @@ re-resizable@^6.0.0, re-resizable@^6.4.0: dependencies: fast-memoize "^2.5.1" +"react-addons-create-fragment@^0.14.3 || ^15.1.0": + version "15.6.2" + resolved "https://registry.yarnpkg.com/react-addons-create-fragment/-/react-addons-create-fragment-15.6.2.tgz#a394de7c2c7becd6b5475ba1b97ac472ce7c74f8" + integrity sha1-o5TefCx77Na1R1uhuXrEcs58dPg= + dependencies: + fbjs "^0.8.4" + loose-envify "^1.3.1" + object-assign "^4.1.0" + react-addons-shallow-compare@^15.6.2: version "15.6.3" resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.3.tgz#28a94b0dfee71530852c66a69053d59a1baf04cb" @@ -4923,15 +5803,6 @@ react-addons-shallow-compare@^15.6.2: dependencies: object-assign "^4.1.0" -react-autosize-textarea@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz#30e8e081f35eb73b3667dc01cf4e8927c278466b" - integrity sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg== - dependencies: - autosize "^4.0.0" - line-height "^0.3.1" - prop-types "^15.5.6" - react-autosize-textarea@^7.0.0, react-autosize-textarea@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/react-autosize-textarea/-/react-autosize-textarea-7.1.0.tgz#902c84fc395a689ca3a484dfb6bc2be9ba3694d1" @@ -4941,6 +5812,11 @@ react-autosize-textarea@^7.0.0, react-autosize-textarea@^7.1.0: line-height "^0.3.1" prop-types "^15.5.6" +react-colorful@4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-4.4.4.tgz#38e7c5b7075bbf63d3cce22d8c61a439a58b7561" + integrity sha512-01V2/6rr6sa1vaZntWZJXZxnU7ew02NG2rqq0eoVp4d3gFU5Ug9lDzNMbr+8ns0byXsJbBR8LbwQTlAjz6x7Kg== + react-dates@^17.1.1: version "17.2.0" resolved "https://registry.yarnpkg.com/react-dates/-/react-dates-17.2.0.tgz#d8cfe29ceecb3fbe37abbaa385683504cc53cdf6" @@ -4960,7 +5836,7 @@ react-dates@^17.1.1: react-with-styles "^3.2.0" react-with-styles-interface-css "^4.0.2" -react-dom@^16.13.0, react-dom@^16.13.1: +"react-dom@^0.14.3 || ^15.1.0 || ^16.0.0", react-dom@^16.13.1: version "16.14.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== @@ -4970,7 +5846,14 @@ react-dom@^16.13.0, react-dom@^16.13.1: prop-types "^15.6.2" scheduler "^0.19.1" -react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.9.0: +react-input-autosize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-3.0.0.tgz#6b5898c790d4478d69420b55441fcc31d5c50a85" + integrity sha512-nL9uS7jEs/zu8sqwFE5MAPx6pPkNAriACQ2rGLlqmKr2sPGtN7TXTyDdQt4lbNXVx7Uzadb40x8qotIuru6Rhg== + dependencies: + prop-types "^15.5.8" + +react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6, react-is@^16.9.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -4980,11 +5863,26 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== -react-merge-refs@^1.0.0: +react-lifecycles-compat@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== + +react-merge-refs@^1.0.0, react-merge-refs@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/react-merge-refs/-/react-merge-refs-1.1.0.tgz#73d88b892c6c68cbb7a66e0800faa374f4c38b06" integrity sha512-alTKsjEL0dKH/ru1Iyn7vliS2QRcBp9zZPGoWxUOvRGWPUYgjo+V01is7p04It6KhgrzhJGnIj9GgX8W4bZoCQ== +react-modal@^3.8.1: + version "3.12.1" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.12.1.tgz#38c33f70d81c33d02ff1ed115530443a3dc2afd3" + integrity sha512-WGuXn7Fq31PbFJwtWmOk+jFtGC7E9tJVbFX0lts8ZoS5EPi9+WWylUJWLKKVm3H4GlQ7ZxY7R6tLlbSIBQ5oZA== + dependencies: + exenv "^1.2.0" + prop-types "^15.5.10" + react-lifecycles-compat "^3.0.0" + warning "^4.0.3" + react-moment-proptypes@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/react-moment-proptypes/-/react-moment-proptypes-1.7.0.tgz#89881479840a76c13574a86e3bb214c4ba564e7a" @@ -5017,11 +5915,25 @@ react-portal@^4.1.5: dependencies: prop-types "^15.5.8" -react-resize-aware@^3.0.1: +react-resize-aware@^3.0.1, react-resize-aware@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/react-resize-aware/-/react-resize-aware-3.1.0.tgz#fa1da751d1d72f90c3b79969d05c2c577dfabd92" integrity sha512-bIhHlxVTX7xKUz14ksXMEHjzCZPTpQZKZISY3nbTD273pDKPABGFNFBP6Tr42KECxzC5YQiKpMchjTVJCqaxpA== +react-select@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.2.0.tgz#de9284700196f5f9b5277c5d850a9ce85f5c72fe" + integrity sha512-B/q3TnCZXEKItO0fFN/I0tWOX3WJvi/X2wtdffmwSQVRwg5BpValScTO1vdic9AxlUgmeSzib2hAZAwIUQUZGQ== + dependencies: + "@babel/runtime" "^7.4.4" + "@emotion/cache" "^10.0.9" + "@emotion/core" "^10.0.9" + "@emotion/css" "^10.0.9" + memoize-one "^5.0.0" + prop-types "^15.6.0" + react-input-autosize "^3.0.0" + react-transition-group "^4.3.0" + react-spring@^8.0.19, react-spring@^8.0.20: version "8.0.27" resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-8.0.27.tgz#97d4dee677f41e0b2adcb696f3839680a3aa356a" @@ -5030,11 +5942,53 @@ react-spring@^8.0.19, react-spring@^8.0.20: "@babel/runtime" "^7.3.1" prop-types "^15.5.8" +react-tabs@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/react-tabs/-/react-tabs-2.3.1.tgz#05149044a36edf6be7f2b92c64046d5b2cf42e1d" + integrity sha512-SIT1Yx2LY5uwQQsCTQ9hXhywNKqyBdGBAzFZvzYUisztVwOWzfNWjZ7QWNOvuayT5/AF0RAHNbRedur8Yiz2pA== + dependencies: + classnames "^2.2.0" + prop-types "^15.5.0" + +react-test-renderer@^16.12.0: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae" + integrity sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg== + dependencies: + object-assign "^4.1.1" + prop-types "^15.6.2" + react-is "^16.8.6" + scheduler "^0.19.1" + +react-textarea-autosize@^8.2.0: + version "8.3.1" + resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.1.tgz#b942a934cc660ecfc645717d1fb84344b69dcb15" + integrity sha512-Vk02C3RWKLjx1wSwcVuPwfTuyGIemBB2MjDi01OnBYxKWSJFA/O7IOzr9FrO8AuRlkupk4X6Kjew2mYyEDXi0A== + dependencies: + "@babel/runtime" "^7.10.2" + use-composed-ref "^1.0.0" + use-latest "^1.0.0" + +react-transition-group@^4.3.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" + integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react-use-gesture@^7.0.15: version "7.0.16" resolved "https://registry.yarnpkg.com/react-use-gesture/-/react-use-gesture-7.0.16.tgz#501985261ef9c815a377b6ff9be6df5a85fbb54f" integrity sha512-gwgX+E+WQG0T1uFVl3z8j3ZwH3QQGIgVl7VtQEC2m0IscSs668sSps4Ss3CFp3Vns8xx0j9TVK4aBXH6+YrpEg== +react-use-gesture@^9.0.0: + version "9.0.4" + resolved "https://registry.yarnpkg.com/react-use-gesture/-/react-use-gesture-9.0.4.tgz#7e0428007df31b6d8daae37c2fb01e9f40283623" + integrity sha512-G0sbQY+HSm2gSVIlD+LE1unpVpG7YZRTr8TI72vo0Nu1lecJtvjbcY3ZLonEZLTtODJgLL6nBllMRXyy0bRSQA== + react-with-direction@^1.3.0, react-with-direction@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/react-with-direction/-/react-with-direction-1.3.1.tgz#9fd414564f0ffe6947e5ff176f6132dd83f8b8df" @@ -5067,7 +6021,7 @@ react-with-styles@^3.2.0: prop-types "^15.6.2" react-with-direction "^1.3.0" -react@^16.13.0, react@^16.13.1: +"react@^0.14.3 || ^15.1.0 || ^16.0.0", react@^16.13.1: version "16.14.0" resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== @@ -5114,6 +6068,11 @@ reakit-utils@^0.13.0, reakit-utils@^0.13.1: resolved "https://registry.yarnpkg.com/reakit-utils/-/reakit-utils-0.13.1.tgz#060b8b2a55eea1170c6d8ff37cd98c10c63ee55c" integrity sha512-NBKgsot3tU91gZgK5MTInI/PR0T3kIsTmbU5MbGggSOcwU2dG/kbE8IrM2lC6ayCSL2W2QWkijT6kewdrIX7Gw== +reakit-utils@^0.14.4: + version "0.14.4" + resolved "https://registry.yarnpkg.com/reakit-utils/-/reakit-utils-0.14.4.tgz#1ecf035faf58960ba48eac2963f70269596effcf" + integrity sha512-jDEf/NmZVJ6fs10G16ifD+RFhQikSLN7VfjRHu0CPoUj4g6lFXd5PPcRXCY81qiqc9FVHjr2d2fmsw1hs6xUxA== + reakit-utils@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/reakit-utils/-/reakit-utils-0.15.1.tgz#797f0a43f6a1dbc22d161224d5d2272e287dbfe3" @@ -5126,6 +6085,13 @@ reakit-warning@^0.4.0: dependencies: reakit-utils "^0.13.1" +reakit-warning@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/reakit-warning/-/reakit-warning-0.5.5.tgz#551afcfd9b0c3dc92eab21fcca001fc2ebbc8465" + integrity sha512-OuP1r7rlSSJZsoLuc0CPA2ACPKnWO8HDbFktiiidbT67UjuX6udYV1AUsIgMJ8ado9K5gZGjPj7IB/GDYo9Yjg== + dependencies: + reakit-utils "^0.14.4" + reakit-warning@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/reakit-warning/-/reakit-warning-0.6.1.tgz#dba33bb8866aebe30e67ac433ead707d16d38a36" @@ -5155,6 +6121,17 @@ reakit@^1.0.0-beta.12, reakit@^1.1.0: reakit-utils "^0.15.1" reakit-warning "^0.6.1" +reakit@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/reakit/-/reakit-1.3.5.tgz#4e35850f4998922541cf9de305549f41931f3272" + integrity sha512-Luv1RPBFlWhRG32Ysjd86KC+vLoz5da3X0O8rqClaNEv259nWmnw5fG6BIUSYJwTG6PPxTidPlS+9bS6nLstfA== + dependencies: + "@popperjs/core" "^2.5.4" + body-scroll-lock "^3.1.5" + reakit-system "^0.15.1" + reakit-utils "^0.15.1" + reakit-warning "^0.6.1" + redux-multi@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/redux-multi/-/redux-multi-0.1.12.tgz#28e1fe5e49672cbc5bd8a07f0b2aeaf0ef8355c2" @@ -5183,6 +6160,11 @@ refx@^3.0.0: resolved "https://registry.yarnpkg.com/refx/-/refx-3.1.1.tgz#8ca1b4844ac81ff8e8b79523fdd082cac9b05517" integrity sha512-lwN27W5iYyagpCxxYDYDl0IIiKh0Vgi3wvafqfthbzTfBgLOYAstcftp+G2X612xVaB8rhn5wDxd4er4KEeb8A== +regenerator-runtime@^0.12.0: + version "0.12.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" + integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== + regenerator-runtime@^0.13.4: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" @@ -5303,6 +6285,11 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-pathname@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" + integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -5348,6 +6335,17 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== +rtlcss@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rtlcss/-/rtlcss-2.6.2.tgz#55b572b52c70015ba6e03d497e5c5cb8137104b4" + integrity sha512-06LFAr+GAPo+BvaynsXRfoYTJvSaWRyOhURCQ7aeI1MKph9meM222F+Zkt3bDamyHHJuGi3VPtiRkpyswmQbGA== + dependencies: + "@choojs/findup" "^0.2.1" + chalk "^2.4.2" + mkdirp "^0.5.1" + postcss "^6.0.23" + strip-json-comments "^2.0.0" + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -5454,6 +6452,11 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -5674,6 +6677,11 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +string-convert@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97" + integrity sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c= + string-length@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" @@ -5758,12 +6766,80 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-json-comments@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strip-json-comments@^3.0.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@^5.3.0: +style-value-types@^3.1.9: + version "3.2.0" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-3.2.0.tgz#eb89cab1340823fa7876f3e289d29d99c92111bb" + integrity sha512-ih0mGsrYYmVvdDi++/66O6BaQPRPRMQHoZevNNdMMcPlP/cH28Rnfsqf1UEba/Bwfuw9T8BmIMwbGdzsPwQKrQ== + dependencies: + hey-listen "^1.0.8" + tslib "^1.10.0" + +styled-components@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-2.4.1.tgz#663bd0485d4b6ab46f946210dc03d2398d1ade74" + integrity sha1-ZjvQSF1LarRvlGIQ3APSOY0a3nQ= + dependencies: + buffer "^5.0.3" + css-to-react-native "^2.0.3" + fbjs "^0.8.9" + hoist-non-react-statics "^1.2.0" + is-plain-object "^2.0.1" + prop-types "^15.5.4" + stylis "^3.4.0" + supports-color "^3.2.3" + +styled-components@^4.2.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.4.1.tgz#e0631e889f01db67df4de576fedaca463f05c2f2" + integrity sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@emotion/is-prop-valid" "^0.8.1" + "@emotion/unitless" "^0.7.0" + babel-plugin-styled-components ">= 1" + css-to-react-native "^2.2.2" + memoize-one "^5.0.0" + merge-anything "^2.2.4" + prop-types "^15.5.4" + react-is "^16.6.0" + stylis "^3.5.0" + stylis-rule-sheet "^0.0.10" + supports-color "^5.5.0" + +styled-griddie@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/styled-griddie/-/styled-griddie-0.1.3.tgz#57bda4ab05f082c2916f049ae0ee03b9c49b9614" + integrity sha512-RjsiiADJrRpdPTF8NR26nlZutnvkrX78tiM5/za/E+ftVdpjD8ZBb2iOzrIzfix80uDcHYQbg3iIR0lOGaYmEQ== + +stylis-rule-sheet@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" + integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== + +stylis@^3.4.0, stylis@^3.5.0: + version "3.5.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" + integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== + +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= + dependencies: + has-flag "^1.0.0" + +supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -5849,7 +6925,17 @@ tiny-emitter@^2.0.0: resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== -tinycolor2@^1.4.1: +tiny-invariant@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" + integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== + +tiny-warning@^1.0.0, tiny-warning@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" + integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== + +tinycolor2@^1.4.1, tinycolor2@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== @@ -5903,6 +6989,11 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +toggle-selection@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" + integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI= + tokenizr@^1.5.2: version "1.6.3" resolved "https://registry.yarnpkg.com/tokenizr/-/tokenizr-1.6.3.tgz#4619ab4fbf0f0e43252e33a16ad939b8793447f0" @@ -5937,6 +7028,11 @@ traverse@^0.6.6: resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= +ts-essentials@^2.0.3: + version "2.0.12" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" + integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== + ts-jest@^26.0.15: version "26.4.4" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49" @@ -5954,7 +7050,7 @@ ts-jest@^26.0.15: semver "7.x" yargs-parser "20.x" -tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -6022,6 +7118,11 @@ typescript@^3.7.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +ua-parser-js@^0.7.18: + version "0.7.24" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" + integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -6052,6 +7153,33 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= +use-composed-ref@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.1.0.tgz#9220e4e94a97b7b02d7d27eaeab0b37034438bbc" + integrity sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg== + dependencies: + ts-essentials "^2.0.3" + +use-enhanced-state@^0.0.13: + version "0.0.13" + resolved "https://registry.yarnpkg.com/use-enhanced-state/-/use-enhanced-state-0.0.13.tgz#cf65297a6122547cd639515264454da9dc149314" + integrity sha512-RCtUQdhfUXu/0GAQqLnKPetUt3BheYFpOTogppHe9x1XGwluiu6DQLKVNnc3yMfj0HM3IOVBgw5nVJJuZS5TWQ== + dependencies: + "@itsjonq/is" "0.0.2" + tiny-warning "^1.0.3" + +use-isomorphic-layout-effect@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.1.tgz#7bb6589170cd2987a152042f9084f9effb75c225" + integrity sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ== + +use-latest@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.0.tgz#a44f6572b8288e0972ec411bdd0840ada366f232" + integrity sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw== + dependencies: + use-isomorphic-layout-effect "^1.0.0" + use-memo-one@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.1.tgz#39e6f08fe27e422a7d7b234b5f9056af313bd22c" @@ -6067,11 +7195,6 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" - integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== - uuid@^8.3.0: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -6099,6 +7222,11 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +value-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" + integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -6129,6 +7257,13 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" +warning@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + webidl-conversions@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" @@ -6146,6 +7281,16 @@ whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" +whatwg-fetch@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-1.1.1.tgz#ac3c9d39f320c6dce5339969d054ef43dd333319" + integrity sha1-rDydOfMgxtzlM5lp0FTvQ90zMxk= + +whatwg-fetch@>=0.10.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.1.tgz#93bc4005af6c2cc30ba3e42ec3125947c8f54ed3" + integrity sha512-IEmN/ZfmMw6G1hgZpVd0LuZXOQDisrMOZrzYd5x3RAK4bMPlJohKUZWZ9t/QsTvH0dV9TbPDcc2OSuIDcihnHA== + whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" From f4114acc636da04d8a890c9bd6f02237d6a4fa31 Mon Sep 17 00:00:00 2001 From: Joost Boomkamp <3604126+increddibelly@users.noreply.github.com> Date: Mon, 22 Mar 2021 11:48:34 +0100 Subject: [PATCH 03/12] update BlockSuggestions export --- packages/schema-blocks/src/blocks/BlockSuggestions.tsx | 2 +- .../functions/presenters/InnerBlocksSidebarPresenter.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schema-blocks/src/blocks/BlockSuggestions.tsx b/packages/schema-blocks/src/blocks/BlockSuggestions.tsx index 88fed92a38..33bc6999ec 100644 --- a/packages/schema-blocks/src/blocks/BlockSuggestions.tsx +++ b/packages/schema-blocks/src/blocks/BlockSuggestions.tsx @@ -25,7 +25,7 @@ type BlockSuggestionDto = { * * @returns {ReactElement} The rendered block suggestion. */ -function BlockSuggestion( { blockTitle, blockName, blockClientId }: BlockSuggestionDto ): ReactElement { +export function BlockSuggestion( { blockTitle, blockName, blockClientId }: BlockSuggestionDto ): ReactElement { /** * Onclick handler for the remove block. */ diff --git a/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx b/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx index c362769ea0..11455ec7a0 100644 --- a/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx +++ b/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx @@ -1,7 +1,7 @@ import { ReactElement } from "react"; import { createElement } from "@wordpress/element"; import { BlockInstance } from "@wordpress/blocks"; -import BlockSuggestions from "../../blocks/BlockSuggestions"; +import { BlockSuggestion } from "../../blocks/BlockSuggestions"; import { __ } from "@wordpress/i18n"; import getWarnings, { sidebarWarning } from "./SidebarWarningPresenter"; import { InnerBlocksInstructionOptions } from "../../instructions/blocks/InnerBlocksInstructionOptions"; @@ -24,11 +24,11 @@ export function innerBlocksSidebar( currentBlock: BlockInstance, options: InnerB } if ( options.requiredBlocks ) { - elements.push( BlockSuggestions( __( "Required Blocks", "yoast-schema-blocks" ), currentBlock, options.requiredBlocks ) ); + elements.push( BlockSuggestion( __( "Required Blocks", "yoast-schema-blocks" ), currentBlock, options.requiredBlocks ) ); } if ( options.recommendedBlocks ) { - elements.push( BlockSuggestions( __( "Recommended Blocks", "yoast-schema-blocks" ), currentBlock, options.recommendedBlocks ) ); + elements.push( BlockSuggestion( __( "Recommended Blocks", "yoast-schema-blocks" ), currentBlock, options.recommendedBlocks ) ); } return elements; From 6596d21120267fbccde5e14f1a65bcb1be1bc9e4 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Mon, 22 Mar 2021 12:51:22 +0100 Subject: [PATCH 04/12] Fixed some named imports in the schema-blocks package. --- .../src/functions/presenters/InnerBlocksSidebarPresenter.tsx | 2 +- packages/schema-blocks/src/functions/validators/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx b/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx index c362769ea0..9ce96774fd 100644 --- a/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx +++ b/packages/schema-blocks/src/functions/presenters/InnerBlocksSidebarPresenter.tsx @@ -1,7 +1,7 @@ import { ReactElement } from "react"; import { createElement } from "@wordpress/element"; import { BlockInstance } from "@wordpress/blocks"; -import BlockSuggestions from "../../blocks/BlockSuggestions"; +import { RequiredBlocks as BlockSuggestions } from "../../blocks/BlockSuggestions"; import { __ } from "@wordpress/i18n"; import getWarnings, { sidebarWarning } from "./SidebarWarningPresenter"; import { InnerBlocksInstructionOptions } from "../../instructions/blocks/InnerBlocksInstructionOptions"; diff --git a/packages/schema-blocks/src/functions/validators/index.ts b/packages/schema-blocks/src/functions/validators/index.ts index 35ad001d55..84222f652f 100644 --- a/packages/schema-blocks/src/functions/validators/index.ts +++ b/packages/schema-blocks/src/functions/validators/index.ts @@ -1,6 +1,6 @@ import attributeExists from "./attributeExists"; import attributeNotEmpty from "./attributeNotEmpty"; -import getInvalidInnerBlocks from "./innerBlocksValid"; +import { validateInnerBlocks as getInvalidInnerBlocks } from "./innerBlocksValid"; import isValidResult from "./isValidResult"; export { From b5d0773065eee9c59ba829377ccabb931b78dcd4 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Wed, 24 Mar 2021 10:29:20 +0100 Subject: [PATCH 05/12] Fixed imports in schema-blocks tests. --- .../schema-blocks/tests/blocks/BlockSuggestions.test.ts | 2 +- packages/schema-blocks/tests/core/Definition.test.ts | 2 +- .../functions/gutenberg/watchers/warningWatcher.test.ts | 2 +- packages/schema-blocks/tests/functions/process.test.ts | 2 +- .../tests/functions/validators/innerBlocksValid.test.ts | 8 ++++---- .../tests/functions/validators/validateMany.test.ts | 2 +- .../tests/instructions/blocks/Select.test.ts | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts b/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts index 45984630ce..5e91bc0ff9 100644 --- a/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts +++ b/packages/schema-blocks/tests/blocks/BlockSuggestions.test.ts @@ -2,7 +2,7 @@ import { BlockInstance, createBlock } from "@wordpress/blocks"; import * as renderer from "react-test-renderer"; import { mount } from "enzyme"; import { RequiredBlock } from "../../src/core/validation"; -import { BlockSuggestions } from "../../src/blocks/BlockSuggestions"; +import { RequiredBlocks as BlockSuggestions } from "../../src/blocks/BlockSuggestions"; import { insertBlock } from "../../src/functions/innerBlocksHelper"; jest.mock( "@wordpress/blocks", () => { diff --git a/packages/schema-blocks/tests/core/Definition.test.ts b/packages/schema-blocks/tests/core/Definition.test.ts index be4170868d..7c229bed8a 100644 --- a/packages/schema-blocks/tests/core/Definition.test.ts +++ b/packages/schema-blocks/tests/core/Definition.test.ts @@ -1,5 +1,5 @@ import { BlockInstruction } from "../../src/core/blocks/BlockInstruction"; -import Definition from "../../src/core/Definition"; +import { Definition } from "../../src/core/Definition"; import { BlockValidation, BlockValidationResult } from "../../src/core/validation"; import { BlockConfiguration, BlockInstance } from "@wordpress/blocks"; /** diff --git a/packages/schema-blocks/tests/functions/gutenberg/watchers/warningWatcher.test.ts b/packages/schema-blocks/tests/functions/gutenberg/watchers/warningWatcher.test.ts index dc1b3a17f2..60ec38bf67 100644 --- a/packages/schema-blocks/tests/functions/gutenberg/watchers/warningWatcher.test.ts +++ b/packages/schema-blocks/tests/functions/gutenberg/watchers/warningWatcher.test.ts @@ -3,7 +3,7 @@ import "../../../matchMedia.mock"; import { BlockInstance, createBlock } from "@wordpress/blocks"; import { dispatch } from "@wordpress/data"; -import warningWatcher from "../../../../src/functions/gutenberg/watchers/warningWatcher"; +import { warningWatcher } from "../../../../src/functions/gutenberg/watchers/warningWatcher"; import InnerBlocks from "../../../../src/instructions/blocks/InnerBlocks"; import { getBlockDefinition } from "../../../../src/core/blocks/BlockDefinitionRepository"; import { RequiredBlock, RequiredBlockOption } from "../../../../src/core/validation"; diff --git a/packages/schema-blocks/tests/functions/process.test.ts b/packages/schema-blocks/tests/functions/process.test.ts index 4288995c31..5d669c7d4a 100644 --- a/packages/schema-blocks/tests/functions/process.test.ts +++ b/packages/schema-blocks/tests/functions/process.test.ts @@ -1,7 +1,7 @@ import "../matchMedia.mock"; import process, { processBlock } from "../../src/functions/process"; -import BlockDefinition from "../../src/core/blocks/BlockDefinition"; +import { BlockDefinition } from "../../src/core/blocks/BlockDefinition"; import { BlockInstruction } from "../../src/core/blocks/BlockInstruction"; import "../../src/instructions/blocks/InnerBlocks"; import InnerBlocks from "../../src/instructions/blocks/InnerBlocks"; diff --git a/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts b/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts index a62debe4ef..f6f1bdba10 100644 --- a/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts +++ b/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts @@ -1,7 +1,7 @@ import "../../matchMedia.mock"; import { BlockInstance } from "@wordpress/blocks"; import { BlockValidationResult, BlockValidation, RequiredBlock, RequiredBlockOption } from "../../../src/core/validation"; -import BlockDefinition from "../../../src/core/blocks/BlockDefinition"; +import { BlockDefinition } from "../../../src/core/blocks/BlockDefinition"; import * as innerBlocksValid from "../../../src/functions/validators/innerBlocksValid"; import * as blockDefinitionRepository from "../../../src/core/blocks/BlockDefinitionRepository"; @@ -250,7 +250,7 @@ describe( "the getInvalidInnerBlocks function", () => { mockDefinition( "existingBlock1", "existingBlock", BlockValidation.Valid ); // Act. - const result: BlockValidationResult[] = innerBlocksValid.default( testBlock, requiredBlocks ); + const result: BlockValidationResult[] = innerBlocksValid.validateInnerBlocks( testBlock, requiredBlocks ); // Assert. expect( result.length ).toEqual( 1 ); @@ -289,7 +289,7 @@ describe( "the getInvalidInnerBlocks function", () => { mockDefinition( "requiredBlock1", "requiredBlock", BlockValidation.Valid ); // Act. - const result: BlockValidationResult[] = innerBlocksValid.default( testBlock, requiredBlocks ); + const result: BlockValidationResult[] = innerBlocksValid.validateInnerBlocks( testBlock, requiredBlocks ); // Assert. expect( result.length ).toEqual( 2 ); @@ -348,7 +348,7 @@ describe( "the getInvalidInnerBlocks function", () => { mockDefinition( "redundantBlock2", "redundantBlock", BlockValidation.Valid ); // Act. - const result: BlockValidationResult[] = innerBlocksValid.default( testBlock, requiredBlocks ); + const result: BlockValidationResult[] = innerBlocksValid.validateInnerBlocks( testBlock, requiredBlocks ); // Assert. expect( result.length ).toEqual( 4 ); diff --git a/packages/schema-blocks/tests/functions/validators/validateMany.test.ts b/packages/schema-blocks/tests/functions/validators/validateMany.test.ts index cdeecf3fd7..3fbc79a925 100644 --- a/packages/schema-blocks/tests/functions/validators/validateMany.test.ts +++ b/packages/schema-blocks/tests/functions/validators/validateMany.test.ts @@ -1,6 +1,6 @@ import "../../matchMedia.mock"; import { BlockValidation, BlockValidationResult } from "../../../src/core/validation"; -import validateMany from "../../../src/functions/validators/validateMany"; +import { validateMany } from "../../../src/functions/validators/validateMany"; describe( "The validateMany function", () => { it( "considers a group of Valid and Unknown blocks to be Valid.", () => { diff --git a/packages/schema-blocks/tests/instructions/blocks/Select.test.ts b/packages/schema-blocks/tests/instructions/blocks/Select.test.ts index 0b5aae7e66..07843154f7 100644 --- a/packages/schema-blocks/tests/instructions/blocks/Select.test.ts +++ b/packages/schema-blocks/tests/instructions/blocks/Select.test.ts @@ -3,7 +3,7 @@ import * as renderer from "react-test-renderer"; import { ReactElement } from "@wordpress/element"; import { BlockConfiguration, BlockInstance } from "@wordpress/blocks"; -import Select from "../../../src/instructions/blocks/Select"; +import { Select } from "../../../src/instructions/blocks/Select"; import { RenderSaveProps } from "../../../src/core/blocks/BlockDefinition"; import { RenderEditProps } from "../../../src/core/blocks/BlockDefinition"; From 9e0e3b7ce9cd381710a1d12de498c3c3481ea6a1 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Wed, 24 Mar 2021 10:32:35 +0100 Subject: [PATCH 06/12] Added optional message to BlockValidationResult. --- .../src/core/validation/BlockValidationResult.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/schema-blocks/src/core/validation/BlockValidationResult.ts b/packages/schema-blocks/src/core/validation/BlockValidationResult.ts index c2e14c5776..aaa0e881cc 100644 --- a/packages/schema-blocks/src/core/validation/BlockValidationResult.ts +++ b/packages/schema-blocks/src/core/validation/BlockValidationResult.ts @@ -25,15 +25,22 @@ export class BlockValidationResult { */ public issues: BlockValidationResult[] + /** + * An optional message describing the result. + */ + public message: string; + /** * @param clientId The clientId of the validated block. * @param name The name of the validated block. * @param result The validation result. + * @param message An optional message describing the result. */ - constructor( clientId: string, name: string, result: BlockValidation ) { + constructor( clientId: string, name: string, result: BlockValidation, message?: string ) { this.name = name; this.clientId = clientId; this.result = result; + this.message = message; this.issues = []; } From c033ce2779f3645b5da7a10734e3cec09da67ab0 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Wed, 24 Mar 2021 11:17:22 +0100 Subject: [PATCH 07/12] Added MissingBlock named constructor. --- .../core/validation/BlockValidationResult.ts | 18 +++++++++++++++ .../src/functions/BlockHelper.ts | 23 ++++++++++++++++++- .../functions/validators/innerBlocksValid.ts | 4 ++-- .../validators/innerBlocksValid.test.ts | 6 +++++ 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/packages/schema-blocks/src/core/validation/BlockValidationResult.ts b/packages/schema-blocks/src/core/validation/BlockValidationResult.ts index aaa0e881cc..632e8ffdef 100644 --- a/packages/schema-blocks/src/core/validation/BlockValidationResult.ts +++ b/packages/schema-blocks/src/core/validation/BlockValidationResult.ts @@ -1,5 +1,7 @@ import { BlockValidation } from "."; import { BlockInstance } from "@wordpress/blocks"; +import { getBlockType } from "../../functions/BlockHelper"; +import { sprintf, __ } from "@wordpress/i18n"; /** * Contains the result of a block validation. @@ -60,6 +62,22 @@ export class BlockValidationResult { ); } + /** + * Named constructor for a 'missing block' validation result. + * + * @param name The name of the missing block. + * + * @constructor + */ + static MissingBlock( name: string ) { + return new BlockValidationResult( + null, + name, + BlockValidation.MissingBlock, + sprintf( __( "The '%s' block is required but missing.", "yoast-schema-blocks" ), name ), + ); + } + /** * Named constructor for a 'valid' validation result. * diff --git a/packages/schema-blocks/src/functions/BlockHelper.ts b/packages/schema-blocks/src/functions/BlockHelper.ts index ad83957483..0ca585911f 100644 --- a/packages/schema-blocks/src/functions/BlockHelper.ts +++ b/packages/schema-blocks/src/functions/BlockHelper.ts @@ -43,4 +43,25 @@ function getBlockType( blockName: string ): Block | undefined { return select( "core/blocks" ).getBlockType( blockName ); } -export { getBlockByClientId, removeBlock, restoreBlock, getBlockType }; +/** + * Retrieves a human readable block name. + * + * @param blockName The block name (e.g. the Gutenberg block id). + * + * @returns A human readable block title. + */ +function getHumanReadableBlockName( blockName: string ): string { + const blockType = getBlockType( blockName ) || null; + if ( blockType ) { + return blockType.title; + } + + const lastSlash = blockName.lastIndexOf( "/" ); + if ( lastSlash < 0 || lastSlash === blockName.length - 1 ) { + return blockName; + } + + return blockName.substring( lastSlash + 1 ); +} + +export { getBlockByClientId, removeBlock, restoreBlock, getBlockType, getHumanReadableBlockName }; diff --git a/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts b/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts index 6d92b99a25..bacfea0516 100644 --- a/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts +++ b/packages/schema-blocks/src/functions/validators/innerBlocksValid.ts @@ -6,6 +6,7 @@ import recurseOverBlocks from "../blocks/recurseOverBlocks"; import { getInnerblocksByName } from "../innerBlocksHelper"; import logger from "../logger"; import isValidResult from "./isValidResult"; +import { getHumanReadableBlockName } from "../BlockHelper"; /** * Finds all blocks that should be in the inner blocks, but aren't. @@ -22,8 +23,7 @@ function findMissingBlocks( existingRequiredBlocks: BlockInstance[], requiredBlo } ); // These blocks should've existed, but they don't. - return missingRequiredBlocks.map( missingBlock => - new BlockValidationResult( null, missingBlock.name, BlockValidation.MissingBlock ) ); + return missingRequiredBlocks.map( missingBlock => BlockValidationResult.MissingBlock( getHumanReadableBlockName( missingBlock.name ) ) ); } /** diff --git a/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts b/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts index f6f1bdba10..916e317a36 100644 --- a/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts +++ b/packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts @@ -14,6 +14,12 @@ getBlockDefinitionMock.mockImplementation( ( name: string ) => { return mockBlockRegistry[ name ]; } ); +jest.mock( "../../../src/functions/BlockHelper", () => { + return { + getHumanReadableBlockName: jest.fn( name => name ), + }; +} ); + /** * Provides a fake definition. * @param clientId ClientId of the mocked Definition. From 17016cd16cd1b61e0cbf70b406f7f64cf805144b Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Wed, 24 Mar 2021 15:36:02 +0100 Subject: [PATCH 08/12] Refactored SidebarWarningPresenter. --- .../core/validation/BlockValidationResult.ts | 1 - .../presenters/SidebarWarningPresenter.ts | 125 ++++--------- .../tests/functions/BlocksHelper.test.ts | 36 +++- .../SidebarWarningPresenter.test.ts | 171 +++++++----------- 4 files changed, 140 insertions(+), 193 deletions(-) diff --git a/packages/schema-blocks/src/core/validation/BlockValidationResult.ts b/packages/schema-blocks/src/core/validation/BlockValidationResult.ts index 632e8ffdef..4d40a0dfa5 100644 --- a/packages/schema-blocks/src/core/validation/BlockValidationResult.ts +++ b/packages/schema-blocks/src/core/validation/BlockValidationResult.ts @@ -1,6 +1,5 @@ import { BlockValidation } from "."; import { BlockInstance } from "@wordpress/blocks"; -import { getBlockType } from "../../functions/BlockHelper"; import { sprintf, __ } from "@wordpress/i18n"; /** diff --git a/packages/schema-blocks/src/functions/presenters/SidebarWarningPresenter.ts b/packages/schema-blocks/src/functions/presenters/SidebarWarningPresenter.ts index c8f9a615b8..11a716e9ed 100644 --- a/packages/schema-blocks/src/functions/presenters/SidebarWarningPresenter.ts +++ b/packages/schema-blocks/src/functions/presenters/SidebarWarningPresenter.ts @@ -1,27 +1,22 @@ -import { getBlockType } from "../BlockHelper"; import { select } from "@wordpress/data"; -import { __ } from "@wordpress/i18n"; -import { get } from "lodash"; -import { BlockValidationResult } from "../../core/validation"; -import { BlockValidation } from "../../core/validation"; +import { __, sprintf } from "@wordpress/i18n"; -const analysisMessageTemplates: Record = { - [ BlockValidation.MissingBlock ]: "The '{child}' block is {status} but missing.", - [ BlockValidation.MissingAttribute ]: "The '{child}' block is empty.", -}; +import { BlockValidation, BlockValidationResult } from "../../core/validation"; type clientIdValidation = Record; -type analysisIssue = { - name: string; - parent: string; - result: BlockValidation; - status: string; -}; - +/** + * A warning message for in the sidebar schema analysis. + */ export type sidebarWarning = { + /** + * The warning message. + */ text: string; - color: string; + /** + * Color of the warning. + */ + color: "red" | "green"; } /** @@ -40,46 +35,30 @@ function getValidationResult( clientId: string ): BlockValidationResult | null { return validationResults[ clientId ]; } -/** - * Transforms a template into a warning message given validation details. - * - * @param issue Details about the current issue. - * - * @returns {string} The presentable warning message appropriate for this issue. - */ -export function replaceVariables( issue: analysisIssue ): string { - const warning = get( analysisMessageTemplates, issue.result, "" ); - return warning.replace( "{parent}", __( issue.parent, "wpseo-schema-blocks" ) ) - .replace( "{child}", __( issue.name, "wpseo-schema-blocks" ) ) - .replace( "{status}", __( issue.status, "wpseo-schema-blocks" ) ); -} - /** * Adds analysis conclusions to the footer. * * @param validation The validation result for the current block. - * @param issues The detected issues with metadata. + * @param issues The detected issues. * - * @returns {sidebarWarning} Any analysis conclusions that should be in the footer. + * @returns Any analysis conclusions that should be in the footer. */ -function getAnalysisConclusion( validation: BlockValidation, issues: analysisIssue[] ): sidebarWarning { - if ( issues.some( issue => issue.result === BlockValidation.MissingBlock || - issue.result === BlockValidation.MissingAttribute ) ) { - return { - text: __( "Not all required blocks are completed! No " + issues[ 0 ].parent + - " schema will be generated for your page.", "wpseo-schema-blocks" ), - color: "red", - } as sidebarWarning; - } +function getAnalysisConclusion( validation: BlockValidationResult, issues: BlockValidationResult[] ): sidebarWarning { + let conclusionText = ""; - if ( validation === BlockValidation.Valid || - issues.every( issue => issue.result !== BlockValidation.MissingAttribute && - issue.result !== BlockValidation.MissingBlock ) ) { - return { - text: __( "Good job! All required blocks are completed.", "wpseo-schema-blocks" ), - color: "green", - } as sidebarWarning; + if ( issues.some( issue => issue.result === BlockValidation.MissingBlock ) ) { + conclusionText = sprintf( + /* translators: %s expands to the schema block name. */ + __( "Not all required blocks are completed! No %s schema will be generated for your page.", "yoast-schema-blocks" ), + sanitizeParentName( validation.name ), + ); + + return { text: conclusionText, color: "red" }; } + + conclusionText = __( "Good job! All required blocks are completed.", "yoast-schema-blocks" ); + + return { text: conclusionText, color: "green" }; } /** @@ -105,49 +84,19 @@ function getAllDescendantIssues( validation: BlockValidationResult ): BlockValid * @returns {sidebarWarning[]} The formatted warnings. */ export function createAnalysisMessages( validation: BlockValidationResult ): sidebarWarning[] { - const parent = sanitizeBlockName( validation.name ); - - // Create a message if there are any validation issues we have a template for. - const messageData: analysisIssue[] = getAllDescendantIssues( validation ) - .filter( ( issue: BlockValidationResult ) => issue.result in analysisMessageTemplates ) - .map( ( issue: BlockValidationResult ) => ( { - name: sanitizeBlockName( issue.name ), - parent: sanitizeParentName( parent ), - result: issue.result, - status: "required", - } ) ); - const messages = messageData.map( msg => { - return { text: replaceVariables( msg ), color: "red" } as sidebarWarning; - } ); + let issues = getAllDescendantIssues( validation ); - const conclusion = getAnalysisConclusion( validation.result, messageData ); + // We are only interested in showing messages for missing blocks, or for invalid blocks that provide a custom message. + issues = issues.filter( issue => issue.result === BlockValidation.MissingBlock || ( issue.result === BlockValidation.Invalid && issue.message ) ); - if ( conclusion ) { - messages.push( conclusion ); - } + const messages: sidebarWarning[] = issues.map( issue => ( { + color: "red", + text: issue.message, + } ) ); - return messages; -} + messages.push( getAnalysisConclusion( validation, issues ) ); -/** - * Makes a block name human readable. - * - * @param blockName The block name to sanitize. - * - * @returns {string} The sanitized block name. - */ -export function sanitizeBlockName( blockName: string ): string { - const blockType = getBlockType( blockName ) || ""; - if ( blockType ) { - return blockType.title; - } - - const lastSlash = blockName.lastIndexOf( "/" ); - if ( lastSlash < 0 || lastSlash === blockName.length - 1 ) { - return blockName; - } - - return blockName.substring( lastSlash + 1 ); + return messages; } /** diff --git a/packages/schema-blocks/tests/functions/BlocksHelper.test.ts b/packages/schema-blocks/tests/functions/BlocksHelper.test.ts index 6785f98687..d113abe03c 100644 --- a/packages/schema-blocks/tests/functions/BlocksHelper.test.ts +++ b/packages/schema-blocks/tests/functions/BlocksHelper.test.ts @@ -1,13 +1,21 @@ import { dispatch, select } from "@wordpress/data"; import { BlockInstance } from "@wordpress/blocks"; -import { removeBlock, restoreBlock, getBlockType } from "../../src/functions/BlockHelper"; +import { removeBlock, restoreBlock, getBlockType, getHumanReadableBlockName } from "../../src/functions/BlockHelper"; + +const blockTypes: Record = {}; jest.mock( "@wordpress/data", () => { return { select: jest.fn( () => { return { - getBlockType: jest.fn(), + getBlockType: jest.fn( ( blockName ) => { + const title = blockTypes[ blockName ]; + if ( title ) { + return { title }; + } + return null; + } ), }; } ), dispatch: jest.fn( () => { @@ -64,3 +72,27 @@ describe( "The getBlockType function", () => { expect( select ).toHaveBeenCalledWith( "core/blocks" ); } ); } ); + +describe( "The sanitizeBlockName method ", () => { + it( "returns a block title from the wordpress store based on its name", () => { + blockTypes[ "yoast/testblock" ] = "testBlockWithoutPrefix"; + + const result = getHumanReadableBlockName( "yoast/testblock" ); + + expect( result ).toEqual( "testBlockWithoutPrefix" ); + } ); + + it( "uses a fallback method to reduce technical block names to human-readable ones.", () => { + const testcases = [ + "test/blok", + "test-erde-test/test/blok", + "/blok", + "blok", + "blok/", + ]; + + const results = testcases.map( input => getHumanReadableBlockName( input ) ); + + expect( results ).toEqual( [ "blok", "blok", "blok", "blok", "blok/" ] ); + } ); +} ); diff --git a/packages/schema-blocks/tests/functions/presenters/SidebarWarningPresenter.test.ts b/packages/schema-blocks/tests/functions/presenters/SidebarWarningPresenter.test.ts index 5b01b25119..929f997c21 100644 --- a/packages/schema-blocks/tests/functions/presenters/SidebarWarningPresenter.test.ts +++ b/packages/schema-blocks/tests/functions/presenters/SidebarWarningPresenter.test.ts @@ -1,8 +1,7 @@ import { BlockValidation, BlockValidationResult } from "../../../src/core/validation"; -import getWarnings, { createAnalysisMessages, sanitizeBlockName } from "../../../src/functions/presenters/SidebarWarningPresenter"; +import getWarnings, { createAnalysisMessages } from "../../../src/functions/presenters/SidebarWarningPresenter"; const validations: Record = {}; -const blockTypes: Record = {}; jest.mock( "@wordpress/data", () => { return { @@ -11,128 +10,96 @@ jest.mock( "@wordpress/data", () => { getSchemaBlocksValidationResults: jest.fn( () => { return validations; } ), - getBlockType: jest.fn( ( blockName ) => { - const title = blockTypes[ blockName ]; - if ( title ) { - return { title }; - } - return null; - } ), }; } ), }; } ); -describe( "The createAnalysisMessages method ", () => { - it( "creates a compliment for valid blocks.", () => { - const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Valid ); - - const result = createAnalysisMessages( testcase ); - - expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); - } ); - - it( "creates a compliment for validation results we have no copy for.", () => { - const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Skipped ); - - const result = createAnalysisMessages( testcase ); - - expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); - } ); +describe( "The SidebarWarningPresenter ", () => { + describe( "The createAnalysisMessages method ", () => { + it( "creates a compliment for valid blocks.", () => { + const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Valid ); - it( "creates warning messages for missing attributes, with a footer message.", () => { - const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Invalid ); - testcase.issues.push( new BlockValidationResult( null, "missingblockattribute", BlockValidation.MissingAttribute ) ); + const result = createAnalysisMessages( testcase ); - const result = createAnalysisMessages( testcase ); + expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); + } ); - expect( result.length ).toEqual( 2 ); - expect( result[ 0 ] ).toEqual( { text: "The 'missingblockattribute' block is empty.", color: "red" } ); - expect( result[ 1 ] ).toEqual( - { - text: "Not all required blocks are completed! No mijnblock schema will be generated for your page.", - color: "red", - }, - ); - } ); + it( "creates a compliment for validation results we have no copy for.", () => { + const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Skipped ); - it( "creates warning messages for missing blocks, with a footer message.", () => { - const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Invalid ); - testcase.issues.push( new BlockValidationResult( null, "missingblock", BlockValidation.MissingBlock ) ); + const result = createAnalysisMessages( testcase ); - const result = createAnalysisMessages( testcase ); + expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); + } ); - expect( result.length ).toEqual( 2 ); - expect( result[ 0 ] ).toEqual( { text: "The 'missingblock' block is required but missing.", color: "red" } ); - expect( result[ 1 ] ).toEqual( - { - text: "Not all required blocks are completed! No mijnblock schema will be generated for your page.", + it( "creates warning messages for missing blocks, with a footer message.", () => { + const testcase = new BlockValidationResult( "1", "mijnblock", BlockValidation.Invalid ); + testcase.issues.push( + new BlockValidationResult( + null, + "missingblock", + BlockValidation.MissingBlock, + "The 'missingblock' block is required but missing.", + ), + ); + + const result = createAnalysisMessages( testcase ); + + expect( result.length ).toEqual( 2 ); + expect( result[ 0 ] ).toEqual( { + text: "The 'missingblock' block is required but missing.", color: "red", - }, - ); - } ); -} ); - -describe( "The sanitizeBlockName method ", () => { - it( "returns a block title from the wordpress store based on its name", () => { - blockTypes[ "yoast/testblock" ] = "testBlockWithoutPrefix"; - - const result = sanitizeBlockName( "yoast/testblock" ); - - expect( result ).toEqual( "testBlockWithoutPrefix" ); - } ); - - it( "uses a fallback method to reduce technical block names to human-readable ones.", () => { - const testcases = [ - "test/blok", - "test-erde-test/test/blok", - "/blok", - "blok", - "blok/", - ]; - - const results = testcases.map( input => sanitizeBlockName( input ) ); - - expect( results ).toEqual( [ "blok", "blok", "blok", "blok", "blok/" ] ); + } ); + expect( result[ 1 ] ).toEqual( + { + text: "Not all required blocks are completed! No mijnblock schema will be generated for your page.", + color: "red", + }, + ); + } ); } ); -} ); -describe( "The getWarnings method ", () => { - it( "creates a compliment for valid blocks.", () => { - validations[ "1" ] = new BlockValidationResult( "1", "myBlock", BlockValidation.Valid ); + describe( "The getWarnings method ", () => { + it( "creates a compliment for valid blocks.", () => { + validations[ "1" ] = new BlockValidationResult( "1", "myBlock", BlockValidation.Valid ); - const result = getWarnings( "1" ); + const result = getWarnings( "1" ); - expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); - } ); + expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); + } ); - it( "creates a compliment if we do not have copy for any of the validations.", () => { - const testcase = new BlockValidationResult( "1", "myBlock", BlockValidation.Invalid ); - testcase.issues.push( new BlockValidationResult( "2", "innerblock1", BlockValidation.Skipped ) ); - testcase.issues.push( new BlockValidationResult( "3", "anotherinnerblock", BlockValidation.TooMany ) ); - testcase.issues.push( new BlockValidationResult( "4", "anotherinnerblock", BlockValidation.Unknown ) ); - validations[ "1" ] = testcase; + it( "creates a compliment if we do not have copy for any of the validations.", () => { + const testcase = new BlockValidationResult( "1", "myBlock", BlockValidation.Invalid ); + testcase.issues.push( new BlockValidationResult( "2", "innerblock1", BlockValidation.Skipped ) ); + testcase.issues.push( new BlockValidationResult( "3", "anotherinnerblock", BlockValidation.TooMany ) ); + testcase.issues.push( new BlockValidationResult( "4", "anotherinnerblock", BlockValidation.Unknown ) ); + validations[ "1" ] = testcase; - const result = getWarnings( "1" ); + const result = getWarnings( "1" ); - expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); - } ); + expect( result ).toEqual( [ { text: "Good job! All required blocks are completed.", color: "green" } ] ); + } ); - it( "creates a warning for a block with validation problems.", () => { - const testcase = new BlockValidationResult( "1", "myBlock", BlockValidation.Invalid ); - testcase.issues.push( new BlockValidationResult( "2", "innerblock1", BlockValidation.MissingBlock ) ); - validations[ "1" ] = testcase; + it( "creates a warning for a block with validation problems.", () => { + const testcase = new BlockValidationResult( "1", "myBlock", BlockValidation.Invalid ); + testcase.issues.push( + new BlockValidationResult( "2", "innerblock1", BlockValidation.MissingBlock, "The 'innerblock1' block is required but missing." ), + ); + validations[ "1" ] = testcase; - const result = getWarnings( "1" ); + const result = getWarnings( "1" ); - expect( result.length ).toEqual( 2 ); - expect( result[ 0 ] ).toEqual( { - text: "The 'innerblock1' block is required but missing.", - color: "red", - } ); - expect( result[ 1 ] ).toEqual( { - text: "Not all required blocks are completed! No myblock schema will be generated for your page.", - color: "red", + expect( result.length ).toEqual( 2 ); + expect( result[ 0 ] ).toEqual( { + text: "The 'innerblock1' block is required but missing.", + color: "red", + } ); + expect( result[ 1 ] ).toEqual( { + text: "Not all required blocks are completed! No myblock schema will be generated for your page.", + color: "red", + } ); } ); } ); } ); + From 5c41b4f116fe1ecc8f0b96c937002e55d029aaaf Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Wed, 24 Mar 2021 16:00:17 +0100 Subject: [PATCH 09/12] Added test for BlockValidationResult. --- .../validation/BlockValidationResult.test.ts | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 packages/schema-blocks/tests/core/validation/BlockValidationResult.test.ts diff --git a/packages/schema-blocks/tests/core/validation/BlockValidationResult.test.ts b/packages/schema-blocks/tests/core/validation/BlockValidationResult.test.ts new file mode 100644 index 0000000000..35aa74a952 --- /dev/null +++ b/packages/schema-blocks/tests/core/validation/BlockValidationResult.test.ts @@ -0,0 +1,77 @@ +import { BlockValidation, BlockValidationResult } from "../../../src/core/validation"; +import { BlockInstance } from "@wordpress/blocks"; + +describe( "BlockValidationResult", () => { + it( "can create a BlockValidationResult using the default constructor, with no message", () => { + const result = new BlockValidationResult( + "12345", + "Block", + BlockValidation.Invalid, + ); + + expect( result.name ).toEqual( "Block" ); + expect( result.result ).toEqual( BlockValidation.Invalid ); + expect( result.clientId ).toEqual( "12345" ); + expect( result.issues ).toHaveLength( 0 ); + expect( result.message ).toBeUndefined(); + } ); + + it( "can create a BlockValidationResult using the default constructor, with a message", () => { + const result = new BlockValidationResult( + "12345", + "Block", + BlockValidation.Invalid, + "A message.", + ); + + expect( result.name ).toEqual( "Block" ); + expect( result.result ).toEqual( BlockValidation.Invalid ); + expect( result.clientId ).toEqual( "12345" ); + expect( result.issues ).toHaveLength( 0 ); + expect( result.message ).toEqual( "A message." ); + } ); + + it( "can create a BlockValidationResult using the MissingBlock constructor", () => { + const result = BlockValidationResult.MissingBlock( "Block" ); + + expect( result.name ).toEqual( "Block" ); + expect( result.result ).toEqual( BlockValidation.MissingBlock ); + expect( result.clientId ).toBeNull(); + expect( result.issues ).toHaveLength( 0 ); + expect( result.message ).toEqual( "The 'Block' block is required but missing." ); + } ); + + it( "can create a BlockValidationResult using the MissingAttribute constructor", () => { + const block: BlockInstance = { + clientId: "12345", + name: "Block", + attributes: [], + isValid: true, + innerBlocks: [], + }; + const result = BlockValidationResult.MissingAttribute( block ); + + expect( result.name ).toEqual( "Block" ); + expect( result.result ).toEqual( BlockValidation.MissingAttribute ); + expect( result.clientId ).toEqual( "12345" ); + expect( result.issues ).toHaveLength( 0 ); + expect( result.message ).toBeUndefined(); + } ); + + it( "can create a BlockValidationResult using the Valid constructor", () => { + const block: BlockInstance = { + clientId: "12345", + name: "Block", + attributes: [], + isValid: true, + innerBlocks: [], + }; + const result = BlockValidationResult.Valid( block ); + + expect( result.name ).toEqual( "Block" ); + expect( result.result ).toEqual( BlockValidation.Valid ); + expect( result.clientId ).toEqual( "12345" ); + expect( result.issues ).toHaveLength( 0 ); + expect( result.message ).toBeUndefined(); + } ); +} ); From 68c3dbd4990df8ab44218c06af226054998a8a85 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Thu, 25 Mar 2021 09:58:00 +0100 Subject: [PATCH 10/12] Fix schema imports. --- packages/schema-blocks/src/functions/intialize.ts | 3 +++ packages/schema-blocks/src/instructions/schema/index.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/schema-blocks/src/functions/intialize.ts b/packages/schema-blocks/src/functions/intialize.ts index a3b1467bca..8ec6b44761 100644 --- a/packages/schema-blocks/src/functions/intialize.ts +++ b/packages/schema-blocks/src/functions/intialize.ts @@ -1,3 +1,6 @@ +// Import and register instructions. +import "../instructions"; + import logger, { LogLevel } from "./logger"; import { registerBlockType } from "@wordpress/blocks"; import { WarningBlock } from "../blocks/warning-block/configuration"; diff --git a/packages/schema-blocks/src/instructions/schema/index.ts b/packages/schema-blocks/src/instructions/schema/index.ts index 8b02664bb9..dff8d85004 100644 --- a/packages/schema-blocks/src/instructions/schema/index.ts +++ b/packages/schema-blocks/src/instructions/schema/index.ts @@ -7,4 +7,7 @@ import "./InnerBlocksID"; import "./JobEmploymentType"; import "./List"; import "./Permalink"; -import "./Schema"; +import SchemaInstruction from "./Schema"; + +// Need to export something for the side-effects of the imports to work... +export { SchemaInstruction }; From 9249563f51728219f1cb8dfb38fdd4d46bd57e81 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Thu, 25 Mar 2021 10:05:45 +0100 Subject: [PATCH 11/12] Fixed spacing. --- .../src/core/blocks/BlockDefinition.tsx | 2 +- .../src/instructions/blocks/Block.tsx | 2 +- .../instructions/blocks/CurrencySelect.tsx | 6 +- .../src/instructions/blocks/Date.tsx | 60 +++++++++---------- .../instructions/blocks/InheritSidebar.tsx | 28 ++++----- .../src/instructions/blocks/InnerBlocks.tsx | 60 +++++++++---------- .../src/instructions/blocks/Select.tsx | 56 ++++++++--------- .../instructions/blocks/SidebarCheckbox.tsx | 24 ++++---- .../src/instructions/blocks/TextInput.tsx | 30 +++++----- .../instructions/blocks/VariationPicker.tsx | 1 - 10 files changed, 134 insertions(+), 135 deletions(-) diff --git a/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx b/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx index 98f3a962c7..6ff5e3f3a4 100644 --- a/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx +++ b/packages/schema-blocks/src/core/blocks/BlockDefinition.tsx @@ -84,7 +84,7 @@ export class BlockDefinition extends Definition { configuration.edit = props => this.edit( props ); configuration.save = props => this.save( props ); - + logger.info( "registering block " + name ); // Register the block to WordPress. diff --git a/packages/schema-blocks/src/instructions/blocks/Block.tsx b/packages/schema-blocks/src/instructions/blocks/Block.tsx index d68a5550cd..3ec92cf26f 100644 --- a/packages/schema-blocks/src/instructions/blocks/Block.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Block.tsx @@ -33,4 +33,4 @@ class Block extends BlockInstruction { } } -BlockInstruction.register("block", Block); +BlockInstruction.register( "block", Block ); diff --git a/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx b/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx index 499d49b984..6cd9ee039d 100644 --- a/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx +++ b/packages/schema-blocks/src/instructions/blocks/CurrencySelect.tsx @@ -199,9 +199,9 @@ class CurrencySelect extends Select { id: number, options: InstructionOptions, ) { - super(id, options); - this.options.options = arrayOrObjectToOptions(currencyCodes); + super( id, options ); + this.options.options = arrayOrObjectToOptions( currencyCodes ); } } -BlockInstruction.register("currency-select", CurrencySelect); +BlockInstruction.register( "currency-select", CurrencySelect ); diff --git a/packages/schema-blocks/src/instructions/blocks/Date.tsx b/packages/schema-blocks/src/instructions/blocks/Date.tsx index 736ca152da..ad3e8743e5 100644 --- a/packages/schema-blocks/src/instructions/blocks/Date.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Date.tsx @@ -25,18 +25,18 @@ export default class Date extends BlockInstruction { * * @return The React components to show in the editor when editing this block. */ - edit(props: RenderEditProps): JSX.Element { + edit( props: RenderEditProps ): JSX.Element { const { attributes, setAttributes } = props; const dateFormat = Date.getDateFormat(); - const currentlySelectedDate = dateI18n(dateFormat, attributes[this.options.name]); + const currentlySelectedDate = dateI18n( dateFormat, attributes[ this.options.name ] ); - const [selectedDate, setSelectedDate] = useState(currentlySelectedDate); + const [ selectedDate, setSelectedDate ] = useState( currentlySelectedDate ); - let currentValue = __("Select a date", "yoast-schema-blocks"); - if (attributes[this.options.name]) { - currentValue = format("Y-m-d", getDate()); + let currentValue = __( "Select a date", "yoast-schema-blocks" ); + if ( attributes[ this.options.name ] ) { + currentValue = format( "Y-m-d", getDate() ); } /** @@ -44,14 +44,14 @@ export default class Date extends BlockInstruction { * * @param dateTime The selected date and time in the form 'yyyy-MM-ddThh:mm:ss' (only the date part is used). */ - const setDate = useCallback((dateTime: string) => { - const date = dateTime ? dateTime.split("T")[0] : null; + const setDate = useCallback( ( dateTime: string ) => { + const date = dateTime ? dateTime.split( "T" )[ 0 ] : null; - setAttributes({ - [this.options.name]: date, - }); - setSelectedDate(dateI18n(dateFormat, date)); - }, [props, dateFormat, setSelectedDate]); + setAttributes( { + [ this.options.name ]: date, + } ); + setSelectedDate( dateI18n( dateFormat, date ) ); + }, [ props, dateFormat, setSelectedDate ] ); /** * Render toggle. @@ -60,34 +60,34 @@ export default class Date extends BlockInstruction { * * @return The rendered toggle element. */ - const renderToggle = useCallback((renderProps: Dropdown.RenderProps): JSX.Element => { + const renderToggle = useCallback( ( renderProps: Dropdown.RenderProps ): JSX.Element => { return ; - }, [selectedDate]); + }, [ selectedDate ] ); /** * Renders the content of the dropdown element. * * @returns The rendered content of the dropdown element. */ - const renderContent = useCallback((): JSX.Element => { + const renderContent = useCallback( (): JSX.Element => { return
; - }, [selectedDate, setDate]); + }, [ selectedDate, setDate ] ); return ; } @@ -115,16 +115,16 @@ export default class Date extends BlockInstruction { * * @return The HTML to save to the database. */ - save(props: RenderSaveProps): JSX.Element { - const date = props.attributes[this.options.name] as string; + save( props: RenderSaveProps ): JSX.Element { + const date = props.attributes[ this.options.name ] as string; - if (!date) { + if ( ! date ) { return null; } const dateFormat = Date.getDateFormat(); - return
; + return
; } /** @@ -136,7 +136,7 @@ export default class Date extends BlockInstruction { configuration(): Partial { return { attributes: { - [this.options.name]: { + [ this.options.name ]: { type: "string", }, }, @@ -144,4 +144,4 @@ export default class Date extends BlockInstruction { } } -BlockInstruction.register("date", Date); +BlockInstruction.register( "date", Date ); diff --git a/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx b/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx index 354b0bd995..a406708b2b 100644 --- a/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx +++ b/packages/schema-blocks/src/instructions/blocks/InheritSidebar.tsx @@ -24,23 +24,23 @@ export default class InheritSidebar extends BlockInstruction { * * @returns The sidebar element. */ - sidebar(props: BlockEditProps>, i: number): ReactElement { + sidebar( props: BlockEditProps>, i: number ): ReactElement { let parentIds: string[] = []; - if (this.options.parents) { - parentIds = getParentIdOfType(props.clientId, this.options.parents); + if ( this.options.parents ) { + parentIds = getParentIdOfType( props.clientId, this.options.parents ); } const elements: ReactElement[] = []; - if (parentIds.length > 0) { - parentIds.forEach(parentId => { - const parentBlock = getBlockByClientId(parentId); - const parentBlockDefinition = getBlockDefinition(parentBlock.name); - if (parentBlockDefinition) { - logger.debug(this.options.name + " inherited sidebar from " + parentBlock.name + " definition"); - const parentProps = createBlockEditProps(parentBlock); - elements.push(...parentBlockDefinition.sidebarElements(parentProps)); + if ( parentIds.length > 0 ) { + parentIds.forEach( parentId => { + const parentBlock = getBlockByClientId( parentId ); + const parentBlockDefinition = getBlockDefinition( parentBlock.name ); + if ( parentBlockDefinition ) { + logger.debug( this.options.name + " inherited sidebar from " + parentBlock.name + " definition" ); + const parentProps = createBlockEditProps( parentBlock ); + elements.push( ...parentBlockDefinition.sidebarElements( parentProps ) ); } - }); + } ); } return ( @@ -59,7 +59,7 @@ export default class InheritSidebar extends BlockInstruction { configuration(): Partial { return { attributes: { - [this.options.name]: { + [ this.options.name ]: { parents: this.options.parents, }, }, @@ -67,4 +67,4 @@ export default class InheritSidebar extends BlockInstruction { } } -BlockInstruction.register("inherit-sidebar", InheritSidebar); +BlockInstruction.register( "inherit-sidebar", InheritSidebar ); diff --git a/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx b/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx index 18cd13cea0..cfb1ea8643 100644 --- a/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx +++ b/packages/schema-blocks/src/instructions/blocks/InnerBlocks.tsx @@ -37,8 +37,8 @@ export default class InnerBlocks extends BlockInstruction { * * @returns The inner blocks. */ - save(props: RenderSaveProps, leaf: BlockLeaf, i: number): ReactElement | string { - return createElement(WordPressInnerBlocks.Content, { key: i }); + save( props: RenderSaveProps, leaf: BlockLeaf, i: number ): ReactElement | string { + return createElement( WordPressInnerBlocks.Content, { key: i } ); } /** @@ -50,7 +50,7 @@ export default class InnerBlocks extends BlockInstruction { * * @returns The inner blocks. */ - edit(props: RenderEditProps, leaf: BlockLeaf, i: number): ReactElement | string { + edit( props: RenderEditProps, leaf: BlockLeaf, i: number ): ReactElement | string { const properties: React.ClassAttributes & InnerBlocksProps = { key: i, }; @@ -58,15 +58,15 @@ export default class InnerBlocks extends BlockInstruction { this.options.requiredBlocks = this.options.requiredBlocks || []; this.options.recommendedBlocks = this.options.recommendedBlocks || []; - this.renderAppender(properties); + this.renderAppender( properties ); - this.arrangeAllowedBlocks(properties); + this.arrangeAllowedBlocks( properties ); - if (this.options.template) { + if ( this.options.template ) { properties.template = this.options.template; } - return createElement(WordPressInnerBlocks, properties as WordPressInnerBlocks.Props); + return createElement( WordPressInnerBlocks, properties as WordPressInnerBlocks.Props ); } /** @@ -74,28 +74,28 @@ export default class InnerBlocks extends BlockInstruction { * * @param properties The properties of the innerblock. */ - private renderAppender(properties: React.ClassAttributes & InnerBlocksProps) { - if (this.options.appender === false) { + private renderAppender( properties: React.ClassAttributes & InnerBlocksProps ) { + if ( this.options.appender === false ) { properties.renderAppender = false; return; } - if (this.options.appender === "button") { + if ( this.options.appender === "button" ) { properties.renderAppender = () => { // The type definition of InnerBlocks are wrong so cast to fix them. - return createElement((WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass }).ButtonBlockAppender); + return createElement( ( WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass } ).ButtonBlockAppender ); }; } else { - properties.renderAppender = () => createElement(WordPressInnerBlocks.DefaultBlockAppender); + properties.renderAppender = () => createElement( WordPressInnerBlocks.DefaultBlockAppender ); } - if (typeof this.options.appenderLabel === "string") { + if ( typeof this.options.appenderLabel === "string" ) { properties.renderAppender = () => { return createElement( "div", { className: "yoast-labeled-inserter", "data-label": this.options.appenderLabel }, // The type definition of InnerBlocks are wrong so cast to fix them. - createElement((WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass }).ButtonBlockAppender), + createElement( ( WordPressInnerBlocks as unknown as { ButtonBlockAppender: ComponentClass } ).ButtonBlockAppender ), ); }; } @@ -106,16 +106,16 @@ export default class InnerBlocks extends BlockInstruction { * * @param properties The properties of the current block. */ - private arrangeAllowedBlocks(properties: React.ClassAttributes & InnerBlocksProps) { - properties.allowedBlocks = ["yoast/warning-block"]; + private arrangeAllowedBlocks( properties: React.ClassAttributes & InnerBlocksProps ) { + properties.allowedBlocks = [ "yoast/warning-block" ]; - if (this.options.allowedBlocks) { - properties.allowedBlocks = this.options.allowedBlocks.concat(properties.allowedBlocks); + if ( this.options.allowedBlocks ) { + properties.allowedBlocks = this.options.allowedBlocks.concat( properties.allowedBlocks ); } properties.allowedBlocks = properties.allowedBlocks - .concat(this.options.requiredBlocks.map(block => block.name)) - .concat(this.options.recommendedBlocks.map(block => block.name)); + .concat( this.options.requiredBlocks.map( block => block.name ) ) + .concat( this.options.recommendedBlocks.map( block => block.name ) ); } /** @@ -125,15 +125,15 @@ export default class InnerBlocks extends BlockInstruction { * * @returns The sidebar element to render. */ - sidebar(props: RenderEditProps): ReactElement { - const currentBlock = getBlockByClientId(props.clientId); - if (!currentBlock) { + sidebar( props: RenderEditProps ): ReactElement { + const currentBlock = getBlockByClientId( props.clientId ); + if ( ! currentBlock ) { return null; } - const elements: ReactElement[] = innerBlocksSidebar(currentBlock, this.options); + const elements: ReactElement[] = innerBlocksSidebar( currentBlock, this.options ); - if (elements && elements.length === 0) { + if ( elements && elements.length === 0 ) { return null; } @@ -151,11 +151,11 @@ export default class InnerBlocks extends BlockInstruction { * * @returns {BlockValidationResult} The validation result. */ - validate(blockInstance: BlockInstance): BlockValidationResult { - const validation = new BlockValidationResult(blockInstance.clientId, blockInstance.name, BlockValidation.Unknown); - validation.issues = validateInnerBlocks(blockInstance, this.options.requiredBlocks); - return validateMany(validation); + validate( blockInstance: BlockInstance ): BlockValidationResult { + const validation = new BlockValidationResult( blockInstance.clientId, blockInstance.name, BlockValidation.Unknown ); + validation.issues = validateInnerBlocks( blockInstance, this.options.requiredBlocks ); + return validateMany( validation ); } } -BlockInstruction.register("inner-blocks", InnerBlocks); +BlockInstruction.register( "inner-blocks", InnerBlocks ); diff --git a/packages/schema-blocks/src/instructions/blocks/Select.tsx b/packages/schema-blocks/src/instructions/blocks/Select.tsx index e990bee1e6..9b16972bf8 100644 --- a/packages/schema-blocks/src/instructions/blocks/Select.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Select.tsx @@ -47,14 +47,14 @@ export class Select extends BlockInstruction { * * @returns {JSX.Element} The element to render. */ - save(props: RenderSaveProps): ReactElement | string { + save( props: RenderSaveProps ): ReactElement | string { const { label, name, hideLabelFromVision } = this.options; - const value = props.attributes[name] as string; + const value = props.attributes[ name ] as string; - return - {!hideLabelFromVision && {label}:} - {this.label(value) + " "} + return + { ! hideLabelFromVision && { label }: } + { this.label( value ) + " " } ; } @@ -65,9 +65,9 @@ export class Select extends BlockInstruction { * * @returns The label of the selected option. */ - protected label(value: string): string { - const foundOption = this.options.options.find(option => option.value === value); - if (foundOption) { + protected label( value: string ): string { + const foundOption = this.options.options.find( option => option.value === value ); + if ( foundOption ) { return foundOption.label; } return null; @@ -80,13 +80,13 @@ export class Select extends BlockInstruction { * * @returns {JSX.Element} The element to render. */ - edit(props: RenderEditProps): ReactElement | string { + edit( props: RenderEditProps ): ReactElement | string { const { label, options, hideLabelFromVision, className, defaultValue } = this.options; - const value = props.attributes[this.options.name] as string; + const value = props.attributes[ this.options.name ] as string; - if (!value) { - props.setAttributes({ [this.options.name]: defaultValue || options[0].value }); + if ( ! value ) { + props.setAttributes( { [ this.options.name ]: defaultValue || options[ 0 ].value } ); } /** @@ -96,19 +96,19 @@ export class Select extends BlockInstruction { */ const onChange = useCallback( newValue => { - props.setAttributes({ [this.options.name]: newValue }); + props.setAttributes( { [ this.options.name ]: newValue } ); }, - [props], + [ props ], ); return ; } @@ -120,7 +120,7 @@ export class Select extends BlockInstruction { configuration(): Partial { return { attributes: { - [this.options.name]: { + [ this.options.name ]: { required: this.options.required === true, }, }, @@ -134,14 +134,14 @@ export class Select extends BlockInstruction { * * @returns `true` if the instruction block is valid, `false` if the block contains errors. */ - valid(blockInstance: BlockInstance): boolean { - if (this.options.required === true) { - return attributeExists(blockInstance, this.options.name as string) && - attributeNotEmpty(blockInstance, this.options.name as string); + valid( blockInstance: BlockInstance ): boolean { + if ( this.options.required === true ) { + return attributeExists( blockInstance, this.options.name as string ) && + attributeNotEmpty( blockInstance, this.options.name as string ); } - return attributeExists(blockInstance, this.options.name as string); + return attributeExists( blockInstance, this.options.name as string ); } } -BlockInstruction.register("select", Select); +BlockInstruction.register( "select", Select ); diff --git a/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx b/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx index 50ce6cc947..ba7ec0ee54 100644 --- a/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx +++ b/packages/schema-blocks/src/instructions/blocks/SidebarCheckbox.tsx @@ -20,7 +20,7 @@ class SidebarCheckbox extends BlockInstruction { * * @returns The sidebar element. */ - sidebar(props: RenderEditProps): JSX.Element { + sidebar( props: RenderEditProps ): JSX.Element { const { name, label, help } = this.options; /** @@ -30,16 +30,16 @@ class SidebarCheckbox extends BlockInstruction { */ const onChange = useCallback( newValue => { - props.setAttributes({ [this.options.name]: newValue }); + props.setAttributes( { [ this.options.name ]: newValue } ); }, - [props], + [ props ], ); return ; } @@ -50,9 +50,9 @@ class SidebarCheckbox extends BlockInstruction { * * @returns {JSX.Element} The element to render. */ - save(props: RenderSaveProps): JSX.Element | string { - const isChecked = props.attributes[this.options.name]; - if (isChecked && this.options.output) { + save( props: RenderSaveProps ): JSX.Element | string { + const isChecked = props.attributes[ this.options.name ]; + if ( isChecked && this.options.output ) { return this.options.output; } return null; @@ -66,7 +66,7 @@ class SidebarCheckbox extends BlockInstruction { configuration(): Partial { return { attributes: { - [this.options.name]: { + [ this.options.name ]: { type: "boolean", }, }, @@ -74,4 +74,4 @@ class SidebarCheckbox extends BlockInstruction { } } -BlockInstruction.register("sidebar-checkbox", SidebarCheckbox); +BlockInstruction.register( "sidebar-checkbox", SidebarCheckbox ); diff --git a/packages/schema-blocks/src/instructions/blocks/TextInput.tsx b/packages/schema-blocks/src/instructions/blocks/TextInput.tsx index 53edc3c7e8..b021fd6d34 100644 --- a/packages/schema-blocks/src/instructions/blocks/TextInput.tsx +++ b/packages/schema-blocks/src/instructions/blocks/TextInput.tsx @@ -24,26 +24,26 @@ export default class TextInput extends BlockInstruction { * * @returns The rendered instruction. */ - edit(props: RenderEditProps): React.ReactElement | string { + edit( props: RenderEditProps ): React.ReactElement | string { const { hideLabelFromVision, label, type, placeholder } = this.options; - const value = props.attributes[this.options.name] as string; + const value = props.attributes[ this.options.name ] as string; const onChange = useCallback( newValue => { - props.setAttributes({ [this.options.name]: newValue }); + props.setAttributes( { [ this.options.name ]: newValue } ); }, - [props], + [ props ], ); return ; } @@ -54,8 +54,8 @@ export default class TextInput extends BlockInstruction { * * @returns The element to render. */ - save(props: RenderSaveProps): React.ReactElement | string { - return props.attributes[this.options.name] as string; + save( props: RenderSaveProps ): React.ReactElement | string { + return props.attributes[ this.options.name ] as string; } /** @@ -66,7 +66,7 @@ export default class TextInput extends BlockInstruction { configuration(): Partial { return { attributes: { - [this.options.name]: { + [ this.options.name ]: { type: "string", }, }, @@ -74,5 +74,5 @@ export default class TextInput extends BlockInstruction { } } -BlockInstruction.register("text-input", TextInput); +BlockInstruction.register( "text-input", TextInput ); diff --git a/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx b/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx index 2dc2210359..be3c0f8478 100644 --- a/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx +++ b/packages/schema-blocks/src/instructions/blocks/VariationPicker.tsx @@ -26,7 +26,6 @@ function includesAVariation( blockInstance: BlockInstance ): boolean { * VariationPicker instruction. */ class VariationPicker extends BlockInstruction { - // eslint-disable-next-line @typescript-eslint/no-unused-vars /** * Renders the variation picker if the block doesn't have any inner blocks. From 9b53b60919277ac2fd84a8cf1448807dd627a1b1 Mon Sep 17 00:00:00 2001 From: Hans-Christiaan Date: Thu, 25 Mar 2021 17:04:53 +0100 Subject: [PATCH 12/12] Added extra exports needed for the apply button block. --- packages/schema-blocks/src/core/blocks/index.ts | 2 +- packages/schema-blocks/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema-blocks/src/core/blocks/index.ts b/packages/schema-blocks/src/core/blocks/index.ts index 4cf83a3a96..5e2ce07b73 100644 --- a/packages/schema-blocks/src/core/blocks/index.ts +++ b/packages/schema-blocks/src/core/blocks/index.ts @@ -1,4 +1,4 @@ -export { BlockDefinition } from "./BlockDefinition"; +export { BlockDefinition, RenderEditProps, RenderSaveProps } from "./BlockDefinition"; export { getBlockDefinition, registerBlockDefinition } from "./BlockDefinitionRepository"; export { BlockInstruction } from "./BlockInstruction"; export { BlockLeaf } from "./BlockLeaf"; diff --git a/packages/schema-blocks/src/index.ts b/packages/schema-blocks/src/index.ts index b1fde75266..4e22860612 100644 --- a/packages/schema-blocks/src/index.ts +++ b/packages/schema-blocks/src/index.ts @@ -2,7 +2,7 @@ import initialize from "./functions/intialize"; export { LogLevel } from "./functions/logger"; -export { BlockInstruction, BlockValidation, BlockValidationResult } from "./core"; +export { BlockInstruction, BlockValidation, BlockValidationResult, RenderEditProps, RenderSaveProps } from "./core"; export { VariableTagRichText } from "./instructions/blocks"; export default initialize;