From 17f1a1bad0279ee930a8b30ff7a6c0d355b1c7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Fri, 3 May 2019 18:26:27 +0200 Subject: [PATCH 1/2] Add private tag to INSERTER_UTILITY_* constants so it's clear that they aren't part of public API and they are excluded of any generated documentation. --- packages/block-editor/src/store/selectors.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index be699167f3c6c7..380be294b10e16 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -27,12 +27,22 @@ import { hasChildBlocksWithInserterSupport, } from '@wordpress/blocks'; -/*** - * Module constants +// Module constants +/** + * @private */ export const INSERTER_UTILITY_HIGH = 3; +/** + * @private + */ export const INSERTER_UTILITY_MEDIUM = 2; +/** + * @private + */ export const INSERTER_UTILITY_LOW = 1; +/** + * @private + */ export const INSERTER_UTILITY_NONE = 0; const MILLISECONDS_PER_HOUR = 3600 * 1000; const MILLISECONDS_PER_DAY = 24 * 3600 * 1000; From 4cdecadb11fdc220706d99eca7dbe5322b351047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Fri, 3 May 2019 23:57:12 +0200 Subject: [PATCH 2/2] Add some breadth --- packages/block-editor/src/store/selectors.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 380be294b10e16..6633611fbd9b19 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -28,22 +28,27 @@ import { } from '@wordpress/blocks'; // Module constants + /** * @private */ export const INSERTER_UTILITY_HIGH = 3; + /** * @private */ export const INSERTER_UTILITY_MEDIUM = 2; + /** * @private */ export const INSERTER_UTILITY_LOW = 1; + /** * @private */ export const INSERTER_UTILITY_NONE = 0; + const MILLISECONDS_PER_HOUR = 3600 * 1000; const MILLISECONDS_PER_DAY = 24 * 3600 * 1000; const MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;