UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

244 lines (243 loc) 19 kB
import { MapCreator } from '../../../../../utils/map-creator'; import { DestinationSubDocument } from '../../destination/sub-document/destination-sub-document'; import { SkipNestedTableDestination } from '../../destination/table/skip-nested-table-destination'; export const appendTablePropertiesKeywords = new MapCreator() .add("trowd", DestinationSubDocument.onTableRowDefaultsKeyword) .add("ts", DestinationSubDocument.onTableStyleKeyword) .add("cellx", DestinationSubDocument.onCellxKeyword) .add("clwWidth", DestinationSubDocument.onCellPreferredWidthKeyword) .add("clftsWidth", DestinationSubDocument.onWidthUnitTypeKeyword) .add("clmgf", DestinationSubDocument.onFirstHorizontalMergedCellKeyword) .add("clmrg", DestinationSubDocument.onNextHorizontalMergedCellKeyword) .add("clvmgf", DestinationSubDocument.onFirstVerticalMergedCellKeyword) .add("clvmrg", DestinationSubDocument.onNextVerticalMergedCellKeyword) .add("clFitText", DestinationSubDocument.onCellFitTextKeyword) .add("clNoWrap", DestinationSubDocument.onCellNoWrapKeyword) .add("tsvertalt", DestinationSubDocument.onCellVerticalAlignmentTopKeyword) .add("tsvertalc", DestinationSubDocument.onCellVerticalAlignmentCenterKeyword) .add("tsvertalb", DestinationSubDocument.onCellVerticalAlignmentBottomKeyword) .add("clhidemark", DestinationSubDocument.onCellHideMarkKeyword) .add("clpadb", DestinationSubDocument.onCellBottomCellMarginKeyword) .add("clpadl", DestinationSubDocument.onCellLeftCellMarginKeyword) .add("clpadr", DestinationSubDocument.onCellRightCellMarginKeyword) .add("clpadt", DestinationSubDocument.onCellTopCellMarginKeyword) .add("clpadfb", DestinationSubDocument.onCellBottomCellMarginUnitTypeKeyword) .add("clpadfl", DestinationSubDocument.onCellLeftCellMarginUnitTypeKeyword) .add("clpadfr", DestinationSubDocument.onCellRightCellMarginUnitTypeKeyword) .add("clpadft", DestinationSubDocument.onCellTopCellMarginUnitTypeKeyword) .add("clvertalt", DestinationSubDocument.onCellTextTopAlignmentKeyword) .add("clvertalc", DestinationSubDocument.onCellTextCenterVerticalAlignmentKeyword) .add("clvertalb", DestinationSubDocument.onCellTextBottomAlignmentKeyword) .add("cltxlrtb", DestinationSubDocument.onCellLeftToRightTopToBottomTextDirectionKeyword) .add("cltxtbrl", DestinationSubDocument.onCellTopToBottomRightToLeftTextDirectionKeyword) .add("cltxbtlr", DestinationSubDocument.onCellBottomToTopLeftToRightTextDirectionKeyword) .add("cltxlrtbv", DestinationSubDocument.onCellLeftToRightTopToBottomVerticalTextDirectionKeyword) .add("cltxtbrlv", DestinationSubDocument.onCellTopToBottomRightToLeftVerticalTextDirectionKeyword) .add("clcbpat", DestinationSubDocument.onCellBackgroundColorKeyword) .add("clcbpatraw", DestinationSubDocument.onCellBackgroundColorKeyword) .add("tscellcbpat", DestinationSubDocument.onCellBackgroundColorKeyword) .add("clcfpat", DestinationSubDocument.onCellForegroundColorKeyword) .add("clcfpatraw", DestinationSubDocument.onCellForegroundColorKeyword) .add("clshdng", DestinationSubDocument.onCellShadingKeyword) .add("clshdngraw", DestinationSubDocument.onCellShadingKeyword) .add("clshdrawnil", DestinationSubDocument.onCellNoShadingKeyword) .add("clbghoriz", DestinationSubDocument.onCellHorizontalBackgroundPatternKeyword) .add("rawclbghoriz", DestinationSubDocument.onCellHorizontalBackgroundPatternKeyword) .add("clbgvert", DestinationSubDocument.onCellVerticalBackgroundPatternKeyword) .add("rawclbgvert", DestinationSubDocument.onCellVerticalBackgroundPatternKeyword) .add("clbgfdiag", DestinationSubDocument.onCellForwardDiagonalBackgroundPatternKeyword) .add("rawclbgfdiag", DestinationSubDocument.onCellForwardDiagonalBackgroundPatternKeyword) .add("clbgbdiag", DestinationSubDocument.onCellBackwardDiagonalBackgroundPatternKeyword) .add("rawclbgbdiag", DestinationSubDocument.onCellBackwardDiagonalBackgroundPatternKeyword) .add("clbgcross", DestinationSubDocument.onCellCrossBackgroundPatternKeyword) .add("rawclbgcross", DestinationSubDocument.onCellCrossBackgroundPatternKeyword) .add("clbgdcross", DestinationSubDocument.onCellDiagonalCrossBackgroundPatternKeyword) .add("rawclbgdcross", DestinationSubDocument.onCellDiagonalCrossBackgroundPatternKeyword) .add("clbgdkhor", DestinationSubDocument.onCellDarkHorizontalBackgroundPatternKeyword) .add("rawclbgdkhor", DestinationSubDocument.onCellDarkHorizontalBackgroundPatternKeyword) .add("clbgdkvert", DestinationSubDocument.onCellDarkVerticalBackgroundPatternKeyword) .add("rawclbgdkvert", DestinationSubDocument.onCellDarkVerticalBackgroundPatternKeyword) .add("clbgdkfdiag", DestinationSubDocument.onCellDarkForwardDiagonalBackgroundPatternKeyword) .add("rawclbgdkfdiag", DestinationSubDocument.onCellDarkForwardDiagonalBackgroundPatternKeyword) .add("clbgdkbdiag", DestinationSubDocument.onCellDarkBackwardDiagonalBackgroundPatternKeyword) .add("rawclbgdkbdiag", DestinationSubDocument.onCellDarkBackwardDiagonalBackgroundPatternKeyword) .add("clbgdkcross", DestinationSubDocument.onCellDarkCrossBackgroundPatternKeyword) .add("rawclbgdkcross", DestinationSubDocument.onCellDarkCrossBackgroundPatternKeyword) .add("clbgdkdcross", DestinationSubDocument.onCellDarkDiagonalCrossBackgroundPatternKeyword) .add("rawclbgdkdcross", DestinationSubDocument.onCellDarkDiagonalCrossBackgroundPatternKeyword) .add("tscellcfpat", DestinationSubDocument.onCellForegroundColorKeyword) .add("tscellpct", DestinationSubDocument.onCellShadingKeyword) .add("tsbgbdiag", DestinationSubDocument.onCellBackwardDiagonalBackgroundPatternKeyword) .add("tsbgfdiag", DestinationSubDocument.onCellForwardDiagonalBackgroundPatternKeyword) .add("tsbgdkbdiag", DestinationSubDocument.onCellDarkBackwardDiagonalBackgroundPatternKeyword) .add("tsbgdkfdiag", DestinationSubDocument.onCellDarkForwardDiagonalBackgroundPatternKeyword) .add("tsbgcross", DestinationSubDocument.onCellCrossBackgroundPatternKeyword) .add("tsbgdcross", DestinationSubDocument.onCellDiagonalCrossBackgroundPatternKeyword) .add("tsbgdkcross", DestinationSubDocument.onCellDarkCrossBackgroundPatternKeyword) .add("tsbgdkdcross", DestinationSubDocument.onCellDarkDiagonalCrossBackgroundPatternKeyword) .add("tsbghoriz", DestinationSubDocument.onCellHorizontalBackgroundPatternKeyword) .add("tsbgvert", DestinationSubDocument.onCellVerticalBackgroundPatternKeyword) .add("tsbgdkhor", DestinationSubDocument.onCellDarkHorizontalBackgroundPatternKeyword) .add("tsbgdkvert", DestinationSubDocument.onCellDarkVerticalBackgroundPatternKeyword) .add("brdrtbl", DestinationSubDocument.onNoTableBorderKeyword) .add("clbrdrb", DestinationSubDocument.onBottomCellBorderKeyword) .add("clbrdrt", DestinationSubDocument.onTopCellBorderKeyword) .add("clbrdrl", DestinationSubDocument.onLeftCellBorderKeyword) .add("clbrdrr", DestinationSubDocument.onRightCellBorderKeyword) .add("cldglu", DestinationSubDocument.onUpperLeftToLowerRightBorderKeyword) .add("cldgll", DestinationSubDocument.onUpperRightToLowerLeftBorderKeyword) .add("trleft", DestinationSubDocument.onRowLeftKeyword) .add("trhdr", DestinationSubDocument.onRowHeaderKeyword) .add("trrh", DestinationSubDocument.onRowHeightKeyword) .add("trkeep", DestinationSubDocument.onRowKeepKeyword) .add("trqr", DestinationSubDocument.onTableRightAlignmentKeyword) .add("trql", DestinationSubDocument.onTableLeftAlignmentKeyword) .add("trqc", DestinationSubDocument.onTableCenterAlignmentKeyword) .add("trwWidthB", DestinationSubDocument.onWidthBeforeKeyword) .add("trftsWidthB", DestinationSubDocument.onWidthBeforeUnitTypeKeyword) .add("trwWidthA", DestinationSubDocument.onWidthAfterKeyword) .add("trftsWidthA", DestinationSubDocument.onWidthAfterUnitTypeKeyword) .add("trcbpat", DestinationSubDocument.onRowBackgroundColorKeyword) .add("trcfpat", DestinationSubDocument.onRowForegroundColorKeyword) .add("trpat", DestinationSubDocument.onRowPatternKeyword) .add("trshdng", DestinationSubDocument.onRowShadingKeyword) .add("trbgbdiag", DestinationSubDocument.onRowBackwardDiagonalPatternKeyword) .add("trbgcross", DestinationSubDocument.onRowCrossPatternKeyword) .add("trbgdcross", DestinationSubDocument.onRowDiagonalCrossPatternKeyword) .add("trbgdkbdiag", DestinationSubDocument.onRowDarkBackwardDiagonalPatternKeyword) .add("trbgdkcross", DestinationSubDocument.onRowDarkCrossPatternKeyword) .add("trbgdkdcross", DestinationSubDocument.onRowDarkDiagonalCrossPatternKeyword) .add("trbgdkfdiag", DestinationSubDocument.onRowDarkForwardDiagonalPatternKeyword) .add("trbgdkhor", DestinationSubDocument.onRowDarkHorizontalPatternKeyword) .add("trbgdkvert", DestinationSubDocument.onRowDarkVerticalPatternKeyword) .add("trbgfdiag", DestinationSubDocument.onRowForwardDiagonalPatternKeyword) .add("trbghoriz", DestinationSubDocument.onRowHorizontalPatternKeyword) .add("trbgvert", DestinationSubDocument.onRowVerticalPatternKeyword) .add("trgaph", DestinationSubDocument.onSpaceBetweenCellsKeyword) .add("trpaddb", DestinationSubDocument.onTableBottomCellMarginKeyword) .add("trpaddl", DestinationSubDocument.onTableLeftCellMarginKeyword) .add("trpaddr", DestinationSubDocument.onTableRightCellMarginKeyword) .add("trpaddt", DestinationSubDocument.onTableTopCellMarginKeyword) .add("trpaddfb", DestinationSubDocument.onTableBottomCellMarginUnitTypeKeyword) .add("trpaddfl", DestinationSubDocument.onTableLeftCellMarginUnitTypeKeyword) .add("trpaddfr", DestinationSubDocument.onTableRightCellMarginUnitTypeKeyword) .add("trpaddft", DestinationSubDocument.onTableTopCellMarginUnitTypeKeyword) .add("trspdb", DestinationSubDocument.onTableBottomCellSpacingKeyword) .add("trspdl", DestinationSubDocument.onTableLeftCellSpacingKeyword) .add("trspdr", DestinationSubDocument.onTableRightCellSpacingKeyword) .add("trspdt", DestinationSubDocument.onTableTopCellSpacingKeyword) .add("trspdfb", DestinationSubDocument.onTableBottomCellSpacingUnitTypeKeyword) .add("trspdfl", DestinationSubDocument.onTableLeftCellSpacingUnitTypeKeyword) .add("trspdfr", DestinationSubDocument.onTableRightCellSpacingUnitTypeKeyword) .add("trspdft", DestinationSubDocument.onTableTopCellSpacingUnitTypeKeyword) .add("trwWidth", DestinationSubDocument.onTablePreferredWidthKeyword) .add("trftsWidth", DestinationSubDocument.onTablePreferredWidthUnitTypeKeyword) .add("tblind", DestinationSubDocument.onTableIndentKeyword) .add("tblindtype", DestinationSubDocument.onTableIndentUnitType) .add("tabsnoovrlp", DestinationSubDocument.onTableOverlapKeyword) .add("tdfrmtxtLeft", DestinationSubDocument.onTableLeftFromTextKeyword) .add("tdfrmtxtRight", DestinationSubDocument.onTableRightFromTextKeyword) .add("tdfrmtxtTop", DestinationSubDocument.onTableTopFromTextKeyword) .add("tdfrmtxtBottom", DestinationSubDocument.onTableBottomFromTextKeyword) .add("tphcol", DestinationSubDocument.onColHorizontalAnchorKeyword) .add("tphmrg", DestinationSubDocument.onMarginHorizontalAnchorKeyword) .add("tphpg", DestinationSubDocument.onPageHorizontalAnchorKeyword) .add("tpvmrg", DestinationSubDocument.onMarginVerticalAnchorKeyword) .add("tpvpara", DestinationSubDocument.onParagraphVerticalAnchorKeword) .add("tpvpg", DestinationSubDocument.onPageVerticalAnchorKeyword) .add("tposx", DestinationSubDocument.onTableHorizontalPositionKeyword) .add("tposnegx", DestinationSubDocument.onTableHorizontalPositionKeyword) .add("tposy", DestinationSubDocument.onTableVerticalPositionKeyword) .add("tposnegy", DestinationSubDocument.onTableVerticalPositionKeyword) .add("tposxc", DestinationSubDocument.onCenterTableHorizontalAlignKeyword) .add("tposxi", DestinationSubDocument.onInsideTableHorizontalAlignKeyword) .add("tposxl", DestinationSubDocument.onLeftTableHorizontalAlignKeyword) .add("tposxo", DestinationSubDocument.onOutsideTableHorizontalAlignKeyword) .add("tposxr", DestinationSubDocument.onRightTableHorizontalAlignKeyword) .add("tposyb", DestinationSubDocument.onBottomTableVerticalAlignKeyword) .add("tposyc", DestinationSubDocument.onCenterTableVerticalAlignKeyword) .add("tposyil", DestinationSubDocument.onInlineTableVerticalAlignKeyword) .add("tposyin", DestinationSubDocument.onInsideTableVerticalAlignKeyword) .add("tposyout", DestinationSubDocument.onOutsideTableVerticalAlignKeyword) .add("tposyt", DestinationSubDocument.onTopTableVerticalAlignKeyword) .add("trautofit", DestinationSubDocument.onTableAutoFitKeyword) .add("tscbandsh", DestinationSubDocument.onRowBandSizeKeyword) .add("tscbandsv", DestinationSubDocument.onColumnBandSizeKeyword) .add("tsbrdrt", DestinationSubDocument.onTopCellBorderKeyword) .add("tsbrdrl", DestinationSubDocument.onLeftCellBorderKeyword) .add("tsbrdrb", DestinationSubDocument.onBottomCellBorderKeyword) .add("tsbrdrr", DestinationSubDocument.onRightCellBorderKeyword) .add("tsnowrap", DestinationSubDocument.onCellNoWrapKeyword) .add("tscellpaddb", DestinationSubDocument.onTableBottomCellMarginKeyword) .add("tscellpaddl", DestinationSubDocument.onTableLeftCellMarginKeyword) .add("tscellpaddr", DestinationSubDocument.onTableRightCellMarginKeyword) .add("tscellpaddt", DestinationSubDocument.onTableTopCellMarginKeyword) .add("tscellpaddfb", DestinationSubDocument.onTableBottomCellMarginUnitTypeKeyword) .add("tscellpaddfl", DestinationSubDocument.onTableLeftCellMarginUnitTypeKeyword) .add("tscellpaddfr", DestinationSubDocument.onTableRightCellMarginUnitTypeKeyword) .add("tscellpaddft", DestinationSubDocument.onTableTopCellMarginUnitTypeKeyword) .add("tsbrdrdgl", DestinationSubDocument.onUpperLeftToLowerRightBorderKeyword) .add("tsbrdrdgr", DestinationSubDocument.onUpperRightToLowerLeftBorderKeyword) .add("tsrowd", DestinationSubDocument.onTableRowDefaultsKeyword) .add("trbrdrt", DestinationSubDocument.onTopTableBorderKeyword) .add("trbrdrl", DestinationSubDocument.onLeftTableBorderKeyword) .add("trbrdrb", DestinationSubDocument.onBottomTableBorderKeword) .add("trbrdrr", DestinationSubDocument.onRightTableBorderKeyword) .add("trbrdrh", DestinationSubDocument.onHorizontalTableBorderKeyword) .add("trbrdrv", DestinationSubDocument.onVerticalTableBorderKeyword) .add("tbllkhdrrows", DestinationSubDocument.onApplyFirstRowConditionalFormattingKeyword) .add("tbllklastrow", DestinationSubDocument.onApplyLastRowConditionalFormattingKeyword) .add("tbllkhdrcols", DestinationSubDocument.onApplyFirstColumnContitionalFormattingKeyword) .add("tbllklastcol", DestinationSubDocument.onApplyLastColumnConditionalFormattingKeyword) .add("tbllknorowband", DestinationSubDocument.onDoNotApplyRowBandingConditionalFormattingKeyword) .add("tbllknocolband", DestinationSubDocument.onDoNotApplyColumnBandingConditionalFormattingKeyword) .add("ltrrow", DestinationSubDocument.onLtrRow) .add("rtlrow", DestinationSubDocument.onRtlRow) .add("brdrnil", DestinationSubDocument.onNoBorderKeyword) .add("brdrw", DestinationSubDocument.onBorderWidthKeyword) .add("brdrcf", DestinationSubDocument.onBorderColorKeyword) .add("brdrframe", DestinationSubDocument.onFrameBorderKeyword) .add("brsp", DestinationSubDocument.onBorderSpaceKeyword) .add("brdrs", DestinationSubDocument.onSingleThicknessBorderTypeKeyword) .add("brdrth", DestinationSubDocument.onDoubleThicknessBorderTypeKeyword) .add("brdrsh", DestinationSubDocument.onShadowedBorderTypeKeyword) .add("brdrdb", DestinationSubDocument.onDoubleBorderTypeKeyword) .add("brdrdot", DestinationSubDocument.onDottedBorderTypeKeyword) .add("brdrdash", DestinationSubDocument.onDashedBorderTypeKeyword) .add("brdrhair", DestinationSubDocument.onHairlineBorderTypeKeyword) .add("brdrdashsm", DestinationSubDocument.onSmallDashedBorderTypeKeyword) .add("brdrdashd", DestinationSubDocument.onDotDashedBorderTypeKeyword) .add("brdrdashdd", DestinationSubDocument.onDotDotDashedBorderTypeKeyword) .add("brdrdashdot", DestinationSubDocument.onDotDashedBorderTypeKeyword) .add("brdrdashdotdot", DestinationSubDocument.onDotDotDashedBorderTypeKeyword) .add("brdrinset", DestinationSubDocument.onInsetBorderTypeKeyword) .add("brdrnone", DestinationSubDocument.onNoneBorderTypeKeyword) .add("brdroutset", DestinationSubDocument.onOutsetBorderTypeKeyword) .add("brdrtriple", DestinationSubDocument.onTripletBorderTypeKeyword) .add("brdrthtnsg", DestinationSubDocument.onSmallThickThinBorderTypeKeyword) .add("brdrtnthsg", DestinationSubDocument.onSmallThinThickBorderTypeKeyword) .add("brdrtnthtnsg", DestinationSubDocument.onSmallThinThickThinBorderTypeKeyword) .add("brdrthtnmg", DestinationSubDocument.onMediumThickThinBorderTypeKeyword) .add("brdrtnthmg", DestinationSubDocument.onMediumThinThickBorderTypeKeyword) .add("brdrtnthtnmg", DestinationSubDocument.onMediumThinThickThinBorderTypeKeyword) .add("brdrthtnlg", DestinationSubDocument.onLargeThickThinBorderTypeKeyword) .add("brdrtnthlg", DestinationSubDocument.onLargeThinThickBorderTypeKeyword) .add("brdrtnthtnlg", DestinationSubDocument.onLargeThinThickThinBorderTypeKeyword) .add("brdrwavy", DestinationSubDocument.onWavyBorderTypeKeyword) .add("brdrwavydb", DestinationSubDocument.onDoubleWavyBorderTypeKeyword) .add("brdrdashdotstr", DestinationSubDocument.onStripedBorderTypeKeyword) .add("brdremboss", DestinationSubDocument.onEmbossedBorderTypeKeyword) .add("brdrengrave", DestinationSubDocument.onEngravedBorderTypeKeyword) .add("brdrart", DestinationSubDocument.onBorderArtIndex) .get(); export const appendTableKeywords = new MapCreator() .add("intbl", DestinationSubDocument.onInTableParagraphKeyword) .add("row", DestinationSubDocument.onRowKeyword) .add("cell", DestinationSubDocument.onCellKeyword) .add("nestcell", DestinationSubDocument.onNestedCellKeyword) .add("nestrow", DestinationSubDocument.onNestedRowKeyword) .add("nesttableprops", DestinationSubDocument.onNestedTablePropertiesKeyword) .add("nonesttables", (data) => data.destination = new SkipNestedTableDestination(data)) .add("itap", DestinationSubDocument.onItapKeyword) .append(appendTablePropertiesKeywords) .get();