@mescius/spread-sheets 17.0.9 → 17.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -343,6 +343,14 @@ declare module GC{
343
343
  }
344
344
 
345
345
 
346
+ /**
347
+ * @typedef GC.Data.ColumnType - The column type
348
+ * @type {"Number"|"Text"|"Formula"|"Checkbox"|"Date"|"Currency"|"Percent"|"Phone"|"Email"|"URL"|"Lookup"|"CreatedTime"|"ModifiedTime"|"Attachment"|"Select"|"Barcode"}
349
+ */
350
+ export type ColumnType =
351
+ "Number"|"Text"|"Formula"|"Checkbox"|"Date"|"Currency"|"Percent"|"Phone"|"Email"|"URL"|"Lookup"|"CreatedTime"|"ModifiedTime"|"Attachment"|"Select"|"Barcode"
352
+
353
+
346
354
  /**
347
355
  * @typedef GC.Data.ComboBoxOptions
348
356
  * @property {string} type - The type of the cell type, supports "combobox".
@@ -728,6 +736,66 @@ declare module GC{
728
736
  "stop" | "warning" | "information"
729
737
 
730
738
 
739
+ /**
740
+ * @typedef GC.Data.FileUploadOptions
741
+ * @property {string} type - The type of the cell type, supports "fileUpload".
742
+ * @property {number} maxSize -The maximum file size that can be uploaded.
743
+ * @property {string} accept - The file types that can be uploaded.
744
+ * @property {boolean} isPreviewEnabled - Whether to display the file preview button.
745
+ * @property {boolean} isDownloadEnabled - Whether to display the file download button.
746
+ * @property {boolean} isClearEnabled - Whether to display the file clear button.
747
+ * @property {number} marginTop - The margin top value.
748
+ * @property {number} marginRight - The margin right value.
749
+ * @property {number} marginBottom - The margin bottom value.
750
+ * @property {number} marginLeft - The margin left value.
751
+ * @property {string} valuePath - The valuePath is used to get the cell value from File.
752
+ */
753
+ export type FileUploadOptions =
754
+ {
755
+ /**
756
+ * The type of the cell type, supports "fileUpload".
757
+ */
758
+ type: "fileUpload";
759
+ maxSize?: number;
760
+ /**
761
+ * The file types that can be uploaded.
762
+ */
763
+ accept?: string;
764
+ /**
765
+ * Whether to display the file preview button.
766
+ */
767
+ isPreviewEnabled?: boolean;
768
+ /**
769
+ * Whether to display the file download button.
770
+ */
771
+ isDownloadEnabled?: boolean;
772
+ /**
773
+ * Whether to display the file clear button.
774
+ */
775
+ isClearEnabled?: boolean;
776
+ /**
777
+ * The margin top value.
778
+ */
779
+ marginTop?: number;
780
+ /**
781
+ * The margin right value.
782
+ */
783
+ marginRight?: number;
784
+ /**
785
+ * The margin bottom value.
786
+ */
787
+ marginBottom?: number;
788
+ /**
789
+ * The margin left value.
790
+ */
791
+ marginLeft?: number;
792
+ /**
793
+ * The valuePath is used to get the cell value from File.
794
+ */
795
+ valuePath?: string;
796
+ }
797
+
798
+
731
799
  /**
732
800
  * @typedef GC.Data.FormulaListValidatorOptions
733
801
  * @property {"formulaList"} type - The data validator type.
@@ -1230,6 +1298,7 @@ declare module GC{
1230
1298
  * @typedef GC.Data.IColumn - The column options.
1231
1299
  * @property {string} name - The unique name of the column.
1232
1300
  * @property {string} value - The value of the column, could be a field name of table from database, or formula which uses the fields names.
1301
+ * @property {string} type - The column type, any of "Number", "Text", "Formula", "Checkbox", "Date", "Currency", "Percent", "Phone", "Email", "URL", "Lookup", "CreatedTime", "ModifiedTime", "Attachment", "Select", "Barcode"
1233
1302
  * @property {string | string[]} caption - The caption of the column.
1234
1303
  * @property {number | string} width - The width of the column, support number in pixel, or star size.
1235
1304
  * @property {GC.Data.StyleOptions} style - The style of the column.
@@ -1266,6 +1335,10 @@ declare module GC{
1266
1335
  * The value of the column, could be a field name of table from database, or formula which uses the fields names.
1267
1336
  */
1268
1337
  value?: string;
1338
+ /**
1339
+ * The column type, any of "Number", "Text", "Formula", "Checkbox", "Date", "Currency", "Percent", "Phone", "Email", "URL", "Lookup", "CreatedTime", "ModifiedTime", "Attachment", "Select", "Barcode"
1340
+ */
1341
+ type?: string;
1269
1342
  /**
1270
1343
  * The caption of the column.
1271
1344
  */
