@revolist/revogrid 3.2.12 → 3.2.13

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 (55) hide show
  1. package/custom-element/index.d.ts +98 -15
  2. package/custom-element/index.js +29221 -15
  3. package/package.json +1 -1
  4. package/custom-element/_baseIteratee.js +0 -2070
  5. package/custom-element/columnService.js +0 -743
  6. package/custom-element/consts.js +0 -46
  7. package/custom-element/data.store.js +0 -545
  8. package/custom-element/debounce.js +0 -217
  9. package/custom-element/dimension.helpers.js +0 -340
  10. package/custom-element/each.js +0 -180
  11. package/custom-element/filter.button.js +0 -36
  12. package/custom-element/identity.js +0 -26
  13. package/custom-element/isSymbol.js +0 -220
  14. package/custom-element/keys.js +0 -561
  15. package/custom-element/localScrollService.js +0 -86
  16. package/custom-element/revo-grid.d.ts +0 -11
  17. package/custom-element/revo-grid.js +0 -3661
  18. package/custom-element/revogr-clipboard.d.ts +0 -11
  19. package/custom-element/revogr-clipboard.js +0 -71
  20. package/custom-element/revogr-data.d.ts +0 -11
  21. package/custom-element/revogr-data.js +0 -9
  22. package/custom-element/revogr-data2.js +0 -170
  23. package/custom-element/revogr-edit.d.ts +0 -11
  24. package/custom-element/revogr-edit.js +0 -9
  25. package/custom-element/revogr-edit2.js +0 -401
  26. package/custom-element/revogr-filter-panel.d.ts +0 -11
  27. package/custom-element/revogr-filter-panel.js +0 -307
  28. package/custom-element/revogr-focus.d.ts +0 -11
  29. package/custom-element/revogr-focus.js +0 -9
  30. package/custom-element/revogr-focus2.js +0 -63
  31. package/custom-element/revogr-header.d.ts +0 -11
  32. package/custom-element/revogr-header.js +0 -9
  33. package/custom-element/revogr-header2.js +0 -590
  34. package/custom-element/revogr-order-editor.d.ts +0 -11
  35. package/custom-element/revogr-order-editor.js +0 -9
  36. package/custom-element/revogr-order-editor2.js +0 -189
  37. package/custom-element/revogr-overlay-selection.d.ts +0 -11
  38. package/custom-element/revogr-overlay-selection.js +0 -9
  39. package/custom-element/revogr-overlay-selection2.js +0 -740
  40. package/custom-element/revogr-row-headers.d.ts +0 -11
  41. package/custom-element/revogr-row-headers.js +0 -9
  42. package/custom-element/revogr-row-headers2.js +0 -402
  43. package/custom-element/revogr-scroll-virtual.d.ts +0 -11
  44. package/custom-element/revogr-scroll-virtual.js +0 -9
  45. package/custom-element/revogr-scroll-virtual2.js +0 -134
  46. package/custom-element/revogr-temp-range.d.ts +0 -11
  47. package/custom-element/revogr-temp-range.js +0 -9
  48. package/custom-element/revogr-temp-range2.js +0 -17274
  49. package/custom-element/revogr-viewport-scroll.d.ts +0 -11
  50. package/custom-element/revogr-viewport-scroll.js +0 -9
  51. package/custom-element/revogr-viewport-scroll2.js +0 -366
  52. package/custom-element/selection.utils.js +0 -106
  53. package/custom-element/toInteger.js +0 -107
  54. package/custom-element/toNumber.js +0 -105
  55. package/custom-element/utils.js +0 -69
