All files / roosterjs-content-model-plugins/lib/paste/WacComponents constants.ts

100% Statements 14/14
100% Branches 0/0
100% Functions 1/1
100% Lines 14/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67      1x                     1x       1x       1x       1x       1x       1x       1x       1x       1x       1x               1x   6x         1x  
/**
 * @internal
 **/
export const WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES: string[] = [
    'TableInsertRowGapBlank',
    'TableColumnResizeHandle',
    'TableCellTopBorderHandle',
    'TableCellLeftBorderHandle',
    'TableHoverColumnHandle',
    'TableHoverRowHandle',
];
/**
 * @internal
 **/
export const BULLET_LIST_STYLE: string = 'BulletListStyle';
/**
 * @internal
 **/
export const NUMBER_LIST_STYLE: string = 'NumberListStyle';
/**
 * @internal
 **/
export const IMAGE_BORDER: string = 'WACImageBorder';
/**
 * @internal
 **/
export const IMAGE_CONTAINER: string = 'WACImageContainer';
/**
 * @internal
 **/
export const OUTLINE_ELEMENT: string = 'OutlineElement';
/**
 * @internal
 **/
export const PARAGRAPH: string = 'Paragraph';
/**
 * @internal
 **/
export const LIST_CONTAINER_ELEMENT_CLASS_NAME: string = 'ListContainerWrapper';
/**
 * @internal
 **/
export const COMMENT_HIGHLIGHT_CLASS: string = 'CommentHighlightRest';
/**
 * @internal
 **/
export const COMMENT_HIGHLIGHT_CLICKED_CLASS: string = 'CommentHighlightClicked';
/**
 * @internal
 **/
export const TEMP_ELEMENTS_CLASSES: string[] = [
    ...WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES,
    'ListMarkerWrappingSpan',
];
 
/**
 * @internal
 */
export const REMOVE_MARGIN_ELEMENTS: string =
    `span.${IMAGE_CONTAINER},span.${IMAGE_BORDER},.${COMMENT_HIGHLIGHT_CLASS},.${COMMENT_HIGHLIGHT_CLICKED_CLASS},` +
    WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES.map(c => `table div[class^="${c}"]`).join(',');
 
/**
 * @internal
 **/
export const WAC_IDENTIFY_SELECTOR: string = `ul[class^="${BULLET_LIST_STYLE}"]>.${OUTLINE_ELEMENT},ol[class^="${NUMBER_LIST_STYLE}"]>.${OUTLINE_ELEMENT},${REMOVE_MARGIN_ELEMENTS}`;