@adaptabletools/adaptable 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.esm.tsbuildinfo +1 -1
  72. package/src/agGrid/CheckboxRenderer.d.ts +0 -16
  73. package/src/agGrid/CheckboxRenderer.js +0 -89
@@ -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,89 +0,0 @@
1
- /**
2
- * This file is not used any more
3
- * We removed the CheckboxStyle as Ag Grid provide it
4
- * And for Boolean FreeTexts we use the boolean cell data type
5
- */
6
- export const getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
7
- const CheckboxRenderer = function () {
8
- return '';
9
- };
10
- CheckboxRenderer.prototype.init = function (params) {
11
- this.params = params;
12
- const inputElement = document.createElement('input');
13
- inputElement.type = 'checkbox';
14
- inputElement.checked = params.value;
15
- inputElement.disabled =
16
- isColumnReadOnly ||
17
- !api.internalApi.getAdaptableInstance().isCellEditable(params.node, params.column);
18
- this.checkedHandler = this.checkedHandler.bind(this);
19
- inputElement.addEventListener('click', this.checkedHandler);
20
- this.eGui = document.createElement('div');
21
- this.eGui.style.cssText = `display: flex;
22
- height: 100%;
23
- align-items: center;
24
- justify-content: center;`;
25
- this.eGui.appendChild(inputElement);
26
- if (!inputElement.disabled) {
27
- this.suppressEditEvent = this.suppressEditEvent.bind(this);
28
- this.eGui.addEventListener('click', this.suppressEditEvent);
29
- this.eGui.addEventListener('dblclick', this.suppressEditEvent);
30
- }
31
- };
32
- CheckboxRenderer.prototype.checkedHandler = function (e) {
33
- let checked = e.target.checked;
34
- this.params.node.setDataValue(columnId, checked);
35
- };
36
- CheckboxRenderer.prototype.suppressEditEvent = function (event) {
37
- if (event.target === this.eGui) {
38
- event.preventDefault();
39
- event.stopPropagation();
40
- }
41
- };
42
- CheckboxRenderer.prototype.getGui = function () {
43
- return this.eGui;
44
- };
45
- CheckboxRenderer.prototype.refresh = function () {
46
- // by returning FALSE, AG Grid will remove the component from the DOM
47
- // and (re)create a new component in its place with the new value & disabled state
48
- return false;
49
- };
50
- CheckboxRenderer.prototype.destroy = function () {
51
- var _a, _b, _c, _d;
52
- (_b = (_a = this.eGui) === null || _a === void 0 ? void 0 : _a.firstChild) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this.checkedHandler);
53
- (_c = this.eGui) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', this.suppressEditEvent);
54
- (_d = this.eGui) === null || _d === void 0 ? void 0 : _d.removeEventListener('dblclick', this.suppressEditEvent);
55
- };
56
- return CheckboxRenderer;
57
- };
58
- // this is just a stub editor instance, we just need the `isCancelBeforeStart()` hook
59
- export class CheckboxEditor {
60
- isCancelBeforeStart() {
61
- // never show the editor, we edit it via the checkbox input element
62
- return true;
63
- }
64
- // the initialisation below is not required in 99% of cases, as the editor is never shown
65
- // however, using ReactUI makes some race conditions possible, in which cases the editor will be displayed for a few milliseconds
66
- // we provide this logic for those few cases (to avoid a flicker effect)
67
- init(params) {
68
- const adaptable = params.context.__adaptable;
69
- const inputElement = document.createElement('input');
70
- inputElement.type = 'checkbox';
71
- inputElement.checked = params.value;
72
- inputElement.disabled = adaptable.api.internalApi
73
- .getAdaptableInstance()
74
- .isCellEditable(params.node, params.column);
75
- this.eGui = document.createElement('div');
76
- this.eGui.style.cssText = `display: flex;
77
- height: 100%;
78
- align-items: center;
79
- justify-content: center;`;
80
- this.eGui.appendChild(inputElement);
81
- this.value = params.value;
82
- }
83
- getGui() {
84
- return this.eGui;
85
- }
86
- getValue() {
87
- return this.value;
88
- }
89
- }