Options
All
  • Public
  • Public/Protected
  • All
Menu

Module globalScope

Index

Type Aliases

AdditionalTableSettings: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>

Additional table settings that can be passed to write functions but are not written to the settings document

ConfirmDialogProps: { body?: React.ReactNode; cancel?: string; confirm?: string | JSX.Element; confirmColor?: ButtonProps["color"]; confirmationCommand?: string; hideCancel?: boolean; maxWidth?: DialogProps["maxWidth"]; open: boolean; title?: string; handleCancel?: any; handleConfirm?: any }

Type declaration

  • Optional body?: React.ReactNode

    Pass a string to display basic styled text

  • Optional cancel?: string

    Optionally override cancel button text

  • Optional confirm?: string | JSX.Element

    Optionally override confirm button text

  • Optional confirmColor?: ButtonProps["color"]

    Optionally set confirm button color

  • Optional confirmationCommand?: string

    Optionally require user to type this string to enable the confirm button

  • Optional hideCancel?: boolean

    Optionally hide cancel button

  • Optional maxWidth?: DialogProps["maxWidth"]

    Optionally set dialog max width

  • open: boolean
  • Optional title?: string
  • handleCancel?:function
    • handleCancel(): void
    • Callback called when user clicks cancel

      Returns void

  • handleConfirm?:function
    • handleConfirm(): void
    • Callback called when user clicks confirm

      Returns void

MinimumTableSettings: { id: TableSettings["id"]; tableType: TableSettings["tableType"] } & Partial<TableSettings>

Minimum amount of table settings required to be passed to updateTable to idetify the table and schema doc

ProjectSettings: Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>

Project settings are visible to authenticated users

