@adaptabletools/adaptable-cjs 19.0.0 → 19.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.
Files changed (73) hide show
  1. package/README.md +1 -2
  2. package/base.css +1 -1
  3. package/base.css.map +1 -1
  4. package/index.css +1 -1
  5. package/index.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
  8. package/src/AdaptableOptions/ActionRowOptions.d.ts +2 -2
  9. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -2
  11. package/src/Api/AlertApi.d.ts +8 -0
  12. package/src/Api/ColumnApi.d.ts +18 -15
  13. package/src/Api/CustomSortApi.d.ts +8 -0
  14. package/src/Api/DataChangeHistoryApi.d.ts +5 -0
  15. package/src/Api/Events/GridSorted.d.ts +3 -3
  16. package/src/Api/Events/LiveDataChanged.d.ts +1 -1
  17. package/src/Api/FlashingCellApi.d.ts +25 -12
  18. package/src/Api/FormatColumnApi.d.ts +8 -0
  19. package/src/Api/GridApi.d.ts +53 -2
  20. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -0
  21. package/src/Api/Implementation/AlertApiImpl.js +6 -0
  22. package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -2
  23. package/src/Api/Implementation/ColumnApiImpl.js +19 -30
  24. package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -0
  25. package/src/Api/Implementation/CustomSortApiImpl.js +6 -0
  26. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +2 -0
  27. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
  28. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -0
  29. package/src/Api/Implementation/FlashingCellApiImpl.js +9 -0
  30. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -0
  31. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -0
  32. package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
  33. package/src/Api/Implementation/GridApiImpl.js +105 -1
  34. package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -0
  35. package/src/Api/Implementation/ShortcutApiImpl.js +6 -0
  36. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +2 -0
  37. package/src/Api/Implementation/StyledColumnApiImpl.js +6 -0
  38. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -0
  40. package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -1
  41. package/src/Api/Internal/ActionRowInternalApi.js +10 -8
  42. package/src/Api/Internal/ExportInternalApi.d.ts +3 -3
  43. package/src/Api/Internal/ExportInternalApi.js +17 -13
  44. package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
  45. package/src/Api/Internal/GridFilterInternalApi.js +5 -2
  46. package/src/Api/ShortcutApi.d.ts +8 -0
  47. package/src/Api/StyledColumnApi.d.ts +8 -0
  48. package/src/Api/UserInterfaceApi.d.ts +6 -2
  49. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
  50. package/src/PredefinedConfig/Common/RowScope.d.ts +1 -1
  51. package/src/Redux/ActionsReducers/SystemRedux.js +3 -8
  52. package/src/Utilities/license/hashing.js +1 -1
  53. package/src/View/Dashboard/DashboardPopup.js +4 -3
  54. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -0
  55. package/src/View/Layout/Wizard/getGridFilterPreview.js +1 -1
  56. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  57. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  58. package/src/agGrid/ActionColumnRenderer.d.ts +2 -0
  59. package/src/agGrid/ActionColumnRenderer.js +29 -3
  60. package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
  61. package/src/agGrid/AdaptableAgGrid.js +22 -8
  62. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  63. package/src/agGrid/AgGridAdapter.js +12 -0
  64. package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
  65. package/src/agGrid/AgGridColumnAdapter.js +26 -13
  66. package/src/agGrid/PercentBarRenderer.js +1 -1
  67. package/src/agGrid/defaultAdaptableOptions.js +1 -0
  68. package/src/env.js +2 -2
  69. package/src/metamodel/adaptable.metamodel.js +1 -1
  70. package/src/types.d.ts +2 -2
  71. package/tsconfig.cjs.tsbuildinfo +1 -1
  72. package/src/agGrid/CheckboxRenderer.d.ts +0 -16
  73. package/src/agGrid/CheckboxRenderer.js +0 -94
