@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
package/hydrate/index.js CHANGED
@@ -7359,7 +7359,6 @@ const FILTER_BUTTON_ACTIVE = 'active';
7359
7359
  const FILTER_PROP = 'hasFilter';
7360
7360
  const AND_OR_BUTTON = 'and-or-button';
7361
7361
  const TRASH_BUTTON = 'trash-button';
7362
- const REORDER_BUTTON = 'reorder-button';
7363
7362
  const FilterButton = ({ column }) => {
7364
7363
  return (hAsync("span", null, hAsync("button", { class: {
7365
7364
  [FILTER_BUTTON_CLASS]: true,
@@ -7372,19 +7371,6 @@ const TrashButton = () => {
7372
7371
  const AndOrButton = ({ text }) => {
7373
7372
  return hAsync("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, text);
7374
7373
  };
7375
- const ReorderButton = ({ dragging, dragOver, onDragStart, onDragEnd, onDragOver, onDragLeave, onDrop, }) => {
7376
- const applyClass = (el) => {
7377
- if (!el) {
7378
- return;
7379
- }
7380
- el.className = [
7381
- REORDER_BUTTON,
7382
- dragging ? 'filter-row-dragging' : '',
7383
- dragOver ? 'filter-row-drag-over' : '',
7384
- ].filter(Boolean).join(' ');
7385
- };
7386
- return (hAsync("button", { type: "button", ref: applyClass, draggable: true, title: "Reorder filter", "aria-label": "reorder filter", onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop }, "::"));
7387
- };
7388
7374
  function isFilterBtn(e) {
7389
7375
  if (e.classList.contains(FILTER_BUTTON_CLASS)) {
7390
7376
  return true;
@@ -7411,49 +7397,7 @@ function isFilterBtn(e) {
7411
7397
  }
7412
7398
  })();
7413
7399
 
7414
- const FILTER_REORDER_MIME = 'text/revogrid-filter-id';
7415
- function setFilterReorderData(dataTransfer, id) {
7416
- if (!dataTransfer) {
7417
- return;
7418
- }
7419
- dataTransfer.effectAllowed = 'move';
7420
- dataTransfer.setData(FILTER_REORDER_MIME, String(id));
7421
- dataTransfer.setData('text/plain', String(id));
7422
- }
7423
- function getFilterReorderId(dataTransfer) {
7424
- if (!dataTransfer) {
7425
- return;
7426
- }
7427
- const rawId = dataTransfer.getData(FILTER_REORDER_MIME) || dataTransfer.getData('text/plain');
7428
- const normalizedId = rawId.trim();
7429
- if (!normalizedId) {
7430
- return;
7431
- }
7432
- const id = Number(normalizedId);
7433
- return Number.isFinite(id) ? id : undefined;
7434
- }
7435
- function moveFilterItem(items, sourceId, targetId) {
7436
- if (sourceId === targetId) {
7437
- return false;
7438
- }
7439
- const sourceIndex = items.findIndex(item => item.id === sourceId);
7440
- const targetIndex = items.findIndex(item => item.id === targetId);
7441
- if (sourceIndex === -1 || targetIndex === -1 || sourceIndex === targetIndex) {
7442
- return false;
7443
- }
7444
- const relationsByPosition = items.map(item => { var _a; return (_a = item.relation) !== null && _a !== void 0 ? _a : 'and'; });
7445
- const [movedItem] = items.splice(sourceIndex, 1);
7446
- items.splice(targetIndex, 0, movedItem);
7447
- items.forEach((item, index) => {
7448
- var _a;
7449
- item.relation = index === items.length - 1
7450
- ? 'and'
7451
- : (_a = relationsByPosition[index]) !== null && _a !== void 0 ? _a : 'and';
7452
- });
7453
- return true;
7454
- }
7455
-
7456
- 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}`;
7400
+ 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}`;
7457
7401
 
7458
7402
  const defaultType = 'none';
7459
7403
  const FILTER_LIST_CLASS = 'multi-filter-list';
@@ -7554,7 +7498,6 @@ class FilterPanel {
7554
7498
  if (typeof prop === 'undefined')
7555
7499
  return '';
7556
7500
  const propFilters = (_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : [];
7557
- const visibleFilterCount = propFilters.filter(filter => !filter.hidden).length;
7558
7501
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
7559
7502
  return (hAsync("div", { key: this.filterId }, propFilters.map((filter, index) => {
7560
7503
  let andOrButton;
@@ -7565,24 +7508,56 @@ class FilterPanel {
7565
7508
  if (index !== this.filterItems[prop].length - 1) {
7566
7509
  andOrButton = (hAsync("div", { onClick: () => this.toggleFilterAndOr(filter.id) }, hAsync(AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or })));
7567
7510
  }
7568
- const extra = this.renderExtra(prop, index);
7569
- return (hAsync("div", { key: filter.id, class: FILTER_LIST_CLASS }, hAsync("div", { ref: el => el === null || el === void 0 ? void 0 : el.classList.add('multi-filter-list-row') }, visibleFilterCount > 1 ? (hAsync(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) })) : '', hAsync("div", { class: { 'select-input': true } }, hAsync("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), extra ? hAsync("div", { class: "filter-extra" }, extra) : ''), hAsync("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton, hAsync("div", { onClick: () => this.onRemoveFilter(filter.id) }, hAsync(TrashButton, null))))));
7511
+ return (hAsync("div", { key: filter.id, class: FILTER_LIST_CLASS }, hAsync("div", { class: { 'select-input': true } }, hAsync("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), hAsync("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton), hAsync("div", { onClick: () => this.onRemoveFilter(filter.id) }, hAsync(TrashButton, null))), hAsync("div", null, this.renderExtra(prop, index))));
7570
7512
  }), propFilters.filter(f => !f.hidden).length > 0 ? hAsync("div", { class: "add-filter-divider" }) : ''));
7571
7513
  }
7514
+ componentDidRender() {
7515
+ this.syncDialog();
7516
+ }
7517
+ syncDialog() {
7518
+ if (!this.dialog) {
7519
+ return;
7520
+ }
7521
+ if (!this.changes) {
7522
+ if (this.dialog.open) {
7523
+ this.dialog.close();
7524
+ }
7525
+ return;
7526
+ }
7527
+ if (!this.dialog.open) {
7528
+ this.dialog.show();
7529
+ }
7530
+ if (this.changes.autoCorrect !== false) {
7531
+ requestAnimationFrame(() => this.autoCorrect(this.dialog));
7532
+ }
7533
+ }
7572
7534
  autoCorrect(el) {
7573
- var _a, _b;
7574
7535
  if (!el) {
7575
7536
  return;
7576
7537
  }
7577
- const revoGrid = el.closest('revo-grid');
7578
- if (!revoGrid) {
7538
+ const pos = el.getBoundingClientRect();
7539
+ const maxLeft = Math.max(0, window.innerWidth - pos.width);
7540
+ const maxTop = Math.max(0, window.innerHeight - pos.height);
7541
+ if (pos.left > maxLeft) {
7542
+ el.style.left = `${maxLeft}px`;
7543
+ }
7544
+ if (pos.top > maxTop) {
7545
+ el.style.top = `${maxTop}px`;
7546
+ }
7547
+ }
7548
+ onDialogMouseDown(e) {
7549
+ if (!this.closeOnOutsideClick ||
7550
+ e.target !== this.dialog ||
7551
+ !this.dialog) {
7579
7552
  return;
7580
7553
  }
7581
- const pos = el.getBoundingClientRect();
7582
- const gridPos = revoGrid.getBoundingClientRect();
7583
- const maxLeft = gridPos.right - pos.width;
7584
- if (pos.left > maxLeft && el.offsetLeft) {
7585
- el.style.left = `${maxLeft - ((_b = (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left) !== null && _b !== void 0 ? _b : 0)}px`;
7554
+ const rect = this.dialog.getBoundingClientRect();
7555
+ const isInside = e.clientX >= rect.left &&
7556
+ e.clientX <= rect.right &&
7557
+ e.clientY >= rect.top &&
7558
+ e.clientY <= rect.bottom;
7559
+ if (!isInside) {
7560
+ this.onCancel();
7586
7561
  }
7587
7562
  }
7588
7563
  onFilterTypeChange(e, prop, index) {
@@ -7675,49 +7650,6 @@ class FilterPanel {
7675
7650
  this.debouncedApplyFilter();
7676
7651
  }
7677
7652
  }
7678
- onFilterDragStart(e, id) {
7679
- this.draggedFilterId = id;
7680
- setFilterReorderData(e.dataTransfer, id);
7681
- }
7682
- onFilterDragOver(e, id) {
7683
- if (this.draggedFilterId === undefined || this.draggedFilterId === id) {
7684
- return;
7685
- }
7686
- e.preventDefault();
7687
- if (e.dataTransfer) {
7688
- e.dataTransfer.dropEffect = 'move';
7689
- }
7690
- this.dragOverFilterId = id;
7691
- }
7692
- onFilterDragLeave(id) {
7693
- if (this.dragOverFilterId === id) {
7694
- this.dragOverFilterId = undefined;
7695
- }
7696
- }
7697
- onFilterDrop(e, prop, targetId) {
7698
- var _a;
7699
- e.preventDefault();
7700
- const sourceId = (_a = this.draggedFilterId) !== null && _a !== void 0 ? _a : getFilterReorderId(e.dataTransfer);
7701
- this.onFilterDragEnd();
7702
- if (sourceId === undefined) {
7703
- return;
7704
- }
7705
- const items = this.filterItems[prop];
7706
- if (!items) {
7707
- return;
7708
- }
7709
- if (!moveFilterItem(items, sourceId, targetId)) {
7710
- return;
7711
- }
7712
- this.filterId++;
7713
- if (!this.disableDynamicFiltering) {
7714
- this.debouncedApplyFilter();
7715
- }
7716
- }
7717
- onFilterDragEnd() {
7718
- this.draggedFilterId = undefined;
7719
- this.dragOverFilterId = undefined;
7720
- }
7721
7653
  toggleFilterAndOr(id) {
7722
7654
  var _a;
7723
7655
  this.assertChanges();
@@ -7826,30 +7758,33 @@ class FilterPanel {
7826
7758
  } }));
7827
7759
  }
7828
7760
  render() {
7829
- var _a, _b, _c, _d, _e;
7830
- if (!this.changes) {
7831
- return hAsync(Host, { style: { display: 'none' } });
7832
- }
7761
+ var _a, _b, _c, _d, _e, _f, _g;
7833
7762
  const style = {
7834
- display: 'block',
7835
- left: `${this.changes.x}px`,
7836
- top: `${this.changes.y}px`,
7763
+ left: `${(_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0}px`,
7764
+ top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
7837
7765
  };
7838
7766
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
7839
- return (hAsync(Host, { style: style, ref: el => {
7840
- var _a;
7841
- ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) !== false && this.autoCorrect(el);
7842
- } }, hAsync("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 && ([
7843
- hAsync("label", null, capts.title),
7844
- hAsync("div", { class: "filter-holder" }, this.getFilterItemsList()),
7845
- hAsync("div", { class: "add-filter" }, hAsync("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType)))
7846
- ]), hAsync("slot", null), ((_e = (_d = this.changes).extraBottomContent) === null || _e === void 0 ? void 0 : _e.call(_d, this.changes)) || '', hAsync("div", { class: "filter-actions" }, this.disableDynamicFiltering && [
7847
- hAsync("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
7848
- hAsync("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
7849
- ], !this.disableDynamicFiltering && [
7850
- hAsync("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
7851
- hAsync("button", { id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, capts.reset),
7852
- ]), hAsync("slot", { slot: "footer" })));
7767
+ return (hAsync(Host, { key: '9fb424017d080876ff7796237917b4f41f617fe0' }, hAsync("dialog", { key: '37b9f870b95f6fe1bd7be359dd7b77ef196e896e', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
7768
+ e.preventDefault();
7769
+ this.onCancel();
7770
+ }, onMouseDown: e => this.onDialogMouseDown(e) }, this.changes && [
7771
+ hAsync("slot", { key: '76ec505a92d0a7c1ae0bbb5f4cac63555f3416be', slot: "header" }),
7772
+ ((_f = (_e = this.changes).extraContent) === null || _f === void 0 ? void 0 : _f.call(_e, this.changes)) || '',
7773
+ ((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
7774
+ hAsync("label", { key: 'c6fd82c95f6005f286c7bc90de34956128a83246' }, capts.title),
7775
+ hAsync("div", { key: '5e7dac36ad79ba1b6072a0053b30aa384ade0dde', class: "filter-holder" }, this.getFilterItemsList()),
7776
+ hAsync("div", { key: 'd9b6103edbd138d4db845745686ee4c847310a66', class: "add-filter" }, hAsync("select", { key: 'c1b321f2d19458f95ab3f9188d83d94bebdb688e', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
7777
+ ],
7778
+ hAsync("slot", { key: '1571dcbc5c57651deb42a4046272ff60fa74f5a7' }),
7779
+ hAsync("div", { key: '4aa7dee532336b084542df0209291b4c60378b49', class: "filter-actions" }, this.disableDynamicFiltering && [
7780
+ hAsync("button", { key: '4c1b3054cd1bb7f46877592f00f6634d0f7ecafa', id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
7781
+ hAsync("button", { key: 'f31a568c89be18b1a854cdd7d4726e01db24e338', id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
7782
+ ], !this.disableDynamicFiltering && [
7783
+ hAsync("button", { key: '5d40e8b1f13f94cff4f5a2e2aefeee8861104a9d', id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
7784
+ hAsync("button", { key: '67eac3abd16f6f6e2ed7089dcfb0d05524ddb7df', id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, capts.reset),
7785
+ ]),
7786
+ hAsync("slot", { key: 'b27a9bb3ef814e1e09dca14eda3e332ff34c654c', slot: "footer" }),
7787
+ ])));
7853
7788
  }
7854
7789
  get element() { return getElement(this); }
7855
7790
  static get style() { return filterStyleCss(); }
@@ -7868,8 +7803,6 @@ class FilterPanel {
7868
7803
  "currentFilterType": [32],
7869
7804
  "changes": [32],
7870
7805
  "filterItems": [32],
7871
- "draggedFilterId": [32],
7872
- "dragOverFilterId": [32],
7873
7806
  "show": [64],
7874
7807
  "getChanges": [64]
7875
7808
  },
@@ -13151,82 +13084,43 @@ class ColumnService {
13151
13084
  mapping,
13152
13085
  };
13153
13086
  }
13154
- getTransformedDataToApply({ start, data, targetRange, }) {
13087
+ getTransformedDataToApply(start, data) {
13155
13088
  const changed = {};
13156
13089
  const copyRowLength = data.length;
13157
- if (!copyRowLength) {
13158
- return {
13159
- changed,
13160
- range: null,
13161
- };
13162
- }
13163
13090
  const colLength = this.columns.length;
13164
13091
  const rowLength = this.dataStore.get('items').length;
13165
- const bounds = this.getDataApplyBounds(start, targetRange, copyRowLength, rowLength, colLength);
13166
- if (!bounds) {
13167
- return {
13168
- changed,
13169
- range: null,
13170
- };
13171
- }
13172
- const { startRow, startCol, endRow } = bounds;
13173
- let maxCol = startCol - 1;
13174
- let lastRow = startRow - 1;
13175
13092
  // rows
13176
- for (let rowIndex = startRow, i = 0; rowIndex <= endRow; rowIndex++, i++) {
13093
+ let rowIndex = start.y;
13094
+ let maxCol = 0;
13095
+ for (let i = 0; rowIndex < rowLength && i < copyRowLength; rowIndex++, i++) {
13177
13096
  // copy original data link
13178
13097
  const copyRow = data[i % copyRowLength];
13179
13098
  const copyColLength = (copyRow === null || copyRow === void 0 ? void 0 : copyRow.length) || 0;
13180
- if (!copyColLength) {
13181
- continue;
13099
+ // columns
13100
+ let colIndex = start.x;
13101
+ for (let j = 0; colIndex < colLength && j < copyColLength; colIndex++, j++) {
13102
+ const p = this.columns[colIndex].prop;
13103
+ const currentCol = j % colLength;
13104
+ /** if can write */
13105
+ if (!this.isReadOnly(rowIndex, colIndex)) {
13106
+ /** to show before save */
13107
+ if (!changed[rowIndex]) {
13108
+ changed[rowIndex] = {};
13109
+ }
13110
+ changed[rowIndex][p] = copyRow[currentCol];
13111
+ }
13182
13112
  }
13183
- maxCol = Math.max(maxCol, this.applyClipboardRow(changed, {
13184
- bounds,
13185
- copyColLength,
13186
- copyRow,
13187
- rowIndex,
13188
- start,
13189
- targetRange,
13190
- }));
13191
- lastRow = rowIndex;
13113
+ maxCol = Math.max(maxCol, colIndex - 1);
13192
13114
  }
13115
+ const range = getRange(start, {
13116
+ y: rowIndex - 1,
13117
+ x: maxCol,
13118
+ });
13193
13119
  return {
13194
13120
  changed,
13195
- range: this.getAppliedRange(bounds, lastRow, maxCol),
13121
+ range,
13196
13122
  };
13197
13123
  }
13198
- getDataApplyBounds(start, targetRange, copyRowLength, rowLength, colLength) {
13199
- var _a, _b, _c;
13200
- const startRow = (_a = targetRange === null || targetRange === void 0 ? void 0 : targetRange.y) !== null && _a !== void 0 ? _a : start.y;
13201
- const startCol = (_b = targetRange === null || targetRange === void 0 ? void 0 : targetRange.x) !== null && _b !== void 0 ? _b : start.x;
13202
- 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);
13203
- if (endRow < startRow || startCol >= colLength) {
13204
- return null;
13205
- }
13206
- return { startRow, startCol, endRow, colLength };
13207
- }
13208
- applyClipboardRow(changed, { bounds, copyColLength, copyRow, rowIndex, start, targetRange, }) {
13209
- var _a;
13210
- 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);
13211
- for (let colIndex = bounds.startCol, j = 0; colIndex <= endCol; colIndex++, j++) {
13212
- if (this.isReadOnly(rowIndex, colIndex)) {
13213
- continue;
13214
- }
13215
- const prop = this.columns[colIndex].prop;
13216
- changed[rowIndex] = changed[rowIndex] || {};
13217
- changed[rowIndex][prop] = copyRow[j % copyColLength];
13218
- }
13219
- return endCol;
13220
- }
13221
- getAppliedRange({ startRow, startCol }, lastRow, maxCol) {
13222
- if (lastRow < startRow || maxCol < startCol) {
13223
- return null;
13224
- }
13225
- return getRange({ x: startCol, y: startRow }, {
13226
- y: lastRow,
13227
- x: maxCol,
13228
- });
13229
- }
13230
13124
  getRangeStaticData(d, value) {
13231
13125
  const changed = {};
13232
13126
  // rows
@@ -13893,30 +13787,6 @@ class AutoFillService {
13893
13787
  }
13894
13788
  }
13895
13789
 
13896
- function getRangeFillClipboardData(data, useClipboard) {
13897
- var _a;
13898
- if (!isClipboardRangeFillEnabled(useClipboard)) {
13899
- return null;
13900
- }
13901
- const normalized = trimTrailingEmptyClipboardRows(data);
13902
- return normalized.length === 1 && ((_a = normalized[0]) === null || _a === void 0 ? void 0 : _a.length) === 1
13903
- ? normalized
13904
- : null;
13905
- }
13906
- function isClipboardRangeFillEnabled(useClipboard) {
13907
- return (typeof useClipboard === 'object' && useClipboard.rangeFill === true);
13908
- }
13909
- function trimTrailingEmptyClipboardRows(data) {
13910
- const rows = [...data];
13911
- while (rows.length > 1 && isEmptyClipboardRow(rows[rows.length - 1])) {
13912
- rows.pop();
13913
- }
13914
- return rows;
13915
- }
13916
- function isEmptyClipboardRow(row) {
13917
- return !row || row.every(cell => cell === '');
13918
- }
13919
-
13920
13790
  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}`;
13921
13791
 
13922
13792
  /**
@@ -14167,9 +14037,9 @@ class OverlaySelection {
14167
14037
  nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
14168
14038
  }
14169
14039
  }
14170
- return (hAsync(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),
14040
+ return (hAsync(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),
14171
14041
  // it's done to be able to throw events from different levels, not just from editor
14172
- onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: '3cbe4c3ad7d447f779e9e20f73eec2e3107275e0', name: "data" })));
14042
+ onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: 'cd3525d404aa44fd8d06e7fc459777acb8a9d585', name: "data" })));
14173
14043
  }
14174
14044
  /**
14175
14045
  * Executes the focus operation on the specified range of cells.
@@ -14334,25 +14204,13 @@ class OverlaySelection {
14334
14204
  if (!focus || isEditing) {
14335
14205
  return;
14336
14206
  }
14337
- const rangeFillData = getRangeFillClipboardData(data, this.useClipboard);
14338
- const targetRange = rangeFillData
14339
- ? this.getClipboardPasteTargetRange()
14340
- : null;
14341
- let { changed, range } = this.columnService.getTransformedDataToApply({
14342
- start: focus,
14343
- data: rangeFillData || data,
14344
- targetRange,
14345
- });
14207
+ let { changed, range } = this.columnService.getTransformedDataToApply(focus, data);
14346
14208
  const { defaultPrevented: canPaste } = this.rangeClipboardPaste.emit(Object.assign({ data: changed, models: collectModelsOfRange(changed, this.dataStore), range }, this.types));
14347
14209
  if (canPaste) {
14348
14210
  return;
14349
14211
  }
14350
14212
  (_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range, range);
14351
14213
  }
14352
- getClipboardPasteTargetRange() {
14353
- const range = this.selectionStore.get('range');
14354
- return range && !isRangeSingleCell(range) ? range : null;
14355
- }
14356
14214
  async focusNext() {
14357
14215
  var _a;
14358
14216
  const canFocus = await ((_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyChangeSelection(new KeyboardEvent('keydown', {
@@ -15884,7 +15742,8 @@ class FilterPlugin extends BasePlugin {
15884
15742
  async headerclick(e) {
15885
15743
  var _a, _b;
15886
15744
  const el = (_a = e.detail.originalEvent) === null || _a === void 0 ? void 0 : _a.target;
15887
- if (!isFilterBtn(el)) {
15745
+ const filterButton = isFilterBtn(el);
15746
+ if (!filterButton) {
15888
15747
  return;
15889
15748
  }
15890
15749
  e.preventDefault();
@@ -15898,9 +15757,8 @@ class FilterPlugin extends BasePlugin {
15898
15757
  return;
15899
15758
  }
15900
15759
  // filter button clicked, open filter dialog
15901
- const gridPos = this.revogrid.getBoundingClientRect();
15902
- const buttonPos = el.getBoundingClientRect();
15903
- 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 });
15760
+ const buttonPos = (filterButton instanceof HTMLElement ? filterButton : el).getBoundingClientRect();
15761
+ 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 });
15904
15762
  (_b = this.beforeshow) === null || _b === void 0 ? void 0 : _b.call(this, data);
15905
15763
  this.pop.show(data);
15906
15764
  }
@@ -17158,22 +17016,9 @@ function filterOutEmptyGroupRows(source, filterTrimmed) {
17158
17016
  return trimmed;
17159
17017
  }
17160
17018
 
17161
- var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
17162
- var t = {};
17163
- for (var p in s)
17164
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
17165
- t[p] = s[p];
17166
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17167
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17168
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17169
- t[p[i]] = s[p[i]];
17170
- }
17171
- return t;
17172
- };
17173
17019
  const PADDING_DEPTH = 10;
17174
- const RowRenderer = (_a, cells) => {
17175
- var { rowClass, index, size, start, depth, groupingLevel } = _a, attrs = __rest$1(_a, ["rowClass", "index", "size", "start", "depth", "groupingLevel"]);
17176
- const props = Object.assign(Object.assign(Object.assign({}, attrs), { [DATA_ROW]: index }), (typeof groupingLevel === 'number'
17020
+ const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
17021
+ const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
17177
17022
  ? { 'data-level': groupingLevel }
17178
17023
  : {}));
17179
17024
  return (hAsync("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
@@ -17200,17 +17045,12 @@ const GroupingRowRenderer = (props) => {
17200
17045
  const name = model[PSEUDO_GROUP_ITEM];
17201
17046
  const expanded = model[GROUP_EXPANDED];
17202
17047
  const depth = parseInt(model[GROUP_DEPTH], 10) || 0;
17203
- const groupRowAttrs = {
17204
- rowClass: 'groupingRow',
17205
- depth,
17206
- expanded,
17207
- };
17208
17048
  if (groupingCustomRenderer) {
17209
- return (hAsync(RowRenderer, Object.assign({}, props, groupRowAttrs), hAsync("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(hAsync, Object.assign(Object.assign({}, props), { colType: props.providers.colType, name,
17049
+ return (hAsync(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }), hAsync("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(hAsync, Object.assign(Object.assign({}, props), { colType: props.providers.colType, name,
17210
17050
  expanded,
17211
17051
  depth })))));
17212
17052
  }
17213
- return (hAsync(RowRenderer, Object.assign({}, props, groupRowAttrs), hasExpand && [
17053
+ return (hAsync(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }), hasExpand && [
17214
17054
  hAsync("button", { class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) }, expandSvgIconVNode(expanded)),
17215
17055
  name,
17216
17056
  ]));
@@ -18683,17 +18523,8 @@ class ColumnMovePlugin extends BasePlugin {
18683
18523
  constructor(revogrid, providers) {
18684
18524
  super(revogrid, providers);
18685
18525
  this.moveFunc = debounce$1((e) => this.doMove(e), 5);
18686
- this.preventHeaderClickAfterDrag = (event) => {
18687
- if (!this.preventNextHeaderClick) {
18688
- return;
18689
- }
18690
- this.preventNextHeaderClick = false;
18691
- event.preventDefault();
18692
- };
18693
18526
  this.staticDragData = null;
18694
18527
  this.dragData = null;
18695
- this.columnDragMoved = false;
18696
- this.preventNextHeaderClick = false;
18697
18528
  this.localSubscriptions = {};
18698
18529
  this.orderUi = new ColumnOrderHandler();
18699
18530
  revogrid.appendChild(this.orderUi.render());
@@ -18712,13 +18543,11 @@ class ColumnMovePlugin extends BasePlugin {
18712
18543
  callback: (e) => this.move(e),
18713
18544
  };
18714
18545
  this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
18715
- this.revogrid.addEventListener('beforeheaderclick', this.preventHeaderClickAfterDrag, { capture: true });
18716
18546
  }
18717
18547
  dragStart({ event, data }) {
18718
18548
  if (event.defaultPrevented) {
18719
18549
  return;
18720
18550
  }
18721
- this.preventNextHeaderClick = false;
18722
18551
  const { defaultPrevented } = dispatch(this.revogrid, COLUMN_DRAG_START_EVENT, data);
18723
18552
  // check if allowed to drag particulat column
18724
18553
  if (defaultPrevented) {
@@ -18740,8 +18569,7 @@ class ColumnMovePlugin extends BasePlugin {
18740
18569
  const cols = this.getDimension(data.pin || 'rgCol');
18741
18570
  const gridRect = this.revogrid.getBoundingClientRect();
18742
18571
  const elRect = dataEl.getBoundingClientRect();
18743
- const startItem = getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left) +
18744
- (cols.renderOffset || 0));
18572
+ const startItem = getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left) + (cols.renderOffset || 0));
18745
18573
  this.staticDragData = {
18746
18574
  startPos: event.x,
18747
18575
  startItem,
@@ -18772,14 +18600,10 @@ class ColumnMovePlugin extends BasePlugin {
18772
18600
  if (rgCol.itemIndex >= this.staticDragData.cols.count) {
18773
18601
  return;
18774
18602
  }
18775
- this.orderUi.showHandler(getColumnDragPosition(rgCol, this.staticDragData.startItem, this.staticDragData.cols.renderOffset || 0, dragData.scrollOffset), dragData.gridRect.width);
18603
+ this.orderUi.showHandler(rgCol.end - (this.staticDragData.cols.renderOffset || 0) + dragData.scrollOffset, dragData.gridRect.width);
18776
18604
  }
18777
18605
  }
18778
18606
  move(e) {
18779
- if (this.staticDragData &&
18780
- Math.abs(this.staticDragData.startPos - e.x) > 10) {
18781
- this.columnDragMoved = true;
18782
- }
18783
18607
  dispatch(this.revogrid, COLUMN_DRAG_MOVE_EVENT, e);
18784
18608
  // then do move
18785
18609
  this.moveFunc(e);
@@ -18788,7 +18612,6 @@ class ColumnMovePlugin extends BasePlugin {
18788
18612
  this.clearOrder();
18789
18613
  }
18790
18614
  onMouseUp(e) {
18791
- const suppressClick = this.columnDragMoved;
18792
18615
  // apply new positions
18793
18616
  if (this.dragData && this.staticDragData) {
18794
18617
  let relativePos = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
@@ -18811,9 +18634,6 @@ class ColumnMovePlugin extends BasePlugin {
18811
18634
  }
18812
18635
  dispatch(this.revogrid, COLUMN_DRAG_END_EVENT, this.getData(this.staticDragData, newItems, source));
18813
18636
  }
18814
- if (suppressClick) {
18815
- this.preventNextHeaderClick = !!e.target.closest('revogr-header');
18816
- }
18817
18637
  this.clearOrder();
18818
18638
  }
18819
18639
  clearLocalSubscriptions() {
@@ -18822,7 +18642,6 @@ class ColumnMovePlugin extends BasePlugin {
18822
18642
  clearOrder() {
18823
18643
  this.staticDragData = null;
18824
18644
  this.dragData = null;
18825
- this.columnDragMoved = false;
18826
18645
  this.clearLocalSubscriptions();
18827
18646
  this.orderUi.stop(this.revogrid);
18828
18647
  }
@@ -18832,7 +18651,6 @@ class ColumnMovePlugin extends BasePlugin {
18832
18651
  clearSubscriptions() {
18833
18652
  super.clearSubscriptions();
18834
18653
  this.clearLocalSubscriptions();
18835
- this.revogrid.removeEventListener('beforeheaderclick', this.preventHeaderClickAfterDrag, { capture: true });
18836
18654
  }
18837
18655
  getData({ gridEl, dataEl, pin }, order, source = []) {
18838
18656
  const gridRect = gridEl.getBoundingClientRect();
@@ -18854,12 +18672,6 @@ class ColumnMovePlugin extends BasePlugin {
18854
18672
  function getLeftRelative(absoluteX, gridPos, offset) {
18855
18673
  return absoluteX - gridPos - offset;
18856
18674
  }
18857
- function getColumnDragPosition(targetItem, startItem, renderOffset, scrollOffset) {
18858
- const insertionEdge = startItem.itemIndex > targetItem.itemIndex
18859
- ? targetItem.start
18860
- : targetItem.end;
18861
- return insertionEdge - renderOffset + scrollOffset;
18862
- }
18863
18675
 
18864
18676
  function isMobileDevice() {
18865
18677
  return /Mobi/i.test(navigator.userAgent) || /Android/i.test(navigator.userAgent) || navigator.maxTouchPoints > 0;
@@ -19209,7 +19021,7 @@ class RevoGridComponent {
19209
19021
  this.rowSize = 0;
19210
19022
  /** Indicates default column size. */
19211
19023
  this.colSize = 100;
19212
- /** When true, user can select a cell range. Required for range-based clipboard fill. */
19024
+ /** When true, user can range selection. */
19213
19025
  this.range = false;
19214
19026
  /** When true, grid in read only mode. */
19215
19027
  this.readonly = false;
@@ -19221,7 +19033,7 @@ class RevoGridComponent {
19221
19033
  this.noHorizontalScrollTransfer = false;
19222
19034
  /** When true cell focus appear. */
19223
19035
  this.canFocus = true;
19224
- /** When true enable clipboard. Can be boolean or clipboard config. */
19036
+ /** When true enable clipboard. */
19225
19037
  this.useClipboard = true;
19226
19038
  /**
19227
19039
  * Columns - defines an array of grid columns.
@@ -22077,17 +21889,9 @@ class RevogrViewportScroll {
22077
21889
  }
22078
21890
  render() {
22079
21891
  var _a, _b;
22080
- const clientHeight = (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0;
22081
- // When content fits in the viewport (no scroll needed), don't inflate content-wrapper
22082
- // to clientHeight — that would prevent inner-content-table from shrinking and push
22083
- // rowPinEnd (footer) to the bottom instead of letting it follow the data rows.
22084
- // For large/compressed grids (content > clientHeight), physicalContentHeight handles
22085
- // the browser scroll-size compression correctly.
22086
- const physicalContentHeight = this.contentHeight < clientHeight
22087
- ? Math.max(this.contentHeight, 0)
22088
- : getContentSize(this.contentHeight, clientHeight);
21892
+ const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
22089
21893
  const physicalContentWidth = getContentSize(this.contentWidth, 0);
22090
- return (hAsync(Host, { key: '3dd9d29cf26743d7aa4995f51180d56008526e54', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'af75428e845044c33eba2fecd1ec04a9177b9b5c', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, hAsync("div", { key: 'a0149f597588371e1fafe69efc3bd4411379a017', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: 'e5d2570bf93897cd97ef702141c83bb8c0e13ee2', name: HEADER_SLOT })), hAsync("div", { key: 'd1388ff0d721dd8ce925b934bb2128fddc1ac17b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'a306ff56f62279402e2a881a081e3224341d5bdf', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, hAsync("slot", { key: '898bda8e9429da06c9ff2bd41626ac27f3cde3cc', name: CONTENT_SLOT }))), hAsync("div", { key: '5e9eba1edd5fca07a964971054a7900e4dd84099', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: 'f233ad1c23b3f692c45e1db235cfef4704a80726', name: FOOTER_SLOT })))));
21894
+ return (hAsync(Host, { key: 'ec8d907976c1d50f7aab3c263be3f0249a274df6', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'e35696a7993ac94261426b45c28d488cdc42b7f0', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, hAsync("div", { key: 'a6997451e01eacda1d27d4efa1d74e1748626218', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '1d401e87d32d5b1531c2211723b552bbc894f22c', name: HEADER_SLOT })), hAsync("div", { key: 'ceab6f9e812d6ca9a0aa376afcd2562a17f505e0', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'a9556578a23d6efddec2e982e863aec064042154', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, hAsync("slot", { key: '0ae01f9736b9740612e75261f6e3abebda533377', name: CONTENT_SLOT }))), hAsync("div", { key: '09c2565d4ed449a43820f92d97b6558fca3758e7', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '1ffb08ff8138a560cc09d82e3fe22a53e502aafe', name: FOOTER_SLOT })))));
22091
21895
  }
22092
21896
  /**
22093
21897
  * Extra layer for scroll event monitoring, where MouseWheel event is not passing