@@ -1851,6 +1924,10 @@ declare module GC{
1851
1924
  * @property {GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler} update - The options for update operation.
1852
1925
  * @property {GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler} delete - The options for delete operation.
1853
1926
  * @property {GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler} batch - The options for batch operation.
1927
+ * @property {GC.Data.IRemoteReadRequestOption | GC.Data.RemoteReadHandler} getColumns - The options for getting columns operation.
1928
+ * @property {GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler} addColumn - The options for adding column operation.
1929
+ * @property {GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler} updateColumn - The options for updating column operation.
1930
+ * @property {GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler} removeColumn - The options for deleting column operation.
1854
1931
  */
1855
1932
  export type IRemoteTransportOption =
1856
1933
  {
@@ -1874,6 +1951,22 @@ declare module GC{
1874
1951
  * The options for batch operation.
1875
1952
  */
1876
1953
  batch?: GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler;
1954
+ /**
1955
+ * The options for getting columns operation.
1956
+ */
1957
+ getColumns?: GC.Data.IRemoteReadRequestOption | GC.Data.RemoteReadHandler;
1958
+ /**
1959
+ * The options for adding column operation.
1960
+ */
1961
+ addColumn?: GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler;
1962
+ /**
1963
+ * The options for updating column operation.
1964
+ */
1965
+ updateColumn?: GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler;
1966
+ /**
1967
+ * The options for deleting column operation.
1968
+ */
1969
+ removeColumn?: GC.Data.IRemoteRequestOption | GC.Data.RemoteChangeHandler;
1877
1970
  }
1878
1971
 
1879
1972
 
@@ -2169,6 +2262,34 @@ declare module GC{
2169
2262
  }
2170
2263
 
2171
2264
 
2265
+ /**
2266
+ * @typedef GC.Data.MaskType
2267
+ * @property {string} pattern - The mask pattern.
2268
+ * @property {string} placeholder - The mask placeholder.
2269
+ * @property {boolean} excludeLiteral - The mask exclude literal.
2270
+ * @property {boolean} excludePlaceholder - The mask exclude placeholder.
2271
+ */
2272
+ export type MaskType =
2273
+ {
2274
+ /**
2275
+ * The mask pattern.
2276
+ */
2277
+ pattern: string;
2278
+ /**
2279
+ * The mask placeholder.
2280
+ */
2281
+ placeholder?: string;
2282
+ /**
2283
+ * The mask exclude literal.
2284
+ */
2285
+ excludeLiteral?: boolean;
2286
+ /**
2287
+ * The mask exclude placeholder.
2288
+ */
2289
+ excludePlaceholder?: boolean;
2290
+ }
2291
+
2292
+
2172
2293
  /**
2173
2294
  * @typedef GC.Data.MonthPickerOptions
2174
2295
  * @property {number} startYear - The month picker's start year, default value is ten year ago.
@@ -2560,7 +2681,7 @@ declare module GC{
2560
2681
  * @property {boolean} wordWrap - Whether words wrap within the cell or cells.
2561
2682
  * @property {boolean} shrinkToFit - Whether content shrinks to fit the cell or cells.
2562
2683
  * @property {string} backgroundImage - The background image to display.
2563
- * @property {GC.Data.CheckboxOptions | GC.Data.ComboBoxOptions | GC.Data.HyperlinkOptions | GC.Data.RadioButtonCheckboxListOptions} cellType - The cell type.
2684
+ * @property {GC.Data.CheckboxOptions | GC.Data.ComboBoxOptions | GC.Data.HyperlinkOptions | GC.Data.FileUploadOptions | GC.Data.RadioButtonCheckboxListOptions} cellType - The cell type.
2564
2685
  * @property {string} backgroundImageLayout - The layout for the background image, which supports "stretch", "center", "zoom", "none".
2565
2686
  * @property {boolean} tabStop - Whether the user can set focus to the cell using the Tab key.
2566
2687
  * @property {GC.Data.TextDecoration} textDecoration - The decoration added to text.
@@ -2576,6 +2697,7 @@ declare module GC{
2576
2697
  * @property {GC.Data.CellButtonOptions[]} cellButtons - The cell buttons.
2577
2698
  * @property {GC.Data.DropDownOptions[]} dropDowns - The drop downs.
2578
2699
  * @property {GC.Data.Decoration} decoration - The decoration.
2700
+ * @property {GC.Data.MaskType} mask - The mask.
2579
2701
  */
2580
2702
  export type StyleOptions =
2581
2703
  {
@@ -2654,7 +2776,7 @@ declare module GC{
2654
2776
  /**
2655
2777
  * The cell type.
2656
2778
  */
2657
- cellType?: GC.Data.CheckboxOptions | GC.Data.ComboBoxOptions | GC.Data.HyperlinkOptions | GC.Data.RadioButtonCheckboxListOptions;
2779
+ cellType?: GC.Data.CheckboxOptions | GC.Data.ComboBoxOptions | GC.Data.HyperlinkOptions | GC.Data.FileUploadOptions | GC.Data.RadioButtonCheckboxListOptions;
2658
2780
  /**
2659
2781
  * The layout for the background image, which supports "stretch", "center", "zoom", "none".
2660
2782
  */
@@ -2715,6 +2837,10 @@ declare module GC{
2715
2837
  * The decoration.
2716
2838
  */
2717
2839
  decoration?: GC.Data.Decoration;
2840
+ /**
2841
+ * The mask.
2842
+ */
2843
+ mask?: GC.Data.MaskType;
2718
2844
  }
2719
2845
 
2720
2846
 
@@ -6677,6 +6803,75 @@ declare module GC{
6677
6803
  }
6678
6804
 
6679
6805
 
6806
+ export class CustomPivotTableThemeManager extends GC.Spread.Sheets.CustomThemeManagerBase{
6807
+ /**
6808
+ * Represents a custom pivot table theme manager that can manage all custom pivot table themes.
6809
+ * @class
6810
+ * @param {GC.Spread.Sheets.Workbook} workbook The workbook.
6811
+ * @extends GC.Spread.Sheets.CustomThemeManagerBase
6812
+ */
6813
+ constructor(workbook: GC.Spread.Sheets.Workbook);
6814
+ /**
6815
+ * add a new pivot table theme.
6816
+ * @param {string | GC.Spread.Pivot.PivotTableTheme} theme the new pivot table theme or just a new pivot table theme name you want to add
6817
+ * @returns {GC.Spread.Pivot.PivotTableTheme | undefined} return the newly added pivot table theme, if the named pivot table theme is existed, failed to add pivot table theme and return undefined
6818
+ * @example
6819
+ * ```
6820
+ * // add a new pivot table theme named "custom0"
6821
+ * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
6822
+ * let pivotTableStyle = spread.customPivotTableThemes.add("custom0");
6823
+ * let wholeTableStyle = new GC.Spread.Pivot.PivotTableStyle();
6824
+ * wholeTableStyle.backColor = "#0C66E4";
6825
+ * tableStyle.wholeTableStyle(wholeTableStyle);
6826
+ * ```
6827
+ */
6828
+ add(theme: string | GC.Spread.Pivot.PivotTableTheme): GC.Spread.Pivot.PivotTableTheme | undefined;
6829
+ /**
6830
+ * get the pivot table themes collection.
6831
+ * @returns Array<GC.Spread.Pivot.PivotTableTheme>
6832
+ * @example
6833
+ * ```
6834
+ * // get all pivot table themes
6835
+ * let tableStylesCollection = spread.customPivotTableThemes.all();
6836
+ * ```
6837
+ */
6838
+ all(): Array<GC.Spread.Pivot.PivotTableTheme>;
6839
+ /**
6840
+ * get the pivot table theme by name.
6841
+ * @param {string} name the specific name of the pivot table theme to get
6842
+ * @returns {GC.Spread.Pivot.PivotTableTheme | undefined} If the corresponding pivot table theme with the spefic name is found, return the theme; otherwise, return undefined.
6843
+ * @example
6844
+ * ```
6845
+ * // get pivot table theme
6846
+ * pivotTableStyle = spread.customPivotTableThemes.get("custom0");
6847
+ * ```
6848
+ */
6849
+ get(name: string): GC.Spread.Pivot.PivotTableTheme | undefined;
6850
+ /**
6851
+ * remove the pivot table theme by name.
6852
+ * @param {string} name the specific name of the pivot table theme to remove
6853
+ * @returns {void}
6854
+ * @example
6855
+ * ```
6856
+ * // delete pivot table theme
6857
+ * spread.customPivotTableThemes.remove("custom0");
6858
+ * ```
6859
+ */
6860
+ remove(name: string): void;
6861
+ /**
6862
+ * update the pivot table theme.
6863
+ * @param {string} oldThemeName the specific name of the pivot table theme to update
6864
+ * @param {GC.Spread.Pivot.PivotTableTheme} newTheme the specific name of the pivot table theme to update
6865
+ * @returns {void}
6866
+ * @example
6867
+ * ```
6868
+ * // update pivot table theme
6869
+ * tableStyle = spread.customPivotTableThemes.update("custom0", new GC.Spread.Pivot.PivotTableTheme());
6870
+ * ```
6871
+ */
6872
+ update(oldThemeName: string, newTheme: GC.Spread.Pivot.PivotTableTheme): void;
6873
+ }
6874
+
6680
6875
  export class PivotPanel{
6681
6876
  /**
6682
6877
  * Represents the pivot panel of pivot table.
@@ -6782,9 +6977,9 @@ declare module GC{
6782
6977
  * @param {number} row Indicates the pivot table start row.
6783
6978
  * @param {number} col Indicates the pivot table start column.
6784
6979
  * @param {GC.Spread.Pivot.PivotTableLayoutType} layout Indicates the pivot table layout type.
6785
- * @param {GC.Spread.Pivot.PivotTableTheme} style Indicates the pivot table theme style.
6980
+ * @param {string | GC.Spread.Pivot.PivotTableTheme} style Indicates the pivot table theme style or style name.
6786
6981
  */
6787
- constructor(name: string, sheet?: GC.Spread.Sheets.Worksheet, row?: number, col?: number, layout?: GC.Spread.Pivot.PivotTableLayoutType, style?: GC.Spread.Pivot.PivotTableTheme, options?: GC.Spread.Pivot.IPivotTableOption, layoutModel?: any);
6982
+ constructor(name: string, sheet?: GC.Spread.Sheets.Worksheet, row?: number, col?: number, layout?: GC.Spread.Pivot.PivotTableLayoutType, style?: string | GC.Spread.Pivot.PivotTableTheme, options?: GC.Spread.Pivot.IPivotTableOption, layoutModel?: any);
6788
6983
  /**
6789
6984
  * Indicates the options of the PivotTable.
6790
6985
  * @type {Object}
@@ -7427,6 +7622,11 @@ declare module GC{
7427
7622
  * ```
7428
7623
  */
7429
7624
  getStyle(pivotArea: GC.Spread.Pivot.IPivotArea): GC.Spread.Sheets.Style;
7625
+ /**
7626
+ * Gets or sets a style name for the pivot table.
7627
+ * @returns {string} returns the pivot table style name.
7628
+ */
7629
+ getThemeName(): string | undefined;
7430
7630
  /**
7431
7631
  * @description Group the items of field
7432
7632
  * @param {GC.Spread.Pivot.ITextGroupInfo | GC.Spread.Pivot.INumberGroupInfo | GC.Spread.Pivot.IDateGroupsInfo} groupInfo Indicates the grouped info.
@@ -8497,6 +8697,11 @@ declare module GC{
8497
8697
  * ```
8498
8698
  */
8499
8699
  getConnectedPivotTableNameList(): string[];
8700
+ /**
8701
+ * Gets or sets a style name for the pivot table item slicer.
8702
+ * @returns {string} returns the pivot table item slicer style name.
8703
+ */
8704
+ getStyleName(): string | undefined;
8500
8705
  /**
8501
8706
  * Gets or sets the height of the slicer.
8502
8707
  * @param {number} [value] The height of the slicer. The height property of a slicer specifies the vertical dimension or height of the slicer, determining its size along the y-axis.
@@ -8926,7 +9131,7 @@ declare module GC{
8926
9131
  startRowOffset(value?: number): any;
8927
9132
  /**
8928
9133
  * Gets or sets the style of the slicer.
8929
- * @param {GC.Spread.Sheets.Slicers.SlicerStyle} [value] The style of the slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer, defining its overall look and presentation.
9134
+ * @param {string | GC.Spread.Sheets.Slicers.SlicerStyle} [value] The style or style name of the slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer, defining its overall look and presentation.
8930
9135
  * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.IItemSlicer} If no style is set, returns the style of the slicer; otherwise, returns the slicer.
8931
9136
  * @example
8932
9137
  * ```
@@ -8953,7 +9158,7 @@ declare module GC{
8953
9158
  * console.log(newValue);
8954
9159
  * ```
8955
9160
  */
8956
- style(value?: GC.Spread.Sheets.Slicers.SlicerStyle): any;
9161
+ style(value?: string | GC.Spread.Sheets.Slicers.SlicerStyle): any;
8957
9162
  /**
8958
9163
  * Gets or sets the visuallyNoDataItems of the slicer.
8959
9164
  * @param {boolean} [value] The visuallyNoDataItems of the slicer. The visuallyNoDataItems property of a slicer specifies the visual representation or handling of items with no associated data within the slicer control.
@@ -9290,6 +9495,23 @@ declare module GC{
9290
9495
  * @returns {number | GC.Spread.Pivot.PivotTableTheme} If no value is set, returns the size of the first alternating row; otherwise, returns the pivot table theme.
9291
9496
  */
9292
9497
  firstRowStripSize(value?: number): any;
9498
+ /**
9499
+ * Loads the object state from the specified JSON string.
9500
+ * @param {Object} data The pivot table theme data from deserialization.
9501
+ * @example
9502
+ * ```
9503
+ * //This example uses the fromJSON method.
9504
+ * const light1 = GC.Spread.Pivot.PivotTableThemes.light1;
9505
+ * //export
9506
+ * const jsonStr = JSON.stringify(light1.toJSON());
9507
+ * //import
9508
+ * const newTheme = new GC.Spread.Pivot.PivotTableTheme();
9509
+ * newTheme.fromJSON(JSON.parse(jsonStr));
9510
+ * newTheme.name('custom1');
9511
+ * alert(jsonStr);
9512
+ * ```
9513
+ */
9514
+ fromJSON(data: Object): void;
9293
9515
  /**
9294
9516
  * @description get or set the grandTotalColumnStyle of pivot table theme
9295
9517
  * @param {GC.Spread.Pivot.PivotTableStyle} [value] The default style of the grandTotal column area.
@@ -9404,6 +9626,23 @@ declare module GC{
9404
9626
  * @returns {GC.Spread.Pivot.PivotTableStyle | GC.Spread.Pivot.PivotTableTheme} If no value is set, returns the default style of the data area; otherwise, returns the pivot table theme.
9405
9627
  */
9406
9628
  subtotalRow3Style(value?: GC.Spread.Pivot.PivotTableStyle): any;
9629
+ /**
9630
+ * Saves the object state to a JSON string.
9631
+ * @returns {Object} The pivot table theme data.
9632
+ * @example
9633
+ * ```
9634
+ * //This example uses the toJSON method.
9635
+ * const light1 = GC.Spread.Pivot.PivotTableThemes.light1;
9636
+ * //export
9637
+ * const jsonStr = JSON.stringify(light1.toJSON());
9638
+ * //import
9639
+ * const newTheme = new GC.Spread.Pivot.PivotTableTheme();
9640
+ * newTheme.fromJSON(JSON.parse(jsonStr));
9641
+ * newTheme.name('custom1');
9642
+ * alert(jsonStr);
9643
+ * ```
9644
+ */
9645
+ toJSON(): Object;
9407
9646
  /**
9408
9647
  * @description get or set the wholeTableStyle of pivot table theme
9409
9648
  * @param {GC.Spread.Pivot.PivotTableStyle} [value] The default style of he data area.
@@ -10212,6 +10451,11 @@ declare module GC{
10212
10451
  * ```
10213
10452
  */
10214
10453
  getConnectedPivotTableNameList(): string[];
10454
+ /**
10455
+ * Gets or sets a style name for the pivot table timeline slicer.
10456
+ * @returns {string} returns the pivot table timeline slicer style name.
10457
+ */
10458
+ getStyleName(): string | undefined;
10215
10459
  /**
10216
10460
  * Gets or sets the height of the slicer.
10217
10461
  * @param {number} [value] The height of the slicer. The height property of a timeline slicer specifies the vertical dimension or height of the timeline, determining its size along the y-axis.
@@ -10641,7 +10885,7 @@ declare module GC{
10641
10885
  startRowOffset(value?: number): any;
10642
10886
  /**
10643
10887
  * Gets or sets the style of the slicer.
10644
- * @param {GC.Spread.Sheets.Slicers.TimelineStyle} [value] The style of the slicer. The style property of a timeline slicer specifies the visual appearance and formatting style applied to the timeline, defining its overall look and presentation.
10888
+ * @param {string | GC.Spread.Sheets.Slicers.TimelineStyle} [value] The style or style name of the slicer. The style property of a timeline slicer specifies the visual appearance and formatting style applied to the timeline, defining its overall look and presentation.
10645
10889
  * @returns {GC.Spread.Sheets.Slicers.TimelineStyle | GC.Spread.Pivot.PivotTableTimelineSlicer} If no style is set, returns the style of the slicer; otherwise, returns the slicer.
10646
10890
  * @example
10647
10891
  * ```
@@ -10668,7 +10912,7 @@ declare module GC{
10668
10912
  * console.log(newValue);
10669
10913
  * ```
10670
10914
  */
10671
- style(value?: GC.Spread.Sheets.Slicers.TimelineStyle): any;
10915
+ style(value?: string | GC.Spread.Sheets.Slicers.TimelineStyle): GC.Spread.Sheets.Slicers.TimelineStyle | GC.Spread.Pivot.PivotTableTimelineSlicer;
10672
10916
  /**
10673
10917
  * Gets or sets the width of the slicer.
10674
10918
  * @param {number} [value] The width of the slicer. The width property of a timeline slicer specifies the horizontal dimension or width of the timeline, determining its size along the x-axis.
@@ -10884,6 +11128,26 @@ declare module GC{
10884
11128
  }
10885
11129
 
10886
11130
 
11131
+ export interface IEntityFieldInfo{
11132
+ oldValue: GC.Spread.Report.DataType | GC.Spread.Report.DataType[];
11133
+ state: GC.Spread.Report.FieldState;
11134
+ row: number;
11135
+ col: number;
11136
+ depRowCols?: {
11137
+ row: number;
11138
+ col: number;
11139
+ }[];
11140
+ }
11141
+
11142
+
11143
+ export interface IFailedRecord extends GC.Spread.Report.IRecord{
11144
+ /**
11145
+ * the reason is the DataManager table submitChanges failed records reason.
11146
+ */
11147
+ reason?: string;
11148
+ }
11149
+
11150
+
10887
11151
  export interface IField{
10888
11152
  dbColumnName: string;
10889
11153
  formula: string;
@@ -10932,12 +11196,72 @@ declare module GC{
10932
11196
  }
10933
11197
 
10934
11198
 
11199
+ export interface IRecord{
11200
+ /**
11201
+ * record key-value object.
11202
+ */
11203
+ entity: {
11204
+ [key: string]: DataType;
11205
+ };
11206
+ /**
11207
+ * record property info.
11208
+ */
11209
+ info: {
11210
+ [key: string]: GC.Spread.Report.IEntityFieldInfo
11211
+ };
11212
+ }
11213
+
11214
+
10935
11215
  export interface IReportOptions{
10936
11216
  dirtyStyle?: GC.Spread.Sheets.Style;
10937
11217
  printAllPages?: boolean;
10938
11218
  }
10939
11219
 
10940
11220
 
11221
+ export interface IReportSheetDataChangedEventArgs{
11222
+ sheet: GC.Spread.Report.ReportSheet;
11223
+ sheetName: string;
11224
+ type: "update" | "insert" | "delete";
11225
+ row: number;
11226
+ col: number;
11227
+ }
11228
+
11229
+
11230
+ export interface IReportSheetDataChangingEventArgs{
11231
+ sheet: GC.Spread.Report.ReportSheet;
11232
+ sheetName: string;
11233
+ type: "update" | "insert" | "delete";
11234
+ row: number;
11235
+ col: number;
11236
+ cancel: boolean;
11237
+ oldValue?: any;
11238
+ newValue?: any;
11239
+ }
11240
+
11241
+
11242
+ export interface IReportSheetRecordsSubmittedEventArgs{
11243
+ sheet: GC.Spread.Report.ReportSheet;
11244
+ sheetName: string;
11245
+ /**
11246
+ * include updated and inserted records.
11247
+ */
11248
+ updateSuccessRecords: GC.Spread.Report.IRecord[];
11249
+ updateFailedRecords: GC.Spread.Report.IFailedRecord[];
11250
+ /**
11251
+ * include deleted records.
11252
+ */
11253
+ deleteSuccessRecords: GC.Spread.Report.IRecord[];
11254
+ deleteFailedRecords: GC.Spread.Report.IFailedRecord[];
11255
+ }
11256
+
11257
+
11258
+ export interface IReportSheetRecordsSubmittingEventArgs{
11259
+ sheet: GC.Spread.Report.ReportSheet;
11260
+ sheetName: string;
11261
+ cancel: boolean;
11262
+ }
11263
+
11264
+
10941
11265
  export interface IRowLayoutSetting{
10942
11266
  type: 'RowLayout';
10943
11267
  dataRange: string;
@@ -10958,6 +11282,7 @@ declare module GC{
10958
11282
  canBreakWhenPaging?: boolean;
10959
11283
  repeatContentWhenPaging?: boolean;
10960
11284
  defaultValue?: GC.Spread.Report.Formula;
11285
+ autoFit?: 'None' | 'Row' | 'Column';
10961
11286
  }
10962
11287
 
10963
11288
 
@@ -10992,6 +11317,29 @@ declare module GC{
10992
11317
  string
10993
11318
 
10994
11319
 
11320
+ /**
11321
+ * @typedef GC.Spread.Report.Change
11322
+ * @property {GC.Spread.Report.IRecord[]} records - The updated and inserted records.
11323
+ * @property {GC.Spread.Report.IRecord[]} deleteRecords - The deleted records.
11324
+ * @property {GC.Spread.Report.IWriteBackRule} rule - The report sheet dataEntry write back rule.
11325
+ */
11326
+ export type Change =
11327
+ {
11328
+ /**
11329
+ * The updated and inserted records.
11330
+ */
11331
+ records: GC.Spread.Report.IRecord[];
11332
+ /**
11333
+ * The deleted records.
11334
+ */
11335
+ deleteRecords: GC.Spread.Report.IRecord[];
11336
+ /**
11337
+ * The report sheet dataEntry write back rule.
11338
+ */
11339
+ rule: GC.Spread.Report.IWriteBackRule;
11340
+ }
11341
+
11342
+
10995
11343
  /**
10996
11344
  * @typedef GC.Spread.Report.ConditionRule
10997
11345
  * @type {{ column: string; operator: GC.Spread.Report.ConditionRuleOperator; } & (GC.Spread.Report.IConditionRuleValueType | GC.Spread.Report.IConditionRuleCellType | GC.Spread.Report.IConditionRuleDataColumnType | GC.Spread.Report.IConditionRuleParameterType | GC.Spread.Report.IConditionRuleFormulaType)}
@@ -11017,6 +11365,22 @@ declare module GC{
11017
11365
  GC.Spread.Report.IWriteBackRule[]
11018
11366
 
11019
11367
 
11368
+ /**
11369
+ * @typedef GC.Spread.Report.DataType
11370
+ * @type {number | string | Date | boolean}
11371
+ */
11372
+ export type DataType =
11373
+ number | string | Date | boolean
11374
+
11375
+
11376
+ /**
11377
+ * @typedef GC.Spread.Report.FieldState
11378
+ * @type {'normal' | 'new' | 'updated' | 'deleted'}
11379
+ */
11380
+ export type FieldState =
11381
+ 'normal' | 'new' | 'updated' | 'deleted'
11382
+
11383
+
11020
11384
  /**
11021
11385
  * @typedef GC.Spread.Report.FilterCondition
11022
11386
  * @type {GC.Spread.Report.ConditionRule | GC.Spread.Report.FilterConditionFormulaRule | GC.Spread.Report.IFilterConditionAndRelationType | GC.Spread.Report.IFilterConditionOrRelationType}
@@ -11231,6 +11595,48 @@ declare module GC{
11231
11595
  * ```
11232
11596
  */
11233
11597
  addRecordAt(row: number, col: number): void;
11598
+ /**
11599
+ * Binds an event to the report sheet.
11600
+ * @param {string} type The event type.
11601
+ * @param {Object} data Optional. Specifies additional data to pass along to the function.
11602
+ * @param {Function} fn Specifies the function to run when the event occurs.
11603
+ * @example
11604
+ * ```
11605
+ * //This example bind the ReportSheetDataChanged event into report sheet.
11606
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
11607
+ * report.renderMode("Design");
11608
+ * const templateSheet = report.getTemplate();
11609
+ * templateSheet.setTemplateCell(0, 0, {
11610
+ * binding: "Orders[orderId]",
11611
+ * type: "Group",
11612
+ * });
11613
+ * templateSheet.setTemplateCell(0, 1, {
11614
+ * binding: "Orders[customerId]",
11615
+ * type: "Group",
11616
+ * });
11617
+ * templateSheet.setDataEntrySetting([ {
11618
+ * name: "Write Back Rule 1",
11619
+ * tableName: "Orders",
11620
+ * fields: [
11621
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
11622
+ * { dbColumnName: "customerId", formula: "B1" },
11623
+ * ],
11624
+ * includeUnmodified: false,
11625
+ * skipRecordWithEmptyValue: false
11626
+ * } ]);
11627
+ * report.renderMode("Preview");
11628
+ * report.bind(GC.Spread.Sheets.Events.ReportSheetDataChanged, (event, args) => {
11629
+ * let reportsheet = args.sheet, changes = reportsheet.getChanges();
11630
+ * if (allowSubmit(changes)) { // users can submit or drop this changing.
11631
+ * reportsheet.submit(); // submit changes.
11632
+ * } else {
11633
+ * reportsheet.refresh(); // drop changes.
11634
+ * }
11635
+ * });
11636
+ * // after reportsheet edit / update / delete records in UI will trigger ReportSheetDataChanged event.
11637
+ * ```
11638
+ */
11639
+ bind(type: string, data?: any, fn?: Function): void;
11234
11640
  /**
11235
11641
  * Get or set the current page index.
11236
11642
  * @param {number} page The page index (0 base).
@@ -11329,6 +11735,43 @@ declare module GC{
11329
11735
  * ```
11330
11736
  */
11331
11737
  getCells(templateRow: number, templateCol: number, currentRow?: number, currentCol?: number): GC.Spread.Report.IDataCell[];
11738
+ /**
11739
+ * Return the report sheet data entry mode update insert and delete data changes.
11740
+ * @returns {GC.Spread.Report.Change[]} Returns the reportsheet update insert and delete data changes.
11741
+ * @example
11742
+ * ```
11743
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
11744
+ * report.renderMode("Design");
11745
+ * const templateSheet = report.getTemplate();
11746
+ * templateSheet.setTemplateCell(0, 0, {
11747
+ * binding: "Orders[customerId]",
11748
+ * type: "Group",
11749
+ * showCollapseButton: true
11750
+ * });
11751
+ * templateSheet.setTemplateCell(0, 1, {
11752
+ * binding: "Orders[orderId]",
11753
+ * type: "Group",
11754
+ * });
11755
+ * templateSheet.setDataEntrySetting([ {
11756
+ * name: "Write Back Rule 1",
11757
+ * tableName: "Orders",
11758
+ * fields: [
11759
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
11760
+ * { dbColumnName: "customerId", formula: "B1" },
11761
+ * ],
11762
+ * includeUnmodified: false,
11763
+ * skipRecordWithEmptyValue: false
11764
+ * } ]);
11765
+ * report.renderMode("Preview");
11766
+ * report.updateCellValue(0, 1, "test");
11767
+ * report.addRecordAt(1, 0);
11768
+ * report.updateCellValue(2, 0, 111);
11769
+ * report.updateCellValue(2, 1, "test2");
11770
+ * report.deleteRecordAt(3, 0);
11771
+ * report.getChanges(); // one delete record and two update records.
11772
+ * ```
11773
+ */
11774
+ getChanges(): GC.Spread.Report.Change[];
11332
11775
  /**
11333
11776
  * Return the collapse state of the specified cell.
11334
11777
  * @param {number} row The row index.
@@ -11818,6 +12261,44 @@ declare module GC{
11818
12261
  * ```
11819
12262
  */
11820
12263
  toWorksheet(): GC.Spread.Sheets.Worksheet;
12264
+ /**
12265
+ * Removes the binding of an event to the report sheet.
12266
+ * @param {string} type The event type.
12267
+ * @param {Function} fn Specifies the function for which to remove the binding.
12268
+ * @example
12269
+ * ```
12270
+ * //This example unbind the ReportSheetDataChanged event after first data changing.
12271
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
12272
+ * report.renderMode("Design");
12273
+ * const templateSheet = report.getTemplate();
12274
+ * templateSheet.setTemplateCell(0, 0, {
12275
+ * binding: "Orders[orderId]",
12276
+ * type: "Group",
12277
+ * });
12278
+ * templateSheet.setTemplateCell(0, 1, {
12279
+ * binding: "Orders[customerId]",
12280
+ * type: "Group",
12281
+ * });
12282
+ * templateSheet.setDataEntrySetting([ {
12283
+ * name: "Write Back Rule 1",
12284
+ * tableName: "Orders",
12285
+ * fields: [
12286
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
12287
+ * { dbColumnName: "customerId", formula: "B1" },
12288
+ * ],
12289
+ * includeUnmodified: false,
12290
+ * skipRecordWithEmptyValue: false
12291
+ * } ]);
12292
+ * report.renderMode("Preview");
12293
+ * report.bind(GC.Spread.Sheets.Events.ReportSheetDataChanged, (event, args) => {
12294
+ * let reportsheet = args.sheet, changes = reportsheet.getChanges();
12295
+ * console.log(changes);
12296
+ * reportsheet.unbind(GC.Spread.Sheets.Events.ReportSheetDataChanged);
12297
+ * });
12298
+ * // after reportsheet edit / update / delete records in UI will trigger ReportSheetDataChanged event.
12299
+ * ```
12300
+ */
12301
+ unbind(type: string, fn?: Function): void;
11821
12302
  /**
11822
12303
  * Update the specified cell's value.
11823
12304
  * @param {number} row The row index.
@@ -12074,6 +12555,33 @@ declare module GC{
12074
12555
  }
12075
12556
 
12076
12557
 
12558
+ export interface IAddColumnButtonOption{
12559
+ visible?: boolean;
12560
+ command?: string;
12561
+ style?: GC.Spread.Sheets.Style;
12562
+ width?: number;
12563
+ tooltip?: string;
12564
+ }
12565
+
12566
+
12567
+ export interface IAddRowButtonOption{
12568
+ visible?: boolean;
12569
+ command?: string;
12570
+ style?: GC.Spread.Sheets.Style;
12571
+ height?: number;
12572
+ tooltip?: string;
12573
+ }
12574
+
12575
+
12576
+ export interface IAppDocProps{
12577
+ manager?: string;
12578
+ company?: string;
12579
+ hyperlinkBase?: string;
12580
+ totalTime?: number;
12581
+ template?: string;
12582
+ }
12583
+
12584
+
12077
12585
  export interface IBaseSpreadOption{
12078
12586
  width?: number;
12079
12587
  height?: number;
@@ -12088,6 +12596,11 @@ declare module GC{
12088
12596
  }
12089
12597
 
12090
12598
 
12599
+ export interface IBuiltInFileIcons{
12600
+ [key: string]: string;
12601
+ }
12602
+
12603
+
12091
12604
  export interface IButtonClickedEventArgs{
12092
12605
  sheet: GC.Spread.Sheets.Worksheet;
12093
12606
  sheetName: string;
@@ -12328,6 +12841,22 @@ declare module GC{
12328
12841
  }
12329
12842
 
12330
12843
 
12844
+ export interface ICoreDocProps{
12845
+ title?: string;
12846
+ subject?: string;
12847
+ creator?: string;
12848
+ keywords?: string;
12849
+ description?: string;
12850
+ category?: string;
12851
+ contentStatus?: string;
12852
+ modified?: Date;
12853
+ created?: Date;
12854
+ lastModifiedBy?: string;
12855
+ lastPrinted?: Date;
12856
+ revision?: number;
12857
+ }
12858
+
12859
+
12331
12860
  export interface ICornerFold{
12332
12861
  size?: number;
12333
12862
  position?: GC.Spread.Sheets.CornerPosition;
@@ -12335,6 +12864,22 @@ declare module GC{
12335
12864
  }
12336
12865
 
12337
12866
 
12867
+ export interface ICustomDocPropsManager{
12868
+ all: (props?: GC.Spread.Sheets.ICustomDocumentProperty[]) => GC.Spread.Sheets.ICustomDocumentProperty[];
12869
+ get: (propName: string) => GC.Spread.Sheets.ICustomDocumentProperty;
12870
+ add: (propName: string, value: GC.Spread.Sheets.CustomDocumentPropertyValueType, isLinkTarget?: boolean) => void;
12871
+ remove: (propName: string) => void;
12872
+ clear: () => void;
12873
+ }
12874
+
12875
+
12876
+ export interface ICustomDocumentProperty{
12877
+ name: string;
12878
+ value?: GC.Spread.Sheets.CustomDocumentPropertyValueType;
12879
+ linkTarget?: string;
12880
+ }
12881
+
12882
+
12338
12883
  export interface ICustomSortInfo{
12339
12884
  compareFunction: (value1: any, value2: any) => number;
12340
12885
  ascending: boolean;
@@ -12356,6 +12901,13 @@ declare module GC{
12356
12901
  }
12357
12902
 
12358
12903
 
12904
+ export interface IDocProps{
12905
+ coreDocProps?: GC.Spread.Sheets.ICoreDocProps;
12906
+ appDocProps?: GC.Spread.Sheets.IAppDocProps;
12907
+ customDocPropsManager: GC.Spread.Sheets.ICustomDocPropsManager;
12908
+ }
12909
+
12910
+
12359
12911
  export interface IDragDropBlockCompletedEventArgs{
12360
12912
  sheet: GC.Spread.Sheets.Worksheet;
12361
12913
  sheetName: string;
@@ -12861,7 +13413,7 @@ declare module GC{
12861
13413
 
12862
13414
  export interface IPivotTableChangedEventArgs{
12863
13415
  pivotTableName: string;
12864
- type: "filter" | "sort" | "collapse" | "fieldChanged";
13416
+ type: "filter" | "sort" | "collapse" | "fieldChanged" | "summarizedValueBy" | "showValueAs" | "dataPositionChanged" | "viewChanged" | "grandTotal" | "showNoData" | "group";
12865
13417
  fieldName: string;
12866
13418
  value?: boolean;
12867
13419
  sortType?: number;
@@ -13343,6 +13895,7 @@ declare module GC{
13343
13895
 
13344
13896
 
13345
13897
  export interface IWorkBookDefaultOptions{
13898
+ allowDragHeaderToMove?: GC.Spread.Sheets.AllowDragHeaderToMove;
13346
13899
  allowUserDragDrop?: boolean;
13347
13900
  allowUserDragFill?: boolean;
13348
13901
  allowUserZoom?: boolean;
@@ -13390,6 +13943,7 @@ declare module GC{
13390
13943
  iterativeCalculationMaximumChange?: number;
13391
13944
  autoFitType?: GC.Spread.Sheets.AutoFitType;
13392
13945
  calcOnDemand?: boolean;
13946
+ incrementalCalculation?: boolean;
13393
13947
  allowCopyPasteExcelStyle?: boolean;
13394
13948
  allowExtendPasteRange?: boolean;
13395
13949
  copyPasteHeaderOptions?: GC.Spread.Sheets.CopyPasteHeaderOptions;
@@ -13405,6 +13959,7 @@ declare module GC{
13405
13959
  font?: string;
13406
13960
  customList?: string[][];
13407
13961
  defaultSheetTabStyles?: GC.Spread.Sheets.SheetTabStyles;
13962
+ builtInFileIcons?: GC.Spread.Sheets.IBuiltInFileIcons;
13408
13963
  }
13409
13964
 
13410
13965
 
@@ -13428,6 +13983,10 @@ declare module GC{
13428
13983
  * Whether to allow the user to drag and drop range data.
13429
13984
  */
13430
13985
  allowUserDragDrop: boolean;
13986
+ /**
13987
+ * Specifies how to allow drag header to move.
13988
+ */
13989
+ allowDragHeaderToMove: GC.Spread.Sheets.AllowDragHeaderToMove;
13431
13990
  /**
13432
13991
  * Whether to allow the user to drag fill a range.
13433
13992
  */
@@ -13608,6 +14167,10 @@ declare module GC{
13608
14167
  * Whether to calculate formulas only when they are demanded.
13609
14168
  */
13610
14169
  calcOnDemand: boolean;
14170
+ /**
14171
+ * Whether to incremental calculate formulas without blocking UI.
14172
+ */
14173
+ incrementalCalculation: boolean;
13611
14174
  /**
13612
14175
  * Whether to calculate functions with dynamic reference.
13613
14176
  */
@@ -13684,6 +14247,10 @@ declare module GC{
13684
14247
  * The default sheet tab styles.
13685
14248
  */
13686
14249
  defaultSheetTabStyles: GC.Spread.Sheets.SheetTabStyles;
14250
+ /**
14251
+ * All built-in file icons.
14252
+ */
14253
+ builtInFileIcons: GC.Spread.Sheets.IBuiltInFileIcons;
13687
14254
  }
13688
14255
 
13689
14256
 
@@ -13791,6 +14358,18 @@ declare module GC{
13791
14358
  * Indicates whether the unknown formulas could be included in sheet json data.
13792
14359
  */
13793
14360
  keepUnknownFormulas: boolean;
14361
+ /**
14362
+ * The add row button's options.
14363
+ */
14364
+ addRowButtonOption?: GC.Spread.Sheets.IAddRowButtonOption;
14365
+ /**
14366
+ * The add column button's options.
14367
+ */
14368
+ addColumnButtonOption?: GC.Spread.Sheets.IAddColumnButtonOption;
14369
+ /**
14370
+ * Indicates whether the sheet is rendered from right to left.
14371
+ */
14372
+ rightToLeft: boolean;
13794
14373
  }
13795
14374
 
13796
14375
 
@@ -13823,6 +14402,15 @@ declare module GC{
13823
14402
  }
13824
14403
 
13825
14404
 
14405
+ /**
14406
+ * @typedef GC.Spread.Sheets.CustomDocumentPropertyValueType
14407
+ * @type {string|number|boolean|Date}
14408
+ * @description Custom Document property type.
14409
+ */
14410
+ export type CustomDocumentPropertyValueType =
14411
+ string|number|boolean|Date
14412
+
14413
+
13826
14414
  /**
13827
14415
  * @typedef GC.Spread.Sheets.ExportCsvOptions
13828
14416
  * @property {GC.Spread.Sheets.FileType} fileType - The file type.
@@ -13879,6 +14467,7 @@ declare module GC{
13879
14467
  rowHeadersAsFrozenColumns?: boolean;
13880
14468
  columnHeadersAsFrozenRows?: boolean;
13881
14469
  includeAutoMergedCells?: boolean;
14470
+ saveR1C1Formula?: boolean;
13882
14471
  }
13883
14472
 
13884
14473
 
@@ -13990,6 +14579,7 @@ declare module GC{
13990
14579
  * @property {boolean} [fullRecalc] - Whether to calculate after loading the json data, false by default.
13991
14580
  * @property {boolean} [dynamicReferences] - Whether to calculate functions with dynamic reference, default true.
13992
14581
  * @property {boolean} [calcOnDemand] - Whether to calculate formulas only when they are demanded, default false.
14582
+ * @property {boolean} [incrementalCalculation] - Whether to incremental calculate formulas without blocking UI, default false.
13993
14583
  * @property {boolean} [includeUnusedStyles] - Whether to include the unused name style when converting excel xml to the json, default true.
13994
14584
  * @property {string} [password] - The password to open the workbook.
13995
14585
  * @property {GC.Spread.Sheets.OpenMode} [openMode] - The open mode of normal, lazy and incremental. By default is normal.
@@ -14004,6 +14594,7 @@ declare module GC{
14004
14594
  fullRecalc?: boolean;
14005
14595
  dynamicReferences?: boolean;
14006
14596
  calcOnDemand?: boolean;
14597
+ incrementalCalculation?: boolean;
14007
14598
  includeUnusedStyles?: boolean;
14008
14599
  password?: string;
14009
14600
  openMode?: GC.Spread.Sheets.OpenMode;
@@ -14018,6 +14609,7 @@ declare module GC{
14018
14609
  * @property {boolean} [fullRecalc] - Whether to calculate after loading the json data, false by default.
14019
14610
  * @property {boolean} [dynamicReferences] - Whether to calculate functions with dynamic reference, default true.
14020
14611
  * @property {boolean} [calcOnDemand] - Whether to calculate formulas only when they are demanded, default false.
14612
+ * @property {boolean} [incrementalCalculation] - Whether to incremental calculate formulas without blocking UI, default false.
14021
14613
  * @property {boolean} [includeUnusedStyles] - Whether to include the unused name style when converting excel xml to the json, default true.
14022
14614
  * @property {GC.Spread.Sheets.OpenMode} [openMode] - The open mode of normal, lazy and incremental. By default is normal.
14023
14615
  * @property {GC.Spread.Sheets.ProgressFunctionType} [progress] - The progress callback function for each open mode.
@@ -14029,6 +14621,7 @@ declare module GC{
14029
14621
  fullRecalc?: boolean;
14030
14622
  dynamicReferences?: boolean;
14031
14623
  calcOnDemand?: boolean;
14624
+ incrementalCalculation?: boolean;
14032
14625
  includeUnusedStyles?: boolean;
14033
14626
  openMode?: GC.Spread.Sheets.OpenMode;
14034
14627
  progress?: GC.Spread.Sheets.ProgressFunctionType;
@@ -14090,6 +14683,7 @@ declare module GC{
14090
14683
  * @property {boolean} [includeCalcModelCache] - Whether to include the extra data of calculation. Can be faster when open the file with those data, default false.
14091
14684
  * @property {boolean} [includeUnusedNames] - Whether to include the unused custom name when do save, default true.
14092
14685
  * @property {boolean} [includeEmptyRegionCells] - Whether to include any empty cells(cells with no data or only style) outside the used data range, default true.
14686
+ * @property {boolean} [saveR1C1Formula] - Whether to save the r1c1 formula in the file, only works in sjs file type, default false.
14093
14687
  */
14094
14688
  export type SaveOptions =
14095
14689
  {
@@ -14101,6 +14695,7 @@ declare module GC{
14101
14695
  includeEmptyRegionCells?: boolean;
14102
14696
  includeAutoMergedCells?: boolean;
14103
14697
  includeCalcModelCache?: boolean;
14698
+ saveR1C1Formula?: boolean;
14104
14699
  }
14105
14700
 
14106
14701
 
@@ -14113,6 +14708,29 @@ declare module GC{
14113
14708
  [sheetTabState in GC.Spread.Sheets.SheetTabState]?: GC.Spread.Sheets.ISheetTabStyle;
14114
14709
  }
14115
14710
 
14711
+ /**
14712
+ * Specifies how to allow drag header to move.
14713
+ * @enum {number}
14714
+ */
14715
+ export enum AllowDragHeaderToMove{
14716
+ /**
14717
+ * Specifies that no drag header to move allowed.
14718
+ */
14719
+ none= 0,
14720
+ /**
14721
+ * Specifies that only the column header allow to move.
14722
+ */
14723
+ column= 1,
14724
+ /**
14725
+ * Specifies that only the row header allow to move.
14726
+ */
14727
+ row= 2,
14728
+ /**
14729
+ * Specifies that both column and row header allow to move.
14730
+ */
14731
+ both= 3
14732
+ }
14733
+
14116
14734
  /**
14117
14735
  * Sheet tab all sheets list button visible option.
14118
14736
  * @enum {number}
@@ -15206,7 +15824,11 @@ declare module GC{
15206
15824
  /**
15207
15825
  * Specifies a data object cell type can't insert a data to its adjacent cells on the right.
15208
15826
  */
15209
- dataObjectCellTypeInsertData= 16
15827
+ dataObjectCellTypeInsertData= 16,
15828
+ /**
15829
+ * The specific event type that is triggered when the size of a file uploaded via the file picker exceeds the limit.
15830
+ */
15831
+ sizeLimitExceeded= 18
15210
15832
  }
15211
15833
 
15212
15834
  /**
@@ -15401,6 +16023,49 @@ declare module GC{
15401
16023
  slantedDashDot= 13
15402
16024
  }
15403
16025
 
16026
+ /**
16027
+ * Represent the list style type of rich text list item
16028
+ * @enum {number}
16029
+ */
16030
+ export enum ListType{
16031
+ /**
16032
+ * Indicates the unordered list item, list style type is disc.
16033
+ */
16034
+ disc= 0,
16035
+ /**
16036
+ * Indicates the unordered list item, list style type is circle.
16037
+ */
16038
+ circle= 1,
16039
+ /**
16040
+ * Indicates the unordered list item, list style type is square.
16041
+ */
16042
+ square= 2,
16043
+ /**
16044
+ * Indicates the ordered list item, list style type is decimal.
16045
+ */
16046
+ decimal= 3,
16047
+ /**
16048
+ * Indicates the ordered list item, list style type is lowerAlpha.
16049
+ */
16050
+ lowerAlpha= 4,
16051
+ /**
16052
+ * Indicates the ordered list item, list style type is upperAlpha.
16053
+ */
16054
+ upperAlpha= 5,
16055
+ /**
16056
+ * Indicates the ordered list item, list style type is lowerRoman.
16057
+ */
16058
+ lowerRoman= 6,
16059
+ /**
16060
+ * Indicates the ordered list item, list style type is upperRoman.
16061
+ */
16062
+ upperRoman= 7,
16063
+ /**
16064
+ * Indicates the ordered list item, list style type is lowerGreek.
16065
+ */
16066
+ lowerGreek= 8
16067
+ }
16068
+
15404
16069
  /**
15405
16070
  * Change display mode when date/number data width longer than column width.
15406
16071
  * @enum {number}
@@ -16106,6 +16771,31 @@ declare module GC{
16106
16771
  none= 0
16107
16772
  }
16108
16773
 
16774
+ /**
16775
+ * Defines the type of the text direction.
16776
+ * @enum {number}
16777
+ * @example
16778
+ * ```
16779
+ * //This example uses the TextDirectionType enumeration.
16780
+ * activeSheet.getCell(0, 0).textDirection(GC.Spread.Sheets.TextDirectionType.rightToLeft);
16781
+ * activeSheet.getRange(1, -1, 1, -1).textDirection(GC.Spread.Sheets.TextDirectionType.rightToLeft);
16782
+ * var style = new GC.Spread.Sheets.Style();
16783
+ * style.textDirection = GC.Spread.Sheets.TextDirectionType.rightToLeft;
16784
+ * activeSheet.setStyle(1, 1, style, GC.Spread.Sheets.SheetArea.viewport);
16785
+ * ```
16786
+ */
16787
+ export enum TextDirectionType{
16788
+ /** Specifies the text direction is context dependent, which is determined by scanning the text for the first non-whitespace character: if it is a strong right-to-left character, the text direction is right-to-left; otherwise, the text direction is left-to-right.
16789
+ */
16790
+ context= 0,
16791
+ /** Specifies the text direction is left-to-right in the cell, as in English.
16792
+ */
16793
+ leftToRight= 1,
16794
+ /** Specifies the text direction is right-to-left in the cell, as in Arabic or Hebrew.
16795
+ */
16796
+ rightToLeft= 2
16797
+ }
16798
+
16109
16799
  /**
16110
16800
  * Worksheet used range
16111
16801
  * @enum {number}
@@ -16754,6 +17444,16 @@ declare module GC{
16754
17444
  * ```
16755
17445
  */
16756
17446
  height(value?: number): any;
17447
+ /**
17448
+ * Gets or sets whether the cell formula is visible.
17449
+ * @param {boolean} [value] Set to `true` to hidden the cell formula.
17450
+ * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the cell formula is hidden; otherwise, returns the cell.
17451
+ * @example
17452
+ * ```
17453
+ * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).hidden(true);
17454
+ * ```
17455
+ */
17456
+ hidden(value?: boolean): any;
16757
17457
  /**
16758
17458
  * Gets or sets the imeMode of the cell.
16759
17459
  * @param {GC.Spread.Sheets.ImeMode} [value] The cell imeMode.
@@ -17012,6 +17712,16 @@ declare module GC{
17012
17712
  * ```
17013
17713
  */
17014
17714
  textDecoration(value?: GC.Spread.Sheets.TextDecorationType): any;
17715
+ /**
17716
+ * Gets or sets the type of the direction added to the cell's text.
17717
+ * @param {GC.Spread.Sheets.TextDirectionType} [value] The type of the direction.
17718
+ * @returns {GC.Spread.Sheets.TextDirectionType|GC.Spread.Sheets.CellRange} If no value is set, returns the type of the direction; otherwise, returns the cell.
17719
+ * @example
17720
+ * ```
17721
+ * activeSheet.getRange(1, -1, 1, -1).textDirection(GC.Spread.Sheets.TextDirectionType.rightToLeft);
17722
+ * ```
17723
+ */
17724
+ textDirection(value?: GC.Spread.Sheets.TextDirectionType): any;
17015
17725
  /**
17016
17726
  * Gets or sets the text indent of the cell.
17017
17727
  * @param {number} [value] The cell text indent.
@@ -17412,6 +18122,75 @@ declare module GC{
17412
18122
  textColor2(value?: string): any;
17413
18123
  }
17414
18124
 
18125
+ export class CustomDocPropsManager{
18126
+ /**
18127
+ * Represents a custom document property manager. It can manage custom properties on all documents.
18128
+ * @class
18129
+ * @param {GC.Spread.Sheets.Workbook} workbook The workbook.
18130
+ */
18131
+ constructor(workbook: GC.Spread.Sheets.Workbook);
18132
+ /**
18133
+ * Set custom document property.
18134
+ * @param {string} propName Property name.
18135
+ * @param {GC.Spread.Sheets.CustomDocumentPropertyValueType} value Property value.
18136
+ * @param {boolean} isLinkTarget Is it a content link.
18137
+ * @example
18138
+ * ```
18139
+ * spread.docProps.customDocPropsManager.add('prop1', '1');
18140
+ * spread.docProps.customDocPropsManager.add('prop2', 'CellAlias', true);
18141
+ * ```
18142
+ */
18143
+ add(propName: string, value: GC.Spread.Sheets.CustomDocumentPropertyValueType, isLinkTarget?: boolean): void;
18144
+ /**
18145
+ * Get or set custom document properties.
18146
+ * @param {GC.Spread.Sheets.ICustomDocumentProperty[]} props Custom document properties.
18147
+ * @returns {GC.Spread.Sheets.ICustomDocumentProperty[] | undefined} Custom document properties.
18148
+ * @example
18149
+ * ```
18150
+ * spread.docProps.customDocPropsManager.all([{ name: 'prop1', value: '1' }]);
18151
+ * spread.docProps.customDocPropsManager.all();
18152
+ * ```
18153
+ */
18154
+ all(props?: GC.Spread.Sheets.ICustomDocumentProperty[]): GC.Spread.Sheets.ICustomDocumentProperty[] | undefined;
18155
+ /**
18156
+ * Clear custom document properties.
18157
+ * @example
18158
+ * ```
18159
+ * spread.docProps.customDocPropsManager.clear();
18160
+ * ```
18161
+ */
18162
+ clear(): void;
18163
+ /**
18164
+ * Get custom document property by property name.
18165
+ * @param {string} propName Property name.
18166
+ * @returns {GC.Spread.Sheets.ICustomDocumentProperty} Custom document property.
18167
+ * @example
18168
+ * ```
18169
+ * spread.docProps.customDocPropsManager.all([{ name: 'prop1', value: '1' }]);
18170
+ * spread.docProps.customDocPropsManager.get('prop1');
18171
+ * ```
18172
+ */
18173
+ get(propName: string): GC.Spread.Sheets.ICustomDocumentProperty | undefined;
18174
+ /**
18175
+ * Remove custom document property by property name.
18176
+ * @param {string} propName Property name.
18177
+ * @example
18178
+ * ```
18179
+ * spread.docProps.customDocPropsManager.remove('prop1');
18180
+ * ```
18181
+ */
18182
+ remove(propName: string): void;
18183
+ }
18184
+
18185
+ export class CustomThemeManagerBase{
18186
+ /**
18187
+ * Represents a custom theme manager that can manage all custom themes.
18188
+ * @class
18189
+ * @param {GC.Spread.Sheets.Workbook} workbook The workbook.
18190
+ */
18191
+ constructor(workbook: GC.Spread.Sheets.Workbook);
18192
+ }
18193
+
17415
18194
  export class Events{
17416
18195
  /**
17417
18196
  * Defines the events supported in SpreadJS.
@@ -17496,6 +18275,31 @@ declare module GC{
17496
18275
  * ```
17497
18276
  */
17498
18277
  static ButtonClicked: string;
18278
+ /**
18279
+ * Occurs when the calculate with incrementalCalculation.
18280
+ * @name GC.Spread.Sheets.Workbook#CalculationProgress
18281
+ * @event
18282
+ * @param eventParam *number* `totalCells` The count of total calculate cells.
18283
+ * @param eventParam *number* `pendingCells` The count of cells needed to be calculated.
18284
+ * @param eventParam *number* `iterate` The count of iterative calculation has done, only available when the iterative calculation.
18285
+ * @example
18286
+ * ```
18287
+ * //This example uses the CalculationProgress event, to log the calculation progress.
18288
+ * spread.options.incrementalCalculation = true;
18289
+ * spread.bind(GC.Spread.Sheets.Events.CalculationProgress, function (e, info) {
18290
+ * var msg = "Calculate ";
18291
+ * if (info.pendingCells === 0) {
18292
+ * msg += "finished";
18293
+ * } else if (info.iterate >= 0) {
18294
+ * msg += info.pendingCells + " cells in iterative calculation round " + info.iterate;
18295
+ * } else {
18296
+ * msg += (info.totalCells - info.pendingCells) + "/" + info.totalCells + "cells";
18297
+ * }
18298
+ * console.log(msg)
18299
+ * });
18300
+ * ```
18301
+ */
18302
+ static CalculationProgress: string;
17499
18303
  /**
17500
18304
  * Occurs when a change is made to a cell in this sheet that may require the cell to be repainted.
17501
18305
  * @name GC.Spread.Sheets.Worksheet#CellChanged
@@ -18384,11 +19188,11 @@ declare module GC{
18384
19188
  */
18385
19189
  static PictureSelectionChanged: string;
18386
19190
  /**
18387
- * After PivotTable filter/sort/collapse/fieldChanged.
19191
+ * After PivotTable filter/sort/collapse/fieldChanged/grandTotal/showNoData/group.
18388
19192
  * @name GC.Spread.Sheets.Worksheet#PivotTableChanged
18389
19193
  * @event
18390
19194
  * @param eventParam *string* `pivotTableName` The PivotTable's name.
18391
- * @param eventParam *string* `type` The specific operation name("filter" | "sort" | "collapse" | "fieldChanged" | "summarizedValueBy" | "showValueAs" | "dataPositionChanged" | "viewChanged").
19195
+ * @param eventParam *string* `type` The specific operation name("filter" | "sort" | "collapse" | "fieldChanged" | "summarizedValueBy" | "showValueAs" | "dataPositionChanged" | "viewChanged" | "grandTotal" | "showNoData" | "group").
18392
19196
  * @param eventParam *string* `[fieldName]` Changed fieldName.
18393
19197
  * @param eventParam *string* `[sourceName]` Changed field sourceName.
18394
19198
  * @param eventParam *boolean* `[oldValue]` PivotTable changes the value of the previous attribute(collapse, summarizedValueBy, showValueAs).
@@ -18659,6 +19463,198 @@ declare module GC{
18659
19463
  * ```
18660
19464
  */
18661
19465
  static RangeSorting: string;
19466
+ /**
19467
+ * Occurs when the report sheet data has changed by update, insert or delete. Allows submitting data changes to the server.
19468
+ * @name GC.Spread.Report.ReportSheet#ReportSheetDataChanged
19469
+ * @event
19470
+ * @param eventParam *{@link GC.Spread.Report.ReportSheet}* `sheet` The report sheet that triggered the event.
19471
+ * @param eventParam *string* `sheetName` The report sheet's name.
19472
+ * @param eventParam *string* `type` The report sheet change type. insert, update or delete.
19473
+ * @param eventParam *number* `row` The changed row index.
19474
+ * @param eventParam *number* `col` The changed column index.
19475
+ * @example
19476
+ * ```
19477
+ * //This example uses the ReportSheetDataChanged event.
19478
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
19479
+ * report.renderMode("Design");
19480
+ * const templateSheet = report.getTemplate();
19481
+ * templateSheet.setTemplateCell(0, 0, {
19482
+ * binding: "Orders[orderId]",
19483
+ * type: "Group",
19484
+ * });
19485
+ * templateSheet.setTemplateCell(0, 1, {
19486
+ * binding: "Orders[customerId]",
19487
+ * type: "Group",
19488
+ * });
19489
+ * templateSheet.setDataEntrySetting([ {
19490
+ * name: "Write Back Rule 1",
19491
+ * tableName: "Orders",
19492
+ * fields: [
19493
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
19494
+ * { dbColumnName: "customerId", formula: "B1" },
19495
+ * ],
19496
+ * includeUnmodified: false,
19497
+ * skipRecordWithEmptyValue: false
19498
+ * } ]);
19499
+ * report.renderMode("Preview");
19500
+ * report.bind(GC.Spread.Sheets.Events.ReportSheetDataChanged, (event, args) => {
19501
+ * let reportsheet = args.sheet, changes = reportsheet.getChanges();
19502
+ * if (allowSubmit(changes)) { // users can submit or drop this changing.
19503
+ * reportsheet.submit(); // submit changes.
19504
+ * } else {
19505
+ * reportsheet.refresh(); // drop changes.
19506
+ * }
19507
+ * });
19508
+ * // after reportsheet edit / update / delete records in UI will trigger ReportSheetDataChanged event.
19509
+ * // users can submit into server or drop this changing in this moment.
19510
+ * ```
19511
+ */
19512
+ static ReportSheetDataChanged: string;
19513
+ /**
19514
+ * Occurs when the report sheet is changing by update, insert or delete. Allows validating or cancellation of the data operation.
19515
+ * @name GC.Spread.Report.ReportSheet#ReportSheetDataChanging
19516
+ * @event
19517
+ * @param eventParam *{@link GC.Spread.Report.ReportSheet}* `sheet` The report sheet that triggered the event.
19518
+ * @param eventParam *string* `sheetName` The report sheet's name.
19519
+ * @param eventParam *string* `type` The report sheet change type. insert, update or delete.
19520
+ * @param eventParam *number* `row` The changing row index.
19521
+ * @param eventParam *number* `col` The changing column index.
19522
+ * @param eventParam *any* `oldValue` The update changing old value.
19523
+ * @param eventParam *any* `newValue` The update changing new value.
19524
+ * @param eventParam *boolean* `cancel` Whether the report sheet changing operation should be canceled.
19525
+ * @example
19526
+ * ```
19527
+ * //This example uses the ReportSheetDataChanging event.
19528
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
19529
+ * report.renderMode("Design");
19530
+ * const templateSheet = report.getTemplate();
19531
+ * templateSheet.setTemplateCell(0, 0, {
19532
+ * binding: "Orders[orderId]",
19533
+ * type: "Group",
19534
+ * });
19535
+ * templateSheet.setTemplateCell(0, 1, {
19536
+ * binding: "Orders[customerId]",
19537
+ * type: "Group",
19538
+ * });
19539
+ * templateSheet.setDataEntrySetting([ {
19540
+ * name: "Write Back Rule 1",
19541
+ * tableName: "Orders",
19542
+ * fields: [
19543
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
19544
+ * { dbColumnName: "customerId", formula: "B1" },
19545
+ * ],
19546
+ * includeUnmodified: false,
19547
+ * skipRecordWithEmptyValue: false
19548
+ * } ]);
19549
+ * report.renderMode("Preview");
19550
+ * report.bind(GC.Spread.Sheets.Events.ReportSheetDataChanging, (event, args) => {
19551
+ * let { type, row, col, oldValue, newValue } = args;
19552
+ * if (allowChange(type, row, col, oldValue, newValue)) { // user validate this changing operation here.
19553
+ * console.log(`${type} row: ${row}, col: ${col} from ${oldValue} to ${newValue}`);
19554
+ * } else {
19555
+ * args.cancel = true;
19556
+ * }
19557
+ * });
19558
+ * // reportsheet edit / update / delete records in UI will trigger ReportSheetDataChanging event.
19559
+ * // users can also cancel the operation here if the changing is invalid.
19560
+ * ```
19561
+ */
19562
+ static ReportSheetDataChanging: string;
19563
+ /**
19564
+ * Occurs after the report sheet submitted the changes to server. Allow user to provide UI feedback of the submit results from the server.
19565
+ * @name GC.Spread.Report.ReportSheet#ReportSheetRecordsSubmitted
19566
+ * @event
19567
+ * @param eventParam *{@link GC.Spread.Report.ReportSheet}* `sheet` The report sheet that triggered the event.
19568
+ * @param eventParam *string* `sheetName` The report sheet's name.
19569
+ * @param eventParam *{@link GC.Spread.Report.IRecord[]}* `updateSuccessRecords` Successful update or insert records.
19570
+ * @param eventParam *{@link GC.Spread.Report.IFailedRecord[]}* `updateFailedRecords` Failing update or insert records.
19571
+ * @param eventParam *{@link GC.Spread.Report.IRecord[]}* `deleteSuccessRecords` Successful delete records.
19572
+ * @param eventParam *{@link GC.Spread.Report.IFailedRecord[]}* `deleteFailedRecords` Failing delete records.
19573
+ * @example
19574
+ * ```
19575
+ * //This example uses the ReportSheetDataChanged event.
19576
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
19577
+ * report.renderMode("Design");
19578
+ * const templateSheet = report.getTemplate();
19579
+ * templateSheet.setTemplateCell(0, 0, {
19580
+ * binding: "Orders[orderId]",
19581
+ * type: "Group",
19582
+ * });
19583
+ * templateSheet.setTemplateCell(0, 1, {
19584
+ * binding: "Orders[customerId]",
19585
+ * type: "Group",
19586
+ * });
19587
+ * templateSheet.setDataEntrySetting([ {
19588
+ * name: "Write Back Rule 1",
19589
+ * tableName: "Orders",
19590
+ * fields: [
19591
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
19592
+ * { dbColumnName: "customerId", formula: "B1" },
19593
+ * ],
19594
+ * includeUnmodified: false,
19595
+ * skipRecordWithEmptyValue: false
19596
+ * } ]);
19597
+ * report.renderMode("Preview");
19598
+ * report.bind(GC.Spread.Sheets.Events.ReportSheetRecordsSubmitted, (event, args) => {
19599
+ * let { updateSuccessRecords, deleteSuccessRecords, updateFailedRecords, deleteFailedRecords } = args;
19600
+ * for (let record of updateFailedRecords) {
19601
+ * for (let fieldKey in record.info) {
19602
+ * if (record.info.hasOwnproperty(fieldKey)) {
19603
+ * let recordDetail = record.info[fieldKey];
19604
+ * if (recordDetail.state === "updated") {
19605
+ * // user console the failed detail info.
19606
+ * console.log(`Updated failed in row: ${recordDetail.row} col: ${recordDetail.col}, oldValue: ${recordDetail.oldValue}, reason is ${record.reason}`);
19607
+ * }
19608
+ * }
19609
+ * }
19610
+ * }
19611
+ * });
19612
+ * // after submitting into the server, users can get the all success and failed records result.
19613
+ * ```
19614
+ */
19615
+ static ReportSheetRecordsSubmitted: string;
19616
+ /**
19617
+ * Occurs before the report sheet submitting changes to server. Allows final validation of all data changes or cancellign the operation.
19618
+ * @name GC.Spread.Report.ReportSheet#ReportSheetRecordsSubmitting
19619
+ * @event
19620
+ * @param eventParam *{@link GC.Spread.Report.ReportSheet}* `sheet` The report sheet that triggered the event.
19621
+ * @param eventParam *string* `sheetName` The report sheet's name.
19622
+ * @param eventParam *boolean* `cancel` Whether the report sheet submit operation should be canceled.
19623
+ * @example
19624
+ * ```
19625
+ * //This example uses the ReportSheetDataChanged event.
19626
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
19627
+ * report.renderMode("Design");
19628
+ * const templateSheet = report.getTemplate();
19629
+ * templateSheet.setTemplateCell(0, 0, {
19630
+ * binding: "Orders[orderId]",
19631
+ * type: "Group",
19632
+ * });
19633
+ * templateSheet.setTemplateCell(0, 1, {
19634
+ * binding: "Orders[customerId]",
19635
+ * type: "Group",
19636
+ * });
19637
+ * templateSheet.setDataEntrySetting([ {
19638
+ * name: "Write Back Rule 1",
19639
+ * tableName: "Orders",
19640
+ * fields: [
19641
+ * { dbColumnName: "orderId", formula: "A1", isPrimary: true },
19642
+ * { dbColumnName: "customerId", formula: "B1" },
19643
+ * ],
19644
+ * includeUnmodified: false,
19645
+ * skipRecordWithEmptyValue: false
19646
+ * } ]);
19647
+ * report.renderMode("Preview");
19648
+ * report.bind(GC.Spread.Sheets.Events.ReportSheetRecordsSubmitting, (event, args) => {
19649
+ * let reportsheet = args.sheet, changes = reportsheet.getChanges();
19650
+ * if (isInvalidate(changes)) {
19651
+ * args.cancel = true;
19652
+ * }
19653
+ * });
19654
+ * // after submitting the report chages, users can validate the changes and cancel this submit.
19655
+ * ```
19656
+ */
19657
+ static ReportSheetRecordsSubmitting: string;
18662
19658
  /**
18663
19659
  * Occurs when a change is made to a row or range of rows in this sheet that may require the row or range of rows to be repainted.
18664
19660
  * @name GC.Spread.Sheets.Worksheet#RowChanged
@@ -19518,6 +20514,15 @@ declare module GC{
19518
20514
  * @returns {boolean} The readonly status.
19519
20515
  */
19520
20516
  isReadOnly(value?: boolean): boolean;
20517
+ /**
20518
+ * Rename the name, the formula, and the comment of the custom name.
20519
+ * @param {string} [name] The new name of the custom name, all referenced formulas will be updated.
20520
+ * @param {string} [formula] The new formula of the custom name, all referenced cells will be recalculated.
20521
+ * @param {number} [baseRow] The row index of the new formula.
20522
+ * @param {number} [baseCol] The column index of the new formula.
20523
+ * @param {string} [comment] The new custom comment.
20524
+ */
20525
+ set(name?: string, formula?: string, baseRow?: number, baseCol?: number, comment?: string): void;
19521
20526
  }
19522
20527
 
19523
20528
  export class PivotTableManager{
@@ -19534,7 +20539,7 @@ declare module GC{
19534
20539
  * @param {number} row Indicates the pivot table start row position.
19535
20540
  * @param {number} col Indicates the pivot table start col position.
19536
20541
  * @param {GC.Spread.Pivot.PivotTableLayoutType} layout Indicates the pivot table layout.
19537
- * @param {GC.Spread.Pivot.PivotTableTheme} theme Indicates the pivot table theme style.
20542
+ * @param {string | GC.Spread.Pivot.PivotTableTheme} theme Indicates the pivot table theme style name.
19538
20543
  * @param {Object} options Indicates the options of pivot table.
19539
20544
  * @param {boolean} [options.allowMultipleFiltersPerField] Indicates whether use multiple filter in one field.
19540
20545
  * @param {boolean} [options.insertBlankLineAfterEachItem] Indicates whether insert a blank row at end of each item.
@@ -19575,7 +20580,7 @@ declare module GC{
19575
20580
  * sheet.pivotTables.add("pivotTable_1", 'sourceData', 1, 1, layout, theme);
19576
20581
  * ```
19577
20582
  */
19578
- add(name: string, sourceData: string | any[][], row: number, col: number, layout?: GC.Spread.Pivot.PivotTableLayoutType, theme?: GC.Spread.Pivot.PivotTableTheme, options?: GC.Spread.Pivot.IPivotTableOption): GC.Spread.Pivot.PivotTable;
20583
+ add(name: string, sourceData: string | any[][], row: number, col: number, layout?: GC.Spread.Pivot.PivotTableLayoutType, theme?: string | GC.Spread.Pivot.PivotTableTheme, options?: GC.Spread.Pivot.IPivotTableOption): GC.Spread.Pivot.PivotTable;
19579
20584
  /**
19580
20585
  * @description Get all pivot table in current worksheet.
19581
20586
  * @return {GC.Spread.Pivot.PivotTable[]} return all pivot table in current worksheet.
@@ -19932,8 +20937,8 @@ declare module GC{
19932
20937
  constructor(workbook: GC.Spread.Sheets.Workbook);
19933
20938
  /**
19934
20939
  * Add the status style of some or all sheet tabs in the spreadsheet.
19935
- * @param {SheetTabState} state Sheet tab state.
19936
- * @param {ISheetTabStyle} style Sheet tab style.
20940
+ * @param {GC.Spread.Sheets.SheetTabState} state Sheet tab state.
20941
+ * @param {GC.Spread.Sheets.ISheetTabStyle} style Sheet tab style.
19937
20942
  * @param {string[]} sheetNames The array of sheet tab names to style.
19938
20943
  * @example
19939
20944
  * ```
@@ -19945,7 +20950,7 @@ declare module GC{
19945
20950
  /**
19946
20951
  * Get the status style of some or all sheet tabs in the spreadsheet.
19947
20952
  * @param {string[]} sheetNames Array of names of sheet tabs to be queried.
19948
- * @returns {ISheetNameTabStyleMap} The status style of some or all sheet tabs.
20953
+ * @returns {GC.Spread.Sheets.ISheetNameTabStyleMap} The status style of some or all sheet tabs.
19949
20954
  * @example
19950
20955
  * ```
19951
20956
  * spread.sheetTabStyles.all(["Sheet1", "Sheet2"]);
@@ -19965,7 +20970,7 @@ declare module GC{
19965
20970
  clear(sheetNames?: string[]): void;
19966
20971
  /**
19967
20972
  * Remove the status style of some or all sheet tabs in the spreadsheet.
19968
- * @param {SheetTabState} state Sheet tab state.
20973
+ * @param {GC.Spread.Sheets.SheetTabState} state Sheet tab state.
19969
20974
  * @param {string[]} sheetNames The worksheet tab name array corresponding to the state style needs to be deleted.
19970
20975
  * @example
19971
20976
  * ```
@@ -20015,12 +21020,7 @@ declare module GC{
20015
21020
  * @param {string} [fontWeight] Specifies the font weight.
20016
21021
  * @param {string} [fontSize] Specifies the font size.
20017
21022
  * @param {string} [fontFamily] Specifies the font family.
20018
- * @param {boolean} [applyFont] Only work for namedStyle, the boolean value indicates whether the font formatting applied.
20019
- * @param {boolean} [applyFill] Only work for namedStyle, the boolean value indicates whether the fill formatting applied.
20020
- * @param {boolean} [applyAlignment] Only work for namedStyle, the boolean value indicates whether the alignment formatting applied.
20021
- * @param {boolean} [applyBorder] Only work for namedStyle, the boolean value indicates whether the border formatting applied.
20022
- * @param {boolean} [applyProtection] Only work for namedStyle, the boolean value indicates whether the protection formatting applied.
20023
- * @param {boolean} [applyNumberFormat] Only work for namedStyle, the boolean value indicates whether the number formatting applied.
21023
+ * @param {GC.Spread.Sheets.TextDirectionType} [textDirection] Specifies the direction of the text.
20024
21024
  * @example
20025
21025
  * ```
20026
21026
  * //This example uses a style with rules.
@@ -20069,7 +21069,7 @@ declare module GC{
20069
21069
  * sheet.conditionalFormats.addAverageRule(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above, style, [new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
20070
21070
  * ```
20071
21071
  */
20072
- constructor(backColor?: string | GC.Spread.Sheets.IPatternFill | GC.Spread.Sheets.IGradientFill | GC.Spread.Sheets.IGradientPathFill, foreColor?: string, hAlign?: GC.Spread.Sheets.HorizontalAlign, vAlign?: GC.Spread.Sheets.VerticalAlign, font?: string, themeFont?: string, formatter?: string | GC.Spread.Formatter.GeneralFormatter, borderLeft?: GC.Spread.Sheets.LineBorder, borderTop?: GC.Spread.Sheets.LineBorder, borderRight?: GC.Spread.Sheets.LineBorder, borderBottom?: GC.Spread.Sheets.LineBorder, locked?: boolean, textIndent?: number, wordWrap?: boolean, showEllipsis?: boolean, _showTip?: boolean, shrinkToFit?: boolean, backgroundImage?: string, cellType?: GC.Spread.Sheets.CellTypes.Base, backgroundImageLayout?: GC.Spread.Sheets.ImageLayout, tabStop?: boolean, textDecoration?: GC.Spread.Sheets.TextDecorationType, imeMode?: GC.Spread.Sheets.ImeMode, name?: string, parentName?: string, watermark?: string, cellPadding?: string, labelOptions?: GC.Spread.Sheets.ILabelOptions, quotePrefix?: boolean, diagonalDown?: GC.Spread.Sheets.LineBorder, diagonalUp?: GC.Spread.Sheets.LineBorder, isVerticalText?: boolean, cellButtons?: GC.Spread.Sheets.ICellButton[], dropdown?: GC.Spread.Sheets.IDropdown[], textOrientation?: number, decoration?: GC.Spread.Sheets.TextDecorationType, mask?: GC.Spread.Sheets.IMaskType, fontStyle?: string, fontWeight?: string, fontSize?: string, fontFamily?: string, applyFont?: boolean, applyFill?: boolean, applyAlignment?: boolean, applyBorder?: boolean, applyProtection?: boolean, applyNumberFormat?: boolean);
21072
+ constructor(backColor?: string | GC.Spread.Sheets.IPatternFill | GC.Spread.Sheets.IGradientFill | GC.Spread.Sheets.IGradientPathFill, foreColor?: string, hAlign?: GC.Spread.Sheets.HorizontalAlign, vAlign?: GC.Spread.Sheets.VerticalAlign, font?: string, themeFont?: string, formatter?: string | GC.Spread.Formatter.GeneralFormatter, borderLeft?: GC.Spread.Sheets.LineBorder, borderTop?: GC.Spread.Sheets.LineBorder, borderRight?: GC.Spread.Sheets.LineBorder, borderBottom?: GC.Spread.Sheets.LineBorder, locked?: boolean, textIndent?: number, wordWrap?: boolean, showEllipsis?: boolean, shrinkToFit?: boolean, backgroundImage?: string, cellType?: GC.Spread.Sheets.CellTypes.Base, backgroundImageLayout?: GC.Spread.Sheets.ImageLayout, tabStop?: boolean, textDecoration?: GC.Spread.Sheets.TextDecorationType, imeMode?: GC.Spread.Sheets.ImeMode, name?: string, parentName?: string, watermark?: string, cellPadding?: string, labelOptions?: GC.Spread.Sheets.ILabelOptions, quotePrefix?: boolean, diagonalDown?: GC.Spread.Sheets.LineBorder, diagonalUp?: GC.Spread.Sheets.LineBorder, isVerticalText?: boolean, cellButtons?: GC.Spread.Sheets.ICellButton[], dropdown?: GC.Spread.Sheets.IDropdown[], textOrientation?: number, decoration?: GC.Spread.Sheets.TextDecorationType, mask?: GC.Spread.Sheets.IMaskType, fontStyle?: string, fontWeight?: string, fontSize?: string, fontFamily?: string, hidden?: boolean, textDirection?: GC.Spread.Sheets.TextDirectionType);
20073
21073
  /**
20074
21074
  * Only work for namedStyle, the boolean value indicates whether the alignment formatting applied.
20075
21075
  * @type {boolean}
@@ -20566,6 +21566,25 @@ declare module GC{
20566
21566
  * ```
20567
21567
  */
20568
21568
  hAlign: GC.Spread.Sheets.HorizontalAlign | undefined;
21569
+ /**
21570
+ * Indicates whether a cell formula is visible or not when sheet is protected.
21571
+ * @type {boolean}
21572
+ * @example
21573
+ * ```
21574
+ * //This example hidden a single cell.
21575
+ * activeSheet.options.isProtected = true;
21576
+ * activeSheet.setValue(1, 1, "=SUM(1,2)");
21577
+ * var style = new GC.Spread.Sheets.Style();
21578
+ * style.backColor = "red";
21579
+ * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
21580
+ * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
21581
+ * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
21582
+ * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
21583
+ * style.hidden = true;
21584
+ * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
21585
+ * ```
21586
+ */
21587
+ hidden: boolean | undefined;
20569
21588
  /**
20570
21589
  * Indicates the Input Method Editor (IME) mode.
20571
21590
  * @type {GC.Spread.Sheets.ImeMode}
@@ -20750,6 +21769,17 @@ declare module GC{
20750
21769
  * ```
20751
21770
  */
20752
21771
  textDecoration: GC.Spread.Sheets.TextDecorationType | undefined;
21772
+ /**
21773
+ * Define a text direction for cell to better represent cell.
21774
+ * @type {GC.Spread.Sheets.TextDirectionType}
21775
+ * @example
21776
+ * ```
21777
+ * //This example sets the text direction property for Style.
21778
+ * var style = new GC.Spread.Sheets.Style();
21779
+ * style.textDirection = GC.Spread.Sheets.TextDirectionType.rightToLeft;
21780
+ * ```
21781
+ */
21782
+ textDirection: GC.Spread.Sheets.TextDirectionType | undefined;
20753
21783
  /**
20754
21784
  * Indicates the number of units of indentation for text in a cell, an integer value, where an increment of 1 represents 8 pixels.
20755
21785
  * @type {number}
@@ -21290,6 +22320,7 @@ declare module GC{
21290
22320
  * @param {number} [options.sheetCount] - The number of sheets.
21291
22321
  * @param {string} [options.font] - The tab strip font.
21292
22322
  * @param {boolean} [options.allowUserDragMerge] - Whether to allow the user to drag merge cells.
22323
+ * @param {GC.Spread.Sheets.AllowDragHeaderToMove} [options.allowDragHeaderToMove] - Specifies how to allow drag header to move.
21293
22324
  * @param {boolean} [options.allowUserDragDrop] - Whether to allow the user to drag and drop range data.
21294
22325
  * @param {boolean} [options.allowUserDragFill] - Whether to allow the user to drag fill a range.
21295
22326
  * @param {boolean} [options.allowUserZoom] - Whether to zoom the display by scrolling the mouse wheel while pressing the Ctrl key.
@@ -21330,6 +22361,7 @@ declare module GC{
21330
22361
  * @param {GC.Spread.Sheets.AutoFitType} [options.autoFitType] - Whether content will be formatted to fit in cells or in cells and headers.
21331
22362
  * @param {GC.Spread.Sheets.ReferenceStyle} [options.referenceStyle] - the style for cell and range references in cell formulas on this sheet.
21332
22363
  * @param {boolean} [options.calcOnDemand] - Whether to calculate formulas only when they are demanded.
22364
+ * @param {boolean} [options.incrementalCalculation] - Whether to incremental calculate formulas without blocking UI.
21333
22365
  * @param {boolean} [options.allowCopyPasteExcelStyle] - Whether the user can copy style from Spread Sheets then paste to Excel, or copy style from Excel then paste to Spread Sheets.
21334
22366
  * @param {boolean} [options.allowExtendPasteRange] - Whether extend paste range if the paste range is not enough for pasting.
21335
22367
  * @param {GC.Spread.Sheets.CopyPasteHeaderOptions} [options.copyPasteHeaderOptions] - Which headers are included when data is copied to or pasted.
@@ -21348,6 +22380,7 @@ declare module GC{
21348
22380
  * @param {boolean} [options.formulaFormatHint] - Whether automatically generate the format when formula inputs. Default is true.
21349
22381
  * @param {GC.Spread.Pivot.PivotAreaReference} [options.pivotAreaReference ] - Whether automatically generate the getPivotData formula or cell reference when choose pivot table data area. Default is getPivotData.
21350
22382
  * @param {GC.Spread.Sheets.SheetTabStyles} [options.defaultSheetTabStyles] - All default state styles for sheet tabs.
22383
+ * @param {GC.Spread.Sheets.IBuiltInFileIcons} [options.builtInFileIcons] - All built-in file icons.
21351
22384
  * @example
21352
22385
  * ```
21353
22386
  * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), {sheetCount:3, font:"12pt Arial"});
@@ -21369,6 +22402,31 @@ declare module GC{
21369
22402
  * ```
21370
22403
  */
21371
22404
  contextMenu: GC.Spread.Sheets.ContextMenu.ContextMenu;
22405
+ /**
22406
+ * Represents the custom pivot table theme manager.
22407
+ * @type {GC.Spread.Pivot.CustomPivotTableThemeManager}
22408
+ */
22409
+ customPivotTableThemes: GC.Spread.Pivot.CustomPivotTableThemeManager;
22410
+ /**
22411
+ * Represents the custom item slicer theme manager.
22412
+ * @type {GC.Spread.Sheets.Slicers.CustomSlicerThemeManager}
22413
+ */
22414
+ customSlicerThemes: GC.Spread.Sheets.Slicers.CustomSlicerThemeManager;
22415
+ /**
22416
+ * Represents the custom table theme manager.
22417
+ * @type {GC.Spread.Sheets.Tables.CustomTableThemeManager}
22418
+ */
22419
+ customTableThemes: GC.Spread.Sheets.Tables.CustomTableThemeManager;
22420
+ /**
22421
+ * Represents the custom timeline slicer theme manager.
22422
+ * @type {GC.Spread.Sheets.Slicers.CustomTimelineThemeManager}
22423
+ */
22424
+ customTimelineThemes: GC.Spread.Sheets.Slicers.CustomTimelineThemeManager;
22425
+ /**
22426
+ * Document properties.
22427
+ * @type {GC.Spread.Sheets.IDocProps}
22428
+ */
22429
+ docProps: GC.Spread.Sheets.IDocProps;
21372
22430
  /**
21373
22431
  * Represents the name of the Spread control.
21374
22432
  * @type {string}
@@ -21382,6 +22440,7 @@ declare module GC{
21382
22440
  * Represents the options of the Spread control.
21383
22441
  * @type {Object}
21384
22442
  * @property {boolean} allowUserDragMerge - Whether to allow the user to drag merge cells.
22443
+ * @property {GC.Spread.Sheets.AllowDragHeaderToMove} [options.allowDragHeaderToMove] - Specifies how to allow drag header to move.
21385
22444
  * @property {boolean} allowUserDragDrop - Whether to allow the user to drag and drop range data.
21386
22445
  * @property {boolean} allowUserDragFill - Whether to allow the user to drag fill a range.
21387
22446
  * @property {boolean} allowUserZoom - Whether to zoom the display by scrolling the mouse wheel while pressing the Ctrl key.
@@ -21428,6 +22487,7 @@ declare module GC{
21428
22487
  * @property {number} iterativeCalculationMaximumIterations - The Maximum Iterations when iterative calculation.
21429
22488
  * @property {number} iterativeCalculationMaximumChange - The Maximum Change when iterative calculation.
21430
22489
  * @property {boolean} calcOnDemand - Whether to calculate formulas only when they are demanded.
22490
+ * @property {boolean} incrementalCalculation - Whether to incremental calculate formulas without blocking UI.
21431
22491
  * @property {boolean} dynamicReferences - Whether to calculate functions with dynamic reference.
21432
22492
  * @property {boolean} allowCopyPasteExcelStyle - Whether the user can copy style from Spread Sheets then paste to Excel, or copy style from Excel then paste to Spread Sheets.
21433
22493
  * @property {boolean} allowExtendPasteRange - Whether extend paste range if the paste range is not enough for pasting.
@@ -21447,6 +22507,7 @@ declare module GC{
21447
22507
  * @property {boolean} formulaFormatHint - Whether automatically generate the format when formula inputs. Default is true.
21448
22508
  * @property {GC.Spread.Pivot.PivotAreaReference} pivotAreaReference - Whether automatically generate the getPivotData formula or cell reference when choose pivot table data area. Default is getPivotData.
21449
22509
  * @property {GC.Spread.Sheets.SheetTabStyles} defaultSheetTabStyles - All default state styles for sheet tabs.
22510
+ * @property {GC.Spread.Sheets.IBuiltInFileIcons} [options.builtInFileIcons] - All built-in file icons.
21450
22511
  * @example
21451
22512
  * ```
21452
22513
  * // var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:5,showHorizontalScrollbar:false});
@@ -21665,6 +22726,70 @@ declare module GC{
21665
22726
  * @returns {GC.Data.DataManager} Returns the data manager.
21666
22727
  */
21667
22728
  dataManager(): GC.Data.DataManager;
22729
+ /**
22730
+ * set or get the default pivot table theme.
22731
+ * @param {string} name the default name of the pivot table theme
22732
+ * @returns {GC.Spread.Pivot.PivotTableTheme | undefined}
22733
+ * @example
22734
+ * ```
22735
+ * // set Default pivot table theme name as "custom0"
22736
+ * spread.defaultPivotTableTheme("custom0");
22737
+ * let newPivotTable = activeSheet.pivotTables.add("pivotTable1", 1, 1, 10, 5);
22738
+ * // The pivot table above will use "custom0" as the theme since no specific theme has been specified.
22739
+ *
22740
+ * // get default pivot table theme
22741
+ * spread.defaultPivotTableTheme();
22742
+ * ```
22743
+ */
22744
+ defaultPivotTableTheme(themeName?: string): GC.Spread.Pivot.PivotTableTheme | undefined;
22745
+ /**
22746
+ * set or get the default slicer theme.
22747
+ * @param {string} name the default name of the slicer theme
22748
+ * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | undefined}
22749
+ * @example
22750
+ * ```
22751
+ * // set default slicer theme name as "custom0"
22752
+ * spread.defaultSlicerTheme("custom0");
22753
+ * let newSlicer = activeSheet.slicers.add("slicer1", 1, 1, 10, 5);
22754
+ * // The slicer above will use "custom0" as the theme since no specific theme has been specified.
22755
+ *
22756
+ * // get default slicer theme
22757
+ * spread.defaultSlicerTheme();
22758
+ * ```
22759
+ */
22760
+ defaultSlicerTheme(themeName?: string): GC.Spread.Sheets.Slicers.SlicerStyle | undefined;
22761
+ /**
22762
+ * set or get the default table theme.
22763
+ * @param {string} name the default name of the table theme
22764
+ * @returns {GC.Spread.Sheets.Tables.TableTheme | undefined}
22765
+ * @example
22766
+ * ```
22767
+ * // set default table theme name as "custom0"
22768
+ * spread.defaultTableTheme("custom0");
22769
+ * let newable = activeSheet.tables.add("table1", 1, 1, 10, 5);
22770
+ * // The table above will use "custom0" as the theme since no specific theme has been specified.
22771
+ *
22772
+ * // get the default table theme
22773
+ * spread.defaultTableTheme();
22774
+ * ```
22775
+ */
22776
+ defaultTableTheme(themeName?: string): GC.Spread.Sheets.Tables.TableTheme | undefined;
22777
+ /**
22778
+ * set or get the default timeLine theme.
22779
+ * @param {string} name the default name of the timeLine theme
22780
+ * @returns {GC.Spread.Sheets.Slicers.TimelineStyle | undefined}
22781
+ * @example
22782
+ * ```
22783
+ * // set default timeLine theme name as "custom0"
22784
+ * spread.defaultTimelineTheme("custom0");
22785
+ * let newTimeline = activeSheet.timeLines.add("timeLine1", 1, 1, 10, 5);
22786
+ * // The timeLine above will use "custom0" as the theme since no specific theme has been specified.
22787
+ *
22788
+ * // get default timeLine theme
22789
+ * spread.defaultTimelineTheme();
22790
+ * ```
22791
+ */
22792
+ defaultTimelineTheme(themeName?: string): GC.Spread.Sheets.Slicers.TimelineStyle | undefined;
21668
22793
  /**
21669
22794
  * Destroys the workbook and all sheets it contains.
21670
22795
  * @example
@@ -22310,6 +23435,7 @@ declare module GC{
22310
23435
  * @param {boolean} [serializationOption.rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when converting the workbook to json.
22311
23436
  * @param {boolean} [serializationOption.columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when converting the workbook to json.
22312
23437
  * @param {boolean} [serializationOption.includeAutoMergedCells] - Whether to include the automatically merged cells when converting the workbook to json. * @returns {Object} The spreadsheet data.
23438
+ * @param {boolean} [serializationOption.saveR1C1Formula] - Whether to save the r1c1 formula in the file.
22313
23439
  * @example
22314
23440
  * ```
22315
23441
  * activeSheet.getCell(0,0).value(123);
@@ -22372,6 +23498,7 @@ declare module GC{
22372
23498
  * @param {string | GC.Spread.Sheets.ExternalPartialValues} linkInfo - The string type is the file name of the external source, mostly ends with ".xlsx". Another type should be an array of external partial values get from the callback of GC.Spread.Sheets.IO.getPartialValues.
22373
23499
  * @param {object} [data] - The json data of the external source. Can be spread.toJSON() or the value can be fetched by data[sheetName][rowIndex][colIndex]. Only required when linkInfo is string type.
22374
23500
  * @param {string} [filePath] - The file path or the link of the file, can be empty if don't have duplicated linkNames.
23501
+ * @param {boolean} isMergeUpdate - Indicates whether to update by merging. If it's not true, the whole external sheet data will be overwritten.
22375
23502
  * @example
22376
23503
  * ```
22377
23504
  * // This example sets the external source with workbook JSON.
@@ -22382,6 +23509,7 @@ declare module GC{
22382
23509
  * spread.getActiveSheet().setFormula(0, 0, "=SUM([calc.xlsx]Sheet1!A1:B2"); \xa0// spread cell A1 value is #REF!
22383
23510
  * spread.updateExternalReference("calc.xlsx", {"Sheet1":[[1, 2],[1, 3]]}); \xa0// spread cell A1 value is 7
22384
23511
  * spread.updateExternalReference("calc.xlsx", {"Sheet1":{0:{0:10, 1:10}, 1:{0:10, 1:10}}}); \xa0// spread cell A1 value is 40
23512
+ * spread.updateExternalReference("calc.xlsx", {"Sheet1":{1:{0:2, 1:2}}}, null, true); \xa0// spread cell A1 value is 24 after the merge update.
22385
23513
  * // This example sets the external values with the successCallback result of GC.Spread.Sheets.IO.getPartialValues
22386
23514
  * let refList = spread.getExternalReferences(true);
22387
23515
  * GC.Spread.Sheets.IO.getPartialValues(refList, getFile, (externalValues) => {
@@ -22393,7 +23521,7 @@ declare module GC{
22393
23521
  * });
22394
23522
  * ```
22395
23523
  */
22396
- updateExternalReference(linkInfo: string | GC.Spread.Sheets.ExternalPartialValues, data?: object, filePath?: string): void;
23524
+ updateExternalReference(linkInfo: string | GC.Spread.Sheets.ExternalPartialValues, data?: object, filePath?: string, isMergeUpdate?: boolean): void;
22397
23525
  }
22398
23526
 
22399
23527
  export class Worksheet{
@@ -22538,6 +23666,9 @@ declare module GC{
22538
23666
  * @property {number} [sheetAreaOffset.left] - The offset left of sheet from host.
22539
23667
  * @property {number} [sheetAreaOffset.top] - The offset top of sheet from host.
22540
23668
  * @property {boolean} keepUnknownFormulas - Indicates whether the unknown formulas could be included in sheet json data.
23669
+ * @property {GC.Spread.Sheets.IAddRowButtonOption} [addRowButtonOption] - The add row button's options.
23670
+ * @property {GC.Spread.Sheets.IAddColumnButtonOption} [addColumnButtonOption] - The add column button's options.
23671
+ * @property {boolean} rightToLeft - Indicates whether the sheet is rendered from right to left.
22541
23672
  * @example
22542
23673
  * ```
22543
23674
  * sheet.setRowCount(2,GC.Spread.Sheets.SheetArea.colHeader);
@@ -25817,6 +26948,20 @@ declare module GC{
25817
26948
  }
25818
26949
 
25819
26950
 
26951
+ export interface IFileInfo{
26952
+ name: string;
26953
+ blob?: Blob;
26954
+ dataUrl?: string;
26955
+ }
26956
+
26957
+
26958
+ export interface IFilePreviewInfo extends GC.Spread.Sheets.CellTypes.IFileInfo{
26959
+ sheetName: string;
26960
+ row: number;
26961
+ col: number;
26962
+ }
26963
+
26964
+
25820
26965
  export interface IItemSpacing{
25821
26966
  horizontal?: number;
25822
26967
  vertical?: number;
@@ -26984,6 +28129,179 @@ declare module GC{
26984
28129
  constructor();
26985
28130
  }
26986
28131
 
28132
+ export class FileUpload extends Base{
28133
+ /**
28134
+ * Represents a file upload cell type.
28135
+ * @extends GC.Spread.Sheets.CellTypes.Base
28136
+ * @class
28137
+ * @example
28138
+ * ```
28139
+ * // set a FileUpload celltype
28140
+ * const cellType1 = new GC.Spread.Sheets.CellTypes.FileUpload();
28141
+ * sheet.setCellType(1, 1, cellType1);
28142
+ * // FileUpload support the valuePath property, will parse the cell value with valuePath to GC.Spread.Sheets.CellTypes.IFileInfo
28143
+ * sheet.getCellType(1, 1).valuePath("blob");
28144
+ * sheet.setValue(1, 1, blob); // value path is "blob"
28145
+ * sheet.getCellType(2, 2).valuePath("dataUrl");
28146
+ * sheet.setValue(2, 2, dataUrl); // value path is "dataUrl"
28147
+ * sheet.getCellType(3, 3).valuePath(undefined);
28148
+ * sheet.setValue(3, 3, { name: 'test1.png', blob: blob }); // value path is undefined
28149
+ * sheet.setValue(3, 3, { name: 'test2.txt', dataUrl: dataUrl }); // value path is undefined
28150
+ * ```
28151
+ */
28152
+ constructor();
28153
+ /**
28154
+ * Customize personalized preview logic and UI display by setting event callbacks or SJS commands after clicking the preview button.
28155
+ * @type {string | ((file: GC.Spread.Sheets.CellTypes.IFilePreviewInfo) => void)}
28156
+ * @returns {void}
28157
+ * @example
28158
+ * ```
28159
+ * // This example creates a file upload cell.
28160
+ * // Customize your preview function.
28161
+ * fileUpload.previewCommand = function (fileInfo) {
28162
+ * // Custom preview logic
28163
+ * }
28164
+ *
28165
+ * // Customize your preview command.
28166
+ * fileUpload.previewCommand = 'openPreviewDialog';
28167
+ *
28168
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28169
+ * ```
28170
+ */
28171
+ previewCommand?: string | ((file: GC.Spread.Sheets.CellTypes.IFilePreviewInfo) => void);
28172
+ /**
28173
+ * Gets or sets the file types that can be uploaded.
28174
+ * @param {string} value The file types that can be uploaded.
28175
+ * @returns {string} Returns the file types that can be uploaded.
28176
+ * @example
28177
+ * ```
28178
+ * // This example creates a file upload cell.
28179
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28180
+ * fileUpload.accept('image/*');
28181
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28182
+ * ```
28183
+ */
28184
+ accept(value?: string): string;
28185
+ /**
28186
+ * Gets or sets whether to display the file clear button.
28187
+ * @param {string} value Whether to display the file clear button.
28188
+ * @returns {string} Returns the currently displayed file clear button.
28189
+ * @example
28190
+ * ```
28191
+ * // This example creates a file upload cell.
28192
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28193
+ * fileUpload.isClearEnabled(false);
28194
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28195
+ * ```
28196
+ */
28197
+ isClearEnabled(value?: boolean): boolean;
28198
+ /**
28199
+ * Gets or sets whether to display the file download button.
28200
+ * @param {string} value Whether to display the file download button.
28201
+ * @returns {string} Returns the currently displayed file download button.
28202
+ * @example
28203
+ * ```
28204
+ * // This example creates a file upload cell.
28205
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28206
+ * fileUpload.isDownloadEnabled(false);
28207
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28208
+ * ```
28209
+ */
28210
+ isDownloadEnabled(value?: boolean): boolean;
28211
+ /**
28212
+ * Gets or sets whether to display the file preview button.
28213
+ * @param {string} value Whether to display the file preview button.
28214
+ * @returns {string} Returns the currently displayed file preview button.
28215
+ * @example
28216
+ * ```
28217
+ * // This example creates a file upload cell.
28218
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28219
+ * fileUpload.isPreviewEnabled(false);
28220
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28221
+ * ```
28222
+ */
28223
+ isPreviewEnabled(value?: boolean): boolean;
28224
+ /**
28225
+ * Gets or sets the margin bottom value.
28226
+ * @param {number} value The margin bottom value.
28227
+ * @returns {number} If no value is set, return current margin bottom.
28228
+ * @example
28229
+ * ```
28230
+ * // This example creates a file upload cell.
28231
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28232
+ * fileUpload.marginBottom(10);
28233
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28234
+ * ```
28235
+ */
28236
+ marginBottom(value?: number): number;
28237
+ /**
28238
+ * Gets or sets the margin left value.
28239
+ * @param {number} value The margin left value.
28240
+ * @returns {number} If no value is set, return current margin left.
28241
+ * @example
28242
+ * ```
28243
+ * // This example creates a file upload cell.
28244
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28245
+ * fileUpload.marginLeft(10);
28246
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28247
+ * ```
28248
+ */
28249
+ marginLeft(value?: number): number;
28250
+ /**
28251
+ * Gets or sets the margin right value.
28252
+ * @param {number} value The margin right value.
28253
+ * @returns {number} If no value is set, return current margin right.
28254
+ * @example
28255
+ * ```
28256
+ * // This example creates a file upload cell.
28257
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28258
+ * fileUpload.marginRight(10);
28259
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28260
+ * ```
28261
+ */
28262
+ marginRight(value?: number): number;
28263
+ /**
28264
+ * Gets or sets the margin top value.
28265
+ * @param {number} value The margin top value.
28266
+ * @returns {number} If no value is set, return current margin top.
28267
+ * @example
28268
+ * ```
28269
+ * // This example creates a file upload cell.
28270
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28271
+ * fileUpload.marginTop(10);
28272
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28273
+ * ```
28274
+ */
28275
+ marginTop(value?: number): number;
28276
+ /**
28277
+ * Gets or sets the maximum file size that can be uploaded.
28278
+ * @param {number} value The maximum file size that can be uploaded.
28279
+ * @returns {number} Returns the maximum file size that can be uploaded.
28280
+ * @example
28281
+ * ```
28282
+ * // This example creates a file upload cell.
28283
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28284
+ * fileUpload.maxSize(10000);
28285
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28286
+ * ```
28287
+ */
28288
+ maxSize(value?: number): number;
28289
+ /**
28290
+ * Gets or sets the value path for fileUpload cellType, the cell will get vale by the valuePath from the cell fileInfo.
28291
+ * @param {string} value The value path value.
28292
+ * @returns {string} If no value is set, return current value path, the default value path is dataUrl.
28293
+ * @example
28294
+ * ```
28295
+ * // This example creates a file upload cell and setValue with dataUrl.
28296
+ * const fileUpload = new GC.Spread.Sheets.CellTypes.FileUpload();
28297
+ * fileUpload.valuePath("dataUrl"); // set valuePath dataUrl, default is dataUrl
28298
+ * activeSheet.getCell(1, 1).cellType(fileUpload);
28299
+ * activeSheet.setValue(1, 1, 'data:text/plain;base64,MQ==')
28300
+ * ```
28301
+ */
28302
+ valuePath(value?: string): string;
28303
+ }
28304
+
26987
28305
  export class HyperLink extends Base{
26988
28306
  /**
26989
28307
  * Represents the hyperlink cell.
@@ -27324,6 +28642,18 @@ declare module GC{
27324
28642
  }
27325
28643
 
27326
28644
  module Charts{
28645
+ /**
28646
+ * Get the specified color by colorScheme, index
28647
+ * @param {GC.Spread.Sheets.Charts.ColorScheme} colorScheme The color scheme.
28648
+ * @param {number} index The specified index.
28649
+ * @param {number} [count] The total collection count.
28650
+ * @return {string} returns the specified color.
28651
+ * @example
28652
+ * ```
28653
+ * GC.Spread.Sheets.Charts.getColor([GC.Spread.Sheets.Charts.ColorRule.acrossLinear, ['Accent 1', 'Accent 4']], 6, 10); // return 'Accent 1 23'
28654
+ * ```
28655
+ */
28656
+ function getColor(colorScheme: GC.Spread.Sheets.Charts.ColorScheme, index: number, count?: number): string;
27327
28657
 
27328
28658
  export interface ErrorBarItem{
27329
28659
  /**
@@ -27430,6 +28760,10 @@ declare module GC{
27430
28760
  * The axis tick label position.
27431
28761
  */
27432
28762
  tickLabelPosition?: GC.Spread.Sheets.Charts.TickLabelPosition;
28763
+ /**
28764
+ * The axis tick label spacing.
28765
+ */
28766
+ tickLabelSpacing?: number;
27433
28767
  /**
27434
28768
  * The line style of the axis.
27435
28769
  */
@@ -27688,6 +29022,14 @@ declare module GC{
27688
29022
  * Whether to show the percent value in data labels.
27689
29023
  */
27690
29024
  showPercentage?: boolean;
29025
+ /**
29026
+ * Whether to show the reference cells text in data labels.
29027
+ */
29028
+ showDataLabelsRange?: boolean;
29029
+ /**
29030
+ * The data labels range formula;
29031
+ */
29032
+ dataLabelsRange?: string;
27691
29033
  /**
27692
29034
  * The position of the chart data labels.
27693
29035
  */
@@ -27953,6 +29295,9 @@ declare module GC{
27953
29295
  * The trendlines of the series.
27954
29296
  */
27955
29297
  trendlines?: GC.Spread.Sheets.Charts.TrendlineItem[];
29298
+ /**
29299
+ * Whether to show data in hidden rows and columns.
29300
+ */
27956
29301
  plotVisibleOnly?: boolean;
27957
29302
  /**
27958
29303
  * The hole size of the doughnut chart. This is used for doughnut chart, The maximum value is 0.9, the minimum value is 0.
@@ -28089,6 +29434,15 @@ declare module GC{
28089
29434
  fontColor?: string;
28090
29435
  }
28091
29436
 
29437
+
29438
+ /**
29439
+ * @typedef {Array} GC.Spread.Sheets.Charts.ColorScheme
29440
+ * @property {GC.Spread.Sheets.Charts.ColorRule} 0 - The color rule
29441
+ * @property {string[]} 1 - The colors list
29442
+ */
29443
+ export type ColorScheme =
29444
+ (GC.Spread.Sheets.Charts.ColorRule | string[])[]
29445
+
28092
29446
  /**
28093
29447
  * Specifies the point on the specified axis where the other axis crosses.
28094
29448
  * @enum {string}
@@ -28936,10 +30290,11 @@ declare module GC{
28936
30290
  * @param {number} y The <i>y</i> location of the chart.
28937
30291
  * @param {number} width The width of the chart.
28938
30292
  * @param {number} height The height of the chart.
28939
- * @param {string?} dataRange The formula string of data range for the chart.
28940
- * @param {GC.Spread.Sheets.Charts.RowCol?} dataOrientation The orientation of data for series.
30293
+ * @param {string} [dataRange] The formula string of data range for the chart.
30294
+ * @param {GC.Spread.Sheets.Charts.RowCol} [dataOrientation] The orientation of data for series.
30295
+ * @param {GC.Spread.Sheets.Charts.ColorScheme} [colorScheme] The color scheme of the chart.
28941
30296
  */
28942
- constructor(sheet: GC.Spread.Sheets.Worksheet, name: string, chartType: GC.Spread.Sheets.Charts.ChartType, x: number, y: number, width: number, height: number, dataRange?: string, dataOrientation?: GC.Spread.Sheets.Charts.RowCol);
30297
+ constructor(sheet: GC.Spread.Sheets.Worksheet, name: string, chartType: GC.Spread.Sheets.Charts.ChartType, x: number, y: number, width: number, height: number, dataRange?: string, dataOrientation?: GC.Spread.Sheets.Charts.RowCol, colorScheme?: GC.Spread.Sheets.Charts.ColorScheme);
28943
30298
  /** Represents the type name string used for supporting serialization.
28944
30299
  * @type {string}
28945
30300
  */
@@ -28992,6 +30347,12 @@ declare module GC{
28992
30347
  * @deprecated since version 17.0.0, This method is not available in the charts plugin, to use this method, please use the legacy-charts plugin.
28993
30348
  */
28994
30349
  cloneContent(): HTMLElement;
30350
+ /**
30351
+ * Gets or sets the chart colors.
30352
+ * @param {GC.Spread.Sheets.Charts.ColorScheme} value that represent the chart color style.
30353
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the current chart color style, otherwise, returns the chart.
30354
+ */
30355
+ colorScheme(value?: GC.Spread.Sheets.Charts.ColorScheme): GC.Spread.Sheets.Charts.ColorScheme | GC.Spread.Sheets.Charts.Chart;
28995
30356
  /**
28996
30357
  * Gets or sets the content of the custom chart.
28997
30358
  * @param {HTMLElement} value The content of the custom chart.
@@ -29182,6 +30543,15 @@ declare module GC{
29182
30543
  * @returns {GC.Spread.Sheets.Charts.IChartTitle | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the title of the chart; otherwise, returns the chart.
29183
30544
  */
29184
30545
  title(value?: GC.Spread.Sheets.Charts.IChartTitle): any;
30546
+ /**
30547
+ * Get the chart Image src of type Base64 string.
30548
+ * @returns {String} return the chart Image Base64 src string.
30549
+ * @example
30550
+ * ```
30551
+ * let chartImageSrc = sheet.charts.all()[0].toImageSrc();
30552
+ * ```
30553
+ */
30554
+ toImageSrc(): string;
29185
30555
  /**
29186
30556
  * Gets or sets whether apply animation to the chart.
29187
30557
  * @param {boolean} [value] whether apply animation to the chart.
@@ -29225,6 +30595,7 @@ declare module GC{
29225
30595
  * @param {number} height The height of the chart.
29226
30596
  * @param {string} dataRange The formula string of data range for the chart.
29227
30597
  * @param {GC.Spread.Sheets.Charts.RowCol} dataOrientation The orientation of data for series.
30598
+ * @param {GC.Spread.Sheets.Charts.ColorScheme} [colorScheme] The color style of the chart.
29228
30599
  * @return {GC.Spread.Sheets.Charts.Chart} The chart that has been added to the sheet.
29229
30600
  * @example
29230
30601
  * ```
@@ -29233,7 +30604,7 @@ declare module GC{
29233
30604
  * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
29234
30605
  * ```
29235
30606
  */
29236
- add(name: string, chartType: GC.Spread.Sheets.Charts.ChartType, x: number, y: number, width: number, height: number, dataRange?: string, dataOrientation?: GC.Spread.Sheets.Charts.RowCol): GC.Spread.Sheets.Charts.Chart;
30607
+ add(name: string, chartType: GC.Spread.Sheets.Charts.ChartType, x: number, y: number, width: number, height: number, dataRange?: string, dataOrientation?: GC.Spread.Sheets.Charts.RowCol, colorScheme?: GC.Spread.Sheets.Charts.ColorScheme): GC.Spread.Sheets.Charts.Chart;
29237
30608
  /**
29238
30609
  * Gets all of the charts in the sheet.
29239
30610
  * @return {GC.Spread.Sheets.Charts.Chart[]} The collection of all the charts in the sheet.
@@ -29319,6 +30690,167 @@ declare module GC{
29319
30690
  zIndex(name: string, zIndex?: number): any;
29320
30691
  }
29321
30692
 
30693
+ export class ColorSchemes{
30694
+ /**
30695
+ * Represents a built-in chart color scheme collection.
30696
+ * @class
30697
+ */
30698
+ constructor();
30699
+ /**
30700
+ * Gets the colorfulPalette1 style.
30701
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30702
+ * @example
30703
+ * ```
30704
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.colorfulPalette1);
30705
+ * ```
30706
+ */
30707
+ static colorfulPalette1: GC.Spread.Sheets.Charts.ColorScheme;
30708
+ /**
30709
+ * Gets the colorfulPalette2 style.
30710
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30711
+ * @example
30712
+ * ```
30713
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.colorfulPalette2);
30714
+ * ```
30715
+ */
30716
+ static colorfulPalette2: GC.Spread.Sheets.Charts.ColorScheme;
30717
+ /**
30718
+ * Gets the colorfulPalette3 style.
30719
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30720
+ * @example
30721
+ * ```
30722
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.colorfulPalette3);
30723
+ * ```
30724
+ */
30725
+ static colorfulPalette3: GC.Spread.Sheets.Charts.ColorScheme;
30726
+ /**
30727
+ * Gets the colorfulPalette4 style.
30728
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30729
+ * @example
30730
+ * ```
30731
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.colorfulPalette4);
30732
+ * ```
30733
+ */
30734
+ static colorfulPalette4: GC.Spread.Sheets.Charts.ColorScheme;
30735
+ /**
30736
+ * Gets the monochromaticPalette1 style.
30737
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30738
+ * @example
30739
+ * ```
30740
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette1);
30741
+ * ```
30742
+ */
30743
+ static monochromaticPalette1: GC.Spread.Sheets.Charts.ColorScheme;
30744
+ /**
30745
+ * Gets the monochromaticPalette10 style.
30746
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30747
+ * @example
30748
+ * ```
30749
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette10);
30750
+ * ```
30751
+ */
30752
+ static monochromaticPalette10: GC.Spread.Sheets.Charts.ColorScheme;
30753
+ /**
30754
+ * Gets the monochromaticPalette11 style.
30755
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30756
+ * @example
30757
+ * ```
30758
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette11);
30759
+ * ```
30760
+ */
30761
+ static monochromaticPalette11: GC.Spread.Sheets.Charts.ColorScheme;
30762
+ /**
30763
+ * Gets the monochromaticPalette12 style.
30764
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30765
+ * @example
30766
+ * ```
30767
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette12);
30768
+ * ```
30769
+ */
30770
+ static monochromaticPalette12: GC.Spread.Sheets.Charts.ColorScheme;
30771
+ /**
30772
+ * Gets the monochromaticPalette13 style.
30773
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30774
+ * @example
30775
+ * ```
30776
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette13);
30777
+ * ```
30778
+ */
30779
+ static monochromaticPalette13: GC.Spread.Sheets.Charts.ColorScheme;
30780
+ /**
30781
+ * Gets the monochromaticPalette2 style.
30782
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30783
+ * @example
30784
+ * ```
30785
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette2);
30786
+ * ```
30787
+ */
30788
+ static monochromaticPalette2: GC.Spread.Sheets.Charts.ColorScheme;
30789
+ /**
30790
+ * Gets the monochromaticPalette3 style.
30791
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30792
+ * @example
30793
+ * ```
30794
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette3);
30795
+ * ```
30796
+ */
30797
+ static monochromaticPalette3: GC.Spread.Sheets.Charts.ColorScheme;
30798
+ /**
30799
+ * Gets the monochromaticPalette4 style.
30800
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30801
+ * @example
30802
+ * ```
30803
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette4);
30804
+ * ```
30805
+ */
30806
+ static monochromaticPalette4: GC.Spread.Sheets.Charts.ColorScheme;
30807
+ /**
30808
+ * Gets the monochromaticPalette5 style.
30809
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30810
+ * @example
30811
+ * ```
30812
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette5);
30813
+ * ```
30814
+ */
30815
+ static monochromaticPalette5: GC.Spread.Sheets.Charts.ColorScheme;
30816
+ /**
30817
+ * Gets the monochromaticPalette6 style.
30818
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30819
+ * @example
30820
+ * ```
30821
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette6);
30822
+ * ```
30823
+ */
30824
+ static monochromaticPalette6: GC.Spread.Sheets.Charts.ColorScheme;
30825
+ /**
30826
+ * Gets the monochromaticPalette7 style.
30827
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30828
+ * @example
30829
+ * ```
30830
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette7);
30831
+ * ```
30832
+ */
30833
+ static monochromaticPalette7: GC.Spread.Sheets.Charts.ColorScheme;
30834
+ /**
30835
+ * Gets the monochromaticPalette8 style.
30836
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30837
+ * @example
30838
+ * ```
30839
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette8);
30840
+ * ```
30841
+ */
30842
+ static monochromaticPalette8: GC.Spread.Sheets.Charts.ColorScheme;
30843
+ /**
30844
+ * Gets the monochromaticPalette9 style.
30845
+ * @returns {GC.Spread.Sheets.Charts.ColorScheme}
30846
+ * @example
30847
+ * ```
30848
+ * var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, "A1:D4", GC.Spread.Sheets.Charts.RowCol.rows, GC.Spread.Sheets.Charts.ColorSchemes.monochromaticPalette9);
30849
+ * ```
30850
+ */
30851
+ static monochromaticPalette9: GC.Spread.Sheets.Charts.ColorScheme;
30852
+ }
30853
+
29322
30854
  export class Points{
29323
30855
  /**
29324
30856
  * Represents the dataPoint collection that managers all dataPoints in a chart series.
@@ -29671,6 +31203,25 @@ declare module GC{
29671
31203
  * ```
