@revolist/revogrid
Advanced tools
Comparing version 4.12.5 to 4.12.6
@@ -14,3 +14,3 @@ /*! | ||
const headerCellRenderer = require('./header-cell-renderer-a66fe375.js'); | ||
const throttle = require('./throttle-08957661.js'); | ||
const throttle = require('./throttle-5674040a.js'); | ||
const viewport_helpers = require('./viewport.helpers-e59a544e.js'); | ||
@@ -631,6 +631,21 @@ require('./debounce-ec7a04b4.js'); | ||
class GridResizeService { | ||
constructor(el, events) { | ||
this.events = events; | ||
constructor(el, resize) { | ||
this.resize = resize; | ||
this.resizeObserver = null; | ||
this.resize = throttle.throttle((e, o) => { var _a; return (_a = this.events) === null || _a === void 0 ? void 0 : _a.resize(e, o); }, 10); | ||
this.previousSize = { | ||
width: 0, | ||
height: 0, | ||
}; | ||
this.apply = throttle.throttle((e) => { | ||
var _a; | ||
if (!e.length) { | ||
return; | ||
} | ||
const entry = { | ||
width: e[0].contentRect.width, | ||
height: e[0].contentRect.height, | ||
}; | ||
(_a = this.resize) === null || _a === void 0 ? void 0 : _a.call(this, entry, this.previousSize); | ||
this.previousSize = entry; | ||
}, 10); | ||
this.init(el); | ||
@@ -641,3 +656,3 @@ } | ||
await resizeObserver(); | ||
this.resizeObserver = new ResizeObserver(this.resize); | ||
this.resizeObserver = new ResizeObserver(this.apply); | ||
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); | ||
@@ -758,34 +773,41 @@ } | ||
// track horizontal viewport resize | ||
this.resizeService = new GridResizeService(this.horizontalScroll, { | ||
resize: entries => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j; | ||
let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0; | ||
this.resizeService = new GridResizeService(this.horizontalScroll, (entry, previousSize) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const els = {}; | ||
if (entry.height !== previousSize.height) { | ||
let height = entry.height || 0; | ||
if (height) { | ||
height -= ((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.clientHeight) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.footer) === null || _d === void 0 ? void 0 : _d.clientHeight) !== null && _e !== void 0 ? _e : 0); | ||
height -= | ||
((_b = (_a = this.header) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0) + | ||
((_d = (_c = this.footer) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0); | ||
} | ||
const els = { | ||
rgRow: { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop, | ||
noScroll: false, | ||
}, | ||
rgCol: { | ||
size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}, | ||
els.rgRow = { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0, | ||
noScroll: false, | ||
}; | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader }); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
(_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
if (entry.width !== previousSize.width) { | ||
els.rgCol = { | ||
size: entry.width || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}; | ||
} | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ | ||
dimension, | ||
size: item.size, | ||
rowHeader: this.rowHeader, | ||
}); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
}, | ||
(_g = this.localScrollService) === null || _g === void 0 ? void 0 : _g.scroll((_h = item.scroll) !== null && _h !== void 0 ? _h : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
}); | ||
@@ -843,3 +865,3 @@ } | ||
render() { | ||
return (index.h(index.Host, { key: '9727a9c83d740d8184e12acc06b72c3f28c3b5ac', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, index.h("div", { key: '44551981dda7401ac9290d003b1ac7e7f55ee006', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, index.h("div", { key: '8b4962c352e81c343aed7136b7f7a9d71b10ed70', class: "header-wrapper", ref: e => (this.header = e) }, index.h("slot", { key: '789868b91507bc50c18dc99c6bec8f1e4699cbab', name: viewport_helpers.HEADER_SLOT })), index.h("div", { key: '0efb49db3fbcbe0bdfcfa24afad495c681de6218', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, index.h("div", { key: 'eef434a04062b364805702d73c0b28c9e44a27c5', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, index.h("slot", { key: '8490b9f01abebeeaa46da811e9ecdc62090ecb00', name: viewport_helpers.CONTENT_SLOT }))), index.h("div", { key: 'c3c133d6e73816e9e3c33d5091fc00f959977874', class: "footer-wrapper", ref: e => (this.footer = e) }, index.h("slot", { key: 'e4aae0a9eb10c750306a6bd4c222bcab6d1050e3', name: viewport_helpers.FOOTER_SLOT }))))); | ||
return (index.h(index.Host, { key: '970ac2365588d1c894d9684113eb9beaf64e1a1d', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, index.h("div", { key: 'dc57aab1bde4496e83131d80a7e189db25b93312', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, index.h("div", { key: 'bd014cf0a67bb913016f00f7838344611a1b26df', class: "header-wrapper", ref: e => (this.header = e) }, index.h("slot", { key: '772eb408b6ea670624cc338550215565ec36ef89', name: viewport_helpers.HEADER_SLOT })), index.h("div", { key: '5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, index.h("div", { key: 'b45f46aedefe82843b086cdca822e05339a77fda', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, index.h("slot", { key: '8d07196c79741ace0f4c734138d69abdf96fee4f', name: viewport_helpers.CONTENT_SLOT }))), index.h("div", { key: 'f6313f9394e99a3ad07895ed06e965540268b35a', class: "footer-wrapper", ref: e => (this.footer = e) }, index.h("slot", { key: 'b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4', name: viewport_helpers.FOOTER_SLOT }))))); | ||
} | ||
@@ -892,3 +914,3 @@ /** | ||
// Detect if the user has reached the bottom | ||
const atBottom = (scrollTop + clientHeight >= scrollHeight) && e.deltaY > 0; | ||
const atBottom = scrollTop + clientHeight >= scrollHeight && e.deltaY > 0; | ||
const atTop = scrollTop === 0 && e.deltaY < 0; | ||
@@ -915,3 +937,3 @@ if (!atBottom && !atTop) { | ||
// Detect if the user has reached the right end | ||
const atRight = (scrollLeft + clientWidth >= scrollWidth) && e.deltaX > 0; | ||
const atRight = scrollLeft + clientWidth >= scrollWidth && e.deltaX > 0; | ||
// Detect if the user has reached the left end | ||
@@ -918,0 +940,0 @@ const atLeft = scrollLeft === 0 && e.deltaX < 0; |
@@ -1284,3 +1284,3 @@ /*! | ||
"original": "RangeClipboardCopyEventProps", | ||
"resolved": "{ data: any[][]; range: RangeArea; mapping: OldNewRangeMapping; } & AllDimensionType", | ||
"resolved": "RangeClipboardCopyEventProps<any>", | ||
"references": { | ||
@@ -1306,3 +1306,3 @@ "RangeClipboardCopyEventProps": { | ||
"original": "RangeClipboardPasteEvent", | ||
"resolved": "{ data: DataLookup<any>; models: Partial<DataLookup<any>>; range: RangeArea | null; } & AllDimensionType", | ||
"resolved": "RangeClipboardPasteEvent", | ||
"references": { | ||
@@ -1309,0 +1309,0 @@ "RangeClipboardPasteEvent": { |
@@ -7,6 +7,21 @@ /*! | ||
export default class GridResizeService { | ||
constructor(el, events) { | ||
this.events = events; | ||
constructor(el, resize) { | ||
this.resize = resize; | ||
this.resizeObserver = null; | ||
this.resize = throttle((e, o) => { var _a; return (_a = this.events) === null || _a === void 0 ? void 0 : _a.resize(e, o); }, 10); | ||
this.previousSize = { | ||
width: 0, | ||
height: 0, | ||
}; | ||
this.apply = throttle((e) => { | ||
var _a; | ||
if (!e.length) { | ||
return; | ||
} | ||
const entry = { | ||
width: e[0].contentRect.width, | ||
height: e[0].contentRect.height, | ||
}; | ||
(_a = this.resize) === null || _a === void 0 ? void 0 : _a.call(this, entry, this.previousSize); | ||
this.previousSize = entry; | ||
}, 10); | ||
this.init(el); | ||
@@ -17,3 +32,3 @@ } | ||
await resizeObserver(); | ||
this.resizeObserver = new ResizeObserver(this.resize); | ||
this.resizeObserver = new ResizeObserver(this.apply); | ||
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); | ||
@@ -20,0 +35,0 @@ } |
@@ -113,34 +113,41 @@ /*! | ||
// track horizontal viewport resize | ||
this.resizeService = new GridResizeService(this.horizontalScroll, { | ||
resize: entries => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j; | ||
let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0; | ||
this.resizeService = new GridResizeService(this.horizontalScroll, (entry, previousSize) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const els = {}; | ||
if (entry.height !== previousSize.height) { | ||
let height = entry.height || 0; | ||
if (height) { | ||
height -= ((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.clientHeight) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.footer) === null || _d === void 0 ? void 0 : _d.clientHeight) !== null && _e !== void 0 ? _e : 0); | ||
height -= | ||
((_b = (_a = this.header) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0) + | ||
((_d = (_c = this.footer) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0); | ||
} | ||
const els = { | ||
rgRow: { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop, | ||
noScroll: false, | ||
}, | ||
rgCol: { | ||
size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}, | ||
els.rgRow = { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0, | ||
noScroll: false, | ||
}; | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader }); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
(_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
if (entry.width !== previousSize.width) { | ||
els.rgCol = { | ||
size: entry.width || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}; | ||
} | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ | ||
dimension, | ||
size: item.size, | ||
rowHeader: this.rowHeader, | ||
}); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
}, | ||
(_g = this.localScrollService) === null || _g === void 0 ? void 0 : _g.scroll((_h = item.scroll) !== null && _h !== void 0 ? _h : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
}); | ||
@@ -198,3 +205,3 @@ } | ||
render() { | ||
return (h(Host, { key: '9727a9c83d740d8184e12acc06b72c3f28c3b5ac', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: '44551981dda7401ac9290d003b1ac7e7f55ee006', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: '8b4962c352e81c343aed7136b7f7a9d71b10ed70', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '789868b91507bc50c18dc99c6bec8f1e4699cbab', name: HEADER_SLOT })), h("div", { key: '0efb49db3fbcbe0bdfcfa24afad495c681de6218', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'eef434a04062b364805702d73c0b28c9e44a27c5', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8490b9f01abebeeaa46da811e9ecdc62090ecb00', name: CONTENT_SLOT }))), h("div", { key: 'c3c133d6e73816e9e3c33d5091fc00f959977874', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'e4aae0a9eb10c750306a6bd4c222bcab6d1050e3', name: FOOTER_SLOT }))))); | ||
return (h(Host, { key: '970ac2365588d1c894d9684113eb9beaf64e1a1d', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: 'dc57aab1bde4496e83131d80a7e189db25b93312', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: 'bd014cf0a67bb913016f00f7838344611a1b26df', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '772eb408b6ea670624cc338550215565ec36ef89', name: HEADER_SLOT })), h("div", { key: '5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'b45f46aedefe82843b086cdca822e05339a77fda', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8d07196c79741ace0f4c734138d69abdf96fee4f', name: CONTENT_SLOT }))), h("div", { key: 'f6313f9394e99a3ad07895ed06e965540268b35a', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4', name: FOOTER_SLOT }))))); | ||
} | ||
@@ -247,3 +254,3 @@ /** | ||
// Detect if the user has reached the bottom | ||
const atBottom = (scrollTop + clientHeight >= scrollHeight) && e.deltaY > 0; | ||
const atBottom = scrollTop + clientHeight >= scrollHeight && e.deltaY > 0; | ||
const atTop = scrollTop === 0 && e.deltaY < 0; | ||
@@ -270,3 +277,3 @@ if (!atBottom && !atTop) { | ||
// Detect if the user has reached the right end | ||
const atRight = (scrollLeft + clientWidth >= scrollWidth) && e.deltaX > 0; | ||
const atRight = scrollLeft + clientWidth >= scrollWidth && e.deltaX > 0; | ||
// Detect if the user has reached the left end | ||
@@ -273,0 +280,0 @@ const atLeft = scrollLeft === 0 && e.deltaX < 0; |
@@ -5,3 +5,3 @@ /*! | ||
import { h, Host, } from "@stencil/core"; | ||
import LocalScrollService, { getContentSize } from "../../services/local.scroll.service"; | ||
import LocalScrollService, { getContentSize, } from "../../services/local.scroll.service"; | ||
import { AutohideScrollPlugin } from "./autohide-scroll.plugin"; | ||
@@ -87,11 +87,27 @@ import { LocalScrollTimer } from "../../services/local.scroll.timer"; | ||
const type = this.dimension === 'rgRow' ? 'scrollHeight' : 'scrollWidth'; | ||
if (this.element[type] > this.size) { | ||
this.size = this.scrollSize; | ||
// Get scrollbar size once during component initialization | ||
const scrollbarSize = this.scrollSize; | ||
// Calculate if content exceeds viewport size | ||
// Add scrollbar size to the comparison to account for other dimension's scrollbar | ||
const hasScroll = this.element[type] > this.size + scrollbarSize; | ||
// Set scroll size based on whether scroll is needed | ||
this.size = hasScroll ? this.scrollSize : 0; | ||
let additionalScrollbarSize = 0; | ||
if (this.dimension === 'rgRow') { | ||
additionalScrollbarSize = | ||
this.element.scrollWidth > this.element.clientWidth | ||
? scrollbarSize | ||
: 0; | ||
} | ||
else { | ||
this.size = 0; | ||
additionalScrollbarSize = | ||
this.element.scrollHeight > this.element.clientHeight | ||
? scrollbarSize | ||
: 0; | ||
} | ||
const clientSize = this.size + additionalScrollbarSize; | ||
this.localScrollService.setParams({ | ||
contentSize: this.dimensionStore.get('realSize'), | ||
clientSize: this.size, | ||
// Add scrollbar size to clientSize if other dimension has scroll | ||
clientSize, | ||
virtualSize: this.viewportStore.get('clientSize'), | ||
@@ -117,5 +133,4 @@ }, this.dimension); | ||
const sizeType = this.dimension === 'rgRow' ? 'height' : 'width'; | ||
const size = getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('clientSize') // content viewport size | ||
); | ||
return (h(Host, { key: '2d11902403db45b805bde88b6fc40acff4b6b910', onScroll: (e) => this.onScroll(e) }, h("div", { key: '74978e90cbf66e3fb6dcc25bd5882346f1515c39', style: { | ||
const size = getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('clientSize')); | ||
return (h(Host, { key: '7789bd408d3e154836bcd2aed4ebaa1663e7f968', onScroll: (e) => this.onScroll(e) }, h("div", { key: '40549da97df3a580ad2ddef13fe7b4dbe6df54bc', style: { | ||
[sizeType]: `${size}px`, | ||
@@ -122,0 +137,0 @@ } }))); |
@@ -361,3 +361,3 @@ /*! | ||
"original": "Record<string, LogicFunction>", | ||
"resolved": "{ [x: string]: LogicFunction; }", | ||
"resolved": "{ [x: string]: LogicFunction<any, LogicFunctionExtraParam>; }", | ||
"references": { | ||
@@ -389,5 +389,9 @@ "Record": { | ||
"complexType": { | ||
"original": "FilterCaptions | undefined", | ||
"resolved": "undefined | { title: string; save: string; reset: string; ok: string; cancel: string; add: string; placeholder: string; and: string; or: string; }", | ||
"original": "Partial<FilterCaptions> | undefined", | ||
"resolved": "undefined | { title?: string | undefined; save?: string | undefined; reset?: string | undefined; ok?: string | undefined; cancel?: string | undefined; add?: string | undefined; placeholder?: string | undefined; and?: string | undefined; or?: string | undefined; }", | ||
"references": { | ||
"Partial": { | ||
"location": "global", | ||
"id": "global::Partial" | ||
}, | ||
"FilterCaptions": { | ||
@@ -454,3 +458,3 @@ "location": "import", | ||
"original": "MultiFilterItem", | ||
"resolved": "{ [prop: string]: FilterData[]; }", | ||
"resolved": "MultiFilterItem", | ||
"references": { | ||
@@ -457,0 +461,0 @@ "MultiFilterItem": { |
@@ -0,2 +1,9 @@ | ||
/*! | ||
* Built by Revolist OU ❤️ | ||
*/ | ||
// filter.types.ts | ||
; | ||
; | ||
; | ||
export {}; | ||
//# sourceMappingURL=filter.types.js.map |
@@ -17,2 +17,5 @@ /*! | ||
export function getContentSize(contentSize, clientSize, virtualSize = 0) { | ||
if (virtualSize > contentSize) { | ||
return 0; | ||
} | ||
return contentSize + (virtualSize ? clientSize - virtualSize : 0); | ||
@@ -19,0 +22,0 @@ } |
@@ -10,3 +10,3 @@ /*! | ||
import { H as HeaderCellRenderer } from './header-cell-renderer-31f53644.js'; | ||
import { t as throttle, L as LocalScrollTimer, a as LocalScrollService } from './throttle-05489451.js'; | ||
import { t as throttle, L as LocalScrollTimer, a as LocalScrollService } from './throttle-dec28f5b.js'; | ||
import { H as HEADER_SLOT, C as CONTENT_SLOT, F as FOOTER_SLOT } from './viewport.helpers-7e7f9dad.js'; | ||
@@ -627,6 +627,21 @@ import './debounce-b3166f78.js'; | ||
class GridResizeService { | ||
constructor(el, events) { | ||
this.events = events; | ||
constructor(el, resize) { | ||
this.resize = resize; | ||
this.resizeObserver = null; | ||
this.resize = throttle((e, o) => { var _a; return (_a = this.events) === null || _a === void 0 ? void 0 : _a.resize(e, o); }, 10); | ||
this.previousSize = { | ||
width: 0, | ||
height: 0, | ||
}; | ||
this.apply = throttle((e) => { | ||
var _a; | ||
if (!e.length) { | ||
return; | ||
} | ||
const entry = { | ||
width: e[0].contentRect.width, | ||
height: e[0].contentRect.height, | ||
}; | ||
(_a = this.resize) === null || _a === void 0 ? void 0 : _a.call(this, entry, this.previousSize); | ||
this.previousSize = entry; | ||
}, 10); | ||
this.init(el); | ||
@@ -637,3 +652,3 @@ } | ||
await resizeObserver(); | ||
this.resizeObserver = new ResizeObserver(this.resize); | ||
this.resizeObserver = new ResizeObserver(this.apply); | ||
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); | ||
@@ -754,34 +769,41 @@ } | ||
// track horizontal viewport resize | ||
this.resizeService = new GridResizeService(this.horizontalScroll, { | ||
resize: entries => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j; | ||
let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0; | ||
this.resizeService = new GridResizeService(this.horizontalScroll, (entry, previousSize) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const els = {}; | ||
if (entry.height !== previousSize.height) { | ||
let height = entry.height || 0; | ||
if (height) { | ||
height -= ((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.clientHeight) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.footer) === null || _d === void 0 ? void 0 : _d.clientHeight) !== null && _e !== void 0 ? _e : 0); | ||
height -= | ||
((_b = (_a = this.header) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0) + | ||
((_d = (_c = this.footer) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0); | ||
} | ||
const els = { | ||
rgRow: { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop, | ||
noScroll: false, | ||
}, | ||
rgCol: { | ||
size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}, | ||
els.rgRow = { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0, | ||
noScroll: false, | ||
}; | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader }); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
(_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
if (entry.width !== previousSize.width) { | ||
els.rgCol = { | ||
size: entry.width || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}; | ||
} | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ | ||
dimension, | ||
size: item.size, | ||
rowHeader: this.rowHeader, | ||
}); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
}, | ||
(_g = this.localScrollService) === null || _g === void 0 ? void 0 : _g.scroll((_h = item.scroll) !== null && _h !== void 0 ? _h : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
}); | ||
@@ -839,3 +861,3 @@ } | ||
render() { | ||
return (h(Host, { key: '9727a9c83d740d8184e12acc06b72c3f28c3b5ac', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: '44551981dda7401ac9290d003b1ac7e7f55ee006', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: '8b4962c352e81c343aed7136b7f7a9d71b10ed70', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '789868b91507bc50c18dc99c6bec8f1e4699cbab', name: HEADER_SLOT })), h("div", { key: '0efb49db3fbcbe0bdfcfa24afad495c681de6218', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'eef434a04062b364805702d73c0b28c9e44a27c5', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8490b9f01abebeeaa46da811e9ecdc62090ecb00', name: CONTENT_SLOT }))), h("div", { key: 'c3c133d6e73816e9e3c33d5091fc00f959977874', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'e4aae0a9eb10c750306a6bd4c222bcab6d1050e3', name: FOOTER_SLOT }))))); | ||
return (h(Host, { key: '970ac2365588d1c894d9684113eb9beaf64e1a1d', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: 'dc57aab1bde4496e83131d80a7e189db25b93312', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: 'bd014cf0a67bb913016f00f7838344611a1b26df', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '772eb408b6ea670624cc338550215565ec36ef89', name: HEADER_SLOT })), h("div", { key: '5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'b45f46aedefe82843b086cdca822e05339a77fda', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8d07196c79741ace0f4c734138d69abdf96fee4f', name: CONTENT_SLOT }))), h("div", { key: 'f6313f9394e99a3ad07895ed06e965540268b35a', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4', name: FOOTER_SLOT }))))); | ||
} | ||
@@ -888,3 +910,3 @@ /** | ||
// Detect if the user has reached the bottom | ||
const atBottom = (scrollTop + clientHeight >= scrollHeight) && e.deltaY > 0; | ||
const atBottom = scrollTop + clientHeight >= scrollHeight && e.deltaY > 0; | ||
const atTop = scrollTop === 0 && e.deltaY < 0; | ||
@@ -911,3 +933,3 @@ if (!atBottom && !atTop) { | ||
// Detect if the user has reached the right end | ||
const atRight = (scrollLeft + clientWidth >= scrollWidth) && e.deltaX > 0; | ||
const atRight = scrollLeft + clientWidth >= scrollWidth && e.deltaX > 0; | ||
// Detect if the user has reached the left end | ||
@@ -914,0 +936,0 @@ const atLeft = scrollLeft === 0 && e.deltaX < 0; |
/*! | ||
* Built by Revolist OU ❤️ | ||
*/ | ||
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}; | ||
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}; | ||
//# sourceMappingURL=revogr-attribution_7.entry.js.map |
/*! | ||
* Built by Revolist OU ❤️ | ||
*/ | ||
import{h as e,B as t,r as i,c as o,H as r,a as n}from"./index-f6fae858.js";import{O as s,z as l,M as a,s as d,I as h}from"./column.service-f39c0a1d.js";import{M as c,H as v,a7 as g,k as p,E as u,Q as C,G as f,I as b,b as w,x as L,y as x,a8 as m,Y as k,a4 as y,J as z,B as E,F as R}from"./dimension.helpers-5567e424.js";import{G as H,R as S,P as j,S as F}from"./sorting.sign-c02e3b12.js";import{c as D}from"./filter.button-84396156.js";import{H as O}from"./header-cell-renderer-31f53644.js";import{t as M,L as $,a as T}from"./throttle-05489451.js";import{H as P,C as W,F as B}from"./viewport.helpers-7e7f9dad.js";import"./debounce-b3166f78.js";const _=t=>{const i={canResize:t.canResize,minWidth:t.group.ids.length*c,maxWidth:0,active:t.active||["r"],class:{[v]:true},style:{transform:`translateX(${t.start}px)`,width:`${t.end-t.start}px`},onResize:t.onResize};return e(O,{data:Object.assign(Object.assign({},t.group),{prop:"",providers:t.providers,index:t.start}),props:i,additionalData:t.additionalData})};const U=({additionalData:t,providers:i,depth:o,groups:r,visibleProps:n,dimensionCol:s,canResize:l,active:a,onResize:d})=>{const h=[];for(let c=0;c<o;c++){if(r[c]){for(let o of r[c]){const r=g(o.ids,(e=>typeof n[e]==="number"));if(r>-1){const c=n[o.ids[r]];const v=c-r;const g=v+o.ids.length-1;const u=p(s,v).start;const C=p(s,g).end;h.push(e(_,{providers:i,start:u,end:C,group:o,active:a,canResize:l,onResize:e=>{var t;return d((t=e.changedX)!==null&&t!==void 0?t:0,v,g)},additionalData:t}))}}}h.push(e("div",{class:`${u} group`}))}return h};class Z{constructor(){this.currentRange=null}selectionChange(e,t){if(this.currentRange){t.forEach(((t,i)=>{var o;if(e&&i>=e.y&&i<=e.y1){return}if(t&&t.t instanceof HTMLElement&&t.t.classList.contains(C)){t.t.classList.remove(C);if((o=t.i)===null||o===void 0?void 0:o.class.includes(C)){t.i.class=t.i.class.replace(C,"")}}}))}if(e){for(let i=e.y;i<=e.y1;i++){const e=t.get(i);if(e&&e.t instanceof HTMLElement&&!e.t.classList.contains(C)){const t=e.i=e.i||{};t.class=(t.class||"")+" "+C;e.t.classList.add(C)}}}this.currentRange=e}isRowFocused(e){return this.currentRange&&e>=this.currentRange.y&&e<=this.currentRange.y1}}function I(e,t){return new Promise((i=>{const o=document.createElement("vnode-html");e.appendChild(o);o.redraw=t;o.addEventListener("html",(e=>{o.remove();i(e.detail)}))}))}function X(i){var o;const r=[];const n=(o=i.schemaModel.column)===null||o===void 0?void 0:o.cellTemplate;if(n){r.push(n(e,i.schemaModel,i.additionalData))}else{if(!i.schemaModel.column){if(t===null||t===void 0?void 0:t.isDev){console.error("Investigate column problem.",i.schemaModel)}return""}if(i.schemaModel.column.rowDrag&&s(i.schemaModel.column.rowDrag,i.schemaModel)){r.push(e("span",{class:b,onMouseDown:e=>{var t;return(t=i.dragStartCell)===null||t===void 0?void 0:t.emit({originalEvent:e,model:i.schemaModel})}},e("span",{class:f})))}r.push(`${l(i.schemaModel.model,i.schemaModel.column)}`)}return r}const G=({renderProps:t,cellProps:i})=>{const o=X.bind(null,t);return e("div",Object.assign({},i,{redraw:o}),o())};const V=".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-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600;text-align:left}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent;vertical-align:middle;padding-left:5px}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";const Y=V;const A=class{constructor(e){i(this,e);this.beforerowrender=o(this,"beforerowrender",7);this.afterrender=o(this,"afterrender",7);this.beforeCellRender=o(this,"beforecellrender",7);this.beforeDataRender=o(this,"beforedatarender",7);this.dragStartCell=o(this,"dragstartcell",7);this.renderedRows=new Map;this.readonly=undefined;this.range=undefined;this.rowClass=undefined;this.additionalData=undefined;this.rowSelectionStore=undefined;this.viewportRow=undefined;this.viewportCol=undefined;this.dimensionRow=undefined;this.colData=undefined;this.dataStore=undefined;this.type=undefined;this.colType=undefined;this.jobsBeforeRender=[];this.providers=undefined}async updateCell(e){var t,i,o;const r=(i=(t=this.renderedRows.get(e.row))===null||t===void 0?void 0:t.o)===null||i===void 0?void 0:i[e.col];if((o=r===null||r===void 0?void 0:r.i)===null||o===void 0?void 0:o.redraw){const e=await I(this.element,r.i.redraw);r.t.innerHTML=e.html;r.l=Math.random()}}onDataStoreChange(){this.onStoreChange()}onColDataChange(){this.onStoreChange()}onStoreChange(){var e,t;(e=this.columnService)===null||e===void 0?void 0:e.destroy();this.columnService=new a(this.dataStore,this.colData);this.providers={type:this.type,readonly:this.readonly,data:this.dataStore,viewport:this.viewportCol,dimension:this.dimensionRow,selection:this.rowSelectionStore};(t=this.rangeUnsubscribe)===null||t===void 0?void 0:t.call(this);this.rangeUnsubscribe=this.rowSelectionStore.onChange("range",(e=>this.rowHighlightPlugin.selectionChange(e,this.renderedRows)))}connectedCallback(){this.rowHighlightPlugin=new Z;this.onStoreChange()}disconnectedCallback(){var e,t;(e=this.columnService)===null||e===void 0?void 0:e.destroy();(t=this.rangeUnsubscribe)===null||t===void 0?void 0:t.call(this)}async componentWillRender(){this.beforeDataRender.emit({rowType:this.type,colType:this.colType});return Promise.all(this.jobsBeforeRender.map((e=>typeof e==="function"?e():e)))}componentDidRender(){this.afterrender.emit({type:this.type})}render(){this.renderedRows=new Map;const t=this.columnService.columns;if(!t.length){return}const i=this.viewportRow.get("items");if(!i.length){return}const o=this.viewportCol.get("items");if(!o.length){return}const n=[];const s=this.dataStore.get("groupingDepth");const l=this.dataStore.get("groupingCustomRenderer");const a=this.columnService.hasGrouping?s:0;for(let t of i){const i=w(this.dataStore,t.itemIndex);if(d(i)){const o=Object.assign(Object.assign({},t),{index:t.itemIndex,model:i,groupingCustomRenderer:l,hasExpand:this.columnService.hasGrouping,providers:this.providers});n.push(e(H,Object.assign({},o)));continue}const r=[];for(let i of o){const o=Object.assign(Object.assign({},this.columnService.rowDataModel(t.itemIndex,i.itemIndex)),{providers:this.providers});const n=this.triggerBeforeCellRender(o,t,i);if(n.defaultPrevented){continue}const{detail:{column:s,row:l,model:d}}=n;const h={[L]:s.itemIndex,[x]:l.itemIndex,style:{width:`${s.size}px`,transform:`translateX(${s.start}px)`,height:l.size?`${l.size}px`:undefined}};if(a&&!s.itemIndex&&h.style){h.style.paddingLeft=`${j*a}px`}const c=this.columnService.mergeProperties(l.itemIndex,s.itemIndex,h,d);const v=e(G,{renderProps:{schemaModel:d,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:c});r.push(v)}let s=this.rowClass?this.columnService.getRowClass(t.itemIndex,this.rowClass):"";if(this.rowHighlightPlugin.isRowFocused(t.itemIndex)){s+=` ${C}`}const h=e(S,{index:t.itemIndex,rowClass:s,size:t.size,start:t.start},r);this.beforerowrender.emit({node:h,item:t,model:i,colType:this.columnService.type,rowType:this.type});n.push(h);this.renderedRows.set(t.itemIndex,h)}return e(r,null,e("slot",null),n)}triggerBeforeCellRender(e,t,i){const o={column:i,row:t,model:e,rowType:e.type,colType:e.colType};return this.beforeCellRender.emit(o)}get element(){return n(this)}static get watchers(){return{dataStore:["onDataStoreChange"],colData:["onColDataChange"]}}};A.style=Y;var J=function(){try{var e=m(Object,"defineProperty");e({},"",{});return e}catch(e){}}();const Q=J;function q(e,t,i){if(t=="__proto__"&&Q){Q(e,t,{configurable:true,enumerable:true,value:i,writable:true})}else{e[t]=i}}function K(e,t,i,o){var r=-1,n=e==null?0:e.length;while(++r<n){var s=e[r];t(o,s,i(s),e)}return o}function N(e,t,i,o){h(e,(function(e,r,n){t(o,e,i(e),n)}));return o}function ee(e,t){return function(i,o){var r=k(i)?K:N,n=t?t():{};return r(i,e,y(o),n)}}var te=ee((function(e,t,i){q(e,i,t)}));const ie=te;const oe=t=>{var i,o,r,n,s;const l={[v]:true,[E]:!!((i=t.data)===null||i===void 0?void 0:i.sortable)};if((o=t.data)===null||o===void 0?void 0:o.order){l[t.data.order]=true}const a={[L]:t.column.itemIndex,canResize:t.canResize,minWidth:((r=t.data)===null||r===void 0?void 0:r.minSize)||c,maxWidth:(n=t.data)===null||n===void 0?void 0:n.maxSize,active:t.active||["r"],class:l,style:{width:`${t.column.size}px`,transform:`translateX(${t.column.start}px)`},onResize:t.onResize,onDblClick(e){var i;(i=t.onDblClick)===null||i===void 0?void 0:i.call(t,{column:t.data,index:t.column.itemIndex,originalEvent:e,providers:t.data.providers})},onClick(e){if(e.defaultPrevented||!t.onClick){return}t.onClick({column:t.data,index:t.column.itemIndex,originalEvent:e,providers:t.data.providers})}};if(t.range){if(t.column.itemIndex>=t.range.x&&t.column.itemIndex<=t.range.x1){if(typeof a.class==="object"){a.class[z]=true}}}return e(O,{data:t.data,props:a,additionalData:t.additionalData},e(F,{column:t.data}),t.canFilter&&((s=t.data)===null||s===void 0?void 0:s.filter)!==false?e(D,{column:t.data}):"")};const re="@charset \"UTF-8\";.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-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";const ne=re;const se=class{constructor(e){i(this,e);this.initialHeaderClick=o(this,"beforeheaderclick",7);this.headerresize=o(this,"headerresize",7);this.beforeResize=o(this,"beforeheaderresize",7);this.headerdblClick=o(this,"headerdblclick",7);this.beforeHeaderRender=o(this,"beforeheaderrender",7);this.afterHeaderRender=o(this,"afterheaderrender",7);this.viewportCol=undefined;this.dimensionCol=undefined;this.selectionStore=undefined;this.groups=undefined;this.groupingDepth=0;this.readonly=undefined;this.canResize=undefined;this.resizeHandler=undefined;this.colData=undefined;this.columnFilter=undefined;this.type=undefined;this.additionalData={}}onResize({width:e},t){const i=this.colData[t];const o=this.beforeResize.emit([Object.assign(Object.assign({},i),{size:e||undefined})]);if(o.defaultPrevented){return}this.headerresize.emit({[t]:e||0})}onResizeGroup(e,t,i){const o={};const r=ie(this.viewportCol.get("items"),"itemIndex");const n=e/(i-t+1);for(let e=t;e<=i;e++){const t=r[e];if(t){o[e]=t.size+n}}this.headerresize.emit(o)}componentDidRender(){this.afterHeaderRender.emit(this.providers)}render(){var t;const i=this.viewportCol.get("items");const o=(t=this.selectionStore)===null||t===void 0?void 0:t.get("range");const r=[];const n={};for(let t of i){const i=this.colData[t.itemIndex];const s={range:o,column:t,data:Object.assign(Object.assign({},i),{index:t.itemIndex,providers:this.providers}),canFilter:!!this.columnFilter,canResize:this.canResize,active:this.resizeHandler,onResize:e=>this.onResize(e,t.itemIndex),onDblClick:e=>this.headerdblClick.emit(e),onClick:e=>this.initialHeaderClick.emit(e),additionalData:this.additionalData};const l=this.beforeHeaderRender.emit(s);if(l.defaultPrevented){continue}r.push(e(oe,Object.assign({},l.detail)));n[i===null||i===void 0?void 0:i.prop]=t.itemIndex}return[e("div",{key:"f01cf39610e7e66f7bf4fa09f52455875a940ced",class:"group-rgRow"},e(U,{key:"fa60d0aa9bb63d86f7e07ed7c1372207147a13c4",canResize:this.canResize,active:this.resizeHandler,visibleProps:n,providers:this.providers,groups:this.groups,dimensionCol:this.dimensionCol.state,depth:this.groupingDepth,onResize:(e,t,i)=>this.onResizeGroup(e,t,i),additionalData:this.additionalData})),e("div",{key:"65ab0e1d0ea5a548c7dc4abfda116beb29316b3d",class:`${u} ${R}`},r)]}get providers(){return{type:this.type,readonly:this.readonly,data:this.colData,viewport:this.viewportCol,dimension:this.dimensionCol,selection:this.selectionStore}}get element(){return n(this)}};se.style=ne;async function le(){if(!("ResizeObserver"in window)){const e=await import("./resize-observer-83c9e167.js");window.ResizeObserver=e.ResizeObserver}}class ae{constructor(e,t){this.events=t;this.resizeObserver=null;this.resize=M(((e,t)=>{var i;return(i=this.events)===null||i===void 0?void 0:i.resize(e,t)}),10);this.init(e)}async init(e){var t;await le();this.resizeObserver=new ResizeObserver(this.resize);(t=this.resizeObserver)===null||t===void 0?void 0:t.observe(e)}destroy(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.resizeObserver=null}}const de=".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}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.colPinEnd:has(.active){overflow:visible}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;outline:none;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}";const he=de;const ce=class{constructor(e){i(this,e);this.scrollViewport=o(this,"scrollviewport",7);this.resizeViewport=o(this,"resizeviewport",7);this.scrollchange=o(this,"scrollchange",7);this.silentScroll=o(this,"scrollviewportsilent",7);this.rowHeader=undefined;this.contentWidth=0;this.contentHeight=0;this.colType=undefined}async setScroll(e){var t;this.localScrollTimer.latestScrollUpdate(e.dimension);(t=this.localScrollService)===null||t===void 0?void 0:t.setScroll(e)}async changeScroll(e,t=false){var i,o;if(t){if(e.coordinate&&this.verticalScroll){switch(e.dimension){case"rgRow":this.verticalScroll.style.transform=`translateY(${-1*e.coordinate}px)`;break}}return}if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=((o=(i=this.verticalScroll)===null||i===void 0?void 0:i.scrollTop)!==null&&o!==void 0?o:0)+e.delta;break}this.setScroll(e)}return e}mousewheelVertical({detail:e}){this.verticalMouseWheel(e)}mousewheelHorizontal({detail:e}){this.horizontalMouseWheel(e)}scrollApply({detail:{type:e,coordinate:t}}){this.applyOnScroll(e,t,true)}connectedCallback(){this.verticalMouseWheel=this.onVerticalMouseWheel.bind(this,"rgRow","deltaY");this.horizontalMouseWheel=this.onHorizontalMouseWheel.bind(this,"rgCol","deltaX");this.localScrollTimer=new $("ontouchstart"in document.documentElement?0:10);this.localScrollService=new T({runScroll:e=>this.scrollViewport.emit(e),applyScroll:e=>{this.localScrollTimer.setCoordinate(e);switch(e.dimension){case"rgCol":this.horizontalScroll.scrollLeft=e.coordinate;break;case"rgRow":if(this.verticalScroll){this.verticalScroll.scrollTop=e.coordinate;if(this.verticalScroll.style.transform){this.verticalScroll.style.transform=""}}break}}})}componentDidLoad(){this.resizeService=new ae(this.horizontalScroll,{resize:e=>{var t,i,o,r,n,s,l,a,d;let h=((t=e[0])===null||t===void 0?void 0:t.contentRect.height)||0;if(h){h-=((o=(i=this.header)===null||i===void 0?void 0:i.clientHeight)!==null&&o!==void 0?o:0)+((n=(r=this.footer)===null||r===void 0?void 0:r.clientHeight)!==null&&n!==void 0?n:0)}const c={rgRow:{size:h,contentSize:this.contentHeight,scroll:(s=this.verticalScroll)===null||s===void 0?void 0:s.scrollTop,noScroll:false},rgCol:{size:((l=e[0])===null||l===void 0?void 0:l.contentRect.width)||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft,noScroll:this.colType!=="rgCol"}};for(const[e,t]of Object.entries(c)){const i=e;this.resizeViewport.emit({dimension:i,size:t.size,rowHeader:this.rowHeader});if(t.noScroll){continue}(a=this.localScrollService)===null||a===void 0?void 0:a.scroll((d=t.scroll)!==null&&d!==void 0?d:0,i,true);this.setScrollVisibility(i,t.size,t.contentSize)}}})}setScrollVisibility(e,t,i){const o=t<i;let r;switch(e){case"rgCol":r=this.horizontalScroll;break;case"rgRow":r=this.verticalScroll;break}if(o){r===null||r===void 0?void 0:r.classList.add(`scroll-${e}`)}else{r===null||r===void 0?void 0:r.classList.remove(`scroll-${e}`)}this.scrollchange.emit({type:e,hasScroll:o})}disconnectedCallback(){var e;(e=this.resizeService)===null||e===void 0?void 0:e.destroy()}async componentDidRender(){var e,t,i,o;this.localScrollService.setParams({contentSize:this.contentHeight,clientSize:(t=(e=this.verticalScroll)===null||e===void 0?void 0:e.clientHeight)!==null&&t!==void 0?t:0,virtualSize:0},"rgRow");this.localScrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol");this.setScrollVisibility("rgRow",(o=(i=this.verticalScroll)===null||i===void 0?void 0:i.clientHeight)!==null&&o!==void 0?o:0,this.contentHeight);this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){return e(r,{key:"9727a9c83d740d8184e12acc06b72c3f28c3b5ac",onWheel:this.horizontalMouseWheel,onScroll:e=>this.applyScroll("rgCol",e)},e("div",{key:"44551981dda7401ac9290d003b1ac7e7f55ee006",class:"inner-content-table",style:{width:`${this.contentWidth}px`}},e("div",{key:"8b4962c352e81c343aed7136b7f7a9d71b10ed70",class:"header-wrapper",ref:e=>this.header=e},e("slot",{key:"789868b91507bc50c18dc99c6bec8f1e4699cbab",name:P})),e("div",{key:"0efb49db3fbcbe0bdfcfa24afad495c681de6218",class:"vertical-inner",ref:e=>this.verticalScroll=e,onWheel:this.verticalMouseWheel,onScroll:e=>this.applyScroll("rgRow",e)},e("div",{key:"eef434a04062b364805702d73c0b28c9e44a27c5",class:"content-wrapper",style:{height:`${this.contentHeight}px`}},e("slot",{key:"8490b9f01abebeeaa46da811e9ecdc62090ecb00",name:W}))),e("div",{key:"c3c133d6e73816e9e3c33d5091fc00f959977874",class:"footer-wrapper",ref:e=>this.footer=e},e("slot",{key:"e4aae0a9eb10c750306a6bd4c222bcab6d1050e3",name:B}))))}async applyScroll(e,t){if(!(t.target instanceof HTMLElement)){return}let i=0;switch(e){case"rgCol":i=t.target.scrollLeft;break;case"rgRow":i=t.target.scrollTop;break}if(i<0){this.silentScroll.emit({dimension:e,coordinate:i});return}this.applyOnScroll(e,i)}applyOnScroll(e,t,i=false){var o;if(this.localScrollTimer.isReady(e,t)){(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(t,e,undefined,undefined,i)}}onVerticalMouseWheel(e,t,i){var o,r,n,s,l,a,d,h;const c=(r=(o=this.verticalScroll)===null||o===void 0?void 0:o.scrollTop)!==null&&r!==void 0?r:0;const v=(s=(n=this.verticalScroll)===null||n===void 0?void 0:n.clientHeight)!==null&&s!==void 0?s:0;const g=(a=(l=this.verticalScroll)===null||l===void 0?void 0:l.scrollHeight)!==null&&a!==void 0?a:0;const p=c+v>=g&&i.deltaY>0;const u=c===0&&i.deltaY<0;if(!p&&!u){(d=i.preventDefault)===null||d===void 0?void 0:d.call(i)}const C=c+i[t];(h=this.localScrollService)===null||h===void 0?void 0:h.scroll(C,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}onHorizontalMouseWheel(e,t,i){var o,r;if(!i.deltaX){return}const{scrollLeft:n,scrollWidth:s,clientWidth:l}=this.horizontalScroll;const a=n+l>=s&&i.deltaX>0;const d=n===0&&i.deltaX<0;if(!a&&!d){(o=i.preventDefault)===null||o===void 0?void 0:o.call(i)}const h=n+i[t];(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(h,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}get horizontalScroll(){return n(this)}};ce.style=he;const ve=class{constructor(e){i(this,e);this.html=o(this,"html",7);this.vnodes=[];this.redraw=null}componentDidRender(){this.html.emit({html:this.el.innerHTML,vnodes:this.vnodes})}render(){var t,i;this.vnodes=(i=(t=this.redraw)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:null;return e(r,{key:"73a019dbc046a9d4504bc84a80868e8023d1f502",style:{visibility:"hidden",position:"absolute"}},this.vnodes)}get el(){return n(this)}};export{A as revogr_data,se as revogr_header,ce as revogr_viewport_scroll,ve as vnode_html}; | ||
import{h as e,B as t,r as i,c as o,H as r,a as n}from"./index-f6fae858.js";import{O as s,z as l,M as a,s as d,I as h}from"./column.service-f39c0a1d.js";import{M as c,H as v,a7 as g,k as p,E as u,Q as f,G as C,I as b,b as w,x as L,y as x,a8 as m,Y as k,a4 as y,J as z,B as E,F as R}from"./dimension.helpers-5567e424.js";import{G as H,R as S,P as j,S as F}from"./sorting.sign-c02e3b12.js";import{c as D}from"./filter.button-84396156.js";import{H as O}from"./header-cell-renderer-31f53644.js";import{t as M,L as $,a as T}from"./throttle-dec28f5b.js";import{H as P,C as W,F as B}from"./viewport.helpers-7e7f9dad.js";import"./debounce-b3166f78.js";const _=t=>{const i={canResize:t.canResize,minWidth:t.group.ids.length*c,maxWidth:0,active:t.active||["r"],class:{[v]:true},style:{transform:`translateX(${t.start}px)`,width:`${t.end-t.start}px`},onResize:t.onResize};return e(O,{data:Object.assign(Object.assign({},t.group),{prop:"",providers:t.providers,index:t.start}),props:i,additionalData:t.additionalData})};const U=({additionalData:t,providers:i,depth:o,groups:r,visibleProps:n,dimensionCol:s,canResize:l,active:a,onResize:d})=>{const h=[];for(let c=0;c<o;c++){if(r[c]){for(let o of r[c]){const r=g(o.ids,(e=>typeof n[e]==="number"));if(r>-1){const c=n[o.ids[r]];const v=c-r;const g=v+o.ids.length-1;const u=p(s,v).start;const f=p(s,g).end;h.push(e(_,{providers:i,start:u,end:f,group:o,active:a,canResize:l,onResize:e=>{var t;return d((t=e.changedX)!==null&&t!==void 0?t:0,v,g)},additionalData:t}))}}}h.push(e("div",{class:`${u} group`}))}return h};class Z{constructor(){this.currentRange=null}selectionChange(e,t){if(this.currentRange){t.forEach(((t,i)=>{var o;if(e&&i>=e.y&&i<=e.y1){return}if(t&&t.t instanceof HTMLElement&&t.t.classList.contains(f)){t.t.classList.remove(f);if((o=t.i)===null||o===void 0?void 0:o.class.includes(f)){t.i.class=t.i.class.replace(f,"")}}}))}if(e){for(let i=e.y;i<=e.y1;i++){const e=t.get(i);if(e&&e.t instanceof HTMLElement&&!e.t.classList.contains(f)){const t=e.i=e.i||{};t.class=(t.class||"")+" "+f;e.t.classList.add(f)}}}this.currentRange=e}isRowFocused(e){return this.currentRange&&e>=this.currentRange.y&&e<=this.currentRange.y1}}function I(e,t){return new Promise((i=>{const o=document.createElement("vnode-html");e.appendChild(o);o.redraw=t;o.addEventListener("html",(e=>{o.remove();i(e.detail)}))}))}function X(i){var o;const r=[];const n=(o=i.schemaModel.column)===null||o===void 0?void 0:o.cellTemplate;if(n){r.push(n(e,i.schemaModel,i.additionalData))}else{if(!i.schemaModel.column){if(t===null||t===void 0?void 0:t.isDev){console.error("Investigate column problem.",i.schemaModel)}return""}if(i.schemaModel.column.rowDrag&&s(i.schemaModel.column.rowDrag,i.schemaModel)){r.push(e("span",{class:b,onMouseDown:e=>{var t;return(t=i.dragStartCell)===null||t===void 0?void 0:t.emit({originalEvent:e,model:i.schemaModel})}},e("span",{class:C})))}r.push(`${l(i.schemaModel.model,i.schemaModel.column)}`)}return r}const G=({renderProps:t,cellProps:i})=>{const o=X.bind(null,t);return e("div",Object.assign({},i,{redraw:o}),o())};const V=".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-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600;text-align:left}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent;vertical-align:middle;padding-left:5px}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";const Y=V;const A=class{constructor(e){i(this,e);this.beforerowrender=o(this,"beforerowrender",7);this.afterrender=o(this,"afterrender",7);this.beforeCellRender=o(this,"beforecellrender",7);this.beforeDataRender=o(this,"beforedatarender",7);this.dragStartCell=o(this,"dragstartcell",7);this.renderedRows=new Map;this.readonly=undefined;this.range=undefined;this.rowClass=undefined;this.additionalData=undefined;this.rowSelectionStore=undefined;this.viewportRow=undefined;this.viewportCol=undefined;this.dimensionRow=undefined;this.colData=undefined;this.dataStore=undefined;this.type=undefined;this.colType=undefined;this.jobsBeforeRender=[];this.providers=undefined}async updateCell(e){var t,i,o;const r=(i=(t=this.renderedRows.get(e.row))===null||t===void 0?void 0:t.o)===null||i===void 0?void 0:i[e.col];if((o=r===null||r===void 0?void 0:r.i)===null||o===void 0?void 0:o.redraw){const e=await I(this.element,r.i.redraw);r.t.innerHTML=e.html;r.l=Math.random()}}onDataStoreChange(){this.onStoreChange()}onColDataChange(){this.onStoreChange()}onStoreChange(){var e,t;(e=this.columnService)===null||e===void 0?void 0:e.destroy();this.columnService=new a(this.dataStore,this.colData);this.providers={type:this.type,readonly:this.readonly,data:this.dataStore,viewport:this.viewportCol,dimension:this.dimensionRow,selection:this.rowSelectionStore};(t=this.rangeUnsubscribe)===null||t===void 0?void 0:t.call(this);this.rangeUnsubscribe=this.rowSelectionStore.onChange("range",(e=>this.rowHighlightPlugin.selectionChange(e,this.renderedRows)))}connectedCallback(){this.rowHighlightPlugin=new Z;this.onStoreChange()}disconnectedCallback(){var e,t;(e=this.columnService)===null||e===void 0?void 0:e.destroy();(t=this.rangeUnsubscribe)===null||t===void 0?void 0:t.call(this)}async componentWillRender(){this.beforeDataRender.emit({rowType:this.type,colType:this.colType});return Promise.all(this.jobsBeforeRender.map((e=>typeof e==="function"?e():e)))}componentDidRender(){this.afterrender.emit({type:this.type})}render(){this.renderedRows=new Map;const t=this.columnService.columns;if(!t.length){return}const i=this.viewportRow.get("items");if(!i.length){return}const o=this.viewportCol.get("items");if(!o.length){return}const n=[];const s=this.dataStore.get("groupingDepth");const l=this.dataStore.get("groupingCustomRenderer");const a=this.columnService.hasGrouping?s:0;for(let t of i){const i=w(this.dataStore,t.itemIndex);if(d(i)){const o=Object.assign(Object.assign({},t),{index:t.itemIndex,model:i,groupingCustomRenderer:l,hasExpand:this.columnService.hasGrouping,providers:this.providers});n.push(e(H,Object.assign({},o)));continue}const r=[];for(let i of o){const o=Object.assign(Object.assign({},this.columnService.rowDataModel(t.itemIndex,i.itemIndex)),{providers:this.providers});const n=this.triggerBeforeCellRender(o,t,i);if(n.defaultPrevented){continue}const{detail:{column:s,row:l,model:d}}=n;const h={[L]:s.itemIndex,[x]:l.itemIndex,style:{width:`${s.size}px`,transform:`translateX(${s.start}px)`,height:l.size?`${l.size}px`:undefined}};if(a&&!s.itemIndex&&h.style){h.style.paddingLeft=`${j*a}px`}const c=this.columnService.mergeProperties(l.itemIndex,s.itemIndex,h,d);const v=e(G,{renderProps:{schemaModel:d,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:c});r.push(v)}let s=this.rowClass?this.columnService.getRowClass(t.itemIndex,this.rowClass):"";if(this.rowHighlightPlugin.isRowFocused(t.itemIndex)){s+=` ${f}`}const h=e(S,{index:t.itemIndex,rowClass:s,size:t.size,start:t.start},r);this.beforerowrender.emit({node:h,item:t,model:i,colType:this.columnService.type,rowType:this.type});n.push(h);this.renderedRows.set(t.itemIndex,h)}return e(r,null,e("slot",null),n)}triggerBeforeCellRender(e,t,i){const o={column:i,row:t,model:e,rowType:e.type,colType:e.colType};return this.beforeCellRender.emit(o)}get element(){return n(this)}static get watchers(){return{dataStore:["onDataStoreChange"],colData:["onColDataChange"]}}};A.style=Y;var J=function(){try{var e=m(Object,"defineProperty");e({},"",{});return e}catch(e){}}();const Q=J;function q(e,t,i){if(t=="__proto__"&&Q){Q(e,t,{configurable:true,enumerable:true,value:i,writable:true})}else{e[t]=i}}function K(e,t,i,o){var r=-1,n=e==null?0:e.length;while(++r<n){var s=e[r];t(o,s,i(s),e)}return o}function N(e,t,i,o){h(e,(function(e,r,n){t(o,e,i(e),n)}));return o}function ee(e,t){return function(i,o){var r=k(i)?K:N,n=t?t():{};return r(i,e,y(o),n)}}var te=ee((function(e,t,i){q(e,i,t)}));const ie=te;const oe=t=>{var i,o,r,n,s;const l={[v]:true,[E]:!!((i=t.data)===null||i===void 0?void 0:i.sortable)};if((o=t.data)===null||o===void 0?void 0:o.order){l[t.data.order]=true}const a={[L]:t.column.itemIndex,canResize:t.canResize,minWidth:((r=t.data)===null||r===void 0?void 0:r.minSize)||c,maxWidth:(n=t.data)===null||n===void 0?void 0:n.maxSize,active:t.active||["r"],class:l,style:{width:`${t.column.size}px`,transform:`translateX(${t.column.start}px)`},onResize:t.onResize,onDblClick(e){var i;(i=t.onDblClick)===null||i===void 0?void 0:i.call(t,{column:t.data,index:t.column.itemIndex,originalEvent:e,providers:t.data.providers})},onClick(e){if(e.defaultPrevented||!t.onClick){return}t.onClick({column:t.data,index:t.column.itemIndex,originalEvent:e,providers:t.data.providers})}};if(t.range){if(t.column.itemIndex>=t.range.x&&t.column.itemIndex<=t.range.x1){if(typeof a.class==="object"){a.class[z]=true}}}return e(O,{data:t.data,props:a,additionalData:t.additionalData},e(F,{column:t.data}),t.canFilter&&((s=t.data)===null||s===void 0?void 0:s.filter)!==false?e(D,{column:t.data}):"")};const re="@charset \"UTF-8\";.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-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";const ne=re;const se=class{constructor(e){i(this,e);this.initialHeaderClick=o(this,"beforeheaderclick",7);this.headerresize=o(this,"headerresize",7);this.beforeResize=o(this,"beforeheaderresize",7);this.headerdblClick=o(this,"headerdblclick",7);this.beforeHeaderRender=o(this,"beforeheaderrender",7);this.afterHeaderRender=o(this,"afterheaderrender",7);this.viewportCol=undefined;this.dimensionCol=undefined;this.selectionStore=undefined;this.groups=undefined;this.groupingDepth=0;this.readonly=undefined;this.canResize=undefined;this.resizeHandler=undefined;this.colData=undefined;this.columnFilter=undefined;this.type=undefined;this.additionalData={}}onResize({width:e},t){const i=this.colData[t];const o=this.beforeResize.emit([Object.assign(Object.assign({},i),{size:e||undefined})]);if(o.defaultPrevented){return}this.headerresize.emit({[t]:e||0})}onResizeGroup(e,t,i){const o={};const r=ie(this.viewportCol.get("items"),"itemIndex");const n=e/(i-t+1);for(let e=t;e<=i;e++){const t=r[e];if(t){o[e]=t.size+n}}this.headerresize.emit(o)}componentDidRender(){this.afterHeaderRender.emit(this.providers)}render(){var t;const i=this.viewportCol.get("items");const o=(t=this.selectionStore)===null||t===void 0?void 0:t.get("range");const r=[];const n={};for(let t of i){const i=this.colData[t.itemIndex];const s={range:o,column:t,data:Object.assign(Object.assign({},i),{index:t.itemIndex,providers:this.providers}),canFilter:!!this.columnFilter,canResize:this.canResize,active:this.resizeHandler,onResize:e=>this.onResize(e,t.itemIndex),onDblClick:e=>this.headerdblClick.emit(e),onClick:e=>this.initialHeaderClick.emit(e),additionalData:this.additionalData};const l=this.beforeHeaderRender.emit(s);if(l.defaultPrevented){continue}r.push(e(oe,Object.assign({},l.detail)));n[i===null||i===void 0?void 0:i.prop]=t.itemIndex}return[e("div",{key:"f01cf39610e7e66f7bf4fa09f52455875a940ced",class:"group-rgRow"},e(U,{key:"fa60d0aa9bb63d86f7e07ed7c1372207147a13c4",canResize:this.canResize,active:this.resizeHandler,visibleProps:n,providers:this.providers,groups:this.groups,dimensionCol:this.dimensionCol.state,depth:this.groupingDepth,onResize:(e,t,i)=>this.onResizeGroup(e,t,i),additionalData:this.additionalData})),e("div",{key:"65ab0e1d0ea5a548c7dc4abfda116beb29316b3d",class:`${u} ${R}`},r)]}get providers(){return{type:this.type,readonly:this.readonly,data:this.colData,viewport:this.viewportCol,dimension:this.dimensionCol,selection:this.selectionStore}}get element(){return n(this)}};se.style=ne;async function le(){if(!("ResizeObserver"in window)){const e=await import("./resize-observer-83c9e167.js");window.ResizeObserver=e.ResizeObserver}}class ae{constructor(e,t){this.resize=t;this.resizeObserver=null;this.previousSize={width:0,height:0};this.apply=M((e=>{var t;if(!e.length){return}const i={width:e[0].contentRect.width,height:e[0].contentRect.height};(t=this.resize)===null||t===void 0?void 0:t.call(this,i,this.previousSize);this.previousSize=i}),10);this.init(e)}async init(e){var t;await le();this.resizeObserver=new ResizeObserver(this.apply);(t=this.resizeObserver)===null||t===void 0?void 0:t.observe(e)}destroy(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.resizeObserver=null}}const de=".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}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.colPinEnd:has(.active){overflow:visible}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;outline:none;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}";const he=de;const ce=class{constructor(e){i(this,e);this.scrollViewport=o(this,"scrollviewport",7);this.resizeViewport=o(this,"resizeviewport",7);this.scrollchange=o(this,"scrollchange",7);this.silentScroll=o(this,"scrollviewportsilent",7);this.rowHeader=undefined;this.contentWidth=0;this.contentHeight=0;this.colType=undefined}async setScroll(e){var t;this.localScrollTimer.latestScrollUpdate(e.dimension);(t=this.localScrollService)===null||t===void 0?void 0:t.setScroll(e)}async changeScroll(e,t=false){var i,o;if(t){if(e.coordinate&&this.verticalScroll){switch(e.dimension){case"rgRow":this.verticalScroll.style.transform=`translateY(${-1*e.coordinate}px)`;break}}return}if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=((o=(i=this.verticalScroll)===null||i===void 0?void 0:i.scrollTop)!==null&&o!==void 0?o:0)+e.delta;break}this.setScroll(e)}return e}mousewheelVertical({detail:e}){this.verticalMouseWheel(e)}mousewheelHorizontal({detail:e}){this.horizontalMouseWheel(e)}scrollApply({detail:{type:e,coordinate:t}}){this.applyOnScroll(e,t,true)}connectedCallback(){this.verticalMouseWheel=this.onVerticalMouseWheel.bind(this,"rgRow","deltaY");this.horizontalMouseWheel=this.onHorizontalMouseWheel.bind(this,"rgCol","deltaX");this.localScrollTimer=new $("ontouchstart"in document.documentElement?0:10);this.localScrollService=new T({runScroll:e=>this.scrollViewport.emit(e),applyScroll:e=>{this.localScrollTimer.setCoordinate(e);switch(e.dimension){case"rgCol":this.horizontalScroll.scrollLeft=e.coordinate;break;case"rgRow":if(this.verticalScroll){this.verticalScroll.scrollTop=e.coordinate;if(this.verticalScroll.style.transform){this.verticalScroll.style.transform=""}}break}}})}componentDidLoad(){this.resizeService=new ae(this.horizontalScroll,((e,t)=>{var i,o,r,n,s,l,a,d;const h={};if(e.height!==t.height){let t=e.height||0;if(t){t-=((o=(i=this.header)===null||i===void 0?void 0:i.clientHeight)!==null&&o!==void 0?o:0)+((n=(r=this.footer)===null||r===void 0?void 0:r.clientHeight)!==null&&n!==void 0?n:0)}h.rgRow={size:t,contentSize:this.contentHeight,scroll:(l=(s=this.verticalScroll)===null||s===void 0?void 0:s.scrollTop)!==null&&l!==void 0?l:0,noScroll:false}}if(e.width!==t.width){h.rgCol={size:e.width||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft,noScroll:this.colType!=="rgCol"}}for(const[e,t]of Object.entries(h)){const i=e;this.resizeViewport.emit({dimension:i,size:t.size,rowHeader:this.rowHeader});if(t.noScroll){continue}(a=this.localScrollService)===null||a===void 0?void 0:a.scroll((d=t.scroll)!==null&&d!==void 0?d:0,i,true);this.setScrollVisibility(i,t.size,t.contentSize)}}))}setScrollVisibility(e,t,i){const o=t<i;let r;switch(e){case"rgCol":r=this.horizontalScroll;break;case"rgRow":r=this.verticalScroll;break}if(o){r===null||r===void 0?void 0:r.classList.add(`scroll-${e}`)}else{r===null||r===void 0?void 0:r.classList.remove(`scroll-${e}`)}this.scrollchange.emit({type:e,hasScroll:o})}disconnectedCallback(){var e;(e=this.resizeService)===null||e===void 0?void 0:e.destroy()}async componentDidRender(){var e,t,i,o;this.localScrollService.setParams({contentSize:this.contentHeight,clientSize:(t=(e=this.verticalScroll)===null||e===void 0?void 0:e.clientHeight)!==null&&t!==void 0?t:0,virtualSize:0},"rgRow");this.localScrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol");this.setScrollVisibility("rgRow",(o=(i=this.verticalScroll)===null||i===void 0?void 0:i.clientHeight)!==null&&o!==void 0?o:0,this.contentHeight);this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){return e(r,{key:"970ac2365588d1c894d9684113eb9beaf64e1a1d",onWheel:this.horizontalMouseWheel,onScroll:e=>this.applyScroll("rgCol",e)},e("div",{key:"dc57aab1bde4496e83131d80a7e189db25b93312",class:"inner-content-table",style:{width:`${this.contentWidth}px`}},e("div",{key:"bd014cf0a67bb913016f00f7838344611a1b26df",class:"header-wrapper",ref:e=>this.header=e},e("slot",{key:"772eb408b6ea670624cc338550215565ec36ef89",name:P})),e("div",{key:"5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b",class:"vertical-inner",ref:e=>this.verticalScroll=e,onWheel:this.verticalMouseWheel,onScroll:e=>this.applyScroll("rgRow",e)},e("div",{key:"b45f46aedefe82843b086cdca822e05339a77fda",class:"content-wrapper",style:{height:`${this.contentHeight}px`}},e("slot",{key:"8d07196c79741ace0f4c734138d69abdf96fee4f",name:W}))),e("div",{key:"f6313f9394e99a3ad07895ed06e965540268b35a",class:"footer-wrapper",ref:e=>this.footer=e},e("slot",{key:"b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4",name:B}))))}async applyScroll(e,t){if(!(t.target instanceof HTMLElement)){return}let i=0;switch(e){case"rgCol":i=t.target.scrollLeft;break;case"rgRow":i=t.target.scrollTop;break}if(i<0){this.silentScroll.emit({dimension:e,coordinate:i});return}this.applyOnScroll(e,i)}applyOnScroll(e,t,i=false){var o;if(this.localScrollTimer.isReady(e,t)){(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(t,e,undefined,undefined,i)}}onVerticalMouseWheel(e,t,i){var o,r,n,s,l,a,d,h;const c=(r=(o=this.verticalScroll)===null||o===void 0?void 0:o.scrollTop)!==null&&r!==void 0?r:0;const v=(s=(n=this.verticalScroll)===null||n===void 0?void 0:n.clientHeight)!==null&&s!==void 0?s:0;const g=(a=(l=this.verticalScroll)===null||l===void 0?void 0:l.scrollHeight)!==null&&a!==void 0?a:0;const p=c+v>=g&&i.deltaY>0;const u=c===0&&i.deltaY<0;if(!p&&!u){(d=i.preventDefault)===null||d===void 0?void 0:d.call(i)}const f=c+i[t];(h=this.localScrollService)===null||h===void 0?void 0:h.scroll(f,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}onHorizontalMouseWheel(e,t,i){var o,r;if(!i.deltaX){return}const{scrollLeft:n,scrollWidth:s,clientWidth:l}=this.horizontalScroll;const a=n+l>=s&&i.deltaX>0;const d=n===0&&i.deltaX<0;if(!a&&!d){(o=i.preventDefault)===null||o===void 0?void 0:o.call(i)}const h=n+i[t];(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(h,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}get horizontalScroll(){return n(this)}};ce.style=he;const ve=class{constructor(e){i(this,e);this.html=o(this,"html",7);this.vnodes=[];this.redraw=null}componentDidRender(){this.html.emit({html:this.el.innerHTML,vnodes:this.vnodes})}render(){var t,i;this.vnodes=(i=(t=this.redraw)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:null;return e(r,{key:"73a019dbc046a9d4504bc84a80868e8023d1f502",style:{visibility:"hidden",position:"absolute"}},this.vnodes)}get el(){return n(this)}};export{A as revogr_data,se as revogr_header,ce as revogr_viewport_scroll,ve as vnode_html}; | ||
//# sourceMappingURL=revogr-data_4.entry.js.map |
@@ -1,9 +0,11 @@ | ||
interface Events { | ||
resize(entries: ReadonlyArray<ResizeObserverEntry>, observer: ResizeObserver): void; | ||
} | ||
type ResizeEntry = { | ||
width: number; | ||
height: number; | ||
}; | ||
export default class GridResizeService { | ||
private events; | ||
private readonly resize; | ||
private resizeObserver; | ||
private resize; | ||
constructor(el: HTMLElement, events: Events); | ||
private previousSize; | ||
private readonly apply; | ||
constructor(el: HTMLElement, resize: (entry: ResizeEntry, previousSize: ResizeEntry) => void); | ||
init(el: HTMLElement): Promise<void>; | ||
@@ -10,0 +12,0 @@ destroy(): void; |
@@ -18,3 +18,3 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
* Enable row header | ||
*/ | ||
*/ | ||
readonly rowHeader: boolean; | ||
@@ -48,3 +48,3 @@ /** | ||
* Made to align negative coordinates for mobile devices | ||
*/ | ||
*/ | ||
silentScroll: EventEmitter<ViewPortScrollEvent>; | ||
@@ -51,0 +51,0 @@ horizontalScroll: HTMLElement; |
@@ -23,3 +23,3 @@ import { EventEmitter, type VNode } from '../../stencil-public-runtime'; | ||
filterEntities: Record<string, LogicFunction>; | ||
filterCaptions: FilterCaptions | undefined; | ||
filterCaptions: Partial<FilterCaptions> | undefined; | ||
/** | ||
@@ -26,0 +26,0 @@ * Disables dynamic filtering. A way to apply filters on Save only |
@@ -7,7 +7,7 @@ import type { ColumnProp, ColumnRegular } from "../../types/index"; | ||
export type LogicFunctionExtraParam = 'select' | 'input' | 'multi' | 'datepicker' | number | Date | DateEnum | null | undefined | string | string[] | number[]; | ||
export type LogicFunction<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> = { | ||
export interface LogicFunction<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> { | ||
(value: T1, extra?: T2): boolean; | ||
extra?: ExtraField; | ||
}; | ||
export type CustomFilter<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> = { | ||
} | ||
export interface CustomFilter<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> { | ||
/** | ||
@@ -25,4 +25,4 @@ * Property defined in column { filter: string/number/abstract/enum...etc } | ||
func: LogicFunction<T1, T2>; | ||
}; | ||
export type FilterCaptions = { | ||
} | ||
export interface FilterCaptions { | ||
title: string; | ||
@@ -37,5 +37,5 @@ save: string; | ||
or: string; | ||
}; | ||
} | ||
export interface FilterLocalization { | ||
captions: FilterCaptions; | ||
captions: Partial<FilterCaptions>; | ||
filterNames: Record<FilterType, string>; | ||
@@ -81,8 +81,8 @@ } | ||
}; | ||
export type FilterItem = { | ||
export interface FilterItem { | ||
prop?: ColumnProp; | ||
type?: FilterType; | ||
value?: any; | ||
}; | ||
export type FilterData = { | ||
} | ||
export interface FilterData { | ||
id: number; | ||
@@ -105,7 +105,7 @@ /** | ||
relation?: 'and' | 'or'; | ||
}; | ||
export type MultiFilterItem = { | ||
} | ||
export interface MultiFilterItem { | ||
[prop: string]: FilterData[]; | ||
}; | ||
export type ShowData = { | ||
} | ||
export interface ShowData extends FilterItem, Omit<ColumnRegular, 'filter'> { | ||
x: number; | ||
@@ -121,2 +121,2 @@ y: number; | ||
extraContent?: (data: ShowData) => any; | ||
} & FilterItem & Omit<ColumnRegular, 'filter'>; | ||
} |
@@ -77,3 +77,3 @@ import type { VNode } from '../stencil-public-runtime'; | ||
*/ | ||
export type ColumnGrouping<T = any> = { | ||
export interface ColumnGrouping<T = any> { | ||
/** | ||
@@ -87,3 +87,3 @@ * An array of objects that represent the children of the grouping. | ||
name: DataFormat<T>; | ||
}; | ||
} | ||
/** | ||
@@ -732,12 +732,12 @@ * Configuration for header inner template properties | ||
/** Range paste. */ | ||
export type RangeClipboardPasteEvent = { | ||
export interface RangeClipboardPasteEvent extends AllDimensionType { | ||
data: DataLookup; | ||
models: Partial<DataLookup>; | ||
range: RangeArea | null; | ||
} & AllDimensionType; | ||
} | ||
/** Range copy. */ | ||
export type RangeClipboardCopyEventProps<T = any> = { | ||
export interface RangeClipboardCopyEventProps<T = any> extends AllDimensionType { | ||
data: DataFormat<T>[][]; | ||
range: RangeArea; | ||
mapping: OldNewRangeMapping; | ||
} & AllDimensionType; | ||
} |
{ | ||
"name": "@revolist/revogrid", | ||
"version": "4.12.5", | ||
"version": "4.12.6", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Virtual reactive data grid spreadsheet component - RevoGrid.", |
@@ -18,2 +18,5 @@ /*! | ||
function getContentSize(contentSize, clientSize, virtualSize = 0) { | ||
if (virtualSize > contentSize) { | ||
return 0; | ||
} | ||
return contentSize + (virtualSize ? clientSize - virtualSize : 0); | ||
@@ -20,0 +23,0 @@ } |
@@ -129,11 +129,27 @@ /*! | ||
const type = this.dimension === 'rgRow' ? 'scrollHeight' : 'scrollWidth'; | ||
if (this.element[type] > this.size) { | ||
this.size = this.scrollSize; | ||
// Get scrollbar size once during component initialization | ||
const scrollbarSize = this.scrollSize; | ||
// Calculate if content exceeds viewport size | ||
// Add scrollbar size to the comparison to account for other dimension's scrollbar | ||
const hasScroll = this.element[type] > this.size + scrollbarSize; | ||
// Set scroll size based on whether scroll is needed | ||
this.size = hasScroll ? this.scrollSize : 0; | ||
let additionalScrollbarSize = 0; | ||
if (this.dimension === 'rgRow') { | ||
additionalScrollbarSize = | ||
this.element.scrollWidth > this.element.clientWidth | ||
? scrollbarSize | ||
: 0; | ||
} | ||
else { | ||
this.size = 0; | ||
additionalScrollbarSize = | ||
this.element.scrollHeight > this.element.clientHeight | ||
? scrollbarSize | ||
: 0; | ||
} | ||
const clientSize = this.size + additionalScrollbarSize; | ||
this.localScrollService.setParams({ | ||
contentSize: this.dimensionStore.get('realSize'), | ||
clientSize: this.size, | ||
// Add scrollbar size to clientSize if other dimension has scroll | ||
clientSize, | ||
virtualSize: this.viewportStore.get('clientSize'), | ||
@@ -159,5 +175,4 @@ }, this.dimension); | ||
const sizeType = this.dimension === 'rgRow' ? 'height' : 'width'; | ||
const size = getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('clientSize') // content viewport size | ||
); | ||
return (h(Host, { key: '2d11902403db45b805bde88b6fc40acff4b6b910', onScroll: (e) => this.onScroll(e) }, h("div", { key: '74978e90cbf66e3fb6dcc25bd5882346f1515c39', style: { | ||
const size = getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('clientSize')); | ||
return (h(Host, { key: '7789bd408d3e154836bcd2aed4ebaa1663e7f968', onScroll: (e) => this.onScroll(e) }, h("div", { key: '40549da97df3a580ad2ddef13fe7b4dbe6df54bc', style: { | ||
[sizeType]: `${size}px`, | ||
@@ -164,0 +179,0 @@ } }))); |
@@ -62,6 +62,21 @@ /*! | ||
class GridResizeService { | ||
constructor(el, events) { | ||
this.events = events; | ||
constructor(el, resize) { | ||
this.resize = resize; | ||
this.resizeObserver = null; | ||
this.resize = throttle((e, o) => { var _a; return (_a = this.events) === null || _a === void 0 ? void 0 : _a.resize(e, o); }, 10); | ||
this.previousSize = { | ||
width: 0, | ||
height: 0, | ||
}; | ||
this.apply = throttle((e) => { | ||
var _a; | ||
if (!e.length) { | ||
return; | ||
} | ||
const entry = { | ||
width: e[0].contentRect.width, | ||
height: e[0].contentRect.height, | ||
}; | ||
(_a = this.resize) === null || _a === void 0 ? void 0 : _a.call(this, entry, this.previousSize); | ||
this.previousSize = entry; | ||
}, 10); | ||
this.init(el); | ||
@@ -72,3 +87,3 @@ } | ||
await resizeObserver(); | ||
this.resizeObserver = new ResizeObserver(this.resize); | ||
this.resizeObserver = new ResizeObserver(this.apply); | ||
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); | ||
@@ -190,34 +205,41 @@ } | ||
// track horizontal viewport resize | ||
this.resizeService = new GridResizeService(this.horizontalScroll, { | ||
resize: entries => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j; | ||
let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0; | ||
this.resizeService = new GridResizeService(this.horizontalScroll, (entry, previousSize) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const els = {}; | ||
if (entry.height !== previousSize.height) { | ||
let height = entry.height || 0; | ||
if (height) { | ||
height -= ((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.clientHeight) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.footer) === null || _d === void 0 ? void 0 : _d.clientHeight) !== null && _e !== void 0 ? _e : 0); | ||
height -= | ||
((_b = (_a = this.header) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0) + | ||
((_d = (_c = this.footer) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0); | ||
} | ||
const els = { | ||
rgRow: { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop, | ||
noScroll: false, | ||
}, | ||
rgCol: { | ||
size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}, | ||
els.rgRow = { | ||
size: height, | ||
contentSize: this.contentHeight, | ||
scroll: (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0, | ||
noScroll: false, | ||
}; | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader }); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
(_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
if (entry.width !== previousSize.width) { | ||
els.rgCol = { | ||
size: entry.width || 0, | ||
contentSize: this.contentWidth, | ||
scroll: this.horizontalScroll.scrollLeft, | ||
noScroll: this.colType !== 'rgCol', | ||
}; | ||
} | ||
for (const [dim, item] of Object.entries(els)) { | ||
const dimension = dim; | ||
this.resizeViewport.emit({ | ||
dimension, | ||
size: item.size, | ||
rowHeader: this.rowHeader, | ||
}); | ||
if (item.noScroll) { | ||
continue; | ||
} | ||
}, | ||
(_g = this.localScrollService) === null || _g === void 0 ? void 0 : _g.scroll((_h = item.scroll) !== null && _h !== void 0 ? _h : 0, dimension, true); | ||
// track scroll visibility on outer element change | ||
this.setScrollVisibility(dimension, item.size, item.contentSize); | ||
} | ||
}); | ||
@@ -275,3 +297,3 @@ } | ||
render() { | ||
return (h(Host, { key: '9727a9c83d740d8184e12acc06b72c3f28c3b5ac', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: '44551981dda7401ac9290d003b1ac7e7f55ee006', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: '8b4962c352e81c343aed7136b7f7a9d71b10ed70', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '789868b91507bc50c18dc99c6bec8f1e4699cbab', name: HEADER_SLOT })), h("div", { key: '0efb49db3fbcbe0bdfcfa24afad495c681de6218', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'eef434a04062b364805702d73c0b28c9e44a27c5', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8490b9f01abebeeaa46da811e9ecdc62090ecb00', name: CONTENT_SLOT }))), h("div", { key: 'c3c133d6e73816e9e3c33d5091fc00f959977874', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'e4aae0a9eb10c750306a6bd4c222bcab6d1050e3', name: FOOTER_SLOT }))))); | ||
return (h(Host, { key: '970ac2365588d1c894d9684113eb9beaf64e1a1d', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: 'dc57aab1bde4496e83131d80a7e189db25b93312', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: 'bd014cf0a67bb913016f00f7838344611a1b26df', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '772eb408b6ea670624cc338550215565ec36ef89', name: HEADER_SLOT })), h("div", { key: '5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'b45f46aedefe82843b086cdca822e05339a77fda', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8d07196c79741ace0f4c734138d69abdf96fee4f', name: CONTENT_SLOT }))), h("div", { key: 'f6313f9394e99a3ad07895ed06e965540268b35a', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4', name: FOOTER_SLOT }))))); | ||
} | ||
@@ -324,3 +346,3 @@ /** | ||
// Detect if the user has reached the bottom | ||
const atBottom = (scrollTop + clientHeight >= scrollHeight) && e.deltaY > 0; | ||
const atBottom = scrollTop + clientHeight >= scrollHeight && e.deltaY > 0; | ||
const atTop = scrollTop === 0 && e.deltaY < 0; | ||
@@ -347,3 +369,3 @@ if (!atBottom && !atTop) { | ||
// Detect if the user has reached the right end | ||
const atRight = (scrollLeft + clientWidth >= scrollWidth) && e.deltaX > 0; | ||
const atRight = scrollLeft + clientWidth >= scrollWidth && e.deltaX > 0; | ||
// Detect if the user has reached the left end | ||
@@ -350,0 +372,0 @@ const atLeft = scrollLeft === 0 && e.deltaX < 0; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11587358
147610