@revolist/revogrid 4.23.13 → 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 (74) hide show
  1. package/dist/cjs/{cell-renderer-DfUCisis.js → cell-renderer-Dcz022q7.js} +5 -23
  2. package/dist/cjs/{column.drag.plugin-D_Dfhp4f.js → column.drag.plugin-BGLbi1zS.js} +9 -38
  3. package/dist/cjs/{column.service-BNWNiJW3.js → column.service-C1Qvcf5l.js} +23 -62
  4. package/dist/cjs/{filter.button-B9EzJrr1.js → filter.button-w6LWnyhi.js} +0 -16
  5. package/dist/cjs/{header-cell-renderer-DyjOxArm.js → header-cell-renderer-vVr4IWNV.js} +1 -1
  6. package/dist/cjs/index.cjs.js +5 -8
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/revo-grid.cjs.entry.js +6 -6
  9. package/dist/cjs/revo-grid.cjs.js +1 -1
  10. package/dist/cjs/revogr-attribution_7.cjs.entry.js +4 -40
  11. package/dist/cjs/revogr-data_4.cjs.entry.js +6 -14
  12. package/dist/cjs/revogr-filter-panel.cjs.entry.js +68 -119
  13. package/dist/collection/components/data/column.service.js +23 -62
  14. package/dist/collection/components/data/row-renderer.js +2 -15
  15. package/dist/collection/components/overlay/revogr-overlay-selection.js +7 -27
  16. package/dist/collection/components/revoGrid/revo-grid.js +7 -14
  17. package/dist/collection/components/scroll/revogr-viewport-scroll.js +2 -10
  18. package/dist/collection/plugins/filter/filter.button.js +0 -14
  19. package/dist/collection/plugins/filter/filter.panel.js +68 -80
  20. package/dist/collection/plugins/filter/filter.plugin.js +4 -4
  21. package/dist/collection/plugins/filter/filter.style.css +18 -56
  22. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +2 -7
  23. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +2 -30
  24. package/dist/collection/serve/controller.js +0 -1
  25. package/dist/esm/{cell-renderer-CLTRlCa5.js → cell-renderer-BtN-NGCk.js} +5 -23
  26. package/dist/esm/{column.drag.plugin-UNSHSmgo.js → column.drag.plugin-4Ixr4ijU.js} +10 -38
  27. package/dist/esm/{column.service-C6hByxPy.js → column.service-CC_SD8W3.js} +23 -62
  28. package/dist/{revo-grid/filter.button-BFwo1uvz.js → esm/filter.button-C8XTWPU2.js} +1 -15
  29. package/dist/esm/{header-cell-renderer-BMmXRsd_.js → header-cell-renderer-B-LX2sgu.js} +1 -1
  30. package/dist/esm/index.js +6 -6
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/revo-grid.entry.js +6 -6
  33. package/dist/esm/revo-grid.js +1 -1
  34. package/dist/esm/revogr-attribution_7.entry.js +4 -40
  35. package/dist/esm/revogr-data_4.entry.js +6 -14
  36. package/dist/esm/revogr-filter-panel.entry.js +68 -119
  37. package/dist/revo-grid/{cell-renderer-CLTRlCa5.js → cell-renderer-BtN-NGCk.js} +5 -23
  38. package/dist/revo-grid/{column.drag.plugin-UNSHSmgo.js → column.drag.plugin-4Ixr4ijU.js} +10 -38
  39. package/dist/revo-grid/{column.service-C6hByxPy.js → column.service-CC_SD8W3.js} +23 -62
  40. package/dist/{esm/filter.button-BFwo1uvz.js → revo-grid/filter.button-C8XTWPU2.js} +1 -15
  41. package/dist/revo-grid/{header-cell-renderer-BMmXRsd_.js → header-cell-renderer-B-LX2sgu.js} +1 -1
  42. package/dist/revo-grid/index.esm.js +6 -6
  43. package/dist/revo-grid/revo-grid.entry.js +6 -6
  44. package/dist/revo-grid/revo-grid.esm.js +1 -1
  45. package/dist/revo-grid/revogr-attribution_7.entry.js +4 -40
  46. package/dist/revo-grid/revogr-data_4.entry.js +6 -14
  47. package/dist/revo-grid/revogr-filter-panel.entry.js +68 -119
  48. package/dist/types/components/data/column.service.d.ts +1 -10
  49. package/dist/types/components/data/row-renderer.d.ts +1 -1
  50. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +3 -4
  51. package/dist/types/components/revoGrid/revo-grid.d.ts +4 -4
  52. package/dist/types/components.d.ts +14 -14
  53. package/dist/types/plugins/filter/filter.button.d.ts +0 -11
  54. package/dist/types/plugins/filter/filter.panel.d.ts +4 -7
  55. package/dist/types/plugins/filter/filter.plugin.d.ts +0 -1
  56. package/dist/types/plugins/filter/filter.types.d.ts +0 -1
  57. package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +0 -4
  58. package/dist/types/types/interfaces.d.ts +0 -8
  59. package/hydrate/index.js +107 -303
  60. package/hydrate/index.mjs +107 -303
  61. package/package.json +1 -1
  62. package/readme.md +1 -20
  63. package/standalone/column.service.js +1 -1
  64. package/standalone/filter.button.js +1 -1
  65. package/standalone/index.js +1 -1
  66. package/standalone/revo-grid.js +1 -1
  67. package/standalone/revogr-data2.js +1 -1
  68. package/standalone/revogr-filter-panel.js +1 -1
  69. package/standalone/revogr-overlay-selection2.js +1 -1
  70. package/standalone/revogr-viewport-scroll2.js +1 -1
  71. package/dist/collection/components/overlay/clipboard.utils.js +0 -26
  72. package/dist/collection/plugins/filter/filter.reorder.js +0 -44
  73. package/dist/types/components/overlay/clipboard.utils.d.ts +0 -3
  74. package/dist/types/plugins/filter/filter.reorder.d.ts +0 -4
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, e as Host, g as getElement } from './index-Chp_81rd.js';
5
5
  import { d as debounce } from './debounce-PCRWZliA.js';
