weboffice-js-sdk 2.0.5-beta.8 → 2.0.5-beta.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.
|
@@ -629,6 +629,12 @@ export interface SheetRangeFacade {
|
|
|
629
629
|
column: number;
|
|
630
630
|
rowCount: number;
|
|
631
631
|
columnCount: number;
|
|
632
|
+
getBounding: () => Promise<{
|
|
633
|
+
left: number;
|
|
634
|
+
top: number;
|
|
635
|
+
width: number;
|
|
636
|
+
height: number;
|
|
637
|
+
} | null>;
|
|
632
638
|
getText: (format?: 'plain' | 'matrix') => Promise<string | string[][]>;
|
|
633
639
|
setText: (text: SheetRangeText) => Promise<void>;
|
|
634
640
|
getHtml: () => Promise<string>;
|
|
@@ -677,6 +683,7 @@ export interface SheetWorksheetFacade {
|
|
|
677
683
|
sheet: string;
|
|
678
684
|
ranges: SheetRangeValue[] | null;
|
|
679
685
|
}) => void) => () => void;
|
|
686
|
+
/** @deprecated 先 await worksheet.getRange(range),再调用 range?.getBounding()。 */
|
|
680
687
|
getBounding: (range: SheetRangeValue) => Promise<{
|
|
681
688
|
left: number;
|
|
682
689
|
top: number;
|
|
@@ -45,6 +45,12 @@ export type EditorFacadeContractAssertions = [
|
|
|
45
45
|
Assert<IsAssignable<NonNullable<OfficeSDK['text']>['apply'], (format: Partial<EditorTextFormat>, range?: PresentationTextRangeValue) => Promise<Partial<EditorTextFormat>>>>,
|
|
46
46
|
Assert<IsAssignable<NonNullable<OfficeSDK['activeSheet']>['getSelections'], () => Promise<SheetSelection[] | null>>>,
|
|
47
47
|
Assert<IsAssignable<NonNullable<OfficeSDK['activeSheet']>['getRange'], (value: SheetRangeValue) => Promise<SheetRangeFacade | null>>>,
|
|
48
|
+
Assert<IsEqual<SheetRangeFacade['getBounding'], () => Promise<{
|
|
49
|
+
left: number;
|
|
50
|
+
top: number;
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
} | null>>>,
|
|
48
54
|
Assert<IsAssignable<NonNullable<OfficeSDK['selections']>['getAll'], () => Promise<SheetRangeValue[]>>>,
|
|
49
55
|
Assert<IsAssignable<NonNullable<OfficeSDK['charts']>['addChartFromSelection'], (params?: import('./OfficeSDK').AddChartFromSelectionParams) => Promise<AddChartFromSelectionResult | undefined>>>,
|
|
50
56
|
Assert<IsAssignable<PresentationSelection['getSelectedShapes'], (ids?: string[]) => Promise<PresentationShape[] | null>>>,
|