Skip to content

Commit 59ca08f

Browse files
authored
Merge pull request #631 from rowyio/rc
v2.3.0
2 parents 63bc914 + 706734d commit 59ca08f

File tree

116 files changed

+5405
-2222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+5405
-2222
lines changed

package.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Rowy",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"homepage": "https://rowy.io",
55
"repository": {
66
"type": "git",
@@ -12,14 +12,14 @@
1212
"@date-io/date-fns": "1.x",
1313
"@emotion/react": "^11.4.0",
1414
"@emotion/styled": "^11.3.0",
15-
"@hookform/resolvers": "^2.8.1",
15+
"@hookform/resolvers": "^2.8.5",
1616
"@mdi/js": "^6.5.95",
1717
"@monaco-editor/react": "^4.3.1",
1818
"@mui/icons-material": "^5.2.0",
1919
"@mui/lab": "^5.0.0-alpha.58",
2020
"@mui/material": "^5.2.2",
2121
"@mui/styles": "^5.2.2",
22-
"@rowy/form-builder": "^0.4.2",
22+
"@rowy/form-builder": "^0.5.2",
2323
"@rowy/multiselect": "^0.2.3",
2424
"@tinymce/tinymce-react": "^3.12.6",
2525
"algoliasearch": "^4.8.6",
@@ -33,12 +33,13 @@
3333
"file-saver": "^2.0.5",
3434
"firebase": "8.6.8",
3535
"hotkeys-js": "^3.7.2",
36-
"jotai": "^1.4.2",
36+
"jotai": "^1.5.3",
3737
"json-stable-stringify-without-jsonify": "^1.0.1",
3838
"json2csv": "^5.0.6",
3939
"jszip": "^3.6.0",
4040
"jwt-decode": "^3.1.2",
4141
"lodash": "^4.17.21",
42+
"match-sorter": "^6.3.1",
4243
"notistack": "^2.0.2",
4344
"pb-util": "^1.0.1",
4445
"query-string": "^6.8.3",
@@ -54,17 +55,18 @@
5455
"react-element-scroll-hook": "^1.1.0",
5556
"react-firebaseui": "^5.0.2",
5657
"react-helmet": "^6.1.0",
57-
"react-hook-form": "^7.16.1",
58+
"react-hook-form": "^7.21.2",
5859
"react-image": "^4.0.3",
59-
"react-joyride": "^2.3.0",
6060
"react-json-view": "^1.19.1",
61+
"react-markdown": "^8.0.0",
6162
"react-router-dom": "^5.0.1",
6263
"react-router-hash-link": "^2.4.3",
6364
"react-scripts": "^4.0.3",
6465
"react-usestateref": "^1.0.5",
66+
"remark-gfm": "^3.0.1",
6567
"serve": "^11.3.2",
6668
"swr": "^1.0.1",
67-
"tinymce": "^5.9.2",
69+
"tinymce": "^5.10.0",
6870
"typescript": "^4.4.2",
6971
"use-algolia": "^1.4.1",
7072
"use-debounce": "^3.3.0",
@@ -115,14 +117,17 @@
115117
"@types/react-router-hash-link": "^2.4.1",
116118
"@types/use-persisted-state": "^0.3.0",
117119
"craco-alias": "^3.0.1",
118-
"firebase-tools": "^8.12.1",
120+
"firebase-tools": "^10.1.0",
119121
"husky": "^4.2.5",
120122
"monaco-editor": "^0.21.2",
121123
"playwright": "^1.5.2",
122124
"prettier": "^2.2.1",
123125
"pretty-quick": "^3.0.0",
124126
"raw-loader": "^4.0.2"
125127
},
128+
"resolutions": {
129+
"react-hook-form": "^7.21.2"
130+
},
126131
"husky": {
127132
"hooks": {
128133
"pre-commit": "pretty-quick --staged"

src/assets/service-account.mp4

-997 KB
Binary file not shown.

src/atoms/ContextMenu.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { useAtom } from "jotai";
2+
import { atomWithReset, useResetAtom, useUpdateAtom } from "jotai/utils";
3+
4+
export type SelectedCell = {
5+
rowIndex: number;
6+
colIndex: number;
7+
};
8+
9+
export type anchorEl = HTMLElement;
10+
11+
const selectedCellAtom = atomWithReset<SelectedCell | null>(null);
12+
const anchorEleAtom = atomWithReset<HTMLElement | null>(null);
13+
14+
export function useSetAnchorEle() {
15+
const setAnchorEle = useUpdateAtom(anchorEleAtom);
16+
return { setAnchorEle };
17+
}
18+
19+
export function useSetSelectedCell() {
20+
const setSelectedCell = useUpdateAtom(selectedCellAtom);
21+
return { setSelectedCell };
22+
}
23+
24+
export function useContextMenuAtom() {
25+
const [anchorEle] = useAtom(anchorEleAtom);
26+
const [selectedCell] = useAtom(selectedCellAtom);
27+
const resetAnchorEle = useResetAtom(anchorEleAtom);
28+
const resetSelectedCell = useResetAtom(selectedCellAtom);
29+
30+
const resetContextMenu = async () => {
31+
await resetAnchorEle();
32+
await resetSelectedCell();
33+
};
34+
35+
return {
36+
anchorEle,
37+
selectedCell,
38+
resetContextMenu,
39+
};
40+
}

src/atoms/Table.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { atomWithHash } from "jotai/utils";
2+
3+
export const modalAtom = atomWithHash<
4+
"cloudLogs" | "extensions" | "webhooks" | "export" | ""
5+
>("modal", "");

src/components/CodeEditor/extensions.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type ExtensionContext = {
1212
ref: FirebaseFirestore.DocumentReference;
1313
storage: firebasestorage.Storage;
1414
db: FirebaseFirestore.Firestore;
15-
auth: adminauth.BaseAuth;
15+
auth: firebaseauth.BaseAuth;
1616
change: any;
1717
triggerType: Triggers;
1818
fieldTypes: any;

src/components/CodeEditor/firebaseAuth.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* eslint-disable @typescript-eslint/ban-types */
44

5-
export namespace admin.auth {
5+
declare namespace firebaseauth {
66
/**
77
* Interface representing a user's metadata.
88
*/
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* utility functions
3+
*/
4+
declare namespace rowy {
5+
/**
6+
* uploads a file to the cloud storage from a url
7+
*/
8+
function url2storage(
9+
url: string,
10+
storagePath: string,
11+
fileName?: string
12+
): Promise<{
13+
downloadURL: string;
14+
name: string;
15+
type: string;
16+
lastModifiedTS: Date;
17+
}>;
18+
19+
/**
20+
* Gets the secret defined in Google Cloud Secret
21+
*/
22+
async function getSecret(name: string, v?: string): Promise<string | null>;
23+
24+
async function getServiceAccountUser(): Promise<{
25+
email: string;
26+
emailVerified: boolean;
27+
displayName: string;
28+
photoURL: string;
29+
uid: string;
30+
timestamp: number;
31+
}>;
32+
}

src/components/CodeEditor/useMonacoCustomizations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import firestoreDefs from "!!raw-loader!./firestore.d.ts";
1616
import firebaseAuthDefs from "!!raw-loader!./firebaseAuth.d.ts";
1717
import firebaseStorageDefs from "!!raw-loader!./firebaseStorage.d.ts";
1818
import utilsDefs from "!!raw-loader!./utils.d.ts";
19+
import rowyUtilsDefs from "!!raw-loader!./rowy.d.ts";
1920
import extensionsDefs from "!!raw-loader!./extensions.d.ts";
2021

2122
export interface IUseMonacoCustomizationsProps {
@@ -96,6 +97,7 @@ export default function useMonacoCustomizations({
9697
utilsDefs,
9798
"ts:filename/utils.d.ts"
9899
);
100+
monaco.languages.typescript.javascriptDefaults.addExtraLib(rowyUtilsDefs);
99101
} catch (error) {
100102
console.error(
101103
"An error occurred during initialization of Monaco: ",
@@ -174,7 +176,7 @@ export default function useMonacoCustomizations({
174176
"const ref: FirebaseFirestore.DocumentReference;",
175177
"const storage: firebasestorage.Storage;",
176178
"const db: FirebaseFirestore.Firestore;",
177-
"const auth: adminauth.BaseAuth;",
179+
"const auth: firebaseauth.BaseAuth;",
178180
"declare class row {",
179181
" /**",
180182
" * Returns the row fields",

src/components/ConfirmationDialog/Dialog.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ export default function Confirmation({
3131
return (
3232
<Dialog
3333
open={open}
34-
onClose={handleClose}
34+
onClose={(_, reason) => {
35+
if (reason === "backdropClick" || reason === "escapeKeyDown") return;
36+
else handleClose();
37+
}}
3538
maxWidth={maxWidth}
3639
TransitionComponent={SlideTransitionMui}
3740
style={{ cursor: "default" }}

src/components/Home/TableGrid/TableCard.tsx

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from "@mui/material";
1111
import GoIcon from "@src/assets/icons/Go";
1212

13+
import RenderedMarkdown from "@src/components/RenderedMarkdown";
1314
import { Table } from "@src/contexts/ProjectContext";
1415

1516
export interface ITableCardProps extends Table {
@@ -26,36 +27,38 @@ export default function TableCard({
2627
}: ITableCardProps) {
2728
return (
2829
<Card style={{ height: "100%", display: "flex", flexDirection: "column" }}>
29-
<CardActionArea
30-
sx={{
31-
flexGrow: 1,
32-
display: "flex",
33-
alignItems: "flex-start",
34-
justifyContent: "flex-start",
35-
borderRadius: 2,
36-
}}
37-
component={Link}
38-
to={link}
39-
>
40-
<CardContent>
30+
<CardActionArea component={Link} to={link}>
31+
<CardContent style={{ paddingBottom: 0 }}>
4132
<Typography variant="overline" component="p">
4233
{section}
4334
</Typography>
4435
<Typography variant="h6" component="h3" gutterBottom>
4536
{name}
4637
</Typography>
47-
<Typography
48-
color="textSecondary"
49-
sx={{
50-
minHeight: (theme) =>
51-
(theme.typography.body2.lineHeight as number) * 2 + "em",
52-
}}
53-
>
54-
{description}
55-
</Typography>
5638
</CardContent>
5739
</CardActionArea>
5840

41+
<CardContent style={{ flexGrow: 1, paddingTop: 0 }}>
42+
<Typography
43+
color="textSecondary"
44+
sx={{
45+
minHeight: (theme) =>
46+
(theme.typography.body2.lineHeight as number) * 2 + "em",
47+
display: "flex",
48+
flexDirection: "column",
49+
gap: 1,
50+
}}
51+
component="div"
52+
>
53+
{description && (
54+
<RenderedMarkdown
55+
children={description}
56+
//restrictionPreset="singleLine"
57+
/>
58+
)}
59+
</Typography>
60+
</CardContent>
61+
5962
<CardActions>
6063
<Button
6164
variant="text"

0 commit comments

Comments
 (0)