UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 1 kB
import{__decorate as o}from"tslib";import{computed as r}from"mobx";import{BaseShortcutProvider as s}from"../ShortcutProvider";export class SpeakerShortcutProvider extends s{constructor(t){super(),this.rootStore=t,this.id="speakers"}get computedShortcuts(){const{speakerFilterStore:t}=this.rootStore,{filters:e}=t.state;return[]}createShortcuts(){return this.computedShortcuts}handleShortcutClick(t){switch(t){case"companies":this.rootStore.speakerFilterStore.openFilterWithSections(["companies"]);break;case"jobTitles":this.rootStore.speakerFilterStore.openFilterWithSections(["jobTitles"]);break;default:console.warn(`Unknown shortcut ID: ${t}`)}}handleShortcutReset(t){const{speakerFilterStore:e}=this.rootStore;switch(t){case"companies":e.setPending("selectedCompanies",[]),e.applyFilters();break;case"jobTitles":e.setPending("selectedJobTitles",[]),e.applyFilters();break;default:console.warn(`Unknown shortcut ID for reset: ${t}`)}}}o([r],SpeakerShortcutProvider.prototype,"computedShortcuts",null);