@revolist/revogrid 4.12.4 → 4.12.6
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.
- package/dist/cjs/revogr-attribution_7.cjs.entry.js +23 -8
- package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +58 -36
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/{throttle-08957661.js → throttle-5674040a.js} +4 -1
- package/dist/cjs/throttle-5674040a.js.map +1 -0
- package/dist/collection/components/overlay/revogr-overlay-selection.js +2 -2
- package/dist/collection/components/revoGrid/revo-grid.js +2 -2
- package/dist/collection/components/revoGrid/viewport.resize.service.js +19 -4
- package/dist/collection/components/revoGrid/viewport.resize.service.js.map +1 -1
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +38 -31
- package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js +23 -8
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -1
- package/dist/collection/plugins/filter/filter.panel.js +8 -4
- package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
- package/dist/collection/plugins/filter/filter.types.js +7 -0
- package/dist/collection/plugins/filter/filter.types.js.map +1 -1
- package/dist/collection/services/local.scroll.service.js +3 -0
- package/dist/collection/services/local.scroll.service.js.map +1 -1
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/esm/revogr-attribution_7.entry.js +23 -8
- package/dist/esm/revogr-attribution_7.entry.js.map +1 -1
- package/dist/esm/revogr-data_4.entry.js +58 -36
- package/dist/esm/revogr-data_4.entry.js.map +1 -1
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
- package/dist/esm/{throttle-05489451.js → throttle-dec28f5b.js} +4 -1
- package/dist/esm/throttle-dec28f5b.js.map +1 -0
- package/dist/revo-grid/revogr-attribution_7.entry.js +1 -1
- package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
- package/dist/revo-grid/throttle-dec28f5b.js +5 -0
- package/dist/revo-grid/throttle-dec28f5b.js.map +1 -0
- package/dist/types/components/revoGrid/viewport.resize.service.d.ts +8 -6
- package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/dist/types/plugins/filter/filter.panel.d.ts +1 -1
- package/dist/types/plugins/filter/filter.types.d.ts +19 -19
- package/dist/types/types/interfaces.d.ts +6 -6
- package/hydrate/index.js +82 -42
- package/hydrate/index.mjs +82 -42
- package/package.json +1 -1
- package/standalone/local.scroll.timer.js +3 -0
- package/standalone/local.scroll.timer.js.map +1 -1
- package/standalone/revogr-filter-panel.js.map +1 -1
- package/standalone/revogr-scroll-virtual2.js +22 -7
- package/standalone/revogr-scroll-virtual2.js.map +1 -1
- package/standalone/revogr-viewport-scroll2.js +57 -35
- package/standalone/revogr-viewport-scroll2.js.map +1 -1
- package/dist/cjs/throttle-08957661.js.map +0 -1
- package/dist/esm/throttle-05489451.js.map +0 -1
- package/dist/revo-grid/throttle-05489451.js +0 -5
- package/dist/revo-grid/throttle-05489451.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"revogr-filter-panel.entry.js","mappings":";;;;;;;AAAA,CAAC,SAAS,OAAO;IACf,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO;YACrB,OAAO,CAAC,SAA+E,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC1J;IAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,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ogr-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 max-height: calc(100% - 80px);\n min-width: 250px;\n overflow: auto;\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\nrevo-grid[theme^='dark'] {\n revogr-filter-panel {\n background-color: $el-color-dark;\n\n .add-filter-divider {\n border-bottom-color: $el-color-dark;\n }\n\n input[type=text] {\n background-color: $font-color-dark;\n color: black;\n }\n }\n}","// filter.panel.tsx\n\nimport {\n h,\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n type VNode,\n Element,\n} from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport {\n FilterCaptions,\n LogicFunction,\n MultiFilterItem,\n ShowData,\n} from './filter.types';\nimport type { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\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 ok: 'Ok',\n save: 'Save',\n // drops the filter\n reset: 'Reset',\n cancel: 'Cancel',\n add: 'Add 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 @State() filterItems: MultiFilterItem = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n /**\n * Disables dynamic filtering. A way to apply filters on Save only\n */\n @Prop() disableDynamicFiltering = false;\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Event() resetChange: EventEmitter<ColumnProp>;\n\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 (\n e.target instanceof HTMLElement &&\n isOutside &&\n !isFilterBtn(e.target)\n ) {\n this.changes = undefined;\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n this.filterItems = newEntity?.filterItems || {};\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 getFilterItemsList() {\n const prop = this.changes?.prop;\n if (typeof prop === 'undefined') return '';\n\n const propFilters = this.filterItems[prop] ?? [];\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n return (\n <div key={this.filterId}>\n {propFilters.map((filter, index) => {\n let andOrButton;\n if (filter.hidden) {\n return;\n }\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(filter.id)}>\n <AndOrButton\n text={filter.relation === 'and' ? capts.and : capts.or}\n />\n </div>\n );\n }\n\n return (\n <div key={filter.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select\n class=\"select-css select-filter\"\n onChange={e => this.onFilterTypeChange(e, prop, index)}\n >\n {this.renderSelectOptions(\n this.filterItems[prop][index].type,\n true,\n )}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(filter.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.filter(f => !f.hidden).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 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(\n 'filter-input-' + this.filterItems[prop][index].id,\n );\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\n }, 0);\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\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) {\n this.debouncedApplyFilter();\n }\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(\n 'filter-input-' + this.currentFilterId,\n ) 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 = (\n event.target as HTMLInputElement\n ).value;\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\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 this.resetChange.emit(this.changes?.prop);\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\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) {\n this.debouncedApplyFilter();\n }\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) {\n this.debouncedApplyFilter();\n }\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n if (!this.changes) {\n return;\n }\n const options: VNode[] = [];\n const prop = this.changes.prop;\n\n const hidden = new Set<string>();\n Object.entries(this.filterItems).forEach(([_, values]) => {\n values.forEach((filter) => {\n if (filter.hidden) {\n hidden.add(filter.type);\n }\n })\n });\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n options.push(\n <option\n selected={this.currentFilterType === defaultType}\n value={defaultType}\n >\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0\n ? capts.add\n : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.changes.filterTypes) {\n const group = this.changes.filterTypes[gIndex].filter(k => !hidden.has(k));\n if (group.length) {\n options.push(\n ...group.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 }\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')\n return '';\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\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 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(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <Host\n style={style}\n ref={el => {\n this.changes?.autoCorrect && this.autoCorrect(el);\n }}\n >\n <slot slot=\"header\" />\n { this.changes.extraContent?.(this.changes) || '' }\n\n { this.changes?.hideDefaultFilters !== true && (\n [\n <label>{capts.title}</label>,\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>,\n <div class=\"add-filter\">\n <select\n id={FILTER_ID}\n class=\"select-css\"\n onChange={e => this.onAddNewFilter(e)}\n >\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n ]\n )}\n\n <slot />\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering && [\n <button\n id=\"revo-button-save\"\n aria-label=\"save\"\n class=\"revo-button green\"\n onClick={() => this.onSave()}\n >\n {capts.save}\n </button>,\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.cancel}\n </button>,\n ]}\n {!this.disableDynamicFiltering && [\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.ok}\n </button>,\n\n <button\n id=\"revo-button-reset\"\n aria-label=\"reset\"\n class=\"revo-button outline\"\n onClick={() => this.onReset()}\n >\n {capts.reset}\n </button>,\n ]}\n </div>\n <slot slot=\"footer\" />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"revogr-filter-panel.entry.js","mappings":";;;;;;;AAAA,CAAC,SAAS,OAAO;IACf,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO;YACrB,OAAO,CAAC,SAA+E,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC1J;IAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,CAAS;YAC7C,IAAI,EAAE,GAAuD,IAAI,CAAC;YAElE,GAAG;gBACD,IAAI,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE;oBACzC,OAAO,EAAE,CAAC;iBACX;gBACD,EAAE,GAAG,EAAE,CAAC,aAAa,IAAI,EAAE,CAAC,UAAU,CAAC;aACxC,QAAQ,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC,QAAQ,KAAK,CAAC,EAAE;YAC3C,OAAO,IAAI,CAAC;SACb,CAAC;KACH;AACH,CAAC,GAAG;;ACnBJ,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AK,KAAK,EAAC,gBAAgB,IACxB,IAAI,CAAC,uBAAuB,IAAI;YAC/B,cACE,EAAE,EAAC,kBAAkB,gBACV,MAAM,EACjB,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,IAE3B,KAAK,CAAC,IAAI,CACJ;YACT,cACE,EAAE,EAAC,gBAAgB,gBACR,IAAI,EACf,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,MAAM,CACN;SACV,EACA,CAAC,IAAI,CAAC,uBAAuB,IAAI;YAChC,cACE,EAAE,EAAC,gBAAgB,gBACR,IAAI,EACf,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,EAAE,CACF;YAET,cACE,EAAE,EAAC,mBAAmB,gBACX,OAAO,EAClB,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,IAE5B,KAAK,CAAC,KAAK,CACL;SACV,CACG,EACN,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EACP;KACH;;;;;;;","names":[],"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 max-height: calc(100% - 80px);\n min-width: 250px;\n overflow: auto;\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\nrevo-grid[theme^='dark'] {\n revogr-filter-panel {\n background-color: $el-color-dark;\n\n .add-filter-divider {\n border-bottom-color: $el-color-dark;\n }\n\n input[type=text] {\n background-color: $font-color-dark;\n color: black;\n }\n }\n}","// filter.panel.tsx\n\nimport {\n h,\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n type VNode,\n Element,\n} from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport {\n FilterCaptions,\n LogicFunction,\n MultiFilterItem,\n ShowData,\n} from './filter.types';\nimport type { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\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 ok: 'Ok',\n save: 'Save',\n // drops the filter\n reset: 'Reset',\n cancel: 'Cancel',\n add: 'Add 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 @State() filterItems: MultiFilterItem = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: Partial<FilterCaptions> | undefined;\n /**\n * Disables dynamic filtering. A way to apply filters on Save only\n */\n @Prop() disableDynamicFiltering = false;\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Event() resetChange: EventEmitter<ColumnProp>;\n\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 (\n e.target instanceof HTMLElement &&\n isOutside &&\n !isFilterBtn(e.target)\n ) {\n this.changes = undefined;\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n this.filterItems = newEntity?.filterItems || {};\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 getFilterItemsList() {\n const prop = this.changes?.prop;\n if (typeof prop === 'undefined') return '';\n\n const propFilters = this.filterItems[prop] ?? [];\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n return (\n <div key={this.filterId}>\n {propFilters.map((filter, index) => {\n let andOrButton;\n if (filter.hidden) {\n return;\n }\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(filter.id)}>\n <AndOrButton\n text={filter.relation === 'and' ? capts.and : capts.or}\n />\n </div>\n );\n }\n\n return (\n <div key={filter.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select\n class=\"select-css select-filter\"\n onChange={e => this.onFilterTypeChange(e, prop, index)}\n >\n {this.renderSelectOptions(\n this.filterItems[prop][index].type,\n true,\n )}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(filter.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.filter(f => !f.hidden).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 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(\n 'filter-input-' + this.filterItems[prop][index].id,\n );\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\n }, 0);\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\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) {\n this.debouncedApplyFilter();\n }\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(\n 'filter-input-' + this.currentFilterId,\n ) 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 = (\n event.target as HTMLInputElement\n ).value;\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\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 this.resetChange.emit(this.changes?.prop);\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\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) {\n this.debouncedApplyFilter();\n }\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) {\n this.debouncedApplyFilter();\n }\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n if (!this.changes) {\n return;\n }\n const options: VNode[] = [];\n const prop = this.changes.prop;\n\n const hidden = new Set<string>();\n Object.entries(this.filterItems).forEach(([_, values]) => {\n values.forEach((filter) => {\n if (filter.hidden) {\n hidden.add(filter.type);\n }\n })\n });\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n options.push(\n <option\n selected={this.currentFilterType === defaultType}\n value={defaultType}\n >\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0\n ? capts.add\n : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.changes.filterTypes) {\n const group = this.changes.filterTypes[gIndex].filter(k => !hidden.has(k));\n if (group.length) {\n options.push(\n ...group.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 }\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')\n return '';\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\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 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(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <Host\n style={style}\n ref={el => {\n this.changes?.autoCorrect && this.autoCorrect(el);\n }}\n >\n <slot slot=\"header\" />\n { this.changes.extraContent?.(this.changes) || '' }\n\n { this.changes?.hideDefaultFilters !== true && (\n [\n <label>{capts.title}</label>,\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>,\n <div class=\"add-filter\">\n <select\n id={FILTER_ID}\n class=\"select-css\"\n onChange={e => this.onAddNewFilter(e)}\n >\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n ]\n )}\n\n <slot />\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering && [\n <button\n id=\"revo-button-save\"\n aria-label=\"save\"\n class=\"revo-button green\"\n onClick={() => this.onSave()}\n >\n {capts.save}\n </button>,\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.cancel}\n </button>,\n ]}\n {!this.disableDynamicFiltering && [\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.ok}\n </button>,\n\n <button\n id=\"revo-button-reset\"\n aria-label=\"reset\"\n class=\"revo-button outline\"\n onClick={() => this.onReset()}\n >\n {capts.reset}\n </button>,\n ]}\n </div>\n <slot slot=\"footer\" />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -16,6 +16,9 @@ const NO_COORDINATE = -1;
|
|
|
16
16
|
* return full size
|
|
17
17
|
*/
|
|
18
18
|
function getContentSize(contentSize, clientSize, virtualSize = 0) {
|
|
19
|
+
if (virtualSize > contentSize) {
|
|
20
|
+
return 0;
|
|
21
|
+
}
|
|
19
22
|
return contentSize + (virtualSize ? clientSize - virtualSize : 0);
|
|
20
23
|
}
|
|
21
24
|
class LocalScrollService {
|
|
@@ -227,4 +230,4 @@ function throttle(func, wait, options) {
|
|
|
227
230
|
|
|
228
231
|
export { LocalScrollTimer as L, LocalScrollService as a, getContentSize as g, throttle as t };
|
|
229
232
|
|
|
230
|
-
//# sourceMappingURL=throttle-
|
|
233
|
+
//# sourceMappingURL=throttle-dec28f5b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"throttle-dec28f5b.js","mappings":";;;;;;AAqBA,MAAM,aAAa,GAAW;IAC5B,WAAW,EAAE,CAAC;IACd,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,OAAO,EAAE,CAAC;CACX,CAAC;AACF,MAAM,aAAa,GAAG,CAAC,CAAC,CAAC;AAEzB;;;;SAIgB,cAAc,CAC5B,WAAmB,EACnB,UAAkB,EAClB,WAAW,GAAG,CAAC;IAEf,IAAI,WAAW,GAAG,WAAW,EAAE;QAC7B,OAAO,CAAC,CAAC;KACV;IACD,OAAO,WAAW,IAAI,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC;MAEoB,kBAAkB;IAerC,YAAoB,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;QAdvB,4BAAuB,GAA+C;YAC5E,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;SACZ,CAAC;;QAEM,mBAAc,GAAkC;YACtD,KAAK,EAAE,aAAa;YACpB,KAAK,EA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names":[],"sources":["src/services/local.scroll.service.ts","src/services/local.scroll.timer.ts","node_modules/lodash/throttle.js"],"sourcesContent":["import type { DimensionType, ViewPortScrollEvent } from '@type';\nimport { scaleValue } from '../utils';\n\ninterface Config {\n skipAnimationFrame?: boolean;\n // scroll event inited and direction cached\n // scrollingService.proxyScroll get tiggered\n // setScroll event called from scrollingService\n runScroll(e: ViewPortScrollEvent): void;\n // all operation finished, apply scroll values\n applyScroll(e: ViewPortScrollEvent): void;\n}\n\ntype Params = {\n contentSize: number;\n virtualContentSize?: number;\n clientSize: number;\n virtualSize: number;\n maxSize?: number;\n};\n\nconst initialParams: Params = {\n contentSize: 0,\n clientSize: 0,\n virtualSize: 0,\n maxSize: 0,\n};\nconst NO_COORDINATE = -1;\n\n/**\n * Based on content size, client size and virtual size\n * return full size\n */\nexport function getContentSize(\n contentSize: number,\n clientSize: number,\n virtualSize = 0,\n): number {\n if (virtualSize > contentSize) {\n return 0;\n }\n return contentSize + (virtualSize ? clientSize - virtualSize : 0);\n}\n\nexport default class LocalScrollService {\n private preventArtificialScroll: Record<DimensionType, (() => void) | null> = {\n rgRow: null,\n rgCol: null,\n };\n // to check if scroll changed\n private previousScroll: Record<DimensionType, number> = {\n rgRow: NO_COORDINATE,\n rgCol: NO_COORDINATE,\n };\n private params: Record<DimensionType, Params> = {\n rgRow: { ...initialParams },\n rgCol: { ...initialParams },\n };\n\n constructor(private cfg: Config) {}\n\n setParams(params: Params, dimension: DimensionType) {\n const virtualContentSize = getContentSize(\n params.contentSize,\n params.clientSize,\n params.virtualSize,\n );\n this.params[dimension] = {\n ...params,\n maxSize: virtualContentSize - params.clientSize,\n virtualContentSize,\n };\n }\n\n // apply scroll values after scroll done\n async setScroll(e: ViewPortScrollEvent) {\n this.cancelScroll(e.dimension);\n\n // start frame animation\n const frameAnimation = new Promise<void>((resolve, reject) => {\n // for example safari desktop has issues with animation frame\n if (this.cfg.skipAnimationFrame) {\n return resolve();\n }\n const animationId = window.requestAnimationFrame(() => {\n resolve();\n });\n this.preventArtificialScroll[e.dimension] = reject.bind(\n null,\n animationId,\n );\n });\n\n try {\n await frameAnimation;\n const params = this.getParams(e.dimension);\n e.coordinate = Math.ceil(e.coordinate);\n this.previousScroll[e.dimension] = this.wrapCoordinate(\n e.coordinate,\n params,\n );\n this.preventArtificialScroll[e.dimension] = null;\n this.cfg.applyScroll({\n ...e,\n coordinate: params.virtualSize\n ? this.convert(e.coordinate, params, false)\n : e.coordinate,\n });\n } catch (id) {\n window.cancelAnimationFrame(id);\n }\n }\n\n /**\n * On scroll event started\n */\n scroll(\n coordinate: number,\n dimension: DimensionType,\n force = false,\n delta?: number,\n outside = false,\n ) {\n // cancel all previous scrolls for same dimension\n this.cancelScroll(dimension);\n\n // drop if no change\n if (!force && this.previousScroll[dimension] === coordinate) {\n this.previousScroll[dimension] = NO_COORDINATE;\n return;\n }\n\n const param = this.getParams(dimension);\n // let component know about scroll event started\n this.cfg.runScroll({\n dimension: dimension,\n coordinate: param.virtualSize\n ? this.convert(coordinate, param)\n : coordinate,\n delta,\n outside,\n });\n }\n\n private getParams(dimension: DimensionType): Params {\n return this.params[dimension];\n }\n\n // check if scroll outside of region to avoid looping\n private wrapCoordinate(c: number, param: Params): number {\n if (c < 0) {\n return NO_COORDINATE;\n }\n\n if (typeof param.maxSize === 'number' && c > param.maxSize) {\n return param.maxSize;\n }\n return c;\n }\n\n // prevent already started scroll, performance optimization\n private cancelScroll(dimension: DimensionType) {\n this.preventArtificialScroll[dimension]?.();\n this.preventArtificialScroll[dimension] = null;\n }\n\n /* convert virtual to real and back, scale range */\n private convert(pos: number, param: Params, toReal = true): number {\n const minRange = param.clientSize;\n const from: [number, number] = [0, (param.virtualContentSize ?? minRange) - minRange];\n const to: [number, number] = [0, param.contentSize - param.virtualSize];\n if (toReal) {\n return scaleValue(pos, from, to);\n }\n return scaleValue(pos, to, from);\n }\n}\n","import type { DimensionType } from '@type';\n/**\n * Apply changes only if mousewheel event happened some time ago (scrollThrottling)\n */\nexport class LocalScrollTimer {\n /**\n * Last mw event time for trigger scroll function below\n * If mousewheel function was ignored we still need to trigger render\n */\n private mouseWheelScrollTimestamp: Record<DimensionType, number> = {\n rgCol: 0,\n rgRow: 0,\n };\n private lastKnownScrollCoordinate: Record<DimensionType, number> = {\n rgCol: 0,\n rgRow: 0,\n };\n\n constructor(private scrollThrottling = 10) {}\n\n setCoordinate(e: { dimension: DimensionType; coordinate: number }) {\n this.lastKnownScrollCoordinate[e.dimension] = e.coordinate;\n }\n\n /**\n * Remember last mw event time\n */\n latestScrollUpdate(dimension: DimensionType) {\n this.mouseWheelScrollTimestamp[dimension] = new Date().getTime();\n }\n\n /**\n * Check if scroll is ready to accept new value\n */\n isReady(type: DimensionType, coordinate: number) {\n const change = new Date().getTime() - this.mouseWheelScrollTimestamp[type];\n // apply after throttling\n return (\n change > this.scrollThrottling &&\n coordinate !== this.lastKnownScrollCoordinate[type]\n );\n }\n}\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,H as i,c as o,a as s}from"./index-f6fae858.js";import{b as r,j as n,k as l,J as a,U as h,u as c,R as d,L as u,K as g,S as p,D as f,A as v,o as b,T as L}from"./dimension.helpers-5567e424.js";import{g as C,v as x}from"./events-cf0893a3.js";import{g as w,M as m,x as y,N as k,a as E}from"./column.service-f39c0a1d.js";import{i as j}from"./edit.utils-b59306be.js";import{c as S,d as O,f as z,h as R,g as F,j as D,k as T}from"./key.utils-3632161b.js";import{d as M}from"./debounce-b3166f78.js";import{V as A,f as U}from"./viewport.store-c18a25a6.js";import{H as $}from"./viewport.helpers-7e7f9dad.js";import{L as _,a as B,g as P,t as Z}from"./throttle-05489451.js";const H=class{constructor(e){t(this,e)}render(){return e(i,{key:"3d66475a019010c24b6c610ccc047e01c35178f9"},e("a",{key:"777afddffef0309a697b9c14ee73c0001ac22b71",href:"https://rv-grid.com/guide/attribution",target:"_blank",rel:"noopener noreferrer",title:"Made with ❤️ by Revolist OU Team",class:"value"},"RevoGrid"))}};const W=class{constructor(e){t(this,e);this.nodes=[];this.update=1}async refresh(){this.update*=-1}render(){var t;return(t=this.nodes)===null||t===void 0?void 0:t.map((t=>{if(typeof t==="function"){const i={};const o=()=>[t({refresh:()=>{var t;return(t=i.refresh)===null||t===void 0?void 0:t.call(i)}})];return e("revogr-extra",{nodes:o(),ref:t=>{if(t){i.refresh=()=>{t.nodes=o()}}}})}return t}))}};function I(t,e){const i={};for(let o in t){const t=parseInt(o,10);i[t]=r(e,t)}return i}function K(t,e){if(t.defaultPrevented){return null}const i=C(t,"clientX");const o=C(t,"clientY");if(i===null||o===null){return null}const s=X({x:i,y:o},e);if(Y(s,e.lastCell)){return null}return s}function X({x:t,y:e},{el:i,rows:o,cols:s}){const{top:r,left:l,height:a,width:h}=i.getBoundingClientRect();let c=e-r;let d=t-l;if(c>=a){c=a-1}if(d>=h){d=h-1}const u=n(o,c);const g=n(s,d);if(g.itemIndex<0){g.itemIndex=0}if(u.itemIndex<0){u.itemIndex=0}return{x:g.itemIndex,y:u.itemIndex}}function N(t,e,i,o=false){const s=(i,s=0)=>{const r={x:t.x,y:t.y};const n=o?{x:t.x1,y:t.y1}:r;const l=n[i]>e[i]?n:r;l[i]+=s;return{start:r,end:n}};if(i.x){return s("x",i["x"])}if(i.y){return s("y",i["y"])}return null}function Y({x:t,y:e},i){return t>=i.x||e>=i.y}function G({x:t,y:e}){return t<0||e<0}function J(t){return{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`}}function V({x:t,y:e,x1:i,y1:o},s,r){const n=l(s,e).start;const a=l(r,t).start;const h=l(s,o).end;const c=l(r,i).end;return{left:a,right:c,top:n,bottom:h,width:c-a,height:h-n}}const q=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";const Q=q;const tt=class{constructor(e){t(this,e);this.beforeFocusRender=o(this,"beforefocusrender",7);this.beforeScrollIntoView=o(this,"beforescrollintoview",7);this.afterFocus=o(this,"afterfocus",7);this.activeFocus=null;this.colType=undefined;this.rowType=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.focusTemplate=null}componentDidRender(){var t,e;const i=this.selectionStore.get("focus");if(((t=this.activeFocus)===null||t===void 0?void 0:t.x)===(i===null||i===void 0?void 0:i.x)&&((e=this.activeFocus)===null||e===void 0?void 0:e.y)===(i===null||i===void 0?void 0:i.y)){return}this.activeFocus=i;if(i&&this.el){const t=this.beforeScrollIntoView.emit({el:this.el});if(!t.defaultPrevented){this.el.scrollIntoView({block:"nearest",inline:"nearest"})}const e=r(this.dataStore,i.y);const o=r(this.colData,i.x);this.afterFocus.emit({model:e,column:o,rowType:this.rowType,colType:this.colType,rowIndex:i.y,colIndex:i.x})}}render(){var t;const o=this.selectionStore.get("edit");if(o){return}const s=this.selectionStore.get("focus");if(!s){return}const r=this.beforeFocusRender.emit({range:Object.assign(Object.assign({},s),{x1:s.x,y1:s.y}),rowType:this.rowType,colType:this.colType,rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});if(r.defaultPrevented){return e("slot",null)}const{detail:n}=r;const l=V(n.range,r.detail.rowDimension,r.detail.colDimension);const h=J(l);const c=(t=this.focusTemplate)===null||t===void 0?void 0:t.call(this,e,n);const d={class:{[a]:true},style:h};return e(i,Object.assign({},d),e("slot",null),c)}get el(){return s(this)}};tt.style=Q;const et=[h.TAB,h.ARROW_UP,h.ARROW_DOWN,h.ARROW_LEFT,h.ARROW_RIGHT];class it{constructor(t){this.sv=t}async keyDown(t,e,i,{range:o,focus:s}){if(i){switch(t.code){case h.ESCAPE:this.sv.cancel();break;case h.TAB:this.keyChangeSelection(t,e);break}return}if(o&&S(t.code)){this.sv.clearCell();return}if(!s){return}if(O(t.code)){this.keyChangeSelection(t,e);return}if(z(t.key)){this.sv.change();return}if(R(t)){return}if(F(t)){return}if(D(t)){this.sv.internalPaste();return}if(T(t)){if(e){this.selectAll(t)}return}if(t.key.length===1){this.sv.change(t.key);return}if(await this.keyChangeSelection(t,e)){return}}selectAll(t){const e=this.sv.selectionStore.get("range");const i=this.sv.selectionStore.get("focus");if(!e||!i){return}t.preventDefault();this.sv.selectAll()}async keyChangeSelection(t,e){const i=this.changeDirectionKey(t,e);if(!i){return false}await c(d+30);const o=this.sv.selectionStore.get("range");const s=this.sv.selectionStore.get("focus");return this.keyPositionChange(i.changes,o,s,i.isMulti)}keyPositionChange(t,e,i,o=false){if(!e||!i){return false}const s=N(e,i,t,o);if(!s){return false}const r=this.sv.getData();if(o){if(Y(s.end,r.lastCell)||G(s.start)){return false}const t=w(s.start,s.end);return this.sv.range(t)}return this.sv.focus(s.start,t,Y(s.start,r.lastCell)?1:G(s.start)?-1:0)}changeDirectionKey(t,e){const i=e&&t.shiftKey;if(et.includes(t.code)){t.preventDefault()}if(t.shiftKey){switch(t.code){case h.TAB:return{changes:{x:-1},isMulti:false}}}switch(t.code){case h.ARROW_UP:return{changes:{y:-1},isMulti:i};case h.ARROW_DOWN:return{changes:{y:1},isMulti:i};case h.ARROW_LEFT:return{changes:{x:-1},isMulti:i};case h.TAB:case h.ARROW_RIGHT:return{changes:{x:1},isMulti:i}}}}class ot{constructor(t){this.sv=t;this.autoFillType=null;this.autoFillInitial=null;this.autoFillStart=null;this.autoFillLast=null}renderAutofill(t,i){let o;if(t){o=V(t,this.sv.dimensionRow.state,this.sv.dimensionCol.state)}else{o=V(Object.assign(Object.assign({},i),{x1:i.x,y1:i.y}),this.sv.dimensionRow.state,this.sv.dimensionCol.state)}return e("div",{class:{[u]:true,[g]:true},style:{left:`${o.right}px`,top:`${o.bottom}px`},onMouseDown:t=>this.autoFillHandler(t),onTouchStart:t=>this.autoFillHandler(t)})}autoFillHandler(t,e="AutoFill"){let i=null;if(t.target instanceof Element){i=t.target}if(!i){return}this.selectionStart(i,this.sv.getData(),e);t.preventDefault()}get isAutoFill(){return!!this.autoFillType}selectionMouseMove(t){if(!this.onMouseMoveAutofill){this.onMouseMoveAutofill=M(((t,e)=>this.doAutofillMouseMove(t,e)),5)}if(this.isAutoFill){this.onMouseMoveAutofill(t,this.sv.getData())}}getFocus(t,e){if(!t&&e){t={x:e.x,y:e.y}}return t||null}doAutofillMouseMove(t,e){if(!this.autoFillInitial){return}const i=C(t,"clientX",g);const o=C(t,"clientY",g);if(i===null||o===null){return}const s=X({x:i,y:o},e);if(!this.autoFillLast){if(!this.autoFillLast){this.autoFillLast=this.autoFillStart}}if(Y(s,e.lastCell)){return}this.autoFillLast=s;const r=s.x===this.autoFillInitial.x&&s.y===this.autoFillInitial.y;if(r){this.sv.setTempRange(null)}else{const t=w(this.autoFillInitial,this.autoFillLast);this.sv.setTempRange({area:t,type:this.autoFillType})}}selectionStart(t,e,i="Selection"){const{top:o,left:s}=t.getBoundingClientRect();this.autoFillInitial=this.getFocus(e.focus,e.range);this.autoFillType=i;this.autoFillStart=X({x:s,y:o},e)}clearAutoFillSelection(t,e){if(this.autoFillInitial){this.autoFillInitial=this.getFocus(t,e);if(this.autoFillType==="AutoFill"){const t=w(this.autoFillInitial,this.autoFillLast);if(t){const{defaultPrevented:i,detail:{range:o}}=this.sv.clearRangeDataApply({range:t});if(!i&&e){this.applyRangeWithData(o,e)}else{this.sv.setTempRange(null)}}}else{this.applyRangeOnly(this.autoFillInitial,this.autoFillLast)}}this.resetAutoFillState()}resetAutoFillState(){this.autoFillType=null;this.autoFillInitial=null;this.autoFillLast=null;this.autoFillStart=null}onRangeApply(t,e,i){this.sv.rangeDataApply({data:t,models:I(t,this.sv.dataStore),type:this.sv.dataStore.get("type"),oldRange:i,newRange:e});this.sv.setRange(e)}applyRangeWithData(t,e){const i={type:this.sv.dataStore.get("type"),colType:this.sv.columnService.type,newData:{},mapping:{},newRange:t,oldRange:e};const{mapping:o,changed:s}=this.sv.columnService.getRangeData(i,this.sv.columnService.columns);i.newData=s;i.mapping=o;let r=this.sv.selectionChanged(i);if(r.defaultPrevented){this.sv.setTempRange(null);return}r=this.sv.rangeCopy(i);if(r.defaultPrevented){this.sv.setRange(t);return}this.onRangeApply(i.newData,t,e)}applyRangeOnly(t,e){if(!t||!e){return}const i=w(t,e);this.sv.setRange(i)}}const st=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:\"\";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:\"\";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}";const rt=st;const nt=class{constructor(e){t(this,e);this.beforeCopyRegion=o(this,"beforecopyregion",7);this.beforeRegionPaste=o(this,"beforepasteregion",7);this.cellEditApply=o(this,"celleditapply",7);this.beforeFocusCell=o(this,"beforecellfocusinit",7);this.beforeNextViewportFocus=o(this,"beforenextvpfocus",7);this.setEdit=o(this,"setedit",7);this.beforeApplyRange=o(this,"beforeapplyrange",7);this.beforeSetRange=o(this,"beforesetrange",7);this.setRange=o(this,"setrange",7);this.beforeEditRender=o(this,"beforeeditrender",7);this.selectAll=o(this,"selectall",7);this.cancelEdit=o(this,"canceledit",7);this.setTempRange=o(this,"settemprange",7);this.beforeSetTempRange=o(this,"beforesettemprange",7);this.applyFocus=o(this,"applyfocus",7);this.focusCell=o(this,"focuscell",7);this.beforeRangeDataApply=o(this,"beforerangedataapply",7);this.selectionChange=o(this,"selectionchangeinit",7);this.beforeRangeCopyApply=o(this,"beforerangecopyapply",7);this.rangeEditApply=o(this,"rangeeditapply",7);this.rangeClipboardCopy=o(this,"clipboardrangecopy",7);this.rangeClipboardPaste=o(this,"clipboardrangepaste",7);this.beforeKeyDown=o(this,"beforekeydown",7);this.beforeKeyUp=o(this,"beforekeyup",7);this.beforeCellSave=o(this,"beforecellsave",7);this.keyboardService=null;this.autoFillService=null;this.unsubscribeSelectionStore=[];this.readonly=undefined;this.range=undefined;this.canDrag=undefined;this.useClipboard=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.lastCell=undefined;this.editors=undefined;this.applyChangesOnClose=false;this.additionalData=undefined;this.isMobileDevice=undefined}onMouseMove(t){var e;if(this.selectionStore.get("focus")){(e=this.autoFillService)===null||e===void 0?void 0:e.selectionMouseMove(t)}}onMouseUp(){var t;(t=this.autoFillService)===null||t===void 0?void 0:t.clearAutoFillSelection(this.selectionStore.get("focus"),this.selectionStore.get("range"))}onCellDrag(t){var e;(e=this.orderEditor)===null||e===void 0?void 0:e.dragStart(t.detail)}onKeyUp(t){this.beforeKeyUp.emit(Object.assign({original:t},this.getData()))}onKeyDown(t){var e;const i=this.beforeKeyDown.emit(Object.assign({original:t},this.getData()));if(t.defaultPrevented||i.defaultPrevented){return}(e=this.keyboardService)===null||e===void 0?void 0:e.keyDown(t,this.range,!!this.selectionStore.get("edit"),{focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range")})}selectionServiceSet(t){this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;this.unsubscribeSelectionStore.push(t.onChange("nextFocus",(t=>t&&this.doFocus(t,t))));this.keyboardService=new it({selectionStore:t,range:t=>!!t&&this.triggerRangeEvent(t),focus:(t,e,i)=>{if(i){this.beforeNextViewportFocus.emit(t);return false}else{return this.doFocus(t,t,e)}},change:t=>{if(this.readonly){return}this.doEdit(t)},cancel:async()=>{var t;await((t=this.revogrEdit)===null||t===void 0?void 0:t.cancelChanges());this.closeEdit()},clearCell:()=>!this.readonly&&this.clearCell(),internalPaste:()=>!this.readonly&&this.beforeRegionPaste.emit(),getData:()=>this.getData(),selectAll:()=>this.selectAll.emit()});this.createAutoFillService()}createAutoFillService(){this.autoFillService=new ot({dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,columnService:this.columnService,dataStore:this.dataStore,clearRangeDataApply:t=>this.beforeRangeDataApply.emit(Object.assign(Object.assign(Object.assign({},t),this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)})),setTempRange:t=>{const e=this.beforeSetTempRange.emit(Object.assign(Object.assign({tempRange:t},this.getData()),this.types));if(e.defaultPrevented){return null}return this.setTempRange.emit(e.detail.tempRange)},selectionChanged:t=>this.selectionChange.emit(t),rangeCopy:t=>this.beforeRangeCopyApply.emit(t),rangeDataApply:t=>this.rangeEditApply.emit(t),setRange:t=>!!t&&this.triggerRangeEvent(t),getData:()=>this.getData()})}columnServiceSet(){var t;(t=this.columnService)===null||t===void 0?void 0:t.destroy();this.columnService=new m(this.dataStore,this.colData);this.createAutoFillService()}connectedCallback(){this.columnServiceSet();this.selectionServiceSet(this.selectionStore)}disconnectedCallback(){var t;this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;(t=this.columnService)===null||t===void 0?void 0:t.destroy()}async componentWillRender(){var t,e;const i=this.selectionStore.get("edit");if(!i){await((e=(t=this.revogrEdit)===null||t===void 0?void 0:t.beforeDisconnect)===null||e===void 0?void 0:e.call(t))}}renderRange(t){const i=V(t,this.dimensionRow.state,this.dimensionCol.state);const o=J(i);return[e("div",{class:p,style:o},this.isMobileDevice&&e("div",{class:"range-handlers"},e("span",{class:g}),e("span",{class:g})))]}renderEditor(){const t=this.selectionStore.get("edit");if(this.readonly||!t){return null}const i=t.val||y(this.columnService.rowDataModel(t.y,t.x).value);const o=Object.assign(Object.assign({},t),this.columnService.getSaveData(t.y,t.x,i));const s=this.beforeEditRender.emit(Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:t.x,y1:t.y})},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(s.defaultPrevented){return null}const r=V(s.detail.range,s.detail.rowDimension,s.detail.colDimension);const n=J(r);return e("revogr-edit",{style:n,ref:t=>this.revogrEdit=t,additionalData:this.additionalData,editCell:o,saveOnClose:this.applyChangesOnClose,column:this.columnService.rowDataModel(t.y,t.x),editor:k(this.columnService.columns[t.x],this.editors)})}render(){var t;const o=[];const s=this.renderEditor();if(s){o.push(s)}else{const i=this.selectionStore.get("range");const s=this.selectionStore.get("focus");if((i||s)&&this.useClipboard){o.push(e("revogr-clipboard",{readonly:this.readonly,onCopyregion:t=>this.onCopy(t.detail),onClearregion:()=>!this.readonly&&this.clearCell(),ref:t=>this.clipboard=t,onPasteregion:t=>this.onPaste(t.detail)}))}if(i){o.push(...this.renderRange(i))}if(s&&!this.readonly&&this.range){o.push((t=this.autoFillService)===null||t===void 0?void 0:t.renderAutofill(i,s))}if(this.canDrag){o.push(e("revogr-order-editor",{ref:t=>this.orderEditor=t,dataStore:this.dataStore,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,parent:this.element,rowType:this.types.rowType,onRowdragstartinit:t=>this.rowDragStart(t)}))}}return e(i,{key:"b4692030b6fb5d9be3423a5f4d1c500675bdc3b6",class:{mobile:this.isMobileDevice},onDblClick:t=>this.onElementDblClick(t),onMouseDown:t=>this.onElementMouseDown(t),onTouchStart:t=>this.onElementMouseDown(t,true),onCloseedit:t=>this.closeEdit(t),onCelledit:t=>{const e=this.beforeCellSave.emit(t.detail);if(!e.defaultPrevented){this.cellEdit(e.detail)}if(!e.detail.preventFocus){this.focusNext()}}},o,e("slot",{key:"74472f7260487459341946ea12a33bcea2e22fd8",name:"data"}))}doFocus(t,e,i){const{defaultPrevented:o}=this.beforeFocusCell.emit(this.columnService.getSaveData(t.y,t.x));if(o){return false}const s=Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:e.x,y1:e.y}),next:i},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});const r=this.applyFocus.emit(s);if(r.defaultPrevented){return false}const{range:n}=r.detail;return!this.focusCell.emit(Object.assign({focus:{x:n.x,y:n.y},end:{x:n.x1,y:n.y1}},r.detail)).defaultPrevented}triggerRangeEvent(t){const e=this.types.rowType;const i=this.beforeApplyRange.emit(Object.assign(Object.assign({range:Object.assign({},t)},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(i.defaultPrevented){return false}const o=this.columnService.getRangeTransformedToProps(i.detail.range,this.dataStore);let s=this.beforeSetRange.emit(o);if(s.defaultPrevented){return false}s=this.setRange.emit(Object.assign(Object.assign({},i.detail.range),{type:e}));if(s.defaultPrevented){return false}return!s.defaultPrevented}onElementDblClick(t){if(t.defaultPrevented){return}const e=this.getData();const i=K(t,e);if(!i){return}this.doEdit()}onElementMouseDown(t,e=false){var i;const o=t.target;if(j(o)||t.defaultPrevented){return}const s=this.getData();const r=K(t,s);if(!r){return}this.focus(r,this.range&&t.shiftKey);if(this.range){o&&((i=this.autoFillService)===null||i===void 0?void 0:i.selectionStart(o,this.getData()));if(!e){t.preventDefault()}else if(x(t.touches[0],g)){t.preventDefault()}}}doEdit(t=""){var e;if(this.canEdit()){const i=this.selectionStore.get("focus");if(!i){return}const o=this.columnService.getSaveData(i.y,i.x);(e=this.setEdit)===null||e===void 0?void 0:e.emit(Object.assign(Object.assign({},o),{val:t}))}}async closeEdit(t){this.cancelEdit.emit();if(t===null||t===void 0?void 0:t.detail){await this.focusNext()}}cellEdit(t){const e=this.columnService.getSaveData(t.rgRow,t.rgCol,t.val);this.cellEditApply.emit(e)}getRegion(){const t=this.selectionStore.get("focus");let e=this.selectionStore.get("range");if(!e){e=w(t,t)}return e}onCopy(t){var e;const i=this.getRegion();const o=this.beforeCopyRegion.emit(i);if(o.defaultPrevented){return false}let s;if(i){const{data:t,mapping:e}=this.columnService.copyRangeArray(i,this.dataStore);const o=this.rangeClipboardCopy.emit(Object.assign({range:i,data:t,mapping:e},this.types));if(!o.defaultPrevented){s=o.detail.data}}(e=this.clipboard)===null||e===void 0?void 0:e.doCopy(t,s);return true}onPaste(t){var e;const i=this.selectionStore.get("focus");const o=this.selectionStore.get("edit")!==null;if(!i||o){return}let{changed:s,range:r}=this.columnService.getTransformedDataToApply(i,t);const{defaultPrevented:n}=this.rangeClipboardPaste.emit(Object.assign({data:s,models:I(s,this.dataStore),range:r},this.types));if(n){return}(e=this.autoFillService)===null||e===void 0?void 0:e.onRangeApply(s,r,r)}async focusNext(){var t;const e=await((t=this.keyboardService)===null||t===void 0?void 0:t.keyChangeSelection(new KeyboardEvent("keydown",{code:h.ARROW_DOWN}),this.range));if(!e){this.closeEdit()}}clearCell(){var t;const e=this.selectionStore.get("range");if(e&&!E(e)){const i=this.columnService.getRangeStaticData(e,"");(t=this.autoFillService)===null||t===void 0?void 0:t.onRangeApply(i,e,e)}else if(this.canEdit()){const t=this.selectionStore.get("focus");if(!t){return}const e=this.columnService.getSaveData(t.y,t.x);this.cellEdit({rgRow:t.y,rgCol:t.x,val:"",type:e.type,prop:e.prop})}}rowDragStart({detail:t}){t.text=y(this.columnService.rowDataModel(t.cell.y,t.cell.x).value)}canEdit(){var t;if(this.readonly){return false}const e=this.selectionStore.get("focus");return e&&!((t=this.columnService)===null||t===void 0?void 0:t.isReadOnly(e.y,e.x))}get edited(){return this.selectionStore.get("edit")}focus(t,e=false){if(!t)return false;const i=t;const o=this.selectionStore.get("focus");if(e&&o){const t=w(o,i);if(t){return this.triggerRangeEvent(t)}}return this.doFocus(t,i)}get types(){return{rowType:this.dataStore.get("type"),colType:this.columnService.type}}getData(){return{el:this.element,rows:this.dimensionRow.state,cols:this.dimensionCol.state,lastCell:this.lastCell,focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range"),edit:this.selectionStore.get("edit")}}get element(){return s(this)}static get watchers(){return{selectionStore:["selectionServiceSet"],dimensionRow:["createAutoFillService"],dimensionCol:["createAutoFillService"],dataStore:["columnServiceSet"],colData:["columnServiceSet"]}}};nt.style=rt;const lt=t=>(e,{rowIndex:i})=>t+i;const at=class{constructor(e){t(this,e);this.scrollViewport=o(this,"scrollview",3);this.elementToScroll=o(this,"ref",3);this.height=undefined;this.dataPorts=undefined;this.headerProp=undefined;this.rowClass=undefined;this.resize=undefined;this.rowHeaderColumn=undefined;this.additionalData=undefined;this.jobsBeforeRender=[]}render(){const t=[];const o=new A("colPinStart");let s=1;for(let i of this.dataPorts){const r=i.dataStore.get("items").length;const n=new f(i.type,Object.assign({},i.dataStore.state));const l=new f("colPinStart");const a=Object.assign({cellTemplate:lt(s)},this.rowHeaderColumn);l.updateData([a]);t.push(e("revogr-data",Object.assign({},i,{colType:"rowHeaders",jobsBeforeRender:this.jobsBeforeRender,rowClass:this.rowClass,dataStore:n.store,colData:l.store,viewportCol:o.store,readonly:true,range:false})));s+=r}const r=U(s,this.rowHeaderColumn);o.setViewport({realCount:1,virtualSize:0,items:[{size:r,start:0,end:r,itemIndex:0}]});const n={contentHeight:this.height,contentWidth:0,style:{minWidth:`${r}px`},colType:"rowHeaders",ref:t=>this.elementToScroll.emit(t),onScrollviewport:t=>this.scrollViewport.emit(t.detail)};const l=Object.assign(Object.assign({},this.headerProp),{colData:typeof this.rowHeaderColumn==="object"?[this.rowHeaderColumn]:[],viewportCol:o.store,canResize:false,type:v,slot:$});return e(i,{class:{[v]:true},key:v},e("revogr-viewport-scroll",Object.assign({key:"addb87ab3406b5691cecf810119582bda3a4b4a2"},n,{"row-header":true}),e("revogr-header",Object.assign({key:"8621e76b132e7d1507794b515b40f525577413e2"},l)),t))}};class ht{constructor(t){this.element=t;this.autohideScrollTimeout=0}setScrollSize(t){if(!t){this.element.setAttribute("autohide","true")}else{this.element.removeAttribute("autohide")}}checkScroll({scrollSize:t,contentSize:e,virtualSize:i}){const o=e>i;const s=!t&&o;if(s){this.element.setAttribute("visible","true");this.autohideScrollTimeout=this.show(this.element,this.autohideScrollTimeout)}}show(t,e){clearTimeout(e);return Number(setTimeout((()=>{t===null||t===void 0?void 0:t.removeAttribute("visible")}),1e3))}clear(){clearTimeout(this.autohideScrollTimeout)}}const ct=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-scroll-virtual[autohide]{position:absolute;z-index:100 !important}revogr-scroll-virtual[autohide].vertical{top:0;right:0}revogr-scroll-virtual[autohide].vertical[visible]{min-width:20px !important}revogr-scroll-virtual[autohide].horizontal{bottom:0;left:0}revogr-scroll-virtual[autohide].horizontal[visible]{min-height:20px !important}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}";const dt=ct;const ut=class{constructor(e){t(this,e);this.scrollVirtual=o(this,"scrollvirtual",7);this.scrollSize=0;this.dimension="rgRow";this.viewportStore=undefined;this.dimensionStore=undefined}async setScroll(t){var e;if(this.dimension!==t.dimension){return}this.localScrollTimer.latestScrollUpdate(t.dimension);(e=this.localScrollService)===null||e===void 0?void 0:e.setScroll(t);if(t.coordinate){this.autohideScrollPlugin.checkScroll({scrollSize:this.scrollSize,contentSize:this.dimensionStore.get("realSize"),virtualSize:this.viewportStore.get("virtualSize")})}}async changeScroll(t){if(t.delta){switch(t.dimension){case"rgCol":t.coordinate=this.element.scrollLeft+t.delta;break;case"rgRow":t.coordinate=this.element.scrollTop+t.delta;break}this.setScroll(t)}return t}set size(t){this.autohideScrollPlugin.setScrollSize(t);if(this.dimension==="rgRow"){this.element.style.minWidth=`${t}px`;return}this.element.style.minHeight=`${t}px`}get size(){if(this.dimension==="rgRow"){return this.element.clientHeight}return this.element.clientWidth}connectedCallback(){this.autohideScrollPlugin=new ht(this.element);this.localScrollTimer=new _("ontouchstart"in document.documentElement?0:10);this.localScrollService=new B({runScroll:t=>this.scrollVirtual.emit(t),applyScroll:t=>{this.localScrollTimer.setCoordinate(t);const e=t.dimension==="rgRow"?"scrollTop":"scrollLeft";this.element[e]=t.coordinate}})}disconnectedCallback(){this.autohideScrollPlugin.clear()}componentWillLoad(){this.scrollSize=b(document)}componentDidRender(){const t=this.dimension==="rgRow"?"scrollHeight":"scrollWidth";if(this.element[t]>this.size){this.size=this.scrollSize}else{this.size=0}this.localScrollService.setParams({contentSize:this.dimensionStore.get("realSize"),clientSize:this.size,virtualSize:this.viewportStore.get("clientSize")},this.dimension)}onScroll(t){var e;if(!(t.target instanceof Element)){return}const i=t.target;let o="scrollLeft";if(this.dimension==="rgRow"){o="scrollTop"}if(this.localScrollTimer.isReady(this.dimension,i[o]||0)){(e=this.localScrollService)===null||e===void 0?void 0:e.scroll(i[o]||0,this.dimension)}}render(){const t=this.dimension==="rgRow"?"height":"width";const o=P(this.dimensionStore.get("realSize"),this.size,this.viewportStore.get("clientSize"));return e(i,{key:"2d11902403db45b805bde88b6fc40acff4b6b910",onScroll:t=>this.onScroll(t)},e("div",{key:"74978e90cbf66e3fb6dcc25bd5882346f1515c39",style:{[t]:`${o}px`}}))}get element(){return s(this)}};ut.style=dt;const gt=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}.temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid rgb(255, 94, 0);box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}";const pt=gt;const ft=class{constructor(e){t(this,e);this.onChange=Z((t=>this.doChange(t)),300);this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined}doChange(t){t===null||t===void 0?void 0:t.scrollIntoView({block:"nearest",inline:"nearest"})}componentDidRender(){if(this.el){this.onChange(this.el)}}render(){const t=this.selectionStore.get("tempRange");const o=this.selectionStore.get("tempRangeType");if(!t){return}let s="bottom";let r="right";const n=this.getRange();if(!n){return}if(t.y<n.y){s="top"}if(t.x<n.x){r="left"}const l=`${r} ${s}`;const a=V(t,this.dimensionRow.state,this.dimensionCol.state);const h=J(a);const c={class:{[L]:true,[o||""]:true},style:h,hidden:false};return e(i,Object.assign({},c),e("div",{class:l,ref:t=>this.el=t}))}getRange(){const t=this.selectionStore.get("range");if(t){return t}const e=this.selectionStore.get("focus");if(!e){return null}return Object.assign(Object.assign({},e),{x1:e.x,y1:e.y})}};ft.style=pt;export{H as revogr_attribution,W as revogr_extra,tt as revogr_focus,nt as revogr_overlay_selection,at as revogr_row_headers,ut as revogr_scroll_virtual,ft as revogr_temp_range};
|
|
4
|
+
import{r as t,h as e,H as i,c as s,a as o}from"./index-f6fae858.js";import{b as r,j as n,k as l,J as a,U as h,u as c,R as d,L as u,K as g,S as p,D as f,A as v,o as b,T as L}from"./dimension.helpers-5567e424.js";import{g as C,v as x}from"./events-cf0893a3.js";import{g as w,M as m,x as y,N as k,a as E}from"./column.service-f39c0a1d.js";import{i as j}from"./edit.utils-b59306be.js";import{c as S,d as O,f as z,h as R,g as F,j as D,k as T}from"./key.utils-3632161b.js";import{d as M}from"./debounce-b3166f78.js";import{V as A,f as U}from"./viewport.store-c18a25a6.js";import{H as $}from"./viewport.helpers-7e7f9dad.js";import{L as _,a as B,g as P,t as Z}from"./throttle-dec28f5b.js";const H=class{constructor(e){t(this,e)}render(){return e(i,{key:"3d66475a019010c24b6c610ccc047e01c35178f9"},e("a",{key:"777afddffef0309a697b9c14ee73c0001ac22b71",href:"https://rv-grid.com/guide/attribution",target:"_blank",rel:"noopener noreferrer",title:"Made with ❤️ by Revolist OU Team",class:"value"},"RevoGrid"))}};const W=class{constructor(e){t(this,e);this.nodes=[];this.update=1}async refresh(){this.update*=-1}render(){var t;return(t=this.nodes)===null||t===void 0?void 0:t.map((t=>{if(typeof t==="function"){const i={};const s=()=>[t({refresh:()=>{var t;return(t=i.refresh)===null||t===void 0?void 0:t.call(i)}})];return e("revogr-extra",{nodes:s(),ref:t=>{if(t){i.refresh=()=>{t.nodes=s()}}}})}return t}))}};function I(t,e){const i={};for(let s in t){const t=parseInt(s,10);i[t]=r(e,t)}return i}function K(t,e){if(t.defaultPrevented){return null}const i=C(t,"clientX");const s=C(t,"clientY");if(i===null||s===null){return null}const o=X({x:i,y:s},e);if(Y(o,e.lastCell)){return null}return o}function X({x:t,y:e},{el:i,rows:s,cols:o}){const{top:r,left:l,height:a,width:h}=i.getBoundingClientRect();let c=e-r;let d=t-l;if(c>=a){c=a-1}if(d>=h){d=h-1}const u=n(s,c);const g=n(o,d);if(g.itemIndex<0){g.itemIndex=0}if(u.itemIndex<0){u.itemIndex=0}return{x:g.itemIndex,y:u.itemIndex}}function N(t,e,i,s=false){const o=(i,o=0)=>{const r={x:t.x,y:t.y};const n=s?{x:t.x1,y:t.y1}:r;const l=n[i]>e[i]?n:r;l[i]+=o;return{start:r,end:n}};if(i.x){return o("x",i["x"])}if(i.y){return o("y",i["y"])}return null}function Y({x:t,y:e},i){return t>=i.x||e>=i.y}function G({x:t,y:e}){return t<0||e<0}function J(t){return{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`}}function V({x:t,y:e,x1:i,y1:s},o,r){const n=l(o,e).start;const a=l(r,t).start;const h=l(o,s).end;const c=l(r,i).end;return{left:a,right:c,top:n,bottom:h,width:c-a,height:h-n}}const q=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";const Q=q;const tt=class{constructor(e){t(this,e);this.beforeFocusRender=s(this,"beforefocusrender",7);this.beforeScrollIntoView=s(this,"beforescrollintoview",7);this.afterFocus=s(this,"afterfocus",7);this.activeFocus=null;this.colType=undefined;this.rowType=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.focusTemplate=null}componentDidRender(){var t,e;const i=this.selectionStore.get("focus");if(((t=this.activeFocus)===null||t===void 0?void 0:t.x)===(i===null||i===void 0?void 0:i.x)&&((e=this.activeFocus)===null||e===void 0?void 0:e.y)===(i===null||i===void 0?void 0:i.y)){return}this.activeFocus=i;if(i&&this.el){const t=this.beforeScrollIntoView.emit({el:this.el});if(!t.defaultPrevented){this.el.scrollIntoView({block:"nearest",inline:"nearest"})}const e=r(this.dataStore,i.y);const s=r(this.colData,i.x);this.afterFocus.emit({model:e,column:s,rowType:this.rowType,colType:this.colType,rowIndex:i.y,colIndex:i.x})}}render(){var t;const s=this.selectionStore.get("edit");if(s){return}const o=this.selectionStore.get("focus");if(!o){return}const r=this.beforeFocusRender.emit({range:Object.assign(Object.assign({},o),{x1:o.x,y1:o.y}),rowType:this.rowType,colType:this.colType,rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});if(r.defaultPrevented){return e("slot",null)}const{detail:n}=r;const l=V(n.range,r.detail.rowDimension,r.detail.colDimension);const h=J(l);const c=(t=this.focusTemplate)===null||t===void 0?void 0:t.call(this,e,n);const d={class:{[a]:true},style:h};return e(i,Object.assign({},d),e("slot",null),c)}get el(){return o(this)}};tt.style=Q;const et=[h.TAB,h.ARROW_UP,h.ARROW_DOWN,h.ARROW_LEFT,h.ARROW_RIGHT];class it{constructor(t){this.sv=t}async keyDown(t,e,i,{range:s,focus:o}){if(i){switch(t.code){case h.ESCAPE:this.sv.cancel();break;case h.TAB:this.keyChangeSelection(t,e);break}return}if(s&&S(t.code)){this.sv.clearCell();return}if(!o){return}if(O(t.code)){this.keyChangeSelection(t,e);return}if(z(t.key)){this.sv.change();return}if(R(t)){return}if(F(t)){return}if(D(t)){this.sv.internalPaste();return}if(T(t)){if(e){this.selectAll(t)}return}if(t.key.length===1){this.sv.change(t.key);return}if(await this.keyChangeSelection(t,e)){return}}selectAll(t){const e=this.sv.selectionStore.get("range");const i=this.sv.selectionStore.get("focus");if(!e||!i){return}t.preventDefault();this.sv.selectAll()}async keyChangeSelection(t,e){const i=this.changeDirectionKey(t,e);if(!i){return false}await c(d+30);const s=this.sv.selectionStore.get("range");const o=this.sv.selectionStore.get("focus");return this.keyPositionChange(i.changes,s,o,i.isMulti)}keyPositionChange(t,e,i,s=false){if(!e||!i){return false}const o=N(e,i,t,s);if(!o){return false}const r=this.sv.getData();if(s){if(Y(o.end,r.lastCell)||G(o.start)){return false}const t=w(o.start,o.end);return this.sv.range(t)}return this.sv.focus(o.start,t,Y(o.start,r.lastCell)?1:G(o.start)?-1:0)}changeDirectionKey(t,e){const i=e&&t.shiftKey;if(et.includes(t.code)){t.preventDefault()}if(t.shiftKey){switch(t.code){case h.TAB:return{changes:{x:-1},isMulti:false}}}switch(t.code){case h.ARROW_UP:return{changes:{y:-1},isMulti:i};case h.ARROW_DOWN:return{changes:{y:1},isMulti:i};case h.ARROW_LEFT:return{changes:{x:-1},isMulti:i};case h.TAB:case h.ARROW_RIGHT:return{changes:{x:1},isMulti:i}}}}class st{constructor(t){this.sv=t;this.autoFillType=null;this.autoFillInitial=null;this.autoFillStart=null;this.autoFillLast=null}renderAutofill(t,i){let s;if(t){s=V(t,this.sv.dimensionRow.state,this.sv.dimensionCol.state)}else{s=V(Object.assign(Object.assign({},i),{x1:i.x,y1:i.y}),this.sv.dimensionRow.state,this.sv.dimensionCol.state)}return e("div",{class:{[u]:true,[g]:true},style:{left:`${s.right}px`,top:`${s.bottom}px`},onMouseDown:t=>this.autoFillHandler(t),onTouchStart:t=>this.autoFillHandler(t)})}autoFillHandler(t,e="AutoFill"){let i=null;if(t.target instanceof Element){i=t.target}if(!i){return}this.selectionStart(i,this.sv.getData(),e);t.preventDefault()}get isAutoFill(){return!!this.autoFillType}selectionMouseMove(t){if(!this.onMouseMoveAutofill){this.onMouseMoveAutofill=M(((t,e)=>this.doAutofillMouseMove(t,e)),5)}if(this.isAutoFill){this.onMouseMoveAutofill(t,this.sv.getData())}}getFocus(t,e){if(!t&&e){t={x:e.x,y:e.y}}return t||null}doAutofillMouseMove(t,e){if(!this.autoFillInitial){return}const i=C(t,"clientX",g);const s=C(t,"clientY",g);if(i===null||s===null){return}const o=X({x:i,y:s},e);if(!this.autoFillLast){if(!this.autoFillLast){this.autoFillLast=this.autoFillStart}}if(Y(o,e.lastCell)){return}this.autoFillLast=o;const r=o.x===this.autoFillInitial.x&&o.y===this.autoFillInitial.y;if(r){this.sv.setTempRange(null)}else{const t=w(this.autoFillInitial,this.autoFillLast);this.sv.setTempRange({area:t,type:this.autoFillType})}}selectionStart(t,e,i="Selection"){const{top:s,left:o}=t.getBoundingClientRect();this.autoFillInitial=this.getFocus(e.focus,e.range);this.autoFillType=i;this.autoFillStart=X({x:o,y:s},e)}clearAutoFillSelection(t,e){if(this.autoFillInitial){this.autoFillInitial=this.getFocus(t,e);if(this.autoFillType==="AutoFill"){const t=w(this.autoFillInitial,this.autoFillLast);if(t){const{defaultPrevented:i,detail:{range:s}}=this.sv.clearRangeDataApply({range:t});if(!i&&e){this.applyRangeWithData(s,e)}else{this.sv.setTempRange(null)}}}else{this.applyRangeOnly(this.autoFillInitial,this.autoFillLast)}}this.resetAutoFillState()}resetAutoFillState(){this.autoFillType=null;this.autoFillInitial=null;this.autoFillLast=null;this.autoFillStart=null}onRangeApply(t,e,i){this.sv.rangeDataApply({data:t,models:I(t,this.sv.dataStore),type:this.sv.dataStore.get("type"),oldRange:i,newRange:e});this.sv.setRange(e)}applyRangeWithData(t,e){const i={type:this.sv.dataStore.get("type"),colType:this.sv.columnService.type,newData:{},mapping:{},newRange:t,oldRange:e};const{mapping:s,changed:o}=this.sv.columnService.getRangeData(i,this.sv.columnService.columns);i.newData=o;i.mapping=s;let r=this.sv.selectionChanged(i);if(r.defaultPrevented){this.sv.setTempRange(null);return}r=this.sv.rangeCopy(i);if(r.defaultPrevented){this.sv.setRange(t);return}this.onRangeApply(i.newData,t,e)}applyRangeOnly(t,e){if(!t||!e){return}const i=w(t,e);this.sv.setRange(i)}}const ot=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:\"\";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:\"\";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}";const rt=ot;const nt=class{constructor(e){t(this,e);this.beforeCopyRegion=s(this,"beforecopyregion",7);this.beforeRegionPaste=s(this,"beforepasteregion",7);this.cellEditApply=s(this,"celleditapply",7);this.beforeFocusCell=s(this,"beforecellfocusinit",7);this.beforeNextViewportFocus=s(this,"beforenextvpfocus",7);this.setEdit=s(this,"setedit",7);this.beforeApplyRange=s(this,"beforeapplyrange",7);this.beforeSetRange=s(this,"beforesetrange",7);this.setRange=s(this,"setrange",7);this.beforeEditRender=s(this,"beforeeditrender",7);this.selectAll=s(this,"selectall",7);this.cancelEdit=s(this,"canceledit",7);this.setTempRange=s(this,"settemprange",7);this.beforeSetTempRange=s(this,"beforesettemprange",7);this.applyFocus=s(this,"applyfocus",7);this.focusCell=s(this,"focuscell",7);this.beforeRangeDataApply=s(this,"beforerangedataapply",7);this.selectionChange=s(this,"selectionchangeinit",7);this.beforeRangeCopyApply=s(this,"beforerangecopyapply",7);this.rangeEditApply=s(this,"rangeeditapply",7);this.rangeClipboardCopy=s(this,"clipboardrangecopy",7);this.rangeClipboardPaste=s(this,"clipboardrangepaste",7);this.beforeKeyDown=s(this,"beforekeydown",7);this.beforeKeyUp=s(this,"beforekeyup",7);this.beforeCellSave=s(this,"beforecellsave",7);this.keyboardService=null;this.autoFillService=null;this.unsubscribeSelectionStore=[];this.readonly=undefined;this.range=undefined;this.canDrag=undefined;this.useClipboard=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.lastCell=undefined;this.editors=undefined;this.applyChangesOnClose=false;this.additionalData=undefined;this.isMobileDevice=undefined}onMouseMove(t){var e;if(this.selectionStore.get("focus")){(e=this.autoFillService)===null||e===void 0?void 0:e.selectionMouseMove(t)}}onMouseUp(){var t;(t=this.autoFillService)===null||t===void 0?void 0:t.clearAutoFillSelection(this.selectionStore.get("focus"),this.selectionStore.get("range"))}onCellDrag(t){var e;(e=this.orderEditor)===null||e===void 0?void 0:e.dragStart(t.detail)}onKeyUp(t){this.beforeKeyUp.emit(Object.assign({original:t},this.getData()))}onKeyDown(t){var e;const i=this.beforeKeyDown.emit(Object.assign({original:t},this.getData()));if(t.defaultPrevented||i.defaultPrevented){return}(e=this.keyboardService)===null||e===void 0?void 0:e.keyDown(t,this.range,!!this.selectionStore.get("edit"),{focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range")})}selectionServiceSet(t){this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;this.unsubscribeSelectionStore.push(t.onChange("nextFocus",(t=>t&&this.doFocus(t,t))));this.keyboardService=new it({selectionStore:t,range:t=>!!t&&this.triggerRangeEvent(t),focus:(t,e,i)=>{if(i){this.beforeNextViewportFocus.emit(t);return false}else{return this.doFocus(t,t,e)}},change:t=>{if(this.readonly){return}this.doEdit(t)},cancel:async()=>{var t;await((t=this.revogrEdit)===null||t===void 0?void 0:t.cancelChanges());this.closeEdit()},clearCell:()=>!this.readonly&&this.clearCell(),internalPaste:()=>!this.readonly&&this.beforeRegionPaste.emit(),getData:()=>this.getData(),selectAll:()=>this.selectAll.emit()});this.createAutoFillService()}createAutoFillService(){this.autoFillService=new st({dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,columnService:this.columnService,dataStore:this.dataStore,clearRangeDataApply:t=>this.beforeRangeDataApply.emit(Object.assign(Object.assign(Object.assign({},t),this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)})),setTempRange:t=>{const e=this.beforeSetTempRange.emit(Object.assign(Object.assign({tempRange:t},this.getData()),this.types));if(e.defaultPrevented){return null}return this.setTempRange.emit(e.detail.tempRange)},selectionChanged:t=>this.selectionChange.emit(t),rangeCopy:t=>this.beforeRangeCopyApply.emit(t),rangeDataApply:t=>this.rangeEditApply.emit(t),setRange:t=>!!t&&this.triggerRangeEvent(t),getData:()=>this.getData()})}columnServiceSet(){var t;(t=this.columnService)===null||t===void 0?void 0:t.destroy();this.columnService=new m(this.dataStore,this.colData);this.createAutoFillService()}connectedCallback(){this.columnServiceSet();this.selectionServiceSet(this.selectionStore)}disconnectedCallback(){var t;this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;(t=this.columnService)===null||t===void 0?void 0:t.destroy()}async componentWillRender(){var t,e;const i=this.selectionStore.get("edit");if(!i){await((e=(t=this.revogrEdit)===null||t===void 0?void 0:t.beforeDisconnect)===null||e===void 0?void 0:e.call(t))}}renderRange(t){const i=V(t,this.dimensionRow.state,this.dimensionCol.state);const s=J(i);return[e("div",{class:p,style:s},this.isMobileDevice&&e("div",{class:"range-handlers"},e("span",{class:g}),e("span",{class:g})))]}renderEditor(){const t=this.selectionStore.get("edit");if(this.readonly||!t){return null}const i=t.val||y(this.columnService.rowDataModel(t.y,t.x).value);const s=Object.assign(Object.assign({},t),this.columnService.getSaveData(t.y,t.x,i));const o=this.beforeEditRender.emit(Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:t.x,y1:t.y})},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(o.defaultPrevented){return null}const r=V(o.detail.range,o.detail.rowDimension,o.detail.colDimension);const n=J(r);return e("revogr-edit",{style:n,ref:t=>this.revogrEdit=t,additionalData:this.additionalData,editCell:s,saveOnClose:this.applyChangesOnClose,column:this.columnService.rowDataModel(t.y,t.x),editor:k(this.columnService.columns[t.x],this.editors)})}render(){var t;const s=[];const o=this.renderEditor();if(o){s.push(o)}else{const i=this.selectionStore.get("range");const o=this.selectionStore.get("focus");if((i||o)&&this.useClipboard){s.push(e("revogr-clipboard",{readonly:this.readonly,onCopyregion:t=>this.onCopy(t.detail),onClearregion:()=>!this.readonly&&this.clearCell(),ref:t=>this.clipboard=t,onPasteregion:t=>this.onPaste(t.detail)}))}if(i){s.push(...this.renderRange(i))}if(o&&!this.readonly&&this.range){s.push((t=this.autoFillService)===null||t===void 0?void 0:t.renderAutofill(i,o))}if(this.canDrag){s.push(e("revogr-order-editor",{ref:t=>this.orderEditor=t,dataStore:this.dataStore,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,parent:this.element,rowType:this.types.rowType,onRowdragstartinit:t=>this.rowDragStart(t)}))}}return e(i,{key:"b4692030b6fb5d9be3423a5f4d1c500675bdc3b6",class:{mobile:this.isMobileDevice},onDblClick:t=>this.onElementDblClick(t),onMouseDown:t=>this.onElementMouseDown(t),onTouchStart:t=>this.onElementMouseDown(t,true),onCloseedit:t=>this.closeEdit(t),onCelledit:t=>{const e=this.beforeCellSave.emit(t.detail);if(!e.defaultPrevented){this.cellEdit(e.detail)}if(!e.detail.preventFocus){this.focusNext()}}},s,e("slot",{key:"74472f7260487459341946ea12a33bcea2e22fd8",name:"data"}))}doFocus(t,e,i){const{defaultPrevented:s}=this.beforeFocusCell.emit(this.columnService.getSaveData(t.y,t.x));if(s){return false}const o=Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:e.x,y1:e.y}),next:i},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});const r=this.applyFocus.emit(o);if(r.defaultPrevented){return false}const{range:n}=r.detail;return!this.focusCell.emit(Object.assign({focus:{x:n.x,y:n.y},end:{x:n.x1,y:n.y1}},r.detail)).defaultPrevented}triggerRangeEvent(t){const e=this.types.rowType;const i=this.beforeApplyRange.emit(Object.assign(Object.assign({range:Object.assign({},t)},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(i.defaultPrevented){return false}const s=this.columnService.getRangeTransformedToProps(i.detail.range,this.dataStore);let o=this.beforeSetRange.emit(s);if(o.defaultPrevented){return false}o=this.setRange.emit(Object.assign(Object.assign({},i.detail.range),{type:e}));if(o.defaultPrevented){return false}return!o.defaultPrevented}onElementDblClick(t){if(t.defaultPrevented){return}const e=this.getData();const i=K(t,e);if(!i){return}this.doEdit()}onElementMouseDown(t,e=false){var i;const s=t.target;if(j(s)||t.defaultPrevented){return}const o=this.getData();const r=K(t,o);if(!r){return}this.focus(r,this.range&&t.shiftKey);if(this.range){s&&((i=this.autoFillService)===null||i===void 0?void 0:i.selectionStart(s,this.getData()));if(!e){t.preventDefault()}else if(x(t.touches[0],g)){t.preventDefault()}}}doEdit(t=""){var e;if(this.canEdit()){const i=this.selectionStore.get("focus");if(!i){return}const s=this.columnService.getSaveData(i.y,i.x);(e=this.setEdit)===null||e===void 0?void 0:e.emit(Object.assign(Object.assign({},s),{val:t}))}}async closeEdit(t){this.cancelEdit.emit();if(t===null||t===void 0?void 0:t.detail){await this.focusNext()}}cellEdit(t){const e=this.columnService.getSaveData(t.rgRow,t.rgCol,t.val);this.cellEditApply.emit(e)}getRegion(){const t=this.selectionStore.get("focus");let e=this.selectionStore.get("range");if(!e){e=w(t,t)}return e}onCopy(t){var e;const i=this.getRegion();const s=this.beforeCopyRegion.emit(i);if(s.defaultPrevented){return false}let o;if(i){const{data:t,mapping:e}=this.columnService.copyRangeArray(i,this.dataStore);const s=this.rangeClipboardCopy.emit(Object.assign({range:i,data:t,mapping:e},this.types));if(!s.defaultPrevented){o=s.detail.data}}(e=this.clipboard)===null||e===void 0?void 0:e.doCopy(t,o);return true}onPaste(t){var e;const i=this.selectionStore.get("focus");const s=this.selectionStore.get("edit")!==null;if(!i||s){return}let{changed:o,range:r}=this.columnService.getTransformedDataToApply(i,t);const{defaultPrevented:n}=this.rangeClipboardPaste.emit(Object.assign({data:o,models:I(o,this.dataStore),range:r},this.types));if(n){return}(e=this.autoFillService)===null||e===void 0?void 0:e.onRangeApply(o,r,r)}async focusNext(){var t;const e=await((t=this.keyboardService)===null||t===void 0?void 0:t.keyChangeSelection(new KeyboardEvent("keydown",{code:h.ARROW_DOWN}),this.range));if(!e){this.closeEdit()}}clearCell(){var t;const e=this.selectionStore.get("range");if(e&&!E(e)){const i=this.columnService.getRangeStaticData(e,"");(t=this.autoFillService)===null||t===void 0?void 0:t.onRangeApply(i,e,e)}else if(this.canEdit()){const t=this.selectionStore.get("focus");if(!t){return}const e=this.columnService.getSaveData(t.y,t.x);this.cellEdit({rgRow:t.y,rgCol:t.x,val:"",type:e.type,prop:e.prop})}}rowDragStart({detail:t}){t.text=y(this.columnService.rowDataModel(t.cell.y,t.cell.x).value)}canEdit(){var t;if(this.readonly){return false}const e=this.selectionStore.get("focus");return e&&!((t=this.columnService)===null||t===void 0?void 0:t.isReadOnly(e.y,e.x))}get edited(){return this.selectionStore.get("edit")}focus(t,e=false){if(!t)return false;const i=t;const s=this.selectionStore.get("focus");if(e&&s){const t=w(s,i);if(t){return this.triggerRangeEvent(t)}}return this.doFocus(t,i)}get types(){return{rowType:this.dataStore.get("type"),colType:this.columnService.type}}getData(){return{el:this.element,rows:this.dimensionRow.state,cols:this.dimensionCol.state,lastCell:this.lastCell,focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range"),edit:this.selectionStore.get("edit")}}get element(){return o(this)}static get watchers(){return{selectionStore:["selectionServiceSet"],dimensionRow:["createAutoFillService"],dimensionCol:["createAutoFillService"],dataStore:["columnServiceSet"],colData:["columnServiceSet"]}}};nt.style=rt;const lt=t=>(e,{rowIndex:i})=>t+i;const at=class{constructor(e){t(this,e);this.scrollViewport=s(this,"scrollview",3);this.elementToScroll=s(this,"ref",3);this.height=undefined;this.dataPorts=undefined;this.headerProp=undefined;this.rowClass=undefined;this.resize=undefined;this.rowHeaderColumn=undefined;this.additionalData=undefined;this.jobsBeforeRender=[]}render(){const t=[];const s=new A("colPinStart");let o=1;for(let i of this.dataPorts){const r=i.dataStore.get("items").length;const n=new f(i.type,Object.assign({},i.dataStore.state));const l=new f("colPinStart");const a=Object.assign({cellTemplate:lt(o)},this.rowHeaderColumn);l.updateData([a]);t.push(e("revogr-data",Object.assign({},i,{colType:"rowHeaders",jobsBeforeRender:this.jobsBeforeRender,rowClass:this.rowClass,dataStore:n.store,colData:l.store,viewportCol:s.store,readonly:true,range:false})));o+=r}const r=U(o,this.rowHeaderColumn);s.setViewport({realCount:1,virtualSize:0,items:[{size:r,start:0,end:r,itemIndex:0}]});const n={contentHeight:this.height,contentWidth:0,style:{minWidth:`${r}px`},colType:"rowHeaders",ref:t=>this.elementToScroll.emit(t),onScrollviewport:t=>this.scrollViewport.emit(t.detail)};const l=Object.assign(Object.assign({},this.headerProp),{colData:typeof this.rowHeaderColumn==="object"?[this.rowHeaderColumn]:[],viewportCol:s.store,canResize:false,type:v,slot:$});return e(i,{class:{[v]:true},key:v},e("revogr-viewport-scroll",Object.assign({key:"addb87ab3406b5691cecf810119582bda3a4b4a2"},n,{"row-header":true}),e("revogr-header",Object.assign({key:"8621e76b132e7d1507794b515b40f525577413e2"},l)),t))}};class ht{constructor(t){this.element=t;this.autohideScrollTimeout=0}setScrollSize(t){if(!t){this.element.setAttribute("autohide","true")}else{this.element.removeAttribute("autohide")}}checkScroll({scrollSize:t,contentSize:e,virtualSize:i}){const s=e>i;const o=!t&&s;if(o){this.element.setAttribute("visible","true");this.autohideScrollTimeout=this.show(this.element,this.autohideScrollTimeout)}}show(t,e){clearTimeout(e);return Number(setTimeout((()=>{t===null||t===void 0?void 0:t.removeAttribute("visible")}),1e3))}clear(){clearTimeout(this.autohideScrollTimeout)}}const ct=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-scroll-virtual[autohide]{position:absolute;z-index:100 !important}revogr-scroll-virtual[autohide].vertical{top:0;right:0}revogr-scroll-virtual[autohide].vertical[visible]{min-width:20px !important}revogr-scroll-virtual[autohide].horizontal{bottom:0;left:0}revogr-scroll-virtual[autohide].horizontal[visible]{min-height:20px !important}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}";const dt=ct;const ut=class{constructor(e){t(this,e);this.scrollVirtual=s(this,"scrollvirtual",7);this.scrollSize=0;this.dimension="rgRow";this.viewportStore=undefined;this.dimensionStore=undefined}async setScroll(t){var e;if(this.dimension!==t.dimension){return}this.localScrollTimer.latestScrollUpdate(t.dimension);(e=this.localScrollService)===null||e===void 0?void 0:e.setScroll(t);if(t.coordinate){this.autohideScrollPlugin.checkScroll({scrollSize:this.scrollSize,contentSize:this.dimensionStore.get("realSize"),virtualSize:this.viewportStore.get("virtualSize")})}}async changeScroll(t){if(t.delta){switch(t.dimension){case"rgCol":t.coordinate=this.element.scrollLeft+t.delta;break;case"rgRow":t.coordinate=this.element.scrollTop+t.delta;break}this.setScroll(t)}return t}set size(t){this.autohideScrollPlugin.setScrollSize(t);if(this.dimension==="rgRow"){this.element.style.minWidth=`${t}px`;return}this.element.style.minHeight=`${t}px`}get size(){if(this.dimension==="rgRow"){return this.element.clientHeight}return this.element.clientWidth}connectedCallback(){this.autohideScrollPlugin=new ht(this.element);this.localScrollTimer=new _("ontouchstart"in document.documentElement?0:10);this.localScrollService=new B({runScroll:t=>this.scrollVirtual.emit(t),applyScroll:t=>{this.localScrollTimer.setCoordinate(t);const e=t.dimension==="rgRow"?"scrollTop":"scrollLeft";this.element[e]=t.coordinate}})}disconnectedCallback(){this.autohideScrollPlugin.clear()}componentWillLoad(){this.scrollSize=b(document)}componentDidRender(){const t=this.dimension==="rgRow"?"scrollHeight":"scrollWidth";const e=this.scrollSize;const i=this.element[t]>this.size+e;this.size=i?this.scrollSize:0;let s=0;if(this.dimension==="rgRow"){s=this.element.scrollWidth>this.element.clientWidth?e:0}else{s=this.element.scrollHeight>this.element.clientHeight?e:0}const o=this.size+s;this.localScrollService.setParams({contentSize:this.dimensionStore.get("realSize"),clientSize:o,virtualSize:this.viewportStore.get("clientSize")},this.dimension)}onScroll(t){var e;if(!(t.target instanceof Element)){return}const i=t.target;let s="scrollLeft";if(this.dimension==="rgRow"){s="scrollTop"}if(this.localScrollTimer.isReady(this.dimension,i[s]||0)){(e=this.localScrollService)===null||e===void 0?void 0:e.scroll(i[s]||0,this.dimension)}}render(){const t=this.dimension==="rgRow"?"height":"width";const s=P(this.dimensionStore.get("realSize"),this.size,this.viewportStore.get("clientSize"));return e(i,{key:"7789bd408d3e154836bcd2aed4ebaa1663e7f968",onScroll:t=>this.onScroll(t)},e("div",{key:"40549da97df3a580ad2ddef13fe7b4dbe6df54bc",style:{[t]:`${s}px`}}))}get element(){return o(this)}};ut.style=dt;const gt=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}.temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid rgb(255, 94, 0);box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}";const pt=gt;const ft=class{constructor(e){t(this,e);this.onChange=Z((t=>this.doChange(t)),300);this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined}doChange(t){t===null||t===void 0?void 0:t.scrollIntoView({block:"nearest",inline:"nearest"})}componentDidRender(){if(this.el){this.onChange(this.el)}}render(){const t=this.selectionStore.get("tempRange");const s=this.selectionStore.get("tempRangeType");if(!t){return}let o="bottom";let r="right";const n=this.getRange();if(!n){return}if(t.y<n.y){o="top"}if(t.x<n.x){r="left"}const l=`${r} ${o}`;const a=V(t,this.dimensionRow.state,this.dimensionCol.state);const h=J(a);const c={class:{[L]:true,[s||""]:true},style:h,hidden:false};return e(i,Object.assign({},c),e("div",{class:l,ref:t=>this.el=t}))}getRange(){const t=this.selectionStore.get("range");if(t){return t}const e=this.selectionStore.get("focus");if(!e){return null}return Object.assign(Object.assign({},e),{x1:e.x,y1:e.y})}};ft.style=pt;export{H as revogr_attribution,W as revogr_extra,tt as revogr_focus,nt as revogr_overlay_selection,at as revogr_row_headers,ut as revogr_scroll_virtual,ft as revogr_temp_range};
|
|
5
5
|
//# sourceMappingURL=revogr-attribution_7.entry.js.map
|