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 1515import type { BlockNodeRecord } from 'BlockNodeRecord' ;
1616import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
1717import type { DraftInlineStyle } from 'DraftInlineStyle' ;
18+ import type EditorState from 'EditorState' ;
1819import type { BidiDirection } from 'UnicodeBidiDirection' ;
1920
2021const DraftEditorBlock = require ( 'DraftEditorBlock.react' ) ;
2122const DraftOffsetKey = require ( 'DraftOffsetKey' ) ;
22- const EditorState = require ( 'EditorState' ) ;
2323const React = require ( 'React' ) ;
2424
2525const cx = require ( 'cx' ) ;
Original file line number Diff line number Diff line change @@ -22,13 +22,12 @@ import type ContentState from 'ContentState';
2222import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
2323import type { DraftDecoratorType } from 'DraftDecoratorType' ;
2424import type { DraftInlineStyle } from 'DraftInlineStyle' ;
25+ import type EditorState from 'EditorState' ;
2526import type SelectionState from 'SelectionState' ;
2627import type { BidiDirection } from 'UnicodeBidiDirection' ;
2728
2829const DraftEditorNode = require ( 'DraftEditorNode.react' ) ;
2930const DraftOffsetKey = require ( 'DraftOffsetKey' ) ;
30- const EditorState = require ( 'EditorState' ) ;
31- const Immutable = require ( 'immutable' ) ;
3231const React = require ( 'React' ) ;
3332const ReactDOM = require ( 'ReactDOM' ) ;
3433const Scroll = require ( 'Scroll' ) ;
@@ -37,6 +36,7 @@ const Style = require('Style');
3736const getElementPosition = require ( 'getElementPosition' ) ;
3837const getScrollPosition = require ( 'getScrollPosition' ) ;
3938const getViewportDimensions = require ( 'getViewportDimensions' ) ;
39+ const Immutable = require ( 'immutable' ) ;
4040const invariant = require ( 'invariant' ) ;
4141
4242const SCROLL_BUFFER = 10 ;
Original file line number Diff line number Diff line change 2020import type { BlockNodeRecord } from 'BlockNodeRecord' ;
2121import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
2222import type { DraftInlineStyle } from 'DraftInlineStyle' ;
23+ import type EditorState from 'EditorState' ;
2324import type { BidiDirection } from 'UnicodeBidiDirection' ;
2425
2526const DraftEditorBlockNode = require ( 'DraftEditorBlockNode.react' ) ;
2627const DraftOffsetKey = require ( 'DraftOffsetKey' ) ;
27- const EditorState = require ( 'EditorState' ) ;
2828const React = require ( 'React' ) ;
2929
3030const nullthrows = require ( 'nullthrows' ) ;
Original file line number Diff line number Diff line change 1414
1515import type { BlockNodeRecord } from 'BlockNodeRecord' ;
1616import type { DraftInsertionType } from 'DraftInsertionType' ;
17+ import type SelectionState from 'SelectionState' ;
1718
1819const BlockMapBuilder = require ( 'BlockMapBuilder' ) ;
1920const CharacterMetadata = require ( 'CharacterMetadata' ) ;
2021const ContentBlock = require ( 'ContentBlock' ) ;
2122const ContentBlockNode = require ( 'ContentBlockNode' ) ;
2223const DraftModifier = require ( 'DraftModifier' ) ;
2324const EditorState = require ( 'EditorState' ) ;
24- const Immutable = require ( 'immutable' ) ;
25- const SelectionState = require ( 'SelectionState' ) ;
2625
2726const generateRandomKey = require ( 'generateRandomKey' ) ;
2827const gkx = require ( 'gkx' ) ;
28+ const Immutable = require ( 'immutable' ) ;
2929const moveBlockInContentState = require ( 'moveBlockInContentState' ) ;
3030
3131const experimentalTreeDataSupport = gkx ( 'draft_tree_data_support' ) ;
Original file line number Diff line number Diff line change 1313'use strict' ;
1414
1515import type { BlockNodeRecord } from 'BlockNodeRecord' ;
16+ import type CharacterMetadata from 'CharacterMetadata' ;
1617import type { DraftBlockRenderMap } from 'DraftBlockRenderMap' ;
1718import type { DraftBlockType } from 'DraftBlockType' ;
1819import type { EntityMap } from 'EntityMap' ;
1920
20- const CharacterMetadata = require ( 'CharacterMetadata' ) ;
2121const ContentBlock = require ( 'ContentBlock' ) ;
2222const ContentBlockNode = require ( 'ContentBlockNode' ) ;
23- const Immutable = require ( 'immutable' ) ;
2423
2524const convertFromHTMLtoContentBlocksClassic = require ( 'convertFromHTMLToContentBlocks' ) ;
2625const convertFromHTMLtoContentBlocksNew = require ( 'convertFromHTMLToContentBlocks2' ) ;
2726const generateRandomKey = require ( 'generateRandomKey' ) ;
2827const getSafeBodyFromHTML = require ( 'getSafeBodyFromHTML' ) ;
2928const gkx = require ( 'gkx' ) ;
29+ const Immutable = require ( 'immutable' ) ;
3030const sanitizeDraftText = require ( 'sanitizeDraftText' ) ;
3131
3232const { List, Repeat} = Immutable ;
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ import type ContentState from 'ContentState';
1818import type { DraftInsertionType } from 'DraftInsertionType' ;
1919
2020const ContentBlockNode = require ( 'ContentBlockNode' ) ;
21- const Immutable = require ( 'immutable' ) ;
2221
2322const getNextDelimiterBlockKey = require ( 'getNextDelimiterBlockKey' ) ;
23+ const Immutable = require ( 'immutable' ) ;
2424const invariant = require ( 'invariant' ) ;
2525
2626const { OrderedMap, List} = Immutable ;
@@ -115,7 +115,9 @@ const updateBlockMapLinks = (
115115
116116 const insertionIndex = isInsertedAfterTarget
117117 ? targetBlockIndex + 1
118- : targetBlockIndex !== 0 ? targetBlockIndex - 1 : 0 ;
118+ : targetBlockIndex !== 0
119+ ? targetBlockIndex - 1
120+ : 0 ;
119121
120122 const newChildrenArray = newParentChildrenList . toArray ( ) ;
121123 newChildrenArray . splice ( insertionIndex , 0 , originalBlockKey ) ;
You can’t perform that action at this time.
0 commit comments