UNPKG

@memberjunction/ng-action-gallery

Version:

MemberJunction Action Gallery - A beautiful, filterable gallery component for browsing and selecting actions

74 lines 3.22 kB
import { EventEmitter, OnInit, OnDestroy, ElementRef } from '@angular/core'; import { FormControl } from '@angular/forms'; import { BehaviorSubject } from 'rxjs'; import { ActionEntity, ActionCategoryEntity, ActionParamEntity, ActionResultCodeEntity } from '@memberjunction/core-entities'; import * as i0 from "@angular/core"; export interface ActionGalleryConfig { selectionMode?: boolean; multiSelect?: boolean; showCategories?: boolean; showSearch?: boolean; defaultView?: 'grid' | 'list'; gridColumns?: number; enableQuickTest?: boolean; theme?: 'light' | 'dark'; } export interface CategoryNode { id: string; name: string; parent?: string; children?: CategoryNode[]; count?: number; icon?: string; } export interface ActionWithDetails extends ActionEntity { parameters?: ActionParamEntity[]; resultCodes?: ActionResultCodeEntity[]; expanded?: boolean; selected?: boolean; } export declare class ActionGalleryComponent implements OnInit, OnDestroy { config: ActionGalleryConfig; preSelectedActions: string[]; actionSelected: EventEmitter<ActionEntity>; actionsSelected: EventEmitter<ActionEntity[]>; actionTestRequested: EventEmitter<ActionEntity>; searchInput: ElementRef<HTMLInputElement>; private destroy$; actions$: BehaviorSubject<ActionWithDetails[]>; categories$: BehaviorSubject<ActionCategoryEntity[]>; filteredActions$: BehaviorSubject<ActionWithDetails[]>; categoryTree$: BehaviorSubject<CategoryNode[]>; selectedCategory$: BehaviorSubject<string>; viewMode$: BehaviorSubject<"grid" | "list">; isLoading$: BehaviorSubject<boolean>; selectedActions$: BehaviorSubject<Set<string>>; searchControl: FormControl<string | null>; expandedCategories: Set<string>; hoveredAction: string | null; animateCards: boolean; totalActions: number; categoryCounts: Map<string, number>; constructor(); ngOnInit(): void; ngOnDestroy(): void; loadData(): Promise<void>; private buildCategoryTree; private getCategoryIcon; getCategoryIconClass(category: CategoryNode): string; private filterActions; private getCategoryName; selectCategory(categoryId: string): void; toggleCategoryExpanded(categoryId: string): void; toggleViewMode(): void; toggleActionExpanded(action: ActionWithDetails): Promise<void>; loadActionDetails(action: ActionWithDetails): Promise<void>; toggleActionSelection(action: ActionWithDetails): void; testAction(action: ActionEntity, event: Event): void; clearSearch(): void; getSelectedActions(): ActionEntity[]; getActionIcon(action: ActionEntity): string; static ɵfac: i0.ɵɵFactoryDeclaration<ActionGalleryComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ActionGalleryComponent, "mj-action-gallery", never, { "config": { "alias": "config"; "required": false; }; "preSelectedActions": { "alias": "preSelectedActions"; "required": false; }; }, { "actionSelected": "actionSelected"; "actionsSelected": "actionsSelected"; "actionTestRequested": "actionTestRequested"; }, never, never, false, never>; } //# sourceMappingURL=action-gallery.component.d.ts.map