Compare commits

...

1 Commits

Author SHA1 Message Date
Valentin Mihai
00b1b40a31 RED-9788 - remove active listing entity service 2024-08-07 21:25:29 +03:00
4 changed files with 1 additions and 18 deletions

View File

@ -1,13 +0,0 @@
import { Injectable, signal } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class ActiveListingEntityService {
readonly #activeEntity = signal<string>('');
readonly activeEntity = this.#activeEntity.asReadonly();
updateEntity(entity: string = '') {
this.#activeEntity.set(entity);
}
}

View File

@ -15,7 +15,6 @@
(mouseenter)="itemMouseEnterFn && itemMouseEnterFn(entity)"
(mouseleave)="itemMouseLeaveFn && itemMouseLeaveFn(entity)"
[class.help-mode-active]="helpModeService?.isHelpModeActive$ | async"
[class.active-entity]="activeListingEntityService.activeEntity() === entity.id"
[id]="rowIdPrefix + '-' + ((entity[namePropertyKey] | snakeCase) ?? entity.id)"
[ngClass]="getTableItemClasses(entity)"
[routerLink]="entity.routerLink"
@ -29,7 +28,6 @@
} @else {
<div
[class.help-mode-active]="helpModeService?.isHelpModeActive$ | async"
[class.active-entity]="activeListingEntityService.activeEntity() === entity.id"
[id]="rowIdPrefix + '-' + ((entity[namePropertyKey] | snakeCase) ?? entity.id)"
[ngClass]="getTableItemClasses(entity)"
[routerLink]="entity.routerLink"

View File

@ -33,7 +33,7 @@
}
&:hover,
&.active-entity,
&:has(iqser-circle-button[aria-expanded='true']),
&.help-mode-active {
.selection-column iqser-round-checkbox .wrapper {
opacity: 1;

View File

@ -15,7 +15,6 @@ import { IListable } from '../models/listable';
import { Id } from '../models/trackable';
import { ListingService } from '../services/listing.service';
import { TableItemComponent } from './table-item/table-item.component';
import { ActiveListingEntityService } from '../services/active-listing-entity.service';
@Component({
selector: 'iqser-table-content',
@ -54,7 +53,6 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
constructor(
@Inject(forwardRef(() => ListingComponent)) readonly listingComponent: ListingComponent<Class>,
readonly listingService: ListingService<Class>,
readonly activeListingEntityService: ActiveListingEntityService,
@Optional() readonly helpModeService: HelpModeService,
) {
super();