2021-01-27 12:44:29 +02:00
|
|
|
import { RunJSON, RunPropertyJSON } from "./run";
|
2020-02-27 20:12:36 +02:00
|
|
|
import { IndentJSON } from "./indent";
|
2022-09-09 05:52:53 +03:00
|
|
|
import {
|
|
|
|
CommentRangeStartJSON,
|
|
|
|
CommentRangeEndJSON,
|
|
|
|
SectionPropertyJSON,
|
|
|
|
} from "..";
|
2021-10-20 10:37:51 +03:00
|
|
|
import { LineSpacingJSON } from "./line_spacing";
|
2020-02-13 09:14:06 +02:00
|
|
|
|
|
|
|
export type ParagraphChildJSON =
|
2022-07-06 04:47:15 +03:00
|
|
|
| RunJSON
|
|
|
|
| InsertJSON
|
|
|
|
| DeleteJSON
|
|
|
|
| HyperlinkJSON
|
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON
|
|
|
|
| BookmarkStartJSON
|
|
|
|
| BookmarkEndJSON;
|
|
|
|
|
|
|
|
export type HyperlinkChildJSON =
|
2020-02-13 09:14:06 +02:00
|
|
|
| RunJSON
|
|
|
|
| InsertJSON
|
|
|
|
| DeleteJSON
|
2020-12-15 15:33:01 +02:00
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON
|
2020-02-13 09:14:06 +02:00
|
|
|
| BookmarkStartJSON
|
|
|
|
| BookmarkEndJSON;
|
|
|
|
|
|
|
|
export type NumberingPropertyJSON = {
|
2020-03-13 10:01:25 +02:00
|
|
|
id: number | null;
|
|
|
|
level: number | null;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type ParagraphPropertyJSON = {
|
2020-06-08 07:41:13 +03:00
|
|
|
runProperty: RunPropertyJSON;
|
2022-01-14 04:53:39 +02:00
|
|
|
style?: string | null;
|
|
|
|
numberingProperty?: NumberingPropertyJSON | null;
|
|
|
|
alignment?: "left" | "center" | "right" | "justified" | "both";
|
|
|
|
indent?: IndentJSON | null;
|
|
|
|
lineSpacing?: LineSpacingJSON | null;
|
|
|
|
divId?: string | null;
|
|
|
|
keepNext?: boolean;
|
|
|
|
keepLines?: boolean;
|
|
|
|
pageBreakBefore?: boolean;
|
2022-01-14 08:03:53 +02:00
|
|
|
widowControl?: boolean;
|
2022-01-14 04:53:39 +02:00
|
|
|
outlineLvl?: number | null;
|
|
|
|
paragraphPropertyChange?: {
|
|
|
|
author: string;
|
|
|
|
date: string;
|
|
|
|
property: ParagraphPropertyJSON;
|
|
|
|
};
|
2022-09-09 05:52:53 +03:00
|
|
|
sectionProperty?: SectionPropertyJSON;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type ParagraphJSON = {
|
|
|
|
type: "paragraph";
|
|
|
|
data: {
|
2020-12-21 13:52:15 +02:00
|
|
|
id: string;
|
2020-02-13 09:14:06 +02:00
|
|
|
property: ParagraphPropertyJSON;
|
|
|
|
children: ParagraphChildJSON[];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type InsertJSON = {
|
|
|
|
type: "insert";
|
|
|
|
data: {
|
2021-01-06 13:31:53 +02:00
|
|
|
children: (
|
|
|
|
| DeleteJSON
|
|
|
|
| RunJSON
|
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON
|
|
|
|
)[];
|
2020-02-13 09:14:06 +02:00
|
|
|
author: string;
|
2021-09-29 07:43:46 +03:00
|
|
|
date: string;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type DeleteJSON = {
|
|
|
|
type: "delete";
|
|
|
|
data: {
|
2021-01-27 12:44:29 +02:00
|
|
|
children: DeleteChildJSON[];
|
2020-02-13 09:14:06 +02:00
|
|
|
author: string;
|
2021-09-29 07:43:46 +03:00
|
|
|
date: string;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-07-06 04:47:15 +03:00
|
|
|
export type HyperlinkJSON = {
|
|
|
|
type: "hyperlink";
|
|
|
|
data:
|
|
|
|
| {
|
|
|
|
type: "external";
|
|
|
|
rid: string;
|
|
|
|
children: HyperlinkChildJSON[];
|
|
|
|
history: number | null;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
type: "anchor";
|
|
|
|
anchor: string;
|
2022-08-09 09:32:17 +03:00
|
|
|
children: HyperlinkChildJSON[];
|
2022-07-06 04:47:15 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-27 12:44:29 +02:00
|
|
|
export type DeleteChildJSON =
|
|
|
|
| RunJSON
|
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON;
|
|
|
|
|
2020-02-13 09:14:06 +02:00
|
|
|
export type BookmarkStartJSON = {
|
|
|
|
type: "bookmarkStart";
|
|
|
|
data: {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type BookmarkEndJSON = {
|
|
|
|
type: "bookmarkEnd";
|
|
|
|
data: {
|
|
|
|
id: number;
|
|
|
|
};
|
|
|
|
};
|