@revolist/revogrid 3.6.3 → 3.6.5
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/custom-element/revo-grid.js +10 -5
- package/dist/cjs/revo-grid_11.cjs.entry.js +10 -5
- package/dist/collection/components/revo-grid/revo-grid.js +3 -3
- package/dist/collection/components/revo-grid/viewport.service.js +7 -2
- package/dist/esm/revo-grid_11.entry.js +10 -5
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
- package/dist/types/components/revo-grid/viewport.service.d.ts +3 -0
- package/package.json +1 -1
|
@@ -2557,15 +2557,20 @@ class ViewportService {
|
|
|
2557
2557
|
clearEdit() {
|
|
2558
2558
|
this.sv.selectionStoreConnector.setEdit(false);
|
|
2559
2559
|
}
|
|
2560
|
+
/**
|
|
2561
|
+
* Collect focused element data
|
|
2562
|
+
*/
|
|
2560
2563
|
getFocused() {
|
|
2561
2564
|
const focused = this.sv.selectionStoreConnector.focusedStore;
|
|
2562
2565
|
if (!focused) {
|
|
2563
2566
|
return null;
|
|
2564
2567
|
}
|
|
2568
|
+
// get column data
|
|
2565
2569
|
const colType = this.storesXToType[focused.position.x];
|
|
2566
2570
|
const column = this.sv.columnProvider.getColumn(focused.cell.x, colType);
|
|
2567
|
-
|
|
2568
|
-
const
|
|
2571
|
+
// get row data
|
|
2572
|
+
const rowType = this.storesYToType[focused.position.y];
|
|
2573
|
+
const model = this.sv.dataProvider.getModel(focused.cell.y, rowType);
|
|
2569
2574
|
return {
|
|
2570
2575
|
column,
|
|
2571
2576
|
model,
|
|
@@ -3232,14 +3237,14 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
3232
3237
|
* Clear current grid focus
|
|
3233
3238
|
*/
|
|
3234
3239
|
async clearFocus() {
|
|
3235
|
-
var _a;
|
|
3236
|
-
const focused =
|
|
3240
|
+
var _a, _b;
|
|
3241
|
+
const focused = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
|
|
3237
3242
|
const event = this.beforefocuslost.emit(focused);
|
|
3238
3243
|
if (event.defaultPrevented) {
|
|
3239
3244
|
return;
|
|
3240
3245
|
}
|
|
3241
3246
|
this.selectionStoreConnector.clearAll();
|
|
3242
|
-
(
|
|
3247
|
+
(_b = this.viewport) === null || _b === void 0 ? void 0 : _b.clearFocused();
|
|
3243
3248
|
}
|
|
3244
3249
|
/**
|
|
3245
3250
|
* Get all active plugins instances
|
|
@@ -24490,15 +24490,20 @@ class ViewportService {
|
|
|
24490
24490
|
clearEdit() {
|
|
24491
24491
|
this.sv.selectionStoreConnector.setEdit(false);
|
|
24492
24492
|
}
|
|
24493
|
+
/**
|
|
24494
|
+
* Collect focused element data
|
|
24495
|
+
*/
|
|
24493
24496
|
getFocused() {
|
|
24494
24497
|
const focused = this.sv.selectionStoreConnector.focusedStore;
|
|
24495
24498
|
if (!focused) {
|
|
24496
24499
|
return null;
|
|
24497
24500
|
}
|
|
24501
|
+
// get column data
|
|
24498
24502
|
const colType = this.storesXToType[focused.position.x];
|
|
24499
24503
|
const column = this.sv.columnProvider.getColumn(focused.cell.x, colType);
|
|
24500
|
-
|
|
24501
|
-
const
|
|
24504
|
+
// get row data
|
|
24505
|
+
const rowType = this.storesYToType[focused.position.y];
|
|
24506
|
+
const model = this.sv.dataProvider.getModel(focused.cell.y, rowType);
|
|
24502
24507
|
return {
|
|
24503
24508
|
column,
|
|
24504
24509
|
model,
|
|
@@ -25177,14 +25182,14 @@ const RevoGridComponent = class {
|
|
|
25177
25182
|
* Clear current grid focus
|
|
25178
25183
|
*/
|
|
25179
25184
|
async clearFocus() {
|
|
25180
|
-
var _a;
|
|
25181
|
-
const focused =
|
|
25185
|
+
var _a, _b;
|
|
25186
|
+
const focused = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
|
|
25182
25187
|
const event = this.beforefocuslost.emit(focused);
|
|
25183
25188
|
if (event.defaultPrevented) {
|
|
25184
25189
|
return;
|
|
25185
25190
|
}
|
|
25186
25191
|
this.selectionStoreConnector.clearAll();
|
|
25187
|
-
(
|
|
25192
|
+
(_b = this.viewport) === null || _b === void 0 ? void 0 : _b.clearFocused();
|
|
25188
25193
|
}
|
|
25189
25194
|
/**
|
|
25190
25195
|
* Get all active plugins instances
|
|
@@ -267,14 +267,14 @@ export class RevoGridComponent {
|
|
|
267
267
|
* Clear current grid focus
|
|
268
268
|
*/
|
|
269
269
|
async clearFocus() {
|
|
270
|
-
var _a;
|
|
271
|
-
const focused =
|
|
270
|
+
var _a, _b;
|
|
271
|
+
const focused = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
|
|
272
272
|
const event = this.beforefocuslost.emit(focused);
|
|
273
273
|
if (event.defaultPrevented) {
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
this.selectionStoreConnector.clearAll();
|
|
277
|
-
(
|
|
277
|
+
(_b = this.viewport) === null || _b === void 0 ? void 0 : _b.clearFocused();
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* Get all active plugins instances
|
|
@@ -180,15 +180,20 @@ export default class ViewportService {
|
|
|
180
180
|
clearEdit() {
|
|
181
181
|
this.sv.selectionStoreConnector.setEdit(false);
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Collect focused element data
|
|
185
|
+
*/
|
|
183
186
|
getFocused() {
|
|
184
187
|
const focused = this.sv.selectionStoreConnector.focusedStore;
|
|
185
188
|
if (!focused) {
|
|
186
189
|
return null;
|
|
187
190
|
}
|
|
191
|
+
// get column data
|
|
188
192
|
const colType = this.storesXToType[focused.position.x];
|
|
189
193
|
const column = this.sv.columnProvider.getColumn(focused.cell.x, colType);
|
|
190
|
-
|
|
191
|
-
const
|
|
194
|
+
// get row data
|
|
195
|
+
const rowType = this.storesYToType[focused.position.y];
|
|
196
|
+
const model = this.sv.dataProvider.getModel(focused.cell.y, rowType);
|
|
192
197
|
return {
|
|
193
198
|
column,
|
|
194
199
|
model,
|
|
@@ -24486,15 +24486,20 @@ class ViewportService {
|
|
|
24486
24486
|
clearEdit() {
|
|
24487
24487
|
this.sv.selectionStoreConnector.setEdit(false);
|
|
24488
24488
|
}
|
|
24489
|
+
/**
|
|
24490
|
+
* Collect focused element data
|
|
24491
|
+
*/
|
|
24489
24492
|
getFocused() {
|
|
24490
24493
|
const focused = this.sv.selectionStoreConnector.focusedStore;
|
|
24491
24494
|
if (!focused) {
|
|
24492
24495
|
return null;
|
|
24493
24496
|
}
|
|
24497
|
+
// get column data
|
|
24494
24498
|
const colType = this.storesXToType[focused.position.x];
|
|
24495
24499
|
const column = this.sv.columnProvider.getColumn(focused.cell.x, colType);
|
|
24496
|
-
|
|
24497
|
-
const
|
|
24500
|
+
// get row data
|
|
24501
|
+
const rowType = this.storesYToType[focused.position.y];
|
|
24502
|
+
const model = this.sv.dataProvider.getModel(focused.cell.y, rowType);
|
|
24498
24503
|
return {
|
|
24499
24504
|
column,
|
|
24500
24505
|
model,
|
|
@@ -25173,14 +25178,14 @@ const RevoGridComponent = class {
|
|
|
25173
25178
|
* Clear current grid focus
|
|
25174
25179
|
*/
|
|
25175
25180
|
async clearFocus() {
|
|
25176
|
-
var _a;
|
|
25177
|
-
const focused =
|
|
25181
|
+
var _a, _b;
|
|
25182
|
+
const focused = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
|
|
25178
25183
|
const event = this.beforefocuslost.emit(focused);
|
|
25179
25184
|
if (event.defaultPrevented) {
|
|
25180
25185
|
return;
|
|
25181
25186
|
}
|
|
25182
25187
|
this.selectionStoreConnector.clearAll();
|
|
25183
|
-
(
|
|
25188
|
+
(_b = this.viewport) === null || _b === void 0 ? void 0 : _b.clearFocused();
|
|
25184
25189
|
}
|
|
25185
25190
|
/**
|
|
25186
25191
|
* Get all active plugins instances
|