-
-
Notifications
You must be signed in to change notification settings - Fork 592
Expand file tree
/
Copy pathRootAppStore.tsx
More file actions
57 lines (44 loc) · 2.36 KB
/
Copy pathRootAppStore.tsx
File metadata and controls
57 lines (44 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import type { ObservableMap, ObservableSet } from 'mobx'
import { createContext } from 'react'
import type { NotificationsManagerRef } from '~/Components/Notifications.js'
import type { PagesStore } from './PagesStore.js'
import type { EntityDefinitionsStore } from './EntityDefinitionsStore.js'
import type { EventDefinitionsStore } from './EventDefinitionsStore.js'
import type { ModuleInfoStore } from './ModuleInfoStore.js'
import type { TriggersListStore } from './TriggersListStore.js'
import type { SurfacesStore } from './SurfacesStore.js'
import type { UserConfigStore } from './UserConfigStore.js'
import type { VariablesStore } from './VariablesStore.js'
import type { ConnectionsStore } from './ConnectionsStore.js'
import type { HelpModalRef } from '~/Instances/HelpModal.js'
import type { ViewControlStore } from './ViewControlStore.js'
import type { EntityClipboardStore } from './EntityClipboardStore.js'
import type { WhatsNewModalRef } from '~/WhatsNewModal/WhatsNew.js'
import type { ExpressionVariablesListStore } from './ExpressionVariablesListStore.js'
import type { SurfaceInstancesStore } from './SurfaceInstancesStore.js'
import type { InstanceStatusesStore } from './InstanceStatusesStore.js'
export const RootAppStoreContext = createContext<RootAppStore>(null as any) // TODO - fix this?
export interface RootAppStore {
readonly notifier: NotificationsManagerRef
readonly helpViewer: React.RefObject<HelpModalRef> // TODO - this is not good
readonly whatsNewModal: React.RefObject<WhatsNewModalRef> // TODO - this is not good
readonly modules: ModuleInfoStore
readonly connections: ConnectionsStore
readonly surfaceInstances: SurfaceInstancesStore
readonly instanceStatuses: InstanceStatusesStore
/** Currently running 'learn' callbacks */
readonly activeLearns: ObservableSet<string>
readonly entityDefinitions: EntityDefinitionsStore
readonly eventDefinitions: EventDefinitionsStore
readonly pages: PagesStore
readonly surfaces: SurfacesStore
readonly variablesStore: VariablesStore
readonly expressionVariablesList: ExpressionVariablesListStore
readonly triggersList: TriggersListStore
readonly userConfig: UserConfigStore
readonly moduleStoreRefreshProgress: ObservableMap<string | null, number>
readonly showWizardEvent: EventTarget
readonly showWizard: () => void
readonly viewControl: ViewControlStore
readonly entityClipboard: EntityClipboardStore
}