@revolist/revogrid 4.0.11 → 4.0.12
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/{column.service-e83d9809.js → column.service-bc269420.js} +23 -9
- package/dist/cjs/column.service-bc269420.js.map +1 -0
- package/dist/cjs/{events-7ccd6894.js → events-f8893bba.js} +15 -5
- package/dist/cjs/events-f8893bba.js.map +1 -0
- package/dist/cjs/{header-cell-renderer-8ba9b56d.js → header-cell-renderer-57acd2f7.js} +2 -2
- package/dist/cjs/{header-cell-renderer-8ba9b56d.js.map → header-cell-renderer-57acd2f7.js.map} +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +29 -13
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js +176 -126
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +2 -2
- package/dist/collection/components/data/column.service.js.map +1 -1
- package/dist/collection/components/data/revogr-data.js +1 -1
- package/dist/collection/components/editors/revogr-edit.js +1 -1
- package/dist/collection/components/order/revogr-order-editor.js +4 -1
- package/dist/collection/components/order/revogr-order-editor.js.map +1 -1
- package/dist/collection/components/overlay/autofill.service.js +36 -24
- package/dist/collection/components/overlay/autofill.service.js.map +1 -1
- package/dist/collection/components/overlay/keyboard.service.js +7 -7
- package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +107 -59
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/selection.utils.js +37 -9
- package/dist/collection/components/overlay/selection.utils.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid-style.css +8 -3
- package/dist/collection/components/revoGrid/revo-grid.js +26 -11
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.helpers.js +22 -8
- package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.service.js +1 -0
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
- package/dist/collection/serve/controller.js +86 -18
- package/dist/collection/store/selection/index.js +0 -1
- package/dist/collection/store/selection/index.js.map +1 -1
- package/dist/collection/types/interfaces.js +4 -0
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/utils/events.js +11 -1
- package/dist/collection/utils/events.js.map +1 -1
- package/dist/collection/utils/row-header-utils.js +2 -2
- package/dist/collection/utils/row-header-utils.js.map +1 -1
- package/dist/esm/{column.service-f4922a8d.js → column.service-195345ab.js} +23 -9
- package/dist/esm/column.service-195345ab.js.map +1 -0
- package/dist/esm/{events-3dd8ee7c.js → events-3e39de50.js} +15 -5
- package/dist/esm/events-3e39de50.js.map +1 -0
- package/dist/esm/{header-cell-renderer-ac962570.js → header-cell-renderer-7c76465d.js} +2 -2
- package/dist/esm/{header-cell-renderer-ac962570.js.map → header-cell-renderer-7c76465d.js.map} +1 -1
- package/dist/esm/revo-grid.entry.js +29 -13
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revogr-attribution_6.entry.js +176 -126
- package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/esm/revogr-data_4.entry.js +2 -2
- package/dist/revo-grid/column.service-195345ab.js +5 -0
- package/dist/revo-grid/column.service-195345ab.js.map +1 -0
- package/dist/revo-grid/{events-3dd8ee7c.js → events-3e39de50.js} +2 -2
- package/dist/revo-grid/events-3e39de50.js.map +1 -0
- package/dist/revo-grid/{header-cell-renderer-ac962570.js → header-cell-renderer-7c76465d.js} +2 -2
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js.map +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +1 -1
- package/dist/types/components/data/column.service.d.ts +2 -2
- package/dist/types/components/order/revogr-order-editor.d.ts +3 -0
- package/dist/types/components/overlay/autofill.service.d.ts +9 -6
- package/dist/types/components/overlay/keyboard.service.d.ts +2 -3
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +38 -15
- package/dist/types/components/overlay/selection.utils.d.ts +12 -4
- package/dist/types/components/revoGrid/revo-grid.d.ts +4 -1
- package/dist/types/components/revoGrid/viewport.helpers.d.ts +11 -2
- package/dist/types/components.d.ts +26 -2
- package/dist/types/store/selection/index.d.ts +0 -1
- package/dist/types/types/interfaces.d.ts +444 -23
- package/dist/types/utils/events.d.ts +4 -1
- package/dist/types/utils/row-header-utils.d.ts +1 -1
- package/hydrate/index.js +265 -169
- package/package.json +5 -6
- package/standalone/column.service.js.map +1 -1
- package/standalone/revo-grid.js +28 -11
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-focus2.js +1 -1
- package/standalone/revogr-order-editor2.js.map +1 -1
- package/standalone/revogr-overlay-selection2.js +140 -143
- package/standalone/revogr-overlay-selection2.js.map +1 -1
- package/standalone/revogr-row-headers2.js +2 -2
- package/standalone/revogr-row-headers2.js.map +1 -1
- package/standalone/revogr-temp-range2.js +1 -1
- package/standalone/revogr-viewport-scroll2.js +22 -8
- package/standalone/revogr-viewport-scroll2.js.map +1 -1
- package/standalone/selection.utils.js +72 -9
- package/standalone/selection.utils.js.map +1 -1
- package/dist/cjs/column.service-e83d9809.js.map +0 -1
- package/dist/cjs/events-7ccd6894.js.map +0 -1
- package/dist/collection/store/selection/selection.store.service.js +0 -39
- package/dist/collection/store/selection/selection.store.service.js.map +0 -1
- package/dist/esm/column.service-f4922a8d.js.map +0 -1
- package/dist/esm/events-3dd8ee7c.js.map +0 -1
- package/dist/revo-grid/column.service-f4922a8d.js +0 -5
- package/dist/revo-grid/column.service-f4922a8d.js.map +0 -1
- package/dist/revo-grid/events-3dd8ee7c.js.map +0 -1
- package/dist/types/store/selection/selection.store.service.d.ts +0 -17
- /package/dist/revo-grid/{header-cell-renderer-ac962570.js.map → header-cell-renderer-7c76465d.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -7499,6 +7499,9 @@ class RowOrderService {
|
|
|
7499
7499
|
}
|
|
7500
7500
|
}
|
|
7501
7501
|
|
|
7502
|
+
/**
|
|
7503
|
+
* Component for handling row order editor.
|
|
7504
|
+
*/
|
|
7502
7505
|
class OrderEditor {
|
|
7503
7506
|
constructor(hostRef) {
|
|
7504
7507
|
registerInstance(this, hostRef);
|
|
@@ -8498,41 +8501,6 @@ function doPropMerge(existing, extra) {
|
|
|
8498
8501
|
return props;
|
|
8499
8502
|
}
|
|
8500
8503
|
|
|
8501
|
-
class SelectionStoreService {
|
|
8502
|
-
constructor(store, config) {
|
|
8503
|
-
this.store = store;
|
|
8504
|
-
this.config = config;
|
|
8505
|
-
this.store = store;
|
|
8506
|
-
}
|
|
8507
|
-
get edited() {
|
|
8508
|
-
return this.store.get('edit');
|
|
8509
|
-
}
|
|
8510
|
-
get focused() {
|
|
8511
|
-
return this.store.get('focus');
|
|
8512
|
-
}
|
|
8513
|
-
get ranged() {
|
|
8514
|
-
return this.store.get('range');
|
|
8515
|
-
}
|
|
8516
|
-
changeRange(range) {
|
|
8517
|
-
return this.config.changeRange(range);
|
|
8518
|
-
}
|
|
8519
|
-
focus(cell, isMulti = false) {
|
|
8520
|
-
if (!cell) {
|
|
8521
|
-
return false;
|
|
8522
|
-
}
|
|
8523
|
-
let end = cell;
|
|
8524
|
-
// range edit
|
|
8525
|
-
if (isMulti) {
|
|
8526
|
-
let start = this.store.get('focus');
|
|
8527
|
-
if (start) {
|
|
8528
|
-
return this.config.changeRange(getRange(start, end));
|
|
8529
|
-
}
|
|
8530
|
-
}
|
|
8531
|
-
// single focus
|
|
8532
|
-
return this.config.focus(cell, end);
|
|
8533
|
-
}
|
|
8534
|
-
}
|
|
8535
|
-
|
|
8536
8504
|
var codes;
|
|
8537
8505
|
(function (codes) {
|
|
8538
8506
|
codes[codes["MOUSE_LEFT"] = 1] = "MOUSE_LEFT";
|
|
@@ -8604,26 +8572,86 @@ var codesLetter;
|
|
|
8604
8572
|
codesLetter["SHIFT"] = "Shift";
|
|
8605
8573
|
})(codesLetter || (codesLetter = {}));
|
|
8606
8574
|
|
|
8607
|
-
|
|
8575
|
+
function isTouch(e) {
|
|
8576
|
+
return !!e.touches;
|
|
8577
|
+
}
|
|
8578
|
+
function verifyTouchTarget(touchEvent, focusClass) {
|
|
8579
|
+
if (focusClass && touchEvent) {
|
|
8580
|
+
if (!(touchEvent.target instanceof Element && touchEvent.target.classList.contains(focusClass))) {
|
|
8581
|
+
return false;
|
|
8582
|
+
}
|
|
8583
|
+
}
|
|
8584
|
+
return true;
|
|
8585
|
+
}
|
|
8586
|
+
/**
|
|
8587
|
+
* Function to get the value of a specific property from a MouseEvent or TouchEvent object.
|
|
8588
|
+
*/
|
|
8589
|
+
function getPropertyFromEvent(e, prop, focusClass // for touch events
|
|
8590
|
+
) {
|
|
8591
|
+
// Check if the event is a touch event
|
|
8592
|
+
if (isTouch(e)) {
|
|
8593
|
+
// If the event has touches, get the first touch
|
|
8594
|
+
if (e.touches.length > 0) {
|
|
8595
|
+
const touchEvent = e.touches[0];
|
|
8596
|
+
// Check if the target of the touch event is the specified element
|
|
8597
|
+
if (!verifyTouchTarget(touchEvent, focusClass)) {
|
|
8598
|
+
// If not, return null
|
|
8599
|
+
return null;
|
|
8600
|
+
}
|
|
8601
|
+
// Get the value of the specified property from the touch event and return it
|
|
8602
|
+
return touchEvent[prop] || 0;
|
|
8603
|
+
}
|
|
8604
|
+
// If there are no touches, return null
|
|
8605
|
+
return null;
|
|
8606
|
+
}
|
|
8607
|
+
// If the event is not a touch event, get the value of the specified property from the event and return it
|
|
8608
|
+
return e[prop] || 0;
|
|
8609
|
+
}
|
|
8610
|
+
|
|
8611
|
+
function getFocusCellBasedOnEvent(e, data) {
|
|
8612
|
+
// If event default is prevented, return
|
|
8613
|
+
if (e.defaultPrevented) {
|
|
8614
|
+
return null;
|
|
8615
|
+
}
|
|
8616
|
+
// Get coordinates from event object
|
|
8617
|
+
const x = getPropertyFromEvent(e, 'clientX');
|
|
8618
|
+
const y = getPropertyFromEvent(e, 'clientY');
|
|
8619
|
+
// If coordinates are not available, return
|
|
8620
|
+
if (x === null || y === null) {
|
|
8621
|
+
return null;
|
|
8622
|
+
}
|
|
8623
|
+
// Get current cell based on coordinates and data
|
|
8624
|
+
const focusCell = getCurrentCell({ x, y }, data);
|
|
8625
|
+
// If current cell is not available, return
|
|
8626
|
+
if (isAfterLast(focusCell, data.lastCell)) {
|
|
8627
|
+
return null;
|
|
8628
|
+
}
|
|
8629
|
+
return focusCell;
|
|
8630
|
+
}
|
|
8631
|
+
/**
|
|
8632
|
+
* Calculate cell based on x, y position
|
|
8633
|
+
*/
|
|
8608
8634
|
function getCurrentCell({ x, y }, { el, rows, cols }) {
|
|
8635
|
+
// Get the bounding rectangle of the element
|
|
8609
8636
|
const { top, left, height, width } = el.getBoundingClientRect();
|
|
8637
|
+
// Calculate the cell position relative to the element
|
|
8610
8638
|
let cellY = y - top;
|
|
8611
|
-
|
|
8639
|
+
let cellX = x - left;
|
|
8640
|
+
// Limit the cell position to the element height
|
|
8612
8641
|
if (cellY >= height) {
|
|
8613
8642
|
cellY = height - 1;
|
|
8614
8643
|
}
|
|
8615
|
-
|
|
8616
|
-
// limit to element width
|
|
8644
|
+
// Limit the cell position to the element width
|
|
8617
8645
|
if (cellX >= width) {
|
|
8618
8646
|
cellX = width - 1;
|
|
8619
8647
|
}
|
|
8648
|
+
// Get the row and column items based on the cell position
|
|
8620
8649
|
const rgRow = getItemByPosition(rows, cellY);
|
|
8621
8650
|
const rgCol = getItemByPosition(cols, cellX);
|
|
8622
|
-
// before first
|
|
8651
|
+
// Set the row and column index to 0 if they are before the first item
|
|
8623
8652
|
if (rgCol.itemIndex < 0) {
|
|
8624
8653
|
rgCol.itemIndex = 0;
|
|
8625
8654
|
}
|
|
8626
|
-
// before first
|
|
8627
8655
|
if (rgRow.itemIndex < 0) {
|
|
8628
8656
|
rgRow.itemIndex = 0;
|
|
8629
8657
|
}
|
|
@@ -8645,8 +8673,11 @@ function getCoordinate(range, focus, changes, isMulti = false) {
|
|
|
8645
8673
|
}
|
|
8646
8674
|
return null;
|
|
8647
8675
|
}
|
|
8648
|
-
/**
|
|
8649
|
-
|
|
8676
|
+
/**
|
|
8677
|
+
* Check if the x coordinate of the cell position is after or equal to the x coordinate of the last cell position
|
|
8678
|
+
* or if the y coordinate of the cell position is after or equal to the y coordinate of the last cell position
|
|
8679
|
+
*/
|
|
8680
|
+
function isAfterLast({ x, y }, lastCell) {
|
|
8650
8681
|
return x >= lastCell.x || y >= lastCell.y;
|
|
8651
8682
|
}
|
|
8652
8683
|
/** check if out of range */
|
|
@@ -8841,9 +8872,9 @@ class KeyboardService {
|
|
|
8841
8872
|
constructor(sv) {
|
|
8842
8873
|
this.sv = sv;
|
|
8843
8874
|
}
|
|
8844
|
-
async keyDown(e, canRange) {
|
|
8875
|
+
async keyDown(e, canRange, isEditMode, { range, focus }) {
|
|
8845
8876
|
// IF EDIT MODE
|
|
8846
|
-
if (
|
|
8877
|
+
if (isEditMode) {
|
|
8847
8878
|
switch (e.code) {
|
|
8848
8879
|
case codesLetter.ESCAPE:
|
|
8849
8880
|
this.sv.cancel();
|
|
@@ -8853,12 +8884,12 @@ class KeyboardService {
|
|
|
8853
8884
|
}
|
|
8854
8885
|
// IF NOT EDIT MODE
|
|
8855
8886
|
// pressed clear key
|
|
8856
|
-
if (
|
|
8887
|
+
if (range && isClear(e.code)) {
|
|
8857
8888
|
this.sv.clearCell();
|
|
8858
8889
|
return;
|
|
8859
8890
|
}
|
|
8860
8891
|
// below works with focus only
|
|
8861
|
-
if (!
|
|
8892
|
+
if (!focus) {
|
|
8862
8893
|
return;
|
|
8863
8894
|
}
|
|
8864
8895
|
// tab key means same as arrow right
|
|
@@ -8934,7 +8965,7 @@ class KeyboardService {
|
|
|
8934
8965
|
}
|
|
8935
8966
|
if (isMulti) {
|
|
8936
8967
|
const eData = this.sv.getData();
|
|
8937
|
-
if (isAfterLast(data.end, eData) || isBeforeFirst(data.start)) {
|
|
8968
|
+
if (isAfterLast(data.end, eData.lastCell) || isBeforeFirst(data.start)) {
|
|
8938
8969
|
return false;
|
|
8939
8970
|
}
|
|
8940
8971
|
const range = getRange(data.start, data.end);
|
|
@@ -8962,32 +8993,6 @@ class KeyboardService {
|
|
|
8962
8993
|
}
|
|
8963
8994
|
}
|
|
8964
8995
|
|
|
8965
|
-
function isTouch(e) {
|
|
8966
|
-
return !!e.touches;
|
|
8967
|
-
}
|
|
8968
|
-
function verifyTouchTarget(touchEvent, focusClass) {
|
|
8969
|
-
if (focusClass && touchEvent) {
|
|
8970
|
-
if (!(touchEvent.target instanceof Element && touchEvent.target.classList.contains(focusClass))) {
|
|
8971
|
-
return false;
|
|
8972
|
-
}
|
|
8973
|
-
}
|
|
8974
|
-
return true;
|
|
8975
|
-
}
|
|
8976
|
-
function getFromEvent(e, prop, focusClass // for touch events
|
|
8977
|
-
) {
|
|
8978
|
-
if (isTouch(e)) {
|
|
8979
|
-
if (e.touches.length > 0) {
|
|
8980
|
-
const touchEvent = e.touches[0];
|
|
8981
|
-
if (!verifyTouchTarget(touchEvent, focusClass)) {
|
|
8982
|
-
return null;
|
|
8983
|
-
}
|
|
8984
|
-
return touchEvent[prop] || 0;
|
|
8985
|
-
}
|
|
8986
|
-
return null;
|
|
8987
|
-
}
|
|
8988
|
-
return e[prop] || 0;
|
|
8989
|
-
}
|
|
8990
|
-
|
|
8991
8996
|
class AutoFillService {
|
|
8992
8997
|
constructor(sv) {
|
|
8993
8998
|
this.sv = sv;
|
|
@@ -9012,7 +9017,10 @@ class AutoFillService {
|
|
|
9012
9017
|
return (hAsync("div", { class: {
|
|
9013
9018
|
[CELL_HANDLER_CLASS]: true,
|
|
9014
9019
|
[MOBILE_CLASS]: true,
|
|
9015
|
-
}, style: {
|
|
9020
|
+
}, style: {
|
|
9021
|
+
left: `${handlerStyle.right}px`,
|
|
9022
|
+
top: `${handlerStyle.bottom}px`,
|
|
9023
|
+
}, onMouseDown: (e) => this.autoFillHandler(e), onTouchStart: (e) => this.autoFillHandler(e) }));
|
|
9016
9024
|
}
|
|
9017
9025
|
autoFillHandler(e, type = "AutoFill" /* AutoFillType.autoFill */) {
|
|
9018
9026
|
let target = null;
|
|
@@ -9028,7 +9036,9 @@ class AutoFillService {
|
|
|
9028
9036
|
get isAutoFill() {
|
|
9029
9037
|
return !!this.autoFillType;
|
|
9030
9038
|
}
|
|
9031
|
-
/**
|
|
9039
|
+
/**
|
|
9040
|
+
* Process mouse move events
|
|
9041
|
+
*/
|
|
9032
9042
|
selectionMouseMove(e) {
|
|
9033
9043
|
// initiate mouse move debounce if not present
|
|
9034
9044
|
if (!this.onMouseMoveAutofill) {
|
|
@@ -9038,9 +9048,7 @@ class AutoFillService {
|
|
|
9038
9048
|
this.onMouseMoveAutofill(e, this.sv.getData());
|
|
9039
9049
|
}
|
|
9040
9050
|
}
|
|
9041
|
-
getFocus() {
|
|
9042
|
-
let focus = this.sv.selectionStoreService.focused;
|
|
9043
|
-
const range = this.sv.selectionStoreService.ranged;
|
|
9051
|
+
getFocus(focus, range) {
|
|
9044
9052
|
// there was an issue that it was taking last cell from range but focus was out
|
|
9045
9053
|
if (!focus && range) {
|
|
9046
9054
|
focus = { x: range.x, y: range.y };
|
|
@@ -9056,8 +9064,8 @@ class AutoFillService {
|
|
|
9056
9064
|
if (!this.autoFillInitial) {
|
|
9057
9065
|
return;
|
|
9058
9066
|
}
|
|
9059
|
-
const x =
|
|
9060
|
-
const y =
|
|
9067
|
+
const x = getPropertyFromEvent(event, 'clientX', MOBILE_CLASS);
|
|
9068
|
+
const y = getPropertyFromEvent(event, 'clientY', MOBILE_CLASS);
|
|
9061
9069
|
// skip touch
|
|
9062
9070
|
if (x === null || y === null) {
|
|
9063
9071
|
return;
|
|
@@ -9070,11 +9078,12 @@ class AutoFillService {
|
|
|
9070
9078
|
}
|
|
9071
9079
|
}
|
|
9072
9080
|
// check if not the latest, if latest - do nothing
|
|
9073
|
-
if (isAfterLast(current, data)) {
|
|
9081
|
+
if (isAfterLast(current, data.lastCell)) {
|
|
9074
9082
|
return;
|
|
9075
9083
|
}
|
|
9076
9084
|
this.autoFillLast = current;
|
|
9077
|
-
const isSame = current.x === this.autoFillInitial.x &&
|
|
9085
|
+
const isSame = current.x === this.autoFillInitial.x &&
|
|
9086
|
+
current.y === this.autoFillInitial.y;
|
|
9078
9087
|
// if same as initial - clear
|
|
9079
9088
|
if (isSame) {
|
|
9080
9089
|
this.sv.setTempRange(null);
|
|
@@ -9095,39 +9104,48 @@ class AutoFillService {
|
|
|
9095
9104
|
selectionStart(target, data, type = "Selection" /* AutoFillType.selection */) {
|
|
9096
9105
|
/** Get cell by autofill element */
|
|
9097
9106
|
const { top, left } = target.getBoundingClientRect();
|
|
9098
|
-
this.autoFillInitial = this.getFocus();
|
|
9107
|
+
this.autoFillInitial = this.getFocus(data.focus, data.range);
|
|
9099
9108
|
this.autoFillType = type;
|
|
9100
9109
|
this.autoFillStart = getCurrentCell({ x: left, y: top }, data);
|
|
9101
9110
|
}
|
|
9102
9111
|
/**
|
|
9103
|
-
* Clear current range selection
|
|
9104
|
-
* on mouse up and mouse leave events
|
|
9112
|
+
* Clear current range selection on mouse up and mouse leave events
|
|
9105
9113
|
*/
|
|
9106
|
-
clearAutoFillSelection() {
|
|
9107
|
-
//
|
|
9114
|
+
clearAutoFillSelection(focus, oldRange) {
|
|
9115
|
+
// If autofill was active, apply autofill values
|
|
9108
9116
|
if (this.autoFillInitial) {
|
|
9109
|
-
//
|
|
9110
|
-
this.autoFillInitial = this.getFocus();
|
|
9111
|
-
// Apply range data if
|
|
9117
|
+
// Fetch latest focus
|
|
9118
|
+
this.autoFillInitial = this.getFocus(focus, oldRange);
|
|
9119
|
+
// Apply range data if autofill mode is active
|
|
9112
9120
|
if (this.autoFillType === "AutoFill" /* AutoFillType.autoFill */) {
|
|
9113
9121
|
const range = getRange(this.autoFillInitial, this.autoFillLast);
|
|
9122
|
+
// If range is present, apply data
|
|
9114
9123
|
if (range) {
|
|
9115
|
-
const { defaultPrevented: stopApply, detail: { range: newRange } } = this.sv.clearRangeDataApply({
|
|
9124
|
+
const { defaultPrevented: stopApply, detail: { range: newRange }, } = this.sv.clearRangeDataApply({
|
|
9116
9125
|
range,
|
|
9117
9126
|
});
|
|
9127
|
+
// If data apply was not prevented, apply new range
|
|
9118
9128
|
if (!stopApply) {
|
|
9119
|
-
this.applyRangeWithData(newRange);
|
|
9129
|
+
this.applyRangeWithData(newRange, oldRange);
|
|
9120
9130
|
}
|
|
9121
9131
|
else {
|
|
9122
|
-
//
|
|
9132
|
+
// If data apply was prevented, clear temporary range
|
|
9123
9133
|
this.sv.setTempRange(null);
|
|
9124
9134
|
}
|
|
9125
9135
|
}
|
|
9126
9136
|
}
|
|
9127
9137
|
else {
|
|
9138
|
+
// If not autofill mode, apply range only
|
|
9128
9139
|
this.applyRangeOnly(this.autoFillInitial, this.autoFillLast);
|
|
9129
9140
|
}
|
|
9130
9141
|
}
|
|
9142
|
+
// Reset autofill state
|
|
9143
|
+
this.resetAutoFillState();
|
|
9144
|
+
}
|
|
9145
|
+
/**
|
|
9146
|
+
* Reset autofill state
|
|
9147
|
+
*/
|
|
9148
|
+
resetAutoFillState() {
|
|
9131
9149
|
this.autoFillType = null;
|
|
9132
9150
|
this.autoFillInitial = null;
|
|
9133
9151
|
this.autoFillLast = null;
|
|
@@ -9147,8 +9165,7 @@ class AutoFillService {
|
|
|
9147
9165
|
this.sv.setRange(range);
|
|
9148
9166
|
}
|
|
9149
9167
|
/** Apply range and copy data during range application */
|
|
9150
|
-
applyRangeWithData(newRange) {
|
|
9151
|
-
const oldRange = this.sv.selectionStoreService.ranged;
|
|
9168
|
+
applyRangeWithData(newRange, oldRange) {
|
|
9152
9169
|
const rangeData = {
|
|
9153
9170
|
type: this.sv.dataStore.get('type'),
|
|
9154
9171
|
colType: this.sv.columnService.type,
|
|
@@ -9190,6 +9207,9 @@ class AutoFillService {
|
|
|
9190
9207
|
const revogrOverlayStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:\"\";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:\"\";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}";
|
|
9191
9208
|
var RevogrOverlaySelectionStyle0 = revogrOverlayStyleCss;
|
|
9192
9209
|
|
|
9210
|
+
/**
|
|
9211
|
+
* Component for overlaying the grid with the selection.
|
|
9212
|
+
*/
|
|
9193
9213
|
class OverlaySelection {
|
|
9194
9214
|
constructor(hostRef) {
|
|
9195
9215
|
registerInstance(this, hostRef);
|
|
@@ -9237,44 +9257,60 @@ class OverlaySelection {
|
|
|
9237
9257
|
// #endregion
|
|
9238
9258
|
// #region Listeners
|
|
9239
9259
|
onMouseMove(e) {
|
|
9240
|
-
if (this.
|
|
9260
|
+
if (this.selectionStore.get('focus')) {
|
|
9241
9261
|
this.autoFillService.selectionMouseMove(e);
|
|
9242
9262
|
}
|
|
9243
9263
|
}
|
|
9244
|
-
/**
|
|
9245
|
-
|
|
9264
|
+
/**
|
|
9265
|
+
* Action finished inside of the document.
|
|
9266
|
+
* Pointer left document, clear any active operation.
|
|
9267
|
+
*/
|
|
9246
9268
|
onMouseUp() {
|
|
9247
|
-
|
|
9269
|
+
// Clear auto fill selection
|
|
9270
|
+
// when pointer left document,
|
|
9271
|
+
// clear any active operation.
|
|
9272
|
+
this.autoFillService.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
|
|
9248
9273
|
}
|
|
9249
|
-
/**
|
|
9274
|
+
/**
|
|
9275
|
+
* Row drag started.
|
|
9276
|
+
* This event is fired when drag action started on cell.
|
|
9277
|
+
*/
|
|
9250
9278
|
onCellDrag(e) {
|
|
9251
9279
|
var _a;
|
|
9280
|
+
// Invoke drag start on order editor.
|
|
9252
9281
|
(_a = this.orderEditor) === null || _a === void 0 ? void 0 : _a.dragStart(e.detail);
|
|
9253
9282
|
}
|
|
9254
|
-
/**
|
|
9283
|
+
/**
|
|
9284
|
+
* Get keyboard down from element.
|
|
9285
|
+
* This event is fired when keyboard key is released.
|
|
9286
|
+
*/
|
|
9255
9287
|
onKeyUp(e) {
|
|
9288
|
+
// Emit before key up event.
|
|
9256
9289
|
this.beforeKeyUp.emit(e);
|
|
9257
9290
|
}
|
|
9258
|
-
/**
|
|
9291
|
+
/**
|
|
9292
|
+
* Get keyboard down from element.
|
|
9293
|
+
* This event is fired when keyboard key is pressed.
|
|
9294
|
+
*/
|
|
9259
9295
|
onKeyDown(e) {
|
|
9260
9296
|
var _a;
|
|
9297
|
+
// Emit before key down event and check if default prevention is set.
|
|
9261
9298
|
const proxy = this.beforeKeyDown.emit(e);
|
|
9262
9299
|
if (e.defaultPrevented || proxy.defaultPrevented) {
|
|
9263
9300
|
return;
|
|
9264
9301
|
}
|
|
9265
|
-
|
|
9302
|
+
// Invoke key down on keyboard service.
|
|
9303
|
+
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range, !!this.selectionStore.get('edit'), {
|
|
9304
|
+
focus: this.selectionStore.get('focus'),
|
|
9305
|
+
range: this.selectionStore.get('range'),
|
|
9306
|
+
});
|
|
9266
9307
|
}
|
|
9267
9308
|
// #endregion
|
|
9268
9309
|
/** Selection & Keyboard */
|
|
9269
9310
|
selectionServiceSet(s) {
|
|
9270
|
-
this.selectionStoreService = new SelectionStoreService(s, {
|
|
9271
|
-
changeRange: range => this.triggerRangeEvent(range),
|
|
9272
|
-
focus: (focus, end) => this.doFocus(focus, end),
|
|
9273
|
-
});
|
|
9274
9311
|
this.keyboardService = new KeyboardService({
|
|
9275
|
-
selectionStoreService: this.selectionStoreService,
|
|
9276
9312
|
selectionStore: s,
|
|
9277
|
-
range: r => this.
|
|
9313
|
+
range: r => this.triggerRangeEvent(r),
|
|
9278
9314
|
focusNext: (f, next) => this.doFocus(f, f, next),
|
|
9279
9315
|
change: val => {
|
|
9280
9316
|
if (this.readonly) {
|
|
@@ -9296,7 +9332,6 @@ class OverlaySelection {
|
|
|
9296
9332
|
/** Autofill */
|
|
9297
9333
|
createAutoFillService() {
|
|
9298
9334
|
this.autoFillService = new AutoFillService({
|
|
9299
|
-
selectionStoreService: this.selectionStoreService,
|
|
9300
9335
|
dimensionRow: this.dimensionRow,
|
|
9301
9336
|
dimensionCol: this.dimensionCol,
|
|
9302
9337
|
columnService: this.columnService,
|
|
@@ -9372,10 +9407,10 @@ class OverlaySelection {
|
|
|
9372
9407
|
nodes.push(editCell);
|
|
9373
9408
|
}
|
|
9374
9409
|
else {
|
|
9375
|
-
const range = this.
|
|
9376
|
-
const
|
|
9410
|
+
const range = this.selectionStore.get('range');
|
|
9411
|
+
const focus = this.selectionStore.get('focus');
|
|
9377
9412
|
// Clipboard
|
|
9378
|
-
if ((range ||
|
|
9413
|
+
if ((range || focus) && this.useClipboard) {
|
|
9379
9414
|
nodes.push(hAsync("revogr-clipboard", { readonly: this.readonly, onCopyregion: e => this.onCopy(e.detail), onClearregion: () => !this.readonly && this.clearCell(), ref: e => (this.clipboard = e), onPasteregion: e => this.onPaste(e.detail) }));
|
|
9380
9415
|
}
|
|
9381
9416
|
// Range
|
|
@@ -9383,23 +9418,19 @@ class OverlaySelection {
|
|
|
9383
9418
|
nodes.push(...this.renderRange(range));
|
|
9384
9419
|
}
|
|
9385
9420
|
// Autofill
|
|
9386
|
-
if (
|
|
9387
|
-
nodes.push(this.autoFillService.renderAutofill(range,
|
|
9421
|
+
if (focus && !this.readonly && this.range) {
|
|
9422
|
+
nodes.push(this.autoFillService.renderAutofill(range, focus));
|
|
9388
9423
|
}
|
|
9389
9424
|
// Order
|
|
9390
9425
|
if (this.canDrag) {
|
|
9391
9426
|
nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
9392
9427
|
}
|
|
9393
9428
|
}
|
|
9394
|
-
return (hAsync(Host, { key: '
|
|
9395
|
-
// Open Editor on DblClick
|
|
9396
|
-
onDblClick: (e) => {
|
|
9397
|
-
// DblClick prevented outside - Editor will not open
|
|
9398
|
-
if (!e.defaultPrevented) {
|
|
9399
|
-
this.doEdit();
|
|
9400
|
-
}
|
|
9401
|
-
}, onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, hAsync("slot", { key: '89b9bec7824739ea11fadeecbf3908ac74e85c96', name: "data" })));
|
|
9429
|
+
return (hAsync(Host, { key: '9dbb6247aebf4ad00c1c8c78852191671be33a11', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, hAsync("slot", { key: '7769092a5029c5a49da8c2d6f36eb9f17b461bc2', name: "data" })));
|
|
9402
9430
|
}
|
|
9431
|
+
/**
|
|
9432
|
+
* Executes the focus operation on the specified range of cells.
|
|
9433
|
+
*/
|
|
9403
9434
|
doFocus(focus, end, next) {
|
|
9404
9435
|
const { defaultPrevented } = this.beforeFocusCell.emit(this.columnService.getSaveData(focus.y, focus.x));
|
|
9405
9436
|
if (defaultPrevented) {
|
|
@@ -9433,31 +9464,48 @@ class OverlaySelection {
|
|
|
9433
9464
|
}
|
|
9434
9465
|
return !e.defaultPrevented;
|
|
9435
9466
|
}
|
|
9467
|
+
/**
|
|
9468
|
+
* Open Editor on DblClick
|
|
9469
|
+
*/
|
|
9470
|
+
onElementDblClick(e) {
|
|
9471
|
+
// DblClick prevented outside - Editor will not open
|
|
9472
|
+
// Get data from the component
|
|
9473
|
+
const data = this.getData();
|
|
9474
|
+
const focusCell = getFocusCellBasedOnEvent(e, data);
|
|
9475
|
+
if (!focusCell) {
|
|
9476
|
+
return;
|
|
9477
|
+
}
|
|
9478
|
+
this.doEdit();
|
|
9479
|
+
}
|
|
9480
|
+
/**
|
|
9481
|
+
* Handle mouse down event on Host element
|
|
9482
|
+
*/
|
|
9436
9483
|
onElementMouseDown(e, touch = false) {
|
|
9484
|
+
// Get the target element from the event object
|
|
9485
|
+
const targetElement = e.target;
|
|
9437
9486
|
// Ignore focus if clicked input
|
|
9438
|
-
if (isEditInput(
|
|
9487
|
+
if (isEditInput(targetElement)) {
|
|
9439
9488
|
return;
|
|
9440
9489
|
}
|
|
9490
|
+
// Get data from the component
|
|
9441
9491
|
const data = this.getData();
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
}
|
|
9445
|
-
const x = getFromEvent(e, 'clientX');
|
|
9446
|
-
const y = getFromEvent(e, 'clientY');
|
|
9447
|
-
// skip touch
|
|
9448
|
-
if (x === null || y === null) {
|
|
9492
|
+
const focusCell = getFocusCellBasedOnEvent(e, data);
|
|
9493
|
+
if (!focusCell) {
|
|
9449
9494
|
return;
|
|
9450
9495
|
}
|
|
9451
|
-
//
|
|
9452
|
-
|
|
9453
|
-
this.selectionStoreService.focus(focusCell, this.range && e.shiftKey);
|
|
9496
|
+
// Set focus on the current cell
|
|
9497
|
+
this.focus(focusCell, this.range && e.shiftKey);
|
|
9454
9498
|
// Initiate autofill selection
|
|
9455
9499
|
if (this.range) {
|
|
9456
|
-
this.autoFillService.selectionStart(
|
|
9500
|
+
this.autoFillService.selectionStart(targetElement, this.getData());
|
|
9501
|
+
// Prevent default behavior for mouse events,
|
|
9502
|
+
// but only if target element is not a mobile input
|
|
9457
9503
|
if (!touch) {
|
|
9458
9504
|
e.preventDefault();
|
|
9459
9505
|
}
|
|
9460
9506
|
else if (verifyTouchTarget(e.touches[0], MOBILE_CLASS)) {
|
|
9507
|
+
// Prevent default behavior for touch events
|
|
9508
|
+
// if target element is a mobile input
|
|
9461
9509
|
e.preventDefault();
|
|
9462
9510
|
}
|
|
9463
9511
|
}
|
|
@@ -9468,8 +9516,8 @@ class OverlaySelection {
|
|
|
9468
9516
|
doEdit(val = '') {
|
|
9469
9517
|
var _a;
|
|
9470
9518
|
if (this.canEdit()) {
|
|
9471
|
-
const
|
|
9472
|
-
const data = this.columnService.getSaveData(
|
|
9519
|
+
const focus = this.selectionStore.get('focus');
|
|
9520
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
9473
9521
|
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
9474
9522
|
}
|
|
9475
9523
|
}
|
|
@@ -9492,8 +9540,8 @@ class OverlaySelection {
|
|
|
9492
9540
|
this.cellEditApply.emit(dataToSave);
|
|
9493
9541
|
}
|
|
9494
9542
|
getRegion() {
|
|
9495
|
-
const focus = this.
|
|
9496
|
-
let range = this.
|
|
9543
|
+
const focus = this.selectionStore.get('focus');
|
|
9544
|
+
let range = this.selectionStore.get('range');
|
|
9497
9545
|
if (!range) {
|
|
9498
9546
|
range = getRange(focus, focus);
|
|
9499
9547
|
}
|
|
@@ -9519,8 +9567,8 @@ class OverlaySelection {
|
|
|
9519
9567
|
return true;
|
|
9520
9568
|
}
|
|
9521
9569
|
onPaste(data) {
|
|
9522
|
-
const focus = this.
|
|
9523
|
-
const isEditing = this.
|
|
9570
|
+
const focus = this.selectionStore.get('focus');
|
|
9571
|
+
const isEditing = this.selectionStore.get('edit') !== null;
|
|
9524
9572
|
if (!focus || isEditing) {
|
|
9525
9573
|
return;
|
|
9526
9574
|
}
|
|
@@ -9540,13 +9588,13 @@ class OverlaySelection {
|
|
|
9540
9588
|
}
|
|
9541
9589
|
}
|
|
9542
9590
|
clearCell() {
|
|
9543
|
-
if (this.
|
|
9544
|
-
!isRangeSingleCell(this.
|
|
9545
|
-
const data = this.columnService.getRangeStaticData(this.
|
|
9546
|
-
this.autoFillService.onRangeApply(data, this.
|
|
9591
|
+
if (this.selectionStore.get('range') &&
|
|
9592
|
+
!isRangeSingleCell(this.selectionStore.get('range'))) {
|
|
9593
|
+
const data = this.columnService.getRangeStaticData(this.selectionStore.get('range'), '');
|
|
9594
|
+
this.autoFillService.onRangeApply(data, this.selectionStore.get('range'));
|
|
9547
9595
|
}
|
|
9548
9596
|
else if (this.canEdit()) {
|
|
9549
|
-
const focused = this.
|
|
9597
|
+
const focused = this.selectionStore.get('focus');
|
|
9550
9598
|
const cell = this.columnService.getSaveData(focused.y, focused.x);
|
|
9551
9599
|
this.cellEdit({
|
|
9552
9600
|
rgRow: focused.y,
|
|
@@ -9568,8 +9616,24 @@ class OverlaySelection {
|
|
|
9568
9616
|
if (this.readonly) {
|
|
9569
9617
|
return false;
|
|
9570
9618
|
}
|
|
9571
|
-
const
|
|
9572
|
-
return
|
|
9619
|
+
const focus = this.selectionStore.get('focus');
|
|
9620
|
+
return focus && !((_a = this.columnService) === null || _a === void 0 ? void 0 : _a.isReadOnly(focus.y, focus.x));
|
|
9621
|
+
}
|
|
9622
|
+
get edited() {
|
|
9623
|
+
return this.selectionStore.get('edit');
|
|
9624
|
+
}
|
|
9625
|
+
/**
|
|
9626
|
+
* Sets the focus on a cell and optionally edits a range.
|
|
9627
|
+
*/
|
|
9628
|
+
focus(cell, isRangeEdit = false) {
|
|
9629
|
+
if (!cell)
|
|
9630
|
+
return false;
|
|
9631
|
+
const end = cell;
|
|
9632
|
+
const start = this.selectionStore.get('focus');
|
|
9633
|
+
if (isRangeEdit && start) {
|
|
9634
|
+
return this.triggerRangeEvent(getRange(start, end));
|
|
9635
|
+
}
|
|
9636
|
+
return this.doFocus(cell, end);
|
|
9573
9637
|
}
|
|
9574
9638
|
get types() {
|
|
9575
9639
|
return {
|
|
@@ -9586,6 +9650,8 @@ class OverlaySelection {
|
|
|
9586
9650
|
rows: this.dimensionRow.state,
|
|
9587
9651
|
cols: this.dimensionCol.state,
|
|
9588
9652
|
lastCell: this.lastCell,
|
|
9653
|
+
focus: this.selectionStore.get('focus'),
|
|
9654
|
+
range: this.selectionStore.get('range'),
|
|
9589
9655
|
};
|
|
9590
9656
|
}
|
|
9591
9657
|
get element() { return getElement(this); }
|
|
@@ -12900,16 +12966,30 @@ class GroupingRowPlugin extends BasePlugin {
|
|
|
12900
12966
|
}
|
|
12901
12967
|
}
|
|
12902
12968
|
|
|
12903
|
-
/**
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12969
|
+
/**
|
|
12970
|
+
* Collects data for pinned columns in the required @ViewportProps format.
|
|
12971
|
+
*/
|
|
12972
|
+
/**
|
|
12973
|
+
* Represents the slot names for the viewport slots.
|
|
12974
|
+
*/
|
|
12975
|
+
const HEADER_SLOT = 'header'; // Slot name for the header slot
|
|
12976
|
+
const FOOTER_SLOT = 'footer'; // Slot name for the footer slot
|
|
12977
|
+
const CONTENT_SLOT = 'content'; // Slot name for the content slot
|
|
12978
|
+
const DATA_SLOT = 'data'; // Slot name for the data slot
|
|
12979
|
+
/**
|
|
12980
|
+
* Returns the last visible cell in the viewport for a given row type.
|
|
12981
|
+
* Coordinates are not zero-based and are relative to the viewport.
|
|
12982
|
+
* If needed to be zero-based they can be adjusted by subtracting 1.
|
|
12983
|
+
*/
|
|
12909
12984
|
function getLastCell(data, rowType) {
|
|
12985
|
+
// Get the last visible column count from the viewport column data.
|
|
12986
|
+
const lastVisibleColumnCount = data.viewports[data.colType].store.get('realCount');
|
|
12987
|
+
// Get the last visible row count for the given row type from the viewport column data.
|
|
12988
|
+
const lastVisibleRowCount = data.viewports[rowType].store.get('realCount');
|
|
12989
|
+
// Return the last visible cell with the last visible column count and row count.
|
|
12910
12990
|
return {
|
|
12911
|
-
x:
|
|
12912
|
-
y:
|
|
12991
|
+
x: lastVisibleColumnCount,
|
|
12992
|
+
y: lastVisibleRowCount,
|
|
12913
12993
|
};
|
|
12914
12994
|
}
|
|
12915
12995
|
|
|
@@ -13064,6 +13144,7 @@ class ViewportService {
|
|
|
13064
13144
|
colData: data.colStore,
|
|
13065
13145
|
viewportCol: data.viewports[data.colType].store,
|
|
13066
13146
|
viewportRow: data.viewports[type].store,
|
|
13147
|
+
// lastCell is the last real coordinate + 1
|
|
13067
13148
|
lastCell: getLastCell(data, type),
|
|
13068
13149
|
slot,
|
|
13069
13150
|
type,
|
|
@@ -13272,9 +13353,9 @@ const OrderRenderer = ({ ref }) => {
|
|
|
13272
13353
|
};
|
|
13273
13354
|
|
|
13274
13355
|
const LETTER_BLOCK_SIZE = 10;
|
|
13275
|
-
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn) => {
|
|
13356
|
+
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn, minWidth = 50) => {
|
|
13276
13357
|
return ((rowHeaderColumn === null || rowHeaderColumn === void 0 ? void 0 : rowHeaderColumn.size) ||
|
|
13277
|
-
(itemsLength.toString().length + 1) * LETTER_BLOCK_SIZE);
|
|
13358
|
+
Math.max((itemsLength.toString().length + 1) * LETTER_BLOCK_SIZE, minWidth));
|
|
13278
13359
|
};
|
|
13279
13360
|
|
|
13280
13361
|
class StretchColumn extends BasePlugin {
|
|
@@ -13922,7 +14003,7 @@ function isMobileDevice() {
|
|
|
13922
14003
|
return /Mobi/i.test(navigator.userAgent) || /Android/i.test(navigator.userAgent) || navigator.maxTouchPoints > 0;
|
|
13923
14004
|
}
|
|
13924
14005
|
|
|
13925
|
-
const revoGridStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revo-grid[theme=default],revo-grid:not([theme]){border:1px solid #cecece;font-size:12px}revo-grid[theme=default] revogr-header,revo-grid:not([theme]) revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#000}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell,revo-grid:not([theme]) revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #cecece inset, 0 -1px 0 0 #cecece, 0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell,revo-grid:not([theme]) revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders,revo-grid:not([theme]) .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell{color:#000}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:first-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:first-child{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:not(:first-child),revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:not(:first-child){box-shadow:0 -1px 0 0 #cecece inset, 1px 0 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-header,revo-grid:not([theme]) .rowHeaders revogr-header{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #cecece inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #cecece inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data,revo-grid:not([theme]) revogr-data{text-align:center}revo-grid[theme=default] revogr-data .revo-draggable,revo-grid:not([theme]) revogr-data .revo-draggable{float:left}revo-grid[theme=default] revogr-data .rgRow,revo-grid:not([theme]) revogr-data .rgRow{line-height:27px;box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow,revo-grid:not([theme]) revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell,revo-grid:not([theme]) revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled,revo-grid:not([theme]) revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=material] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=material] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkCompact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=compact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;min-height:300px;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .attribution{position:absolute;top:0;left:0;right:0;z-index:100;width:0;height:0;border-left:6px solid #0049cf;border-top:6px solid #0049cf;border-bottom:6px solid transparent;border-right:6px solid transparent;cursor:pointer}revo-grid .attribution .value{position:absolute;top:0;left:0;background-color:rgba(255, 255, 255, 0.9);padding:4px;border-radius:4px;box-shadow:0 1px 10px rgba(0, 0, 0, 0.2);white-space:nowrap;text-decoration:none;color:black;letter-spacing:0.3px;font-size:11px;opacity:0;width:6px;overflow:hidden;transition:opacity 0.5s ease-in-out, width 0.3s ease-in-out}revo-grid .attribution:hover .value{width:63px;opacity:1}revo-grid.column-draggable.column-drag-start:hover,revo-grid.column-draggable.column-drag-start *:hover{cursor:grabbing}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-height:100%;display:flex;flex-direction:row;align-items:flex-start;max-width:100%}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}";
|
|
14006
|
+
const revoGridStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revo-grid[theme=default],revo-grid:not([theme]){border:1px solid #cecece;font-size:12px}revo-grid[theme=default] revogr-header,revo-grid:not([theme]) revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#000}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell,revo-grid:not([theme]) revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #cecece inset, 0 -1px 0 0 #cecece, 0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell,revo-grid:not([theme]) revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders,revo-grid:not([theme]) .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell{color:#000}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:first-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:first-child{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:not(:first-child),revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:not(:first-child){box-shadow:0 -1px 0 0 #cecece inset, 1px 0 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:last-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:last-child{border-right:1px solid #cecece}revo-grid[theme=default] .rowHeaders revogr-data revogr-header,revo-grid:not([theme]) .rowHeaders revogr-data revogr-header{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #cecece inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #cecece inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data,revo-grid:not([theme]) revogr-data{text-align:center}revo-grid[theme=default] revogr-data .revo-draggable,revo-grid:not([theme]) revogr-data .revo-draggable{float:left}revo-grid[theme=default] revogr-data .rgRow,revo-grid:not([theme]) revogr-data .rgRow{line-height:27px}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow,revo-grid:not([theme]) revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell,revo-grid:not([theme]) revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled,revo-grid:not([theme]) revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=material] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=material] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkCompact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=compact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;min-height:300px;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .attribution{position:absolute;top:0;left:0;right:0;z-index:100;width:0;height:0;border-left:6px solid #0049cf;border-top:6px solid #0049cf;border-bottom:6px solid transparent;border-right:6px solid transparent;cursor:pointer}revo-grid .attribution .value{position:absolute;top:0;left:0;background-color:rgba(255, 255, 255, 0.9);padding:4px;border-radius:4px;box-shadow:0 1px 10px rgba(0, 0, 0, 0.2);white-space:nowrap;text-decoration:none;color:black;letter-spacing:0.3px;font-size:11px;opacity:0;width:6px;overflow:hidden;transition:opacity 0.5s ease-in-out, width 0.3s ease-in-out}revo-grid .attribution:hover .value{width:63px;opacity:1}revo-grid.column-draggable.column-drag-start:hover,revo-grid.column-draggable.column-drag-start *:hover{cursor:grabbing}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-height:100%;display:flex;flex-direction:row;align-items:flex-start;flex-grow:1;max-width:100%}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;justify-content:space-between;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}";
|
|
13926
14007
|
var RevoGridStyle0 = revoGridStyleCss;
|
|
13927
14008
|
|
|
13928
14009
|
/**
|
|
@@ -14210,16 +14291,19 @@ class RevoGridComponent {
|
|
|
14210
14291
|
return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange();
|
|
14211
14292
|
}
|
|
14212
14293
|
mousedownHandle(event) {
|
|
14213
|
-
const screenX =
|
|
14214
|
-
const screenY =
|
|
14294
|
+
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
14295
|
+
const screenY = getPropertyFromEvent(event, 'screenY');
|
|
14215
14296
|
if (screenX === null || screenY === null) {
|
|
14216
14297
|
return;
|
|
14217
14298
|
}
|
|
14218
14299
|
this.clickTrackForFocusClear = screenX + screenY;
|
|
14219
14300
|
}
|
|
14301
|
+
/**
|
|
14302
|
+
* To keep your elements from losing focus use mouseup/touchend e.preventDefault();
|
|
14303
|
+
*/
|
|
14220
14304
|
mouseupHandle(event) {
|
|
14221
|
-
const screenX =
|
|
14222
|
-
const screenY =
|
|
14305
|
+
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
14306
|
+
const screenY = getPropertyFromEvent(event, 'screenY');
|
|
14223
14307
|
if (screenX === null || screenY === null) {
|
|
14224
14308
|
return;
|
|
14225
14309
|
}
|
|
@@ -14353,7 +14437,19 @@ class RevoGridComponent {
|
|
|
14353
14437
|
this.dimensionProvider.setSettings({ originItemSize: this.colSize }, 'rgCol');
|
|
14354
14438
|
// if theme change we need to reapply row size and reset viewport
|
|
14355
14439
|
if (!init) {
|
|
14356
|
-
|
|
14440
|
+
// clear existing data
|
|
14441
|
+
this.dimensionProvider.setSettings({ originItemSize: this.themeService.rowSize }, 'rgRow');
|
|
14442
|
+
this.rowDefChanged(
|
|
14443
|
+
// for cases when some custom size present and not
|
|
14444
|
+
this.rowDefinitions.length
|
|
14445
|
+
? this.rowDefinitions
|
|
14446
|
+
: [
|
|
14447
|
+
{
|
|
14448
|
+
type: 'rgRow',
|
|
14449
|
+
size: this.themeService.rowSize,
|
|
14450
|
+
index: 0,
|
|
14451
|
+
},
|
|
14452
|
+
], this.rowDefinitions);
|
|
14357
14453
|
}
|
|
14358
14454
|
}
|
|
14359
14455
|
dataSourceChanged(newVal = [], _, watchName) {
|
|
@@ -14601,10 +14697,10 @@ class RevoGridComponent {
|
|
|
14601
14697
|
const headerProperties = Object.assign(Object.assign({}, view.headerProp), { type: view.type, additionalData: this.additionalData, viewportCol: view.viewportCol, selectionStore: view.columnSelectionStore, canResize: this.resize, readonly: this.readonly, columnFilter: !!this.filter });
|
|
14602
14698
|
// Column headers
|
|
14603
14699
|
const dataViews = [
|
|
14604
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14700
|
+
hAsync("revogr-header", Object.assign({ key: '1b32ad72b926f749230e2f596329176bdb29b425' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14605
14701
|
];
|
|
14606
14702
|
// Render viewport data (vertical sections)
|
|
14607
|
-
view.dataPorts.forEach(
|
|
14703
|
+
view.dataPorts.forEach(data => {
|
|
14608
14704
|
const key = `${data.type}_${view.type}`;
|
|
14609
14705
|
const dataView = (hAsync("revogr-overlay-selection", Object.assign({}, data, { isMobileDevice: isMobile, selectionStore: data.segmentSelectionStore, onSelectall: () => this.selectionStoreConnector.selectAll(), editors: this.editors, readonly: this.readonly, range: this.range, useClipboard: this.useClipboard, applyChangesOnClose: this.applyOnClose, additionalData: this.additionalData, slot: data.slot, onCanceledit: () => this.selectionStoreConnector.setEdit(false), onSetedit: ({ detail }) => {
|
|
14610
14706
|
const event = this.beforeeditstart.emit(detail);
|
|
@@ -14623,11 +14719,11 @@ class RevoGridComponent {
|
|
|
14623
14719
|
const typeCol = 'rgCol';
|
|
14624
14720
|
const viewports = this.viewportProvider.stores;
|
|
14625
14721
|
const dimensions = this.dimensionProvider.stores;
|
|
14626
|
-
return (hAsync(Host, { key: '
|
|
14722
|
+
return (hAsync(Host, { key: 'f0d986b0d53c989e8f45491d6daa86062ab28b73', [`${UUID}`]: this.uuid }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: '6299b1dbf4d1a2a6701789d21382a30093188e45', class: "main-viewport", onClick: (e) => {
|
|
14627
14723
|
if (e.currentTarget === e.target) {
|
|
14628
14724
|
this.viewport.clearEdit();
|
|
14629
14725
|
}
|
|
14630
|
-
} }, hAsync("div", { key: '
|
|
14726
|
+
} }, hAsync("div", { key: '61d52d916f03c730704e7cfaa2afaf2cb91de0e7', class: "viewports" }, hAsync("slot", { key: '8250aaeba4cac754d324145bb2940f4db01a901d', name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { key: 'f18b9209c7a804cc4c295afcc70f6d375d8ad45d', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { key: 'ef29f4dc8b587ac3bbfc0d76e7ffa9f9231e0c63', ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { key: 'f8c4b8bd1cda04f2ab17b96cd7ec46faeeb6d7ad', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
|
|
14631
14727
|
}
|
|
14632
14728
|
get element() { return getElement(this); }
|
|
14633
14729
|
static get watchers() { return {
|