Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
473 commits
Select commit Hold shift + click to select a range
83bb2cc
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 26, 2022
e76e37a
chore: bump css to 0.0.0-18
ArmanNik Jun 27, 2022
2f727f1
feat: stop background scroll when modal open
ArmanNik Jun 27, 2022
f7db4cb
fix: add back tmp inline styling
ArmanNik Jun 27, 2022
a9f8535
feat: add show password to input
ArmanNik Jun 27, 2022
eb71387
fix: fetching corectly sized avatar
ArmanNik Jun 27, 2022
29c4f27
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 27, 2022
9bfe640
fix: only check if modal open when in browser
ArmanNik Jun 27, 2022
6aba54a
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 27, 2022
3c45f4e
fix: pagination top margin
ArmanNik Jun 27, 2022
1938a4a
fix: broken tests with browser import
ArmanNik Jun 27, 2022
d5d4f24
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 27, 2022
6205f40
chore: bump css to 0.0.0-19
ArmanNik Jun 27, 2022
107bf5b
feat: fix alignment of back link and copy button
ArmanNik Jun 27, 2022
6e5fd05
fix: html & css for preferences
ArmanNik Jun 27, 2022
c1a0407
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 27, 2022
85b880f
feat: initial logic to uploadBox component
ArmanNik Jun 28, 2022
9f47508
feat: add new functions to the store
ArmanNik Jun 28, 2022
97a72d5
feat: files get added to uploader on upload
ArmanNik Jun 28, 2022
691ed08
fix: made some args optional
ArmanNik Jun 28, 2022
bcf17ba
fix: remove unused import
ArmanNik Jun 28, 2022
d4cfa5a
feat: move copy pill next to title
ArmanNik Jun 28, 2022
47185f1
feat: add mock phone verification dropdown
ArmanNik Jun 28, 2022
c1ce0f7
fix: remove unused import
ArmanNik Jun 29, 2022
e00345b
chore: bump css to 0.0.0-20
ArmanNik Jun 29, 2022
cc863ec
fix: replace inline style with utility class
ArmanNik Jun 29, 2022
344b684
fix: add avatar component instead of html
ArmanNik Jun 29, 2022
56f18fd
fix: resize avatar to 48px
ArmanNik Jun 29, 2022
e6d45f6
fix: replace html with component
ArmanNik Jun 29, 2022
47770e6
fix: update text
ArmanNik Jun 29, 2022
87b1d2e
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 29, 2022
6e674de
fix: replace html with avatar component
ArmanNik Jun 29, 2022
82c8a49
fix: naming & add promise type to button #discussion_r909384722
ArmanNik Jun 29, 2022
0f38c8d
fix: hide divider when slot empty #discussion_r909388432
ArmanNik Jun 29, 2022
8dabe66
fix: renamed 'right' to 'aside' #discussion_r909387286
ArmanNik Jun 29, 2022
e63d473
fix: add {#if...} #discussion_r909389425
ArmanNik Jun 29, 2022
ac523d3
todo: explore other solutions compatible with testing library
ArmanNik Jun 29, 2022
cce91df
fix: order #discussion_r909391209
ArmanNik Jun 29, 2022
703896c
fix: rename component
ArmanNik Jun 29, 2022
98d6b77
feat: create copy wrapper component, impemented & tests #discussion_r…
ArmanNik Jun 29, 2022
5e2e57a
fix: remove try catch from user store #discussion_r909402785
ArmanNik Jun 29, 2022
211f916
fix: remove unused try/catch
ArmanNik Jun 29, 2022
36ef28e
feat create search component + implementation #discussion_r909406009
ArmanNik Jun 29, 2022
18f3bf6
chore: remove unused comments
ArmanNik Jun 29, 2022
116afa8
fix: replace card with cardGrid component #discussion_r909418818
ArmanNik Jun 30, 2022
7d06b7c
feat: extend inputswitch with on:change, implemented it #discussion_r…
ArmanNik Jun 30, 2022
cf5f39c
fix: add correct url
ArmanNik Jun 30, 2022
a2f3c8a
fix: add missing type
ArmanNik Jun 30, 2022
f8f4d9d
fix: type & accessibility
ArmanNik Jun 30, 2022
7bc3e30
fix: remove empty class
ArmanNik Jun 30, 2022
cf606dd
fix: rename cache to avoid possible conflicts
ArmanNik Jun 30, 2022
bfa9205
fix: replace delete with reduce
ArmanNik Jun 30, 2022
97eddf6
fix: remove time out
ArmanNik Jun 30, 2022
0b25be7
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jun 30, 2022
aeaffa1
Merge branch 'users' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Jun 30, 2022
f6aa2ec
fix: format
TorstenDittmann Jun 30, 2022
5bb2a6d
feat: implement changes from users branch
ArmanNik Jun 30, 2022
bf3fc15
fix: add new tables
TorstenDittmann Jun 30, 2022
b8d62ca
Merge pull request #16 from appwrite/feat-table-row-link
TorstenDittmann Jun 30, 2022
cc2adc2
fix: copy prevent default
TorstenDittmann Jun 30, 2022
6727661
fix: error on page first load
ArmanNik Jun 30, 2022
ec0b9bd
fix: avatar size
ArmanNik Jun 30, 2022
a1c6ea1
fix: tablerow link missing in some places
ArmanNik Jun 30, 2022
fd05c3a
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 1, 2022
6d97c59
feat: implement changes from users branch
ArmanNik Jul 1, 2022
276c488
feat: updated activity & session layout
ArmanNik Jul 1, 2022
905f222
feat: modal sizes & create user id dropdown
ArmanNik Jul 1, 2022
04a2ea6
feat: add cardDrop & ID dropdown
ArmanNik Jul 1, 2022
93af690
feat: add warning icon to modals
ArmanNik Jul 1, 2022
062593d
fix: capitalization
ArmanNik Jul 1, 2022
cdb3abf
fix: removed unused class
ArmanNik Jul 1, 2022
b6ef0c9
feat: 0.15.x
TorstenDittmann Jul 1, 2022
9c22c68
fix: user
TorstenDittmann Jul 1, 2022
93f80ce
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 1, 2022
d2b186e
feat: alyout lifecycle
TorstenDittmann Jul 1, 2022
20201aa
fix: errors
TorstenDittmann Jul 1, 2022
0d54306
Merge pull request #17 from appwrite/feat-0-15-x
TorstenDittmann Jul 1, 2022
c2be3c4
fix: layout of user limit in security
ArmanNik Jul 1, 2022
8941451
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 3, 2022
148238d
feat: add last updated
ArmanNik Jul 3, 2022
8414b74
feat: implement new table row link
ArmanNik Jul 3, 2022
877b6dd
fix: chart not rendering when theme auto
ArmanNik Jul 4, 2022
46dbea6
chore: bump css to 0.0.0-23
ArmanNik Jul 4, 2022
19d4a3e
fix: heading size
ArmanNik Jul 4, 2022
956b640
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 4, 2022
6fd6fae
feat: add custom id to bucket
ArmanNik Jul 4, 2022
b69783d
fix: wrong text
ArmanNik Jul 4, 2022
c1e40c9
feat: add back button
ArmanNik Jul 4, 2022
3be99db
feat: update layout to new standard
ArmanNik Jul 4, 2022
4ef7118
fix: replace copy function with component
ArmanNik Jul 4, 2022
5d21b3c
feat: move authMethods to the store folder
ArmanNik Jul 4, 2022
8cf9ca6
feat: move oauthProviders to the store folder
ArmanNik Jul 4, 2022
8370cc8
fix: changed naming convenction
ArmanNik Jul 4, 2022
fa27262
fix: update imports
ArmanNik Jul 4, 2022
a3b4f9f
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 4, 2022
1e5a27e
feat: add custom ID to upload file
ArmanNik Jul 4, 2022
b99dd08
fix: id resets when modal is closed
ArmanNik Jul 4, 2022
6813925
fix: id modal is closed on submit
ArmanNik Jul 4, 2022
b7f1749
fix: correct function asigned to buttons
ArmanNik Jul 4, 2022
d8f0b6d
fix: id modal is closed on submit
ArmanNik Jul 4, 2022
0989f46
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 4, 2022
3f80f42
fix: move images to imports
TorstenDittmann Jul 4, 2022
fdf3220
feat: add phone auth
ArmanNik Jul 5, 2022
183dfa0
feat: create bucket component
ArmanNik Jul 5, 2022
663f53a
fix: text under Eldad suggestion
ArmanNik Jul 5, 2022
6844a4c
feat: implement bucket component
ArmanNik Jul 5, 2022
f166a34
chore: bump css to 0.0.0-24
ArmanNik Jul 5, 2022
db94577
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 5, 2022
1cadf70
feat: add disabled state to tooltip
ArmanNik Jul 5, 2022
97d1234
fix: update bucket implementation
ArmanNik Jul 5, 2022
bf42ba7
feat: create inputPhone & test
ArmanNik Jul 5, 2022
1742c47
feat: add phone update to user settings
ArmanNik Jul 5, 2022
aff7cfc
feat: add static files to service worker
TorstenDittmann Jul 5, 2022
023842c
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 5, 2022
89d8894
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 5, 2022
0c293b5
fix: spacing
ArmanNik Jul 5, 2022
a7ce67d
feat: google analytics events
TorstenDittmann Jul 5, 2022
064a578
fix: tracking check
TorstenDittmann Jul 5, 2022
6d2b631
feat: create upload box logic
ArmanNik Jul 5, 2022
7ea1591
Merge pull request #18 from appwrite/feat-ga-events
TorstenDittmann Jul 5, 2022
933817e
feat: add more analytics
TorstenDittmann Jul 5, 2022
e0093b5
fix: analytics events
TorstenDittmann Jul 5, 2022
e7b0c8c
fix: remove console.log
TorstenDittmann Jul 5, 2022
e7498fc
feat: inputs show live text not as placeholder
ArmanNik Jul 6, 2022
37e9259
feat: inputs show live text not placeholder
ArmanNik Jul 6, 2022
d3d2f20
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 6, 2022
6cf886a
fix: remove loading & response from stores
ArmanNik Jul 6, 2022
4eb3adc
fix: if field null update btn disabled
ArmanNik Jul 6, 2022
12ac9ee
fix: null check if $user not loaded
ArmanNik Jul 6, 2022
b555554
fix: scroll error message
TorstenDittmann Jul 6, 2022
369d4cf
Merge branch 'users' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Jul 6, 2022
1127e8f
feat: icons now change with theme
ArmanNik Jul 7, 2022
a4c0855
fix: made core more DRY now theme in use is stored
ArmanNik Jul 7, 2022
e29fb37
chore: bump to 0.0.0-25
ArmanNik Jul 7, 2022
8784a45
feat: add hover to `Copy` component
ArmanNik Jul 7, 2022
864394d
fix: text
ArmanNik Jul 7, 2022
d351caf
feat: icon changes when password is shown
ArmanNik Jul 7, 2022
4408359
fix: add time to joined
ArmanNik Jul 7, 2022
52e90c8
fix: page not displaying wrong info anymore
ArmanNik Jul 7, 2022
fec7336
chore: bump to 0.0.0-26
ArmanNik Jul 8, 2022
aba0aa5
fix: add missing classes
ArmanNik Jul 8, 2022
6310f7d
fix: move tooltip to bottom
ArmanNik Jul 8, 2022
11927f2
feat: update cover and shell layout
ArmanNik Jul 8, 2022
df2b59b
feat: add arrow positioning
ArmanNik Jul 8, 2022
0342610
fix: remove 12 hour format
ArmanNik Jul 8, 2022
581c9fb
fix: from design review
ArmanNik Jul 8, 2022
0c4a9ef
feat: rename and update inner modal
ArmanNik Jul 8, 2022
b509c2c
feat: now label can be hidden
ArmanNik Jul 8, 2022
1e8d15c
feat: implement new inner modal
ArmanNik Jul 8, 2022
189bd1f
feat: showing label on inputs is now optional
ArmanNik Jul 8, 2022
b50a5ac
fix: update icon
ArmanNik Jul 8, 2022
311c3fe
fix: remove unused dependency
ArmanNik Jul 8, 2022
09e3821
fix: update layout
ArmanNik Jul 8, 2022
c0781d7
fix: tmp re-add custom ID input
ArmanNik Jul 8, 2022
021cae0
chore: bump css to 0.0.0-27
ArmanNik Jul 8, 2022
3361932
fix: name update is cliccable
ArmanNik Jul 8, 2022
da3d9ad
fix: `handle` is called when store changes
ArmanNik Jul 8, 2022
f1e20ee
fix: add time to created date
ArmanNik Jul 8, 2022
c9fbb62
fix: phone verification
ArmanNik Jul 8, 2022
ee1fbb5
style: add margin to helpers
ArmanNik Jul 8, 2022
dff65b3
style: tooltip position
ArmanNik Jul 8, 2022
36d7ab8
fix: correct method name to team invites
ArmanNik Jul 11, 2022
4677401
fix: various fixes from review
ArmanNik Jul 11, 2022
3af97e8
fix: more fixes from review
ArmanNik Jul 11, 2022
b26c345
fix: more review fixes, replace `i` with `span`
ArmanNik Jul 11, 2022
3774945
layout: small fixes
ArmanNik Jul 11, 2022
44fe2ba
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 11, 2022
5529352
fix: pagination
TorstenDittmann Jul 11, 2022
0a64c71
feat: upgrade svelte kit
TorstenDittmann Jul 11, 2022
c638cea
fix: update to latest component, some layout
ArmanNik Jul 11, 2022
9302fd7
fix: e2e tests
TorstenDittmann Jul 11, 2022
c5097b1
Merge pull request #22 from appwrite/feat-upgrade-svelte-kit
TorstenDittmann Jul 11, 2022
95ed370
Merge pull request #21 from appwrite/fix-pagination
TorstenDittmann Jul 11, 2022
403ccd8
fix: charts chunked import
TorstenDittmann Jul 11, 2022
de05c3c
Merge pull request #23 from appwrite/fix-charts-chunked-import
TorstenDittmann Jul 11, 2022
129bee5
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 11, 2022
0fa7824
feat: add dropdown
ArmanNik Jul 11, 2022
b70c110
style: add warning icon to delete modals
ArmanNik Jul 11, 2022
cb77214
fix: dropdown is shown
ArmanNik Jul 11, 2022
c049c1f
chore: remove `loading` from stores
ArmanNik Jul 11, 2022
c9ad44e
fix: cover updates whren bucket name changes
ArmanNik Jul 11, 2022
613b563
refactor: data loaded on mount
ArmanNik Jul 11, 2022
10e0498
fix: add type
ArmanNik Jul 11, 2022
1e5b42e
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 11, 2022
dff732f
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 11, 2022
1bccd63
fix: typo
ArmanNik Jul 12, 2022
9c058a6
style: update class
ArmanNik Jul 12, 2022
6f8e7a6
fix: file list updated when file deleted
ArmanNik Jul 12, 2022
5c518b1
feat: update date function to short months
ArmanNik Jul 12, 2022
3182614
feat: initial loading screen
TorstenDittmann Jul 12, 2022
33fd053
Merge pull request #27 from appwrite/feat-initial-load
TorstenDittmann Jul 12, 2022
bc47475
feat: add avatar to uploaded files
ArmanNik Jul 12, 2022
b8aeead
fix: reverted sorting order
ArmanNik Jul 12, 2022
1942acd
feat: if file deleted remove from uploadbox
ArmanNik Jul 12, 2022
6ebb3b9
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 12, 2022
07f4fc2
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 12, 2022
2cfd783
fix: file uploads queue reset on drag, data reset on modal close
ArmanNik Jul 13, 2022
1c4b472
chore: remove console log
ArmanNik Jul 13, 2022
478aab7
feat: limit file list to 3
ArmanNik Jul 13, 2022
249fa5b
text: update text in cover pills
ArmanNik Jul 13, 2022
b5931df
fix: text & remove timeout to change text
ArmanNik Jul 13, 2022
ea41a27
feat: add empty card for odd number of buckets
ArmanNik Jul 13, 2022
21e3ae1
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 13, 2022
ecf2b94
feat: add max size
ArmanNik Jul 13, 2022
967c3cb
fix: removed 3 file limit
ArmanNik Jul 13, 2022
6105917
feat: pending files custom style
ArmanNik Jul 13, 2022
9c5a9af
style: fixed capitalization
ArmanNik Jul 14, 2022
ccc679d
fix: clear fields when modal closed
ArmanNik Jul 14, 2022
576c2f6
fix: slot not shown when empty
ArmanNik Jul 19, 2022
5ae3bd5
chore: bump css to 0.0.0-29
ArmanNik Jul 19, 2022
348eb39
fix: alert icon is now alligned
ArmanNik Jul 19, 2022
656537d
fix: add correct class
ArmanNik Jul 19, 2022
f9653d4
fix: spacing between label and pill
ArmanNik Jul 19, 2022
5b6d0a8
fix: autocomplete disabled by default
ArmanNik Jul 19, 2022
6dd55ce
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 19, 2022
4c6f80b
feat: improve layout stores
TorstenDittmann Jul 19, 2022
29d06dc
fix: ci and package.json
TorstenDittmann Jul 19, 2022
eee0792
fix: options displayion correctly
ArmanNik Jul 19, 2022
7852562
fix: node engine
TorstenDittmann Jul 19, 2022
d46188f
fix: charts import
TorstenDittmann Jul 19, 2022
9b74fb9
Merge pull request #28 from appwrite/feat-improve-layout-stores
TorstenDittmann Jul 19, 2022
391f1c9
fix: use cell instead of cell text where needed
ArmanNik Jul 19, 2022
3c17bd5
feat: set port to 3000
ArmanNik Jul 19, 2022
ed954f6
chore: bump css to 0.0.0-30
ArmanNik Jul 19, 2022
0bb005a
feat: add custom clear search button
ArmanNik Jul 19, 2022
181d3f9
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 19, 2022
859448e
fix: layout after update
ArmanNik Jul 19, 2022
f675bf1
fix: use correct component
ArmanNik Jul 19, 2022
9bdb061
fix: x hidden when value empty
ArmanNik Jul 20, 2022
88eef5f
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 20, 2022
69d5699
style: display 3 columns when more than 3 bucket
ArmanNik Jul 20, 2022
5f5ecca
style: fix spacing
ArmanNik Jul 20, 2022
57d04be
fix: no links inside clickable tables, used goto
ArmanNik Jul 20, 2022
77fc002
fix: z-index for dropLists
ArmanNik Jul 20, 2022
351f90c
fix: div into list
ArmanNik Jul 20, 2022
52f7623
fix: remove style, add class to position uploadBox
ArmanNik Jul 20, 2022
02f0907
chore: bump to 0.0.0-31
ArmanNik Jul 20, 2022
8867998
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 20, 2022
71e4311
chore: bump to 0.0.0-32
ArmanNik Jul 22, 2022
c3fac10
Merge pull request #25 from appwrite/storage
TorstenDittmann Jul 22, 2022
6aa3028
feat: add file preview
ArmanNik Jul 22, 2022
daf8eb8
fix: e2e tests
TorstenDittmann Jul 22, 2022
b3798cb
fix checks
TorstenDittmann Jul 22, 2022
f739b54
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 22, 2022
a93c7ab
feat: intro screen now hides sidebar
TorstenDittmann Jul 22, 2022
7129e69
chore: remove commented out old code
ArmanNik Jul 22, 2022
c76d21d
Merge branch 'users' of github.com:appwrite/appwrite-console-poc into…
ArmanNik Jul 22, 2022
f23ee5d
tests: fix tests
TorstenDittmann Jul 22, 2022
ff43d29
chore: update package lock
TorstenDittmann Jul 22, 2022
396ff8b
Merge branch 'users' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Jul 22, 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
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_APPWRITE_ENDPOINT=
VITE_APPWRITE_ENDPOINT=
VITE_GOOGLE_ANALYTICS=
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
node-version: 16
- name: Audit dependencies
run: npm audit --audit-level low
run: npm audit --audit-level high
- name: Install dependencies
run: npm ci
- name: Build Console
Expand Down
5,402 changes: 3,658 additions & 1,744 deletions package-lock.json

Large diffs are not rendered by default.

83 changes: 31 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,58 @@
"name": "@appwrite/console",
"version": "0.0.1",
"engines": {
"node": ">=14"
"node": ">=16"
},
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",
"package": "svelte-kit package",
"preview": "svelte-kit preview",
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
"test": "jest tests/unit --maxWorkers=1",
"test:watch": "npm run test -- --watch",
"test": "vitest run",
"test:ui": "vitest --ui",
"test:watch": "vitetest watch",
"e2e": "playwright test tests/e2e"
},
"dependencies": {
"@aw-labs/ui": "^0.0.0-4",
"@aw-labs/icons": "^0.0.0-4"
"@aw-labs/appwrite-console": "^1.0.0-0",
"@aw-labs/icons": "0.0.0-32",
"@aw-labs/ui": "0.0.0-32",
"echarts": "^5.3.3"
},
"devDependencies": {
"@playwright/test": "^1.22.1",
"@sveltejs/adapter-auto": "1.0.0-next.43",
"@sveltejs/kit": "1.0.0-next.335",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.44",
"@testing-library/dom": "^8.13.0",
"@playwright/test": "^1.24.0",
"@sveltejs/adapter-auto": "1.0.0-next.63",
"@sveltejs/kit": "1.0.0-next.390",
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"@testing-library/dom": "^8.16.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/svelte": "^3.1.1",
"@testing-library/user-event": "^14.2.0",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"eslint": "^8.15.0",
"@testing-library/svelte": "^3.1.3",
"@testing-library/user-event": "^14.3.0",
"@types/gtag.js": "^0.0.10",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@vitest/ui": "^0.18.1",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"pre-commit": "^1.2.2",
"prettier": "^2.6.2",
"prettier": "^2.7.1",
"prettier-plugin-svelte": "^2.7.0",
"sass": "^1.51.0",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"sass": "^1.53.0",
"svelte": "^3.49.0",
"svelte-check": "^2.8.0",
"svelte-jester": "^2.3.2",
"svelte-preprocess": "^4.10.6",
"ts-jest": "^28.0.2",
"svelte-preprocess": "^4.10.7",
"tslib": "^2.4.0",
"typescript": "^4.6.4",
"vite": "^2.9.9"
"typescript": "^4.7.4",
"vite": "^3.0.0",
"vitest": "^0.18.1"
},
"type": "module",
"jest": {
"testEnvironment": "jsdom",
"setupFilesAfterEnv": [
"@testing-library/jest-dom/extend-expect"
],
"transform": {
"^.+\\.svelte$": [
"svelte-jester",
{
"preprocess": true
}
],
"^.+\\.ts$": "ts-jest"
},
"moduleNameMapper": {
"^\\$lib(.*)$": "<rootDir>/src/lib/$1"
},
"moduleFileExtensions": [
"js",
"ts",
"svelte"
]
},
"pre-commit": [
"lint"
]
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 3000
port: 4173
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="description" content="" />
<link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%svelte.head%
%sveltekit.head%
</head>
<body>
<div id="svelte">%svelte.body%</div>
<div id="svelte">%sveltekit.body%</div>
</body>
</html>
4 changes: 4 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/// <reference types="@sveltejs/kit" />
/// <reference types="@types/gtag.js" />
interface Window {
GOOGLE_ANALYTICS: string | false;
}
37 changes: 37 additions & 0 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { Action } from 'svelte/action';

export type AnalyticsActionParam = {
name: string;
action: string;
parameters?: Record<string, string>;
event?: keyof HTMLElementEventMap;
};

export const event: Action<HTMLElement, AnalyticsActionParam> = (node, param) => {
if (!isTrackingAllowed()) {
return;
}

node.addEventListener(param.event ?? 'click', () =>
gtag('event', param.name, {
...param.parameters,
action: param.action
})
);
};

const isTrackingAllowed = () => {
if (!('gtag' in window)) {
return false;
}

if (window.navigator?.doNotTrack) {
if (navigator.doNotTrack === '1' || navigator.doNotTrack === 'yes') {
return false;
} else {
return true;
}
} else {
return true;
}
};
Loading