@mescius/spread-sheets 17.0.10 → 17.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/gc.spread.sheets.all.min.js +890 -2
- package/dist/gc.spread.sheets.d.ts +2362 -109
- package/package.json +1 -1
- package/styles/gc.spread.sheets.css +951 -11
- package/styles/gc.spread.sheets.excel2013darkGray.css +976 -11
- package/styles/gc.spread.sheets.excel2013lightGray.css +976 -11
- package/styles/gc.spread.sheets.excel2013white.css +975 -11
- package/styles/gc.spread.sheets.excel2016black.css +975 -11
- package/styles/gc.spread.sheets.excel2016colorful.css +976 -11
- package/styles/gc.spread.sheets.excel2016darkGray.css +976 -11
@@ -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):
|
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 {
|
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,
|
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
|
28940
|
-
* @param {GC.Spread.Sheets.Charts.RowCol
|
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 {
|
45741
|
-
* @returns {
|
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?:
|
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 {
|
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:
|
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 {
|
46761
|
-
*
|
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?:
|
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
|
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.
|
@@ -47658,8 +49478,12 @@ declare module GC{
|
|
47658
49478
|
* @param {GC.Spread.Sheets.Slicers.SlicerBorder} [borderRight] The right border of the style information.
|
47659
49479
|
* @param {GC.Spread.Sheets.Slicers.SlicerBorder} [borderBottom] The bottom border of the style information.
|
47660
49480
|
* @param {GC.Spread.Sheets.TextDecorationType} [textDecoration] The text decoration of the style information.
|
49481
|
+
* @param {string} [fontStyle] The font style of the style information.
|
49482
|
+
* @param {string} [fontWeight] The font weight of the style information.
|
49483
|
+
* @param {string} [fontSize] The font size of the style information.
|
49484
|
+
* @param {string} [fontFamily] The font family of the style information.
|
47661
49485
|
*/
|
47662
|
-
constructor(backColor?: string, foreColor?: string, font?: string, borderLeft?: GC.Spread.Sheets.Slicers.SlicerBorder, borderTop?: GC.Spread.Sheets.Slicers.SlicerBorder, borderRight?: GC.Spread.Sheets.Slicers.SlicerBorder, borderBottom?: GC.Spread.Sheets.Slicers.SlicerBorder, textDecoration?: GC.Spread.Sheets.TextDecorationType);
|
49486
|
+
constructor(backColor?: string, foreColor?: string, font?: string, borderLeft?: GC.Spread.Sheets.Slicers.SlicerBorder, borderTop?: GC.Spread.Sheets.Slicers.SlicerBorder, borderRight?: GC.Spread.Sheets.Slicers.SlicerBorder, borderBottom?: GC.Spread.Sheets.Slicers.SlicerBorder, textDecoration?: GC.Spread.Sheets.TextDecorationType, fontStyle?: string, fontWeight?: string, fontSize?: string, fontFamily?: string);
|
47663
49487
|
/**
|
47664
49488
|
* Gets or sets the background color of the style information.
|
47665
49489
|
* @param {string} [value] The background color of the style information.
|
@@ -47724,24 +49548,108 @@ declare module GC{
|
|
47724
49548
|
* //style
|
47725
49549
|
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
47726
49550
|
* hstyle.backColor("red");
|
47727
|
-
* hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49551
|
+
* hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49552
|
+
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
49553
|
+
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
49554
|
+
* //add a slicer to the sheet and return the slicer instance.
|
49555
|
+
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
49556
|
+
* //change the slicer properties.
|
49557
|
+
* slicer.position(new GC.Spread.Sheets.Point(100, 200));
|
49558
|
+
* slicer.style(style1);
|
49559
|
+
* ```
|
49560
|
+
*/
|
49561
|
+
borderBottom(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
|
49562
|
+
/**
|
49563
|
+
* Gets or sets the left border of the style information.
|
49564
|
+
* @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The left border of the style information.
|
49565
|
+
* @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the left border of the style information; otherwise, returns the slicer style information.
|
49566
|
+
* @example
|
49567
|
+
* ```
|
49568
|
+
* //This example sets the left border.
|
49569
|
+
* //create a table
|
49570
|
+
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
49571
|
+
* var activeSheet = spread.getActiveSheet();
|
49572
|
+
* var datas = [
|
49573
|
+
* ["1", "NewYork", "1968/6/8", "80", "180"],
|
49574
|
+
* ["4", "NewYork", "1972/7/3", "72", "168"],
|
49575
|
+
* ["4", "NewYork", "1964/3/2", "71", "179"],
|
49576
|
+
* ["5", "Washington", "1972/8/8","80", "171"],
|
49577
|
+
* ["6", "Washington", "1986/2/2", "89", "161"],
|
49578
|
+
* ["7", "Washington", "2012/2/15", "71", "240"]];
|
49579
|
+
* var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
|
49580
|
+
* var dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
|
49581
|
+
* table.setColumnName(0, dataColumns[0]);
|
49582
|
+
* table.setColumnName(1, dataColumns[1]);
|
49583
|
+
* table.setColumnName(2, dataColumns[2]);
|
49584
|
+
* table.setColumnName(3, dataColumns[3]);
|
49585
|
+
* table.setColumnName(4, dataColumns[4]);
|
49586
|
+
* //style
|
49587
|
+
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
49588
|
+
* hstyle.backColor("red");
|
49589
|
+
* hstyle.borderLeft(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49590
|
+
* hstyle.borderRight(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49591
|
+
* var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
49592
|
+
* hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
|
49593
|
+
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
49594
|
+
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
49595
|
+
* style1.unSelectedItemWithDataStyle(hstyle1);
|
49596
|
+
* //add a slicer to the sheet and return the slicer instance.
|
49597
|
+
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
49598
|
+
* //change the slicer properties.
|
49599
|
+
* slicer.position(new GC.Spread.Sheets.Point(100, 200));
|
49600
|
+
* slicer.style(style1);
|
49601
|
+
* ```
|
49602
|
+
*/
|
49603
|
+
borderLeft(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
|
49604
|
+
/**
|
49605
|
+
* Gets or sets the right border of the style information.
|
49606
|
+
* @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The right border of the style information.
|
49607
|
+
* @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the right border of the style information; otherwise, returns the slicer style information.
|
49608
|
+
* @example
|
49609
|
+
* ```
|
49610
|
+
* //This example sets the border.
|
49611
|
+
* //create a table
|
49612
|
+
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
49613
|
+
* var activeSheet = spread.getActiveSheet();
|
49614
|
+
* var datas = [
|
49615
|
+
* ["1", "NewYork", "1968/6/8", "80", "180"],
|
49616
|
+
* ["4", "NewYork", "1972/7/3", "72", "168"],
|
49617
|
+
* ["4", "NewYork", "1964/3/2", "71", "179"],
|
49618
|
+
* ["5", "Washington", "1972/8/8","80", "171"],
|
49619
|
+
* ["6", "Washington", "1986/2/2", "89", "161"],
|
49620
|
+
* ["7", "Washington", "2012/2/15", "71", "240"]];
|
49621
|
+
* var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
|
49622
|
+
* var dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
|
49623
|
+
* table.setColumnName(0, dataColumns[0]);
|
49624
|
+
* table.setColumnName(1, dataColumns[1]);
|
49625
|
+
* table.setColumnName(2, dataColumns[2]);
|
49626
|
+
* table.setColumnName(3, dataColumns[3]);
|
49627
|
+
* table.setColumnName(4, dataColumns[4]);
|
49628
|
+
* //style
|
49629
|
+
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
49630
|
+
* hstyle.backColor("red");
|
49631
|
+
* hstyle.borderLeft(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49632
|
+
* hstyle.borderRight(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49633
|
+
* var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
49634
|
+
* hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
|
47728
49635
|
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
47729
49636
|
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
49637
|
+
* style1.unSelectedItemWithDataStyle(hstyle1);
|
47730
49638
|
* //add a slicer to the sheet and return the slicer instance.
|
47731
49639
|
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
47732
|
-
*
|
49640
|
+
* //change the slicer properties.
|
47733
49641
|
* slicer.position(new GC.Spread.Sheets.Point(100, 200));
|
47734
49642
|
* slicer.style(style1);
|
47735
49643
|
* ```
|
47736
49644
|
*/
|
47737
|
-
|
49645
|
+
borderRight(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
|
47738
49646
|
/**
|
47739
|
-
* Gets or sets the
|
47740
|
-
* @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The
|
47741
|
-
* @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the
|
49647
|
+
* Gets or sets the top border of the style information.
|
49648
|
+
* @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The top border of the style information.
|
49649
|
+
* @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the top border of the style information; otherwise, returns the slicer style information.
|
47742
49650
|
* @example
|
47743
49651
|
* ```
|
47744
|
-
* //This example sets the
|
49652
|
+
* //This example sets the border.
|
47745
49653
|
* //create a table
|
47746
49654
|
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
47747
49655
|
* var activeSheet = spread.getActiveSheet();
|
@@ -47776,14 +49684,14 @@ declare module GC{
|
|
47776
49684
|
* slicer.style(style1);
|
47777
49685
|
* ```
|
47778
49686
|
*/
|
47779
|
-
|
49687
|
+
borderTop(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
|
47780
49688
|
/**
|
47781
|
-
* Gets or sets the
|
47782
|
-
* @param {
|
47783
|
-
* @returns {
|
49689
|
+
* Gets or sets the font of the style information.
|
49690
|
+
* @param {string} [value] The font of the style information.
|
49691
|
+
* @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font of the style information; otherwise, returns the slicer style information.
|
47784
49692
|
* @example
|
47785
49693
|
* ```
|
47786
|
-
* //This example sets the
|
49694
|
+
* //This example sets the font.
|
47787
49695
|
* //create a table
|
47788
49696
|
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
47789
49697
|
* var activeSheet = spread.getActiveSheet();
|
@@ -47804,8 +49712,9 @@ declare module GC{
|
|
47804
49712
|
* //style
|
47805
49713
|
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
47806
49714
|
* hstyle.backColor("red");
|
47807
|
-
* hstyle.
|
47808
|
-
* hstyle.
|
49715
|
+
* hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
49716
|
+
* hstyle.font("8pt Arial");
|
49717
|
+
* hstyle.textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
|
47809
49718
|
* var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
47810
49719
|
* hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
|
47811
49720
|
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
@@ -47818,14 +49727,14 @@ declare module GC{
|
|
47818
49727
|
* slicer.style(style1);
|
47819
49728
|
* ```
|
47820
49729
|
*/
|
47821
|
-
|
49730
|
+
font(value?: string): any;
|
47822
49731
|
/**
|
47823
|
-
* Gets or sets the
|
47824
|
-
* @param {
|
47825
|
-
* @returns {
|
49732
|
+
* Gets or sets the font size.
|
49733
|
+
* @param {string} [value] The font size of the style information.
|
49734
|
+
* @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font size of the style information; otherwise, returns the slicer style information.
|
47826
49735
|
* @example
|
47827
49736
|
* ```
|
47828
|
-
* //This example sets
|
49737
|
+
* //This example sets a font size.
|
47829
49738
|
* //create a table
|
47830
49739
|
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
47831
49740
|
* var activeSheet = spread.getActiveSheet();
|
@@ -47845,14 +49754,45 @@ declare module GC{
|
|
47845
49754
|
* table.setColumnName(4, dataColumns[4]);
|
47846
49755
|
* //style
|
47847
49756
|
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
47848
|
-
* hstyle.
|
47849
|
-
*
|
47850
|
-
*
|
47851
|
-
*
|
47852
|
-
*
|
49757
|
+
* hstyle.fontSize("18pt");
|
49758
|
+
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
49759
|
+
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
49760
|
+
* //add a slicer to the sheet and return the slicer instance.
|
49761
|
+
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
49762
|
+
* //change the slicer properties.
|
49763
|
+
* slicer.position(new GC.Spread.Sheets.Point(100, 200));
|
49764
|
+
* slicer.style(style1);
|
49765
|
+
*/ ///* function fontFamily(value?: string): any
|
49766
|
+
/**
|
49767
|
+
* Gets or sets the font family.
|
49768
|
+
* ```
|
49769
|
+
* @param {string} [value] The font family of the style information.
|
49770
|
+
* @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font family of the style information; otherwise, returns the slicer style information.
|
49771
|
+
* @example
|
49772
|
+
* ```
|
49773
|
+
* //This example sets a font family.
|
49774
|
+
* //create a table
|
49775
|
+
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
49776
|
+
* var activeSheet = spread.getActiveSheet();
|
49777
|
+
* var datas = [
|
49778
|
+
* ["1", "NewYork", "1968/6/8", "80", "180"],
|
49779
|
+
* ["4", "NewYork", "1972/7/3", "72", "168"],
|
49780
|
+
* ["4", "NewYork", "1964/3/2", "71", "179"],
|
49781
|
+
* ["5", "Washington", "1972/8/8","80", "171"],
|
49782
|
+
* ["6", "Washington", "1986/2/2", "89", "161"],
|
49783
|
+
* ["7", "Washington", "2012/2/15", "71", "240"]];
|
49784
|
+
* var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
|
49785
|
+
* var dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
|
49786
|
+
* table.setColumnName(0, dataColumns[0]);
|
49787
|
+
* table.setColumnName(1, dataColumns[1]);
|
49788
|
+
* table.setColumnName(2, dataColumns[2]);
|
49789
|
+
* table.setColumnName(3, dataColumns[3]);
|
49790
|
+
* table.setColumnName(4, dataColumns[4]);
|
49791
|
+
* //style
|
49792
|
+
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
49793
|
+
* hstyle.fontFamily("Arial Black");
|
47853
49794
|
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
47854
49795
|
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
47855
|
-
* style1.unSelectedItemWithDataStyle(hstyle1);
|
47856
49796
|
* //add a slicer to the sheet and return the slicer instance.
|
47857
49797
|
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
47858
49798
|
* //change the slicer properties.
|
@@ -47860,14 +49800,14 @@ declare module GC{
|
|
47860
49800
|
* slicer.style(style1);
|
47861
49801
|
* ```
|
47862
49802
|
*/
|
47863
|
-
|
49803
|
+
fontSize(value?: string): any;
|
47864
49804
|
/**
|
47865
|
-
* Gets or sets the font
|
47866
|
-
* @param {string} [value] The font of the style information.
|
47867
|
-
* @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font of the style information; otherwise, returns the slicer style information.
|
49805
|
+
* Gets or sets the font style.
|
49806
|
+
* @param {string} [value] The font style of the style information.
|
49807
|
+
* @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font style of the style information; otherwise, returns the slicer style information.
|
47868
49808
|
* @example
|
47869
49809
|
* ```
|
47870
|
-
* //This example sets
|
49810
|
+
* //This example sets a font style.
|
47871
49811
|
* //create a table
|
47872
49812
|
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
47873
49813
|
* var activeSheet = spread.getActiveSheet();
|
@@ -47887,23 +49827,54 @@ declare module GC{
|
|
47887
49827
|
* table.setColumnName(4, dataColumns[4]);
|
47888
49828
|
* //style
|
47889
49829
|
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
47890
|
-
* hstyle.
|
47891
|
-
* hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
|
47892
|
-
* hstyle.font("8pt Arial");
|
47893
|
-
* hstyle.textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
|
47894
|
-
* var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
47895
|
-
* hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
|
49830
|
+
* hstyle.fontStyle("italic");
|
47896
49831
|
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
47897
49832
|
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
47898
|
-
* style1.unSelectedItemWithDataStyle(hstyle1);
|
47899
49833
|
* //add a slicer to the sheet and return the slicer instance.
|
47900
49834
|
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
47901
|
-
*
|
49835
|
+
* //change the slicer properties.
|
47902
49836
|
* slicer.position(new GC.Spread.Sheets.Point(100, 200));
|
47903
49837
|
* slicer.style(style1);
|
47904
49838
|
* ```
|
47905
49839
|
*/
|
47906
|
-
|
49840
|
+
fontStyle(value?: string): any;
|
49841
|
+
/**
|
49842
|
+
* Gets or sets the font weight.
|
49843
|
+
* @param {string} [value] The font weight of the style information.
|
49844
|
+
* @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font weight of the style information; otherwise, returns the slicer style information.
|
49845
|
+
* @example
|
49846
|
+
* ```
|
49847
|
+
* //This example sets a font weight.
|
49848
|
+
* //create a table
|
49849
|
+
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
49850
|
+
* var activeSheet = spread.getActiveSheet();
|
49851
|
+
* var datas = [
|
49852
|
+
* ["1", "NewYork", "1968/6/8", "80", "180"],
|
49853
|
+
* ["4", "NewYork", "1972/7/3", "72", "168"],
|
49854
|
+
* ["4", "NewYork", "1964/3/2", "71", "179"],
|
49855
|
+
* ["5", "Washington", "1972/8/8","80", "171"],
|
49856
|
+
* ["6", "Washington", "1986/2/2", "89", "161"],
|
49857
|
+
* ["7", "Washington", "2012/2/15", "71", "240"]];
|
49858
|
+
* var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
|
49859
|
+
* var dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
|
49860
|
+
* table.setColumnName(0, dataColumns[0]);
|
49861
|
+
* table.setColumnName(1, dataColumns[1]);
|
49862
|
+
* table.setColumnName(2, dataColumns[2]);
|
49863
|
+
* table.setColumnName(3, dataColumns[3]);
|
49864
|
+
* table.setColumnName(4, dataColumns[4]);
|
49865
|
+
* //style
|
49866
|
+
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
49867
|
+
* hstyle.fontWeight("bold");
|
49868
|
+
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
49869
|
+
* style1.hoveredSelectedItemWithDataStyle(hstyle);
|
49870
|
+
* //add a slicer to the sheet and return the slicer instance.
|
49871
|
+
* var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
|
49872
|
+
* //change the slicer properties.
|
49873
|
+
* slicer.position(new GC.Spread.Sheets.Point(100, 200));
|
49874
|
+
* slicer.style(style1);
|
49875
|
+
* ```
|
49876
|
+
*/
|
49877
|
+
fontWeight(value?: string): any;
|
47907
49878
|
/**
|
47908
49879
|
* Gets or sets the foreground color of the style information.
|
47909
49880
|
* @param {string} [value] The foreground color of the style information.
|
@@ -48571,8 +50542,49 @@ declare module GC{
|
|
48571
50542
|
/**
|
48572
50543
|
* Represents the timeline style settings.
|
48573
50544
|
* @class
|
50545
|
+
* @example
|
50546
|
+
* ```
|
50547
|
+
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
|
50548
|
+
* var activeSheet = spread.getActiveSheet();
|
50549
|
+
* var datas = [
|
50550
|
+
* ["1", "NewYork", new Date("1968/6/8")],
|
50551
|
+
* ["4", "NewYork", new Date("1972/7/3")],
|
50552
|
+
* ["4", "NewYork", new Date("1964/3/2")]];
|
50553
|
+
* var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
|
50554
|
+
* var dataColumns = ["Name", "City", "Birthday"];
|
50555
|
+
* table.setColumnName(0, dataColumns[0]);
|
50556
|
+
* table.setColumnName(1, dataColumns[1]);
|
50557
|
+
* table.setColumnName(2, dataColumns[2]);
|
50558
|
+
*
|
50559
|
+
* var pivotTable = sheet.pivotTables.add('pivotTable1', table.name(), 11, 1);
|
50560
|
+
* var timeline = sheet.slicers.add('timeline1', 'pivotTable1', 'Birthday', GC.Spread.Sheets.Slicers.TimelineStyles.dark1(), GC.Spread.Sheets.Slicers.SlicerType.pivotTimeline);
|
50561
|
+
*
|
50562
|
+
* var style = new GC.Spread.Sheets.Slicers.TimelineStyle()
|
50563
|
+
* style.wholeSlicerStyle(new GC.Spread.Sheets.Slicers.SlicerStyleInfo('red', 'blue', '12pt Calibri'));
|
50564
|
+
* style.headerStyle(new GC.Spread.Sheets.Slicers.SlicerStyleInfo(undefined, 'green', '14pt Calibri'));
|
50565
|
+
* style.timeLevelStyle(new GC.Spread.Sheets.Slicers.SlicerStyleInfo('yellow'));
|
50566
|
+
*
|
50567
|
+
* timeline.style(style);
|
50568
|
+
* ```
|
48574
50569
|
*/
|
48575
50570
|
constructor();
|
50571
|
+
/**
|
50572
|
+
* Loads the object state from the specified JSON string.
|
50573
|
+
* @param {Object} data The timeline slicer theme data from deserialization.
|
50574
|
+
* @example
|
50575
|
+
* ```
|
50576
|
+
* //This example uses the fromJSON method.
|
50577
|
+
* const light1 = GC.Spread.Sheets.Slicers.TimelineStyles.light1();
|
50578
|
+
* //export
|
50579
|
+
* const jsonStr = JSON.stringify(light1.toJSON());
|
50580
|
+
* //import
|
50581
|
+
* const newTheme = new GC.Spread.Sheets.Slicers.TimelineStyle();
|
50582
|
+
* newTheme.fromJSON(JSON.parse(jsonStr));
|
50583
|
+
* newTheme.name('custom1');
|
50584
|
+
* alert(jsonStr);
|
50585
|
+
* ```
|
50586
|
+
*/
|
50587
|
+
fromJSON(data: Object): void;
|
48576
50588
|
/**
|
48577
50589
|
* Gets or sets the style of the slicer header.
|
48578
50590
|
* @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the slicer header.
|
@@ -48812,6 +50824,23 @@ declare module GC{
|
|
48812
50824
|
* ```
|
48813
50825
|
*/
|
48814
50826
|
timeLevelStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
|
50827
|
+
/**
|
50828
|
+
* Saves the object state to a JSON string.
|
50829
|
+
* @returns {Object} The timeline slicer theme data.
|
50830
|
+
* @example
|
50831
|
+
* ```
|
50832
|
+
* //This example uses the toJSON method.
|
50833
|
+
* const light1 = GC.Spread.Sheets.Slicers.TimelineStyles.light1();
|
50834
|
+
* //export
|
50835
|
+
* const jsonStr = JSON.stringify(light1.toJSON());
|
50836
|
+
* //import
|
50837
|
+
* const newTheme = new GC.Spread.Sheets.Slicers.TimelineStyle();
|
50838
|
+
* newTheme.fromJSON(JSON.parse(jsonStr));
|
50839
|
+
* newTheme.name('custom1');
|
50840
|
+
* alert(jsonStr);
|
50841
|
+
* ```
|
50842
|
+
*/
|
50843
|
+
toJSON(): Object;
|
48815
50844
|
/**
|
48816
50845
|
* Gets or sets the style of the unselected time block.
|
48817
50846
|
* @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the unselected time block.
|
@@ -50585,6 +52614,75 @@ declare module GC{
|
|
50585
52614
|
}
|
50586
52615
|
|
50587
52616
|
|
52617
|
+
export class CustomTableThemeManager extends GC.Spread.Sheets.CustomThemeManagerBase{
|
52618
|
+
/**
|
52619
|
+
* Represents a custom table theme manager that can manage all custom table themes.
|
52620
|
+
* @class
|
52621
|
+
* @param {GC.Spread.Sheets.Workbook} workbook The workbook.
|
52622
|
+
* @extends GC.Spread.Sheets.CustomThemeManagerBase
|
52623
|
+
*/
|
52624
|
+
constructor(workbook: GC.Spread.Sheets.Workbook);
|
52625
|
+
/**
|
52626
|
+
* add a new table theme.
|
52627
|
+
* @param {string | GC.Spread.Sheets.Tables.TableTheme} theme the new table theme or just a new table theme name you want to add
|
52628
|
+
* @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
|
52629
|
+
* @example
|
52630
|
+
* ```
|
52631
|
+
* // add a new table theme named "custom0"
|
52632
|
+
* var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
|
52633
|
+
* let tableStyle = spread.customTableThemes.add("custom0");
|
52634
|
+
* let firstColumnStripStyle = new GC.Spread.Sheets.Tables.TableStyle();
|
52635
|
+
* firstColumnStripStyle.backColor = "#0C66E4";
|
52636
|
+
* tableStyle.firstColumnStripStyle(firstColumnStripStyle);
|
52637
|
+
* ```
|
52638
|
+
*/
|
52639
|
+
add(theme: string | GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.TableTheme | undefined;
|
52640
|
+
/**
|
52641
|
+
* get the table themes collection.
|
52642
|
+
* @returns Array<GC.Spread.Sheets.Tables.TableTheme>
|
52643
|
+
* @example
|
52644
|
+
* ```
|
52645
|
+
* // get all table table themes
|
52646
|
+
* let tableStylesCollection = spread.customTableThemes.all();
|
52647
|
+
* ```
|
52648
|
+
*/
|
52649
|
+
all(): Array<GC.Spread.Sheets.Tables.TableTheme>;
|
52650
|
+
/**
|
52651
|
+
* get the table theme by name.
|
52652
|
+
* @param {string} name the specific name of the table theme to get
|
52653
|
+
* @returns {GC.Spread.Sheets.Tables.TableTheme | undefined} If the corresponding table theme with the spefic name is found, return the theme; otherwise, return undefined.
|
52654
|
+
* @example
|
52655
|
+
* ```
|
52656
|
+
* // get table theme
|
52657
|
+
* tableStyle = spread.customTableThemes.get("custom0");
|
52658
|
+
* ```
|
52659
|
+
*/
|
52660
|
+
get(name: string): GC.Spread.Sheets.Tables.TableTheme | undefined;
|
52661
|
+
/**
|
52662
|
+
* remove the table theme by name.
|
52663
|
+
* @param {string} name the specific name of the table theme to remove
|
52664
|
+
* @returns {void}
|
52665
|
+
* @example
|
52666
|
+
* ```
|
52667
|
+
* // delete table theme
|
52668
|
+
* spread.customTableThemes.remove("custom0");
|
52669
|
+
* ```
|
52670
|
+
*/
|
52671
|
+
remove(name: string): void;
|
52672
|
+
/**
|
52673
|
+
* update the table theme.
|
52674
|
+
* @param {string} oldThemeName the specific name of the table theme to update
|
52675
|
+
* @param {GC.Spread.Sheets.Tables.TableTheme} newTheme the specific name of the table theme to update
|
52676
|
+
* @returns {void}
|
52677
|
+
* @example
|
52678
|
+
* ```
|
52679
|
+
* // update table theme
|
52680
|
+
* tableStyle = spread.customTableThemes.update("custom0", new GC.Spread.Sheets.Tables.TableTheme());
|
52681
|
+
* ```
|
52682
|
+
*/
|
52683
|
+
update(oldThemeName: string, newTheme: GC.Spread.Sheets.Tables.TableTheme): void;
|
52684
|
+
}
|
52685
|
+
|
50588
52686
|
export class Table{
|
50589
52687
|
/**
|
50590
52688
|
* Represents a table that can be added in a sheet.
|
@@ -50594,14 +52692,14 @@ declare module GC{
|
|
50594
52692
|
* @param {number} col The table column index.
|
50595
52693
|
* @param {number} rowCount The table row count.
|
50596
52694
|
* @param {number} colCount The table column count.
|
50597
|
-
* @param {GC.Spread.Sheets.Tables.TableTheme} style The table style.
|
52695
|
+
* @param {string | GC.Spread.Sheets.Tables.TableTheme} style The table style or style name.
|
50598
52696
|
* @param {Object} options The initialization options of the table.
|
50599
52697
|
* @param {boolean} [options.showHeader] - Whether to display the table header.
|
50600
52698
|
* @param {boolean} [options.showFooter] - Whether to display a footer.
|
50601
52699
|
* @param {boolean} [options.useFooterDropDownList] - whether to use the footer dropdown list for a total row.
|
50602
52700
|
* @param {boolean} [options.showResizeHandle] - Whether to display the resize handle for table.
|
50603
52701
|
*/
|
50604
|
-
constructor(name?: string, row?: number, col?: number, rowCount?: number, colCount?: number, style?: GC.Spread.Sheets.Tables.TableTheme);
|
52702
|
+
constructor(name?: string, row?: number, col?: number, rowCount?: number, colCount?: number, style?: string | GC.Spread.Sheets.Tables.TableTheme);
|
50605
52703
|
/**
|
50606
52704
|
* Gets or sets the allowAutoExpandState of the table.
|
50607
52705
|
* @param {boolean} [allowAutoExpandState] The allowAutoExpandState of the table.
|
@@ -50941,6 +53039,11 @@ declare module GC{
|
|
50941
53039
|
* ```
|
50942
53040
|
*/
|
50943
53041
|
getSlicerData(): GC.Spread.Sheets.Slicers.TableSlicerData;
|
53042
|
+
/**
|
53043
|
+
* Gets or sets a style name for the table.
|
53044
|
+
* @returns {string} returns the table style name.
|
53045
|
+
*/
|
53046
|
+
getStyleName(): string | undefined;
|
50944
53047
|
/**
|
50945
53048
|
* Gets the header index in the sheet.
|
50946
53049
|
* @returns {number} The header index.
|
@@ -51167,10 +53270,10 @@ declare module GC{
|
|
51167
53270
|
showResizeHandle(value?: boolean): any;
|
51168
53271
|
/**
|
51169
53272
|
* Gets or sets a style for the table.
|
51170
|
-
* @param {GC.Spread.Sheets.Tables.TableTheme} value The style for the table.
|
53273
|
+
* @param {string | GC.Spread.Sheets.Tables.TableTheme} value The style or style name for the table.
|
51171
53274
|
* @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
53275
|
*/
|
51173
|
-
style(value?: GC.Spread.Sheets.Tables.TableTheme): any;
|
53276
|
+
style(value?: string | GC.Spread.Sheets.Tables.TableTheme): any;
|
51174
53277
|
/**
|
51175
53278
|
* Gets or sets a value that indicates whether to use the footer dropdown list for a total row.
|
51176
53279
|
* @param {boolean} [value] Whether to use the footer dropdown list.
|
@@ -51380,13 +53483,13 @@ declare module GC{
|
|
51380
53483
|
* @param {number} column The column index.
|
51381
53484
|
* @param {number} rowCount The row count of the table.
|
51382
53485
|
* @param {number} columnCount The column count of the table.
|
51383
|
-
* @param {GC.Spread.Sheets.Tables.TableTheme} style The style of the table.
|
53486
|
+
* @param {string | GC.Spread.Sheets.Tables.TableTheme} style The style of the table.
|
51384
53487
|
* @param {GC.Spread.Sheets.Tables.ITableOptions} options The initialization options of the table.
|
51385
53488
|
* @returns {GC.Spread.Sheets.Tables.Table} The new table instance.
|
51386
53489
|
* @example
|
51387
53490
|
* ```
|
51388
53491
|
* //This example adds a table.
|
51389
|
-
* activeSheet.tables.add("Table1", 0, 0, 3, 3,
|
53492
|
+
* activeSheet.tables.add("Table1", 0, 0, 3, 3, 'dark1');
|
51390
53493
|
* activeSheet.getCell(0,0).text("Name");
|
51391
53494
|
* activeSheet.getCell(0,1).text("Value");
|
51392
53495
|
* activeSheet.getCell(0,2).text("T/F");
|
@@ -51395,7 +53498,7 @@ declare module GC{
|
|
51395
53498
|
* activeSheet.getCell(1,2).text("T");
|
51396
53499
|
* ```
|
51397
53500
|
*/
|
51398
|
-
add(name?: string, row?: number, column?: number, rowCount?: number, columnCount?: number, style?: GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.Table;
|
53501
|
+
add(name?: string, row?: number, column?: number, rowCount?: number, columnCount?: number, style?: string | GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.Table;
|
51399
53502
|
/**
|
51400
53503
|
* Adds a range table with a specified data source to the sheet.
|
51401
53504
|
* @param {string} name The table name.
|
@@ -52038,6 +54141,23 @@ declare module GC{
|
|
52038
54141
|
* ```
|
52039
54142
|
*/
|
52040
54143
|
footerRowStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
|
54144
|
+
/**
|
54145
|
+
* Loads the object state from the specified JSON string.
|
54146
|
+
* @param {Object} data The table theme data from deserialization.
|
54147
|
+
* @example
|
54148
|
+
* ```
|
54149
|
+
* //This example uses the fromJSON method.
|
54150
|
+
* const light1 = GC.Spread.Sheets.Tables.TableTheme.light1;
|
54151
|
+
* //export
|
54152
|
+
* const jsonStr = JSON.stringify(light1.toJSON());
|
54153
|
+
* //import
|
54154
|
+
* const newTheme = new GC.Spread.Sheets.Tables.TableTheme();
|
54155
|
+
* newTheme.fromJSON(JSON.parse(jsonStr));
|
54156
|
+
* newTheme.name('custom1');
|
54157
|
+
* alert(jsonStr);
|
54158
|
+
* ```
|
54159
|
+
*/
|
54160
|
+
fromJSON(data: Object): void;
|
52041
54161
|
/**
|
52042
54162
|
* Gets or sets the style of the header row area.
|
52043
54163
|
* @param {GC.Spread.Sheets.Tables.TableStyle} [value] The style for the header row area.
|
@@ -52274,6 +54394,23 @@ declare module GC{
|
|
52274
54394
|
* ```
|
52275
54395
|
*/
|
52276
54396
|
secondRowStripStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
|
54397
|
+
/**
|
54398
|
+
* Saves the object state to a JSON string.
|
54399
|
+
* @returns {Object} The table theme data.
|
54400
|
+
* @example
|
54401
|
+
* ```
|
54402
|
+
* //This example uses the toJSON method.
|
54403
|
+
* const light1 = GC.Spread.Sheets.Tables.TableTheme.light1;
|
54404
|
+
* //export
|
54405
|
+
* const jsonStr = JSON.stringify(light1.toJSON());
|
54406
|
+
* //import
|
54407
|
+
* const newTheme = new GC.Spread.Sheets.Tables.TableTheme();
|
54408
|
+
* newTheme.fromJSON(JSON.parse(jsonStr));
|
54409
|
+
* newTheme.name('custom1');
|
54410
|
+
* alert(jsonStr);
|
54411
|
+
* ```
|
54412
|
+
*/
|
54413
|
+
toJSON(): Object;
|
52277
54414
|
/**
|
52278
54415
|
* Gets or sets the style of the whole table area.
|
52279
54416
|
* @param {GC.Spread.Sheets.Tables.TableStyle} [value] The style for the whole table area.
|
@@ -52972,9 +55109,25 @@ declare module GC{
|
|
52972
55109
|
}
|
52973
55110
|
|
52974
55111
|
|
55112
|
+
export interface IColumnTypeItem{
|
55113
|
+
/**
|
55114
|
+
* identifier the column type, any of "Number", "Text", "Formula", "Checkbox", "Date", "Currency", "Percent", "Phone", "Email", "URL", "Lookup", "CreatedTime", "ModifiedTime", "Attachment", "Select", "Barcode"
|
55115
|
+
*/
|
55116
|
+
name: string;
|
55117
|
+
/**
|
55118
|
+
* the display name of the column type by the culture resources
|
55119
|
+
*/
|
55120
|
+
text?: string;
|
55121
|
+
/**
|
55122
|
+
* the icon before the display name of the column type
|
55123
|
+
*/
|
55124
|
+
iconClass?: string;
|
55125
|
+
}
|
55126
|
+
|
55127
|
+
|
52975
55128
|
export interface IDataViewChanges{
|
52976
55129
|
/**
|
52977
|
-
* The change type, could be one of "insert", "update"
|
55130
|
+
* The change type, could be one of "insert", "update", "delete", "addColumn", "updateColumn", "removeColumn".
|
52978
55131
|
*/
|
52979
55132
|
type: string;
|
52980
55133
|
/**
|
@@ -52985,6 +55138,18 @@ declare module GC{
|
|
52985
55138
|
* The original row data, only used for "update".
|
52986
55139
|
*/
|
52987
55140
|
oldDataItem?: any;
|
55141
|
+
/**
|
55142
|
+
* the current column.
|
55143
|
+
*/
|
55144
|
+
column?: GC.Data.IColumn;
|
55145
|
+
/**
|
55146
|
+
* the default value of the current added column.
|
55147
|
+
*/
|
55148
|
+
data?: any[];
|
55149
|
+
/**
|
55150
|
+
* The original column, only used for "update column".
|
55151
|
+
*/
|
55152
|
+
originalColumn?: GC.Data.IColumn;
|
52988
55153
|
/**
|
52989
55154
|
* The view index of table sheet.
|
52990
55155
|
*/
|
@@ -52994,6 +55159,7 @@ declare module GC{
|
|
52994
55159
|
|
52995
55160
|
export interface IGroupByOptions extends GC.Spread.Sheets.TableSheet.IGroupColumnOptions{
|
52996
55161
|
field: string;
|
55162
|
+
spacing?: GC.Spread.Sheets.TableSheet.IGroupSpacingOptions;
|
52997
55163
|
summaryFields?: GC.Spread.Sheets.TableSheet.IGroupSummaryFieldOptions[];
|
52998
55164
|
}
|
52999
55165
|
|
@@ -53015,8 +55181,30 @@ declare module GC{
|
|
53015
55181
|
}
|
53016
55182
|
|
53017
55183
|
|
55184
|
+
export interface IGroupLayoutOptions{
|
55185
|
+
/**
|
55186
|
+
* identifier the mode of the group layout
|
55187
|
+
*/
|
55188
|
+
mode: GC.Spread.Sheets.TableSheet.GroupLayoutMode;
|
55189
|
+
/**
|
55190
|
+
* Specify the default position of the summary results, such as "header", "footer".
|
55191
|
+
*/
|
55192
|
+
position?: "header" | "footer";
|
55193
|
+
}
|
55194
|
+
|
55195
|
+
|
55196
|
+
export interface IGroupSpacingOptions{
|
55197
|
+
/**
|
55198
|
+
* Specify the value of spacing between groups.
|
55199
|
+
*/
|
55200
|
+
row?: number;
|
55201
|
+
}
|
55202
|
+
|
55203
|
+
|
53018
55204
|
export interface IGroupSummaryFieldOptions extends GC.Spread.Sheets.TableSheet.IGroupColumnOptions{
|
53019
55205
|
formula: string;
|
55206
|
+
relateTo?: string;
|
55207
|
+
position?: "header" | "footer";
|
53020
55208
|
slice?: string | IGroupSummarySliceFieldOptions;
|
53021
55209
|
}
|
53022
55210
|
|
@@ -53130,6 +55318,30 @@ declare module GC{
|
|
53130
55318
|
* A color string used to represent the sheet tab color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
|
53131
55319
|
*/
|
53132
55320
|
sheetTabColor?: string;
|
55321
|
+
/**
|
55322
|
+
* Whether to show the row number header.
|
55323
|
+
*/
|
55324
|
+
showRowNumber?: boolean;
|
55325
|
+
/**
|
55326
|
+
* Whether to enable defining column.
|
55327
|
+
*/
|
55328
|
+
enableDefineColumn?: boolean;
|
55329
|
+
/**
|
55330
|
+
* Specify the command for defining column options.
|
55331
|
+
*/
|
55332
|
+
defineColumnCommand?: string;
|
55333
|
+
/**
|
55334
|
+
* Specify the command for submitting defined column options.
|
55335
|
+
*/
|
55336
|
+
submitDefineColumnCommand?: string;
|
55337
|
+
/**
|
55338
|
+
* Specify the column types.
|
55339
|
+
*/
|
55340
|
+
columnTypeItems?: GC.Spread.Sheets.TableSheet.IColumnTypeItem[];
|
55341
|
+
/**
|
55342
|
+
* Specify the options for group layout.
|
55343
|
+
*/
|
55344
|
+
groupLayout?: GC.Spread.Sheets.TableSheet.IGroupLayoutOptions;
|
53133
55345
|
}
|
53134
55346
|
|
53135
55347
|
/**
|
@@ -53155,6 +55367,30 @@ declare module GC{
|
|
53155
55367
|
addNewEmptyRow= 3
|
53156
55368
|
}
|
53157
55369
|
|
55370
|
+
/**
|
55371
|
+
* Defines how the group layout is displayed.
|
55372
|
+
* @enum {number}
|
55373
|
+
* @example
|
55374
|
+
* ```
|
55375
|
+
* // This sample shows how to change the group layout mode to outline.
|
55376
|
+
* tableSheet.options.groupLayout={ mode: GC.Spread.Sheets.TableSheet.GroupLayoutMode.outline };
|
55377
|
+
* ```
|
55378
|
+
*/
|
55379
|
+
export enum GroupLayoutMode{
|
55380
|
+
/** Specifies that the group layout is tabular mode.
|
55381
|
+
* @type {number}
|
55382
|
+
*/
|
55383
|
+
tabular= 0,
|
55384
|
+
/** Specifies that the group layout is outline mode.
|
55385
|
+
* @type {number}
|
55386
|
+
*/
|
55387
|
+
outline= 1,
|
55388
|
+
/** Specifies that the group layout is condensed mode.
|
55389
|
+
* @type {number}
|
55390
|
+
*/
|
55391
|
+
condensed= 2
|
55392
|
+
}
|
55393
|
+
|
53158
55394
|
/**
|
53159
55395
|
* Represents where to show the group outline.
|
53160
55396
|
* @enum {number}
|
@@ -53266,21 +55502,29 @@ declare module GC{
|
|
53266
55502
|
* @param {GC.Data.View} [dataView] - The table sheet data view.
|
53267
55503
|
* @param {Object} [options] - The initialization options.
|
53268
55504
|
* @param {boolean} [options.allowAddNew] - Whether to allow to add new empty row.
|
55505
|
+
* @param {boolean} [options.showRowNumber] - Whether to show the row number header.
|
55506
|
+
* @param {boolean} [options.enableDefineColumn] - Whether to enable defining column.
|
55507
|
+
* @param {string} [options.defineColumnCommand] - Specify the command for defining column options.
|
55508
|
+
* @param {string} [options.submitDefineColumnCommand] - Specify the command for submitting defined column options.
|
55509
|
+
* @param {GC.Spread.Sheets.TableSheet.IColumnTypeItem[]} [options.columnTypeItems] - Specify the column types.
|
55510
|
+
* @param {GC.Spread.Sheets.TableSheet.IGroupLayoutOptions} [options.groupLayout] - Specify the options for group layout.
|
55511
|
+
* @param {GC.Spread.Sheets.TableSheet.GroupLayoutMode} [options.groupLayout.mode] - Specify the mode for group layout.
|
55512
|
+
* @param {"header" | "footer"} [options.groupLayout.position] - Specify the default position of the summary results.
|
53269
55513
|
* @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
55514
|
* @param {GC.Spread.Sheets.TableSheet.IAlternatingRowOptions} [options.alternatingRowOptions] - Defines the alternating row style option.
|
53271
55515
|
* @param {number} [options.defaultStackRowHeight] - Tablesheet default stack row height, will calculate the average height by default.
|
53272
|
-
* @param {
|
53273
|
-
* @param {
|
53274
|
-
* @param {
|
53275
|
-
* @param {
|
53276
|
-
* @param {
|
53277
|
-
* @param {
|
53278
|
-
* @param {
|
53279
|
-
* @param {
|
53280
|
-
* @param {
|
53281
|
-
* @param {
|
53282
|
-
* @param {
|
53283
|
-
* @param {
|
55516
|
+
* @param {GC.Spread.Sheets.TableSheet.IMenuItemVisibility} [options.menuItemVisibility] - The visibility of the menu item in the tablesheet.
|
55517
|
+
* @param {boolean} [options.menuItemVisibility.promoteMenuItemVisible] - Whether promoting menu item to show.
|
55518
|
+
* @param {boolean} [options.menuItemVisibility.demoteMenuItemVisible] - Whether demoting menu item to show.
|
55519
|
+
* @param {boolean} [options.menuItemVisibility.moveUpMenuItemVisible] - Whether moving up menu item to show.
|
55520
|
+
* @param {boolean} [options.menuItemVisibility.moveDownMenuItemVisible] - Whether moving down menu item to show.
|
55521
|
+
* @param {boolean} [options.menuItemVisibility.addBeforeMenuItemVisible] - Whether adding before menu item to show.
|
55522
|
+
* @param {boolean} [options.menuItemVisibility.addAfterMenuItemVisible] - Whether adding after menu item to show.
|
55523
|
+
* @param {boolean} [options.menuItemVisibility.addAboveMenuItemVisible] - Whether adding above menu item to show.
|
55524
|
+
* @param {boolean} [options.menuItemVisibility.addBelowMenuItemVisible] - Whether adding below menu item to show.
|
55525
|
+
* @param {boolean} [options.menuItemVisibility.expandAllLevelMenuItemVisible] - Whether expanding all level menu item to show.
|
55526
|
+
* @param {boolean} [options.menuItemVisibility.collapseAllLevelMenuItemVisible] - Whether collapsing all level menu item to show.
|
55527
|
+
* @param {boolean} [options.menuItemVisibility.expandToLevelMenuItemVisible] - Whether expanding to level menu item to show.
|
53284
55528
|
* @example
|
53285
55529
|
* ```
|
53286
55530
|
* //This example creates a empty TableSheet.
|
@@ -53319,6 +55563,12 @@ declare module GC{
|
|
53319
55563
|
* @property {GC.Spread.Sheets.TableSheet.IAlternatingRowOptions} [alternatingRowOptions] - Defines the alternating row style options.
|
53320
55564
|
* @property {number} [defaultStackRowHeight] - Tablesheet default stack row height, will calculate the average height by default.
|
53321
55565
|
* @property {GC.Spread.Sheets.TableSheet.IMenuItemVisibility} [menuItemVisibility] - Tablesheet default stack row height, will calculate the average height by default.
|
55566
|
+
* @property {boolean} [showRowNumber] - Whether to show the row number header.
|
55567
|
+
* @property {boolean} [enableDefineColumn] - Whether to enable defining column.
|
55568
|
+
* @property {string} [defineColumnCommand] - Specify the command for defining column options.
|
55569
|
+
* @property {string} [submitDefineColumnCommand] - Specify the command for submitting defined column options.
|
55570
|
+
* @property {GC.Spread.Sheets.TableSheet.IColumnTypeItem[]} [columnTypeItems] - Specify the column types.
|
55571
|
+
* @property {GC.Spread.Sheets.TableSheet.IGroupLayoutOptions} [groupLayout] - Specify the options for group layout.
|
53322
55572
|
* @example
|
53323
55573
|
* ```
|
53324
55574
|
* //This example changes a TableSheet's options.
|
@@ -53484,14 +55734,17 @@ declare module GC{
|
|
53484
55734
|
expandHierarchyLevel(level: number): void;
|
53485
55735
|
/**
|
53486
55736
|
* 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"
|
55737
|
+
* @returns {GC.Spread.Sheets.TableSheet.IDataViewChanges[]} Returns a object array, each object could contain "type", "dataItem", "oldDataItem", "column", "originalColumn", and "index".
|
55738
|
+
* The "type" is the change type, could be one of "insert", "update", "delete", "addColumn", "updateColumn", "removeColumn".
|
53489
55739
|
* the "dataItem" is the current row data.
|
53490
55740
|
* The "oldDataItem" is the original row data, only used for "update".
|
55741
|
+
* The "column" is the current column.
|
55742
|
+
* The "data" is the default value of the current added column.
|
55743
|
+
* The "originalColumn" is the original column, only used for "update column".
|
53491
55744
|
* The "index" is the view index of table sheet.
|
53492
55745
|
* @example
|
53493
55746
|
* ```
|
53494
|
-
* //This example get changes manually in autoSync or batch mode, including updated rows, inserted rows
|
55747
|
+
* //This example get changes manually in autoSync or batch mode, including updated rows, inserted rows, deleted rows, add column, update column, remove column.
|
53495
55748
|
* tableSheet.getChanges();
|
53496
55749
|
* ```
|
53497
55750
|
*/
|