@revolist/revogrid 4.23.12 → 4.23.14

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.
Files changed (61) hide show
  1. package/dist/cjs/{cell-renderer-DfUCisis.js → cell-renderer-Dcz022q7.js} +5 -23
  2. package/dist/cjs/{column.drag.plugin-BRraLvz3.js → column.drag.plugin-BGLbi1zS.js} +8 -37
  3. package/dist/cjs/{column.service-BNWNiJW3.js → column.service-C1Qvcf5l.js} +23 -62
  4. package/dist/cjs/{header-cell-renderer-DyjOxArm.js → header-cell-renderer-vVr4IWNV.js} +1 -1
  5. package/dist/cjs/index.cjs.js +4 -5
  6. package/dist/cjs/revo-grid.cjs.entry.js +5 -5
  7. package/dist/cjs/revogr-attribution_7.cjs.entry.js +4 -40
  8. package/dist/cjs/revogr-data_4.cjs.entry.js +5 -13
  9. package/dist/cjs/revogr-filter-panel.cjs.entry.js +67 -32
  10. package/dist/collection/components/data/column.service.js +23 -62
  11. package/dist/collection/components/data/row-renderer.js +2 -15
  12. package/dist/collection/components/overlay/revogr-overlay-selection.js +7 -27
  13. package/dist/collection/components/revoGrid/revo-grid.js +7 -14
  14. package/dist/collection/components/scroll/revogr-viewport-scroll.js +2 -10
  15. package/dist/collection/plugins/filter/filter.panel.js +66 -31
  16. package/dist/collection/plugins/filter/filter.plugin.js +4 -4
  17. package/dist/collection/plugins/filter/filter.style.css +18 -34
  18. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +2 -7
  19. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +2 -30
  20. package/dist/collection/serve/controller.js +0 -1
  21. package/dist/esm/{cell-renderer-CLTRlCa5.js → cell-renderer-BtN-NGCk.js} +5 -23
  22. package/dist/esm/{column.drag.plugin-V9DDE3mU.js → column.drag.plugin-4Ixr4ijU.js} +9 -37
  23. package/dist/esm/{column.service-C6hByxPy.js → column.service-CC_SD8W3.js} +23 -62
  24. package/dist/esm/{header-cell-renderer-BMmXRsd_.js → header-cell-renderer-B-LX2sgu.js} +1 -1
  25. package/dist/esm/index.js +5 -5
  26. package/dist/esm/revo-grid.entry.js +5 -5
  27. package/dist/esm/revogr-attribution_7.entry.js +4 -40
  28. package/dist/esm/revogr-data_4.entry.js +5 -13
  29. package/dist/esm/revogr-filter-panel.entry.js +67 -32
  30. package/dist/revo-grid/{cell-renderer-CLTRlCa5.js → cell-renderer-BtN-NGCk.js} +5 -23
  31. package/dist/revo-grid/{column.drag.plugin-V9DDE3mU.js → column.drag.plugin-4Ixr4ijU.js} +9 -37
  32. package/dist/revo-grid/{column.service-C6hByxPy.js → column.service-CC_SD8W3.js} +23 -62
  33. package/dist/revo-grid/{header-cell-renderer-BMmXRsd_.js → header-cell-renderer-B-LX2sgu.js} +1 -1
  34. package/dist/revo-grid/index.esm.js +5 -5
  35. package/dist/revo-grid/revo-grid.entry.js +5 -5
  36. package/dist/revo-grid/revogr-attribution_7.entry.js +4 -40
  37. package/dist/revo-grid/revogr-data_4.entry.js +5 -13
  38. package/dist/revo-grid/revogr-filter-panel.entry.js +67 -32
  39. package/dist/types/components/data/column.service.d.ts +1 -10
  40. package/dist/types/components/data/row-renderer.d.ts +1 -1
  41. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +3 -4
  42. package/dist/types/components/revoGrid/revo-grid.d.ts +4 -4
  43. package/dist/types/components.d.ts +14 -14
  44. package/dist/types/plugins/filter/filter.panel.d.ts +4 -0
  45. package/dist/types/plugins/filter/filter.plugin.d.ts +0 -1
  46. package/dist/types/plugins/filter/filter.types.d.ts +0 -1
  47. package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +0 -4
  48. package/dist/types/types/interfaces.d.ts +0 -8
  49. package/hydrate/index.js +107 -201
  50. package/hydrate/index.mjs +107 -201
  51. package/package.json +1 -1
  52. package/readme.md +1 -20
  53. package/standalone/column.service.js +1 -1
  54. package/standalone/index.js +1 -1
  55. package/standalone/revo-grid.js +1 -1
  56. package/standalone/revogr-data2.js +1 -1
  57. package/standalone/revogr-filter-panel.js +1 -1
  58. package/standalone/revogr-overlay-selection2.js +1 -1
  59. package/standalone/revogr-viewport-scroll2.js +1 -1
  60. package/dist/collection/components/overlay/clipboard.utils.js +0 -26
  61. package/dist/types/components/overlay/clipboard.utils.d.ts +0 -3
@@ -4,7 +4,7 @@
4
4
  import { r as registerInstance, h, e as Host, d as createEvent, g as getElement } from './index-Chp_81rd.js';
5
5
  import { k as getItemByIndex, b as getSourceItem, j as getItemByPosition, F as FOCUS_CLASS, I as codesLetter, R as RESIZE_INTERVAL, y as MOBILE_CLASS, z as CELL_HANDLER_CLASS, S as SELECTION_BORDER_CLASS, D as DataStore, q as ROW_HEADER_TYPE, T as TMP_SELECTION_BG_CLASS } from './dimension.helpers-CGKwSvw6.js';
6
6
  import { g as getPropertyFromEvent, v as verifyTouchTarget } from './events-BvSmBueA.js';
