@grapecity-software/spread-common 19.1.2 → 19.1.3

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * SpreadJS Library 19.1.2
3
+ * SpreadJS Library 19.1.3
4
4
  *
5
5
  * Copyright(c) GrapeCity Software inc. All rights reserved.
6
6
  *
@@ -12532,6 +12532,22 @@ declare namespace GC{
12532
12532
  * ```
12533
12533
  */
12534
12534
  loadTemplate(templateJson: Object): void;
12535
+ /**
12536
+ * Update the report sheet template, and also the report will be regenerated based on the new template and parameter values.
12537
+ * @param {Object} templateJson The template json.
12538
+ * @returns {Promise<void>} A Promise that resolves when the template has been loaded from templateJson.
12539
+ * @example
12540
+ * ```javascript
12541
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
12542
+ * const templateSheet = new GC.Spread.Report.TemplateSheet("Template");
12543
+ * templateSheet.setTemplateCell(0, 0, {
12544
+ * binding: "Orders[customerId]",
12545
+ * type: "Group",
12546
+ * });
12547
+ * await report.loadTemplateAsync(templateSheet.toJSON());
12548
+ * ```
12549
+ */
12550
+ loadTemplateAsync(templateJson: Object): Promise<void>;
12535
12551
  /**
12536
12552
  * Gets or sets the name of the ReportSheet.
12537
12553
  * @param {string} value The name of the ReportSheet.
@@ -12619,6 +12635,24 @@ declare namespace GC{
12619
12635
  * ```
12620
12636
  */
12621
12637
  refresh(): void;
12638
+ /**
12639
+ * Refresh the current report sheet, all the render modes can support this function.
12640
+ * Design: Refresh the cache of the template sheet and repaint.
12641
+ * Preview: Regenerate the report base on the current template sheet and repaint.
12642
+ * PaginatedPreview: Regenerate the report base on the current template sheet and repaint.
12643
+ * @returns {Promise<void>} A Promise that resolves when the refresh operation finishes.
12644
+ * @example
12645
+ * ```javascript
12646
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
12647
+ * const templateSheet = report.getTemplate();
12648
+ * templateSheet.setTemplateCell(0, 0, {
12649
+ * binding: "Orders[customerId]",
12650
+ * type: "Group",
12651
+ * });
12652
+ * await report.refreshAsync();
12653
+ * ```
12654
+ */
12655
+ refreshAsync(): Promise<void>;
12622
12656
  /**
12623
12657
  * Regenerate the report base on the current template.
12624
12658
  * @example
@@ -12633,6 +12667,21 @@ declare namespace GC{
12633
12667
  * ```
12634
12668
  */
12635
12669
  regenerateReport(): void;
12670
+ /**
12671
+ * Regenerate the report base on the current template.
12672
+ * @returns {Promise<void>} A Promise that resolves when report regeneration is finished.
12673
+ * @example
12674
+ * ```javascript
12675
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
12676
+ * const templateSheet = report.getTemplate();
12677
+ * templateSheet.setTemplateCell(0, 0, {
12678
+ * binding: "Orders[customerId]",
12679
+ * type: "Group",
12680
+ * });
12681
+ * await report.regenerateReportAsync();
12682
+ * ```
12683
+ */
12684
+ regenerateReportAsync(): Promise<void>;
12636
12685
  /**
12637
12686
  * Get or set the render mode.
12638
12687
  * @param {GC.Spread.Report.RenderMode} renderMode The render mode.
@@ -12708,6 +12757,20 @@ declare namespace GC{
12708
12757
  * ```
12709
12758
  */
12710
12759
  setParametersUI(host: HTMLElement | string, initParametersUI: GC.Spread.Report.InitParametersUIFunctionType, onChange: GC.Spread.Report.OnChangeFunctionType): void;
12760
+ /**
12761
+ * Get or set the render mode.
12762
+ * @param {GC.Spread.Report.RenderMode} renderMode The render mode.
12763
+ * @returns {Promise<void>} A Promise that resolves when the render mode switch is fully applied.
12764
+ * @example
12765
+ * ```javascript
12766
+ * // switch to preview mode.
12767
+ * await reportSheet.setRenderModeAsync('Preview');
12768
+ *
12769
+ * // switch to paginated preview mode.
12770
+ * await reportSheet.setRenderModeAsync('PaginatedPreview');
12771
+ * ```
12772
+ */
12773
+ setRenderModeAsync(renderMode: GC.Spread.Report.RenderMode): Promise<void>;
12711
12774
  /**
12712
12775
  * Submit the changes to the remote database based on your data entry setting through the DataManger.
12713
12776
  * @example
@@ -14150,6 +14213,18 @@ declare namespace GC{
14150
14213
  * True if the user can use PivotTables.
14151
14214
  */
14152
14215
  allowUsePivotTable?: boolean;
14216
+ /**
14217
+ * Designer-only. Enables cell-formatting commands and related UI, including the Format Cells entry and protected PivotTable style commands.
14218
+ */
14219
+ formatCells?: boolean;
14220
+ /**
14221
+ * Designer-only. Enables column formatting UI such as width/autofit/hide-unhide.
14222
+ */
14223
+ formatColumns?: boolean;
14224
+ /**
14225
+ * Designer-only. Enables row formatting UI such as height/autofit/hide-unhide.
14226
+ */
14227
+ formatRows?: boolean;
14153
14228
  }
