@revolist/revogrid 4.0.10 → 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/{key.utils-dc4ac217.js → key.utils-59b9b528.js} +13 -1
- package/dist/cjs/key.utils-59b9b528.js.map +1 -0
- 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 -131
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +28 -11
- 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/edit.utils.js +4 -0
- package/dist/collection/components/editors/edit.utils.js.map +1 -1
- package/dist/collection/components/editors/revogr-edit.js +30 -12
- package/dist/collection/components/editors/revogr-edit.js.map +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/types/selection.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/{key.utils-4586a3d6.js → key.utils-2836e8ae.js} +12 -2
- package/dist/esm/key.utils-2836e8ae.js.map +1 -0
- 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 +177 -132
- package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
- package/dist/esm/revogr-clipboard_3.entry.js +28 -11
- 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/key.utils-2836e8ae.js +5 -0
- package/dist/revo-grid/key.utils-2836e8ae.js.map +1 -0
- 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 +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/editors/edit.utils.d.ts +2 -0
- 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/types/selection.d.ts +1 -1
- package/dist/types/utils/events.d.ts +4 -1
- package/dist/types/utils/row-header-utils.d.ts +1 -1
- package/hydrate/index.js +296 -179
- 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-edit2.js +37 -11
- package/standalone/revogr-edit2.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 +142 -150
- 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/cjs/key.utils-dc4ac217.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/esm/key.utils-4586a3d6.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/revo-grid/key.utils-4586a3d6.js +0 -5
- package/dist/revo-grid/key.utils-4586a3d6.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 */
|
|
@@ -8708,6 +8739,10 @@ function getElStyle(range, dimensionRow, dimensionCol) {
|
|
|
8708
8739
|
function isEditInput(el) {
|
|
8709
8740
|
return !!(el === null || el === void 0 ? void 0 : el.closest(`.${EDIT_INPUT_WR}`));
|
|
8710
8741
|
}
|
|
8742
|
+
// Type guard for EditorCtrConstructible
|
|
8743
|
+
function isEditorCtrConstructible(editor) {
|
|
8744
|
+
return typeof editor === 'function' && typeof editor.prototype === 'object';
|
|
8745
|
+
}
|
|
8711
8746
|
|
|
8712
8747
|
var osPlatform;
|
|
8713
8748
|
(function (osPlatform) {
|
|
@@ -8837,9 +8872,9 @@ class KeyboardService {
|
|
|
8837
8872
|
constructor(sv) {
|
|
8838
8873
|
this.sv = sv;
|
|
8839
8874
|
}
|
|
8840
|
-
async keyDown(e, canRange) {
|
|
8875
|
+
async keyDown(e, canRange, isEditMode, { range, focus }) {
|
|
8841
8876
|
// IF EDIT MODE
|
|
8842
|
-
if (
|
|
8877
|
+
if (isEditMode) {
|
|
8843
8878
|
switch (e.code) {
|
|
8844
8879
|
case codesLetter.ESCAPE:
|
|
8845
8880
|
this.sv.cancel();
|
|
@@ -8849,12 +8884,12 @@ class KeyboardService {
|
|
|
8849
8884
|
}
|
|
8850
8885
|
// IF NOT EDIT MODE
|
|
8851
8886
|
// pressed clear key
|
|
8852
|
-
if (
|
|
8887
|
+
if (range && isClear(e.code)) {
|
|
8853
8888
|
this.sv.clearCell();
|
|
8854
8889
|
return;
|
|
8855
8890
|
}
|
|
8856
8891
|
// below works with focus only
|
|
8857
|
-
if (!
|
|
8892
|
+
if (!focus) {
|
|
8858
8893
|
return;
|
|
8859
8894
|
}
|
|
8860
8895
|
// tab key means same as arrow right
|
|
@@ -8930,7 +8965,7 @@ class KeyboardService {
|
|
|
8930
8965
|
}
|
|
8931
8966
|
if (isMulti) {
|
|
8932
8967
|
const eData = this.sv.getData();
|
|
8933
|
-
if (isAfterLast(data.end, eData) || isBeforeFirst(data.start)) {
|
|
8968
|
+
if (isAfterLast(data.end, eData.lastCell) || isBeforeFirst(data.start)) {
|
|
8934
8969
|
return false;
|
|
8935
8970
|
}
|
|
8936
8971
|
const range = getRange(data.start, data.end);
|
|
@@ -8958,32 +8993,6 @@ class KeyboardService {
|
|
|
8958
8993
|
}
|
|
8959
8994
|
}
|
|
8960
8995
|
|
|
8961
|
-
function isTouch(e) {
|
|
8962
|
-
return !!e.touches;
|
|
8963
|
-
}
|
|
8964
|
-
function verifyTouchTarget(touchEvent, focusClass) {
|
|
8965
|
-
if (focusClass && touchEvent) {
|
|
8966
|
-
if (!(touchEvent.target instanceof Element && touchEvent.target.classList.contains(focusClass))) {
|
|
8967
|
-
return false;
|
|
8968
|
-
}
|
|
8969
|
-
}
|
|
8970
|
-
return true;
|
|
8971
|
-
}
|
|
8972
|
-
function getFromEvent(e, prop, focusClass // for touch events
|
|
8973
|
-
) {
|
|
8974
|
-
if (isTouch(e)) {
|
|
8975
|
-
if (e.touches.length > 0) {
|
|
8976
|
-
const touchEvent = e.touches[0];
|
|
8977
|
-
if (!verifyTouchTarget(touchEvent, focusClass)) {
|
|
8978
|
-
return null;
|
|
8979
|
-
}
|
|
8980
|
-
return touchEvent[prop] || 0;
|
|
8981
|
-
}
|
|
8982
|
-
return null;
|
|
8983
|
-
}
|
|
8984
|
-
return e[prop] || 0;
|
|
8985
|
-
}
|
|
8986
|
-
|
|
8987
8996
|
class AutoFillService {
|
|
8988
8997
|
constructor(sv) {
|
|
8989
8998
|
this.sv = sv;
|
|
@@ -9008,7 +9017,10 @@ class AutoFillService {
|
|
|
9008
9017
|
return (hAsync("div", { class: {
|
|
9009
9018
|
[CELL_HANDLER_CLASS]: true,
|
|
9010
9019
|
[MOBILE_CLASS]: true,
|
|
9011
|
-
}, style: {
|
|
9020
|
+
}, style: {
|
|
9021
|
+
left: `${handlerStyle.right}px`,
|
|
9022
|
+
top: `${handlerStyle.bottom}px`,
|
|
9023
|
+
}, onMouseDown: (e) => this.autoFillHandler(e), onTouchStart: (e) => this.autoFillHandler(e) }));
|
|
9012
9024
|
}
|
|
9013
9025
|
autoFillHandler(e, type = "AutoFill" /* AutoFillType.autoFill */) {
|
|
9014
9026
|
let target = null;
|
|
@@ -9024,7 +9036,9 @@ class AutoFillService {
|
|
|
9024
9036
|
get isAutoFill() {
|
|
9025
9037
|
return !!this.autoFillType;
|
|
9026
9038
|
}
|
|
9027
|
-
/**
|
|
9039
|
+
/**
|
|
9040
|
+
* Process mouse move events
|
|
9041
|
+
*/
|
|
9028
9042
|
selectionMouseMove(e) {
|
|
9029
9043
|
// initiate mouse move debounce if not present
|
|
9030
9044
|
if (!this.onMouseMoveAutofill) {
|
|
@@ -9034,9 +9048,7 @@ class AutoFillService {
|
|
|
9034
9048
|
this.onMouseMoveAutofill(e, this.sv.getData());
|
|
9035
9049
|
}
|
|
9036
9050
|
}
|
|
9037
|
-
getFocus() {
|
|
9038
|
-
let focus = this.sv.selectionStoreService.focused;
|
|
9039
|
-
const range = this.sv.selectionStoreService.ranged;
|
|
9051
|
+
getFocus(focus, range) {
|
|
9040
9052
|
// there was an issue that it was taking last cell from range but focus was out
|
|
9041
9053
|
if (!focus && range) {
|
|
9042
9054
|
focus = { x: range.x, y: range.y };
|
|
@@ -9052,8 +9064,8 @@ class AutoFillService {
|
|
|
9052
9064
|
if (!this.autoFillInitial) {
|
|
9053
9065
|
return;
|
|
9054
9066
|
}
|
|
9055
|
-
const x =
|
|
9056
|
-
const y =
|
|
9067
|
+
const x = getPropertyFromEvent(event, 'clientX', MOBILE_CLASS);
|
|
9068
|
+
const y = getPropertyFromEvent(event, 'clientY', MOBILE_CLASS);
|
|
9057
9069
|
// skip touch
|
|
9058
9070
|
if (x === null || y === null) {
|
|
9059
9071
|
return;
|
|
@@ -9066,11 +9078,12 @@ class AutoFillService {
|
|
|
9066
9078
|
}
|
|
9067
9079
|
}
|
|
9068
9080
|
// check if not the latest, if latest - do nothing
|
|
9069
|
-
if (isAfterLast(current, data)) {
|
|
9081
|
+
if (isAfterLast(current, data.lastCell)) {
|
|
9070
9082
|
return;
|
|
9071
9083
|
}
|
|
9072
9084
|
this.autoFillLast = current;
|
|
9073
|
-
const isSame = current.x === this.autoFillInitial.x &&
|
|
9085
|
+
const isSame = current.x === this.autoFillInitial.x &&
|
|
9086
|
+
current.y === this.autoFillInitial.y;
|
|
9074
9087
|
// if same as initial - clear
|
|
9075
9088
|
if (isSame) {
|
|
9076
9089
|
this.sv.setTempRange(null);
|
|
@@ -9091,39 +9104,48 @@ class AutoFillService {
|
|
|
9091
9104
|
selectionStart(target, data, type = "Selection" /* AutoFillType.selection */) {
|
|
9092
9105
|
/** Get cell by autofill element */
|
|
9093
9106
|
const { top, left } = target.getBoundingClientRect();
|
|
9094
|
-
this.autoFillInitial = this.getFocus();
|
|
9107
|
+
this.autoFillInitial = this.getFocus(data.focus, data.range);
|
|
9095
9108
|
this.autoFillType = type;
|
|
9096
9109
|
this.autoFillStart = getCurrentCell({ x: left, y: top }, data);
|
|
9097
9110
|
}
|
|
9098
9111
|
/**
|
|
9099
|
-
* Clear current range selection
|
|
9100
|
-
* on mouse up and mouse leave events
|
|
9112
|
+
* Clear current range selection on mouse up and mouse leave events
|
|
9101
9113
|
*/
|
|
9102
|
-
clearAutoFillSelection() {
|
|
9103
|
-
//
|
|
9114
|
+
clearAutoFillSelection(focus, oldRange) {
|
|
9115
|
+
// If autofill was active, apply autofill values
|
|
9104
9116
|
if (this.autoFillInitial) {
|
|
9105
|
-
//
|
|
9106
|
-
this.autoFillInitial = this.getFocus();
|
|
9107
|
-
// Apply range data if
|
|
9117
|
+
// Fetch latest focus
|
|
9118
|
+
this.autoFillInitial = this.getFocus(focus, oldRange);
|
|
9119
|
+
// Apply range data if autofill mode is active
|
|
9108
9120
|
if (this.autoFillType === "AutoFill" /* AutoFillType.autoFill */) {
|
|
9109
9121
|
const range = getRange(this.autoFillInitial, this.autoFillLast);
|
|
9122
|
+
// If range is present, apply data
|
|
9110
9123
|
if (range) {
|
|
9111
|
-
const { defaultPrevented: stopApply, detail: { range: newRange } } = this.sv.clearRangeDataApply({
|
|
9124
|
+
const { defaultPrevented: stopApply, detail: { range: newRange }, } = this.sv.clearRangeDataApply({
|
|
9112
9125
|
range,
|
|
9113
9126
|
});
|
|
9127
|
+
// If data apply was not prevented, apply new range
|
|
9114
9128
|
if (!stopApply) {
|
|
9115
|
-
this.applyRangeWithData(newRange);
|
|
9129
|
+
this.applyRangeWithData(newRange, oldRange);
|
|
9116
9130
|
}
|
|
9117
9131
|
else {
|
|
9118
|
-
//
|
|
9132
|
+
// If data apply was prevented, clear temporary range
|
|
9119
9133
|
this.sv.setTempRange(null);
|
|
9120
9134
|
}
|
|
9121
9135
|
}
|
|
9122
9136
|
}
|
|
9123
9137
|
else {
|
|
9138
|
+
// If not autofill mode, apply range only
|
|
9124
9139
|
this.applyRangeOnly(this.autoFillInitial, this.autoFillLast);
|
|
9125
9140
|
}
|
|
9126
9141
|
}
|
|
9142
|
+
// Reset autofill state
|
|
9143
|
+
this.resetAutoFillState();
|
|
9144
|
+
}
|
|
9145
|
+
/**
|
|
9146
|
+
* Reset autofill state
|
|
9147
|
+
*/
|
|
9148
|
+
resetAutoFillState() {
|
|
9127
9149
|
this.autoFillType = null;
|
|
9128
9150
|
this.autoFillInitial = null;
|
|
9129
9151
|
this.autoFillLast = null;
|
|
@@ -9143,8 +9165,7 @@ class AutoFillService {
|
|
|
9143
9165
|
this.sv.setRange(range);
|
|
9144
9166
|
}
|
|
9145
9167
|
/** Apply range and copy data during range application */
|
|
9146
|
-
applyRangeWithData(newRange) {
|
|
9147
|
-
const oldRange = this.sv.selectionStoreService.ranged;
|
|
9168
|
+
applyRangeWithData(newRange, oldRange) {
|
|
9148
9169
|
const rangeData = {
|
|
9149
9170
|
type: this.sv.dataStore.get('type'),
|
|
9150
9171
|
colType: this.sv.columnService.type,
|
|
@@ -9186,6 +9207,9 @@ class AutoFillService {
|
|
|
9186
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}";
|
|
9187
9208
|
var RevogrOverlaySelectionStyle0 = revogrOverlayStyleCss;
|
|
9188
9209
|
|
|
9210
|
+
/**
|
|
9211
|
+
* Component for overlaying the grid with the selection.
|
|
9212
|
+
*/
|
|
9189
9213
|
class OverlaySelection {
|
|
9190
9214
|
constructor(hostRef) {
|
|
9191
9215
|
registerInstance(this, hostRef);
|
|
@@ -9233,44 +9257,60 @@ class OverlaySelection {
|
|
|
9233
9257
|
// #endregion
|
|
9234
9258
|
// #region Listeners
|
|
9235
9259
|
onMouseMove(e) {
|
|
9236
|
-
if (this.
|
|
9260
|
+
if (this.selectionStore.get('focus')) {
|
|
9237
9261
|
this.autoFillService.selectionMouseMove(e);
|
|
9238
9262
|
}
|
|
9239
9263
|
}
|
|
9240
|
-
/**
|
|
9241
|
-
|
|
9264
|
+
/**
|
|
9265
|
+
* Action finished inside of the document.
|
|
9266
|
+
* Pointer left document, clear any active operation.
|
|
9267
|
+
*/
|
|
9242
9268
|
onMouseUp() {
|
|
9243
|
-
|
|
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'));
|
|
9244
9273
|
}
|
|
9245
|
-
/**
|
|
9274
|
+
/**
|
|
9275
|
+
* Row drag started.
|
|
9276
|
+
* This event is fired when drag action started on cell.
|
|
9277
|
+
*/
|
|
9246
9278
|
onCellDrag(e) {
|
|
9247
9279
|
var _a;
|
|
9280
|
+
// Invoke drag start on order editor.
|
|
9248
9281
|
(_a = this.orderEditor) === null || _a === void 0 ? void 0 : _a.dragStart(e.detail);
|
|
9249
9282
|
}
|
|
9250
|
-
/**
|
|
9283
|
+
/**
|
|
9284
|
+
* Get keyboard down from element.
|
|
9285
|
+
* This event is fired when keyboard key is released.
|
|
9286
|
+
*/
|
|
9251
9287
|
onKeyUp(e) {
|
|
9288
|
+
// Emit before key up event.
|
|
9252
9289
|
this.beforeKeyUp.emit(e);
|
|
9253
9290
|
}
|
|
9254
|
-
/**
|
|
9291
|
+
/**
|
|
9292
|
+
* Get keyboard down from element.
|
|
9293
|
+
* This event is fired when keyboard key is pressed.
|
|
9294
|
+
*/
|
|
9255
9295
|
onKeyDown(e) {
|
|
9256
9296
|
var _a;
|
|
9297
|
+
// Emit before key down event and check if default prevention is set.
|
|
9257
9298
|
const proxy = this.beforeKeyDown.emit(e);
|
|
9258
9299
|
if (e.defaultPrevented || proxy.defaultPrevented) {
|
|
9259
9300
|
return;
|
|
9260
9301
|
}
|
|
9261
|
-
|
|
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
|
+
});
|
|
9262
9307
|
}
|
|
9263
9308
|
// #endregion
|
|
9264
9309
|
/** Selection & Keyboard */
|
|
9265
9310
|
selectionServiceSet(s) {
|
|
9266
|
-
this.selectionStoreService = new SelectionStoreService(s, {
|
|
9267
|
-
changeRange: range => this.triggerRangeEvent(range),
|
|
9268
|
-
focus: (focus, end) => this.doFocus(focus, end),
|
|
9269
|
-
});
|
|
9270
9311
|
this.keyboardService = new KeyboardService({
|
|
9271
|
-
selectionStoreService: this.selectionStoreService,
|
|
9272
9312
|
selectionStore: s,
|
|
9273
|
-
range: r => this.
|
|
9313
|
+
range: r => this.triggerRangeEvent(r),
|
|
9274
9314
|
focusNext: (f, next) => this.doFocus(f, f, next),
|
|
9275
9315
|
change: val => {
|
|
9276
9316
|
if (this.readonly) {
|
|
@@ -9292,7 +9332,6 @@ class OverlaySelection {
|
|
|
9292
9332
|
/** Autofill */
|
|
9293
9333
|
createAutoFillService() {
|
|
9294
9334
|
this.autoFillService = new AutoFillService({
|
|
9295
|
-
selectionStoreService: this.selectionStoreService,
|
|
9296
9335
|
dimensionRow: this.dimensionRow,
|
|
9297
9336
|
dimensionCol: this.dimensionCol,
|
|
9298
9337
|
columnService: this.columnService,
|
|
@@ -9368,10 +9407,10 @@ class OverlaySelection {
|
|
|
9368
9407
|
nodes.push(editCell);
|
|
9369
9408
|
}
|
|
9370
9409
|
else {
|
|
9371
|
-
const range = this.
|
|
9372
|
-
const
|
|
9410
|
+
const range = this.selectionStore.get('range');
|
|
9411
|
+
const focus = this.selectionStore.get('focus');
|
|
9373
9412
|
// Clipboard
|
|
9374
|
-
if ((range ||
|
|
9413
|
+
if ((range || focus) && this.useClipboard) {
|
|
9375
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) }));
|
|
9376
9415
|
}
|
|
9377
9416
|
// Range
|
|
@@ -9379,23 +9418,19 @@ class OverlaySelection {
|
|
|
9379
9418
|
nodes.push(...this.renderRange(range));
|
|
9380
9419
|
}
|
|
9381
9420
|
// Autofill
|
|
9382
|
-
if (
|
|
9383
|
-
nodes.push(this.autoFillService.renderAutofill(range,
|
|
9421
|
+
if (focus && !this.readonly && this.range) {
|
|
9422
|
+
nodes.push(this.autoFillService.renderAutofill(range, focus));
|
|
9384
9423
|
}
|
|
9385
9424
|
// Order
|
|
9386
9425
|
if (this.canDrag) {
|
|
9387
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) }));
|
|
9388
9427
|
}
|
|
9389
9428
|
}
|
|
9390
|
-
return (hAsync(Host, { key: '
|
|
9391
|
-
// Open Editor on DblClick
|
|
9392
|
-
onDblClick: (e) => {
|
|
9393
|
-
// DblClick prevented outside - Editor will not open
|
|
9394
|
-
if (!e.defaultPrevented) {
|
|
9395
|
-
this.doEdit();
|
|
9396
|
-
}
|
|
9397
|
-
}, 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" })));
|
|
9398
9430
|
}
|
|
9431
|
+
/**
|
|
9432
|
+
* Executes the focus operation on the specified range of cells.
|
|
9433
|
+
*/
|
|
9399
9434
|
doFocus(focus, end, next) {
|
|
9400
9435
|
const { defaultPrevented } = this.beforeFocusCell.emit(this.columnService.getSaveData(focus.y, focus.x));
|
|
9401
9436
|
if (defaultPrevented) {
|
|
@@ -9429,31 +9464,48 @@ class OverlaySelection {
|
|
|
9429
9464
|
}
|
|
9430
9465
|
return !e.defaultPrevented;
|
|
9431
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
|
+
*/
|
|
9432
9483
|
onElementMouseDown(e, touch = false) {
|
|
9484
|
+
// Get the target element from the event object
|
|
9485
|
+
const targetElement = e.target;
|
|
9433
9486
|
// Ignore focus if clicked input
|
|
9434
|
-
if (isEditInput(
|
|
9487
|
+
if (isEditInput(targetElement)) {
|
|
9435
9488
|
return;
|
|
9436
9489
|
}
|
|
9490
|
+
// Get data from the component
|
|
9437
9491
|
const data = this.getData();
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
}
|
|
9441
|
-
const x = getFromEvent(e, 'clientX');
|
|
9442
|
-
const y = getFromEvent(e, 'clientY');
|
|
9443
|
-
// skip touch
|
|
9444
|
-
if (x === null || y === null) {
|
|
9492
|
+
const focusCell = getFocusCellBasedOnEvent(e, data);
|
|
9493
|
+
if (!focusCell) {
|
|
9445
9494
|
return;
|
|
9446
9495
|
}
|
|
9447
|
-
//
|
|
9448
|
-
|
|
9449
|
-
this.selectionStoreService.focus(focusCell, this.range && e.shiftKey);
|
|
9496
|
+
// Set focus on the current cell
|
|
9497
|
+
this.focus(focusCell, this.range && e.shiftKey);
|
|
9450
9498
|
// Initiate autofill selection
|
|
9451
9499
|
if (this.range) {
|
|
9452
|
-
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
|
|
9453
9503
|
if (!touch) {
|
|
9454
9504
|
e.preventDefault();
|
|
9455
9505
|
}
|
|
9456
9506
|
else if (verifyTouchTarget(e.touches[0], MOBILE_CLASS)) {
|
|
9507
|
+
// Prevent default behavior for touch events
|
|
9508
|
+
// if target element is a mobile input
|
|
9457
9509
|
e.preventDefault();
|
|
9458
9510
|
}
|
|
9459
9511
|
}
|
|
@@ -9464,8 +9516,8 @@ class OverlaySelection {
|
|
|
9464
9516
|
doEdit(val = '') {
|
|
9465
9517
|
var _a;
|
|
9466
9518
|
if (this.canEdit()) {
|
|
9467
|
-
const
|
|
9468
|
-
const data = this.columnService.getSaveData(
|
|
9519
|
+
const focus = this.selectionStore.get('focus');
|
|
9520
|
+
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
9469
9521
|
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
9470
9522
|
}
|
|
9471
9523
|
}
|
|
@@ -9488,8 +9540,8 @@ class OverlaySelection {
|
|
|
9488
9540
|
this.cellEditApply.emit(dataToSave);
|
|
9489
9541
|
}
|
|
9490
9542
|
getRegion() {
|
|
9491
|
-
const focus = this.
|
|
9492
|
-
let range = this.
|
|
9543
|
+
const focus = this.selectionStore.get('focus');
|
|
9544
|
+
let range = this.selectionStore.get('range');
|
|
9493
9545
|
if (!range) {
|
|
9494
9546
|
range = getRange(focus, focus);
|
|
9495
9547
|
}
|
|
@@ -9515,8 +9567,8 @@ class OverlaySelection {
|
|
|
9515
9567
|
return true;
|
|
9516
9568
|
}
|
|
9517
9569
|
onPaste(data) {
|
|
9518
|
-
const focus = this.
|
|
9519
|
-
const isEditing = this.
|
|
9570
|
+
const focus = this.selectionStore.get('focus');
|
|
9571
|
+
const isEditing = this.selectionStore.get('edit') !== null;
|
|
9520
9572
|
if (!focus || isEditing) {
|
|
9521
9573
|
return;
|
|
9522
9574
|
}
|
|
@@ -9536,13 +9588,13 @@ class OverlaySelection {
|
|
|
9536
9588
|
}
|
|
9537
9589
|
}
|
|
9538
9590
|
clearCell() {
|
|
9539
|
-
if (this.
|
|
9540
|
-
!isRangeSingleCell(this.
|
|
9541
|
-
const data = this.columnService.getRangeStaticData(this.
|
|
9542
|
-
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'));
|
|
9543
9595
|
}
|
|
9544
9596
|
else if (this.canEdit()) {
|
|
9545
|
-
const focused = this.
|
|
9597
|
+
const focused = this.selectionStore.get('focus');
|
|
9546
9598
|
const cell = this.columnService.getSaveData(focused.y, focused.x);
|
|
9547
9599
|
this.cellEdit({
|
|
9548
9600
|
rgRow: focused.y,
|
|
@@ -9564,8 +9616,24 @@ class OverlaySelection {
|
|
|
9564
9616
|
if (this.readonly) {
|
|
9565
9617
|
return false;
|
|
9566
9618
|
}
|
|
9567
|
-
const
|
|
9568
|
-
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);
|
|
9569
9637
|
}
|
|
9570
9638
|
get types() {
|
|
9571
9639
|
return {
|
|
@@ -9582,6 +9650,8 @@ class OverlaySelection {
|
|
|
9582
9650
|
rows: this.dimensionRow.state,
|
|
9583
9651
|
cols: this.dimensionCol.state,
|
|
9584
9652
|
lastCell: this.lastCell,
|
|
9653
|
+
focus: this.selectionStore.get('focus'),
|
|
9654
|
+
range: this.selectionStore.get('range'),
|
|
9585
9655
|
};
|
|
9586
9656
|
}
|
|
9587
9657
|
get element() { return getElement(this); }
|
|
@@ -9761,17 +9831,34 @@ class RevoEdit {
|
|
|
9761
9831
|
this.preventSaveOnClose = false;
|
|
9762
9832
|
// Custom editor usage.
|
|
9763
9833
|
// Start with TextEditor (editors/text.tsx) for Custom editor.
|
|
9834
|
+
// It can be class or function
|
|
9764
9835
|
if (this.editor) {
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9836
|
+
// if editor is constructible
|
|
9837
|
+
if (isEditorCtrConstructible(this.editor)) {
|
|
9838
|
+
this.currentEditor = new this.editor(this.column,
|
|
9839
|
+
// save callback
|
|
9840
|
+
(e, preventFocus) => {
|
|
9841
|
+
this.onSave(e, preventFocus);
|
|
9842
|
+
},
|
|
9843
|
+
// cancel callback
|
|
9844
|
+
focusNext => {
|
|
9845
|
+
this.preventSaveOnClose = true;
|
|
9846
|
+
this.closeEdit.emit(focusNext);
|
|
9847
|
+
});
|
|
9848
|
+
// if editor is function
|
|
9849
|
+
}
|
|
9850
|
+
else {
|
|
9851
|
+
this.currentEditor = this.editor(this.column,
|
|
9852
|
+
// save callback
|
|
9853
|
+
(e, preventFocus) => {
|
|
9854
|
+
this.onSave(e, preventFocus);
|
|
9855
|
+
},
|
|
9856
|
+
// cancel callback
|
|
9857
|
+
focusNext => {
|
|
9858
|
+
this.preventSaveOnClose = true;
|
|
9859
|
+
this.closeEdit.emit(focusNext);
|
|
9860
|
+
});
|
|
9861
|
+
}
|
|
9775
9862
|
return;
|
|
9776
9863
|
}
|
|
9777
9864
|
// Default text editor usage
|
|
@@ -12879,16 +12966,30 @@ class GroupingRowPlugin extends BasePlugin {
|
|
|
12879
12966
|
}
|
|
12880
12967
|
}
|
|
12881
12968
|
|
|
12882
|
-
/**
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
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
|
+
*/
|
|
12888
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.
|
|
12889
12990
|
return {
|
|
12890
|
-
x:
|
|
12891
|
-
y:
|
|
12991
|
+
x: lastVisibleColumnCount,
|
|
12992
|
+
y: lastVisibleRowCount,
|
|
12892
12993
|
};
|
|
12893
12994
|
}
|
|
12894
12995
|
|
|
@@ -13043,6 +13144,7 @@ class ViewportService {
|
|
|
13043
13144
|
colData: data.colStore,
|
|
13044
13145
|
viewportCol: data.viewports[data.colType].store,
|
|
13045
13146
|
viewportRow: data.viewports[type].store,
|
|
13147
|
+
// lastCell is the last real coordinate + 1
|
|
13046
13148
|
lastCell: getLastCell(data, type),
|
|
13047
13149
|
slot,
|
|
13048
13150
|
type,
|
|
@@ -13251,9 +13353,9 @@ const OrderRenderer = ({ ref }) => {
|
|
|
13251
13353
|
};
|
|
13252
13354
|
|
|
13253
13355
|
const LETTER_BLOCK_SIZE = 10;
|
|
13254
|
-
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn) => {
|
|
13356
|
+
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn, minWidth = 50) => {
|
|
13255
13357
|
return ((rowHeaderColumn === null || rowHeaderColumn === void 0 ? void 0 : rowHeaderColumn.size) ||
|
|
13256
|
-
(itemsLength.toString().length + 1) * LETTER_BLOCK_SIZE);
|
|
13358
|
+
Math.max((itemsLength.toString().length + 1) * LETTER_BLOCK_SIZE, minWidth));
|
|
13257
13359
|
};
|
|
13258
13360
|
|
|
13259
13361
|
class StretchColumn extends BasePlugin {
|
|
@@ -13901,7 +14003,7 @@ function isMobileDevice() {
|
|
|
13901
14003
|
return /Mobi/i.test(navigator.userAgent) || /Android/i.test(navigator.userAgent) || navigator.maxTouchPoints > 0;
|
|
13902
14004
|
}
|
|
13903
14005
|
|
|
13904
|
-
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}";
|
|
13905
14007
|
var RevoGridStyle0 = revoGridStyleCss;
|
|
13906
14008
|
|
|
13907
14009
|
/**
|
|
@@ -14189,16 +14291,19 @@ class RevoGridComponent {
|
|
|
14189
14291
|
return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange();
|
|
14190
14292
|
}
|
|
14191
14293
|
mousedownHandle(event) {
|
|
14192
|
-
const screenX =
|
|
14193
|
-
const screenY =
|
|
14294
|
+
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
14295
|
+
const screenY = getPropertyFromEvent(event, 'screenY');
|
|
14194
14296
|
if (screenX === null || screenY === null) {
|
|
14195
14297
|
return;
|
|
14196
14298
|
}
|
|
14197
14299
|
this.clickTrackForFocusClear = screenX + screenY;
|
|
14198
14300
|
}
|
|
14301
|
+
/**
|
|
14302
|
+
* To keep your elements from losing focus use mouseup/touchend e.preventDefault();
|
|
14303
|
+
*/
|
|
14199
14304
|
mouseupHandle(event) {
|
|
14200
|
-
const screenX =
|
|
14201
|
-
const screenY =
|
|
14305
|
+
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
14306
|
+
const screenY = getPropertyFromEvent(event, 'screenY');
|
|
14202
14307
|
if (screenX === null || screenY === null) {
|
|
14203
14308
|
return;
|
|
14204
14309
|
}
|
|
@@ -14332,7 +14437,19 @@ class RevoGridComponent {
|
|
|
14332
14437
|
this.dimensionProvider.setSettings({ originItemSize: this.colSize }, 'rgCol');
|
|
14333
14438
|
// if theme change we need to reapply row size and reset viewport
|
|
14334
14439
|
if (!init) {
|
|
14335
|
-
|
|
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);
|
|
14336
14453
|
}
|
|
14337
14454
|
}
|
|
14338
14455
|
dataSourceChanged(newVal = [], _, watchName) {
|
|
@@ -14580,10 +14697,10 @@ class RevoGridComponent {
|
|
|
14580
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 });
|
|
14581
14698
|
// Column headers
|
|
14582
14699
|
const dataViews = [
|
|
14583
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14700
|
+
hAsync("revogr-header", Object.assign({ key: '1b32ad72b926f749230e2f596329176bdb29b425' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14584
14701
|
];
|
|
14585
14702
|
// Render viewport data (vertical sections)
|
|
14586
|
-
view.dataPorts.forEach(
|
|
14703
|
+
view.dataPorts.forEach(data => {
|
|
14587
14704
|
const key = `${data.type}_${view.type}`;
|
|
14588
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 }) => {
|
|
14589
14706
|
const event = this.beforeeditstart.emit(detail);
|
|
@@ -14602,11 +14719,11 @@ class RevoGridComponent {
|
|
|
14602
14719
|
const typeCol = 'rgCol';
|
|
14603
14720
|
const viewports = this.viewportProvider.stores;
|
|
14604
14721
|
const dimensions = this.dimensionProvider.stores;
|
|
14605
|
-
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) => {
|
|
14606
14723
|
if (e.currentTarget === e.target) {
|
|
14607
14724
|
this.viewport.clearEdit();
|
|
14608
14725
|
}
|
|
14609
|
-
} }, 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));
|
|
14610
14727
|
}
|
|
14611
14728
|
get element() { return getElement(this); }
|
|
14612
14729
|
static get watchers() { return {
|