7
- import { g as getRange, M as ColumnService, z as getCellData, N as getCellEditor, b as isRangeSingleCell } from './column.service-C6hByxPy.js';
7
+ import { g as getRange, M as ColumnService, z as getCellData, N as getCellEditor, b as isRangeSingleCell } from './column.service-CC_SD8W3.js';
8
8
  import { l as isShortcutModifier, m as isEditInput, c as isClear, d as isTab, f as isEnterKeyValue, h as isCopy, g as isCut, j as isPaste, k as isAll } from './edit.utils-Dnnbd0xG.js';
9
9
  import { t as timeout, g as getScrollbarSize } from './index-Db3qZoW5.js';
10
10
  import { d as debounce } from './debounce-PCRWZliA.js';
@@ -649,30 +649,6 @@ class AutoFillService {
649
649
  }
650
650
  }
651
651
 
652
- function getRangeFillClipboardData(data, useClipboard) {
653
- var _a;
654
- if (!isClipboardRangeFillEnabled(useClipboard)) {
655
- return null;
656
- }
657
- const normalized = trimTrailingEmptyClipboardRows(data);
658
- return normalized.length === 1 && ((_a = normalized[0]) === null || _a === void 0 ? void 0 : _a.length) === 1
659
- ? normalized
660
- : null;
661
- }
662
- function isClipboardRangeFillEnabled(useClipboard) {
663
- return (typeof useClipboard === 'object' && useClipboard.rangeFill === true);
664
- }
665
- function trimTrailingEmptyClipboardRows(data) {
666
- const rows = [...data];
667
- while (rows.length > 1 && isEmptyClipboardRow(rows[rows.length - 1])) {
668
- rows.pop();
669
- }
670
- return rows;
671
- }
672
- function isEmptyClipboardRow(row) {
673
- return !row || row.every(cell => cell === '');
674
- }
675
-
676
652
  const revogrOverlayStyleCss = () => `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}`;
677
653
 
678
654
  const OverlaySelection = class {
@@ -920,9 +896,9 @@ const OverlaySelection = class {
920
896
  nodes.push(h("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
921
897
  }
922
898
  }
923
- return (h(Host, { key: 'ff303c39d59e4ef217421fa11b9a80de07311b07', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
899
+ return (h(Host, { key: 'd936e8452e84c7a25ecd6502e929f1a5af69467f', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
924
900
  // it's done to be able to throw events from different levels, not just from editor
925
- onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: '3cbe4c3ad7d447f779e9e20f73eec2e3107275e0', name: "data" })));
901
+ onCelledit: (e) => this.onEditCell(e) }, nodes, h("slot", { key: 'cd3525d404aa44fd8d06e7fc459777acb8a9d585', name: "data" })));
926
902
  }
