diff --git a/package.json b/package.json
index aeea162..63df697 100644
--- a/package.json
+++ b/package.json
@@ -67,8 +67,8 @@
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.2",
- "karma-firefox-launcher": "^1.3.0",
"karma-coveralls": "^2.1.0",
+ "karma-firefox-launcher": "^1.3.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sinon": "^1.0.5",
@@ -84,6 +84,7 @@
"react-dom": "^16.8.1",
"react-redux": "^7.2.0",
"react-rnd": "^10.0.0",
+ "react-svg-loader": "^3.0.3",
"redux": "^4.0.5",
"sinon": "^7.2.3",
"style-loader": "^1.2.1",
diff --git a/src/assets/img/arrow-down.svg b/src/assets/img/arrow-down.svg
new file mode 100644
index 0000000..b1cb25b
--- /dev/null
+++ b/src/assets/img/arrow-down.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/console.svg b/src/assets/img/console.svg
new file mode 100644
index 0000000..3d8f1ad
--- /dev/null
+++ b/src/assets/img/console.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/eye.svg b/src/assets/img/eye.svg
new file mode 100644
index 0000000..70dc172
--- /dev/null
+++ b/src/assets/img/eye.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/play.svg b/src/assets/img/play.svg
new file mode 100644
index 0000000..27d0b41
--- /dev/null
+++ b/src/assets/img/play.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/read-only.svg b/src/assets/img/read-only.svg
new file mode 100644
index 0000000..8942629
--- /dev/null
+++ b/src/assets/img/read-only.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/source.svg b/src/assets/img/source.svg
new file mode 100644
index 0000000..1c3ebfe
--- /dev/null
+++ b/src/assets/img/source.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/trash.svg b/src/assets/img/trash.svg
new file mode 100644
index 0000000..fd49761
--- /dev/null
+++ b/src/assets/img/trash.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/ckeditorinspector.js b/src/ckeditorinspector.js
index 0a9d278..3ceee3b 100644
--- a/src/ckeditorinspector.js
+++ b/src/ckeditorinspector.js
@@ -11,7 +11,10 @@ import { createStore } from 'redux';
import { Provider } from 'react-redux';
import { reducer } from './data/reducer';
-import { setEditors } from './data/actions';
+import {
+ setEditors,
+ updateCurrentEditorIsReadOnly
+} from './data/actions';
import { updateModelState } from './model/data/actions';
import { updateViewState } from './view/data/actions';
import { updateCommandsState } from './commands/data/actions';
@@ -214,6 +217,9 @@ export default class CKEditorInspector {
}
store.dispatch( updateViewState() );
+ },
+ onReadOnlyChange() {
+ CKEditorInspector._store.dispatch( updateCurrentEditorIsReadOnly() );
}
} );
@@ -222,6 +228,7 @@ export default class CKEditorInspector {
CKEditorInspector._store = createStore( reducer, {
editors: CKEditorInspector._editors,
currentEditorName: getFirstEditorName( CKEditorInspector._editors ),
+ currentEditorGlobals: {},
ui: {
isCollapsed: options.isCollapsed
}
diff --git a/src/commands/commandinspector.js b/src/commands/commandinspector.js
index 1674e65..c9fa11f 100644
--- a/src/commands/commandinspector.js
+++ b/src/commands/commandinspector.js
@@ -12,6 +12,9 @@ import ObjectInspector from '../components/objectinspector';
import Logger from '../logger';
+import ConsoleIcon from '../assets/img/console.svg';
+import PlayIcon from '../assets/img/play.svg';
+
class CommandInspector extends Component {
constructor( props ) {
super( props );
@@ -47,13 +50,13 @@ class CommandInspector extends Component {
,
}
text="Execute command"
onClick={this.handleCommandExecuteButtonClick}
/>,
}
text="Log in console"
onClick={this.handleCommandLogButtonClick}
/>
diff --git a/src/components/button.css b/src/components/button.css
index 77da00f..9db4338 100644
--- a/src/components/button.css
+++ b/src/components/button.css
@@ -3,33 +3,47 @@
* For licensing, see LICENSE.md.
*/
+.ck-inspector {
+ --ck-inspector-icon-size: 19px;
+ --ck-inspector-button-size: calc( 4px + var(--ck-inspector-icon-size) );
+ --ck-inspector-color-button: #777;
+ --ck-inspector-color-button-hover: #222;
+ --ck-inspector-color-button-on: #0F79E2;
+}
+
.ck-inspector .ck-inspector-button {
- width: 16px;
- height: 16px;
+ width: var(--ck-inspector-button-size);
+ height: var(--ck-inspector-button-size);
border: 0;
- text-indent: 100px;
overflow: hidden;
- opacity: .8;
- margin-left: .7em;
- flex: 0 0 auto;
+ border-radius: 2px;
+ padding: 2px;
+ color: var(--ck-inspector-color-button);
- &:first-of-type {
- margin-left: auto;
+ &.ck-inspector-button_on,
+ &.ck-inspector-button_on:hover {
+ color: var(--ck-inspector-color-button-on);
+ opacity: 1;
}
- &:hover {
- opacity: 1;
+ &.ck-inspector-button_disabled {
+ opacity: .3;
}
- &.ck-inspector-button_log {
- background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZT0iIzZFNkU2RSIgc3Ryb2tlLXdpZHRoPSIxLjUiPjxwYXRoIGQ9Ik0xLjUgNC4xNjVsNS43IDQuMTItNS43IDMuMTUzTTkuNDQ5IDExLjVoNS42NTUiLz48L2c+PC9zdmc+);
+ & > span {
+ display: none;
}
- &.ck-inspector-button_exec {
- background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIHN0cm9rZT0iIzZFNkU2RSIgc3Ryb2tlLXdpZHRoPSIxLjUiIGN4PSI4IiBjeT0iOCIgcj0iNy4yNSIvPjxwYXRoIGZpbGw9IiM2RTZFNkUiIGQ9Ik02LjA5NCA1LjIzNUwxMS4wNzQgOGwtNC45OCAzLjAxOHoiLz48L2c+PC9zdmc+);
+ &:hover {
+ color: var(--ck-inspector-color-button-hover);
}
- &.ck-inspector-button_scroll {
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHRpdGxlPnNlZTwvdGl0bGU+CjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CjxwYXRoIGQ9Im04IDMuNWMtMS44ODM4IDAtMy42MDY5IDAuNjEzNDItNC45MzM5IDEuNDQyOC0xLjUwNTcgMC45NDEwNC0yLjU2NjEgMi4xNjMzLTIuNTY2MSAzLjA1NzJzMS4wNjA0IDIuMTE2MiAyLjU2NjEgMy4wNTcyYzEuMzI3IDAuODI5MzggMy4wNTAxIDEuNDQyOCA0LjkzMzkgMS40NDI4czMuNjA2OS0wLjYxMzQyIDQuOTMzOS0xLjQ0MjhjMS41MDU3LTAuOTQxMDQgMi41NjYxLTIuMTYzMyAyLjU2NjEtMy4wNTcycy0xLjA2MDQtMi4xMTYyLTIuNTY2MS0zLjA1NzJjLTEuMzI3LTAuODI5MzgtMy4wNTAxLTEuNDQyOC00LjkzMzktMS40NDI4eiIgc3Ryb2tlPSIjNkU2RTZFIi8+CjxwYXRoIGQ9Im04IDRjMi4yMDkxIDAgNCAxLjc5MDkgNCA0cy0xLjc5MDkgNC00IDQtNC0xLjc5MDktNC00IDEuNzkwOS00IDQtNHptLTEuNSAxYy0wLjgyODQzIDAtMS41IDAuNjcxNTctMS41IDEuNXMwLjY3MTU3IDEuNSAxLjUgMS41IDEuNS0wLjY3MTU3IDEuNS0xLjUtMC42NzE1Ny0xLjUtMS41LTEuNXoiIGZpbGw9IiM2RTZFNkUiLz4KPC9nPgo8L3N2Zz4K);
+ & svg {
+ width: var(--ck-inspector-icon-size);
+ height: var(--ck-inspector-icon-size);
+
+ &, & * {
+ fill: currentColor;
+ }
}
}
diff --git a/src/components/button.js b/src/components/button.js
index 60f81ef..bf523a4 100644
--- a/src/components/button.js
+++ b/src/components/button.js
@@ -4,17 +4,26 @@
*/
import React, { PureComponent } from 'react';
+
import './button.css';
export default class Button extends PureComponent {
render() {
+ const classes = [
+ 'ck-inspector-button',
+ this.props.className || '',
+ this.props.isOn ? 'ck-inspector-button_on' : '',
+ this.props.isEnabled === false ? 'ck-inspector-button_disabled' : ''
+ ].filter( className => className ).join( ' ' );
+
return ;
}
}
diff --git a/src/components/objectinspector.css b/src/components/objectinspector.css
index f0f4008..0d46c5b 100644
--- a/src/components/objectinspector.css
+++ b/src/components/objectinspector.css
@@ -16,16 +16,22 @@
}
& h2 {
+ display: flex;
+ align-items: center;
padding: 1em;
overflow: hidden;
text-overflow: ellipsis;
- & span {
+ & > span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
- margin-right: 1em;
+ margin-right: auto;
+ }
+
+ & > .ck-inspector-button {
+ margin-left: .5em;
}
& a {
@@ -40,20 +46,23 @@
}
& h3 {
+ display: flex;
+ align-items: center;
font-size: 12px;
padding: .4em .7em;
& a {
color: inherit;
font-weight: bold;
+ margin-right: auto;
}
& .ck-inspector-button {
- display: none;
+ visibility: hidden;
}
&:hover .ck-inspector-button {
- display: block
+ visibility: visible;
}
}
diff --git a/src/components/pane.css b/src/components/pane.css
index 355573f..1232c68 100644
--- a/src/components/pane.css
+++ b/src/components/pane.css
@@ -42,18 +42,6 @@
}
& .ck-inspector-tree__config {
- & + .ck-inspector-tree__config {
- &::before {
- content: "";
- border-right: 1px solid var(--ck-inspector-color-border);
- display: inline-block;
- width: 0px;
- height: 20px;
- margin: 0 1em;
- vertical-align: middle;
- }
- }
-
& label {
margin: 0 .5em;
}
diff --git a/src/data/actions.js b/src/data/actions.js
index c974d9a..0fe81ee 100644
--- a/src/data/actions.js
+++ b/src/data/actions.js
@@ -8,6 +8,7 @@ export const SET_HEIGHT = 'SET_HEIGHT';
export const SET_SIDE_PANE_WIDTH = 'SET_SIDE_PANE_WIDTH';
export const SET_EDITORS = 'SET_EDITORS';
export const SET_CURRENT_EDITOR_NAME = 'SET_CURRENT_EDITOR_NAME';
+export const UPDATE_CURRENT_EDITOR_IS_READ_ONLY = 'UPDATE_CURRENT_EDITOR_IS_READ_ONLY';
export const SET_ACTIVE_INSPECTOR_TAB = 'SET_ACTIVE_INSPECTOR_TAB';
export function toggleIsCollapsed() {
@@ -33,3 +34,7 @@ export function setCurrentEditorName( editorName ) {
export function setActiveTab( tabName ) {
return { type: SET_ACTIVE_INSPECTOR_TAB, tabName };
}
+
+export function updateCurrentEditorIsReadOnly() {
+ return { type: UPDATE_CURRENT_EDITOR_IS_READ_ONLY };
+}
diff --git a/src/data/reducer.js b/src/data/reducer.js
index 50788a3..58c46bd 100644
--- a/src/data/reducer.js
+++ b/src/data/reducer.js
@@ -13,10 +13,12 @@ import {
SET_SIDE_PANE_WIDTH,
SET_EDITORS,
SET_CURRENT_EDITOR_NAME,
+ UPDATE_CURRENT_EDITOR_IS_READ_ONLY,
SET_ACTIVE_INSPECTOR_TAB
} from './actions';
import { getFirstEditorName } from '../utils';
+import { getCurrentEditor } from './utils';
import LocalStorageManager from '../localstoragemanager';
@@ -28,6 +30,7 @@ export const LOCAL_STORAGE_SIDE_PANE_WIDTH = 'side-pane-width';
export function reducer( state, action ) {
const newState = appReducer( state, action );
+ newState.currentEditorGlobals = currentEditorGlobalsReducer( newState, newState.currentEditorGlobals, action );
newState.ui = appUIReducer( newState.ui, action );
newState.model = modelReducer( newState, newState.model, action );
newState.view = viewReducer( newState, newState.view, action );
@@ -50,6 +53,18 @@ function appReducer( state, action ) {
}
}
+function currentEditorGlobalsReducer( state, globalsState, action ) {
+ switch ( action.type ) {
+ case SET_EDITORS:
+ case SET_CURRENT_EDITOR_NAME:
+ return getCurrentEditorGlobalState( state );
+ case UPDATE_CURRENT_EDITOR_IS_READ_ONLY:
+ return getNewCurrentEditorIsReadOnlyState( state, globalsState );
+ default:
+ return globalsState;
+ }
+}
+
function appUIReducer( UIState, action ) {
// This happens when the inspector store is created for the first time only.
// Only #isCollapsed is passed then because it's configurable in inspector options.
@@ -96,6 +111,24 @@ function getNewCurrentEditorNameState( appState, action ) {
};
}
+function getCurrentEditorGlobalState( appState ) {
+ const isReadOnlyState = getNewCurrentEditorIsReadOnlyState( appState, {} );
+
+ return {
+ ...isReadOnlyState
+ };
+}
+
+function getNewCurrentEditorIsReadOnlyState( appState, globalsState ) {
+ const editor = getCurrentEditor( appState );
+
+ return {
+ ...globalsState,
+
+ isReadOnly: editor ? editor.isReadOnly : false
+ };
+}
+
function getNewEditorsState( appState, action ) {
const newState = {
editors: new Map( action.editors )
diff --git a/src/data/utils.js b/src/data/utils.js
index a2581d2..5f17b8b 100644
--- a/src/data/utils.js
+++ b/src/data/utils.js
@@ -11,10 +11,16 @@ export default class EditorListener {
startListening( currentEditor ) {
currentEditor.model.document.on( 'change', this._config.onModelChange );
currentEditor.editing.view.on( 'render', this._config.onViewRender );
+ currentEditor.on( 'change:isReadOnly', this._config.onReadOnlyChange );
}
stopListening( currentEditor ) {
currentEditor.model.document.off( 'change', this._config.onModelChange );
currentEditor.editing.view.off( 'render', this._config.onViewRender );
+ currentEditor.off( 'change:isReadOnly', this._config.onReadOnlyChange );
}
}
+
+export function getCurrentEditor( globalState ) {
+ return globalState.editors.get( globalState.currentEditorName );
+}
diff --git a/src/editorquickactions.css b/src/editorquickactions.css
new file mode 100644
index 0000000..afc17c5
--- /dev/null
+++ b/src/editorquickactions.css
@@ -0,0 +1,17 @@
+/**
+ * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+.ck-inspector .ck-inspector-editor-quick-actions {
+ display: flex;
+ align-content: center;
+ justify-content: center;
+ align-items: center;
+ flex-direction: row;
+ flex-wrap: nowrap;
+
+ & > .ck-inspector-button {
+ margin-left: .3em;
+ }
+}
diff --git a/src/editorquickactions.js b/src/editorquickactions.js
new file mode 100644
index 0000000..8511ee9
--- /dev/null
+++ b/src/editorquickactions.js
@@ -0,0 +1,56 @@
+/**
+ * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+import React, { Component } from 'react';
+import { connect } from 'react-redux';
+
+import Button from './components/button';
+
+import SourceIcon from './assets/img/source.svg';
+import ConsoleIcon from './assets/img/console.svg';
+import ReadOnlyIcon from './assets/img/read-only.svg';
+import TrashIcon from './assets/img/trash.svg';
+
+import './editorquickactions.css';
+
+class EditorQuickActions extends Component {
+ render() {
+ return
+ }
+ isEnabled={!!this.props.editor}
+ onClick={() => console.log( this.props.editor )}
+ />
+ }
+ isEnabled={!!this.props.editor}
+ onClick={() => console.log( this.props.editor.getData() )}
+ />
+ }
+ isOn={this.props.isReadOnly}
+ isEnabled={!!this.props.editor}
+ onClick={() => { this.props.editor.isReadOnly = !this.props.editor.isReadOnly; }}
+ />
+ }
+ isEnabled={!!this.props.editor}
+ onClick={() => { this.props.editor.destroy(); }}
+ />
+
;
+ }
+}
+
+const mapStateToProps = ( { editors, currentEditorName, currentEditorGlobals: { isReadOnly } } ) => {
+ const editor = editors.get( currentEditorName );
+
+ return { editor, isReadOnly };
+};
+
+export default connect( mapStateToProps, {} )( EditorQuickActions );
diff --git a/src/model/data/reducer.js b/src/model/data/reducer.js
index aafb9ee..ac09113 100644
--- a/src/model/data/reducer.js
+++ b/src/model/data/reducer.js
@@ -27,6 +27,7 @@ import {
} from './utils';
import { isModelRoot } from '../utils';
+import { getCurrentEditor } from '../../data/utils';
import LocalStorageManager from '../../localstoragemanager';
@@ -213,7 +214,3 @@ function getEssentialState( globalState, modelState, modelStateOverrides ) {
markers
};
}
-
-function getCurrentEditor( globalState ) {
- return globalState.editors.get( globalState.currentEditorName );
-}
diff --git a/src/model/markerinspector.js b/src/model/markerinspector.js
index 53d2efb..572aa1a 100644
--- a/src/model/markerinspector.js
+++ b/src/model/markerinspector.js
@@ -13,6 +13,8 @@ import { stringifyPropertyList } from '../components/utils';
import Logger from '../logger';
+import ConsoleIcon from '../assets/img/console.svg';
+
const API_DOCS_PREFIX = 'https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_model_markercollection-Marker.html';
class ModelMarkerInspector extends Component {
@@ -37,7 +39,7 @@ class ModelMarkerInspector extends Component {
,
}
text="Log in console"
onClick={() => Logger.log( [ ...currentEditor.model.markers ] )}
/>
diff --git a/src/model/nodeinspector.js b/src/model/nodeinspector.js
index 74507cc..603d7d5 100644
--- a/src/model/nodeinspector.js
+++ b/src/model/nodeinspector.js
@@ -12,6 +12,8 @@ import ObjectInspector from '../components/objectinspector';
import Logger from '../logger';
+import ConsoleIcon from '../assets/img/console.svg';
+
class ModelNodeInspector extends Component {
constructor( props ) {
super( props );
@@ -42,7 +44,7 @@ class ModelNodeInspector extends Component {
,
}
text="Log in console"
onClick={this.handleNodeLogButtonClick}
/>
diff --git a/src/model/selectioninspector.js b/src/model/selectioninspector.js
index 39d7967..cffb5ef 100644
--- a/src/model/selectioninspector.js
+++ b/src/model/selectioninspector.js
@@ -15,6 +15,9 @@ import { stringifyPropertyList } from '../components/utils';
import Logger from '../logger';
import { getModelPositionDefinition } from './utils';
+import ConsoleIcon from '../assets/img/console.svg';
+import EyeIcon from '../assets/img/eye.svg';
+
const API_DOCS_PREFIX = 'https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_model_selection-Selection.html';
class ModelSelectionInspector extends Component {
@@ -59,13 +62,13 @@ class ModelSelectionInspector extends Component {
,
}
text="Log in console"
onClick={this.handleSelectionLogButtonClick}
/>,
}
text="Scroll to selection"
onClick={this.handleScrollToSelectionButtonClick}
/>
@@ -86,7 +89,7 @@ class ModelSelectionInspector extends Component {
url: `${ API_DOCS_PREFIX }#member-anchor`,
buttons: [
{
- type: 'log',
+ icon: ,
text: 'Log in console',
onClick: () => Logger.log( editor.model.document.selection.anchor )
}
@@ -98,7 +101,7 @@ class ModelSelectionInspector extends Component {
url: `${ API_DOCS_PREFIX }#member-focus`,
buttons: [
{
- type: 'log',
+ icon: ,
text: 'Log in console',
onClick: () => Logger.log( editor.model.document.selection.focus )
}
@@ -110,7 +113,7 @@ class ModelSelectionInspector extends Component {
url: `${ API_DOCS_PREFIX }#function-getRanges`,
buttons: [
{
- type: 'log',
+ icon: ,
text: 'Log in console',
onClick: () => Logger.log( ...editor.model.document.selection.getRanges() )
}
diff --git a/src/model/tree.js b/src/model/tree.js
index 45e5cf2..1ffbaf4 100644
--- a/src/model/tree.js
+++ b/src/model/tree.js
@@ -58,6 +58,7 @@ class ModelTree extends Component {
onChange={this.handleRootChange}
/>
,
+ ,
,
+
,
+
,
+
,
]}
>
@@ -126,16 +133,16 @@ class ToggleButtonVisual extends Component {
}
render() {
- return
}
onClick={this.props.toggleIsCollapsed}
title="Toggle inspector (Alt+F12)"
className={[
'ck-inspector-navbox__navigation__toggle',
this.props.isCollapsed ? ' ck-inspector-navbox__navigation__toggle_up' : ''
- ].join( ' ' )}>
- Toggle inspector
- ;
+ ].join( ' ' )}
+ />;
}
componentDidMount() {
@@ -162,7 +169,7 @@ export class EditorInstanceSelectorVisual extends Component {
return
{this.props.currentEditorName ?
,
+
,
{
} );
describe( '#_editorListener', () => {
- it( 'should start listening to the editor events', () => {
- CKEditorInspector.attach( { foo: editor } );
+ describe( 'document#change and view#render events', () => {
+ it( 'should start listening to the document#change and view#render events', () => {
+ CKEditorInspector.attach( { foo: editor } );
- const spy = sinon.stub( CKEditorInspector._store, 'dispatch' );
+ const spy = sinon.stub( CKEditorInspector._store, 'dispatch' );
- editor.model.document.fire( 'change' );
+ editor.model.document.fire( 'change' );
- sinon.assert.calledThrice( spy );
- sinon.assert.calledWithExactly( spy.firstCall, { type: UPDATE_MODEL_STATE } );
- sinon.assert.calledWithExactly( spy.secondCall, { type: UPDATE_COMMANDS_STATE } );
+ sinon.assert.calledThrice( spy );
+ sinon.assert.calledWithExactly( spy.firstCall, { type: UPDATE_MODEL_STATE } );
+ sinon.assert.calledWithExactly( spy.secondCall, { type: UPDATE_COMMANDS_STATE } );
- // After model->view conversion.
- sinon.assert.calledWithExactly( spy.thirdCall, { type: UPDATE_VIEW_STATE } );
+ // After model->view conversion.
+ sinon.assert.calledWithExactly( spy.thirdCall, { type: UPDATE_VIEW_STATE } );
- editor.editing.view.fire( 'render' );
- sinon.assert.callCount( spy, 4 );
- sinon.assert.calledWithExactly( spy.getCall( 3 ), { type: UPDATE_VIEW_STATE } );
+ editor.editing.view.fire( 'render' );
+ sinon.assert.callCount( spy, 4 );
+ sinon.assert.calledWithExactly( spy.getCall( 3 ), { type: UPDATE_VIEW_STATE } );
- spy.restore();
- } );
+ spy.restore();
+ } );
- // https://github.com/ckeditor/ckeditor5-inspector/issues/80
- it( 'should not respond to editor events when the inspector UI is collapsed', () => {
- CKEditorInspector.attach( { foo: editor } );
- dispatchStoreAction( toggleIsCollapsed() );
+ // https://github.com/ckeditor/ckeditor5-inspector/issues/80
+ it( 'should not respond to the document#change and view#render events when the inspector UI is collapsed', () => {
+ CKEditorInspector.attach( { foo: editor } );
+ dispatchStoreAction( toggleIsCollapsed() );
- const spy = sinon.stub( CKEditorInspector._store, 'dispatch' );
+ const spy = sinon.stub( CKEditorInspector._store, 'dispatch' );
- editor.model.document.fire( 'change' );
- sinon.assert.notCalled( spy );
+ editor.model.document.fire( 'change' );
+ sinon.assert.notCalled( spy );
- spy.restore();
- } );
+ spy.restore();
+ } );
- it( 'should stop listening to editor events when the inspector is being detached', () => {
- CKEditorInspector.attach( { foo: editor } );
+ it( 'should stop listening to the document#change and view#render events when the inspector is being detached', () => {
+ CKEditorInspector.attach( { foo: editor } );
- const spy = sinon.spy( CKEditorInspector._store, 'dispatch' );
+ const spy = sinon.spy( CKEditorInspector._store, 'dispatch' );
- editor.model.document.fire( 'change' );
- sinon.assert.calledThrice( spy );
+ editor.model.document.fire( 'change' );
+ sinon.assert.calledThrice( spy );
- CKEditorInspector.detach( 'foo' );
+ CKEditorInspector.detach( 'foo' );
- editor.model.document.fire( 'change' );
+ editor.model.document.fire( 'change' );
- sinon.assert.callCount( spy, 4 );
- sinon.assert.calledWithExactly( spy.getCall( 3 ), { type: SET_EDITORS, editors: sinon.match.map } );
- } );
+ sinon.assert.callCount( spy, 4 );
+ sinon.assert.calledWithExactly( spy.getCall( 3 ), { type: SET_EDITORS, editors: sinon.match.map } );
+ } );
- it( 'should stop listening to editor events when the inspector is being destroyed', () => {
- CKEditorInspector.attach( { foo: editor } );
+ it( 'should stop listening to the document#change and view#render events when the inspector is being destroyed', () => {
+ CKEditorInspector.attach( { foo: editor } );
- const spy = sinon.spy( CKEditorInspector._store, 'dispatch' );
+ const spy = sinon.spy( CKEditorInspector._store, 'dispatch' );
- editor.model.document.fire( 'change' );
- sinon.assert.calledThrice( spy );
+ editor.model.document.fire( 'change' );
+ sinon.assert.calledThrice( spy );
- CKEditorInspector.destroy();
+ CKEditorInspector.destroy();
- editor.model.document.fire( 'change' );
- sinon.assert.calledThrice( spy );
+ editor.model.document.fire( 'change' );
+ sinon.assert.calledThrice( spy );
+ } );
} );
it( 'should stop listening to the previous one and start listening to the one when switching editors', () => {
@@ -226,6 +231,73 @@ describe( 'CKEditorInspector', () => {
return anotherEditor.destroy();
} );
} );
+
+ describe( 'change:isReadOnly event', () => {
+ it( 'should start listening to the editor#change:isReadOnly event', () => {
+ CKEditorInspector.attach( { foo: editor } );
+
+ const spy = sinon.stub( CKEditorInspector._store, 'dispatch' );
+
+ editor.isReadOnly = true;
+
+ // FYI: Changing read only triggers view#render in the editor.
+ sinon.assert.callCount( spy, 2 );
+ sinon.assert.calledWithExactly( spy.firstCall, { type: UPDATE_VIEW_STATE } );
+ sinon.assert.calledWithExactly( spy.secondCall, { type: UPDATE_CURRENT_EDITOR_IS_READ_ONLY } );
+
+ editor.isReadOnly = false;
+
+ sinon.assert.callCount( spy, 4 );
+ sinon.assert.calledWithExactly( spy.thirdCall, { type: UPDATE_VIEW_STATE } );
+ sinon.assert.calledWithExactly( spy.getCall( 3 ), { type: UPDATE_CURRENT_EDITOR_IS_READ_ONLY } );
+
+ spy.restore();
+ } );
+
+ it( 'should continue listening to the editor#change:isReadOnly event when the inspector is collapsed', () => {
+ CKEditorInspector.attach( { foo: editor } );
+ dispatchStoreAction( toggleIsCollapsed() );
+
+ const spy = sinon.stub( CKEditorInspector._store, 'dispatch' );
+
+ editor.isReadOnly = true;
+ sinon.assert.calledOnce( spy );
+ // FYI: UPDATE_VIEW_STATE will not happen when the inspector is collapsed.
+ sinon.assert.calledWithExactly( spy.firstCall, { type: UPDATE_CURRENT_EDITOR_IS_READ_ONLY } );
+
+ spy.restore();
+ } );
+
+ it( 'should stop listening to the editor#change:isReadOnly event when the inspector is being detached', () => {
+ CKEditorInspector.attach( { foo: editor } );
+
+ const spy = sinon.spy( CKEditorInspector._store, 'dispatch' );
+
+ editor.isReadOnly = true;
+ sinon.assert.calledTwice( spy );
+
+ CKEditorInspector.detach( 'foo' );
+
+ editor.isReadOnly = false;
+
+ sinon.assert.callCount( spy, 3 );
+ sinon.assert.calledWithExactly( spy.getCall( 2 ), { type: SET_EDITORS, editors: sinon.match.map } );
+ } );
+
+ it( 'should stop listening to the editor#change:isReadOnly event when the inspector is being destroyed', () => {
+ CKEditorInspector.attach( { foo: editor } );
+
+ const spy = sinon.spy( CKEditorInspector._store, 'dispatch' );
+
+ editor.isReadOnly = true;
+ sinon.assert.calledTwice( spy );
+
+ CKEditorInspector.destroy();
+
+ editor.isReadOnly = false;
+ sinon.assert.calledTwice( spy );
+ } );
+ } );
} );
it( 'should add the inspector to DOM only once when attaching to the first editor', () => {
diff --git a/tests/inspector/components/button.js b/tests/inspector/components/button.js
index 68620bb..977fe77 100644
--- a/tests/inspector/components/button.js
+++ b/tests/inspector/components/button.js
@@ -5,6 +5,7 @@
import React from 'react';
import Button from '../../../src/components/button';
+import ConsoleIcon from '../../../src/assets/img/console.svg';
describe( '', () => {
it( 'renders a button', () => {
@@ -23,19 +24,59 @@ describe( '', () => {
expect( wrapper.first().contains( 'foo' ) ).to.be.true;
} );
- it( 'reacts to props#type', () => {
+ it( 'reacts to props#className', () => {
+ const wrapper = mount( );
+
+ wrapper.setProps( { className: 'foo-bar-baz' } );
+
+ expect( wrapper.getDOMNode().classList.contains( 'foo-bar-baz' ) ).to.be.true;
+ } );
+
+ it( 'reacts to props#isOn', () => {
const wrapper = shallow( );
- wrapper.setProps( { type: 'bar' } );
+ expect( wrapper.first() ).to.not.have.className( 'ck-inspector-button_on' );
+
+ wrapper.setProps( { isOn: true } );
+ expect( wrapper.first() ).to.have.className( 'ck-inspector-button_on' );
- expect( wrapper.first() ).to.have.className( 'ck-inspector-button_bar' );
+ wrapper.setProps( { isOn: false } );
+ expect( wrapper.first() ).to.not.have.className( 'ck-inspector-button_on' );
} );
- it( 'executes props#onClick when clicked', () => {
- const spy = sinon.spy();
- const wrapper = shallow( );
+ it( 'reacts to props#isEnabled', () => {
+ const wrapper = shallow( );
+
+ expect( wrapper.first() ).to.not.have.className( 'ck-inspector-button_disabled' );
+
+ wrapper.setProps( { isEnabled: false } );
+ expect( wrapper.first() ).to.have.className( 'ck-inspector-button_disabled' );
+
+ wrapper.setProps( { isEnabled: true } );
+ expect( wrapper.first() ).to.not.have.className( 'ck-inspector-button_disabled' );
+ } );
+
+ it( 'reacts to props#icon', () => {
+ const wrapper = shallow( );
+
+ wrapper.setProps( { icon: } );
+ } );
+
+ describe( 'onClick handling', () => {
+ it( 'executes props#onClick when clicked', () => {
+ const spy = sinon.spy();
+ const wrapper = shallow( );
+
+ wrapper.first().simulate( 'click' );
+ sinon.assert.callCount( spy, 1 );
+ } );
+
+ it( 'does not execute props#onClick when #isEnabled is false', () => {
+ const spy = sinon.spy();
+ const wrapper = shallow( );
- wrapper.first().simulate( 'click' );
- sinon.assert.callCount( spy, 1 );
+ wrapper.first().simulate( 'click' );
+ sinon.assert.notCalled( spy );
+ } );
} );
} );
diff --git a/tests/inspector/data/actions.js b/tests/inspector/data/actions.js
index 8e2227a..8a887ed 100644
--- a/tests/inspector/data/actions.js
+++ b/tests/inspector/data/actions.js
@@ -9,6 +9,7 @@ import {
setSidePaneWidth,
setEditors,
setCurrentEditorName,
+ updateCurrentEditorIsReadOnly,
setActiveTab,
TOGGLE_IS_COLLAPSED,
@@ -16,7 +17,8 @@ import {
SET_SIDE_PANE_WIDTH,
SET_EDITORS,
SET_CURRENT_EDITOR_NAME,
- SET_ACTIVE_INSPECTOR_TAB
+ SET_ACTIVE_INSPECTOR_TAB,
+ UPDATE_CURRENT_EDITOR_IS_READ_ONLY
} from '../../../src/data/actions';
describe( 'global data store actions', () => {
@@ -60,4 +62,10 @@ describe( 'global data store actions', () => {
tabName: 'foo'
} );
} );
+
+ it( 'should export updateCurrentEditorIsReadOnly()', () => {
+ expect( updateCurrentEditorIsReadOnly() ).to.deep.equal( {
+ type: UPDATE_CURRENT_EDITOR_IS_READ_ONLY
+ } );
+ } );
} );
diff --git a/tests/inspector/data/reducer.js b/tests/inspector/data/reducer.js
index fdaf845..3e1bf49 100644
--- a/tests/inspector/data/reducer.js
+++ b/tests/inspector/data/reducer.js
@@ -19,6 +19,7 @@ import {
import {
setEditors,
setCurrentEditorName,
+ updateCurrentEditorIsReadOnly,
setHeight,
toggleIsCollapsed,
setSidePaneWidth,
@@ -50,7 +51,10 @@ describe( 'global data store reducer', () => {
[ 'a', editorA ],
[ 'b', editorB ]
] ),
- ui: {}
+ ui: {},
+ currentEditorGlobals: {
+ isReadOnly: false
+ }
}, {} );
} );
} );
@@ -64,6 +68,8 @@ describe( 'global data store reducer', () => {
expect( state ).to.have.property( 'model' );
expect( state ).to.have.property( 'view' );
expect( state ).to.have.property( 'commands' );
+ expect( state ).to.have.property( 'currentEditorGlobals' );
+ expect( state ).to.have.property( 'ui' );
} );
describe( 'application state', () => {
@@ -103,6 +109,66 @@ describe( 'global data store reducer', () => {
} );
} );
+ describe( 'current editor global properties state', () => {
+ it( 'should be created with defaults', () => {
+ expect( state.currentEditorGlobals ).to.deep.equal( {
+ isReadOnly: false
+ } );
+ } );
+
+ it( 'should be recreated on the setEditors() action', () => {
+ // A dummy state to prove this gets overridden as a whole.
+ state.currentEditorGlobals = {
+ foo: 'bar'
+ };
+
+ editorA.isReadOnly = true;
+
+ state = reducer( state, setEditors( new Map( [ [ 'a', editorA ] ] ) ) );
+
+ expect( state.currentEditorGlobals ).to.deep.equal( {
+ isReadOnly: true
+ } );
+ } );
+
+ it( 'should be recreated on the setCurrentEditor() action', () => {
+ // A dummy state to prove this gets overridden as a whole.
+ state.currentEditorGlobals = {
+ foo: 'bar'
+ };
+
+ state = reducer( state, setCurrentEditorName( 'b' ) );
+
+ expect( state.currentEditorGlobals ).to.deep.equal( {
+ isReadOnly: false
+ } );
+ } );
+
+ describe( '#isReadOnly', () => {
+ it( 'should be updated on updateCurrentEditorIsReadOnly() action', () => {
+ // A dummy state to prove this gets overridden as a whole.
+ state.currentEditorGlobals.isReadOnly = 'foo';
+
+ state = reducer( state, updateCurrentEditorIsReadOnly() );
+
+ expect( state.currentEditorGlobals.isReadOnly ).to.be.false;
+ } );
+
+ it( 'should be false when there are no editors in the inspector (e.g. all were destroyed)', () => {
+ // A dummy state to prove this gets overridden as a whole.
+ state.currentEditorGlobals = {
+ foo: 'bar'
+ };
+
+ state = reducer( state, setEditors( new Map() ) );
+
+ expect( state.currentEditorGlobals ).to.deep.equal( {
+ isReadOnly: false
+ } );
+ } );
+ } );
+ } );
+
describe( 'UI state', () => {
it( 'should be created with defaults if the LocalStorage is empty', () => {
expect( state.ui ).to.deep.equal( {
diff --git a/tests/inspector/editorquickactions.js b/tests/inspector/editorquickactions.js
new file mode 100644
index 0000000..eefbf0d
--- /dev/null
+++ b/tests/inspector/editorquickactions.js
@@ -0,0 +1,136 @@
+/**
+ * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* global document, window */
+
+import React from 'react';
+import TestEditor from '../utils/testeditor';
+import { createStore } from 'redux';
+import { Provider } from 'react-redux';
+
+import EditorQuickActions from '../../src/editorquickactions';
+
+describe( '', () => {
+ let editor, store, wrapper, element;
+
+ beforeEach( () => {
+ window.localStorage.clear();
+
+ element = document.createElement( 'div' );
+ document.body.appendChild( element );
+
+ return TestEditor.create( element ).then( newEditor => {
+ editor = newEditor;
+
+ store = createStore( ( state, action ) => ( { ...state, ...action.state } ), {
+ editors: new Map( [ [ 'test-editor', editor ] ] ),
+ currentEditorName: 'test-editor',
+ ui: {
+ activeTab: 'Model'
+ },
+ currentEditorGlobals: {},
+ model: {
+ roots: [],
+ ranges: [],
+ markers: [],
+ treeDefinition: null,
+ currentRootName: 'main',
+ ui: {
+ activeTab: 'Selection',
+ showMarkers: false,
+ showCompactText: false
+ }
+ }
+ } );
+
+ wrapper = mount( );
+ } );
+ } );
+
+ afterEach( () => {
+ wrapper.unmount();
+ element.remove();
+
+ return editor.destroy();
+ } );
+
+ describe( 'render()', () => {
+ it( 'should render an element with a CSS class', () => {
+ expect( wrapper.children().childAt( 0 ) ).to.have.className( 'ck-inspector-editor-quick-actions' );
+ } );
+
+ describe( 'log editor button', () => {
+ it( 'should be rendered and log the editor in the console', () => {
+ const logSpy = sinon.stub( console, 'log' );
+ const logButton = wrapper.find( 'Button' ).at( 0 );
+
+ logButton.simulate( 'click' );
+
+ sinon.assert.calledOnce( logSpy );
+ sinon.assert.calledWith( logSpy, editor );
+
+ logSpy.restore();
+ } );
+ } );
+
+ describe( 'log editor data button', () => {
+ it( 'should be rendered and log the editor data in the console', () => {
+ const logSpy = sinon.stub( console, 'log' );
+ const logButton = wrapper.find( 'Button' ).at( 1 );
+
+ logButton.simulate( 'click' );
+
+ sinon.assert.calledOnce( logSpy );
+ sinon.assert.calledWith( logSpy, editor.getData() );
+
+ logSpy.restore();
+ } );
+ } );
+
+ describe( 'toggle read only button', () => {
+ it( 'should be rendered and toggle the editor read only state', () => {
+ const toggleReadOnlyButton = wrapper.find( 'Button' ).at( 2 );
+
+ toggleReadOnlyButton.simulate( 'click' );
+ expect( editor.isReadOnly ).to.be.true;
+
+ toggleReadOnlyButton.simulate( 'click' );
+ expect( editor.isReadOnly ).to.be.false;
+ } );
+ } );
+
+ describe( 'destroy editor button', () => {
+ it( 'should be rendered and destory the editor', () => {
+ const destroyButton = wrapper.find( 'Button' ).at( 3 );
+ const spy = sinon.spy( editor, 'destroy' );
+
+ destroyButton.simulate( 'click' );
+ sinon.assert.calledOnce( spy );
+ } );
+ } );
+
+ it( 'should enable all buttons when there is a current editor', () => {
+ wrapper.find( 'Button' ).forEach( button => {
+ expect( button.props().isEnabled ).to.be.true;
+ } );
+ } );
+
+ it( 'should disable all buttons when there is no current editor', () => {
+ store.dispatch( {
+ type: 'testAction',
+ state: {
+ editors: new Map(),
+ currentEditorName: null
+ }
+ } );
+
+ wrapper.update();
+
+ wrapper.find( 'Button' ).forEach( button => {
+ expect( button.props().isEnabled ).to.be.false;
+ } );
+ } );
+ } );
+} );
diff --git a/tests/inspector/model/markerinspector.js b/tests/inspector/model/markerinspector.js
index e0753e3..ae638fa 100644
--- a/tests/inspector/model/markerinspector.js
+++ b/tests/inspector/model/markerinspector.js
@@ -69,7 +69,7 @@ describe( '', () => {
const logSpy = sinon.stub( Logger, 'log' ).callsFake( () => {} );
expect( wrapper.find( ObjectInspector ) ).to.have.length( 1 );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'Markers' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'Markers' );
logMarkersButton.simulate( 'click' );
sinon.assert.calledOnce( logSpy );
diff --git a/tests/inspector/model/nodeinspector.js b/tests/inspector/model/nodeinspector.js
index 877af29..7fed1d7 100644
--- a/tests/inspector/model/nodeinspector.js
+++ b/tests/inspector/model/nodeinspector.js
@@ -89,7 +89,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'RootElement:main' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'RootElement:main' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -111,7 +111,7 @@ describe( '', () => {
} );
it( 'should render for an ', () => {
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'Element:paragraph' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'Element:paragraph' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -141,7 +141,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'Text:f' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'Text:f' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
diff --git a/tests/inspector/model/selectioninspector.js b/tests/inspector/model/selectioninspector.js
index f21bd41..c35bdea 100644
--- a/tests/inspector/model/selectioninspector.js
+++ b/tests/inspector/model/selectioninspector.js
@@ -130,7 +130,7 @@ describe( '', () => {
it( 'should contain the object inspector', () => {
expect( wrapper.find( ObjectInspector ) ).to.have.length( 1 );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'Selection' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'Selection' );
} );
} );
diff --git a/tests/inspector/ui.js b/tests/inspector/ui.js
index 80f712a..17015bd 100644
--- a/tests/inspector/ui.js
+++ b/tests/inspector/ui.js
@@ -52,6 +52,7 @@ describe( '', () => {
store = createStore( ( state, action ) => ( { ...state, ...action.state } ), {
editors,
currentEditorName: 'first',
+ currentEditorGlobals: {},
ui: {
activeTab: 'Model',
height: '123px',
diff --git a/tests/inspector/view/nodeinspector.js b/tests/inspector/view/nodeinspector.js
index 0d32eaa..efef499 100644
--- a/tests/inspector/view/nodeinspector.js
+++ b/tests/inspector/view/nodeinspector.js
@@ -96,7 +96,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'RootEditableElement:main' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'RootEditableElement:main' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -147,7 +147,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'ContainerElement:p' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'ContainerElement:p' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -189,7 +189,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'AttributeElement:strong' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'AttributeElement:strong' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -233,7 +233,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'EmptyElement:foo' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'EmptyElement:foo' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -277,7 +277,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'UIElement:foo' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'UIElement:foo' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -326,7 +326,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'RawElement:foo' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'RawElement:foo' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -372,7 +372,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'EditableElement:p' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'EditableElement:p' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
@@ -411,7 +411,7 @@ describe( '', () => {
const wrapper = mount( );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'Text:foo' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'Text:foo' );
expect( wrapper.childAt( 0 ).find( 'h2 a' ) ).to.have.attr( 'href' ).match( /^https:\/\/ckeditor.com\/docs/ );
const inspector = wrapper.find( ObjectInspector );
diff --git a/tests/inspector/view/selectioninspector.js b/tests/inspector/view/selectioninspector.js
index 82a4abe..1491534 100644
--- a/tests/inspector/view/selectioninspector.js
+++ b/tests/inspector/view/selectioninspector.js
@@ -130,7 +130,7 @@ describe( '', () => {
it( 'should contain the object inspector', () => {
expect( wrapper.find( ObjectInspector ) ).to.have.length( 1 );
- expect( wrapper.childAt( 0 ).find( 'h2 span' ).text() ).to.equal( 'Selection' );
+ expect( wrapper.childAt( 0 ).find( 'h2 > span' ).text() ).to.equal( 'Selection' );
} );
} );
diff --git a/webpack.config.js b/webpack.config.js
index 946c0e4..2f3e8d5 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -64,6 +64,30 @@ module.exports = ( env, argv ) => {
}
}
]
+ },
+ {
+ test: /\.svg$/,
+ loaders: [
+ {
+ loader: 'babel-loader',
+ query: {
+ presets: [
+ [
+ '@babel/react',
+ {
+ development: devMode
+ }
+ ]
+ ]
+ }
+ },
+ {
+ loader: 'react-svg-loader',
+ options: {
+ jsx: true
+ }
+ }
+ ]
}
]
},
diff --git a/yarn.lock b/yarn.lock
index 6e0e4fb..0219b24 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -26,6 +26,18 @@
dependencies:
"@babel/highlight" "^7.10.4"
+"@babel/code-frame@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431"
+ integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==
+ dependencies:
+ "@babel/highlight" "^7.16.0"
+
+"@babel/compat-data@^7.16.0":
+ version "7.16.4"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e"
+ integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==
+
"@babel/core@^7.2.2", "@babel/core@^7.7.5":
version "7.12.9"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8"
@@ -48,6 +60,27 @@
semver "^5.4.1"
source-map "^0.5.0"
+"@babel/core@^7.4.5":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4"
+ integrity sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==
+ dependencies:
+ "@babel/code-frame" "^7.16.0"
+ "@babel/generator" "^7.16.0"
+ "@babel/helper-compilation-targets" "^7.16.0"
+ "@babel/helper-module-transforms" "^7.16.0"
+ "@babel/helpers" "^7.16.0"
+ "@babel/parser" "^7.16.0"
+ "@babel/template" "^7.16.0"
+ "@babel/traverse" "^7.16.0"
+ "@babel/types" "^7.16.0"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.2"
+ json5 "^2.1.2"
+ semver "^6.3.0"
+ source-map "^0.5.0"
+
"@babel/generator@^7.12.5":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de"
@@ -57,6 +90,15 @@
jsesc "^2.5.1"
source-map "^0.5.0"
+"@babel/generator@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.0.tgz#d40f3d1d5075e62d3500bccb67f3daa8a95265b2"
+ integrity sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==
+ dependencies:
+ "@babel/types" "^7.16.0"
+ jsesc "^2.5.1"
+ source-map "^0.5.0"
+
"@babel/helper-annotate-as-pure@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3"
@@ -81,6 +123,16 @@
"@babel/helper-annotate-as-pure" "^7.10.4"
"@babel/types" "^7.10.4"
+"@babel/helper-compilation-targets@^7.16.0":
+ version "7.16.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz#5b480cd13f68363df6ec4dc8ac8e2da11363cbf0"
+ integrity sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==
+ dependencies:
+ "@babel/compat-data" "^7.16.0"
+ "@babel/helper-validator-option" "^7.14.5"
+ browserslist "^4.17.5"
+ semver "^6.3.0"
+
"@babel/helper-function-name@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a"
@@ -90,6 +142,15 @@
"@babel/template" "^7.10.4"
"@babel/types" "^7.10.4"
+"@babel/helper-function-name@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz#b7dd0797d00bbfee4f07e9c4ea5b0e30c8bb1481"
+ integrity sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==
+ dependencies:
+ "@babel/helper-get-function-arity" "^7.16.0"
+ "@babel/template" "^7.16.0"
+ "@babel/types" "^7.16.0"
+
"@babel/helper-get-function-arity@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2"
@@ -97,6 +158,20 @@
dependencies:
"@babel/types" "^7.10.4"
+"@babel/helper-get-function-arity@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz#0088c7486b29a9cb5d948b1a1de46db66e089cfa"
+ integrity sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
+"@babel/helper-hoist-variables@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz#4c9023c2f1def7e28ff46fc1dbcd36a39beaa81a"
+ integrity sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
"@babel/helper-member-expression-to-functions@^7.12.1":
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"
@@ -104,6 +179,13 @@
dependencies:
"@babel/types" "^7.12.7"
+"@babel/helper-member-expression-to-functions@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz#29287040efd197c77636ef75188e81da8bccd5a4"
+ integrity sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
"@babel/helper-module-imports@^7.12.1":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb"
@@ -111,6 +193,13 @@
dependencies:
"@babel/types" "^7.12.5"
+"@babel/helper-module-imports@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz#90538e60b672ecf1b448f5f4f5433d37e79a3ec3"
+ integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
"@babel/helper-module-transforms@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c"
@@ -126,6 +215,20 @@
"@babel/types" "^7.12.1"
lodash "^4.17.19"
+"@babel/helper-module-transforms@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz#1c82a8dd4cb34577502ebd2909699b194c3e9bb5"
+ integrity sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==
+ dependencies:
+ "@babel/helper-module-imports" "^7.16.0"
+ "@babel/helper-replace-supers" "^7.16.0"
+ "@babel/helper-simple-access" "^7.16.0"
+ "@babel/helper-split-export-declaration" "^7.16.0"
+ "@babel/helper-validator-identifier" "^7.15.7"
+ "@babel/template" "^7.16.0"
+ "@babel/traverse" "^7.16.0"
+ "@babel/types" "^7.16.0"
+
"@babel/helper-optimise-call-expression@^7.10.4":
version "7.12.7"
resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz#7f94ae5e08721a49467346aa04fd22f750033b9c"
@@ -133,11 +236,23 @@
dependencies:
"@babel/types" "^7.12.7"
+"@babel/helper-optimise-call-expression@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz#cecdb145d70c54096b1564f8e9f10cd7d193b338"
+ integrity sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
"@babel/helper-plugin-utils@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375"
integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==
+"@babel/helper-plugin-utils@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9"
+ integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==
+
"@babel/helper-replace-supers@^7.12.1":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9"
@@ -148,6 +263,16 @@
"@babel/traverse" "^7.12.5"
"@babel/types" "^7.12.5"
+"@babel/helper-replace-supers@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz#73055e8d3cf9bcba8ddb55cad93fedc860f68f17"
+ integrity sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==
+ dependencies:
+ "@babel/helper-member-expression-to-functions" "^7.16.0"
+ "@babel/helper-optimise-call-expression" "^7.16.0"
+ "@babel/traverse" "^7.16.0"
+ "@babel/types" "^7.16.0"
+
"@babel/helper-simple-access@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136"
@@ -155,6 +280,13 @@
dependencies:
"@babel/types" "^7.12.1"
+"@babel/helper-simple-access@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz#21d6a27620e383e37534cf6c10bba019a6f90517"
+ integrity sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
"@babel/helper-split-export-declaration@^7.11.0":
version "7.11.0"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f"
@@ -162,11 +294,28 @@
dependencies:
"@babel/types" "^7.11.0"
+"@babel/helper-split-export-declaration@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz#29672f43663e936df370aaeb22beddb3baec7438"
+ integrity sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==
+ dependencies:
+ "@babel/types" "^7.16.0"
+
"@babel/helper-validator-identifier@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
+"@babel/helper-validator-identifier@^7.15.7":
+ version "7.15.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389"
+ integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==
+
+"@babel/helper-validator-option@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3"
+ integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==
+
"@babel/helpers@^7.12.5":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e"
@@ -176,6 +325,15 @@
"@babel/traverse" "^7.12.5"
"@babel/types" "^7.12.5"
+"@babel/helpers@^7.16.0":
+ version "7.16.3"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.3.tgz#27fc64f40b996e7074dc73128c3e5c3e7f55c43c"
+ integrity sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==
+ dependencies:
+ "@babel/template" "^7.16.0"
+ "@babel/traverse" "^7.16.3"
+ "@babel/types" "^7.16.0"
+
"@babel/highlight@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
@@ -185,11 +343,25 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
+"@babel/highlight@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.0.tgz#6ceb32b2ca4b8f5f361fb7fd821e3fddf4a1725a"
+ integrity sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.15.7"
+ chalk "^2.0.0"
+ js-tokens "^4.0.0"
+
"@babel/parser@^7.12.7", "@babel/parser@^7.7.0":
version "7.12.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056"
integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==
+"@babel/parser@^7.16.0", "@babel/parser@^7.16.3":
+ version "7.16.4"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.4.tgz#d5f92f57cf2c74ffe9b37981c0e72fee7311372e"
+ integrity sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==
+
"@babel/plugin-syntax-jsx@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926"
@@ -197,6 +369,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
+"@babel/plugin-syntax-jsx@^7.2.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz#f9624394317365a9a88c82358d3f8471154698f1"
+ integrity sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
"@babel/plugin-transform-react-display-name@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.1.tgz#1cbcd0c3b1d6648c55374a22fc9b6b7e5341c00d"
@@ -274,6 +453,15 @@
"@babel/parser" "^7.12.7"
"@babel/types" "^7.12.7"
+"@babel/template@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.0.tgz#d16a35ebf4cd74e202083356fab21dd89363ddd6"
+ integrity sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==
+ dependencies:
+ "@babel/code-frame" "^7.16.0"
+ "@babel/parser" "^7.16.0"
+ "@babel/types" "^7.16.0"
+
"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9", "@babel/traverse@^7.7.0":
version "7.12.9"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f"
@@ -289,6 +477,21 @@
globals "^11.1.0"
lodash "^4.17.19"
+"@babel/traverse@^7.16.0", "@babel/traverse@^7.16.3":
+ version "7.16.3"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.3.tgz#f63e8a938cc1b780f66d9ed3c54f532ca2d14787"
+ integrity sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==
+ dependencies:
+ "@babel/code-frame" "^7.16.0"
+ "@babel/generator" "^7.16.0"
+ "@babel/helper-function-name" "^7.16.0"
+ "@babel/helper-hoist-variables" "^7.16.0"
+ "@babel/helper-split-export-declaration" "^7.16.0"
+ "@babel/parser" "^7.16.3"
+ "@babel/types" "^7.16.0"
+ debug "^4.1.0"
+ globals "^11.1.0"
+
"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.7.0":
version "7.12.7"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13"
@@ -298,6 +501,14 @@
lodash "^4.17.19"
to-fast-properties "^2.0.0"
+"@babel/types@^7.16.0":
+ version "7.16.0"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba"
+ integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.15.7"
+ to-fast-properties "^2.0.0"
+
"@ckeditor/ckeditor5-basic-styles@^21.0.0":
version "21.0.0"
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-21.0.0.tgz#02fbae43b7b2e356b4695fbd549084739a067b4a"
@@ -1237,6 +1448,11 @@ babel-messages@^6.23.0:
dependencies:
babel-runtime "^6.22.0"
+babel-plugin-react-svg@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/babel-plugin-react-svg/-/babel-plugin-react-svg-3.0.3.tgz#7da46a0bd8319f49ac85523d259f145ce5d78321"
+ integrity sha512-Pst1RWjUIiV0Ykv1ODSeceCBsFOP2Y4dusjq7/XkjuzJdvS9CjpkPMUIoO4MLlvp5PiLCeMlsOC7faEUA0gm3Q==
+
babel-runtime@^6.22.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
@@ -1512,6 +1728,17 @@ browserslist@^4.0.0:
escalade "^3.1.1"
node-releases "^1.1.71"
+browserslist@^4.17.5:
+ version "4.18.1"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.18.1.tgz#60d3920f25b6860eb917c6c7b185576f4d8b017f"
+ integrity sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==
+ dependencies:
+ caniuse-lite "^1.0.30001280"
+ electron-to-chromium "^1.3.896"
+ escalade "^3.1.1"
+ node-releases "^2.0.1"
+ picocolors "^1.0.0"
+
btoa-lite@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337"
@@ -1709,6 +1936,11 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001219:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa"
integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==
+caniuse-lite@^1.0.30001280:
+ version "1.0.30001282"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz#38c781ee0a90ccfe1fe7fefd00e43f5ffdcb96fd"
+ integrity sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg==
+
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
@@ -2962,6 +3194,11 @@ electron-to-chromium@^1.3.723:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz#f632d900a1f788dab22fec9c62ec5c9c8f0c4052"
integrity sha512-DY8dA7gR51MSo66DqitEQoUMQ0Z+A2DSXFi7tK304bdTVqczCAfUuyQw6Wdg8hIoo5zIxkU1L24RQtUce1Ioig==
+electron-to-chromium@^1.3.896:
+ version "1.3.900"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.900.tgz#5be2c5818a2a012c511b4b43e87b6ab7a296d4f5"
+ integrity sha512-SuXbQD8D4EjsaBaJJxySHbC+zq8JrFfxtb4GIr4E9n1BcROyMcRrJCYQNpJ9N+Wjf5mFp7Wp0OHykd14JNEzzQ==
+
elegant-spinner@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
@@ -3820,7 +4057,7 @@ g-status@^2.0.2:
matcher "^1.0.0"
simple-git "^1.85.0"
-gensync@^1.0.0-beta.1:
+gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
@@ -5525,6 +5762,11 @@ lodash._reinterpolate@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
+lodash.clonedeep@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
+ integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
+
lodash.escape@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98"
@@ -5550,6 +5792,11 @@ lodash.ismatch@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=
+lodash.isplainobject@^4.0.6:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
+ integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=
+
lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
@@ -6199,6 +6446,11 @@ node-releases@^1.1.71:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.72.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe"
integrity sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==
+node-releases@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5"
+ integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==
+
normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@@ -6720,6 +6972,11 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+picocolors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
+ integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
+
picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1:
version "2.2.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
@@ -7416,6 +7673,27 @@ react-rnd@^10.0.0:
react-draggable "4.4.3"
tslib "2.0.3"
+react-svg-core@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/react-svg-core/-/react-svg-core-3.0.3.tgz#5d856efeaa4d089b0afeebe885b20b8c9500d162"
+ integrity sha512-Ws3eM3xCAwcaYeqm4Ajcz3zxBYNI6BeTWWhFR0cpOT+pWuVtozgHYK9xUM0S/ilapZgYMQDe49XgOxpvooFq4w==
+ dependencies:
+ "@babel/core" "^7.4.5"
+ "@babel/plugin-syntax-jsx" "^7.2.0"
+ "@babel/preset-react" "^7.0.0"
+ babel-plugin-react-svg "^3.0.3"
+ lodash.clonedeep "^4.5.0"
+ lodash.isplainobject "^4.0.6"
+ svgo "^1.2.2"
+
+react-svg-loader@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/react-svg-loader/-/react-svg-loader-3.0.3.tgz#8baa2d5daa32523dfd0745425ac65e0a90edae15"
+ integrity sha512-V1KnIUtvWVvc4xCig34n+f+/74ylMMugB2FbuAF/yq+QRi+WLi2hUYp9Ze3VylhA1D7ZgRygBh3Ojj8S3TPhJA==
+ dependencies:
+ loader-utils "^1.2.3"
+ react-svg-core "^3.0.3"
+
react-test-renderer@^16.0.0-0:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae"
@@ -8579,7 +8857,7 @@ supports-color@^7.0.0, supports-color@^7.1.0:
dependencies:
has-flag "^4.0.0"
-svgo@^1.0.0:
+svgo@^1.0.0, svgo@^1.2.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167"
integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==