Skip to content

Commit

Permalink
feat: include plugins in export
Browse files Browse the repository at this point in the history
  • Loading branch information
m2a2x committed Aug 20, 2024
1 parent 666101a commit 16a726b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 204 files
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './types';
export * from './store';
export * from './plugins/base.plugin';
export * from './plugins/dispatcher';
export * from './plugins';
export * from './components';
export * from './utils';
export { h } from '@stencil/core';
12 changes: 12 additions & 0 deletions src/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export * from './base.plugin';
export * from './column.auto-size.plugin';
export * from './column.stretch.plugin';
export * from './dispatcher';
export * from './export/export.plugin';
export * from './filter/filter.plugin';
export * from './groupingColumn/columnGroupsRenderer';
export * from './groupingColumn/headerGroupRenderer';
export * from './groupingRow/grouping.row.plugin';
export * from './moveColumn/column.drag.plugin';
export * from './sorting/sorting.plugin';
export * from './sorting/sorting.sign';
18 changes: 3 additions & 15 deletions src/plugins/moveColumn/column.drag.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
*/
import debounce from 'lodash/debounce';
import each from 'lodash/each';
import ColumnDataProvider from '../../services/column.data.provider';
import { DataProvider } from '../../services/data.provider';
import DimensionProvider from '../../services/dimension.provider';
import SelectionStoreConnector from '../../services/selection.store.connector';
import ViewportProvider from '../../services/viewport.provider';
import { getItemByPosition } from '@store';
import { BasePlugin } from '../base.plugin';
import { ColumnOrderHandler } from './order-column.handler';
Expand All @@ -29,13 +24,6 @@ export type DragStartEventDetails = {
data: ColumnPropProp;
};

export type Providers = {
data: DataProvider;
dimension: DimensionProvider;
selection: SelectionStoreConnector;
column: ColumnDataProvider;
viewport: ViewportProvider;
};
type StaticData = {
startPos: number;
startItem: PositionItem;
Expand All @@ -51,7 +39,7 @@ type LocalSubscription = {
target: Element | Document;
callback(...params: any[]): void;
};
export type EventData = {
export type ColumnDragEventData = {
elRect: DOMRect;
gridRect: DOMRect;
scrollOffset: number;
Expand All @@ -60,7 +48,7 @@ export type EventData = {
export default class ColumnPlugin extends BasePlugin {
private moveFunc = debounce((e: MouseEvent) => this.doMove(e), 5);
private staticDragData: StaticData | null = null;
private dragData: EventData | null = null;
private dragData: ColumnDragEventData | null = null;
private readonly orderUi: ColumnOrderHandler;
protected readonly localSubscriptions: LocalSubscriptions = {};
constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {
Expand Down Expand Up @@ -217,7 +205,7 @@ export default class ColumnPlugin extends BasePlugin {
gridEl,
dataEl,
data,
}: StaticData): EventData {
}: StaticData): ColumnDragEventData {
const gridRect = gridEl.getBoundingClientRect();
const elRect = dataEl.getBoundingClientRect();
const scrollOffset = elRect.left - gridRect.left;
Expand Down

0 comments on commit 16a726b

Please sign in to comment.