927
903
  /**
928
904
  * Executes the focus operation on the specified range of cells.
@@ -1087,25 +1063,13 @@ const OverlaySelection = class {
1087
1063
  if (!focus || isEditing) {
1088
1064
  return;
1089
1065
  }
1090
- const rangeFillData = getRangeFillClipboardData(data, this.useClipboard);
1091
- const targetRange = rangeFillData
1092
- ? this.getClipboardPasteTargetRange()
1093
- : null;
1094
- let { changed, range } = this.columnService.getTransformedDataToApply({
1095
- start: focus,
1096
- data: rangeFillData || data,
1097
- targetRange,
1098
- });
1066
+ let { changed, range } = this.columnService.getTransformedDataToApply(focus, data);
1099
1067
  const { defaultPrevented: canPaste } = this.rangeClipboardPaste.emit(Object.assign({ data: changed, models: collectModelsOfRange(changed, this.dataStore), range }, this.types));
1100
1068
  if (canPaste) {
1101
1069
  return;
1102
1070
  }
1103
1071
  (_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range, range);
1104
1072
  }
1105
- getClipboardPasteTargetRange() {
1106
- const range = this.selectionStore.get('range');
1107
- return range && !isRangeSingleCell(range) ? range : null;
1108
- }
1109
1073
  async focusNext() {
1110
1074
  var _a;
1111
1075
  const canFocus = await ((_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyChangeSelection(new KeyboardEvent('keydown', {
@@ -2,11 +2,11 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, e as Host, g as getElement } from './index-Chp_81rd.js';
5
- import { M as ColumnService, u as isGrouping } from './column.service-C6hByxPy.js';
5
+ import { M as ColumnService, u as isGrouping } from './column.service-CC_SD8W3.js';
6
6
  import { B as ROW_FOCUSED_CLASS, b as getSourceItem, n as DATA_ROW, m as DATA_COL, M as MIN_COL_SIZE, r as HEADER_SORTABLE_CLASS, H as HEADER_CLASS, F as FOCUS_CLASS, k as getItemByIndex, u as HEADER_ROW_CLASS, v as HEADER_ACTUAL_ROW_CLASS } from './dimension.helpers-CGKwSvw6.js';
7
- import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-CLTRlCa5.js';
7
+ import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-BtN-NGCk.js';
8
8
  import { c as FilterButton } from './filter.button-C8XTWPU2.js';
9
- import { H as HeaderCellRenderer } from './header-cell-renderer-BMmXRsd_.js';
9
+ import { H as HeaderCellRenderer } from './header-cell-renderer-B-LX2sgu.js';
10
10
  import { t as throttle, L as LocalScrollTimer, a as LocalScrollService, g as getContentSize } from './throttle-CaUDyxyU.js';
11
11
  import { H as HEADER_SLOT, C as CONTENT_SLOT, F as FOOTER_SLOT } from './viewport.helpers-CoCAvmZs.js';
12
12
  import './debounce-PCRWZliA.js';
@@ -828,17 +828,9 @@ const RevogrViewportScroll = class {
828
828
  }
829
829
  render() {
830
830
  var _a, _b;
831
- const clientHeight = (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0;
832
- // When content fits in the viewport (no scroll needed), don't inflate content-wrapper
833
- // to clientHeight — that would prevent inner-content-table from shrinking and push
834
- // rowPinEnd (footer) to the bottom instead of letting it follow the data rows.
835
- // For large/compressed grids (content > clientHeight), physicalContentHeight handles
836
- // the browser scroll-size compression correctly.
837
- const physicalContentHeight = this.contentHeight < clientHeight
838
- ? Math.max(this.contentHeight, 0)
839
- : getContentSize(this.contentHeight, clientHeight);
831
+ const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
840
832
  const physicalContentWidth = getContentSize(this.contentWidth, 0);
841
- return (h(Host, { key: '3dd9d29cf26743d7aa4995f51180d56008526e54', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: 'af75428e845044c33eba2fecd1ec04a9177b9b5c', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, h("div", { key: 'a0149f597588371e1fafe69efc3bd4411379a017', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: 'e5d2570bf93897cd97ef702141c83bb8c0e13ee2', name: HEADER_SLOT })), h("div", { key: 'd1388ff0d721dd8ce925b934bb2128fddc1ac17b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'a306ff56f62279402e2a881a081e3224341d5bdf', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, h("slot", { key: '898bda8e9429da06c9ff2bd41626ac27f3cde3cc', name: CONTENT_SLOT }))), h("div", { key: '5e9eba1edd5fca07a964971054a7900e4dd84099', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'f233ad1c23b3f692c45e1db235cfef4704a80726', name: FOOTER_SLOT })))));
833
+ return (h(Host, { key: 'ec8d907976c1d50f7aab3c263be3f0249a274df6', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: 'e35696a7993ac94261426b45c28d488cdc42b7f0', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, h("div", { key: 'a6997451e01eacda1d27d4efa1d74e1748626218', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '1d401e87d32d5b1531c2211723b552bbc894f22c', name: HEADER_SLOT })), h("div", { key: 'ceab6f9e812d6ca9a0aa376afcd2562a17f505e0', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'a9556578a23d6efddec2e982e863aec064042154', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, h("slot", { key: '0ae01f9736b9740612e75261f6e3abebda533377', name: CONTENT_SLOT }))), h("div", { key: '09c2565d4ed449a43820f92d97b6558fca3758e7', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: '1ffb08ff8138a560cc09d82e3fe22a53e502aafe', name: FOOTER_SLOT })))));
842
834
  }
843
835
  /**
844
836
  * Extra layer for scroll event monitoring, where MouseWheel event is not passing
@@ -24,7 +24,7 @@ import { i as isFilterBtn, e as AndOrButton, d as TrashButton } from './filter.b
24
24
  }
25
25
  })();
26
26
 
27
- const filterStyleCss = () => `.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;max-height:calc(100% - 80px);overflow:auto;opacity:1;transform:none;background-color:var(--revo-grid-filter-panel-bg, #fff);border:1px solid var(--revo-grid-filter-panel-border, #cecece);transform-origin:62px 0px;box-shadow:0 5px 18px -2px var(--revo-grid-filter-panel-shadow, rgba(0, 0, 0, 0.15));padding:10px;border-radius:8px;min-width:220px;text-align:left;animation:revogr-filter-panel-open 140ms cubic-bezier(0.2, 0, 0, 1)}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:var(--revo-grid-filter-panel-input-bg, #f3f3f3);border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}revogr-filter-panel .filter-actions button{margin-top:10px;margin-right:5px}@keyframes revogr-filter-panel-open{from{opacity:0;transform:translateY(-4px) scale(0.98)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){revogr-filter-panel{animation:none}}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid var(--revo-grid-filter-panel-select-border, #d9d9d9);box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:var(--revo-grid-filter-panel-input-bg, #f3f3f3);background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.select-css:focus{border-color:var(--revo-grid-filter-panel-select-border-hover, #d9d9d9);box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-row{display:flex;align-items:center;gap:6px}.multi-filter-list .multi-filter-list-action{display:flex;flex:0 0 auto;justify-content:flex-end;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9);height:10px}.select-input{display:flex;align-items:center;flex:1 1 auto;gap:6px;min-width:0}.select-input .select-filter,.select-input .filter-extra{flex:1 1 0;min-width:0}.select-input .filter-extra{display:flex}.select-input .filter-extra>*{width:100%}.select-input input[type=text],.select-input input[type=date]{margin:0}`;
27
+ const filterStyleCss = () => `.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-filter-panel{display:block}revogr-filter-panel .filter-panel-dialog{position:fixed;top:0;left:0;z-index:100;max-height:calc(100vh - 16px);overflow:auto;opacity:1;transform:none;background-color:var(--revo-grid-filter-panel-bg, #fff);border:1px solid var(--revo-grid-filter-panel-border, #cecece);transform-origin:62px 0px;box-shadow:0 5px 18px -2px var(--revo-grid-filter-panel-shadow, rgba(0, 0, 0, 0.15));padding:10px;border-radius:8px;margin:0;min-width:220px;text-align:left;animation:revogr-filter-panel-open 140ms cubic-bezier(0.2, 0, 0, 1)}revogr-filter-panel .filter-panel-dialog::backdrop{background:transparent}revogr-filter-panel .filter-panel-dialog .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel .filter-panel-dialog label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel .filter-panel-dialog select{width:100%}revogr-filter-panel .filter-panel-dialog input[type=text]{border:0;min-height:34px;margin:5px 0;background:var(--revo-grid-filter-panel-input-bg, #f3f3f3);border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel .filter-panel-dialog .filter-actions{text-align:right;margin-right:-5px}revogr-filter-panel .filter-panel-dialog .filter-actions button{margin-top:10px;margin-right:5px}@keyframes revogr-filter-panel-open{from{opacity:0;transform:translateY(-4px) scale(0.98)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){revogr-filter-panel .filter-panel-dialog{animation:none}}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid var(--revo-grid-filter-panel-select-border, #d9d9d9);box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:var(--revo-grid-filter-panel-input-bg, #f3f3f3);background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.select-css:focus{border-color:var(--revo-grid-filter-panel-select-border-hover, #d9d9d9);box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-action{display:flex;justify-content:space-between;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9);height:10px}.select-input{display:flex;justify-content:space-between;align-items:center}`;
28
28
 
29
29
  const defaultType = 'none';
30
30
  const FILTER_LIST_CLASS = 'multi-filter-list';
@@ -129,24 +129,56 @@ const FilterPanel = class {
129
129
  if (index !== this.filterItems[prop].length - 1) {
130
130
  andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(filter.id) }, h(AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or })));
131
131
  }
132
- const extra = this.renderExtra(prop, index);
133
- return (h("div", { key: filter.id, class: FILTER_LIST_CLASS }, h("div", { class: "multi-filter-list-row" }, h("div", { class: { 'select-input': true } }, h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), extra ? h("div", { class: "filter-extra" }, extra) : ''), h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton, h("div", { onClick: () => this.onRemoveFilter(filter.id) }, h(TrashButton, null))))));
132
+ return (h("div", { key: filter.id, class: FILTER_LIST_CLASS }, h("div", { class: { 'select-input': true } }, h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton), h("div", { onClick: () => this.onRemoveFilter(filter.id) }, h(TrashButton, null))), h("div", null, this.renderExtra(prop, index))));
134
133
  }), propFilters.filter(f => !f.hidden).length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
135
134
  }
135
+ componentDidRender() {
136
+ this.syncDialog();
137
+ }
138
+ syncDialog() {
139
+ if (!this.dialog) {
140
+ return;
141
+ }
142
+ if (!this.changes) {
143
+ if (this.dialog.open) {
144
+ this.dialog.close();
145
+ }
146
+ return;
147
+ }
148
+ if (!this.dialog.open) {
149
+ this.dialog.show();
150
+ }
151
+ if (this.changes.autoCorrect !== false) {
152
+ requestAnimationFrame(() => this.autoCorrect(this.dialog));
153
+ }
154
+ }
136
155
  autoCorrect(el) {
137
- var _a, _b;
138
156
  if (!el) {
139
157
  return;
140
158
  }
141
- const revoGrid = el.closest('revo-grid');
142
- if (!revoGrid) {
159
+ const pos = el.getBoundingClientRect();
160
+ const maxLeft = Math.max(0, window.innerWidth - pos.width);
161
+ const maxTop = Math.max(0, window.innerHeight - pos.height);
162
+ if (pos.left > maxLeft) {
163
+ el.style.left = `${maxLeft}px`;
164
+ }
165
+ if (pos.top > maxTop) {
166
+ el.style.top = `${maxTop}px`;
167
+ }
168
+ }
169
+ onDialogMouseDown(e) {
170
+ if (!this.closeOnOutsideClick ||
171
+ e.target !== this.dialog ||
172
+ !this.dialog) {
143
173
  return;
144
174
  }
145
- const pos = el.getBoundingClientRect();
146
- const gridPos = revoGrid.getBoundingClientRect();
147
- const maxLeft = gridPos.right - pos.width;
148
- if (pos.left > maxLeft && el.offsetLeft) {
149
- el.style.left = `${maxLeft - ((_b = (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left) !== null && _b !== void 0 ? _b : 0)}px`;
175
+ const rect = this.dialog.getBoundingClientRect();
176
+ const isInside = e.clientX >= rect.left &&
177
+ e.clientX <= rect.right &&
178
+ e.clientY >= rect.top &&
179
+ e.clientY <= rect.bottom;
180
+ if (!isInside) {
181
+ this.onCancel();
150
182
  }
151
183
  }
152
184
  onFilterTypeChange(e, prop, index) {
@@ -347,30 +379,33 @@ const FilterPanel = class {
347
379
  } }));
348
380
  }
349
381
  render() {
350
- var _a, _b, _c, _d, _e;
351
- if (!this.changes) {
352
- return h(Host, { style: { display: 'none' } });
353
- }
382
+ var _a, _b, _c, _d, _e, _f, _g;
354
383
  const style = {
355
- display: 'block',
356
- left: `${this.changes.x}px`,
357
- top: `${this.changes.y}px`,
384
+ left: `${(_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0}px`,
385
+ top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
358
386
  };
359
387
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
360
- return (h(Host, { style: style, ref: el => {
361
- var _a;
362
- ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) !== false && this.autoCorrect(el);
363
- } }, h("slot", { slot: "header" }), ((_b = (_a = this.changes).extraContent) === null || _b === void 0 ? void 0 : _b.call(_a, this.changes)) || '', ((_c = this.changes) === null || _c === void 0 ? void 0 : _c.hideDefaultFilters) !== true && ([
364
- h("label", null, capts.title),
365
- h("div", { class: "filter-holder" }, this.getFilterItemsList()),
366
- h("div", { class: "add-filter" }, h("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType)))
367
- ]), h("slot", null), ((_e = (_d = this.changes).extraBottomContent) === null || _e === void 0 ? void 0 : _e.call(_d, this.changes)) || '', h("div", { class: "filter-actions" }, this.disableDynamicFiltering && [
368
- h("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
369
- h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
370
- ], !this.disableDynamicFiltering && [
371
- h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
372
- h("button", { id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, capts.reset),
373
- ]), h("slot", { slot: "footer" })));
388
+ return (h(Host, { key: '9fb424017d080876ff7796237917b4f41f617fe0' }, h("dialog", { key: '37b9f870b95f6fe1bd7be359dd7b77ef196e896e', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
389
+ e.preventDefault();
390
+ this.onCancel();
391
+ }, onMouseDown: e => this.onDialogMouseDown(e) }, this.changes && [
392
+ h("slot", { key: '76ec505a92d0a7c1ae0bbb5f4cac63555f3416be', slot: "header" }),
393
+ ((_f = (_e = this.changes).extraContent) === null || _f === void 0 ? void 0 : _f.call(_e, this.changes)) || '',
394
+ ((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
395
+ h("label", { key: 'c6fd82c95f6005f286c7bc90de34956128a83246' }, capts.title),
396
+ h("div", { key: '5e7dac36ad79ba1b6072a0053b30aa384ade0dde', class: "filter-holder" }, this.getFilterItemsList()),
397
+ h("div", { key: 'd9b6103edbd138d4db845745686ee4c847310a66', class: "add-filter" }, h("select", { key: 'c1b321f2d19458f95ab3f9188d83d94bebdb688e', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
398
+ ],
399
+ h("slot", { key: '1571dcbc5c57651deb42a4046272ff60fa74f5a7' }),
400
+ h("div", { key: '4aa7dee532336b084542df0209291b4c60378b49', class: "filter-actions" }, this.disableDynamicFiltering && [
401
+ h("button", { key: '4c1b3054cd1bb7f46877592f00f6634d0f7ecafa', id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
402
+ h("button", { key: 'f31a568c89be18b1a854cdd7d4726e01db24e338', id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
403
+ ], !this.disableDynamicFiltering && [
404
+ h("button", { key: '5d40e8b1f13f94cff4f5a2e2aefeee8861104a9d', id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
405
+ h("button", { key: '67eac3abd16f6f6e2ed7089dcfb0d05524ddb7df', id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, capts.reset),
406
+ ]),
407
+ h("slot", { key: 'b27a9bb3ef814e1e09dca14eda3e332ff34c654c', slot: "footer" }),
408
+ ])));
374
409
  }
375
410
  get element() { return getElement(this); }
376
411
  };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { h, f as Build } from './index-Chp_81rd.js';
5
5
  import { n as DATA_ROW, w as DRAG_ICON_CLASS, x as DRAGGABLE_CLASS } from './dimension.helpers-CGKwSvw6.js';
6
- import { l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, G as GROUP_DEPTH, h as GROUP_EXPANDED, P as PSEUDO_GROUP_ITEM, O as isRowDragService, B as getCellDataParsed } from './column.service-C6hByxPy.js';
6
+ import { l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, G as GROUP_DEPTH, h as GROUP_EXPANDED, P as PSEUDO_GROUP_ITEM, O as isRowDragService, B as getCellDataParsed } from './column.service-CC_SD8W3.js';
7
7
 
8
8
  /**
9
9
  * Renders sorting direction and optional additive sorting rank.
@@ -16,22 +16,9 @@ const SortingSign = ({ column }) => {
16
16
  return (h("span", Object.assign({}, indicatorAttrs), h("i", Object.assign({}, iconAttrs)), (column === null || column === void 0 ? void 0 : column.sortIndex) ? (h("sup", Object.assign({}, orderIndexAttrs), column.sortIndex)) : null));
17
17
  };
18
18
 
19
- var __rest = (undefined && undefined.__rest) || function (s, e) {
20
- var t = {};
21
- for (var p in s)
22
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23
- t[p] = s[p];
24
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
25
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
26
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
27
- t[p[i]] = s[p[i]];
28
- }
29
- return t;
30
- };
31
19
  const PADDING_DEPTH = 10;
32
- const RowRenderer = (_a, cells) => {
33
- var { rowClass, index, size, start, depth, groupingLevel } = _a, attrs = __rest(_a, ["rowClass", "index", "size", "start", "depth", "groupingLevel"]);
34
- const props = Object.assign(Object.assign(Object.assign({}, attrs), { [DATA_ROW]: index }), (typeof groupingLevel === 'number'
20
+ const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
21
+ const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
35
22
  ? { 'data-level': groupingLevel }
36
23
  : {}));
37
24
  return (h("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
@@ -58,17 +45,12 @@ const GroupingRowRenderer = (props) => {
58
45
  const name = model[PSEUDO_GROUP_ITEM];
59
46
  const expanded = model[GROUP_EXPANDED];
60
47
  const depth = parseInt(model[GROUP_DEPTH], 10) || 0;
61
- const groupRowAttrs = {
62
- rowClass: 'groupingRow',
63
- depth,
64
- expanded,
65
- };
66
48
  if (groupingCustomRenderer) {
67
- return (h(RowRenderer, Object.assign({}, props, groupRowAttrs), h("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(h, Object.assign(Object.assign({}, props), { colType: props.providers.colType, name,
49
+ return (h(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }), h("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(h, Object.assign(Object.assign({}, props), { colType: props.providers.colType, name,
68
50
  expanded,
69
51
  depth })))));
70
52
  }
71
- return (h(RowRenderer, Object.assign({}, props, groupRowAttrs), hasExpand && [
53
+ return (h(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }), hasExpand && [
72
54
  h("button", { class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) }, expandSvgIconVNode(expanded)),
73
55
  name,
74
56
  ]));
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import { J as reduce, g as getRange, K as baseEach, C as getColumnType, c as columnTypes, L as toInteger, u as isGrouping, t as getGroupingName, r as rowTypes, B as getCellDataParsed, A as getCellRaw, j as GROUP_COLUMN_PROP, I as getColumnByProp, h as GROUP_EXPANDED, x as getParsedGroup, y as isSameGroup, G as GROUP_DEPTH, e as PSEUDO_GROUP_ITEM_VALUE, d as PSEUDO_GROUP_ITEM_ID, o as GROUPING_ROW_TYPE, p as getSource, f as PSEUDO_GROUP_COLUMN, s as gatherGrouping, m as GROUP_EXPAND_EVENT, v as isGroupingColumn, q as getExpanded, E as isColGrouping } from './column.service-C6hByxPy.js';
4
+ import { J as reduce, g as getRange, K as baseEach, C as getColumnType, c as columnTypes, L as toInteger, u as isGrouping, t as getGroupingName, r as rowTypes, B as getCellDataParsed, A as getCellRaw, j as GROUP_COLUMN_PROP, I as getColumnByProp, h as GROUP_EXPANDED, x as getParsedGroup, y as isSameGroup, G as GROUP_DEPTH, e as PSEUDO_GROUP_ITEM_VALUE, d as PSEUDO_GROUP_ITEM_ID, o as GROUPING_ROW_TYPE, p as getSource, f as PSEUDO_GROUP_COLUMN, s as gatherGrouping, m as GROUP_EXPAND_EVENT, v as isGroupingColumn, q as getExpanded, E as isColGrouping } from './column.service-CC_SD8W3.js';
5
5
  import { K as createStore, l as setStore, i as calculateDimensionData, L as identity, N as isArray, b as getSourceItem, g as getPhysical, e as setItems, j as getItemByPosition } from './dimension.helpers-CGKwSvw6.js';
6
6
  import { j as calculateRowHeaderSize } from './viewport.store-_c579YyM.js';
7
7
  import { g as getScrollbarSize, t as timeout } from './index-Db3qZoW5.js';
8
8
  import { h } from './index-Chp_81rd.js';
9
9
  import { b as FILTER_PROP, i as isFilterBtn } from './filter.button-C8XTWPU2.js';
10
10
  import { d as debounce } from './debounce-PCRWZliA.js';
11
- import { O as ON_COLUMN_CLICK, d as dispatch } from './header-cell-renderer-BMmXRsd_.js';
11
+ import { O as ON_COLUMN_CLICK, d as dispatch } from './header-cell-renderer-B-LX2sgu.js';
12
12
 
13
13
  function calculateRealSize({ count, originItemSize, sizes, }) {
14
14
  const safeCount = Math.max(0, count);
@@ -1400,7 +1400,8 @@ class FilterPlugin extends BasePlugin {
1400
1400
  async headerclick(e) {
1401
1401
  var _a, _b;
1402
1402
  const el = (_a = e.detail.originalEvent) === null || _a === void 0 ? void 0 : _a.target;
1403
- if (!isFilterBtn(el)) {
1403
+ const filterButton = isFilterBtn(el);
1404
+ if (!filterButton) {
1404
1405
  return;
1405
1406
  }
1406
1407
  e.preventDefault();
@@ -1414,9 +1415,8 @@ class FilterPlugin extends BasePlugin {
1414
1415
  return;
1415
1416
  }
1416
1417
  // filter button clicked, open filter dialog
1417
- const gridPos = this.revogrid.getBoundingClientRect();
1418
- const buttonPos = el.getBoundingClientRect();
1419
- const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x - gridPos.x, y: buttonPos.y - gridPos.y + buttonPos.height, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent, extraBottomContent: this.extraBottomHyperContent });
1418
+ const buttonPos = (filterButton instanceof HTMLElement ? filterButton : el).getBoundingClientRect();
1419
+ const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x, y: buttonPos.y + buttonPos.height, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent });
1420
1420
  (_b = this.beforeshow) === null || _b === void 0 ? void 0 : _b.call(this, data);
1421
1421
  this.pop.show(data);
1422
1422
  }
@@ -2670,17 +2670,8 @@ class ColumnMovePlugin extends BasePlugin {
2670
2670
  constructor(revogrid, providers) {
2671
2671
  super(revogrid, providers);
2672
2672
  this.moveFunc = debounce((e) => this.doMove(e), 5);
2673
- this.preventHeaderClickAfterDrag = (event) => {
2674
- if (!this.preventNextHeaderClick) {
2675
- return;
2676
- }
2677
- this.preventNextHeaderClick = false;
2678
- event.preventDefault();
2679
- };
2680
2673
  this.staticDragData = null;
2681
2674
  this.dragData = null;
2682
- this.columnDragMoved = false;
2683
- this.preventNextHeaderClick = false;
2684
2675
  this.localSubscriptions = {};
2685
2676
  this.orderUi = new ColumnOrderHandler();
2686
2677
  revogrid.appendChild(this.orderUi.render());
@@ -2699,13 +2690,11 @@ class ColumnMovePlugin extends BasePlugin {
2699
2690
  callback: (e) => this.move(e),
2700
2691
  };
2701
2692
  this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
2702
- this.revogrid.addEventListener('beforeheaderclick', this.preventHeaderClickAfterDrag, { capture: true });
2703
2693
  }
2704
2694
  dragStart({ event, data }) {
2705
2695
  if (event.defaultPrevented) {
2706
2696
  return;
2707
2697
  }
2708
- this.preventNextHeaderClick = false;
2709
2698
  const { defaultPrevented } = dispatch(this.revogrid, COLUMN_DRAG_START_EVENT, data);
2710
2699
  // check if allowed to drag particulat column
2711
2700
  if (defaultPrevented) {
@@ -2727,8 +2716,7 @@ class ColumnMovePlugin extends BasePlugin {
2727
2716
  const cols = this.getDimension(data.pin || 'rgCol');
2728
2717
  const gridRect = this.revogrid.getBoundingClientRect();
2729
2718
  const elRect = dataEl.getBoundingClientRect();
2730
- const startItem = getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left) +
2731
- (cols.renderOffset || 0));
2719
+ const startItem = getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left) + (cols.renderOffset || 0));
2732
2720
  this.staticDragData = {
2733
2721
  startPos: event.x,
2734
2722
  startItem,
@@ -2759,14 +2747,10 @@ class ColumnMovePlugin extends BasePlugin {
2759
2747
  if (rgCol.itemIndex >= this.staticDragData.cols.count) {
2760
2748
  return;
2761
2749
  }
2762
- this.orderUi.showHandler(getColumnDragPosition(rgCol, this.staticDragData.startItem, this.staticDragData.cols.renderOffset || 0, dragData.scrollOffset), dragData.gridRect.width);
2750
+ this.orderUi.showHandler(rgCol.end - (this.staticDragData.cols.renderOffset || 0) + dragData.scrollOffset, dragData.gridRect.width);
2763
2751
  }
2764
2752
  }
2765
2753
  move(e) {
2766
- if (this.staticDragData &&
2767
- Math.abs(this.staticDragData.startPos - e.x) > 10) {
2768
- this.columnDragMoved = true;
2769
- }
2770
2754
  dispatch(this.revogrid, COLUMN_DRAG_MOVE_EVENT, e);
2771
2755
  // then do move
2772
2756
  this.moveFunc(e);
@@ -2775,7 +2759,6 @@ class ColumnMovePlugin extends BasePlugin {
2775
2759
  this.clearOrder();
2776
2760
  }
2777
2761
  onMouseUp(e) {
2778
- const suppressClick = this.columnDragMoved;
2779
2762
  // apply new positions
2780
2763
  if (this.dragData && this.staticDragData) {
2781
2764
  let relativePos = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
@@ -2798,9 +2781,6 @@ class ColumnMovePlugin extends BasePlugin {
2798
2781
  }
2799
2782
  dispatch(this.revogrid, COLUMN_DRAG_END_EVENT, this.getData(this.staticDragData, newItems, source));
2800
2783
  }
2801
- if (suppressClick) {
2802
- this.preventNextHeaderClick = !!e.target.closest('revogr-header');
2803
- }
2804
2784
  this.clearOrder();
2805
2785
  }
2806
2786
  clearLocalSubscriptions() {
@@ -2809,7 +2789,6 @@ class ColumnMovePlugin extends BasePlugin {
2809
2789
  clearOrder() {
2810
2790
  this.staticDragData = null;
2811
2791
  this.dragData = null;
2812
- this.columnDragMoved = false;
2813
2792
  this.clearLocalSubscriptions();
2814
2793
  this.orderUi.stop(this.revogrid);
2815
2794
  }
@@ -2819,7 +2798,6 @@ class ColumnMovePlugin extends BasePlugin {
2819
2798
  clearSubscriptions() {
2820
2799
  super.clearSubscriptions();
2821
2800
  this.clearLocalSubscriptions();
2822
- this.revogrid.removeEventListener('beforeheaderclick', this.preventHeaderClickAfterDrag, { capture: true });
2823
2801
  }
2824
2802
  getData({ gridEl, dataEl, pin }, order, source = []) {
2825
2803
  const gridRect = gridEl.getBoundingClientRect();
@@ -2841,11 +2819,5 @@ class ColumnMovePlugin extends BasePlugin {
2841
2819
  function getLeftRelative(absoluteX, gridPos, offset) {
2842
2820
  return absoluteX - gridPos - offset;
2843
2821
  }
2844
- function getColumnDragPosition(targetItem, startItem, renderOffset, scrollOffset) {
2845
- const insertionEdge = startItem.itemIndex > targetItem.itemIndex
2846
- ? targetItem.start
2847
- : targetItem.end;
2848
- return insertionEdge - renderOffset + scrollOffset;
2849
- }
2850
2822
 
2851
- export { AutoSizeColumnPlugin as A, BasePlugin as B, ColumnAutoSizeMode as C, DimensionStore as D, ExportFilePlugin as E, FILTER_TRIMMED_TYPE as F, GroupingRowPlugin as G, SelectionStore as S, StretchColumn as a, ExportCsv as b, FILTER_CONFIG_CHANGED_EVENT as c, FILTE_PANEL as d, FilterPlugin as e, filterCoreFunctionsIndexedByType as f, filterTypes as g, filterNames as h, isStretchPlugin as i, doCollapse as j, doExpand as k, COLUMN_DRAG_MOVE_EVENT as l, COLUMN_DRAG_END_EVENT as m, BEFORE_COLUMN_DRAG_END_EVENT as n, COLUMN_DRAG_START_EVENT as o, ColumnMovePlugin as p, getLeftRelative as q, getColumnDragPosition as r, SortingPlugin as s, hasActiveSorting as t, getSortingIndex as u, sortIndexByItems as v, defaultCellCompare as w, descCellCompare as x, getNextOrder as y, getComparer as z };
2823
+ export { AutoSizeColumnPlugin as A, BasePlugin as B, ColumnAutoSizeMode as C, DimensionStore as D, ExportFilePlugin as E, FILTER_TRIMMED_TYPE as F, GroupingRowPlugin as G, SelectionStore as S, StretchColumn as a, ExportCsv as b, FILTER_CONFIG_CHANGED_EVENT as c, FILTE_PANEL as d, FilterPlugin as e, filterCoreFunctionsIndexedByType as f, filterTypes as g, filterNames as h, isStretchPlugin as i, doCollapse as j, doExpand as k, COLUMN_DRAG_MOVE_EVENT as l, COLUMN_DRAG_END_EVENT as m, BEFORE_COLUMN_DRAG_END_EVENT as n, COLUMN_DRAG_START_EVENT as o, ColumnMovePlugin as p, getLeftRelative as q, SortingPlugin as r, hasActiveSorting as s, getSortingIndex as t, sortIndexByItems as u, defaultCellCompare as v, descCellCompare as w, getNextOrder as x, getComparer as y };
@@ -817,82 +817,43 @@ class ColumnService {
817
817
  mapping,
818
818
  };
819
819
  }
820
- getTransformedDataToApply({ start, data, targetRange, }) {
820
+ getTransformedDataToApply(start, data) {
821
821
  const changed = {};
822
822
  const copyRowLength = data.length;
823
- if (!copyRowLength) {
824
- return {
825
- changed,
826
- range: null,
827
- };
828
- }
829
823
  const colLength = this.columns.length;
830
824
  const rowLength = this.dataStore.get('items').length;
831
- const bounds = this.getDataApplyBounds(start, targetRange, copyRowLength, rowLength, colLength);
832
- if (!bounds) {
833
- return {
834
- changed,
835
- range: null,
836
- };
837
- }
838
- const { startRow, startCol, endRow } = bounds;
839
- let maxCol = startCol - 1;
840
- let lastRow = startRow - 1;
841
825
  // rows
842
- for (let rowIndex = startRow, i = 0; rowIndex <= endRow; rowIndex++, i++) {
826
+ let rowIndex = start.y;
827
+ let maxCol = 0;
828
+ for (let i = 0; rowIndex < rowLength && i < copyRowLength; rowIndex++, i++) {
843
829
  // copy original data link
844
830
  const copyRow = data[i % copyRowLength];
845
831
  const copyColLength = (copyRow === null || copyRow === void 0 ? void 0 : copyRow.length) || 0;
846
- if (!copyColLength) {
847
- continue;
832
+ // columns
833
+ let colIndex = start.x;
834
+ for (let j = 0; colIndex < colLength && j < copyColLength; colIndex++, j++) {
835
+ const p = this.columns[colIndex].prop;
836
+ const currentCol = j % colLength;
837
+ /** if can write */
838
+ if (!this.isReadOnly(rowIndex, colIndex)) {
839
+ /** to show before save */
840
+ if (!changed[rowIndex]) {
841
+ changed[rowIndex] = {};
842
+ }
843
+ changed[rowIndex][p] = copyRow[currentCol];
844
+ }
848
845
  }
