@adaptabletools/adaptable 11.0.2-canary.0 → 11.0.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "11.0.2-canary.0",
3
+ "version": "11.0.2",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1646400837857;
1
+ declare const _default: 1646406406997;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1646400837857;
3
+ exports.default = 1646406406997;
@@ -15,6 +15,25 @@ const getFormatColumnStyleViewItems_1 = require("./Utilities/getFormatColumnStyl
15
15
  class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
16
16
  constructor(api) {
17
17
  super(ModuleConstants.FormatColumnModuleId, 'Format Column', 'format-column', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
18
+ /**
19
+ * Use Case: Data (cell/row) has changed
20
+ * Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
21
+ */
22
+ this.api.internalApi.getDataService().on('DataChanged', () => {
23
+ const activeCheckboxColumnIds = this.api.columnApi
24
+ .getColumns()
25
+ .filter((aColumn) => {
26
+ const checkboxFormatColumn = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(aColumn);
27
+ return checkboxFormatColumn && !checkboxFormatColumn.IsSuspended;
28
+ })
29
+ .map((aColumn) => aColumn.columnId);
30
+ if (activeCheckboxColumnIds.length) {
31
+ console.log('update ', activeCheckboxColumnIds);
32
+ this.api.internalApi
33
+ .getAdaptableInstance()
34
+ .refreshCells(null, activeCheckboxColumnIds, true, true);
35
+ }
36
+ });
18
37
  }
19
38
  getModuleAdaptableObjects() {
20
39
  return this.api.formatColumnApi.getAllFormatColumn();
@@ -16,8 +16,8 @@ export declare class DataService implements IDataService {
16
16
  CreateDataChangedEvent(dataChangedInfo: DataChangedInfo): void;
17
17
  logUndoChange(change: DataChangedInfo): void;
18
18
  extractUndoChange(change: DataChangedInfo): DataChangedInfo | undefined;
19
+ destroy(): void;
19
20
  private getUndoChangeKey;
20
21
  private logDataChange;
21
22
  private extractDataChangeLogEntry;
22
- destroy(): void;
23
23
  }
@@ -57,6 +57,10 @@ class DataService {
57
57
  }
58
58
  return result;
59
59
  }
60
+ destroy() {
61
+ this.emitter.clearListeners();
62
+ this.emitter = null;
63
+ }
60
64
  getUndoChangeKey(primaryKeyValue, columnId, previousValue, newValue) {
61
65
  return JSON.stringify({
62
66
  primaryKeyValue,
@@ -77,8 +81,5 @@ class DataService {
77
81
  return Object.assign(Object.assign({}, dataChangedInfo), { rowNode,
78
82
  rowData });
79
83
  }
80
- destroy() {
81
- // TO DO
82
- }
83
84
  }
84
85
  exports.DataService = DataService;
@@ -2521,24 +2521,6 @@ class Adaptable {
2521
2521
  }
2522
2522
  }
2523
2523
  });
2524
- /**
2525
- * Use Case: Data (cell/row) has changed
2526
- * Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
2527
- */
2528
- this.gridOptions.api.addGlobalListener((type) => {
2529
- if ([all_modules_1.Events.EVENT_CELL_VALUE_CHANGED, all_modules_1.Events.EVENT_ROW_VALUE_CHANGED].includes(type)) {
2530
- const activeCheckboxColumnIds = this.api.columnApi
2531
- .getColumns()
2532
- .filter((aColumn) => {
2533
- const checkboxFormatColumn = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(aColumn);
2534
- return checkboxFormatColumn && !checkboxFormatColumn.IsSuspended;
2535
- })
2536
- .map((aColumn) => aColumn.columnId);
2537
- if (activeCheckboxColumnIds.length) {
2538
- this.refreshCells(null, activeCheckboxColumnIds, true, true);
2539
- }
2540
- }
2541
- });
2542
2524
  /**
2543
2525
  * Row and Cell listeners created in 2020
2544
2526
  * These have supplanted many of the events we previously had and simplified things
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "11.0.2-canary.0";
1
+ declare const _default: "11.0.2";
2
2
  export default _default;
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '11.0.2-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '11.0.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version