@sheetxl/sdk 0.7.12 → 0.7.13
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/{CmCdKX0dS361BDF_.cjs → 84Qf-nDnKiLQ7HBc.cjs} +1 -1
- package/browser/cjs/{D908eIvK1UZZam0d.cjs → B7jslq9oFR6njKnW.cjs} +1 -1
- package/browser/cjs/{e2MkfbbzEhKy8YyW.cjs → BRkze9nkXD-OqXPT.cjs} +1 -1
- package/browser/cjs/{BosMy9ewpwF9NuGB.cjs → BWZocbfJ9j-b4EWY.cjs} +1 -1
- package/browser/cjs/{D_0CPRkAn_JdC7QW.cjs → BibVdFisqTXEG0Y9.cjs} +1 -1
- package/browser/cjs/{CQeXdseMKMBAVqkr.cjs → BuldQ3tfFYodOk9H.cjs} +1 -1
- package/browser/cjs/{C4IRg2q0tpytF4VU.cjs → C9AVwqTuY33VzH4e.cjs} +3 -3
- package/browser/cjs/{BSm1vufvss-H9NbR.cjs → CDWlJ97tWSqdWRrC.cjs} +1 -1
- package/browser/cjs/{BwbyX4MNaa1zIjER.cjs → CFvba6QKlCV7_Kvg.cjs} +1 -1
- package/browser/cjs/{CzRnWLos_wVaK8Fw.cjs → CKFAjAwy-5z8a99W.cjs} +1 -1
- package/browser/cjs/{BtThYQ_xJKRRyHva.cjs → CWcLBz5wacAKZ65z.cjs} +1 -1
- package/browser/cjs/{ToviSt9hOTH-9baV.cjs → CXsCIuAjTadPMZ2k.cjs} +1 -1
- package/browser/cjs/{Bkzf07hHXxJshocL.cjs → CY7qa68VhzxfCks0.cjs} +1 -1
- package/browser/cjs/{vzFUQnmdHHRhq6jV.cjs → CbHx0iP74qQiiFGA.cjs} +2 -2
- package/browser/cjs/{D08eDP1nShWTKp9c.cjs → CgnB_AUJ9_aLjrjf.cjs} +1 -1
- package/browser/cjs/{B2USJzhMx0gKp_xB.cjs → D0rqCTa18JiwtkFg.cjs} +1 -1
- package/browser/cjs/{DbXxA7VgCTQL8GVr.cjs → D9ALzAAPbqKp0qG4.cjs} +1 -1
- package/browser/cjs/{E6VF-dQbtwGm8ZKJ.cjs → DBL1LvXwFpR7MLsM.cjs} +1 -1
- package/browser/cjs/{DyjC8TEGJk-hny2D.cjs → DYOYeMed2UXw1HaH.cjs} +1 -1
- package/browser/cjs/{DRD2V03RHZ3FhUo9.cjs → DgKonEP5su-An4tv.cjs} +1 -1
- package/browser/cjs/{1CfjeWL6bDBG9-ag.cjs → Djw2mPk9DA_xDR48.cjs} +2 -2
- package/browser/cjs/{YjLWaeMwa9C_R1s5.cjs → DrE0C6ruqS4-YkDG.cjs} +1 -1
- package/browser/cjs/{D5f6Io_7gWntl6eJ.cjs → FmMGqD2eGNSxs_tp.cjs} +1 -1
- package/browser/cjs/{DrKICIc8x71fjYk9.cjs → N8D-AiKZvmSpJoyk.cjs} +1 -1
- package/browser/cjs/{ClKtiswJz42sFi44.cjs → NwQUH5RlCwVclTou.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{CKzpvrOe3DiGVZcc.cjs → m-BThCiOY0U2UHKz.cjs} +1 -1
- package/browser/cjs/rCv0GyYPZv7sdNXw.cjs +55 -0
- package/{node/esm/CTnYczv8sdymPont.mjs → browser/esm/B0zJo_YhAJZgLFb2.mjs} +1 -1
- package/browser/esm/{CcrvxZgcfX9XaIQ5.mjs → B1mQhILY_Ee8mZj6.mjs} +1 -1
- package/browser/esm/{Dw7XkqUHobOgiSxg.mjs → B6s60UZeDi9sgRHT.mjs} +1 -1
- package/browser/esm/{dXzMDWrDA5Lwl6Mj.mjs → B8TYkzlDKU9Ggkas.mjs} +1 -1
- package/browser/esm/{CaxUhEKBf5-rWlgP.mjs → BTrXUcjikfiXBuQs.mjs} +1 -1
- package/browser/esm/{BvMu0XjKqyboy-lE.mjs → BUh4gZOH8Uxd-hWh.mjs} +5485 -5337
- package/browser/esm/{DkKcmgQirssZLyAt.mjs → BXMGu5NmEgJKrpDn.mjs} +2 -2
- package/browser/esm/{C333Bk9rZ2_V-1cQ.mjs → BelRhaFYXfqn3xBt.mjs} +1 -1
- package/browser/esm/{DHM5MROBjTGyyJxE.mjs → BqrAMV-sxGrw_IGy.mjs} +1 -1
- package/{node/esm/Cq8Z_7xKAy_l-nRD.mjs → browser/esm/Byme5OT9_LV09DwE.mjs} +1 -1
- package/{node/esm/C2TJUuObLI3XbkGW.mjs → browser/esm/C-rY9IQnclqMvLhW.mjs} +1 -1
- package/browser/esm/{Bj-vyyFRt_LQ3p4k.mjs → C3UqdgBtXrjr9U7B.mjs} +1 -1
- package/{node/esm/wGQlPDrRhZBNmqXr.mjs → browser/esm/CZzcgxj1VfTcHOLD.mjs} +1 -1
- package/browser/esm/{Dy616gUfJgTEn2Lk.mjs → CsjFegG9ZsVPWgLy.mjs} +1 -1
- package/browser/esm/{BpvAje6jcdacLYbX.mjs → Cz5dfo_pXqz_RSCW.mjs} +1 -1
- package/browser/esm/{BM-O3SE_q7zMdUWU.mjs → D2aynnS_ZvhUymlW.mjs} +2 -2
- package/browser/esm/{DBqZtOc04qqODM6B.mjs → D5SlMU39knV0sfaE.mjs} +1 -1
- package/browser/esm/{D9emWaogFZ_qGmes.mjs → DECRnCXvKcFm5UW_.mjs} +3 -3
- package/browser/esm/{Cya5XpqQkpsIhhU6.mjs → DPGNTew-J9BDfx7H.mjs} +1 -1
- package/{node/esm/C9rJUO6w8U4r-ZLU.mjs → browser/esm/DVs7wiZMt1NvmibL.mjs} +1 -1
- package/{node/esm/jAZwRNd8wzT9q-Kf.mjs → browser/esm/DdFgB4nRiWb-x8MU.mjs} +1 -1
- package/browser/esm/{z5RyyAq0YqPAgm3C.mjs → DmzWhWp1sSLTOJmk.mjs} +1 -1
- package/browser/esm/{D5rbSNG1lRMqamJK.mjs → DrgyAIoXbBJ7XEJz.mjs} +1 -1
- package/browser/esm/{TQ7P4hzcSvakAO7N.mjs → JBuDAROw1IhzpBDK.mjs} +1 -1
- package/browser/esm/{DFPhSySbg8tF2p3h.mjs → SAWt7fxsw4YrVlsO.mjs} +1 -1
- package/browser/esm/{DyrGEURqMZbZUei0.mjs → czwXw8arBOM78nIR.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CSrVbEwBx2NnAYvL.mjs → obyONN_ql1eCkYqn.mjs} +1 -1
- package/{browser/esm/CTnYczv8sdymPont.mjs → node/esm/B0zJo_YhAJZgLFb2.mjs} +1 -1
- package/node/esm/{CcrvxZgcfX9XaIQ5.mjs → B1mQhILY_Ee8mZj6.mjs} +1 -1
- package/node/esm/{BmoVFEKACjsgqtqW.mjs → BSchhHzd9LhOSQyh.mjs} +2 -2
- package/node/esm/{CaxUhEKBf5-rWlgP.mjs → BTrXUcjikfiXBuQs.mjs} +1 -1
- package/node/esm/{DHM5MROBjTGyyJxE.mjs → BqrAMV-sxGrw_IGy.mjs} +1 -1
- package/{browser/esm/Cq8Z_7xKAy_l-nRD.mjs → node/esm/Byme5OT9_LV09DwE.mjs} +1 -1
- package/{browser/esm/C2TJUuObLI3XbkGW.mjs → node/esm/C-rY9IQnclqMvLhW.mjs} +1 -1
- package/{browser/esm/wGQlPDrRhZBNmqXr.mjs → node/esm/CZzcgxj1VfTcHOLD.mjs} +1 -1
- package/node/esm/{Dy616gUfJgTEn2Lk.mjs → CsjFegG9ZsVPWgLy.mjs} +1 -1
- package/node/esm/{BpvAje6jcdacLYbX.mjs → Cz5dfo_pXqz_RSCW.mjs} +1 -1
- package/node/esm/{DBqZtOc04qqODM6B.mjs → D5SlMU39knV0sfaE.mjs} +1 -1
- package/node/esm/{BGDBKHouRITQ69Y_.mjs → D76Ug5nx4id19sWo.mjs} +1 -1
- package/node/esm/{Ci5zjsTKJE1WXg-8.mjs → DBCmVfDXH2Gjy1gb.mjs} +1 -1
- package/node/esm/{C3dNwSBxZydPNIa6.mjs → DGPSmLySgorgnRpF.mjs} +1 -1
- package/{browser/esm/C9rJUO6w8U4r-ZLU.mjs → node/esm/DVs7wiZMt1NvmibL.mjs} +1 -1
- package/{browser/esm/jAZwRNd8wzT9q-Kf.mjs → node/esm/DdFgB4nRiWb-x8MU.mjs} +1 -1
- package/node/esm/{CGUEDkuo3-Y2_wZV.mjs → DpSNP5QMfZvpJ_wv.mjs} +1 -1
- package/node/esm/{D5rbSNG1lRMqamJK.mjs → DrgyAIoXbBJ7XEJz.mjs} +1 -1
- package/node/esm/{SG4_v0bpY55xYUOj.mjs → DvtObSijnfKp4hVX.mjs} +1 -1
- package/node/esm/{TQ7P4hzcSvakAO7N.mjs → JBuDAROw1IhzpBDK.mjs} +1 -1
- package/node/esm/{DFPhSySbg8tF2p3h.mjs → SAWt7fxsw4YrVlsO.mjs} +1 -1
- package/node/esm/{OmF7uWO8nNEAcgRL.mjs → YEoEG9HlehI4GxoO.mjs} +1 -1
- package/node/esm/index.mjs +2748 -2614
- package/node/esm/{BOC_DgdvRX0-0ZaJ.mjs → jQQyFKgcBYKkYy5u.mjs} +1 -1
- package/node/esm/{ClxQXzVr71QV--QR.mjs → ne4Ow4B53KelbGbA.mjs} +1 -1
- package/node/esm/{CSrVbEwBx2NnAYvL.mjs → obyONN_ql1eCkYqn.mjs} +1 -1
- package/package.json +4 -4
- package/types/index.d.ts +205 -65
- package/types/scripting.d.ts +609 -400
- package/browser/cjs/ibSKVNiJ2VncQNAS.cjs +0 -55
package/types/scripting.d.ts
CHANGED
|
@@ -14236,6 +14236,15 @@ declare module "address/AddressUtils" {
|
|
|
14236
14236
|
* If we used the from/to range type we wouldn't have to.
|
|
14237
14237
|
*/
|
|
14238
14238
|
export const sheetRangeToString: RangeToString<IRange.FixableCoords, IRange.FixableCellCoords>;
|
|
14239
|
+
/**
|
|
14240
|
+
* Convert a fixable cell to A1 format.
|
|
14241
|
+
*
|
|
14242
|
+
* @param fixable
|
|
14243
|
+
* @param defaultRange
|
|
14244
|
+
* @param toRangeString
|
|
14245
|
+
* @returns a string
|
|
14246
|
+
*/
|
|
14247
|
+
export const sheetRangesToString: (fixable: readonly Partial<Readonly<IRange.FixableCoords>>[], defaultRange?: Readonly<IRange.Coords>, toRangeString?: RangeToString<IRange.FixableCoords, IRange.FixableCellCoords>) => string;
|
|
14239
14248
|
/**
|
|
14240
14249
|
* Workbook range still used IRange.FixableCellCoords.
|
|
14241
14250
|
*/
|
|
@@ -14455,6 +14464,14 @@ declare module "selection/IRangeSelection" {
|
|
|
14455
14464
|
* @returns The selection coordinates.
|
|
14456
14465
|
*/
|
|
14457
14466
|
getCoords(): IRangeSelection.Coords;
|
|
14467
|
+
/**
|
|
14468
|
+
* Returns the selection as an array of IRange.Coords.
|
|
14469
|
+
*
|
|
14470
|
+
* @param coords Optional coordinates to convert. If not provided, uses the current selection.
|
|
14471
|
+
* @remarks
|
|
14472
|
+
* The first element is always the active range.
|
|
14473
|
+
*/
|
|
14474
|
+
getRangesCoords(coord?: Partial<IRangeSelection.Coords>): IRange.Coords[];
|
|
14458
14475
|
/**
|
|
14459
14476
|
* Updates the selection coordinates.
|
|
14460
14477
|
* @param coords The new coordinates.
|
|
@@ -18982,6 +18999,13 @@ declare module "selection/_RangeSelectionUtils" {
|
|
|
18982
18999
|
(coords: IRange.CellCoords): boolean;
|
|
18983
19000
|
}
|
|
18984
19001
|
export type CellFinder = (activeCoords: IRange.CellCoords, isContentfulCell: IsContentfulCell | undefined, hiddenAt: HiddenHeadersAt | undefined, direction: IRange.Direction, first: boolean, limit: number) => number;
|
|
19002
|
+
/**
|
|
19003
|
+
* Returns the cells as an ordered list of ranges. The first range is the active range.
|
|
19004
|
+
* If there are no ranges then the active coord will be returns as a range.
|
|
19005
|
+
* @remarks
|
|
19006
|
+
* * Always return at least 1 range unless the selection is null.
|
|
19007
|
+
*/
|
|
19008
|
+
export const selectionToRanges: (selection: Partial<IRangeSelection.Coords>) => IRange.Coords[];
|
|
18985
19009
|
}
|
|
18986
19010
|
declare module "selection/RangeSelection" {
|
|
18987
19011
|
import { IRange } from '@sheetxl/primitives';
|
|
@@ -19012,6 +19036,8 @@ declare module "selection/RangeSelection" {
|
|
|
19012
19036
|
navigate(direction: IRange.Direction, select?: boolean, contentful?: boolean, incrementAmount?: number): this;
|
|
19013
19037
|
/** {@inheritDoc IRangeSelection.getCoords} */
|
|
19014
19038
|
getCoords(): IRangeSelection.Coords;
|
|
19039
|
+
/** {@inheritDoc IRangeSelection.getRangesCoords} */
|
|
19040
|
+
getRangesCoords(coord?: Partial<IRangeSelection.Coords>): IRange.Coords[];
|
|
19015
19041
|
/** {@inheritDoc IRangeSelection.updateCoords} */
|
|
19016
19042
|
updateCoords(coords: IRangeSelection.Coords): this;
|
|
19017
19043
|
/** {@inheritDoc IRangeSelection.isEntire} */
|
|
@@ -19745,7 +19771,7 @@ declare module "sheet/header/_HeaderUtils" {
|
|
|
19745
19771
|
import { IRange } from '@sheetxl/primitives';
|
|
19746
19772
|
import { ITypes } from "type/index";
|
|
19747
19773
|
import { IStyle } from "style/index";
|
|
19748
|
-
import { ICellHeaderRange } from "cellRange/index";
|
|
19774
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
19749
19775
|
import { IRangeSelection } from "selection/index";
|
|
19750
19776
|
import { ISheetHeader } from "sheet/header/ISheetHeader";
|
|
19751
19777
|
/**
|
|
@@ -19830,6 +19856,8 @@ declare module "sheet/header/_HeaderUtils" {
|
|
|
19830
19856
|
*/
|
|
19831
19857
|
export function setOrClear<T = any>(container: Record<string, any>, key: string, newValue: T | null | undefined): void;
|
|
19832
19858
|
/** @internal */
|
|
19859
|
+
export const parseHeaderRangesAddress: (address: ICellHeaderRanges.Address, isColumn: boolean, defaultRange?: IRange.FixableCoords) => RunCoords[];
|
|
19860
|
+
/** @internal */
|
|
19833
19861
|
export const parseHeaderRangeAddress: (address: ICellHeaderRange.Address, isColumn: boolean, defaultRange?: IRange.FixableCoords) => RunCoords;
|
|
19834
19862
|
/**
|
|
19835
19863
|
* Create an invalid range.
|
|
@@ -19844,6 +19872,14 @@ declare module "sheet/header/_HeaderUtils" {
|
|
|
19844
19872
|
* Create runs from selection.
|
|
19845
19873
|
*/
|
|
19846
19874
|
export const createRunsFromSelection: (header: ISheetHeader, selection: IRangeSelection.Coords, maxRange: IRange.Coords) => ITypes.RunCoordValue<ISheetHeader.SelectedRun>[];
|
|
19875
|
+
/**
|
|
19876
|
+
* Converts a set of RunCoords into a set of Ranges.
|
|
19877
|
+
*/
|
|
19878
|
+
export const runCoordsToRangeCoords: (runs: readonly Readonly<Partial<RunCoords>>[], entireRange: IRange.Coords, isColumn: boolean) => Partial<IRange.FixableCoords>[];
|
|
19879
|
+
/**
|
|
19880
|
+
* Returns a list of merged and non-overlapping run coordinates.
|
|
19881
|
+
*/
|
|
19882
|
+
export const removeOverlappingRuns: (runs: readonly Readonly<Partial<RunCoords>>[], merge?: boolean) => RunCoords[];
|
|
19847
19883
|
}
|
|
19848
19884
|
declare module "sheet/header/SheetCellHeader" {
|
|
19849
19885
|
import { IRange } from '@sheetxl/primitives';
|
|
@@ -19943,6 +19979,8 @@ declare module "sheet/header/SheetCellHeaderRange" {
|
|
|
19943
19979
|
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): this;
|
|
19944
19980
|
/** {@inheritDoc ICellHeaderRange.getCount} */
|
|
19945
19981
|
getCount(): number;
|
|
19982
|
+
/** {@inheritDoc ICellHeaderRange.getHeaderCount} */
|
|
19983
|
+
getHeaderCount(): number;
|
|
19946
19984
|
/** {@inheritDoc ICellHeaderRange.getVisibleCount} */
|
|
19947
19985
|
getVisibleCount(): number;
|
|
19948
19986
|
/** {@inheritDoc ICellHeaderRange.isEntireHeaders} */
|
|
@@ -19969,6 +20007,53 @@ declare module "sheet/header/SheetCellHeaderRange" {
|
|
|
19969
20007
|
get isICellHeaderRange(): true;
|
|
19970
20008
|
}
|
|
19971
20009
|
}
|
|
20010
|
+
declare module "sheet/header/SheetCellHeaderRanges" {
|
|
20011
|
+
import { IRange } from '@sheetxl/primitives';
|
|
20012
|
+
import { RunCoords } from '@sheetxl/utils';
|
|
20013
|
+
import { ITransaction } from "transaction/index";
|
|
20014
|
+
import { ICellHeader } from "cell/index";
|
|
20015
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
20016
|
+
import { SheetHeader } from "sheet/header/SheetHeader";
|
|
20017
|
+
export class SheetCellHeaderRanges implements ICellHeaderRanges {
|
|
20018
|
+
protected _header: any;
|
|
20019
|
+
protected _coords: RunCoords[];
|
|
20020
|
+
constructor(header: SheetHeader, coords: RunCoords[]);
|
|
20021
|
+
/** {@inheritDoc ICellHeaderRanges.updateHeaders} */
|
|
20022
|
+
updateHeaders(update: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
20023
|
+
/** {@inheritDoc ICellHeaderRanges.getCoords} */
|
|
20024
|
+
getCoords(): RunCoords[];
|
|
20025
|
+
/** {@inheritDoc ICellHeaderRanges.setHidden} */
|
|
20026
|
+
setHidden(hidden?: boolean): this;
|
|
20027
|
+
/** {@inheritDoc ICellHeaderRanges.getCount} */
|
|
20028
|
+
getCount(): number;
|
|
20029
|
+
/** {@inheritDoc ICellHeaderRanges.getHeaderCount} */
|
|
20030
|
+
getHeaderCount(): number;
|
|
20031
|
+
/** {@inheritDoc ICellHeaderRanges.getVisibleCount} */
|
|
20032
|
+
getVisibleCount(): number;
|
|
20033
|
+
/** {@inheritDoc ICellHeaderRanges.isEntireHeaders} */
|
|
20034
|
+
isEntireHeaders(): boolean;
|
|
20035
|
+
/** {@inheritDoc ICellHeaderRanges.isEntireHeaders} */
|
|
20036
|
+
isEntireHeadersAny(): boolean;
|
|
20037
|
+
/** {@inheritDoc ICellHeaderRanges.clear} */
|
|
20038
|
+
clear(): this;
|
|
20039
|
+
/** {@inheritDoc ICellHeaderRanges.setSize} */
|
|
20040
|
+
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
20041
|
+
/** {@inheritDoc ICellHeaderRanges.at} */
|
|
20042
|
+
at(index: number): ICellHeaderRange;
|
|
20043
|
+
/** {@inheritDoc ICellHeaderRanges.getOrientation} */
|
|
20044
|
+
getOrientation(): IRange.Orientation;
|
|
20045
|
+
/** {@inheritDoc ICellHeaderRanges.doBatch} */
|
|
20046
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
20047
|
+
/** {@inheritDoc ICellHeaderRanges.getSheetHeader} */
|
|
20048
|
+
getSheetHeader<S>(): S;
|
|
20049
|
+
/** {@inheritDoc ICellHeaderRanges.getA1} */
|
|
20050
|
+
getA1(): string;
|
|
20051
|
+
get [Symbol.toStringTag](): string;
|
|
20052
|
+
toString(): string;
|
|
20053
|
+
/** {@inheritDoc ICellHeaderRanges.isICellHeaderRanges} */
|
|
20054
|
+
get isICellHeaderRanges(): true;
|
|
20055
|
+
}
|
|
20056
|
+
}
|
|
19972
20057
|
declare module "sheet/header/SheetHeader" {
|
|
19973
20058
|
import { IRange } from '@sheetxl/primitives';
|
|
19974
20059
|
import { RunCoords } from '@sheetxl/utils';
|
|
@@ -19976,7 +20061,7 @@ declare module "sheet/header/SheetHeader" {
|
|
|
19976
20061
|
import { ITransaction } from "transaction/index";
|
|
19977
20062
|
import { IListener } from "listener/index";
|
|
19978
20063
|
import { ICellHeader } from "cell/index";
|
|
19979
|
-
import { ICellHeaderRange } from "cellRange/index";
|
|
20064
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
19980
20065
|
import { IRangeSelection } from "selection/index";
|
|
19981
20066
|
import { ISheet } from "sheet/index";
|
|
19982
20067
|
import { ISheetHeader } from "sheet/header/ISheetHeader";
|
|
@@ -20042,8 +20127,12 @@ declare module "sheet/header/SheetHeader" {
|
|
|
20042
20127
|
} | void;
|
|
20043
20128
|
/** {@inheritDoc ISheetHeader.getRange} */
|
|
20044
20129
|
getRange(address: ICellHeaderRange.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
20130
|
+
/** {@inheritDoc ISheetHeader.getRanges} */
|
|
20131
|
+
getRanges(address: ICellHeaderRanges.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
20045
20132
|
/** {@inheritDoc ISheetHeader.getSelectedRange} */
|
|
20046
20133
|
getSelectedRange(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
20134
|
+
/** {@inheritDoc ISheetHeader.getSelectedRanges} */
|
|
20135
|
+
getSelectedRanges(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
20047
20136
|
/** {@inheritDoc ISheetHeader.getUsedRange} */
|
|
20048
20137
|
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
20049
20138
|
/** {@inheritDoc ISheetHeader.getEntireRange} */
|
|
@@ -20053,9 +20142,9 @@ declare module "sheet/header/SheetHeader" {
|
|
|
20053
20142
|
/** {@inheritDoc ISheetHeader.updateHeaderPairs} */
|
|
20054
20143
|
updateHeaderPairs(pairs: ICellHeaderRange.AddressUpdatePair[], options?: ICellHeaderRange.UpdateHeadersOptions): RunCoords[] | null;
|
|
20055
20144
|
protected _parseHeaderRangeAddress(address: ICellHeaderRange.Address): RunCoords;
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
|
|
20145
|
+
protected _update(addresses: ICellHeaderRange.Address | ICellHeaderRange.Address[], update: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
20146
|
+
protected _setSize(address: ICellHeaderRange.Address | ICellHeaderRange.Address[], size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
20147
|
+
protected _setHidden(address: ICellHeaderRange.Address | ICellHeaderRange.Address[], hidden?: boolean): this;
|
|
20059
20148
|
protected _clear(coords: RunCoords, options?: ICellHeaderRange.UpdateHeadersOptions): void;
|
|
20060
20149
|
protected _getSnapshot(coordsFrom?: RunCoords, optionsMark?: ICellHeaderRange.CopyOptions): ICellHeaderRange.ISnapshot;
|
|
20061
20150
|
/** {@inheritDoc ISheetHeader.isProtected} */
|
|
@@ -21726,7 +21815,7 @@ declare module "sheet/SheetRanges" {
|
|
|
21726
21815
|
import type { ITransaction } from "transaction/index";
|
|
21727
21816
|
import type { IListener } from "listener/index";
|
|
21728
21817
|
import type { ICell } from "cell/index";
|
|
21729
|
-
import type { ICellRanges, ICellRange } from "cellRange/index";
|
|
21818
|
+
import type { ICellRanges, ICellRange, ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
21730
21819
|
import type { IStyle } from "style/index";
|
|
21731
21820
|
import type { ISheet } from "sheet/index";
|
|
21732
21821
|
export interface SheetRangesOptions {
|
|
@@ -21793,6 +21882,10 @@ declare module "sheet/SheetRanges" {
|
|
|
21793
21882
|
getEntireRows(shift?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
21794
21883
|
/** {@inheritDoc ICellRanges.getEntireColumns} */
|
|
21795
21884
|
getEntireColumns(shift?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
21885
|
+
/** {@inheritDoc ICellRange.getRowHeaders} */
|
|
21886
|
+
getRowHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
21887
|
+
/** {@inheritDoc ICellRange.getColumnHeaders}*/
|
|
21888
|
+
getColumnHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
21796
21889
|
/** {@inheritDoc ICellRanges.getDefaultShiftOrientation} */
|
|
21797
21890
|
getDefaultShiftOrientation(): IRange.Orientation;
|
|
21798
21891
|
/** {@inheritDoc ICellRanges.getCount} */
|
|
@@ -22403,7 +22496,7 @@ declare module "sheet/Sheet" {
|
|
|
22403
22496
|
/** @internal */
|
|
22404
22497
|
protected _commitAndAutoSelect(trans: ITransaction, selection: Partial<IRangeSelection.Coords>, selectOptions?: boolean | ICellRange.SelectOptions, commitOptions?: ITransaction.StoreOperationOptions<CommitView>, orientation?: IRange.Orientation): Promise<IRange.Coords[]>;
|
|
22405
22498
|
/** @internal */
|
|
22406
|
-
protected _autoSelect(options?: boolean | ICellRange.SelectOptions,
|
|
22499
|
+
protected _autoSelect(options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords>, orientation?: IRange.Orientation): Promise<IRange.Coords[]>;
|
|
22407
22500
|
/** {@inheritDoc ISheet.getSelection} */
|
|
22408
22501
|
getSelection(): IRangeSelection;
|
|
22409
22502
|
/** {@inheritDoc ISheet.getView} */
|
|
@@ -24160,24 +24253,48 @@ declare module "sheet/header/ISheetHeader" {
|
|
|
24160
24253
|
import { ITransaction } from "transaction/index";
|
|
24161
24254
|
import { IListener } from "listener/index";
|
|
24162
24255
|
import { ICellHeader } from "cell/index";
|
|
24163
|
-
import { ICellHeaderRange } from "cellRange/index";
|
|
24256
|
+
import { ICellHeaderRange, ICellHeaderRanges } from "cellRange/index";
|
|
24164
24257
|
import { ISheet } from "sheet/ISheet";
|
|
24165
24258
|
/**
|
|
24166
24259
|
* Provides a programmatic interface for interacting with and modifying entire rows or columns in a spreadsheet,
|
|
24167
24260
|
* allowing for actions such as inserting, deleting, resizing, and applying formatting changes.
|
|
24168
24261
|
*/
|
|
24169
24262
|
export interface ISheetHeader extends ITransaction.ITransactional, IListener.ISource<ISheetHeader> {
|
|
24263
|
+
/**
|
|
24264
|
+
* Returns the header at a given offset. Will only return null for invalid header offset. To get a list of headers use {@link getRange}.
|
|
24265
|
+
*
|
|
24266
|
+
* @param index 0-based absolute index.
|
|
24267
|
+
*/
|
|
24268
|
+
at(index: number): ICellHeader;
|
|
24269
|
+
/**
|
|
24270
|
+
* Returns a displayable title for the given index.
|
|
24271
|
+
* @param index 0-based absolute index.
|
|
24272
|
+
*/
|
|
24273
|
+
getTextAt(index: number): string;
|
|
24170
24274
|
/**
|
|
24171
24275
|
* Returns a range of cells for the specified range.
|
|
24172
24276
|
*
|
|
24277
|
+
* @param address The address or addresses of the header range to retrieve.
|
|
24278
|
+
* @param options Options for retrieving the header ranges.
|
|
24173
24279
|
* @see
|
|
24174
24280
|
* {@link ICellHeaderRange}
|
|
24175
24281
|
*/
|
|
24176
24282
|
getRange(address: ICellHeaderRange.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
24177
24283
|
/**
|
|
24178
|
-
* Returns
|
|
24284
|
+
* Returns a collection of header ranges for the specified ranges.
|
|
24285
|
+
*
|
|
24286
|
+
* @param address The address or addresses of the header ranges to retrieve.
|
|
24287
|
+
* @param options Options for retrieving the header ranges.
|
|
24288
|
+
*/
|
|
24289
|
+
getRanges(address: ICellHeaderRanges.Address, options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
24290
|
+
/**
|
|
24291
|
+
* Returns the active header range that is used in the selection.
|
|
24179
24292
|
*/
|
|
24180
24293
|
getSelectedRange(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRange;
|
|
24294
|
+
/**
|
|
24295
|
+
* Returns the active header ranges that are used in the selection.
|
|
24296
|
+
*/
|
|
24297
|
+
getSelectedRanges(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
24181
24298
|
/**
|
|
24182
24299
|
* Returns the data ranges for headers that contain information.
|
|
24183
24300
|
*
|
|
@@ -24196,46 +24313,6 @@ declare module "sheet/header/ISheetHeader" {
|
|
|
24196
24313
|
* The orientation the headers manage.
|
|
24197
24314
|
*/
|
|
24198
24315
|
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
24316
|
/**
|
|
24240
24317
|
* Returns a flag indicating if the headers are protected by the sheet.
|
|
24241
24318
|
*/
|
|
@@ -24318,6 +24395,14 @@ declare module "sheet/header/ISheetHeader" {
|
|
|
24318
24395
|
* Returns a list of SelectedRuns.
|
|
24319
24396
|
*/
|
|
24320
24397
|
getSelectedRuns(): readonly ITypes.RunCoordValue<ISheetHeader.SelectedRun>[];
|
|
24398
|
+
/**
|
|
24399
|
+
* Sets the headers. This supports setting values as a batch.
|
|
24400
|
+
*
|
|
24401
|
+
* @remarks
|
|
24402
|
+
* When setting headers the cells references by this sheet will not update.
|
|
24403
|
+
* To ensure they are updated on the sheet call updateHeaderPairs with the range from the header.
|
|
24404
|
+
*/
|
|
24405
|
+
updateHeaderPairs(pairs: ICellHeaderRange.AddressUpdatePair[], options?: ICellHeaderRange.UpdateHeadersOptions): RunCoords[] | null;
|
|
24321
24406
|
/**
|
|
24322
24407
|
* Returns the sheet model used for the header.
|
|
24323
24408
|
*/
|
|
@@ -24531,6 +24616,10 @@ declare module "sheet/_SheetUtils" {
|
|
|
24531
24616
|
* Wraps each value in a ContentfulEntry
|
|
24532
24617
|
*/
|
|
24533
24618
|
export const tuplesToContentfulEntries: (gridTuple: Tuple.GridTuple<Scalar>, isColumn: boolean) => ISpatialMap.Entry<ContentfulEntry>[];
|
|
24619
|
+
/**
|
|
24620
|
+
* Expands ranges to include merges.
|
|
24621
|
+
*/
|
|
24622
|
+
export const expandToIncludeMerges: (ranges: readonly IRange.Coords[], mergeSpatial: ISpatialMap<MergeEntry>, entireCoords: IRange.Coords) => IRange.Coords[];
|
|
24534
24623
|
/**
|
|
24535
24624
|
* Creates a IRangeSelection.Coords from an array of ranges.
|
|
24536
24625
|
*
|
|
@@ -24538,23 +24627,13 @@ declare module "sheet/_SheetUtils" {
|
|
|
24538
24627
|
* @param cell if provided will try to fit within the cell
|
|
24539
24628
|
* @param rangeIndex *default* `ranges.length 1 unless this is a single cell then -1`.
|
|
24540
24629
|
*/
|
|
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[];
|
|
24630
|
+
export const toRangeSelectionCoords: (ranges: readonly IRange.Coords[], cell?: IRange.CellCoords, rangeIndex?: number) => IRangeSelection.Coords;
|
|
24553
24631
|
/**
|
|
24554
24632
|
* Creates a IRangeSelection.Coords from an array of ranges.
|
|
24555
24633
|
*
|
|
24556
24634
|
* @param ranges
|
|
24557
24635
|
* @param rangeIndex @defaultValue ranges.length 1 unless this is a single cell then -1
|
|
24636
|
+
* @deprecated use toRangeSelectionCoords
|
|
24558
24637
|
*/
|
|
24559
24638
|
export const rangesToSelection: (ranges: readonly IRange.Coords[], rangeIndex?: number) => IRangeSelection.Coords;
|
|
24560
24639
|
export type OrientedStyled = {
|
|
@@ -31565,7 +31644,7 @@ declare module "sort/ISort" {
|
|
|
31565
31644
|
interface DefaultSortCriteria {
|
|
31566
31645
|
/**
|
|
31567
31646
|
* The cords that will be sorted.
|
|
31568
|
-
* This
|
|
31647
|
+
* This will include headers even if the are ignored.
|
|
31569
31648
|
*/
|
|
31570
31649
|
coords: IRange.Coords;
|
|
31571
31650
|
/**
|
|
@@ -31579,6 +31658,10 @@ declare module "sort/ISort" {
|
|
|
31579
31658
|
* If no headers are found this will be empty.
|
|
31580
31659
|
*/
|
|
31581
31660
|
headers: Map<number, string>;
|
|
31661
|
+
/**
|
|
31662
|
+
* The coords without any headers.
|
|
31663
|
+
*/
|
|
31664
|
+
sortCoords: IRange.Coords;
|
|
31582
31665
|
}
|
|
31583
31666
|
/**
|
|
31584
31667
|
* Extends sort options to include options for sorting a range.
|
|
@@ -31659,399 +31742,125 @@ declare module "sort/index" {
|
|
|
31659
31742
|
export * from "sort/IAutoSort";
|
|
31660
31743
|
export * from "sort/Sort";
|
|
31661
31744
|
}
|
|
31662
|
-
declare module "cellRange/
|
|
31663
|
-
import type {
|
|
31664
|
-
import type {
|
|
31745
|
+
declare module "cellRange/ICellHeaderRange" {
|
|
31746
|
+
import type { IRange } from '@sheetxl/primitives';
|
|
31747
|
+
import type { RunCoords, ReferenceableClipboard } from '@sheetxl/utils';
|
|
31665
31748
|
import type { ITransaction } from "transaction/index";
|
|
31666
|
-
import type {
|
|
31667
|
-
import type { ICell } from "cell/index";
|
|
31668
|
-
import type { ISheet } from "sheet/index";
|
|
31749
|
+
import type { ICellHeader } from "cell/index";
|
|
31669
31750
|
import type { ICellRange } from "cellRange/ICellRange";
|
|
31670
31751
|
/**
|
|
31671
|
-
*
|
|
31672
|
-
*
|
|
31673
|
-
* Useful when working with a discontinuous set of ranges.
|
|
31752
|
+
* Represents a collection of ICellHeaders.
|
|
31674
31753
|
*/
|
|
31675
|
-
export interface
|
|
31676
|
-
/**
|
|
31677
|
-
* {@inheritDoc ICellRange.getMerges}
|
|
31678
|
-
*/
|
|
31679
|
-
getMerges(): IRange.Coords[];
|
|
31754
|
+
export interface ICellHeaderRange {
|
|
31680
31755
|
/**
|
|
31681
|
-
*
|
|
31756
|
+
* The RunCoords for the range.
|
|
31682
31757
|
*/
|
|
31683
|
-
|
|
31758
|
+
getCoords(): ICellHeaderRange.Coords;
|
|
31684
31759
|
/**
|
|
31685
|
-
*
|
|
31760
|
+
* Iterate over cells headers.
|
|
31686
31761
|
*
|
|
31687
31762
|
* @remarks
|
|
31688
|
-
*
|
|
31689
|
-
* set values work for the entire range.
|
|
31763
|
+
* * Callbacks can return a 'break' value to stop the visit.
|
|
31690
31764
|
*/
|
|
31691
|
-
|
|
31765
|
+
forEach<T = any>(callback: ICellHeaderRange.ForEachCallback<T>, options?: ICellHeaderRange.IteratorOptions): T | void;
|
|
31692
31766
|
/**
|
|
31693
|
-
*
|
|
31767
|
+
* Returns the header at a location relative to the range.
|
|
31768
|
+
*
|
|
31769
|
+
* @param index
|
|
31694
31770
|
*/
|
|
31695
|
-
|
|
31771
|
+
at(index: number): ICellHeader;
|
|
31696
31772
|
/**
|
|
31697
|
-
*
|
|
31773
|
+
* Set the size of the headers.
|
|
31698
31774
|
*
|
|
31699
|
-
* @
|
|
31700
|
-
*
|
|
31701
|
-
* @see {@link ICellRanges.entries()}
|
|
31775
|
+
* @param size This can be a number of a string with units
|
|
31776
|
+
* @param options {@link ICellHeaderRange.SetSizeOptions}
|
|
31702
31777
|
*/
|
|
31703
|
-
|
|
31778
|
+
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
31704
31779
|
/**
|
|
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.
|
|
31780
|
+
* Hides or show the columns for the given range.
|
|
31710
31781
|
*
|
|
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.
|
|
31782
|
+
* @defaultValue false
|
|
31714
31783
|
*/
|
|
31715
|
-
|
|
31784
|
+
setHidden(hidden?: boolean): this;
|
|
31716
31785
|
/**
|
|
31717
|
-
*
|
|
31786
|
+
* Provides a convenient method for setting values with a range of calls.
|
|
31787
|
+
*
|
|
31788
|
+
* @remarks
|
|
31789
|
+
* If an array is provided then values will be in row-major order and will
|
|
31790
|
+
* repeat if the range is larger than the array
|
|
31718
31791
|
*/
|
|
31719
|
-
|
|
31792
|
+
updateHeaders(values: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
31720
31793
|
/**
|
|
31721
|
-
*
|
|
31794
|
+
* Returns the data ranges for headers that contain information.
|
|
31795
|
+
*
|
|
31796
|
+
* @remarks
|
|
31797
|
+
* * This is NOT the last cell that may have data or has been resized.
|
|
31798
|
+
* * This also has nothing to do with the selection bounds.
|
|
31722
31799
|
*/
|
|
31723
|
-
|
|
31800
|
+
getUsedRange(options?: ICellHeaderRange.GetRangeOptions): this;
|
|
31724
31801
|
/**
|
|
31725
|
-
*
|
|
31802
|
+
* Clear the header format. Specially this will clear the sizes.
|
|
31726
31803
|
*/
|
|
31727
|
-
clear(
|
|
31804
|
+
clear(): this;
|
|
31728
31805
|
/**
|
|
31729
|
-
*
|
|
31806
|
+
* Returns the number of headers included in the range.
|
|
31730
31807
|
*/
|
|
31731
|
-
|
|
31808
|
+
getCount(): number;
|
|
31732
31809
|
/**
|
|
31733
|
-
*
|
|
31810
|
+
* Returns the number of headers.
|
|
31734
31811
|
*/
|
|
31735
|
-
|
|
31812
|
+
getHeaderCount(): number;
|
|
31736
31813
|
/**
|
|
31737
|
-
*
|
|
31814
|
+
* Returns the number of visible headers in the range.
|
|
31738
31815
|
*/
|
|
31739
|
-
|
|
31816
|
+
getVisibleCount(): number;
|
|
31740
31817
|
/**
|
|
31741
|
-
*
|
|
31818
|
+
* Returns true if the range represents all headers.
|
|
31742
31819
|
*/
|
|
31743
|
-
|
|
31820
|
+
isEntireHeaders(): boolean;
|
|
31744
31821
|
/**
|
|
31745
|
-
*
|
|
31822
|
+
* Returns the header orientation.
|
|
31746
31823
|
*/
|
|
31747
|
-
|
|
31824
|
+
getOrientation(): IRange.Orientation;
|
|
31748
31825
|
/**
|
|
31749
|
-
*
|
|
31826
|
+
* Similar to {@link forEach} but only spans that are different.
|
|
31750
31827
|
*
|
|
31751
31828
|
* @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}
|
|
31829
|
+
* * Callbacks can return a 'break' value to stop the visit.
|
|
31763
31830
|
*/
|
|
31764
|
-
|
|
31831
|
+
forEachSpan<T = any>(callback: ICellHeaderRange.ForEachSpanCallback<T>, options?: ICellHeaderRange.IteratorOptions): T | void;
|
|
31765
31832
|
/**
|
|
31766
|
-
*
|
|
31833
|
+
* Visits visible spans.
|
|
31834
|
+
*
|
|
31835
|
+
* @remarks
|
|
31836
|
+
* * If there are no hidden headers this will still be called once.
|
|
31767
31837
|
*/
|
|
31768
|
-
|
|
31838
|
+
forEachVisibleSpan<T = any>(callback: ICellHeaderRange.ForEachVisibleSpanCallback<T>, options?: ICellHeaderRange.ForEachVisibleSpanOptions): T | void;
|
|
31769
31839
|
/**
|
|
31770
|
-
* {@inheritDoc ICellRange.
|
|
31840
|
+
* {@inheritDoc ICellRange.getSnapshot}
|
|
31771
31841
|
*/
|
|
31772
|
-
|
|
31842
|
+
getSnapshot(options?: ICellHeaderRange.CopyOptions): ICellHeaderRange.ISnapshot;
|
|
31773
31843
|
/**
|
|
31774
|
-
*
|
|
31844
|
+
* Perform operation on all ranges.
|
|
31775
31845
|
*
|
|
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
31846
|
* @see
|
|
31780
|
-
* {@link
|
|
31847
|
+
* {@link ICellRange.doBatch}
|
|
31781
31848
|
*/
|
|
31782
|
-
|
|
31849
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
31783
31850
|
/**
|
|
31784
|
-
*
|
|
31851
|
+
* Returns the SheetHeader.
|
|
31785
31852
|
*/
|
|
31786
|
-
|
|
31853
|
+
getSheetHeader<S>(): S;
|
|
31787
31854
|
/**
|
|
31788
31855
|
* {@inheritDoc ICellRange.getA1}
|
|
31789
31856
|
*/
|
|
31790
31857
|
getA1(): string;
|
|
31791
31858
|
/**
|
|
31792
|
-
*
|
|
31793
|
-
*/
|
|
31794
|
-
getCounts(types?: Partial<Record<ICell.Content, number | boolean>>): ICellRange.Counts | null;
|
|
31795
|
-
/**
|
|
31796
|
-
* {@inheritDoc ICellRange.isContentful}
|
|
31859
|
+
* Returns the address as a string.
|
|
31797
31860
|
*/
|
|
31798
|
-
|
|
31861
|
+
toString(): string;
|
|
31799
31862
|
/**
|
|
31800
|
-
*
|
|
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.
|
|
31863
|
+
* For runtime type checking.
|
|
32055
31864
|
*/
|
|
32056
31865
|
readonly isICellHeaderRange: true;
|
|
32057
31866
|
}
|
|
@@ -32063,6 +31872,10 @@ declare module "cellRange/ICellHeaderRange" {
|
|
|
32063
31872
|
* {@link ICellHeaderRange}
|
|
32064
31873
|
*/
|
|
32065
31874
|
export namespace ICellHeaderRange {
|
|
31875
|
+
/**
|
|
31876
|
+
* The coord type for a header range.
|
|
31877
|
+
*/
|
|
31878
|
+
type Coords = RunCoords;
|
|
32066
31879
|
/**
|
|
32067
31880
|
* Specify either a range a run or a string.
|
|
32068
31881
|
* @remarks
|
|
@@ -32200,11 +32013,13 @@ declare module "cellRange/ICellHeaderRange" {
|
|
|
32200
32013
|
relativeSize?: boolean;
|
|
32201
32014
|
/**
|
|
32202
32015
|
* If this is set to `true` then the value will not be an autoSize value.
|
|
32016
|
+
*
|
|
32203
32017
|
* @defaultValue false
|
|
32204
32018
|
*/
|
|
32205
32019
|
autoSize?: boolean;
|
|
32206
32020
|
/**
|
|
32207
32021
|
* If this is set to `true` then any headers that have custom sizes will be ignored.
|
|
32022
|
+
*
|
|
32208
32023
|
* @defaultValue false
|
|
32209
32024
|
*/
|
|
32210
32025
|
skipCustomSize?: boolean;
|
|
@@ -32249,6 +32064,399 @@ declare module "cellRange/ICellHeaderRange" {
|
|
|
32249
32064
|
}
|
|
32250
32065
|
}
|
|
32251
32066
|
}
|
|
32067
|
+
declare module "cellRange/ICellHeaderRanges" {
|
|
32068
|
+
import type { IRange } from '@sheetxl/primitives';
|
|
32069
|
+
import type { RunCoords } from '@sheetxl/utils';
|
|
32070
|
+
import type { ITransaction } from "transaction/index";
|
|
32071
|
+
import type { ICellHeader } from "cell/index";
|
|
32072
|
+
import type { ICellHeaderRange } from "cellRange/ICellHeaderRange";
|
|
32073
|
+
/**
|
|
32074
|
+
* An `ICellHeaderRanges` is a collection of {@link ICellHeaderRange}s.
|
|
32075
|
+
*
|
|
32076
|
+
* Useful when working with a discontinuous set of ranges.
|
|
32077
|
+
*/
|
|
32078
|
+
export interface ICellHeaderRanges {
|
|
32079
|
+
/**
|
|
32080
|
+
* The RunCoords for the range.
|
|
32081
|
+
*/
|
|
32082
|
+
getCoords(): Readonly<ICellHeaderRanges.Coords>;
|
|
32083
|
+
/**
|
|
32084
|
+
* Returns the header range at a location relative to the range.
|
|
32085
|
+
*
|
|
32086
|
+
* @param index
|
|
32087
|
+
*/
|
|
32088
|
+
at(index: number): ICellHeaderRange;
|
|
32089
|
+
/**
|
|
32090
|
+
* Returns the number of headers ranges.
|
|
32091
|
+
*/
|
|
32092
|
+
getCount(): number;
|
|
32093
|
+
/**
|
|
32094
|
+
* {@inheritDoc ICellHeaderRange.setSize}
|
|
32095
|
+
*/
|
|
32096
|
+
setSize(size?: number | string, options?: ICellHeaderRange.SetSizeOptions): this;
|
|
32097
|
+
/**
|
|
32098
|
+
* {@inheritDoc ICellHeaderRange.setHidden}
|
|
32099
|
+
*/
|
|
32100
|
+
setHidden(hidden?: boolean): this;
|
|
32101
|
+
/**
|
|
32102
|
+
* {@inheritDoc ICellHeaderRange.clear}
|
|
32103
|
+
*/
|
|
32104
|
+
clear(): this;
|
|
32105
|
+
/**
|
|
32106
|
+
* Returns the number of headers.
|
|
32107
|
+
*
|
|
32108
|
+
* @remarks
|
|
32109
|
+
* This will remove overlaps.
|
|
32110
|
+
*/
|
|
32111
|
+
getHeaderCount(): number;
|
|
32112
|
+
/**
|
|
32113
|
+
* {@inheritDoc ICellHeaderRange.getVisibleCount}
|
|
32114
|
+
*/
|
|
32115
|
+
getVisibleCount(): number;
|
|
32116
|
+
/**
|
|
32117
|
+
* Returns true if all of the ranges cover the entire headers.
|
|
32118
|
+
*/
|
|
32119
|
+
isEntireHeaders(): boolean;
|
|
32120
|
+
/**
|
|
32121
|
+
* Returns true if any of the ranges cover entire headers.
|
|
32122
|
+
*/
|
|
32123
|
+
isEntireHeadersAny(): boolean;
|
|
32124
|
+
/**
|
|
32125
|
+
* {@inheritDoc ICellHeaderRange.getOrientation}
|
|
32126
|
+
*/
|
|
32127
|
+
getOrientation(): IRange.Orientation;
|
|
32128
|
+
/**
|
|
32129
|
+
* {@inheritDoc ICellHeaderRange.updateHeaders}
|
|
32130
|
+
*/
|
|
32131
|
+
updateHeaders(values: ICellHeader.Update, options?: ICellHeaderRange.UpdateHeadersOptions): this;
|
|
32132
|
+
/**
|
|
32133
|
+
* {@inheritDoc ICellHeaderRange.doBatch}
|
|
32134
|
+
*/
|
|
32135
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ICellHeaderRange.UpdateHeadersOptions): R | Promise<R>;
|
|
32136
|
+
/**
|
|
32137
|
+
* {@inheritDoc ICellHeaderRange.getSheetHeader}
|
|
32138
|
+
*/
|
|
32139
|
+
getSheetHeader<S>(): S;
|
|
32140
|
+
/**
|
|
32141
|
+
* {@inheritDoc ICellHeaderRange.getA1}
|
|
32142
|
+
*/
|
|
32143
|
+
getA1(): string;
|
|
32144
|
+
/**
|
|
32145
|
+
* {@inheritDoc ICellHeaderRange.toString}
|
|
32146
|
+
*/
|
|
32147
|
+
toString(): string;
|
|
32148
|
+
/**
|
|
32149
|
+
* For runtime type checking.
|
|
32150
|
+
*/
|
|
32151
|
+
readonly isICellHeaderRanges: true;
|
|
32152
|
+
}
|
|
32153
|
+
/**
|
|
32154
|
+
* {@inheritDoc ICellHeaderRanges}
|
|
32155
|
+
* @see
|
|
32156
|
+
* ### **Interface**
|
|
32157
|
+
*
|
|
32158
|
+
* {@link ICellHeaderRanges}
|
|
32159
|
+
*/
|
|
32160
|
+
export namespace ICellHeaderRanges {
|
|
32161
|
+
/**
|
|
32162
|
+
* The coord type for a header ranges.
|
|
32163
|
+
*/
|
|
32164
|
+
type Coords = RunCoords[];
|
|
32165
|
+
/**
|
|
32166
|
+
* Address for multiple {@link ICellHeaderRange}s.
|
|
32167
|
+
*/
|
|
32168
|
+
type Address = ICellHeaderRanges | string | ICellHeaderRange.Address | readonly ICellHeaderRange.Address[];
|
|
32169
|
+
/**
|
|
32170
|
+
* Shorthand for persisting.
|
|
32171
|
+
*/
|
|
32172
|
+
type RefJSON = RunCoords[] | RunCoords | string;
|
|
32173
|
+
}
|
|
32174
|
+
}
|
|
32175
|
+
declare module "cellRange/ICellRanges" {
|
|
32176
|
+
import type { Scalar, IRange } from '@sheetxl/primitives';
|
|
32177
|
+
import type { IListener } from "listener/index";
|
|
32178
|
+
import type { ITransaction } from "transaction/index";
|
|
32179
|
+
import type { IStyle } from "style/index";
|
|
32180
|
+
import type { ICell } from "cell/index";
|
|
32181
|
+
import type { ISheet } from "sheet/index";
|
|
32182
|
+
import type { ICellRange } from "cellRange/ICellRange";
|
|
32183
|
+
import type { ICellHeaderRange } from "cellRange/ICellHeaderRange";
|
|
32184
|
+
import type { ICellHeaderRanges } from "cellRange/ICellHeaderRanges";
|
|
32185
|
+
/**
|
|
32186
|
+
* An `ICellRanges` is a collection of {@link ICellRange}s.
|
|
32187
|
+
*
|
|
32188
|
+
* Useful when working with a discontinuous set of ranges.
|
|
32189
|
+
*/
|
|
32190
|
+
export interface ICellRanges {
|
|
32191
|
+
/**
|
|
32192
|
+
* {@inheritDoc ICellRange.getMerges}
|
|
32193
|
+
*/
|
|
32194
|
+
getMerges(): IRange.Coords[];
|
|
32195
|
+
/**
|
|
32196
|
+
* {@inheritDoc ICellRange.getSheet}
|
|
32197
|
+
*/
|
|
32198
|
+
getSheet(): ISheet;
|
|
32199
|
+
/**
|
|
32200
|
+
* Returns the style for the range.
|
|
32201
|
+
*
|
|
32202
|
+
* @remarks
|
|
32203
|
+
* When querying the style the values will always be for the top left. However the
|
|
32204
|
+
* set values work for the entire range.
|
|
32205
|
+
*/
|
|
32206
|
+
getStyle(): IStyle;
|
|
32207
|
+
/**
|
|
32208
|
+
* {@inheritDoc ICellRange.find}
|
|
32209
|
+
*/
|
|
32210
|
+
find(options: string | ICellRange.FindOptions): Iterator<ICell>;
|
|
32211
|
+
/**
|
|
32212
|
+
* Iterates over the values, yielding each values in the collection.
|
|
32213
|
+
*
|
|
32214
|
+
* @remarks
|
|
32215
|
+
* This does not iterate over the ranges but rather the individual cells within the ranges.
|
|
32216
|
+
* @see {@link ICellRanges.entries()}
|
|
32217
|
+
*/
|
|
32218
|
+
[Symbol.iterator](): IterableIterator<Scalar>;
|
|
32219
|
+
/**
|
|
32220
|
+
* Returns an iterator that allows you to iterate over the individual cells within the ranges,
|
|
32221
|
+
* yielding pairs of `IteratorContext` and a `Value`.
|
|
32222
|
+
*
|
|
32223
|
+
* @param options Configuration options for the iterator, such as filtering or sorting.
|
|
32224
|
+
* @returns An iterator that yields `[ICell.IteratorContext, Value]` tuples for each value within the range.
|
|
32225
|
+
*
|
|
32226
|
+
* @remarks
|
|
32227
|
+
* If the ranges overlap this will return the same value multiple times. If each cell
|
|
32228
|
+
* should only be visited once, use {@link ICellRanges.getFlattened} to remove overlaps.
|
|
32229
|
+
*/
|
|
32230
|
+
entries(options?: ICellRange.IteratorOptions): IterableIterator<ICellRange.Entry>;
|
|
32231
|
+
/**
|
|
32232
|
+
* {@inheritDoc ICellRange.autoFit}
|
|
32233
|
+
*/
|
|
32234
|
+
autoFit(options?: ICellRange.AutoFitOptions): this;
|
|
32235
|
+
/**
|
|
32236
|
+
* {@inheritDoc ICellRange.calculate}
|
|
32237
|
+
*/
|
|
32238
|
+
calculate(fullRecalc?: boolean): this;
|
|
32239
|
+
/**
|
|
32240
|
+
* {@inheritDoc ICellRange.clear}
|
|
32241
|
+
*/
|
|
32242
|
+
clear(applyTo?: ICell.Content, options?: ITransaction.OperationOptions): this;
|
|
32243
|
+
/**
|
|
32244
|
+
* {@inheritDoc ICellRange.merge}
|
|
32245
|
+
*/
|
|
32246
|
+
merge(options?: IRange.Orientations | ICellRange.MergeOptions): this;
|
|
32247
|
+
/**
|
|
32248
|
+
* {@inheritDoc ICellRange.unmerge}
|
|
32249
|
+
*/
|
|
32250
|
+
unmerge(options?: ITransaction.OperationOptions): this;
|
|
32251
|
+
/**
|
|
32252
|
+
* {@inheritDoc ICellRange.insert}
|
|
32253
|
+
*/
|
|
32254
|
+
insert(options?: IRange.Orientation | ICellRange.InsertOptions): this;
|
|
32255
|
+
/**
|
|
32256
|
+
* {@inheritDoc ICellRange.delete}
|
|
32257
|
+
*/
|
|
32258
|
+
delete(options?: IRange.Orientation | ICellRange.DeleteOptions): this;
|
|
32259
|
+
/**
|
|
32260
|
+
* {@inheritDoc ICellRange.insertFrom}
|
|
32261
|
+
*/
|
|
32262
|
+
insertFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): Promise<this | null>;
|
|
32263
|
+
/**
|
|
32264
|
+
* Returns a `ICellRange.ISnapshot` for all of the ranges.
|
|
32265
|
+
*
|
|
32266
|
+
* @remarks
|
|
32267
|
+
* * This will fail if the ranges are not 'aligned'.
|
|
32268
|
+
* @see
|
|
32269
|
+
* {@link ICellRange.getSnapshot}
|
|
32270
|
+
*/
|
|
32271
|
+
getSnapshot(options?: ICellRange.CopyOptions): ICellRange.ISnapshot;
|
|
32272
|
+
/**
|
|
32273
|
+
* {@inheritDoc ICellRange.copyFrom}
|
|
32274
|
+
*/
|
|
32275
|
+
copyFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): Promise<this | null>;
|
|
32276
|
+
/**
|
|
32277
|
+
* {@inheritDoc ICellRange.getEntireRows}
|
|
32278
|
+
*/
|
|
32279
|
+
getEntireRows(shiftColumns?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
32280
|
+
/**
|
|
32281
|
+
* {@inheritDoc ICellRange.getEntireColumns}
|
|
32282
|
+
*/
|
|
32283
|
+
getEntireColumns(shiftRows?: boolean, options?: ICellRange.GetRangeOptions): this;
|
|
32284
|
+
/**
|
|
32285
|
+
* {@inheritDoc ICellRange.getRowHeaders}
|
|
32286
|
+
*/
|
|
32287
|
+
getRowHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
32288
|
+
/**
|
|
32289
|
+
* {@inheritDoc ICellRange.getColumnHeaders}
|
|
32290
|
+
*/
|
|
32291
|
+
getColumnHeaders(options?: ICellHeaderRange.GetRangeOptions): ICellHeaderRanges;
|
|
32292
|
+
/**
|
|
32293
|
+
* {@inheritDoc ICellRange.getDefaultShiftOrientation}
|
|
32294
|
+
*/
|
|
32295
|
+
getDefaultShiftOrientation(): IRange.Orientation;
|
|
32296
|
+
/**
|
|
32297
|
+
* Returns a set of ranges with overlaps removed and attempts to merge adjacent ranges into larger ranges.
|
|
32298
|
+
*
|
|
32299
|
+
* @remarks
|
|
32300
|
+
* By default, ranges will also be merged into larger ranges where possible, but this behavior can be customized using the `mergeOrientation` parameter.
|
|
32301
|
+
* This method will not modify the original ranges.
|
|
32302
|
+
* @see
|
|
32303
|
+
* {@link isOverlapping}
|
|
32304
|
+
*/
|
|
32305
|
+
getFlattened(options?: ICellRange.GetFlattenOptions): this;
|
|
32306
|
+
/**
|
|
32307
|
+
* {@inheritDoc ICellRange.getVisible}
|
|
32308
|
+
*/
|
|
32309
|
+
getVisible(options?: ICellRange.GetVisibleOptions): this | null;
|
|
32310
|
+
/**
|
|
32311
|
+
* {@inheritDoc ICellRange.getA1}
|
|
32312
|
+
*/
|
|
32313
|
+
getA1(): string;
|
|
32314
|
+
/**
|
|
32315
|
+
* {@inheritDoc ICellRange.getCounts}
|
|
32316
|
+
*/
|
|
32317
|
+
getCounts(types?: Partial<Record<ICell.Content, number | boolean>>): ICellRange.Counts | null;
|
|
32318
|
+
/**
|
|
32319
|
+
* {@inheritDoc ICellRange.isContentful}
|
|
32320
|
+
*/
|
|
32321
|
+
isContentful(types?: ICell.Content | ICell.Content[]): boolean;
|
|
32322
|
+
/**
|
|
32323
|
+
* Returns the count for all rows in the ranges. This will ensure rows that are included in multiples ranges are
|
|
32324
|
+
* not double counted.
|
|
32325
|
+
*/
|
|
32326
|
+
getRowCount(): number;
|
|
32327
|
+
/**
|
|
32328
|
+
* Returns the count for all columns in the ranges. This will ensure columns that are included in multiples ranges are
|
|
32329
|
+
* not double counted.
|
|
32330
|
+
*/
|
|
32331
|
+
getColumnCount(): number;
|
|
32332
|
+
/**
|
|
32333
|
+
* {@inheritDoc ICellRange.isReadOnly}
|
|
32334
|
+
*/
|
|
32335
|
+
isReadOnly(): boolean;
|
|
32336
|
+
/**
|
|
32337
|
+
* Returns a flag indicating if any of the ranges are overlapping.
|
|
32338
|
+
*
|
|
32339
|
+
* @remarks
|
|
32340
|
+
* To get a range with no overlaps {@link ICellRanges.getFlattened} can be used.
|
|
32341
|
+
*/
|
|
32342
|
+
isOverlapping(): boolean;
|
|
32343
|
+
/**
|
|
32344
|
+
* Returns `true` if all of the the ranges have selected all of the rows.
|
|
32345
|
+
*
|
|
32346
|
+
* @remarks
|
|
32347
|
+
* This is different from `isEntireRowsAny` in that it will return `true` if 'ALL' of the
|
|
32348
|
+
* ranges have isEntireRows `true`.
|
|
32349
|
+
*/
|
|
32350
|
+
isEntireRows(): boolean;
|
|
32351
|
+
/**
|
|
32352
|
+
* Returns `true` if any of the ranges have selected all of the rows.
|
|
32353
|
+
*
|
|
32354
|
+
* @remarks
|
|
32355
|
+
* This is different from `isEntireRows` in that it it will return true if 'ANY' of the
|
|
32356
|
+
* ranges have isEntireRows `true`.
|
|
32357
|
+
*/
|
|
32358
|
+
isEntireRowsAny(): boolean;
|
|
32359
|
+
/**
|
|
32360
|
+
* Returns `true` if all of the the ranges have selected all of the columns.
|
|
32361
|
+
*
|
|
32362
|
+
* @remarks
|
|
32363
|
+
* This is different from `isEntireColumnsAny` in that it will return `true` if 'ALL' of the
|
|
32364
|
+
* ranges have isEntireColumns `true`.
|
|
32365
|
+
*/
|
|
32366
|
+
isEntireColumns(): boolean;
|
|
32367
|
+
/**
|
|
32368
|
+
* Returns `true` if any of the ranges have selected all of the columns.
|
|
32369
|
+
*
|
|
32370
|
+
* @remarks
|
|
32371
|
+
* This is different from `isEntireColumns` in that it will return `true` if 'ANY' of the
|
|
32372
|
+
* ranges have isEntireColumns `true`.
|
|
32373
|
+
*/
|
|
32374
|
+
isEntireColumnsAny(): boolean;
|
|
32375
|
+
/**
|
|
32376
|
+
* Returns `true` if any of the ranges are invalid.
|
|
32377
|
+
*/
|
|
32378
|
+
isInvalidAny(): boolean;
|
|
32379
|
+
/**
|
|
32380
|
+
* Returns a ranges with coordinates adjusted to be fixed (absolute) or flexible (relative).
|
|
32381
|
+
*
|
|
32382
|
+
* @see
|
|
32383
|
+
* {@link ICellRange.getFixed}
|
|
32384
|
+
*/
|
|
32385
|
+
getFixed(options: ICellRange.GetFixedOptions | boolean): this;
|
|
32386
|
+
/**
|
|
32387
|
+
* Returns the total number of contiguous ranges in this collection.
|
|
32388
|
+
*/
|
|
32389
|
+
getCount(): number;
|
|
32390
|
+
/**
|
|
32391
|
+
* Returns the range at a specific index.
|
|
32392
|
+
*
|
|
32393
|
+
* @param index
|
|
32394
|
+
*/
|
|
32395
|
+
at(index: number): ICellRange;
|
|
32396
|
+
/**
|
|
32397
|
+
* {@inheritDoc ICellRange.doBatch}
|
|
32398
|
+
*/
|
|
32399
|
+
doBatch<R>(callback: (commit: ITransaction.ICommit) => R | Promise<R>, options?: string | ITransaction.OperationOptions): R | Promise<R>;
|
|
32400
|
+
/**
|
|
32401
|
+
* The RangeCoords.
|
|
32402
|
+
*/
|
|
32403
|
+
getCoords(): readonly Readonly<IRange.FixableCoords>[];
|
|
32404
|
+
/**
|
|
32405
|
+
* Returns true if the range is invalid.
|
|
32406
|
+
* This can occur if a range is removed or created with invalid coordinates.
|
|
32407
|
+
*/
|
|
32408
|
+
isInvalid(): boolean;
|
|
32409
|
+
/**
|
|
32410
|
+
* Returns the address as a string.
|
|
32411
|
+
*/
|
|
32412
|
+
toString(): string;
|
|
32413
|
+
/**
|
|
32414
|
+
* {@inheritDoc ICellRange.select}
|
|
32415
|
+
*/
|
|
32416
|
+
select(options?: ICellRange.SelectOptions): Promise<this>;
|
|
32417
|
+
/**
|
|
32418
|
+
* {@inheritDoc ICellRange.addListener}
|
|
32419
|
+
*/
|
|
32420
|
+
addListener(listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
32421
|
+
/**
|
|
32422
|
+
* Returns an iterator that allows you to iterate over the individual values within the range.
|
|
32423
|
+
*
|
|
32424
|
+
* @param options Configuration options for the iterator, such as filtering or sorting.
|
|
32425
|
+
* @returns An iterator that yields `Scalar` value, each representing a single cell within the range.
|
|
32426
|
+
*/
|
|
32427
|
+
[Symbol.iterator](options?: ICellRange.IteratorOptions<any>): Iterator<Scalar>;
|
|
32428
|
+
/**
|
|
32429
|
+
* For runtime type checking.
|
|
32430
|
+
*/
|
|
32431
|
+
readonly isICellRanges: true;
|
|
32432
|
+
}
|
|
32433
|
+
/**
|
|
32434
|
+
* {@inheritDoc ICellRanges}
|
|
32435
|
+
* @see
|
|
32436
|
+
* ### **Interface**
|
|
32437
|
+
*
|
|
32438
|
+
* {@link ICellRanges}
|
|
32439
|
+
*/
|
|
32440
|
+
export namespace ICellRanges {
|
|
32441
|
+
/**
|
|
32442
|
+
* The coord type for a ranges.
|
|
32443
|
+
*/
|
|
32444
|
+
type Coords = IRange.Coords[];
|
|
32445
|
+
/**
|
|
32446
|
+
* Address for multiple {@link ICellRange}s.
|
|
32447
|
+
*/
|
|
32448
|
+
type Address = ICellRanges | string | ICellRange.Address | readonly ICellRange.Address[];
|
|
32449
|
+
/**
|
|
32450
|
+
* Options when visiting a ICellRanges.
|
|
32451
|
+
*/
|
|
32452
|
+
interface IteratorOptions<T = ICellRanges.Address> extends ICellRange.IteratorOptions<T> {
|
|
32453
|
+
}
|
|
32454
|
+
/**
|
|
32455
|
+
* Shorthand for persisting.
|
|
32456
|
+
*/
|
|
32457
|
+
type RefJSON = IRange.Coords[] | IRange.Coords | string;
|
|
32458
|
+
}
|
|
32459
|
+
}
|
|
32252
32460
|
declare module "cellRange/ICellRange" {
|
|
32253
32461
|
import { type Scalar, type JSScalar, type JSScalarUpdate, IRange } from '@sheetxl/primitives';
|
|
32254
32462
|
import type { Bounds, ReferenceableClipboard } from '@sheetxl/utils';
|
|
@@ -33860,6 +34068,7 @@ declare module "cellRange/index" {
|
|
|
33860
34068
|
export * from "cellRange/ICellRange";
|
|
33861
34069
|
export * from "cellRange/ICellRanges";
|
|
33862
34070
|
export * from "cellRange/ICellHeaderRange";
|
|
34071
|
+
export * from "cellRange/ICellHeaderRanges";
|
|
33863
34072
|
}
|
|
33864
34073
|
declare module "anchored/IAnchored" {
|
|
33865
34074
|
import type { IRange } from '@sheetxl/primitives';
|