29672
31204
  */
29673
31205
  var cut: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
31206
+ /**
31207
+ * Represents the command used to define the column.
31208
+ * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
31209
+ * @property {function} execute - performs an execute or undo operation.
31210
+ * The arguments of the execute method are as follows.
31211
+ * @param {GC.Spread.Sheets.Workbook} context The context of the operation.
31212
+ * @param {Object} options The options of the operation.
31213
+ * @param {string} options.sheetName The sheet name.
31214
+ * @param {number} [options.col] The specified col for inserting, optional.
31215
+ * @param {GC.Data.IColumn} options.column The defined column.
31216
+ * @param {boolean} isUndo `true` if this is an undo operation; otherwise, `false`.
31217
+ * @example
31218
+ * ```
31219
+ * //This example uses the define column action.
31220
+ * // define the column properties
31221
+ * spread.commandManager().execute({cmd: "DefineColumn", sheetName: "Sheet1", { col: 1, column: { value: 'column1' }}});
31222
+ * ```
31223
+ */
31224
+ var DefineColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, col?: number, column: GC.Data.IColumn}): any};
29674
31225
  /**
29675
31226
  * Represents the command for deleting the floating objects.
29676
31227
  * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
@@ -29852,6 +31403,25 @@ declare module GC{
29852
31403
  * ```
29853
31404
  */