6
- import { i as isFilterBtn, e as AndOrButton, f as ReorderButton, d as TrashButton } from './filter.button-BFwo1uvz.js';
6
+ import { i as isFilterBtn, e as AndOrButton, d as TrashButton } from './filter.button-C8XTWPU2.js';
7
7
 
8
8
  (function closest() {
9
9
  if (!Element.prototype.matches) {
@@ -24,49 +24,7 @@ import { i as isFilterBtn, e as AndOrButton, f as ReorderButton, d as TrashButto
24
24
  }
25
25
  })();
26
26
 
27
- const FILTER_REORDER_MIME = 'text/revogrid-filter-id';
28
- function setFilterReorderData(dataTransfer, id) {
29
- if (!dataTransfer) {
30
- return;
31
- }
32
- dataTransfer.effectAllowed = 'move';
33
- dataTransfer.setData(FILTER_REORDER_MIME, String(id));
34
- dataTransfer.setData('text/plain', String(id));
35
- }
36
- function getFilterReorderId(dataTransfer) {
37
- if (!dataTransfer) {
38
- return;
39
- }
40
- const rawId = dataTransfer.getData(FILTER_REORDER_MIME) || dataTransfer.getData('text/plain');
41
- const normalizedId = rawId.trim();
42
- if (!normalizedId) {
43
- return;
44
- }
45
- const id = Number(normalizedId);
46
- return Number.isFinite(id) ? id : undefined;
47
- }
48
- function moveFilterItem(items, sourceId, targetId) {
49
- if (sourceId === targetId) {
50
- return false;
51
- }
52
- const sourceIndex = items.findIndex(item => item.id === sourceId);
53
- const targetIndex = items.findIndex(item => item.id === targetId);
54
- if (sourceIndex === -1 || targetIndex === -1 || sourceIndex === targetIndex) {
55
- return false;
56
- }
57
- const relationsByPosition = items.map(item => { var _a; return (_a = item.relation) !== null && _a !== void 0 ? _a : 'and'; });
58
- const [movedItem] = items.splice(sourceIndex, 1);
59
- items.splice(targetIndex, 0, movedItem);
60
- items.forEach((item, index) => {
61
- var _a;
62
- item.relation = index === items.length - 1
63
- ? 'and'
64
- : (_a = relationsByPosition[index]) !== null && _a !== void 0 ? _a : 'and';
65
- });
66
- return true;
67
- }
68
-
69
- 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}.multi-filter-list .reorder-button{border:0;background:transparent;color:var(--revo-grid-filter-panel-reorder-color, #6b7280);cursor:grab;font-family:monospace;font-size:12px;letter-spacing:0;line-height:1;padding:6px 2px;transform:scaleX(0.8);width:16px}.multi-filter-list .reorder-button.filter-row-dragging{opacity:0.55}.multi-filter-list .reorder-button.filter-row-drag-over{color:var(--revo-grid-filter-panel-reorder-accent, #007cb2)}.multi-filter-list .reorder-button:active{cursor:grabbing}.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}`;
70
28
 
71
29
  const defaultType = 'none';
72
30
  const FILTER_LIST_CLASS = 'multi-filter-list';
@@ -161,7 +119,6 @@ const FilterPanel = class {
161
119
  if (typeof prop === 'undefined')
162
120
  return '';
163
121
  const propFilters = (_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : [];
164
- const visibleFilterCount = propFilters.filter(filter => !filter.hidden).length;
165
122
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
166
123
  return (h("div", { key: this.filterId }, propFilters.map((filter, index) => {
167
124
  let andOrButton;
@@ -172,24 +129,56 @@ const FilterPanel = class {
172
129
  if (index !== this.filterItems[prop].length - 1) {
173
130
  andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(filter.id) }, h(AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or })));
174
131
  }
175
- const extra = this.renderExtra(prop, index);
176
- return (h("div", { key: filter.id, class: FILTER_LIST_CLASS }, h("div", { ref: el => el === null || el === void 0 ? void 0 : el.classList.add('multi-filter-list-row') }, visibleFilterCount > 1 ? (h(ReorderButton, { dragging: this.draggedFilterId === filter.id, dragOver: this.dragOverFilterId === filter.id && this.draggedFilterId !== filter.id, onDragStart: e => this.onFilterDragStart(e, filter.id), onDragEnd: () => this.onFilterDragEnd(), onDragOver: e => this.onFilterDragOver(e, filter.id), onDragLeave: () => this.onFilterDragLeave(filter.id), onDrop: e => this.onFilterDrop(e, prop, filter.id) })) : '', 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))));
177
133
  }), propFilters.filter(f => !f.hidden).length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
178
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
+ }
179
155
  autoCorrect(el) {
180
- var _a, _b;
181
156
  if (!el) {
182
157
  return;
183
158
  }
184
- const revoGrid = el.closest('revo-grid');
185
- 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) {
186
173
  return;
187
174
  }
188
- const pos = el.getBoundingClientRect();
189
- const gridPos = revoGrid.getBoundingClientRect();
190
- const maxLeft = gridPos.right - pos.width;
191
- if (pos.left > maxLeft && el.offsetLeft) {
192
- 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();
193
182
  }
194
183
  }
