A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: update sheet component
Ammar Ahmedab47c89ef748
diff --git a/apps/mobile/app/components/attachments/index.tsx b/apps/mobile/app/components/attachments/index.tsxindex 412c5302f..bfeb57409 100644--- a/apps/mobile/app/components/attachments/index.tsx+++ b/apps/mobile/app/components/attachments/index.tsx@@ -73,13 +73,13 @@ export const AttachmentDialog = ({ note }: { note?: Note }) => {refresh();}, [note, refresh]);- const onChangeText = (text: string) => {+ const onChangeText = async (text: string) => {attachmentSearchValue.current = text;if (!attachmentSearchValue.current ||attachmentSearchValue.current === "") {- setAttachments(filterAttachments(currentFilter));+ setAttachments(await filterAttachments(currentFilter));refresh();}clearTimeout(searchTimer.current);@@ -94,8 +94,8 @@ export const AttachmentDialog = ({ note }: { note?: Note }) => {const renderItem = ({ index }: { item: boolean; index: number }) => (<AttachmentItem- setAttachments={() => {- setAttachments(filterAttachments(currentFilter));+ setAttachments={async () => {+ setAttachments(await filterAttachments(currentFilter));}}attachments={attachments}id={index}diff --git a/apps/mobile/app/components/sheets/add-to/index.tsx b/apps/mobile/app/components/sheets/add-to/index.tsxindex 59a1c8325..91eef0caf 100644--- a/apps/mobile/app/components/sheets/add-to/index.tsx+++ b/apps/mobile/app/components/sheets/add-to/index.tsx@@ -26,7 +26,8 @@ import {TouchableOpacity,View} from "react-native";-import { ActionSheetRef, FlashList } from "react-native-actions-sheet";+import { ActionSheetRef } from "react-native-actions-sheet";+import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";import { db } from "../../../common/database";import { presentSheet } from "../../../services/event-manager";import Navigation from "../../../services/navigation";diff --git a/apps/mobile/app/components/sheets/notebook-sheet/index.tsx b/apps/mobile/app/components/sheets/notebook-sheet/index.tsxindex ab9fcf0d6..87fec4a24 100644--- a/apps/mobile/app/components/sheets/notebook-sheet/index.tsx+++ b/apps/mobile/app/components/sheets/notebook-sheet/index.tsx@@ -26,10 +26,8 @@ import React, {useState} from "react";import { RefreshControl, View, useWindowDimensions } from "react-native";-import ActionSheet, {- ActionSheetRef,- FlashList-} from "react-native-actions-sheet";+import ActionSheet, { ActionSheetRef } from "react-native-actions-sheet";+import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";import Config from "react-native-config";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import create from "zustand";diff --git a/apps/mobile/app/navigation/navigation-stack.js b/apps/mobile/app/navigation/navigation-stack.jsindex 852d578c9..501da83f7 100644--- a/apps/mobile/app/navigation/navigation-stack.js+++ b/apps/mobile/app/navigation/navigation-stack.js@@ -21,9 +21,7 @@ import { useThemeColors } from "@notesnook/theme";import { NavigationContainer } from "@react-navigation/native";import { createNativeStackNavigator } from "@react-navigation/native-stack";import * as React from "react";-import { SafeAreaView } from "react-native";import Container from "../components/container";-import DelayLayout from "../components/delay-layout";import Intro from "../components/intro";import { NotebookSheet } from "../components/sheets/notebook-sheet";import useGlobalSafeAreaInsets from "../hooks/use-global-safe-area-insets";@@ -44,7 +42,6 @@ import Trash from "../screens/trash";import { eSendEvent } from "../services/event-manager";import SettingsService from "../services/settings";import useNavigationStore from "../stores/use-navigation-store";-import { useNoteStore } from "../stores/use-notes-store";import { useSelectionStore } from "../stores/use-selection-store";import { useSettingStore } from "../stores/use-setting-store";import { rootNavigatorRef } from "../utils/global-refs";diff --git a/apps/mobile/app/package.json b/apps/mobile/app/package.jsonindex 0d1f7cff0..16220d5c4 100644--- a/apps/mobile/app/package.json+++ b/apps/mobile/app/package.json@@ -16,7 +16,7 @@"html-to-text": "9.0.5","phone": "^3.1.14","qclone": "^1.2.0",- "react-native-actions-sheet": "0.9.0-alpha.24",+ "react-native-actions-sheet": "0.9.2","react-native-check-version": "https://github.com/flexible-agency/react-native-check-version","react-native-drax": "^0.10.2","react-native-image-zoom-viewer": "^3.0.1",diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.jsonindex eaef164fc..0f31b3425 100644--- a/apps/mobile/package-lock.json+++ b/apps/mobile/package-lock.json@@ -27634,7 +27634,7 @@"katex": "0.16.2","phone": "^3.1.14","qclone": "^1.2.0",- "react-native-actions-sheet": "0.9.0-alpha.24",+ "react-native-actions-sheet": "0.9.2","react-native-check-version": "https://github.com/flexible-agency/react-native-check-version","react-native-drax": "^0.10.2","react-native-image-zoom-viewer": "^3.0.1",@@ -43894,8 +43894,12 @@}},"node_modules/react-native-actions-sheet": {- "version": "0.9.0-alpha.24",- "license": "MIT",+ "version": "0.9.2",+ "resolved": "https://registry.npmjs.org/react-native-actions-sheet/-/react-native-actions-sheet-0.9.2.tgz",+ "integrity": "sha512-TBBDlMHmyFIZLovmrObf/b9z7t7iXP9wOwAtjAoNlCpXLHTfwmw/fvR07kPUltSR0NjWd2WrOkWbruFAiSVOyw==",+ "dependencies": {+ "react-native-safe-area-context": "^4.8.2"+ },"peerDependencies": {"react-native": "*","react-native-gesture-handler": "*"@@ -44350,8 +44354,9 @@"license": "MIT"},"node_modules/react-native-safe-area-context": {- "version": "4.6.3",- "license": "MIT",+ "version": "4.9.0",+ "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.9.0.tgz",+ "integrity": "sha512-/OJD9Pb8IURyvn+1tWTszWPJqsbZ4hyHBU9P0xhOmk7h5owSuqL0zkfagU0pg7Vh0G2NKQkaPpUKUMMCUMDh/w==","peerDependencies": {"react": "*","react-native": "*"@@ -79997,7 +80002,7 @@"katex": "0.16.2","phone": "^3.1.14","qclone": "^1.2.0",- "react-native-actions-sheet": "0.9.0-alpha.24",+ "react-native-actions-sheet": "0.9.2","react-native-check-version": "https://github.com/flexible-agency/react-native-check-version","react-native-drax": "^0.10.2","react-native-image-zoom-viewer": "^3.0.1",@@ -87951,8 +87956,12 @@}},"react-native-actions-sheet": {- "version": "0.9.0-alpha.24",- "requires": {}+ "version": "0.9.2",+ "resolved": "https://registry.npmjs.org/react-native-actions-sheet/-/react-native-actions-sheet-0.9.2.tgz",+ "integrity": "sha512-TBBDlMHmyFIZLovmrObf/b9z7t7iXP9wOwAtjAoNlCpXLHTfwmw/fvR07kPUltSR0NjWd2WrOkWbruFAiSVOyw==",+ "requires": {+ "react-native-safe-area-context": "^4.8.2"+ }},"react-native-actions-shortcuts": {"version": "1.0.1",@@ -88226,7 +88235,9 @@"requires": {}},"react-native-safe-area-context": {- "version": "4.6.3",+ "version": "4.9.0",+ "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.9.0.tgz",+ "integrity": "sha512-/OJD9Pb8IURyvn+1tWTszWPJqsbZ4hyHBU9P0xhOmk7h5owSuqL0zkfagU0pg7Vh0G2NKQkaPpUKUMMCUMDh/w==","requires": {}},"react-native-scoped-storage": {diff --git a/packages/editor/package-lock.json b/packages/editor/package-lock.jsonindex e91d8524e..d064dbf36 100644--- a/packages/editor/package-lock.json+++ b/packages/editor/package-lock.json@@ -973,22 +973,6 @@"@styled-system/css": "^5.1.5"}},- "node_modules/@theme-ui/color-modes": {- "version": "0.16.1",- "resolved": "https://registry.npmjs.org/@theme-ui/color-modes/-/color-modes-0.16.1.tgz",- "integrity": "sha512-G2YoNEMwZroRS0DcftUG+E/8WM5/Osf8TRrQLLK+L43HJ4BmaWuBmVeyoNOaPBDlAuqMBx2203VRgoPmUaMqOg==",- "dev": true,- "peer": true,- "dependencies": {- "@theme-ui/core": "^0.16.1",- "@theme-ui/css": "^0.16.1",- "deepmerge": "^4.2.2"- },- "peerDependencies": {- "@emotion/react": "^11.11.1",- "react": ">=18"- }- },"node_modules/@theme-ui/components": {"version": "0.16.1","resolved": "https://registry.npmjs.org/@theme-ui/components/-/components-0.16.1.tgz",@@ -1034,22 +1018,6 @@"@emotion/react": "^11.11.1"}},- "node_modules/@theme-ui/theme-provider": {- "version": "0.16.1",- "resolved": "https://registry.npmjs.org/@theme-ui/theme-provider/-/theme-provider-0.16.1.tgz",- "integrity": "sha512-+/3BJYLIOC2DwTS76cqNhigRQJJ+qOT845DYF7t3TaG2fXDfgh16/DGZSnVjGOGc9dYE3C/ZFAYcVDVwO94Guw==",- "dev": true,- "peer": true,- "dependencies": {- "@theme-ui/color-modes": "^0.16.1",- "@theme-ui/core": "^0.16.1",- "@theme-ui/css": "^0.16.1"- },- "peerDependencies": {- "@emotion/react": "^11.11.1",- "react": ">=18"- }- },"node_modules/@tiptap/core": {"version": "2.1.12","resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.1.12.tgz",@@ -2540,7 +2508,8 @@"node_modules/js-tokens": {"version": "4.0.0","resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "dev": true},"node_modules/json-parse-even-better-errors": {"version": "2.3.1",@@ -2604,6 +2573,7 @@"version": "1.4.0","resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz","integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "dev": true,"dependencies": {"js-tokens": "^3.0.0 || ^4.0.0"},@@ -3179,6 +3149,7 @@"version": "18.2.0","resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz","integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",+ "dev": true,"dependencies": {"loose-envify": "^1.1.0"},@@ -3199,6 +3170,7 @@"version": "18.2.0","resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz","integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",+ "dev": true,"dependencies": {"loose-envify": "^1.1.0","scheduler": "^0.23.0"@@ -3330,6 +3302,7 @@"version": "0.23.0","resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz","integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",+ "dev": true,"dependencies": {"loose-envify": "^1.1.0"}