29854
31405
  var fill: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, startRange: GC.Spread.Sheets.Range, fillRange: GC.Spread.Sheets.Range, autoFillType: GC.Spread.Sheets.Fill.AutoFillType, fillDirection: GC.Spread.Sheets.Fill.FillDirection}, isUndo: boolean): boolean};
31406
+ /**
31407
+ * Represents the command used to modify the column.
31408
+ * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
31409
+ * @property {function} execute - performs an execute or undo operation.
31410
+ * The arguments of the execute method are as follows.
31411
+ * @param {GC.Spread.Sheets.Workbook} context The context of the operation.
31412
+ * @param {Object} options The options of the operation.
31413
+ * @param {string} options.sheetName The sheet name.
31414
+ * @param {number} options.col The specified col.
31415
+ * @param {GC.Data.IColumn} options.column The modified column.
31416
+ * @param {boolean} isUndo `true` if this is an undo operation; otherwise, `false`.
31417
+ * @example
31418
+ * ```
31419
+ * //This example uses the modify column action.
31420
+ * // modify the column properties
31421
+ * spread.commandManager().execute({cmd: "ModifyColumn", sheetName: "Sheet1", { col: 1, column: { value: 'column1' }}});
31422
+ * ```
31423
+ */
31424
+ var ModifyColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, col: number, column: GC.Data.IColumn}): any};
29855
31425
  /**
29856
31426
  * Represents the command for moving floating objects.
29857
31427
  * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
@@ -30513,6 +32083,24 @@ declare module GC{
30513
32083
  * ```
30514
32084
  */