195
184
  onFilterTypeChange(e, prop, index) {
@@ -282,49 +271,6 @@ const FilterPanel = class {
282
271
  this.debouncedApplyFilter();
283
272
  }
284
273
  }
285
- onFilterDragStart(e, id) {
286
- this.draggedFilterId = id;
287
- setFilterReorderData(e.dataTransfer, id);
288
- }
289
- onFilterDragOver(e, id) {
290
- if (this.draggedFilterId === undefined || this.draggedFilterId === id) {
291
- return;
292
- }
293
- e.preventDefault();
294
- if (e.dataTransfer) {
295
- e.dataTransfer.dropEffect = 'move';
296
- }
297
- this.dragOverFilterId = id;
298
- }
299
- onFilterDragLeave(id) {
300
- if (this.dragOverFilterId === id) {
301
- this.dragOverFilterId = undefined;
302
- }
303
- }
304
- onFilterDrop(e, prop, targetId) {
305
- var _a;
306
- e.preventDefault();
307
- const sourceId = (_a = this.draggedFilterId) !== null && _a !== void 0 ? _a : getFilterReorderId(e.dataTransfer);
308
- this.onFilterDragEnd();
309
- if (sourceId === undefined) {
310
- return;
311
- }
312
- const items = this.filterItems[prop];
313
- if (!items) {
314
- return;
315
- }
316
- if (!moveFilterItem(items, sourceId, targetId)) {
317
- return;
318
- }
319
- this.filterId++;
320
- if (!this.disableDynamicFiltering) {
321
- this.debouncedApplyFilter();
322
- }
323
- }
324
- onFilterDragEnd() {
325
- this.draggedFilterId = undefined;
326
- this.dragOverFilterId = undefined;
327
- }
328
274
  toggleFilterAndOr(id) {
329
275
  var _a;
330
276
  this.assertChanges();
@@ -433,30 +379,33 @@ const FilterPanel = class {
433
379
  } }));
