ag-grid-community 32.0.0 → 32.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/dist/ag-grid-community.js +83 -39
- package/dist/ag-grid-community.min.js +1 -1
- package/dist/ag-grid-community.min.noStyle.js +1 -1
- package/dist/ag-grid-community.noStyle.js +83 -39
- package/dist/package/main.cjs.js +83 -39
- package/dist/package/main.cjs.min.js +17 -17
- package/dist/package/main.esm.min.mjs +41 -41
- package/dist/package/main.esm.mjs +83 -39
- package/dist/package/package.json +7 -7
- package/dist/types/client-side-row-model/version.d.ts +1 -1
- package/dist/types/core/interfaces/iCallbackParams.d.ts +3 -1
- package/dist/types/core/interfaces/iColumn.d.ts +4 -6
- package/dist/types/core/interfaces/iRowNode.d.ts +2 -2
- package/dist/types/core/main.d.ts +1 -1
- package/dist/types/core/pinnedRowModel/pinnedRowModel.d.ts +1 -0
- package/dist/types/core/rendering/row/rowDragComp.d.ts +2 -0
- package/dist/types/core/utils/object.d.ts +1 -0
- package/dist/types/core/version.d.ts +1 -1
- package/dist/types/core/widgets/component.d.ts +1 -0
- package/dist/types/csv-export/version.d.ts +1 -1
- package/dist/types/infinite-row-model/version.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1816,7 +1816,7 @@ var SortStage = class extends import_core8.BeanStub {
|
|
|
1816
1816
|
};
|
|
1817
1817
|
|
|
1818
1818
|
// community-modules/client-side-row-model/src/version.ts
|
|
1819
|
-
var VERSION = "32.0.
|
|
1819
|
+
var VERSION = "32.0.2";
|
|
1820
1820
|
|
|
1821
1821
|
// community-modules/client-side-row-model/src/clientSideRowModelModule.ts
|
|
1822
1822
|
var ClientSideRowModelCoreModule = {
|
|
@@ -2775,6 +2775,7 @@ function _values(object) {
|
|
|
2775
2775
|
}
|
|
2776
2776
|
|
|
2777
2777
|
// community-modules/core/src/utils/object.ts
|
|
2778
|
+
var SKIP_JS_BUILTINS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
2778
2779
|
function _iterateObject(object, callback) {
|
|
2779
2780
|
if (object == null) {
|
|
2780
2781
|
return;
|
|
@@ -2793,6 +2794,9 @@ function _cloneObject(object) {
|
|
|
2793
2794
|
const copy = {};
|
|
2794
2795
|
const keys = Object.keys(object);
|
|
2795
2796
|
for (let i = 0; i < keys.length; i++) {
|
|
2797
|
+
if (SKIP_JS_BUILTINS.has(keys[i])) {
|
|
2798
|
+
continue;
|
|
2799
|
+
}
|
|
2796
2800
|
const key = keys[i];
|
|
2797
2801
|
const value = object[key];
|
|
2798
2802
|
copy[key] = value;
|
|
@@ -2806,7 +2810,7 @@ function _deepCloneDefinition(object, keysToSkip) {
|
|
|
2806
2810
|
const obj = object;
|
|
2807
2811
|
const res = {};
|
|
2808
2812
|
Object.keys(obj).forEach((key) => {
|
|
2809
|
-
if (keysToSkip && keysToSkip.indexOf(key) >= 0) {
|
|
2813
|
+
if (keysToSkip && keysToSkip.indexOf(key) >= 0 || SKIP_JS_BUILTINS.has(key)) {
|
|
2810
2814
|
return;
|
|
2811
2815
|
}
|
|
2812
2816
|
const value = obj[key];
|
|
@@ -2840,6 +2844,9 @@ function _mergeDeep(dest, source, copyUndefined = true, makeCopyOfSimpleObjects
|
|
|
2840
2844
|
return;
|
|
2841
2845
|
}
|
|
2842
2846
|
_iterateObject(source, (key, sourceValue) => {
|
|
2847
|
+
if (SKIP_JS_BUILTINS.has(key)) {
|
|
2848
|
+
return;
|
|
2849
|
+
}
|
|
2843
2850
|
let destValue = dest[key];
|
|
2844
2851
|
if (destValue === sourceValue) {
|
|
2845
2852
|
return;
|
|
@@ -3646,10 +3653,10 @@ function _log(message, ...args) {
|
|
|
3646
3653
|
console.log("AG Grid: " + message, ...args);
|
|
3647
3654
|
}
|
|
3648
3655
|
function _warnOnce(msg, ...args) {
|
|
3649
|
-
_doOnce(() => console.warn("AG Grid: " + msg, ...args), msg);
|
|
3656
|
+
_doOnce(() => console.warn("AG Grid: " + msg, ...args), msg + args?.join(""));
|
|
3650
3657
|
}
|
|
3651
3658
|
function _errorOnce(msg, ...args) {
|
|
3652
|
-
_doOnce(() => console.error("AG Grid: " + msg, ...args), msg);
|
|
3659
|
+
_doOnce(() => console.error("AG Grid: " + msg, ...args), msg + args?.join(""));
|
|
3653
3660
|
}
|
|
3654
3661
|
function _isFunction(val) {
|
|
3655
3662
|
return !!(val && val.constructor && val.call && val.apply);
|
|
@@ -6038,21 +6045,25 @@ var ColumnMoveService = class extends BeanStub {
|
|
|
6038
6045
|
return proposedColumnOrder;
|
|
6039
6046
|
}
|
|
6040
6047
|
doesMovePassLockedPositions(proposedColumnOrder) {
|
|
6041
|
-
let lastPlacement = 0;
|
|
6042
|
-
let rulePassed = true;
|
|
6043
6048
|
const lockPositionToPlacement = (position) => {
|
|
6044
6049
|
if (!position) {
|
|
6045
|
-
return
|
|
6046
|
-
}
|
|
6047
|
-
if (position === true) {
|
|
6048
|
-
return 0;
|
|
6050
|
+
return 0 /* NONE */;
|
|
6049
6051
|
}
|
|
6050
|
-
return position === "left" ?
|
|
6052
|
+
return position === "left" || position === true ? -1 /* LEFT */ : 1 /* RIGHT */;
|
|
6051
6053
|
};
|
|
6054
|
+
const isRtl = this.gos.get("enableRtl");
|
|
6055
|
+
let lastPlacement = isRtl ? 1 /* RIGHT */ : -1 /* LEFT */;
|
|
6056
|
+
let rulePassed = true;
|
|
6052
6057
|
proposedColumnOrder.forEach((col) => {
|
|
6053
6058
|
const placement = lockPositionToPlacement(col.getColDef().lockPosition);
|
|
6054
|
-
if (
|
|
6055
|
-
|
|
6059
|
+
if (isRtl) {
|
|
6060
|
+
if (placement > lastPlacement) {
|
|
6061
|
+
rulePassed = false;
|
|
6062
|
+
}
|
|
6063
|
+
} else {
|
|
6064
|
+
if (placement < lastPlacement) {
|
|
6065
|
+
rulePassed = false;
|
|
6066
|
+
}
|
|
6056
6067
|
}
|
|
6057
6068
|
lastPlacement = placement;
|
|
6058
6069
|
});
|
|
@@ -9399,9 +9410,15 @@ var Component = class _Component extends BeanStub {
|
|
|
9399
9410
|
);
|
|
9400
9411
|
}
|
|
9401
9412
|
}
|
|
9413
|
+
getDataRefAttribute(element) {
|
|
9414
|
+
if (element.getAttribute) {
|
|
9415
|
+
return element.getAttribute("data-ref");
|
|
9416
|
+
}
|
|
9417
|
+
return null;
|
|
9418
|
+
}
|
|
9402
9419
|
applyElementsToComponent(element, elementRef, paramsMap, newComponent = null) {
|
|
9403
9420
|
if (elementRef === void 0) {
|
|
9404
|
-
elementRef =
|
|
9421
|
+
elementRef = this.getDataRefAttribute(element);
|
|
9405
9422
|
}
|
|
9406
9423
|
if (elementRef) {
|
|
9407
9424
|
const current = this[elementRef];
|
|
@@ -9446,7 +9463,7 @@ var Component = class _Component extends BeanStub {
|
|
|
9446
9463
|
}
|
|
9447
9464
|
createComponentFromElement(element, afterPreCreateCallback, paramsMap) {
|
|
9448
9465
|
const key = element.nodeName;
|
|
9449
|
-
const elementRef =
|
|
9466
|
+
const elementRef = this.getDataRefAttribute(element);
|
|
9450
9467
|
const isAgGridComponent = key.indexOf("AG-") === 0;
|
|
9451
9468
|
const componentSelector = isAgGridComponent ? this.componentSelectors.get(key) : null;
|
|
9452
9469
|
let newComponent = null;
|
|
@@ -12658,9 +12675,11 @@ var RowDragFeature = class extends BeanStub {
|
|
|
12658
12675
|
addIndex--;
|
|
12659
12676
|
}
|
|
12660
12677
|
this.clientSideRowModel.updateRowData({
|
|
12661
|
-
add: rowNodes.
|
|
12662
|
-
(
|
|
12663
|
-
|
|
12678
|
+
add: rowNodes.filter(
|
|
12679
|
+
(node) => !this.clientSideRowModel.getRowNode(
|
|
12680
|
+
getRowIdFunc?.({ data: node.data, level: 0, rowPinned: node.rowPinned }) ?? node.data.id
|
|
12681
|
+
)
|
|
12682
|
+
).map((node) => node.data),
|
|
12664
12683
|
addIndex
|
|
12665
12684
|
});
|
|
12666
12685
|
}
|
|
@@ -13135,10 +13154,19 @@ var RowDragComp = class extends Component {
|
|
|
13135
13154
|
if (this.dragSource) {
|
|
13136
13155
|
this.removeDragSource();
|
|
13137
13156
|
}
|
|
13157
|
+
const eGui = this.getGui();
|
|
13158
|
+
if (this.gos.get("enableCellTextSelection")) {
|
|
13159
|
+
this.removeMouseDownListener();
|
|
13160
|
+
this.mouseDownListener = this.addManagedElementListeners(eGui, {
|
|
13161
|
+
mousedown: (e) => {
|
|
13162
|
+
e?.preventDefault();
|
|
13163
|
+
}
|
|
13164
|
+
})[0];
|
|
13165
|
+
}
|
|
13138
13166
|
const translate = this.localeService.getLocaleTextFunc();
|
|
13139
13167
|
this.dragSource = {
|
|
13140
13168
|
type: 2 /* RowDrag */,
|
|
13141
|
-
eElement:
|
|
13169
|
+
eElement: eGui,
|
|
13142
13170
|
dragItemName: () => {
|
|
13143
13171
|
const dragItem = this.getDragItem();
|
|
13144
13172
|
const dragItemCount = dragItem.rowNodes?.length || 1;
|
|
@@ -13156,14 +13184,23 @@ var RowDragComp = class extends Component {
|
|
|
13156
13184
|
}
|
|
13157
13185
|
destroy() {
|
|
13158
13186
|
this.removeDragSource();
|
|
13187
|
+
this.removeMouseDownListener();
|
|
13159
13188
|
super.destroy();
|
|
13160
13189
|
}
|
|
13161
13190
|
removeDragSource() {
|
|
13162
|
-
if (this.dragSource) {
|
|
13163
|
-
|
|
13191
|
+
if (!this.dragSource) {
|
|
13192
|
+
return;
|
|
13164
13193
|
}
|
|
13194
|
+
this.beans.dragAndDropService.removeDragSource(this.dragSource);
|
|
13165
13195
|
this.dragSource = null;
|
|
13166
13196
|
}
|
|
13197
|
+
removeMouseDownListener() {
|
|
13198
|
+
if (!this.mouseDownListener) {
|
|
13199
|
+
return;
|
|
13200
|
+
}
|
|
13201
|
+
this.mouseDownListener();
|
|
13202
|
+
this.mouseDownListener = void 0;
|
|
13203
|
+
}
|
|
13167
13204
|
};
|
|
13168
13205
|
var VisibilityStrategy = class extends BeanStub {
|
|
13169
13206
|
constructor(parent, rowNode, column) {
|
|
@@ -13398,7 +13435,8 @@ var _RowNode = class _RowNode {
|
|
|
13398
13435
|
this.id = getRowIdFunc({
|
|
13399
13436
|
data: this.data,
|
|
13400
13437
|
parentKeys: parentKeys.length > 0 ? parentKeys : void 0,
|
|
13401
|
-
level: this.level
|
|
13438
|
+
level: this.level,
|
|
13439
|
+
rowPinned: this.rowPinned
|
|
13402
13440
|
});
|
|
13403
13441
|
if (this.id.startsWith(_RowNode.ID_PREFIX_ROW_GROUP)) {
|
|
13404
13442
|
_errorOnce(
|
|
@@ -18867,7 +18905,7 @@ var HeaderFilterCellCtrl = class extends AbstractHeaderCellCtrl {
|
|
|
18867
18905
|
};
|
|
18868
18906
|
|
|
18869
18907
|
// community-modules/core/src/version.ts
|
|
18870
|
-
var VERSION = "32.0.
|
|
18908
|
+
var VERSION = "32.0.2";
|
|
18871
18909
|
|
|
18872
18910
|
// community-modules/core/src/filter/columnFilterApi.ts
|
|
18873
18911
|
function isColumnFilterPresent(beans) {
|
|
@@ -26257,35 +26295,36 @@ var CellMouseListenerFeature = class extends BeanStub {
|
|
|
26257
26295
|
return res;
|
|
26258
26296
|
}
|
|
26259
26297
|
onCellDoubleClicked(mouseEvent) {
|
|
26260
|
-
const
|
|
26261
|
-
const
|
|
26262
|
-
|
|
26263
|
-
|
|
26264
|
-
);
|
|
26265
|
-
this.beans.eventService.dispatchEvent(cellDoubleClickedEvent);
|
|
26298
|
+
const { column, beans, cellCtrl } = this;
|
|
26299
|
+
const { eventService, frameworkOverrides, gos } = beans;
|
|
26300
|
+
const colDef = column.getColDef();
|
|
26301
|
+
const cellDoubleClickedEvent = cellCtrl.createEvent(mouseEvent, "cellDoubleClicked");
|
|
26302
|
+
eventService.dispatchEvent(cellDoubleClickedEvent);
|
|
26266
26303
|
if (typeof colDef.onCellDoubleClicked === "function") {
|
|
26267
26304
|
window.setTimeout(() => {
|
|
26268
|
-
|
|
26305
|
+
frameworkOverrides.wrapOutgoing(() => {
|
|
26269
26306
|
colDef.onCellDoubleClicked(cellDoubleClickedEvent);
|
|
26270
26307
|
});
|
|
26271
26308
|
}, 0);
|
|
26272
26309
|
}
|
|
26273
|
-
const editOnDoubleClick = !
|
|
26310
|
+
const editOnDoubleClick = !gos.get("singleClickEdit") && !gos.get("suppressClickEdit");
|
|
26274
26311
|
if (editOnDoubleClick) {
|
|
26275
|
-
|
|
26312
|
+
cellCtrl.startRowOrCellEdit(null, mouseEvent);
|
|
26276
26313
|
}
|
|
26277
26314
|
}
|
|
26278
26315
|
onMouseDown(mouseEvent) {
|
|
26279
26316
|
const { ctrlKey, metaKey, shiftKey } = mouseEvent;
|
|
26280
26317
|
const target = mouseEvent.target;
|
|
26281
26318
|
const { cellCtrl, beans } = this;
|
|
26282
|
-
const { eventService, rangeService, focusService } = beans;
|
|
26319
|
+
const { eventService, rangeService, focusService, gos } = beans;
|
|
26283
26320
|
if (this.isRightClickInExistingRange(mouseEvent)) {
|
|
26284
26321
|
return;
|
|
26285
26322
|
}
|
|
26286
26323
|
const ranges = rangeService && rangeService.getCellRanges().length != 0;
|
|
26287
26324
|
if (!shiftKey || !ranges) {
|
|
26288
|
-
const
|
|
26325
|
+
const isEnableCellTextSelection = gos.get("enableCellTextSelection");
|
|
26326
|
+
const shouldFocus = isEnableCellTextSelection && mouseEvent.defaultPrevented;
|
|
26327
|
+
const forceBrowserFocus = (_isBrowserSafari() || shouldFocus) && !cellCtrl.isEditing() && !_isFocusableFormField(target);
|
|
26289
26328
|
cellCtrl.focusCell(forceBrowserFocus);
|
|
26290
26329
|
}
|
|
26291
26330
|
if (shiftKey && ranges && !focusService.isCellFocused(cellCtrl.getCellPosition())) {
|
|
@@ -33945,6 +33984,7 @@ var PinnedRowModel = class extends BeanStub {
|
|
|
33945
33984
|
constructor() {
|
|
33946
33985
|
super(...arguments);
|
|
33947
33986
|
this.beanName = "pinnedRowModel";
|
|
33987
|
+
this.nextId = 0;
|
|
33948
33988
|
}
|
|
33949
33989
|
wireBeans(beans) {
|
|
33950
33990
|
this.beans = beans;
|
|
@@ -34029,11 +34069,12 @@ var PinnedRowModel = class extends BeanStub {
|
|
|
34029
34069
|
const getRowId = this.gos.getRowIdCallback();
|
|
34030
34070
|
const idPrefix = isTop ? RowNode.ID_PREFIX_TOP_PINNED : RowNode.ID_PREFIX_BOTTOM_PINNED;
|
|
34031
34071
|
let nextRowTop = 0;
|
|
34072
|
+
const pinned = isTop ? "top" : "bottom";
|
|
34032
34073
|
allData.forEach((dataItem, index) => {
|
|
34033
34074
|
const rowNode = new RowNode(this.beans);
|
|
34034
34075
|
rowNode.data = dataItem;
|
|
34035
|
-
rowNode.id = getRowId?.({ data: dataItem, level: 0 }) ?? idPrefix +
|
|
34036
|
-
rowNode.rowPinned =
|
|
34076
|
+
rowNode.id = getRowId?.({ data: dataItem, level: 0, rowPinned: pinned }) ?? idPrefix + this.nextId++;
|
|
34077
|
+
rowNode.rowPinned = pinned;
|
|
34037
34078
|
rowNode.setRowTop(nextRowTop);
|
|
34038
34079
|
rowNode.setRowHeight(this.gos.getRowHeightForNode(rowNode).height);
|
|
34039
34080
|
rowNode.setRowIndex(index);
|
|
@@ -35793,6 +35834,9 @@ function createApi(context) {
|
|
|
35793
35834
|
const apiFunctionService = context.getBean("apiFunctionService");
|
|
35794
35835
|
return new Proxy(apiFunctionService, {
|
|
35795
35836
|
get(target, prop) {
|
|
35837
|
+
if (prop === "then") {
|
|
35838
|
+
return;
|
|
35839
|
+
}
|
|
35796
35840
|
return (...args) => target.callFunction(prop, args);
|
|
35797
35841
|
}
|
|
35798
35842
|
});
|
|
@@ -42513,7 +42557,7 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
|
|
|
42513
42557
|
return (params) => {
|
|
42514
42558
|
let id = getRowId(params);
|
|
42515
42559
|
if (typeof id !== "string") {
|
|
42516
|
-
_warnOnce(`The getRowId callback must return a string. The ID
|
|
42560
|
+
_warnOnce(`The getRowId callback must return a string. The ID `, id, ` is being cast to a string.`);
|
|
42517
42561
|
id = String(id);
|
|
42518
42562
|
}
|
|
42519
42563
|
return id;
|
|
@@ -46105,7 +46149,7 @@ var GridSerializer = class extends import_core5.BeanStub {
|
|
|
46105
46149
|
};
|
|
46106
46150
|
|
|
46107
46151
|
// community-modules/csv-export/src/version.ts
|
|
46108
|
-
var VERSION = "32.0.
|
|
46152
|
+
var VERSION = "32.0.2";
|
|
46109
46153
|
|
|
46110
46154
|
// community-modules/csv-export/src/csvExportModule.ts
|
|
46111
46155
|
var CsvExportCoreModule = {
|
|
@@ -47369,7 +47413,7 @@ function isLastRowIndexKnown(beans) {
|
|
|
47369
47413
|
}
|
|
47370
47414
|
|
|
47371
47415
|
// community-modules/infinite-row-model/src/version.ts
|
|
47372
|
-
var VERSION = "32.0.
|
|
47416
|
+
var VERSION = "32.0.2";
|
|
47373
47417
|
|
|
47374
47418
|
// community-modules/infinite-row-model/src/infiniteRowModelModule.ts
|
|
47375
47419
|
var InfiniteRowModelCoreModule = {
|