Skip to content

Commit

Permalink
chore: rename GroupingAndColspanService to HeaderGroupingService (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding authored Oct 19, 2024
1 parent 63359d1 commit 78a0238
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
33 changes: 18 additions & 15 deletions src/slickgrid-react/components/slickgrid-react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
GridEventService,
GridService,
GridStateService,
GroupingAndColspanService,
HeaderGroupingService,

Check failure on line 38 in src/slickgrid-react/components/slickgrid-react.tsx

View workflow job for this annotation

GitHub Actions / Node 20

Module '"@slickgrid-universal/common"' has no exported member 'HeaderGroupingService'.
type Observable,
PaginationService,
ResizerService,
Expand Down Expand Up @@ -164,13 +164,8 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
gridEventService: GridEventService;
gridService: GridService;
gridStateService: GridStateService;
groupingService: GroupingAndColspanService;
protected get paginationService(): PaginationService {
return this.state?.paginationService;
}
protected set paginationService(value: PaginationService) {
this.setStateValue('paginationService', value);
}
headerGroupingService: HeaderGroupingService;

resizerService!: ResizerService;
rxjs?: RxJsFacade;
sharedService: SharedService;
Expand Down Expand Up @@ -249,6 +244,13 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
this._isDatasetHierarchicalInitialized = true;
}

protected get paginationService(): PaginationService {
return this.state?.paginationService;
}
protected set paginationService(value: PaginationService) {
this.setStateValue('paginationService', value);
}

constructor(public readonly props: SlickgridReactProps) {
super(props);
const slickgridConfig = new SlickgridConfig();
Expand Down Expand Up @@ -291,15 +293,15 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP

this.gridStateService = new GridStateService(this.extensionService, this.filterService, this._eventPubSubService, this.sharedService, this.sortService, this.treeDataService);
this.gridService = new GridService(this.gridStateService, this.filterService, this._eventPubSubService, this.paginationService, this.sharedService, this.sortService, this.treeDataService);
this.groupingService = new GroupingAndColspanService(this.extensionUtility, this._eventPubSubService);
this.headerGroupingService = new HeaderGroupingService(this.extensionUtility, this._eventPubSubService);

this.serviceList = [
this.extensionService,
this.filterService,
this.gridEventService,
this.gridService,
this.gridStateService,
this.groupingService,
this.headerGroupingService,
this.paginationService,
this.resizerService,
this.sortService,
Expand All @@ -320,7 +322,7 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
this.props.containerService.registerInstance('GridEventService', this.gridEventService);
this.props.containerService.registerInstance('GridService', this.gridService);
this.props.containerService.registerInstance('GridStateService', this.gridStateService);
this.props.containerService.registerInstance('GroupingAndColspanService', this.groupingService);
this.props.containerService.registerInstance('HeaderGroupingService', this.headerGroupingService);
this.props.containerService.registerInstance('PaginationService', this.paginationService);
this.props.containerService.registerInstance('ResizerService', this.resizerService);
this.props.containerService.registerInstance('SharedService', this.sharedService);
Expand Down Expand Up @@ -589,12 +591,13 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
// return all available Services (non-singleton)
backendService: this.backendService,
eventPubSubService: this._eventPubSubService,
extensionService: this.extensionService,
filterService: this.filterService,
gridEventService: this.gridEventService,
gridStateService: this.gridStateService,
gridService: this.gridService,
groupingService: this.groupingService,
extensionService: this.extensionService,
groupingService: this.headerGroupingService,
headerGroupingService: this.headerGroupingService,
paginationService: this.paginationService,
resizerService: this.resizerService,
sortService: this.sortService,
Expand Down Expand Up @@ -763,7 +766,7 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
if (gridOptions.enableTranslate) {
this.extensionService.translateAllExtensions(lang);
if ((gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) || (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping)) {
this.groupingService.translateGroupingAndColSpan();
this.headerGroupingService.translateHeaderGrouping();
}
}
});
Expand Down Expand Up @@ -1480,7 +1483,7 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP

// when using Grouping/DraggableGrouping/Colspan register its Service
if ((this.gridOptions.createPreHeaderPanel && this.gridOptions.createTopHeaderPanel) || (this.gridOptions.createPreHeaderPanel && !this.gridOptions.enableDraggableGrouping)) {
this._registeredResources.push(this.groupingService);
this._registeredResources.push(this.headerGroupingService);
}

// when using Tree Data View, register its Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
GridEventService,
GridService,
GridStateService,
GroupingAndColspanService,
HeaderGroupingService,

Check failure on line 8 in src/slickgrid-react/models/slickgridReactInstance.interface.ts

View workflow job for this annotation

GitHub Actions / Node 20

Module '"@slickgrid-universal/common"' has no exported member 'HeaderGroupingService'.
PaginationService,
ResizerService,
SlickDataView,
Expand Down Expand Up @@ -53,8 +53,11 @@ export interface SlickgridReactInstance {
/** Grid State Service */
gridStateService: GridStateService;

/** @deprecated @use `headerGroupingService` */
groupingService: HeaderGroupingService;

/** Grouping (and colspan) Service */
groupingService: GroupingAndColspanService;
headerGroupingService: HeaderGroupingService;

/** Pagination Service (allows you to programmatically go to first/last page, etc...) */
paginationService?: PaginationService;
Expand Down

0 comments on commit 78a0238

Please sign in to comment.