@revolist/revogrid 4.9.11 → 4.9.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 (38) hide show
  1. package/dist/cjs/revo-grid.cjs.entry.js +64 -6
  2. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  3. package/dist/cjs/revogr-attribution_6.cjs.entry.js +2 -2
  4. package/dist/cjs/revogr-data_4.cjs.entry.js +2 -2
  5. package/dist/cjs/revogr-filter-panel.cjs.entry.js +28 -19
  6. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  7. package/dist/collection/components/revoGrid/revo-grid.js +64 -6
  8. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  9. package/dist/collection/components/rowHeaders/revogr-row-headers.js +1 -1
  10. package/dist/collection/components/scroll/revogr-viewport-scroll.js +1 -1
  11. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +1 -1
  12. package/dist/collection/components/vnode/vnode-converter.js +1 -1
  13. package/dist/collection/plugins/filter/filter.panel.js +28 -19
  14. package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
  15. package/dist/esm/revo-grid.entry.js +64 -6
  16. package/dist/esm/revo-grid.entry.js.map +1 -1
  17. package/dist/esm/revogr-attribution_6.entry.js +2 -2
  18. package/dist/esm/revogr-data_4.entry.js +2 -2
  19. package/dist/esm/revogr-filter-panel.entry.js +28 -19
  20. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  21. package/dist/revo-grid/revo-grid.entry.js +1 -1
  22. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  23. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  24. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  25. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  26. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  27. package/dist/types/components/revoGrid/revo-grid.d.ts +2 -2
  28. package/hydrate/index.js +96 -29
  29. package/hydrate/index.mjs +96 -29
  30. package/package.json +1 -1
  31. package/standalone/revo-grid.js +64 -6
  32. package/standalone/revo-grid.js.map +1 -1
  33. package/standalone/revogr-filter-panel.js +28 -19
  34. package/standalone/revogr-filter-panel.js.map +1 -1
  35. package/standalone/revogr-row-headers2.js +1 -1
  36. package/standalone/revogr-scroll-virtual2.js +1 -1
  37. package/standalone/revogr-viewport-scroll2.js +1 -1
  38. package/standalone/vnode-converter.js +1 -1
