Icard/angular-clarity-master(work.../node_modules/primeng/esm2022/api/contextmenuservice.mjs

22 lines
2.7 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
export class ContextMenuService {
activeItemKeyChange = new Subject();
activeItemKeyChange$ = this.activeItemKeyChange.asObservable();
activeItemKey;
changeKey(key) {
this.activeItemKey = key;
this.activeItemKeyChange.next(this.activeItemKey);
}
reset() {
this.activeItemKey = null;
this.activeItemKeyChange.next(this.activeItemKey);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuService, decorators: [{
type: Injectable
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dG1lbnVzZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2FwaS9jb250ZXh0bWVudXNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDOztBQUcvQixNQUFNLE9BQU8sa0JBQWtCO0lBQ25CLG1CQUFtQixHQUFHLElBQUksT0FBTyxFQUFVLENBQUM7SUFFcEQsb0JBQW9CLEdBQUcsSUFBSSxDQUFDLG1CQUFtQixDQUFDLFlBQVksRUFBRSxDQUFDO0lBRS9ELGFBQWEsQ0FBbUI7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