14154
14229
 
14155
14230
 
@@ -20644,6 +20719,35 @@ declare namespace GC{
20644
20719
  * ```
20645
20720
  */
20646
20721
  static RangeSorting: string;
20722
+ /**
20723
+ * Occurs when the report generation stage changes.
20724
+ * @name GC.Spread.Report.ReportSheet#ReportGenerationStageChanged
20725
+ * @event
20726
+ * @param eventParam *{@link GC.Spread.Report.ReportSheet}* `report` The report sheet that triggered the event.
20727
+ * @param eventParam *'analyzing-template' | 'loading-data' | 'generating-report'* `stage` The current generation stage.
20728
+ * @param eventParam *'start' | 'end'* `phase` The stage phase.
20729
+ * @example
20730
+ * ```javascript
20731
+ * //This example uses the ReportGenerationStageChanged event.
20732
+ * const report = spread.addSheetTab(0, "Report", GC.Spread.Sheets.SheetType.reportSheet);
20733
+ * spread.bind(GC.Spread.Sheets.Events.ReportGenerationStageChanged, (event, args) => {
20734
+ * let { stage, phase } = args;
20735
+ * if (phase === "start") {
20736
+ * if (stage === "analyzing-template") {
20737
+ * showLoading("Analyzing template...");
20738
+ * } else if (stage === "loading-data") {
20739
+ * showLoading("Loading data...");
20740
+ * } else if (stage === "generating-report") {
20741
+ * showLoading("Generating report...");
20742
+ * }
20743
+ * }
20744
+ * if (phase === "end" && stage === "generating-report") {
20745
+ * hideLoading();
20746
+ * }
20747
+ * });
20748
+ * ```
20749
+ */
20750
+ static ReportGenerationStageChanged: string;
20647
20751
  /**
20648
20752
  * Occurs when the report sheet data has changed by update, insert or delete. Allows submitting data changes to the server.
20649
20753
  * @name GC.Spread.Report.ReportSheet#ReportSheetDataChanged
@@ -25271,6 +25375,9 @@ declare namespace GC{
25271
25375
  * @property {boolean} [protectionOptions.allowOutlineColumns] - True if the user can expand or collapse the column groups.
25272
25376
  * @property {boolean} [protectionOptions.allowOutlineRows] - True if the user can expand or collapse the row groups.
25273
25377
  * @property {boolean} [protectionOptions.allowUsePivotTable] - True if the user can use PivotTables.
25378
+ * @property {boolean} [protectionOptions.formatCells] - // Designer-only. Enables cell-formatting commands and related UI, including the Format Cells entry and protected PivotTable style commands.
25379
+ * @property {boolean} [protectionOptions.formatColumns] - // Designer-only. Enables column formatting UI such as width/autofit/hide-unhide.
25380
+ * @property {boolean} [protectionOptions.formatRows] - // Designer-only. Enables row formatting UI such as height/autofit/hide-unhide.
25274
25381
  * @property {string} selectionBackColor - The selection's background color for the sheet.
25275
25382
  * @property {string} selectionBorderColor - The selection's border color for the sheet.
25276
25383
  * @property {Object} sheetAreaOffset - The sheetAreaOffset's options.
@@ -34327,6 +34434,27 @@ declare namespace GC{
34327
34434
  * ```
34328
34435
  */
34329
34436
  var commitArrayFormula: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
34437
+ /**
34438
+ * Represents the command used to commit the current cell editing value without moving the active cell.
34439
+ * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
34440
+ * @property {function} execute - performs an execute or undo operation.
34441
+ * The arguments of the execute method are as follows.
34442
+ * @property {GC.Spread.Sheets.Workbook} context The context of the operation.
34443
+ * @property {Object} options The options of the operation.
34444
+ * @property {string} options.sheetName The sheet name.
34445
+ * @property {boolean} isUndo `true` if this is an undo operation; otherwise, `false`.
34446
+ * @example
34447
+ * ```javascript
34448
+ * // commit the cell editing value without moving the active cell
34449
+ * activeSheet.setValue(1, 1, 'SpreadJS');
34450
+ * activeSheet.setActiveCell(1, 1);
34451
+ * activeSheet.startEdit();
34452
+ * window.setTimeout(function() {
34453
+ * spread.commandManager().execute({cmd: "commitInput", sheetName: "Sheet1"});
34454
+ * }, 1000);
34455
+ * ```
34456
+ */
34457
+ var commitInput: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
34330
34458
  /**
34331
34459
  * Represents the command used to stop cell editing and moves the active cell to the next row.
34332
34460
  * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapecity-software/spread-common",
3
- "version": "19.1.2",
3
+ "version": "19.1.3",
4
4
  "main": "index.js",
5
5
  "description":"SpreadJS common module",
6
6
  "scripts": {},