@rhc-office/sdk 6.6.399 → 6.6.400
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/dist/api/annotation-tool.d.ts +23 -0
- package/dist/api/annotation-tool.d.ts.map +1 -1
- package/dist/browser/document-viewer.js +1 -1
- package/dist/browser/document-viewer.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/tools/AnnotationToolImpl.d.ts +1 -0
- package/dist/tools/AnnotationToolImpl.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/annotation-tool.ts +33 -0
- package/src/tools/AnnotationToolImpl.ts +5 -0
|
@@ -14,6 +14,7 @@ export declare class AnnotationToolImpl implements AnnotationTool {
|
|
|
14
14
|
selectAnnotationTool: AnnotationTool['selectAnnotationTool'];
|
|
15
15
|
selectAnnotationStamp: AnnotationTool['selectAnnotationStamp'];
|
|
16
16
|
openTextNoteCalloutDialog: AnnotationTool['openTextNoteCalloutDialog'];
|
|
17
|
+
createTextNoteAnnotation: AnnotationTool['createTextNoteAnnotation'];
|
|
17
18
|
getCustomStamps: AnnotationTool['getCustomStamps'];
|
|
18
19
|
addCustomTextStamp: AnnotationTool['addCustomTextStamp'];
|
|
19
20
|
addCustomImageStamp: AnnotationTool['addCustomImageStamp'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationToolImpl.d.ts","sourceRoot":"","sources":["../../src/tools/AnnotationToolImpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"AnnotationToolImpl.d.ts","sourceRoot":"","sources":["../../src/tools/AnnotationToolImpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,c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AAE,cAAc,CAAC,mBAAmB,CAAC,CAEpD;IAEF,cAAc,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAE9C;IAEF,mBAAmB,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAExD;IAEF,0BAA0B,EAAE,cAAc,CAAC,4BAA4B,CAAC,CAEtE;CACH"}
|
package/package.json
CHANGED
|
@@ -153,6 +153,35 @@ export interface TextNoteCalloutDialogResult {
|
|
|
153
153
|
status: 'cancelled' | 'confirmed';
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
export interface TextNoteAnnotationCenterPosition {
|
|
157
|
+
/** 1-based page number. Omit to use the current page. */
|
|
158
|
+
pageNumber?: number;
|
|
159
|
+
x?: never;
|
|
160
|
+
y?: never;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface TextNoteAnnotationPointPosition {
|
|
164
|
+
/** 1-based page number. Omit to use the current page. */
|
|
165
|
+
pageNumber?: number;
|
|
166
|
+
/** Page X coordinate in millimeters. */
|
|
167
|
+
x: number;
|
|
168
|
+
/** Page Y coordinate in millimeters. */
|
|
169
|
+
y: number;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type TextNoteAnnotationPosition =
|
|
173
|
+
| TextNoteAnnotationCenterPosition
|
|
174
|
+
| TextNoteAnnotationPointPosition;
|
|
175
|
+
|
|
176
|
+
export interface CreateTextNoteAnnotationOptions {
|
|
177
|
+
draft: TextNoteCalloutDraft;
|
|
178
|
+
position?: TextNoteAnnotationPosition;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface CreateTextNoteAnnotationResult {
|
|
182
|
+
annotationId: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
156
185
|
export type LegacyAnnotationPenType =
|
|
157
186
|
| AnnotationViewPenType
|
|
158
187
|
| 'draw'
|
|
@@ -327,6 +356,10 @@ export interface AnnotationTool {
|
|
|
327
356
|
options?: TextNoteCalloutDialogOptions,
|
|
328
357
|
): Promise<TextNoteCalloutDialogResult>;
|
|
329
358
|
|
|
359
|
+
createTextNoteAnnotation(
|
|
360
|
+
options: CreateTextNoteAnnotationOptions,
|
|
361
|
+
): Promise<CreateTextNoteAnnotationResult>;
|
|
362
|
+
|
|
330
363
|
getCustomStamps(): Promise<AnnotationCustomStampRecord[]>;
|
|
331
364
|
|
|
332
365
|
addCustomTextStamp(input: AnnotationCustomTextStampInput): Promise<AnnotationCustomStampRecord>;
|
|
@@ -80,6 +80,7 @@ const ANNOTATION_TOOL_DESCRIPTOR: BridgeToolDescriptor = {
|
|
|
80
80
|
selectAnnotationTool: { kind: 'command' },
|
|
81
81
|
selectAnnotationStamp: { kind: 'command' },
|
|
82
82
|
openTextNoteCalloutDialog: { kind: 'command', returnsResult: true },
|
|
83
|
+
createTextNoteAnnotation: { kind: 'command', returnsResult: true },
|
|
83
84
|
getCustomStamps: { kind: 'query' },
|
|
84
85
|
addCustomTextStamp: { kind: 'query' },
|
|
85
86
|
addCustomImageStamp: { kind: 'query' },
|
|
@@ -143,6 +144,10 @@ export class AnnotationToolImpl implements AnnotationTool {
|
|
|
143
144
|
return this.adapter.openTextNoteCalloutDialog(options);
|
|
144
145
|
};
|
|
145
146
|
|
|
147
|
+
createTextNoteAnnotation: AnnotationTool['createTextNoteAnnotation'] = (options) => {
|
|
148
|
+
return this.adapter.createTextNoteAnnotation(options);
|
|
149
|
+
};
|
|
150
|
+
|
|
146
151
|
getCustomStamps: AnnotationTool['getCustomStamps'] = () => {
|
|
147
152
|
return this.adapter.getCustomStamps();
|
|
148
153
|
};
|