This repository was archived by the owner on Feb 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +12
-10
lines changed Expand file tree Collapse file tree 6 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 15
15
import type { BlockNodeRecord } from 'BlockNodeRecord' ;
16
16
import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
17
17
import type { DraftInlineStyle } from 'DraftInlineStyle' ;
18
+ import type EditorState from 'EditorState' ;
18
19
import type { BidiDirection } from 'UnicodeBidiDirection' ;
19
20
20
21
const DraftEditorBlock = require ( 'DraftEditorBlock.react' ) ;
21
22
const DraftOffsetKey = require ( 'DraftOffsetKey' ) ;
22
- const EditorState = require ( 'EditorState' ) ;
23
23
const React = require ( 'React' ) ;
24
24
25
25
const cx = require ( 'cx' ) ;
Original file line number Diff line number Diff line change @@ -22,13 +22,12 @@ import type ContentState from 'ContentState';
22
22
import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
23
23
import type { DraftDecoratorType } from 'DraftDecoratorType' ;
24
24
import type { DraftInlineStyle } from 'DraftInlineStyle' ;
25
+ import type EditorState from 'EditorState' ;
25
26
import type SelectionState from 'SelectionState' ;
26
27
import type { BidiDirection } from 'UnicodeBidiDirection' ;
27
28
28
29
const DraftEditorNode = require ( 'DraftEditorNode.react' ) ;
29
30
const DraftOffsetKey = require ( 'DraftOffsetKey' ) ;
30
- const EditorState = require ( 'EditorState' ) ;
31
- const Immutable = require ( 'immutable' ) ;
32
31
const React = require ( 'React' ) ;
33
32
const ReactDOM = require ( 'ReactDOM' ) ;
34
33
const Scroll = require ( 'Scroll' ) ;
@@ -37,6 +36,7 @@ const Style = require('Style');
37
36
const getElementPosition = require ( 'getElementPosition' ) ;
38
37
const getScrollPosition = require ( 'getScrollPosition' ) ;
39
38
const getViewportDimensions = require ( 'getViewportDimensions' ) ;
39
+ const Immutable = require ( 'immutable' ) ;
40
40
const invariant = require ( 'invariant' ) ;
41
41
42
42
const SCROLL_BUFFER = 10 ;
Original file line number Diff line number Diff line change 20
20
import type { BlockNodeRecord } from 'BlockNodeRecord' ;
21
21
import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
22
22
import type { DraftInlineStyle } from 'DraftInlineStyle' ;
23
+ import type EditorState from 'EditorState' ;
23
24
import type { BidiDirection } from 'UnicodeBidiDirection' ;
24
25
25
26
const DraftEditorBlockNode = require ( 'DraftEditorBlockNode.react' ) ;
26
27
const DraftOffsetKey = require ( 'DraftOffsetKey' ) ;
27
- const EditorState = require ( 'EditorState' ) ;
28
28
const React = require ( 'React' ) ;
29
29
30
30
const nullthrows = require ( 'nullthrows' ) ;
Original file line number Diff line number Diff line change 14
14
15
15
import type { BlockNodeRecord } from 'BlockNodeRecord' ;
16
16
import type { DraftInsertionType } from 'DraftInsertionType' ;
17
+ import type SelectionState from 'SelectionState' ;
17
18
18
19
const BlockMapBuilder = require ( 'BlockMapBuilder' ) ;
19
20
const CharacterMetadata = require ( 'CharacterMetadata' ) ;
20
21
const ContentBlock = require ( 'ContentBlock' ) ;
21
22
const ContentBlockNode = require ( 'ContentBlockNode' ) ;
22
23
const DraftModifier = require ( 'DraftModifier' ) ;
23
24
const EditorState = require ( 'EditorState' ) ;
24
- const Immutable = require ( 'immutable' ) ;
25
- const SelectionState = require ( 'SelectionState' ) ;
26
25
27
26
const generateRandomKey = require ( 'generateRandomKey' ) ;
28
27
const gkx = require ( 'gkx' ) ;
28
+ const Immutable = require ( 'immutable' ) ;
29
29
const moveBlockInContentState = require ( 'moveBlockInContentState' ) ;
30
30
31
31
const experimentalTreeDataSupport = gkx ( 'draft_tree_data_support' ) ;
Original file line number Diff line number Diff line change 13
13
'use strict' ;
14
14
15
15
import type { BlockNodeRecord } from 'BlockNodeRecord' ;
16
+ import type CharacterMetadata from 'CharacterMetadata' ;
16
17
import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
17
18
import type { DraftBlockType } from 'DraftBlockType' ;
18
19
import type { EntityMap } from 'EntityMap' ;
19
20
20
- const CharacterMetadata = require ( 'CharacterMetadata' ) ;
21
21
const ContentBlock = require ( 'ContentBlock' ) ;
22
22
const ContentBlockNode = require ( 'ContentBlockNode' ) ;
23
- const Immutable = require ( 'immutable' ) ;
24
23
25
24
const convertFromHTMLtoContentBlocksClassic = require ( 'convertFromHTMLToContentBlocks' ) ;
26
25
const convertFromHTMLtoContentBlocksNew = require ( 'convertFromHTMLToContentBlocks2' ) ;
27
26
const generateRandomKey = require ( 'generateRandomKey' ) ;
28
27
const getSafeBodyFromHTML = require ( 'getSafeBodyFromHTML' ) ;
29
28
const gkx = require ( 'gkx' ) ;
29
+ const Immutable = require ( 'immutable' ) ;
30
30
const sanitizeDraftText = require ( 'sanitizeDraftText' ) ;
31
31
32
32
const { List, Repeat} = Immutable ;
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ import type ContentState from 'ContentState';
18
18
import type { DraftInsertionType } from 'DraftInsertionType' ;
19
19
20
20
const ContentBlockNode = require ( 'ContentBlockNode' ) ;
21
- const Immutable = require ( 'immutable' ) ;
22
21
23
22
const getNextDelimiterBlockKey = require ( 'getNextDelimiterBlockKey' ) ;
23
+ const Immutable = require ( 'immutable' ) ;
24
24
const invariant = require ( 'invariant' ) ;
25
25
26
26
const { OrderedMap, List} = Immutable ;
@@ -115,7 +115,9 @@ const updateBlockMapLinks = (
115
115
116
116
const insertionIndex = isInsertedAfterTarget
117
117
? targetBlockIndex + 1
118
- : targetBlockIndex !== 0 ? targetBlockIndex - 1 : 0 ;
118
+ : targetBlockIndex !== 0
119
+ ? targetBlockIndex - 1
120
+ : 0 ;
119
121
120
122
const newChildrenArray = newParentChildrenList . toArray ( ) ;
121
123
newChildrenArray . splice ( insertionIndex , 0 , originalBlockKey ) ;
You can’t perform that action at this time.
0 commit comments