@@ -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","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) | null = 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":";;;8KAAA,SAAUA,IACR,IAAKC,QAAQC,UAAUC,QAAS,CAC9BF,QAAQC,UAAUC,QACdF,QAAQC,UAAgFE,mBAAqBH,QAAQC,UAAUG,qB,CAGrI,IAAKJ,QAAQC,UAAUF,QAAS,CAC9BC,QAAQC,UAAUF,QAAU,SAAUM,GACpC,IAAIC,EAAyDC,KAE7D,EAAG,CACD,GAAIP,QAAQC,UAAUC,QAAQM,KAAKF,EAAID,GAAI,CACzC,OAAOC,C,CAETA,EAAKA,EAAGG,eAAiBH,EAAGI,U,OACrBJ,IAAO,MAAQA,EAAGK,WAAa,GACxC,OAAO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B,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
+ {"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","FILTER_ID","FilterPanel","filterCaptionsInternal","title","save","reset","cancel","add","placeholder","and","or","debouncedApplyFilter","debounce","filterChange","emit","filterItems","onMouseDown","e","changes","defaultPrevented","path","composedPath","select","document","getElementById","HTMLSelectElement","includes","value","currentFilterType","type","currentFilterId","isOutside","element","target","HTMLElement","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","HTMLInputElement","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) | null = 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';\nconst FILTER_ID = 'add-filter';\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 // click on anything then select drops values to default\n if (!this.changes || e.defaultPrevented) {\n return;\n }\n const path = e.composedPath();\n const select = document.getElementById(FILTER_ID);\n if (select instanceof HTMLSelectElement) {\n // click on select should be skipped\n if (path.includes(select)) {\n return;\n }\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 isOutside = !path.includes(this.element);\n\n if (e.target instanceof HTMLElement && isOutside && !isFilterBtn(e.target)) {\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={FILTER_ID} 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 if (!(e.target instanceof HTMLSelectElement)) {\n return;\n }\n this.filterItems[prop][index].type = e.target.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);\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\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":";;;8KAAA,SAAUA,IACR,IAAKC,QAAQC,UAAUC,QAAS,CAC9BF,QAAQC,UAAUC,QACdF,QAAQC,UAAgFE,mBAAqBH,QAAQC,UAAUG,qB,CAGrI,IAAKJ,QAAQC,UAAUF,QAAS,CAC9BC,QAAQC,UAAUF,QAAU,SAAUM,GACpC,IAAIC,EAAyDC,KAE7D,EAAG,CACD,GAAIP,QAAQC,UAAUC,QAAQM,KAAKF,EAAID,GAAI,CACzC,OAAOC,C,CAETA,EAAKA,EAAGG,eAAiBH,EAAGI,U,OACrBJ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AAY6B,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IACvC,IAAK4E,EAAO,OAEZ,MAAMxD,EAAQwD,EAAMC,WAAU7C,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAElBwD,EAAMxD,GAAOkB,SAAWsC,EAAMxD,GAAOkB,WAAa,MAAQ,KAAO,MACjE,IAAK5F,KAAKqH,wBAAyBrH,KAAKqB,sB,CAGlC,aAAA4G,GACN,IAAKjI,KAAK4B,QAAS,CACjB,MAAM,IAAIyG,MAAM,4B","ignoreList":[]}
@@ -536,8 +536,8 @@ export declare class RevoGridComponent {
536
536
  element: HTMLRevoGridElement;
537
537
  private extraElements;
538
538
  columnProvider: ColumnDataProvider;
539
- dataProvider: DataProvider;
540
- dimensionProvider: DimensionProvider;
539
+ dataProvider?: DataProvider;
540
+ dimensionProvider?: DimensionProvider;
541
541
  viewportProvider: ViewportProvider;
542
542
  private themeService;
543
543
  private viewport;
package/hydrate/index.js CHANGED
@@ -3035,6 +3035,7 @@ var RevogrFilterPanelStyle0 = filterStyleCss;
3035
3035
  const defaultType = 'none';
3036
3036
  const FILTER_LIST_CLASS = 'multi-filter-list';
3037
3037
  const FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';
3038
+ const FILTER_ID = 'add-filter';
3038
3039
  /**
3039
3040
  * Filter panel for editing filters
3040
3041
  */
@@ -3072,22 +3073,27 @@ class FilterPanel {
3072
3073
  this.disableDynamicFiltering = false;
3073
3074
  }
3074
3075
  onMouseDown(e) {
3075
- if (this.changes && !e.defaultPrevented) {
3076
- const el = e.target;
3077
- const select = document.getElementById('add-filter');
3078
- if (select) {
3079
- select.value = defaultType;
3080
- }
3081
- this.currentFilterType = defaultType;
3082
- if (this.changes) {
3083
- this.changes.type = defaultType;
3084
- }
3085
- this.currentFilterId = -1;
3086
- const path = e.composedPath();
3087
- const isOutside = !path.includes(this.element);
3088
- if (isOutside && !isFilterBtn(el)) {
3089
- this.changes = undefined;
3076
+ // click on anything then select drops values to default
3077
+ if (!this.changes || e.defaultPrevented) {
3078
+ return;
3079
+ }
3080
+ const path = e.composedPath();
3081
+ const select = document.getElementById(FILTER_ID);
3082
+ if (select instanceof HTMLSelectElement) {
3083
+ // click on select should be skipped
3084
+ if (path.includes(select)) {
3085
+ return;
3090
3086
  }
3087
+ select.value = defaultType;
3088
+ }
3089
+ this.currentFilterType = defaultType;
3090
+ if (this.changes) {
3091
+ this.changes.type = defaultType;
3092
+ }
3093
+ this.currentFilterId = -1;
3094
+ const isOutside = !path.includes(this.element);
3095
+ if (e.target instanceof HTMLElement && isOutside && !isFilterBtn(e.target)) {
3096
+ this.changes = undefined;
3091
3097
  }
3092
3098
  }
3093
3099
  async show(newEntity) {
@@ -3169,19 +3175,22 @@ class FilterPanel {
3169
3175
  top: `${this.changes.y}px`,
3170
3176
  };
3171
3177
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
3172
- return (hAsync(Host, { style: style, ref: (el) => { var _a; ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) && this.autoCorrect(el); } }, hAsync("label", null, capts.title), hAsync("div", { class: "filter-holder" }, this.getFilterItemsList()), hAsync("div", { class: "add-filter" }, hAsync("select", { id: "add-filter", class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), hAsync("div", { class: "filter-actions" }, this.disableDynamicFiltering &&
3178
+ return (hAsync(Host, { style: style, ref: (el) => { var _a; ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) && this.autoCorrect(el); } }, hAsync("label", null, capts.title), hAsync("div", { class: "filter-holder" }, this.getFilterItemsList()), hAsync("div", { class: "add-filter" }, hAsync("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), hAsync("div", { class: "filter-actions" }, this.disableDynamicFiltering &&
3173
3179
  hAsync("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save), hAsync("button", { id: "revo-button-reset", "aria-label": "reset", class: "revo-button light", onClick: () => this.onReset() }, capts.reset), hAsync("button", { id: "revo-button-cancel", "aria-label": "cancel", class: "revo-button light", onClick: () => this.onCancel() }, capts.cancel))));
3174
3180
  }
3175
3181
  onFilterTypeChange(e, prop, index) {
3176
- const el = e.target;
3177
- this.filterItems[prop][index].type = el.value;
3182
+ if (!(e.target instanceof HTMLSelectElement)) {
3183
+ return;
3184
+ }
3185
+ this.filterItems[prop][index].type = e.target.value;
3178
3186
  // this re-renders the input to know if we need extra input
3179
3187
  this.filterId++;
3180
3188
  // adding setTimeout will wait for the next tick DOM update then focus on input
3181
3189
  setTimeout(() => {
3182
3190
  const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
3183
- if (input)
3191
+ if (input instanceof HTMLInputElement) {
3184
3192
  input.focus();
3193
+ }
3185
3194
  }, 0);
3186
3195
  if (!this.disableDynamicFiltering)
3187
3196
  this.debouncedApplyFilter();
@@ -14321,6 +14330,9 @@ class RevoGridComponent {
14321
14330
  * Can be specific part as rgRow or pinned rgRow or 'all' by default.
14322
14331
  */
14323
14332
  async refresh(type = 'all') {
14333
+ if (!this.dataProvider) {
14334
+ throw new Error('Not connected');
14335
+ }
14324
14336
  this.dataProvider.refresh(type);
14325
14337
  }
14326
14338
  /**
@@ -14339,6 +14351,9 @@ class RevoGridComponent {
14339
14351
  * Scrolls viewport to specified row by index.
14340
14352
  */
14341
14353
  async scrollToRow(coordinate = 0) {
14354
+ if (!this.dimensionProvider) {
14355
+ throw new Error('Not connected');
14356
+ }
14342
14357
  const y = this.dimensionProvider.getViewPortPos({
14343
14358
  coordinate,
14344
14359
  dimension: 'rgRow',
@@ -14349,6 +14364,9 @@ class RevoGridComponent {
14349
14364
  * Scrolls viewport to specified column by index.
14350
14365
  */
14351
14366
  async scrollToColumnIndex(coordinate = 0) {
14367
+ if (!this.dimensionProvider) {
14368
+ throw new Error('Not connected');
14369
+ }
14352
14370
  const x = this.dimensionProvider.getViewPortPos({
14353
14371
  coordinate,
14354
14372
  dimension: 'rgCol',
@@ -14359,6 +14377,9 @@ class RevoGridComponent {
14359
14377
  * Scrolls viewport to specified column by prop
14360
14378
  */
14361
14379
  async scrollToColumnProp(prop, dimension = 'rgCol') {
14380
+ if (!this.dimensionProvider) {
14381
+ throw new Error('Not connected');
14382
+ }
14362
14383
  const coordinate = this.columnProvider.getColumnIndexByProp(prop, dimension);
14363
14384
  if (coordinate < 0) {
14364
14385
  // already on the screen
@@ -14376,6 +14397,9 @@ class RevoGridComponent {
14376
14397
  }
14377
14398
  /** Add trimmed by type */
14378
14399
  async addTrimmed(trimmed, trimmedType = 'external', type = 'rgRow') {
14400
+ if (!this.dataProvider) {
14401
+ throw new Error('Not connected');
14402
+ }
14379
14403
  const event = this.beforetrimmed.emit({
14380
14404
  trimmed,
14381
14405
  trimmedType,
@@ -14411,6 +14435,9 @@ class RevoGridComponent {
14411
14435
  }
14412
14436
  /** Get data from source */
14413
14437
  async getSource(type = 'rgRow') {
14438
+ if (!this.dataProvider) {
14439
+ throw new Error('Not connected');
14440
+ }
14414
14441
  return this.dataProvider.stores[type].store.get('source');
14415
14442
  }
14416
14443
  /**
@@ -14419,6 +14446,9 @@ class RevoGridComponent {
14419
14446
  * @param type - type of source
14420
14447
  */
14421
14448
  async getVisibleSource(type = 'rgRow') {
14449
+ if (!this.dataProvider) {
14450
+ throw new Error('Not connected');
14451
+ }
14422
14452
  return getVisibleSourceItem(this.dataProvider.stores[type].store);
14423
14453
  }
14424
14454
  /**
@@ -14427,6 +14457,9 @@ class RevoGridComponent {
14427
14457
  * @param type - type of source
14428
14458
  */
14429
14459
  async getSourceStore(type = 'rgRow') {
14460
+ if (!this.dataProvider) {
14461
+ throw new Error('Not connected');
14462
+ }
14430
14463
  return this.dataProvider.stores[type].store;
14431
14464
  }
14432
14465
  /**
@@ -14490,6 +14523,9 @@ class RevoGridComponent {
14490
14523
  */
14491
14524
  async getContentSize() {
14492
14525
  var _a;
14526
+ if (!this.dimensionProvider) {
14527
+ throw new Error('Not connected');
14528
+ }
14493
14529
  return (_a = this.dimensionProvider) === null || _a === void 0 ? void 0 : _a.getFullSize();
14494
14530
  }
14495
14531
  /**
@@ -14559,11 +14595,12 @@ class RevoGridComponent {
14559
14595
  (_a = this.orderService) === null || _a === void 0 ? void 0 : _a.moveTip(e.detail);
14560
14596
  }
14561
14597
  async onCellEdit(e) {
14598
+ var _a;
14562
14599
  const { defaultPrevented, detail } = this.beforeedit.emit(e.detail);
14563
14600
  await timeout();
14564
14601
  // apply data
14565
14602
  if (!defaultPrevented) {
14566
- this.dataProvider.setCellData(detail);
14603
+ (_a = this.dataProvider) === null || _a === void 0 ? void 0 : _a.setCellData(detail);
14567
14604
  // @feature: incrimental update for cells
14568
14605
  // this.dataProvider.setCellData(detail, false);
14569
14606
  // await this.setDataAt({
@@ -14576,6 +14613,9 @@ class RevoGridComponent {
14576
14613
  }
14577
14614
  }
14578
14615
  onRangeEdit(e) {
14616
+ if (!this.dataProvider) {
14617
+ throw new Error('Not connected');
14618
+ }
14579
14619
  const { defaultPrevented, detail } = this.beforerangeedit.emit(e.detail);
14580
14620
  if (defaultPrevented) {
14581
14621
  e.preventDefault();
@@ -14620,6 +14660,9 @@ class RevoGridComponent {
14620
14660
  this.columnChanged(this.columns);
14621
14661
  }
14622
14662
  columnChanged(newVal = []) {
14663
+ if (!this.dimensionProvider) {
14664
+ return;
14665
+ }
14623
14666
  const columnGather = getColumns(newVal, 0, this.columnTypes);
14624
14667
  this.beforecolumnsset.emit(columnGather);
14625
14668
  this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
@@ -14637,11 +14680,17 @@ class RevoGridComponent {
14637
14680
  this.columnChanged(this.columns);
14638
14681
  }
14639
14682
  rowSizeChanged(s) {
14683
+ if (!this.dimensionProvider) {
14684
+ return;
14685
+ }
14640
14686
  // clear existing data
14641
14687
  this.dimensionProvider.setSettings({ originItemSize: s }, 'rgRow');
14642
14688
  this.rowDefChanged(this.rowDefinitions, this.rowDefinitions, 'rowSize', true);
14643
14689
  }
14644
14690
  themeChanged(t, _, __ = 'theme', init = false) {
14691
+ if (!this.dimensionProvider) {
14692
+ return;
14693
+ }
14645
14694
  this.themeService.register(t);
14646
14695
  this.dimensionProvider.setSettings({ originItemSize: this.themeService.rowSize }, 'rgRow');
14647
14696
  this.dimensionProvider.setSettings({ originItemSize: this.colSize }, 'rgCol');
@@ -14656,6 +14705,9 @@ class RevoGridComponent {
14656
14705
  this.afterthemechanged.emit(t);
14657
14706
  }
14658
14707
  dataSourceChanged(newVal = [], _, watchName) {
14708
+ if (!this.dataProvider) {
14709
+ return;
14710
+ }
14659
14711
  let type = 'rgRow';
14660
14712
  switch (watchName) {
14661
14713
  case 'pinnedBottomSource':
@@ -14699,6 +14751,10 @@ class RevoGridComponent {
14699
14751
  this.dataSourceChanged(this.source, this.source, 'source');
14700
14752
  }
14701
14753
  rowDefChanged(after, before, _watchName, forceUpdate = true) {
14754
+ // in firefox it's triggered before init
14755
+ if (!this.dimensionProvider || !this.dataProvider) {
14756
+ return;
14757
+ }
14702
14758
  const { detail: { vals: newVal, oldVals: oldVal }, } = this.beforerowdefinition.emit({
14703
14759
  vals: after,
14704
14760
  oldVals: before,
@@ -14727,8 +14783,9 @@ class RevoGridComponent {
14727
14783
  }
14728
14784
  }
14729
14785
  Object.entries(newRows).forEach(([k, r]) => {
14786
+ var _a;
14730
14787
  const type = k;
14731
- this.dimensionProvider.setCustomSizes(type, r.sizes || {});
14788
+ (_a = this.dimensionProvider) === null || _a === void 0 ? void 0 : _a.setCustomSizes(type, r.sizes || {});
14732
14789
  });
14733
14790
  }
14734
14791
  trimmedRowsChanged(newVal = {}) {
@@ -14752,6 +14809,9 @@ class RevoGridComponent {
14752
14809
  * Stretch Plugin Apply
14753
14810
  */
14754
14811
  applyStretch(isStretch) {
14812
+ if (!this.dimensionProvider || !this.dataProvider) {
14813
+ return;
14814
+ }
14755
14815
  if (isStretch === 'false') {
14756
14816
  isStretch = false;
14757
14817
  }
@@ -14795,6 +14855,9 @@ class RevoGridComponent {
14795
14855
  // #region Plugins
14796
14856
  setPlugins() {
14797
14857
  var _a;
14858
+ if (!this.dimensionProvider || !this.dataProvider) {
14859
+ return;
14860
+ }
14798
14861
  // remove old plugins if any
14799
14862
  this.removePlugins();
14800
14863
  // pass data provider to plugins
@@ -14880,7 +14943,8 @@ class RevoGridComponent {
14880
14943
  this.groupingChanged(this.grouping);
14881
14944
  // init scrolling service
14882
14945
  this.scrollingService = new GridScrollingService((e) => {
14883
- this.dimensionProvider.setViewPortCoordinate({
14946
+ var _a;
14947
+ (_a = this.dimensionProvider) === null || _a === void 0 ? void 0 : _a.setViewPortCoordinate({
14884
14948
  coordinate: e.coordinate,
14885
14949
  type: e.dimension,
14886
14950
  });
@@ -14898,6 +14962,9 @@ class RevoGridComponent {
14898
14962
  return Promise.all(this.jobsBeforeRender);
14899
14963
  }
14900
14964
  render() {
14965
+ if (!this.dimensionProvider || !this.dataProvider) {
14966
+ return;
14967
+ }
14901
14968
  const contentHeight = this.dimensionProvider.stores['rgRow'].store.get('realSize');
14902
14969
  // init viewport service helpers
14903
14970
  this.viewport = new ViewportService({
@@ -14933,7 +15000,7 @@ class RevoGridComponent {
14933
15000
  const headerProperties = Object.assign(Object.assign({}, view.headerProp), { type: view.type, additionalData: this.additionalData, viewportCol: view.viewportCol, selectionStore: view.columnSelectionStore, canResize: this.resize, readonly: this.readonly, columnFilter: !!this.filter });
14934
15001
  // Column headers
14935
15002
  const dataViews = [
14936
- hAsync("revogr-header", Object.assign({ key: '31f0cebc08d5e9222d058c138079ee1d6c228ed2' }, headerProperties, { slot: HEADER_SLOT })),
15003
+ hAsync("revogr-header", Object.assign({}, headerProperties, { slot: HEADER_SLOT })),
14937
15004
  ];
14938
15005
  // Render viewport data (vertical sections)
14939
15006
  view.dataPorts.forEach(data => {
@@ -14955,12 +15022,12 @@ class RevoGridComponent {
14955
15022
  const typeCol = 'rgCol';
14956
15023
  const viewports = this.viewportProvider.stores;
14957
15024
  const dimensions = this.dimensionProvider.stores;
14958
- return (hAsync(Host, { key: '2563091c11d20bef3e25706e64822040002fe5a4' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: '58fbfb9a4169e6640ad1c4b0f238c006e23d0059', class: "main-viewport", onClick: (e) => {
15025
+ return (hAsync(Host, null, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { class: "main-viewport", onClick: (e) => {
14959
15026
  var _a;
14960
15027
  if (e.currentTarget === e.target) {
14961
15028
  (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
14962
15029
  }
14963
- } }, hAsync("div", { key: '028984ab42f98828aba4d5b37b831b832978133f', class: "viewports" }, hAsync("slot", { key: '521dacf842476ff8ed35ec4c87c6276c331c4316', name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { key: 'd4e7a0c3cdda8fcc9e64841c0d16f1e557a75144', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { key: 'c49e93965594b38d6827f8f8c00e3004c8c392f8', ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { key: 'ccccd5bdfbd5ccd1dfb76727b7e903a95d262945', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
15030
+ } }, hAsync("div", { class: "viewports" }, hAsync("slot", { name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
14964
15031
  }
14965
15032
  disconnectedCallback() {
14966
15033
  // Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
@@ -16048,7 +16115,7 @@ class RevogrRowHeaders {
16048
16115
  const viewportHeader = Object.assign(Object.assign({}, this.headerProp), { colData: typeof this.rowHeaderColumn === 'object' ? [this.rowHeaderColumn] : [], viewportCol: viewport.store, canResize: false, type: ROW_HEADER_TYPE,
16049
16116
  // parent,
16050
16117
  slot: HEADER_SLOT });
16051
- return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: '743c1dbaed3edf679c0616a2b79171a43d94806f' }, viewportScroll, { "row-header": true }), hAsync("revogr-header", Object.assign({ key: '53f1f64b1358d7828a5e45807915740ef198df21' }, viewportHeader)), dataViews)));
16118
+ return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: 'a63769297e9f09edbdccc04012137f843ae92f17' }, viewportScroll, { "row-header": true }), hAsync("revogr-header", Object.assign({ key: '796e213166053e66dbd99298991d92e48e1f49cb' }, viewportHeader)), dataViews)));
16052
16119
  }
16053
16120
  static get cmpMeta() { return {
16054
16121
  "$flags$": 0,
@@ -16377,7 +16444,7 @@ class RevogrScrollVirtual {
16377
16444
  }
16378
16445
  render() {
16379
16446
  const sizeType = this.dimension === 'rgRow' ? 'height' : 'width';
16380
- return (hAsync(Host, { key: '1bf8d494d6d65ffd27f0a663f5c62c9b60cd35e1', onScroll: (e) => this.onScroll(e) }, hAsync("div", { key: '3f554ca3e7822c9bb20fe830fc4122a0d52919ee', style: {
16447
+ return (hAsync(Host, { key: '73aa9ba5bd17eea4d37eaecd63326fca29e4e231', onScroll: (e) => this.onScroll(e) }, hAsync("div", { key: 'c57e42d782f693dc2a93e98f157ef60ebe09398c', style: {
16381
16448
  [sizeType]: `${getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('virtualSize'))}px`,
16382
16449
  } })));
16383
16450
  }
@@ -16633,7 +16700,7 @@ class RevogrViewportScroll {
16633
16700
  this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
16634
16701
  }
16635
16702
  render() {
16636
- return (hAsync(Host, { key: '8395ce30127f30fff81dc67bfe2f4c3b087b2007', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'efd2db0f5b22b394e93923926f86f2ab9bffb8e0', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: '2794c7187ec23ac45dab5f6cb3f20ba59102b2a7', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '1a344d7e5cf58d77818390e8d541de88a75399d0', name: HEADER_SLOT })), hAsync("div", { key: '2aeb56f4bf3f3fc60eaeaffd8c18565beaa127ca', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: '59482ef73d3c4617c2511b8613056bbc200cd089', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: 'f318ab365e5f6eddcd2812a314f55cac0959c3b4', name: CONTENT_SLOT }))), hAsync("div", { key: '265c036107a8ed3d47b767fec10ae0225cc927cf', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '2aa7e178375b462e666cf067e075856f592714b6', name: FOOTER_SLOT })))));
16703
+ return (hAsync(Host, { key: '5a7d07c999e59a8b96a99c87e50103acb4f18406', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: '09ac58def608c3bc169ce12e09dd2dc2df1f90a2', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: 'c370a3b8d5d2f4925b77020ac85d5f4d06b876e0', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: 'c5feeeaf90e42715bbf13619b2341d23257447fb', name: HEADER_SLOT })), hAsync("div", { key: '7c04ffd6e7893db57f883a736d0a4932743863ea', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'da5db752025ddaaf626411b445b3b90b5b81cdc8', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: 'c5404f4628b68b4b18a6e9143c70e72c50616f9d', name: CONTENT_SLOT }))), hAsync("div", { key: 'ee9e1b5dd297f220aed3efef4b53b4dd74a11837', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '5ff132da3009d959a6e87fbbe3d22930f322c486', name: FOOTER_SLOT })))));
16637
16704
  }
16638
16705
  /**
16639
16706
  * Extra layer for scroll event monitoring, where MouseWheel event is not passing
@@ -16739,7 +16806,7 @@ class VNodeToHtml {
16739
16806
  render() {
16740
16807
  var _a, _b;
16741
16808
  this.vnodes = (_b = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
16742
- return (hAsync(Host, { key: 'dcaa7c6bd2f1eef1dd9a7f95a723f8ec778681a0', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
16809
+ return (hAsync(Host, { key: '8d02c8cc7a2520cebce307c7f3e7e07107a0a494', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
16743
16810
  }
16744
16811
  get el() { return getElement(this); }
16745
16812
  static get cmpMeta() { return {