@revolist/revogrid 3.7.2 → 3.7.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/custom-element/columnService.js +44 -22
- package/custom-element/revo-grid.js +4 -1
- package/custom-element/revogr-data2.js +4 -1
- package/custom-element/revogr-overlay-selection2.js +28 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/revo-grid_11.cjs.entry.js +79 -33
- package/dist/collection/components/data/revogr-data.js +23 -1
- package/dist/collection/components/overlay/keyboard.service.js +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +44 -7
- package/dist/collection/components/revo-grid/revo-grid.js +9 -0
- package/dist/collection/services/selection.store.connector.js +40 -22
- package/dist/collection/store/selection/selection.store.js +4 -0
- package/dist/collection/store/selection/selection.store.service.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/revo-grid_11.entry.js +79 -33
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/revo-grid.js +1 -1
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revo-grid.system.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/data/revogr-data.d.ts +5 -0
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +3 -0
- package/dist/types/components/revo-grid/revo-grid.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/interfaces.d.ts +1 -0
- package/dist/types/services/selection.store.connector.d.ts +6 -0
- package/dist/types/store/selection/selection.store.d.ts +1 -0
- package/dist/types/store/selection/selection.store.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -194,6 +194,7 @@ function defaultState() {
|
|
|
194
194
|
tempRange: null,
|
|
195
195
|
tempRangeType: null,
|
|
196
196
|
focus: null,
|
|
197
|
+
nextFocus: null,
|
|
197
198
|
edit: null,
|
|
198
199
|
lastCell: null,
|
|
199
200
|
};
|
|
@@ -222,6 +223,9 @@ class SelectionStore {
|
|
|
222
223
|
tempRange: null,
|
|
223
224
|
});
|
|
224
225
|
}
|
|
226
|
+
nextFocus(focus) {
|
|
227
|
+
setStore(this.store, { nextFocus: focus });
|
|
228
|
+
}
|
|
225
229
|
setTempArea(range) {
|
|
226
230
|
setStore(this.store, { tempRange: range === null || range === void 0 ? void 0 : range.area, tempRangeType: range === null || range === void 0 ? void 0 : range.type, edit: null });
|
|
227
231
|
}
|
|
@@ -383,29 +387,17 @@ class SelectionStoreConnector {
|
|
|
383
387
|
this.focus(store, { focus: editCell, end: editCell });
|
|
384
388
|
this.setEdit('');
|
|
385
389
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
// clear all stores focus leave only active one
|
|
389
|
-
for (let y in this.stores) {
|
|
390
|
-
for (let x in this.stores[y]) {
|
|
391
|
-
const s = this.stores[y][x];
|
|
392
|
-
// clear other stores, only one area can be selected
|
|
393
|
-
if (s !== store) {
|
|
394
|
-
s.clearFocus();
|
|
395
|
-
}
|
|
396
|
-
else {
|
|
397
|
-
currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (!currentStorePointer) {
|
|
390
|
+
beforeNextFocusCell(focus) {
|
|
391
|
+
if (!this.focusedStore) {
|
|
402
392
|
return;
|
|
403
393
|
}
|
|
404
|
-
|
|
405
|
-
|
|
394
|
+
const nextStore = this.checkNextStore(focus, this.focusedStore.position, this.focusedStore.entity.store.get('lastCell'));
|
|
395
|
+
nextStore.store.nextFocus(Object.assign(Object.assign({}, focus), nextStore.item));
|
|
396
|
+
}
|
|
397
|
+
checkNextStore(focus, currentStorePointer, lastCell) {
|
|
406
398
|
// item in new store
|
|
407
399
|
const nextItem = nextCell(focus, lastCell);
|
|
408
|
-
let nextStore;
|
|
400
|
+
let nextStore = null;
|
|
409
401
|
if (nextItem) {
|
|
410
402
|
for (let i in nextItem) {
|
|
411
403
|
let type = i;
|
|
@@ -430,10 +422,40 @@ class SelectionStoreConnector {
|
|
|
430
422
|
}
|
|
431
423
|
}
|
|
432
424
|
}
|
|
425
|
+
return {
|
|
426
|
+
store: nextStore,
|
|
427
|
+
item: nextItem,
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
getCurrentStorePointer(store) {
|
|
431
|
+
let currentStorePointer;
|
|
432
|
+
// clear all stores focus leave only active one
|
|
433
|
+
for (let y in this.stores) {
|
|
434
|
+
for (let x in this.stores[y]) {
|
|
435
|
+
const s = this.stores[y][x];
|
|
436
|
+
// clear other stores, only one area can be selected
|
|
437
|
+
if (s !== store) {
|
|
438
|
+
s.clearFocus();
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return currentStorePointer;
|
|
446
|
+
}
|
|
447
|
+
focus(store, { focus, end }) {
|
|
448
|
+
const currentStorePointer = this.getCurrentStorePointer(store);
|
|
449
|
+
if (!currentStorePointer) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
// check is focus in next store
|
|
453
|
+
const lastCell = store.store.get('lastCell');
|
|
454
|
+
const next = this.checkNextStore(focus, currentStorePointer, lastCell);
|
|
433
455
|
// if next store present - update
|
|
434
|
-
if (
|
|
435
|
-
let item = Object.assign(Object.assign({}, focus),
|
|
436
|
-
this.focus(
|
|
456
|
+
if (next === null || next === void 0 ? void 0 : next.store) {
|
|
457
|
+
let item = Object.assign(Object.assign({}, focus), next.item);
|
|
458
|
+
this.focus(next.store, { focus: item, end: item });
|
|
437
459
|
return;
|
|
438
460
|
}
|
|
439
461
|
focus = cropCellToMax(focus, lastCell);
|
|
@@ -3361,6 +3361,9 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
3361
3361
|
e.preventDefault();
|
|
3362
3362
|
}
|
|
3363
3363
|
}
|
|
3364
|
+
onCellStoreFocus(e) {
|
|
3365
|
+
this.selectionStoreConnector.beforeNextFocusCell(e.detail);
|
|
3366
|
+
}
|
|
3364
3367
|
columnChanged(newVal = []) {
|
|
3365
3368
|
this.dimensionProvider.dropColumns();
|
|
3366
3369
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
@@ -3620,7 +3623,7 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
3620
3623
|
"getPlugins": [64],
|
|
3621
3624
|
"getFocused": [64],
|
|
3622
3625
|
"getSelectedRange": [64]
|
|
3623
|
-
}, [[0, "internalRowDragStart", "onRowDragStarted"], [0, "internalRowDragEnd", "onRowDragEnd"], [0, "internalRowDrag", "onRowDrag"], [0, "internalRowMouseMove", "onRowMouseMove"], [0, "internalCellEdit", "onBeforeEdit"], [0, "internalRangeDataApply", "onBeforeRangeEdit"], [0, "internalSelectionChanged", "onRangeChanged"], [0, "initialRowDropped", "onRowDropped"], [0, "initialHeaderClick", "onHeaderClick"], [0, "internalFocusCell", "onCellFocus"]]]);
|
|
3626
|
+
}, [[0, "internalRowDragStart", "onRowDragStarted"], [0, "internalRowDragEnd", "onRowDragEnd"], [0, "internalRowDrag", "onRowDrag"], [0, "internalRowMouseMove", "onRowMouseMove"], [0, "internalCellEdit", "onBeforeEdit"], [0, "internalRangeDataApply", "onBeforeRangeEdit"], [0, "internalSelectionChanged", "onRangeChanged"], [0, "initialRowDropped", "onRowDropped"], [0, "initialHeaderClick", "onHeaderClick"], [0, "internalFocusCell", "onCellFocus"], [0, "internalNextStoreFocus", "onCellStoreFocus"]]]);
|
|
3624
3627
|
function defineCustomElement$1() {
|
|
3625
3628
|
if (typeof customElements === "undefined") {
|
|
3626
3629
|
return;
|
|
@@ -69,6 +69,7 @@ const RevogrData = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
69
69
|
super();
|
|
70
70
|
this.__registerHost();
|
|
71
71
|
this.dragStartCell = createEvent(this, "dragStartCell", 7);
|
|
72
|
+
this.beforerowrender = createEvent(this, "beforerowrender", 7);
|
|
72
73
|
}
|
|
73
74
|
onStoreChange() {
|
|
74
75
|
var _a;
|
|
@@ -109,7 +110,9 @@ const RevogrData = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
109
110
|
for (let rgCol of cols) {
|
|
110
111
|
cells.push(this.getCellRenderer(rgRow, rgCol, this.canDrag, /** grouping apply*/ this.columnService.hasGrouping ? depth : 0));
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
+
const row = h(RowRenderer, { rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells);
|
|
114
|
+
this.beforerowrender.emit({ row, model: dataRow, rowIndex: rgRow.itemIndex });
|
|
115
|
+
rowsEls.push(row);
|
|
113
116
|
}
|
|
114
117
|
return rowsEls;
|
|
115
118
|
}
|
|
@@ -30,7 +30,7 @@ class SelectionStoreService {
|
|
|
30
30
|
changeRange(range) {
|
|
31
31
|
return this.config.changeRange(range);
|
|
32
32
|
}
|
|
33
|
-
focus(cell, isMulti = false) {
|
|
33
|
+
focus(cell, isMulti = false, focusNextStore = 0) {
|
|
34
34
|
if (!cell) {
|
|
35
35
|
return false;
|
|
36
36
|
}
|
|
@@ -43,7 +43,7 @@ class SelectionStoreService {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
// single focus
|
|
46
|
-
return this.config.focus(cell, end);
|
|
46
|
+
return this.config.focus(cell, end, focusNextStore);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -137,7 +137,7 @@ class KeyboardService {
|
|
|
137
137
|
const range = getRange(data.start, data.end);
|
|
138
138
|
return this.sv.selectionStoreService.changeRange(range);
|
|
139
139
|
}
|
|
140
|
-
return this.sv.selectionStoreService.focus(data.start);
|
|
140
|
+
return this.sv.selectionStoreService.focus(data.start, false, isAfterLast(data.start, eData) ? 1 : isBeforeFirst(data.start) ? -1 : 0);
|
|
141
141
|
}
|
|
142
142
|
keyUp(e) {
|
|
143
143
|
if (isCtrlKey(e.keyCode, navigator.platform)) {
|
|
@@ -457,6 +457,7 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
457
457
|
this.internalPaste = createEvent(this, "internalPaste", 7);
|
|
458
458
|
this.internalCellEdit = createEvent(this, "internalCellEdit", 7);
|
|
459
459
|
this.internalFocusCell = createEvent(this, "internalFocusCell", 7);
|
|
460
|
+
this.internalNextStoreFocus = createEvent(this, "internalNextStoreFocus", 7);
|
|
460
461
|
this.setEdit = createEvent(this, "setEdit", 3);
|
|
461
462
|
this.cancelEdit = createEvent(this, "cancelEdit", 7);
|
|
462
463
|
this.setRange = createEvent(this, "setRange", 7);
|
|
@@ -467,6 +468,8 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
467
468
|
this.keyboardService = null;
|
|
468
469
|
this.autoFillService = null;
|
|
469
470
|
this.clipboardService = null;
|
|
471
|
+
/** Create selection store */
|
|
472
|
+
this.unsubscribeSelectionStore = [];
|
|
470
473
|
}
|
|
471
474
|
// --------------------------------------------------------------------------
|
|
472
475
|
//
|
|
@@ -504,18 +507,31 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
504
507
|
}
|
|
505
508
|
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
|
|
506
509
|
}
|
|
507
|
-
|
|
510
|
+
focusCurrent(cell, end) {
|
|
511
|
+
var _a;
|
|
512
|
+
const currentFocusEvent = this.internalFocusCell.emit(this.columnService.getSaveData(cell.y, cell.x));
|
|
513
|
+
if (currentFocusEvent.defaultPrevented) {
|
|
514
|
+
return false;
|
|
515
|
+
}
|
|
516
|
+
const focused = { focus: cell, end };
|
|
517
|
+
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
518
|
+
}
|
|
508
519
|
selectionServiceSet(s) {
|
|
520
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
521
|
+
this.unsubscribeSelectionStore = [];
|
|
522
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => {
|
|
523
|
+
this.focusCurrent(v, v);
|
|
524
|
+
}));
|
|
509
525
|
this.selectionStoreService = new SelectionStoreService(s, {
|
|
510
526
|
changeRange: range => { var _a; return !((_a = this.setRange.emit(range)) === null || _a === void 0 ? void 0 : _a.defaultPrevented); },
|
|
511
|
-
focus: (focus, end) => {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
527
|
+
focus: (focus, end, focusNextStore) => {
|
|
528
|
+
if (!focusNextStore) {
|
|
529
|
+
return this.focusCurrent(focus, end);
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
this.internalNextStoreFocus.emit(focus);
|
|
516
533
|
return false;
|
|
517
534
|
}
|
|
518
|
-
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
519
535
|
},
|
|
520
536
|
});
|
|
521
537
|
this.keyboardService = new KeyboardService({
|
|
@@ -567,6 +583,8 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
567
583
|
disconnectedCallback() {
|
|
568
584
|
var _a;
|
|
569
585
|
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
586
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
587
|
+
this.unsubscribeSelectionStore = [];
|
|
570
588
|
}
|
|
571
589
|
renderRange(range) {
|
|
572
590
|
const style = getElStyle(range, this.dimensionRow.state, this.dimensionCol.state);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -31,7 +31,7 @@ const patchEsm = () => {
|
|
|
31
31
|
const defineCustomElements = (win, options) => {
|
|
32
32
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
33
33
|
return patchEsm().then(() => {
|
|
34
|
-
return index.bootstrapLazy([["revogr-clipboard.cjs",[[0,"revogr-clipboard",{"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]]],["revogr-filter-panel.cjs",[[0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revo-grid_11.cjs",[[0,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"extraElements":[32],"refresh":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"registerVNode":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getSelectedRange":[64]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"]]],[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"uiid":[1],"resize":[4],"rowHeaderColumn":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16]},[[5,"mousemove","onMouseMove"],[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"],[0,"dragStartCell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]]],[0,"revogr-focus",{"dataStore":[16],"colData":[16],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-data",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"rowClass":[1,"row-class"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16]}],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"parent":[1],"groups":[16],"groupingDepth":[2,"grouping-depth"],"canResize":[4,"can-resize"],"colData":[16],"columnFilter":[4,"column-filter"]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"dragStart":[64],"endOrder":[64],"clearOrder":[64]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]],[4,"revogr-viewport-scroll",{"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"setScroll":[64],"changeScroll":[64]}]]]], options);
|
|
34
|
+
return index.bootstrapLazy([["revogr-clipboard.cjs",[[0,"revogr-clipboard",{"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]]],["revogr-filter-panel.cjs",[[0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revo-grid_11.cjs",[[0,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"extraElements":[32],"refresh":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"registerVNode":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getSelectedRange":[64]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"],[0,"internalNextStoreFocus","onCellStoreFocus"]]],[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"uiid":[1],"resize":[4],"rowHeaderColumn":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16]},[[5,"mousemove","onMouseMove"],[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"],[0,"dragStartCell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]]],[0,"revogr-focus",{"dataStore":[16],"colData":[16],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-data",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"rowClass":[1,"row-class"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16]}],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"parent":[1],"groups":[16],"groupingDepth":[2,"grouping-depth"],"canResize":[4,"can-resize"],"colData":[16],"columnFilter":[4,"column-filter"]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"dragStart":[64],"endOrder":[64],"clearOrder":[64]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]],[4,"revogr-viewport-scroll",{"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"setScroll":[64],"changeScroll":[64]}]]]], options);
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -75,5 +75,5 @@ const patchDynamicImport = (base, orgScriptElm) => {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
patchBrowser().then(options => {
|
|
78
|
-
return index.bootstrapLazy([["revogr-clipboard.cjs",[[0,"revogr-clipboard",{"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]]],["revogr-filter-panel.cjs",[[0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revo-grid_11.cjs",[[0,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"extraElements":[32],"refresh":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"registerVNode":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getSelectedRange":[64]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"]]],[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"uiid":[1],"resize":[4],"rowHeaderColumn":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16]},[[5,"mousemove","onMouseMove"],[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"],[0,"dragStartCell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]]],[0,"revogr-focus",{"dataStore":[16],"colData":[16],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-data",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"rowClass":[1,"row-class"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16]}],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"parent":[1],"groups":[16],"groupingDepth":[2,"grouping-depth"],"canResize":[4,"can-resize"],"colData":[16],"columnFilter":[4,"column-filter"]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"dragStart":[64],"endOrder":[64],"clearOrder":[64]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]],[4,"revogr-viewport-scroll",{"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"setScroll":[64],"changeScroll":[64]}]]]], options);
|
|
78
|
+
return index.bootstrapLazy([["revogr-clipboard.cjs",[[0,"revogr-clipboard",{"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]]],["revogr-filter-panel.cjs",[[0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revo-grid_11.cjs",[[0,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"extraElements":[32],"refresh":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"registerVNode":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getSelectedRange":[64]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"],[0,"internalNextStoreFocus","onCellStoreFocus"]]],[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"uiid":[1],"resize":[4],"rowHeaderColumn":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16]},[[5,"mousemove","onMouseMove"],[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"],[0,"dragStartCell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]]],[0,"revogr-focus",{"dataStore":[16],"colData":[16],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-data",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"rowClass":[1,"row-class"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16]}],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"parent":[1],"groups":[16],"groupingDepth":[2,"grouping-depth"],"canResize":[4,"can-resize"],"colData":[16],"columnFilter":[4,"column-filter"]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"dragStart":[64],"endOrder":[64],"clearOrder":[64]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]],[4,"revogr-viewport-scroll",{"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"setScroll":[64],"changeScroll":[64]}]]]], options);
|
|
79
79
|
});
|
|
@@ -6848,6 +6848,7 @@ function defaultState() {
|
|
|
6848
6848
|
tempRange: null,
|
|
6849
6849
|
tempRangeType: null,
|
|
6850
6850
|
focus: null,
|
|
6851
|
+
nextFocus: null,
|
|
6851
6852
|
edit: null,
|
|
6852
6853
|
lastCell: null,
|
|
6853
6854
|
};
|
|
@@ -6876,6 +6877,9 @@ class SelectionStore {
|
|
|
6876
6877
|
tempRange: null,
|
|
6877
6878
|
});
|
|
6878
6879
|
}
|
|
6880
|
+
nextFocus(focus) {
|
|
6881
|
+
setStore(this.store, { nextFocus: focus });
|
|
6882
|
+
}
|
|
6879
6883
|
setTempArea(range) {
|
|
6880
6884
|
setStore(this.store, { tempRange: range === null || range === void 0 ? void 0 : range.area, tempRangeType: range === null || range === void 0 ? void 0 : range.type, edit: null });
|
|
6881
6885
|
}
|
|
@@ -7037,29 +7041,17 @@ class SelectionStoreConnector {
|
|
|
7037
7041
|
this.focus(store, { focus: editCell, end: editCell });
|
|
7038
7042
|
this.setEdit('');
|
|
7039
7043
|
}
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
// clear all stores focus leave only active one
|
|
7043
|
-
for (let y in this.stores) {
|
|
7044
|
-
for (let x in this.stores[y]) {
|
|
7045
|
-
const s = this.stores[y][x];
|
|
7046
|
-
// clear other stores, only one area can be selected
|
|
7047
|
-
if (s !== store) {
|
|
7048
|
-
s.clearFocus();
|
|
7049
|
-
}
|
|
7050
|
-
else {
|
|
7051
|
-
currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };
|
|
7052
|
-
}
|
|
7053
|
-
}
|
|
7054
|
-
}
|
|
7055
|
-
if (!currentStorePointer) {
|
|
7044
|
+
beforeNextFocusCell(focus) {
|
|
7045
|
+
if (!this.focusedStore) {
|
|
7056
7046
|
return;
|
|
7057
7047
|
}
|
|
7058
|
-
|
|
7059
|
-
|
|
7048
|
+
const nextStore = this.checkNextStore(focus, this.focusedStore.position, this.focusedStore.entity.store.get('lastCell'));
|
|
7049
|
+
nextStore.store.nextFocus(Object.assign(Object.assign({}, focus), nextStore.item));
|
|
7050
|
+
}
|
|
7051
|
+
checkNextStore(focus, currentStorePointer, lastCell) {
|
|
7060
7052
|
// item in new store
|
|
7061
7053
|
const nextItem = nextCell(focus, lastCell);
|
|
7062
|
-
let nextStore;
|
|
7054
|
+
let nextStore = null;
|
|
7063
7055
|
if (nextItem) {
|
|
7064
7056
|
for (let i in nextItem) {
|
|
7065
7057
|
let type = i;
|
|
@@ -7084,10 +7076,40 @@ class SelectionStoreConnector {
|
|
|
7084
7076
|
}
|
|
7085
7077
|
}
|
|
7086
7078
|
}
|
|
7079
|
+
return {
|
|
7080
|
+
store: nextStore,
|
|
7081
|
+
item: nextItem,
|
|
7082
|
+
};
|
|
7083
|
+
}
|
|
7084
|
+
getCurrentStorePointer(store) {
|
|
7085
|
+
let currentStorePointer;
|
|
7086
|
+
// clear all stores focus leave only active one
|
|
7087
|
+
for (let y in this.stores) {
|
|
7088
|
+
for (let x in this.stores[y]) {
|
|
7089
|
+
const s = this.stores[y][x];
|
|
7090
|
+
// clear other stores, only one area can be selected
|
|
7091
|
+
if (s !== store) {
|
|
7092
|
+
s.clearFocus();
|
|
7093
|
+
}
|
|
7094
|
+
else {
|
|
7095
|
+
currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };
|
|
7096
|
+
}
|
|
7097
|
+
}
|
|
7098
|
+
}
|
|
7099
|
+
return currentStorePointer;
|
|
7100
|
+
}
|
|
7101
|
+
focus(store, { focus, end }) {
|
|
7102
|
+
const currentStorePointer = this.getCurrentStorePointer(store);
|
|
7103
|
+
if (!currentStorePointer) {
|
|
7104
|
+
return;
|
|
7105
|
+
}
|
|
7106
|
+
// check is focus in next store
|
|
7107
|
+
const lastCell = store.store.get('lastCell');
|
|
7108
|
+
const next = this.checkNextStore(focus, currentStorePointer, lastCell);
|
|
7087
7109
|
// if next store present - update
|
|
7088
|
-
if (
|
|
7089
|
-
let item = Object.assign(Object.assign({}, focus),
|
|
7090
|
-
this.focus(
|
|
7110
|
+
if (next === null || next === void 0 ? void 0 : next.store) {
|
|
7111
|
+
let item = Object.assign(Object.assign({}, focus), next.item);
|
|
7112
|
+
this.focus(next.store, { focus: item, end: item });
|
|
7091
7113
|
return;
|
|
7092
7114
|
}
|
|
7093
7115
|
focus = cropCellToMax(focus, lastCell);
|
|
@@ -25306,6 +25328,9 @@ const RevoGridComponent = class {
|
|
|
25306
25328
|
e.preventDefault();
|
|
25307
25329
|
}
|
|
25308
25330
|
}
|
|
25331
|
+
onCellStoreFocus(e) {
|
|
25332
|
+
this.selectionStoreConnector.beforeNextFocusCell(e.detail);
|
|
25333
|
+
}
|
|
25309
25334
|
columnChanged(newVal = []) {
|
|
25310
25335
|
this.dimensionProvider.dropColumns();
|
|
25311
25336
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
@@ -25820,6 +25845,7 @@ const RevogrData = class {
|
|
|
25820
25845
|
constructor(hostRef) {
|
|
25821
25846
|
index.registerInstance(this, hostRef);
|
|
25822
25847
|
this.dragStartCell = index.createEvent(this, "dragStartCell", 7);
|
|
25848
|
+
this.beforerowrender = index.createEvent(this, "beforerowrender", 7);
|
|
25823
25849
|
}
|
|
25824
25850
|
onStoreChange() {
|
|
25825
25851
|
var _a;
|
|
@@ -25860,7 +25886,9 @@ const RevogrData = class {
|
|
|
25860
25886
|
for (let rgCol of cols) {
|
|
25861
25887
|
cells.push(this.getCellRenderer(rgRow, rgCol, this.canDrag, /** grouping apply*/ this.columnService.hasGrouping ? depth : 0));
|
|
25862
25888
|
}
|
|
25863
|
-
|
|
25889
|
+
const row = index.h(RowRenderer, { rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells);
|
|
25890
|
+
this.beforerowrender.emit({ row, model: dataRow, rowIndex: rgRow.itemIndex });
|
|
25891
|
+
rowsEls.push(row);
|
|
25864
25892
|
}
|
|
25865
25893
|
return rowsEls;
|
|
25866
25894
|
}
|
|
@@ -27078,7 +27106,7 @@ class SelectionStoreService {
|
|
|
27078
27106
|
changeRange(range) {
|
|
27079
27107
|
return this.config.changeRange(range);
|
|
27080
27108
|
}
|
|
27081
|
-
focus(cell, isMulti = false) {
|
|
27109
|
+
focus(cell, isMulti = false, focusNextStore = 0) {
|
|
27082
27110
|
if (!cell) {
|
|
27083
27111
|
return false;
|
|
27084
27112
|
}
|
|
@@ -27091,7 +27119,7 @@ class SelectionStoreService {
|
|
|
27091
27119
|
}
|
|
27092
27120
|
}
|
|
27093
27121
|
// single focus
|
|
27094
|
-
return this.config.focus(cell, end);
|
|
27122
|
+
return this.config.focus(cell, end, focusNextStore);
|
|
27095
27123
|
}
|
|
27096
27124
|
}
|
|
27097
27125
|
|
|
@@ -27185,7 +27213,7 @@ class KeyboardService {
|
|
|
27185
27213
|
const range = getRange(data.start, data.end);
|
|
27186
27214
|
return this.sv.selectionStoreService.changeRange(range);
|
|
27187
27215
|
}
|
|
27188
|
-
return this.sv.selectionStoreService.focus(data.start);
|
|
27216
|
+
return this.sv.selectionStoreService.focus(data.start, false, isAfterLast(data.start, eData) ? 1 : isBeforeFirst(data.start) ? -1 : 0);
|
|
27189
27217
|
}
|
|
27190
27218
|
keyUp(e) {
|
|
27191
27219
|
if (isCtrlKey(e.keyCode, navigator.platform)) {
|
|
@@ -27504,6 +27532,7 @@ const OverlaySelection = class {
|
|
|
27504
27532
|
this.internalPaste = index.createEvent(this, "internalPaste", 7);
|
|
27505
27533
|
this.internalCellEdit = index.createEvent(this, "internalCellEdit", 7);
|
|
27506
27534
|
this.internalFocusCell = index.createEvent(this, "internalFocusCell", 7);
|
|
27535
|
+
this.internalNextStoreFocus = index.createEvent(this, "internalNextStoreFocus", 7);
|
|
27507
27536
|
this.setEdit = index.createEvent(this, "setEdit", 3);
|
|
27508
27537
|
this.cancelEdit = index.createEvent(this, "cancelEdit", 7);
|
|
27509
27538
|
this.setRange = index.createEvent(this, "setRange", 7);
|
|
@@ -27514,6 +27543,8 @@ const OverlaySelection = class {
|
|
|
27514
27543
|
this.keyboardService = null;
|
|
27515
27544
|
this.autoFillService = null;
|
|
27516
27545
|
this.clipboardService = null;
|
|
27546
|
+
/** Create selection store */
|
|
27547
|
+
this.unsubscribeSelectionStore = [];
|
|
27517
27548
|
}
|
|
27518
27549
|
// --------------------------------------------------------------------------
|
|
27519
27550
|
//
|
|
@@ -27551,18 +27582,31 @@ const OverlaySelection = class {
|
|
|
27551
27582
|
}
|
|
27552
27583
|
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
|
|
27553
27584
|
}
|
|
27554
|
-
|
|
27585
|
+
focusCurrent(cell, end) {
|
|
27586
|
+
var _a;
|
|
27587
|
+
const currentFocusEvent = this.internalFocusCell.emit(this.columnService.getSaveData(cell.y, cell.x));
|
|
27588
|
+
if (currentFocusEvent.defaultPrevented) {
|
|
27589
|
+
return false;
|
|
27590
|
+
}
|
|
27591
|
+
const focused = { focus: cell, end };
|
|
27592
|
+
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
27593
|
+
}
|
|
27555
27594
|
selectionServiceSet(s) {
|
|
27595
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
27596
|
+
this.unsubscribeSelectionStore = [];
|
|
27597
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => {
|
|
27598
|
+
this.focusCurrent(v, v);
|
|
27599
|
+
}));
|
|
27556
27600
|
this.selectionStoreService = new SelectionStoreService(s, {
|
|
27557
27601
|
changeRange: range => { var _a; return !((_a = this.setRange.emit(range)) === null || _a === void 0 ? void 0 : _a.defaultPrevented); },
|
|
27558
|
-
focus: (focus, end) => {
|
|
27559
|
-
|
|
27560
|
-
|
|
27561
|
-
|
|
27562
|
-
|
|
27602
|
+
focus: (focus, end, focusNextStore) => {
|
|
27603
|
+
if (!focusNextStore) {
|
|
27604
|
+
return this.focusCurrent(focus, end);
|
|
27605
|
+
}
|
|
27606
|
+
else {
|
|
27607
|
+
this.internalNextStoreFocus.emit(focus);
|
|
27563
27608
|
return false;
|
|
27564
27609
|
}
|
|
27565
|
-
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
27566
27610
|
},
|
|
27567
27611
|
});
|
|
27568
27612
|
this.keyboardService = new KeyboardService({
|
|
@@ -27614,6 +27658,8 @@ const OverlaySelection = class {
|
|
|
27614
27658
|
disconnectedCallback() {
|
|
27615
27659
|
var _a;
|
|
27616
27660
|
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
27661
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
27662
|
+
this.unsubscribeSelectionStore = [];
|
|
27617
27663
|
}
|
|
27618
27664
|
renderRange(range) {
|
|
27619
27665
|
const style = getElStyle(range, this.dimensionRow.state, this.dimensionCol.state);
|
|
@@ -50,7 +50,9 @@ export class RevogrData {
|
|
|
50
50
|
for (let rgCol of cols) {
|
|
51
51
|
cells.push(this.getCellRenderer(rgRow, rgCol, this.canDrag, /** grouping apply*/ this.columnService.hasGrouping ? depth : 0));
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
const row = h(RowRenderer, { rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells);
|
|
54
|
+
this.beforerowrender.emit({ row, model: dataRow, rowIndex: rgRow.itemIndex });
|
|
55
|
+
rowsEls.push(row);
|
|
54
56
|
}
|
|
55
57
|
return rowsEls;
|
|
56
58
|
}
|
|
@@ -314,6 +316,26 @@ export class RevogrData {
|
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
318
|
}
|
|
319
|
+
}, {
|
|
320
|
+
"method": "beforerowrender",
|
|
321
|
+
"name": "beforerowrender",
|
|
322
|
+
"bubbles": true,
|
|
323
|
+
"cancelable": true,
|
|
324
|
+
"composed": true,
|
|
325
|
+
"docs": {
|
|
326
|
+
"tags": [],
|
|
327
|
+
"text": ""
|
|
328
|
+
},
|
|
329
|
+
"complexType": {
|
|
330
|
+
"original": "{ row: VNode; rowIndex: number; model: any }",
|
|
331
|
+
"resolved": "{ row: VNode; rowIndex: number; model: any; }",
|
|
332
|
+
"references": {
|
|
333
|
+
"VNode": {
|
|
334
|
+
"location": "import",
|
|
335
|
+
"path": "@stencil/core"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
317
339
|
}]; }
|
|
318
340
|
static get elementRef() { return "element"; }
|
|
319
341
|
static get watchers() { return [{
|
|
@@ -91,7 +91,7 @@ export class KeyboardService {
|
|
|
91
91
|
const range = getRange(data.start, data.end);
|
|
92
92
|
return this.sv.selectionStoreService.changeRange(range);
|
|
93
93
|
}
|
|
94
|
-
return this.sv.selectionStoreService.focus(data.start);
|
|
94
|
+
return this.sv.selectionStoreService.focus(data.start, false, isAfterLast(data.start, eData) ? 1 : isBeforeFirst(data.start) ? -1 : 0);
|
|
95
95
|
}
|
|
96
96
|
keyUp(e) {
|
|
97
97
|
if (isCtrlKey(e.keyCode, navigator.platform)) {
|
|
@@ -17,6 +17,8 @@ export class OverlaySelection {
|
|
|
17
17
|
this.keyboardService = null;
|
|
18
18
|
this.autoFillService = null;
|
|
19
19
|
this.clipboardService = null;
|
|
20
|
+
/** Create selection store */
|
|
21
|
+
this.unsubscribeSelectionStore = [];
|
|
20
22
|
}
|
|
21
23
|
// --------------------------------------------------------------------------
|
|
22
24
|
//
|
|
@@ -54,18 +56,31 @@ export class OverlaySelection {
|
|
|
54
56
|
}
|
|
55
57
|
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
|
|
56
58
|
}
|
|
57
|
-
|
|
59
|
+
focusCurrent(cell, end) {
|
|
60
|
+
var _a;
|
|
61
|
+
const currentFocusEvent = this.internalFocusCell.emit(this.columnService.getSaveData(cell.y, cell.x));
|
|
62
|
+
if (currentFocusEvent.defaultPrevented) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
const focused = { focus: cell, end };
|
|
66
|
+
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
67
|
+
}
|
|
58
68
|
selectionServiceSet(s) {
|
|
69
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
70
|
+
this.unsubscribeSelectionStore = [];
|
|
71
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => {
|
|
72
|
+
this.focusCurrent(v, v);
|
|
73
|
+
}));
|
|
59
74
|
this.selectionStoreService = new SelectionStoreService(s, {
|
|
60
75
|
changeRange: range => { var _a; return !((_a = this.setRange.emit(range)) === null || _a === void 0 ? void 0 : _a.defaultPrevented); },
|
|
61
|
-
focus: (focus, end) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
focus: (focus, end, focusNextStore) => {
|
|
77
|
+
if (!focusNextStore) {
|
|
78
|
+
return this.focusCurrent(focus, end);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
this.internalNextStoreFocus.emit(focus);
|
|
66
82
|
return false;
|
|
67
83
|
}
|
|
68
|
-
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
69
84
|
},
|
|
70
85
|
});
|
|
71
86
|
this.keyboardService = new KeyboardService({
|
|
@@ -117,6 +132,8 @@ export class OverlaySelection {
|
|
|
117
132
|
disconnectedCallback() {
|
|
118
133
|
var _a;
|
|
119
134
|
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
135
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
136
|
+
this.unsubscribeSelectionStore = [];
|
|
120
137
|
}
|
|
121
138
|
renderRange(range) {
|
|
122
139
|
const style = getElStyle(range, this.dimensionRow.state, this.dimensionCol.state);
|
|
@@ -555,6 +572,26 @@ export class OverlaySelection {
|
|
|
555
572
|
}
|
|
556
573
|
}
|
|
557
574
|
}
|
|
575
|
+
}, {
|
|
576
|
+
"method": "internalNextStoreFocus",
|
|
577
|
+
"name": "internalNextStoreFocus",
|
|
578
|
+
"bubbles": true,
|
|
579
|
+
"cancelable": true,
|
|
580
|
+
"composed": true,
|
|
581
|
+
"docs": {
|
|
582
|
+
"tags": [],
|
|
583
|
+
"text": ""
|
|
584
|
+
},
|
|
585
|
+
"complexType": {
|
|
586
|
+
"original": "Selection.Cell",
|
|
587
|
+
"resolved": "Cell",
|
|
588
|
+
"references": {
|
|
589
|
+
"Selection": {
|
|
590
|
+
"location": "import",
|
|
591
|
+
"path": "../../interfaces"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
558
595
|
}, {
|
|
559
596
|
"method": "setEdit",
|
|
560
597
|
"name": "setEdit",
|
|
@@ -386,6 +386,9 @@ export class RevoGridComponent {
|
|
|
386
386
|
e.preventDefault();
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
+
onCellStoreFocus(e) {
|
|
390
|
+
this.selectionStoreConnector.beforeNextFocusCell(e.detail);
|
|
391
|
+
}
|
|
389
392
|
columnChanged(newVal = []) {
|
|
390
393
|
this.dimensionProvider.dropColumns();
|
|
391
394
|
const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
|
|
@@ -2244,5 +2247,11 @@ export class RevoGridComponent {
|
|
|
2244
2247
|
"target": undefined,
|
|
2245
2248
|
"capture": false,
|
|
2246
2249
|
"passive": false
|
|
2250
|
+
}, {
|
|
2251
|
+
"name": "internalNextStoreFocus",
|
|
2252
|
+
"method": "onCellStoreFocus",
|
|
2253
|
+
"target": undefined,
|
|
2254
|
+
"capture": false,
|
|
2255
|
+
"passive": false
|
|
2247
2256
|
}]; }
|
|
2248
2257
|
}
|