@revolist/revogrid 4.19.3 → 4.19.4

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.
@@ -2,8 +2,8 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, H as gatherGroup, s as gatherGrouping, z as getCellData, B as getCellDataParsed, A as getCellRaw, I as getColumnByProp, D as getColumnSizes, C as getColumnType, F as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, E as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-DT_CqxqZ.js';
5
- import { B as BasePlugin } from './column.drag.plugin-CS8ilBtr.js';
6
- export { A as AutoSizeColumnPlugin, C as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, m as SortingPlugin, a as StretchColumn, n as defaultCellCompare, o as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, q as getComparer, l as getLeftRelative, p as getNextOrder, i as isStretchPlugin, s as sortIndexByItems } from './column.drag.plugin-CS8ilBtr.js';
5
+ import { B as BasePlugin } from './column.drag.plugin-CmcURdIJ.js';
6
+ export { A as AutoSizeColumnPlugin, C as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, m as SortingPlugin, a as StretchColumn, n as defaultCellCompare, o as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, q as getComparer, l as getLeftRelative, p as getNextOrder, i as isStretchPlugin, s as sortIndexByItems } from './column.drag.plugin-CmcURdIJ.js';
7
7
  export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-DNIoql0s.js';
8
8
  export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-ePazz-Zt.js';
9
9
  export { C as CELL_CLASS, L as CELL_HANDLER_CLASS, x as DATA_COL, y as DATA_ROW, z as DISABLED_CLASS, I as DRAGGABLE_CLASS, O as DRAGG_TEXT, G as DRAG_ICON_CLASS, D as DataStore, N as EDIT_INPUT_WR, J as FOCUS_CLASS, P as GRID_INTERNALS, F as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, E as HEADER_ROW_CLASS, B as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, K as MOBILE_CLASS, R as RESIZE_INTERVAL, Q as ROW_FOCUSED_CLASS, A as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, v as applyMixins, i as calculateDimensionData, U as codesLetter, l as findPositionInArray, h as gatherTrimmedItems, k as getItemByIndex, j as getItemByPosition, g as getPhysical, o as getScrollbarSize, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, a as getVisibleSourceItem, V as keyValues, n as mergeSortedArray, p as proxyPlugin, m as pushSorted, r as range, q as scaleValue, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, w as setStore, u as timeout, t as trimmedPlugin } from './dimension.helpers-D5lwLPzd.js';
@@ -5,7 +5,7 @@ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement
5
5
  import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as isRowType, D as getColumnSizes, a as cropCellToMax, n as nextCell, I as getColumnByProp, F as getColumns } from './column.service-DT_CqxqZ.js';
6
6
  import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, a as getVisibleSourceItem, h as gatherTrimmedItems, k as getItemByIndex, R as RESIZE_INTERVAL, u as timeout } from './dimension.helpers-D5lwLPzd.js';
7
7
  import { d as debounce } from './debounce-BfO9dz9v.js';
8
- import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, m as SortingPlugin, C as ColumnMovePlugin } from './column.drag.plugin-CS8ilBtr.js';
8
+ import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, m as SortingPlugin, C as ColumnMovePlugin } from './column.drag.plugin-CmcURdIJ.js';
9
9
  import { V as ViewportStore } from './viewport.store-2mQugd8S.js';
10
10
  import { v as viewportDataPartition, F as FOOTER_SLOT, C as CONTENT_SLOT, H as HEADER_SLOT, D as DATA_SLOT } from './viewport.helpers-VXhsJZtn.js';
11
11
  import { g as getPropertyFromEvent } from './events-BvSmBueA.js';
@@ -1,9 +1,19 @@
1
1
  import { BasePlugin } from '../base.plugin';
2
- import type { ColumnPropProp, DimensionCols, PluginProviders } from "../../types/index";
2
+ import { ColumnOrderHandler } from './order-column.handler';
3
+ import type { ColumnPropProp, DimensionSettingsState, PositionItem, DimensionCols, MultiDimensionType, PluginProviders, DimensionColPin } from "../../types/index";
3
4
  export type DragStartEventDetails = {
4
5
  event: MouseEvent;
5
6
  data: ColumnPropProp;
6
7
  };
