@mescius/spread-sheets 17.1.3 → 17.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12893,6 +12893,34 @@ declare module GC{
12893
12893
  }
12894
12894
 
12895
12895
 
12896
+ export interface IDeserializationOptions{
12897
+ /**
12898
+ * Whether to ignore the style when converting json to the workbook.
12899
+ */
12900
+ ignoreStyle?: boolean;
12901
+ /**
12902
+ * Whether to ignore the formula when converting json to the workbook.
12903
+ */
12904
+ ignoreFormula?: boolean;
12905
+ /**
12906
+ * Whether to treat the frozen columns as row headers when converting json to the workbook.
12907
+ */
12908
+ frozenColumnsAsRowHeaders?: boolean;
12909
+ /**
12910
+ * Whether to treat the frozen rows as column headers when converting json to the workbook.
12911
+ */
12912
+ frozenRowsAsColumnHeaders?: boolean;
12913
+ /**
12914
+ * Whether to prevent recalculation after loading the json data.
12915
+ */
12916
+ doNotRecalculateAfterLoad?: boolean;
12917
+ /**
12918
+ * Whether to use the incremental loading or the callbacks of incremental loading when converting json to the workbook.
12919
+ */
12920
+ incrementalLoading?: boolean | GC.Spread.Sheets.IIncrementalLoadingOptions;
12921
+ }
12922
+
12923
+
12896
12924
  export interface IDirtyCellInfo{
12897
12925
  row: number;
12898
12926
  col: number;
@@ -13241,6 +13269,18 @@ declare module GC{
13241
13269
  }
13242
13270
 
13243
13271
 
13272
+ export interface IIncrementalLoadingOptions{
13273
+ /**
13274
+ * The callback when of the incremental loading finished.
13275
+ */
13276
+ loaded?: () => void;
13277
+ /**
13278
+ * The callback when of the incremental loading progress.
13279
+ */
13280
+ loading?: (progress: number, args: { sheet: GC.Spread.Sheets.Worksheet }) => void;
13281
+ }
13282
+
13283
+
13244
13284
  export interface IInvalidOperationEventArgs{
13245
13285
  sheet: GC.Spread.Sheets.Worksheet;
13246
13286
  sheetName: string;
@@ -13622,6 +13662,42 @@ declare module GC{
13622
13662
  }
13623
13663
 
13624
13664
 
13665
+ export interface ISerializationOption{
13666
+ /**
13667
+ * Whether to include the binding source when converting the workbook to json.
13668
+ */
13669
+ includeBindingSource?: boolean;
13670
+ /**
13671
+ * Whether to ignore the style when converting the workbook to json.
13672
+ */
13673
+ ignoreStyle?: boolean;
13674
+ /**
13675
+ * Whether to ignore the formula when converting the workbook to json.
13676
+ */
13677
+ ignoreFormula?: boolean;
13678
+ /**
13679
+ * Whether to apply the format string to exporting value when converting the workbook to json, default false.
13680
+ */
13681
+ saveAsView?: boolean;
13682
+ /**
13683
+ * Whether to treat the row headers as frozen columns when converting the workbook to json.
13684
+ */
13685
+ rowHeadersAsFrozenColumns?: boolean;
13686
+ /**
13687
+ * Whether to treat the column headers as frozen rows when converting the workbook to json.
13688
+ */
13689
+ columnHeadersAsFrozenRows?: boolean;
13690
+ /**
13691
+ * Whether to include the automatically merged cells when converting the workbook to json.
13692
+ */
13693
+ includeAutoMergedCells?: boolean;
13694
+ /**
13695
+ * Whether to save the r1c1 formula in the file.
13696
+ */
13697
+ saveR1C1Formula?: boolean;
13698
+ }
13699
+
13700
+
13625
13701
  export interface ISetBorderOptions{
13626
13702
  all?: boolean;
13627
13703
  left?: boolean;
@@ -22835,15 +22911,7 @@ declare module GC{
22835
22911
  /**
22836
22912
  * Loads the object state from the specified JSON string.
22837
22913
  * @param {Object} workbookData The spreadsheet data from deserialization.
22838
- * @param {Object} [deserializationOptions] - The deserialization options.
22839
- * @param {boolean} [deserializationOptions.ignoreStyle] - Whether to ignore the style when converting json to the workbook.
22840
- * @param {boolean} [deserializationOptions.ignoreFormula] - Whether to ignore the formula when converting json to the workbook.
22841
- * @param {boolean} [deserializationOptions.frozenColumnsAsRowHeaders] - Whether to treat the frozen columns as row headers when converting json to the workbook.
22842
- * @param {boolean} [deserializationOptions.frozenRowsAsColumnHeaders] - Whether to treat the frozen rows as column headers when converting json to the workbook.
22843
- * @param {boolean} [deserializationOptions.doNotRecalculateAfterLoad] - Whether to prevent recalculation after loading the json data.
22844
- * @param {boolean | object} [deserializationOptions.incrementalLoading] - Whether to use the incremental loading or the callbacks of incremental loading when converting json to the workbook.
22845
- * @param {function} [deserializationOptions.incrementalLoading.loading] - The callback when of the incremental loading progress.
22846
- * @param {function} [deserializationOptions.incrementalLoading.loaded] - The callback when of the incremental loading finished.
22914
+ * @param {GC.Spread.Sheets.IDeserializationOptions} [deserializationOptions] - The deserialization options.
22847
22915
  * @returns {Promise} - The fromJSON promise.
22848
22916
  * @example
22849
22917
  * ```
@@ -22859,7 +22927,7 @@ declare module GC{
22859
22927
  * });
22860
22928
  * ```
22861
22929
  */
22862
- fromJSON(workbookData: Object, deserializationOptions?: Object): Promise<any>;
22930
+ fromJSON(workbookData: Object, deserializationOptions?: GC.Spread.Sheets.IDeserializationOptions): Promise<any>;
22863
22931
  /**
22864
22932
  * Gets the active sheet.
22865
22933
  * @returns {GC.Spread.Sheets.Worksheet} The active sheet instance.
@@ -23429,15 +23497,8 @@ declare module GC{
23429
23497
  suspendPaint(): void;
23430
23498
  /**
23431
23499
  * Saves the object state to a JSON string.
23432
- * @param {Object} serializationOption - The serialization options.
23433
- * @param {boolean} [serializationOption.includeBindingSource] - Whether to include the binding source when converting the workbook to json.
23434
- * @param {boolean} [serializationOption.ignoreStyle] - Whether to ignore the style when converting the workbook to json.
23435
- * @param {boolean} [serializationOption.ignoreFormula] - Whether to ignore the formula when converting the workbook to json.
23436
- * @param {boolean} [serializationOption.saveAsView] - Whether to apply the format string to exporting value when converting the workbook to json, default false.
23437
- * @param {boolean} [serializationOption.rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when converting the workbook to json.
23438
- * @param {boolean} [serializationOption.columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when converting the workbook to json.
23439
- * @param {boolean} [serializationOption.includeAutoMergedCells] - Whether to include the automatically merged cells when converting the workbook to json. * @returns {Object} The spreadsheet data.
23440
- * @param {boolean} [serializationOption.saveR1C1Formula] - Whether to save the r1c1 formula in the file.
23500
+ * @param {GC.Spread.Sheets.ISerializationOption} serializationOption - The serialization options.
23501
+ * @returns {Object} The spreadsheet data.
23441
23502
  * @example
23442
23503
  * ```
23443
23504
  * activeSheet.getCell(0,0).value(123);
@@ -23449,7 +23510,7 @@ declare module GC{
23449
23510
  * alert(jsonStr);
23450
23511
  * ```
23451
23512
  */
23452
- toJSON(serializationOption?: Object): Object;
23513
+ toJSON(serializationOption?: GC.Spread.Sheets.ISerializationOption): Object;
23453
23514
  /**
23454
23515
  * Removes the binding of an event to Workbook.
23455
23516
  * @param {string} type The event type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mescius/spread-sheets",
3
- "version": "17.1.3",
3
+ "version": "17.1.4",
4
4
  "main": "index.js",
5
5
  "description":"A Complete Microsoft Excel-like JavaScript Spreadsheet for Enterprise Applications",
6
6
  "scripts": {},