@mescius/spread-sheets 17.0.0 → 17.0.2
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 +2 -2
- package/dist/gc.spread.sheets.d.ts +1037 -229
- package/package.json +1 -1
@@ -4536,6 +4536,10 @@ declare module GC{
|
|
4536
4536
|
* When ExcelCompatibleCalcMode disabled, SpreadJS will auto convert text to number for calculation.
|
4537
4537
|
* When ExcelCompatibleCalcMode enabled, treated the text differently when provided as argument directly or in array / reference.
|
4538
4538
|
* For example, A1 is text value "1", SUM(A1, 1) will be 2 if disabled, and 1 if enabled.
|
4539
|
+
* @example
|
4540
|
+
* ```
|
4541
|
+
* GC.Spread.CalcEngine.ExcelCompatibleCalcMode = true;
|
4542
|
+
* ```
|
4539
4543
|
*/
|
4540
4544
|
var ExcelCompatibleCalcMode: boolean;
|
4541
4545
|
/**
|
@@ -4653,11 +4657,20 @@ declare module GC{
|
|
4653
4657
|
/**
|
4654
4658
|
* Provides the base class from which the classes that represent expression tree nodes are derived. This is an abstract class.
|
4655
4659
|
* @class
|
4660
|
+
* @example
|
4661
|
+
* ```
|
4662
|
+
* // the below code will return a Expression
|
4663
|
+
* GC.Spread.Sheets.CalcEngine.formulaToExpression(sheet, "=1");
|
4664
|
+
* ```
|
4656
4665
|
*/
|
4657
4666
|
constructor(type: GC.Spread.CalcEngine.ExpressionType);
|
4658
4667
|
/**
|
4659
4668
|
* Indicates the expression type
|
4660
4669
|
* @type {GC.Spread.CalcEngine.ExpressionType}
|
4670
|
+
* @example
|
4671
|
+
* ```
|
4672
|
+
* console.log(GC.Spread.Sheets.CalcEngine.formulaToExpression(sheet, "=1").type === GC.Spread.CalcEngine.ExpressionType.number);
|
4673
|
+
* ```
|
4661
4674
|
*/
|
4662
4675
|
type: GC.Spread.CalcEngine.ExpressionType;
|
4663
4676
|
}
|
@@ -4732,11 +4745,27 @@ declare module GC{
|
|
4732
4745
|
* Represents an abstract base class for defining asynchronous functions.
|
4733
4746
|
* @class
|
4734
4747
|
* @param {string} name The name of the function.
|
4735
|
-
* @param {number} minArgs The minimum number of arguments for the function.
|
4736
|
-
* @param {number} maxArgs The maximum number of arguments for the function.
|
4737
|
-
* @param {
|
4748
|
+
* @param {number} [minArgs] The minimum number of arguments for the function.
|
4749
|
+
* @param {number} [maxArgs] The maximum number of arguments for the function.
|
4750
|
+
* @param {GC.Spread.CalcEngine.Functions.IFunctionDescription} [description] The description of the function.
|
4751
|
+
* @example
|
4752
|
+
* ```
|
4753
|
+
* class WeatherFunction extends GC.Spread.CalcEngine.Functions.AsyncFunction {
|
4754
|
+
* constructor () {
|
4755
|
+
* super('WEATHER', 0, 0, {
|
4756
|
+
* description: "Get Weather",
|
4757
|
+
* parameters: []
|
4758
|
+
* });
|
4759
|
+
* }
|
4760
|
+
* evaluate (context) {
|
4761
|
+
* setTimeout(function () { context.setAsyncResult('sunny'); }, 100);
|
4762
|
+
* }
|
4763
|
+
* }
|
4764
|
+
* spread.addCustomFunction(new WeatherFunction());
|
4765
|
+
* spread.getActiveSheet().setFormula(0, 0, '=WEATHER()');
|
4766
|
+
* ```
|
4738
4767
|
*/
|
4739
|
-
constructor(name: string, minArgs
|
4768
|
+
constructor(name: string, minArgs?: number, maxArgs?: number, description?: GC.Spread.CalcEngine.Functions.IFunctionDescription);
|
4740
4769
|
/**
|
4741
4770
|
* Returns the default value of the evaluated function result before getting the async result.
|
4742
4771
|
* @returns {Object} The default value of the evaluated function result before getting the async result.
|
@@ -4765,12 +4794,32 @@ declare module GC{
|
|
4765
4794
|
/**
|
4766
4795
|
* Represents an abstract base class for defining functions.
|
4767
4796
|
* @class
|
4768
|
-
* @param {string}
|
4797
|
+
* @param {string} name The name of the function.
|
4769
4798
|
* @param {number} [minArgs] The minimum number of arguments for the function.
|
4770
4799
|
* @param {number} [maxArgs] The maximum number of arguments for the function.
|
4771
4800
|
* @param {GC.Spread.CalcEngine.Functions.IFunctionDescription} [functionDescription] The description object of the function.
|
4801
|
+
* @example
|
4802
|
+
* ```
|
4803
|
+
* class FactorialFunction extends GC.Spread.CalcEngine.Functions.Function {
|
4804
|
+
* constructor () {
|
4805
|
+
* super('FACTORIAL', 1, 1, {
|
4806
|
+
* description: "Function to calculate the Fibonacci number.",
|
4807
|
+
* parameters: [{ name: 'n' }]
|
4808
|
+
* });
|
4809
|
+
* }
|
4810
|
+
* evaluate (n) {
|
4811
|
+
* var fib = [0, 1];
|
4812
|
+
* for (var i = 2; i <= n; i++) {
|
4813
|
+
* fib[i] = fib[i - 1] + fib[i - 2];
|
4814
|
+
* }
|
4815
|
+
* return fib[n];
|
4816
|
+
* }
|
4817
|
+
* }
|
4818
|
+
* spread.addCustomFunction(new FactorialFunction());
|
4819
|
+
* spread.getActiveSheet().setFormula(0, 0, '=FACTORIAL(10)');
|
4820
|
+
* ```
|
4772
4821
|
*/
|
4773
|
-
constructor(name
|
4822
|
+
constructor(name: string, minArgs?: number, maxArgs?: number, functionDescription?: GC.Spread.CalcEngine.Functions.IFunctionDescription);
|
4774
4823
|
/**
|
4775
4824
|
* Represents the maximum number of arguments for the function.
|
4776
4825
|
* @type {number}
|
@@ -4834,16 +4883,97 @@ declare module GC{
|
|
4834
4883
|
* Finds the branch argument.
|
4835
4884
|
* @param {Object} test The test.
|
4836
4885
|
* @returns {number} Indicates the index of the argument that would be treated as the branch condition.
|
4886
|
+
* @example
|
4887
|
+
* ```
|
4888
|
+
* function EqualsFunction() {
|
4889
|
+
* this.name = 'Equals';
|
4890
|
+
* this.maxArgs = 3;
|
4891
|
+
* this.minArgs = 3;
|
4892
|
+
* }
|
4893
|
+
* EqualsFunction.prototype = new GC.Spread.CalcEngine.Functions.Function();
|
4894
|
+
* EqualsFunction.prototype.evaluate = function(logicalTest, valueIfTrue, valueIfFalse) {
|
4895
|
+
* return logicalTest ? valueIfTrue : valueIfFalse;
|
4896
|
+
* }
|
4897
|
+
* EqualsFunction.prototype.isBranch = function() {
|
4898
|
+
* return true;
|
4899
|
+
* }
|
4900
|
+
* EqualsFunction.prototype.findTestArgument = function() {
|
4901
|
+
* return 0;
|
4902
|
+
* }
|
4903
|
+
* EqualsFunction.prototype.findBranchArgument = function(logicalTestResult) {
|
4904
|
+
* if (logicalTestResult === true) {
|
4905
|
+
* return 1;
|
4906
|
+
* }
|
4907
|
+
* return 2;
|
4908
|
+
* }
|
4909
|
+
* var equalsFunction = new EqualsFunction();
|
4910
|
+
* var spread = GC.Spread.Sheets.findControl("ss") || GC.Spread.Sheets.findControl("sampleDiv");
|
4911
|
+
* spread.addCustomFunction(equalsFunction);
|
4912
|
+
* ```
|
4837
4913
|
*/
|
4838
4914
|
findBranchArgument(test: any): number;
|
4839
4915
|
/**
|
4840
4916
|
* Finds the test argument when this function is branched.
|
4841
4917
|
* @returns {number} Indicates the index of the argument that would be treated as the test condition.
|
4918
|
+
* @example
|
4919
|
+
* ```
|
4920
|
+
* function EqualsFunction() {
|
4921
|
+
* this.name = 'Equals';
|
4922
|
+
* this.maxArgs = 3;
|
4923
|
+
* this.minArgs = 3;
|
4924
|
+
* }
|
4925
|
+
* EqualsFunction.prototype = new GC.Spread.CalcEngine.Functions.Function();
|
4926
|
+
* EqualsFunction.prototype.evaluate = function(logicalTest, valueIfTrue, valueIfFalse) {
|
4927
|
+
* return logicalTest ? valueIfTrue : valueIfFalse;
|
4928
|
+
* }
|
4929
|
+
* EqualsFunction.prototype.isBranch = function() {
|
4930
|
+
* return true;
|
4931
|
+
* }
|
4932
|
+
* EqualsFunction.prototype.findTestArgument = function() {
|
4933
|
+
* return 0;
|
4934
|
+
* }
|
4935
|
+
* EqualsFunction.prototype.findBranchArgument = function(logicalTestResult) {
|
4936
|
+
* if (logicalTestResult === true) {
|
4937
|
+
* return 1;
|
4938
|
+
* }
|
4939
|
+
* return 2;
|
4940
|
+
* }
|
4941
|
+
* var equalsFunction = new EqualsFunction();
|
4942
|
+
* var spread = GC.Spread.Sheets.findControl("ss") || GC.Spread.Sheets.findControl("sampleDiv");
|
4943
|
+
* spread.addCustomFunction(equalsFunction);
|
4944
|
+
* ```
|
4842
4945
|
*/
|
4843
4946
|
findTestArgument(): number;
|
4844
4947
|
/**
|
4845
4948
|
* Gets a value that indicates whether this function is branched by arguments as conditional.
|
4846
4949
|
* @returns {boolean} `true` if this instance is branched; otherwise, `false`.
|
4950
|
+
* @example
|
4951
|
+
* ```
|
4952
|
+
* function EqualsFunction() {
|
4953
|
+
* this.name = 'Equals';
|
4954
|
+
* this.maxArgs = 3;
|
4955
|
+
* this.minArgs = 3;
|
4956
|
+
* }
|
4957
|
+
* EqualsFunction.prototype = new GC.Spread.CalcEngine.Functions.Function();
|
4958
|
+
* EqualsFunction.prototype.evaluate = function(logicalTest, valueIfTrue, valueIfFalse) {
|
4959
|
+
* return logicalTest ? valueIfTrue : valueIfFalse;
|
4960
|
+
* }
|
4961
|
+
* EqualsFunction.prototype.isBranch = function() {
|
4962
|
+
* return true;
|
4963
|
+
* }
|
4964
|
+
* EqualsFunction.prototype.findTestArgument = function() {
|
4965
|
+
* return 0;
|
4966
|
+
* }
|
4967
|
+
* EqualsFunction.prototype.findBranchArgument = function(logicalTestResult) {
|
4968
|
+
* if (logicalTestResult === true) {
|
4969
|
+
* return 1;
|
4970
|
+
* }
|
4971
|
+
* return 2;
|
4972
|
+
* }
|
4973
|
+
* var equalsFunction = new EqualsFunction();
|
4974
|
+
* var spread = GC.Spread.Sheets.findControl("ss") || GC.Spread.Sheets.findControl("sampleDiv");
|
4975
|
+
* spread.addCustomFunction(equalsFunction);
|
4976
|
+
* ```
|
4847
4977
|
*/
|
4848
4978
|
isBranch(): boolean;
|
4849
4979
|
/**
|
@@ -5123,64 +5253,169 @@ declare module GC{
|
|
5123
5253
|
module Common{
|
5124
5254
|
|
5125
5255
|
export interface IDateTimeFormat{
|
5256
|
+
/**
|
5257
|
+
* Specifies the day formatter for "ddd".
|
5258
|
+
*/
|
5126
5259
|
abbreviatedDayNames?: string[];
|
5260
|
+
/**
|
5261
|
+
* Specifies the month formatter for "MMM".
|
5262
|
+
*/
|
5127
5263
|
abbreviatedMonthGenitiveNames?: string[];
|
5264
|
+
/**
|
5265
|
+
* Specifies the month formatter for "MMM".
|
5266
|
+
*/
|
5128
5267
|
abbreviatedMonthNames?: string[];
|
5268
|
+
/**
|
5269
|
+
* Indicates the AM designator.
|
5270
|
+
*/
|
5129
5271
|
amDesignator?: string;
|
5272
|
+
/**
|
5273
|
+
* Specifies the day formatter for "dddd".
|
5274
|
+
*/
|
5130
5275
|
dayNames?: string[];
|
5276
|
+
/**
|
5277
|
+
* Specifies the standard date formatter for "F".
|
5278
|
+
*/
|
5131
5279
|
fullDateTimePattern?: string;
|
5280
|
+
/**
|
5281
|
+
* Specifies the standard date formatter for "D".
|
5282
|
+
*/
|
5132
5283
|
longDatePattern?: string;
|
5284
|
+
/**
|
5285
|
+
* Specifies the standard date formatter for "T" and "U".
|
5286
|
+
*/
|
5133
5287
|
longTimePattern?: string;
|
5288
|
+
/**
|
5289
|
+
* Specifies the standard date formatter for "M" and "m".
|
5290
|
+
*/
|
5134
5291
|
monthDayPattern?: string;
|
5292
|
+
/**
|
5293
|
+
* Specifies the formatter for "MMMM".
|
5294
|
+
*/
|
5135
5295
|
monthGenitiveNames?: string[];
|
5296
|
+
/**
|
5297
|
+
* Specifies the formatter for "M" or "MM".
|
5298
|
+
*/
|
5136
5299
|
monthNames?: string[];
|
5300
|
+
/**
|
5301
|
+
* Indicates the PM designator.
|
5302
|
+
*/
|
5137
5303
|
pmDesignator?: string;
|
5304
|
+
/**
|
5305
|
+
* Specifies the standard date formatter for "d".
|
5306
|
+
*/
|
5138
5307
|
shortDatePattern?: string;
|
5308
|
+
/**
|
5309
|
+
* Specifies the standard date formatter for "t".
|
5310
|
+
*/
|
5139
5311
|
shortTimePattern?: string;
|
5312
|
+
/**
|
5313
|
+
* Specifies the standard date formatter for "y" and "Y".
|
5314
|
+
*/
|
5140
5315
|
yearMonthPattern?: string;
|
5141
5316
|
}
|
5142
5317
|
|
5143
5318
|
|
5144
5319
|
export interface ILineBreakingStrategy{
|
5145
|
-
(text: string, option: ITextFormatOption) : string[];
|
5320
|
+
(text: string, option: GC.Spread.Common.ITextFormatOption) : string[];
|
5146
5321
|
}
|
5147
5322
|
|
5148
5323
|
|
5149
5324
|
export interface ILocalNumberFormat{
|
5325
|
+
/**
|
5326
|
+
* this property key is number, this property value is format string.
|
5327
|
+
*/
|
5150
5328
|
[K: number]: string;
|
5151
5329
|
}
|
5152
5330
|
|
5153
5331
|
|
5154
5332
|
export interface INumberFormat{
|
5333
|
+
/**
|
5334
|
+
* Indicates the currency decimal point.
|
5335
|
+
*/
|
5155
5336
|
currencyDecimalSeparator?: string;
|
5337
|
+
/**
|
5338
|
+
* Indicates the currency thousand separator.
|
5339
|
+
*/
|
5156
5340
|
currencyGroupSeparator?: string;
|
5341
|
+
/**
|
5342
|
+
* Indicates the currency symbol.
|
5343
|
+
*/
|
5157
5344
|
currencySymbol?: string;
|
5345
|
+
/**
|
5346
|
+
* Indicates the decimal point.
|
5347
|
+
*/
|
5158
5348
|
numberDecimalSeparator?: string;
|
5349
|
+
/**
|
5350
|
+
* Indicates the thousand separator.
|
5351
|
+
*/
|
5159
5352
|
numberGroupSeparator?: string;
|
5353
|
+
/**
|
5354
|
+
* Indicates the separator for function arguments in a formula.
|
5355
|
+
*/
|
5160
5356
|
listSeparator?: string;
|
5357
|
+
/**
|
5358
|
+
* Indicates the separator for the constants in one row of an array constant in a formula.
|
5359
|
+
*/
|
5161
5360
|
arrayListSeparator?: string;
|
5361
|
+
/**
|
5362
|
+
* Indicates the separator for the array rows of an array constant in a formula.
|
5363
|
+
*/
|
5162
5364
|
arrayGroupSeparator?: string;
|
5163
|
-
|
5365
|
+
/**
|
5366
|
+
* Specifies the DBNumber characters.
|
5367
|
+
*/
|
5368
|
+
dbNumber?: Object;
|
5164
5369
|
}
|
5165
5370
|
|
5166
5371
|
|
5167
5372
|
export interface IPredefinedFormats{
|
5373
|
+
/**
|
5374
|
+
* The formats displayed in currency category.
|
5375
|
+
*/
|
5168
5376
|
Currency?: Array<string>;
|
5377
|
+
/**
|
5378
|
+
* The format displayed in accounting category.
|
5379
|
+
*/
|
5169
5380
|
Accounting?: string;
|
5381
|
+
/**
|
5382
|
+
* The format displayed in accounting category has no symbol.
|
5383
|
+
*/
|
5170
5384
|
Comma?: string;
|
5385
|
+
/**
|
5386
|
+
* The formats in date category.
|
5387
|
+
*/
|
5171
5388
|
Date?: Array<string>;
|
5389
|
+
/**
|
5390
|
+
* The formats in time category.
|
5391
|
+
*/
|
5172
5392
|
Time?: Array<string>;
|
5173
5393
|
Special?: {
|
5174
5394
|
[K: string]: string;
|
5395
|
+
/**
|
5396
|
+
* The formats in special category.
|
5397
|
+
*/
|
5175
5398
|
};
|
5176
5399
|
}
|
5177
5400
|
|
5178
5401
|
|
5179
5402
|
export interface ITextFormat{
|
5403
|
+
/**
|
5404
|
+
* Specifies the characters can split up two lines. Default is [" ", "-"].
|
5405
|
+
*/
|
5180
5406
|
lineBreakingChar?: string[];
|
5407
|
+
/**
|
5408
|
+
* Specifies the characters that are not allowed at the start of a breaking line.
|
5409
|
+
*/
|
5181
5410
|
lineBreakingForbidStart?: string[];
|
5411
|
+
/**
|
5412
|
+
* Specifies the characters that are not allowed at the end of a breaking line.
|
5413
|
+
*/
|
5182
5414
|
lineBreakingForbidEnd?: string[];
|
5183
|
-
|
5415
|
+
/**
|
5416
|
+
* Specifies the function for word split.
|
5417
|
+
*/
|
5418
|
+
lineBreakingStrategy?: GC.Spread.Common.ILineBreakingStrategy;
|
5184
5419
|
}
|
5185
5420
|
|
5186
5421
|
|
@@ -5200,21 +5435,6 @@ declare module GC{
|
|
5200
5435
|
/**
|
5201
5436
|
* Indicates the date time format fields.
|
5202
5437
|
* @type {Object}
|
5203
|
-
* @property {string[]} abbreviatedDayNames - Specifies the day formatter for "ddd".
|
5204
|
-
* @property {string[]} abbreviatedMonthGenitiveNames - Specifies the month formatter for "MMM".
|
5205
|
-
* @property {string[]} abbreviatedMonthNames - Specifies the month formatter for "MMM".
|
5206
|
-
* @property {string} amDesignator - Indicates the AM designator.
|
5207
|
-
* @property {string[]} dayNames - Specifies the day formatter for "dddd".
|
5208
|
-
* @property {string} fullDateTimePattern - Specifies the standard date formatter for "F".
|
5209
|
-
* @property {string} longDatePattern - Specifies the standard date formatter for "D".
|
5210
|
-
* @property {string} longTimePattern - Specifies the standard date formatter for "T" and "U".
|
5211
|
-
* @property {string} monthDayPattern - Specifies the standard date formatter for "M" and "m".
|
5212
|
-
* @property {string[]} monthGenitiveNames - Specifies the formatter for "MMMM".
|
5213
|
-
* @property {string[]} monthNames - Specifies the formatter for "M" or "MM".
|
5214
|
-
* @property {string} pmDesignator - Indicates the PM designator.
|
5215
|
-
* @property {string} shortDatePattern - Specifies the standard date formatter for "d".
|
5216
|
-
* @property {string} shortTimePattern - Specifies the standard date formatter for "t".
|
5217
|
-
* @property {string} yearMonthPattern - Specifies the standard date formatter for "y" and "Y".
|
5218
5438
|
* @example
|
5219
5439
|
* ```
|
5220
5440
|
* // This example creates a custom culture.
|
@@ -5291,9 +5511,8 @@ declare module GC{
|
|
5291
5511
|
*/
|
5292
5512
|
id: number;
|
5293
5513
|
/**
|
5294
|
-
* indicates the local number format built.It's a map whose keys are number and values are formatString.
|
5514
|
+
* indicates the local number format built. It's a map whose keys are number and values are formatString.
|
5295
5515
|
* @type {Object}
|
5296
|
-
* @property {string} key - this property key is number, this property value is format string.
|
5297
5516
|
* @example
|
5298
5517
|
* ```
|
5299
5518
|
* //this is an example for LocalNumberFormat.
|
@@ -5308,24 +5527,6 @@ declare module GC{
|
|
5308
5527
|
/**
|
5309
5528
|
* Indicates all the number format fields.
|
5310
5529
|
* @type {Object}
|
5311
|
-
* @property {string} currencyDecimalSeparator - Indicates the currency decimal point.
|
5312
|
-
* @property {string} currencyGroupSeparator - Indicates the currency thousand separator.
|
5313
|
-
* @property {string} currencySymbol - Indicates the currency symbol.
|
5314
|
-
* @property {string} numberDecimalSeparator - Indicates the decimal point.
|
5315
|
-
* @property {string} numberGroupSeparator - Indicates the thousand separator.
|
5316
|
-
* @property {string} listSeparator - Indicates the separator for function arguments in a formula.
|
5317
|
-
* @property {string} arrayListSeparator - Indicates the separator for the constants in one row of an array constant in a formula.
|
5318
|
-
* @property {string} arrayGroupSeparator - Indicates the separator for the array rows of an array constant in a formula.
|
5319
|
-
* @property {object} dbNumber - Specifies the DBNumber characters.
|
5320
|
-
* The dbNumber object structure as follow:
|
5321
|
-
* {
|
5322
|
-
* 1: {letters: ['\u5146', '\u5343', '\u767e', '\u5341', '\u4ebf', '\u5343', '\u767e', '\u5341', '\u4e07', '\u5343', '\u767e', '\u5341', ''], // \u5146\u5343\u767e\u5341\u4ebf\u5343\u767e\u5341\u4e07\u5343\u767e\u5341
|
5323
|
-
* numbers: ['\u25cb', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d'] }, // \u25cb\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d
|
5324
|
-
* 2: {letters: ['\u5146', '\u4edf', '\u4f70', '\u62fe', '\u4ebf', '\u4edf', '\u4f70', '\u62fe', '\u4e07', '\u4edf', '\u4f70', '\u62fe', ''], // \u5146\u4edf\u4f70\u62fe\u4ebf\u4edf\u4f70\u62fe\u4e07\u4edf\u4f70\u62fe
|
5325
|
-
* numbers: ['\u96f6', '\u58f9', '\u8d30', '\u53c1', '\u8086', '\u4f0d', '\u9646', '\u67d2', '\u634c', '\u7396']}, // \u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396
|
5326
|
-
* 3: {letters: null,
|
5327
|
-
* numbers: ['\uff10', '\uff11', '\uff12', '\uff13', '\uff14', '\uff15', '\uff16', '\uff17', '\uff18', '\uff19']} // \uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19
|
5328
|
-
* };
|
5329
5530
|
* @example
|
5330
5531
|
* ```
|
5331
5532
|
* // This example creates a custom culture.
|
@@ -5335,6 +5536,14 @@ declare module GC{
|
|
5335
5536
|
* myCulture.NumberFormat.numberGroupSeparator = ".";
|
5336
5537
|
* myCulture.NumberFormat.arrayGroupSeparator = ";";
|
5337
5538
|
* myCulture.NumberFormat.arrayListSeparator = "\\";
|
5539
|
+
* myCulture.NumberFormat.dbNumber = {
|
5540
|
+
* 1: {letters: ['\u5146', '\u5343', '\u767e', '\u5341', '\u4ebf', '\u5343', '\u767e', '\u5341', '\u4e07', '\u5343', '\u767e', '\u5341', ''], // \u5146\u5343\u767e\u5341\u4ebf\u5343\u767e\u5341\u4e07\u5343\u767e\u5341
|
5541
|
+
* numbers: ['\u25cb', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d'] }, // \u25cb\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d
|
5542
|
+
* 2: {letters: ['\u5146', '\u4edf', '\u4f70', '\u62fe', '\u4ebf', '\u4edf', '\u4f70', '\u62fe', '\u4e07', '\u4edf', '\u4f70', '\u62fe', ''], // \u5146\u4edf\u4f70\u62fe\u4ebf\u4edf\u4f70\u62fe\u4e07\u4edf\u4f70\u62fe
|
5543
|
+
* numbers: ['\u96f6', '\u58f9', '\u8d30', '\u53c1', '\u8086', '\u4f0d', '\u9646', '\u67d2', '\u634c', '\u7396']}, // \u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396
|
5544
|
+
* 3: {letters: null,
|
5545
|
+
* numbers: ['\uff10', '\uff11', '\uff12', '\uff13', '\uff14', '\uff15', '\uff16', '\uff17', '\uff18', '\uff19']} // \uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19
|
5546
|
+
* };
|
5338
5547
|
* myCulture.NumberFormat.listSeparator = ";";
|
5339
5548
|
* myCulture.DateTimeFormat.amDesignator = "";
|
5340
5549
|
* myCulture.DateTimeFormat.pmDesignator = "";
|
@@ -5376,12 +5585,6 @@ declare module GC{
|
|
5376
5585
|
* The predefinedFormats is an object that describes part of the number format in format dialog.
|
5377
5586
|
* When opening the format dialog, designer read predefinedFormats in all CultureInfos to display culture related formats.
|
5378
5587
|
* @type {Object}
|
5379
|
-
* @property {string} Accounting - The format displayed in accounting category.
|
5380
|
-
* @property {string} Comma - The format displayed in accounting category has no symbol.
|
5381
|
-
* @property {array} Currency - The formats displayed in currency category.
|
5382
|
-
* @property {array} Date - The formats in date category.
|
5383
|
-
* @property {array} Time - The formats in time category.
|
5384
|
-
* @property {object} Special - The formats in special category.
|
5385
5588
|
* @example
|
5386
5589
|
* ```
|
5387
5590
|
* //This is an example for predefinedFormats:
|
@@ -5436,10 +5639,6 @@ declare module GC{
|
|
5436
5639
|
/**
|
5437
5640
|
* Indicates the text format fields.
|
5438
5641
|
* @type {Object}
|
5439
|
-
* @property {string[]} lineBreakingChar - Specifies the characters can split up two lines. Default is [" ", "-"].
|
5440
|
-
* @property {string[]} lineBreakingForbidStart - Specifies the characters that are not allowed at the start of a breaking line.
|
5441
|
-
* @property {string[]} lineBreakingForbidEnd - Specifies the characters that are not allowed at the end of a breaking line.
|
5442
|
-
* @property {GC.Spread.Common.ILineBreakingStrategy} lineBreakingStrategy - Specifies the function for word split.
|
5443
5642
|
* @example
|
5444
5643
|
* ```
|
5445
5644
|
* // This example modify culture line breaking strategy.
|
@@ -5485,6 +5684,18 @@ declare module GC{
|
|
5485
5684
|
* @param {string} cultureName The culture name to set.
|
5486
5685
|
* @param {GC.Spread.Common.CultureInfo} cultureInfo The cultureInfo set to the culture.
|
5487
5686
|
* @param {object} language The custom language set to the culture. If already set, it will overwrite the old language.
|
5687
|
+
* @example
|
5688
|
+
* ```
|
5689
|
+
* var myCulture = new GC.Spread.Common.CultureInfo();
|
5690
|
+
* myCulture.NumberFormat.currencySymbol = "\u20ac"
|
5691
|
+
* myCulture.NumberFormat.numberDecimalSeparator = ",";
|
5692
|
+
* myCulture.NumberFormat.numberGroupSeparator = ".";
|
5693
|
+
* myCulture.NumberFormat.arrayGroupSeparator = ";";
|
5694
|
+
* myCulture.NumberFormat.arrayListSeparator = "\\";
|
5695
|
+
* myCulture.NumberFormat.listSeparator = ";";
|
5696
|
+
* //add one culture
|
5697
|
+
* GC.Spread.Common.CultureManager.addCultureInfo("de-DE", myCulture);
|
5698
|
+
* ```
|
5488
5699
|
*/
|
5489
5700
|
static addCultureInfo(cultureName: string, culture: GC.Spread.Common.CultureInfo, language?: object): void;
|
5490
5701
|
/**
|
@@ -5499,6 +5710,12 @@ declare module GC{
|
|
5499
5710
|
* @static
|
5500
5711
|
* @param {string | number} cultureName Culture name or culture ID
|
5501
5712
|
* @returns {GC.Spread.Common.CultureInfo} The specified cultureInfo object.
|
5713
|
+
* @example
|
5714
|
+
* ```
|
5715
|
+
* GC.Spread.Common.CultureManager.getCultureInfo(); // return the current culture info.
|
5716
|
+
* GC.Spread.Common.CultureManager.getCultureInfo(1033); // return the culture info of culture id 1033, it's en culture.
|
5717
|
+
* GC.Spread.Common.CultureManager.getCultureInfo('en-us'); // return the culture info of en.
|
5718
|
+
* ```
|
5502
5719
|
*/
|
5503
5720
|
static getCultureInfo(cultureName: string | number): GC.Spread.Common.CultureInfo;
|
5504
5721
|
/**
|
@@ -5511,7 +5728,7 @@ declare module GC{
|
|
5511
5728
|
/**
|
5512
5729
|
* Gets the specified or current working resources.
|
5513
5730
|
* @static
|
5514
|
-
* @param {string | null} cultureName The culture name to get. If the cultureName is null, will return the current working resources.
|
5731
|
+
* @param {string | null} [cultureName] The culture name to get. If the cultureName is null, will return the current working resources.
|
5515
5732
|
* @returns {object} The specified or current working resources. Null if not define the language.
|
5516
5733
|
*/
|
5517
5734
|
static getResources(cultureName?: string): object;
|
@@ -16821,7 +17038,7 @@ declare module GC{
|
|
16821
17038
|
toHtml(headerOptions?: GC.Spread.Sheets.HeaderOptions, includeStyle?: boolean): string;
|
16822
17039
|
/**
|
16823
17040
|
* Gets or sets the data validator for the cell.
|
16824
|
-
* @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} value The cell data validator.
|
17041
|
+
* @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} [value] The cell data validator.
|
16825
17042
|
* @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator|GC.Spread.Sheets.CellRange} If no value is set, returns the cell data validator; otherwise, returns the cell.
|
16826
17043
|
* @example
|
16827
17044
|
* ```
|
@@ -19110,6 +19327,7 @@ declare module GC{
|
|
19110
19327
|
* @param eventParam *string* `sheetName` The sheet's name.
|
19111
19328
|
* @param eventParam *number* `row` The cell's row index.
|
19112
19329
|
* @param eventParam *number* `col` The cell's column index.
|
19330
|
+
* @param eventParam *Object* `editingValue` The cell's editing value.
|
19113
19331
|
* @param eventParam *{@link GC.Spread.Sheets.DataValidation.DefaultDataValidator}* `validator` The data validator that caused the error.
|
19114
19332
|
* @param eventParam *{@link GC.Spread.Sheets.DataValidation.DataValidationResult}* `validationResult` The policy that the user can set to determine how to process the error.
|
19115
19333
|
* @example
|
@@ -20639,25 +20857,49 @@ declare module GC{
|
|
20639
20857
|
constructor(name: string, colorScheme: ColorScheme, headerFont: string, bodyFont: string);
|
20640
20858
|
/**
|
20641
20859
|
* Gets or sets the body font of the theme.
|
20642
|
-
* @param {string} value The body font.
|
20860
|
+
* @param {string} [value] The body font.
|
20643
20861
|
* @returns {string|GC.Spread.Sheets.Theme} If no value is set, returns the body font; otherwise, returns the theme.
|
20862
|
+
* @example
|
20863
|
+
* ```
|
20864
|
+
* var custom = new GC.Spread.Sheets.Theme("Custom");
|
20865
|
+
* custom.bodyFont('cursive');
|
20866
|
+
* sheet.currentTheme(custom);
|
20867
|
+
* sheet.setValue(0, 0, 'hello world!'); // The font of the cell will be 'cursive'.
|
20868
|
+
* ```
|
20644
20869
|
*/
|
20645
20870
|
bodyFont(value?: string): any;
|
20646
20871
|
/**
|
20647
20872
|
* Gets or sets the base colors of the theme.
|
20648
|
-
* @param {GC.Spread.Sheets.ColorScheme} value The base colors of the theme.
|
20873
|
+
* @param {GC.Spread.Sheets.ColorScheme} [value] The base colors of the theme.
|
20649
20874
|
* @returns {GC.Spread.Sheets.ColorScheme|GC.Spread.Sheets.Theme} If no value is set, returns the base colors of the theme; otherwise, returns the theme.
|
20875
|
+
* @example
|
20876
|
+
* ```
|
20877
|
+
* var custom = new GC.Spread.Sheets.Theme("Custom");
|
20878
|
+
* custom.colors().accent1("red");
|
20879
|
+
* custom.colors().accent6("green");
|
20880
|
+
* sheet.currentTheme(custom);
|
20881
|
+
* sheet.getCell(0, 0).backColor("accent 1"); // The background color of the cell will be red.
|
20882
|
+
* sheet.getCell(0, 1).backColor("accent 6"); // The background color of the cell will be green.
|
20883
|
+
* ```
|
20650
20884
|
*/
|
20651
20885
|
colors(value?: GC.Spread.Sheets.ColorScheme): any;
|
20652
20886
|
/**
|
20653
20887
|
* Gets or sets the heading font of the theme.
|
20654
|
-
* @param {string} value The heading font.
|
20888
|
+
* @param {string} [value] The heading font.
|
20655
20889
|
* @returns {string|GC.Spread.Sheets.Theme} If no value is set, returns the heading font; otherwise, returns the theme.
|
20890
|
+
* @example
|
20891
|
+
* ```
|
20892
|
+
* var custom = new GC.Spread.Sheets.Theme("Custom");
|
20893
|
+
* custom.headerFont('cursive');
|
20894
|
+
* sheet.currentTheme(custom);
|
20895
|
+
* sheet.getCell(0, 0).themeFont('Headings');
|
20896
|
+
* sheet.setValue(0, 0, 'hello world!'); // The font of the cell will be 'cursive'.
|
20897
|
+
* ```
|
20656
20898
|
*/
|
20657
20899
|
headerFont(value?: string): any;
|
20658
20900
|
/**
|
20659
20901
|
* Gets or sets the name of the theme.
|
20660
|
-
* @param {string} value The theme name.
|
20902
|
+
* @param {string} [value] The theme name.
|
20661
20903
|
* @returns {string|GC.Spread.Sheets.Theme} If no value is set, returns the theme name; otherwise, returns the theme.
|
20662
20904
|
*/
|
20663
20905
|
name(value?: string): any;
|
@@ -24122,7 +24364,7 @@ declare module GC{
|
|
24122
24364
|
resumePaint(): void;
|
24123
24365
|
/**
|
24124
24366
|
* Gets or sets the row filter for the sheet.
|
24125
|
-
* @param {GC.Spread.Sheets.Filter.RowFilterBase} value The row filter for the sheet.
|
24367
|
+
* @param {GC.Spread.Sheets.Filter.RowFilterBase} [value] The row filter for the sheet.
|
24126
24368
|
* @returns {GC.Spread.Sheets.Filter.RowFilterBase|GC.Spread.Sheets.Worksheet} invoking the method without parameter, will return the filter instance, otherwise, return the worksheet instance.
|
24127
24369
|
* @example
|
24128
24370
|
* ```
|
@@ -24130,7 +24372,7 @@ declare module GC{
|
|
24130
24372
|
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1,1,10,3)));
|
24131
24373
|
* ```
|
24132
24374
|
*/
|
24133
|
-
rowFilter(value?: GC.Spread.Sheets.Filter.RowFilterBase):
|
24375
|
+
rowFilter(value?: GC.Spread.Sheets.Filter.RowFilterBase): any;
|
24134
24376
|
/**
|
24135
24377
|
* Scrolls the sheet by specified pixels.
|
24136
24378
|
* When vPixels is positive, worksheet will scroll down; when vPixels is negative, worksheet will scroll up; when vPixels is 0, worksheet won't scroll in vertical direction.
|
@@ -24427,7 +24669,7 @@ declare module GC{
|
|
24427
24669
|
* @param {number} row The row index.
|
24428
24670
|
* @param {number} col The column index.
|
24429
24671
|
* @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} value The data validator.
|
24430
|
-
* @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to `viewport`.
|
24672
|
+
* @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to `viewport`.
|
24431
24673
|
* @example
|
24432
24674
|
* ```
|
24433
24675
|
* spread.options.highlightInvalidData = true;
|
@@ -24447,7 +24689,7 @@ declare module GC{
|
|
24447
24689
|
* @param {number} rowCount The row count.
|
24448
24690
|
* @param {number} colCount The column count.
|
24449
24691
|
* @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} value The data validator.
|
24450
|
-
* @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to `viewport`.
|
24692
|
+
* @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to `viewport`.
|
24451
24693
|
* @example
|
24452
24694
|
* ```
|
24453
24695
|
* spread.options.highlightInvalidData = true;
|
@@ -24496,7 +24738,7 @@ declare module GC{
|
|
24496
24738
|
* Sets a formula in a specified cell in the specified sheet area.
|
24497
24739
|
* @param {number} row The row index.
|
24498
24740
|
* @param {number} col The column index.
|
24499
|
-
* @param {string} value The formula to place in the specified cell.
|
24741
|
+
* @param {string|null} value The formula to place in the specified cell.
|
24500
24742
|
* @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If you do not provide this parameter, it defaults to `viewport`.
|
24501
24743
|
* @example
|
24502
24744
|
* ```
|
@@ -24505,7 +24747,7 @@ declare module GC{
|
|
24505
24747
|
* activeSheet.setFormula(1,1,"C1+D1",GC.Spread.Sheets.SheetArea.viewport);
|
24506
24748
|
* ```
|
24507
24749
|
*/
|
24508
|
-
setFormula(row: number, col: number, value: string, sheetArea?: GC.Spread.Sheets.SheetArea): void;
|
24750
|
+
setFormula(row: number, col: number, value: string | null, sheetArea?: GC.Spread.Sheets.SheetArea): void;
|
24509
24751
|
/**
|
24510
24752
|
* Sets the hyperlink data for the specified cell in the specified sheet area.
|
24511
24753
|
* @param {number} row The row index.
|
@@ -28534,7 +28776,7 @@ declare module GC{
|
|
28534
28776
|
*/
|
28535
28777
|
name(value?: string): any;
|
28536
28778
|
/**
|
28537
|
-
*
|
28779
|
+
* Refreshes the chart, in most cases does not need to call this method.
|
28538
28780
|
*/
|
28539
28781
|
refreshContent(): void;
|
28540
28782
|
/**
|
@@ -30749,14 +30991,21 @@ declare module GC{
|
|
30749
30991
|
export enum CommentState{
|
30750
30992
|
/**
|
30751
30993
|
* Specifies that the comment is in an active state.
|
30994
|
+
* In the active state, the comment is currently being selected.
|
30995
|
+
* User can move the comment's position or resize the comment.
|
30752
30996
|
*/
|
30753
30997
|
active= 1,
|
30754
30998
|
/**
|
30755
|
-
*Specifies that the comment is in an editing state.
|
30999
|
+
* Specifies that the comment is in an editing state.
|
31000
|
+
* The edit state of an comment signifies that the comment is actively being modified or updated.
|
31001
|
+
* This state occurs when a user is making changes to the content of the comment.
|
30756
31002
|
*/
|
30757
31003
|
edit= 2,
|
30758
31004
|
/**
|
30759
31005
|
* Specifies that the comment is in a normal state.
|
31006
|
+
* In the normal state, the comment is currently not being selected.
|
31007
|
+
* User cannot interact with a comment in normal state.
|
31008
|
+
* Clicking on the comment will change the state into active or edit.
|
30760
31009
|
*/
|
30761
31010
|
normal= 3
|
30762
31011
|
}
|
@@ -31360,6 +31609,14 @@ declare module GC{
|
|
31360
31609
|
* @param {number} right The right padding.
|
31361
31610
|
* @param {number} bottom The bottom padding.
|
31362
31611
|
* @param {number} left The left padding.
|
31612
|
+
* @example
|
31613
|
+
* ```
|
31614
|
+
* var comment = activeSheet.comments.add(2, 2, 'this is a comment');
|
31615
|
+
* comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown)
|
31616
|
+
* console.log(comment.padding()); // undefined
|
31617
|
+
* comment.padding(new GC.Spread.Sheets.Comments.Padding(10, 20, 30, 40));
|
31618
|
+
* console.log(comment.padding()); // Padding {top: 10, right: 20, bottom: 30, left: 40}
|
31619
|
+
* ```
|
31363
31620
|
*/
|
31364
31621
|
constructor(top?: number, right?: number, bottom?: number, left?: number);
|
31365
31622
|
}
|
@@ -35124,7 +35381,7 @@ declare module GC{
|
|
35124
35381
|
* @static
|
35125
35382
|
* @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The compare operator type. The possible values for this attribute are defined by the GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.
|
35126
35383
|
* @param {object} v1 The first object.
|
35127
|
-
* @param {object} v2 The second object.
|
35384
|
+
* @param {object} [v2] The second object.
|
35128
35385
|
* @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
|
35129
35386
|
* @example
|
35130
35387
|
* ```
|
@@ -35197,8 +35454,8 @@ declare module GC{
|
|
35197
35454
|
* @static
|
35198
35455
|
* @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The compare operator type. The possible values for this attribute are defined by the GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.
|
35199
35456
|
* @param {object} v1 The first object.
|
35200
|
-
* @param {object} v2 The second object.
|
35201
|
-
* @param {boolean} isIntegerValue Set to `true` if the validator is set to a number.
|
35457
|
+
* @param {object} [v2] The second object.
|
35458
|
+
* @param {boolean} [isIntegerValue] Set to `true` if the validator is set to a number.
|
35202
35459
|
* @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
|
35203
35460
|
* @example
|
35204
35461
|
* ```
|
@@ -35216,7 +35473,7 @@ declare module GC{
|
|
35216
35473
|
* @static
|
35217
35474
|
* @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The compare operator type. The possible values for this attribute are defined by the GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.
|
35218
35475
|
* @param {object} v1 The first object.
|
35219
|
-
* @param {object} v2 The second object.
|
35476
|
+
* @param {object} [v2] The second object.
|
35220
35477
|
* @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
|
35221
35478
|
* @example
|
35222
35479
|
* ```
|
@@ -35234,7 +35491,7 @@ declare module GC{
|
|
35234
35491
|
* @static
|
35235
35492
|
* @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The compare operator type. The possible values for this attribute are defined by the GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.
|
35236
35493
|
* @param {object} v1 The first object.
|
35237
|
-
* @param {object} v2 The second object.
|
35494
|
+
* @param {object} [v2] The second object.
|
35238
35495
|
* @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
|
35239
35496
|
* @example
|
35240
35497
|
* ```
|
@@ -35247,6 +35504,26 @@ declare module GC{
|
|
35247
35504
|
* ```
|
35248
35505
|
*/
|
35249
35506
|
function createTimeValidator(typeOperator: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators, v1: Object, v2?: Object): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
|
35507
|
+
|
35508
|
+
export interface IHighLightStyle{
|
35509
|
+
/**
|
35510
|
+
* Indicates the data validation highlightType.
|
35511
|
+
*/
|
35512
|
+
type?: GC.Spread.Sheets.DataValidation.HighlightType;
|
35513
|
+
/**
|
35514
|
+
* Indicates the data validation highlight color.
|
35515
|
+
*/
|
35516
|
+
color?: string;
|
35517
|
+
/**
|
35518
|
+
* Indicates the data validation highlight position.
|
35519
|
+
*/
|
35520
|
+
position?: GC.Spread.Sheets.DataValidation.HighlightPosition;
|
35521
|
+
/**
|
35522
|
+
* Indicates the data validation highlight image url or data.
|
35523
|
+
*/
|
35524
|
+
image?: string;
|
35525
|
+
}
|
35526
|
+
|
35250
35527
|
/**
|
35251
35528
|
* Indicates the data validator criteria type.
|
35252
35529
|
* @enum {number}
|
@@ -35408,31 +35685,31 @@ declare module GC{
|
|
35408
35685
|
constructor(condition?: GC.Spread.Sheets.ConditionalFormatting.Condition);
|
35409
35686
|
/**
|
35410
35687
|
* Gets or sets the comparison operator.
|
35411
|
-
* @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} value The comparison operator.
|
35688
|
+
* @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} [value] The comparison operator.
|
35412
35689
|
* @returns {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the comparison operator; otherwise, returns the data validator.
|
35413
35690
|
*/
|
35414
35691
|
comparisonOperator(value?: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators): any;
|
35415
35692
|
/**
|
35416
35693
|
* Gets or sets the condition to validate.
|
35417
|
-
* @param {GC.Spread.Sheets.ConditionalFormatting.Condition} value The condition to validate.
|
35694
|
+
* @param {GC.Spread.Sheets.ConditionalFormatting.Condition} [value] The condition to validate.
|
35418
35695
|
* @returns {GC.Spread.Sheets.ConditionalFormatting.Condition | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the condition to validate; otherwise, returns the data validator.
|
35419
35696
|
*/
|
35420
35697
|
condition(value?: GC.Spread.Sheets.ConditionalFormatting.Condition): any;
|
35421
35698
|
/**
|
35422
35699
|
* Gets or sets the error message.
|
35423
|
-
* @param {string} value The error message.
|
35700
|
+
* @param {string} [value] The error message.
|
35424
35701
|
* @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the error message; otherwise, returns the data validator.
|
35425
35702
|
*/
|
35426
35703
|
errorMessage(value?: string): any;
|
35427
35704
|
/**
|
35428
35705
|
* Gets or sets the error style to display.
|
35429
|
-
* @param {GC.Spread.Sheets.DataValidation.ErrorStyle} value The error style to display.
|
35706
|
+
* @param {GC.Spread.Sheets.DataValidation.ErrorStyle} [value] The error style to display.
|
35430
35707
|
* @returns {GC.Spread.Sheets.DataValidation.ErrorStyle | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the error style to display; otherwise, returns the data validator.
|
35431
35708
|
*/
|
35432
35709
|
errorStyle(value?: GC.Spread.Sheets.DataValidation.ErrorStyle): any;
|
35433
35710
|
/**
|
35434
35711
|
* Gets or sets the error title.
|
35435
|
-
* @param {string} value The error title.
|
35712
|
+
* @param {string} [value] The error title.
|
35436
35713
|
* @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the error title; otherwise, returns the data validator.
|
35437
35714
|
*/
|
35438
35715
|
errorTitle(value?: string): any;
|
@@ -35446,11 +35723,8 @@ declare module GC{
|
|
35446
35723
|
getValidList(evaluator: Object, baseRow: number, baseColumn: number): any[];
|
35447
35724
|
/**
|
35448
35725
|
* Get or Sets the invalid data cell highlight style.
|
35449
|
-
* @param {GC.Spread.Sheets.DataValidation.
|
35450
|
-
* @
|
35451
|
-
* @param {GC.Spread.Sheets.DataValidation.HighlightPosition} [style.position] - Indicates the data validation highlight position.
|
35452
|
-
* @param {string} [style.image] - Indicates the data validation highlight image url or data.
|
35453
|
-
* @returns {Object | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the hignlight style object; otherwise, returns the data validator.
|
35726
|
+
* @param {GC.Spread.Sheets.DataValidation.IHighLightStyle} [style] - The style of invalid data cell.
|
35727
|
+
* @returns {GC.Spread.Sheets.DataValidation.IHighLightStyle | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the hignlight style object; otherwise, returns the data validator.
|
35454
35728
|
* @example
|
35455
35729
|
* ```
|
35456
35730
|
* //This example uses the highlightStyle method.
|
@@ -35465,10 +35739,10 @@ declare module GC{
|
|
35465
35739
|
* spread.options.highlightInvalidData = true;
|
35466
35740
|
* ```
|
35467
35741
|
*/
|
35468
|
-
highlightStyle(style?:
|
35742
|
+
highlightStyle(style?: GC.Spread.Sheets.DataValidation.IHighLightStyle): any;
|
35469
35743
|
/**
|
35470
35744
|
* Gets or sets whether to ignore an empty value.
|
35471
|
-
* @param {boolean} value Indicates whether to ignore the empty value.
|
35745
|
+
* @param {boolean} [value] Indicates whether to ignore the empty value.
|
35472
35746
|
* @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to ignore the empty value; otherwise, returns the data validator.
|
35473
35747
|
* @example
|
35474
35748
|
* ```
|
@@ -35490,7 +35764,7 @@ declare module GC{
|
|
35490
35764
|
ignoreBlank(value?: boolean): any;
|
35491
35765
|
/**
|
35492
35766
|
* Gets or sets whether to display a drop-down button.
|
35493
|
-
* @param {boolean} value Indicates whether to display a drop-down button.
|
35767
|
+
* @param {boolean} [value] Indicates whether to display a drop-down button.
|
35494
35768
|
* @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to display a drop-down button; otherwise, returns the data validator.
|
35495
35769
|
* @example
|
35496
35770
|
* ```
|
@@ -35509,7 +35783,7 @@ declare module GC{
|
|
35509
35783
|
inCellDropdown(value?: boolean): any;
|
35510
35784
|
/**
|
35511
35785
|
* Gets or sets the input message.
|
35512
|
-
* @param {string} value The input message.
|
35786
|
+
* @param {string} [value] The input message.
|
35513
35787
|
* @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the input message; otherwise, returns the data validator.
|
35514
35788
|
* @example
|
35515
35789
|
* ```
|
@@ -35525,7 +35799,7 @@ declare module GC{
|
|
35525
35799
|
inputMessage(value?: string): any;
|
35526
35800
|
/**
|
35527
35801
|
* Gets or sets the input title.
|
35528
|
-
* @param {string} value The input title.
|
35802
|
+
* @param {string} [value] The input title.
|
35529
35803
|
* @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the input title; otherwise, returns the data validator.
|
35530
35804
|
* @example
|
35531
35805
|
* ```
|
@@ -35546,11 +35820,29 @@ declare module GC{
|
|
35546
35820
|
* @param {number} baseColumn The base column.
|
35547
35821
|
* @param {object} actual The current value.
|
35548
35822
|
* @returns {boolean} `true` if the value is valid; otherwise, `false`.
|
35823
|
+
* @example
|
35824
|
+
* ```
|
35825
|
+
* sheet.setArray(0, 0,
|
35826
|
+
* [
|
35827
|
+
* [ 3.4 ],
|
35828
|
+
* [ 102.8 ]
|
35829
|
+
* ]);
|
35830
|
+
* var expression1 = 1.1;
|
35831
|
+
* var expression2 = 101.2;
|
35832
|
+
* var dv = GC.Spread.Sheets.DataValidation.createNumberValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, expression1, expression2, false);
|
35833
|
+
* sheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(dv);
|
35834
|
+
* dv = sheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(); // Limitation of SDM, the dv is copied when set to style.
|
35835
|
+
* console.log(dv.isValid(sheet, 0, 0, 3)); // true
|
35836
|
+
* console.log(dv.isValid(sheet, 0, 0, 1)); // false
|
35837
|
+
* console.log(dv.isValid(sheet, 0, 0, 101)); // true
|
35838
|
+
* console.log(dv.isValid(sheet, 0, 0, 0)); // false
|
35839
|
+
* console.log(dv.isValid(sheet, 0, 0, 120.0)); // false
|
35840
|
+
* ```
|
35549
35841
|
*/
|
35550
35842
|
isValid(evaluator: Object, baseRow: number, baseColumn: number, actual: Object): boolean;
|
35551
35843
|
/**
|
35552
35844
|
* Gets or sets whether to compare whole day or precise date time.
|
35553
|
-
* @param {boolean} value Indicates compare whole day or precise date time.
|
35845
|
+
* @param {boolean} [value] Indicates compare whole day or precise date time.
|
35554
35846
|
* @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns compare whole day or precise date time; otherwise, returns the data validator.
|
35555
35847
|
* @example
|
35556
35848
|
* ```
|
@@ -35592,7 +35884,7 @@ declare module GC{
|
|
35592
35884
|
reset(): void;
|
35593
35885
|
/**
|
35594
35886
|
* Gets or sets whether to display an error message.
|
35595
|
-
* @param {boolean} value Indicates whether to display an error message.
|
35887
|
+
* @param {boolean} [value] Indicates whether to display an error message.
|
35596
35888
|
* @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to display an error message; otherwise, returns the data validator.
|
35597
35889
|
* @example
|
35598
35890
|
* ```
|
@@ -35620,7 +35912,7 @@ declare module GC{
|
|
35620
35912
|
showErrorMessage(value?: boolean): any;
|
35621
35913
|
/**
|
35622
35914
|
* Gets or sets whether to display the input title and input message.
|
35623
|
-
* @param {boolean} value Indicates whether to display the input title and input message.
|
35915
|
+
* @param {boolean} [value] Indicates whether to display the input title and input message.
|
35624
35916
|
* @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to display the input title and input message; otherwise, returns the data validator.
|
35625
35917
|
* @example
|
35626
35918
|
* ```
|
@@ -35636,14 +35928,14 @@ declare module GC{
|
|
35636
35928
|
showInputMessage(value?: boolean): any;
|
35637
35929
|
/**
|
35638
35930
|
* Gets or sets the criteria type of this data validator.
|
35639
|
-
* @param {GC.Spread.Sheets.DataValidation.CriteriaType} value The criteria type of this data validator.
|
35931
|
+
* @param {GC.Spread.Sheets.DataValidation.CriteriaType} [value] The criteria type of this data validator.
|
35640
35932
|
* @returns {GC.Spread.Sheets.DataValidation.CriteriaType | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the criteria type of this data validator; otherwise, returns the data validator.
|
35641
35933
|
*/
|
35642
35934
|
type(value?: GC.Spread.Sheets.DataValidation.CriteriaType): any;
|
35643
35935
|
/**
|
35644
35936
|
* Gets the first value of the data validation.
|
35645
|
-
* @param {number} baseRow The base row.
|
35646
|
-
* @param {number} baseColumn The base column.
|
35937
|
+
* @param {number} [baseRow] The base row.
|
35938
|
+
* @param {number} [baseColumn] The base column.
|
35647
35939
|
* @returns {object} The first value.
|
35648
35940
|
* @example
|
35649
35941
|
* ```
|
@@ -35663,11 +35955,11 @@ declare module GC{
|
|
35663
35955
|
* alert(validator.value1());
|
35664
35956
|
* ```
|
35665
35957
|
*/
|
35666
|
-
value1(baseRow
|
35958
|
+
value1(baseRow?: number, baseColumn?: number): any;
|
35667
35959
|
/**
|
35668
35960
|
* Gets the second value of the data validation.
|
35669
|
-
* @param {number} baseRow The base row.
|
35670
|
-
* @param {number} baseColumn The base column.
|
35961
|
+
* @param {number} [baseRow] The base row.
|
35962
|
+
* @param {number} [baseColumn] The base column.
|
35671
35963
|
* @returns {object} The second value.
|
35672
35964
|
* @example
|
35673
35965
|
* ```
|
@@ -35687,7 +35979,7 @@ declare module GC{
|
|
35687
35979
|
* alert(validator.value2());
|
35688
35980
|
* ```
|
35689
35981
|
*/
|
35690
|
-
value2(baseRow
|
35982
|
+
value2(baseRow?: number, baseColumn?: number): any;
|
35691
35983
|
}
|
35692
35984
|
}
|
35693
35985
|
|
@@ -35893,21 +36185,36 @@ declare module GC{
|
|
35893
36185
|
module Filter{
|
35894
36186
|
|
35895
36187
|
export interface IFilterDialogVisibleInfo{
|
35896
|
-
|
35897
|
-
|
35898
|
-
|
35899
|
-
|
35900
|
-
|
36188
|
+
/**
|
36189
|
+
* Whether to show the sort by value area in filter dialog.
|
36190
|
+
*/
|
36191
|
+
sortByValue? : boolean;
|
36192
|
+
/**
|
36193
|
+
* Whether to show the sort by color area in filter dialog.
|
36194
|
+
*/
|
36195
|
+
sortByColor? : boolean;
|
36196
|
+
/**
|
36197
|
+
* Whether to show the filter by color area in filter dialog.
|
36198
|
+
*/
|
36199
|
+
filterByColor? : boolean;
|
36200
|
+
/**
|
36201
|
+
* Whether to show the filter by value area in filter dialog.
|
36202
|
+
*/
|
36203
|
+
filterByValue? : boolean;
|
36204
|
+
/**
|
36205
|
+
* Whether to show the list filter in filter dialog.
|
36206
|
+
*/
|
36207
|
+
listFilterArea? : boolean;
|
35901
36208
|
}
|
35902
36209
|
|
35903
36210
|
|
35904
36211
|
export interface IFilteredArgs{
|
35905
|
-
action: FilterActionType;
|
35906
|
-
sheet: Sheets.Worksheet;
|
35907
|
-
range: Sheets.Range;
|
36212
|
+
action: GC.Spread.Sheets.Filter.FilterActionType;
|
36213
|
+
sheet: GC.Spread.Sheets.Worksheet;
|
36214
|
+
range: GC.Spread.Sheets.Range;
|
35908
36215
|
filteredRows: number[];
|
35909
36216
|
filteredOutRows: number[];
|
35910
|
-
columns: number;
|
36217
|
+
columns: number[];
|
35911
36218
|
}
|
35912
36219
|
|
35913
36220
|
/**
|
@@ -35929,7 +36236,7 @@ declare module GC{
|
|
35929
36236
|
* Represents a default row filter.
|
35930
36237
|
* @class GC.Spread.Sheets.Filter.HideRowFilter
|
35931
36238
|
* @extends GC.Spread.Sheets.Filter.RowFilterBase
|
35932
|
-
* @param {GC.Spread.Sheets.Range} range The filter range.
|
36239
|
+
* @param {GC.Spread.Sheets.Range} [range] The filter range.
|
35933
36240
|
* @example
|
35934
36241
|
* ```
|
35935
36242
|
* //The following example creates a new filter.
|
@@ -35940,25 +36247,20 @@ declare module GC{
|
|
35940
36247
|
constructor(range?: GC.Spread.Sheets.Range);
|
35941
36248
|
/**
|
35942
36249
|
* Gets or sets the visible info for the row filter.
|
35943
|
-
* @param {
|
35944
|
-
* @
|
35945
|
-
* @param {boolean} [visibleInfo.sortByColor] Whether to show the sort by color area in filter dialog.
|
35946
|
-
* @param {boolean} [visibleInfo.filterByColor] Whether to show the filter by color area in filter dialog.
|
35947
|
-
* @param {boolean} [visibleInfo.filterByValue] Whether to show the filter by value area in filter dialog.
|
35948
|
-
* @param {boolean} [visibleInfo.listFilterArea] Whether to show the list filter in filter dialog.
|
35949
|
-
* @returns {Object | GC.Spread.Sheets.Filter.HideRowFilter} If no value is set filter dialog visible info; otherwise, returns the HideRowFilter.
|
36250
|
+
* @param {GC.Spread.Sheets.Filter.IFilterDialogVisibleInfo} [visibleInfo] The visible info for row filter.
|
36251
|
+
* @returns {GC.Spread.Sheets.Filter.IFilterDialogVisibleInfo | GC.Spread.Sheets.Filter.HideRowFilter} If no value is set filter dialog visible info; otherwise, returns the HideRowFilter.
|
35950
36252
|
* @example
|
35951
36253
|
* ```
|
35952
36254
|
* //This example creates a row filter.
|
35953
|
-
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1,1,10,3)));
|
36255
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1, 1, 10, 3)));
|
35954
36256
|
* var filter = sheet.rowFilter();
|
35955
36257
|
* filter.filterDialogVisibleInfo({
|
35956
|
-
*
|
35957
|
-
*
|
35958
|
-
*
|
35959
|
-
*
|
35960
|
-
*
|
35961
|
-
*
|
36258
|
+
* sortByValue : false,
|
36259
|
+
* sortByColor : true,
|
36260
|
+
* filterByColor : true,
|
36261
|
+
* filterByValue : true,
|
36262
|
+
* listFilterArea : false
|
36263
|
+
* });
|
35962
36264
|
* ```
|
35963
36265
|
*/
|
35964
36266
|
filterDialogVisibleInfo(visibleInfo?: GC.Spread.Sheets.Filter.IFilterDialogVisibleInfo): any;
|
@@ -35970,7 +36272,7 @@ declare module GC{
|
|
35970
36272
|
* @class GC.Spread.Sheets.Filter.RowFilterBase
|
35971
36273
|
* @param {GC.Spread.Sheets.Range} range The filter range.
|
35972
36274
|
*/
|
35973
|
-
constructor(range
|
36275
|
+
constructor(range: GC.Spread.Sheets.Range);
|
35974
36276
|
/**
|
35975
36277
|
* Represents the extendedRange for the row filter.
|
35976
36278
|
* @type {GC.Spread.Sheets.Range}
|
@@ -35989,12 +36291,42 @@ declare module GC{
|
|
35989
36291
|
/**
|
35990
36292
|
* Adds a specified filter to the row filter.
|
35991
36293
|
* @param {number} col The column index.
|
35992
|
-
* @param {GC.Spread.Sheets.ConditionalFormatting.Condition} condition The condition to filter.
|
36294
|
+
* @param {GC.Spread.Sheets.ConditionalFormatting.Condition|GC.Spread.Sheets.ConditionalFormatting.Condition[]} condition The condition to filter.
|
36295
|
+
* @example
|
36296
|
+
* ```
|
36297
|
+
* sheet.setRowCount(3);
|
36298
|
+
* sheet.setColumnCount(1);
|
36299
|
+
* sheet.setArray(0, 0,
|
36300
|
+
* [
|
36301
|
+
* [ 1 ],
|
36302
|
+
* [ 2 ],
|
36303
|
+
* [ 3 ]
|
36304
|
+
* ]);
|
36305
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36306
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo,expected: '3'});
|
36307
|
+
* sheet.rowFilter().addFilterItem(0, condition);
|
36308
|
+
* sheet.rowFilter().filter(0);
|
36309
|
+
* ```
|
35993
36310
|
*/
|
35994
|
-
addFilterItem(col: number, condition: GC.Spread.Sheets.ConditionalFormatting.Condition): void;
|
36311
|
+
addFilterItem(col: number, condition: GC.Spread.Sheets.ConditionalFormatting.Condition | GC.Spread.Sheets.ConditionalFormatting.Condition[]): void;
|
35995
36312
|
/**
|
35996
36313
|
* Filters the specified column.
|
35997
36314
|
* @param {number} col The index of the column to be filtered; if it is omitted, all the columns in the range will be filtered.
|
36315
|
+
* @example
|
36316
|
+
* ```
|
36317
|
+
* sheet.setRowCount(2);
|
36318
|
+
* sheet.setColumnCount(1);
|
36319
|
+
* sheet.setArray(0, 0,
|
36320
|
+
* [
|
36321
|
+
* [ "a" ],
|
36322
|
+
* [ "b" ]
|
36323
|
+
* ]);
|
36324
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36325
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo,expected: 'a'});
|
36326
|
+
* var rowFilter = sheet.rowFilter();
|
36327
|
+
* rowFilter.addFilterItem(0, condition);
|
36328
|
+
* rowFilter.filter(0);
|
36329
|
+
* ```
|
35998
36330
|
*/
|
35999
36331
|
filter(col?: number): void;
|
36000
36332
|
/**
|
@@ -36006,6 +36338,20 @@ declare module GC{
|
|
36006
36338
|
* One parameter col `false` if the specified column filter button is invisible; otherwise, `true`.
|
36007
36339
|
* One parameter value <c>GC.Spread.Sheets.Filter.RowFilterBase</c> sets all filter buttons to be visible(true)/invisible(false).
|
36008
36340
|
* Two parameters col,value <c>GC.Spread.Sheets.Filter.RowFilterBase</c> sets the specified column filter button to be visible(true)/invisible(false).
|
36341
|
+
* @example
|
36342
|
+
* ```
|
36343
|
+
* sheet.setArray(2, 2,
|
36344
|
+
* [
|
36345
|
+
* [ 1, 4 ],
|
36346
|
+
* [ 2, 5 ],
|
36347
|
+
* [ 3, 6 ]
|
36348
|
+
* ] );
|
36349
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(2, 2, 3, 2)));
|
36350
|
+
* console.log(sheet.rowFilter().filterButtonVisible()); // true
|
36351
|
+
* sheet.rowFilter().filterButtonVisible(2, false);
|
36352
|
+
* console.log(sheet.rowFilter().filterButtonVisible(2)); // false
|
36353
|
+
* console.log(sheet.rowFilter().filterButtonVisible(3)); // true
|
36354
|
+
* ```
|
36009
36355
|
*/
|
36010
36356
|
filterButtonVisible(col?: number | boolean, value?: boolean): any;
|
36011
36357
|
/**
|
@@ -36016,23 +36362,74 @@ declare module GC{
|
|
36016
36362
|
/**
|
36017
36363
|
* Gets all the filtered conditions.
|
36018
36364
|
* @returns {GC.Spread.Sheets.ConditionalFormatting.Condition[]} Returns a collection that contains all the filtered conditions.
|
36365
|
+
* @example
|
36366
|
+
* ```
|
36367
|
+
* sheet.setRowCount(3);
|
36368
|
+
* sheet.setColumnCount(2);
|
36369
|
+
* sheet.setArray(0, 0,
|
36370
|
+
* [
|
36371
|
+
* [ 1, 2 ],
|
36372
|
+
* [ 3, 4 ],
|
36373
|
+
* [ 5, 6 ]
|
36374
|
+
* ]);
|
36375
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36376
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.numberCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan, expected: 1 });
|
36377
|
+
* var condition1 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.numberCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan, expected: 4 });
|
36378
|
+
* sheet.rowFilter().addFilterItem(0, condition);
|
36379
|
+
* sheet.rowFilter().addFilterItem(1, condition1);
|
36380
|
+
* console.log(sheet.rowFilter().getFilteredItems().length); // 0
|
36381
|
+
* sheet.rowFilter().filter();
|
36382
|
+
* console.log(sheet.rowFilter().getFilteredItems().length); // 2
|
36383
|
+
* sheet.rowFilter().removeFilterItems(0);
|
36384
|
+
* console.log(sheet.rowFilter().getFilteredItems().length); // 1
|
36385
|
+
* sheet.rowFilter().removeFilterItems(1);
|
36386
|
+
* console.log(sheet.rowFilter().getFilteredItems().length); // 0
|
36387
|
+
* ```
|
36019
36388
|
*/
|
36020
36389
|
getFilteredItems(): GC.Spread.Sheets.ConditionalFormatting.Condition[];
|
36021
36390
|
/**
|
36022
36391
|
* Gets the filters for the specified column.
|
36023
36392
|
* @param {number} col The column index.
|
36024
36393
|
* @returns {GC.Spread.Sheets.ConditionalFormatting.Condition[]} Returns a collection that contains conditions that belong to a specified column.
|
36394
|
+
* @example
|
36395
|
+
* ```
|
36396
|
+
* sheet.getCell(0, 0).value("a");
|
36397
|
+
* sheet.getCell(0, 1).value("b");
|
36398
|
+
* sheet.getCell(1, 0).value("ac");
|
36399
|
+
* sheet.getCell(1, 1).value("bd");
|
36400
|
+
* sheet.rowFilter( new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range( -1, -1, -1, -1)));
|
36401
|
+
* var condition1 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo,expected: 'a' });
|
36402
|
+
* var condition2 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo,beginsWith: '' });
|
36403
|
+
* sheet.rowFilter().addFilterItem(0, condition1);
|
36404
|
+
* sheet.rowFilter().addFilterItem(1, condition2);
|
36405
|
+
* console.log(sheet.rowFilter().getFilterItems(0)); // result is array, length is 1, and the item equals to condition1.
|
36406
|
+
* ```
|
36025
36407
|
*/
|
36026
36408
|
getFilterItems(col: number): GC.Spread.Sheets.ConditionalFormatting.Condition[];
|
36027
36409
|
/**
|
36028
36410
|
* Gets the current sort state.
|
36029
36411
|
* @param {number} col The column index.
|
36030
36412
|
* @returns {GC.Spread.Sheets.SortState} The sort state of the current filter.
|
36413
|
+
* @example
|
36414
|
+
* ```
|
36415
|
+
* sheet.setArray(0, 0, [
|
36416
|
+
* [ 4 ],
|
36417
|
+
* [ 3 ],
|
36418
|
+
* [ 2 ],
|
36419
|
+
* [ 1 ],
|
36420
|
+
* [ 0 ]
|
36421
|
+
* ]);
|
36422
|
+
* sheet.rowFilter( new GC.Spread.Sheets.Filter.HideRowFilter( new GC.Spread.Sheets.Range( 0, 0, 5, 1 ) ) );
|
36423
|
+
* sheet.rowFilter().addFilterItem( 0, new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.numberCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan, expected: 2 }));
|
36424
|
+
* sheet.rowFilter().filter(0);
|
36425
|
+
* sheet.rowFilter().sortColumn(0, false);
|
36426
|
+
* console.log(sheet.rowFilter().getSortState(0)); // 2
|
36427
|
+
* ```
|
36031
36428
|
*/
|
36032
36429
|
getSortState(col: number): GC.Spread.Sheets.SortState;
|
36033
36430
|
/**
|
36034
36431
|
* Gets a value that indicates whether any row or specified column is filtered.
|
36035
|
-
* @param {number} col The column index.
|
36432
|
+
* @param {number} [col] The column index.
|
36036
36433
|
* @returns {boolean} No parameter `true` if some rows are filtered; otherwise, `false`.
|
36037
36434
|
* One parameter col `true` if the specified column is filtered; otherwise, `false`.
|
36038
36435
|
* @example
|
@@ -36058,7 +36455,7 @@ declare module GC{
|
|
36058
36455
|
* }
|
36059
36456
|
* });
|
36060
36457
|
* //Add button control to page
|
36061
|
-
*
|
36458
|
+
* <input type="button" id="button1" value="button1"/>
|
36062
36459
|
* ```
|
36063
36460
|
*/
|
36064
36461
|
isFiltered(col?: number): boolean;
|
@@ -36066,31 +36463,130 @@ declare module GC{
|
|
36066
36463
|
* Determines whether the specified row is filtered out.
|
36067
36464
|
* @param {number} row The row index.
|
36068
36465
|
* @returns {boolean} `true` if the row is filtered out; otherwise, `false`.
|
36466
|
+
* @example
|
36467
|
+
* ```
|
36468
|
+
* sheet.setRowCount(2);
|
36469
|
+
* sheet.setColumnCount(1);
|
36470
|
+
* sheet.setArray(0, 0,
|
36471
|
+
* [
|
36472
|
+
* [ 1 ],
|
36473
|
+
* [ 2 ]
|
36474
|
+
* ] );
|
36475
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36476
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo,expected: '2'});
|
36477
|
+
* sheet.rowFilter().addFilterItem(0, condition);
|
36478
|
+
* sheet.rowFilter().filter(0);
|
36479
|
+
* sheet.addRows(1, 1);
|
36480
|
+
* console.log(sheet.rowFilter().isFiltered()); // true
|
36481
|
+
* console.log(sheet.rowFilter().isRowFilteredOut(0)); // true
|
36482
|
+
* console.log(sheet.rowFilter().isRowFilteredOut(1)); // false
|
36483
|
+
* ```
|
36069
36484
|
*/
|
36070
36485
|
isRowFilteredOut(row: number): boolean;
|
36071
36486
|
/**
|
36072
36487
|
* Performs the action when some columns have just been filtered or unfiltered.
|
36073
|
-
* @param {
|
36488
|
+
* @param {GC.Spread.Sheets.Filter.IFilteredArgs} args An object that contains the <i>action</i>, <i>sheet</i>, <i>range</i>, <i>filteredRows</i>, <i>filteredOutRows</i>, and <i>columns</i>.
|
36489
|
+
* @example
|
36490
|
+
* ```
|
36491
|
+
* sheet.setRowCount(3);
|
36492
|
+
* sheet.setColumnCount(2);
|
36493
|
+
* sheet.setArray(0, 0,
|
36494
|
+
* [
|
36495
|
+
* [ 1, 2 ],
|
36496
|
+
* [ 3, 4 ],
|
36497
|
+
* [ 5, 6 ]
|
36498
|
+
* ]);
|
36499
|
+
* function HighLightFilter(range) {
|
36500
|
+
* GC.Spread.Sheets.Filter.RowFilterBase.call(this, range);
|
36501
|
+
* }
|
36502
|
+
* HighLightFilter.prototype = new GC.Spread.Sheets.Filter.RowFilterBase(new GC.Spread.Sheets.Range(-1, -1, -1, -1));
|
36503
|
+
* var doFilterCalled = false;
|
36504
|
+
* HighLightFilter.prototype.onFilter = function(args) {
|
36505
|
+
* if ( args.action === GC.Spread.Sheets.Filter.FilterActionType.filter ) {
|
36506
|
+
* doFilterCalled = true;
|
36507
|
+
* }
|
36508
|
+
* };
|
36509
|
+
* sheet.rowFilter(new HighLightFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36510
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.numberCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan, expected: 1 });
|
36511
|
+
* sheet.rowFilter().addFilterItem(0, condition);
|
36512
|
+
* sheet.rowFilter().filter();
|
36513
|
+
* console.log(doFilterCalled); // true
|
36514
|
+
* ```
|
36074
36515
|
*/
|
36075
36516
|
onFilter(args: GC.Spread.Sheets.Filter.IFilteredArgs): void;
|
36076
36517
|
/**
|
36077
36518
|
* Opens the filter dialog when the user clicks the filter button.
|
36078
36519
|
* @param {GC.Spread.Sheets.IFilterButtonHitInfo} filterButtonHitInfo The hit test information about the filter button.
|
36520
|
+
* @example
|
36521
|
+
* ```
|
36522
|
+
* sheet.setRowCount(3);
|
36523
|
+
* sheet.setColumnCount(2);
|
36524
|
+
* sheet.setArray(0, 0,
|
36525
|
+
* [
|
36526
|
+
* [ 1, 2 ],
|
36527
|
+
* [ 3, 4 ],
|
36528
|
+
* [ 5, 6 ]
|
36529
|
+
* ]);
|
36530
|
+
* function HighLightFilter(range) {
|
36531
|
+
* GC.Spread.Sheets.Filter.RowFilterBase.call(this, range);
|
36532
|
+
* }
|
36533
|
+
* HighLightFilter.prototype = new GC.Spread.Sheets.Filter.RowFilterBase(new GC.Spread.Sheets.Range(-1, -1, -1, -1));
|
36534
|
+
* HighLightFilter.prototype.openFilterDialog = function(args) {
|
36535
|
+
* console.log(args.row, args.col);
|
36536
|
+
* };
|
36537
|
+
* sheet.rowFilter(new HighLightFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36538
|
+
* ```
|
36079
36539
|
*/
|
36080
36540
|
openFilterDialog(filterButtonHitInfo: GC.Spread.Sheets.IFilterButtonHitInfo): void;
|
36081
36541
|
/**
|
36082
36542
|
* Removes the specified filter.
|
36083
36543
|
* @param {number} col The column index.
|
36544
|
+
* @example
|
36545
|
+
* ```
|
36546
|
+
* sheet.setRowCount(3);
|
36547
|
+
* sheet.setColumnCount(1);
|
36548
|
+
* sheet.setArray(0, 0,
|
36549
|
+
* [
|
36550
|
+
* [ 1 ],
|
36551
|
+
* [ 2 ],
|
36552
|
+
* [ 3 ]
|
36553
|
+
* ]);
|
36554
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range( -1, -1, -1, -1)));
|
36555
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo, expected: '3'});
|
36556
|
+
* var rowFilter = sheet.rowFilter();
|
36557
|
+
* rowFilter.addFilterItem(0, condition);
|
36558
|
+
* rowFilter.removeFilterItems(0);
|
36559
|
+
* ```
|
36084
36560
|
*/
|
36085
36561
|
removeFilterItems(col: number): void;
|
36086
36562
|
/**
|
36087
36563
|
* Clears all filters.
|
36564
|
+
* @example
|
36565
|
+
* ```
|
36566
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36567
|
+
* sheet.rowFilter().reset();
|
36568
|
+
* console.log(sheet.rowFilter().isFiltered()); // false
|
36569
|
+
* ```
|
36088
36570
|
*/
|
36089
36571
|
reset(): void;
|
36090
36572
|
/**
|
36091
36573
|
* Sorts the specified column in the specified order.
|
36092
36574
|
* @param {number} col The column index.
|
36093
36575
|
* @param {boolean} ascending Set to `true` to sort as ascending.
|
36576
|
+
* @example
|
36577
|
+
* ```
|
36578
|
+
* sheet.setArray(0, 0, [
|
36579
|
+
* [ 4 ],
|
36580
|
+
* [ 3 ],
|
36581
|
+
* [ 2 ],
|
36582
|
+
* [ 1 ],
|
36583
|
+
* [ 0 ]
|
36584
|
+
* ]);
|
36585
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0, 0, 5, 1)));
|
36586
|
+
* sheet.rowFilter().addFilterItem(0, new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.numberCondition, { compareType: GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan, expected: 2 }));
|
36587
|
+
* sheet.rowFilter().filter(0);
|
36588
|
+
* sheet.rowFilter().sortColumn(0, true);
|
36589
|
+
* ```
|
36094
36590
|
*/
|
36095
36591
|
sortColumn(col: number, ascending: boolean): void;
|
36096
36592
|
/**
|
@@ -36100,7 +36596,22 @@ declare module GC{
|
|
36100
36596
|
toJSON(): Object;
|
36101
36597
|
/**
|
36102
36598
|
* Removes the filter from the specified column.
|
36103
|
-
* @param {number} col The index of the column for which to remove the filter; if it is omitted, removes the filter for all columns in the range.
|
36599
|
+
* @param {number} [col] The index of the column for which to remove the filter; if it is omitted, removes the filter for all columns in the range.
|
36600
|
+
* @example
|
36601
|
+
* ```
|
36602
|
+
* sheet.setRowCount(2);
|
36603
|
+
* sheet.setColumnCount(1);
|
36604
|
+
* sheet.setArray(0, 0,
|
36605
|
+
* [
|
36606
|
+
* [ "a" ],
|
36607
|
+
* [ "b" ]
|
36608
|
+
* ]);
|
36609
|
+
* sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, -1, -1, -1)));
|
36610
|
+
* var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo,expected: 'a'});
|
36611
|
+
* var rowFilter = sheet.rowFilter();
|
36612
|
+
* rowFilter.addFilterItem(0, condition);
|
36613
|
+
* rowFilter.unfilter();
|
36614
|
+
* ```
|
36104
36615
|
*/
|
36105
36616
|
unfilter(col?: number): void;
|
36106
36617
|
}
|
@@ -36138,7 +36649,7 @@ declare module GC{
|
|
36138
36649
|
typeName: string;
|
36139
36650
|
/**
|
36140
36651
|
* Gets or sets whether to disable moving the floating object.
|
36141
|
-
* @param {boolean} value The setting for whether to disable moving the floating object.
|
36652
|
+
* @param {boolean} [value] The setting for whether to disable moving the floating object.
|
36142
36653
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the setting for whether to disable moving the floating object; otherwise, returns the floating object.
|
36143
36654
|
* @example
|
36144
36655
|
* ```
|
@@ -36157,7 +36668,7 @@ declare module GC{
|
|
36157
36668
|
allowMove(value?: boolean): any;
|
36158
36669
|
/**
|
36159
36670
|
* Gets or sets whether to disable resizing the floating object.
|
36160
|
-
* @param {boolean} value The setting for whether to disable resizing the floating object.
|
36671
|
+
* @param {boolean} [value] The setting for whether to disable resizing the floating object.
|
36161
36672
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the setting for whether to disable resizing the floating object; otherwise, returns the floating object.
|
36162
36673
|
* @example
|
36163
36674
|
* ```
|
@@ -36176,24 +36687,70 @@ declare module GC{
|
|
36176
36687
|
allowResize(value?: boolean): any;
|
36177
36688
|
/**
|
36178
36689
|
* Gets or sets the alternative text of the floating object for screen readers.
|
36179
|
-
* @param {string} value The alternative text of the floating object.
|
36690
|
+
* @param {string} [value] The alternative text of the floating object.
|
36180
36691
|
* @returns {string} The alternative text of the floating object.
|
36692
|
+
* @example
|
36693
|
+
* ```
|
36694
|
+
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 60, 64);
|
36695
|
+
* var btn = document.createElement('button');
|
36696
|
+
* btn.style.width = "60px";
|
36697
|
+
* btn.style.height = "30px";
|
36698
|
+
* btn.innerText = "button";
|
36699
|
+
* customFloatingObject.content(btn);
|
36700
|
+
* customFloatingObject.alt("A button");
|
36701
|
+
* activeSheet.floatingObjects.add(customFloatingObject);
|
36702
|
+
* ```
|
36181
36703
|
*/
|
36182
36704
|
alt(value?: string): any;
|
36183
36705
|
/**
|
36184
36706
|
* Gets a copy of the current content of the instance.
|
36185
36707
|
* @returns {HTMLElement} A copy of the current content of the instance.
|
36708
|
+
* @example
|
36709
|
+
* ```
|
36710
|
+
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 64, 30);
|
36711
|
+
* customFloatingObject.content(createButton('button 1', '64px', '30px'));
|
36712
|
+
* activeSheet.floatingObjects.add(customFloatingObject);
|
36713
|
+
*
|
36714
|
+
* var btn = customFloatingObject.cloneContent();
|
36715
|
+
* btn.innerText = 'button 2';
|
36716
|
+
* customFloatingObject.content(btn);
|
36717
|
+
*
|
36718
|
+
* function createButton (text, width, height) {
|
36719
|
+
* var btn = document.createElement('button');
|
36720
|
+
* btn.style.width = width;
|
36721
|
+
* btn.style.height = height;
|
36722
|
+
* btn.innerText = text;
|
36723
|
+
* return btn;
|
36724
|
+
* }
|
36725
|
+
* ```
|
36186
36726
|
*/
|
36187
36727
|
cloneContent(): HTMLElement;
|
36188
36728
|
/**
|
36189
36729
|
* Gets or sets the content of the custom floating object.
|
36190
|
-
* @param {HTMLElement} value The content of the custom floating object.
|
36730
|
+
* @param {HTMLElement} [value] The content of the custom floating object.
|
36191
36731
|
* @returns {HTMLElement | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the content of the custom floating object; otherwise, returns the floating object.
|
36732
|
+
* @example
|
36733
|
+
* ```
|
36734
|
+
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 64, 30);
|
36735
|
+
* customFloatingObject.content(createButton('button 1', '64px', '30px'));
|
36736
|
+
* activeSheet.floatingObjects.add(customFloatingObject);
|
36737
|
+
*
|
36738
|
+
* console.log(customFloatingObject.content()); // get current content, the result is button element with the text "button 1".
|
36739
|
+
* customFloatingObject.content(createButton('button 2', '64px', '30px')); // set new content.
|
36740
|
+
*
|
36741
|
+
* function createButton (text, width, height) {
|
36742
|
+
* var btn = document.createElement('button');
|
36743
|
+
* btn.style.width = width;
|
36744
|
+
* btn.style.height = height;
|
36745
|
+
* btn.innerText = text;
|
36746
|
+
* return btn;
|
36747
|
+
* }
|
36748
|
+
* ```
|
36192
36749
|
*/
|
36193
36750
|
content(value?: HTMLElement): any;
|
36194
36751
|
/**
|
36195
36752
|
* Gets or sets whether the object moves when hiding or showing, resizing, or moving rows or columns.
|
36196
|
-
* @param {boolean} value The value indicates whether the object moves when hiding or showing, resizing, or moving rows or columns.
|
36753
|
+
* @param {boolean} [value] The value indicates whether the object moves when hiding or showing, resizing, or moving rows or columns.
|
36197
36754
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object dynamically moves; otherwise, returns the floating object.
|
36198
36755
|
* @example
|
36199
36756
|
* ```
|
@@ -36213,7 +36770,7 @@ declare module GC{
|
|
36213
36770
|
dynamicMove(value?: boolean): any;
|
36214
36771
|
/**
|
36215
36772
|
* Gets or sets whether the size of the object changes when hiding or showing, resizing, or moving rows or columns.
|
36216
|
-
* @param {boolean} value The value indicates whether the size of the object changes when hiding or showing, resizing, or moving rows or columns.
|
36773
|
+
* @param {boolean} [value] The value indicates whether the size of the object changes when hiding or showing, resizing, or moving rows or columns.
|
36217
36774
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object dynamically changes size; otherwise, returns the floating object.
|
36218
36775
|
* @example
|
36219
36776
|
* ```
|
@@ -36233,11 +36790,11 @@ declare module GC{
|
|
36233
36790
|
dynamicSize(value?: boolean): any;
|
36234
36791
|
/**
|
36235
36792
|
* Gets or sets the end column index of the floating object position.
|
36236
|
-
* @param {number} value The end column index of the floating object position.
|
36793
|
+
* @param {number} [value] The end column index of the floating object position.
|
36237
36794
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the end column index of the floating object position; otherwise, returns the floating object.
|
36238
36795
|
* @example
|
36239
36796
|
* ```
|
36240
|
-
* //
|
36797
|
+
* //Creates a floating object.
|
36241
36798
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36242
36799
|
* var btn = document.createElement('button');
|
36243
36800
|
* btn.style.width = "60px";
|
@@ -36245,11 +36802,12 @@ declare module GC{
|
|
36245
36802
|
* btn.innerText = "button";
|
36246
36803
|
* customFloatingObject.content(btn);
|
36247
36804
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36248
|
-
* //
|
36805
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36249
36806
|
* customFloatingObject.startRow(2);
|
36250
36807
|
* customFloatingObject.startColumn(2);
|
36251
36808
|
* customFloatingObject.startRowOffset(10);
|
36252
36809
|
* customFloatingObject.startColumnOffset(10);
|
36810
|
+
* //Position the lower right corner of the floating object by cell anchors.
|
36253
36811
|
* customFloatingObject.endRow(7);
|
36254
36812
|
* customFloatingObject.endColumn(5);
|
36255
36813
|
* customFloatingObject.endRowOffset(10);
|
@@ -36259,11 +36817,11 @@ declare module GC{
|
|
36259
36817
|
endColumn(value?: number): any;
|
36260
36818
|
/**
|
36261
36819
|
* Gets or sets the offset relative to the end column of the floating object.
|
36262
|
-
* @param {number} value The offset relative to the end column of the floating object.
|
36820
|
+
* @param {number} [value] The offset relative to the end column of the floating object.
|
36263
36821
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the end column of the floating object; otherwise, returns the floating object.
|
36264
36822
|
* @example
|
36265
36823
|
* ```
|
36266
|
-
* //
|
36824
|
+
* //Creates a floating object.
|
36267
36825
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36268
36826
|
* var btn = document.createElement('button');
|
36269
36827
|
* btn.style.width = "60px";
|
@@ -36271,11 +36829,12 @@ declare module GC{
|
|
36271
36829
|
* btn.innerText = "button";
|
36272
36830
|
* customFloatingObject.content(btn);
|
36273
36831
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36274
|
-
* //
|
36832
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36275
36833
|
* customFloatingObject.startRow(2);
|
36276
36834
|
* customFloatingObject.startColumn(2);
|
36277
36835
|
* customFloatingObject.startRowOffset(10);
|
36278
36836
|
* customFloatingObject.startColumnOffset(10);
|
36837
|
+
* //Position the lower right corner of the floating object by cell anchors.
|
36279
36838
|
* customFloatingObject.endRow(7);
|
36280
36839
|
* customFloatingObject.endColumn(5);
|
36281
36840
|
* customFloatingObject.endRowOffset(10);
|
@@ -36285,11 +36844,11 @@ declare module GC{
|
|
36285
36844
|
endColumnOffset(value?: number): any;
|
36286
36845
|
/**
|
36287
36846
|
* Gets or sets the end row index of the floating object position.
|
36288
|
-
* @param {number} value The end row index of the floating object position.
|
36847
|
+
* @param {number} [value] The end row index of the floating object position.
|
36289
36848
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the end row index of the floating object position; otherwise, returns the floating object.
|
36290
36849
|
* @example
|
36291
36850
|
* ```
|
36292
|
-
* //
|
36851
|
+
* //Creates a floating object.
|
36293
36852
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36294
36853
|
* var btn = document.createElement('button');
|
36295
36854
|
* btn.style.width = "60px";
|
@@ -36297,11 +36856,12 @@ declare module GC{
|
|
36297
36856
|
* btn.innerText = "button";
|
36298
36857
|
* customFloatingObject.content(btn);
|
36299
36858
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36300
|
-
* //
|
36859
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36301
36860
|
* customFloatingObject.startRow(2);
|
36302
36861
|
* customFloatingObject.startColumn(2);
|
36303
36862
|
* customFloatingObject.startRowOffset(10);
|
36304
36863
|
* customFloatingObject.startColumnOffset(10);
|
36864
|
+
* //Position the lower right corner of the floating object by cell anchors.
|
36305
36865
|
* customFloatingObject.endRow(7);
|
36306
36866
|
* customFloatingObject.endColumn(5);
|
36307
36867
|
* customFloatingObject.endRowOffset(10);
|
@@ -36311,11 +36871,11 @@ declare module GC{
|
|
36311
36871
|
endRow(value?: number): any;
|
36312
36872
|
/**
|
36313
36873
|
* Gets or sets the offset relative to the end row of the floating object.
|
36314
|
-
* @param {number} value The offset relative to the end row of the floating object.
|
36874
|
+
* @param {number} [value] The offset relative to the end row of the floating object.
|
36315
36875
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the end row of the floating object; otherwise, returns the floating object.
|
36316
36876
|
* @example
|
36317
36877
|
* ```
|
36318
|
-
* //
|
36878
|
+
* //Creates a floating object.
|
36319
36879
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36320
36880
|
* var btn = document.createElement('button');
|
36321
36881
|
* btn.style.width = "60px";
|
@@ -36323,11 +36883,12 @@ declare module GC{
|
|
36323
36883
|
* btn.innerText = "button";
|
36324
36884
|
* customFloatingObject.content(btn);
|
36325
36885
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36326
|
-
* //
|
36886
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36327
36887
|
* customFloatingObject.startRow(2);
|
36328
36888
|
* customFloatingObject.startColumn(2);
|
36329
36889
|
* customFloatingObject.startRowOffset(10);
|
36330
36890
|
* customFloatingObject.startColumnOffset(10);
|
36891
|
+
* //Position the lower right corner of the floating object by cell anchors.
|
36331
36892
|
* customFloatingObject.endRow(7);
|
36332
36893
|
* customFloatingObject.endColumn(5);
|
36333
36894
|
* customFloatingObject.endRowOffset(10);
|
@@ -36337,7 +36898,7 @@ declare module GC{
|
|
36337
36898
|
endRowOffset(value?: number): any;
|
36338
36899
|
/**
|
36339
36900
|
* Gets or sets whether the position of the floating object is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.
|
36340
|
-
* @param {boolean} value The value indicates whether the position of the floating object is fixed.
|
36901
|
+
* @param {boolean} [value] The value indicates whether the position of the floating object is fixed.
|
36341
36902
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether the position of the floating object is fixed; otherwise, returns the floating object.
|
36342
36903
|
* @example
|
36343
36904
|
* ```
|
@@ -36360,7 +36921,7 @@ declare module GC{
|
|
36360
36921
|
getHost(): HTMLElement[];
|
36361
36922
|
/**
|
36362
36923
|
* Gets or sets the height of a floating object.
|
36363
|
-
* @param {number} value The height of a floating object.
|
36924
|
+
* @param {number} [value] The height of a floating object.
|
36364
36925
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the height of a floating object; otherwise, returns the floating object.
|
36365
36926
|
* @example
|
36366
36927
|
* ```
|
@@ -36381,7 +36942,7 @@ declare module GC{
|
|
36381
36942
|
height(value?: number): any;
|
36382
36943
|
/**
|
36383
36944
|
* Gets or sets whether this floating object is locked.
|
36384
|
-
* @param {boolean} value The value that indicates whether this floating object is locked.
|
36945
|
+
* @param {boolean} [value] The value that indicates whether this floating object is locked.
|
36385
36946
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object is locked; otherwise, returns the floating object.
|
36386
36947
|
* @example
|
36387
36948
|
* ```
|
@@ -36403,7 +36964,7 @@ declare module GC{
|
|
36403
36964
|
isLocked(value?: boolean): any;
|
36404
36965
|
/**
|
36405
36966
|
* Gets or sets whether this floating object is selected.
|
36406
|
-
* @param {boolean} value The value that indicates whether this floating object is selected.
|
36967
|
+
* @param {boolean} [value] The value that indicates whether this floating object is selected.
|
36407
36968
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object is selected; otherwise, returns the floating object.
|
36408
36969
|
* @example
|
36409
36970
|
* ```
|
@@ -36421,7 +36982,7 @@ declare module GC{
|
|
36421
36982
|
isSelected(value?: boolean): any;
|
36422
36983
|
/**
|
36423
36984
|
* Gets or sets whether this floating object is visible.
|
36424
|
-
* @param {boolean} value The value that indicates whether this floating object is visible.
|
36985
|
+
* @param {boolean} [value] The value that indicates whether this floating object is visible.
|
36425
36986
|
* @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object is visible; otherwise, returns the floating object.
|
36426
36987
|
* @example
|
36427
36988
|
* ```
|
@@ -36441,7 +37002,7 @@ declare module GC{
|
|
36441
37002
|
isVisible(value?: boolean): any;
|
36442
37003
|
/**
|
36443
37004
|
* Gets the name of the floating object.
|
36444
|
-
* @param {string} value The name of the floating object.
|
37005
|
+
* @param {string} [value] The name of the floating object.
|
36445
37006
|
* @returns {string | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the name of the floating object; otherwise, returns the floating object.
|
36446
37007
|
* @example
|
36447
37008
|
* ```
|
@@ -36467,11 +37028,11 @@ declare module GC{
|
|
36467
37028
|
refreshContent(): void;
|
36468
37029
|
/**
|
36469
37030
|
* Gets or sets the starting column index of the floating object position.
|
36470
|
-
* @param {number} value The starting column index of the floating object position.
|
37031
|
+
* @param {number} [value] The starting column index of the floating object position.
|
36471
37032
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the starting column index of the floating object position; otherwise, returns the floating object.
|
36472
37033
|
* @example
|
36473
37034
|
* ```
|
36474
|
-
* //
|
37035
|
+
* //Creates a floating object.
|
36475
37036
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36476
37037
|
* var btn = document.createElement('button');
|
36477
37038
|
* btn.style.width = "60px";
|
@@ -36479,7 +37040,7 @@ declare module GC{
|
|
36479
37040
|
* btn.innerText = "button";
|
36480
37041
|
* customFloatingObject.content(btn);
|
36481
37042
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36482
|
-
* //
|
37043
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36483
37044
|
* customFloatingObject.startRow(2);
|
36484
37045
|
* customFloatingObject.startColumn(2);
|
36485
37046
|
* customFloatingObject.startRowOffset(10);
|
@@ -36489,11 +37050,11 @@ declare module GC{
|
|
36489
37050
|
startColumn(value?: number): any;
|
36490
37051
|
/**
|
36491
37052
|
* Gets or sets the offset relative to the start column of the floating object.
|
36492
|
-
* @param {number} value The offset relative to the start column of the floating object.
|
37053
|
+
* @param {number} [value] The offset relative to the start column of the floating object.
|
36493
37054
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the start column of the floating object; otherwise, returns the floating object.
|
36494
37055
|
* @example
|
36495
37056
|
* ```
|
36496
|
-
* //
|
37057
|
+
* //Creates a floating object.
|
36497
37058
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36498
37059
|
* var btn = document.createElement('button');
|
36499
37060
|
* btn.style.width = "60px";
|
@@ -36501,7 +37062,7 @@ declare module GC{
|
|
36501
37062
|
* btn.innerText = "button";
|
36502
37063
|
* customFloatingObject.content(btn);
|
36503
37064
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36504
|
-
* //
|
37065
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36505
37066
|
* customFloatingObject.startRow(2);
|
36506
37067
|
* customFloatingObject.startColumn(2);
|
36507
37068
|
* customFloatingObject.startRowOffset(10);
|
@@ -36511,11 +37072,11 @@ declare module GC{
|
|
36511
37072
|
startColumnOffset(value?: number): any;
|
36512
37073
|
/**
|
36513
37074
|
* Gets or sets the starting row index of the floating object position.
|
36514
|
-
* @param {number} value The starting row index of the floating object position.
|
37075
|
+
* @param {number} [value] The starting row index of the floating object position.
|
36515
37076
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the starting row index of the floating object position; otherwise, returns the floating object.
|
36516
37077
|
* @example
|
36517
37078
|
* ```
|
36518
|
-
* //
|
37079
|
+
* //Creates a floating object.
|
36519
37080
|
* var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
|
36520
37081
|
* var btn = document.createElement('button');
|
36521
37082
|
* btn.style.width = "60px";
|
@@ -36523,7 +37084,7 @@ declare module GC{
|
|
36523
37084
|
* btn.innerText = "button";
|
36524
37085
|
* customFloatingObject.content(btn);
|
36525
37086
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36526
|
-
* //
|
37087
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36527
37088
|
* customFloatingObject.startRow(2);
|
36528
37089
|
* customFloatingObject.startColumn(2);
|
36529
37090
|
* customFloatingObject.startRowOffset(10);
|
@@ -36533,7 +37094,7 @@ declare module GC{
|
|
36533
37094
|
startRow(value?: number): any;
|
36534
37095
|
/**
|
36535
37096
|
* Gets or sets the offset relative to the start row of the floating object.
|
36536
|
-
* @param {number} value The offset relative to the start row of the floating object.
|
37097
|
+
* @param {number} [value] The offset relative to the start row of the floating object.
|
36537
37098
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the start row of the floating object; otherwise, returns the floating object.
|
36538
37099
|
* @example
|
36539
37100
|
* ```
|
@@ -36545,7 +37106,7 @@ declare module GC{
|
|
36545
37106
|
* btn.innerText = "button";
|
36546
37107
|
* customFloatingObject.content(btn);
|
36547
37108
|
* activeSheet.floatingObjects.add(customFloatingObject);
|
36548
|
-
* //
|
37109
|
+
* //Position the upper left corner of the floating object by cell anchors.
|
36549
37110
|
* customFloatingObject.startRow(2);
|
36550
37111
|
* customFloatingObject.startColumn(2);
|
36551
37112
|
* customFloatingObject.startRowOffset(10);
|
@@ -36555,7 +37116,7 @@ declare module GC{
|
|
36555
37116
|
startRowOffset(value?: number): any;
|
36556
37117
|
/**
|
36557
37118
|
* Gets or sets the width of a floating object.
|
36558
|
-
* @param {number} value The width of a floating object.
|
37119
|
+
* @param {number} [value] The width of a floating object.
|
36559
37120
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the width of a floating object; otherwise, returns the floating object.
|
36560
37121
|
* @example
|
36561
37122
|
* ```
|
@@ -36576,7 +37137,7 @@ declare module GC{
|
|
36576
37137
|
width(value?: number): any;
|
36577
37138
|
/**
|
36578
37139
|
* Gets or sets the horizontal location of the floating object.
|
36579
|
-
* @param {number} value The horizontal location of the floating object.
|
37140
|
+
* @param {number} [value] The horizontal location of the floating object.
|
36580
37141
|
* @return {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the horizontal location of the floating object; otherwise, returns the floating object.
|
36581
37142
|
* @example
|
36582
37143
|
* ```
|
@@ -36597,7 +37158,7 @@ declare module GC{
|
|
36597
37158
|
x(value?: number): any;
|
36598
37159
|
/**
|
36599
37160
|
* Gets or sets the vertical location of the floating object.
|
36600
|
-
* @param {number} value The vertical location of the floating object.
|
37161
|
+
* @param {number} [value] The vertical location of the floating object.
|
36601
37162
|
* @return {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the vertical location of the floating object; otherwise, returns the floating object.
|
36602
37163
|
* @example
|
36603
37164
|
* ```
|
@@ -36666,6 +37227,28 @@ declare module GC{
|
|
36666
37227
|
all(): GC.Spread.Sheets.FloatingObjects.FloatingObject[];
|
36667
37228
|
/**
|
36668
37229
|
* Removes all floating objects in the sheet.
|
37230
|
+
* @example
|
37231
|
+
* ```
|
37232
|
+
* var f1 = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 64, 30);
|
37233
|
+
* f1.content(createButton('button 1', '64px', '30px'));
|
37234
|
+
* activeSheet.floatingObjects.add(f1);
|
37235
|
+
*
|
37236
|
+
* var f2 = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f2', 100, 10, 64, 30);
|
37237
|
+
* f2.content(createButton('button 2', '64px', '30px'));
|
37238
|
+
* activeSheet.floatingObjects.add(f2);
|
37239
|
+
*
|
37240
|
+
* console.log(activeSheet.floatingObjects.all().length); // result is 2
|
37241
|
+
* activeSheet.floatingObjects.clear(); // removes all floating objects.
|
37242
|
+
* console.log(activeSheet.floatingObjects.all().length); // result is 0
|
37243
|
+
*
|
37244
|
+
* function createButton (text, width, height) {
|
37245
|
+
* var btn = document.createElement('button');
|
37246
|
+
* btn.style.width = width;
|
37247
|
+
* btn.style.height = height;
|
37248
|
+
* btn.innerText = text;
|
37249
|
+
* return btn;
|
37250
|
+
* }
|
37251
|
+
* ```
|
36669
37252
|
*/
|
36670
37253
|
clear(): void;
|
36671
37254
|
/**
|
@@ -36740,49 +37323,43 @@ declare module GC{
|
|
36740
37323
|
constructor(name: string, src: string, x: number, y: number, width: number, height: number);
|
36741
37324
|
/**
|
36742
37325
|
* Gets or sets the background color of the picture.
|
36743
|
-
* @param {string} value The backcolor of the picture.
|
37326
|
+
* @param {string} [value] The backcolor of the picture.
|
36744
37327
|
* @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the backcolor of the picture; otherwise, returns the picture.
|
36745
37328
|
* @example
|
36746
37329
|
* ```
|
36747
37330
|
* //This example sets the backcolor of the picture.
|
36748
|
-
* activeSheet.pictures.add("f2","Event.png",
|
36749
|
-
*
|
36750
|
-
* picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
|
36751
|
-
* picture.backColor("Blue");
|
37331
|
+
* var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
|
37332
|
+
* picture.borderStyle("solid");
|
36752
37333
|
* picture.borderWidth(2);
|
36753
|
-
* picture.borderColor("
|
37334
|
+
* picture.borderColor("red");
|
36754
37335
|
* ```
|
36755
37336
|
*/
|
36756
37337
|
backColor(value?: string): any;
|
36757
37338
|
/**
|
36758
37339
|
* Gets or sets the border color of the picture.
|
36759
|
-
* @param {string} value The border color of the picture.
|
37340
|
+
* @param {string} [value] The border color of the picture.
|
36760
37341
|
* @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border color of the picture; otherwise, returns the picture.
|
36761
37342
|
* @example
|
36762
37343
|
* ```
|
36763
37344
|
* //This example sets the border color of the picture.
|
36764
|
-
* activeSheet.pictures.add("f2","Event.png",
|
36765
|
-
*
|
36766
|
-
* picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
|
36767
|
-
* picture.backColor("Blue");
|
37345
|
+
* var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
|
37346
|
+
* picture.borderStyle("solid");
|
36768
37347
|
* picture.borderWidth(2);
|
36769
|
-
* picture.borderColor("
|
37348
|
+
* picture.borderColor("red");
|
36770
37349
|
* ```
|
36771
37350
|
*/
|
36772
37351
|
borderColor(value?: string): any;
|
36773
37352
|
/**
|
36774
37353
|
* Gets or sets the border radius of the picture.
|
36775
|
-
* @param {number} value The border radius of the picture.
|
37354
|
+
* @param {number} [value] The border radius of the picture.
|
36776
37355
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border radius of the picture; otherwise, returns the picture.
|
36777
37356
|
* @example
|
36778
37357
|
* ```
|
36779
37358
|
* //This example uses the borderRadius method.
|
36780
|
-
* activeSheet.pictures.add("f2","Event.png",
|
36781
|
-
*
|
36782
|
-
* picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
|
36783
|
-
* picture.backColor("Blue");
|
37359
|
+
* var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
|
37360
|
+
* picture.backColor("blue");
|
36784
37361
|
* picture.borderWidth(2);
|
36785
|
-
* picture.borderColor("
|
37362
|
+
* picture.borderColor("red");
|
36786
37363
|
* picture.borderStyle("dotted");
|
36787
37364
|
* picture.borderRadius(5);
|
36788
37365
|
* ```
|
@@ -36790,35 +37367,29 @@ declare module GC{
|
|
36790
37367
|
borderRadius(value?: number): any;
|
36791
37368
|
/**
|
36792
37369
|
* Gets or sets the border style of the picture.
|
36793
|
-
* @param {string} value The css border style of the picture, such as dotted, dashed, solid, and so on.
|
37370
|
+
* @param {string} [value] The css border style of the picture, such as dotted, dashed, solid, and so on.
|
36794
37371
|
* @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border style of the picture; otherwise, returns the picture.
|
36795
37372
|
* @example
|
36796
37373
|
* ```
|
36797
37374
|
* //This example uses the borderStyle method.
|
36798
|
-
* activeSheet.pictures.add("f2","Event.png",
|
36799
|
-
* var picture = activeSheet.pictures.get("f2");
|
36800
|
-
* picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
|
36801
|
-
* picture.backColor("Blue");
|
36802
|
-
* picture.borderWidth(2);
|
36803
|
-
* picture.borderColor("Red");
|
37375
|
+
* var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
|
36804
37376
|
* picture.borderStyle("dotted");
|
36805
|
-
* picture.
|
37377
|
+
* picture.borderWidth(2);
|
37378
|
+
* picture.borderColor("red");
|
36806
37379
|
* ```
|
36807
37380
|
*/
|
36808
37381
|
borderStyle(value?: string): any;
|
36809
37382
|
/**
|
36810
37383
|
* Gets or sets the border width of the picture.
|
36811
|
-
* @param {number} value The border width of the picture.
|
37384
|
+
* @param {number} [value] The border width of the picture.
|
36812
37385
|
* @returns {number | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border width of the picture; otherwise, returns the picture.
|
36813
37386
|
* @example
|
36814
37387
|
* ```
|
36815
37388
|
* //This example uses the borderWidth method.
|
36816
|
-
* activeSheet.pictures.add("f2","Event.png",
|
36817
|
-
*
|
36818
|
-
* picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
|
36819
|
-
* picture.backColor("Blue");
|
37389
|
+
* var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
|
37390
|
+
* picture.borderStyle("solid");
|
36820
37391
|
* picture.borderWidth(2);
|
36821
|
-
* picture.borderColor("
|
37392
|
+
* picture.borderColor("red");
|
36822
37393
|
* ```
|
36823
37394
|
*/
|
36824
37395
|
borderWidth(value?: number): any;
|
@@ -36856,24 +37427,27 @@ declare module GC{
|
|
36856
37427
|
getOriginalWidth(): number;
|
36857
37428
|
/**
|
36858
37429
|
* Gets or sets the stretch of the picture.
|
36859
|
-
* @param {GC.Spread.Sheets.ImageLayout} value The stretch of the picture.
|
37430
|
+
* @param {GC.Spread.Sheets.ImageLayout} [value] The stretch of the picture.
|
36860
37431
|
* @returns {GC.Spread.Sheets.ImageLayout | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the stretch of the picture; otherwise, returns the picture.
|
36861
37432
|
* @example
|
36862
37433
|
* ```
|
36863
37434
|
* //This example uses the pictureStretch method.
|
36864
|
-
* activeSheet.pictures.add("f2","Event.png",
|
36865
|
-
* var picture = activeSheet.pictures.get("f2");
|
37435
|
+
* var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
|
36866
37436
|
* picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
|
36867
|
-
* picture.backColor("
|
36868
|
-
* picture.borderWidth(2);
|
36869
|
-
* picture.borderColor("Red");
|
37437
|
+
* picture.backColor("blue");
|
36870
37438
|
* ```
|
36871
37439
|
*/
|
36872
37440
|
pictureStretch(value?: GC.Spread.Sheets.ImageLayout): any;
|
36873
37441
|
/**
|
36874
37442
|
* Gets or sets the src of the picture.
|
36875
|
-
* @param {string} value The src of the picture.
|
37443
|
+
* @param {string} [value] The src of the picture.
|
36876
37444
|
* @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the src of the picture; otherwise, returns the picture.
|
37445
|
+
* @example
|
37446
|
+
* ```
|
37447
|
+
* var pic = sheet.pictures.add("Picture 1", "Event.png", 100, 50, 200, 200);
|
37448
|
+
* var src = pic.src(); // get current image source, the result is "Event.png".
|
37449
|
+
* pic.src("tsoutline.png"); // set new image source.
|
37450
|
+
* ```
|
36877
37451
|
*/
|
36878
37452
|
src(value?: string): any;
|
36879
37453
|
}
|
@@ -39350,26 +39924,64 @@ declare module GC{
|
|
39350
39924
|
constructor(model: GC.Spread.Sheets.Outlines.Outline, start: number, end: number, level: number);
|
39351
39925
|
/** The children of the group.
|
39352
39926
|
* @type {Array}
|
39927
|
+
* @example
|
39928
|
+
* ```
|
39929
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39930
|
+
* activeSheet.rowOutlines.group(4, 2);
|
39931
|
+
* var outlineInfo = activeSheet.rowOutlines.find(2, 0);
|
39932
|
+
* console.log(outlineInfo.children[0] === activeSheet.rowOutlines.find(4, 1)); // true
|
39933
|
+
* ```
|
39353
39934
|
*/
|
39354
39935
|
children: any[];
|
39355
39936
|
/** The end index of the group.
|
39356
39937
|
* @type {number}
|
39938
|
+
* @example
|
39939
|
+
* ```
|
39940
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39941
|
+
* var outlineInfo = activeSheet.rowOutlines.find(2, 0);
|
39942
|
+
* console.log(outlineInfo.end); // 11
|
39943
|
+
* ```
|
39357
39944
|
*/
|
39358
39945
|
end: number;
|
39359
39946
|
/** The level of the group.
|
39360
39947
|
* @type {number}
|
39948
|
+
* @example
|
39949
|
+
* ```
|
39950
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39951
|
+
* var outlineInfo = activeSheet.rowOutlines.find(2, 0);
|
39952
|
+
* console.log(outlineInfo.level); // 0
|
39953
|
+
* ```
|
39361
39954
|
*/
|
39362
39955
|
level: number;
|
39363
39956
|
/** The owner of the group.
|
39364
39957
|
* @type {GC.Spread.Sheets.Outlines.Outline}
|
39958
|
+
* @example
|
39959
|
+
* ```
|
39960
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39961
|
+
* var outlineInfo = activeSheet.rowOutlines.find(2, 0);
|
39962
|
+
* console.log(outlineInfo.model === activeSheet.rowOutlines); // true
|
39963
|
+
* ```
|
39365
39964
|
*/
|
39366
39965
|
model: GC.Spread.Sheets.Outlines.Outline;
|
39367
39966
|
/** The parent of the group.
|
39368
39967
|
* @type {GC.Spread.Sheets.Outlines.OutlineInfo}
|
39968
|
+
* @example
|
39969
|
+
* ```
|
39970
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39971
|
+
* activeSheet.rowOutlines.group(4, 2);
|
39972
|
+
* var outlineInfo = activeSheet.rowOutlines.find(4, 1);
|
39973
|
+
* console.log(outlineInfo.parent === activeSheet.rowOutlines.find(2, 0)); // true
|
39974
|
+
* ```
|
39369
39975
|
*/
|
39370
39976
|
parent: GC.Spread.Sheets.Outlines.OutlineInfo;
|
39371
39977
|
/** The start index of the group.
|
39372
39978
|
* @type {number}
|
39979
|
+
* @example
|
39980
|
+
* ```
|
39981
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39982
|
+
* var outlineInfo = activeSheet.rowOutlines.find(2, 0);
|
39983
|
+
* console.log(outlineInfo.start); // 2
|
39984
|
+
* ```
|
39373
39985
|
*/
|
39374
39986
|
start: number;
|
39375
39987
|
/**
|
@@ -39381,12 +39993,33 @@ declare module GC{
|
|
39381
39993
|
* Compares this instance to a specified OutlineInfo object and returns an indication of their relative values.
|
39382
39994
|
* @param {number} index The index of the group item.
|
39383
39995
|
* @returns {boolean} `true` if the range group contains the specified index; otherwise, `false`.
|
39996
|
+
* @example
|
39997
|
+
* ```
|
39998
|
+
* activeSheet.rowOutlines.group(2, 10);
|
39999
|
+
* activeSheet.rowOutlines.group(4, 2);
|
40000
|
+
* var outlineInfo1 = activeSheet.rowOutlines.find(2, 0);
|
40001
|
+
* var outlineInfo2 = activeSheet.rowOutlines.find(4, 1);
|
40002
|
+
* console.log(outlineInfo1.contains(5)); // true;
|
40003
|
+
* console.log(outlineInfo2.contains(5)); // true;
|
40004
|
+
* console.log(outlineInfo1.contains(6)); // true;
|
40005
|
+
* console.log(outlineInfo2.contains(6)); // false;
|
40006
|
+
* ```
|
39384
40007
|
*/
|
39385
40008
|
contains(index: number): boolean;
|
39386
40009
|
/**
|
39387
40010
|
* Gets or sets the state of this outline (range group).
|
39388
40011
|
* @param {GC.Spread.Sheets.Outlines.OutlineState} [value] The state of this outline (range group).
|
39389
40012
|
* @returns {GC.Spread.Sheets.Outlines.OutlineState} The state of this outline (range group).
|
40013
|
+
* @example
|
40014
|
+
* ```
|
40015
|
+
* activeSheet.rowOutlines.group(2, 10);
|
40016
|
+
* activeSheet.rowOutlines.group(4, 2);
|
40017
|
+
* var outlineInfo = activeSheet.rowOutlines.find(4, 1);
|
40018
|
+
* console.log(outlineInfo.state()); // equals to GC.Spread.Sheets.Outlines.OutlineState.expanded
|
40019
|
+
* outlineInfo.state(GC.Spread.Sheets.Outlines.OutlineState.collapsed);
|
40020
|
+
* console.log(outlineInfo.state()); // equals to GC.Spread.Sheets.Outlines.OutlineState.collapsed
|
40021
|
+
* activeSheet.repaint(); // the outline is collapsed
|
40022
|
+
* ```
|
39390
40023
|
*/
|
39391
40024
|
state(value?: GC.Spread.Sheets.Outlines.OutlineState): GC.Spread.Sheets.Outlines.OutlineState;
|
39392
40025
|
}
|
@@ -39489,17 +40122,41 @@ declare module GC{
|
|
39489
40122
|
|
39490
40123
|
|
39491
40124
|
export interface PrintMargins{
|
40125
|
+
/**
|
40126
|
+
* The top margin, in hundredths of an inch.
|
40127
|
+
*/
|
39492
40128
|
top: number;
|
40129
|
+
/**
|
40130
|
+
* The bottom margin, in hundredths of an inch.
|
40131
|
+
*/
|
39493
40132
|
bottom: number;
|
40133
|
+
/**
|
40134
|
+
* The left margin, in hundredths of an inch.
|
40135
|
+
*/
|
39494
40136
|
left: number;
|
40137
|
+
/**
|
40138
|
+
* The right margin, in hundredths of an inch.
|
40139
|
+
*/
|
39495
40140
|
right: number;
|
40141
|
+
/**
|
40142
|
+
* The header offset, in hundredths of an inch.
|
40143
|
+
*/
|
39496
40144
|
header: number;
|
40145
|
+
/**
|
40146
|
+
* The footer offset, in hundredths of an inch.
|
40147
|
+
*/
|
39497
40148
|
footer: number;
|
39498
40149
|
}
|
39499
40150
|
|
39500
40151
|
|
39501
40152
|
export interface PrintSize{
|
40153
|
+
/**
|
40154
|
+
* The width of the size, in hundredths of an inch.
|
40155
|
+
*/
|
39502
40156
|
height: number;
|
40157
|
+
/**
|
40158
|
+
* The height of the size, in hundredths of an inch.
|
40159
|
+
*/
|
39503
40160
|
width: number;
|
39504
40161
|
}
|
39505
40162
|
|
@@ -40404,12 +41061,6 @@ declare module GC{
|
|
40404
41061
|
/**
|
40405
41062
|
* Gets or sets the margins for printing, in hundredths of an inch.
|
40406
41063
|
* @param {GC.Spread.Sheets.Print.PrintMargins} [value] The margins for printing.
|
40407
|
-
* @param {number} [value.top] - The top margin, in hundredths of an inch.
|
40408
|
-
* @param {number} [value.bottom] - bottom The bottom margin, in hundredths of an inch.
|
40409
|
-
* @param {number} [value.left] - left The left margin, in hundredths of an inch.
|
40410
|
-
* @param {number} [value.right] - right The right margin, in hundredths of an inch.
|
40411
|
-
* @param {number} [value.header] - header The header offset, in hundredths of an inch.
|
40412
|
-
* @param {number} [value.footer] - footer The footer offset, in hundredths of an inch.
|
40413
41064
|
* @returns {GC.Spread.Sheets.Print.PrintMargins | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the margins for printing; otherwise, returns the print setting information.
|
40414
41065
|
* @example
|
40415
41066
|
* ```
|
@@ -40505,7 +41156,7 @@ declare module GC{
|
|
40505
41156
|
/**
|
40506
41157
|
* Gets or sets the paper size for printing.
|
40507
41158
|
* @param {GC.Spread.Sheets.Print.PaperSize} [value] The paper size for printing.
|
40508
|
-
* @
|
41159
|
+
* @returns {GC.Spread.Sheets.Print.PaperSize | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the paper size for printing; otherwise, returns the print setting information.
|
40509
41160
|
* @example
|
40510
41161
|
* ```
|
40511
41162
|
* activeSheet.setArray(0, 0, new Array(20).fill(["sample text"]));
|
@@ -44273,6 +44924,15 @@ declare module GC{
|
|
44273
44924
|
allowMove: (value?: boolean, shouldCallback?: boolean) => boolean | ISlicer;
|
44274
44925
|
}
|
44275
44926
|
|
44927
|
+
|
44928
|
+
/**
|
44929
|
+
* @typedef GC.Spread.Sheets.Slicers.SlicerBorderStyle
|
44930
|
+
* @type {"empty" | "thin" | "medium" | "dashed" | "dotted" | "thick" | "double" | "hair" | "mediumDashed" | "dashDot" | "mediumDashDot" | "dashDotDot" | "mediumDashDotDot" | "slantedDashDot"}
|
44931
|
+
* @description The border type of slicer border style.
|
44932
|
+
*/
|
44933
|
+
export type SlicerBorderStyle =
|
44934
|
+
"empty" | "thin" | "medium" | "dashed" | "dotted" | "thick" | "double" | "hair" | "mediumDashed" | "dashDot" | "mediumDashDot" | "dashDotDot" | "mediumDashDotDot" | "slantedDashDot"
|
44935
|
+
|
44276
44936
|
/**
|
44277
44937
|
* Specifies which type to add a slicer
|
44278
44938
|
* @enum {number}
|
@@ -45972,11 +46632,11 @@ declare module GC{
|
|
45972
46632
|
* table.setColumnName(4, dataColumns[4]);
|
45973
46633
|
* //style info
|
45974
46634
|
* var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
|
45975
|
-
* var border = new GC.Spread.Sheets.Slicers.SlicerBorder(3,
|
46635
|
+
* var border = new GC.Spread.Sheets.Slicers.SlicerBorder(3, 'dashed', "green");
|
45976
46636
|
*
|
45977
|
-
* console.log(border.borderStyle()); // dashed
|
45978
|
-
* border.borderStyle(
|
45979
|
-
* console.log(border.borderStyle()); // mediumDashDot
|
46637
|
+
* console.log(border.borderStyle()); // 'dashed'
|
46638
|
+
* border.borderStyle('mediumDashDot');
|
46639
|
+
* console.log(border.borderStyle()); // 'mediumDashDot'
|
45980
46640
|
*
|
45981
46641
|
* hstyle.borderBottom(border);
|
45982
46642
|
* var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
|
@@ -48869,6 +49529,15 @@ declare module GC{
|
|
48869
49529
|
/**
|
48870
49530
|
* Clones a sparkline.
|
48871
49531
|
* @returns {GC.Spread.Sheets.Sparklines.Sparkline} The cloned sparkline.
|
49532
|
+
* @example
|
49533
|
+
* ```
|
49534
|
+
* let sheet = spread.getActiveSheet();
|
49535
|
+
* sheet.setArray(0, 0, [-1,2,3,4,3,2,3,5]);
|
49536
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49537
|
+
* let sparkline = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, new GC.Spread.Sheets.Sparklines.SparklineSetting());
|
49538
|
+
*
|
49539
|
+
* let sparkline2 = sparkline.clone();
|
49540
|
+
* ```
|
48872
49541
|
*/
|
48873
49542
|
clone(): GC.Spread.Sheets.Sparklines.Sparkline;
|
48874
49543
|
/**
|
@@ -49050,8 +49719,21 @@ declare module GC{
|
|
49050
49719
|
displayDateAxis(value?: boolean): any;
|
49051
49720
|
/**
|
49052
49721
|
* Gets or sets the sparkline group.
|
49053
|
-
* @param {GC.Spread.Sheets.Sparklines.SparklineGroup} value The sparkline group.
|
49722
|
+
* @param {GC.Spread.Sheets.Sparklines.SparklineGroup} [value] The sparkline group.
|
49054
49723
|
* @returns {GC.Spread.Sheets.Sparklines.SparklineGroup | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline group; otherwise, returns the sparkline.
|
49724
|
+
* @example
|
49725
|
+
* ```
|
49726
|
+
* let sheet = spread.getActiveSheet();
|
49727
|
+
* sheet.setArray(0, 0, [1,2,3,4,3,2,3,5]);
|
49728
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49729
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49730
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49731
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49732
|
+
* sheet.groupSparkline([sparkline1,sparkline2]);
|
49733
|
+
*
|
49734
|
+
* let sparklineGroup = sparkline1.group();
|
49735
|
+
* console.log(sparklineGroup.count()) // 2
|
49736
|
+
* ```
|
49055
49737
|
*/
|
49056
49738
|
group(value?: GC.Spread.Sheets.Sparklines.SparklineGroup): any;
|
49057
49739
|
/**
|
@@ -49065,14 +49747,39 @@ declare module GC{
|
|
49065
49747
|
paintSparkline(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void;
|
49066
49748
|
/**
|
49067
49749
|
* Gets or sets the sparkline setting of the cell.
|
49068
|
-
* @param {GC.Spread.Sheets.Sparklines.SparklineSetting} value The sparkline setting.
|
49750
|
+
* @param {GC.Spread.Sheets.Sparklines.SparklineSetting} [value] The sparkline setting.
|
49069
49751
|
* @returns {GC.Spread.Sheets.Sparklines.SparklineSetting | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline setting; otherwise, returns the sparkline.
|
49752
|
+
* @example
|
49753
|
+
* ```
|
49754
|
+
* let sheet = spread.getActiveSheet();
|
49755
|
+
* sheet.setArray(0, 0, [-1,2,3,4,3,2,3,5]);
|
49756
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49757
|
+
* let sparkline = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, new GC.Spread.Sheets.Sparklines.SparklineSetting());
|
49758
|
+
*
|
49759
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49760
|
+
* setting.options.showMarkers = true;
|
49761
|
+
* setting.options.displayXAxis = true;
|
49762
|
+
* setting.options.seriesColor = "Text 2 1";
|
49763
|
+
* setting.options.firstMarkerColor = "Text 2 3";
|
49764
|
+
* setting.options.axisColor ="Text 1 1";
|
49765
|
+
*
|
49766
|
+
* sparkline.setting(setting);
|
49767
|
+
* ```
|
49070
49768
|
*/
|
49071
49769
|
setting(value?: GC.Spread.Sheets.Sparklines.SparklineSetting): any;
|
49072
49770
|
/**
|
49073
49771
|
* Gets or sets the type of the sparkline.
|
49074
|
-
* @param {GC.Spread.Sheets.Sparklines.SparklineType} value The sparkline type.
|
49772
|
+
* @param {GC.Spread.Sheets.Sparklines.SparklineType} [value] The sparkline type.
|
49075
49773
|
* @returns {GC.Spread.Sheets.Sparklines.SparklineType | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline type; otherwise, returns the sparkline.
|
49774
|
+
* @example
|
49775
|
+
* ```
|
49776
|
+
* let sheet = spread.getActiveSheet();
|
49777
|
+
* sheet.setArray(0, 0, [-1,2,3,4,3,2,3,5]);
|
49778
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49779
|
+
* let sparkline = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, new GC.Spread.Sheets.Sparklines.SparklineSetting());
|
49780
|
+
*
|
49781
|
+
* sparkline.sparklineType(GC.Spread.Sheets.Sparklines.SparklineType.column);
|
49782
|
+
* ```
|
49076
49783
|
*/
|
49077
49784
|
sparklineType(value?: GC.Spread.Sheets.Sparklines.SparklineType): any;
|
49078
49785
|
}
|
@@ -49139,40 +49846,133 @@ declare module GC{
|
|
49139
49846
|
/**
|
49140
49847
|
* Adds a sparkline to the group.
|
49141
49848
|
* @param {GC.Spread.Sheets.Sparklines.Sparkline} item The sparkline item.
|
49849
|
+
* @example
|
49850
|
+
* ```
|
49851
|
+
* let sheet = spread.getActiveSheet();
|
49852
|
+
* sheet.setArray(0, 0, [1,2,3,4,3,2,3,5]);
|
49853
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49854
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49855
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49856
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49857
|
+
* let sparkline3 = sheet.setSparkline(11, 6, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.column, setting);
|
49858
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]);
|
49859
|
+
* // add a sparkline to sparkline group
|
49860
|
+
* sparklineGroup.add(sparkline3);
|
49861
|
+
* ```
|
49142
49862
|
*/
|
49143
49863
|
add(item: GC.Spread.Sheets.Sparklines.Sparkline): void;
|
49144
49864
|
/**
|
49145
49865
|
* Clones the current sparkline group.
|
49146
49866
|
* @returns {GC.Spread.Sheets.Sparklines.SparklineGroup} The cloned sparkline group.
|
49867
|
+
* @example
|
49868
|
+
* ```
|
49869
|
+
* let sheet = spread.getActiveSheet();
|
49870
|
+
* sheet.setArray(0, 0, [1,2,3,4,3,2,3,5]);
|
49871
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49872
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49873
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49874
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49875
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]
|
49876
|
+
*
|
49877
|
+
* let sparklineGroup2 = sparklineGroup.clone();
|
49878
|
+
* ```
|
49147
49879
|
*/
|
49148
49880
|
clone(): GC.Spread.Sheets.Sparklines.SparklineGroup;
|
49149
49881
|
/**
|
49150
49882
|
* Determines whether the group contains a specific value.
|
49151
49883
|
* @param {GC.Spread.Sheets.Sparklines.Sparkline} item The object to locate in the group.
|
49152
49884
|
* @returns {boolean} `true` if the item is found in the group; otherwise, `false`.
|
49885
|
+
* @example
|
49886
|
+
* ```
|
49887
|
+
* let sheet = spread.getActiveSheet();
|
49888
|
+
* sheet.setArray(0, 0, [1,2,3,4,3,2,3,5]);
|
49889
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49890
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49891
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49892
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49893
|
+
* let sparkline3 = sheet.setSparkline(11, 6, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49894
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]);
|
49895
|
+
*
|
49896
|
+
* console.log(sparklineGroup.contains(sparkline1)); // true
|
49897
|
+
* console.log(sparklineGroup.contains(sparkline3)); // false
|
49898
|
+
* ```
|
49153
49899
|
*/
|
49154
49900
|
contains(item: GC.Spread.Sheets.Sparklines.Sparkline): boolean;
|
49155
49901
|
/**
|
49156
49902
|
* Represents the count of the sparkline group innerlist.
|
49157
49903
|
* @returns {number} The sparkline count in the group.
|
49904
|
+
* @example
|
49905
|
+
* ```
|
49906
|
+
* let sheet = spread.getActiveSheet();
|
49907
|
+
* sheet.setArray(0, 0, [1,2,3,4,3,2,3,5]);
|
49908
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49909
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49910
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49911
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49912
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]);
|
49913
|
+
*
|
49914
|
+
* console.log(sparklineGroup.count()); // 2
|
49915
|
+
* ```
|
49158
49916
|
*/
|
49159
49917
|
count(): number;
|
49160
49918
|
/**
|
49161
49919
|
* Represents the date axis data.
|
49162
|
-
* @param {GC.Spread.Sheets.Range} value The date axis data.
|
49920
|
+
* @param {GC.Spread.Sheets.Range} [value] The date axis data.
|
49163
49921
|
* @returns {GC.Spread.Sheets.Range | undefined} If no value is set, returns the date axis data; otherwise, returns undefined.
|
49922
|
+
* @example
|
49923
|
+
* ```
|
49924
|
+
* let sheet = spread.getActiveSheet();
|
49925
|
+
* sheet.setArray(0, 0, [-1,2,3,4,3,2,3,5]);
|
49926
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49927
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49928
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49929
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49930
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]);
|
49931
|
+
*
|
49932
|
+
* sheet.setArray(0, 1, [1,4,6,5,3,6,10,2]);
|
49933
|
+
* sparklineGroup.dateAxisData(new GC.Spread.Sheets.Range(0, 1, 8, 1));
|
49934
|
+
* console.log(sparklineGroup.dateAxisData());
|
49935
|
+
* ```
|
49164
49936
|
*/
|
49165
49937
|
dateAxisData(value?: GC.Spread.Sheets.Range): any;
|
49166
49938
|
/**
|
49167
49939
|
* Represents the date axis orientation.
|
49168
|
-
* @param {GC.Spread.Sheets.Sparklines.DataOrientation} value The date axis orientation.
|
49940
|
+
* @param {GC.Spread.Sheets.Sparklines.DataOrientation} [value] The date axis orientation.
|
49169
49941
|
* @returns {GC.Spread.Sheets.Sparklines.DataOrientation | undefined} If no value is set, returns the date axis orientation; otherwise, returns undefined.
|
49942
|
+
* @example
|
49943
|
+
* ```
|
49944
|
+
* let sheet = spread.getActiveSheet();
|
49945
|
+
* sheet.setArray(0, 0, [-1,2,3,4,3,2,3,5]);
|
49946
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49947
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49948
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49949
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49950
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]);
|
49951
|
+
*
|
49952
|
+
* sheet.setArray(0, 1, [1,4,6,5,3,6,10,2]);
|
49953
|
+
* sparklineGroup.dateAxisData(new GC.Spread.Sheets.Range(0, 1, 8, 1));
|
49954
|
+
* sparklineGroup.dateAxisOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.Vertical);
|
49955
|
+
* ```
|
49170
49956
|
*/
|
49171
49957
|
dateAxisOrientation(value: GC.Spread.Sheets.Sparklines.DataOrientation): any;
|
49172
49958
|
/**
|
49173
49959
|
* Removes the first occurrence of a specific object from the group.
|
49174
49960
|
* @param {GC.Spread.Sheets.Sparklines.Sparkline} item The sparkline item.
|
49175
49961
|
* @returns {GC.Spread.Sheets.Sparklines.Sparkline[]} The GC.Spread.Sheets.Sparklines.Sparkline array.
|
49962
|
+
* @example
|
49963
|
+
* ```
|
49964
|
+
* let sheet = spread.getActiveSheet();
|
49965
|
+
* sheet.setArray(0, 0, [-1,2,3,4,3,2,3,5]);
|
49966
|
+
* let dataRange = new GC.Spread.Sheets.Range(0, 0, 8, 1);
|
49967
|
+
* let setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
|
49968
|
+
* let sparkline1 = sheet.setSparkline(11, 0, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49969
|
+
* let sparkline2 = sheet.setSparkline(11, 3, dataRange, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
|
49970
|
+
* let sparklineGroup = sheet.groupSparkline([sparkline1,sparkline2]);
|
49971
|
+
*
|
49972
|
+
* console.log(sparklineGroup.count()) // 2
|
49973
|
+
* sparklineGroup.remove(sparkline1);
|
49974
|
+
* console.log(sparklineGroup.count()) // 1
|
49975
|
+
* ```
|
49176
49976
|
*/
|
49177
49977
|
remove(item: GC.Spread.Sheets.Sparklines.Sparkline): GC.Spread.Sheets.Sparklines.Sparkline[];
|
49178
49978
|
}
|
@@ -50109,7 +50909,7 @@ declare module GC{
|
|
50109
50909
|
/**
|
50110
50910
|
* Sets a formula to the table's data range with the specified index.
|
50111
50911
|
* @param {number} tableColumnIndex The column index of the table. The index is zero-based.
|
50112
|
-
* @param {string} formula The data range formula.
|
50912
|
+
* @param {string|null} formula The data range formula.
|
50113
50913
|
* @returns {GC.Spread.Sheets.Tables.Table} The table.
|
50114
50914
|
* @example
|
50115
50915
|
* ```
|
@@ -50125,9 +50925,10 @@ declare module GC{
|
|
50125
50925
|
* activeSheet.getCell(2,1).text("5");
|
50126
50926
|
* activeSheet.getCell(3,1).text("5");
|
50127
50927
|
* activeSheet.tables.findByName("Table1").setColumnDataFormula(2, "=[Value1]*[Value2]");
|
50928
|
+
* activeSheet.tables.findByName("Table1").setColumnDataFormula(2, null); // to clear the column data formula
|
50128
50929
|
* ```
|
50129
50930
|
*/
|
50130
|
-
setColumnDataFormula(tableColumnIndex: number, formula: string): GC.Spread.Sheets.Tables.Table;
|
50931
|
+
setColumnDataFormula(tableColumnIndex: number, formula: string | null): GC.Spread.Sheets.Tables.Table;
|
50131
50932
|
/**
|
50132
50933
|
* Sets the table footer formula with the specified index.
|
50133
50934
|
* @param {number} tableColumnIndex The column index of the table footer. The index is zero-based.
|
@@ -52897,6 +53698,13 @@ declare module GC{
|
|
52897
53698
|
/**
|
52898
53699
|
* Gets all the items that belong to the toolbar.
|
52899
53700
|
* @returns {GC.Spread.Sheets.Touch.TouchToolStripSeparator[]|GC.Spread.Sheets.Touch.TouchToolStripItem[]} An array that contains all the items in the toolbar.
|
53701
|
+
* @example
|
53702
|
+
* ```
|
53703
|
+
* spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("OP1", "OP1", "op1.png", function(){ }))
|
53704
|
+
* spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("OP2", "OP2", "op2.png", function(){ }))
|
53705
|
+
* // Gets all the items that belong to the toolbar.
|
53706
|
+
* console.log(spread.touchToolStrip.getItems());
|
53707
|
+
* ```
|
52900
53708
|
*/
|
52901
53709
|
getItems(): any;
|
52902
53710
|
/**
|
@@ -53000,7 +53808,7 @@ declare module GC{
|
|
53000
53808
|
constructor(name: string, text: string, image: string, command?: any, canExecute?: Function);
|
53001
53809
|
/**
|
53002
53810
|
* Gets or sets the font of the item text.
|
53003
|
-
* @param {string} value The font of the toolbar item text.
|
53811
|
+
* @param {string} [value] The font of the toolbar item text.
|
53004
53812
|
* @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the font of the item text; otherwise, returns the toolbar item.
|
53005
53813
|
* @example
|
53006
53814
|
* ```
|
@@ -53013,7 +53821,7 @@ declare module GC{
|
|
53013
53821
|
font(value?: string): any;
|
53014
53822
|
/**
|
53015
53823
|
* Gets or sets the color of the item text.
|
53016
|
-
* @param {string} value The color of the toolbar item text.
|
53824
|
+
* @param {string} [value] The color of the toolbar item text.
|
53017
53825
|
* @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the color of the item text; otherwise, returns the toolbar item.
|
53018
53826
|
* @example
|
53019
53827
|
* ```
|
@@ -53026,7 +53834,7 @@ declare module GC{
|
|
53026
53834
|
foreColor(value?: string): any;
|
53027
53835
|
/**
|
53028
53836
|
* Gets or sets the source of the item image.
|
53029
|
-
* @param {string} value The path and filename for the item image source.
|
53837
|
+
* @param {string} [value] The path and filename for the item image source.
|
53030
53838
|
* @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the source of the item image; otherwise, returns the toolbar item.
|
53031
53839
|
* @example
|
53032
53840
|
* ```
|
@@ -53042,7 +53850,7 @@ declare module GC{
|
|
53042
53850
|
image(value?: string): any;
|
53043
53851
|
/**
|
53044
53852
|
* Gets or sets the name of the item.
|
53045
|
-
* @param {string} value The name of the toolbar item.
|
53853
|
+
* @param {string} [value] The name of the toolbar item.
|
53046
53854
|
* @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the name of the item; otherwise, returns the toolbar item.
|
53047
53855
|
* @example
|
53048
53856
|
* ```
|
@@ -53058,7 +53866,7 @@ declare module GC{
|
|
53058
53866
|
name(value?: string): any;
|
53059
53867
|
/**
|
53060
53868
|
* Gets or sets the text of the item.
|
53061
|
-
* @param {string} value The text of the toolbar item.
|
53869
|
+
* @param {string} [value] The text of the toolbar item.
|
53062
53870
|
* @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the text of the item; otherwise, returns the toolbar item.
|
53063
53871
|
* @example
|
53064
53872
|
* ```
|