@revolist/revogrid 3.7.2 → 3.7.4
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 +34 -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 +85 -33
- package/dist/collection/components/data/revogr-data.js +23 -1
- package/dist/collection/components/overlay/keyboard.service.js +7 -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 +85 -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)) {
|
|
@@ -162,6 +162,12 @@ class KeyboardService {
|
|
|
162
162
|
e.preventDefault();
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
|
+
if (e.shiftKey) {
|
|
166
|
+
switch (e.code) {
|
|
167
|
+
case codesLetter.TAB:
|
|
168
|
+
return { changes: { x: -1 }, isMulti: false };
|
|
169
|
+
}
|
|
170
|
+
}
|
|
165
171
|
switch (e.code) {
|
|
166
172
|
case codesLetter.ARROW_UP:
|
|
167
173
|
return { changes: { y: -1 }, isMulti };
|
|
@@ -457,6 +463,7 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
457
463
|
this.internalPaste = createEvent(this, "internalPaste", 7);
|
|
458
464
|
this.internalCellEdit = createEvent(this, "internalCellEdit", 7);
|
|
459
465
|
this.internalFocusCell = createEvent(this, "internalFocusCell", 7);
|
|
466
|
+
this.internalNextStoreFocus = createEvent(this, "internalNextStoreFocus", 7);
|
|
460
467
|
this.setEdit = createEvent(this, "setEdit", 3);
|
|
461
468
|
this.cancelEdit = createEvent(this, "cancelEdit", 7);
|
|
462
469
|
this.setRange = createEvent(this, "setRange", 7);
|
|
@@ -467,6 +474,8 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
467
474
|
this.keyboardService = null;
|
|
468
475
|
this.autoFillService = null;
|
|
469
476
|
this.clipboardService = null;
|
|
477
|
+
/** Create selection store */
|
|
478
|
+
this.unsubscribeSelectionStore = [];
|
|
470
479
|
}
|
|
471
480
|
// --------------------------------------------------------------------------
|
|
472
481
|
//
|
|
@@ -504,18 +513,31 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
504
513
|
}
|
|
505
514
|
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
|
|
506
515
|
}
|
|
507
|
-
|
|
516
|
+
focusCurrent(cell, end) {
|
|
517
|
+
var _a;
|
|
518
|
+
const currentFocusEvent = this.internalFocusCell.emit(this.columnService.getSaveData(cell.y, cell.x));
|
|
519
|
+
if (currentFocusEvent.defaultPrevented) {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
const focused = { focus: cell, end };
|
|
523
|
+
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
524
|
+
}
|
|
508
525
|
selectionServiceSet(s) {
|
|
526
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
527
|
+
this.unsubscribeSelectionStore = [];
|
|
528
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => {
|
|
529
|
+
this.focusCurrent(v, v);
|
|
530
|
+
}));
|
|
509
531
|
this.selectionStoreService = new SelectionStoreService(s, {
|
|
510
532
|
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
|
-
|
|
533
|
+
focus: (focus, end, focusNextStore) => {
|
|
534
|
+
if (!focusNextStore) {
|
|
535
|
+
return this.focusCurrent(focus, end);
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
this.internalNextStoreFocus.emit(focus);
|
|
516
539
|
return false;
|
|
517
540
|
}
|
|
518
|
-
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
519
541
|
},
|
|
520
542
|
});
|
|
521
543
|
this.keyboardService = new KeyboardService({
|
|
@@ -567,6 +589,8 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
567
589
|
disconnectedCallback() {
|
|
568
590
|
var _a;
|
|
569
591
|
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
592
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
593
|
+
this.unsubscribeSelectionStore = [];
|
|
570
594
|
}
|
|
571
595
|
renderRange(range) {
|
|
572
596
|
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)) {
|
|
@@ -27210,6 +27238,12 @@ class KeyboardService {
|
|
|
27210
27238
|
e.preventDefault();
|
|
27211
27239
|
break;
|
|
27212
27240
|
}
|
|
27241
|
+
if (e.shiftKey) {
|
|
27242
|
+
switch (e.code) {
|
|
27243
|
+
case codesLetter.TAB:
|
|
27244
|
+
return { changes: { x: -1 }, isMulti: false };
|
|
27245
|
+
}
|
|
27246
|
+
}
|
|
27213
27247
|
switch (e.code) {
|
|
27214
27248
|
case codesLetter.ARROW_UP:
|
|
27215
27249
|
return { changes: { y: -1 }, isMulti };
|
|
@@ -27504,6 +27538,7 @@ const OverlaySelection = class {
|
|
|
27504
27538
|
this.internalPaste = index.createEvent(this, "internalPaste", 7);
|
|
27505
27539
|
this.internalCellEdit = index.createEvent(this, "internalCellEdit", 7);
|
|
27506
27540
|
this.internalFocusCell = index.createEvent(this, "internalFocusCell", 7);
|
|
27541
|
+
this.internalNextStoreFocus = index.createEvent(this, "internalNextStoreFocus", 7);
|
|
27507
27542
|
this.setEdit = index.createEvent(this, "setEdit", 3);
|
|
27508
27543
|
this.cancelEdit = index.createEvent(this, "cancelEdit", 7);
|
|
27509
27544
|
this.setRange = index.createEvent(this, "setRange", 7);
|
|
@@ -27514,6 +27549,8 @@ const OverlaySelection = class {
|
|
|
27514
27549
|
this.keyboardService = null;
|
|
27515
27550
|
this.autoFillService = null;
|
|
27516
27551
|
this.clipboardService = null;
|
|
27552
|
+
/** Create selection store */
|
|
27553
|
+
this.unsubscribeSelectionStore = [];
|
|
27517
27554
|
}
|
|
27518
27555
|
// --------------------------------------------------------------------------
|
|
27519
27556
|
//
|
|
@@ -27551,18 +27588,31 @@ const OverlaySelection = class {
|
|
|
27551
27588
|
}
|
|
27552
27589
|
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
|
|
27553
27590
|
}
|
|
27554
|
-
|
|
27591
|
+
focusCurrent(cell, end) {
|
|
27592
|
+
var _a;
|
|
27593
|
+
const currentFocusEvent = this.internalFocusCell.emit(this.columnService.getSaveData(cell.y, cell.x));
|
|
27594
|
+
if (currentFocusEvent.defaultPrevented) {
|
|
27595
|
+
return false;
|
|
27596
|
+
}
|
|
27597
|
+
const focused = { focus: cell, end };
|
|
27598
|
+
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
27599
|
+
}
|
|
27555
27600
|
selectionServiceSet(s) {
|
|
27601
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
27602
|
+
this.unsubscribeSelectionStore = [];
|
|
27603
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => {
|
|
27604
|
+
this.focusCurrent(v, v);
|
|
27605
|
+
}));
|
|
27556
27606
|
this.selectionStoreService = new SelectionStoreService(s, {
|
|
27557
27607
|
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
|
-
|
|
27608
|
+
focus: (focus, end, focusNextStore) => {
|
|
27609
|
+
if (!focusNextStore) {
|
|
27610
|
+
return this.focusCurrent(focus, end);
|
|
27611
|
+
}
|
|
27612
|
+
else {
|
|
27613
|
+
this.internalNextStoreFocus.emit(focus);
|
|
27563
27614
|
return false;
|
|
27564
27615
|
}
|
|
27565
|
-
return !((_a = this.focusCell.emit(focused)) === null || _a === void 0 ? void 0 : _a.defaultPrevented);
|
|
27566
27616
|
},
|
|
27567
27617
|
});
|
|
27568
27618
|
this.keyboardService = new KeyboardService({
|
|
@@ -27614,6 +27664,8 @@ const OverlaySelection = class {
|
|
|
27614
27664
|
disconnectedCallback() {
|
|
27615
27665
|
var _a;
|
|
27616
27666
|
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
27667
|
+
this.unsubscribeSelectionStore.forEach(v => v());
|
|
27668
|
+
this.unsubscribeSelectionStore = [];
|
|
27617
27669
|
}
|
|
27618
27670
|
renderRange(range) {
|
|
27619
27671
|
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)) {
|
|
@@ -116,6 +116,12 @@ export class KeyboardService {
|
|
|
116
116
|
e.preventDefault();
|
|
117
117
|
break;
|
|
118
118
|
}
|
|
119
|
+
if (e.shiftKey) {
|
|
120
|
+
switch (e.code) {
|
|
121
|
+
case codesLetter.TAB:
|
|
122
|
+
return { changes: { x: -1 }, isMulti: false };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
119
125
|
switch (e.code) {
|
|
120
126
|
case codesLetter.ARROW_UP:
|
|
121
127
|
return { changes: { y: -1 }, isMulti };
|