@revolist/revogrid 4.9.0 → 4.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -498,16 +498,29 @@ const HeaderRenderer = (p) => {
498
498
  maxWidth: (_d = p.data) === null || _d === void 0 ? void 0 : _d.maxSize,
499
499
  active: p.active || ['r'],
500
500
  class: cellClass,
501
- style: { width: `${p.column.size}px`, transform: `translateX(${p.column.start}px)` },
501
+ style: {
502
+ width: `${p.column.size}px`,
503
+ transform: `translateX(${p.column.start}px)`,
504
+ },
502
505
  onResize: p.onResize,
503
506
  onDoubleClick(originalEvent) {
504
- p.onDoubleClick({ column: p.data, index: p.column.itemIndex, originalEvent });
507
+ p.onDoubleClick({
508
+ column: p.data,
509
+ index: p.column.itemIndex,
510
+ originalEvent,
511
+ providers: p.data.providers,
512
+ });
505
513
  },
506
514
  onClick(originalEvent) {
507
515
  if (originalEvent.defaultPrevented || !p.onClick) {
508
516
  return;
509
517
  }
510
- p.onClick({ column: p.data, index: p.column.itemIndex, originalEvent });
518
+ p.onClick({
519
+ column: p.data,
520
+ index: p.column.itemIndex,
521
+ originalEvent,
522
+ providers: p.data.providers,
523
+ });
511
524
  },
512
525
  };
513
526
  if (p.range) {
@@ -519,7 +532,7 @@ const HeaderRenderer = (p) => {
519
532
  }
520
533
  return (index$1.h(headerCellRenderer.HeaderCellRenderer, { data: p.data, props: dataProps, additionalData: p.additionalData },
521
534
  index$1.h(SortingSign, { column: p.data }),
522
- p.canFilter && ((_e = p.data) === null || _e === void 0 ? void 0 : _e.filter) !== false ? index$1.h(filter_button.FilterButton, { column: p.data }) : ''));
535
+ p.canFilter && ((_e = p.data) === null || _e === void 0 ? void 0 : _e.filter) !== false ? (index$1.h(filter_button.FilterButton, { column: p.data })) : ('')));
523
536
  };
524
537
 
