Export stores
This commit is contained in:
parent
e5a79f9d9c
commit
c682a43d9a
|
@ -1,9 +1,20 @@
|
||||||
import { get, derived } from "svelte/store"
|
import { get, derived, Writable } from "svelte/store"
|
||||||
import { FieldType, UILogicalOperator } from "@budibase/types"
|
import { FieldType, UILogicalOperator } from "@budibase/types"
|
||||||
import { Store as StoreContext } from "."
|
import { Store as StoreContext } from "."
|
||||||
import { memo } from "../../../utils/memo"
|
import { memo } from "../../../utils/memo"
|
||||||
|
|
||||||
export const createStores = (context: StoreContext) => {
|
export interface FilterStore {
|
||||||
|
filter: Writable<any>
|
||||||
|
inlineFilters: Writable<any>
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FilterDerivedStore {
|
||||||
|
allFilters: Writable<any>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Store = FilterStore & FilterDerivedStore
|
||||||
|
|
||||||
|
export const createStores = (context: StoreContext): FilterStore => {
|
||||||
const { props } = context
|
const { props } = context
|
||||||
|
|
||||||
// Initialise to default props
|
// Initialise to default props
|
||||||
|
|
|
@ -63,12 +63,10 @@ export type Store = BaseStore &
|
||||||
Datasource.Store &
|
Datasource.Store &
|
||||||
Validation.Store &
|
Validation.Store &
|
||||||
Users.Store &
|
Users.Store &
|
||||||
Menu.Store & {
|
Menu.Store &
|
||||||
|
Filter.Store & {
|
||||||
// TODO while typing the rest of stores
|
// TODO while typing the rest of stores
|
||||||
fetch: Writable<any>
|
fetch: Writable<any>
|
||||||
filter: Writable<any>
|
|
||||||
inlineFilters: Writable<any>
|
|
||||||
allFilters: Writable<any>
|
|
||||||
sort: Writable<any>
|
sort: Writable<any>
|
||||||
initialFilter: Writable<any>
|
initialFilter: Writable<any>
|
||||||
initialSortColumn: Writable<any>
|
initialSortColumn: Writable<any>
|
||||||
|
|
Loading…
Reference in New Issue