这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
fba88cd
Merge pull request #674 from rowyio/rc
shamsmosowi Apr 7, 2022
5a6f464
Merge branch 'rc'
notsidney Apr 8, 2022
84bc450
clean up & upgrade dependencies
notsidney Apr 8, 2022
17c101a
add react-data-grid, assets/icons
notsidney Apr 8, 2022
72e8388
update license copyright notice
notsidney Apr 11, 2022
6004864
Bump urijs from 1.19.10 to 1.19.11
dependabot[bot] Apr 13, 2022
07349ac
update browserslist
notsidney Apr 13, 2022
d54e8c5
Merge pull request #675 from rowyio/dependabot/npm_and_yarn/urijs-1.1…
notsidney Apr 13, 2022
2c78575
add jotai/babel/plugin-debug-label on dev server
notsidney Apr 13, 2022
c19a29f
webform
shamsmosowi Apr 20, 2022
0e037e4
finish base jotai structure + firestore with suspense
notsidney Apr 22, 2022
3f57eab
add react-router, auth pages, favicon, notistack
notsidney Apr 22, 2022
bc0bdf7
firebaseui: support React 18 StrictMode
notsidney Apr 23, 2022
ffd87a1
enforce usage of lodash-es
notsidney Apr 23, 2022
813bb07
remove react-firebaseui props
notsidney Apr 23, 2022
d664a04
add Setup page, Modal
notsidney Apr 25, 2022
7a12588
add types to atoms
notsidney Apr 25, 2022
97076b6
cleanup connector field
shamsmosowi Apr 25, 2022
24d61f6
fix testing with jotai & firebase
notsidney Apr 26, 2022
f1b1eb7
fix firebase multiple init & disable error when writing undefined fie…
notsidney Apr 27, 2022
f13eabd
add settings pages
notsidney Apr 28, 2022
3e804ca
Bump cross-fetch from 3.1.4 to 3.1.5
dependabot[bot] Apr 29, 2022
e660592
add eslint rule to require scope in useAtom hooks
notsidney Apr 29, 2022
44effc4
add project switching code
notsidney Apr 29, 2022
01070d6
prefer index.ts files to re-export <name>.tsx files
notsidney Apr 29, 2022
25562b2
fix multiselect crashing when opened
notsidney Apr 29, 2022
89eeaca
show emulator status in tab title
notsidney Apr 29, 2022
9536527
add atoms to update public, project, user settings
notsidney Apr 29, 2022
ed78794
sync user roles to user docs
notsidney Apr 29, 2022
0b51acc
make theme radio full width
notsidney Apr 29, 2022
51825c4
Merge pull request #678 from rowyio/dependabot/npm_and_yarn/cross-fet…
notsidney Apr 30, 2022
580c67c
connect emulators based on env vars
notsidney May 2, 2022
633bb6b
Merge branch 'develop' of https://github.com/rowyio/rowy into develop
notsidney May 2, 2022
70fb0c6
add user management page, RowyRunModal, ConfirmDialog
notsidney May 2, 2022
58b2c06
move @src/atoms/* to standardize imports
notsidney May 2, 2022
8fed928
add tables page, CodeEditor, TableSettingsDialog
notsidney May 2, 2022
2f15f57
add jotai/babel/plugin-react-refresh
notsidney May 4, 2022
e30efda
start work on table data
notsidney May 4, 2022
9d79d22
Merge branch 'v3' of https://github.com/notsidney/xtable into data-la…
notsidney May 4, 2022
dc8dce5
Merge branch 'v3' of https://github.com/notsidney/xtable into data-la…
notsidney May 4, 2022
e60fd65
remove cra react logos
notsidney May 4, 2022
b910833
fix @rowy/form-builder
notsidney May 4, 2022
9f34dd8
support table local rows, collectionGroup, filters, orders, page
notsidney May 5, 2022
3ba5fef
enable TableSettingsDialog
notsidney May 9, 2022
be3c8dd
add SnackLogProvider
notsidney May 9, 2022
530bea9
refrence field setup
shamsmosowi May 9, 2022
233d218
add passwords to emulator accounts
notsidney May 10, 2022
72cac00
fix jest babel transforms
notsidney May 10, 2022
5211d1d
add addColumn, updateColumn, deleteColumn functions + tests
notsidney May 10, 2022
0d3672b
data layer core & types updates
notsidney May 12, 2022
a94bb26
write addRow function
notsidney May 13, 2022
449467a
update switch to match material 3 design
notsidney May 16, 2022
6cc90c7
Bump cross-fetch from 3.1.4 to 3.1.5
dependabot[bot] May 16, 2022
daddc30
add updateFieldAtom & id decrement
notsidney May 17, 2022
007a4f8
add more rowActions unit tests
notsidney May 18, 2022
8fb9a47
add main Table component
notsidney May 19, 2022
6b162be
add most field types
notsidney May 24, 2022
1b7f9af
functions setup
shamsmosowi May 24, 2022
cdb4748
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi May 24, 2022
3821b22
add more complex data types
notsidney May 24, 2022
110acab
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney May 24, 2022
e5176e7
fix table ArrowDropDownIcon size
notsidney May 24, 2022
8a31327
add ColumnMenu, independent ColumnModals
notsidney May 26, 2022
32f2c12
animate unsorted icon
notsidney May 26, 2022
60a40c6
add table filters UI
notsidney May 26, 2022
2593ad4
Merge pull request #679 from rowyio/dependabot/npm_and_yarn/cross-fet…
notsidney May 27, 2022
c85098a
useFirestoreCollectionWithAtom fixes
notsidney May 27, 2022
8286aa8
improve table empty & loading states
notsidney May 27, 2022
da54930
test vercel preview deploy
notsidney May 27, 2022
c84d6fa
push to vercel dev link
notsidney May 27, 2022
3daa1b4
fix LoadedRowsStatus off by 1
notsidney May 27, 2022
52a193f
fix authenticated rowy run calls
shamsmosowi May 27, 2022
36d6190
.
shamsmosowi May 27, 2022
ba3531d
usefirestoreDocWithAtom: memoize docRef
notsidney May 30, 2022
2a6deba
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney May 30, 2022
fe28571
useFirestoreCollectionWithAtom: store next page availability state in…
notsidney May 30, 2022
d02fcfc
add console logs to troubleshoot infinite scroll on production
notsidney May 30, 2022
8e303bf
fix table infinite scroll stopping after a while because the network …
notsidney May 30, 2022
6030041
fix file, image table cells not getting doc ref
notsidney May 30, 2022
33877a1
improve HiddenFields state ui
notsidney May 30, 2022
ac09712
fix column sort icon slash size
notsidney May 30, 2022
fd26a20
NavDrawer: remove divider in pinned state
notsidney May 30, 2022
a838b40
add Export
notsidney May 31, 2022
e1bc720
temp wrap Export in Suspense because it was causing crash
notsidney May 31, 2022
376b0ef
reference field type
shamsmosowi May 31, 2022
b32276f
standardize ColumnSelect, wrap more TableToolbar children in lazy & S…
notsidney Jun 1, 2022
4bf5848
update nav drawer design to improve hierarchy
notsidney Jun 1, 2022
88cfe34
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 1, 2022
72f4f74
nav drawer: add favorites icon
notsidney Jun 1, 2022
f0f1f0a
TypeChangeModal: add potential data loss warning
notsidney Jun 1, 2022
43959dd
ColumnSelect: display column icon when selected
notsidney Jun 1, 2022
dd0164b
add CloudLogs
notsidney Jun 1, 2022
bd1aead
nav: fix table item style resetting
notsidney Jun 1, 2022
8501fe4
add Extensions & Webhooks
notsidney Jun 1, 2022
f1b99fc
Bump eventsource from 1.0.7 to 1.1.1
dependabot[bot] Jun 1, 2022
c38c3be
fix callable action undo confirmation requirement
shamsmosowi Jun 2, 2022
88ad85e
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi Jun 2, 2022
3bcff07
MultiSelect: match selected item color to single select
notsidney Jun 2, 2022
30ec2af
fix TableToolbarSkeleton sizes
notsidney Jun 2, 2022
cc7b7ab
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 2, 2022
9373c8c
HiddenFields: fix slash color
notsidney Jun 2, 2022
effe08e
add error handler to auth
notsidney Jun 2, 2022
21cfc75
update Reference field icon
notsidney Jun 2, 2022
3eb7915
consolidate icons into src/assets/icons/index.ts
notsidney Jun 2, 2022
b414853
Merge pull request #681 from rowyio/dependabot/npm_and_yarn/eventsour…
notsidney Jun 2, 2022
67503b1
add basic side drawer
notsidney Jun 2, 2022
3a1a84e
fix data grid cell selection not updating side drawer
notsidney Jun 2, 2022
109960d
prepare updated SideDrawer without react-hook-form
notsidney Jun 3, 2022
bb8b698
move table ui atoms to tableScope
notsidney Jun 3, 2022
f2e766a
fix jotai debug values & reset atomWithHash
notsidney Jun 3, 2022
34a49c3
add useBeforeUnload
notsidney Jun 3, 2022
726f4c1
store current table page in URL
notsidney Jun 3, 2022
36e911d
Table: select corresponding header cell when scrolled to prevent jump…
notsidney Jun 3, 2022
8fb4633
fix some atomWithHash not replacing state
notsidney Jun 3, 2022
1933bae
update HiddenFields button text
notsidney Jun 3, 2022
7dbd94b
Bump semver-regex from 3.1.3 to 3.1.4
dependabot[bot] Jun 4, 2022
6ca30bb
Merge pull request #682 from rowyio/dependabot/npm_and_yarn/semver-re…
notsidney Jun 4, 2022
c083c8c
update color picker, breadcrumbs styles
notsidney Jun 4, 2022
c448591
enable all fields in side drawer
notsidney Jun 6, 2022
9c2c6fb
SideDrawer: select cell in case of scroll reset
notsidney Jun 6, 2022
94372bc
disable analytics on rowy open source
notsidney Jun 6, 2022
c292b67
delete reference field when empty
shamsmosowi Jun 6, 2022
b838533
geolocation field
shamsmosowi Jun 6, 2022
54b1d7d
add back context menu
notsidney Jun 6, 2022
c28490c
markdown field
shamsmosowi Jun 6, 2022
db49cc8
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi Jun 6, 2022
83a5415
md field theme mode support
shamsmosowi Jun 6, 2022
62db3af
downgrade mui to v5.6
notsidney Jun 6, 2022
ec9ae60
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 6, 2022
8330873
fix issues
notsidney Jun 6, 2022
2d1c452
copy img url to clipboard
shamsmosowi Jun 6, 2022
d729607
conditional clear value option
shamsmosowi Jun 6, 2022
21576b2
disable copying valueless cell
shamsmosowi Jun 6, 2022
f6ebda3
cloud functions region selector
shamsmosowi Jun 6, 2022
6521bf9
remove Alpha tag from Duration field
notsidney Jun 6, 2022
3e8ae8b
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 6, 2022
c50437d
update markdown field type icon
notsidney Jun 7, 2022
2e8dcc6
remove unused csv-parse polyfills
notsidney Jun 7, 2022
1f56ffc
add table wizard ui (not functional)
notsidney Jun 7, 2022
6ad2df4
restructure and consolidate TableModals
notsidney Jun 7, 2022
250489f
open or delete images from sideDrawer
shamsmosowi Jun 7, 2022
603da90
context submenus + image submenus
shamsmosowi Jun 7, 2022
31bdc78
disabled view image item
shamsmosowi Jun 7, 2022
5524646
add bulk import based on firestore batched writes (#607)
notsidney Jun 7, 2022
fdb839c
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 7, 2022
bb54bc9
geopoint - style cell and fix input
shamsmosowi Jun 7, 2022
6886893
import csv: add batch snackbar
notsidney Jun 8, 2022
1187e10
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 8, 2022
c3e1edd
add typedoc for atoms
notsidney Jun 8, 2022
cce14bc
import csv: add warning and success snackbars
notsidney Jun 8, 2022
6df68c7
import csv: add auditChange for each row
notsidney Jun 8, 2022
5e2b9a2
remove typedoc build
notsidney Jun 8, 2022
2c3e3a5
prevent committing typedoc builds
notsidney Jun 8, 2022
43ce301
useMonaco
shamsmosowi Jun 8, 2022
582fca0
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi Jun 8, 2022
e86006f
disable quicktype
shamsmosowi Jun 8, 2022
58dbd39
update TypeChangeModal
notsidney Jun 8, 2022
61a852a
WizardDialog: full screen & prevent accidental escape key hits
notsidney Jun 8, 2022
d0c8f6d
rename to ImportExistingWizard
notsidney Jun 8, 2022
736ef14
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 8, 2022
2256bd5
add Page suffix to page files
notsidney Jun 8, 2022
1c77c6f
fix pages exports
notsidney Jun 8, 2022
d04c332
move ExportModal to TableModals
notsidney Jun 8, 2022
45d8a31
fix editors row ref
shamsmosowi Jun 8, 2022
4586b57
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi Jun 8, 2022
bdb680b
fix FilterInputs, DefaultValueInput usage of side drawer fields
notsidney Jun 8, 2022
0301065
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 8, 2022
fb01d4e
minor field fixes
shamsmosowi Jun 8, 2022
ce12b1e
fix date and date time filters
notsidney Jun 8, 2022
2a1209f
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 8, 2022
456676d
support filtering by document ID (#668)
notsidney Jun 8, 2022
7a3f960
update id filter label
notsidney Jun 8, 2022
2ed6586
fix space grotesk font not loading
notsidney Jun 8, 2022
168b84a
add standard Chevron icons
notsidney Jun 9, 2022
972bbba
update ContextMenu items
notsidney Jun 9, 2022
a303c76
fix project settings > cloud function region styles
notsidney Jun 9, 2022
b6ee78f
tableRowsAtom: remove sorting by ID, which broke out of order rows
notsidney Jun 9, 2022
820f162
fix Selects using ChevronRight
notsidney Jun 9, 2022
fab3851
fix Image ContextMenuActions crash
notsidney Jun 9, 2022
3e79129
fix out of order fields not appearing & remove _rowy_* fields
notsidney Jun 9, 2022
207058f
disable quicktype
shamsmosowi Jun 9, 2022
23530d0
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi Jun 9, 2022
94c227c
support sub-tables with nested routes & jotai scoped providers
notsidney Jun 9, 2022
45de389
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 9, 2022
54d9cfc
add sub-table breadcrumbs
notsidney Jun 9, 2022
8e9f83b
disable cloud functions region select
notsidney Jun 9, 2022
0f24e69
Nav: fix right chevron being used
notsidney Jun 9, 2022
3d4386b
bump version number
notsidney Jun 9, 2022
72ad745
fix useBuildLogs
shamsmosowi Jun 9, 2022
d9dda23
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
shamsmosowi Jun 9, 2022
fc114d1
UserMenu: update avatar size to match rowy.app
notsidney Jun 9, 2022
5e23f3f
fix auditChange missing rowy user
shamsmosowi Jun 9, 2022
4a24dc5
nav: add HelpMenu
notsidney Jun 9, 2022
6bd01ba
Merge branch 'data-layer-rewrite' of https://github.com/rowyio/rowy i…
notsidney Jun 9, 2022
aa1c83e
fix incorrect rowyRunDeployStatus projectSettings key
notsidney Jun 9, 2022
4544369
sync changes with rowy.app
notsidney Jun 9, 2022
103d48d
Revert "refrence field setup"
notsidney Jun 9, 2022
2869c0e
Merge branch 'develop' into data-layer-rewrite
notsidney Jun 9, 2022
8d7e7c8
push notification
shamsmosowi Jun 10, 2022
72579df
store personalised sorts
shamsmosowi Jun 10, 2022
c8fcbd3
rowy.app nav fix
notsidney Jun 13, 2022
981deeb
Merge branch 'rc' into develop
notsidney Jun 13, 2022
aef80be
display column headers when only table rows have suspended
notsidney Jun 13, 2022
2c4c52a
fix orders not working when we're at last page
notsidney Jun 13, 2022
8a97831
display column menu for all users, but hide config actions for non-AD…
notsidney Jun 13, 2022
94cbab7
disable decrement ID when filters or orders enabled & update add row UI
notsidney Jun 13, 2022
c75168e
handle firestore invalid argument error (fixes ROWY-515)
notsidney Jun 13, 2022
028ab2f
rename tableOrdersAtom to tableSortsAtom
notsidney Jun 13, 2022
2208ae7
fix side drawer document path spacing
notsidney Jun 13, 2022
75b8107
derivative column: add evaluat eall
notsidney Jun 14, 2022
0623237
useFirestoreCollection: remove console.log
notsidney Jun 14, 2022
ea7a6e9
update jotai
notsidney Jun 14, 2022
c1eaadd
fix table flashing with no data
notsidney Jun 14, 2022
6239f0b
fix table suspense flashing
notsidney Jun 14, 2022
2787b94
add KeyValueInput
notsidney Jun 14, 2022
c307089
update geopoint styles
notsidney Jun 14, 2022
53e6d7b
fix markdown field styles
notsidney Jun 14, 2022
94ed6e8
markdown: limit table cell preview
notsidney Jun 14, 2022
3345bb7
Update utils.ts
shamsmosowi Jun 14, 2022
70e5f65
fix font-smoothing
notsidney Jun 14, 2022
3467a46
Merge branch 'develop' of https://github.com/rowyio/rowy into develop
notsidney Jun 14, 2022
b880ba9
add back Inter font
notsidney Jun 14, 2022
5d32a73
fix out of order fields writing updates to db but not to tableRowsLoc…
notsidney Jun 15, 2022
412c291
fix rows with missing fields listed as out of order when IDs are set …
notsidney Jun 15, 2022
9544786
fix RichTooltip styling
notsidney Jun 15, 2022
0b81f80
fix sub-table function deploy
notsidney Jun 15, 2022
d7bc172
update Modal/fullScreen style to show nav hierarchy
notsidney Jun 15, 2022
a216e65
disable root table modals when sub-table is open
notsidney Jun 15, 2022
150773f
update fullScreen modal transform origin
notsidney Jun 15, 2022
c2626e9
update full screen modal animation
notsidney Jun 15, 2022
5696cc3
fix modal titles hiding close button
notsidney Jun 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
typedoc/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ cloud_functions/functions/lib
*-firebase.json
.firebase/
*firebase-adminsdk*.json
*.log

# misc
.DS_Store
Expand All @@ -30,3 +31,4 @@ firebase-debug.log*
.npm

.vercel
typedoc/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn lint-staged
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
.yarn
emulators/
typedoc/
16 changes: 16 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Copyright 2022 Rowy Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------------------

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
69 changes: 59 additions & 10 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { whenDev } = require("@craco/craco");
const CracoAlias = require("craco-alias");
const CracoSwcPlugin = require("craco-swc");

Expand All @@ -11,20 +12,68 @@ module.exports = {
tsConfigPath: "./tsconfig.extend.json",
},
},
{
plugin: CracoSwcPlugin,
options: {
swcLoaderOptions: {
jsc: {
target: "es2019",
transform: {
react: {
runtime: "automatic",
// Use Babel on dev since Jotai doesn’t have swc plugins yet
// See https://github.com/pmndrs/jotai/discussions/1057
// Use swc on production and test since Babel seems to break Jest
...whenDev(
() => [],
[
{
plugin: CracoSwcPlugin,
options: {
swcLoaderOptions: {
jsc: {
target: "es2021",
transform: {
react: {
runtime: "automatic",
},
},
},
},
},
},
]
),
],
babel: {
plugins: [
"jotai/babel/plugin-debug-label",
"./node_modules/jotai/babel/plugin-react-refresh",
],
},
jest: {
configure: (jestConfig) => {
jestConfig.setupFilesAfterEnv = ["./src/test/setupTests.ts"];
jestConfig.forceExit = true; // jest hangs if we don't have this

jestConfig.moduleNameMapper["lodash-es"] = "lodash";
jestConfig.moduleNameMapper["^.+\\.(css|less)$"] =
"<rootDir>/src/test/importStub.js";
jestConfig.moduleNameMapper["^!!raw-loader!.*"] =
"<rootDir>/src/test/importStub.js";

jestConfig.extensionsToTreatAsEsm = [".ts", ".tsx"];
// Need to transform node modules to prevent
// "cannot use import outside module" error
jestConfig.transformIgnorePatterns = [
// "/node_modules/",
"\\.pnp\\.[^\\/]+$",
];

return jestConfig;
},
},
webpack: {
configure: {
resolve: {
// Polyfill for monaco-editor-auto-typings
fallback: {
path: require.resolve("path-browserify"),
// stream: require.resolve("stream-browserify"),
// buffer: require.resolve("buffer"),
},
},
},
],
},
};
1 change: 1 addition & 0 deletions emulators/auth_export/accounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"26CJMrwlouNRwkiLofNK07DNgKhw","createdAt":"1651022832613","lastLoginAt":"1652766366467","displayName":"Admin User","photoUrl":"","passwordHash":"fakeHash:salt=fakeSaltWjasmDYtQJU3vEm0cdg9:password=adminUser","salt":"fakeSaltWjasmDYtQJU3vEm0cdg9","passwordUpdatedAt":1652670601103,"customAttributes":"{\"roles\": [\"ADMIN\"]}","providerUserInfo":[{"providerId":"google.com","rawId":"abc123","federatedId":"abc123","displayName":"Admin User","email":"admin@example.com"},{"providerId":"password","email":"admin@example.com","federatedId":"admin@example.com","rawId":"admin@example.com","displayName":"Admin User","photoUrl":""}],"validSince":"1652670601","email":"admin@example.com","emailVerified":true,"disabled":false,"lastRefreshAt":"2022-05-19T05:13:45.818Z"},{"localId":"3xTRVPnJGT2GE6lkiWKZp1jShuXj","createdAt":"1651023059442","lastLoginAt":"1651727720399","displayName":"Editor User","photoUrl":"","passwordHash":"fakeHash:salt=fakeSaltmNJg6BtcsUfyZKz6wZQY:password=editorUser","salt":"fakeSaltmNJg6BtcsUfyZKz6wZQY","passwordUpdatedAt":1652670601104,"providerUserInfo":[{"providerId":"google.com","rawId":"1535779573397289142795231390488730790451","federatedId":"1535779573397289142795231390488730790451","displayName":"Editor User","email":"editor@example.com"},{"providerId":"password","email":"editor@example.com","federatedId":"editor@example.com","rawId":"editor@example.com","displayName":"Editor User","photoUrl":""}],"validSince":"1652670601","email":"editor@example.com","emailVerified":true,"disabled":false}]}
1 change: 1 addition & 0 deletions emulators/auth_export/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"signIn":{"allowDuplicateEmails":false},"usageMode":"DEFAULT"}
12 changes: 12 additions & 0 deletions emulators/firebase-export-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "10.6.0",
"firestore": {
"version": "1.14.1",
"path": "firestore_export",
"metadata_file": "firestore_export/firestore_export.overall_export_metadata"
},
"auth": {
"version": "10.6.0",
"path": "auth_export"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
59 changes: 59 additions & 0 deletions eslint-local-rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const JOTAI_USE_ATOM_HOOKS = [
"useAtom",
"useSetAtom",
"useAtomValue",
"useUpdateAtom",
"useAtomValue",
"useResetAtom",
"useReducerAtom",
"useAtomCallback",
"useHydrateAtoms",
];

module.exports = {
"no-jotai-use-atom-without-scope": {
meta: {
hasSuggestions: true,
},
create: function (context) {
return {
CallExpression: function (node) {
if (
node.callee.name &&
JOTAI_USE_ATOM_HOOKS.includes(node.callee.name)
) {
const lastArgument =
node.arguments[node.arguments.length - 1] || "";
if (!lastArgument.name.match(/scope/i)) {
context.report({
node: node,
message:
"Missing scope argument. Scope should be suffixed with -Scope",
suggest: [
{
desc: "Set the scope to `globalScope`",
fix(fixer) {
return fixer.insertTextAfter(
lastArgument,
", globalScope"
);
},
},
{
desc: "Set the scope to `tableScope`",
fix(fixer) {
return fixer.insertTextAfter(
lastArgument,
", tableScope"
);
},
},
],
});
}
}
},
};
},
},
};
21 changes: 21 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,26 @@
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"storage": {
"rules": "storage.rules"
},
"emulators": {
"auth": {
"port": 9099
},
"firestore": {
"port": 9299
},
"storage": {
"port": 9199
},
"ui": {
"enabled": true
}
}
}
4 changes: 4 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
36 changes: 36 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow admins to read and write all documents
match /{document=**} {
allow read, write: if hasAnyRole(["ADMIN", "OWNER"]);
}

// Rowy: Allow signed in users to read Rowy configuration and admins to write
match /_rowy_/{docId} {
allow read: if request.auth.token.roles.size() > 0;
allow write: if hasAnyRole(["ADMIN", "OWNER"]);
match /{document=**} {
allow read: if request.auth.token.roles.size() > 0;
allow write: if hasAnyRole(["ADMIN", "OWNER"]);
}
}
// Rowy: Allow users to edit their settings
match /_rowy_/userManagement/users/{userId} {
allow get, update, delete: if isDocOwner(userId);
allow create: if request.auth != null;
}
// Rowy: Allow public to read public Rowy configuration
match /_rowy_/publicSettings {
allow get: if true;
}

// Rowy: Utility functions
function isDocOwner(docId) {
return request.auth != null && (request.auth.uid == resource.id || request.auth.uid == docId);
}
function hasAnyRole(roles) {
return request.auth != null && request.auth.token.roles.hasAny(roles);
}
}
}
Loading