@@ -1,16 +0,0 @@
1
- import { ICellEditorComp, ICellEditorParams, ICellRendererFunc } from '@ag-grid-community/core';
2
- import { AdaptableApi } from '../Api/AdaptableApi';
3
- /**
4
- * This file is not used any more
5
- * We removed the CheckboxStyle as Ag Grid provide it
6
- * And for Boolean FreeTexts we use the boolean cell data type
7
- */
8
- export declare const getCheckboxRendererForColumn: (columnId: string, isColumnReadOnly: boolean, api: AdaptableApi) => ICellRendererFunc;
9
- export declare class CheckboxEditor implements ICellEditorComp {
10
- private eGui;
11
- private value;
12
- isCancelBeforeStart(): boolean;
13
- init(params: ICellEditorParams): void;
14
- getGui(): HTMLElement;
15
- getValue(): any;
16
- }
@@ -1,94 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheckboxEditor = exports.getCheckboxRendererForColumn = void 0;
4
- /**
5
- * This file is not used any more
6
- * We removed the CheckboxStyle as Ag Grid provide it
7
- * And for Boolean FreeTexts we use the boolean cell data type
8
- */
9
- const getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
10
- const CheckboxRenderer = function () {
11
- return '';
12
- };
13
- CheckboxRenderer.prototype.init = function (params) {
14
- this.params = params;
15
- const inputElement = document.createElement('input');
16
- inputElement.type = 'checkbox';
17
- inputElement.checked = params.value;
18
- inputElement.disabled =
19
- isColumnReadOnly ||
20
- !api.internalApi.getAdaptableInstance().isCellEditable(params.node, params.column);
21
- this.checkedHandler = this.checkedHandler.bind(this);
22
- inputElement.addEventListener('click', this.checkedHandler);
23
- this.eGui = document.createElement('div');
24
- this.eGui.style.cssText = `display: flex;
25
- height: 100%;
26
- align-items: center;
27
- justify-content: center;`;
28
- this.eGui.appendChild(inputElement);
29
- if (!inputElement.disabled) {
30
- this.suppressEditEvent = this.suppressEditEvent.bind(this);
31
- this.eGui.addEventListener('click', this.suppressEditEvent);
32
- this.eGui.addEventListener('dblclick', this.suppressEditEvent);
33
- }
34
- };
35
- CheckboxRenderer.prototype.checkedHandler = function (e) {
36
- let checked = e.target.checked;
37
- this.params.node.setDataValue(columnId, checked);
38
- };
39
- CheckboxRenderer.prototype.suppressEditEvent = function (event) {
40
- if (event.target === this.eGui) {
41
- event.preventDefault();
42
- event.stopPropagation();
43
- }
44
- };
45
- CheckboxRenderer.prototype.getGui = function () {
46
- return this.eGui;
47
- };
48
- CheckboxRenderer.prototype.refresh = function () {
49
- // by returning FALSE, AG Grid will remove the component from the DOM
50
- // and (re)create a new component in its place with the new value & disabled state
51
- return false;
52
- };
53
- CheckboxRenderer.prototype.destroy = function () {
54
- var _a, _b, _c, _d;
55
- (_b = (_a = this.eGui) === null || _a === void 0 ? void 0 : _a.firstChild) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this.checkedHandler);
56
- (_c = this.eGui) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', this.suppressEditEvent);
57
- (_d = this.eGui) === null || _d === void 0 ? void 0 : _d.removeEventListener('dblclick', this.suppressEditEvent);
58
- };
59
- return CheckboxRenderer;
60
- };
61
- exports.getCheckboxRendererForColumn = getCheckboxRendererForColumn;
62
- // this is just a stub editor instance, we just need the `isCancelBeforeStart()` hook
63
- class CheckboxEditor {
64
- isCancelBeforeStart() {
65
- // never show the editor, we edit it via the checkbox input element
66
- return true;
67
- }
68
- // the initialisation below is not required in 99% of cases, as the editor is never shown
69
- // however, using ReactUI makes some race conditions possible, in which cases the editor will be displayed for a few milliseconds
70
- // we provide this logic for those few cases (to avoid a flicker effect)
71
- init(params) {
72
- const adaptable = params.context.__adaptable;
73
- const inputElement = document.createElement('input');
74
- inputElement.type = 'checkbox';
75
- inputElement.checked = params.value;
76
- inputElement.disabled = adaptable.api.internalApi
77
- .getAdaptableInstance()
78
- .isCellEditable(params.node, params.column);
79
- this.eGui = document.createElement('div');
80
- this.eGui.style.cssText = `display: flex;
81
- height: 100%;
82
- align-items: center;
83
- justify-content: center;`;
84
- this.eGui.appendChild(inputElement);
85
- this.value = params.value;
86
- }
87
- getGui() {
88
- return this.eGui;
89
- }
90
- getValue() {
91
- return this.value;
92
- }
93
- }
94
- exports.CheckboxEditor = CheckboxEditor;