434
380
  }
435
381
  render() {
436
- var _a, _b, _c, _d, _e;
437
- if (!this.changes) {
438
- return h(Host, { style: { display: 'none' } });
439
- }
382
+ var _a, _b, _c, _d, _e, _f, _g;
440
383
  const style = {
441
- display: 'block',
442
- left: `${this.changes.x}px`,
443
- 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`,
444
386
  };
445
387
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
446
- return (h(Host, { style: style, ref: el => {
447
- var _a;
448
- ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) !== false && this.autoCorrect(el);
449
- } }, 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 && ([
450
- h("label", null, capts.title),
451
- h("div", { class: "filter-holder" }, this.getFilterItemsList()),
452
- h("div", { class: "add-filter" }, h("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType)))
453
- ]), 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 && [
454
- h("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
455
- h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
456
- ], !this.disableDynamicFiltering && [
457
- h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
458
- h("button", { id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, capts.reset),
459
- ]), 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
+ ])));
460
409
  }
461
410
  get element() { return getElement(this); }
462
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
- import { b as FILTER_PROP, i as isFilterBtn } from './filter.button-BFwo1uvz.js';
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
@@ -8,7 +8,6 @@ const FILTER_BUTTON_ACTIVE = 'active';
8
8
  const FILTER_PROP = 'hasFilter';
9
9
  const AND_OR_BUTTON = 'and-or-button';
10
10
  const TRASH_BUTTON = 'trash-button';
11
- const REORDER_BUTTON = 'reorder-button';
12
11
  const FilterButton = ({ column }) => {
13
12
  return (h("span", null, h("button", { class: {
14
13
  [FILTER_BUTTON_CLASS]: true,
@@ -21,19 +20,6 @@ const TrashButton = () => {
21
20
  const AndOrButton = ({ text }) => {
22
21
  return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, text);
23
22
  };
24
- const ReorderButton = ({ dragging, dragOver, onDragStart, onDragEnd, onDragOver, onDragLeave, onDrop, }) => {
25
- const applyClass = (el) => {
26
- if (!el) {
27
- return;
28
- }
29
- el.className = [
30
- REORDER_BUTTON,
31
- dragging ? 'filter-row-dragging' : '',
32
- dragOver ? 'filter-row-drag-over' : '',
33
- ].filter(Boolean).join(' ');
34
- };
35
- return (h("button", { type: "button", ref: applyClass, draggable: true, title: "Reorder filter", "aria-label": "reorder filter", onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop }, "::"));
36
- };
37
23
  function isFilterBtn(e) {
38
24
  if (e.classList.contains(FILTER_BUTTON_CLASS)) {
39
25
  return true;
@@ -41,4 +27,4 @@ function isFilterBtn(e) {
41
27
  return e === null || e === void 0 ? void 0 : e.closest(`.${FILTER_BUTTON_CLASS}`);
42
28
  }
43
29
 
44
- export { AND_OR_BUTTON as A, FILTER_BUTTON_CLASS as F, REORDER_BUTTON as R, TRASH_BUTTON as T, FILTER_BUTTON_ACTIVE as a, FILTER_PROP as b, FilterButton as c, TrashButton as d, AndOrButton as e, ReorderButton as f, isFilterBtn as i };
30
+ export { AND_OR_BUTTON as A, FILTER_BUTTON_CLASS as F, TRASH_BUTTON as T, FILTER_BUTTON_ACTIVE as a, FILTER_PROP as b, FilterButton as c, TrashButton as d, AndOrButton as e, isFilterBtn as i };
@@ -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.