@revolist/revogrid 4.23.22 → 4.23.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/revo-grid.cjs.entry.js +7 -4
- package/dist/cjs/revogr-attribution_7.cjs.entry.js +16 -17
- package/dist/collection/components/overlay/keyboard.service.js +4 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +12 -16
- package/dist/collection/components/revoGrid/revo-grid.js +7 -4
- package/dist/esm/revo-grid.entry.js +7 -4
- package/dist/esm/revogr-attribution_7.entry.js +16 -17
- package/dist/revo-grid/revo-grid.entry.js +7 -4
- package/dist/revo-grid/revogr-attribution_7.entry.js +16 -17
- package/dist/types/components/overlay/keyboard.service.d.ts +2 -2
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +3 -3
- package/hydrate/index.js +23 -21
- package/hydrate/index.mjs +23 -21
- package/package.json +1 -1
- package/standalone/revo-grid.js +1 -1
- package/standalone/revogr-overlay-selection2.js +1 -1
|
@@ -2465,11 +2465,14 @@ const RevoGridComponent = class {
|
|
|
2465
2465
|
// Render viewport data (vertical sections)
|
|
2466
2466
|
view.dataPorts.forEach(data => {
|
|
2467
2467
|
const key = `${data.type}_${view.type}`;
|
|
2468
|
-
const dataView = (index.h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit:
|
|
2468
|
+
const dataView = (index.h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit: e => {
|
|
2469
2469
|
var _a;
|
|
2470
|
-
const event = this.beforeeditstart.emit(detail);
|
|
2471
|
-
if (
|
|
2472
|
-
|
|
2470
|
+
const event = this.beforeeditstart.emit(e.detail);
|
|
2471
|
+
if (event.defaultPrevented) {
|
|
2472
|
+
e.preventDefault();
|
|
2473
|
+
}
|
|
2474
|
+
else {
|
|
2475
|
+
(_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(e.detail.val);
|
|
2473
2476
|
}
|
|
2474
2477
|
} }), index.h("revogr-data", Object.assign({}, data, { colType: view.type, key: key, readonly: this.readonly, range: this.range, rowClass: this.rowClass, rowSelectionStore: data.rowSelectionStore, additionalData: this.additionalData, jobsBeforeRender: this.jobsBeforeRender, slot: viewport_helpers.DATA_SLOT }), index.h("slot", { name: `data-${view.type}-${data.type}` })), index.h("revogr-temp-range", { selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }), index.h("revogr-focus", { colData: data.colData, dataStore: data.dataStore, focusTemplate: this.focusTemplate, rowType: data.type, colType: view.type, selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }, index.h("slot", { name: `focus-${view.type}-${data.type}` }))));
|
|
2475
2478
|
dataViews.push(dataView);
|
|
@@ -298,6 +298,7 @@ class KeyboardService {
|
|
|
298
298
|
if (typeof (editCell === null || editCell === void 0 ? void 0 : editCell.val) !== 'string') {
|
|
299
299
|
return false;
|
|
300
300
|
}
|
|
301
|
+
e.preventDefault();
|
|
301
302
|
this.sv.selectionStore.set('edit', Object.assign(Object.assign({}, editCell), { val: `${editCell.val}${e.key}` }));
|
|
302
303
|
return true;
|
|
303
304
|
}
|
|
@@ -359,7 +360,9 @@ class KeyboardService {
|
|
|
359
360
|
}
|
|
360
361
|
// pressed letter key
|
|
361
362
|
if (!edit_utils.isShortcutModifier(e) && e.key.length === 1) {
|
|
362
|
-
this.sv.change(e.key)
|
|
363
|
+
if (this.sv.change(e.key)) {
|
|
364
|
+
e.preventDefault();
|
|
365
|
+
}
|
|
363
366
|
return;
|
|
364
367
|
}
|
|
365
368
|
// pressed arrow, change selection position
|
|
@@ -788,12 +791,7 @@ const OverlaySelection = class {
|
|
|
788
791
|
return this.doFocus(f, f, changes);
|
|
789
792
|
}
|
|
790
793
|
},
|
|
791
|
-
change: val =>
|
|
792
|
-
if (this.readonly) {
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
this.doEdit(val);
|
|
796
|
-
},
|
|
794
|
+
change: val => this.doEdit(val),
|
|
797
795
|
cancel: async () => {
|
|
798
796
|
var _a;
|
|
799
797
|
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
@@ -922,9 +920,9 @@ const OverlaySelection = class {
|
|
|
922
920
|
nodes.push(index.h("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
923
921
|
}
|
|
924
922
|
}
|
|
925
|
-
return (index.h(index.Host, { key: '
|
|
923
|
+
return (index.h(index.Host, { key: '2d8dc4fd40a883fe59b24b2cfac1c370b9f0ac16', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
926
924
|
// it's done to be able to throw events from different levels, not just from editor
|
|
927
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, index.h("slot", { key: '
|
|
925
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, index.h("slot", { key: '8ad5df55904ca6a8b2fb0e69c5f608ec7264a0f1', name: "data" })));
|
|
928
926
|
}
|
|
929
927
|
/**
|
|
930
928
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -1026,15 +1024,16 @@ const OverlaySelection = class {
|
|
|
1026
1024
|
* Start cell editing
|
|
1027
1025
|
*/
|
|
1028
1026
|
doEdit(val = '') {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
1036
|
-
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
1027
|
+
if (!this.canEdit()) {
|
|
1028
|
+
return false;
|
|
1029
|
+
}
|
|
1030
|
+
const focus = this.selectionStore.get('focus');
|
|
1031
|
+
if (!focus) {
|
|
1032
|
+
return false;
|
|
1037
1033
|
}
|
|
1034
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
1035
|
+
const event = this.setEdit.emit(Object.assign(Object.assign({}, data), { val }));
|
|
1036
|
+
return !event.defaultPrevented;
|
|
1038
1037
|
}
|
|
1039
1038
|
/**
|
|
1040
1039
|
* Close editor event triggered
|
|
@@ -30,6 +30,7 @@ export class KeyboardService {
|
|
|
30
30
|
if (typeof (editCell === null || editCell === void 0 ? void 0 : editCell.val) !== 'string') {
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
|
+
e.preventDefault();
|
|
33
34
|
this.sv.selectionStore.set('edit', Object.assign(Object.assign({}, editCell), { val: `${editCell.val}${e.key}` }));
|
|
34
35
|
return true;
|
|
35
36
|
}
|
|
@@ -91,7 +92,9 @@ export class KeyboardService {
|
|
|
91
92
|
}
|
|
92
93
|
// pressed letter key
|
|
93
94
|
if (!isShortcutModifier(e) && e.key.length === 1) {
|
|
94
|
-
this.sv.change(e.key)
|
|
95
|
+
if (this.sv.change(e.key)) {
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
}
|
|
95
98
|
return;
|
|
96
99
|
}
|
|
97
100
|
// pressed arrow, change selection position
|
|
@@ -100,12 +100,7 @@ export class OverlaySelection {
|
|
|
100
100
|
return this.doFocus(f, f, changes);
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
-
change: val =>
|
|
104
|
-
if (this.readonly) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
this.doEdit(val);
|
|
108
|
-
},
|
|
103
|
+
change: val => this.doEdit(val),
|
|
109
104
|
cancel: async () => {
|
|
110
105
|
var _a;
|
|
111
106
|
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
@@ -234,9 +229,9 @@ export class OverlaySelection {
|
|
|
234
229
|
nodes.push(h("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
235
230
|
}
|
|
236
231
|
}
|
|
237
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: '2d8dc4fd40a883fe59b24b2cfac1c370b9f0ac16', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
238
233
|
// it's done to be able to throw events from different levels, not just from editor
|
|
239
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '
|
|
234
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '8ad5df55904ca6a8b2fb0e69c5f608ec7264a0f1', name: "data" })));
|
|
240
235
|
}
|
|
241
236
|
/**
|
|
242
237
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -338,15 +333,16 @@ export class OverlaySelection {
|
|
|
338
333
|
* Start cell editing
|
|
339
334
|
*/
|
|
340
335
|
doEdit(val = '') {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
348
|
-
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
336
|
+
if (!this.canEdit()) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
const focus = this.selectionStore.get('focus');
|
|
340
|
+
if (!focus) {
|
|
341
|
+
return false;
|
|
349
342
|
}
|
|
343
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
344
|
+
const event = this.setEdit.emit(Object.assign(Object.assign({}, data), { val }));
|
|
345
|
+
return !event.defaultPrevented;
|
|
350
346
|
}
|
|
351
347
|
/**
|
|
352
348
|
* Close editor event triggered
|
|
@@ -1070,11 +1070,14 @@ export class RevoGridComponent {
|
|
|
1070
1070
|
// Render viewport data (vertical sections)
|
|
1071
1071
|
view.dataPorts.forEach(data => {
|
|
1072
1072
|
const key = `${data.type}_${view.type}`;
|
|
1073
|
-
const dataView = (h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit:
|
|
1073
|
+
const dataView = (h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit: e => {
|
|
1074
1074
|
var _a;
|
|
1075
|
-
const event = this.beforeeditstart.emit(detail);
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1075
|
+
const event = this.beforeeditstart.emit(e.detail);
|
|
1076
|
+
if (event.defaultPrevented) {
|
|
1077
|
+
e.preventDefault();
|
|
1078
|
+
}
|
|
1079
|
+
else {
|
|
1080
|
+
(_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(e.detail.val);
|
|
1078
1081
|
}
|
|
1079
1082
|
} }), h("revogr-data", Object.assign({}, data, { colType: view.type, key: key, readonly: this.readonly, range: this.range, rowClass: this.rowClass, rowSelectionStore: data.rowSelectionStore, additionalData: this.additionalData, jobsBeforeRender: this.jobsBeforeRender, slot: DATA_SLOT }), h("slot", { name: `data-${view.type}-${data.type}` })), h("revogr-temp-range", { selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }), h("revogr-focus", { colData: data.colData, dataStore: data.dataStore, focusTemplate: this.focusTemplate, rowType: data.type, colType: view.type, selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }, h("slot", { name: `focus-${view.type}-${data.type}` }))));
|
|
1080
1083
|
dataViews.push(dataView);
|
|
@@ -2463,11 +2463,14 @@ const RevoGridComponent = class {
|
|
|
2463
2463
|
// Render viewport data (vertical sections)
|
|
2464
2464
|
view.dataPorts.forEach(data => {
|
|
2465
2465
|
const key = `${data.type}_${view.type}`;
|
|
2466
|
-
const dataView = (h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit:
|
|
2466
|
+
const dataView = (h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit: e => {
|
|
2467
2467
|
var _a;
|
|
2468
|
-
const event = this.beforeeditstart.emit(detail);
|
|
2469
|
-
if (
|
|
2470
|
-
|
|
2468
|
+
const event = this.beforeeditstart.emit(e.detail);
|
|
2469
|
+
if (event.defaultPrevented) {
|
|
2470
|
+
e.preventDefault();
|
|
2471
|
+
}
|
|
2472
|
+
else {
|
|
2473
|
+
(_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(e.detail.val);
|
|
2471
2474
|
}
|
|
2472
2475
|
} }), h("revogr-data", Object.assign({}, data, { colType: view.type, key: key, readonly: this.readonly, range: this.range, rowClass: this.rowClass, rowSelectionStore: data.rowSelectionStore, additionalData: this.additionalData, jobsBeforeRender: this.jobsBeforeRender, slot: DATA_SLOT }), h("slot", { name: `data-${view.type}-${data.type}` })), h("revogr-temp-range", { selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }), h("revogr-focus", { colData: data.colData, dataStore: data.dataStore, focusTemplate: this.focusTemplate, rowType: data.type, colType: view.type, selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }, h("slot", { name: `focus-${view.type}-${data.type}` }))));
|
|
2473
2476
|
dataViews.push(dataView);
|
|
@@ -296,6 +296,7 @@ class KeyboardService {
|
|
|
296
296
|
if (typeof (editCell === null || editCell === void 0 ? void 0 : editCell.val) !== 'string') {
|
|
297
297
|
return false;
|
|
298
298
|
}
|
|
299
|
+
e.preventDefault();
|
|
299
300
|
this.sv.selectionStore.set('edit', Object.assign(Object.assign({}, editCell), { val: `${editCell.val}${e.key}` }));
|
|
300
301
|
return true;
|
|
301
302
|
}
|
|
@@ -357,7 +358,9 @@ class KeyboardService {
|
|
|
357
358
|
}
|
|
358
359
|
// pressed letter key
|
|
359
360
|
if (!isShortcutModifier(e) && e.key.length === 1) {
|
|
360
|
-
this.sv.change(e.key)
|
|
361
|
+
if (this.sv.change(e.key)) {
|
|
362
|
+
e.preventDefault();
|
|
363
|
+
}
|
|
361
364
|
return;
|
|
362
365
|
}
|
|
363
366
|
// pressed arrow, change selection position
|
|
@@ -786,12 +789,7 @@ const OverlaySelection = class {
|
|
|
786
789
|
return this.doFocus(f, f, changes);
|
|
787
790
|
}
|
|
788
791
|
},
|
|
789
|
-
change: val =>
|
|
790
|
-
if (this.readonly) {
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
|
-
this.doEdit(val);
|
|
794
|
-
},
|
|
792
|
+
change: val => this.doEdit(val),
|
|
795
793
|
cancel: async () => {
|
|
796
794
|
var _a;
|
|
797
795
|
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
@@ -920,9 +918,9 @@ const OverlaySelection = class {
|
|
|
920
918
|
nodes.push(h("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
921
919
|
}
|
|
922
920
|
}
|
|
923
|
-
return (h(Host, { key: '
|
|
921
|
+
return (h(Host, { key: '2d8dc4fd40a883fe59b24b2cfac1c370b9f0ac16', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
924
922
|
// it's done to be able to throw events from different levels, not just from editor
|
|
925
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '
|
|
923
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '8ad5df55904ca6a8b2fb0e69c5f608ec7264a0f1', name: "data" })));
|
|
926
924
|
}
|
|
927
925
|
/**
|
|
928
926
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -1024,15 +1022,16 @@ const OverlaySelection = class {
|
|
|
1024
1022
|
* Start cell editing
|
|
1025
1023
|
*/
|
|
1026
1024
|
doEdit(val = '') {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
1034
|
-
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
1025
|
+
if (!this.canEdit()) {
|
|
1026
|
+
return false;
|
|
1027
|
+
}
|
|
1028
|
+
const focus = this.selectionStore.get('focus');
|
|
1029
|
+
if (!focus) {
|
|
1030
|
+
return false;
|
|
1035
1031
|
}
|
|
1032
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
1033
|
+
const event = this.setEdit.emit(Object.assign(Object.assign({}, data), { val }));
|
|
1034
|
+
return !event.defaultPrevented;
|
|
1036
1035
|
}
|
|
1037
1036
|
/**
|
|
1038
1037
|
* Close editor event triggered
|
|
@@ -2463,11 +2463,14 @@ const RevoGridComponent = class {
|
|
|
2463
2463
|
// Render viewport data (vertical sections)
|
|
2464
2464
|
view.dataPorts.forEach(data => {
|
|
2465
2465
|
const key = `${data.type}_${view.type}`;
|
|
2466
|
-
const dataView = (h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit:
|
|
2466
|
+
const dataView = (h("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit: e => {
|
|
2467
2467
|
var _a;
|
|
2468
|
-
const event = this.beforeeditstart.emit(detail);
|
|
2469
|
-
if (
|
|
2470
|
-
|
|
2468
|
+
const event = this.beforeeditstart.emit(e.detail);
|
|
2469
|
+
if (event.defaultPrevented) {
|
|
2470
|
+
e.preventDefault();
|
|
2471
|
+
}
|
|
2472
|
+
else {
|
|
2473
|
+
(_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(e.detail.val);
|
|
2471
2474
|
}
|
|
2472
2475
|
} }), h("revogr-data", Object.assign({}, data, { colType: view.type, key: key, readonly: this.readonly, range: this.range, rowClass: this.rowClass, rowSelectionStore: data.rowSelectionStore, additionalData: this.additionalData, jobsBeforeRender: this.jobsBeforeRender, slot: DATA_SLOT }), h("slot", { name: `data-${view.type}-${data.type}` })), h("revogr-temp-range", { selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }), h("revogr-focus", { colData: data.colData, dataStore: data.dataStore, focusTemplate: this.focusTemplate, rowType: data.type, colType: view.type, selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }, h("slot", { name: `focus-${view.type}-${data.type}` }))));
|
|
2473
2476
|
dataViews.push(dataView);
|
|
@@ -296,6 +296,7 @@ class KeyboardService {
|
|
|
296
296
|
if (typeof (editCell === null || editCell === void 0 ? void 0 : editCell.val) !== 'string') {
|
|
297
297
|
return false;
|
|
298
298
|
}
|
|
299
|
+
e.preventDefault();
|
|
299
300
|
this.sv.selectionStore.set('edit', Object.assign(Object.assign({}, editCell), { val: `${editCell.val}${e.key}` }));
|
|
300
301
|
return true;
|
|
301
302
|
}
|
|
@@ -357,7 +358,9 @@ class KeyboardService {
|
|
|
357
358
|
}
|
|
358
359
|
// pressed letter key
|
|
359
360
|
if (!isShortcutModifier(e) && e.key.length === 1) {
|
|
360
|
-
this.sv.change(e.key)
|
|
361
|
+
if (this.sv.change(e.key)) {
|
|
362
|
+
e.preventDefault();
|
|
363
|
+
}
|
|
361
364
|
return;
|
|
362
365
|
}
|
|
363
366
|
// pressed arrow, change selection position
|
|
@@ -786,12 +789,7 @@ const OverlaySelection = class {
|
|
|
786
789
|
return this.doFocus(f, f, changes);
|
|
787
790
|
}
|
|
788
791
|
},
|
|
789
|
-
change: val =>
|
|
790
|
-
if (this.readonly) {
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
|
-
this.doEdit(val);
|
|
794
|
-
},
|
|
792
|
+
change: val => this.doEdit(val),
|
|
795
793
|
cancel: async () => {
|
|
796
794
|
var _a;
|
|
797
795
|
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
@@ -920,9 +918,9 @@ const OverlaySelection = class {
|
|
|
920
918
|
nodes.push(h("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
921
919
|
}
|
|
922
920
|
}
|
|
923
|
-
return (h(Host, { key: '
|
|
921
|
+
return (h(Host, { key: '2d8dc4fd40a883fe59b24b2cfac1c370b9f0ac16', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
924
922
|
// it's done to be able to throw events from different levels, not just from editor
|
|
925
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '
|
|
923
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '8ad5df55904ca6a8b2fb0e69c5f608ec7264a0f1', name: "data" })));
|
|
926
924
|
}
|
|
927
925
|
/**
|
|
928
926
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -1024,15 +1022,16 @@ const OverlaySelection = class {
|
|
|
1024
1022
|
* Start cell editing
|
|
1025
1023
|
*/
|
|
1026
1024
|
doEdit(val = '') {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
1034
|
-
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
1025
|
+
if (!this.canEdit()) {
|
|
1026
|
+
return false;
|
|
1027
|
+
}
|
|
1028
|
+
const focus = this.selectionStore.get('focus');
|
|
1029
|
+
if (!focus) {
|
|
1030
|
+
return false;
|
|
1035
1031
|
}
|
|
1032
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
1033
|
+
const event = this.setEdit.emit(Object.assign(Object.assign({}, data), { val }));
|
|
1034
|
+
return !event.defaultPrevented;
|
|
1036
1035
|
}
|
|
1037
1036
|
/**
|
|
1038
1037
|
* Close editor event triggered
|
|
@@ -3,7 +3,7 @@ import { EventData } from './selection.utils';
|
|
|
3
3
|
import { Cell, Nullable, RangeArea, SelectionStoreState } from "../../types/index";
|
|
4
4
|
type Config = {
|
|
5
5
|
selectionStore: Observable<SelectionStoreState>;
|
|
6
|
-
change(val?: any):
|
|
6
|
+
change(val?: any): boolean;
|
|
7
7
|
cancel(): void;
|
|
8
8
|
clearCell(): void;
|
|
9
9
|
focus(focus: Cell, changes: Partial<Cell>, focusNextViewport?: number): boolean;
|
|
@@ -13,7 +13,7 @@ type Config = {
|
|
|
13
13
|
selectAll(): void;
|
|
14
14
|
};
|
|
15
15
|
export declare class KeyboardService {
|
|
16
|
-
private sv;
|
|
16
|
+
private readonly sv;
|
|
17
17
|
constructor(sv: Config);
|
|
18
18
|
/**
|
|
19
19
|
* Appends printable key input that arrives after edit mode was requested
|
|
@@ -11,7 +11,7 @@ export declare class OverlaySelection {
|
|
|
11
11
|
/**
|
|
12
12
|
* Readonly mode.
|
|
13
13
|
*/
|
|
14
|
-
readonly: boolean;
|
|
14
|
+
readonly readonly: boolean;
|
|
15
15
|
/**
|
|
16
16
|
* Range selection allowed.
|
|
17
17
|
*/
|
|
@@ -189,7 +189,7 @@ export declare class OverlaySelection {
|
|
|
189
189
|
private autoFillService;
|
|
190
190
|
private orderEditor?;
|
|
191
191
|
private revogrEdit?;
|
|
192
|
-
private unsubscribeSelectionStore;
|
|
192
|
+
private readonly unsubscribeSelectionStore;
|
|
193
193
|
onMouseMove(e: MouseEvent | TouchEvent): void;
|
|
194
194
|
/**
|
|
195
195
|
* Action finished inside the document.
|
|
@@ -242,7 +242,7 @@ export declare class OverlaySelection {
|
|
|
242
242
|
/**
|
|
243
243
|
* Start cell editing
|
|
244
244
|
*/
|
|
245
|
-
protected doEdit(val?: string):
|
|
245
|
+
protected doEdit(val?: string): boolean;
|
|
246
246
|
/**
|
|
247
247
|
* Close editor event triggered
|
|
248
248
|
* @param details - if it requires focus next
|
package/hydrate/index.js
CHANGED
|
@@ -13636,6 +13636,7 @@ class KeyboardService {
|
|
|
13636
13636
|
if (typeof (editCell === null || editCell === void 0 ? void 0 : editCell.val) !== 'string') {
|
|
13637
13637
|
return false;
|
|
13638
13638
|
}
|
|
13639
|
+
e.preventDefault();
|
|
13639
13640
|
this.sv.selectionStore.set('edit', Object.assign(Object.assign({}, editCell), { val: `${editCell.val}${e.key}` }));
|
|
13640
13641
|
return true;
|
|
13641
13642
|
}
|
|
@@ -13697,7 +13698,9 @@ class KeyboardService {
|
|
|
13697
13698
|
}
|
|
13698
13699
|
// pressed letter key
|
|
13699
13700
|
if (!isShortcutModifier(e) && e.key.length === 1) {
|
|
13700
|
-
this.sv.change(e.key)
|
|
13701
|
+
if (this.sv.change(e.key)) {
|
|
13702
|
+
e.preventDefault();
|
|
13703
|
+
}
|
|
13701
13704
|
return;
|
|
13702
13705
|
}
|
|
13703
13706
|
// pressed arrow, change selection position
|
|
@@ -14129,12 +14132,7 @@ class OverlaySelection {
|
|
|
14129
14132
|
return this.doFocus(f, f, changes);
|
|
14130
14133
|
}
|
|
14131
14134
|
},
|
|
14132
|
-
change: val =>
|
|
14133
|
-
if (this.readonly) {
|
|
14134
|
-
return;
|
|
14135
|
-
}
|
|
14136
|
-
this.doEdit(val);
|
|
14137
|
-
},
|
|
14135
|
+
change: val => this.doEdit(val),
|
|
14138
14136
|
cancel: async () => {
|
|
14139
14137
|
var _a;
|
|
14140
14138
|
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
@@ -14263,9 +14261,9 @@ class OverlaySelection {
|
|
|
14263
14261
|
nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
14264
14262
|
}
|
|
14265
14263
|
}
|
|
14266
|
-
return (hAsync(Host, { key: '
|
|
14264
|
+
return (hAsync(Host, { key: '2d8dc4fd40a883fe59b24b2cfac1c370b9f0ac16', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
14267
14265
|
// it's done to be able to throw events from different levels, not just from editor
|
|
14268
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: '
|
|
14266
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: '8ad5df55904ca6a8b2fb0e69c5f608ec7264a0f1', name: "data" })));
|
|
14269
14267
|
}
|
|
14270
14268
|
/**
|
|
14271
14269
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -14367,15 +14365,16 @@ class OverlaySelection {
|
|
|
14367
14365
|
* Start cell editing
|
|
14368
14366
|
*/
|
|
14369
14367
|
doEdit(val = '') {
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
14377
|
-
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
14368
|
+
if (!this.canEdit()) {
|
|
14369
|
+
return false;
|
|
14370
|
+
}
|
|
14371
|
+
const focus = this.selectionStore.get('focus');
|
|
14372
|
+
if (!focus) {
|
|
14373
|
+
return false;
|
|
14378
14374
|
}
|
|
14375
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
14376
|
+
const event = this.setEdit.emit(Object.assign(Object.assign({}, data), { val }));
|
|
14377
|
+
return !event.defaultPrevented;
|
|
14379
14378
|
}
|
|
14380
14379
|
/**
|
|
14381
14380
|
* Close editor event triggered
|
|
@@ -20335,11 +20334,14 @@ class RevoGridComponent {
|
|
|
20335
20334
|
// Render viewport data (vertical sections)
|
|
20336
20335
|
view.dataPorts.forEach(data => {
|
|
20337
20336
|
const key = `${data.type}_${view.type}`;
|
|
20338
|
-
const dataView = (hAsync("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit:
|
|
20337
|
+
const dataView = (hAsync("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit: e => {
|
|
20339
20338
|
var _a;
|
|
20340
|
-
const event = this.beforeeditstart.emit(detail);
|
|
20341
|
-
if (
|
|
20342
|
-
|
|
20339
|
+
const event = this.beforeeditstart.emit(e.detail);
|
|
20340
|
+
if (event.defaultPrevented) {
|
|
20341
|
+
e.preventDefault();
|
|
20342
|
+
}
|
|
20343
|
+
else {
|
|
20344
|
+
(_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(e.detail.val);
|
|
20343
20345
|
}
|
|
20344
20346
|
} }), hAsync("revogr-data", Object.assign({}, data, { colType: view.type, key: key, readonly: this.readonly, range: this.range, rowClass: this.rowClass, rowSelectionStore: data.rowSelectionStore, additionalData: this.additionalData, jobsBeforeRender: this.jobsBeforeRender, slot: DATA_SLOT }), hAsync("slot", { name: `data-${view.type}-${data.type}` })), hAsync("revogr-temp-range", { selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }), hAsync("revogr-focus", { colData: data.colData, dataStore: data.dataStore, focusTemplate: this.focusTemplate, rowType: data.type, colType: view.type, selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }, hAsync("slot", { name: `focus-${view.type}-${data.type}` }))));
|
|
20345
20347
|
dataViews.push(dataView);
|
package/hydrate/index.mjs
CHANGED
|
@@ -13634,6 +13634,7 @@ class KeyboardService {
|
|
|
13634
13634
|
if (typeof (editCell === null || editCell === void 0 ? void 0 : editCell.val) !== 'string') {
|
|
13635
13635
|
return false;
|
|
13636
13636
|
}
|
|
13637
|
+
e.preventDefault();
|
|
13637
13638
|
this.sv.selectionStore.set('edit', Object.assign(Object.assign({}, editCell), { val: `${editCell.val}${e.key}` }));
|
|
13638
13639
|
return true;
|
|
13639
13640
|
}
|
|
@@ -13695,7 +13696,9 @@ class KeyboardService {
|
|
|
13695
13696
|
}
|
|
13696
13697
|
// pressed letter key
|
|
13697
13698
|
if (!isShortcutModifier(e) && e.key.length === 1) {
|
|
13698
|
-
this.sv.change(e.key)
|
|
13699
|
+
if (this.sv.change(e.key)) {
|
|
13700
|
+
e.preventDefault();
|
|
13701
|
+
}
|
|
13699
13702
|
return;
|
|
13700
13703
|
}
|
|
13701
13704
|
// pressed arrow, change selection position
|
|
@@ -14127,12 +14130,7 @@ class OverlaySelection {
|
|
|
14127
14130
|
return this.doFocus(f, f, changes);
|
|
14128
14131
|
}
|
|
14129
14132
|
},
|
|
14130
|
-
change: val =>
|
|
14131
|
-
if (this.readonly) {
|
|
14132
|
-
return;
|
|
14133
|
-
}
|
|
14134
|
-
this.doEdit(val);
|
|
14135
|
-
},
|
|
14133
|
+
change: val => this.doEdit(val),
|
|
14136
14134
|
cancel: async () => {
|
|
14137
14135
|
var _a;
|
|
14138
14136
|
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
@@ -14261,9 +14259,9 @@ class OverlaySelection {
|
|
|
14261
14259
|
nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
14262
14260
|
}
|
|
14263
14261
|
}
|
|
14264
|
-
return (hAsync(Host, { key: '
|
|
14262
|
+
return (hAsync(Host, { key: '2d8dc4fd40a883fe59b24b2cfac1c370b9f0ac16', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
14265
14263
|
// it's done to be able to throw events from different levels, not just from editor
|
|
14266
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: '
|
|
14264
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: '8ad5df55904ca6a8b2fb0e69c5f608ec7264a0f1', name: "data" })));
|
|
14267
14265
|
}
|
|
14268
14266
|
/**
|
|
14269
14267
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -14365,15 +14363,16 @@ class OverlaySelection {
|
|
|
14365
14363
|
* Start cell editing
|
|
14366
14364
|
*/
|
|
14367
14365
|
doEdit(val = '') {
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
14375
|
-
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
14366
|
+
if (!this.canEdit()) {
|
|
14367
|
+
return false;
|
|
14368
|
+
}
|
|
14369
|
+
const focus = this.selectionStore.get('focus');
|
|
14370
|
+
if (!focus) {
|
|
14371
|
+
return false;
|
|
14376
14372
|
}
|
|
14373
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
14374
|
+
const event = this.setEdit.emit(Object.assign(Object.assign({}, data), { val }));
|
|
14375
|
+
return !event.defaultPrevented;
|
|
14377
14376
|
}
|
|
14378
14377
|
/**
|
|
14379
14378
|
* Close editor event triggered
|
|
@@ -20333,11 +20332,14 @@ class RevoGridComponent {
|
|
|
20333
20332
|
// Render viewport data (vertical sections)
|
|
20334
20333
|
view.dataPorts.forEach(data => {
|
|
20335
20334
|
const key = `${data.type}_${view.type}`;
|
|
20336
|
-
const dataView = (hAsync("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit:
|
|
20335
|
+
const dataView = (hAsync("revogr-overlay-selection", Object.assign({}, data, { canDrag: this.canDrag && data.canDrag, isMobileDevice: isMobile, onSelectall: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.selectAll(); }, editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onBeforenextvpfocus: (e) => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.beforeNextFocusCell(e.detail); }, onCanceledit: () => { var _a; return (_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(false); }, onSetedit: e => {
|
|
20337
20336
|
var _a;
|
|
20338
|
-
const event = this.beforeeditstart.emit(detail);
|
|
20339
|
-
if (
|
|
20340
|
-
|
|
20337
|
+
const event = this.beforeeditstart.emit(e.detail);
|
|
20338
|
+
if (event.defaultPrevented) {
|
|
20339
|
+
e.preventDefault();
|
|
20340
|
+
}
|
|
20341
|
+
else {
|
|
20342
|
+
(_a = this.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEdit(e.detail.val);
|
|
20341
20343
|
}
|
|
20342
20344
|
} }), hAsync("revogr-data", Object.assign({}, data, { colType: view.type, key: key, readonly: this.readonly, range: this.range, rowClass: this.rowClass, rowSelectionStore: data.rowSelectionStore, additionalData: this.additionalData, jobsBeforeRender: this.jobsBeforeRender, slot: DATA_SLOT }), hAsync("slot", { name: `data-${view.type}-${data.type}` })), hAsync("revogr-temp-range", { selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }), hAsync("revogr-focus", { colData: data.colData, dataStore: data.dataStore, focusTemplate: this.focusTemplate, rowType: data.type, colType: view.type, selectionStore: data.selectionStore, dimensionRow: data.dimensionRow, dimensionCol: data.dimensionCol }, hAsync("slot", { name: `focus-${view.type}-${data.type}` }))));
|
|
20343
20345
|
dataViews.push(dataView);
|