@revolist/revogrid 4.8.18 → 4.9.0

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 (166) hide show
  1. package/dist/cjs/{base.plugin-1c16ff6d.js → base.plugin-d48d867d.js} +7 -6
  2. package/dist/cjs/base.plugin-d48d867d.js.map +1 -0
  3. package/dist/cjs/{column.service-ad5ffa3c.js → column.service-6f691f50.js} +2 -2
  4. package/dist/cjs/{column.service-ad5ffa3c.js.map → column.service-6f691f50.js.map} +1 -1
  5. package/dist/cjs/{header-cell-renderer-d92249e4.js → header-cell-renderer-81a22b00.js} +2 -2
  6. package/dist/cjs/{header-cell-renderer-d92249e4.js.map → header-cell-renderer-81a22b00.js.map} +1 -1
  7. package/dist/cjs/{index-a9f1b728.js → index-2410bbd9.js} +1 -3
  8. package/dist/cjs/index-2410bbd9.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +1 -1
  10. package/dist/cjs/{key.utils-a981b651.js → key.utils-1e48ab8f.js} +2 -4
  11. package/dist/cjs/key.utils-1e48ab8f.js.map +1 -0
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/revo-grid.cjs.entry.js +32 -34
  14. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  15. package/dist/cjs/revo-grid.cjs.js +1 -1
  16. package/dist/cjs/revogr-attribution_6.cjs.entry.js +4 -4
  17. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +2 -2
  18. package/dist/cjs/revogr-data_4.cjs.entry.js +11 -11
  19. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  20. package/dist/cjs/revogr-filter-panel.cjs.entry.js +14 -17
  21. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  22. package/dist/cjs/{throttle-46478b04.js → throttle-bcc4740d.js} +2 -2
  23. package/dist/cjs/{throttle-46478b04.js.map → throttle-bcc4740d.js.map} +1 -1
  24. package/dist/collection/collection-manifest.json +1 -1
  25. package/dist/collection/components/revoGrid/grid.helpers.js +16 -15
  26. package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -1
  27. package/dist/collection/components/revoGrid/revo-grid.js +10 -15
  28. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  29. package/dist/collection/components/scroll/revogr-viewport-scroll.js +7 -8
  30. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  31. package/dist/collection/plugins/filter/{filter.pop.js → filter.panel.js} +23 -43
  32. package/dist/collection/plugins/filter/filter.panel.js.map +1 -0
  33. package/dist/collection/plugins/filter/filter.plugin.js +2 -2
  34. package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
  35. package/dist/collection/store/dimension/dimension.store.js +6 -6
  36. package/dist/collection/store/dimension/dimension.store.js.map +1 -1
  37. package/dist/collection/types/viewport.interfaces.js.map +1 -1
  38. package/dist/collection/utils/consts.js +0 -1
  39. package/dist/collection/utils/consts.js.map +1 -1
  40. package/dist/collection/utils/key.utils.js +5 -6
  41. package/dist/collection/utils/key.utils.js.map +1 -1
  42. package/dist/esm/{base.plugin-44263df0.js → base.plugin-78393655.js} +8 -7
  43. package/dist/esm/base.plugin-78393655.js.map +1 -0
  44. package/dist/esm/{column.service-d727b605.js → column.service-0e41057a.js} +4 -4
  45. package/dist/esm/{column.service-d727b605.js.map → column.service-0e41057a.js.map} +1 -1
  46. package/dist/esm/{dimension.helpers-2bb7bbfc.js → dimension.helpers-91398565.js} +2 -2
  47. package/dist/esm/{dimension.helpers-2bb7bbfc.js.map → dimension.helpers-91398565.js.map} +1 -1
  48. package/dist/esm/{header-cell-renderer-220c509a.js → header-cell-renderer-6d8ac25d.js} +2 -2
  49. package/dist/esm/{header-cell-renderer-220c509a.js.map → header-cell-renderer-6d8ac25d.js.map} +1 -1
  50. package/dist/esm/{index-5a722722.js → index-4e881436.js} +2 -3
  51. package/dist/esm/index-4e881436.js.map +1 -0
  52. package/dist/esm/index.js +4 -4
  53. package/dist/esm/{key.utils-46287a7f.js → key.utils-425c987d.js} +2 -4
  54. package/dist/esm/key.utils-425c987d.js.map +1 -0
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/esm/revo-grid.entry.js +35 -37
  57. package/dist/esm/revo-grid.entry.js.map +1 -1
  58. package/dist/esm/revo-grid.js +1 -1
  59. package/dist/esm/revogr-attribution_6.entry.js +7 -7
  60. package/dist/esm/revogr-clipboard_3.entry.js +3 -3
  61. package/dist/esm/revogr-data_4.entry.js +13 -13
  62. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  63. package/dist/esm/revogr-filter-panel.entry.js +15 -18
  64. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  65. package/dist/esm/{selection.helpers-2beedd2e.js → selection.helpers-50e9f09d.js} +2 -2
  66. package/dist/esm/{selection.helpers-2beedd2e.js.map → selection.helpers-50e9f09d.js.map} +1 -1
  67. package/dist/esm/{throttle-eeca0062.js → throttle-1b1dd9d2.js} +2 -2
  68. package/dist/esm/{throttle-eeca0062.js.map → throttle-1b1dd9d2.js.map} +1 -1
  69. package/dist/esm/{viewport.store-abdf9ec2.js → viewport.store-bfd0b036.js} +2 -2
  70. package/dist/esm/{viewport.store-abdf9ec2.js.map → viewport.store-bfd0b036.js.map} +1 -1
  71. package/dist/revo-grid/base.plugin-78393655.js +5 -0
  72. package/dist/{cjs/base.plugin-1c16ff6d.js.map → revo-grid/base.plugin-78393655.js.map} +1 -1
  73. package/dist/revo-grid/{column.service-d727b605.js → column.service-0e41057a.js} +2 -2
  74. package/dist/revo-grid/{dimension.helpers-2bb7bbfc.js → dimension.helpers-91398565.js} +2 -2
  75. package/dist/revo-grid/{header-cell-renderer-220c509a.js → header-cell-renderer-6d8ac25d.js} +2 -2
  76. package/dist/revo-grid/index-4e881436.js +5 -0
  77. package/dist/revo-grid/index-4e881436.js.map +1 -0
  78. package/dist/revo-grid/index.esm.js +1 -1
  79. package/dist/revo-grid/key.utils-425c987d.js +5 -0
  80. package/dist/revo-grid/key.utils-425c987d.js.map +1 -0
  81. package/dist/revo-grid/revo-grid.entry.js +1 -1
  82. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  83. package/dist/revo-grid/revo-grid.esm.js +1 -1
  84. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  85. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  86. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  87. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  88. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  89. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  90. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  91. package/dist/revo-grid/{selection.helpers-2beedd2e.js → selection.helpers-50e9f09d.js} +2 -2
  92. package/dist/revo-grid/{throttle-eeca0062.js → throttle-1b1dd9d2.js} +2 -2
  93. package/dist/revo-grid/{viewport.store-abdf9ec2.js → viewport.store-bfd0b036.js} +2 -2
  94. package/dist/types/components/revoGrid/revo-grid.d.ts +0 -1
  95. package/dist/types/components.d.ts +2 -4
  96. package/dist/types/plugins/filter/{filter.pop.d.ts → filter.panel.d.ts} +1 -2
  97. package/dist/types/plugins/filter/filter.plugin.d.ts +2 -2
  98. package/dist/types/types/viewport.interfaces.d.ts +0 -2
  99. package/dist/types/utils/consts.d.ts +0 -1
  100. package/hydrate/index.js +89 -95
  101. package/hydrate/index.mjs +89 -95
  102. package/package.json +2 -2
  103. package/standalone/_baseIteratee.js +670 -42
  104. package/standalone/_baseIteratee.js.map +1 -1
  105. package/standalone/column.service.js +1 -2
  106. package/standalone/column.service.js.map +1 -1
  107. package/standalone/consts.js +1 -2
  108. package/standalone/consts.js.map +1 -1
  109. package/standalone/data.store.js +2 -3
  110. package/standalone/data.store.js.map +1 -1
  111. package/standalone/debounce.js +1 -2
  112. package/standalone/debounce.js.map +1 -1
  113. package/standalone/dimension.helpers.js +199 -9
  114. package/standalone/dimension.helpers.js.map +1 -1
  115. package/standalone/index.d.ts +1 -1
  116. package/standalone/revo-grid.js +38 -42
  117. package/standalone/revo-grid.js.map +1 -1
  118. package/standalone/revogr-data2.js +1 -2
  119. package/standalone/revogr-data2.js.map +1 -1
  120. package/standalone/revogr-edit2.js +0 -2
  121. package/standalone/revogr-edit2.js.map +1 -1
  122. package/standalone/revogr-filter-panel.js +14 -18
  123. package/standalone/revogr-filter-panel.js.map +1 -1
  124. package/standalone/revogr-focus2.js +1 -2
  125. package/standalone/revogr-focus2.js.map +1 -1
  126. package/standalone/revogr-header2.js +3 -6
  127. package/standalone/revogr-header2.js.map +1 -1
  128. package/standalone/revogr-order-editor2.js +1 -2
  129. package/standalone/revogr-order-editor2.js.map +1 -1
  130. package/standalone/revogr-overlay-selection2.js +1 -2
  131. package/standalone/revogr-overlay-selection2.js.map +1 -1
  132. package/standalone/revogr-row-headers2.js +1 -2
  133. package/standalone/revogr-row-headers2.js.map +1 -1
  134. package/standalone/revogr-viewport-scroll2.js +7 -8
  135. package/standalone/revogr-viewport-scroll2.js.map +1 -1
  136. package/standalone/selection.utils.js +1 -2
  137. package/standalone/selection.utils.js.map +1 -1
  138. package/standalone/throttle.js +1 -1
  139. package/standalone/toNumber.js +156 -2
  140. package/standalone/toNumber.js.map +1 -1
  141. package/dist/cjs/index-a9f1b728.js.map +0 -1
  142. package/dist/cjs/key.utils-a981b651.js.map +0 -1
  143. package/dist/collection/plugins/filter/filter.pop.js.map +0 -1
  144. package/dist/esm/base.plugin-44263df0.js.map +0 -1
  145. package/dist/esm/index-5a722722.js.map +0 -1
  146. package/dist/esm/key.utils-46287a7f.js.map +0 -1
  147. package/dist/revo-grid/base.plugin-44263df0.js +0 -5
  148. package/dist/revo-grid/base.plugin-44263df0.js.map +0 -1
  149. package/dist/revo-grid/index-5a722722.js +0 -5
  150. package/dist/revo-grid/index-5a722722.js.map +0 -1
  151. package/dist/revo-grid/key.utils-46287a7f.js +0 -5
  152. package/dist/revo-grid/key.utils-46287a7f.js.map +0 -1
  153. package/standalone/_nodeUtil.js +0 -260
  154. package/standalone/_nodeUtil.js.map +0 -1
  155. package/standalone/each.js +0 -200
  156. package/standalone/each.js.map +0 -1
  157. package/standalone/identity.js +0 -389
  158. package/standalone/identity.js.map +0 -1
  159. package/standalone/isObjectLike.js +0 -162
  160. package/standalone/isObjectLike.js.map +0 -1
  161. /package/dist/revo-grid/{column.service-d727b605.js.map → column.service-0e41057a.js.map} +0 -0
  162. /package/dist/revo-grid/{dimension.helpers-2bb7bbfc.js.map → dimension.helpers-91398565.js.map} +0 -0
  163. /package/dist/revo-grid/{header-cell-renderer-220c509a.js.map → header-cell-renderer-6d8ac25d.js.map} +0 -0
  164. /package/dist/revo-grid/{selection.helpers-2beedd2e.js.map → selection.helpers-50e9f09d.js.map} +0 -0
  165. /package/dist/revo-grid/{throttle-eeca0062.js.map → throttle-1b1dd9d2.js.map} +0 -0
  166. /package/dist/revo-grid/{viewport.store-abdf9ec2.js.map → viewport.store-bfd0b036.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["closest","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","s","el","this","call","parentElement","parentNode","nodeType","filterStyleCss","RevogrFilterPanelStyle0","defaultType","FILTER_LIST_CLASS","FILTER_LIST_CLASS_ACTION","FilterPanel","filterCaptionsInternal","title","save","reset","cancel","add","placeholder","and","or","debouncedApplyFilter","debounce","filterChange","emit","filterItems","onMouseDown","e","changes","defaultPrevented","target","isOutside","isFilterBtn","undefined","show","newEntity","type","getChanges","componentWillRender","isFilterIdSet","Object","keys","prop","filterId","length","renderSelectOptions","isDefaultTypeRemoved","options","_a","capts","assign","filterCaptions","push","h","selected","currentFilterType","value","filterNames","gIndex","filterTypes","map","k","disabled","renderExtra","index","currentFilter","filterEntities","extra","id","onInput","onUserInput","bind","onKeyDown","getFilterItemsList","propFilters","key","d","andOrButton","onClick","toggleFilterAndOr","AndOrButton","text","relation","class","onChange","onFilterTypeChange","onRemoveFilter","TrashButton","autoCorrect","pos","getBoundingClientRect","maxLeft","window","innerWidth","width","left","offsetLeft","style","_b","render","Host","display","x","top","y","ref","onAddNewFilter","disableDynamicFiltering","onSave","onReset","onCancel","setTimeout","input","document","getElementById","focus","addNewFilterToProp","select","currentFilterId","event","toLowerCase","stopPropagation","assertChanges","items","findIndex","splice","Error","classList","contains","uuid"],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.pop.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: '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';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n 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'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n","import { Component, Event, EventEmitter, h, Host, Listen, Method, Prop, State, VNode } from '@stencil/core';\nimport { FilterType } from './filter.service';\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport { LogicFunction } from './filter.types';\nimport { FilterCaptions } from './filter.plugin';\nimport debounce from 'lodash/debounce';\nimport { ColumnProp } from '@type';\n\nexport type FilterItem = {\n // column id\n prop?: ColumnProp;\n // filter type definition\n type?: FilterType;\n // value for additional filtering, text value or some id\n value?: any;\n};\n\nexport type FilterData = {\n id: number;\n type: FilterType;\n value?: any;\n relation: 'and' | 'or';\n};\n\nexport type MultiFilterItem = {\n [prop: string]: FilterData[];\n};\n\nexport type ShowData = {\n x: number;\n y: number;\n /**\n * Auto correct position if it is out of document bounds\n */\n autoCorrect?: boolean;\n} & FilterItem;\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n save: 'Save',\n // drops the filter\n reset: 'Cancel',\n cancel: 'Close',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @Prop({ mutable: true, reflect: true }) uuid: string;\n @Prop() filterItems: MultiFilterItem = {};\n @Prop() filterTypes: Record<string, string[]> = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n @Prop() disableDynamicFiltering = false;\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n if (this.changes && !e.defaultPrevented) {\n const el = e.target as HTMLElement;\n if (this.isOutside(el) && !isFilterBtn(el)) {\n this.changes = undefined;\n }\n }\n }\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n const options: VNode[] = [];\n const prop = this.changes?.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n options.push(\n <option selected={this.currentFilterType === defaultType} value={defaultType}>\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? capts.add : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.filterTypes) {\n options.push(\n ...this.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input') return '';\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return '';\n\n const propFilters = this.filterItems[prop] || [];\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n return (\n <div key={this.filterId}>\n {propFilters.map((d, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(d.id)}>\n <AndOrButton text={d.relation === 'and' ? capts.and : capts.or} />\n </div>\n );\n }\n\n return (\n <div key={d.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select class=\"select-css select-filter\" onChange={e => this.onFilterTypeChange(e, prop, index)}>\n {this.renderSelectOptions(this.filterItems[prop][index].type, true)}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(d.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\"/> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n \n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <Host style={style} ref={(el) => { this.changes?.autoCorrect && this.autoCorrect(el) }}>\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select id=\"add-filter\" class=\"select-css\" onChange={e => this.onAddNewFilter(e)}>\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering &&\n <button id=\"revo-button-save\" aria-label=\"save\" class=\"revo-button green\" onClick={() => this.onSave()}>\n {capts.save}\n </button>\n }\n <button id=\"revo-button-reset\" aria-label=\"reset\" class=\"revo-button light\" onClick={() => this.onReset()}>\n {capts.reset}\n </button>\n <button id=\"revo-button-cancel\" aria-label=\"cancel\" class=\"revo-button light\" onClick={() => this.onCancel()}>\n {capts.cancel}\n </button>\n </div>\n </Host>\n );\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n const el = e.target as HTMLSelectElement;\n this.filterItems[prop][index].type = el.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.currentFilterId) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (event.target as HTMLInputElement).value;\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n delete this.filterItems[this.changes?.prop ?? ''];\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n\n this.filterChange.emit(this.filterItems);\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n private isOutside(e: HTMLElement | null) {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) select.value = defaultType;\n\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n if (e?.classList.contains(`[uuid=\"${this.uuid}\"]`)) {\n return false;\n }\n return !e?.closest(`[uuid=\"${this.uuid}\"]`);\n }\n}\n"],"mappings":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EAAO,OAEZ,MAAM3D,EAAQ2D,EAAMC,WAAUhD,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAElB2D,EAAM3D,GAAOkB,SAAWyC,EAAM3D,GAAOkB,WAAa,MAAQ,KAAO,MACjE,IAAKjF,KAAK0G,wBAAyB1G,KAAKoB,sB,CAGlC,aAAAqG,GACN,IAAKzH,KAAK2B,QAAS,CACjB,MAAM,IAAIkG,MAAM,4B,EAIZ,SAAA/F,CAAUJ,GAChB,MAAM0F,EAASJ,SAASC,eAAe,cACvC,GAAIG,EAAQA,EAAO7D,MAAQhD,EAE3BP,KAAKsD,kBAAoB/C,EACzB,GAAIP,KAAK2B,QAAS,CAChB3B,KAAK2B,QAAQQ,KAAO5B,C,CAEtBP,KAAKqH,iBAAmB,EACxB,GAAI3F,IAAC,MAADA,SAAC,SAADA,EAAGoG,UAAUC,SAAS,UAAU/H,KAAKgI,UAAW,CAClD,OAAO,K,CAET,QAAQtG,IAAC,MAADA,SAAC,SAADA,EAAGlC,QAAQ,UAAUQ,KAAKgI,U","ignoreList":[]}
1
+ {"version":3,"names":["closest","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","s","el","this","call","parentElement","parentNode","nodeType","filterStyleCss","RevogrFilterPanelStyle0","defaultType","FILTER_LIST_CLASS","FILTER_LIST_CLASS_ACTION","FilterPanel","filterCaptionsInternal","title","save","reset","cancel","add","placeholder","and","or","debouncedApplyFilter","debounce","filterChange","emit","filterItems","onMouseDown","e","changes","defaultPrevented","target","select","document","getElementById","value","currentFilterType","type","currentFilterId","path","composedPath","isOutside","includes","element","isFilterBtn","undefined","show","newEntity","getChanges","componentWillRender","isFilterIdSet","Object","keys","prop","filterId","length","renderSelectOptions","isDefaultTypeRemoved","options","_a","capts","assign","filterCaptions","push","h","selected","filterNames","gIndex","filterTypes","map","k","disabled","renderExtra","index","currentFilter","filterEntities","extra","id","onInput","onUserInput","bind","onKeyDown","getFilterItemsList","propFilters","key","d","andOrButton","onClick","toggleFilterAndOr","AndOrButton","text","relation","class","onChange","onFilterTypeChange","onRemoveFilter","TrashButton","autoCorrect","pos","getBoundingClientRect","maxLeft","window","innerWidth","width","left","offsetLeft","style","_b","render","Host","display","x","top","y","ref","onAddNewFilter","disableDynamicFiltering","onSave","onReset","onCancel","setTimeout","input","focus","addNewFilterToProp","event","toLowerCase","stopPropagation","assertChanges","items","findIndex","splice","Error"],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.panel.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: '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';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n 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'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n","import { Component, Event, EventEmitter, h, Host, Listen, Method, Prop, State, VNode, Element } from '@stencil/core';\nimport { FilterType } from './filter.service';\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport { LogicFunction } from './filter.types';\nimport { FilterCaptions } from './filter.plugin';\nimport debounce from 'lodash/debounce';\nimport { ColumnProp } from '@type';\n\nexport type FilterItem = {\n // column id\n prop?: ColumnProp;\n // filter type definition\n type?: FilterType;\n // value for additional filtering, text value or some id\n value?: any;\n};\n\nexport type FilterData = {\n id: number;\n type: FilterType;\n value?: any;\n relation: 'and' | 'or';\n};\n\nexport type MultiFilterItem = {\n [prop: string]: FilterData[];\n};\n\nexport type ShowData = {\n x: number;\n y: number;\n /**\n * Auto correct position if it is out of document bounds\n */\n autoCorrect?: boolean;\n} & FilterItem;\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n save: 'Save',\n // drops the filter\n reset: 'Clear changes',\n cancel: 'Close',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n\n @Element() element!: HTMLElement;\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @Prop() filterItems: MultiFilterItem = {};\n @Prop() filterTypes: Record<string, string[]> = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n @Prop() disableDynamicFiltering = false;\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n if (this.changes && !e.defaultPrevented) {\n const el = e.target as HTMLElement;\n\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n }\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n\n const path = e.composedPath();\n const isOutside = !path.includes(this.element);\n\n if (isOutside && !isFilterBtn(el)) {\n this.changes = undefined;\n }\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n const options: VNode[] = [];\n const prop = this.changes?.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n options.push(\n <option selected={this.currentFilterType === defaultType} value={defaultType}>\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? capts.add : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.filterTypes) {\n options.push(\n ...this.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input') return '';\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return '';\n\n const propFilters = this.filterItems[prop] || [];\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n return (\n <div key={this.filterId}>\n {propFilters.map((d, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(d.id)}>\n <AndOrButton text={d.relation === 'and' ? capts.and : capts.or} />\n </div>\n );\n }\n\n return (\n <div key={d.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select class=\"select-css select-filter\" onChange={e => this.onFilterTypeChange(e, prop, index)}>\n {this.renderSelectOptions(this.filterItems[prop][index].type, true)}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(d.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\"/> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n \n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <Host style={style} ref={(el) => { this.changes?.autoCorrect && this.autoCorrect(el) }}>\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select id=\"add-filter\" class=\"select-css\" onChange={e => this.onAddNewFilter(e)}>\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering &&\n <button id=\"revo-button-save\" aria-label=\"save\" class=\"revo-button green\" onClick={() => this.onSave()}>\n {capts.save}\n </button>\n }\n <button id=\"revo-button-reset\" aria-label=\"reset\" class=\"revo-button light\" onClick={() => this.onReset()}>\n {capts.reset}\n </button>\n <button id=\"revo-button-cancel\" aria-label=\"cancel\" class=\"revo-button light\" onClick={() => this.onCancel()}>\n {capts.cancel}\n </button>\n </div>\n </Host>\n );\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n const el = e.target as HTMLSelectElement;\n this.filterItems[prop][index].type = el.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.currentFilterId) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (event.target as HTMLInputElement).value;\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n delete this.filterItems[this.changes?.prop ?? ''];\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n\n this.filterChange.emit(this.filterItems);\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n}\n"],"mappings":";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IAAKnD,KAAKkH,wBAAyBlH,KAAKoB,sB,CAGlC,iBAAAkE,CAAkBX,G,MACxB3E,KAAK6H,gBAGL7H,KAAKoD,WAEL,MAAMD,GAAOM,EAAAzD,KAAK2B,WAAO,MAAA8B,SAAA,SAAAA,EAAEN,KAE3B,MAAM2E,EAAQ9H,KAAKwB,YAAY2B,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IACvC,IAAK2E,EAAO,OAEZ,MAAMvD,EAAQuD,EAAMC,WAAU5C,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAElBuD,EAAMvD,GAAOkB,SAAWqC,EAAMvD,GAAOkB,WAAa,MAAQ,KAAO,MACjE,IAAKzF,KAAKkH,wBAAyBlH,KAAKoB,sB,CAGlC,aAAAyG,GACN,IAAK7H,KAAK2B,QAAS,CACjB,MAAM,IAAIsG,MAAM,4B","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{l as t,k as e}from"./dimension.helpers-2bb7bbfc.js";import"./toNumber-8de324a7.js";import"./index-a61f225b.js";function i(){return{range:null,tempRange:null,tempRangeType:null,focus:null,edit:null,lastCell:null,nextFocus:null}}class s{constructor(){this.unsubscribe=[];this.store=t(i());this.store.on("set",((t,e)=>{if(t==="tempRange"&&!e){this.store.set("tempRangeType",null)}}))}onChange(t,e){this.unsubscribe.push(this.store.onChange(t,e))}clearFocus(){e(this.store,{focus:null,range:null,edit:null,tempRange:null})}setFocus(t,i){if(!i){e(this.store,{focus:t})}else{e(this.store,{focus:t,range:u(t,i),edit:null,tempRange:null})}}setNextFocus(t){e(this.store,{nextFocus:t})}setTempArea(t){e(this.store,{tempRange:t===null||t===void 0?void 0:t.area,tempRangeType:t===null||t===void 0?void 0:t.type,edit:null})}clearTemp(){e(this.store,{tempRange:null})}setRangeArea(t){e(this.store,{range:t,edit:null,tempRange:null})}setRange(t,e){this.setRangeArea(u(t,e))}setLastCell(t){e(this.store,{lastCell:t})}setEdit(t){const i=this.store.get("focus");if(i&&typeof t==="string"){e(this.store,{edit:{x:i.x,y:i.y,val:t}});return}e(this.store,{edit:null})}dispose(){this.unsubscribe.forEach((t=>t()));this.store.dispose()}}const n=-1;class l{constructor(){this.dirty=false;this.stores={};this.columnStores={};this.rowStores={};this.storesByType={};this.storesXToType={};this.storesYToType={};this.sections=[]}get focusedStore(){var t;for(let e in this.stores){for(let i in this.stores[e]){const s=(t=this.stores[e][i])===null||t===void 0?void 0:t.store.get("focus");if(s){return{entity:this.stores[e][i],cell:s,position:{x:parseInt(i,10),y:parseInt(e,10)}}}}}return null}get edit(){var t;return(t=this.focusedStore)===null||t===void 0?void 0:t.entity.store.get("edit")}get focused(){var t;return(t=this.focusedStore)===null||t===void 0?void 0:t.entity.store.get("focus")}get selectedRange(){var t;return(t=this.focusedStore)===null||t===void 0?void 0:t.entity.store.get("range")}registerSection(t){if(!t){this.sections.length=0;this.dirty=true;return}if(this.sections.indexOf(t)===-1){this.sections.push(t)}}beforeUpdate(){if(this.dirty){for(let t in this.stores){for(let e in this.stores[t]){this.stores[t][e].dispose()}}this.dirty=false}}registerColumn(t,e){if(r(t)){return new s}if(this.columnStores[t]){return this.columnStores[t]}this.columnStores[t]=new s;this.storesByType[e]=t;this.storesXToType[t]=e;return this.columnStores[t]}registerRow(t,e){if(r(t)){return new s}if(this.rowStores[t]){return this.rowStores[t]}this.rowStores[t]=new s;this.storesByType[e]=t;this.storesYToType[t]=e;return this.rowStores[t]}register({x:t,y:e}){var i,n;if(r(t)||r(e)){return new s}if(!this.stores[e]){this.stores[e]={}}if(this.stores[e][t]){return this.stores[e][t]}this.stores[e][t]=new s;(i=this.stores[e][t])===null||i===void 0?void 0:i.onChange("range",(i=>{this.columnStores[t].setRangeArea(i);this.rowStores[e].setRangeArea(i)}));(n=this.stores[e][t])===null||n===void 0?void 0:n.store.on("dispose",(()=>this.destroy(t,e)));return this.stores[e][t]}destroy(t,e){var i,s;(i=this.columnStores[t])===null||i===void 0?void 0:i.dispose();(s=this.rowStores[e])===null||s===void 0?void 0:s.dispose();delete this.rowStores[e];delete this.columnStores[t];if(this.storesXToType[t]){const e=this.storesXToType[t];delete this.storesXToType[t];delete this.storesByType[e]}if(this.storesYToType[e]){const t=this.storesYToType[e];delete this.storesYToType[e];delete this.storesByType[t]}if(this.stores[e]){delete this.stores[e][t]}if(!Object.keys(this.stores[e]||{}).length){delete this.stores[e]}}setEditByCell(t,e){this.focusByCell(t,e,e);this.setEdit("")}beforeNextFocusCell(t){var e;if(!this.focusedStore){return}const i=this.getNextStore(t,this.focusedStore.position,this.focusedStore.entity.store.get("lastCell"));(e=i.store)===null||e===void 0?void 0:e.setNextFocus(Object.assign(Object.assign({},t),i.item))}focusByCell(t,e,i){const s=this.stores[t.y][t.x];this.focus(s,{focus:e,end:i})}focus(t,{focus:e,end:i}){const s=this.getCurrentStorePointer(t);if(!s){return null}const n=t.store.get("lastCell");const l=this.getNextStore(e,s,n);if(l===null||l===void 0?void 0:l.store){const t=Object.assign(Object.assign({},e),l.item);this.focus(l.store,{focus:t,end:t});return null}e=h(e,n);i=h(i,n);t.setFocus(e,i);return e}getCurrentStorePointer(t){let e;for(let i in this.stores){for(let s in this.stores[i]){const n=this.stores[i][s];if(n!==t){n.clearFocus()}else{e={x:parseInt(s,10),y:parseInt(i,10)}}}}return e}getNextStore(t,e,i){const s=o(t,i);let n=null;if(s){for(let t in s){let i=t;let l;switch(i){case"x":l=this.getXStores(e.y);break;case"y":l=this.getYStores(e.x);l=this.getYStores(e.x);break}if(s[i]>=0){n=l[++e[i]]}else{n=l[--e[i]];const t=n===null||n===void 0?void 0:n.store.get("lastCell");if(t){s[i]=t[i]+s[i]}}}}return{store:n,item:s}}clearAll(){var t;for(let e in this.stores){for(let i in this.stores[e]){(t=this.stores[e][i])===null||t===void 0?void 0:t.clearFocus()}}}setEdit(t){if(!this.focusedStore){return}this.focusedStore.entity.setEdit(t)}selectAll(){for(let t in this.stores){for(let e in this.stores[t]){const i=this.stores[t][e];if(!i){continue}const s=i.store.get("lastCell");i.setRange({x:0,y:0},{x:s.x-1,y:s.y-1})}}}getXStores(t){return this.stores[t]}getYStores(t){const e={};for(let i in this.stores){e[i]=this.stores[i][t]}return e}}function r(t){return t===n}function o(t,e){const i={};let s=["x","y"];for(let e of s){if(t[e]<0){i[e]=t[e];return i}}for(let n of s){if(t[n]>=e[n]){i[n]=t[n]-e[n];return i}}return null}function h(t,e){const i=Object.assign({},t);let s=["x","y"];for(let e of s){if(t[e]<0){i[e]=0}}for(let n of s){if(t[n]>=e[n]){i[n]=e[n]-1}}return i}function u(t,e){return t&&e?{x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x1:Math.max(t.x,e.x),y1:Math.max(t.y,e.y)}:null}function f(t){return t.x===t.x1&&t.y===t.y1}export{n as E,s as S,f as a,l as b,h as c,u as g,r as i,o as n};
5
- //# sourceMappingURL=selection.helpers-2beedd2e.js.map
4
+ import{l as t,k as e}from"./dimension.helpers-91398565.js";import"./toNumber-8de324a7.js";import"./index-a61f225b.js";function i(){return{range:null,tempRange:null,tempRangeType:null,focus:null,edit:null,lastCell:null,nextFocus:null}}class s{constructor(){this.unsubscribe=[];this.store=t(i());this.store.on("set",((t,e)=>{if(t==="tempRange"&&!e){this.store.set("tempRangeType",null)}}))}onChange(t,e){this.unsubscribe.push(this.store.onChange(t,e))}clearFocus(){e(this.store,{focus:null,range:null,edit:null,tempRange:null})}setFocus(t,i){if(!i){e(this.store,{focus:t})}else{e(this.store,{focus:t,range:u(t,i),edit:null,tempRange:null})}}setNextFocus(t){e(this.store,{nextFocus:t})}setTempArea(t){e(this.store,{tempRange:t===null||t===void 0?void 0:t.area,tempRangeType:t===null||t===void 0?void 0:t.type,edit:null})}clearTemp(){e(this.store,{tempRange:null})}setRangeArea(t){e(this.store,{range:t,edit:null,tempRange:null})}setRange(t,e){this.setRangeArea(u(t,e))}setLastCell(t){e(this.store,{lastCell:t})}setEdit(t){const i=this.store.get("focus");if(i&&typeof t==="string"){e(this.store,{edit:{x:i.x,y:i.y,val:t}});return}e(this.store,{edit:null})}dispose(){this.unsubscribe.forEach((t=>t()));this.store.dispose()}}const n=-1;class l{constructor(){this.dirty=false;this.stores={};this.columnStores={};this.rowStores={};this.storesByType={};this.storesXToType={};this.storesYToType={};this.sections=[]}get focusedStore(){var t;for(let e in this.stores){for(let i in this.stores[e]){const s=(t=this.stores[e][i])===null||t===void 0?void 0:t.store.get("focus");if(s){return{entity:this.stores[e][i],cell:s,position:{x:parseInt(i,10),y:parseInt(e,10)}}}}}return null}get edit(){var t;return(t=this.focusedStore)===null||t===void 0?void 0:t.entity.store.get("edit")}get focused(){var t;return(t=this.focusedStore)===null||t===void 0?void 0:t.entity.store.get("focus")}get selectedRange(){var t;return(t=this.focusedStore)===null||t===void 0?void 0:t.entity.store.get("range")}registerSection(t){if(!t){this.sections.length=0;this.dirty=true;return}if(this.sections.indexOf(t)===-1){this.sections.push(t)}}beforeUpdate(){if(this.dirty){for(let t in this.stores){for(let e in this.stores[t]){this.stores[t][e].dispose()}}this.dirty=false}}registerColumn(t,e){if(r(t)){return new s}if(this.columnStores[t]){return this.columnStores[t]}this.columnStores[t]=new s;this.storesByType[e]=t;this.storesXToType[t]=e;return this.columnStores[t]}registerRow(t,e){if(r(t)){return new s}if(this.rowStores[t]){return this.rowStores[t]}this.rowStores[t]=new s;this.storesByType[e]=t;this.storesYToType[t]=e;return this.rowStores[t]}register({x:t,y:e}){var i,n;if(r(t)||r(e)){return new s}if(!this.stores[e]){this.stores[e]={}}if(this.stores[e][t]){return this.stores[e][t]}this.stores[e][t]=new s;(i=this.stores[e][t])===null||i===void 0?void 0:i.onChange("range",(i=>{this.columnStores[t].setRangeArea(i);this.rowStores[e].setRangeArea(i)}));(n=this.stores[e][t])===null||n===void 0?void 0:n.store.on("dispose",(()=>this.destroy(t,e)));return this.stores[e][t]}destroy(t,e){var i,s;(i=this.columnStores[t])===null||i===void 0?void 0:i.dispose();(s=this.rowStores[e])===null||s===void 0?void 0:s.dispose();delete this.rowStores[e];delete this.columnStores[t];if(this.storesXToType[t]){const e=this.storesXToType[t];delete this.storesXToType[t];delete this.storesByType[e]}if(this.storesYToType[e]){const t=this.storesYToType[e];delete this.storesYToType[e];delete this.storesByType[t]}if(this.stores[e]){delete this.stores[e][t]}if(!Object.keys(this.stores[e]||{}).length){delete this.stores[e]}}setEditByCell(t,e){this.focusByCell(t,e,e);this.setEdit("")}beforeNextFocusCell(t){var e;if(!this.focusedStore){return}const i=this.getNextStore(t,this.focusedStore.position,this.focusedStore.entity.store.get("lastCell"));(e=i.store)===null||e===void 0?void 0:e.setNextFocus(Object.assign(Object.assign({},t),i.item))}focusByCell(t,e,i){const s=this.stores[t.y][t.x];this.focus(s,{focus:e,end:i})}focus(t,{focus:e,end:i}){const s=this.getCurrentStorePointer(t);if(!s){return null}const n=t.store.get("lastCell");const l=this.getNextStore(e,s,n);if(l===null||l===void 0?void 0:l.store){const t=Object.assign(Object.assign({},e),l.item);this.focus(l.store,{focus:t,end:t});return null}e=h(e,n);i=h(i,n);t.setFocus(e,i);return e}getCurrentStorePointer(t){let e;for(let i in this.stores){for(let s in this.stores[i]){const n=this.stores[i][s];if(n!==t){n.clearFocus()}else{e={x:parseInt(s,10),y:parseInt(i,10)}}}}return e}getNextStore(t,e,i){const s=o(t,i);let n=null;if(s){for(let t in s){let i=t;let l;switch(i){case"x":l=this.getXStores(e.y);break;case"y":l=this.getYStores(e.x);l=this.getYStores(e.x);break}if(s[i]>=0){n=l[++e[i]]}else{n=l[--e[i]];const t=n===null||n===void 0?void 0:n.store.get("lastCell");if(t){s[i]=t[i]+s[i]}}}}return{store:n,item:s}}clearAll(){var t;for(let e in this.stores){for(let i in this.stores[e]){(t=this.stores[e][i])===null||t===void 0?void 0:t.clearFocus()}}}setEdit(t){if(!this.focusedStore){return}this.focusedStore.entity.setEdit(t)}selectAll(){for(let t in this.stores){for(let e in this.stores[t]){const i=this.stores[t][e];if(!i){continue}const s=i.store.get("lastCell");i.setRange({x:0,y:0},{x:s.x-1,y:s.y-1})}}}getXStores(t){return this.stores[t]}getYStores(t){const e={};for(let i in this.stores){e[i]=this.stores[i][t]}return e}}function r(t){return t===n}function o(t,e){const i={};let s=["x","y"];for(let e of s){if(t[e]<0){i[e]=t[e];return i}}for(let n of s){if(t[n]>=e[n]){i[n]=t[n]-e[n];return i}}return null}function h(t,e){const i=Object.assign({},t);let s=["x","y"];for(let e of s){if(t[e]<0){i[e]=0}}for(let n of s){if(t[n]>=e[n]){i[n]=e[n]-1}}return i}function u(t,e){return t&&e?{x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x1:Math.max(t.x,e.x),y1:Math.max(t.y,e.y)}:null}function f(t){return t.x===t.x1&&t.y===t.y1}export{n as E,s as S,f as a,l as b,h as c,u as g,r as i,o as n};
5
+ //# sourceMappingURL=selection.helpers-50e9f09d.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{s as t}from"./index-5a722722.js";import{d as i}from"./debounce-7781346d.js";import{i as r}from"./toNumber-8de324a7.js";const s={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};const e=-1;function n(t,i,r=0){return t+(r?i-r:0)}class o{constructor(t){this.cfg=t;this.preventArtificialScroll={rgRow:null,rgCol:null};this.previousScroll={rgRow:e,rgCol:e};this.params={rgRow:Object.assign({},s),rgCol:Object.assign({},s)}}setParams(t,i){const r=n(t.contentSize,t.clientSize,t.virtualSize);this.params[i]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})}async setScroll(t){this.cancelScroll(t.dimension);const i=new Promise(((i,r)=>{if(this.cfg.skipAnimationFrame){return i()}const s=window.requestAnimationFrame((()=>{i()}));this.preventArtificialScroll[t.dimension]=r.bind(null,s)}));try{await i;const r=this.getParams(t.dimension);t.coordinate=Math.ceil(t.coordinate);this.previousScroll[t.dimension]=this.wrapCoordinate(t.coordinate,r);this.preventArtificialScroll[t.dimension]=null;this.cfg.applyScroll(Object.assign(Object.assign({},t),{coordinate:r.virtualSize?this.convert(t.coordinate,r,false):t.coordinate}))}catch(t){window.cancelAnimationFrame(t)}}scroll(t,i,r=false,s,n=false){this.cancelScroll(i);if(!r&&this.previousScroll[i]===t){this.previousScroll[i]=e;return}const o=this.getParams(i);this.cfg.runScroll({dimension:i,coordinate:o.virtualSize?this.convert(t,o):t,delta:s,outside:n})}getParams(t){return this.params[t]}wrapCoordinate(t,i){if(t<0){return e}if(t>i.maxSize){return i.maxSize}return t}cancelScroll(t){var i,r;(r=(i=this.preventArtificialScroll)[t])===null||r===void 0?void 0:r.call(i);this.preventArtificialScroll[t]=null}convert(i,r,s=true){const e=r.clientSize;const n=[0,r.virtualContentSize-e];const o=[0,r.contentSize-r.virtualSize];if(s){return t(i,n,o)}return t(i,o,n)}}class a{constructor(t=10){this.scrollThrottling=t;this.mouseWheelScrollTimestamp={rgCol:0,rgRow:0};this.lastKnownScrollCoordinate={rgCol:0,rgRow:0}}setCoordinate(t){this.lastKnownScrollCoordinate[t.dimension]=t.coordinate}latestScrollUpdate(t){this.mouseWheelScrollTimestamp[t]=(new Date).getTime()}isReady(t,i){const r=(new Date).getTime()-this.mouseWheelScrollTimestamp[t];return r>this.scrollThrottling&&i!==this.lastKnownScrollCoordinate[t]}}var c=i,l=r;var h="Expected a function";function u(t,i,r){var s=true,e=true;if(typeof t!="function"){throw new TypeError(h)}if(l(r)){s="leading"in r?!!r.leading:s;e="trailing"in r?!!r.trailing:e}return c(t,i,{leading:s,maxWait:i,trailing:e})}var d=u;export{a as L,o as a,n as g,d as t};
5
- //# sourceMappingURL=throttle-eeca0062.js.map
4
+ import{s as t}from"./index-4e881436.js";import{d as i}from"./debounce-7781346d.js";import{i as r}from"./toNumber-8de324a7.js";const s={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};const e=-1;function n(t,i,r=0){return t+(r?i-r:0)}class o{constructor(t){this.cfg=t;this.preventArtificialScroll={rgRow:null,rgCol:null};this.previousScroll={rgRow:e,rgCol:e};this.params={rgRow:Object.assign({},s),rgCol:Object.assign({},s)}}setParams(t,i){const r=n(t.contentSize,t.clientSize,t.virtualSize);this.params[i]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})}async setScroll(t){this.cancelScroll(t.dimension);const i=new Promise(((i,r)=>{if(this.cfg.skipAnimationFrame){return i()}const s=window.requestAnimationFrame((()=>{i()}));this.preventArtificialScroll[t.dimension]=r.bind(null,s)}));try{await i;const r=this.getParams(t.dimension);t.coordinate=Math.ceil(t.coordinate);this.previousScroll[t.dimension]=this.wrapCoordinate(t.coordinate,r);this.preventArtificialScroll[t.dimension]=null;this.cfg.applyScroll(Object.assign(Object.assign({},t),{coordinate:r.virtualSize?this.convert(t.coordinate,r,false):t.coordinate}))}catch(t){window.cancelAnimationFrame(t)}}scroll(t,i,r=false,s,n=false){this.cancelScroll(i);if(!r&&this.previousScroll[i]===t){this.previousScroll[i]=e;return}const o=this.getParams(i);this.cfg.runScroll({dimension:i,coordinate:o.virtualSize?this.convert(t,o):t,delta:s,outside:n})}getParams(t){return this.params[t]}wrapCoordinate(t,i){if(t<0){return e}if(t>i.maxSize){return i.maxSize}return t}cancelScroll(t){var i,r;(r=(i=this.preventArtificialScroll)[t])===null||r===void 0?void 0:r.call(i);this.preventArtificialScroll[t]=null}convert(i,r,s=true){const e=r.clientSize;const n=[0,r.virtualContentSize-e];const o=[0,r.contentSize-r.virtualSize];if(s){return t(i,n,o)}return t(i,o,n)}}class a{constructor(t=10){this.scrollThrottling=t;this.mouseWheelScrollTimestamp={rgCol:0,rgRow:0};this.lastKnownScrollCoordinate={rgCol:0,rgRow:0}}setCoordinate(t){this.lastKnownScrollCoordinate[t.dimension]=t.coordinate}latestScrollUpdate(t){this.mouseWheelScrollTimestamp[t]=(new Date).getTime()}isReady(t,i){const r=(new Date).getTime()-this.mouseWheelScrollTimestamp[t];return r>this.scrollThrottling&&i!==this.lastKnownScrollCoordinate[t]}}var c=i,l=r;var h="Expected a function";function u(t,i,r){var s=true,e=true;if(typeof t!="function"){throw new TypeError(h)}if(l(r)){s="leading"in r?!!r.leading:s;e="trailing"in r?!!r.trailing:e}return c(t,i,{leading:s,maxWait:i,trailing:e})}var d=u;export{a as L,o as a,n as g,d as t};
5
+ //# sourceMappingURL=throttle-1b1dd9d2.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{i as t,l as e,k as s}from"./dimension.helpers-2bb7bbfc.js";function i(e,s,i,f,u){const l=t(u,e);const m=h(s);let d;if(m){let t=l.itemIndex-(m.itemIndex||0);if(t){d=a(Math.abs(t),Object.assign(Object.assign({positiveDirection:t>-1},u),s))}}const b=n(f,u.realSize,l);if(d){const t=o(l,i,b,d,u);if(t.length){r(d.items,t,d)}}if(!d){const t=c({firstItemStart:l.start,firstItemIndex:l.itemIndex,origSize:u.originItemSize,maxSize:b,maxCount:i,sizes:u.sizes});d={items:t,start:0,end:t.length-1}}return d}function n(t,e,s){return Math.min(t+(s.end-s.start),e)}function r(t,e,s){t.splice(s.end+1,0,...e);if(s.start>=s.end&&!(s.start===s.end&&s.start===0)){s.start+=e.length}s.end+=e.length}function o(t,e,s,i,n){const r=m(i);const o=c({sizes:n.sizes,firstItemStart:r.end,firstItemIndex:r.itemIndex+1,origSize:n.originItemSize,maxSize:s-(r.end-t.start),maxCount:e});return o}function c(t,e=0){const s=[];let i=t.firstItemIndex;let n=e;while(n<=t.maxSize&&i<t.maxCount){const e=f(i,t.sizes,t.origSize);s.push({start:t.firstItemStart+n,end:t.firstItemStart+n+e,itemIndex:i,size:e});n+=e;i++}return s}function a(t,e){const s=[...e.items];const i=s.length;let n={start:e.start,end:e.end};if(t>i){return null}if(e.positiveDirection){let r=m(e);let o=n.start;const c=o+t;for(;o<c;o++){const t=r.itemIndex+1;const c=f(t,e.sizes,e.originItemSize);if(r.end+c>e.realSize){break}let a=o%i;if(!s[a]){throw new Error("incorrect index")}s[a]=r={start:r.end,end:r.end+c,itemIndex:t,size:c};n.start++;n.end=a}}else{let r=h(e);const o=n.end;for(let c=0;c<t;c++){const t=r.itemIndex-1;const a=f(t,e.sizes,e.originItemSize);let u=o-c;u=(u<0?i+u:u)%i;if(!s[u]){throw new Error("incorrect index")}s[u]=r={start:r.start-a,end:r.start,itemIndex:t,size:a};n.start=u;n.end--}}const r={start:(n.start<0?i+n.start:n.start)%i,end:(n.end<0?i+n.end:n.end)%i};return Object.assign({items:s},r)}function f(t,e,s=0){if(e&&e[t]){return e[t]}return s}function u(t,e,s,i){if(!s||!i){return false}return t>=s.start&&t<=s.end||t>s.end&&i.end===e}function l(t,e,s,i){if(!s){return false}return e+t>(i===null||i===void 0?void 0:i.end)}function h(t){return t.items[t.start]}function m(t){return t.items[t.end]}function d(t,e,s,i){const n=[...t];const r=n.length;let o=i;let c=0;let a=e;if(!r){return[]}while(c<r){const t=n[a];t.start=o;t.size=s;t.end=t.start+s;o=t.end;a++;c++;if(a===r){a=0}}return n}function b(){return{items:[],start:0,end:0,virtualSize:0,realCount:0}}class z{get lastCoordinate(){return this.lastKnownScroll}set lastCoordinate(t){this.lastKnownScroll=t}constructor(t){this.type=t;this.lastKnownScroll=0;this.store=e(b());this.store.onChange("realCount",(()=>this.clearItems()));this.store.onChange("virtualSize",(()=>this.clearItems()))}setViewPortCoordinate(t,e,s=false){const n=this.store.get("virtualSize");if(!n){return}const c=1;const a=e.originItemSize*c;const f=a*2;const d=n+f;let b=0;if(e.realSize>n){b=e.realSize-n-a}let z=t;if(z<0){z=0}else if(z>b){z=b}this.lastCoordinate=z;z-=a;z=z<0?0:z<b?z:b;let x;if(s){x={items:[],start:0,end:0}}else{x=this.getItems()}const I=h(x);const j=m(x);let O={};if(!u(z,e.realSize,I,j)){O=Object.assign(Object.assign({},O),i(z,x,this.store.get("realCount"),d,e));this.setViewport(Object.assign({},O))}else if(l(z,d,I,j)){const t=[...x.items];const s=o(I,this.store.get("realCount"),d+z-I.start,x,{sizes:e.sizes,originItemSize:e.originItemSize});if(s.length){const e={start:this.store.get("start"),end:this.store.get("end")};r(t,s,e);O=Object.assign(Object.assign(Object.assign({},O),{items:[...t]}),e);this.setViewport(Object.assign({},O))}}}setOriginalSizes(t){const e=this.store.get("items");const i=e.length;if(!i){return}s(this.store,{items:d(e,this.store.get("start"),t,this.lastCoordinate)})}getItems(){return{items:this.store.get("items"),start:this.store.get("start"),end:this.store.get("end")}}setViewport(t){s(this.store,t)}clearItems(){this.store.set("items",[])}}export{z as V,o as a,c as b,l as c,h as d,m as e,i as g,u as i,a as r,d as s,r as u};
5
- //# sourceMappingURL=viewport.store-abdf9ec2.js.map
4
+ import{i as t,l as e,k as s}from"./dimension.helpers-91398565.js";function i(e,s,i,f,u){const l=t(u,e);const m=h(s);let d;if(m){let t=l.itemIndex-(m.itemIndex||0);if(t){d=a(Math.abs(t),Object.assign(Object.assign({positiveDirection:t>-1},u),s))}}const z=n(f,u.realSize,l);if(d){const t=o(l,i,z,d,u);if(t.length){r(d.items,t,d)}}if(!d){const t=c({firstItemStart:l.start,firstItemIndex:l.itemIndex,origSize:u.originItemSize,maxSize:z,maxCount:i,sizes:u.sizes});d={items:t,start:0,end:t.length-1}}return d}function n(t,e,s){return Math.min(t+(s.end-s.start),e)}function r(t,e,s){t.splice(s.end+1,0,...e);if(s.start>=s.end&&!(s.start===s.end&&s.start===0)){s.start+=e.length}s.end+=e.length}function o(t,e,s,i,n){const r=m(i);const o=c({sizes:n.sizes,firstItemStart:r.end,firstItemIndex:r.itemIndex+1,origSize:n.originItemSize,maxSize:s-(r.end-t.start),maxCount:e});return o}function c(t,e=0){const s=[];let i=t.firstItemIndex;let n=e;while(n<=t.maxSize&&i<t.maxCount){const e=f(i,t.sizes,t.origSize);s.push({start:t.firstItemStart+n,end:t.firstItemStart+n+e,itemIndex:i,size:e});n+=e;i++}return s}function a(t,e){const s=[...e.items];const i=s.length;let n={start:e.start,end:e.end};if(t>i){return null}if(e.positiveDirection){let r=m(e);let o=n.start;const c=o+t;for(;o<c;o++){const t=r.itemIndex+1;const c=f(t,e.sizes,e.originItemSize);if(r.end+c>e.realSize){break}let a=o%i;if(!s[a]){throw new Error("incorrect index")}s[a]=r={start:r.end,end:r.end+c,itemIndex:t,size:c};n.start++;n.end=a}}else{let r=h(e);const o=n.end;for(let c=0;c<t;c++){const t=r.itemIndex-1;const a=f(t,e.sizes,e.originItemSize);let u=o-c;u=(u<0?i+u:u)%i;if(!s[u]){throw new Error("incorrect index")}s[u]=r={start:r.start-a,end:r.start,itemIndex:t,size:a};n.start=u;n.end--}}const r={start:(n.start<0?i+n.start:n.start)%i,end:(n.end<0?i+n.end:n.end)%i};return Object.assign({items:s},r)}function f(t,e,s=0){if(e&&e[t]){return e[t]}return s}function u(t,e,s,i){if(!s||!i){return false}return t>=s.start&&t<=s.end||t>s.end&&i.end===e}function l(t,e,s,i){if(!s){return false}return e+t>(i===null||i===void 0?void 0:i.end)}function h(t){return t.items[t.start]}function m(t){return t.items[t.end]}function d(t,e,s,i){const n=[...t];const r=n.length;let o=i;let c=0;let a=e;if(!r){return[]}while(c<r){const t=n[a];t.start=o;t.size=s;t.end=t.start+s;o=t.end;a++;c++;if(a===r){a=0}}return n}function z(){return{items:[],start:0,end:0,virtualSize:0,realCount:0}}class b{get lastCoordinate(){return this.lastKnownScroll}set lastCoordinate(t){this.lastKnownScroll=t}constructor(t){this.type=t;this.lastKnownScroll=0;this.store=e(z());this.store.onChange("realCount",(()=>this.clearItems()));this.store.onChange("virtualSize",(()=>this.clearItems()))}setViewPortCoordinate(t,e,s=false){const n=this.store.get("virtualSize");if(!n){return}const c=1;const a=e.originItemSize*c;const f=a*2;const d=n+f;let z=0;if(e.realSize>n){z=e.realSize-n-a}let b=t;if(b<0){b=0}else if(b>z){b=z}this.lastCoordinate=b;b-=a;b=b<0?0:b<z?b:z;let x;if(s){x={items:[],start:0,end:0}}else{x=this.getItems()}const I=h(x);const j=m(x);let O={};if(!u(b,e.realSize,I,j)){O=Object.assign(Object.assign({},O),i(b,x,this.store.get("realCount"),d,e));this.setViewport(Object.assign({},O))}else if(l(b,d,I,j)){const t=[...x.items];const s=o(I,this.store.get("realCount"),d+b-I.start,x,{sizes:e.sizes,originItemSize:e.originItemSize});if(s.length){const e={start:this.store.get("start"),end:this.store.get("end")};r(t,s,e);O=Object.assign(Object.assign(Object.assign({},O),{items:[...t]}),e);this.setViewport(Object.assign({},O))}}}setOriginalSizes(t){const e=this.store.get("items");const i=e.length;if(!i){return}s(this.store,{items:d(e,this.store.get("start"),t,this.lastCoordinate)})}getItems(){return{items:this.store.get("items"),start:this.store.get("start"),end:this.store.get("end")}}setViewport(t){s(this.store,t)}clearItems(){this.store.set("items",[])}}export{b as V,o as a,c as b,l as c,h as d,m as e,i as g,u as i,a as r,d as s,r as u};
5
+ //# sourceMappingURL=viewport.store-bfd0b036.js.map
@@ -530,7 +530,6 @@ export declare class RevoGridComponent {
530
530
  onCellFocus(e: CustomEvent<BeforeSaveDataDetails>): void;
531
531
  element: HTMLRevoGridElement;
532
532
  private extraElements;
533
- uuid: string | null;
534
533
  columnProvider: ColumnDataProvider;
535
534
  dataProvider: DataProvider;
536
535
  dimensionProvider: DimensionProvider;
@@ -16,7 +16,7 @@ import { ColumnCollection } from "./services/column.data.provider";
16
16
  import { DataInput } from "./plugins/export/types";
17
17
  import { Observable } from "./utils/store.utils";
18
18
  import { DSourceState, Groups } from "./store/index";
19
- import { MultiFilterItem, ShowData } from "./plugins/filter/filter.pop";
19
+ import { MultiFilterItem, ShowData } from "./plugins/filter/filter.panel";
20
20
  import { LogicFunction } from "./plugins/filter/filter.types";
21
21
  import { ResizeProps } from "./components/header/resizable.directive";
22
22
  import { Cell as Cell1, ColumnRegular as ColumnRegular1, DataType as DataType1, DimensionCols as DimensionCols1, DimensionRows as DimensionRows1, DimensionSettingsState as DimensionSettingsState1, Observable as Observable1, SelectionStoreState as SelectionStoreState1 } from "./components";
@@ -31,7 +31,7 @@ export { ColumnCollection } from "./services/column.data.provider";
31
31
  export { DataInput } from "./plugins/export/types";
32
32
  export { Observable } from "./utils/store.utils";
33
33
  export { DSourceState, Groups } from "./store/index";
34
- export { MultiFilterItem, ShowData } from "./plugins/filter/filter.pop";
34
+ export { MultiFilterItem, ShowData } from "./plugins/filter/filter.panel";
35
35
  export { LogicFunction } from "./plugins/filter/filter.types";
36
36
  export { ResizeProps } from "./components/header/resizable.directive";
37
37
  export { Cell as Cell1, ColumnRegular as ColumnRegular1, DataType as DataType1, DimensionCols as DimensionCols1, DimensionRows as DimensionRows1, DimensionSettingsState as DimensionSettingsState1, Observable as Observable1, SelectionStoreState as SelectionStoreState1 } from "./components";
@@ -399,7 +399,6 @@ export namespace Components {
399
399
  "filterTypes": Record<string, string[]>;
400
400
  "getChanges": () => Promise<ShowData>;
401
401
  "show": (newEntity?: ShowData) => Promise<void>;
402
- "uuid": string;
403
402
  }
404
403
  /**
405
404
  * Focus component. Shows focus layer around the cell that is currently in focus.
@@ -1689,7 +1688,6 @@ declare namespace LocalJSX {
1689
1688
  "filterNames"?: Record<string, string>;
1690
1689
  "filterTypes"?: Record<string, string[]>;
1691
1690
  "onFilterChange"?: (event: RevogrFilterPanelCustomEvent<MultiFilterItem>) => void;
1692
- "uuid"?: string;
1693
1691
  }
1694
1692
  /**
1695
1693
  * Focus component. Shows focus layer around the cell that is currently in focus.
@@ -34,12 +34,12 @@ export type ShowData = {
34
34
  */
35
35
  export declare class FilterPanel {
36
36
  private filterCaptionsInternal;
37
+ element: HTMLElement;
37
38
  isFilterIdSet: boolean;
38
39
  filterId: number;
39
40
  currentFilterId: number;
40
41
  currentFilterType: FilterType;
41
42
  changes: ShowData | undefined;
42
- uuid: string;
43
43
  filterItems: MultiFilterItem;
44
44
  filterTypes: Record<string, string[]>;
45
45
  filterNames: Record<string, string>;
@@ -68,5 +68,4 @@ export declare class FilterPanel {
68
68
  private onRemoveFilter;
69
69
  private toggleFilterAndOr;
70
70
  private assertChanges;
71
- private isOutside;
72
71
  }
@@ -1,5 +1,5 @@
1
1
  import { BasePlugin } from '../base.plugin';
2
- import { MultiFilterItem } from './filter.pop';
2
+ import { MultiFilterItem } from './filter.panel';
3
3
  import { FilterType } from './filter.service';
4
4
  import { LogicFunction } from './filter.types';
5
5
  import { ColumnProp, ColumnRegular, DataType } from "../../types/index";
@@ -64,7 +64,7 @@ export declare class FilterPlugin extends BasePlugin {
64
64
  possibleFilterNames: Record<string, string>;
65
65
  possibleFilterEntities: Record<string, LogicFunction>;
66
66
  filterProp: string;
67
- constructor(revogrid: HTMLRevoGridElement, providers: PluginProviders, uiid: string, config?: ColumnFilterConfig);
67
+ constructor(revogrid: HTMLRevoGridElement, providers: PluginProviders, config?: ColumnFilterConfig);
68
68
  initConfig(config: ColumnFilterConfig): void;
69
69
  headerclick(e: HeaderEvent): Promise<void>;
70
70
  getColumnFilter(type?: boolean | string | string[]): Record<string, string[]>;
@@ -28,8 +28,6 @@ export type ViewportData = {
28
28
  segmentSelectionStore: Observable<SelectionStoreState>;
29
29
  /** Slot to put data */
30
30
  slot: SlotType;
31
- /** Current grid uniq Id */
32
- uuid: string;
33
31
  style?: {
34
32
  [key: string]: string;
35
33
  };
@@ -2,7 +2,6 @@ export declare const MIN_COL_SIZE = 30;
2
2
  export declare const RESIZE_INTERVAL = 40;
3
3
  export declare const DATA_COL = "data-rgCol";
4
4
  export declare const DATA_ROW = "data-rgRow";
5
- export declare const UUID = "grid-uuid";
6
5
  export declare const DISABLED_CLASS = "disabled";
7
6
  export declare const CELL_CLASS = "rgCell";
8
7
  export declare const ROW_HEADER_TYPE = "rowHeaders";