30515
32085
  var redo: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
32086
+ /**
32087
+ * Represents the command used to remove the column.
32088
+ * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
32089
+ * @property {function} execute - performs an execute or undo operation.
32090
+ * The arguments of the execute method are as follows.
32091
+ * @param {GC.Spread.Sheets.Workbook} context The context of the operation.
32092
+ * @param {Object} options The options of the operation.
32093
+ * @param {string} options.sheetName The sheet name.
32094
+ * @param {number} options.col The specified col.
32095
+ * @param {boolean} isUndo `true` if this is an undo operation; otherwise, `false`.
32096
+ * @example
32097
+ * ```
32098
+ * //This example uses the remove column action.
32099
+ * // remove the column properties
32100
+ * spread.commandManager().execute({cmd: "RemoveColumn", sheetName: "Sheet1", { col: 1 }});
32101
+ * ```
32102
+ */
32103
+ var RemoveColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, col: number}): any};
30516
32104
  /**
30517
32105
  * Represents the command for ungrouping a column outline (range group) on a sheet.
30518
32106
  * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
@@ -44628,6 +46216,15 @@ declare module GC{
44628
46216
  * ```
44629
46217
  */
44630
46218
  startRowOffset(value?: number): any;
46219
+ /**
46220
+ * Get the shape Image src of type Base64 string.
46221
+ * @returns {String} return the shape Image Base64 src string.
46222
+ * @example
46223
+ * ```
46224
+ * let shapeImageSrc = sheet.shapes.all()[0].toImageSrc();
46225
+ * ```
46226
+ */
46227
+ toImageSrc(): string;
44631
46228
  /**
44632
46229
  * Gets or sets the width of the shape.
44633
46230
  * @param {number | string} value The width of the shape specified by a number or formula (starts with =) can get a number value.
@@ -45035,7 +46632,8 @@ declare module GC{
45035
46632
  module Slicers{
45036
46633
 
45037
46634
  export interface ISlicer{
45038
- style: (style?: SlicerStyle, shouldCallback?: boolean) => SlicerStyle | ISlicer;
46635
+ style: (style?: string | SlicerStyle, shouldCallback?: boolean) => SlicerStyle | ISlicer;
46636
+ getStyleName: () => string | undefined;
45039
46637
  name: (name?: string, shouldCallback?: boolean) => string | ISlicer;
45040
46638
  captionName: (name?: string, shouldCallback?: boolean) => string | ISlicer;
45041
46639
  columnCount: (value?: number, shouldCallback?: boolean) => number | ISlicer;
@@ -45071,6 +46669,7 @@ declare module GC{
45071
46669
  endColumnOffset: (value?: number, shouldCallback?: boolean) => number | ISlicer;
45072
46670
  allowResize: (value?: boolean, shouldCallback?: boolean) => boolean | ISlicer;
45073
46671
  allowMove: (value?: boolean, shouldCallback?: boolean) => boolean | ISlicer;
46672
+ toImageSrc: () => string | ISlicer;
45074
46673
  }
45075
46674
 
45076
46675
 
@@ -45125,6 +46724,144 @@ declare module GC{
45125
46724
  }
45126
46725
 
45127
46726
 
46727
+ export class CustomSlicerThemeManager extends GC.Spread.Sheets.CustomThemeManagerBase{
46728
+ /**
46729
+ * Represents a custom slicer theme manager that can manage all custom slicer themes.
46730
+ * @class
46731
+ * @param {GC.Spread.Sheets.Workbook} workbook The workbook.
46732
+ * @extends GC.Spread.Sheets.CustomThemeManagerBase
46733
+ */
46734
+ constructor(workbook: GC.Spread.Sheets.Workbook);
46735
+ /**
46736
+ * add a new slicer theme.
46737
+ * @param {string | GC.Spread.Sheets.Slicers.SlicerStyle} theme the new slicer theme or just a new slicer theme name you want to add
46738
+ * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | undefined} return the newly added slicer theme, if the named slicer theme is existed, failed to add slicer theme and return undefined
46739
+ * @example
46740
+ * ```
46741
+ * // add a new slicer theme named "custom0"
46742
+ * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
46743
+ * let slicerStyle = spread.customSlicerThemes.add("custom0");
46744
+ * let wholeSlicerStyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
46745
+ * wholeSlicerStyle.backColor = "#0C66E4";
46746
+ * slicerStyle.wholeSlicerStyle(wholeSlicerStyle);
46747
+ * ```
46748
+ */
46749
+ add(theme: string | GC.Spread.Sheets.Slicers.SlicerStyle): GC.Spread.Sheets.Slicers.SlicerStyle | undefined;
46750
+ /**
46751
+ * get the slicer themes collection.
46752
+ * @returns Array<GC.Spread.Sheets.Slicers.SlicerStyle>
46753
+ * @example
46754
+ * ```
46755
+ * // get all slicer slicer themes
46756
+ * let slicerStylesCollection = spread.customSlicerThemes.all();
46757
+ * ```
46758
+ */
46759
+ all(): Array<GC.Spread.Sheets.Slicers.SlicerStyle>;
46760
+ /**
46761
+ * get the slicer theme by name.
46762
+ * @param {string} name the specific name of the slicer theme to get
46763
+ * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | undefined} If the corresponding slicer theme with the spefic name is found, return the theme; otherwise, return undefined.
46764
+ * @example
46765
+ * ```
46766
+ * // get slicer theme
46767
+ * slicerStyle = spread.customSlicerThemes.get("custom0");
46768
+ * ```
46769
+ */
46770
+ get(name: string): GC.Spread.Sheets.Slicers.SlicerStyle | undefined;
46771
+ /**
46772
+ * remove the slicer theme by name.
46773
+ * @param {string} name the specific name of the slicer theme to remove
46774
+ * @returns {void}
46775
+ * @example
46776
+ * ```
46777
+ * // delete slicer theme
46778
+ * spread.customSlicerThemes.remove("custom0");
46779
+ * ```
46780
+ */
46781
+ remove(name: string): void;
46782
+ /**
46783
+ * update the slicer theme.
46784
+ * @param {string} oldThemeName the specific name of the slicer theme to update
46785
+ * @param {GC.Spread.Sheets.Slicers.SlicerStyle} newTheme the specific name of the slicer theme to update
46786
+ * @returns {void}
46787
+ * @example
46788
+ * ```
46789
+ * // update slicer theme
46790
+ * slicerStyle = spread.customSlicerThemes.update("custom0", new GC.Spread.Sheets.Slicers.SlicerStyle());
46791
+ * ```
46792
+ */
46793
+ update(oldThemeName: string, newTheme: GC.Spread.Sheets.Slicers.SlicerStyle): void;
46794
+ }
46795
+
46796
+ export class CustomTimelineThemeManager extends GC.Spread.Sheets.CustomThemeManagerBase{
46797
+ /**
46798
+ * Represents a custom timeline slicer theme manager that can manage all custom timeline slicer themes.
46799
+ * @class
46800
+ * @param {GC.Spread.Sheets.Workbook} workbook The workbook.
46801
+ * @extends GC.Spread.Sheets.CustomThemeManagerBase
46802
+ */
46803
+ constructor(workbook: GC.Spread.Sheets.Workbook);
46804
+ /**
46805
+ * add a new timeLine theme.
46806
+ * @param {string | GC.Spread.Sheets.Slicers.TimelineStyle} theme the new timeLine theme or just a new timeLine theme name you want to add.
46807
+ * @returns {GC.Spread.Sheets.Slicers.TimelineStyle | undefined} return the newly added timeLine theme, if the named timeLine theme is existed, failed to add timeLine theme and return undefined
46808
+ * @example
46809
+ * ```
46810
+ * // add a new timeLine theme named "custom0"
46811
+ * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
46812
+ * let timeLineStyle = spread.customTimelineThemes.add("custom0");
46813
+ * let wholeTimelineStyle = new GC.Spread.Sheets.Slicers.TimelineStyleInfo();
46814
+ * wholeTimelineStyle.backColor = "#0C66E4";
46815
+ * timeLineStyle.wholeTimelineStyle(wholeTimelineStyle);
46816
+ * ```
46817
+ */
46818
+ add(theme: string | GC.Spread.Sheets.Slicers.TimelineStyle): GC.Spread.Sheets.Slicers.TimelineStyle | undefined;
46819
+ /**
46820
+ * get the timeLine themes collection.
46821
+ * @returns Array<GC.Spread.Sheets.Slicers.TimelineStyle>
46822
+ * @example
46823
+ * ```
46824
+ * // get all timeLine timeLine themes
46825
+ * let timeLineStylesCollection = spread.customTimelineThemes.all();
46826
+ * ```
46827
+ */
46828
+ all(): Array<GC.Spread.Sheets.Slicers.TimelineStyle>;
46829
+ /**
46830
+ * get the timeLine theme by name.
46831
+ * @param {string} name the specific name of the timeLine theme to get
46832
+ * @returns {GC.Spread.Sheets.Slicers.TimelineStyle | undefined} If the corresponding timeLine theme with the spefic name is found, return the theme; otherwise, return undefined.
46833
+ * @example
46834
+ * ```
46835
+ * // get timeLine theme
46836
+ * timeLineStyle = spread.customTimelineThemes.get("custom0");
46837
+ * ```
46838
+ */
46839
+ get(name: string): GC.Spread.Sheets.Slicers.TimelineStyle | undefined;
46840
+ /**
46841
+ * remove the timeLine theme by name.
46842
+ * @param {string} name the specific name of the timeLine theme to remove
46843
+ * @returns {void}
46844
+ * @example
46845
+ * ```
46846
+ * // delete timeLine theme
46847
+ * spread.customTimelineThemes.remove("custom0");
46848
+ * ```
46849
+ */
46850
+ remove(name: string): void;
46851
+ /**
46852
+ * update the timeline slicer theme.
46853
+ * @param {string} oldThemeName the specific name of the timeline slicer theme to update
46854
+ * @param {GC.Spread.Sheets.Slicers.TimelineStyle} newTheme the specific name of the timeline slicer theme to update
46855
+ * @returns {void}
46856
+ * @example
46857
+ * ```
46858
+ * // update timeline slicer theme
46859
+ * timelineStyle = spread.customTimelineThemes.update("custom0", new GC.Spread.Sheets.Slicers.TimelineStyle());
46860
+ * ```
46861
+ */
46862
+ update(oldThemeName: string, newTheme: GC.Spread.Sheets.Slicers.TimelineStyle): void;
46863
+ }
46864
+
45128
46865
  export class DOMTableSlicer extends GC.Spread.Sheets.FloatingObjects.FloatingObject{
45129
46866
  /**
45130
46867
  * Represents a slicer.
@@ -45400,7 +47137,7 @@ declare module GC{
45400
47137
  sortState(value?: GC.Spread.Sheets.SortState): any;
45401
47138
  /**
45402
47139
  * Gets or sets the style of the slicer.
45403
- * @param {GC.Spread.Sheets.Slicers.SlicerStyle} value The style of the slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer, defining its overall look and presentation.
47140
+ * @param {string | GC.Spread.Sheets.Slicers.SlicerStyle} value The style or style name of the slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer, defining its overall look and presentation.
45404
47141
  * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.ISlicer} If no value is set, returns The style of the slicer; otherwise, returns the slicer.
45405
47142
  * @example
45406
47143
  * ```
@@ -45430,7 +47167,16 @@ declare module GC{
45430
47167
  * slicer.style(style1);
45431
47168
  * ```
45432
47169
  */
45433
- style(value?: GC.Spread.Sheets.Slicers.SlicerStyle): any;
47170
+ style(value?: string | GC.Spread.Sheets.Slicers.SlicerStyle): any;
47171
+ /**
47172
+ * Get the slicer Image src of type Base64 string.
47173
+ * @returns {String} return the slicer Image Base64 src string.
47174
+ * @example
47175
+ * ```
47176
+ * let slicerImageSrc = sheet.slicers.all()[0].toImageSrc();
47177
+ * ```
47178
+ */
47179
+ toImageSrc(): string;
45434
47180
  /**
45435
47181
  * Gets or sets whether to visually distinguish the items with no data.
45436
47182
  * @param {boolean} [value] The setting for items with no data. The visuallyNoDataItems property of a slicer specifies the visual representation or handling of items with no associated data within the slicer.
@@ -45560,6 +47306,11 @@ declare module GC{
45560
47306
  * ```
45561
47307
  */
45562
47308
  getDOMElement(): HTMLElement;
47309
+ /**
47310
+ * Gets or sets a style name for the table item slicer.
47311
+ * @returns {string} returns the table item slicer style name.
47312
+ */
47313
+ getStyleName(): string | undefined;
45563
47314
  /**
45564
47315
  * Gets or sets the height of the item slicer.
45565
47316
  * @param {number} [value] The height of the item slicer. The height property of a slicer specifies the vertical dimension or height of the slicer, determining its size along the y-axis.
@@ -45737,8 +47488,8 @@ declare module GC{
45737
47488
  sortState(value?: GC.Spread.Sheets.SortState): any;
45738
47489
  /**
45739
47490
  * Gets or sets the style of the item slicer.
45740
- * @param {Object} value The style of the item slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer control, defining its overall look and presentation.
45741
- * @returns {Object | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns The style of the item slicer; otherwise, returns the item slicer.
47491
+ * @param {string | GC.Spread.Sheets.Slicers.SlicerStyle} value The style or style name of the item slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer control, defining its overall look and presentation.
47492
+ * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns The style of the item slicer; otherwise, returns the item slicer.
45742
47493
  * @example
45743
47494
  * ```
45744
47495
  * The style is json data, its json schema is as follows:
@@ -45847,7 +47598,7 @@ declare module GC{
45847
47598
  * console.log(newValue);
45848
47599
  * ```
45849
47600
  */
45850
- style(value?: any): any;
47601
+ style(value?: string | GC.Spread.Sheets.Slicers.SlicerStyle): GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.ItemSlicer;
45851
47602
  /**
45852
47603
  * Gets or sets whether to visually distinguish the items with no data.
45853
47604
  * @param {boolean} [value] The setting for items with no data. The visuallyNoDataItems property of a slicer specifies the visual representation or handling of items with no associated data within the slicer control.
@@ -46553,7 +48304,7 @@ declare module GC{
46553
48304
  startRowOffset(value?: number): any;
46554
48305
  /**
46555
48306
  * Gets or sets the style of the slicer.
46556
- * @param {GC.Spread.Sheets.Slicers.SlicerStyle} [value] The style of the slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer control, defining its overall look and presentation.
48307
+ * @param {string | GC.Spread.Sheets.Slicers.SlicerStyle} [value] The style of the slicer. The style property of a slicer specifies the visual appearance and formatting style applied to the slicer control, defining its overall look and presentation.
46557
48308
  * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.IItemSlicer} If no style is set, returns the style of the slicer; otherwise, returns the slicer.
46558
48309
  * @example
46559
48310
  * ```
@@ -46579,7 +48330,16 @@ declare module GC{
46579
48330
  * console.log(newValue);
46580
48331
  * ```
46581
48332
  */
46582
- style(value?: GC.Spread.Sheets.Slicers.SlicerStyle): any;
48333
+ style(value?: string | GC.Spread.Sheets.Slicers.SlicerStyle): any;
48334
+ /**
48335
+ * Get the slicer Image src of type Base64 string.
48336
+ * @returns {String} return the slicer Image Base64 src string.
48337
+ * @example
48338
+ * ```
48339
+ * let slicerImageSrc = sheet.slicers.all()[0].toImageSrc();
48340
+ * ```
48341
+ */
48342
+ toImageSrc(): string;
46583
48343
  /**
46584
48344
  * Gets or sets the visuallyNoDataItems of the slicer.
46585
48345
  * @param {boolean} [value] The visuallyNoDataItems of the slicer. The visuallyNoDataItems property of a slicer specifies the visual representation or handling of items with no associated data within the slicer control.
@@ -46678,7 +48438,7 @@ declare module GC{
46678
48438
  /**
46679
48439
  * Represents the slicer border.
46680
48440
  * @param {number} borderWidth The border width.
46681
- * @param {string} borderStyle The border style.
48441
+ * @param {GC.Spread.Sheets.Slicers.SlicerBorderStyle} borderStyle The border style.
46682
48442
  * @param {string} borderColor The border color.
46683
48443
  * @class
46684
48444
  * @example
@@ -46714,7 +48474,7 @@ declare module GC{
46714
48474
  * slicer.style(style1);
46715
48475
  * ```
46716
48476
  */
46717
- constructor(borderWidth: number, borderStyle: string, borderColor: string);
48477
+ constructor(borderWidth: number, borderStyle: GC.Spread.Sheets.Slicers.SlicerBorderStyle, borderColor: string);
46718
48478
  /**
46719
48479
  * Gets or sets the border color.
46720
48480
  * @param {string} [value] The border color.
@@ -46757,9 +48517,8 @@ declare module GC{
46757
48517
  borderColor(value?: string): any;
46758
48518
  /**
46759
48519
  * Gets or sets the border style.
46760
- * @param {string} [value] The border style. <br/>
46761
- * the valid border styles are: "empty", "thin", "medium", "dashed", "dotted", "thick", "double", "hair", "mediumDashed", "dashDot", "mediumDashDot", "dashDotDot", "mediumDashDotDot", "slantedDashDot"
46762
- * @returns {string | GC.Spread.Sheets.Slicers.SlicerBorder} If no value is set, returns the border style; otherwise, returns the slicer border.
48520
+ * @param {GC.Spread.Sheets.Slicers.SlicerBorderStyle} [value] The border style. <br/>
48521
+ * @returns {GC.Spread.Sheets.Slicers.SlicerBorderStyle | GC.Spread.Sheets.Slicers.SlicerBorder} If no value is set, returns the border style; otherwise, returns the slicer border.
46763
48522
  * @example
46764
48523
  * ```
46765
48524
  * //create a table
@@ -46795,7 +48554,7 @@ declare module GC{
46795
48554
  * slicer.style(style1);
46796
48555
  * ```
46797
48556
  */
46798
- borderStyle(value?: string): any;
48557
+ borderStyle(value?: GC.Spread.Sheets.Slicers.SlicerBorderStyle): any;
46799
48558
  /**
46800
48559
  * Gets or sets the border width.
46801
48560
  * @param {number} [value] The border width.
@@ -46850,7 +48609,7 @@ declare module GC{
46850
48609
  * @param {string} slicerName The name of the slicer.
46851
48610
  * @param {string} targetName The name of the table or pivot table that relates to the slicer.
46852
48611
  * @param {string} itemName The name of the table column or pivot table field that relates to the slicer.
46853
- * @param {GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.TimelineStyle} style The style of the slicer.
48612
+ * @param {string | GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.TimelineStyle} style The style of the slicer.
46854
48613
  * @param {GC.Spread.Sheets.Slicers.SlicerType} [type] slicer type, table slicer / pivot item slicer / pivot timeline slicer have their own type.
46855
48614
  * @return {GC.Spread.Sheets.Slicers.ISlicer} The slicer that has been added to the sheet.
46856
48615
  * @example
@@ -46877,7 +48636,7 @@ declare module GC{
46877
48636
  * slicer.position(new GC.Spread.Sheets.Point(100, 200));
46878
48637
  * ```
46879
48638
  */
46880
- add(slicerName: string, targetName: string, itemName: string, style: GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.TimelineStyle, type?: GC.Spread.Sheets.Slicers.SlicerType): GC.Spread.Sheets.Slicers.ISlicer;
48639
+ add(slicerName: string, targetName: string, itemName: string, style?: string | GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.TimelineStyle, type?: GC.Spread.Sheets.Slicers.SlicerType): GC.Spread.Sheets.Slicers.ISlicer;
46881
48640
  /**
46882
48641
  * Gets all of the slicers in the sheet with the indicated table name and column name.
46883
48642
  * @param {string} [targetName] The name of the target (table or pivot table).
@@ -46990,8 +48749,52 @@ declare module GC{
46990
48749
  /**
46991
48750
  * Represents the slicer style settings.
46992
48751
  * @class
48752
+ * @example
48753
+ * ```
48754
+ * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
48755
+ * var activeSheet = spread.getActiveSheet();
48756
+ * var datas = [
48757
+ * ["1", "NewYork", "1968/6/8"],
48758
+ * ["4", "NewYork", "1972/7/3"],
48759
+ * ["4", "NewYork", "1964/3/2"]];
48760
+ * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
48761
+ * var dataColumns = ["Name", "City", "Birthday"];
48762
+ * table.setColumnName(0, dataColumns[0]);
48763
+ * table.setColumnName(1, dataColumns[1]);
48764
+ * table.setColumnName(2, dataColumns[2]);
48765
+ * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
48766
+
48767
+ * //set customized style
48768
+ * var style = new GC.Spread.Sheets.Slicers.SlicerStyle();
48769
+ * var styleInfo1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
48770
+ * styleInfo1.backColor("orange");
48771
+ * styleInfo1.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(2,"solid","green"));
48772
+ * style.wholeSlicerStyle(styleInfo1);
48773
+ * var styleInfo2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
48774
+ * styleInfo2.backColor("red");
48775
+ * styleInfo2.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(4,"solid","gray"));
48776
+ * style.hoveredSelectedItemWithDataStyle(styleInfo2);
48777
+ * slicer.style(style);
48778
+ * ```
46993
48779
  */
46994
48780
  constructor();
48781
+ /**
48782
+ * Loads the object state from the specified JSON string.
48783
+ * @param {Object} data The item slicer theme data from deserialization.
48784
+ * @example
48785
+ * ```
48786
+ * //This example uses the fromJSON method.
48787
+ * const light1 = GC.Spread.Sheets.Slicers.SlicerStyles.light1();
48788
+ * //export
48789
+ * const jsonStr = JSON.stringify(light1.toJSON());
48790
+ * //import
48791
+ * const newTheme = new GC.Spread.Sheets.Slicers.SlicerStyle();
48792
+ * newTheme.fromJSON(JSON.parse(jsonStr));
48793
+ * newTheme.name('custom1');
48794
+ * alert(jsonStr);
48795
+ * ```
48796
+ */
48797
+ fromJSON(data: Object): void;
46995
48798
  /**
46996
48799
  * Gets or sets the style of the slicer header.
46997
48800
  * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the slicer header.
@@ -47440,6 +49243,23 @@ declare module GC{
47440
49243
  * ```
47441
49244
  */
47442
49245
  selectedItemWithNoDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
49246
+ /**
49247
+ * Saves the object state to a JSON string.
49248
+ * @returns {Object} The item slicer theme data.
49249
+ * @example
49250
+ * ```
49251
+ * //This example uses the toJSON method.
49252
+ * const light1 = GC.Spread.Sheets.Slicers.SlicerStyles.light1();
49253
+ * //export
49254
+ * const jsonStr = JSON.stringify(light1.toJSON());
49255
+ * //import
49256
+ * const newTheme = new GC.Spread.Sheets.Slicers.SlicerStyle();
49257
+ * newTheme.fromJSON(JSON.parse(jsonStr));
49258
+ * newTheme.name('custom1');
49259
+ * alert(jsonStr);
49260
+ * ```
49261
+ */
49262
+ toJSON(): Object;
47443
49263
  /**
47444
49264
  * Gets or sets the style of the unselected item with data.
47445
49265
  * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the unselected item with data.
@@ -48571,8 +50391,49 @@ declare module GC{
48571
50391
  /**
48572
50392
  * Represents the timeline style settings.
48573
50393
  * @class
50394
+ * @example
50395
+ * ```
50396
+ * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
50397
+ * var activeSheet = spread.getActiveSheet();
50398
+ * var datas = [
50399
+ * ["1", "NewYork", new Date("1968/6/8")],
50400
+ * ["4", "NewYork", new Date("1972/7/3")],
50401
+ * ["4", "NewYork", new Date("1964/3/2")]];
50402
+ * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
50403
+ * var dataColumns = ["Name", "City", "Birthday"];
50404
+ * table.setColumnName(0, dataColumns[0]);
50405
+ * table.setColumnName(1, dataColumns[1]);
50406
+ * table.setColumnName(2, dataColumns[2]);
50407
+ *
50408
+ * var pivotTable = sheet.pivotTables.add('pivotTable1', table.name(), 11, 1);
50409
+ * var timeline = sheet.slicers.add('timeline1', 'pivotTable1', 'Birthday', GC.Spread.Sheets.Slicers.TimelineStyles.dark1(), GC.Spread.Sheets.Slicers.SlicerType.pivotTimeline);
50410
+ *
50411
+ * var style = new GC.Spread.Sheets.Slicers.TimelineStyle()
50412
+ * style.wholeSlicerStyle(new GC.Spread.Sheets.Slicers.SlicerStyleInfo('red', 'blue', '12pt Calibri'));
50413
+ * style.headerStyle(new GC.Spread.Sheets.Slicers.SlicerStyleInfo(undefined, 'green', '14pt Calibri'));
50414
+ * style.timeLevelStyle(new GC.Spread.Sheets.Slicers.SlicerStyleInfo('yellow'));
50415
+ *
50416
+ * timeline.style(style);
50417
+ * ```
48574
50418
  */
48575
50419
  constructor();
50420
+ /**
50421
+ * Loads the object state from the specified JSON string.
50422
+ * @param {Object} data The timeline slicer theme data from deserialization.
50423
+ * @example
50424
+ * ```
50425
+ * //This example uses the fromJSON method.
50426
+ * const light1 = GC.Spread.Sheets.Slicers.TimelineStyles.light1();
50427
+ * //export
50428
+ * const jsonStr = JSON.stringify(light1.toJSON());
50429
+ * //import
50430
+ * const newTheme = new GC.Spread.Sheets.Slicers.TimelineStyle();
50431
+ * newTheme.fromJSON(JSON.parse(jsonStr));
50432
+ * newTheme.name('custom1');
50433
+ * alert(jsonStr);
50434
+ * ```
50435
+ */
50436
+ fromJSON(data: Object): void;
48576
50437
  /**
48577
50438
  * Gets or sets the style of the slicer header.
48578
50439
  * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the slicer header.
@@ -48812,6 +50673,23 @@ declare module GC{
48812
50673
  * ```
48813
50674
  */
48814
50675
  timeLevelStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
50676
+ /**
50677
+ * Saves the object state to a JSON string.
50678
+ * @returns {Object} The timeline slicer theme data.
50679
+ * @example
50680
+ * ```
50681
+ * //This example uses the toJSON method.
50682
+ * const light1 = GC.Spread.Sheets.Slicers.TimelineStyles.light1();
50683
+ * //export
50684
+ * const jsonStr = JSON.stringify(light1.toJSON());
50685
+ * //import
50686
+ * const newTheme = new GC.Spread.Sheets.Slicers.TimelineStyle();
50687
+ * newTheme.fromJSON(JSON.parse(jsonStr));
50688
+ * newTheme.name('custom1');
50689
+ * alert(jsonStr);
50690
+ * ```
50691
+ */
50692
+ toJSON(): Object;
48815
50693
  /**
48816
50694
  * Gets or sets the style of the unselected time block.
48817
50695
  * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the unselected time block.
@@ -50585,6 +52463,75 @@ declare module GC{
50585
52463
  }
50586
52464
 
50587
52465
 
52466
+ export class CustomTableThemeManager extends GC.Spread.Sheets.CustomThemeManagerBase{
52467
+ /**
52468
+ * Represents a custom table theme manager that can manage all custom table themes.
52469
+ * @class
52470
+ * @param {GC.Spread.Sheets.Workbook} workbook The workbook.
52471
+ * @extends GC.Spread.Sheets.CustomThemeManagerBase
52472
+ */
52473
+ constructor(workbook: GC.Spread.Sheets.Workbook);
52474
+ /**
52475
+ * add a new table theme.
52476
+ * @param {string | GC.Spread.Sheets.Tables.TableTheme} theme the new table theme or just a new table theme name you want to add
52477
+ * @returns {GC.Spread.Sheets.Tables.TableTheme | undefined} return the newly added table theme, if the named table theme is existed, failed to add table theme and return undefined
52478
+ * @example
52479
+ * ```
52480
+ * // add a new table theme named "custom0"
52481
+ * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
52482
+ * let tableStyle = spread.customTableThemes.add("custom0");
52483
+ * let firstColumnStripStyle = new GC.Spread.Sheets.Tables.TableStyle();
52484
+ * firstColumnStripStyle.backColor = "#0C66E4";
52485
+ * tableStyle.firstColumnStripStyle(firstColumnStripStyle);
52486
+ * ```
52487
+ */
52488
+ add(theme: string | GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.TableTheme | undefined;
52489
+ /**
52490
+ * get the table themes collection.
52491
+ * @returns Array<GC.Spread.Sheets.Tables.TableTheme>
52492
+ * @example
52493
+ * ```
52494
+ * // get all table table themes
52495
+ * let tableStylesCollection = spread.customTableThemes.all();
52496
+ * ```
52497
+ */
52498
+ all(): Array<GC.Spread.Sheets.Tables.TableTheme>;
52499
+ /**
52500
+ * get the table theme by name.
52501
+ * @param {string} name the specific name of the table theme to get
52502
+ * @returns {GC.Spread.Sheets.Tables.TableTheme | undefined} If the corresponding table theme with the spefic name is found, return the theme; otherwise, return undefined.
52503
+ * @example
52504
+ * ```
52505
+ * // get table theme
52506
+ * tableStyle = spread.customTableThemes.get("custom0");
52507
+ * ```
52508
+ */
52509
+ get(name: string): GC.Spread.Sheets.Tables.TableTheme | undefined;
52510
+ /**
52511
+ * remove the table theme by name.
52512
+ * @param {string} name the specific name of the table theme to remove
52513
+ * @returns {void}
52514
+ * @example
52515
+ * ```
52516
+ * // delete table theme
52517
+ * spread.customTableThemes.remove("custom0");
52518
+ * ```
52519
+ */
52520
+ remove(name: string): void;
52521
+ /**
52522
+ * update the table theme.
52523
+ * @param {string} oldThemeName the specific name of the table theme to update
52524
+ * @param {GC.Spread.Sheets.Tables.TableTheme} newTheme the specific name of the table theme to update
52525
+ * @returns {void}
52526
+ * @example
52527
+ * ```
52528
+ * // update table theme
52529
+ * tableStyle = spread.customTableThemes.update("custom0", new GC.Spread.Sheets.Tables.TableTheme());
52530
+ * ```
52531
+ */
52532
+ update(oldThemeName: string, newTheme: GC.Spread.Sheets.Tables.TableTheme): void;
52533
+ }
52534
+
50588
52535
  export class Table{
50589
52536
  /**
50590
52537
  * Represents a table that can be added in a sheet.
@@ -50594,14 +52541,14 @@ declare module GC{
50594
52541
  * @param {number} col The table column index.
50595
52542
  * @param {number} rowCount The table row count.
50596
52543
  * @param {number} colCount The table column count.
50597
- * @param {GC.Spread.Sheets.Tables.TableTheme} style The table style.
52544
+ * @param {string | GC.Spread.Sheets.Tables.TableTheme} style The table style or style name.
50598
52545
  * @param {Object} options The initialization options of the table.
50599
52546
  * @param {boolean} [options.showHeader] - Whether to display the table header.
50600
52547
  * @param {boolean} [options.showFooter] - Whether to display a footer.
50601
52548
  * @param {boolean} [options.useFooterDropDownList] - whether to use the footer dropdown list for a total row.
50602
52549
  * @param {boolean} [options.showResizeHandle] - Whether to display the resize handle for table.
50603
52550
  */
50604
- constructor(name?: string, row?: number, col?: number, rowCount?: number, colCount?: number, style?: GC.Spread.Sheets.Tables.TableTheme);
52551
+ constructor(name?: string, row?: number, col?: number, rowCount?: number, colCount?: number, style?: string | GC.Spread.Sheets.Tables.TableTheme);
50605
52552
  /**
50606
52553
  * Gets or sets the allowAutoExpandState of the table.
50607
52554
  * @param {boolean} [allowAutoExpandState] The allowAutoExpandState of the table.
@@ -50941,6 +52888,11 @@ declare module GC{
50941
52888
  * ```
50942
52889
  */
50943
52890
  getSlicerData(): GC.Spread.Sheets.Slicers.TableSlicerData;
52891
+ /**
52892
+ * Gets or sets a style name for the table.
52893
+ * @returns {string} returns the table style name.
52894
+ */
52895
+ getStyleName(): string | undefined;
50944
52896
  /**
50945
52897
  * Gets the header index in the sheet.
50946
52898
  * @returns {number} The header index.
@@ -51167,10 +53119,10 @@ declare module GC{
51167
53119
  showResizeHandle(value?: boolean): any;
51168
53120
  /**
51169
53121
  * Gets or sets a style for the table.
51170
- * @param {GC.Spread.Sheets.Tables.TableTheme} value The style for the table.
53122
+ * @param {string | GC.Spread.Sheets.Tables.TableTheme} value The style or style name for the table.
51171
53123
  * @returns {GC.Spread.Sheets.Tables.TableTheme | GC.Spread.Sheets.Tables.Table} If no value is set, returns the table style; otherwise, returns the table.
51172
53124
  */
51173
- style(value?: GC.Spread.Sheets.Tables.TableTheme): any;
53125
+ style(value?: string | GC.Spread.Sheets.Tables.TableTheme): any;
51174
53126
  /**
51175
53127
  * Gets or sets a value that indicates whether to use the footer dropdown list for a total row.
51176
53128
  * @param {boolean} [value] Whether to use the footer dropdown list.
@@ -51380,13 +53332,13 @@ declare module GC{
51380
53332
  * @param {number} column The column index.
51381
53333
  * @param {number} rowCount The row count of the table.
51382
53334
  * @param {number} columnCount The column count of the table.
51383
- * @param {GC.Spread.Sheets.Tables.TableTheme} style The style of the table.
53335
+ * @param {string | GC.Spread.Sheets.Tables.TableTheme} style The style of the table.
51384
53336
  * @param {GC.Spread.Sheets.Tables.ITableOptions} options The initialization options of the table.
51385
53337
  * @returns {GC.Spread.Sheets.Tables.Table} The new table instance.
51386
53338
  * @example
51387
53339
  * ```
51388
53340
  * //This example adds a table.
51389
- * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
53341
+ * activeSheet.tables.add("Table1", 0, 0, 3, 3, 'dark1');
51390
53342
  * activeSheet.getCell(0,0).text("Name");
51391
53343
  * activeSheet.getCell(0,1).text("Value");
51392
53344
  * activeSheet.getCell(0,2).text("T/F");
@@ -51395,7 +53347,7 @@ declare module GC{
51395
53347
  * activeSheet.getCell(1,2).text("T");
51396
53348
  * ```
51397
53349
  */
51398
- add(name?: string, row?: number, column?: number, rowCount?: number, columnCount?: number, style?: GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.Table;
53350
+ add(name?: string, row?: number, column?: number, rowCount?: number, columnCount?: number, style?: string | GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.Table;
51399
53351
  /**
51400
53352
  * Adds a range table with a specified data source to the sheet.
51401
53353
  * @param {string} name The table name.
@@ -52038,6 +53990,23 @@ declare module GC{
52038
53990
  * ```
52039
53991
  */
52040
53992
  footerRowStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
53993
+ /**
53994
+ * Loads the object state from the specified JSON string.
53995
+ * @param {Object} data The table theme data from deserialization.
53996
+ * @example
53997
+ * ```
53998
+ * //This example uses the fromJSON method.
53999
+ * const light1 = GC.Spread.Sheets.Tables.TableTheme.light1;
54000
+ * //export
54001
+ * const jsonStr = JSON.stringify(light1.toJSON());
54002
+ * //import
54003
+ * const newTheme = new GC.Spread.Sheets.Tables.TableTheme();
54004
+ * newTheme.fromJSON(JSON.parse(jsonStr));
54005
+ * newTheme.name('custom1');
54006
+ * alert(jsonStr);
54007
+ * ```
54008
+ */
54009
+ fromJSON(data: Object): void;
52041
54010
  /**
52042
54011
  * Gets or sets the style of the header row area.
52043
54012
  * @param {GC.Spread.Sheets.Tables.TableStyle} [value] The style for the header row area.
@@ -52274,6 +54243,23 @@ declare module GC{
52274
54243
  * ```
52275
54244
  */
52276
54245
  secondRowStripStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
54246
+ /**
54247
+ * Saves the object state to a JSON string.
54248
+ * @returns {Object} The table theme data.
54249
+ * @example
54250
+ * ```
54251
+ * //This example uses the toJSON method.
54252
+ * const light1 = GC.Spread.Sheets.Tables.TableTheme.light1;
54253
+ * //export
54254
+ * const jsonStr = JSON.stringify(light1.toJSON());
54255
+ * //import
54256
+ * const newTheme = new GC.Spread.Sheets.Tables.TableTheme();
54257
+ * newTheme.fromJSON(JSON.parse(jsonStr));
54258
+ * newTheme.name('custom1');
54259
+ * alert(jsonStr);
54260
+ * ```
54261
+ */
54262
+ toJSON(): Object;
52277
54263
  /**
52278
54264
  * Gets or sets the style of the whole table area.
52279
54265
  * @param {GC.Spread.Sheets.Tables.TableStyle} [value] The style for the whole table area.
@@ -52972,9 +54958,25 @@ declare module GC{
52972
54958
  }
52973
54959
 
52974
54960
 
54961
+ export interface IColumnTypeItem{
54962
+ /**
54963
+ * identifier the column type, any of "Number", "Text", "Formula", "Checkbox", "Date", "Currency", "Percent", "Phone", "Email", "URL", "Lookup", "CreatedTime", "ModifiedTime", "Attachment", "Select", "Barcode"
54964
+ */
54965
+ name: string;
54966
+ /**
54967
+ * the display name of the column type by the culture resources
54968
+ */
54969
+ text?: string;
54970
+ /**
54971
+ * the icon before the display name of the column type
54972
+ */
54973
+ iconClass?: string;
54974
+ }
54975
+
54976
+
52975
54977
  export interface IDataViewChanges{
52976
54978
  /**
52977
- * The change type, could be one of "insert", "update" or "delete".
54979
+ * The change type, could be one of "insert", "update", "delete", "addColumn", "updateColumn", "removeColumn".
52978
54980
  */
52979
54981
  type: string;
52980
54982
  /**
@@ -52985,6 +54987,18 @@ declare module GC{
52985
54987
  * The original row data, only used for "update".
52986
54988
  */
52987
54989
  oldDataItem?: any;
54990
+ /**
54991
+ * the current column.
54992
+ */
54993
+ column?: GC.Data.IColumn;
54994
+ /**
54995
+ * the default value of the current added column.
54996
+ */
54997
+ data?: any[];
54998
+ /**
54999
+ * The original column, only used for "update column".
55000
+ */
55001
+ originalColumn?: GC.Data.IColumn;
52988
55002
  /**
52989
55003
  * The view index of table sheet.
52990
55004
  */
@@ -52994,6 +55008,7 @@ declare module GC{
52994
55008
 
52995
55009
  export interface IGroupByOptions extends GC.Spread.Sheets.TableSheet.IGroupColumnOptions{
52996
55010
  field: string;
55011
+ spacing?: GC.Spread.Sheets.TableSheet.IGroupSpacingOptions;
52997
55012
  summaryFields?: GC.Spread.Sheets.TableSheet.IGroupSummaryFieldOptions[];
52998
55013
  }
52999
55014
 
@@ -53015,8 +55030,30 @@ declare module GC{
53015
55030
  }
53016
55031
 
53017
55032
 
55033
+ export interface IGroupLayoutOptions{
55034
+ /**
55035
+ * identifier the mode of the group layout
55036
+ */
55037
+ mode: GC.Spread.Sheets.TableSheet.GroupLayoutMode;
55038
+ /**
55039
+ * Specify the default position of the summary results, such as "header", "footer".
55040
+ */
55041
+ position?: "header" | "footer";
55042
+ }
55043
+
55044
+
55045
+ export interface IGroupSpacingOptions{
55046
+ /**
55047
+ * Specify the value of spacing between groups.
55048
+ */
55049
+ row?: number;
55050
+ }
55051
+
55052
+
53018
55053
  export interface IGroupSummaryFieldOptions extends GC.Spread.Sheets.TableSheet.IGroupColumnOptions{
53019
55054
  formula: string;
55055
+ relateTo?: string;
55056
+ position?: "header" | "footer";
53020
55057
  slice?: string | IGroupSummarySliceFieldOptions;
53021
55058
  }
53022
55059
 
@@ -53130,6 +55167,30 @@ declare module GC{
53130
55167
  * A color string used to represent the sheet tab color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
53131
55168
  */
53132
55169
  sheetTabColor?: string;
55170
+ /**
55171
+ * Whether to show the row number header.
55172
+ */
55173
+ showRowNumber?: boolean;
55174
+ /**
55175
+ * Whether to enable defining column.
55176
+ */
55177
+ enableDefineColumn?: boolean;
55178
+ /**
55179
+ * Specify the command for defining column options.
55180
+ */
55181
+ defineColumnCommand?: string;
55182
+ /**
55183
+ * Specify the command for submitting defined column options.
55184
+ */
55185
+ submitDefineColumnCommand?: string;
55186
+ /**
55187
+ * Specify the column types.
55188
+ */
55189
+ columnTypeItems?: GC.Spread.Sheets.TableSheet.IColumnTypeItem[];
55190
+ /**
55191
+ * Specify the options for group layout.
55192
+ */
55193
+ groupLayout?: GC.Spread.Sheets.TableSheet.IGroupLayoutOptions;
53133
55194
  }
53134
55195
 
53135
55196
  /**
@@ -53155,6 +55216,30 @@ declare module GC{
53155
55216
  addNewEmptyRow= 3
53156
55217
  }
53157
55218
 
55219
+ /**
55220
+ * Defines how the group layout is displayed.
55221
+ * @enum {number}
55222
+ * @example
55223
+ * ```
55224
+ * // This sample shows how to change the group layout mode to outline.
55225
+ * tableSheet.options.groupLayout={ mode: GC.Spread.Sheets.TableSheet.GroupLayoutMode.outline };
55226
+ * ```
55227
+ */
55228
+ export enum GroupLayoutMode{
55229
+ /** Specifies that the group layout is tabular mode.
55230
+ * @type {number}
55231
+ */
55232
+ tabular= 0,
55233
+ /** Specifies that the group layout is outline mode.
55234
+ * @type {number}
55235
+ */
55236
+ outline= 1,
55237
+ /** Specifies that the group layout is condensed mode.
55238
+ * @type {number}
55239
+ */
55240
+ condensed= 2
55241
+ }
55242
+
53158
55243
  /**
53159
55244
  * Represents where to show the group outline.
53160
55245
  * @enum {number}
@@ -53266,21 +55351,29 @@ declare module GC{
53266
55351
  * @param {GC.Data.View} [dataView] - The table sheet data view.
53267
55352
  * @param {Object} [options] - The initialization options.
53268
55353
  * @param {boolean} [options.allowAddNew] - Whether to allow to add new empty row.
55354
+ * @param {boolean} [options.showRowNumber] - Whether to show the row number header.
55355
+ * @param {boolean} [options.enableDefineColumn] - Whether to enable defining column.
55356
+ * @param {string} [options.defineColumnCommand] - Specify the command for defining column options.
55357
+ * @param {string} [options.submitDefineColumnCommand] - Specify the command for submitting defined column options.
55358
+ * @param {GC.Spread.Sheets.TableSheet.IColumnTypeItem[]} [options.columnTypeItems] - Specify the column types.
55359
+ * @param {GC.Spread.Sheets.TableSheet.IGroupLayoutOptions} [options.groupLayout] - Specify the options for group layout.
55360
+ * @param {GC.Spread.Sheets.TableSheet.GroupLayoutMode} [options.groupLayout.mode] - Specify the mode for group layout.
55361
+ * @param {"header" | "footer"} [options.groupLayout.position] - Specify the default position of the summary results.
53269
55362
  * @param {string} [options.sheetTabColor] - A color string used to represent the sheet tab color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
53270
55363
  * @param {GC.Spread.Sheets.TableSheet.IAlternatingRowOptions} [options.alternatingRowOptions] - Defines the alternating row style option.
53271
55364
  * @param {number} [options.defaultStackRowHeight] - Tablesheet default stack row height, will calculate the average height by default.
53272
- * @param {number} [options.menuItemVisibility] - The visibility of the menu item in the tablesheet.
53273
- * @param {number} [options.menuItemVisibility.promoteMenuItemVisible] - Whether promoting menu item to show.
53274
- * @param {number} [options.menuItemVisibility.demoteMenuItemVisible] - Whether demoting menu item to show.
53275
- * @param {number} [options.menuItemVisibility.moveUpMenuItemVisible] - Whether moving up menu item to show.
53276
- * @param {number} [options.menuItemVisibility.moveDownMenuItemVisible] - Whether moving down menu item to show.
53277
- * @param {number} [options.menuItemVisibility.addBeforeMenuItemVisible] - Whether adding before menu item to show.
53278
- * @param {number} [options.menuItemVisibility.addAfterMenuItemVisible] - Whether adding after menu item to show.
53279
- * @param {number} [options.menuItemVisibility.addAboveMenuItemVisible] - Whether adding above menu item to show.
53280
- * @param {number} [options.menuItemVisibility.addBelowMenuItemVisible] - Whether adding below menu item to show.
53281
- * @param {number} [options.menuItemVisibility.expandAllLevelMenuItemVisible] - Whether expanding all level menu item to show.
53282
- * @param {number} [options.menuItemVisibility.collapseAllLevelMenuItemVisible] - Whether collapsing all level menu item to show.
53283
- * @param {number} [options.menuItemVisibility.expandToLevelMenuItemVisible] - Whether expanding to level menu item to show.
55365
+ * @param {GC.Spread.Sheets.TableSheet.IMenuItemVisibility} [options.menuItemVisibility] - The visibility of the menu item in the tablesheet.
55366
+ * @param {boolean} [options.menuItemVisibility.promoteMenuItemVisible] - Whether promoting menu item to show.
55367
+ * @param {boolean} [options.menuItemVisibility.demoteMenuItemVisible] - Whether demoting menu item to show.
55368
+ * @param {boolean} [options.menuItemVisibility.moveUpMenuItemVisible] - Whether moving up menu item to show.
55369
+ * @param {boolean} [options.menuItemVisibility.moveDownMenuItemVisible] - Whether moving down menu item to show.
55370
+ * @param {boolean} [options.menuItemVisibility.addBeforeMenuItemVisible] - Whether adding before menu item to show.
55371
+ * @param {boolean} [options.menuItemVisibility.addAfterMenuItemVisible] - Whether adding after menu item to show.
55372
+ * @param {boolean} [options.menuItemVisibility.addAboveMenuItemVisible] - Whether adding above menu item to show.
55373
+ * @param {boolean} [options.menuItemVisibility.addBelowMenuItemVisible] - Whether adding below menu item to show.
55374
+ * @param {boolean} [options.menuItemVisibility.expandAllLevelMenuItemVisible] - Whether expanding all level menu item to show.
55375
+ * @param {boolean} [options.menuItemVisibility.collapseAllLevelMenuItemVisible] - Whether collapsing all level menu item to show.
55376
+ * @param {boolean} [options.menuItemVisibility.expandToLevelMenuItemVisible] - Whether expanding to level menu item to show.
53284
55377
  * @example
53285
55378
  * ```
53286
55379
  * //This example creates a empty TableSheet.
@@ -53319,6 +55412,12 @@ declare module GC{
53319
55412
  * @property {GC.Spread.Sheets.TableSheet.IAlternatingRowOptions} [alternatingRowOptions] - Defines the alternating row style options.
53320
55413
  * @property {number} [defaultStackRowHeight] - Tablesheet default stack row height, will calculate the average height by default.
53321
55414
  * @property {GC.Spread.Sheets.TableSheet.IMenuItemVisibility} [menuItemVisibility] - Tablesheet default stack row height, will calculate the average height by default.
55415
+ * @property {boolean} [showRowNumber] - Whether to show the row number header.
55416
+ * @property {boolean} [enableDefineColumn] - Whether to enable defining column.
55417
+ * @property {string} [defineColumnCommand] - Specify the command for defining column options.
55418
+ * @property {string} [submitDefineColumnCommand] - Specify the command for submitting defined column options.
55419
+ * @property {GC.Spread.Sheets.TableSheet.IColumnTypeItem[]} [columnTypeItems] - Specify the column types.
55420
+ * @property {GC.Spread.Sheets.TableSheet.IGroupLayoutOptions} [groupLayout] - Specify the options for group layout.
53322
55421
  * @example
53323
55422
  * ```
53324
55423
  * //This example changes a TableSheet's options.
@@ -53484,14 +55583,17 @@ declare module GC{
53484
55583
  expandHierarchyLevel(level: number): void;
53485
55584
  /**
53486
55585
  * Gets the changes of data manager in autoSync or batch mode.
53487
- * @returns {GC.Spread.Sheets.TableSheet.IDataViewChanges[]} Returns a object array, each object could contain "type", "dataItem", "oldDataItem", and "index".
53488
- * The "type" is the change type, could be one of "insert", "update" or "delete".
55586
+ * @returns {GC.Spread.Sheets.TableSheet.IDataViewChanges[]} Returns a object array, each object could contain "type", "dataItem", "oldDataItem", "column", "originalColumn", and "index".
55587
+ * The "type" is the change type, could be one of "insert", "update", "delete", "addColumn", "updateColumn", "removeColumn".
53489
55588
  * the "dataItem" is the current row data.
53490
55589
  * The "oldDataItem" is the original row data, only used for "update".
55590
+ * The "column" is the current column.
55591
+ * The "data" is the default value of the current added column.
55592
+ * The "originalColumn" is the original column, only used for "update column".
53491
55593
  * The "index" is the view index of table sheet.
53492
55594
  * @example
53493
55595
  * ```
53494
- * //This example get changes manually in autoSync or batch mode, including updated rows, inserted rows and deleted rows.
55596
+ * //This example get changes manually in autoSync or batch mode, including updated rows, inserted rows, deleted rows, add column, update column, remove column.
53495
55597
  * tableSheet.getChanges();
53496
55598
  * ```
53497
55599
  */