-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #631 from rowyio/rc
v2.3.0
- Loading branch information
Showing
116 changed files
with
5,405 additions
and
2,222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { useAtom } from "jotai"; | ||
import { atomWithReset, useResetAtom, useUpdateAtom } from "jotai/utils"; | ||
|
||
export type SelectedCell = { | ||
rowIndex: number; | ||
colIndex: number; | ||
}; | ||
|
||
export type anchorEl = HTMLElement; | ||
|
||
const selectedCellAtom = atomWithReset<SelectedCell | null>(null); | ||
const anchorEleAtom = atomWithReset<HTMLElement | null>(null); | ||
|
||
export function useSetAnchorEle() { | ||
const setAnchorEle = useUpdateAtom(anchorEleAtom); | ||
return { setAnchorEle }; | ||
} | ||
|
||
export function useSetSelectedCell() { | ||
const setSelectedCell = useUpdateAtom(selectedCellAtom); | ||
return { setSelectedCell }; | ||
} | ||
|
||
export function useContextMenuAtom() { | ||
const [anchorEle] = useAtom(anchorEleAtom); | ||
const [selectedCell] = useAtom(selectedCellAtom); | ||
const resetAnchorEle = useResetAtom(anchorEleAtom); | ||
const resetSelectedCell = useResetAtom(selectedCellAtom); | ||
|
||
const resetContextMenu = async () => { | ||
await resetAnchorEle(); | ||
await resetSelectedCell(); | ||
}; | ||
|
||
return { | ||
anchorEle, | ||
selectedCell, | ||
resetContextMenu, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { atomWithHash } from "jotai/utils"; | ||
|
||
export const modalAtom = atomWithHash< | ||
"cloudLogs" | "extensions" | "webhooks" | "export" | "" | ||
>("modal", ""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* utility functions | ||
*/ | ||
declare namespace rowy { | ||
/** | ||
* uploads a file to the cloud storage from a url | ||
*/ | ||
function url2storage( | ||
url: string, | ||
storagePath: string, | ||
fileName?: string | ||
): Promise<{ | ||
downloadURL: string; | ||
name: string; | ||
type: string; | ||
lastModifiedTS: Date; | ||
}>; | ||
|
||
/** | ||
* Gets the secret defined in Google Cloud Secret | ||
*/ | ||
async function getSecret(name: string, v?: string): Promise<string | null>; | ||
|
||
async function getServiceAccountUser(): Promise<{ | ||
email: string; | ||
emailVerified: boolean; | ||
displayName: string; | ||
photoURL: string; | ||
uid: string; | ||
timestamp: number; | ||
}>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.