@sheetxl/sdk 0.7.12 → 0.7.14
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/browser/cjs/{BtThYQ_xJKRRyHva.cjs → -fzmLbmKCBzK9oRZ.cjs} +1 -1
- package/browser/cjs/{DrKICIc8x71fjYk9.cjs → 0lUbfhtrd_wufhL3.cjs} +1 -1
- package/browser/cjs/{B2USJzhMx0gKp_xB.cjs → B07Y1ERwDVHXTEuI.cjs} +1 -1
- package/browser/cjs/{Bkzf07hHXxJshocL.cjs → B1KDlf4Fbft4tjjj.cjs} +1 -1
- package/browser/cjs/{1CfjeWL6bDBG9-ag.cjs → BPlMwBvlv1U2gJLp.cjs} +2 -2
- package/browser/cjs/{BSm1vufvss-H9NbR.cjs → BRR-eS8_1BbDQfVT.cjs} +1 -1
- package/browser/cjs/{e2MkfbbzEhKy8YyW.cjs → BSjBjEqcjdqeygtj.cjs} +1 -1
- package/browser/cjs/{DbXxA7VgCTQL8GVr.cjs → BWPBBRKOt1TnEQW2.cjs} +1 -1
- package/browser/cjs/{C4IRg2q0tpytF4VU.cjs → BihhzXuYuVZlH947.cjs} +3 -3
- package/browser/cjs/{YjLWaeMwa9C_R1s5.cjs → C9EhsP1LNyShLPae.cjs} +1 -1
- package/browser/cjs/{E6VF-dQbtwGm8ZKJ.cjs → CBZAbsOH-qLoLVYi.cjs} +1 -1
- package/browser/cjs/{ClKtiswJz42sFi44.cjs → CMA0dCN-jx8mUVpC.cjs} +1 -1
- package/browser/cjs/{D5f6Io_7gWntl6eJ.cjs → CMcvl1Zwdr7xqxk-.cjs} +1 -1
- package/browser/cjs/{DRD2V03RHZ3FhUo9.cjs → CPSnUEg6iB67D_fE.cjs} +1 -1
- package/browser/cjs/{D_0CPRkAn_JdC7QW.cjs → CaBb29bMjYq4FPC4.cjs} +1 -1
- package/browser/cjs/{CmCdKX0dS361BDF_.cjs → CfhCVN63umYqcdux.cjs} +1 -1
- package/browser/cjs/{D08eDP1nShWTKp9c.cjs → CflowdD2ofBImyxf.cjs} +1 -1
- package/browser/cjs/{CzRnWLos_wVaK8Fw.cjs → Cjw_osDdQOhlKISB.cjs} +1 -1
- package/browser/cjs/{DyjC8TEGJk-hny2D.cjs → D8hRvoPQOnDRVPAe.cjs} +1 -1
- package/browser/cjs/{D908eIvK1UZZam0d.cjs → DJJI0nPForZ7Fyw8.cjs} +1 -1
- package/browser/cjs/{BwbyX4MNaa1zIjER.cjs → DPnnTvpwZeCYEQjl.cjs} +1 -1
- package/browser/cjs/{BosMy9ewpwF9NuGB.cjs → DkAdWdbvFE7n1Hcq.cjs} +1 -1
- package/browser/cjs/{CQeXdseMKMBAVqkr.cjs → DkV8Vz21n9mOoxZg.cjs} +1 -1
- package/browser/cjs/{vzFUQnmdHHRhq6jV.cjs → IHhWVKf3y4GPDEsu.cjs} +2 -2
- package/browser/cjs/{CKzpvrOe3DiGVZcc.cjs → LysRTzmqVW8lE0wn.cjs} +1 -1
- package/browser/cjs/QK4uMmDx2ivy6yLv.cjs +55 -0
- package/browser/cjs/{ToviSt9hOTH-9baV.cjs → b5Qta6o-hfdLsZ2C.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{Cya5XpqQkpsIhhU6.mjs → 5UT-S_8enFmksHUV.mjs} +1 -1
- package/browser/esm/{BpvAje6jcdacLYbX.mjs → 7VJFgeFQVJmSYXYk.mjs} +1 -1
- package/browser/esm/{dXzMDWrDA5Lwl6Mj.mjs → BGxFMxgIc6_Du8sb.mjs} +1 -1
- package/browser/esm/{D5rbSNG1lRMqamJK.mjs → BY5jOMg7oXwIKByq.mjs} +1 -1
- package/browser/esm/{TQ7P4hzcSvakAO7N.mjs → Bb0n7WwiIdOtgnRw.mjs} +1 -1
- package/browser/esm/{C333Bk9rZ2_V-1cQ.mjs → BdsrnU901jI-wd-4.mjs} +1 -1
- package/browser/esm/{BvMu0XjKqyboy-lE.mjs → BmsSmazArGNZbNeZ.mjs} +4449 -4282
- package/{node/esm/CTnYczv8sdymPont.mjs → browser/esm/C-dC3AjFyCjRGGOv.mjs} +1 -1
- package/{node/esm/C2TJUuObLI3XbkGW.mjs → browser/esm/C7vIejJBnmBAEaEW.mjs} +1 -1
- package/{node/esm/C9rJUO6w8U4r-ZLU.mjs → browser/esm/CGD1FZtnkDQ0SSBz.mjs} +1 -1
- package/browser/esm/{CcrvxZgcfX9XaIQ5.mjs → CgPPHJJUMVCN32D6.mjs} +1 -1
- package/browser/esm/{Dw7XkqUHobOgiSxg.mjs → DHNBXeBjLI3QVhcQ.mjs} +1 -1
- package/browser/esm/{DyrGEURqMZbZUei0.mjs → DJ-ZyaCf_y5KqImf.mjs} +1 -1
- package/{node/esm/Cq8Z_7xKAy_l-nRD.mjs → browser/esm/DJjQwq79V0wl9qhG.mjs} +1 -1
- package/browser/esm/{BM-O3SE_q7zMdUWU.mjs → DLLkKYL-X-v73Z0R.mjs} +2 -2
- package/browser/esm/{DHM5MROBjTGyyJxE.mjs → DMASuJhDm2I6PXCN.mjs} +1 -1
- package/browser/esm/{DBqZtOc04qqODM6B.mjs → DSD5aS6kewydAsCA.mjs} +1 -1
- package/browser/esm/{z5RyyAq0YqPAgm3C.mjs → DbcMNEUrgozG6pB0.mjs} +1 -1
- package/browser/esm/{DkKcmgQirssZLyAt.mjs → DyG4EtOyTUl5wrhc.mjs} +2 -2
- package/{node/esm/wGQlPDrRhZBNmqXr.mjs → browser/esm/G5zHU3-mFg8u8npr.mjs} +1 -1
- package/browser/esm/{D9emWaogFZ_qGmes.mjs → ItKDnjJiNUadHt-H.mjs} +3 -3
- package/browser/esm/{DFPhSySbg8tF2p3h.mjs → PjxOQ4QiwWz0c6Ph.mjs} +1 -1
- package/browser/esm/index.mjs +53 -51
- package/browser/esm/{Dy616gUfJgTEn2Lk.mjs → myjs_Lwk8vlrSFNh.mjs} +1 -1
- package/browser/esm/{CSrVbEwBx2NnAYvL.mjs → tO5paHU0QdSdv1Jc.mjs} +1 -1
- package/browser/esm/{Bj-vyyFRt_LQ3p4k.mjs → vLCpNb3EvVHobA40.mjs} +1 -1
- package/browser/esm/{CaxUhEKBf5-rWlgP.mjs → zY-nSDUmnavhQata.mjs} +1 -1
- package/{node/esm/jAZwRNd8wzT9q-Kf.mjs → browser/esm/zeLLXOAGHLwXQiRi.mjs} +1 -1
- package/node/esm/{SG4_v0bpY55xYUOj.mjs → 0iGTcd9ooWNCeX4c.mjs} +1 -1
- package/node/esm/{BpvAje6jcdacLYbX.mjs → 7VJFgeFQVJmSYXYk.mjs} +1 -1
- package/node/esm/{OmF7uWO8nNEAcgRL.mjs → 9tEJsH5MtfgJF2X4.mjs} +1 -1
- package/node/esm/{BmoVFEKACjsgqtqW.mjs → BNhLhktE2XilaoxK.mjs} +2 -2
- package/node/esm/{C3dNwSBxZydPNIa6.mjs → BPBgVCP0v-ej5g24.mjs} +1 -1
- package/node/esm/{D5rbSNG1lRMqamJK.mjs → BY5jOMg7oXwIKByq.mjs} +1 -1
- package/node/esm/{TQ7P4hzcSvakAO7N.mjs → Bb0n7WwiIdOtgnRw.mjs} +1 -1
- package/{browser/esm/CTnYczv8sdymPont.mjs → node/esm/C-dC3AjFyCjRGGOv.mjs} +1 -1
- package/node/esm/{CGUEDkuo3-Y2_wZV.mjs → C0uCmd6tFf75Wgtv.mjs} +1 -1
- package/node/esm/{BGDBKHouRITQ69Y_.mjs → C1CvI8x7vaaCFzua.mjs} +1 -1
- package/{browser/esm/C2TJUuObLI3XbkGW.mjs → node/esm/C7vIejJBnmBAEaEW.mjs} +1 -1
- package/{browser/esm/C9rJUO6w8U4r-ZLU.mjs → node/esm/CGD1FZtnkDQ0SSBz.mjs} +1 -1
- package/node/esm/{BOC_DgdvRX0-0ZaJ.mjs → CaTmPKI90a8j_ksw.mjs} +1 -1
- package/node/esm/{CcrvxZgcfX9XaIQ5.mjs → CgPPHJJUMVCN32D6.mjs} +1 -1
- package/{browser/esm/Cq8Z_7xKAy_l-nRD.mjs → node/esm/DJjQwq79V0wl9qhG.mjs} +1 -1
- package/node/esm/{DHM5MROBjTGyyJxE.mjs → DMASuJhDm2I6PXCN.mjs} +1 -1
- package/node/esm/{DBqZtOc04qqODM6B.mjs → DSD5aS6kewydAsCA.mjs} +1 -1
- package/node/esm/{Ci5zjsTKJE1WXg-8.mjs → DeRbIp5DJRZ2hJCs.mjs} +1 -1
- package/{browser/esm/wGQlPDrRhZBNmqXr.mjs → node/esm/G5zHU3-mFg8u8npr.mjs} +1 -1
- package/node/esm/{DFPhSySbg8tF2p3h.mjs → PjxOQ4QiwWz0c6Ph.mjs} +1 -1
- package/node/esm/index.mjs +3092 -2945
- package/node/esm/{Dy616gUfJgTEn2Lk.mjs → myjs_Lwk8vlrSFNh.mjs} +1 -1
- package/node/esm/{CSrVbEwBx2NnAYvL.mjs → tO5paHU0QdSdv1Jc.mjs} +1 -1
- package/node/esm/{ClxQXzVr71QV--QR.mjs → yS3knP21QkdRIsvW.mjs} +1 -1
- package/node/esm/{CaxUhEKBf5-rWlgP.mjs → zY-nSDUmnavhQata.mjs} +1 -1
- package/{browser/esm/jAZwRNd8wzT9q-Kf.mjs → node/esm/zeLLXOAGHLwXQiRi.mjs} +1 -1
- package/package.json +4 -4
- package/types/index.d.ts +236 -65
- package/types/scripting.d.ts +620 -400
- package/browser/cjs/ibSKVNiJ2VncQNAS.cjs +0 -55
package/types/scripting.d.ts
CHANGED
|
@@ -4628,10 +4628,21 @@ declare module "font/IFontCollection" {
|
|
|
4628
4628
|
*/
|
|
4629
4629
|
export const findBestMatch: (fontName: string, options?: FindBestMatchOptions) => FontHandle;
|
|
4630
4630
|
}
|
|
4631
|
+
declare module "font/FontUtils" {
|
|
4632
|
+
/**
|
|
4633
|
+
* A list of font sizes for showing in drop downs.
|
|
4634
|
+
*/
|
|
4635
|
+
export const DefaultFontSizes: readonly number[];
|
|
4636
|
+
/**
|
|
4637
|
+
* Searches an array of numbers for the next value.
|
|
4638
|
+
*/
|
|
4639
|
+
export const findNextFontSize: (size: number, increase?: boolean, steps?: readonly number[]) => number;
|
|
4640
|
+
}
|
|
4631
4641
|
declare module "font/index" {
|
|
4632
4642
|
export * as IFontCollection from "font/IFontCollection";
|
|
4633
4643
|
export * from "font/IFont";
|
|
4634
4644
|
export * from "font/Font";
|
|
4645
|
+
export * as FontUtils from "font/FontUtils";
|
|
4635
4646
|
}
|
|
4636
4647
|
declare module "text/richtext/IStyledFont" {
|
|
4637
4648
|
import { Properties as CSSProperties } from 'csstype';
|
|
@@ -14236,6 +14247,15 @@ declare module "address/AddressUtils" {
|
|
|
14236
14247
|
* If we used the from/to range type we wouldn't have to.
|
|
14237
14248
|
*/
|
|
14238
14249
|
export const sheetRangeToString: RangeToString<IRange.FixableCoords, IRange.FixableCellCoords>;
|
|
14250
|
+
/**
|
|
14251
|
+
* Convert a fixable cell to A1 format.
|
|
14252
|
+
*
|
|
14253
|
+
* @param fixable
|
|
14254
|
+
* @param defaultRange
|
|
14255
|
+
* @param toRangeString
|
|
14256
|
+
* @returns a string
|
|
14257
|
+
*/
|
|
14258
|
+
export const sheetRangesToString: (fixable: readonly Partial<Readonly<IRange.FixableCoords>>[], defaultRange?: Readonly<IRange.Coords>, toRangeString?: RangeToString<IRange.FixableCoords, IRange.FixableCellCoords>) => string;
|
|
14239
14259
|
/**
|
|
14240
14260
|
* Workbook range still used IRange.FixableCellCoords.
|
|
14241
14261
|
*/
|
|
@@ -14455,6 +14475,14 @@ declare module "selection/IRangeSelection" {
|
|
|
14455
14475
|
* @returns The selection coordinates.
|
|
14456
14476
|
*/
|
|
14457
14477
|
getCoords(): IRangeSelection.Coords;
|
|
14478
|
+
/**
|
|
14479
|
+
* Returns the selection as an array of IRange.Coords.
|
|
14480
|
+
*
|
|
14481
|
+
* @param coords Optional coordinates to convert. If not provided, uses the current selection.
|
|
14482
|
+
* @remarks
|
|
14483
|
+
* The first element is always the active range.
|
|
14484
|
+
*/
|
|
14485
|
+
getRangesCoords(coord?: Partial<IRangeSelection.Coords>): IRange.Coords[];
|
|
14458
14486
|
/**
|
|
14459
14487
|
* Updates the selection coordinates.
|
|
14460
14488
|
* @param coords The new coordinates.
|
|
@@ -18982,6 +19010,13 @@ declare module "selection/_RangeSelectionUtils" {
|
|
|
18982
19010
|
(coords: IRange.CellCoords): boolean;
|
|
18983
19011
|
}
|
|
18984
19012
|
export type CellFinder = (activeCoords: IRange.CellCoords, isContentfulCell: IsContentfulCell | undefined, hiddenAt: HiddenHeadersAt | undefined, direction: IRange.Direction, first: boolean, limit: number) => number;
|
|
19013
|
+
/**
|
|
19014
|
+
* Returns the cells as an ordered list of ranges. The first range is the active range.
|
|
19015
|
+
* If there are no ranges then the active coord will be returns as a range.
|
|
19016
|
+
* @remarks
|
|
19017
|
+
* * Always return at least 1 range unless the selection is null.
|
|
19018
|
+
*/
|
|
19019
|
+
export const selectionToRanges: (selection: Partial<IRangeSelection.Coords>) => IRange.Coords[];
|
|
18985
19020
|
}
|
|
18986
19021
|
declare module "selection/RangeSelection" {
|
|
18987
19022
|
import { IRange } from '@sheetxl/primitives';
|
|
@@ -19012,6 +19047,8 @@ declare module "selection/RangeSelection" {
|
|
|
19012
19047
|
navigate(direction: IRange.Direction, select?: boolean, contentful?: boolean, incrementAmount?: number): this;
|
|
19013
19048
|
/** {@inheritDoc IRangeSelection.getCoords} */
|
|
19014
19049
|
getCoords(): IRangeSelection.Coords;
|
|
19050
|
+
/** {@inheritDoc IRangeSelection.getRangesCoords} */
|
|
19051
|
+
getRangesCoords(coord?: Partial<IRangeSelection.Coords>): IRange.Coords[];
|
|
19015
19052
|
/** {@inheritDoc IRangeSelection.updateCoords} */
|
|
19016
19053
|
updateCoords(coords: IRangeSelection.Coords): this;
|
|
19017
19054
|
/** {@inheritDoc IRangeSelection.isEntire} */
|
|
@@ -19745,7 +19782,7 @@ declare module "sheet/header/_HeaderUtils" {
|
|
|
19745
19782
|
import { IRange } from '@sheetxl/primitives';
|
|
19746
19783
|
import { ITypes } from "type/index";
|
|
19747
19784
|
import { IStyle } from "style/index";
|
|
19748
|
-
import { ICellHeaderRange } from "cellRange/index";
|
|
19785
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
19749
19786
|
import { IRangeSelection } from "selection/index";
|
|
19750
19787
|
import { ISheetHeader } from "sheet/header/ISheetHeader";
|
|
19751
19788
|
/**
|
|
@@ -19830,6 +19867,8 @@ declare module "sheet/header/_HeaderUtils" {
|
|
|
19830
19867
|
*/
|
|
19831
19868
|
export function setOrClear<T = any>(container: Record<string, any>, key: string, newValue: T | null | undefined): void;
|
|
19832
19869
|
/** @internal */
|
|
19870
|
+
export const parseHeaderRangesAddress: (address: ICellHeaderRanges.Address, isColumn: boolean, defaultRange?: IRange.FixableCoords) => RunCoords[];
|
|
19871
|
+
/** @internal */
|
|
19833
19872
|
export const parseHeaderRangeAddress: (address: ICellHeaderRange.Address, isColumn: boolean, defaultRange?: IRange.FixableCoords) => RunCoords;
|
|
19834
19873
|
/**
|
|
19835
19874
|
* Create an invalid range.
|
|
@@ -19844,6 +19883,14 @@ declare module "sheet/header/_HeaderUtils" {
|
|
|
19844
19883
|
* Create runs from selection.
|
|
19845
19884
|
*/
|
|
19846
19885
|
export const createRunsFromSelection: (header: ISheetHeader, selection: IRangeSelection.Coords, maxRange: IRange.Coords) => ITypes.RunCoordValue<ISheetHeader.SelectedRun>[];
|
|
19886
|
+
/**
|
|
19887
|
+
* Converts a set of RunCoords into a set of Ranges.
|
|
19888
|
+
*/
|
|
19889
|
+
export const runCoordsToRangeCoords: (runs: readonly Readonly<Partial<RunCoords>>[], entireRange: IRange.Coords, isColumn: boolean) => Partial<IRange.FixableCoords>[];
|
|
19890
|
+
/**
|
|
19891
|
+
* Returns a list of merged and non-overlapping run coordinates.
|
|
19892
|
+
*/
|
|
19893
|
+
export const removeOverlappingRuns: (runs: readonly Readonly<Partial<RunCoords>>[], merge?: boolean) => RunCoords[];
|
|
19847
19894
|
}
|
|
19848
19895
|
declare module "sheet/header/SheetCellHeader" {
|
|
19849
19896
|
import { IRange } from '@sheetxl/primitives';
|
|
@@ -19943,6 +19990,8 @@ declare module "sheet/header/SheetCellHeaderRange" {
|
|
|
19943
19990
|
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): this;
|
|
19944
19991
|
/** {@inheritDoc ICellHeaderRange.getCount} */
|
|
19945
19992
|
getCount(): number;
|
|
19993
|
+
/** {@inheritDoc ICellHeaderRange.getHeaderCount} */
|
|
19994
|
+
getHeaderCount(): number;
|
|
19946
19995
|
/** {@inheritDoc ICellHeaderRange.getVisibleCount} */
|
|
19947
19996
|
getVisibleCount(): number;
|
|
19948
19997
|
/** {@inheritDoc ICellHeaderRange.isEntireHeaders} */
|
|
@@ -19969,6 +20018,53 @@ declare module "sheet/header/SheetCellHeaderRange" {
|
|
|
19969
20018
|
get isICellHeaderRange(): true;
|
|
19970
20019
|
}
|
|
19971
20020
|
}
|
|
20021
|
+
declare module "sheet/header/SheetCellHeaderRanges" {
|
|
20022
|
+
import { IRange } from '@sheetxl/primitives';
|
|
20023
|
+
import { RunCoords } from '@sheetxl/utils';
|
|
20024
|
+
import { ITransaction } from "transaction/index";
|
|
20025
|
+
import { ICellHeader } from "cell/index";
|
|
20026
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
20027
|
+
import { SheetHeader } from "sheet/header/SheetHeader";
|
|
20028
|
+
export class SheetCellHeaderRanges implements ICellHeaderRanges {
|
|
20029
|
+
protected _header: any;
|
|
20030
|
+
protected _coords: RunCoords[];
|
|
20031
|
+
constructor(header: SheetHeader, coords: RunCoords[]);
|
|
20032
|
+
/** {@inheritDoc ICellHeaderRanges.updateHeaders} */
|
|
20033
|
+
updateHeaders(update: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
20034
|
+
/** {@inheritDoc ICellHeaderRanges.getCoords} */
|
|
20035
|
+
getCoords(): RunCoords[];
|
|
20036
|
+
/** {@inheritDoc ICellHeaderRanges.setHidden} */
|
|
20037
|
+
setHidden(hidden?: boolean): this;
|
|
20038
|
+
/** {@inheritDoc ICellHeaderRanges.getCount} */
|
|
20039
|
+
getCount(): number;
|
|
20040
|
+
/** {@inheritDoc ICellHeaderRanges.getHeaderCount} */
|
|
20041
|
+
getHeaderCount(): number;
|
|
20042
|
+
/** {@inheritDoc ICellHeaderRanges.getVisibleCount} */
|
|
20043
|
+
getVisibleCount(): number;
|
|
20044
|
+
/** {@inheritDoc ICellHeaderRanges.isEntireHeaders} */
|
|
20045
|
+
isEntireHeaders(): boolean;
|
|
20046
|
+
/** {@inheritDoc ICellHeaderRanges.isEntireHeaders} */
|
|
20047
|
+
isEntireHeadersAny(): boolean;
|
|
20048
|
+
/** {@inheritDoc ICellHeaderRanges.clear} */
|
|
20049
|
+
clear(): this;
|
|
20050
|
+
/** {@inheritDoc ICellHeaderRanges.setSize} */
|
|
20051
|
+
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
20052
|
+
/** {@inheritDoc ICellHeaderRanges.at} */
|
|
20053
|
+
at(index: number): ICellHeaderRange;
|
|
20054
|
+
/** {@inheritDoc ICellHeaderRanges.getOrientation} */
|
|
20055
|
+
getOrientation(): IRange.Orientation;
|
|
20056
|
+
/** {@inheritDoc ICellHeaderRanges.doBatch} */
|
|
20057
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
20058
|
+
/** {@inheritDoc ICellHeaderRanges.getSheetHeader} */
|
|
20059
|
+
getSheetHeader<S>(): S;
|
|
20060
|
+
/** {@inheritDoc ICellHeaderRanges.getA1} */
|
|
20061
|
+
getA1(): string;
|
|
20062
|
+
get [Symbol.toStringTag](): string;
|
|
20063
|
+
toString(): string;
|
|
20064
|
+
/** {@inheritDoc ICellHeaderRanges.isICellHeaderRanges} */
|
|
20065
|
+
get isICellHeaderRanges(): true;
|
|
20066
|
+
}
|
|
20067
|
+
}
|
|
19972
20068
|
declare module "sheet/header/SheetHeader" {
|
|
19973
20069
|
import { IRange } from '@sheetxl/primitives';
|
|
19974
20070
|
import { RunCoords } from '@sheetxl/utils';
|
|
@@ -19976,7 +20072,7 @@ declare module "sheet/header/SheetHeader" {
|
|
|
19976
20072
|
import { ITransaction } from "transaction/index";
|
|
19977
20073
|
import { IListener } from "listener/index";
|
|
19978
20074
|
import { ICellHeader } from "cell/index";
|
|
19979
|
-
import { ICellHeaderRange } from "cellRange/index";
|
|
20075
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
19980
20076
|
import { IRangeSelection } from "selection/index";
|
|
19981
20077
|
import { ISheet } from "sheet/index";
|
|
19982
20078
|
import { ISheetHeader } from "sheet/header/ISheetHeader";
|
|
@@ -20042,8 +20138,12 @@ declare module "sheet/header/SheetHeader" {
|
|
|
20042
20138
|
} | void;
|
|
20043
20139
|
/** {@inheritDoc ISheetHeader.getRange} */
|
|
20044
20140
|
getRange(address: ICellHeaderRange.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
20141
|
+
/** {@inheritDoc ISheetHeader.getRanges} */
|
|
20142
|
+
getRanges(address: ICellHeaderRanges.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
20045
20143
|
/** {@inheritDoc ISheetHeader.getSelectedRange} */
|
|
20046
20144
|
getSelectedRange(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
20145
|
+
/** {@inheritDoc ISheetHeader.getSelectedRanges} */
|
|
20146
|
+
getSelectedRanges(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
20047
20147
|
/** {@inheritDoc ISheetHeader.getUsedRange} */
|
|
20048
20148
|
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
20049
20149
|
/** {@inheritDoc ISheetHeader.getEntireRange} */
|
|
@@ -20053,9 +20153,9 @@ declare module "sheet/header/SheetHeader" {
|
|
|
20053
20153
|
/** {@inheritDoc ISheetHeader.updateHeaderPairs} */
|
|
20054
20154
|
updateHeaderPairs(pairs: ICellHeaderRange.AddressUpdatePair[], options?: ICellHeaderRange.UpdateHeadersOptions): RunCoords[] | null;
|
|
20055
20155
|
protected _parseHeaderRangeAddress(address: ICellHeaderRange.Address): RunCoords;
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
|
|
20156
|
+
protected _update(addresses: ICellHeaderRange.Address | ICellHeaderRange.Address[], update: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
20157
|
+
protected _setSize(address: ICellHeaderRange.Address | ICellHeaderRange.Address[], size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
20158
|
+
protected _setHidden(address: ICellHeaderRange.Address | ICellHeaderRange.Address[], hidden?: boolean): this;
|
|
20059
20159
|
protected _clear(coords: RunCoords, options?: ICellHeaderRange.UpdateHeadersOptions): void;
|
|
20060
20160
|
protected _getSnapshot(coordsFrom?: RunCoords, optionsMark?: ICellHeaderRange.CopyOptions): ICellHeaderRange.ISnapshot;
|
|
20061
20161
|
/** {@inheritDoc ISheetHeader.isProtected} */
|
|
@@ -21726,7 +21826,7 @@ declare module "sheet/SheetRanges" {
|
|
|
21726
21826
|
import type { ITransaction } from "transaction/index";
|
|
21727
21827
|
import type { IListener } from "listener/index";
|
|
21728
21828
|
import type { ICell } from "cell/index";
|
|
21729
|
-
import type { ICellRanges, ICellRange } from "cellRange/index";
|
|
21829
|
+
import type { ICellRanges, ICellRange, ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
21730
21830
|
import type { IStyle } from "style/index";
|
|
21731
21831
|
import type { ISheet } from "sheet/index";
|
|
21732
21832
|
export interface SheetRangesOptions {
|
|
@@ -21793,6 +21893,10 @@ declare module "sheet/SheetRanges" {
|
|
|
21793
21893
|
getEntireRows(shift?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
21794
21894
|
/** {@inheritDoc ICellRanges.getEntireColumns} */
|
|
21795
21895
|
getEntireColumns(shift?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
21896
|
+
/** {@inheritDoc ICellRange.getRowHeaders} */
|
|
21897
|
+
getRowHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
21898
|
+
/** {@inheritDoc ICellRange.getColumnHeaders}*/
|
|
21899
|
+
getColumnHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
21796
21900
|
/** {@inheritDoc ICellRanges.getDefaultShiftOrientation} */
|
|
21797
21901
|
getDefaultShiftOrientation(): IRange.Orientation;
|
|
21798
21902
|
/** {@inheritDoc ICellRanges.getCount} */
|
|
@@ -22403,7 +22507,7 @@ declare module "sheet/Sheet" {
|
|
|
22403
22507
|
/** @internal */
|
|
22404
22508
|
protected _commitAndAutoSelect(trans: ITransaction, selection: Partial<IRangeSelection.Coords>, selectOptions?: boolean | ICellRange.SelectOptions, commitOptions?: ITransaction.StoreOperationOptions<CommitView>, orientation?: IRange.Orientation): Promise<IRange.Coords[]>;
|
|
22405
22509
|
/** @internal */
|
|
22406
|
-
protected _autoSelect(options?: boolean | ICellRange.SelectOptions,
|
|
22510
|
+
protected _autoSelect(options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords>, orientation?: IRange.Orientation): Promise<IRange.Coords[]>;
|
|
22407
22511
|
/** {@inheritDoc ISheet.getSelection} */
|
|
22408
22512
|
getSelection(): IRangeSelection;
|
|
22409
22513
|
/** {@inheritDoc ISheet.getView} */
|
|
@@ -24160,24 +24264,48 @@ declare module "sheet/header/ISheetHeader" {
|
|
|
24160
24264
|
import { ITransaction } from "transaction/index";
|
|
24161
24265
|
import { IListener } from "listener/index";
|
|
24162
24266
|
import { ICellHeader } from "cell/index";
|
|
24163
|
-
import { ICellHeaderRange } from "cellRange/index";
|
|
24267
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
24164
24268
|
import { ISheet } from "sheet/ISheet";
|
|
24165
24269
|
/**
|
|
24166
24270
|
* Provides a programmatic interface for interacting with and modifying entire rows or columns in a spreadsheet,
|
|
24167
24271
|
* allowing for actions such as inserting, deleting, resizing, and applying formatting changes.
|
|
24168
24272
|
*/
|
|
24169
24273
|
export interface ISheetHeader extends ITransaction.ITransactional, IListener.ISource<ISheetHeader> {
|
|
24274
|
+
/**
|
|
24275
|
+
* Returns the header at a given offset. Will only return null for invalid header offset. To get a list of headers use {@link getRange}.
|
|
24276
|
+
*
|
|
24277
|
+
* @param index 0-based absolute index.
|
|
24278
|
+
*/
|
|
24279
|
+
at(index: number): ICellHeader;
|
|
24280
|
+
/**
|
|
24281
|
+
* Returns a displayable title for the given index.
|
|
24282
|
+
* @param index 0-based absolute index.
|
|
24283
|
+
*/
|
|
24284
|
+
getTextAt(index: number): string;
|
|
24170
24285
|
/**
|
|
24171
24286
|
* Returns a range of cells for the specified range.
|
|
24172
24287
|
*
|
|
24288
|
+
* @param address The address or addresses of the header range to retrieve.
|
|
24289
|
+
* @param options Options for retrieving the header ranges.
|
|
24173
24290
|
* @see
|
|
24174
24291
|
* {@link ICellHeaderRange}
|
|
24175
24292
|
*/
|
|
24176
24293
|
getRange(address: ICellHeaderRange.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
24177
24294
|
/**
|
|
24178
|
-
* Returns
|
|
24295
|
+
* Returns a collection of header ranges for the specified ranges.
|
|
24296
|
+
*
|
|
24297
|
+
* @param address The address or addresses of the header ranges to retrieve.
|
|
24298
|
+
* @param options Options for retrieving the header ranges.
|
|
24299
|
+
*/
|
|
24300
|
+
getRanges(address: ICellHeaderRanges.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
24301
|
+
/**
|
|
24302
|
+
* Returns the active header range that is used in the selection.
|
|
24179
24303
|
*/
|
|
24180
24304
|
getSelectedRange(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
24305
|
+
/**
|
|
24306
|
+
* Returns the active header ranges that are used in the selection.
|
|
24307
|
+
*/
|
|
24308
|
+
getSelectedRanges(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
24181
24309
|
/**
|
|
24182
24310
|
* Returns the data ranges for headers that contain information.
|
|
24183
24311
|
*
|
|
@@ -24196,46 +24324,6 @@ declare module "sheet/header/ISheetHeader" {
|
|
|
24196
24324
|
* The orientation the headers manage.
|
|
24197
24325
|
*/
|
|
24198
24326
|
getOrientation(): IRange.Orientation;
|
|
24199
|
-
/**
|
|
24200
|
-
* @see
|
|
24201
|
-
* {@link ICellHeaderRange.setSize}
|
|
24202
|
-
*/
|
|
24203
|
-
setSize(address: ICellHeaderRange.Address | readonly ICellHeaderRange.Address[], size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
24204
|
-
/**
|
|
24205
|
-
* @see
|
|
24206
|
-
* {@link ICellHeaderRange.setHidden}
|
|
24207
|
-
*/
|
|
24208
|
-
setHidden(address: ICellHeaderRange.Address | readonly ICellHeaderRange.Address[], hidden?: boolean): this;
|
|
24209
|
-
/**
|
|
24210
|
-
* Bulk update api.
|
|
24211
|
-
* @remarks
|
|
24212
|
-
* This only supports one range at a time but offers a few flavors
|
|
24213
|
-
* * update(5, { size: '100px' }); // 0-based index
|
|
24214
|
-
* * update({ min: 3, max: 4 }, { size: '100px' }); // 0-based index
|
|
24215
|
-
* * update('e:f', { size: '100px' }); // 1-based a1 style
|
|
24216
|
-
* * update({ colStart: 3, colEnd: 4 }, { size: '100px' }); // 0-based index
|
|
24217
|
-
* * update('5:7', { size: '100px' }); // 1-based a1 style
|
|
24218
|
-
* * update({ rowStart: 3, rowEnd: 4 }, { size: '100px' }); // 0-based index
|
|
24219
|
-
*/
|
|
24220
|
-
update(address: ICellHeaderRange.Address | readonly ICellHeaderRange.Address[], update: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
24221
|
-
/**
|
|
24222
|
-
* Sets the headers. This supports setting values as a batch.
|
|
24223
|
-
* @remarks
|
|
24224
|
-
* When setting headers the cells references by this sheet will not update.
|
|
24225
|
-
* To ensure they are updated on the sheet call updateHeaderPairs with the range from the header.
|
|
24226
|
-
*/
|
|
24227
|
-
updateHeaderPairs(pairs: ICellHeaderRange.AddressUpdatePair[], options?: ICellHeaderRange.UpdateHeadersOptions): RunCoords[] | null;
|
|
24228
|
-
/**
|
|
24229
|
-
* Returns the header at a given offset. Will only return null for invalid header offset. To get a list of headers use {@link getRange}.
|
|
24230
|
-
*
|
|
24231
|
-
* @param index 0-based absolute index.
|
|
24232
|
-
*/
|
|
24233
|
-
at(index: number): ICellHeader;
|
|
24234
|
-
/**
|
|
24235
|
-
* Returns a displayable title for the given index.
|
|
24236
|
-
* @param index 0-based absolute index.
|
|
24237
|
-
*/
|
|
24238
|
-
getTextAt(index: number): string;
|
|
24239
24327
|
/**
|
|
24240
24328
|
* Returns a flag indicating if the headers are protected by the sheet.
|
|
24241
24329
|
*/
|
|
@@ -24318,6 +24406,14 @@ declare module "sheet/header/ISheetHeader" {
|
|
|
24318
24406
|
* Returns a list of SelectedRuns.
|
|
24319
24407
|
*/
|
|
24320
24408
|
getSelectedRuns(): readonly ITypes.RunCoordValue<ISheetHeader.SelectedRun>[];
|
|
24409
|
+
/**
|
|
24410
|
+
* Sets the headers. This supports setting values as a batch.
|
|
24411
|
+
*
|
|
24412
|
+
* @remarks
|
|
24413
|
+
* When setting headers the cells references by this sheet will not update.
|
|
24414
|
+
* To ensure they are updated on the sheet call updateHeaderPairs with the range from the header.
|
|
24415
|
+
*/
|
|
24416
|
+
updateHeaderPairs(pairs: ICellHeaderRange.AddressUpdatePair[], options?: ICellHeaderRange.UpdateHeadersOptions): RunCoords[] | null;
|
|
24321
24417
|
/**
|
|
24322
24418
|
* Returns the sheet model used for the header.
|
|
24323
24419
|
*/
|
|
@@ -24531,6 +24627,10 @@ declare module "sheet/_SheetUtils" {
|
|
|
24531
24627
|
* Wraps each value in a ContentfulEntry
|
|
24532
24628
|
*/
|
|
24533
24629
|
export const tuplesToContentfulEntries: (gridTuple: Tuple.GridTuple<Scalar>, isColumn: boolean) => ISpatialMap.Entry<ContentfulEntry>[];
|
|
24630
|
+
/**
|
|
24631
|
+
* Expands ranges to include merges.
|
|
24632
|
+
*/
|
|
24633
|
+
export const expandToIncludeMerges: (ranges: readonly IRange.Coords[], mergeSpatial: ISpatialMap<MergeEntry>, entireCoords: IRange.Coords) => IRange.Coords[];
|
|
24534
24634
|
/**
|
|
24535
24635
|
* Creates a IRangeSelection.Coords from an array of ranges.
|
|
24536
24636
|
*
|
|
@@ -24538,23 +24638,13 @@ declare module "sheet/_SheetUtils" {
|
|
|
24538
24638
|
* @param cell if provided will try to fit within the cell
|
|
24539
24639
|
* @param rangeIndex *default* `ranges.length 1 unless this is a single cell then -1`.
|
|
24540
24640
|
*/
|
|
24541
|
-
export const
|
|
24542
|
-
/**
|
|
24543
|
-
* Expands ranges to include merges.
|
|
24544
|
-
*/
|
|
24545
|
-
export const expandToIncludeMerges: (ranges: readonly IRange.Coords[], mergeSpatial: ISpatialMap<MergeEntry>, entireCoords: IRange.Coords) => IRange.Coords[];
|
|
24546
|
-
/**
|
|
24547
|
-
* Returns the cells as an ordered list of ranges. The first range is the active range.
|
|
24548
|
-
* If there are no ranges then the active coord will be returns as a range.
|
|
24549
|
-
* @remarks
|
|
24550
|
-
* * Always return at least 1 range unless the selection is null.
|
|
24551
|
-
*/
|
|
24552
|
-
export const selectionToRanges: (selection: Partial<IRangeSelection.Coords>) => IRange.Coords[];
|
|
24641
|
+
export const toRangeSelectionCoords: (ranges: readonly IRange.Coords[], cell?: IRange.CellCoords, rangeIndex?: number) => IRangeSelection.Coords;
|
|
24553
24642
|
/**
|
|
24554
24643
|
* Creates a IRangeSelection.Coords from an array of ranges.
|
|
24555
24644
|
*
|
|
24556
24645
|
* @param ranges
|
|
24557
24646
|
* @param rangeIndex @defaultValue ranges.length 1 unless this is a single cell then -1
|
|
24647
|
+
* @deprecated use toRangeSelectionCoords
|
|
24558
24648
|
*/
|
|
24559
24649
|
export const rangesToSelection: (ranges: readonly IRange.Coords[], rangeIndex?: number) => IRangeSelection.Coords;
|
|
24560
24650
|
export type OrientedStyled = {
|
|
@@ -31565,7 +31655,7 @@ declare module "sort/ISort" {
|
|
|
31565
31655
|
interface DefaultSortCriteria {
|
|
31566
31656
|
/**
|
|
31567
31657
|
* The cords that will be sorted.
|
|
31568
|
-
* This
|
|
31658
|
+
* This will include headers even if the are ignored.
|
|
31569
31659
|
*/
|
|
31570
31660
|
coords: IRange.Coords;
|
|
31571
31661
|
/**
|
|
@@ -31579,6 +31669,10 @@ declare module "sort/ISort" {
|
|
|
31579
31669
|
* If no headers are found this will be empty.
|
|
31580
31670
|
*/
|
|
31581
31671
|
headers: Map<number, string>;
|
|
31672
|
+
/**
|
|
31673
|
+
* The coords without any headers.
|
|
31674
|
+
*/
|
|
31675
|
+
sortCoords: IRange.Coords;
|
|
31582
31676
|
}
|
|
31583
31677
|
/**
|
|
31584
31678
|
* Extends sort options to include options for sorting a range.
|
|
@@ -31659,399 +31753,125 @@ declare module "sort/index" {
|
|
|
31659
31753
|
export * from "sort/IAutoSort";
|
|
31660
31754
|
export * from "sort/Sort";
|
|
31661
31755
|
}
|
|
31662
|
-
declare module "cellRange/
|
|
31663
|
-
import type {
|
|
31664
|
-
import type {
|
|
31756
|
+
declare module "cellRange/ICellHeaderRange" {
|
|
31757
|
+
import type { IRange } from '@sheetxl/primitives';
|
|
31758
|
+
import type { RunCoords, ReferenceableClipboard } from '@sheetxl/utils';
|
|
31665
31759
|
import type { ITransaction } from "transaction/index";
|
|
31666
|
-
import type {
|
|
31667
|
-
import type { ICell } from "cell/index";
|
|
31668
|
-
import type { ISheet } from "sheet/index";
|
|
31760
|
+
import type { ICellHeader } from "cell/index";
|
|
31669
31761
|
import type { ICellRange } from "cellRange/ICellRange";
|
|
31670
31762
|
/**
|
|
31671
|
-
*
|
|
31672
|
-
*
|
|
31673
|
-
* Useful when working with a discontinuous set of ranges.
|
|
31763
|
+
* Represents a collection of ICellHeaders.
|
|
31674
31764
|
*/
|
|
31675
|
-
export interface
|
|
31676
|
-
/**
|
|
31677
|
-
* {@inheritDoc ICellRange.getMerges}
|
|
31678
|
-
*/
|
|
31679
|
-
getMerges(): IRange.Coords[];
|
|
31765
|
+
export interface ICellHeaderRange {
|
|
31680
31766
|
/**
|
|
31681
|
-
*
|
|
31767
|
+
* The RunCoords for the range.
|
|
31682
31768
|
*/
|
|
31683
|
-
|
|
31769
|
+
getCoords(): ICellHeaderRange.Coords;
|
|
31684
31770
|
/**
|
|
31685
|
-
*
|
|
31771
|
+
* Iterate over cells headers.
|
|
31686
31772
|
*
|
|
31687
31773
|
* @remarks
|
|
31688
|
-
*
|
|
31689
|
-
* set values work for the entire range.
|
|
31774
|
+
* * Callbacks can return a 'break' value to stop the visit.
|
|
31690
31775
|
*/
|
|
31691
|
-
|
|
31776
|
+
forEach<T = any>(callback: ICellHeaderRange.ForEachCallback<T>, options?: ICellHeaderRange.IteratorOptions): T | void;
|
|
31692
31777
|
/**
|
|
31693
|
-
*
|
|
31778
|
+
* Returns the header at a location relative to the range.
|
|
31779
|
+
*
|
|
31780
|
+
* @param index
|
|
31694
31781
|
*/
|
|
31695
|
-
|
|
31782
|
+
at(index: number): ICellHeader;
|
|
31696
31783
|
/**
|
|
31697
|
-
*
|
|
31784
|
+
* Set the size of the headers.
|
|
31698
31785
|
*
|
|
31699
|
-
* @
|
|
31700
|
-
*
|
|
31701
|
-
* @see {@link ICellRanges.entries()}
|
|
31786
|
+
* @param size This can be a number of a string with units
|
|
31787
|
+
* @param options {@link ICellHeaderRange.SetSizeOptions}
|
|
31702
31788
|
*/
|
|
31703
|
-
|
|
31789
|
+
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
31704
31790
|
/**
|
|
31705
|
-
*
|
|
31706
|
-
* yielding pairs of `IteratorContext` and a `Value`.
|
|
31707
|
-
*
|
|
31708
|
-
* @param options Configuration options for the iterator, such as filtering or sorting.
|
|
31709
|
-
* @returns An iterator that yields `[ICell.IteratorContext, Value]` tuples for each value within the range.
|
|
31791
|
+
* Hides or show the columns for the given range.
|
|
31710
31792
|
*
|
|
31711
|
-
* @
|
|
31712
|
-
* If the ranges overlap this will return the same value multiple times. If each cell
|
|
31713
|
-
* should only be visited once, use {@link ICellRanges.getFlattened} to remove overlaps.
|
|
31793
|
+
* @defaultValue false
|
|
31714
31794
|
*/
|
|
31715
|
-
|
|
31795
|
+
setHidden(hidden?: boolean): this;
|
|
31716
31796
|
/**
|
|
31717
|
-
*
|
|
31797
|
+
* Provides a convenient method for setting values with a range of calls.
|
|
31798
|
+
*
|
|
31799
|
+
* @remarks
|
|
31800
|
+
* If an array is provided then values will be in row-major order and will
|
|
31801
|
+
* repeat if the range is larger than the array
|
|
31718
31802
|
*/
|
|
31719
|
-
|
|
31803
|
+
updateHeaders(values: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
31720
31804
|
/**
|
|
31721
|
-
*
|
|
31805
|
+
* Returns the data ranges for headers that contain information.
|
|
31806
|
+
*
|
|
31807
|
+
* @remarks
|
|
31808
|
+
* * This is NOT the last cell that may have data or has been resized.
|
|
31809
|
+
* * This also has nothing to do with the selection bounds.
|
|
31722
31810
|
*/
|
|
31723
|
-
|
|
31811
|
+
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): this;
|
|
31724
31812
|
/**
|
|
31725
|
-
*
|
|
31813
|
+
* Clear the header format. Specially this will clear the sizes.
|
|
31726
31814
|
*/
|
|
31727
|
-
clear(
|
|
31815
|
+
clear(): this;
|
|
31728
31816
|
/**
|
|
31729
|
-
*
|
|
31817
|
+
* Returns the number of headers included in the range.
|
|
31730
31818
|
*/
|
|
31731
|
-
|
|
31819
|
+
getCount(): number;
|
|
31732
31820
|
/**
|
|
31733
|
-
*
|
|
31821
|
+
* Returns the number of headers.
|
|
31734
31822
|
*/
|
|
31735
|
-
|
|
31823
|
+
getHeaderCount(): number;
|
|
31736
31824
|
/**
|
|
31737
|
-
*
|
|
31825
|
+
* Returns the number of visible headers in the range.
|
|
31738
31826
|
*/
|
|
31739
|
-
|
|
31827
|
+
getVisibleCount(): number;
|
|
31740
31828
|
/**
|
|
31741
|
-
*
|
|
31829
|
+
* Returns true if the range represents all headers.
|
|
31742
31830
|
*/
|
|
31743
|
-
|
|
31831
|
+
isEntireHeaders(): boolean;
|
|
31744
31832
|
/**
|
|
31745
|
-
*
|
|
31833
|
+
* Returns the header orientation.
|
|
31746
31834
|
*/
|
|
31747
|
-
|
|
31835
|
+
getOrientation(): IRange.Orientation;
|
|
31748
31836
|
/**
|
|
31749
|
-
*
|
|
31837
|
+
* Similar to {@link forEach} but only spans that are different.
|
|
31750
31838
|
*
|
|
31751
31839
|
* @remarks
|
|
31752
|
-
* *
|
|
31753
|
-
* @see
|
|
31754
|
-
* {@link ICellRange.getSnapshot}
|
|
31755
|
-
*/
|
|
31756
|
-
getSnapshot(options?: ICellRange.CopyOptions): ICellRange.ISnapshot;
|
|
31757
|
-
/**
|
|
31758
|
-
* {@inheritDoc ICellRange.copyFrom}
|
|
31759
|
-
*/
|
|
31760
|
-
copyFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): Promise<this | null>;
|
|
31761
|
-
/**
|
|
31762
|
-
* {@inheritDoc ICellRange.getEntireRows}
|
|
31840
|
+
* * Callbacks can return a 'break' value to stop the visit.
|
|
31763
31841
|
*/
|
|
31764
|
-
|
|
31842
|
+
forEachSpan<T = any>(callback: ICellHeaderRange.ForEachSpanCallback<T>, options?: ICellHeaderRange.IteratorOptions): T | void;
|
|
31765
31843
|
/**
|
|
31766
|
-
*
|
|
31844
|
+
* Visits visible spans.
|
|
31845
|
+
*
|
|
31846
|
+
* @remarks
|
|
31847
|
+
* * If there are no hidden headers this will still be called once.
|
|
31767
31848
|
*/
|
|
31768
|
-
|
|
31849
|
+
forEachVisibleSpan<T = any>(callback: ICellHeaderRange.ForEachVisibleSpanCallback<T>, options?: ICellHeaderRange.ForEachVisibleSpanOptions): T | void;
|
|
31769
31850
|
/**
|
|
31770
|
-
* {@inheritDoc ICellRange.
|
|
31851
|
+
* {@inheritDoc ICellRange.getSnapshot}
|
|
31771
31852
|
*/
|
|
31772
|
-
|
|
31853
|
+
getSnapshot(options?: ICellHeaderRange.CopyOptions): ICellHeaderRange.ISnapshot;
|
|
31773
31854
|
/**
|
|
31774
|
-
*
|
|
31855
|
+
* Perform operation on all ranges.
|
|
31775
31856
|
*
|
|
31776
|
-
* @remarks
|
|
31777
|
-
* By default, ranges will also be merged into larger ranges where possible, but this behavior can be customized using the `mergeOrientation` parameter.
|
|
31778
|
-
* This method will not modify the original ranges.
|
|
31779
31857
|
* @see
|
|
31780
|
-
* {@link
|
|
31858
|
+
* {@link ICellRange.doBatch}
|
|
31781
31859
|
*/
|
|
31782
|
-
|
|
31860
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
31783
31861
|
/**
|
|
31784
|
-
*
|
|
31862
|
+
* Returns the SheetHeader.
|
|
31785
31863
|
*/
|
|
31786
|
-
|
|
31864
|
+
getSheetHeader<S>(): S;
|
|
31787
31865
|
/**
|
|
31788
31866
|
* {@inheritDoc ICellRange.getA1}
|
|
31789
31867
|
*/
|
|
31790
31868
|
getA1(): string;
|
|
31791
31869
|
/**
|
|
31792
|
-
*
|
|
31870
|
+
* Returns the address as a string.
|
|
31793
31871
|
*/
|
|
31794
|
-
|
|
31872
|
+
toString(): string;
|
|
31795
31873
|
/**
|
|
31796
|
-
*
|
|
31797
|
-
*/
|
|
31798
|
-
isContentful(types?: ICell.Content | ICell.Content[]): boolean;
|
|
31799
|
-
/**
|
|
31800
|
-
* Returns the count for all rows in the ranges. This will ensure rows that are included in multiples ranges are
|
|
31801
|
-
* not double counted.
|
|
31802
|
-
*/
|
|
31803
|
-
getRowCount(): number;
|
|
31804
|
-
/**
|
|
31805
|
-
* Returns the count for all columns in the ranges. This will ensure columns that are included in multiples ranges are
|
|
31806
|
-
* not double counted.
|
|
31807
|
-
*/
|
|
31808
|
-
getColumnCount(): number;
|
|
31809
|
-
/**
|
|
31810
|
-
* {@inheritDoc ICellRange.isReadOnly}
|
|
31811
|
-
*/
|
|
31812
|
-
isReadOnly(): boolean;
|
|
31813
|
-
/**
|
|
31814
|
-
* Returns a flag indicating if any of the ranges are overlapping.
|
|
31815
|
-
*
|
|
31816
|
-
* @remarks
|
|
31817
|
-
* To get a range with no overlaps {@link ICellRanges.getFlattened} can be used.
|
|
31818
|
-
*/
|
|
31819
|
-
isOverlapping(): boolean;
|
|
31820
|
-
/**
|
|
31821
|
-
* Returns `true` if all of the the ranges have selected all of the rows.
|
|
31822
|
-
*
|
|
31823
|
-
* @remarks
|
|
31824
|
-
* This is different from `isEntireRowsAny` in that it will return `true` if 'ALL' of the
|
|
31825
|
-
* ranges have isEntireRows `true`.
|
|
31826
|
-
*/
|
|
31827
|
-
isEntireRows(): boolean;
|
|
31828
|
-
/**
|
|
31829
|
-
* Returns `true` if any of the ranges have selected all of the rows.
|
|
31830
|
-
*
|
|
31831
|
-
* @remarks
|
|
31832
|
-
* This is different from `isEntireRows` in that it it will return true if 'ANY' of the
|
|
31833
|
-
* ranges have isEntireRows `true`.
|
|
31834
|
-
*/
|
|
31835
|
-
isEntireRowsAny(): boolean;
|
|
31836
|
-
/**
|
|
31837
|
-
* Returns `true` if all of the the ranges have selected all of the columns.
|
|
31838
|
-
*
|
|
31839
|
-
* @remarks
|
|
31840
|
-
* This is different from `isEntireColumnsAny` in that it will return `true` if 'ALL' of the
|
|
31841
|
-
* ranges have isEntireColumns `true`.
|
|
31842
|
-
*/
|
|
31843
|
-
isEntireColumns(): boolean;
|
|
31844
|
-
/**
|
|
31845
|
-
* Returns `true` if any of the ranges have selected all of the columns.
|
|
31846
|
-
*
|
|
31847
|
-
* @remarks
|
|
31848
|
-
* This is different from `isEntireColumns` in that it will return `true` if 'ANY' of the
|
|
31849
|
-
* ranges have isEntireColumns `true`.
|
|
31850
|
-
*/
|
|
31851
|
-
isEntireColumnsAny(): boolean;
|
|
31852
|
-
/**
|
|
31853
|
-
* Returns `true` if any of the ranges are invalid.
|
|
31854
|
-
*/
|
|
31855
|
-
isInvalidAny(): boolean;
|
|
31856
|
-
/**
|
|
31857
|
-
* Returns a ranges with coordinates adjusted to be fixed (absolute) or flexible (relative).
|
|
31858
|
-
*
|
|
31859
|
-
* @see
|
|
31860
|
-
* {@link ICellRange.getFixed}
|
|
31861
|
-
*/
|
|
31862
|
-
getFixed(options: ICellRange.GetFixedOptions | boolean): this;
|
|
31863
|
-
/**
|
|
31864
|
-
* Returns the total number of contiguous ranges in this collection.
|
|
31865
|
-
*/
|
|
31866
|
-
getCount(): number;
|
|
31867
|
-
/**
|
|
31868
|
-
* Returns the range at a specific index.
|
|
31869
|
-
*
|
|
31870
|
-
* @param index
|
|
31871
|
-
*/
|
|
31872
|
-
at(index: number): ICellRange;
|
|
31873
|
-
/**
|
|
31874
|
-
* {@inheritDoc ICellRange.doBatch}
|
|
31875
|
-
*/
|
|
31876
|
-
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ITransaction.OperationOptions): R | Promise<R>;
|
|
31877
|
-
/**
|
|
31878
|
-
* The RangeCoords.
|
|
31879
|
-
*/
|
|
31880
|
-
getCoords(): readonly Readonly<IRange.FixableCoords>[];
|
|
31881
|
-
/**
|
|
31882
|
-
* Returns the total number of contiguous ranges in this collection.
|
|
31883
|
-
*/
|
|
31884
|
-
getCount(): number;
|
|
31885
|
-
/**
|
|
31886
|
-
* Returns the range at a specific index.
|
|
31887
|
-
* @param index
|
|
31888
|
-
*/
|
|
31889
|
-
at(index: number): ICellRange;
|
|
31890
|
-
/**
|
|
31891
|
-
* Returns true if the range is invalid.
|
|
31892
|
-
* This can occur if a range is removed or created with invalid coordinates.
|
|
31893
|
-
*/
|
|
31894
|
-
isInvalid(): boolean;
|
|
31895
|
-
/**
|
|
31896
|
-
* Returns the address as a string.
|
|
31897
|
-
*/
|
|
31898
|
-
toString(): string;
|
|
31899
|
-
/**
|
|
31900
|
-
* {@inheritDoc ICellRange.select}
|
|
31901
|
-
*/
|
|
31902
|
-
select(options?: ICellRange.SelectOptions): Promise<this>;
|
|
31903
|
-
/**
|
|
31904
|
-
* {@inheritDoc ICellRange.addListener}
|
|
31905
|
-
*/
|
|
31906
|
-
addListener(listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
31907
|
-
/**
|
|
31908
|
-
* Returns an iterator that allows you to iterate over the individual values within the range.
|
|
31909
|
-
*
|
|
31910
|
-
* @param options Configuration options for the iterator, such as filtering or sorting.
|
|
31911
|
-
* @returns An iterator that yields `Scalar` value, each representing a single cell within the range.
|
|
31912
|
-
*/
|
|
31913
|
-
[Symbol.iterator](options?: ICellRange.IteratorOptions<any>): Iterator<Scalar>;
|
|
31914
|
-
/**
|
|
31915
|
-
* For runtime type checking.
|
|
31916
|
-
*/
|
|
31917
|
-
readonly isICellRanges: true;
|
|
31918
|
-
}
|
|
31919
|
-
/**
|
|
31920
|
-
* {@inheritDoc ICellRanges}
|
|
31921
|
-
* @see
|
|
31922
|
-
* ### **Interface**
|
|
31923
|
-
*
|
|
31924
|
-
* {@link ICellRanges}
|
|
31925
|
-
*/
|
|
31926
|
-
export namespace ICellRanges {
|
|
31927
|
-
/**
|
|
31928
|
-
* The coord type for a ranges.
|
|
31929
|
-
*/
|
|
31930
|
-
type Coords = IRange.Coords[];
|
|
31931
|
-
/**
|
|
31932
|
-
* Address for multiple {@link ICellRange}s.
|
|
31933
|
-
*/
|
|
31934
|
-
type Address = ICellRanges | string | ICellRange.Address | readonly ICellRange.Address[];
|
|
31935
|
-
/**
|
|
31936
|
-
* Options when visiting a ICellRanges.
|
|
31937
|
-
*/
|
|
31938
|
-
interface IteratorOptions<T = ICellRanges.Address> extends ICellRange.IteratorOptions<T> {
|
|
31939
|
-
}
|
|
31940
|
-
/**
|
|
31941
|
-
* Shorthand for persisting.
|
|
31942
|
-
*/
|
|
31943
|
-
type RefJSON = IRange.Coords[] | IRange.Coords | string;
|
|
31944
|
-
}
|
|
31945
|
-
}
|
|
31946
|
-
declare module "cellRange/ICellHeaderRange" {
|
|
31947
|
-
import type { IRange } from '@sheetxl/primitives';
|
|
31948
|
-
import type { RunCoords, ReferenceableClipboard } from '@sheetxl/utils';
|
|
31949
|
-
import type { ITransaction } from "transaction/index";
|
|
31950
|
-
import type { ICellHeader } from "cell/index";
|
|
31951
|
-
import type { ICellRange } from "cellRange/ICellRange";
|
|
31952
|
-
/**
|
|
31953
|
-
* Represents a collection of ICellHeaders.
|
|
31954
|
-
*/
|
|
31955
|
-
export interface ICellHeaderRange {
|
|
31956
|
-
/**
|
|
31957
|
-
* The RunCoords for the range.
|
|
31958
|
-
*/
|
|
31959
|
-
getCoords(): RunCoords;
|
|
31960
|
-
/**
|
|
31961
|
-
* Iterate over cells headers.
|
|
31962
|
-
* @remarks
|
|
31963
|
-
* * Callbacks can return a 'break' value to stop the visit.
|
|
31964
|
-
*/
|
|
31965
|
-
forEach<T = any>(callback: ICellHeaderRange.ForEachCallback<T>, options?: ICellHeaderRange.IteratorOptions): T | void;
|
|
31966
|
-
/**
|
|
31967
|
-
* Returns the header at a location relative to the range.
|
|
31968
|
-
* @param index
|
|
31969
|
-
*/
|
|
31970
|
-
at(index: number): ICellHeader;
|
|
31971
|
-
/**
|
|
31972
|
-
* Set the size of the headers.
|
|
31973
|
-
* @param size
|
|
31974
|
-
* @param options {@link ICellHeaderRange.SetSizeOptions}
|
|
31975
|
-
*/
|
|
31976
|
-
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
31977
|
-
/**
|
|
31978
|
-
* Hides or show the columns for the given range.
|
|
31979
|
-
* @defaultValue false
|
|
31980
|
-
*/
|
|
31981
|
-
setHidden(hidden?: boolean): this;
|
|
31982
|
-
/**
|
|
31983
|
-
* Returns the data ranges for headers that contain information.
|
|
31984
|
-
*
|
|
31985
|
-
* @remarks
|
|
31986
|
-
* * This is NOT the last cell that may have data or has been resized.
|
|
31987
|
-
* * This also has nothing to do with the selection bounds.
|
|
31988
|
-
*/
|
|
31989
|
-
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): this;
|
|
31990
|
-
/**
|
|
31991
|
-
* Clear the header format. Specially this will clear the sizes.
|
|
31992
|
-
*/
|
|
31993
|
-
clear(): this;
|
|
31994
|
-
/**
|
|
31995
|
-
* Returns the number of headers included in the range.
|
|
31996
|
-
*/
|
|
31997
|
-
getCount(): number;
|
|
31998
|
-
/**
|
|
31999
|
-
* Returns the number of visible headers in the range.
|
|
32000
|
-
*/
|
|
32001
|
-
getVisibleCount(): number;
|
|
32002
|
-
/**
|
|
32003
|
-
* Returns true if the range represents all headers.
|
|
32004
|
-
*/
|
|
32005
|
-
isEntireHeaders(): boolean;
|
|
32006
|
-
/**
|
|
32007
|
-
* Returns the header orientation.
|
|
32008
|
-
*/
|
|
32009
|
-
getOrientation(): IRange.Orientation;
|
|
32010
|
-
/**
|
|
32011
|
-
* Similar to {@link forEach} but only spans that are different.
|
|
32012
|
-
* @remarks
|
|
32013
|
-
* * Callbacks can return a 'break' value to stop the visit.
|
|
32014
|
-
*/
|
|
32015
|
-
forEachSpan<T = any>(callback: ICellHeaderRange.ForEachSpanCallback<T>, options?: ICellHeaderRange.IteratorOptions): T | void;
|
|
32016
|
-
/**
|
|
32017
|
-
* Visits visible spans.
|
|
32018
|
-
*
|
|
32019
|
-
* @remarks
|
|
32020
|
-
* * If there are no hidden headers this will still be called once.
|
|
32021
|
-
*/
|
|
32022
|
-
forEachVisibleSpan<T = any>(callback: ICellHeaderRange.ForEachVisibleSpanCallback<T>, options?: ICellHeaderRange.ForEachVisibleSpanOptions): T | void;
|
|
32023
|
-
/**
|
|
32024
|
-
* Provides a convenient method for setting values with a range of calls.
|
|
32025
|
-
*
|
|
32026
|
-
* @remarks
|
|
32027
|
-
* If an array is provided then values will be in row-major order and will
|
|
32028
|
-
* repeat if the range is larger than the array
|
|
32029
|
-
*/
|
|
32030
|
-
updateHeaders(values: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
32031
|
-
/**
|
|
32032
|
-
* {@inheritDoc ICellRange.getSnapshot}
|
|
32033
|
-
*/
|
|
32034
|
-
getSnapshot(options?: ICellHeaderRange.CopyOptions): ICellHeaderRange.ISnapshot;
|
|
32035
|
-
/**
|
|
32036
|
-
* Perform operation on all ranges.
|
|
32037
|
-
* @see
|
|
32038
|
-
* {@link ICellRange.doBatch}
|
|
32039
|
-
*/
|
|
32040
|
-
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
32041
|
-
/**
|
|
32042
|
-
* Returns the SheetHeader.
|
|
32043
|
-
*/
|
|
32044
|
-
getSheetHeader<S>(): S;
|
|
32045
|
-
/**
|
|
32046
|
-
* {@inheritDoc ICellRange.getA1}
|
|
32047
|
-
*/
|
|
32048
|
-
getA1(): string;
|
|
32049
|
-
/**
|
|
32050
|
-
* Returns the address as a string.
|
|
32051
|
-
*/
|
|
32052
|
-
toString(): string;
|
|
32053
|
-
/**
|
|
32054
|
-
* For runtime type checking.
|
|
31874
|
+
* For runtime type checking.
|
|
32055
31875
|
*/
|
|
32056
31876
|
readonly isICellHeaderRange: true;
|
|
32057
31877
|
}
|
|
@@ -32063,6 +31883,10 @@ declare module "cellRange/ICellHeaderRange" {
|
|
|
32063
31883
|
* {@link ICellHeaderRange}
|
|
32064
31884
|
*/
|
|
32065
31885
|
export namespace ICellHeaderRange {
|
|
31886
|
+
/**
|
|
31887
|
+
* The coord type for a header range.
|
|
31888
|
+
*/
|
|
31889
|
+
type Coords = RunCoords;
|
|
32066
31890
|
/**
|
|
32067
31891
|
* Specify either a range a run or a string.
|
|
32068
31892
|
* @remarks
|
|
@@ -32200,11 +32024,13 @@ declare module "cellRange/ICellHeaderRange" {
|
|
|
32200
32024
|
relativeSize?: boolean;
|
|
32201
32025
|
/**
|
|
32202
32026
|
* If this is set to `true` then the value will not be an autoSize value.
|
|
32027
|
+
*
|
|
32203
32028
|
* @defaultValue false
|
|
32204
32029
|
*/
|
|
32205
32030
|
autoSize?: boolean;
|
|
32206
32031
|
/**
|
|
32207
32032
|
* If this is set to `true` then any headers that have custom sizes will be ignored.
|
|
32033
|
+
*
|
|
32208
32034
|
* @defaultValue false
|
|
32209
32035
|
*/
|
|
32210
32036
|
skipCustomSize?: boolean;
|
|
@@ -32249,6 +32075,399 @@ declare module "cellRange/ICellHeaderRange" {
|
|
|
32249
32075
|
}
|
|
32250
32076
|
}
|
|
32251
32077
|
}
|
|
32078
|
+
declare module "cellRange/ICellHeaderRanges" {
|
|
32079
|
+
import type { IRange } from '@sheetxl/primitives';
|
|
32080
|
+
import type { RunCoords } from '@sheetxl/utils';
|
|
32081
|
+
import type { ITransaction } from "transaction/index";
|
|
32082
|
+
import type { ICellHeader } from "cell/index";
|
|
32083
|
+
import type { ICellHeaderRange } from "cellRange/ICellHeaderRange";
|
|
32084
|
+
/**
|
|
32085
|
+
* An `ICellHeaderRanges` is a collection of {@link ICellHeaderRange}s.
|
|
32086
|
+
*
|
|
32087
|
+
* Useful when working with a discontinuous set of headers.
|
|
32088
|
+
*/
|
|
32089
|
+
export interface ICellHeaderRanges {
|
|
32090
|
+
/**
|
|
32091
|
+
* The RunCoords for the range.
|
|
32092
|
+
*/
|
|
32093
|
+
getCoords(): Readonly<ICellHeaderRanges.Coords>;
|
|
32094
|
+
/**
|
|
32095
|
+
* Returns the header range at a location relative to the range.
|
|
32096
|
+
*
|
|
32097
|
+
* @param index
|
|
32098
|
+
*/
|
|
32099
|
+
at(index: number): ICellHeaderRange;
|
|
32100
|
+
/**
|
|
32101
|
+
* Returns the number of headers ranges.
|
|
32102
|
+
*/
|
|
32103
|
+
getCount(): number;
|
|
32104
|
+
/**
|
|
32105
|
+
* {@inheritDoc ICellHeaderRange.setSize}
|
|
32106
|
+
*/
|
|
32107
|
+
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
32108
|
+
/**
|
|
32109
|
+
* {@inheritDoc ICellHeaderRange.setHidden}
|
|
32110
|
+
*/
|
|
32111
|
+
setHidden(hidden?: boolean): this;
|
|
32112
|
+
/**
|
|
32113
|
+
* {@inheritDoc ICellHeaderRange.clear}
|
|
32114
|
+
*/
|
|
32115
|
+
clear(): this;
|
|
32116
|
+
/**
|
|
32117
|
+
* Returns the number of headers.
|
|
32118
|
+
*
|
|
32119
|
+
* @remarks
|
|
32120
|
+
* This will remove overlaps.
|
|
32121
|
+
*/
|
|
32122
|
+
getHeaderCount(): number;
|
|
32123
|
+
/**
|
|
32124
|
+
* {@inheritDoc ICellHeaderRange.getVisibleCount}
|
|
32125
|
+
*/
|
|
32126
|
+
getVisibleCount(): number;
|
|
32127
|
+
/**
|
|
32128
|
+
* Returns true if all of the ranges cover the entire headers.
|
|
32129
|
+
*/
|
|
32130
|
+
isEntireHeaders(): boolean;
|
|
32131
|
+
/**
|
|
32132
|
+
* Returns true if any of the ranges cover entire headers.
|
|
32133
|
+
*/
|
|
32134
|
+
isEntireHeadersAny(): boolean;
|
|
32135
|
+
/**
|
|
32136
|
+
* {@inheritDoc ICellHeaderRange.getOrientation}
|
|
32137
|
+
*/
|
|
32138
|
+
getOrientation(): IRange.Orientation;
|
|
32139
|
+
/**
|
|
32140
|
+
* {@inheritDoc ICellHeaderRange.updateHeaders}
|
|
32141
|
+
*/
|
|
32142
|
+
updateHeaders(values: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
32143
|
+
/**
|
|
32144
|
+
* {@inheritDoc ICellHeaderRange.doBatch}
|
|
32145
|
+
*/
|
|
32146
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
32147
|
+
/**
|
|
32148
|
+
* {@inheritDoc ICellHeaderRange.getSheetHeader}
|
|
32149
|
+
*/
|
|
32150
|
+
getSheetHeader<S>(): S;
|
|
32151
|
+
/**
|
|
32152
|
+
* {@inheritDoc ICellHeaderRange.getA1}
|
|
32153
|
+
*/
|
|
32154
|
+
getA1(): string;
|
|
32155
|
+
/**
|
|
32156
|
+
* {@inheritDoc ICellHeaderRange.toString}
|
|
32157
|
+
*/
|
|
32158
|
+
toString(): string;
|
|
32159
|
+
/**
|
|
32160
|
+
* For runtime type checking.
|
|
32161
|
+
*/
|
|
32162
|
+
readonly isICellHeaderRanges: true;
|
|
32163
|
+
}
|
|
32164
|
+
/**
|
|
32165
|
+
* {@inheritDoc ICellHeaderRanges}
|
|
32166
|
+
* @see
|
|
32167
|
+
* ### **Interface**
|
|
32168
|
+
*
|
|
32169
|
+
* {@link ICellHeaderRanges}
|
|
32170
|
+
*/
|
|
32171
|
+
export namespace ICellHeaderRanges {
|
|
32172
|
+
/**
|
|
32173
|
+
* The coord type for a header ranges.
|
|
32174
|
+
*/
|
|
32175
|
+
type Coords = RunCoords[];
|
|
32176
|
+
/**
|
|
32177
|
+
* Address for multiple {@link ICellHeaderRange}s.
|
|
32178
|
+
*/
|
|
32179
|
+
type Address = ICellHeaderRanges | string | ICellHeaderRange.Address | readonly ICellHeaderRange.Address[];
|
|
32180
|
+
/**
|
|
32181
|
+
* Shorthand for persisting.
|
|
32182
|
+
*/
|
|
32183
|
+
type RefJSON = RunCoords[] | RunCoords | string;
|
|
32184
|
+
}
|
|
32185
|
+
}
|
|
32186
|
+
declare module "cellRange/ICellRanges" {
|
|
32187
|
+
import type { Scalar, IRange } from '@sheetxl/primitives';
|
|
32188
|
+
import type { IListener } from "listener/index";
|
|
32189
|
+
import type { ITransaction } from "transaction/index";
|
|
32190
|
+
import type { IStyle } from "style/index";
|
|
32191
|
+
import type { ICell } from "cell/index";
|
|
32192
|
+
import type { ISheet } from "sheet/index";
|
|
32193
|
+
import type { ICellRange } from "cellRange/ICellRange";
|
|
32194
|
+
import type { ICellHeaderRange } from "cellRange/ICellHeaderRange";
|
|
32195
|
+
import type { ICellHeaderRanges } from "cellRange/ICellHeaderRanges";
|
|
32196
|
+
/**
|
|
32197
|
+
* An `ICellRanges` is a collection of {@link ICellRange}s.
|
|
32198
|
+
*
|
|
32199
|
+
* Useful when working with a discontinuous set of ranges.
|
|
32200
|
+
*/
|
|
32201
|
+
export interface ICellRanges {
|
|
32202
|
+
/**
|
|
32203
|
+
* {@inheritDoc ICellRange.getMerges}
|
|
32204
|
+
*/
|
|
32205
|
+
getMerges(): IRange.Coords[];
|
|
32206
|
+
/**
|
|
32207
|
+
* {@inheritDoc ICellRange.getSheet}
|
|
32208
|
+
*/
|
|
32209
|
+
getSheet(): ISheet;
|
|
32210
|
+
/**
|
|
32211
|
+
* Returns the style for the range.
|
|
32212
|
+
*
|
|
32213
|
+
* @remarks
|
|
32214
|
+
* When querying the style the values will always be for the top left. However the
|
|
32215
|
+
* set values work for the entire range.
|
|
32216
|
+
*/
|
|
32217
|
+
getStyle(): IStyle;
|
|
32218
|
+
/**
|
|
32219
|
+
* {@inheritDoc ICellRange.find}
|
|
32220
|
+
*/
|
|
32221
|
+
find(options: string | ICellRange.FindOptions): Iterator<ICell>;
|
|
32222
|
+
/**
|
|
32223
|
+
* Iterates over the values, yielding each values in the collection.
|
|
32224
|
+
*
|
|
32225
|
+
* @remarks
|
|
32226
|
+
* This does not iterate over the ranges but rather the individual cells within the ranges.
|
|
32227
|
+
* @see {@link ICellRanges.entries()}
|
|
32228
|
+
*/
|
|
32229
|
+
[Symbol.iterator](): IterableIterator<Scalar>;
|
|
32230
|
+
/**
|
|
32231
|
+
* Returns an iterator that allows you to iterate over the individual cells within the ranges,
|
|
32232
|
+
* yielding pairs of `IteratorContext` and a `Value`.
|
|
32233
|
+
*
|
|
32234
|
+
* @param options Configuration options for the iterator, such as filtering or sorting.
|
|
32235
|
+
* @returns An iterator that yields `[ICell.IteratorContext, Value]` tuples for each value within the range.
|
|
32236
|
+
*
|
|
32237
|
+
* @remarks
|
|
32238
|
+
* If the ranges overlap this will return the same value multiple times. If each cell
|
|
32239
|
+
* should only be visited once, use {@link ICellRanges.getFlattened} to remove overlaps.
|
|
32240
|
+
*/
|
|
32241
|
+
entries(options?: ICellRange.IteratorOptions): IterableIterator<ICellRange.Entry>;
|
|
32242
|
+
/**
|
|
32243
|
+
* {@inheritDoc ICellRange.autoFit}
|
|
32244
|
+
*/
|
|
32245
|
+
autoFit(options?: ICellRange.AutoFitOptions): this;
|
|
32246
|
+
/**
|
|
32247
|
+
* {@inheritDoc ICellRange.calculate}
|
|
32248
|
+
*/
|
|
32249
|
+
calculate(fullRecalc?: boolean): this;
|
|
32250
|
+
/**
|
|
32251
|
+
* {@inheritDoc ICellRange.clear}
|
|
32252
|
+
*/
|
|
32253
|
+
clear(applyTo?: ICell.Content, options?: ITransaction.OperationOptions): this;
|
|
32254
|
+
/**
|
|
32255
|
+
* {@inheritDoc ICellRange.merge}
|
|
32256
|
+
*/
|
|
32257
|
+
merge(options?: IRange.Orientations | ICellRange.MergeOptions): this;
|
|
32258
|
+
/**
|
|
32259
|
+
* {@inheritDoc ICellRange.unmerge}
|
|
32260
|
+
*/
|
|
32261
|
+
unmerge(options?: ITransaction.OperationOptions): this;
|
|
32262
|
+
/**
|
|
32263
|
+
* {@inheritDoc ICellRange.insert}
|
|
32264
|
+
*/
|
|
32265
|
+
insert(options?: IRange.Orientation | ICellRange.InsertOptions): this;
|
|
32266
|
+
/**
|
|
32267
|
+
* {@inheritDoc ICellRange.delete}
|
|
32268
|
+
*/
|
|
32269
|
+
delete(options?: IRange.Orientation | ICellRange.DeleteOptions): this;
|
|
32270
|
+
/**
|
|
32271
|
+
* {@inheritDoc ICellRange.insertFrom}
|
|
32272
|
+
*/
|
|
32273
|
+
insertFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): Promise<this | null>;
|
|
32274
|
+
/**
|
|
32275
|
+
* Returns a `ICellRange.ISnapshot` for all of the ranges.
|
|
32276
|
+
*
|
|
32277
|
+
* @remarks
|
|
32278
|
+
* * This will fail if the ranges are not 'aligned'.
|
|
32279
|
+
* @see
|
|
32280
|
+
* {@link ICellRange.getSnapshot}
|
|
32281
|
+
*/
|
|
32282
|
+
getSnapshot(options?: ICellRange.CopyOptions): ICellRange.ISnapshot;
|
|
32283
|
+
/**
|
|
32284
|
+
* {@inheritDoc ICellRange.copyFrom}
|
|
32285
|
+
*/
|
|
32286
|
+
copyFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): Promise<this | null>;
|
|
32287
|
+
/**
|
|
32288
|
+
* {@inheritDoc ICellRange.getEntireRows}
|
|
32289
|
+
*/
|
|
32290
|
+
getEntireRows(shiftColumns?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
32291
|
+
/**
|
|
32292
|
+
* {@inheritDoc ICellRange.getEntireColumns}
|
|
32293
|
+
*/
|
|
32294
|
+
getEntireColumns(shiftRows?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
32295
|
+
/**
|
|
32296
|
+
* {@inheritDoc ICellRange.getRowHeaders}
|
|
32297
|
+
*/
|
|
32298
|
+
getRowHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
32299
|
+
/**
|
|
32300
|
+
* {@inheritDoc ICellRange.getColumnHeaders}
|
|
32301
|
+
*/
|
|
32302
|
+
getColumnHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
32303
|
+
/**
|
|
32304
|
+
* {@inheritDoc ICellRange.getDefaultShiftOrientation}
|
|
32305
|
+
*/
|
|
32306
|
+
getDefaultShiftOrientation(): IRange.Orientation;
|
|
32307
|
+
/**
|
|
32308
|
+
* Returns a set of ranges with overlaps removed and attempts to merge adjacent ranges into larger ranges.
|
|
32309
|
+
*
|
|
32310
|
+
* @remarks
|
|
32311
|
+
* By default, ranges will also be merged into larger ranges where possible, but this behavior can be customized using the `mergeOrientation` parameter.
|
|
32312
|
+
* This method will not modify the original ranges.
|
|
32313
|
+
* @see
|
|
32314
|
+
* {@link isOverlapping}
|
|
32315
|
+
*/
|
|
32316
|
+
getFlattened(options?: ICellRange.GetFlattenOptions): this;
|
|
32317
|
+
/**
|
|
32318
|
+
* {@inheritDoc ICellRange.getVisible}
|
|
32319
|
+
*/
|
|
32320
|
+
getVisible(options?: ICellRange.GetVisibleOptions): this | null;
|
|
32321
|
+
/**
|
|
32322
|
+
* {@inheritDoc ICellRange.getA1}
|
|
32323
|
+
*/
|
|
32324
|
+
getA1(): string;
|
|
32325
|
+
/**
|
|
32326
|
+
* {@inheritDoc ICellRange.getCounts}
|
|
32327
|
+
*/
|
|
32328
|
+
getCounts(types?: Partial<Record<ICell.Content, number | boolean>>): ICellRange.Counts | null;
|
|
32329
|
+
/**
|
|
32330
|
+
* {@inheritDoc ICellRange.isContentful}
|
|
32331
|
+
*/
|
|
32332
|
+
isContentful(types?: ICell.Content | ICell.Content[]): boolean;
|
|
32333
|
+
/**
|
|
32334
|
+
* Returns the count for all rows in the ranges. This will ensure rows that are included in multiples ranges are
|
|
32335
|
+
* not double counted.
|
|
32336
|
+
*/
|
|
32337
|
+
getRowCount(): number;
|
|
32338
|
+
/**
|
|
32339
|
+
* Returns the count for all columns in the ranges. This will ensure columns that are included in multiples ranges are
|
|
32340
|
+
* not double counted.
|
|
32341
|
+
*/
|
|
32342
|
+
getColumnCount(): number;
|
|
32343
|
+
/**
|
|
32344
|
+
* {@inheritDoc ICellRange.isReadOnly}
|
|
32345
|
+
*/
|
|
32346
|
+
isReadOnly(): boolean;
|
|
32347
|
+
/**
|
|
32348
|
+
* Returns a flag indicating if any of the ranges are overlapping.
|
|
32349
|
+
*
|
|
32350
|
+
* @remarks
|
|
32351
|
+
* To get a range with no overlaps {@link ICellRanges.getFlattened} can be used.
|
|
32352
|
+
*/
|
|
32353
|
+
isOverlapping(): boolean;
|
|
32354
|
+
/**
|
|
32355
|
+
* Returns `true` if all of the the ranges have selected all of the rows.
|
|
32356
|
+
*
|
|
32357
|
+
* @remarks
|
|
32358
|
+
* This is different from `isEntireRowsAny` in that it will return `true` if 'ALL' of the
|
|
32359
|
+
* ranges have isEntireRows `true`.
|
|
32360
|
+
*/
|
|
32361
|
+
isEntireRows(): boolean;
|
|
32362
|
+
/**
|
|
32363
|
+
* Returns `true` if any of the ranges have selected all of the rows.
|
|
32364
|
+
*
|
|
32365
|
+
* @remarks
|
|
32366
|
+
* This is different from `isEntireRows` in that it it will return true if 'ANY' of the
|
|
32367
|
+
* ranges have isEntireRows `true`.
|
|
32368
|
+
*/
|
|
32369
|
+
isEntireRowsAny(): boolean;
|
|
32370
|
+
/**
|
|
32371
|
+
* Returns `true` if all of the the ranges have selected all of the columns.
|
|
32372
|
+
*
|
|
32373
|
+
* @remarks
|
|
32374
|
+
* This is different from `isEntireColumnsAny` in that it will return `true` if 'ALL' of the
|
|
32375
|
+
* ranges have isEntireColumns `true`.
|
|
32376
|
+
*/
|
|
32377
|
+
isEntireColumns(): boolean;
|
|
32378
|
+
/**
|
|
32379
|
+
* Returns `true` if any of the ranges have selected all of the columns.
|
|
32380
|
+
*
|
|
32381
|
+
* @remarks
|
|
32382
|
+
* This is different from `isEntireColumns` in that it will return `true` if 'ANY' of the
|
|
32383
|
+
* ranges have isEntireColumns `true`.
|
|
32384
|
+
*/
|
|
32385
|
+
isEntireColumnsAny(): boolean;
|
|
32386
|
+
/**
|
|
32387
|
+
* Returns `true` if any of the ranges are invalid.
|
|
32388
|
+
*/
|
|
32389
|
+
isInvalidAny(): boolean;
|
|
32390
|
+
/**
|
|
32391
|
+
* Returns a ranges with coordinates adjusted to be fixed (absolute) or flexible (relative).
|
|
32392
|
+
*
|
|
32393
|
+
* @see
|
|
32394
|
+
* {@link ICellRange.getFixed}
|
|
32395
|
+
*/
|
|
32396
|
+
getFixed(options: ICellRange.GetFixedOptions | boolean): this;
|
|
32397
|
+
/**
|
|
32398
|
+
* Returns the total number of contiguous ranges in this collection.
|
|
32399
|
+
*/
|
|
32400
|
+
getCount(): number;
|
|
32401
|
+
/**
|
|
32402
|
+
* Returns the range at a specific index.
|
|
32403
|
+
*
|
|
32404
|
+
* @param index
|
|
32405
|
+
*/
|
|
32406
|
+
at(index: number): ICellRange;
|
|
32407
|
+
/**
|
|
32408
|
+
* {@inheritDoc ICellRange.doBatch}
|
|
32409
|
+
*/
|
|
32410
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ITransaction.OperationOptions): R | Promise<R>;
|
|
32411
|
+
/**
|
|
32412
|
+
* The RangeCoords.
|
|
32413
|
+
*/
|
|
32414
|
+
getCoords(): readonly Readonly<IRange.FixableCoords>[];
|
|
32415
|
+
/**
|
|
32416
|
+
* Returns true if the range is invalid.
|
|
32417
|
+
* This can occur if a range is removed or created with invalid coordinates.
|
|
32418
|
+
*/
|
|
32419
|
+
isInvalid(): boolean;
|
|
32420
|
+
/**
|
|
32421
|
+
* Returns the address as a string.
|
|
32422
|
+
*/
|
|
32423
|
+
toString(): string;
|
|
32424
|
+
/**
|
|
32425
|
+
* {@inheritDoc ICellRange.select}
|
|
32426
|
+
*/
|
|
32427
|
+
select(options?: ICellRange.SelectOptions): Promise<this>;
|
|
32428
|
+
/**
|
|
32429
|
+
* {@inheritDoc ICellRange.addListener}
|
|
32430
|
+
*/
|
|
32431
|
+
addListener(listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
32432
|
+
/**
|
|
32433
|
+
* Returns an iterator that allows you to iterate over the individual values within the range.
|
|
32434
|
+
*
|
|
32435
|
+
* @param options Configuration options for the iterator, such as filtering or sorting.
|
|
32436
|
+
* @returns An iterator that yields `Scalar` value, each representing a single cell within the range.
|
|
32437
|
+
*/
|
|
32438
|
+
[Symbol.iterator](options?: ICellRange.IteratorOptions<any>): Iterator<Scalar>;
|
|
32439
|
+
/**
|
|
32440
|
+
* For runtime type checking.
|
|
32441
|
+
*/
|
|
32442
|
+
readonly isICellRanges: true;
|
|
32443
|
+
}
|
|
32444
|
+
/**
|
|
32445
|
+
* {@inheritDoc ICellRanges}
|
|
32446
|
+
* @see
|
|
32447
|
+
* ### **Interface**
|
|
32448
|
+
*
|
|
32449
|
+
* {@link ICellRanges}
|
|
32450
|
+
*/
|
|
32451
|
+
export namespace ICellRanges {
|
|
32452
|
+
/**
|
|
32453
|
+
* The coord type for a ranges.
|
|
32454
|
+
*/
|
|
32455
|
+
type Coords = IRange.Coords[];
|
|
32456
|
+
/**
|
|
32457
|
+
* Address for multiple {@link ICellRange}s.
|
|
32458
|
+
*/
|
|
32459
|
+
type Address = ICellRanges | string | ICellRange.Address | readonly ICellRange.Address[];
|
|
32460
|
+
/**
|
|
32461
|
+
* Options when visiting a ICellRanges.
|
|
32462
|
+
*/
|
|
32463
|
+
interface IteratorOptions<T = ICellRanges.Address> extends ICellRange.IteratorOptions<T> {
|
|
32464
|
+
}
|
|
32465
|
+
/**
|
|
32466
|
+
* Shorthand for persisting.
|
|
32467
|
+
*/
|
|
32468
|
+
type RefJSON = IRange.Coords[] | IRange.Coords | string;
|
|
32469
|
+
}
|
|
32470
|
+
}
|
|
32252
32471
|
declare module "cellRange/ICellRange" {
|
|
32253
32472
|
import { type Scalar, type JSScalar, type JSScalarUpdate, IRange } from '@sheetxl/primitives';
|
|
32254
32473
|
import type { Bounds, ReferenceableClipboard } from '@sheetxl/utils';
|
|
@@ -33860,6 +34079,7 @@ declare module "cellRange/index" {
|
|
|
33860
34079
|
export * from "cellRange/ICellRange";
|
|
33861
34080
|
export * from "cellRange/ICellRanges";
|
|
33862
34081
|
export * from "cellRange/ICellHeaderRange";
|
|
34082
|
+
export * from "cellRange/ICellHeaderRanges";
|
|
33863
34083
|
}
|
|
33864
34084
|
declare module "anchored/IAnchored" {
|
|
33865
34085
|
import type { IRange } from '@sheetxl/primitives';
|