PublicSettings: Partial<{ signInOptions: ("google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "email" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>

Public settings are visible to unauthenticated users

RowyRunModalState: { feature: string; open: boolean; version: string }

Type declaration

  • feature: string
  • open: boolean
  • version: string
TableSettingsDialogState: { data: TableSettings | null; mode: "create" | "update"; open: boolean }

Type declaration

  • data: TableSettings | null
  • mode: "create" | "update"
  • open: boolean
UserSettings: Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>

User info and settings

Variables

FunctionsIndexAtom: Atom<FunctionSettings[]> & { onMount?: OnMount<SetStateAction<FunctionSettings[]>, void>; write: Write<SetStateAction<FunctionSettings[]>, void> } & WithInitialValue<FunctionSettings[]> = ...

Functions home page: all functions

allUsersAtom: Atom<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>[]> & { onMount?: OnMount<SetStateAction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>[]>, void>; write: Write<SetStateAction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>[]>, void> } & WithInitialValue<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>[]> = ...

User management page: all users

altPressAtom: Atom<boolean> & { onMount?: OnMount<SetStateAction<boolean>, void>; write: Write<SetStateAction<boolean>, void> } & WithInitialValue<boolean> = ...

Global state when the Alt key is pressed, so we don’t set multiple event listeners

compatibleRowyRunVersionAtom: Atom<((__namedParameters: { maxVersion?: string; minVersion?: string }) => boolean)> = ...

Helper function to check if deployed Rowy Run version is compatible with a feature

confirmDialogAtom: Atom<ConfirmDialogProps> & { onMount?: OnMount<Partial<ConfirmDialogProps>, void>; write: Write<Partial<ConfirmDialogProps>, void> } & WithInitialValue<ConfirmDialogProps> = ...

Open a confirm dialog

example

Basic usage:

const confirm = useSetAtom(confirmDialogAtom, globalScope);
confirm({ handleConfirm: () => ... });
createTableAtom: Atom<undefined | ((settings: TableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)> & { onMount?: OnMount<SetStateAction<undefined | ((settings: TableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)>, void>; write: Write<SetStateAction<undefined | ((settings: TableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)>, void> } & WithInitialValue<undefined | ((settings: TableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)> = ...

Stores a function to create a table with schema doc

currentUserAtom: Atom<undefined | null | User> & { onMount?: OnMount<SetStateAction<undefined | null | User>, void>; write: Write<SetStateAction<undefined | null | User>, void> } & WithInitialValue<undefined | null | User> = ...

Currently signed in user. undefined means loading.

customizedThemesAtom: Atom<{ dark: Theme; light: Theme }> = ...

Customized base theme based on project and user settings

deleteTableAtom: Atom<undefined | ((id: string) => Promise<void>)> & { onMount?: OnMount<SetStateAction<undefined | ((id: string) => Promise<void>)>, void>; write: Write<SetStateAction<undefined | ((id: string) => Promise<void>)>, void> } & WithInitialValue<undefined | ((id: string) => Promise<void>)> = ...

Stores a function to delete a table and its schema doc

getTableSchemaAtom: Atom<undefined | ((id: string) => Promise<TableSchema>)> & { onMount?: OnMount<SetStateAction<undefined | ((id: string) => Promise<TableSchema>)>, void>; write: Write<SetStateAction<undefined | ((id: string) => Promise<TableSchema>)>, void> } & WithInitialValue<undefined | ((id: string) => Promise<TableSchema>)> = ...

Stores a function to get a table’s schema doc (without listener)

globalScope: typeof globalScope = ...

Scope for atoms stored at the root of the app

jsonEditorAtom: WritableAtom<"code" | "tree", typeof RESET | SetStateAction<"code" | "tree">, void> = ...

Store current JSON editor view

navOpenAtom: WritableAtom<boolean, typeof RESET | SetStateAction<boolean>, void> = ...

Nav open state stored in local storage.

navPinnedAtom: WritableAtom<boolean, typeof RESET | SetStateAction<boolean>, void> = ...

Nav pinned state stored in local storage.

projectIdAtom: Atom<string> & { onMount?: OnMount<SetStateAction<string>, void>; write: Write<SetStateAction<string>, void> } & WithInitialValue<string> = ...
projectRolesAtom: Atom<string[]> = ...

Roles used in the project based on table settings

projectSettingsAtom: Atom<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>> & { onMount?: OnMount<SetStateAction<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>>, void>; write: Write<SetStateAction<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>>, void> } & WithInitialValue<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>> = ...

Project settings are visible to authenticated users

publicSettingsAtom: Atom<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>> & { onMount?: OnMount<SetStateAction<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>>, void>; write: Write<SetStateAction<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>>, void> } & WithInitialValue<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>> = ...

Public settings are visible to unauthenticated users

rowyRunAtom: Atom<((__namedParameters: IRowyRunRequestProps) => Promise<any>)> = ...

An atom that returns a function to call Rowy Run endpoints using the URL defined in project settings and retrieving a JWT token.

Returns false if user not signed in or Rowy Run not set up.

example

Basic usage:

const [rowyRun] = useAtom(rowyRunAtom, globalScope);
...
await rowyRun(...);
rowyRunLatestUpdateAtom: WritableAtom<RowyRunLatestUpdate, typeof RESET | SetStateAction<RowyRunLatestUpdate>, void> = ...

Store latest update from GitHub releases and currently deployed versions

rowyRunModalAtom: Atom<RowyRunModalState> & { onMount?: OnMount<Partial<RowyRunModalState>, void>; write: Write<Partial<RowyRunModalState>, void> } & WithInitialValue<RowyRunModalState> = ...

Open global Rowy Run modal if feature not available. Calling the set function resets props.

example

Basic usage:

const openRowyRunModal = useSetAtom(rowyRunModalAtom, globalScope);
openRowyRunModal({ feature: ... , version: ... });
example

Close dialog:

openRowyRunModal({ open: false })
rowyRunVersionAtom: Atom<Promise<string | false>> = ...

Store deployed Rowy Run version

tableAddRowIdTypeAtom: WritableAtom<"random" | "decrement" | "custom", typeof RESET | SetStateAction<"random" | "decrement" | "custom">, void> = ...

Persist the state of the add row ID type

tableDescriptionDismissedAtom: WritableAtom<string[], typeof RESET | SetStateAction<string[]>, void> = ...

Store tables where user has dismissed the description tooltip

tableOutOfOrderDismissedAtom: WritableAtom<boolean, typeof RESET | SetStateAction<boolean>, void> = ...

Persist when the user dismissed the row out of order warning

tableSettingsDialogAtom: Atom<TableSettingsDialogState> & { onMount?: OnMount<Partial<TableSettingsDialogState>, void>; write: Write<Partial<TableSettingsDialogState>, void> } & WithInitialValue<TableSettingsDialogState> = ...

Open table settings dialog. Calling the set function resets props.

example

Basic usage:

const openTableSettingsDialog = useSetAtom(tableSettingsDialogAtom, globalScope);
openTableSettingsDialog({ data: ... });
example

Clear dialog:

openTableSettingsDialog({ open: false })
tableSettingsDialogIdAtom: Atom<string> & { onMount?: OnMount<SetStateAction<string>, void>; write: Write<SetStateAction<string>, void> } & WithInitialValue<string> = ...

Store the current ID of the table being edited in tableSettingsDialog to derive tableSettingsDialogSchemaAtom

tableSettingsDialogSchemaAtom: Atom<Promise<TableSchema>> = ...

Get and store the schema document of the current table being edited

tablesAtom: Atom<TableSettings[]> = ...

Tables visible to the signed-in user based on roles

tablesViewAtom: WritableAtom<"grid" | "list", typeof RESET | SetStateAction<"grid" | "list">, void> = ...

View for tables page

themeAtom: WritableAtom<"light" | "dark", typeof RESET | SetStateAction<"light" | "dark">, void> = ...

Stores which theme is currently active, based on user or OS setting. Saved in localStorage.

themeOverriddenAtom: WritableAtom<boolean, typeof RESET | SetStateAction<boolean>, void> = ...

User can override OS theme. Saved in localStorage.

updateFunctionAtom: Atom<undefined | UpdateCollectionDocFunction<FunctionSettings>> & { onMount?: OnMount<SetStateAction<undefined | UpdateCollectionDocFunction<FunctionSettings>>, void>; write: Write<SetStateAction<undefined | UpdateCollectionDocFunction<FunctionSettings>>, void> } & WithInitialValue<undefined | UpdateCollectionDocFunction<FunctionSettings>> = ...

Stores a function that updates a user document

updateProjectSettingsAtom: Atom<undefined | UpdateDocFunction<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>>> & { onMount?: OnMount<SetStateAction<undefined | UpdateDocFunction<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>>>, void>; write: Write<SetStateAction<undefined | UpdateDocFunction<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>>>, void> } & WithInitialValue<undefined | UpdateDocFunction<Partial<{ rowyRunDeployStatus: "BUILDING" | "COMPLETE"; rowyRunRegion: string; rowyRunUrl: string; services: Partial<{ builder: string; hooks: string; terminal: string }>; setupCompleted: boolean; tables: TableSettings[] }>>> = ...

Stores a function that updates project settings

example

Basic usage:

const [updateProjectSettings] = useAtom(updateProjectSettingsAtom, globalScope);
if (updateProjectSettings) updateProjectSettings({ ... });
updatePublicSettingsAtom: Atom<undefined | UpdateDocFunction<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>>> & { onMount?: OnMount<SetStateAction<undefined | UpdateDocFunction<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>>>, void>; write: Write<SetStateAction<undefined | UpdateDocFunction<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>>>, void> } & WithInitialValue<undefined | UpdateDocFunction<Partial<{ signInOptions: ("email" | "google" | "twitter" | "facebook" | "github" | "microsoft" | "apple" | "yahoo" | "phone" | "anonymous")[]; theme: Record<"base" | "light" | "dark", ThemeOptions> }>>> = ...

Stores a function that updates public settings

updateTableAtom: Atom<undefined | ((settings: MinimumTableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)> & { onMount?: OnMount<SetStateAction<undefined | ((settings: MinimumTableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)>, void>; write: Write<SetStateAction<undefined | ((settings: MinimumTableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)>, void> } & WithInitialValue<undefined | ((settings: MinimumTableSettings, additionalSettings?: Partial<{ _initialColumns: Record<FieldType, boolean>; _schema: TableSchema; _schemaSource: string; _suggestedRules: string }>) => Promise<void>)> = ...

Stores a function to update a table and its schema doc

updateUserAtom: Atom<undefined | UpdateCollectionDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>> & { onMount?: OnMount<SetStateAction<undefined | UpdateCollectionDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>>, void>; write: Write<SetStateAction<undefined | UpdateCollectionDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>>, void> } & WithInitialValue<undefined | UpdateCollectionDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>> = ...

Stores a function that updates a user document

updateUserSettingsAtom: Atom<undefined | UpdateDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>> & { onMount?: OnMount<SetStateAction<undefined | UpdateDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>>, void>; write: Write<SetStateAction<undefined | UpdateDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>>, void> } & WithInitialValue<undefined | UpdateDocFunction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>> = ...

Stores a function that updates user settings

userRolesAtom: Atom<string[]> & { onMount?: OnMount<SetStateAction<string[]>, void>; write: Write<SetStateAction<string[]>, void> } & WithInitialValue<string[]> = ...

User roles from Firebase Auth user custom claims

userSettingsAtom: Atom<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>> & { onMount?: OnMount<SetStateAction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>, void>; write: Write<SetStateAction<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>>, void> } & WithInitialValue<Partial<{ _rowy_ref: TableRowRef; favoriteTables: string[]; roles: string[]; tables: Record<string, Partial<{ filters: TableFilter[]; hiddenFields: string[]; sorts: TableSort[] }>>; theme: Record<"base" | "light" | "dark", ThemeOptions>; user: { displayName?: string; email: string; phoneNumber?: string; photoURL?: string } }>> = ...

User info and settings

Generated using TypeDoc