@alaarab/ogrid-angular 2.1.14 → 2.1.15
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/esm/index.js
CHANGED
|
@@ -1371,10 +1371,13 @@ var DataGridInteractionHelper = class {
|
|
|
1371
1371
|
const finalRange = this.liveDragRange;
|
|
1372
1372
|
if (finalRange) {
|
|
1373
1373
|
this.setSelectionRange(finalRange);
|
|
1374
|
-
this.
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1374
|
+
const anchor = this.dragStartPos;
|
|
1375
|
+
if (anchor) {
|
|
1376
|
+
this.setActiveCell({
|
|
1377
|
+
rowIndex: anchor.row,
|
|
1378
|
+
columnIndex: anchor.col + colOffset
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1378
1381
|
}
|
|
1379
1382
|
}
|
|
1380
1383
|
this.clearDragAttrs(wrapperEl);
|
|
@@ -1530,6 +1533,7 @@ var DataGridStateService = class {
|
|
|
1530
1533
|
const p = this.props();
|
|
1531
1534
|
if (!p || p.items.length === 0) return false;
|
|
1532
1535
|
const selected = this.selectedRowIds();
|
|
1536
|
+
if (selected.size !== p.items.length) return false;
|
|
1533
1537
|
return p.items.every((item) => selected.has(p.getRowId(item)));
|
|
1534
1538
|
});
|
|
1535
1539
|
this.someSelected = computed(() => {
|
|
@@ -2035,7 +2039,7 @@ var DataGridStateService = class {
|
|
|
2035
2039
|
endCol: fillDragEnd.endCol
|
|
2036
2040
|
});
|
|
2037
2041
|
this.setSelectionRange(norm);
|
|
2038
|
-
this.setActiveCell({ rowIndex:
|
|
2042
|
+
this.setActiveCell({ rowIndex: fillStart.startRow, columnIndex: fillStart.startCol + colOff });
|
|
2039
2043
|
if (!p) return;
|
|
2040
2044
|
const items = p.items;
|
|
2041
2045
|
const visibleCols = this.visibleCols();
|
|
@@ -3105,6 +3109,10 @@ var MarchingAntsOverlayComponent = class {
|
|
|
3105
3109
|
this.resizeObserver.observe(container);
|
|
3106
3110
|
}
|
|
3107
3111
|
}
|
|
3112
|
+
isSingleCellSelection() {
|
|
3113
|
+
const r = this.selectionRange;
|
|
3114
|
+
return r != null && r.startRow === r.endRow && r.startCol === r.endCol;
|
|
3115
|
+
}
|
|
3108
3116
|
clipRangeMatchesSel() {
|
|
3109
3117
|
const selRange = this.selectionRange;
|
|
3110
3118
|
const clipRange = this.copyRange ?? this.cutRange;
|
|
@@ -3152,7 +3160,7 @@ MarchingAntsOverlayComponent = __decorateClass([
|
|
|
3152
3160
|
.ogrid-marching-ants-svg--clip { z-index: 5; }
|
|
3153
3161
|
`],
|
|
3154
3162
|
template: `
|
|
3155
|
-
@if (selRect() && !clipRangeMatchesSel()) {
|
|
3163
|
+
@if (selRect() && !clipRangeMatchesSel() && !isSingleCellSelection()) {
|
|
3156
3164
|
<svg
|
|
3157
3165
|
class="ogrid-marching-ants-svg ogrid-marching-ants-svg--selection"
|
|
3158
3166
|
[style.top.px]="selRect()!.top"
|
|
@@ -19,6 +19,7 @@ export declare class MarchingAntsOverlayComponent implements OnChanges {
|
|
|
19
19
|
constructor();
|
|
20
20
|
ngOnChanges(_changes: SimpleChanges): void;
|
|
21
21
|
private recalculate;
|
|
22
|
+
isSingleCellSelection(): boolean;
|
|
22
23
|
clipRangeMatchesSel(): boolean;
|
|
23
24
|
max0(n: number): number;
|
|
24
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-angular",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.15",
|
|
4
4
|
"description": "OGrid Angular – Angular services, signals, and headless components for OGrid data grids.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"node": ">=18"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@alaarab/ogrid-core": "2.1.
|
|
38
|
+
"@alaarab/ogrid-core": "2.1.15"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@angular/core": "^21.0.0",
|