• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ckeditor / ckeditor5-inspector / 549

pending completion
549

push

travis-ci-com

web-flow
Bump webpack from 5.75.0 to 5.76.0

Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

521 of 560 branches covered (93.04%)

Branch coverage included in aggregate %.

1123 of 1165 relevant lines covered (96.39%)

113.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.89
/src/model/tree.js
1
/**
2
 * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
 * For licensing, see LICENSE.md.
4
 */
5

6
import React, { Component } from 'react';
7
import { connect } from 'react-redux';
8
import {
9
        toggleModelShowCompactText,
10
        setModelCurrentRootName,
11
        toggleModelShowMarkers,
12
        setModelCurrentNode,
13
        setModelActiveTab
14
} from './data/actions';
15

16
import { getEditorModelRoots } from './data/utils';
17

18
import Tree from '../components/tree/tree';
19
import NavBox from '../components/navbox';
20
import Select from '../components/select';
21
import Checkbox from '../components/checkbox';
22

23
class ModelTree extends Component {
24
        constructor( props ) {
25
                super( props );
75✔
26

27
                this.handleTreeClick = this.handleTreeClick.bind( this );
75✔
28
                this.handleRootChange = this.handleRootChange.bind( this );
75✔
29
        }
30

31
        handleTreeClick( evt, currentNode ) {
32
                evt.persist();
×
33
                evt.stopPropagation();
×
34

35
                this.props.setModelCurrentNode( currentNode );
×
36

37
                // Double click on a tree element should open the inspector.
38
                if ( evt.detail === 2 ) {
×
39
                        this.props.setModelActiveTab( 'Inspect' );
×
40
                }
41
        }
42

43
        handleRootChange( evt ) {
44
                this.props.setModelCurrentRootName( evt.target.value );
1✔
45
        }
46

47
        render() {
48
                const currentEditor = this.props.editors.get( this.props.currentEditorName );
135✔
49

50
                return <NavBox>
135✔
51
                        {[
52
                                <div className="ck-inspector-tree__config" key="root-cfg">
53
                                        <Select
54
                                                id="view-root-select"
55
                                                label="Root"
56
                                                value={this.props.currentRootName}
57
                                                options={getEditorModelRoots( currentEditor ).map( root => root.rootName )}
270✔
58
                                                onChange={this.handleRootChange}
59
                                        />
60
                                </div>,
61
                                <span className="ck-inspector-separator" key="separator"></span>,
62
                                <div className="ck-inspector-tree__config" key="text-cfg">
63
                                        <Checkbox
64
                                                label="Compact text"
65
                                                id="model-compact-text"
66
                                                isChecked={this.props.showCompactText}
67
                                                onChange={this.props.toggleModelShowCompactText}
68
                                        />
69
                                        <Checkbox
70
                                                label="Show markers"
71
                                                id="model-show-markers"
72
                                                isChecked={this.props.showMarkers}
73
                                                onChange={this.props.toggleModelShowMarkers}
74
                                        />
75
                                </div>
76
                        ]}
77
                        <Tree
78
                                className={[
79
                                        !this.props.showMarkers ? 'ck-inspector-model-tree__hide-markers' : ''
135!
80
                                ]}
81
                                definition={this.props.treeDefinition}
82
                                textDirection={currentEditor.locale.contentLanguageDirection}
83
                                onClick={this.handleTreeClick}
84
                                showCompactText={this.props.showCompactText}
85
                                activeNode={this.props.currentNode}
86
                        />
87
                </NavBox>;
88
        }
89
}
90

91
const mapStateToProps = (
1✔
92
        { editors, currentEditorName, model: { treeDefinition, currentRootName, currentNode, ui: { showMarkers, showCompactText } } }
93
) => {
94
        return { treeDefinition, editors, currentEditorName, currentRootName, currentNode, showMarkers, showCompactText };
154✔
95
};
96

97
const mapDispatchToProps = {
1✔
98
        toggleModelShowCompactText,
99
        setModelCurrentRootName,
100
        toggleModelShowMarkers,
101
        setModelCurrentNode,
102
        setModelActiveTab
103
};
104

105
export default connect( mapStateToProps, mapDispatchToProps )( ModelTree );
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc