@adaptabletools/adaptable 19.0.1 → 19.0.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.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/ActionRowOptions.d.ts +2 -2
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -2
- package/src/Api/ColumnApi.d.ts +14 -15
- package/src/Api/DataChangeHistoryApi.d.ts +5 -0
- package/src/Api/Events/GridSorted.d.ts +3 -3
- package/src/Api/GridApi.d.ts +63 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +13 -30
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +2 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +13 -2
- package/src/Api/Implementation/GridApiImpl.js +114 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -0
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -1
- package/src/Api/Internal/ActionRowInternalApi.js +10 -8
- package/src/Api/Internal/GridFilterInternalApi.js +4 -1
- package/src/Api/UserInterfaceApi.d.ts +6 -2
- package/src/Utilities/license/hashing.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -0
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -0
- package/src/agGrid/ActionColumnRenderer.js +29 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +3 -1
- package/src/agGrid/AdaptableAgGrid.js +24 -7
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +12 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
- package/src/agGrid/AgGridColumnAdapter.js +24 -12
- package/src/agGrid/defaultAdaptableOptions.js +1 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/agGrid/CheckboxRenderer.d.ts +0 -16
- 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
|
-
}
|