@elisra-devops/docgen-skins 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +3 -3
- package/bin/index.js.map +1 -1
- package/bin/models/json/JSONRun.js +39 -35
- package/bin/models/json/JSONRun.js.map +1 -1
- package/bin/models/json/default.js +12 -9
- package/bin/models/json/default.js.map +1 -1
- package/bin/models/json/paragraph/JSONRichTextParagraph.d.ts +134 -2
- package/bin/models/json/paragraph/JSONRichTextParagraph.js +402 -53
- package/bin/models/json/paragraph/JSONRichTextParagraph.js.map +1 -1
- package/bin/models/json/wordJsonModels.d.ts +41 -4
- package/package.json +1 -1
- package/src/index.ts +3 -9
- package/src/models/json/JSONRun.ts +36 -32
- package/src/models/json/default.ts +12 -9
- package/src/models/json/paragraph/JSONRichTextParagraph.ts +428 -405
- package/src/models/json/wordJsonModels.ts +49 -4
|
@@ -56,8 +56,7 @@ export interface Attachment {
|
|
|
56
56
|
IsFlattened?: boolean;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
text: string;
|
|
59
|
+
interface TextStyle {
|
|
61
60
|
Bold: boolean;
|
|
62
61
|
Italic: boolean;
|
|
63
62
|
Underline: boolean;
|
|
@@ -68,6 +67,13 @@ export interface Run {
|
|
|
68
67
|
InsertSpace: boolean;
|
|
69
68
|
src?: string; //for image
|
|
70
69
|
}
|
|
70
|
+
|
|
71
|
+
export interface Run {
|
|
72
|
+
type: 'text' | 'image' | 'break' | 'other';
|
|
73
|
+
value?: string;
|
|
74
|
+
src?: string; // If type = 'image', you can store the URL or local path here
|
|
75
|
+
textStyling?: TextStyle; // If type = 'text', store style; if type = 'image', optional or partial
|
|
76
|
+
}
|
|
71
77
|
export interface WorkItemData {}
|
|
72
78
|
|
|
73
79
|
export interface Table {
|
|
@@ -111,7 +117,7 @@ export interface WIProperty {
|
|
|
111
117
|
attachmentLink?: string;
|
|
112
118
|
attachmentType?: string;
|
|
113
119
|
relativeAttachmentLink?: string;
|
|
114
|
-
|
|
120
|
+
richTextNodes?: any[];
|
|
115
121
|
}
|
|
116
122
|
export interface MultipeValuesWIProperty {
|
|
117
123
|
name: string;
|
|
@@ -123,10 +129,49 @@ export interface MultipeValuesWIProperty {
|
|
|
123
129
|
attachmentLink?: string;
|
|
124
130
|
attachmentType?: string;
|
|
125
131
|
relativeAttachmentLink?: string;
|
|
126
|
-
|
|
132
|
+
richTextNodes?: any[];
|
|
127
133
|
}
|
|
128
134
|
export interface WIColumns {
|
|
129
135
|
name: string;
|
|
130
136
|
referenceName: string;
|
|
131
137
|
url: string;
|
|
132
138
|
}
|
|
139
|
+
|
|
140
|
+
export type RichNode = ParagraphNode | TextNode | ImageNode | TableNode | ListNode | BreakNode | OtherNode;
|
|
141
|
+
|
|
142
|
+
export interface ParagraphNode {
|
|
143
|
+
type: 'paragraph';
|
|
144
|
+
children: RichNode[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface TextNode {
|
|
148
|
+
type: 'text';
|
|
149
|
+
value: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface ImageNode {
|
|
153
|
+
type: 'image';
|
|
154
|
+
src: string;
|
|
155
|
+
alt?: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface BreakNode {
|
|
159
|
+
type: 'break';
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface TableNode {
|
|
163
|
+
type: 'table';
|
|
164
|
+
children: RichNode[];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface ListNode {
|
|
168
|
+
type: 'list';
|
|
169
|
+
isOrdered: boolean;
|
|
170
|
+
children: RichNode[];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface OtherNode {
|
|
174
|
+
type: 'other';
|
|
175
|
+
tagName: string;
|
|
176
|
+
children: RichNode[];
|
|
177
|
+
}
|