525
538
  const GroupHeaderRenderer = (p) => {
@@ -1 +1 @@
1
- {"file":"revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.cjs.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AM;SACpB,CAAC,CAAC;KACJ;IAED,MAAM;;QACJ,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,oDAAI,CAAC;QAC9B,QACEzC,UAACe,YAAI,qDACH,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAEpD,IAAI,CAAC,MAAM,CACP,EACP;KACH;;;;;;;;;","names":["index","DATA_ROW","h","GROUP_EXPAND_EVENT","PSEUDO_GROUP_ITEM","GROUP_EXPANDED","GROUP_DEPTH","GROUP_EXPAND_BTN","ROW_FOCUSED_CLASS","isRowDragService","DRAGGABLE_CLASS","DRAG_ICON_CLASS","getCellData","ColumnService","getSourceItem","isGrouping","DATA_COL","Host","require$$0","defineProperty","baseAssignValue","arrayAggregator","baseAggregator","require$$1","require$$2","require$$3","createAggregator","HEADER_CLASS","HEADER_SORTABLE_CLASS","MIN_COL_SIZE","FOCUS_CLASS","HeaderCellRenderer","FilterButton","findIndex","getItemByIndex","HEADER_ROW_CLASS","keyBy","HEADER_ACTUAL_ROW_CLASS","throttle","LocalScrollTimer","LocalScrollService","HEADER_SLOT","CONTENT_SLOT","FOOTER_SLOT"],"sources":["src/components/data/row-renderer.tsx","src/plugins/groupingRow/grouping.row.renderer.tsx","src/components/data/row-highlight.plugin.ts","src/components/vnode/vnode.utils.ts","src/components/data/cell-renderer.tsx","src/components/data/revogr-data-style.scss?tag=revogr-data","src/components/data/revogr-data.tsx","node_modules/lodash/_defineProperty.js","node_modules/lodash/_baseAssignValue.js","node_modules/lodash/_arrayAggregator.js","node_modules/lodash/_baseAggregator.js","node_modules/lodash/_createAggregator.js","node_modules/lodash/keyBy.js","src/plugins/sorting/sorting.sign.tsx","src/components/header/header-renderer.tsx","src/plugins/groupingColumn/headerGroupRenderer.tsx","src/plugins/groupingColumn/columnGroupsRenderer.tsx","src/components/header/revogr-header-style.scss?tag=revogr-header","src/components/header/revogr-header.tsx","src/utils/resize-observer.polifill.ts","src/components/revoGrid/viewport.resize.service.ts","src/components/scroll/revogr-viewport-scroll-style.scss?tag=revogr-viewport-scroll","src/components/scroll/revogr-viewport-scroll.tsx","src/components/vnode/vnode-converter.tsx"],"sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { JSXBase } from '@stencil/core/internal';\nimport { DATA_ROW } from '../../utils/consts';\n\nexport interface RowProps extends JSXBase.HTMLAttributes {\n size: number;\n start: number;\n index: number;\n rowClass?: string;\n depth?: number;\n}\n\nexport const PADDING_DEPTH = 10;\n\nconst RowRenderer = ({ rowClass, index, size, start, depth }: RowProps, cells: VNode[]) => {\n const props = {\n ...{ [DATA_ROW]: index },\n };\n return (\n <div\n {...props}\n class={`rgRow ${rowClass || ''}`}\n style={{\n height: `${size}px`,\n transform: `translateY(${start}px)`,\n paddingLeft: depth ? `${PADDING_DEPTH * depth}px` : undefined,\n }}\n >\n {cells}\n </div>\n );\n};\n\nexport default RowRenderer;\n","import { h } from '@stencil/core';\nimport RowRenderer, { RowProps } from '../../components/data/row-renderer';\nimport { GROUP_DEPTH, GROUP_EXPANDED, GROUP_EXPAND_BTN, GROUP_EXPAND_EVENT, PSEUDO_GROUP_ITEM } from './grouping.const';\nimport { GroupLabelTemplateFunc } from './grouping.row.types';\nimport { DataType, PositionItem } from '@type';\n\ninterface GroupRowPros extends RowProps {\n model: DataType;\n hasExpand: boolean;\n groupingCustomRenderer?: GroupLabelTemplateFunc | null;\n}\ntype Props = GroupRowPros & PositionItem;\n\nfunction expandEvent(e: MouseEvent, model: DataType, virtualIndex: number) {\n const event = new CustomEvent(GROUP_EXPAND_EVENT, {\n detail: {\n model,\n virtualIndex,\n },\n cancelable: true,\n bubbles: true,\n });\n e.target?.dispatchEvent(event);\n}\n\nconst GroupingRowRenderer = (props: Props) => {\n const { model, itemIndex, hasExpand, groupingCustomRenderer } = props;\n const name: string = model[PSEUDO_GROUP_ITEM];\n const expanded = model[GROUP_EXPANDED];\n const depth = parseInt(model[GROUP_DEPTH], 10) || 0;\n if (!hasExpand) {\n return <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth} />;\n }\n\n if (groupingCustomRenderer) {\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <div onClick={e => expandEvent(e, model, itemIndex)}>\n {groupingCustomRenderer(h, { name, itemIndex, expanded, depth })}\n </div>\n </RowRenderer>\n );\n }\n\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <button class={{ [GROUP_EXPAND_BTN]: true }} onClick={e => expandEvent(e, model, itemIndex)}>\n <svg aria-hidden=\"true\" style={{ transform: `rotate(${!expanded ? -90 : 0}deg)` }} focusable=\"false\" viewBox=\"0 0 448 512\">\n <path\n fill=\"currentColor\"\n d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"\n ></path>\n </svg>\n </button>\n {name}\n </RowRenderer>\n );\n};\nexport default GroupingRowRenderer;\n","import { VNode } from '@stencil/core';\nimport { ROW_FOCUSED_CLASS } from '../../utils/consts';\nimport { RangeArea } from '@type';\n\n/**\n * Class is responsible for highlighting rows in a table.\n */\nexport class RowHighlightPlugin {\n private currentRange: RangeArea | null = null;\n selectionChange(e: RangeArea, renderedRows: Map<number, VNode>) {\n // clear previous range\n if (this.currentRange) {\n renderedRows.forEach((row, y) => {\n // skip current range\n if (e && y >= e.y && y <= e.y1) {\n return;\n }\n\n // clear previous range\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n row.$elm$.classList.remove(ROW_FOCUSED_CLASS);\n if (row.$attrs$?.class.includes(ROW_FOCUSED_CLASS)) {\n row.$attrs$.class = row.$attrs$.class.replace(\n ROW_FOCUSED_CLASS,\n '',\n );\n }\n }\n });\n }\n\n // apply new range\n if (e) {\n for (let y = e.y; y <= e.y1; y++) {\n const row = renderedRows.get(y);\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n !row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n const attrs = (row.$attrs$ = row.$attrs$ || {});\n attrs.class = (attrs.class || '') + ' ' + ROW_FOCUSED_CLASS;\n row.$elm$.classList.add(ROW_FOCUSED_CLASS);\n }\n }\n }\n this.currentRange = e;\n }\n\n isRowFocused(y: number) {\n return (\n this.currentRange && y >= this.currentRange.y && y <= this.currentRange.y1\n );\n }\n}\n","import { VNode } from '@stencil/core';\nimport { JSX } from '../../components';\n\n/**\n * Converts a VNode element into an HTML element and appends it to the specified parentHolder.\n */\nexport function convertVNodeToHTML(parentHolder: Element, redraw: JSX.VnodeHtml['redraw']): Promise<{ html: string; vnodes: VNode[] }> {\n return new Promise<{ html: string; vnodes: VNode[] }>(resolve => {\n const vnode = document.createElement('vnode-html');\n parentHolder.appendChild(vnode);\n vnode.redraw = redraw;\n vnode.addEventListener('html', e => {\n vnode.remove();\n resolve(e.detail);\n });\n });\n}\n","import { h, VNode, Build, EventEmitter } from '@stencil/core';\nimport {\n Providers,\n DragStartEvent,\n ColumnDataSchemaModel,\n CellTemplate,\n} from '@type';\n\nimport {\n DRAGGABLE_CLASS,\n DRAG_ICON_CLASS,\n} from '../../utils/consts';\n\nimport { getCellData, isRowDragService } from './column.service';\n\ninterface RenderProps {\n model: ColumnDataSchemaModel;\n providers: Providers;\n template?: CellTemplate;\n additionalData?: any;\n dragStartCell?: EventEmitter<DragStartEvent>;\n}\n\n\nfunction renderCell(v: RenderProps) {\n const els: (VNode | string)[] = [];\n\n // #region Custom cell\n if (v.template) {\n els.push(\n v.template(h, { ...v.model, providers: v.providers }, v.additionalData),\n );\n }\n // #endregion\n\n // #region Regular cell\n else {\n if (!v.model.column) {\n // something is wrong with data\n if (Build.isDev) {\n console.error('Investigate column problem.', v.model);\n }\n return '';\n }\n\n // Row drag\n if (\n v.model.column.rowDrag &&\n isRowDragService(v.model.column.rowDrag, v.model)\n ) {\n els.push(\n <span\n class={DRAGGABLE_CLASS}\n onMouseDown={originalEvent =>\n v.dragStartCell.emit({\n originalEvent,\n model: v.model,\n })\n }\n >\n <span class={DRAG_ICON_CLASS} />\n </span>,\n );\n }\n\n els.push(`${getCellData(v.model.model[v.model.prop])}`);\n }\n return els;\n}\n\nexport const CellRenderer = ({\n renderProps,\n cellProps,\n}: {\n renderProps: RenderProps;\n cellProps: any;\n}): VNode => {\n const render = renderCell.bind(null, renderProps);\n return (\n <div {...cellProps} redraw={render}>\n {render()}\n </div>\n );\n};\n","revogr-data {\n display: block;\n width: 100%;\n position: relative;\n\n .rgRow {\n position: absolute;\n width: 100%;\n left: 0;\n\n &.groupingRow {\n font-weight: 600;\n text-align: left;\n\n .group-expand {\n width: 25px;\n height: 100%;\n max-height: 25px;\n margin-right: 2px;\n background-color: transparent;\n border-color: transparent;\n\n svg {\n width: 7px;\n }\n }\n }\n }\n\n .revo-draggable {\n $w: 24px;\n\n border: none;\n height: 32px;\n display: inline-flex;\n outline: 0;\n padding: 0;\n font-size: 0.8125rem;\n box-sizing: border-box;\n align-items: center;\n white-space: nowrap;\n vertical-align: middle;\n justify-content: center;\n text-decoration: none;\n width: $w;\n height: 100%;\n cursor: pointer;\n display: inline-flex;\n\n &:hover {\n > .revo-drag-icon {\n opacity: 1;\n zoom: 1.2;\n font-weight: 600;\n }\n }\n\n > .revo-drag-icon {\n pointer-events: none;\n transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n }\n\n .rgCell {\n top: 0;\n left: 0;\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n }\n}\n","import {\n Component,\n Host,\n Watch,\n Element,\n Event,\n Prop,\n VNode,\n EventEmitter,\n h,\n Method,\n State,\n} from '@stencil/core';\n\nimport ColumnService from './column.service';\nimport { DATA_COL, DATA_ROW, ROW_FOCUSED_CLASS } from '../../utils/consts';\n\nimport { DSourceState, getSourceItem } from '@store';\nimport RowRenderer, { PADDING_DEPTH } from './row-renderer';\nimport GroupingRowRenderer from '../../plugins/groupingRow/grouping.row.renderer';\nimport { isGrouping } from '../../plugins/groupingRow/grouping.service';\nimport { DimensionCols, DimensionRows } from '@type';\nimport { RowHighlightPlugin } from './row-highlight.plugin';\nimport { convertVNodeToHTML } from '../vnode/vnode.utils';\nimport { CellRenderer } from './cell-renderer';\nimport {\n ViewportState,\n DimensionSettingsState,\n BeforeRowRenderEvent,\n Providers,\n ColumnRegular,\n DataType,\n CellProps,\n BeforeCellRenderEvent,\n DragStartEvent,\n ColumnDataSchemaModel,\n VirtualPositionItem,\n RangeArea,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils/store.utils';\n\n/**\n * This component is responsible for rendering data\n * Rows, columns, groups and cells\n */\n@Component({\n tag: 'revogr-data',\n styleUrl: 'revogr-data-style.scss',\n})\nexport class RevogrData {\n // #region Properties\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * Range allowed\n */\n @Prop() range: boolean;\n\n /**\n * Defines property from which to read row class\n */\n @Prop() rowClass: string;\n /**\n * Additional data to pass to renderer\n * Used in plugins such as vue or react to pass root app entity to cells\n */\n @Prop() additionalData: any;\n /** Stores */\n /** Selection, range, focus for row selection */\n @Prop() rowSelectionStore!: Observable<SelectionStoreState>;\n /** Viewport Y */\n @Prop() viewportRow!: Observable<ViewportState>;\n /** Viewport X */\n @Prop() viewportCol!: Observable<ViewportState>;\n /** Dimension settings Y */\n @Prop() dimensionRow!: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n /**\n * Column source\n */\n @Prop() colData: Observable<DSourceState<ColumnRegular, DimensionCols>>;\n /**\n * Data rows source\n */\n @Prop() dataStore!: Observable<DSourceState<DataType, DimensionRows>>;\n /**\n * Row data type\n */\n @Prop({ reflect: true }) type!: DimensionRows;\n\n /**\n * Column data type\n */\n @Prop({ reflect: true }) colType!: DimensionCols | 'rowHeaders';\n\n /**\n * Prevent rendering until job is done.\n * Can be used for initial rendering performance improvement.\n * When several plugins require initial rendering this will prevent double initial rendering.\n */\n @Prop() jobsBeforeRender: Promise<any>[] = [];\n // #endregion\n\n /**\n * Before each row render\n */\n @Event() beforerowrender: EventEmitter<BeforeRowRenderEvent>;\n \n /**\n * When data render finished for the designated type\n */\n @Event() afterrender: EventEmitter<{ type: DimensionRows }>;\n /**\n * Before each cell render function. Allows to override cell properties\n */\n @Event({ eventName: 'beforecellrender' })\n beforeCellRender: EventEmitter<BeforeCellRenderEvent>;\n\n /**\n * Event emitted on cell drag start\n */\n @Event({ eventName: 'dragstartcell' })\n dragStartCell: EventEmitter<DragStartEvent>;\n\n /**\n * Pointed cell update.\n */\n @Method() async updateCell(e: {\n row: number; // virtual\n col: number; // virtual\n }) {\n // Stencil tweak to update cell content\n const cell = this.renderedRows.get(e.row)?.$children$?.[e.col];\n if (cell?.$attrs$?.redraw) {\n const children = await convertVNodeToHTML(\n this.element,\n cell.$attrs$.redraw,\n );\n cell.$elm$.innerHTML = children.html;\n cell.$key$ = Math.random();\n }\n }\n\n @Element() element!: Element;\n @State() providers: Providers;\n private columnService: ColumnService;\n private rowHighlightPlugin: RowHighlightPlugin;\n /**\n * Rendered rows - virtual index vs vnode\n */\n private renderedRows = new Map<number, VNode>();\n private rangeUnsubscribe: (() => void) | undefined;\n\n @Watch('dataStore') onDataStoreChange() {\n this.onStoreChange();\n }\n @Watch('colData') onColDataChange() {\n this.onStoreChange();\n }\n onStoreChange() {\n this.columnService?.destroy();\n this.columnService = new ColumnService(this.dataStore, this.colData);\n // make sure we have correct data, before render\n this.providers = {\n type: this.type,\n readonly: this.readonly,\n data: this.dataStore,\n viewport: this.viewportCol,\n dimension: this.dimensionRow,\n selection: this.rowSelectionStore,\n };\n\n this.rangeUnsubscribe?.();\n this.rangeUnsubscribe = this.rowSelectionStore.onChange(\n 'range',\n (e: RangeArea) =>\n this.rowHighlightPlugin.selectionChange(e, this.renderedRows),\n );\n }\n\n connectedCallback() {\n this.rowHighlightPlugin = new RowHighlightPlugin();\n this.onStoreChange();\n }\n\n disconnectedCallback() {\n this.columnService?.destroy();\n this.rangeUnsubscribe?.();\n }\n\n async componentWillRender() {\n return Promise.all(this.jobsBeforeRender);\n }\n\n componentDidRender() {\n this.afterrender.emit({ type: this.type });\n }\n\n render() {\n this.renderedRows = new Map();\n const columnsData = this.columnService.columns;\n if (!columnsData.length) {\n return;\n }\n const rows = this.viewportRow.get('items');\n if (!rows.length) {\n return;\n }\n const cols = this.viewportCol.get('items');\n if (!cols.length) {\n return;\n }\n const rowsEls: VNode[] = [];\n const depth = this.dataStore.get('groupingDepth');\n const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');\n const groupDepth = this.columnService.hasGrouping ? depth : 0;\n for (let rgRow of rows) {\n const dataItem = getSourceItem(this.dataStore, rgRow.itemIndex);\n\n // #region Grouping\n if (isGrouping(dataItem)) {\n rowsEls.push(\n <GroupingRowRenderer\n {...rgRow}\n index={rgRow.itemIndex}\n model={dataItem}\n groupingCustomRenderer={groupingCustomRenderer}\n hasExpand={this.columnService.hasGrouping}\n />,\n );\n continue;\n }\n // #endregion\n const cells: (VNode | string | void)[] = [];\n\n // #region Cells\n for (let rgCol of cols) {\n const model = this.columnService.rowDataModel(\n rgRow.itemIndex,\n rgCol.itemIndex,\n );\n\n // call before cell render\n const cellEvent = this.triggerBeforeCellRender(model, rgRow, rgCol);\n\n // if event was prevented\n if (cellEvent.defaultPrevented) {\n continue;\n }\n\n const {\n detail: { column: columnProps, row: rowProps },\n } = cellEvent;\n\n const defaultProps: CellProps = {\n [DATA_COL]: columnProps.itemIndex,\n [DATA_ROW]: rowProps.itemIndex,\n style: {\n width: `${columnProps.size}px`,\n transform: `translateX(${columnProps.start}px)`,\n height: rowProps.size ? `${rowProps.size}px` : undefined,\n },\n };\n /**\n * For grouping, can be removed in the future and replaced with event\n */\n if (groupDepth && !columnProps.itemIndex && defaultProps.style) {\n defaultProps.style.paddingLeft = `${PADDING_DEPTH * groupDepth}px`;\n }\n\n const props = this.columnService.mergeProperties(\n rowProps.itemIndex,\n columnProps.itemIndex,\n defaultProps,\n model,\n columnsData[columnProps.itemIndex]?.cellProperties,\n );\n\n // Never use webcomponent for cell render\n // It's very slow because of webcomponent initialization takes time\n cells.push(\n <CellRenderer\n renderProps={{\n model,\n providers: this.providers,\n template: columnsData[columnProps.itemIndex]?.cellTemplate,\n additionalData: this.additionalData,\n dragStartCell: this.dragStartCell,\n }}\n cellProps={props}\n />,\n );\n }\n // #endregion\n\n // #region Rows\n let rowClass = this.rowClass\n ? this.columnService.getRowClass(rgRow.itemIndex, this.rowClass)\n : '';\n if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {\n rowClass += ` ${ROW_FOCUSED_CLASS}`;\n }\n const row: VNode = (\n <RowRenderer\n index={rgRow.itemIndex}\n rowClass={rowClass}\n size={rgRow.size}\n start={rgRow.start}\n >\n {cells}\n </RowRenderer>\n );\n this.beforerowrender.emit({\n node: row,\n item: rgRow,\n model: dataItem,\n colType: this.columnService.type,\n rowType: this.type,\n });\n rowsEls.push(row);\n this.renderedRows.set(rgRow.itemIndex, row);\n // #endregion\n }\n return (\n <Host>\n <slot />\n {rowsEls}\n </Host>\n );\n }\n\n triggerBeforeCellRender(\n model: ColumnDataSchemaModel,\n row: VirtualPositionItem,\n column: VirtualPositionItem,\n ) {\n return this.beforeCellRender.emit({\n column: { ...column },\n row: { ...row },\n model,\n rowType: model.type,\n colType: model.colType,\n });\n }\n}\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nmodule.exports = keyBy;\n","import { h } from '@stencil/core';\nimport { ColumnRegular } from '@type';\n\nexport const FILTER_BUTTON_CLASS = 'rv-filter';\nexport const FILTER_BUTTON_ACTIVE = 'active';\n\ntype Props = {\n column: ColumnRegular;\n};\nexport const SortingSign = ({ column }: Props) => {\n return <i class={column?.order ?? 'sort-off'} />;\n};\n","import { h, VNode } from '@stencil/core';\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from './resizable.directive';\nimport { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport { VirtualPositionItem, ColumnTemplateProp, InitialHeaderClick, CellProps } from '@type';\nimport { RangeArea } from '@type';\n\ntype Props = {\n column: VirtualPositionItem;\n additionalData: any;\n data?: ColumnTemplateProp;\n range?: RangeArea;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDoubleClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: Props): VNode => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: CellProps & Partial<ResizeProps> = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: { width: `${p.column.size}px`, transform: `translateX(${p.column.start}px)` },\n onResize: p.onResize,\n onDoubleClick(originalEvent: MouseEvent) {\n p.onDoubleClick({ column: p.data, index: p.column.itemIndex, originalEvent });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({ column: p.data, index: p.column.itemIndex, originalEvent });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer data={p.data} props={dataProps} additionalData={p.additionalData}>\n {<SortingSign column={p.data} />}\n {p.canFilter && p.data?.filter !== false ? <FilterButton column={p.data} /> : ''}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n","import { h, VNode } from '@stencil/core';\nimport { Group } from '@store';\nimport { CellProps, Providers } from '@type';\nimport { ResizeEvent, ResizeProps } from '../../components/header/resizable.directive';\nimport { HEADER_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from '../../components/header/header-cell-renderer';\nimport { DimensionCols } from '../../components';\n\ntype Props = {\n start: number;\n end: number;\n group: Group;\n providers: Providers<DimensionCols | 'rowHeaders'>;\n additionalData: any;\n canResize?: boolean;\n onResize?(e: ResizeEvent): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst GroupHeaderRenderer = (p: Props): VNode[] => {\n const groupProps: CellProps & Partial<ResizeProps> = {\n canResize: p.canResize,\n minWidth: p.group.ids.length * MIN_COL_SIZE,\n maxWidth: 0,\n\n active: p.active || ['r'],\n class: {\n [HEADER_CLASS]: true,\n },\n style: {\n transform: `translateX(${p.start}px)`,\n width: `${p.end - p.start}px`,\n },\n onResize: p.onResize,\n };\n return (\n <HeaderCellRenderer\n data={{\n ...p.group,\n prop: '',\n providers: p.providers,\n index: p.start,\n }}\n props={groupProps}\n additionalData={p.additionalData}\n />\n );\n};\n\nexport default GroupHeaderRenderer;\n","import { h, VNode } from '@stencil/core';\nimport findIndex from 'lodash/findIndex';\nimport { Group, getItemByIndex } from '@store';\nimport { DimensionSettingsState, Providers, DimensionCols } from '@type';\nimport { HEADER_ROW_CLASS } from '../../utils/consts';\nimport GroupHeaderRenderer from './headerGroupRenderer';\nimport { ResizeProps } from '../../components/header/resizable.directive';\n\ntype Props<T> = {\n visibleProps: { [prop: string]: number };\n groups: Record<number, Group[]>;\n dimensionCol: Pick<DimensionSettingsState, 'indexes' | 'originItemSize' | 'indexToItem'>;\n depth: number;\n canResize: boolean;\n providers: Providers<T>;\n additionalData: any;\n onResize(changedX: number, startIndex: number, endIndex: number): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst ColumnGroupsRenderer = ({\n additionalData, providers, depth, groups, visibleProps, dimensionCol, canResize, active, onResize\n}: Props<DimensionCols | 'rowHeaders'>): VNode[] => {\n // render group columns\n const groupRow: VNode[] = [];\n for (let i = 0; i < depth; i++) {\n if (groups[i]) {\n for (let group of groups[i]) {\n // if group in visible range\n // find first visible group prop in visible columns range\n const indexFirstVisibleCol: number | undefined = findIndex(group.ids, id => typeof visibleProps[id] === 'number');\n if (indexFirstVisibleCol > -1) {\n const colVisibleIndex = visibleProps[group.ids[indexFirstVisibleCol]]; // get column index\n const groupStartIndex = colVisibleIndex - indexFirstVisibleCol; // first column index in group\n const groupEndIndex = groupStartIndex + group.ids.length - 1; // last column index in group\n\n // coordinates\n const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;\n const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;\n groupRow.push(\n <GroupHeaderRenderer\n providers={providers}\n start={groupStart}\n end={groupEnd}\n group={group}\n active={active}\n canResize={canResize}\n onResize={e => onResize(e.changedX, groupStartIndex, groupEndIndex)}\n additionalData={additionalData}\n />,\n );\n }\n }\n }\n groupRow.push(<div class={`${HEADER_ROW_CLASS} group`} />);\n }\n return groupRow;\n};\n\nexport default ColumnGroupsRenderer;\n","revogr-header {\n position: relative;\n z-index: 5;\n display: block;\n \n\n .rgHeaderCell {\n display: flex;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n &.sortable {\n cursor: pointer;\n }\n\n i {\n &.asc,\n &.desc {\n &:after {\n font-size: 13px;\n }\n }\n &.asc {\n &:after {\n content: '↑';\n }\n }\n &.desc {\n &:after {\n content: '↓';\n }\n }\n }\n }\n\n .rgHeaderCell,\n .grouped-cell {\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n z-index: 1;\n }\n\n .header-rgRow {\n display: block;\n position: relative;\n\n &.group {\n z-index: 0;\n }\n }\n\n .group-rgRow {\n position: relative;\n }\n\n .rgHeaderCell {\n &.active {\n z-index: 10;\n\n .resizable {\n background-color: deepskyblue;\n }\n }\n .header-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n }\n .resizable {\n display: block;\n position: absolute;\n z-index: 90;\n touch-action: none;\n user-select: none;\n &:hover {\n background-color: deepskyblue;\n }\n }\n $size: 6px;\n > .resizable-r {\n cursor: ew-resize;\n width: $size;\n right: 0;\n top: 0;\n height: 100%;\n }\n > .resizable-rb {\n cursor: se-resize;\n width: $size;\n height: $size;\n right: 0;\n bottom: 0;\n }\n\n > .resizable-b {\n cursor: s-resize;\n height: $size;\n bottom: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-lb {\n cursor: sw-resize;\n width: $size;\n height: $size;\n left: 0;\n bottom: 0;\n }\n\n > .resizable-l {\n cursor: w-resize;\n width: $size;\n left: 0;\n height: 100%;\n top: 0;\n }\n\n > .resizable-lt {\n cursor: nw-resize;\n width: $size;\n height: $size;\n left: 0;\n top: 0;\n }\n\n > .resizable-t {\n cursor: n-resize;\n height: $size;\n top: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-rt {\n cursor: ne-resize;\n width: $size;\n height: $size;\n right: 0;\n top: 0;\n }\n }\n .rv-filter {\n visibility: hidden;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { HTMLStencilElement, VNode } from '@stencil/core/internal';\nimport keyBy from 'lodash/keyBy';\n\nimport { HEADER_ACTUAL_ROW_CLASS, HEADER_ROW_CLASS } from '../../utils/consts';\nimport { Groups } from '@store';\nimport HeaderRenderer from './header-renderer';\nimport ColumnGroupsRenderer from '../../plugins/groupingColumn/columnGroupsRenderer';\nimport { ResizeProps } from './resizable.directive';\nimport {\n ColumnRegular,\n DimensionSettingsState,\n InitialHeaderClick,\n Providers,\n ViewportState,\n ViewSettingSizeProp,\n DimensionCols,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils/store.utils';\n\n@Component({\n tag: 'revogr-header',\n styleUrl: 'revogr-header-style.scss',\n})\nexport class RevogrHeaderComponent {\n // #region Properties\n /**\n * Stores\n */\n /** Viewport X */\n @Prop() viewportCol: Observable<ViewportState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n /** Selection, range, focus */\n @Prop() selectionStore: Observable<SelectionStoreState>;\n\n /**\n * Column groups\n */\n @Prop() groups: Groups;\n /**\n * Grouping depth, how many levels of grouping\n */\n @Prop() groupingDepth = 0;\n\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * If columns can be resized\n */\n @Prop() canResize: boolean;\n /**\n * Defines resize position\n */\n @Prop() resizeHandler: ResizeProps['active'];\n\n /**\n * Columns - defines an array of grid columns.\n */\n @Prop() colData: ColumnRegular[];\n\n /**\n * Column filter\n */\n @Prop() columnFilter: boolean;\n\n /**\n * Column type\n */\n @Prop() type!: DimensionCols | 'rowHeaders';\n\n /**\n * Extra properties to pass into header renderer, such as vue or react components to handle parent\n */\n @Prop() additionalData: any = {};\n // #endregion\n\n // #region Events\n\n /**\n * On initial header click\n */\n @Event({\n eventName: 'beforeheaderclick',\n })\n initialHeaderClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * On header resize\n */\n @Event({\n eventName: 'headerresize',\n })\n headerresize: EventEmitter<ViewSettingSizeProp>;\n\n /**\n * On before header resize\n */\n @Event({ eventName: 'beforeheaderresize', cancelable: true })\n beforeResize: EventEmitter<ColumnRegular[]>;\n\n /**\n * On header double click\n */\n @Event({\n eventName: 'headerdblclick',\n })\n headerdblClick: EventEmitter<InitialHeaderClick>;\n // #endregion\n\n @Element() element!: HTMLStencilElement;\n\n private onResize({ width }: { width?: number }, index: number) {\n const col = this.colData[index];\n const event = this.beforeResize.emit([\n {\n ...col,\n size: width || undefined,\n },\n ]);\n if (event.defaultPrevented) {\n return;\n }\n this.headerresize.emit({ [index]: width || 0 });\n }\n\n private onResizeGroup(\n changedX: number,\n startIndex: number,\n endIndex: number,\n ) {\n const sizes: ViewSettingSizeProp = {};\n const cols = keyBy(this.viewportCol.get('items'), 'itemIndex');\n const change = changedX / (endIndex - startIndex + 1);\n for (let i = startIndex; i <= endIndex; i++) {\n const item = cols[i];\n if (item) {\n sizes[i] = item.size + change;\n }\n }\n this.headerresize.emit(sizes);\n }\n\n render() {\n const cols = this.viewportCol.get('items');\n const range = this.selectionStore?.get('range');\n const cells: VNode[] = [];\n const visibleProps: { [prop: string]: number } = {};\n\n // render header columns\n for (let rgCol of cols) {\n const colData = this.colData[rgCol.itemIndex];\n cells.push(\n <HeaderRenderer\n range={range}\n column={rgCol}\n data={{\n ...colData,\n index: rgCol.itemIndex,\n providers: this.providers,\n }}\n canFilter={!!this.columnFilter}\n canResize={this.canResize}\n active={this.resizeHandler}\n onResize={e => this.onResize(e, rgCol.itemIndex)}\n onDoubleClick={e => this.headerdblClick.emit(e)}\n onClick={e => this.initialHeaderClick.emit(e)}\n additionalData={this.additionalData}\n />,\n );\n visibleProps[colData?.prop] = rgCol.itemIndex;\n }\n\n return [\n <div class=\"group-rgRow\">\n <ColumnGroupsRenderer\n canResize={this.canResize}\n active={this.resizeHandler}\n visibleProps={visibleProps}\n providers={this.providers}\n groups={this.groups}\n dimensionCol={this.dimensionCol.state}\n depth={this.groupingDepth}\n onResize={(changedX, startIndex, endIndex) =>\n this.onResizeGroup(changedX, startIndex, endIndex)\n }\n additionalData={this.additionalData}\n />\n </div>,\n <div class={`${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}`}>\n {cells}\n </div>,\n ];\n }\n\n get providers(): Providers<DimensionCols | 'rowHeaders'> {\n return {\n type: this.type,\n readonly: this.readonly,\n data: this.colData,\n viewport: this.viewportCol,\n dimension: this.dimensionCol,\n selection: this.selectionStore,\n };\n }\n}\n","export async function resizeObserver() {\n if (!('ResizeObserver' in window)) {\n const module = await import('@juggle/resize-observer');\n (window as Window & typeof globalThis).ResizeObserver = (module.ResizeObserver as unknown) as typeof ResizeObserver;\n }\n}\n","import throttle from 'lodash/throttle';\nimport { resizeObserver } from '../../utils/resize-observer.polifill';\ninterface Events {\n resize(entries: ReadonlyArray<ResizeObserverEntry>, observer: ResizeObserver): void;\n}\nexport default class GridResizeService {\n private resizeObserver: ResizeObserver | null = null;\n private resize = throttle((e: ReadonlyArray<ResizeObserverEntry>, o: ResizeObserver) => this.events?.resize(e, o), 10);\n constructor(el: HTMLElement, private events: Events) {\n this.init(el);\n }\n\n async init(el: HTMLElement): Promise<void> {\n await resizeObserver();\n this.resizeObserver = new ResizeObserver(this.resize);\n this.resizeObserver?.observe(el);\n }\n\n public destroy() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n }\n}\n","@mixin noScroll {\n /* Hide scrollbar for IE and Edge */\n -ms-overflow-style: none;\n scrollbar-width: none; /* Firefox */\n /* Hide scrollbar for Chrome, Safari and Opera */\n &::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n}\n\n.rowHeaders {\n z-index: 2;\n font-size: 10px;\n display: flex;\n height: 100%;\n\n revogr-data .rgCell {\n text-align: center;\n }\n\n .rgCell {\n padding: 0 1em !important;\n min-width: 100%;\n }\n}\n\nrevogr-viewport-scroll {\n @include noScroll;\n\n overflow-x: auto;\n overflow-y: hidden;\n position: relative;\n z-index: 1;\n height: 100%;\n\n &.colPinStart,\n &.colPinEnd {\n z-index: 2;\n }\n\n // make sure it would work\n &.colPinEnd:has(.active) {\n overflow: visible;\n }\n\n &.rgCol {\n flex-grow: 1;\n }\n\n .content-wrapper {\n overflow: hidden;\n }\n\n .inner-content-table {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n width: 100%;\n min-width: 100%;\n position: relative;\n z-index: 0;\n }\n\n .vertical-inner {\n overflow-y: auto;\n position: relative;\n width: 100%;\n flex-grow: 1;\n @include noScroll;\n\n revogr-data,\n revogr-overlay-selection {\n height: 100%;\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Method,\n Element,\n Prop,\n Host,\n Listen,\n} from '@stencil/core';\n\nimport GridResizeService from '../revoGrid/viewport.resize.service';\nimport LocalScrollService from '../../services/local.scroll.service';\nimport { LocalScrollTimer } from '../../services/local.scroll.timer';\nimport {\n CONTENT_SLOT,\n FOOTER_SLOT,\n HEADER_SLOT,\n} from '../revoGrid/viewport.helpers';\nimport { DimensionCols, DimensionType } from '@type';\nimport { ScrollCoordinateEvent, ViewPortResizeEvent, ViewPortScrollEvent } from '@type';\n\ntype Delta = 'deltaX' | 'deltaY';\ntype LocalScrollEvent = {\n preventDefault(): void;\n} & { [x in Delta]: number };\n\n/**\n * Viewport scroll component for RevoGrid\n * @slot - content\n * @slot header - header\n * @slot footer - footer\n */\n@Component({\n tag: 'revogr-viewport-scroll',\n styleUrl: 'revogr-viewport-scroll-style.scss',\n})\nexport class RevogrViewportScroll {\n /**\n * Enable row header\n */\n @Prop() readonly rowHeader: boolean;\n\n /**\n * Width of inner content\n */\n @Prop() contentWidth = 0;\n /**\n * Height of inner content\n */\n @Prop() contentHeight = 0;\n\n @Prop() colType!: DimensionCols | 'rowHeaders';\n\n /**\n * Before scroll event\n */\n @Event({ eventName: 'scrollviewport', bubbles: true }) scrollViewport: EventEmitter<ViewPortScrollEvent>;\n /**\n * Viewport resize\n */\n @Event({ eventName: 'resizeviewport' }) resizeViewport: EventEmitter<ViewPortResizeEvent>;\n\n /**\n * Triggered on scroll change, can be used to get information about scroll visibility\n */\n @Event() scrollchange: EventEmitter<{\n type: DimensionType;\n hasScroll: boolean;\n }>;\n\n /**\n * Silently scroll to coordinate\n * Made to align negative coordinates for mobile devices\n */\n @Event({ eventName: 'scrollviewportsilent' }) silentScroll: EventEmitter<ViewPortScrollEvent>;\n\n @Element() horizontalScroll: HTMLElement;\n\n private oldValY = this.contentHeight;\n private oldValX = this.contentWidth;\n\n private verticalScroll: HTMLElement;\n private header: HTMLElement;\n private footer: HTMLElement;\n\n /**\n * Static functions to bind wheel change\n */\n private horizontalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n private verticalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n\n private resizeService: GridResizeService;\n private localScrollService: LocalScrollService;\n private localScrollTimer: LocalScrollTimer;\n\n\n @Method() async setScroll(e: ViewPortScrollEvent) {\n this.localScrollTimer.latestScrollUpdate(e.dimension);\n this.localScrollService?.setScroll(e);\n }\n\n /**\n * update on delta in case we don't know existing position or external change\n * @param e\n */\n @Method() async changeScroll(\n e: ViewPortScrollEvent,\n silent = false,\n ) {\n if (silent) {\n if (e.coordinate) {\n switch (e.dimension) {\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n case 'rgRow':\n this.verticalScroll.style.transform = `translateY(${-1 * e.coordinate}px)`;\n break;\n }\n }\n return null;\n }\n if (e.delta) {\n switch (e.dimension) {\n case 'rgCol':\n e.coordinate = this.horizontalScroll.scrollLeft + e.delta;\n break;\n case 'rgRow':\n e.coordinate = this.verticalScroll.scrollTop + e.delta;\n break;\n }\n this.setScroll(e);\n }\n return e;\n }\n\n /**\n * Dispatch this event to trigger vertical mouse wheel from plugins\n */\n @Listen('mousewheel-vertical') mousewheelVertical({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.verticalMouseWheel(e);\n }\n /**\n * Dispatch this event to trigger horizontal mouse wheel from plugins\n */\n @Listen('mousewheel-horizontal') mousewheelHorizontal({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.horizontalMouseWheel(e);\n }\n /**\n * Allows to use outside listener\n */\n @Listen('scroll-coordinate') scrollApply({\n detail: { type, coordinate },\n }: CustomEvent<ScrollCoordinateEvent>) {\n this.applyOnScroll(type, coordinate, true);\n }\n\n connectedCallback() {\n /**\n * Bind scroll functions for farther usage\n */\n // allow mousewheel for all devices including mobile\n this.verticalMouseWheel = this.onVerticalMouseWheel.bind(\n this,\n 'rgRow',\n 'deltaY',\n );\n this.horizontalMouseWheel = this.onHorizontalMouseWheel.bind(\n this,\n 'rgCol',\n 'deltaX',\n );\n this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);\n /**\n * Create local scroll service\n */\n this.localScrollService = new LocalScrollService({\n // to improve safari smoothnes on scroll\n // skipAnimationFrame: isSafariDesktop(),\n runScroll: e => this.scrollViewport.emit(e),\n applyScroll: e => {\n this.localScrollTimer.setCoordinate(e);\n switch (e.dimension) {\n case 'rgCol':\n // this will trigger on scroll event\n this.horizontalScroll.scrollLeft = e.coordinate;\n break;\n case 'rgRow':\n // this will trigger on scroll event\n this.verticalScroll.scrollTop = e.coordinate;\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n if (this.verticalScroll.style.transform) {\n this.verticalScroll.style.transform = '';\n }\n break;\n }\n },\n });\n }\n\n componentDidLoad() {\n // track horizontal viewport resize\n this.resizeService = new GridResizeService(this.horizontalScroll, {\n resize: entries => {\n let height = entries[0]?.contentRect.height || 0;\n if (height) {\n height -= this.header.clientHeight + this.footer.clientHeight;\n }\n const els = {\n rgRow: {\n size: height,\n contentSize: this.contentHeight,\n scroll: this.verticalScroll.scrollTop,\n noScroll: false,\n },\n rgCol: {\n size: entries[0]?.contentRect.width || 0,\n contentSize: this.contentWidth,\n scroll: this.horizontalScroll.scrollLeft,\n noScroll: this.colType !== 'rgCol' ? true : false,\n },\n };\n for (const [dim, item] of Object.entries(els)) {\n const dimension = dim as DimensionType;\n this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader });\n if (item.noScroll) {\n continue;\n }\n this.localScrollService?.scroll(item.scroll, dimension, true);\n // track scroll visibility on outer element change\n this.setScrollVisibility(dimension, item.size, item.contentSize);\n }\n },\n });\n }\n\n /**\n * Check if scroll present or not per type\n * Trigger this method on inner content size change or on outer element size change\n * If inner content bigger then outer size then scroll is present and mousewheel binding required\n * @param type - dimension type 'rgRow/y' or 'rgCol/x'\n * @param size - outer content size\n * @param innerContentSize - inner content size\n */\n setScrollVisibility(\n type: DimensionType,\n size: number,\n innerContentSize: number,\n ) {\n // test if scroll present\n const hasScroll = size < innerContentSize;\n let el: HTMLElement;\n // event reference for binding\n switch (type) {\n case 'rgCol':\n el = this.horizontalScroll;\n break;\n case 'rgRow':\n el = this.verticalScroll;\n break;\n }\n // based on scroll visibility assign or remove class and event\n if (hasScroll) {\n el.classList.add(`scroll-${type}`);\n } else {\n el.classList.remove(`scroll-${type}`);\n }\n this.scrollchange.emit({ type, hasScroll });\n }\n\n disconnectedCallback() {\n this.resizeService.destroy();\n }\n\n async componentDidRender() {\n // scroll update if number of rows changed\n if (this.contentHeight < this.oldValY && this.verticalScroll) {\n this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;\n }\n this.oldValY = this.contentHeight;\n\n // scroll update if number of cols changed\n if (this.contentWidth < this.oldValX) {\n this.horizontalScroll.scrollLeft += this.contentWidth - this.oldValX;\n }\n this.oldValX = this.contentWidth;\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentHeight,\n clientSize: this.verticalScroll.clientHeight,\n virtualSize: 0,\n },\n 'rgRow',\n );\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentWidth,\n clientSize: this.horizontalScroll.clientWidth,\n virtualSize: 0,\n },\n 'rgCol',\n );\n this.setScrollVisibility(\n 'rgRow',\n this.verticalScroll.clientHeight,\n this.contentHeight,\n );\n this.setScrollVisibility(\n 'rgCol',\n this.horizontalScroll.clientWidth,\n this.contentWidth,\n );\n }\n\n render() {\n return (\n <Host\n onWheel={this.horizontalMouseWheel}\n onScroll={(e: UIEvent) => this.applyScroll('rgCol', e)}\n >\n <div\n class=\"inner-content-table\"\n style={{ width: `${this.contentWidth}px` }}\n >\n <div class=\"header-wrapper\" ref={e => (this.header = e)}>\n <slot name={HEADER_SLOT} />\n </div>\n <div\n class=\"vertical-inner\"\n ref={el => (this.verticalScroll = el)}\n onWheel={this.verticalMouseWheel}\n onScroll={(e: MouseEvent) => this.applyScroll('rgRow', e)}\n >\n <div\n class=\"content-wrapper\"\n style={{ height: `${this.contentHeight}px` }}\n >\n <slot name={CONTENT_SLOT} />\n </div>\n </div>\n <div class=\"footer-wrapper\" ref={e => (this.footer = e)}>\n <slot name={FOOTER_SLOT} />\n </div>\n </div>\n </Host>\n );\n }\n /**\n * Extra layer for scroll event monitoring, where MouseWheel event is not passing\n * We need to trigger scroll event in case there is no mousewheel event\n */\n @Method() async applyScroll(type: DimensionType, e: UIEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n let scroll = 0;\n switch (type) {\n case 'rgCol':\n scroll = e.target.scrollLeft;\n break;\n case 'rgRow':\n scroll = e.target.scrollTop;\n break;\n }\n\n // for mobile devices to skip negative scroll loop\n if (scroll < 0) {\n this.silentScroll.emit({ dimension: type, coordinate: scroll });\n return;\n }\n this.applyOnScroll(type, scroll);\n }\n\n /**\n * Applies change on scroll event only if mousewheel event happened some time ago\n */\n private applyOnScroll(\n type: DimensionType,\n coordinate: number,\n outside = false,\n ) {\n // apply after throttling\n if (this.localScrollTimer.isReady(type, coordinate)) {\n this.localScrollService?.scroll(\n coordinate,\n type,\n undefined,\n undefined,\n outside,\n );\n }\n }\n\n /**\n * On vertical mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onVerticalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n e.preventDefault?.();\n const pos = this.verticalScroll.scrollTop + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n\n /**\n * On horizontal mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onHorizontalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n e.preventDefault?.();\n const pos = this.horizontalScroll.scrollLeft + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n VNode,\n h,\n} from '@stencil/core';\n\n/**\n * VNode to html converter for stencil components.\n * Transform VNode to html string.\n */\n/**\n * @internal\n */\n@Component({\n tag: 'vnode-html',\n})\nexport class VNodeToHtml {\n @Prop() redraw: (() => VNode[]) | null | undefined = null;\n @Event() html: EventEmitter<{ html: string; vnodes: VNode[] }>;\n @Element() el: HTMLElement;\n\n private vnodes: VNode[] | null = [];\n\n componentDidRender() {\n this.html.emit({\n html: this.el.innerHTML,\n vnodes: this.vnodes,\n });\n }\n\n render() {\n this.vnodes = this.redraw?.();\n return (\n <Host\n style={{ visibility: 'hidden', position: 'absolute' }}\n >\n {this.vnodes}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAYO,MAAM,aAAa,GAAG,EAAE,CAAC;AAEhC,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,SAAEA,OAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAY,EAAE,KAAc;IACpF,MAAM,KAAK,iBACN,EAAE,CAACC,cAAQ,GAAGD,OAAK,EAAE,CACzB,CAAC;IACF,QACEE,mCACM,KAAK,IACT,KAAK,EAAE,SAAS,QAAQ,IAAI,EAAE,EAAE,EAChC,KAAK,EAAE;YACL,MAAM,EAAE,GAAG,IAAI,IAAI;YACnB,SAAS,EAAE,cAAc,KAAK,KAAK;YACnC,WAAW,EAAE,KAAK,GAAG,GAAG,aAAa,GAAG,KAAK,IAAI,GAAG,SAAS;SAC9D,KAEA,KAAK,CACF,EACN;AACJ,CAAC;;AClBD,SAAS,WAAW,CAAC,CAAa,EAAE,KAAe,EAAE,YAAoB;;IACvE,MAAM,KAAK,GAAG,IAAI,WAAW,CAACC,iCAAkB,EAAE;QAChD,MAAM,EAAE;YACN,KAAK;YACL,YAAY;SACb;QACD,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IACH,MAAA,CAAC,CAAC,MAAM,0CAAE,aAAa,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,mBAAmB,GAAG,CAAC,KAAY;IACvC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC;IACtE,MAAM,IAAI,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,0CAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAChE,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAChD;;;;;MC1ZU,WAAW;;;;QAKd,WAAM,GAAmB,EAAE,CAAC;sBAJiB,IAAI;;IAMzD,kBAAkB;QAChB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,SAAS;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;KACJ;IAED,MAAM;;QACJ,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,oDAAI,CAAC;QAC9B,QACEzC,UAACe,YAAI,qDACH,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAEpD,IAAI,CAAC,MAAM,CACP,EACP;KACH;;;;;;;;;","names":["index","DATA_ROW","h","GROUP_EXPAND_EVENT","PSEUDO_GROUP_ITEM","GROUP_EXPANDED","GROUP_DEPTH","GROUP_EXPAND_BTN","ROW_FOCUSED_CLASS","isRowDragService","DRAGGABLE_CLASS","DRAG_ICON_CLASS","getCellData","ColumnService","getSourceItem","isGrouping","DATA_COL","Host","require$$0","defineProperty","baseAssignValue","arrayAggregator","baseAggregator","require$$1","require$$2","require$$3","createAggregator","HEADER_CLASS","HEADER_SORTABLE_CLASS","MIN_COL_SIZE","FOCUS_CLASS","HeaderCellRenderer","FilterButton","findIndex","getItemByIndex","HEADER_ROW_CLASS","keyBy","HEADER_ACTUAL_ROW_CLASS","throttle","LocalScrollTimer","LocalScrollService","HEADER_SLOT","CONTENT_SLOT","FOOTER_SLOT"],"sources":["src/components/data/row-renderer.tsx","src/plugins/groupingRow/grouping.row.renderer.tsx","src/components/data/row-highlight.plugin.ts","src/components/vnode/vnode.utils.ts","src/components/data/cell-renderer.tsx","src/components/data/revogr-data-style.scss?tag=revogr-data","src/components/data/revogr-data.tsx","node_modules/lodash/_defineProperty.js","node_modules/lodash/_baseAssignValue.js","node_modules/lodash/_arrayAggregator.js","node_modules/lodash/_baseAggregator.js","node_modules/lodash/_createAggregator.js","node_modules/lodash/keyBy.js","src/plugins/sorting/sorting.sign.tsx","src/components/header/header-renderer.tsx","src/plugins/groupingColumn/headerGroupRenderer.tsx","src/plugins/groupingColumn/columnGroupsRenderer.tsx","src/components/header/revogr-header-style.scss?tag=revogr-header","src/components/header/revogr-header.tsx","src/utils/resize-observer.polifill.ts","src/components/revoGrid/viewport.resize.service.ts","src/components/scroll/revogr-viewport-scroll-style.scss?tag=revogr-viewport-scroll","src/components/scroll/revogr-viewport-scroll.tsx","src/components/vnode/vnode-converter.tsx"],"sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { JSXBase } from '@stencil/core/internal';\nimport { DATA_ROW } from '../../utils/consts';\n\nexport interface RowProps extends JSXBase.HTMLAttributes {\n size: number;\n start: number;\n index: number;\n rowClass?: string;\n depth?: number;\n}\n\nexport const PADDING_DEPTH = 10;\n\nconst RowRenderer = ({ rowClass, index, size, start, depth }: RowProps, cells: VNode[]) => {\n const props = {\n ...{ [DATA_ROW]: index },\n };\n return (\n <div\n {...props}\n class={`rgRow ${rowClass || ''}`}\n style={{\n height: `${size}px`,\n transform: `translateY(${start}px)`,\n paddingLeft: depth ? `${PADDING_DEPTH * depth}px` : undefined,\n }}\n >\n {cells}\n </div>\n );\n};\n\nexport default RowRenderer;\n","import { h } from '@stencil/core';\nimport RowRenderer, { RowProps } from '../../components/data/row-renderer';\nimport { GROUP_DEPTH, GROUP_EXPANDED, GROUP_EXPAND_BTN, GROUP_EXPAND_EVENT, PSEUDO_GROUP_ITEM } from './grouping.const';\nimport { GroupLabelTemplateFunc } from './grouping.row.types';\nimport { DataType, PositionItem } from '@type';\n\ninterface GroupRowPros extends RowProps {\n model: DataType;\n hasExpand: boolean;\n groupingCustomRenderer?: GroupLabelTemplateFunc | null;\n}\ntype Props = GroupRowPros & PositionItem;\n\nfunction expandEvent(e: MouseEvent, model: DataType, virtualIndex: number) {\n const event = new CustomEvent(GROUP_EXPAND_EVENT, {\n detail: {\n model,\n virtualIndex,\n },\n cancelable: true,\n bubbles: true,\n });\n e.target?.dispatchEvent(event);\n}\n\nconst GroupingRowRenderer = (props: Props) => {\n const { model, itemIndex, hasExpand, groupingCustomRenderer } = props;\n const name: string = model[PSEUDO_GROUP_ITEM];\n const expanded = model[GROUP_EXPANDED];\n const depth = parseInt(model[GROUP_DEPTH], 10) || 0;\n if (!hasExpand) {\n return <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth} />;\n }\n\n if (groupingCustomRenderer) {\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <div onClick={e => expandEvent(e, model, itemIndex)}>\n {groupingCustomRenderer(h, { name, itemIndex, expanded, depth })}\n </div>\n </RowRenderer>\n );\n }\n\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <button class={{ [GROUP_EXPAND_BTN]: true }} onClick={e => expandEvent(e, model, itemIndex)}>\n <svg aria-hidden=\"true\" style={{ transform: `rotate(${!expanded ? -90 : 0}deg)` }} focusable=\"false\" viewBox=\"0 0 448 512\">\n <path\n fill=\"currentColor\"\n d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"\n ></path>\n </svg>\n </button>\n {name}\n </RowRenderer>\n );\n};\nexport default GroupingRowRenderer;\n","import { VNode } from '@stencil/core';\nimport { ROW_FOCUSED_CLASS } from '../../utils/consts';\nimport { RangeArea } from '@type';\n\n/**\n * Class is responsible for highlighting rows in a table.\n */\nexport class RowHighlightPlugin {\n private currentRange: RangeArea | null = null;\n selectionChange(e: RangeArea, renderedRows: Map<number, VNode>) {\n // clear previous range\n if (this.currentRange) {\n renderedRows.forEach((row, y) => {\n // skip current range\n if (e && y >= e.y && y <= e.y1) {\n return;\n }\n\n // clear previous range\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n row.$elm$.classList.remove(ROW_FOCUSED_CLASS);\n if (row.$attrs$?.class.includes(ROW_FOCUSED_CLASS)) {\n row.$attrs$.class = row.$attrs$.class.replace(\n ROW_FOCUSED_CLASS,\n '',\n );\n }\n }\n });\n }\n\n // apply new range\n if (e) {\n for (let y = e.y; y <= e.y1; y++) {\n const row = renderedRows.get(y);\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n !row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n const attrs = (row.$attrs$ = row.$attrs$ || {});\n attrs.class = (attrs.class || '') + ' ' + ROW_FOCUSED_CLASS;\n row.$elm$.classList.add(ROW_FOCUSED_CLASS);\n }\n }\n }\n this.currentRange = e;\n }\n\n isRowFocused(y: number) {\n return (\n this.currentRange && y >= this.currentRange.y && y <= this.currentRange.y1\n );\n }\n}\n","import { VNode } from '@stencil/core';\nimport { JSX } from '../../components';\n\n/**\n * Converts a VNode element into an HTML element and appends it to the specified parentHolder.\n */\nexport function convertVNodeToHTML(parentHolder: Element, redraw: JSX.VnodeHtml['redraw']): Promise<{ html: string; vnodes: VNode[] }> {\n return new Promise<{ html: string; vnodes: VNode[] }>(resolve => {\n const vnode = document.createElement('vnode-html');\n parentHolder.appendChild(vnode);\n vnode.redraw = redraw;\n vnode.addEventListener('html', e => {\n vnode.remove();\n resolve(e.detail);\n });\n });\n}\n","import { h, VNode, Build, EventEmitter } from '@stencil/core';\nimport {\n Providers,\n DragStartEvent,\n ColumnDataSchemaModel,\n CellTemplate,\n} from '@type';\n\nimport {\n DRAGGABLE_CLASS,\n DRAG_ICON_CLASS,\n} from '../../utils/consts';\n\nimport { getCellData, isRowDragService } from './column.service';\n\ninterface RenderProps {\n model: ColumnDataSchemaModel;\n providers: Providers;\n template?: CellTemplate;\n additionalData?: any;\n dragStartCell?: EventEmitter<DragStartEvent>;\n}\n\n\nfunction renderCell(v: RenderProps) {\n const els: (VNode | string)[] = [];\n\n // #region Custom cell\n if (v.template) {\n els.push(\n v.template(h, { ...v.model, providers: v.providers }, v.additionalData),\n );\n }\n // #endregion\n\n // #region Regular cell\n else {\n if (!v.model.column) {\n // something is wrong with data\n if (Build.isDev) {\n console.error('Investigate column problem.', v.model);\n }\n return '';\n }\n\n // Row drag\n if (\n v.model.column.rowDrag &&\n isRowDragService(v.model.column.rowDrag, v.model)\n ) {\n els.push(\n <span\n class={DRAGGABLE_CLASS}\n onMouseDown={originalEvent =>\n v.dragStartCell.emit({\n originalEvent,\n model: v.model,\n })\n }\n >\n <span class={DRAG_ICON_CLASS} />\n </span>,\n );\n }\n\n els.push(`${getCellData(v.model.model[v.model.prop])}`);\n }\n return els;\n}\n\nexport const CellRenderer = ({\n renderProps,\n cellProps,\n}: {\n renderProps: RenderProps;\n cellProps: any;\n}): VNode => {\n const render = renderCell.bind(null, renderProps);\n return (\n <div {...cellProps} redraw={render}>\n {render()}\n </div>\n );\n};\n","revogr-data {\n display: block;\n width: 100%;\n position: relative;\n\n .rgRow {\n position: absolute;\n width: 100%;\n left: 0;\n\n &.groupingRow {\n font-weight: 600;\n text-align: left;\n\n .group-expand {\n width: 25px;\n height: 100%;\n max-height: 25px;\n margin-right: 2px;\n background-color: transparent;\n border-color: transparent;\n\n svg {\n width: 7px;\n }\n }\n }\n }\n\n .revo-draggable {\n $w: 24px;\n\n border: none;\n height: 32px;\n display: inline-flex;\n outline: 0;\n padding: 0;\n font-size: 0.8125rem;\n box-sizing: border-box;\n align-items: center;\n white-space: nowrap;\n vertical-align: middle;\n justify-content: center;\n text-decoration: none;\n width: $w;\n height: 100%;\n cursor: pointer;\n display: inline-flex;\n\n &:hover {\n > .revo-drag-icon {\n opacity: 1;\n zoom: 1.2;\n font-weight: 600;\n }\n }\n\n > .revo-drag-icon {\n pointer-events: none;\n transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n }\n\n .rgCell {\n top: 0;\n left: 0;\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n }\n}\n","import {\n Component,\n Host,\n Watch,\n Element,\n Event,\n Prop,\n VNode,\n EventEmitter,\n h,\n Method,\n State,\n} from '@stencil/core';\n\nimport ColumnService from './column.service';\nimport { DATA_COL, DATA_ROW, ROW_FOCUSED_CLASS } from '../../utils/consts';\n\nimport { DSourceState, getSourceItem } from '@store';\nimport RowRenderer, { PADDING_DEPTH } from './row-renderer';\nimport GroupingRowRenderer from '../../plugins/groupingRow/grouping.row.renderer';\nimport { isGrouping } from '../../plugins/groupingRow/grouping.service';\nimport { DimensionCols, DimensionRows } from '@type';\nimport { RowHighlightPlugin } from './row-highlight.plugin';\nimport { convertVNodeToHTML } from '../vnode/vnode.utils';\nimport { CellRenderer } from './cell-renderer';\nimport {\n ViewportState,\n DimensionSettingsState,\n BeforeRowRenderEvent,\n Providers,\n ColumnRegular,\n DataType,\n CellProps,\n BeforeCellRenderEvent,\n DragStartEvent,\n ColumnDataSchemaModel,\n VirtualPositionItem,\n RangeArea,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils/store.utils';\n\n/**\n * This component is responsible for rendering data\n * Rows, columns, groups and cells\n */\n@Component({\n tag: 'revogr-data',\n styleUrl: 'revogr-data-style.scss',\n})\nexport class RevogrData {\n // #region Properties\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * Range allowed\n */\n @Prop() range: boolean;\n\n /**\n * Defines property from which to read row class\n */\n @Prop() rowClass: string;\n /**\n * Additional data to pass to renderer\n * Used in plugins such as vue or react to pass root app entity to cells\n */\n @Prop() additionalData: any;\n /** Stores */\n /** Selection, range, focus for row selection */\n @Prop() rowSelectionStore!: Observable<SelectionStoreState>;\n /** Viewport Y */\n @Prop() viewportRow!: Observable<ViewportState>;\n /** Viewport X */\n @Prop() viewportCol!: Observable<ViewportState>;\n /** Dimension settings Y */\n @Prop() dimensionRow!: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n /**\n * Column source\n */\n @Prop() colData: Observable<DSourceState<ColumnRegular, DimensionCols>>;\n /**\n * Data rows source\n */\n @Prop() dataStore!: Observable<DSourceState<DataType, DimensionRows>>;\n /**\n * Row data type\n */\n @Prop({ reflect: true }) type!: DimensionRows;\n\n /**\n * Column data type\n */\n @Prop({ reflect: true }) colType!: DimensionCols | 'rowHeaders';\n\n /**\n * Prevent rendering until job is done.\n * Can be used for initial rendering performance improvement.\n * When several plugins require initial rendering this will prevent double initial rendering.\n */\n @Prop() jobsBeforeRender: Promise<any>[] = [];\n // #endregion\n\n /**\n * Before each row render\n */\n @Event() beforerowrender: EventEmitter<BeforeRowRenderEvent>;\n \n /**\n * When data render finished for the designated type\n */\n @Event() afterrender: EventEmitter<{ type: DimensionRows }>;\n /**\n * Before each cell render function. Allows to override cell properties\n */\n @Event({ eventName: 'beforecellrender' })\n beforeCellRender: EventEmitter<BeforeCellRenderEvent>;\n\n /**\n * Event emitted on cell drag start\n */\n @Event({ eventName: 'dragstartcell' })\n dragStartCell: EventEmitter<DragStartEvent>;\n\n /**\n * Pointed cell update.\n */\n @Method() async updateCell(e: {\n row: number; // virtual\n col: number; // virtual\n }) {\n // Stencil tweak to update cell content\n const cell = this.renderedRows.get(e.row)?.$children$?.[e.col];\n if (cell?.$attrs$?.redraw) {\n const children = await convertVNodeToHTML(\n this.element,\n cell.$attrs$.redraw,\n );\n cell.$elm$.innerHTML = children.html;\n cell.$key$ = Math.random();\n }\n }\n\n @Element() element!: Element;\n @State() providers: Providers;\n private columnService: ColumnService;\n private rowHighlightPlugin: RowHighlightPlugin;\n /**\n * Rendered rows - virtual index vs vnode\n */\n private renderedRows = new Map<number, VNode>();\n private rangeUnsubscribe: (() => void) | undefined;\n\n @Watch('dataStore') onDataStoreChange() {\n this.onStoreChange();\n }\n @Watch('colData') onColDataChange() {\n this.onStoreChange();\n }\n onStoreChange() {\n this.columnService?.destroy();\n this.columnService = new ColumnService(this.dataStore, this.colData);\n // make sure we have correct data, before render\n this.providers = {\n type: this.type,\n readonly: this.readonly,\n data: this.dataStore,\n viewport: this.viewportCol,\n dimension: this.dimensionRow,\n selection: this.rowSelectionStore,\n };\n\n this.rangeUnsubscribe?.();\n this.rangeUnsubscribe = this.rowSelectionStore.onChange(\n 'range',\n (e: RangeArea) =>\n this.rowHighlightPlugin.selectionChange(e, this.renderedRows),\n );\n }\n\n connectedCallback() {\n this.rowHighlightPlugin = new RowHighlightPlugin();\n this.onStoreChange();\n }\n\n disconnectedCallback() {\n this.columnService?.destroy();\n this.rangeUnsubscribe?.();\n }\n\n async componentWillRender() {\n return Promise.all(this.jobsBeforeRender);\n }\n\n componentDidRender() {\n this.afterrender.emit({ type: this.type });\n }\n\n render() {\n this.renderedRows = new Map();\n const columnsData = this.columnService.columns;\n if (!columnsData.length) {\n return;\n }\n const rows = this.viewportRow.get('items');\n if (!rows.length) {\n return;\n }\n const cols = this.viewportCol.get('items');\n if (!cols.length) {\n return;\n }\n const rowsEls: VNode[] = [];\n const depth = this.dataStore.get('groupingDepth');\n const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');\n const groupDepth = this.columnService.hasGrouping ? depth : 0;\n for (let rgRow of rows) {\n const dataItem = getSourceItem(this.dataStore, rgRow.itemIndex);\n\n // #region Grouping\n if (isGrouping(dataItem)) {\n rowsEls.push(\n <GroupingRowRenderer\n {...rgRow}\n index={rgRow.itemIndex}\n model={dataItem}\n groupingCustomRenderer={groupingCustomRenderer}\n hasExpand={this.columnService.hasGrouping}\n />,\n );\n continue;\n }\n // #endregion\n const cells: (VNode | string | void)[] = [];\n\n // #region Cells\n for (let rgCol of cols) {\n const model = this.columnService.rowDataModel(\n rgRow.itemIndex,\n rgCol.itemIndex,\n );\n\n // call before cell render\n const cellEvent = this.triggerBeforeCellRender(model, rgRow, rgCol);\n\n // if event was prevented\n if (cellEvent.defaultPrevented) {\n continue;\n }\n\n const {\n detail: { column: columnProps, row: rowProps },\n } = cellEvent;\n\n const defaultProps: CellProps = {\n [DATA_COL]: columnProps.itemIndex,\n [DATA_ROW]: rowProps.itemIndex,\n style: {\n width: `${columnProps.size}px`,\n transform: `translateX(${columnProps.start}px)`,\n height: rowProps.size ? `${rowProps.size}px` : undefined,\n },\n };\n /**\n * For grouping, can be removed in the future and replaced with event\n */\n if (groupDepth && !columnProps.itemIndex && defaultProps.style) {\n defaultProps.style.paddingLeft = `${PADDING_DEPTH * groupDepth}px`;\n }\n\n const props = this.columnService.mergeProperties(\n rowProps.itemIndex,\n columnProps.itemIndex,\n defaultProps,\n model,\n columnsData[columnProps.itemIndex]?.cellProperties,\n );\n\n // Never use webcomponent for cell render\n // It's very slow because of webcomponent initialization takes time\n cells.push(\n <CellRenderer\n renderProps={{\n model,\n providers: this.providers,\n template: columnsData[columnProps.itemIndex]?.cellTemplate,\n additionalData: this.additionalData,\n dragStartCell: this.dragStartCell,\n }}\n cellProps={props}\n />,\n );\n }\n // #endregion\n\n // #region Rows\n let rowClass = this.rowClass\n ? this.columnService.getRowClass(rgRow.itemIndex, this.rowClass)\n : '';\n if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {\n rowClass += ` ${ROW_FOCUSED_CLASS}`;\n }\n const row: VNode = (\n <RowRenderer\n index={rgRow.itemIndex}\n rowClass={rowClass}\n size={rgRow.size}\n start={rgRow.start}\n >\n {cells}\n </RowRenderer>\n );\n this.beforerowrender.emit({\n node: row,\n item: rgRow,\n model: dataItem,\n colType: this.columnService.type,\n rowType: this.type,\n });\n rowsEls.push(row);\n this.renderedRows.set(rgRow.itemIndex, row);\n // #endregion\n }\n return (\n <Host>\n <slot />\n {rowsEls}\n </Host>\n );\n }\n\n triggerBeforeCellRender(\n model: ColumnDataSchemaModel,\n row: VirtualPositionItem,\n column: VirtualPositionItem,\n ) {\n return this.beforeCellRender.emit({\n column: { ...column },\n row: { ...row },\n model,\n rowType: model.type,\n colType: model.colType,\n });\n }\n}\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nmodule.exports = keyBy;\n","import { h } from '@stencil/core';\nimport { ColumnRegular } from '@type';\n\nexport const FILTER_BUTTON_CLASS = 'rv-filter';\nexport const FILTER_BUTTON_ACTIVE = 'active';\n\ntype Props = {\n column: ColumnRegular;\n};\nexport const SortingSign = ({ column }: Props) => {\n return <i class={column?.order ?? 'sort-off'} />;\n};\n","import { h, VNode } from '@stencil/core';\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from './resizable.directive';\nimport {\n DATA_COL,\n FOCUS_CLASS,\n HEADER_CLASS,\n HEADER_SORTABLE_CLASS,\n MIN_COL_SIZE,\n} from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport {\n VirtualPositionItem,\n ColumnTemplateProp,\n InitialHeaderClick,\n CellProps,\n} from '@type';\nimport { RangeArea } from '@type';\n\ntype Props = {\n column: VirtualPositionItem;\n additionalData: any;\n data?: ColumnTemplateProp;\n range?: RangeArea;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDoubleClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: Props): VNode => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: CellProps & Partial<ResizeProps> = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: {\n width: `${p.column.size}px`,\n transform: `translateX(${p.column.start}px)`,\n },\n onResize: p.onResize,\n onDoubleClick(originalEvent: MouseEvent) {\n p.onDoubleClick({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer\n data={p.data}\n props={dataProps}\n additionalData={p.additionalData}\n >\n {<SortingSign column={p.data} />}\n {p.canFilter && p.data?.filter !== false ? (\n <FilterButton column={p.data} />\n ) : (\n ''\n )}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n","import { h, VNode } from '@stencil/core';\nimport { Group } from '@store';\nimport { CellProps, Providers } from '@type';\nimport { ResizeEvent, ResizeProps } from '../../components/header/resizable.directive';\nimport { HEADER_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from '../../components/header/header-cell-renderer';\nimport { DimensionCols } from '../../components';\n\ntype Props = {\n start: number;\n end: number;\n group: Group;\n providers: Providers<DimensionCols | 'rowHeaders'>;\n additionalData: any;\n canResize?: boolean;\n onResize?(e: ResizeEvent): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst GroupHeaderRenderer = (p: Props): VNode[] => {\n const groupProps: CellProps & Partial<ResizeProps> = {\n canResize: p.canResize,\n minWidth: p.group.ids.length * MIN_COL_SIZE,\n maxWidth: 0,\n\n active: p.active || ['r'],\n class: {\n [HEADER_CLASS]: true,\n },\n style: {\n transform: `translateX(${p.start}px)`,\n width: `${p.end - p.start}px`,\n },\n onResize: p.onResize,\n };\n return (\n <HeaderCellRenderer\n data={{\n ...p.group,\n prop: '',\n providers: p.providers,\n index: p.start,\n }}\n props={groupProps}\n additionalData={p.additionalData}\n />\n );\n};\n\nexport default GroupHeaderRenderer;\n","import { h, VNode } from '@stencil/core';\nimport findIndex from 'lodash/findIndex';\nimport { Group, getItemByIndex } from '@store';\nimport { DimensionSettingsState, Providers, DimensionCols } from '@type';\nimport { HEADER_ROW_CLASS } from '../../utils/consts';\nimport GroupHeaderRenderer from './headerGroupRenderer';\nimport { ResizeProps } from '../../components/header/resizable.directive';\n\ntype Props<T> = {\n visibleProps: { [prop: string]: number };\n groups: Record<number, Group[]>;\n dimensionCol: Pick<DimensionSettingsState, 'indexes' | 'originItemSize' | 'indexToItem'>;\n depth: number;\n canResize: boolean;\n providers: Providers<T>;\n additionalData: any;\n onResize(changedX: number, startIndex: number, endIndex: number): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst ColumnGroupsRenderer = ({\n additionalData, providers, depth, groups, visibleProps, dimensionCol, canResize, active, onResize\n}: Props<DimensionCols | 'rowHeaders'>): VNode[] => {\n // render group columns\n const groupRow: VNode[] = [];\n for (let i = 0; i < depth; i++) {\n if (groups[i]) {\n for (let group of groups[i]) {\n // if group in visible range\n // find first visible group prop in visible columns range\n const indexFirstVisibleCol: number | undefined = findIndex(group.ids, id => typeof visibleProps[id] === 'number');\n if (indexFirstVisibleCol > -1) {\n const colVisibleIndex = visibleProps[group.ids[indexFirstVisibleCol]]; // get column index\n const groupStartIndex = colVisibleIndex - indexFirstVisibleCol; // first column index in group\n const groupEndIndex = groupStartIndex + group.ids.length - 1; // last column index in group\n\n // coordinates\n const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;\n const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;\n groupRow.push(\n <GroupHeaderRenderer\n providers={providers}\n start={groupStart}\n end={groupEnd}\n group={group}\n active={active}\n canResize={canResize}\n onResize={e => onResize(e.changedX, groupStartIndex, groupEndIndex)}\n additionalData={additionalData}\n />,\n );\n }\n }\n }\n groupRow.push(<div class={`${HEADER_ROW_CLASS} group`} />);\n }\n return groupRow;\n};\n\nexport default ColumnGroupsRenderer;\n","revogr-header {\n position: relative;\n z-index: 5;\n display: block;\n \n\n .rgHeaderCell {\n display: flex;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n &.sortable {\n cursor: pointer;\n }\n\n i {\n &.asc,\n &.desc {\n &:after {\n font-size: 13px;\n }\n }\n &.asc {\n &:after {\n content: '↑';\n }\n }\n &.desc {\n &:after {\n content: '↓';\n }\n }\n }\n }\n\n .rgHeaderCell,\n .grouped-cell {\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n z-index: 1;\n }\n\n .header-rgRow {\n display: block;\n position: relative;\n\n &.group {\n z-index: 0;\n }\n }\n\n .group-rgRow {\n position: relative;\n }\n\n .rgHeaderCell {\n &.active {\n z-index: 10;\n\n .resizable {\n background-color: deepskyblue;\n }\n }\n .header-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n }\n .resizable {\n display: block;\n position: absolute;\n z-index: 90;\n touch-action: none;\n user-select: none;\n &:hover {\n background-color: deepskyblue;\n }\n }\n $size: 6px;\n > .resizable-r {\n cursor: ew-resize;\n width: $size;\n right: 0;\n top: 0;\n height: 100%;\n }\n > .resizable-rb {\n cursor: se-resize;\n width: $size;\n height: $size;\n right: 0;\n bottom: 0;\n }\n\n > .resizable-b {\n cursor: s-resize;\n height: $size;\n bottom: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-lb {\n cursor: sw-resize;\n width: $size;\n height: $size;\n left: 0;\n bottom: 0;\n }\n\n > .resizable-l {\n cursor: w-resize;\n width: $size;\n left: 0;\n height: 100%;\n top: 0;\n }\n\n > .resizable-lt {\n cursor: nw-resize;\n width: $size;\n height: $size;\n left: 0;\n top: 0;\n }\n\n > .resizable-t {\n cursor: n-resize;\n height: $size;\n top: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-rt {\n cursor: ne-resize;\n width: $size;\n height: $size;\n right: 0;\n top: 0;\n }\n }\n .rv-filter {\n visibility: hidden;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { HTMLStencilElement, VNode } from '@stencil/core/internal';\nimport keyBy from 'lodash/keyBy';\n\nimport { HEADER_ACTUAL_ROW_CLASS, HEADER_ROW_CLASS } from '../../utils/consts';\nimport { Groups } from '@store';\nimport HeaderRenderer from './header-renderer';\nimport ColumnGroupsRenderer from '../../plugins/groupingColumn/columnGroupsRenderer';\nimport { ResizeProps } from './resizable.directive';\nimport {\n ColumnRegular,\n DimensionSettingsState,\n InitialHeaderClick,\n Providers,\n ViewportState,\n ViewSettingSizeProp,\n DimensionCols,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils/store.utils';\n\n@Component({\n tag: 'revogr-header',\n styleUrl: 'revogr-header-style.scss',\n})\nexport class RevogrHeaderComponent {\n // #region Properties\n /**\n * Stores\n */\n /** Viewport X */\n @Prop() viewportCol: Observable<ViewportState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n /** Selection, range, focus */\n @Prop() selectionStore: Observable<SelectionStoreState>;\n\n /**\n * Column groups\n */\n @Prop() groups: Groups;\n /**\n * Grouping depth, how many levels of grouping\n */\n @Prop() groupingDepth = 0;\n\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * If columns can be resized\n */\n @Prop() canResize: boolean;\n /**\n * Defines resize position\n */\n @Prop() resizeHandler: ResizeProps['active'];\n\n /**\n * Columns - defines an array of grid columns.\n */\n @Prop() colData: ColumnRegular[];\n\n /**\n * Column filter\n */\n @Prop() columnFilter: boolean;\n\n /**\n * Column type\n */\n @Prop() type!: DimensionCols | 'rowHeaders';\n\n /**\n * Extra properties to pass into header renderer, such as vue or react components to handle parent\n */\n @Prop() additionalData: any = {};\n // #endregion\n\n // #region Events\n\n /**\n * On initial header click\n */\n @Event({\n eventName: 'beforeheaderclick',\n })\n initialHeaderClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * On header resize\n */\n @Event({\n eventName: 'headerresize',\n })\n headerresize: EventEmitter<ViewSettingSizeProp>;\n\n /**\n * On before header resize\n */\n @Event({ eventName: 'beforeheaderresize', cancelable: true })\n beforeResize: EventEmitter<ColumnRegular[]>;\n\n /**\n * On header double click\n */\n @Event({\n eventName: 'headerdblclick',\n })\n headerdblClick: EventEmitter<InitialHeaderClick>;\n // #endregion\n\n @Element() element!: HTMLStencilElement;\n\n private onResize({ width }: { width?: number }, index: number) {\n const col = this.colData[index];\n const event = this.beforeResize.emit([\n {\n ...col,\n size: width || undefined,\n },\n ]);\n if (event.defaultPrevented) {\n return;\n }\n this.headerresize.emit({ [index]: width || 0 });\n }\n\n private onResizeGroup(\n changedX: number,\n startIndex: number,\n endIndex: number,\n ) {\n const sizes: ViewSettingSizeProp = {};\n const cols = keyBy(this.viewportCol.get('items'), 'itemIndex');\n const change = changedX / (endIndex - startIndex + 1);\n for (let i = startIndex; i <= endIndex; i++) {\n const item = cols[i];\n if (item) {\n sizes[i] = item.size + change;\n }\n }\n this.headerresize.emit(sizes);\n }\n\n render() {\n const cols = this.viewportCol.get('items');\n const range = this.selectionStore?.get('range');\n const cells: VNode[] = [];\n const visibleProps: { [prop: string]: number } = {};\n\n // render header columns\n for (let rgCol of cols) {\n const colData = this.colData[rgCol.itemIndex];\n cells.push(\n <HeaderRenderer\n range={range}\n column={rgCol}\n data={{\n ...colData,\n index: rgCol.itemIndex,\n providers: this.providers,\n }}\n canFilter={!!this.columnFilter}\n canResize={this.canResize}\n active={this.resizeHandler}\n onResize={e => this.onResize(e, rgCol.itemIndex)}\n onDoubleClick={e => this.headerdblClick.emit(e)}\n onClick={e => this.initialHeaderClick.emit(e)}\n additionalData={this.additionalData}\n />,\n );\n visibleProps[colData?.prop] = rgCol.itemIndex;\n }\n\n return [\n <div class=\"group-rgRow\">\n <ColumnGroupsRenderer\n canResize={this.canResize}\n active={this.resizeHandler}\n visibleProps={visibleProps}\n providers={this.providers}\n groups={this.groups}\n dimensionCol={this.dimensionCol.state}\n depth={this.groupingDepth}\n onResize={(changedX, startIndex, endIndex) =>\n this.onResizeGroup(changedX, startIndex, endIndex)\n }\n additionalData={this.additionalData}\n />\n </div>,\n <div class={`${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}`}>\n {cells}\n </div>,\n ];\n }\n\n get providers(): Providers<DimensionCols | 'rowHeaders'> {\n return {\n type: this.type,\n readonly: this.readonly,\n data: this.colData,\n viewport: this.viewportCol,\n dimension: this.dimensionCol,\n selection: this.selectionStore,\n };\n }\n}\n","export async function resizeObserver() {\n if (!('ResizeObserver' in window)) {\n const module = await import('@juggle/resize-observer');\n (window as Window & typeof globalThis).ResizeObserver = (module.ResizeObserver as unknown) as typeof ResizeObserver;\n }\n}\n","import throttle from 'lodash/throttle';\nimport { resizeObserver } from '../../utils/resize-observer.polifill';\ninterface Events {\n resize(entries: ReadonlyArray<ResizeObserverEntry>, observer: ResizeObserver): void;\n}\nexport default class GridResizeService {\n private resizeObserver: ResizeObserver | null = null;\n private resize = throttle((e: ReadonlyArray<ResizeObserverEntry>, o: ResizeObserver) => this.events?.resize(e, o), 10);\n constructor(el: HTMLElement, private events: Events) {\n this.init(el);\n }\n\n async init(el: HTMLElement): Promise<void> {\n await resizeObserver();\n this.resizeObserver = new ResizeObserver(this.resize);\n this.resizeObserver?.observe(el);\n }\n\n public destroy() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n }\n}\n","@mixin noScroll {\n /* Hide scrollbar for IE and Edge */\n -ms-overflow-style: none;\n scrollbar-width: none; /* Firefox */\n /* Hide scrollbar for Chrome, Safari and Opera */\n &::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n}\n\n.rowHeaders {\n z-index: 2;\n font-size: 10px;\n display: flex;\n height: 100%;\n\n revogr-data .rgCell {\n text-align: center;\n }\n\n .rgCell {\n padding: 0 1em !important;\n min-width: 100%;\n }\n}\n\nrevogr-viewport-scroll {\n @include noScroll;\n\n overflow-x: auto;\n overflow-y: hidden;\n position: relative;\n z-index: 1;\n height: 100%;\n\n &.colPinStart,\n &.colPinEnd {\n z-index: 2;\n }\n\n // make sure it would work\n &.colPinEnd:has(.active) {\n overflow: visible;\n }\n\n &.rgCol {\n flex-grow: 1;\n }\n\n .content-wrapper {\n overflow: hidden;\n }\n\n .inner-content-table {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n width: 100%;\n min-width: 100%;\n position: relative;\n z-index: 0;\n }\n\n .vertical-inner {\n overflow-y: auto;\n position: relative;\n width: 100%;\n flex-grow: 1;\n @include noScroll;\n\n revogr-data,\n revogr-overlay-selection {\n height: 100%;\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Method,\n Element,\n Prop,\n Host,\n Listen,\n} from '@stencil/core';\n\nimport GridResizeService from '../revoGrid/viewport.resize.service';\nimport LocalScrollService from '../../services/local.scroll.service';\nimport { LocalScrollTimer } from '../../services/local.scroll.timer';\nimport {\n CONTENT_SLOT,\n FOOTER_SLOT,\n HEADER_SLOT,\n} from '../revoGrid/viewport.helpers';\nimport { DimensionCols, DimensionType } from '@type';\nimport { ScrollCoordinateEvent, ViewPortResizeEvent, ViewPortScrollEvent } from '@type';\n\ntype Delta = 'deltaX' | 'deltaY';\ntype LocalScrollEvent = {\n preventDefault(): void;\n} & { [x in Delta]: number };\n\n/**\n * Viewport scroll component for RevoGrid\n * @slot - content\n * @slot header - header\n * @slot footer - footer\n */\n@Component({\n tag: 'revogr-viewport-scroll',\n styleUrl: 'revogr-viewport-scroll-style.scss',\n})\nexport class RevogrViewportScroll {\n /**\n * Enable row header\n */\n @Prop() readonly rowHeader: boolean;\n\n /**\n * Width of inner content\n */\n @Prop() contentWidth = 0;\n /**\n * Height of inner content\n */\n @Prop() contentHeight = 0;\n\n @Prop() colType!: DimensionCols | 'rowHeaders';\n\n /**\n * Before scroll event\n */\n @Event({ eventName: 'scrollviewport', bubbles: true }) scrollViewport: EventEmitter<ViewPortScrollEvent>;\n /**\n * Viewport resize\n */\n @Event({ eventName: 'resizeviewport' }) resizeViewport: EventEmitter<ViewPortResizeEvent>;\n\n /**\n * Triggered on scroll change, can be used to get information about scroll visibility\n */\n @Event() scrollchange: EventEmitter<{\n type: DimensionType;\n hasScroll: boolean;\n }>;\n\n /**\n * Silently scroll to coordinate\n * Made to align negative coordinates for mobile devices\n */\n @Event({ eventName: 'scrollviewportsilent' }) silentScroll: EventEmitter<ViewPortScrollEvent>;\n\n @Element() horizontalScroll: HTMLElement;\n\n private oldValY = this.contentHeight;\n private oldValX = this.contentWidth;\n\n private verticalScroll: HTMLElement;\n private header: HTMLElement;\n private footer: HTMLElement;\n\n /**\n * Static functions to bind wheel change\n */\n private horizontalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n private verticalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n\n private resizeService: GridResizeService;\n private localScrollService: LocalScrollService;\n private localScrollTimer: LocalScrollTimer;\n\n\n @Method() async setScroll(e: ViewPortScrollEvent) {\n this.localScrollTimer.latestScrollUpdate(e.dimension);\n this.localScrollService?.setScroll(e);\n }\n\n /**\n * update on delta in case we don't know existing position or external change\n * @param e\n */\n @Method() async changeScroll(\n e: ViewPortScrollEvent,\n silent = false,\n ) {\n if (silent) {\n if (e.coordinate) {\n switch (e.dimension) {\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n case 'rgRow':\n this.verticalScroll.style.transform = `translateY(${-1 * e.coordinate}px)`;\n break;\n }\n }\n return null;\n }\n if (e.delta) {\n switch (e.dimension) {\n case 'rgCol':\n e.coordinate = this.horizontalScroll.scrollLeft + e.delta;\n break;\n case 'rgRow':\n e.coordinate = this.verticalScroll.scrollTop + e.delta;\n break;\n }\n this.setScroll(e);\n }\n return e;\n }\n\n /**\n * Dispatch this event to trigger vertical mouse wheel from plugins\n */\n @Listen('mousewheel-vertical') mousewheelVertical({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.verticalMouseWheel(e);\n }\n /**\n * Dispatch this event to trigger horizontal mouse wheel from plugins\n */\n @Listen('mousewheel-horizontal') mousewheelHorizontal({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.horizontalMouseWheel(e);\n }\n /**\n * Allows to use outside listener\n */\n @Listen('scroll-coordinate') scrollApply({\n detail: { type, coordinate },\n }: CustomEvent<ScrollCoordinateEvent>) {\n this.applyOnScroll(type, coordinate, true);\n }\n\n connectedCallback() {\n /**\n * Bind scroll functions for farther usage\n */\n // allow mousewheel for all devices including mobile\n this.verticalMouseWheel = this.onVerticalMouseWheel.bind(\n this,\n 'rgRow',\n 'deltaY',\n );\n this.horizontalMouseWheel = this.onHorizontalMouseWheel.bind(\n this,\n 'rgCol',\n 'deltaX',\n );\n this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);\n /**\n * Create local scroll service\n */\n this.localScrollService = new LocalScrollService({\n // to improve safari smoothnes on scroll\n // skipAnimationFrame: isSafariDesktop(),\n runScroll: e => this.scrollViewport.emit(e),\n applyScroll: e => {\n this.localScrollTimer.setCoordinate(e);\n switch (e.dimension) {\n case 'rgCol':\n // this will trigger on scroll event\n this.horizontalScroll.scrollLeft = e.coordinate;\n break;\n case 'rgRow':\n // this will trigger on scroll event\n this.verticalScroll.scrollTop = e.coordinate;\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n if (this.verticalScroll.style.transform) {\n this.verticalScroll.style.transform = '';\n }\n break;\n }\n },\n });\n }\n\n componentDidLoad() {\n // track horizontal viewport resize\n this.resizeService = new GridResizeService(this.horizontalScroll, {\n resize: entries => {\n let height = entries[0]?.contentRect.height || 0;\n if (height) {\n height -= this.header.clientHeight + this.footer.clientHeight;\n }\n const els = {\n rgRow: {\n size: height,\n contentSize: this.contentHeight,\n scroll: this.verticalScroll.scrollTop,\n noScroll: false,\n },\n rgCol: {\n size: entries[0]?.contentRect.width || 0,\n contentSize: this.contentWidth,\n scroll: this.horizontalScroll.scrollLeft,\n noScroll: this.colType !== 'rgCol' ? true : false,\n },\n };\n for (const [dim, item] of Object.entries(els)) {\n const dimension = dim as DimensionType;\n this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader });\n if (item.noScroll) {\n continue;\n }\n this.localScrollService?.scroll(item.scroll, dimension, true);\n // track scroll visibility on outer element change\n this.setScrollVisibility(dimension, item.size, item.contentSize);\n }\n },\n });\n }\n\n /**\n * Check if scroll present or not per type\n * Trigger this method on inner content size change or on outer element size change\n * If inner content bigger then outer size then scroll is present and mousewheel binding required\n * @param type - dimension type 'rgRow/y' or 'rgCol/x'\n * @param size - outer content size\n * @param innerContentSize - inner content size\n */\n setScrollVisibility(\n type: DimensionType,\n size: number,\n innerContentSize: number,\n ) {\n // test if scroll present\n const hasScroll = size < innerContentSize;\n let el: HTMLElement;\n // event reference for binding\n switch (type) {\n case 'rgCol':\n el = this.horizontalScroll;\n break;\n case 'rgRow':\n el = this.verticalScroll;\n break;\n }\n // based on scroll visibility assign or remove class and event\n if (hasScroll) {\n el.classList.add(`scroll-${type}`);\n } else {\n el.classList.remove(`scroll-${type}`);\n }\n this.scrollchange.emit({ type, hasScroll });\n }\n\n disconnectedCallback() {\n this.resizeService.destroy();\n }\n\n async componentDidRender() {\n // scroll update if number of rows changed\n if (this.contentHeight < this.oldValY && this.verticalScroll) {\n this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;\n }\n this.oldValY = this.contentHeight;\n\n // scroll update if number of cols changed\n if (this.contentWidth < this.oldValX) {\n this.horizontalScroll.scrollLeft += this.contentWidth - this.oldValX;\n }\n this.oldValX = this.contentWidth;\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentHeight,\n clientSize: this.verticalScroll.clientHeight,\n virtualSize: 0,\n },\n 'rgRow',\n );\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentWidth,\n clientSize: this.horizontalScroll.clientWidth,\n virtualSize: 0,\n },\n 'rgCol',\n );\n this.setScrollVisibility(\n 'rgRow',\n this.verticalScroll.clientHeight,\n this.contentHeight,\n );\n this.setScrollVisibility(\n 'rgCol',\n this.horizontalScroll.clientWidth,\n this.contentWidth,\n );\n }\n\n render() {\n return (\n <Host\n onWheel={this.horizontalMouseWheel}\n onScroll={(e: UIEvent) => this.applyScroll('rgCol', e)}\n >\n <div\n class=\"inner-content-table\"\n style={{ width: `${this.contentWidth}px` }}\n >\n <div class=\"header-wrapper\" ref={e => (this.header = e)}>\n <slot name={HEADER_SLOT} />\n </div>\n <div\n class=\"vertical-inner\"\n ref={el => (this.verticalScroll = el)}\n onWheel={this.verticalMouseWheel}\n onScroll={(e: MouseEvent) => this.applyScroll('rgRow', e)}\n >\n <div\n class=\"content-wrapper\"\n style={{ height: `${this.contentHeight}px` }}\n >\n <slot name={CONTENT_SLOT} />\n </div>\n </div>\n <div class=\"footer-wrapper\" ref={e => (this.footer = e)}>\n <slot name={FOOTER_SLOT} />\n </div>\n </div>\n </Host>\n );\n }\n /**\n * Extra layer for scroll event monitoring, where MouseWheel event is not passing\n * We need to trigger scroll event in case there is no mousewheel event\n */\n @Method() async applyScroll(type: DimensionType, e: UIEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n let scroll = 0;\n switch (type) {\n case 'rgCol':\n scroll = e.target.scrollLeft;\n break;\n case 'rgRow':\n scroll = e.target.scrollTop;\n break;\n }\n\n // for mobile devices to skip negative scroll loop\n if (scroll < 0) {\n this.silentScroll.emit({ dimension: type, coordinate: scroll });\n return;\n }\n this.applyOnScroll(type, scroll);\n }\n\n /**\n * Applies change on scroll event only if mousewheel event happened some time ago\n */\n private applyOnScroll(\n type: DimensionType,\n coordinate: number,\n outside = false,\n ) {\n // apply after throttling\n if (this.localScrollTimer.isReady(type, coordinate)) {\n this.localScrollService?.scroll(\n coordinate,\n type,\n undefined,\n undefined,\n outside,\n );\n }\n }\n\n /**\n * On vertical mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onVerticalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n e.preventDefault?.();\n const pos = this.verticalScroll.scrollTop + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n\n /**\n * On horizontal mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onHorizontalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n e.preventDefault?.();\n const pos = this.horizontalScroll.scrollLeft + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n VNode,\n h,\n} from '@stencil/core';\n\n/**\n * VNode to html converter for stencil components.\n * Transform VNode to html string.\n */\n/**\n * @internal\n */\n@Component({\n tag: 'vnode-html',\n})\nexport class VNodeToHtml {\n @Prop() redraw: (() => VNode[]) | null | undefined = null;\n @Event() html: EventEmitter<{ html: string; vnodes: VNode[] }>;\n @Element() el: HTMLElement;\n\n private vnodes: VNode[] | null = [];\n\n componentDidRender() {\n this.html.emit({\n html: this.el.innerHTML,\n vnodes: this.vnodes,\n });\n }\n\n render() {\n this.vnodes = this.redraw?.();\n return (\n <Host\n style={{ visibility: 'hidden', position: 'absolute' }}\n >\n {this.vnodes}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -4,7 +4,7 @@
4
4
  import { h } from "@stencil/core";
5
5
  import { FilterButton } from "../../plugins/filter/filter.button";
6
6
  import { SortingSign } from "../../plugins/sorting/sorting.sign";
7
- import { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZE } from "../../utils/consts";
7
+ import { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZE, } from "../../utils/consts";
8
8
  import { HeaderCellRenderer } from "./header-cell-renderer";
9
9
  const HeaderRenderer = (p) => {
10
10
  var _a, _b, _c, _d, _e;
@@ -22,16 +22,29 @@ const HeaderRenderer = (p) => {
22
22
  maxWidth: (_d = p.data) === null || _d === void 0 ? void 0 : _d.maxSize,
23
23
  active: p.active || ['r'],
24
24
  class: cellClass,
25
- style: { width: `${p.column.size}px`, transform: `translateX(${p.column.start}px)` },
25
+ style: {
26
+ width: `${p.column.size}px`,
27
+ transform: `translateX(${p.column.start}px)`,
28
+ },
26
29
  onResize: p.onResize,
27
30
  onDoubleClick(originalEvent) {
28
- p.onDoubleClick({ column: p.data, index: p.column.itemIndex, originalEvent });
31
+ p.onDoubleClick({
32
+ column: p.data,
33
+ index: p.column.itemIndex,
34
+ originalEvent,
35
+ providers: p.data.providers,
36
+ });
29
37
  },
30
38
  onClick(originalEvent) {
31
39
  if (originalEvent.defaultPrevented || !p.onClick) {
32
40
  return;
33
41
  }
34
- p.onClick({ column: p.data, index: p.column.itemIndex, originalEvent });
42
+ p.onClick({
43
+ column: p.data,
44
+ index: p.column.itemIndex,
45
+ originalEvent,
46
+ providers: p.data.providers,
47
+ });
35
48
  },
36
49
  };
37
50
  if (p.range) {
@@ -41,7 +54,7 @@ const HeaderRenderer = (p) => {
41
54
  }
42
55
  }
43
56
  }
44
- return (h(HeaderCellRenderer, { data: p.data, props: dataProps, additionalData: p.additionalData }, h(SortingSign, { column: p.data }), p.canFilter && ((_e = p.data) === null || _e === void 0 ? void 0 : _e.filter) !== false ? h(FilterButton, { column: p.data }) : ''));
57
+ return (h(HeaderCellRenderer, { data: p.data, props: dataProps, additionalData: p.additionalData }, h(SortingSign, { column: p.data }), p.canFilter && ((_e = p.data) === null || _e === void 0 ? void 0 : _e.filter) !== false ? (h(FilterButton, { column: p.data })) : ('')));
45
58
  };
46
59
  export default HeaderRenderer;
47
60
  //# sourceMappingURL=header-renderer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-renderer.js","sourceRoot":"","sources":["../../../src/components/header/header-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,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gB,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;gBACjD,OAAO;YACT,CAAC;YACD,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;QAC1E,CAAC;KACF,CAAC;IACF,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;YACxE,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACxC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,CACL,EAAC,kBAAkB,IAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc;QACjF,EAAC,WAAW,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAI;QAC/B,CAAC,CAAC,SAAS,IAAI,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,MAAM,MAAK,KAAK,CAAC,CAAC,CAAC,EAAC,YAAY,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,EAAE,CAC7D,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from './resizable.directive';\nimport { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport { VirtualPositionItem, ColumnTemplateProp, InitialHeaderClick, CellProps } from '@type';\nimport { RangeArea } from '@type';\n\ntype Props = {\n column: VirtualPositionItem;\n additionalData: any;\n data?: ColumnTemplateProp;\n range?: RangeArea;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDoubleClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: Props): VNode => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: CellProps & Partial<ResizeProps> = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: { width: `${p.column.size}px`, transform: `translateX(${p.column.start}px)` },\n onResize: p.onResize,\n onDoubleClick(originalEvent: MouseEvent) {\n p.onDoubleClick({ column: p.data, index: p.column.itemIndex, originalEvent });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({ column: p.data, index: p.column.itemIndex, originalEvent });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer data={p.data} props={dataProps} additionalData={p.additionalData}>\n {<SortingSign column={p.data} />}\n {p.canFilter && p.data?.filter !== false ? <FilterButton column={p.data} /> : ''}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n"]}
1
+ {"version":3,"file":"header-renderer.js","sourceRoot":"","sources":["../../../src/components/header/header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AAM,EAAE,CAAC,CAAC,IAAI,GAAI,CACjC,CAAC,CAAC,CAAC,CACF,EAAE,CACH,CACkB,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from './resizable.directive';\nimport {\n DATA_COL,\n FOCUS_CLASS,\n HEADER_CLASS,\n HEADER_SORTABLE_CLASS,\n MIN_COL_SIZE,\n} from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport {\n VirtualPositionItem,\n ColumnTemplateProp,\n InitialHeaderClick,\n CellProps,\n} from '@type';\nimport { RangeArea } from '@type';\n\ntype Props = {\n column: VirtualPositionItem;\n additionalData: any;\n data?: ColumnTemplateProp;\n range?: RangeArea;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDoubleClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: Props): VNode => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: CellProps & Partial<ResizeProps> = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: {\n width: `${p.column.size}px`,\n transform: `translateX(${p.column.start}px)`,\n },\n onResize: p.onResize,\n onDoubleClick(originalEvent: MouseEvent) {\n p.onDoubleClick({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer\n data={p.data}\n props={dataProps}\n additionalData={p.additionalData}\n >\n {<SortingSign column={p.data} />}\n {p.canFilter && p.data?.filter !== false ? (\n <FilterButton column={p.data} />\n ) : (\n ''\n )}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n"]}
@@ -349,7 +349,7 @@ export class RevogrHeaderComponent {
349
349
  },
350
350
  "complexType": {
351
351
  "original": "InitialHeaderClick",
352
- "resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular; }",
352
+ "resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular; providers: Providers<DimensionCols | \"rowHeaders\">; }",
353
353
  "references": {
354
354
  "InitialHeaderClick": {
355
355
  "location": "import",
@@ -412,7 +412,7 @@ export class RevogrHeaderComponent {
412
412
  },
413
413
  "complexType": {
414
414
  "original": "InitialHeaderClick",
415
- "resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular; }",
415
+ "resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular; providers: Providers<DimensionCols | \"rowHeaders\">; }",
416
416
  "references": {
417
417
  "InitialHeaderClick": {
418
418
  "location": "import",