849
- maxCol = Math.max(maxCol, this.applyClipboardRow(changed, {
850
- bounds,
851
- copyColLength,
852
- copyRow,
853
- rowIndex,
854
- start,
855
- targetRange,
856
- }));
857
- lastRow = rowIndex;
846
+ maxCol = Math.max(maxCol, colIndex - 1);
858
847
  }
848
+ const range = getRange(start, {
849
+ y: rowIndex - 1,
850
+ x: maxCol,
851
+ });
859
852
  return {
860
853
  changed,
861
- range: this.getAppliedRange(bounds, lastRow, maxCol),
854
+ range,
862
855
  };
863
856
  }
864
- getDataApplyBounds(start, targetRange, copyRowLength, rowLength, colLength) {
865
- var _a, _b, _c;
866
- const startRow = (_a = targetRange === null || targetRange === void 0 ? void 0 : targetRange.y) !== null && _a !== void 0 ? _a : start.y;
867
- const startCol = (_b = targetRange === null || targetRange === void 0 ? void 0 : targetRange.x) !== null && _b !== void 0 ? _b : start.x;
868
- const endRow = Math.min(rowLength - 1, (_c = targetRange === null || targetRange === void 0 ? void 0 : targetRange.y1) !== null && _c !== void 0 ? _c : start.y + copyRowLength - 1);
869
- if (endRow < startRow || startCol >= colLength) {
870
- return null;
871
- }
872
- return { startRow, startCol, endRow, colLength };
873
- }
874
- applyClipboardRow(changed, { bounds, copyColLength, copyRow, rowIndex, start, targetRange, }) {
875
- var _a;
876
- const endCol = Math.min(bounds.colLength - 1, (_a = targetRange === null || targetRange === void 0 ? void 0 : targetRange.x1) !== null && _a !== void 0 ? _a : start.x + copyColLength - 1);
877
- for (let colIndex = bounds.startCol, j = 0; colIndex <= endCol; colIndex++, j++) {
878
- if (this.isReadOnly(rowIndex, colIndex)) {
879
- continue;
880
- }
881
- const prop = this.columns[colIndex].prop;
882
- changed[rowIndex] = changed[rowIndex] || {};
883
- changed[rowIndex][prop] = copyRow[j % copyColLength];
884
- }
885
- return endCol;
886
- }
887
- getAppliedRange({ startRow, startCol }, lastRow, maxCol) {
888
- if (lastRow < startRow || maxCol < startCol) {
889
- return null;
890
- }
891
- return getRange({ x: startCol, y: startRow }, {
892
- y: lastRow,
893
- x: maxCol,
894
- });
895
- }
896
857
  getRangeStaticData(d, value) {
897
858
  const changed = {};
898
859
  // rows
@@ -2,7 +2,7 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { h } from './index-Chp_81rd.js';
5
- import { Q as doPropMerge } from './column.service-C6hByxPy.js';
5
+ import { Q as doPropMerge } from './column.service-CC_SD8W3.js';
6
6
 
7
7
  /**
8
8
  * Dispatches a custom event to a specified target element.
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, H as gatherGroup, s as gatherGrouping, z as getCellData, B as getCellDataParsed, A as getCellRaw, I as getColumnByProp, D as getColumnSizes, C as getColumnType, F as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, E as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-C6hByxPy.js';
5
- import { B as BasePlugin } from './column.drag.plugin-V9DDE3mU.js';
6
- export { A as AutoSizeColumnPlugin, n as BEFORE_COLUMN_DRAG_END_EVENT, m as COLUMN_DRAG_END_EVENT, l as COLUMN_DRAG_MOVE_EVENT, o as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, p as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, s as SortingPlugin, a as StretchColumn, w as defaultCellCompare, x as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getColumnDragPosition, z as getComparer, q as getLeftRelative, y as getNextOrder, u as getSortingIndex, t as hasActiveSorting, i as isStretchPlugin, v as sortIndexByItems } from './column.drag.plugin-V9DDE3mU.js';
7
- export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-BMmXRsd_.js';
8
- export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-CLTRlCa5.js';
4
+ export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, H as gatherGroup, s as gatherGrouping, z as getCellData, B as getCellDataParsed, A as getCellRaw, I as getColumnByProp, D as getColumnSizes, C as getColumnType, F as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, E as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-CC_SD8W3.js';
5
+ import { B as BasePlugin } from './column.drag.plugin-4Ixr4ijU.js';
6
+ export { A as AutoSizeColumnPlugin, n as BEFORE_COLUMN_DRAG_END_EVENT, m as COLUMN_DRAG_END_EVENT, l as COLUMN_DRAG_MOVE_EVENT, o as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, p as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, r as SortingPlugin, a as StretchColumn, v as defaultCellCompare, w as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, y as getComparer, q as getLeftRelative, x as getNextOrder, t as getSortingIndex, s as hasActiveSorting, i as isStretchPlugin, u as sortIndexByItems } from './column.drag.plugin-4Ixr4ijU.js';
7
+ export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-B-LX2sgu.js';
8
+ export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-BtN-NGCk.js';
9
9
  export { a as applyMixins, f as findPositionInArray, g as getScrollbarSize, m as mergeSortedArray, p as pushSorted, r as range, s as scaleValue, t as timeout } from './index-Db3qZoW5.js';
10
10
  export { T as TextEditor } from './text-editor-C3RUSwH5.js';
11
11
  export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, m as isEditInput, n as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, l as isShortcutModifier, d as isTab, e as isTabKeyValue } from './edit.utils-Dnnbd0xG.js';