8
+ type StaticData = {
9
+ startPos: number;
10
+ startItem: PositionItem;
11
+ pin?: DimensionColPin;
12
+ dataEl: HTMLElement;
13
+ scrollEl: Element;
14
+ gridEl: HTMLElement;
15
+ cols: DimensionSettingsState;
16
+ };
7
17
  type LocalSubscriptions = Record<string, LocalSubscription>;
8
18
  type LocalSubscription = {
9
19
  target: Element | Document;
@@ -16,27 +26,25 @@ export type ColumnDragEventData = {
16
26
  type: DimensionCols;
17
27
  };
18
28
  export declare class ColumnMovePlugin extends BasePlugin {
19
- revogrid: HTMLRevoGridElement;
20
- providers: PluginProviders;
21
- private moveFunc;
22
- private staticDragData;
23
- private dragData;
24
- private readonly orderUi;
25
- protected readonly localSubscriptions: LocalSubscriptions;
29
+ protected moveFunc: import("lodash").DebouncedFunc<(e: MouseEvent) => void>;
30
+ protected staticDragData: StaticData | null;
31
+ protected dragData: ColumnDragEventData | null;
32
+ readonly orderUi: ColumnOrderHandler;
33
+ readonly localSubscriptions: LocalSubscriptions;
26
34
  constructor(revogrid: HTMLRevoGridElement, providers: PluginProviders);
27
35
  dragStart({ event, data }: DragStartEventDetails): void;
28
36
  doMove(e: MouseEvent): void;
29
37
  move(e: MouseEvent): void;
30
38
  onMouseOut(_: MouseEvent): void;
31
39
  onMouseUp(e: MouseEvent): void;
32
- private clearLocalSubscriptions;
40
+ protected clearLocalSubscriptions(): void;
33
41
  clearOrder(): void;
34
42
  /**
35
43
  * Clearing subscription
36
44
  */
37
45
  clearSubscriptions(): void;
38
- private getData;
39
- private getDimension;
46
+ protected getData({ gridEl, dataEl, pin, }: StaticData): ColumnDragEventData;
47
+ protected getDimension(type: MultiDimensionType): DimensionSettingsState;
40
48
  }
41
49
  export declare function getLeftRelative(absoluteX: number, gridPos: number, offset: number): number;
42
50
  export {};
package/hydrate/index.js CHANGED
@@ -14223,8 +14223,6 @@ const DRAG_START = 'columndragstart';
14223
14223
  class ColumnMovePlugin extends BasePlugin {
14224
14224
  constructor(revogrid, providers) {
14225
14225
  super(revogrid, providers);
14226
- this.revogrid = revogrid;
14227
- this.providers = providers;
14228
14226
  this.moveFunc = debounce$1((e) => this.doMove(e), 5);
14229
14227
  this.staticDragData = null;
14230
14228
  this.dragData = null;
@@ -14276,7 +14274,7 @@ class ColumnMovePlugin extends BasePlugin {
14276
14274
  this.staticDragData = {
14277
14275
  startPos: event.x,
14278
14276
  startItem,
14279
- data,
14277
+ pin: data.pin,
14280
14278
  dataEl,
14281
14279
  scrollEl,
14282
14280
  gridEl: this.revogrid,
@@ -14354,14 +14352,14 @@ class ColumnMovePlugin extends BasePlugin {
14354
14352
  super.clearSubscriptions();
14355
14353
  this.clearLocalSubscriptions();
14356
14354
  }
14357
- getData({ gridEl, dataEl, data, }) {
14355
+ getData({ gridEl, dataEl, pin, }) {
14358
14356
  const gridRect = gridEl.getBoundingClientRect();
14359
14357
  const elRect = dataEl.getBoundingClientRect();
14360
14358
  const scrollOffset = elRect.left - gridRect.left;
14361
14359
  return {
14362
14360
  elRect,
14363
14361
  gridRect,
14364
- type: data.pin || 'rgCol',
14362
+ type: pin || 'rgCol',
14365
14363
  scrollOffset,
14366
14364
  };
14367
14365
  }
package/hydrate/index.mjs CHANGED
@@ -14221,8 +14221,6 @@ const DRAG_START = 'columndragstart';
14221
14221
  class ColumnMovePlugin extends BasePlugin {
14222
14222
  constructor(revogrid, providers) {
14223
14223
  super(revogrid, providers);
14224
- this.revogrid = revogrid;
14225
- this.providers = providers;
14226
14224
  this.moveFunc = debounce$1((e) => this.doMove(e), 5);
14227
14225
  this.staticDragData = null;
14228
14226
  this.dragData = null;
@@ -14274,7 +14272,7 @@ class ColumnMovePlugin extends BasePlugin {
14274
14272
  this.staticDragData = {
14275
14273
  startPos: event.x,
14276
14274
  startItem,
14277
- data,
14275
+ pin: data.pin,
14278
14276
  dataEl,
14279
14277
  scrollEl,
14280
14278
  gridEl: this.revogrid,
@@ -14352,14 +14350,14 @@ class ColumnMovePlugin extends BasePlugin {
14352
14350
  super.clearSubscriptions();
14353
14351
  this.clearLocalSubscriptions();
14354
14352
  }
14355
- getData({ gridEl, dataEl, data, }) {
14353
+ getData({ gridEl, dataEl, pin, }) {
14356
14354
  const gridRect = gridEl.getBoundingClientRect();
14357
14355
  const elRect = dataEl.getBoundingClientRect();
14358
14356
  const scrollOffset = elRect.left - gridRect.left;
14359
14357
  return {
14360
14358
  elRect,
14361
14359
  gridRect,
14362
- type: data.pin || 'rgCol',
14360
+ type: pin || 'rgCol',
14363
14361
  scrollOffset,
14364
14362
  };
14365
14363
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolist/revogrid",
3
- "version": "4.19.3",
3
+ "version": "4.19.4",
4
4
  "type": "module",
5
5
  "description": "Virtual reactive data grid spreadsheet component - RevoGrid.",
6
6
  "license": "MIT",
@@ -2530,8 +2530,6 @@ const DRAG_START = 'columndragstart';
2530
2530
  class ColumnMovePlugin extends BasePlugin {
2531
2531
  constructor(revogrid, providers) {
2532
2532
  super(revogrid, providers);
2533
- this.revogrid = revogrid;
2534
- this.providers = providers;
2535
2533
  this.moveFunc = debounce((e) => this.doMove(e), 5);
2536
2534
  this.staticDragData = null;
2537
2535
  this.dragData = null;
@@ -2583,7 +2581,7 @@ class ColumnMovePlugin extends BasePlugin {
2583
2581
  this.staticDragData = {
2584
2582
  startPos: event.x,
2585
2583
  startItem,
2586
- data,
2584
+ pin: data.pin,
2587
2585
  dataEl,
2588
2586
  scrollEl,
2589
2587
  gridEl: this.revogrid,
@@ -2661,14 +2659,14 @@ class ColumnMovePlugin extends BasePlugin {
2661
2659
  super.clearSubscriptions();
2662
2660
  this.clearLocalSubscriptions();
2663
2661
  }
2664
- getData({ gridEl, dataEl, data, }) {
2662
+ getData({ gridEl, dataEl, pin, }) {
2665
2663
  const gridRect = gridEl.getBoundingClientRect();
2666
2664
  const elRect = dataEl.getBoundingClientRect();
2667
2665
  const scrollOffset = elRect.left - gridRect.left;
2668
2666
  return {
2669
2667
  elRect,
2670
2668
  gridRect,
2671
- type: data.pin || 'rgCol',
2669
+ type: pin || 'rgCol',
2672
2670
  scrollOffset,
2673
2671
  };
2674
2672
  }