@@ -1,307 +0,0 @@
1
- /*!
2
- * Built by Revolist
3
- */
4
- import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
5
- import { i as isFilterBtn, A as AndOrButton, T as TrashButton } from './filter.button.js';
6
- import { d as debounce_1 } from './debounce.js';
7
-
8
- const RevoButton = (props, children) => {
9
- return (h("button", Object.assign({}, props, { class: Object.assign(Object.assign({}, (typeof props.class === 'object' ? props.class : props.class ? { [props.class]: true } : '')), { ['revo-button']: true }) }), children));
10
- };
11
-
12
- (function closest() {
13
- if (!Element.prototype.matches) {
14
- Element.prototype.matches =
15
- Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
16
- }
17
- if (!Element.prototype.closest) {
18
- Element.prototype.closest = function (s) {
19
- let el = this;
20
- do {
21
- if (Element.prototype.matches.call(el, s)) {
22
- return el;
23
- }
24
- el = el.parentElement || el.parentNode;
25
- } while (el !== null && el.nodeType === 1);
26
- return null;
27
- };
28
- }
29
- })();
30
-
31
- const filterStyleCss = ".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:220px;text-align:left}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{color:gray;font-size:13px;font-weight:600;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:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel button{margin-top:10px;margin-right:5px}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}.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;font-weight:600;color:#444;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 #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;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\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);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:#c5c5c5}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;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:#f1f1f1}.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:22px;color:gray;font-size:18px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid #d9d9d9;height:10px;box-shadow:0 4px 5px rgba(0, 0, 0, 0.05)}.select-input{display:flex;justify-content:space-between;align-items:center}";
32
-
33
- const defaultType = 'none';
34
- const FILTER_LIST_CLASS = 'multi-filter-list';
35
- const FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';
36
- const FilterPanel = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
37
- constructor() {
38
- super();
39
- this.__registerHost();
40
- this.filterChange = createEvent(this, "filterChange", 7);
41
- this.filterCaptionsInternal = {
42
- title: 'Filter by condition',
43
- save: 'Save',
44
- reset: 'Reset',
45
- cancel: 'Close',
46
- };
47
- this.isFilterIdSet = false;
48
- this.filterId = 0;
49
- this.currentFilterId = -1;
50
- this.currentFilterType = defaultType;
51
- this.filterItems = {};
52
- this.filterTypes = {};
53
- this.filterNames = {};
54
- this.filterEntities = {};
55
- this.disableDynamicFiltering = false;
56
- this.debouncedApplyFilter = debounce_1(() => {
57
- this.filterChange.emit(this.filterItems);
58
- }, 400);
59
- }
60
- onMouseDown(e) {
61
- if (this.changes && !e.defaultPrevented) {
62
- const el = e.target;
63
- if (this.isOutside(el) && !isFilterBtn(el)) {
64
- this.changes = undefined;
65
- }
66
- }
67
- }
68
- async show(newEntity) {
69
- this.changes = newEntity;
70
- if (this.changes) {
71
- this.changes.type = this.changes.type || defaultType;
72
- }
73
- }
74
- async getChanges() {
75
- return this.changes;
76
- }
77
- componentWillRender() {
78
- if (!this.isFilterIdSet) {
79
- this.isFilterIdSet = true;
80
- const filterItems = Object.keys(this.filterItems);
81
- for (const prop of filterItems) {
82
- // we set the proper filterId so there won't be any conflict when removing filters
83
- this.filterId += this.filterItems[prop].length;
84
- }
85
- }
86
- }
87
- renderSelectOptions(type, isDefaultTypeRemoved = false) {
88
- var _a;
89
- const options = [];
90
- const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
91
- if (!isDefaultTypeRemoved) {
92
- options.push(h("option", { selected: this.currentFilterType === defaultType, value: defaultType }, prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? 'Add more condition...' : this.filterNames[defaultType]));
93
- }
94
- for (let gIndex in this.filterTypes) {
95
- options.push(...this.filterTypes[gIndex].map(k => (h("option", { value: k, selected: type === k }, this.filterNames[k]))));
96
- options.push(h("option", { disabled: true }));
97
- }
98
- return options;
99
- }
100
- renderExtra(prop, index) {
101
- const currentFilter = this.filterItems[prop];
102
- if (!currentFilter)
103
- return '';
104
- if (this.filterEntities[currentFilter[index].type].extra !== 'input')
105
- return '';
106
- return (h("input", { id: `filter-input-${currentFilter[index].id}`, placeholder: "Enter value...", type: "text", value: currentFilter[index].value, onInput: this.onUserInput.bind(this, index, prop), onKeyDown: e => this.onKeyDown(e) }));
107
- }
108
- getFilterItemsList() {
109
- var _a;
110
- const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
111
- if (!(prop || prop === 0))
112
- return '';
113
- const propFilters = this.filterItems[prop] || [];
114
- return (h("div", { key: this.filterId }, propFilters.map((d, index) => {
115
- let andOrButton;
116
- // hide toggle button if there is only one filter and the last one
117
- if (index !== this.filterItems[prop].length - 1) {
118
- andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(d.id) }, h(AndOrButton, { isAnd: d.relation === 'and' })));
119
- }
120
- return (h("div", { key: d.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(d.id) }, h(TrashButton, null))), h("div", null, this.renderExtra(prop, index))));
121
- }), propFilters.length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
122
- }
123
- render() {
124
- if (!this.changes) {
125
- return h(Host, { style: { display: 'none' } });
126
- }
127
- const style = {
128
- display: 'block',
129
- left: `${this.changes.x}px`,
130
- top: `${this.changes.y}px`,
131
- };
132
- const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
133
- return (h(Host, { style: style }, h("label", null, capts.title), h("div", { class: "filter-holder" }, this.getFilterItemsList()), h("div", { class: "add-filter" }, h("select", { id: "add-filter", class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), h("div", { class: "filter-actions" }, this.disableDynamicFiltering &&
134
- h(RevoButton, { class: { red: true, save: true }, onClick: () => this.onSave() }, capts.save), h(RevoButton, { class: { red: true, reset: true }, onClick: () => this.onReset() }, capts.reset), h(RevoButton, { class: { light: true, cancel: true }, onClick: () => this.onCancel() }, capts.cancel))));
135
- }
136
- onFilterTypeChange(e, prop, index) {
137
- const el = e.target;
138
- const type = el.value;
139
- this.filterItems[prop][index].type = type;
140
- // this re-renders the input to know if we need extra input
141
- this.filterId++;
142
- // adding setTimeout will wait for the next tick DOM update then focus on input
143
- setTimeout(() => {
144
- const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
145
- if (input)
146
- input.focus();
147
- }, 0);
148
- if (!this.disableDynamicFiltering)
149
- this.debouncedApplyFilter();
150
- }
151
- onAddNewFilter(e) {
152
- const el = e.target;
153
- const type = el.value;
154
- this.currentFilterType = type;
155
- this.addNewFilterToProp();
156
- // reset value after adding new filter
157
- const select = document.getElementById('add-filter');
158
- if (select) {
159
- select.value = defaultType;
160
- this.currentFilterType = defaultType;
161
- }
162
- if (!this.disableDynamicFiltering)
163
- this.debouncedApplyFilter();
164
- }
165
- addNewFilterToProp() {
166
- var _a;
167
- const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
168
- if (!(prop || prop === 0))
169
- return;
170
- if (!this.filterItems[prop]) {
171
- this.filterItems[prop] = [];
172
- }
173
- if (this.currentFilterType === 'none')
174
- return;
175
- this.filterId++;
176
- this.currentFilterId = this.filterId;
177
- this.filterItems[prop].push({
178
- id: this.currentFilterId,
179
- type: this.currentFilterType,
180
- value: '',
181
- relation: 'and',
182
- });
183
- // adding setTimeout will wait for the next tick DOM update then focus on input
184
- setTimeout(() => {
185
- const input = document.getElementById('filter-input-' + this.currentFilterId);
186
- if (input)
187
- input.focus();
188
- }, 0);
189
- }
190
- onUserInput(index, prop, event) {
191
- // update the value of the filter item
192
- this.filterItems[prop][index].value = event.target.value;
193
- if (!this.disableDynamicFiltering)
194
- this.debouncedApplyFilter();
195
- }
196
- onKeyDown(e) {
197
- if (e.key.toLowerCase() === 'enter') {
198
- const select = document.getElementById('add-filter');
199
- if (select) {
200
- select.value = defaultType;
201
- this.currentFilterType = defaultType;
202
- this.addNewFilterToProp();
203
- select.focus();
204
- }
205
- return;
206
- }
207
- // keep event local, don't escalate farther to dom
208
- e.stopPropagation();
209
- }
210
- onSave() {
211
- this.filterChange.emit(this.filterItems);
212
- }
213
- onCancel() {
214
- this.changes = undefined;
215
- }
216
- onReset() {
217
- this.assertChanges();
218
- delete this.filterItems[this.changes.prop];
219
- // this updates the DOM which is used by getFilterItemsList() key
220
- this.filterId++;
221
- this.filterChange.emit(this.filterItems);
222
- }
223
- onRemoveFilter(id) {
224
- this.assertChanges();
225
- // this is for reactivity issues for getFilterItemsList()
226
- this.filterId++;
227
- const prop = this.changes.prop;
228
- const items = this.filterItems[prop];
229
- if (!items)
230
- return;
231
- const index = items.findIndex(d => d.id === id);
232
- if (index === -1)
233
- return;
234
- items.splice(index, 1);
235
- // let's remove the prop if no more filters so the filter icon will be removed
236
- if (items.length === 0)
237
- delete this.filterItems[prop];
238
- if (!this.disableDynamicFiltering)
239
- this.debouncedApplyFilter();
240
- }
241
- toggleFilterAndOr(id) {
242
- this.assertChanges();
243
- // this is for reactivity issues for getFilterItemsList()
244
- this.filterId++;
245
- const prop = this.changes.prop;
246
- const items = this.filterItems[prop];
247
- if (!items)
248
- return;
249
- const index = items.findIndex(d => d.id === id);
250
- if (index === -1)
251
- return;
252
- items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
253
- if (!this.disableDynamicFiltering)
254
- this.debouncedApplyFilter();
255
- }
256
- assertChanges() {
257
- if (!this.changes) {
258
- throw new Error('Changes required per edit');
259
- }
260
- }
261
- isOutside(e) {
262
- const select = document.getElementById('add-filter');
263
- if (select)
264
- select.value = defaultType;
265
- this.currentFilterType = defaultType;
266
- this.changes.type = defaultType;
267
- this.currentFilterId = -1;
268
- if (e.classList.contains(`[uuid="${this.uuid}"]`)) {
269
- return false;
270
- }
271
- return !(e === null || e === void 0 ? void 0 : e.closest(`[uuid="${this.uuid}"]`));
272
- }
273
- static get style() { return filterStyleCss; }
274
- }, [0, "revogr-filter-panel", {
275
- "uuid": [1537],
276
- "filterItems": [16],
277
- "filterTypes": [16],
278
- "filterNames": [16],
279
- "filterEntities": [16],
280
- "filterCaptions": [16],
281
- "disableDynamicFiltering": [4, "disable-dynamic-filtering"],
282
- "isFilterIdSet": [32],
283
- "filterId": [32],
284
- "currentFilterId": [32],
285
- "currentFilterType": [32],
286
- "changes": [32],
287
- "show": [64],
288
- "getChanges": [64]
289
- }, [[5, "mousedown", "onMouseDown"]]]);
290
- function defineCustomElement$1() {
291
- if (typeof customElements === "undefined") {
292
- return;
293
- }
294
- const components = ["revogr-filter-panel"];
295
- components.forEach(tagName => { switch (tagName) {
296
- case "revogr-filter-panel":
297
- if (!customElements.get(tagName)) {
298
- customElements.define(tagName, FilterPanel);
299
- }
300
- break;
301
- } });
302
- }
303
-
304
- const RevogrFilterPanel = FilterPanel;
305
- const defineCustomElement = defineCustomElement$1;
306
-
307
- export { RevogrFilterPanel, defineCustomElement };
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../dist/types/components";
2
-
3
- interface RevogrFocus extends Components.RevogrFocus, HTMLElement {}
4
- export const RevogrFocus: {
5
- prototype: RevogrFocus;
6
- new (): RevogrFocus;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,9 +0,0 @@
1
- /*!
2
- * Built by Revolist
3
- */
4
- import { R as RevogrFocus$1, d as defineCustomElement$1 } from './revogr-focus2.js';
5
-
6
- const RevogrFocus = RevogrFocus$1;
7
- const defineCustomElement = defineCustomElement$1;
8
-
9
- export { RevogrFocus, defineCustomElement };
@@ -1,63 +0,0 @@
1
- /*!
2
- * Built by Revolist
3
- */
4
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
- import { g as getSourceItem } from './data.store.js';
6
- import { F as FOCUS_CLASS } from './consts.js';
7
- import { g as getElStyle } from './selection.utils.js';
8
-
9
- const revogrFocusStyleCss = ".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block}";
10
-
11
- const RevogrFocus = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
12
- constructor() {
13
- super();
14
- this.__registerHost();
15
- this.afterFocus = createEvent(this, "afterfocus", 7);
16
- }
17
- changed(e, focus) {
18
- e === null || e === void 0 ? void 0 : e.scrollIntoView({
19
- block: 'nearest',
20
- inline: 'nearest',
21
- });
22
- const model = getSourceItem(this.dataStore, focus.y);
23
- const column = getSourceItem(this.colData, focus.x);
24
- this.afterFocus.emit({
25
- model,
26
- column
27
- });
28
- }
29
- componentDidRender() {
30
- const currentFocus = this.selectionStore.get('focus');
31
- currentFocus && this.el && this.changed(this.el, currentFocus);
32
- }
33
- render() {
34
- const data = this.selectionStore.get('focus');
35
- if (data) {
36
- const style = getElStyle(Object.assign(Object.assign({}, data), { x1: data.x, y1: data.y }), this.dimensionRow.state, this.dimensionCol.state);
37
- return h(Host, { class: FOCUS_CLASS, style: style });
38
- }
39
- }
40
- get el() { return this; }
41
- static get style() { return revogrFocusStyleCss; }
42
- }, [0, "revogr-focus", {
43
- "dataStore": [16],
44
- "colData": [16],
45
- "selectionStore": [16],
46
- "dimensionRow": [16],
47
- "dimensionCol": [16]
48
- }]);
49
- function defineCustomElement() {
50
- if (typeof customElements === "undefined") {
51
- return;
52
- }
53
- const components = ["revogr-focus"];
54
- components.forEach(tagName => { switch (tagName) {
55
- case "revogr-focus":
56
- if (!customElements.get(tagName)) {
57
- customElements.define(tagName, RevogrFocus);
58
- }
59
- break;
60
- } });
61
- }
62
-
63
- export { RevogrFocus as R, defineCustomElement as d };
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../dist/types/components";
2
-
3
- interface RevogrHeader extends Components.RevogrHeader, HTMLElement {}
4
- export const RevogrHeader: {
5
- prototype: RevogrHeader;
6
- new (): RevogrHeader;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,9 +0,0 @@
1
- /*!
2
- * Built by Revolist
3
- */
4
- import { R as RevogrHeaderComponent, a as defineCustomElement$1 } from './revogr-header2.js';
5
-
6
- const RevogrHeader = RevogrHeaderComponent;
7
- const defineCustomElement = defineCustomElement$1;
8
-
9
- export { RevogrHeader, defineCustomElement };