mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 14:09:34 +01:00
mobile: push changes
This commit is contained in:
committed by
Abdullah Atta
parent
189a9da5b5
commit
44df437c4e
@@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of the Notesnook project (https://notesnook.com/)
|
|
||||||
|
|
||||||
Copyright (C) 2023 Streetwriters (Private) Limited
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React, { PropsWithChildren } from "react";
|
|
||||||
import { View } from "react-native";
|
|
||||||
import { useSelectionStore } from "../../stores/use-selection-store";
|
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
|
||||||
|
|
||||||
export const ContainerHeader = (props: PropsWithChildren) => {
|
|
||||||
const { colors } = useThemeColors();
|
|
||||||
const selectionMode = useSelectionStore((state) => state.selectionMode);
|
|
||||||
|
|
||||||
return !selectionMode ? (
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
backgroundColor: colors.primary.background,
|
|
||||||
width: "100%",
|
|
||||||
overflow: "hidden"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{props.children}
|
|
||||||
</View>
|
|
||||||
) : null;
|
|
||||||
};
|
|
||||||
@@ -21,14 +21,9 @@ import React, { PropsWithChildren } from "react";
|
|||||||
import { KeyboardAvoidingView, Platform } from "react-native";
|
import { KeyboardAvoidingView, Platform } from "react-native";
|
||||||
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
||||||
import useIsFloatingKeyboard from "../../hooks/use-is-floating-keyboard";
|
import useIsFloatingKeyboard from "../../hooks/use-is-floating-keyboard";
|
||||||
import { useSettingStore } from "../../stores/use-setting-store";
|
|
||||||
import SelectionHeader from "../selection-header";
|
|
||||||
|
|
||||||
export const Container = ({ children }: PropsWithChildren) => {
|
export const Container = ({ children }: PropsWithChildren) => {
|
||||||
const floating = useIsFloatingKeyboard();
|
const floating = useIsFloatingKeyboard();
|
||||||
const introCompleted = useSettingStore(
|
|
||||||
(state) => state.settings.introCompleted
|
|
||||||
);
|
|
||||||
const insets = useGlobalSafeAreaInsets();
|
const insets = useGlobalSafeAreaInsets();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -42,12 +37,6 @@ export const Container = ({ children }: PropsWithChildren) => {
|
|||||||
paddingBottom: Platform.OS === "android" ? 0 : insets.bottom
|
paddingBottom: Platform.OS === "android" ? 0 : insets.bottom
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!introCompleted ? null : (
|
|
||||||
<>
|
|
||||||
<SelectionHeader />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -212,7 +212,6 @@ export class VaultDialog extends Component {
|
|||||||
|
|
||||||
this.password = null;
|
this.password = null;
|
||||||
this.confirmPassword = null;
|
this.confirmPassword = null;
|
||||||
SearchService.updateAndSearch();
|
|
||||||
this.setState({
|
this.setState({
|
||||||
visible: false,
|
visible: false,
|
||||||
note: {},
|
note: {},
|
||||||
@@ -459,7 +458,7 @@ export class VaultDialog extends Component {
|
|||||||
async _deleteNote() {
|
async _deleteNote() {
|
||||||
try {
|
try {
|
||||||
await db.vault.remove(this.state.note.id, this.password);
|
await db.vault.remove(this.state.note.id, this.password);
|
||||||
await deleteItems(this.state.note);
|
await deleteItems([this.state.note.id], "note");
|
||||||
this.close();
|
this.close();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this._takeErrorAction(e);
|
this._takeErrorAction(e);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { useThemeColors } from "@notesnook/theme";
|
||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import { Platform, StyleSheet, View } from "react-native";
|
import { Platform, StyleSheet, View } from "react-native";
|
||||||
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
||||||
@@ -24,15 +25,14 @@ import {
|
|||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent
|
eUnSubscribeEvent
|
||||||
} from "../../services/event-manager";
|
} from "../../services/event-manager";
|
||||||
|
import useNavigationStore, {
|
||||||
|
RouteName
|
||||||
|
} from "../../stores/use-navigation-store";
|
||||||
import { useSelectionStore } from "../../stores/use-selection-store";
|
import { useSelectionStore } from "../../stores/use-selection-store";
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
|
||||||
import { eScrollEvent } from "../../utils/events";
|
import { eScrollEvent } from "../../utils/events";
|
||||||
import { LeftMenus } from "./left-menus";
|
import { LeftMenus } from "./left-menus";
|
||||||
import { RightMenus } from "./right-menus";
|
import { RightMenus } from "./right-menus";
|
||||||
import { Title } from "./title";
|
import { Title } from "./title";
|
||||||
import useNavigationStore, {
|
|
||||||
RouteName
|
|
||||||
} from "../../stores/use-navigation-store";
|
|
||||||
|
|
||||||
type HeaderRightButton = {
|
type HeaderRightButton = {
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ export const LeftMenus = ({
|
|||||||
height: 40,
|
height: 40,
|
||||||
width: 40,
|
width: 40,
|
||||||
borderRadius: 100,
|
borderRadius: 100,
|
||||||
marginLeft: -5,
|
|
||||||
marginRight: DDS.isLargeTablet() ? 10 : 7
|
marginRight: DDS.isLargeTablet() ? 10 : 7
|
||||||
}}
|
}}
|
||||||
left={40}
|
left={40}
|
||||||
@@ -72,9 +71,6 @@ export const LeftMenus = ({
|
|||||||
}}
|
}}
|
||||||
name={canGoBack ? "arrow-left" : "menu"}
|
name={canGoBack ? "arrow-left" : "menu"}
|
||||||
color={colors.primary.paragraph}
|
color={colors.primary.paragraph}
|
||||||
iconStyle={{
|
|
||||||
marginLeft: canGoBack ? -5 : 0
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ const NoteItem = ({
|
|||||||
{notebooks?.items
|
{notebooks?.items
|
||||||
?.filter(
|
?.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
item.id !== useNavigationStore.getState().currentRoute?.id
|
item.id !== useNavigationStore.getState().focusedRouteId
|
||||||
)
|
)
|
||||||
.map((item) => (
|
.map((item) => (
|
||||||
<Button
|
<Button
|
||||||
@@ -133,7 +133,7 @@ const NoteItem = ({
|
|||||||
marginBottom: 5
|
marginBottom: 5
|
||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
NotebookScreen.navigate(item);
|
NotebookScreen.navigate(item, true);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export const openNote = async (
|
|||||||
const { selectedItemsList, selectionMode, clearSelection, setSelectedItem } =
|
const { selectedItemsList, selectionMode, clearSelection, setSelectedItem } =
|
||||||
useSelectionStore.getState();
|
useSelectionStore.getState();
|
||||||
|
|
||||||
if (selectedItemsList.length > 0 && selectionMode) {
|
if (selectedItemsList.length > 0 && selectionMode === item.type) {
|
||||||
setSelectedItem(note);
|
setSelectedItem(note.id);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
clearSelection();
|
clearSelection();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { BaseTrashItem, Notebook } from "@notesnook/core";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { NotebookItem } from ".";
|
import { NotebookItem } from ".";
|
||||||
import { db } from "../../../common/database";
|
import { db } from "../../../common/database";
|
||||||
|
import NotebookScreen from "../../../screens/notebook";
|
||||||
import { ToastManager } from "../../../services/event-manager";
|
import { ToastManager } from "../../../services/event-manager";
|
||||||
import Navigation from "../../../services/navigation";
|
import Navigation from "../../../services/navigation";
|
||||||
import { useSelectionStore } from "../../../stores/use-selection-store";
|
import { useSelectionStore } from "../../../stores/use-selection-store";
|
||||||
@@ -28,30 +29,12 @@ import { useTrashStore } from "../../../stores/use-trash-store";
|
|||||||
import { presentDialog } from "../../dialog/functions";
|
import { presentDialog } from "../../dialog/functions";
|
||||||
import SelectionWrapper from "../selection-wrapper";
|
import SelectionWrapper from "../selection-wrapper";
|
||||||
|
|
||||||
const navigateToNotebook = (item: Notebook, canGoBack?: boolean) => {
|
export const openNotebook = (item: Notebook | BaseTrashItem<Notebook>) => {
|
||||||
if (!item) return;
|
|
||||||
|
|
||||||
Navigation.navigate(
|
|
||||||
{
|
|
||||||
title: item.title,
|
|
||||||
name: "Notebook",
|
|
||||||
id: item.id,
|
|
||||||
type: "notebook"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: item.title,
|
|
||||||
item: item,
|
|
||||||
canGoBack
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openNotebookTopic = (item: Notebook | BaseTrashItem<Notebook>) => {
|
|
||||||
const isTrash = item.type === "trash";
|
const isTrash = item.type === "trash";
|
||||||
const { selectedItemsList, setSelectedItem, selectionMode, clearSelection } =
|
const { selectedItemsList, setSelectedItem, selectionMode, clearSelection } =
|
||||||
useSelectionStore.getState();
|
useSelectionStore.getState();
|
||||||
if (selectedItemsList.length > 0 && selectionMode) {
|
if (selectedItemsList.length > 0 && selectionMode === item.type) {
|
||||||
setSelectedItem(item);
|
setSelectedItem(item.id);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
clearSelection();
|
clearSelection();
|
||||||
@@ -59,14 +42,14 @@ export const openNotebookTopic = (item: Notebook | BaseTrashItem<Notebook>) => {
|
|||||||
|
|
||||||
if (isTrash) {
|
if (isTrash) {
|
||||||
presentDialog({
|
presentDialog({
|
||||||
title: `Restore ${item.itemType}`,
|
title: `Restore notebook`,
|
||||||
paragraph: `Restore or delete ${item.itemType} forever`,
|
paragraph: `Restore or delete notebook forever`,
|
||||||
positiveText: "Restore",
|
positiveText: "Restore",
|
||||||
negativeText: "Delete",
|
negativeText: "Delete",
|
||||||
positivePress: async () => {
|
positivePress: async () => {
|
||||||
await db.trash.restore(item.id);
|
await db.trash.restore(item.id);
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
useSelectionStore.getState().setSelectionMode(false);
|
useSelectionStore.getState().setSelectionMode(undefined);
|
||||||
ToastManager.show({
|
ToastManager.show({
|
||||||
heading: "Restore successful",
|
heading: "Restore successful",
|
||||||
type: "success"
|
type: "success"
|
||||||
@@ -75,7 +58,7 @@ export const openNotebookTopic = (item: Notebook | BaseTrashItem<Notebook>) => {
|
|||||||
onClose: async () => {
|
onClose: async () => {
|
||||||
await db.trash.delete(item.id);
|
await db.trash.delete(item.id);
|
||||||
useTrashStore.getState().setTrash();
|
useTrashStore.getState().setTrash();
|
||||||
useSelectionStore.getState().setSelectionMode(false);
|
useSelectionStore.getState().setSelectionMode(undefined);
|
||||||
ToastManager.show({
|
ToastManager.show({
|
||||||
heading: "Permanently deleted items",
|
heading: "Permanently deleted items",
|
||||||
type: "success",
|
type: "success",
|
||||||
@@ -85,7 +68,7 @@ export const openNotebookTopic = (item: Notebook | BaseTrashItem<Notebook>) => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
navigateToNotebook(item, true);
|
NotebookScreen.navigate(item, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
type NotebookWrapperProps = {
|
type NotebookWrapperProps = {
|
||||||
@@ -105,7 +88,7 @@ export const NotebookWrapper = React.memo(
|
|||||||
const isTrash = item.type === "trash";
|
const isTrash = item.type === "trash";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectionWrapper onPress={() => openNotebookTopic(item)} item={item}>
|
<SelectionWrapper onPress={() => openNotebook(item)} item={item}>
|
||||||
<NotebookItem
|
<NotebookItem
|
||||||
item={item}
|
item={item}
|
||||||
date={date}
|
date={date}
|
||||||
|
|||||||
@@ -16,20 +16,21 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
import { Reminder } from "@notesnook/core";
|
||||||
|
import { useThemeColors } from "@notesnook/theme";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
|
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
import { notesnook } from "../../../../e2e/test.ids";
|
import { notesnook } from "../../../../e2e/test.ids";
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
import { useSelectionStore } from "../../../stores/use-selection-store";
|
||||||
import { SIZE } from "../../../utils/size";
|
import { SIZE } from "../../../utils/size";
|
||||||
import { Properties } from "../../properties";
|
import { Properties } from "../../properties";
|
||||||
|
import ReminderSheet from "../../sheets/reminder";
|
||||||
import { IconButton } from "../../ui/icon-button";
|
import { IconButton } from "../../ui/icon-button";
|
||||||
|
import { ReminderTime } from "../../ui/reminder-time";
|
||||||
import Heading from "../../ui/typography/heading";
|
import Heading from "../../ui/typography/heading";
|
||||||
import Paragraph from "../../ui/typography/paragraph";
|
import Paragraph from "../../ui/typography/paragraph";
|
||||||
import SelectionWrapper from "../selection-wrapper";
|
import SelectionWrapper from "../selection-wrapper";
|
||||||
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
|
||||||
import ReminderSheet from "../../sheets/reminder";
|
|
||||||
import { ReminderTime } from "../../ui/reminder-time";
|
|
||||||
import { Reminder } from "@notesnook/core";
|
|
||||||
|
|
||||||
const ReminderItem = React.memo(
|
const ReminderItem = React.memo(
|
||||||
({
|
({
|
||||||
@@ -43,17 +44,23 @@ const ReminderItem = React.memo(
|
|||||||
}) => {
|
}) => {
|
||||||
const { colors } = useThemeColors();
|
const { colors } = useThemeColors();
|
||||||
const openReminder = () => {
|
const openReminder = () => {
|
||||||
|
const {
|
||||||
|
selectedItemsList,
|
||||||
|
setSelectedItem,
|
||||||
|
selectionMode,
|
||||||
|
clearSelection
|
||||||
|
} = useSelectionStore.getState();
|
||||||
|
if (selectedItemsList.length > 0 && selectionMode === item.type) {
|
||||||
|
setSelectedItem(item.id);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
clearSelection();
|
||||||
|
}
|
||||||
|
|
||||||
ReminderSheet.present(item, undefined, isSheet);
|
ReminderSheet.present(item, undefined, isSheet);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<SelectionWrapper
|
<SelectionWrapper onPress={openReminder} item={item} isSheet={isSheet}>
|
||||||
//@ts-ignore
|
|
||||||
index={index}
|
|
||||||
height={100}
|
|
||||||
onPress={openReminder}
|
|
||||||
item={item}
|
|
||||||
isSheet={isSheet}
|
|
||||||
>
|
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flexShrink: 1,
|
flexShrink: 1,
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ const SelectionWrapper = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onLongPress = () => {
|
const onLongPress = () => {
|
||||||
if (!useSelectionStore.getState().selectionMode) {
|
if (useSelectionStore.getState().selectionMode !== item.type) {
|
||||||
useSelectionStore.getState().setSelectionMode(true);
|
useSelectionStore.getState().setSelectionMode(item.type);
|
||||||
}
|
}
|
||||||
useSelectionStore.getState().setSelectedItem(item);
|
useSelectionStore.getState().setSelectedItem(item.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -23,12 +23,13 @@ import React from "react";
|
|||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import { notesnook } from "../../../../e2e/test.ids";
|
import { notesnook } from "../../../../e2e/test.ids";
|
||||||
import { TaggedNotes } from "../../../screens/notes/tagged";
|
import { TaggedNotes } from "../../../screens/notes/tagged";
|
||||||
|
import { useSelectionStore } from "../../../stores/use-selection-store";
|
||||||
import { SIZE } from "../../../utils/size";
|
import { SIZE } from "../../../utils/size";
|
||||||
import { Properties } from "../../properties";
|
import { Properties } from "../../properties";
|
||||||
import { IconButton } from "../../ui/icon-button";
|
import { IconButton } from "../../ui/icon-button";
|
||||||
import { PressableButton } from "../../ui/pressable";
|
|
||||||
import Heading from "../../ui/typography/heading";
|
import Heading from "../../ui/typography/heading";
|
||||||
import Paragraph from "../../ui/typography/paragraph";
|
import Paragraph from "../../ui/typography/paragraph";
|
||||||
|
import SelectionWrapper from "../selection-wrapper";
|
||||||
|
|
||||||
const TagItem = React.memo(
|
const TagItem = React.memo(
|
||||||
({
|
({
|
||||||
@@ -40,30 +41,34 @@ const TagItem = React.memo(
|
|||||||
index: number;
|
index: number;
|
||||||
totalNotes: number;
|
totalNotes: number;
|
||||||
}) => {
|
}) => {
|
||||||
const { colors, isDark } = useThemeColors();
|
const { colors } = useThemeColors();
|
||||||
const onPress = () => {
|
const onPress = () => {
|
||||||
|
const {
|
||||||
|
selectedItemsList,
|
||||||
|
setSelectedItem,
|
||||||
|
selectionMode,
|
||||||
|
clearSelection
|
||||||
|
} = useSelectionStore.getState();
|
||||||
|
if (selectedItemsList.length > 0 && selectionMode === item.type) {
|
||||||
|
setSelectedItem(item.id);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
clearSelection();
|
||||||
|
}
|
||||||
|
|
||||||
TaggedNotes.navigate(item, true);
|
TaggedNotes.navigate(item, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PressableButton
|
<SelectionWrapper
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
customSelectedColor={colors.secondary.background}
|
item={item}
|
||||||
testID={notesnook.ids.tag.get(index)}
|
testID={notesnook.ids.tag.get(index)}
|
||||||
customAlpha={!isDark ? -0.02 : 0.02}
|
|
||||||
customOpacity={1}
|
|
||||||
customStyle={{
|
|
||||||
paddingHorizontal: 12,
|
|
||||||
flexDirection: "row",
|
|
||||||
paddingVertical: 12,
|
|
||||||
alignItems: "center",
|
|
||||||
width: "100%",
|
|
||||||
justifyContent: "space-between"
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
maxWidth: "92%"
|
flexGrow: 1,
|
||||||
|
flexShrink: 1
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Heading size={SIZE.md}>
|
<Heading size={SIZE.md}>
|
||||||
@@ -108,7 +113,7 @@ const TagItem = React.memo(
|
|||||||
alignItems: "center"
|
alignItems: "center"
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</PressableButton>
|
</SelectionWrapper>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
(prev, next) => {
|
(prev, next) => {
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ export const Empty = React.memo(function Empty({
|
|||||||
const introCompleted = useSettingStore(
|
const introCompleted = useSettingStore(
|
||||||
(state) => state.settings.introCompleted
|
(state) => state.settings.introCompleted
|
||||||
);
|
);
|
||||||
|
|
||||||
const tip = useTip(
|
const tip = useTip(
|
||||||
screen === "Notes" && introCompleted
|
screen === "Notes" && introCompleted
|
||||||
? "first-note"
|
? "first-note"
|
||||||
@@ -139,37 +138,3 @@ export const Empty = React.memo(function Empty({
|
|||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Make a tips manager.
|
|
||||||
* The tip manager stores many tips. Each tip has following values
|
|
||||||
* 1. Text
|
|
||||||
* 2. contexts: An array of context strings. // Places where the tip can be shown
|
|
||||||
* 3. Button if any.
|
|
||||||
* 4. Image/Gif asset.
|
|
||||||
*
|
|
||||||
* Tip manager adds the following methods -> get(context). Returns a random tip for the following context.
|
|
||||||
*
|
|
||||||
* Tips can be shown in a sheet or in a list. For sheets, GeneralSheet can be used to
|
|
||||||
* render tips.
|
|
||||||
*
|
|
||||||
* Where can the tips be shown and how?
|
|
||||||
* 1. When transitioning, show tips in a sheet. Make sure its useful
|
|
||||||
* 2. Replace placeholders with tips.
|
|
||||||
* 3. Show tips in editor placeholder.
|
|
||||||
* 4. Show tips between list items?
|
|
||||||
*
|
|
||||||
* Tooltips.
|
|
||||||
* Small tooltips can be shown in initial render first time.
|
|
||||||
* Especially for items that are not shown on blank page. Should be
|
|
||||||
* in places where it makes sense and does not interrupt the user.
|
|
||||||
*
|
|
||||||
* Can also be shown when first time entering a screen that
|
|
||||||
* has something that the user might not know of. Like sorting and side menu.
|
|
||||||
*
|
|
||||||
* Todo:
|
|
||||||
* 1. Make a tip manager.
|
|
||||||
* 2. Make a list of tips.
|
|
||||||
* 3. Add images for those tips.
|
|
||||||
* 4. Show tips
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ export default function List(props: ListProps) {
|
|||||||
? "home"
|
? "home"
|
||||||
: props.renderedInRoute === "Favorites"
|
: props.renderedInRoute === "Favorites"
|
||||||
? "favorites"
|
? "favorites"
|
||||||
|
: props.renderedInRoute === "Trash"
|
||||||
|
? "trash"
|
||||||
: `${props.dataType}s`;
|
: `${props.dataType}s`;
|
||||||
|
|
||||||
const groupOptions = useGroupOptions(groupType);
|
const groupOptions = useGroupOptions(groupType);
|
||||||
|
|||||||
@@ -130,9 +130,6 @@ export const Properties = ({ close = () => {}, item, buttons = [] }) => {
|
|||||||
buttons={buttons}
|
buttons={buttons}
|
||||||
close={() => {
|
close={() => {
|
||||||
close();
|
close();
|
||||||
setTimeout(() => {
|
|
||||||
SearchService.updateAndSearch();
|
|
||||||
}, 1000);
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,360 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of the Notesnook project (https://notesnook.com/)
|
|
||||||
|
|
||||||
Copyright (C) 2023 Streetwriters (Private) Limited
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React, { useCallback, useEffect } from "react";
|
|
||||||
import { BackHandler, Platform, View } from "react-native";
|
|
||||||
import { db } from "../../common/database";
|
|
||||||
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
|
||||||
import { ToastManager } from "../../services/event-manager";
|
|
||||||
import Navigation from "../../services/navigation";
|
|
||||||
import SearchService from "../../services/search";
|
|
||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
|
||||||
import { useSelectionStore } from "../../stores/use-selection-store";
|
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
|
||||||
import { deleteItems } from "../../utils/functions";
|
|
||||||
import { tabBarRef } from "../../utils/global-refs";
|
|
||||||
import { SIZE } from "../../utils/size";
|
|
||||||
import { sleep } from "../../utils/time";
|
|
||||||
import { presentDialog } from "../dialog/functions";
|
|
||||||
import MoveNoteSheet from "../sheets/add-to";
|
|
||||||
import ExportNotesSheet from "../sheets/export-notes";
|
|
||||||
import { IconButton } from "../ui/icon-button";
|
|
||||||
import Heading from "../ui/typography/heading";
|
|
||||||
import ManageTagsSheet from "../sheets/manage-tags";
|
|
||||||
|
|
||||||
export const SelectionHeader = React.memo(() => {
|
|
||||||
const { colors } = useThemeColors();
|
|
||||||
const selectionMode = useSelectionStore((state) => state.selectionMode);
|
|
||||||
const selectedItemsList = useSelectionStore(
|
|
||||||
(state) => state.selectedItemsList
|
|
||||||
);
|
|
||||||
const setSelectionMode = useSelectionStore((state) => state.setSelectionMode);
|
|
||||||
const clearSelection = useSelectionStore((state) => state.clearSelection);
|
|
||||||
const currentRoute = useNavigationStore((state) => state.currentRoute);
|
|
||||||
const insets = useGlobalSafeAreaInsets();
|
|
||||||
SearchService.prepareSearch?.();
|
|
||||||
const allItems = SearchService.getSearchInformation()?.get() || [];
|
|
||||||
const allSelected = allItems.length === selectedItemsList.length;
|
|
||||||
useEffect(() => {
|
|
||||||
if (selectionMode) {
|
|
||||||
tabBarRef.current?.lock();
|
|
||||||
} else {
|
|
||||||
tabBarRef.current?.unlock();
|
|
||||||
}
|
|
||||||
}, [selectionMode]);
|
|
||||||
|
|
||||||
const addToFavorite = async () => {
|
|
||||||
if (selectedItemsList.length > 0) {
|
|
||||||
selectedItemsList.forEach((item) => {
|
|
||||||
db.notes.note(item.id).favorite();
|
|
||||||
});
|
|
||||||
Navigation.queueRoutesForUpdate();
|
|
||||||
clearSelection();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const restoreItem = async () => {
|
|
||||||
if (selectedItemsList.length > 0) {
|
|
||||||
let noteIds = [];
|
|
||||||
selectedItemsList.forEach((item) => {
|
|
||||||
noteIds.push(item.id);
|
|
||||||
});
|
|
||||||
await db.trash.restore(...noteIds);
|
|
||||||
Navigation.queueRoutesForUpdate();
|
|
||||||
|
|
||||||
clearSelection();
|
|
||||||
ToastManager.show({
|
|
||||||
heading: "Restore successful",
|
|
||||||
type: "success"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const deleteItem = async () => {
|
|
||||||
presentDialog({
|
|
||||||
title: `Delete ${selectedItemsList.length > 1 ? "items" : "item"}`,
|
|
||||||
paragraph: `Are you sure you want to delete ${
|
|
||||||
selectedItemsList.length > 1
|
|
||||||
? "these items permanently?"
|
|
||||||
: "this item permanently?"
|
|
||||||
}`,
|
|
||||||
positiveText: "Delete",
|
|
||||||
negativeText: "Cancel",
|
|
||||||
positivePress: async () => {
|
|
||||||
if (selectedItemsList.length > 0) {
|
|
||||||
let noteIds = [];
|
|
||||||
selectedItemsList.forEach((item) => {
|
|
||||||
noteIds.push(item.id);
|
|
||||||
});
|
|
||||||
await db.trash.delete(...noteIds);
|
|
||||||
Navigation.queueRoutesForUpdate();
|
|
||||||
clearSelection();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
positiveType: "errorShade"
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const onBackPress = useCallback(() => {
|
|
||||||
clearSelection();
|
|
||||||
return true;
|
|
||||||
}, [clearSelection]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (selectionMode) {
|
|
||||||
BackHandler.addEventListener("hardwareBackPress", onBackPress);
|
|
||||||
} else {
|
|
||||||
BackHandler.removeEventListener("hardwareBackPress", onBackPress);
|
|
||||||
}
|
|
||||||
}, [onBackPress, selectionMode]);
|
|
||||||
|
|
||||||
return !selectionMode ? null : (
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
width: "100%",
|
|
||||||
height: Platform.OS === "android" ? 50 + insets.top : 50,
|
|
||||||
paddingTop: Platform.OS === "android" ? insets.top : null,
|
|
||||||
backgroundColor: colors.primary.background,
|
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: "center",
|
|
||||||
flexDirection: "row",
|
|
||||||
zIndex: 999,
|
|
||||||
paddingHorizontal: 12,
|
|
||||||
marginVertical: 10
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "flex-start",
|
|
||||||
alignItems: "center",
|
|
||||||
borderRadius: 100
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconButton
|
|
||||||
customStyle={{
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
height: 40,
|
|
||||||
width: 40,
|
|
||||||
borderRadius: 100,
|
|
||||||
marginRight: 10
|
|
||||||
}}
|
|
||||||
type="grayBg"
|
|
||||||
onPress={() => {
|
|
||||||
setSelectionMode(!selectionMode);
|
|
||||||
}}
|
|
||||||
size={SIZE.xl}
|
|
||||||
color={colors.primary.icon}
|
|
||||||
name="close"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
backgroundColor: colors.secondary.background,
|
|
||||||
height: 40,
|
|
||||||
borderRadius: 100,
|
|
||||||
paddingHorizontal: 16,
|
|
||||||
justifyContent: "center",
|
|
||||||
flexDirection: "row",
|
|
||||||
alignItems: "center"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Heading size={SIZE.md} color={colors.primary.accent}>
|
|
||||||
{selectedItemsList.length}
|
|
||||||
</Heading>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "flex-start",
|
|
||||||
alignItems: "center"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconButton
|
|
||||||
onPress={async () => {
|
|
||||||
useSelectionStore
|
|
||||||
.getState()
|
|
||||||
.setAll(allSelected ? [] : [...allItems]);
|
|
||||||
}}
|
|
||||||
tooltipText="Select all"
|
|
||||||
tooltipPosition={4}
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
name="select-all"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{currentRoute === "Trash" ||
|
|
||||||
currentRoute === "Notebooks" ||
|
|
||||||
currentRoute === "Reminders" ? null : (
|
|
||||||
<>
|
|
||||||
<IconButton
|
|
||||||
onPress={async () => {
|
|
||||||
await sleep(100);
|
|
||||||
ManageTagsSheet.present(selectedItemsList);
|
|
||||||
}}
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
color={colors.primary.icon}
|
|
||||||
tooltipText="Manage tags"
|
|
||||||
tooltipPosition={4}
|
|
||||||
name="pound"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<IconButton
|
|
||||||
onPress={async () => {
|
|
||||||
ExportNotesSheet.present(selectedItemsList);
|
|
||||||
}}
|
|
||||||
tooltipText="Export"
|
|
||||||
tooltipPosition={4}
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
name="export"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<IconButton
|
|
||||||
onPress={async () => {
|
|
||||||
//setSelectionMode(false);
|
|
||||||
await sleep(100);
|
|
||||||
MoveNoteSheet.present();
|
|
||||||
}}
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
tooltipText="Add to notebooks"
|
|
||||||
tooltipPosition={4}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
name="plus"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{currentRoute === "Notebook" ? (
|
|
||||||
<IconButton
|
|
||||||
onPress={async () => {
|
|
||||||
if (selectedItemsList.length > 0) {
|
|
||||||
const { focusedRouteId } = useNavigationStore.getState();
|
|
||||||
if (currentRoute === "Notebook") {
|
|
||||||
for (const item of selectedItemsList) {
|
|
||||||
await db.relations.unlink(
|
|
||||||
{ type: "notebook", id: focusedRouteId },
|
|
||||||
item
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
await db.notes.removeFromNotebook(
|
|
||||||
{
|
|
||||||
id: currentScreen.notebookId,
|
|
||||||
topic: currentScreen.id
|
|
||||||
},
|
|
||||||
...selectedItemsList.map((item) => item.id)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Navigation.queueRoutesForUpdate();
|
|
||||||
clearSelection();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
tooltipText={`Remove from Notebook`}
|
|
||||||
tooltipPosition={4}
|
|
||||||
testID="select-minus"
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
name="minus"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
{currentRoute === "Favorites" ? (
|
|
||||||
<IconButton
|
|
||||||
onPress={addToFavorite}
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
tooltipText="Remove from favorites"
|
|
||||||
tooltipPosition={4}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
name="star-off"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
{currentRoute === "Trash" ? null : (
|
|
||||||
<IconButton
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
onPress={() => {
|
|
||||||
deleteItems();
|
|
||||||
}}
|
|
||||||
tooltipText="Move to trash"
|
|
||||||
tooltipPosition={1}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
name="delete"
|
|
||||||
size={SIZE.xl}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{currentRoute === "Trash" ? (
|
|
||||||
<>
|
|
||||||
<IconButton
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
onPress={restoreItem}
|
|
||||||
name="delete-restore"
|
|
||||||
tooltipText="Restore"
|
|
||||||
tooltipPosition={4}
|
|
||||||
size={SIZE.xl - 3}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<IconButton
|
|
||||||
customStyle={{
|
|
||||||
marginLeft: 10
|
|
||||||
}}
|
|
||||||
color={colors.primary.paragraph}
|
|
||||||
onPress={deleteItem}
|
|
||||||
tooltipText="Delete"
|
|
||||||
tooltipPosition={4}
|
|
||||||
name="delete"
|
|
||||||
size={SIZE.xl - 3}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
SelectionHeader.displayName = "SelectionHeader";
|
|
||||||
|
|
||||||
export default SelectionHeader;
|
|
||||||
368
apps/mobile/app/components/selection-header/index.tsx
Normal file
368
apps/mobile/app/components/selection-header/index.tsx
Normal file
@@ -0,0 +1,368 @@
|
|||||||
|
/*
|
||||||
|
This file is part of the Notesnook project (https://notesnook.com/)
|
||||||
|
|
||||||
|
Copyright (C) 2023 Streetwriters (Private) Limited
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Item, ItemType, VirtualizedGrouping } from "@notesnook/core";
|
||||||
|
import { useThemeColors } from "@notesnook/theme";
|
||||||
|
import React, { useCallback, useEffect } from "react";
|
||||||
|
import {
|
||||||
|
BackHandler,
|
||||||
|
NativeEventSubscription,
|
||||||
|
Platform,
|
||||||
|
View
|
||||||
|
} from "react-native";
|
||||||
|
import { db } from "../../common/database";
|
||||||
|
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
||||||
|
import { ToastManager } from "../../services/event-manager";
|
||||||
|
import Navigation from "../../services/navigation";
|
||||||
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
|
import { useSelectionStore } from "../../stores/use-selection-store";
|
||||||
|
import { deleteItems } from "../../utils/functions";
|
||||||
|
import { tabBarRef } from "../../utils/global-refs";
|
||||||
|
import { updateNotebook } from "../../utils/notebooks";
|
||||||
|
import { SIZE } from "../../utils/size";
|
||||||
|
import { sleep } from "../../utils/time";
|
||||||
|
import { presentDialog } from "../dialog/functions";
|
||||||
|
import MoveNoteSheet from "../sheets/add-to";
|
||||||
|
import ExportNotesSheet from "../sheets/export-notes";
|
||||||
|
import ManageTagsSheet from "../sheets/manage-tags";
|
||||||
|
import { IconButton } from "../ui/icon-button";
|
||||||
|
import Heading from "../ui/typography/heading";
|
||||||
|
import Animated, { FadeInUp } from "react-native-reanimated";
|
||||||
|
|
||||||
|
export const SelectionHeader = React.memo(
|
||||||
|
({
|
||||||
|
items,
|
||||||
|
type,
|
||||||
|
id
|
||||||
|
}: {
|
||||||
|
items?: VirtualizedGrouping<Item>;
|
||||||
|
id?: string;
|
||||||
|
type?: ItemType;
|
||||||
|
}) => {
|
||||||
|
const { colors } = useThemeColors();
|
||||||
|
const selectionMode = useSelectionStore((state) => state.selectionMode);
|
||||||
|
const selectedItemsList = useSelectionStore(
|
||||||
|
(state) => state.selectedItemsList
|
||||||
|
);
|
||||||
|
const clearSelection = useSelectionStore((state) => state.clearSelection);
|
||||||
|
const insets = useGlobalSafeAreaInsets();
|
||||||
|
const allSelected =
|
||||||
|
items?.ids?.filter((id) => typeof id === "string").length ===
|
||||||
|
selectedItemsList.length;
|
||||||
|
const focusedRouteId = useNavigationStore((state) => state.focusedRouteId);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (selectionMode) {
|
||||||
|
tabBarRef.current?.lock();
|
||||||
|
} else {
|
||||||
|
tabBarRef.current?.unlock();
|
||||||
|
}
|
||||||
|
}, [selectionMode]);
|
||||||
|
|
||||||
|
const addToFavorite = async () => {
|
||||||
|
if (!selectedItemsList.length) return;
|
||||||
|
db.notes.favorite(true, ...selectedItemsList);
|
||||||
|
Navigation.queueRoutesForUpdate();
|
||||||
|
clearSelection();
|
||||||
|
};
|
||||||
|
|
||||||
|
const restoreItem = async () => {
|
||||||
|
if (!selectedItemsList.length) return;
|
||||||
|
await db.trash.restore(...selectedItemsList);
|
||||||
|
Navigation.queueRoutesForUpdate();
|
||||||
|
|
||||||
|
clearSelection();
|
||||||
|
ToastManager.show({
|
||||||
|
heading: "Restore successful",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const deleteItem = async () => {
|
||||||
|
presentDialog({
|
||||||
|
title: `Delete ${selectedItemsList.length > 1 ? "items" : "item"}`,
|
||||||
|
paragraph: `Are you sure you want to delete ${
|
||||||
|
selectedItemsList.length > 1
|
||||||
|
? "these items permanently?"
|
||||||
|
: "this item permanently?"
|
||||||
|
}`,
|
||||||
|
positiveText: "Delete",
|
||||||
|
negativeText: "Cancel",
|
||||||
|
positivePress: async () => {
|
||||||
|
if (!selectedItemsList.length) return;
|
||||||
|
await db.trash.delete(...selectedItemsList);
|
||||||
|
Navigation.queueRoutesForUpdate();
|
||||||
|
clearSelection();
|
||||||
|
},
|
||||||
|
positiveType: "errorShade"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const onBackPress = () => {
|
||||||
|
clearSelection();
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
let sub: NativeEventSubscription | undefined;
|
||||||
|
if (selectionMode) {
|
||||||
|
sub = BackHandler.addEventListener("hardwareBackPress", onBackPress);
|
||||||
|
}
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
sub?.remove();
|
||||||
|
};
|
||||||
|
}, [clearSelection, selectionMode]);
|
||||||
|
|
||||||
|
return selectionMode !== type || focusedRouteId !== id ? null : (
|
||||||
|
<Animated.View
|
||||||
|
entering={FadeInUp}
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
height: Platform.OS === "android" ? 50 + insets.top : 50,
|
||||||
|
paddingTop: Platform.OS === "android" ? insets.top : null,
|
||||||
|
backgroundColor: colors.primary.background,
|
||||||
|
justifyContent: "space-between",
|
||||||
|
alignItems: "center",
|
||||||
|
flexDirection: "row",
|
||||||
|
zIndex: 999,
|
||||||
|
paddingHorizontal: 12,
|
||||||
|
marginVertical: 10
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
justifyContent: "flex-start",
|
||||||
|
alignItems: "center",
|
||||||
|
borderRadius: 100
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconButton
|
||||||
|
customStyle={{
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
height: 40,
|
||||||
|
width: 40,
|
||||||
|
borderRadius: 100,
|
||||||
|
marginRight: 10
|
||||||
|
}}
|
||||||
|
type="grayBg"
|
||||||
|
onPress={() => {
|
||||||
|
clearSelection();
|
||||||
|
}}
|
||||||
|
size={SIZE.xl}
|
||||||
|
color={colors.primary.icon}
|
||||||
|
name="close"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
backgroundColor: colors.secondary.background,
|
||||||
|
height: 40,
|
||||||
|
borderRadius: 100,
|
||||||
|
paddingHorizontal: 16,
|
||||||
|
justifyContent: "center",
|
||||||
|
flexDirection: "row",
|
||||||
|
alignItems: "center"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Heading size={SIZE.md} color={colors.primary.accent}>
|
||||||
|
{selectedItemsList.length}
|
||||||
|
</Heading>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
justifyContent: "flex-start",
|
||||||
|
alignItems: "center"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconButton
|
||||||
|
onPress={async () => {
|
||||||
|
useSelectionStore
|
||||||
|
.getState()
|
||||||
|
.setAll(
|
||||||
|
allSelected
|
||||||
|
? []
|
||||||
|
: [
|
||||||
|
...((items?.ids.filter(
|
||||||
|
(id) => typeof id !== "object"
|
||||||
|
) as string[]) || [])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
tooltipText="Select all"
|
||||||
|
tooltipPosition={4}
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
color={
|
||||||
|
allSelected ? colors.primary.accent : colors.primary.paragraph
|
||||||
|
}
|
||||||
|
name="select-all"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{type === "note" ||
|
||||||
|
(type === "notebook" && focusedRouteId === "Notebooks") ? null : (
|
||||||
|
<>
|
||||||
|
<IconButton
|
||||||
|
onPress={async () => {
|
||||||
|
await sleep(100);
|
||||||
|
ManageTagsSheet.present(selectedItemsList);
|
||||||
|
}}
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
color={colors.primary.icon}
|
||||||
|
tooltipText="Manage tags"
|
||||||
|
tooltipPosition={4}
|
||||||
|
name="pound"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<IconButton
|
||||||
|
onPress={async () => {
|
||||||
|
ExportNotesSheet.present(selectedItemsList);
|
||||||
|
}}
|
||||||
|
tooltipText="Export"
|
||||||
|
tooltipPosition={4}
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
name="export"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<IconButton
|
||||||
|
onPress={async () => {
|
||||||
|
MoveNoteSheet.present();
|
||||||
|
}}
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
tooltipText="Add to notebooks"
|
||||||
|
tooltipPosition={4}
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
name="plus"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{type === "notebook" && focusedRouteId !== "Notebooks" ? (
|
||||||
|
<IconButton
|
||||||
|
onPress={async () => {
|
||||||
|
if (selectedItemsList.length > 0) {
|
||||||
|
const { focusedRouteId } = useNavigationStore.getState();
|
||||||
|
if (!focusedRouteId) return;
|
||||||
|
|
||||||
|
await db.notes.removeFromNotebook(
|
||||||
|
focusedRouteId,
|
||||||
|
...selectedItemsList
|
||||||
|
);
|
||||||
|
|
||||||
|
updateNotebook(focusedRouteId);
|
||||||
|
Navigation.queueRoutesForUpdate();
|
||||||
|
clearSelection();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
tooltipText={`Remove from Notebook`}
|
||||||
|
tooltipPosition={4}
|
||||||
|
testID="select-minus"
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
name="minus"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
{focusedRouteId === "Favorites" ? (
|
||||||
|
<IconButton
|
||||||
|
onPress={addToFavorite}
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
tooltipText="Remove from favorites"
|
||||||
|
tooltipPosition={4}
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
name="star-off"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
{type === "trash" ? null : (
|
||||||
|
<IconButton
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
deleteItems(
|
||||||
|
undefined,
|
||||||
|
useSelectionStore.getState().selectionMode
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
tooltipText="Move to trash"
|
||||||
|
tooltipPosition={1}
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
name="delete"
|
||||||
|
size={SIZE.xl}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{type === "trash" ? (
|
||||||
|
<>
|
||||||
|
<IconButton
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
onPress={restoreItem}
|
||||||
|
name="delete-restore"
|
||||||
|
tooltipText="Restore"
|
||||||
|
tooltipPosition={4}
|
||||||
|
size={SIZE.xl - 3}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<IconButton
|
||||||
|
customStyle={{
|
||||||
|
marginLeft: 10
|
||||||
|
}}
|
||||||
|
color={colors.primary.paragraph}
|
||||||
|
onPress={deleteItem}
|
||||||
|
tooltipText="Delete"
|
||||||
|
tooltipPosition={4}
|
||||||
|
name="delete"
|
||||||
|
size={SIZE.xl - 3}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
</View>
|
||||||
|
</Animated.View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
SelectionHeader.displayName = "SelectionHeader";
|
||||||
|
|
||||||
|
export default SelectionHeader;
|
||||||
@@ -85,18 +85,20 @@ export const AddNotebookSheet = ({
|
|||||||
useMenuStore.getState().setMenuPins();
|
useMenuStore.getState().setMenuPins();
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
useRelationStore.getState().update();
|
useRelationStore.getState().update();
|
||||||
if (notebook) {
|
|
||||||
const parent = await getParentNotebookId(notebook.id);
|
const parent =
|
||||||
|
parentNotebook?.id || (await getParentNotebookId(notebook?.id || id));
|
||||||
|
|
||||||
eSendEvent(eOnNotebookUpdated, parent);
|
eSendEvent(eOnNotebookUpdated, parent);
|
||||||
|
if (notebook) {
|
||||||
setImmediate(() => {
|
setImmediate(() => {
|
||||||
|
console.log(parent, notebook.id);
|
||||||
eSendEvent(eOnNotebookUpdated, notebook.id);
|
eSendEvent(eOnNotebookUpdated, notebook.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!notebook) {
|
if (!notebook) {
|
||||||
setTimeout(async () => {
|
|
||||||
MoveNotes.present(await db.notebooks.notebook(id));
|
MoveNotes.present(await db.notebooks.notebook(id));
|
||||||
}, 500);
|
|
||||||
} else {
|
} else {
|
||||||
close?.();
|
close?.();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,22 +23,22 @@ import React, { RefObject, useCallback, useEffect } from "react";
|
|||||||
import { Keyboard, TouchableOpacity, View } from "react-native";
|
import { Keyboard, TouchableOpacity, View } from "react-native";
|
||||||
import { ActionSheetRef, FlashList } from "react-native-actions-sheet";
|
import { ActionSheetRef, FlashList } from "react-native-actions-sheet";
|
||||||
import { db } from "../../../common/database";
|
import { db } from "../../../common/database";
|
||||||
import { eSendEvent, presentSheet } from "../../../services/event-manager";
|
import { presentSheet } from "../../../services/event-manager";
|
||||||
import Navigation from "../../../services/navigation";
|
import Navigation from "../../../services/navigation";
|
||||||
import SearchService from "../../../services/search";
|
import { ItemSelection } from "../../../stores/item-selection-store";
|
||||||
import { useNotebookStore } from "../../../stores/use-notebook-store";
|
import { useNotebookStore } from "../../../stores/use-notebook-store";
|
||||||
import { useRelationStore } from "../../../stores/use-relation-store";
|
import { useRelationStore } from "../../../stores/use-relation-store";
|
||||||
import { useSelectionStore } from "../../../stores/use-selection-store";
|
import { useSelectionStore } from "../../../stores/use-selection-store";
|
||||||
import { useSettingStore } from "../../../stores/use-setting-store";
|
import { useSettingStore } from "../../../stores/use-setting-store";
|
||||||
import { eOnNotebookUpdated } from "../../../utils/events";
|
import { updateNotebook } from "../../../utils/notebooks";
|
||||||
import { Dialog } from "../../dialog";
|
import { Dialog } from "../../dialog";
|
||||||
import DialogHeader from "../../dialog/dialog-header";
|
import DialogHeader from "../../dialog/dialog-header";
|
||||||
|
import SheetProvider from "../../sheet-provider";
|
||||||
import { Button } from "../../ui/button";
|
import { Button } from "../../ui/button";
|
||||||
|
import { IconButton } from "../../ui/icon-button";
|
||||||
import Paragraph from "../../ui/typography/paragraph";
|
import Paragraph from "../../ui/typography/paragraph";
|
||||||
import { NotebookItem } from "./notebook-item";
|
import { NotebookItem } from "./notebook-item";
|
||||||
import { useNotebookItemSelectionStore } from "./store";
|
import { useNotebookItemSelectionStore } from "./store";
|
||||||
import SheetProvider from "../../sheet-provider";
|
|
||||||
import { ItemSelection } from "../../../stores/item-selection-store";
|
|
||||||
|
|
||||||
async function updateInitialSelectionState(items: string[]) {
|
async function updateInitialSelectionState(items: string[]) {
|
||||||
const relations = await db.relations
|
const relations = await db.relations
|
||||||
@@ -90,15 +90,13 @@ const MoveNoteSheet = ({
|
|||||||
const selectedItemsList = useSelectionStore(
|
const selectedItemsList = useSelectionStore(
|
||||||
(state) => state.selectedItemsList
|
(state) => state.selectedItemsList
|
||||||
);
|
);
|
||||||
const setNotebooks = useNotebookStore((state) => state.setNotebooks);
|
|
||||||
const multiSelect = useNotebookItemSelectionStore(
|
const multiSelect = useNotebookItemSelectionStore(
|
||||||
(state) => state.multiSelect
|
(state) => state.multiSelect
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const items = note
|
const items = note ? [note.id] : selectedItemsList;
|
||||||
? [note.id]
|
|
||||||
: (selectedItemsList as Note[]).map((note) => note.id);
|
|
||||||
updateInitialSelectionState(items);
|
updateInitialSelectionState(items);
|
||||||
return () => {
|
return () => {
|
||||||
useNotebookItemSelectionStore.setState({
|
useNotebookItemSelectionStore.setState({
|
||||||
@@ -111,9 +109,7 @@ const MoveNoteSheet = ({
|
|||||||
}, [note, selectedItemsList]);
|
}, [note, selectedItemsList]);
|
||||||
|
|
||||||
const onSave = async () => {
|
const onSave = async () => {
|
||||||
const noteIds = note
|
const noteIds = note ? [note.id] : selectedItemsList;
|
||||||
? [note.id]
|
|
||||||
: selectedItemsList.map((n) => (n as Note).id);
|
|
||||||
|
|
||||||
const changedNotebooks = useNotebookItemSelectionStore.getState().selection;
|
const changedNotebooks = useNotebookItemSelectionStore.getState().selection;
|
||||||
|
|
||||||
@@ -123,18 +119,17 @@ const MoveNoteSheet = ({
|
|||||||
if (changedNotebooks[id] === "selected") {
|
if (changedNotebooks[id] === "selected") {
|
||||||
for (const id of noteIds) {
|
for (const id of noteIds) {
|
||||||
await db.relations.add(item, { id: id, type: "note" });
|
await db.relations.add(item, { id: id, type: "note" });
|
||||||
|
updateNotebook(item.id);
|
||||||
}
|
}
|
||||||
} else if (changedNotebooks[id] === "deselected") {
|
} else if (changedNotebooks[id] === "deselected") {
|
||||||
for (const id of noteIds) {
|
for (const id of noteIds) {
|
||||||
await db.relations.unlink(item, { id: id, type: "note" });
|
await db.relations.unlink(item, { id: id, type: "note" });
|
||||||
|
updateNotebook(item.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
setNotebooks();
|
|
||||||
eSendEvent(eOnNotebookUpdated);
|
|
||||||
SearchService.updateAndSearch();
|
|
||||||
useRelationStore.getState().update();
|
useRelationStore.getState().update();
|
||||||
actionSheetRef.current?.hide();
|
actionSheetRef.current?.hide();
|
||||||
};
|
};
|
||||||
@@ -182,8 +177,28 @@ const MoveNoteSheet = ({
|
|||||||
: "Select topics you want to add note(s) to."
|
: "Select topics you want to add note(s) to."
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
columnGap: 10
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconButton
|
||||||
|
name="restore"
|
||||||
|
type="grayAccent"
|
||||||
|
onPress={() => {
|
||||||
|
const items = note ? [note.id] : selectedItemsList;
|
||||||
|
updateInitialSelectionState(items);
|
||||||
|
}}
|
||||||
|
customStyle={{
|
||||||
|
width: 40,
|
||||||
|
height: 40
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
height={35}
|
height={40}
|
||||||
style={{
|
style={{
|
||||||
borderRadius: 100,
|
borderRadius: 100,
|
||||||
paddingHorizontal: 24,
|
paddingHorizontal: 24,
|
||||||
@@ -194,36 +209,14 @@ const MoveNoteSheet = ({
|
|||||||
onPress={onSave}
|
onPress={onSave}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
paddingHorizontal: 12
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
title="Reset selection"
|
|
||||||
height={30}
|
|
||||||
style={{
|
|
||||||
alignSelf: "flex-start",
|
|
||||||
paddingHorizontal: 0,
|
|
||||||
width: "100%",
|
|
||||||
marginTop: 6
|
|
||||||
}}
|
|
||||||
type="grayAccent"
|
|
||||||
onPress={() => {
|
|
||||||
const items = note
|
|
||||||
? [note.id]
|
|
||||||
: (selectedItemsList as Note[]).map((note) => note.id);
|
|
||||||
updateInitialSelectionState(items);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
paddingHorizontal: 12,
|
paddingHorizontal: 0,
|
||||||
maxHeight: dimensions.height * 0.85,
|
maxHeight: dimensions.height * 0.85,
|
||||||
height: 50 * ((notebooks?.ids.length || 0) + 2)
|
height: dimensions.height * 0.85,
|
||||||
|
paddingTop: 6
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FlashList
|
<FlashList
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ export const NotebookItem = ({
|
|||||||
const { nestedNotebooks, notebook: item } = useNotebook(id, items);
|
const { nestedNotebooks, notebook: item } = useNotebook(id, items);
|
||||||
const ids = useMemo(() => (id ? [id] : []), [id]);
|
const ids = useMemo(() => (id ? [id] : []), [id]);
|
||||||
const { totalNotes: totalNotes } = useTotalNotes(ids, "notebook");
|
const { totalNotes: totalNotes } = useTotalNotes(ids, "notebook");
|
||||||
const screen = useNavigationStore((state) => state.currentRoute);
|
const focusedRouteId = useNavigationStore((state) => state.focusedRouteId);
|
||||||
const { colors } = useThemeColors("sheet");
|
const { colors } = useThemeColors("sheet");
|
||||||
const selection = useNotebookItemSelectionStore((state) =>
|
const selection = useNotebookItemSelectionStore((state) =>
|
||||||
id ? state.selection[id] : undefined
|
id ? state.selection[id] : undefined
|
||||||
);
|
);
|
||||||
const isSelected = selection === "selected";
|
const isSelected = selection === "selected";
|
||||||
const isFocused = screen.id === id;
|
const isFocused = focusedRouteId === id;
|
||||||
const { fontScale } = useWindowDimensions();
|
const { fontScale } = useWindowDimensions();
|
||||||
const expanded = useNotebookExpandedStore((state) => state.expanded[id]);
|
const expanded = useNotebookExpandedStore((state) => state.expanded[id]);
|
||||||
|
|
||||||
@@ -114,9 +114,10 @@ export const NotebookItem = ({
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
paddingLeft: 0,
|
paddingLeft: 12,
|
||||||
paddingRight: 12,
|
paddingRight: 12,
|
||||||
borderRadius: 0
|
borderRadius: 0,
|
||||||
|
height: 45
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
@@ -125,8 +126,27 @@ export const NotebookItem = ({
|
|||||||
alignItems: "center"
|
alignItems: "center"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{nestedNotebooks?.ids.length ? (
|
||||||
<IconButton
|
<IconButton
|
||||||
size={SIZE.lg}
|
size={SIZE.xl}
|
||||||
|
color={isSelected ? colors.selected.icon : colors.primary.icon}
|
||||||
|
onPress={() => {
|
||||||
|
useNotebookExpandedStore.getState().setExpanded(id);
|
||||||
|
}}
|
||||||
|
top={0}
|
||||||
|
left={0}
|
||||||
|
bottom={0}
|
||||||
|
right={0}
|
||||||
|
customStyle={{
|
||||||
|
width: 35,
|
||||||
|
height: 35
|
||||||
|
}}
|
||||||
|
name={expanded ? "chevron-down" : "chevron-right"}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
<IconButton
|
||||||
|
size={SIZE.xl}
|
||||||
color={
|
color={
|
||||||
isSelected
|
isSelected
|
||||||
? colors.selected.icon
|
? colors.selected.icon
|
||||||
@@ -154,34 +174,6 @@ export const NotebookItem = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{nestedNotebooks?.ids.length ? (
|
|
||||||
<IconButton
|
|
||||||
size={SIZE.lg}
|
|
||||||
color={isSelected ? colors.selected.icon : colors.primary.icon}
|
|
||||||
onPress={() => {
|
|
||||||
useNotebookExpandedStore.getState().setExpanded(id);
|
|
||||||
}}
|
|
||||||
top={0}
|
|
||||||
left={0}
|
|
||||||
bottom={0}
|
|
||||||
right={0}
|
|
||||||
customStyle={{
|
|
||||||
width: 40,
|
|
||||||
height: 40
|
|
||||||
}}
|
|
||||||
name={expanded ? "chevron-down" : "chevron-right"}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
width: 40,
|
|
||||||
height: 40
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Paragraph
|
<Paragraph
|
||||||
color={
|
color={
|
||||||
isFocused ? colors.selected.paragraph : colors.secondary.paragraph
|
isFocused ? colors.selected.paragraph : colors.secondary.paragraph
|
||||||
@@ -189,13 +181,21 @@ export const NotebookItem = ({
|
|||||||
size={SIZE.sm}
|
size={SIZE.sm}
|
||||||
>
|
>
|
||||||
{item?.title}{" "}
|
{item?.title}{" "}
|
||||||
|
</Paragraph>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
columnGap: 10,
|
||||||
|
alignItems: "center"
|
||||||
|
}}
|
||||||
|
>
|
||||||
{totalNotes?.(id) ? (
|
{totalNotes?.(id) ? (
|
||||||
<Paragraph size={SIZE.xs} color={colors.secondary.paragraph}>
|
<Paragraph size={SIZE.sm} color={colors.secondary.paragraph}>
|
||||||
{totalNotes(id)}
|
{totalNotes(id)}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
) : null}
|
) : null}
|
||||||
</Paragraph>
|
|
||||||
</View>
|
|
||||||
<IconButton
|
<IconButton
|
||||||
name="plus"
|
name="plus"
|
||||||
customStyle={{
|
customStyle={{
|
||||||
@@ -214,6 +214,7 @@ export const NotebookItem = ({
|
|||||||
color={colors.primary.icon}
|
color={colors.primary.icon}
|
||||||
size={SIZE.xl}
|
size={SIZE.xl}
|
||||||
/>
|
/>
|
||||||
|
</View>
|
||||||
</PressableButton>
|
</PressableButton>
|
||||||
|
|
||||||
{!expanded
|
{!expanded
|
||||||
|
|||||||
@@ -17,24 +17,27 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { useThemeColors } from "@notesnook/theme";
|
||||||
import React, { Fragment, useState } from "react";
|
import React, { Fragment, useState } from "react";
|
||||||
import { Platform, StyleSheet, View, ActivityIndicator } from "react-native";
|
import { ActivityIndicator, Platform, StyleSheet, View } from "react-native";
|
||||||
import FileViewer from "react-native-file-viewer";
|
import FileViewer from "react-native-file-viewer";
|
||||||
import Share from "react-native-share";
|
import Share from "react-native-share";
|
||||||
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
import { notesnook } from "../../../../e2e/test.ids";
|
import { notesnook } from "../../../../e2e/test.ids";
|
||||||
import { db } from "../../../common/database";
|
import { db } from "../../../common/database";
|
||||||
|
import { requestInAppReview } from "../../../services/app-review";
|
||||||
import {
|
import {
|
||||||
presentSheet,
|
|
||||||
PresentSheetOptions,
|
PresentSheetOptions,
|
||||||
ToastManager
|
ToastManager,
|
||||||
|
eSendEvent,
|
||||||
|
presentSheet
|
||||||
} from "../../../services/event-manager";
|
} from "../../../services/event-manager";
|
||||||
import Exporter from "../../../services/exporter";
|
import Exporter from "../../../services/exporter";
|
||||||
import PremiumService from "../../../services/premium";
|
import PremiumService from "../../../services/premium";
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
|
||||||
import { useUserStore } from "../../../stores/use-user-store";
|
import { useUserStore } from "../../../stores/use-user-store";
|
||||||
import { getElevationStyle } from "../../../utils/elevation";
|
import { getElevationStyle } from "../../../utils/elevation";
|
||||||
import { ph, pv, SIZE } from "../../../utils/size";
|
import { eCloseSheet } from "../../../utils/events";
|
||||||
|
import { SIZE, ph, pv } from "../../../utils/size";
|
||||||
import { sleep } from "../../../utils/time";
|
import { sleep } from "../../../utils/time";
|
||||||
import DialogHeader from "../../dialog/dialog-header";
|
import DialogHeader from "../../dialog/dialog-header";
|
||||||
import { ProTag } from "../../premium/pro-tag";
|
import { ProTag } from "../../premium/pro-tag";
|
||||||
@@ -44,17 +47,12 @@ import { PressableButton } from "../../ui/pressable";
|
|||||||
import Seperator from "../../ui/seperator";
|
import Seperator from "../../ui/seperator";
|
||||||
import Heading from "../../ui/typography/heading";
|
import Heading from "../../ui/typography/heading";
|
||||||
import Paragraph from "../../ui/typography/paragraph";
|
import Paragraph from "../../ui/typography/paragraph";
|
||||||
import { eSendEvent } from "../../../services/event-manager";
|
|
||||||
import { eCloseSheet } from "../../../utils/events";
|
|
||||||
import { requestInAppReview } from "../../../services/app-review";
|
|
||||||
import { Dialog } from "../../dialog";
|
|
||||||
import { Note } from "@notesnook/core";
|
|
||||||
|
|
||||||
const ExportNotesSheet = ({
|
const ExportNotesSheet = ({
|
||||||
notes,
|
ids,
|
||||||
update
|
update
|
||||||
}: {
|
}: {
|
||||||
notes: Note[];
|
ids: string[];
|
||||||
update: ((props: PresentSheetOptions) => void) | undefined;
|
update: ((props: PresentSheetOptions) => void) | undefined;
|
||||||
}) => {
|
}) => {
|
||||||
const { colors } = useThemeColors();
|
const { colors } = useThemeColors();
|
||||||
@@ -79,10 +77,10 @@ const ExportNotesSheet = ({
|
|||||||
update?.({ disableClosing: true } as PresentSheetOptions);
|
update?.({ disableClosing: true } as PresentSheetOptions);
|
||||||
setComplete(false);
|
setComplete(false);
|
||||||
let result;
|
let result;
|
||||||
if (notes.length > 1) {
|
if (ids.length > 1) {
|
||||||
result = await Exporter.bulkExport(notes, type, setStatus);
|
result = await Exporter.bulkExport(ids, type, setStatus);
|
||||||
} else {
|
} else {
|
||||||
result = await Exporter.exportNote(notes[0], type);
|
result = await Exporter.exportNote(ids[0], type);
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
}
|
}
|
||||||
if (!result) {
|
if (!result) {
|
||||||
@@ -161,9 +159,7 @@ const ExportNotesSheet = ({
|
|||||||
<DialogHeader
|
<DialogHeader
|
||||||
icon="export"
|
icon="export"
|
||||||
title={
|
title={
|
||||||
notes.length > 1
|
ids.length > 1 ? `Export ${ids.length} Notes` : "Export Note"
|
||||||
? `Export ${notes.length} Notes`
|
|
||||||
: "Export Note"
|
|
||||||
}
|
}
|
||||||
paragraph={`All exports are saved in ${
|
paragraph={`All exports are saved in ${
|
||||||
Platform.OS === "android"
|
Platform.OS === "android"
|
||||||
@@ -251,7 +247,7 @@ const ExportNotesSheet = ({
|
|||||||
<>
|
<>
|
||||||
<ActivityIndicator />
|
<ActivityIndicator />
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
{notes.length === 1
|
{ids.length === 1
|
||||||
? "Exporting note... Please wait"
|
? "Exporting note... Please wait"
|
||||||
: `Exporting notes${
|
: `Exporting notes${
|
||||||
status ? ` (${status})` : ``
|
status ? ` (${status})` : ``
|
||||||
@@ -276,8 +272,8 @@ const ExportNotesSheet = ({
|
|||||||
}}
|
}}
|
||||||
color={colors.secondary.heading}
|
color={colors.secondary.heading}
|
||||||
>
|
>
|
||||||
{notes.length > 1
|
{ids.length > 1
|
||||||
? `${notes.length} Notes exported`
|
? `${ids.length} Notes exported`
|
||||||
: "Note exported"}
|
: "Note exported"}
|
||||||
</Heading>
|
</Heading>
|
||||||
<Paragraph
|
<Paragraph
|
||||||
@@ -285,7 +281,7 @@ const ExportNotesSheet = ({
|
|||||||
textAlign: "center"
|
textAlign: "center"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Your {notes.length > 1 ? "notes are" : "note is"} exported
|
Your {ids.length > 1 ? "notes are" : "note is"} exported
|
||||||
successfully as {result?.fileName}
|
successfully as {result?.fileName}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Button
|
<Button
|
||||||
@@ -363,11 +359,11 @@ const ExportNotesSheet = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ExportNotesSheet.present = async (notes?: Note[], allNotes?: boolean) => {
|
ExportNotesSheet.present = async (ids?: string[], allNotes?: boolean) => {
|
||||||
const exportNotes = allNotes ? await db.notes.all?.items() : notes || [];
|
const exportNoteIds = allNotes ? await db.notes.all?.ids() : ids || [];
|
||||||
presentSheet({
|
presentSheet({
|
||||||
component: (ref, close, update) => (
|
component: (ref, close, update) => (
|
||||||
<ExportNotesSheet notes={exportNotes} update={update} />
|
<ExportNotesSheet ids={exportNoteIds} update={update} />
|
||||||
),
|
),
|
||||||
keyboardHandlerDisabled: true
|
keyboardHandlerDisabled: true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
import { VirtualizedGrouping } from "@notesnook/core";
|
import { VirtualizedGrouping } from "@notesnook/core";
|
||||||
import { Tags } from "@notesnook/core/dist/collections/tags";
|
import { Tags } from "@notesnook/core/dist/collections/tags";
|
||||||
import { Note, Tag } from "@notesnook/core/dist/types";
|
import { Tag } from "@notesnook/core/dist/types";
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
import { useThemeColors } from "@notesnook/theme";
|
||||||
import React, {
|
import React, {
|
||||||
RefObject,
|
RefObject,
|
||||||
@@ -30,11 +30,7 @@ import React, {
|
|||||||
useState
|
useState
|
||||||
} from "react";
|
} from "react";
|
||||||
import { TextInput, View, useWindowDimensions } from "react-native";
|
import { TextInput, View, useWindowDimensions } from "react-native";
|
||||||
import {
|
import { ActionSheetRef, FlatList } from "react-native-actions-sheet";
|
||||||
ActionSheetRef,
|
|
||||||
FlashList,
|
|
||||||
FlatList
|
|
||||||
} from "react-native-actions-sheet";
|
|
||||||
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
import { db } from "../../../common/database";
|
import { db } from "../../../common/database";
|
||||||
import { useDBItem } from "../../../hooks/use-db-item";
|
import { useDBItem } from "../../../hooks/use-db-item";
|
||||||
@@ -47,7 +43,6 @@ import {
|
|||||||
import { useRelationStore } from "../../../stores/use-relation-store";
|
import { useRelationStore } from "../../../stores/use-relation-store";
|
||||||
import { useTagStore } from "../../../stores/use-tag-store";
|
import { useTagStore } from "../../../stores/use-tag-store";
|
||||||
import { SIZE } from "../../../utils/size";
|
import { SIZE } from "../../../utils/size";
|
||||||
import { IconButton } from "../../ui/icon-button";
|
|
||||||
import Input from "../../ui/input";
|
import Input from "../../ui/input";
|
||||||
import { PressableButton } from "../../ui/pressable";
|
import { PressableButton } from "../../ui/pressable";
|
||||||
import Heading from "../../ui/typography/heading";
|
import Heading from "../../ui/typography/heading";
|
||||||
@@ -88,11 +83,11 @@ async function updateInitialSelectionState(items: string[]) {
|
|||||||
const useTagItemSelection = createItemSelectionStore(true);
|
const useTagItemSelection = createItemSelectionStore(true);
|
||||||
|
|
||||||
const ManageTagsSheet = (props: {
|
const ManageTagsSheet = (props: {
|
||||||
notes?: Note[];
|
ids?: string[];
|
||||||
actionSheetRef: RefObject<ActionSheetRef>;
|
actionSheetRef: RefObject<ActionSheetRef>;
|
||||||
}) => {
|
}) => {
|
||||||
const { colors } = useThemeColors();
|
const { colors } = useThemeColors();
|
||||||
const notes = useMemo(() => props.notes || [], [props.notes]);
|
const ids = useMemo(() => props.ids || [], [props.ids]);
|
||||||
const [tags, setTags] = useState<VirtualizedGrouping<Tag>>();
|
const [tags, setTags] = useState<VirtualizedGrouping<Tag>>();
|
||||||
const [query, setQuery] = useState<string>();
|
const [query, setQuery] = useState<string>();
|
||||||
const inputRef = useRef<TextInput>(null);
|
const inputRef = useRef<TextInput>(null);
|
||||||
@@ -100,7 +95,6 @@ const ManageTagsSheet = (props: {
|
|||||||
const [queryExists, setQueryExists] = useState(false);
|
const [queryExists, setQueryExists] = useState(false);
|
||||||
const dimensions = useWindowDimensions();
|
const dimensions = useWindowDimensions();
|
||||||
const refreshSelection = useCallback(() => {
|
const refreshSelection = useCallback(() => {
|
||||||
const ids = notes.map((item) => item.id);
|
|
||||||
updateInitialSelectionState(ids).then((selection) => {
|
updateInitialSelectionState(ids).then((selection) => {
|
||||||
useTagItemSelection.setState({
|
useTagItemSelection.setState({
|
||||||
initialState: selection,
|
initialState: selection,
|
||||||
@@ -108,11 +102,14 @@ const ManageTagsSheet = (props: {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [notes, tags]);
|
}, [ids, tags]);
|
||||||
|
|
||||||
const refreshTags = useCallback(() => {
|
const refreshTags = useCallback(() => {
|
||||||
if (query && query.trim() !== "") {
|
if (query && query.trim() !== "") {
|
||||||
db.lookup.tags(query).then((items) => {
|
db.lookup
|
||||||
|
.tags(query)
|
||||||
|
.sorted()
|
||||||
|
.then((items) => {
|
||||||
setTags(items);
|
setTags(items);
|
||||||
console.log("searched tags");
|
console.log("searched tags");
|
||||||
});
|
});
|
||||||
@@ -149,7 +146,6 @@ const ManageTagsSheet = (props: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const tag = query;
|
const tag = query;
|
||||||
setQuery(undefined);
|
|
||||||
inputRef.current?.setNativeProps({
|
inputRef.current?.setNativeProps({
|
||||||
text: ""
|
text: ""
|
||||||
});
|
});
|
||||||
@@ -166,20 +162,23 @@ const ManageTagsSheet = (props: {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
for (const note of notes) {
|
for (const noteId of ids) {
|
||||||
await db.relations.add(
|
await db.relations.add(
|
||||||
{
|
{
|
||||||
id: id,
|
id: id,
|
||||||
type: "tag"
|
type: "tag"
|
||||||
},
|
},
|
||||||
note
|
{
|
||||||
|
id: noteId,
|
||||||
|
type: "note"
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useRelationStore.getState().update();
|
useRelationStore.getState().update();
|
||||||
useTagStore.getState().setTags();
|
useTagStore.getState().setTags();
|
||||||
refreshTags();
|
setQuery(undefined);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToastManager.show({
|
ToastManager.show({
|
||||||
heading: "Cannot add tag",
|
heading: "Cannot add tag",
|
||||||
@@ -194,7 +193,7 @@ const ManageTagsSheet = (props: {
|
|||||||
|
|
||||||
const onPress = useCallback(
|
const onPress = useCallback(
|
||||||
async (id: string) => {
|
async (id: string) => {
|
||||||
for (const note of notes) {
|
for (const noteId of ids) {
|
||||||
try {
|
try {
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
const isSelected =
|
const isSelected =
|
||||||
@@ -205,7 +204,10 @@ const ManageTagsSheet = (props: {
|
|||||||
id: id,
|
id: id,
|
||||||
type: "tag"
|
type: "tag"
|
||||||
},
|
},
|
||||||
note
|
{
|
||||||
|
id: noteId,
|
||||||
|
type: "note"
|
||||||
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
await db.relations.add(
|
await db.relations.add(
|
||||||
@@ -213,7 +215,10 @@ const ManageTagsSheet = (props: {
|
|||||||
id: id,
|
id: id,
|
||||||
type: "tag"
|
type: "tag"
|
||||||
},
|
},
|
||||||
note
|
{
|
||||||
|
id: noteId,
|
||||||
|
type: "note"
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -228,7 +233,7 @@ const ManageTagsSheet = (props: {
|
|||||||
}, 1);
|
}, 1);
|
||||||
refreshSelection();
|
refreshSelection();
|
||||||
},
|
},
|
||||||
[notes, refreshSelection, refreshTags]
|
[ids, refreshSelection, refreshTags]
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderTag = useCallback(
|
const renderTag = useCallback(
|
||||||
@@ -332,10 +337,10 @@ const ManageTagsSheet = (props: {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ManageTagsSheet.present = (notes?: Note[]) => {
|
ManageTagsSheet.present = (ids?: string[]) => {
|
||||||
presentSheet({
|
presentSheet({
|
||||||
component: (ref) => {
|
component: (ref) => {
|
||||||
return <ManageTagsSheet actionSheetRef={ref} notes={notes} />;
|
return <ManageTagsSheet actionSheetRef={ref} ids={ids} />;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";
|
|||||||
import { db } from "../../../common/database";
|
import { db } from "../../../common/database";
|
||||||
import { presentSheet } from "../../../services/event-manager";
|
import { presentSheet } from "../../../services/event-manager";
|
||||||
import Navigation from "../../../services/navigation";
|
import Navigation from "../../../services/navigation";
|
||||||
import SearchService from "../../../services/search";
|
import { updateNotebook } from "../../../utils/notebooks";
|
||||||
import { SIZE } from "../../../utils/size";
|
import { SIZE } from "../../../utils/size";
|
||||||
import { Dialog } from "../../dialog";
|
import { Dialog } from "../../dialog";
|
||||||
import DialogHeader from "../../dialog/dialog-header";
|
import DialogHeader from "../../dialog/dialog-header";
|
||||||
@@ -140,8 +140,8 @@ export const MoveNotes = ({
|
|||||||
currentNotebook.id,
|
currentNotebook.id,
|
||||||
...selectedNoteIds
|
...selectedNoteIds
|
||||||
);
|
);
|
||||||
|
updateNotebook(currentNotebook.id);
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
SearchService.updateAndSearch();
|
|
||||||
fwdRef?.current?.hide();
|
fwdRef?.current?.hide();
|
||||||
}}
|
}}
|
||||||
title="Move selected notes"
|
title="Move selected notes"
|
||||||
|
|||||||
@@ -181,7 +181,13 @@ export const NotebookSheet = () => {
|
|||||||
if (!focusedRouteId) return;
|
if (!focusedRouteId) return;
|
||||||
const nextRoot = await findRootNotebookId(focusedRouteId);
|
const nextRoot = await findRootNotebookId(focusedRouteId);
|
||||||
setRoot(nextRoot);
|
setRoot(nextRoot);
|
||||||
|
|
||||||
if (nextRoot !== currentItem.current) {
|
if (nextRoot !== currentItem.current) {
|
||||||
|
console.log(
|
||||||
|
"NotebookSheet.useEffect.canShow",
|
||||||
|
"Root changed to",
|
||||||
|
nextRoot
|
||||||
|
);
|
||||||
setSelection([]);
|
setSelection([]);
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
}
|
}
|
||||||
@@ -196,6 +202,7 @@ export const NotebookSheet = () => {
|
|||||||
} else {
|
} else {
|
||||||
ref.current?.show(snapPoint);
|
ref.current?.show(snapPoint);
|
||||||
}
|
}
|
||||||
|
console.log("NotebookSheet.useEffect.canShow", focusedRouteId);
|
||||||
onRequestUpdate();
|
onRequestUpdate();
|
||||||
}, 0);
|
}, 0);
|
||||||
} else {
|
} else {
|
||||||
@@ -203,7 +210,7 @@ export const NotebookSheet = () => {
|
|||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
ref.current?.hide();
|
ref.current?.hide();
|
||||||
}
|
}
|
||||||
}, [canShow, currentRoute, onRequestUpdate, focusedRouteId]);
|
}, [canShow, onRequestUpdate, focusedRouteId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ActionSheet
|
<ActionSheet
|
||||||
@@ -302,11 +309,10 @@ export const NotebookSheet = () => {
|
|||||||
height: 40 * fontScale
|
height: 40 * fontScale
|
||||||
}}
|
}}
|
||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
//@ts-ignore
|
await deleteItems(
|
||||||
useSelectionStore.setState({
|
selection.map((notebook) => notebook.id),
|
||||||
selectedItemsList: selection
|
"notebook"
|
||||||
});
|
);
|
||||||
await deleteItems();
|
|
||||||
useSelectionStore.getState().clearSelection();
|
useSelectionStore.getState().clearSelection();
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
setSelection([]);
|
setSelection([]);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import { eSendEvent } from "../../../services/event-manager";
|
|||||||
import Navigation from "../../../services/navigation";
|
import Navigation from "../../../services/navigation";
|
||||||
import { useThemeColors } from "@notesnook/theme";
|
import { useThemeColors } from "@notesnook/theme";
|
||||||
import { GROUP, SORT } from "../../../utils/constants";
|
import { GROUP, SORT } from "../../../utils/constants";
|
||||||
import { refreshNotesPage } from "../../../utils/events";
|
import { eGroupOptionsUpdated, refreshNotesPage } from "../../../utils/events";
|
||||||
import { SIZE } from "../../../utils/size";
|
import { SIZE } from "../../../utils/size";
|
||||||
import { Button } from "../../ui/button";
|
import { Button } from "../../ui/button";
|
||||||
import Seperator from "../../ui/seperator";
|
import Seperator from "../../ui/seperator";
|
||||||
@@ -42,7 +42,7 @@ const Sort = ({ type, screen }) => {
|
|||||||
setGroupOptions(_groupOptions);
|
setGroupOptions(_groupOptions);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (screen !== "TopicSheet") Navigation.queueRoutesForUpdate(screen);
|
if (screen !== "TopicSheet") Navigation.queueRoutesForUpdate(screen);
|
||||||
eSendEvent("groupOptionsUpdate");
|
eSendEvent(eGroupOptionsUpdated, type);
|
||||||
eSendEvent(refreshNotesPage);
|
eSendEvent(refreshNotesPage);
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,10 +43,9 @@ export const MenuItem = React.memo(
|
|||||||
if (item.func) {
|
if (item.func) {
|
||||||
item.func();
|
item.func();
|
||||||
} else {
|
} else {
|
||||||
Navigation.navigate(
|
if (useNavigationStore.getState().currentRoute !== item.name) {
|
||||||
{ name: item.name, beta: item.isBeta },
|
Navigation.push(item.name, { canGoBack: false, beta: item.isBeta });
|
||||||
{ canGoBack: false }
|
}
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (item.close) {
|
if (item.close) {
|
||||||
setImmediate(() => {
|
setImmediate(() => {
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ export const useActions = ({
|
|||||||
try {
|
try {
|
||||||
close();
|
close();
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
await deleteItems(item);
|
await deleteItems([item.id], item.type);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
@@ -268,7 +268,7 @@ export const useActions = ({
|
|||||||
await db.trash.delete(item.id);
|
await db.trash.delete(item.id);
|
||||||
setImmediate(() => {
|
setImmediate(() => {
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
useSelectionStore.getState().setSelectionMode(false);
|
useSelectionStore.getState().setSelectionMode(undefined);
|
||||||
ToastManager.show({
|
ToastManager.show({
|
||||||
heading: "Permanently deleted items",
|
heading: "Permanently deleted items",
|
||||||
type: "success",
|
type: "success",
|
||||||
@@ -457,7 +457,7 @@ export const useActions = ({
|
|||||||
|
|
||||||
async function exportNote() {
|
async function exportNote() {
|
||||||
if (item.type !== "note") return;
|
if (item.type !== "note") return;
|
||||||
ExportNotesSheet.present([item]);
|
ExportNotesSheet.present([item.id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleLocalOnly() {
|
async function toggleLocalOnly() {
|
||||||
@@ -495,8 +495,6 @@ export const useActions = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addTo() {
|
function addTo() {
|
||||||
clearSelection();
|
|
||||||
setSelectedItem(item);
|
|
||||||
MoveNoteSheet.present(item as Note);
|
MoveNoteSheet.present(item as Note);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,13 +55,8 @@ export const useDBItem = <T extends keyof ItemTypeKey>(
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const onUpdateItem = (itemId?: string) => {
|
const onUpdateItem = (itemId?: string) => {
|
||||||
if (typeof itemId === "string" && itemId !== id) return;
|
if (typeof itemId === "string" && itemId !== id) return;
|
||||||
if (!id) {
|
if (!id) return;
|
||||||
if (item) {
|
console.log("useDBItem.onUpdateItem", id, type);
|
||||||
setItem(undefined);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log("onUpdateItem", id, type);
|
|
||||||
|
|
||||||
if (items) {
|
if (items) {
|
||||||
items.item(id).then((item) => {
|
items.item(id).then((item) => {
|
||||||
@@ -85,10 +80,10 @@ export const useDBItem = <T extends keyof ItemTypeKey>(
|
|||||||
return () => {
|
return () => {
|
||||||
eUnSubscribeEvent(eDBItemUpdate, onUpdateItem);
|
eUnSubscribeEvent(eDBItemUpdate, onUpdateItem);
|
||||||
};
|
};
|
||||||
}, [id, type, items, item]);
|
}, [id, type, items]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
item as ItemTypeKey[T],
|
id ? (item as ItemTypeKey[T]) : undefined,
|
||||||
() => {
|
() => {
|
||||||
if (id) {
|
if (id) {
|
||||||
eSendEvent(eDBItemUpdate, id);
|
eSendEvent(eDBItemUpdate, id);
|
||||||
@@ -115,7 +110,7 @@ export const useTotalNotes = (
|
|||||||
for (const id of ids) {
|
for (const id of ids) {
|
||||||
totalNotesById[id] = relations.filter(
|
totalNotesById[id] = relations.filter(
|
||||||
(relation) => relation.fromId === id && relation.toType === "note"
|
(relation) => relation.fromId === id && relation.toType === "note"
|
||||||
);
|
)?.length;
|
||||||
}
|
}
|
||||||
setTotalNotesById(totalNotesById);
|
setTotalNotesById(totalNotesById);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { db } from "../common/database";
|
import { db } from "../common/database";
|
||||||
import { eSubscribeEvent, eUnSubscribeEvent } from "../services/event-manager";
|
import { eSubscribeEvent, eUnSubscribeEvent } from "../services/event-manager";
|
||||||
import Navigation from "../services/navigation";
|
import Navigation from "../services/navigation";
|
||||||
|
import { eGroupOptionsUpdated } from "../utils/events";
|
||||||
|
|
||||||
export function useGroupOptions(type: any) {
|
export function useGroupOptions(type: any) {
|
||||||
const [groupOptions, setGroupOptions] = useState(
|
const [groupOptions, setGroupOptions] = useState(
|
||||||
@@ -27,8 +28,10 @@ export function useGroupOptions(type: any) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const onUpdate = () => {
|
const onUpdate = (groupType: string) => {
|
||||||
|
if (groupType !== type) return;
|
||||||
const options = db.settings?.getGroupOptions(type) as any;
|
const options = db.settings?.getGroupOptions(type) as any;
|
||||||
|
console.log("useGroupOptions.onUpdate", type, options);
|
||||||
if (
|
if (
|
||||||
groupOptions?.groupBy !== options.groupBy ||
|
groupOptions?.groupBy !== options.groupBy ||
|
||||||
groupOptions?.sortBy !== options.sortBy ||
|
groupOptions?.sortBy !== options.sortBy ||
|
||||||
@@ -39,9 +42,9 @@ export function useGroupOptions(type: any) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
eSubscribeEvent("groupOptionsUpdate", onUpdate);
|
eSubscribeEvent(eGroupOptionsUpdated, onUpdate);
|
||||||
return () => {
|
return () => {
|
||||||
eUnSubscribeEvent("groupOptionsUpdate", onUpdate);
|
eUnSubscribeEvent(eGroupOptionsUpdated, onUpdate);
|
||||||
};
|
};
|
||||||
}, [type, groupOptions]);
|
}, [type, groupOptions]);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { Notebook, VirtualizedGrouping } from "@notesnook/core";
|
|||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import { db } from "../common/database";
|
import { db } from "../common/database";
|
||||||
import { eSubscribeEvent, eUnSubscribeEvent } from "../services/event-manager";
|
import { eSubscribeEvent, eUnSubscribeEvent } from "../services/event-manager";
|
||||||
import { eOnNotebookUpdated } from "../utils/events";
|
import { eGroupOptionsUpdated, eOnNotebookUpdated } from "../utils/events";
|
||||||
import { useDBItem, useTotalNotes } from "./use-db-item";
|
import { useDBItem, useTotalNotes } from "./use-db-item";
|
||||||
|
|
||||||
export const useNotebook = (
|
export const useNotebook = (
|
||||||
@@ -38,30 +38,37 @@ export const useNotebook = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
const onRequestUpdate = React.useCallback(() => {
|
const onRequestUpdate = React.useCallback(() => {
|
||||||
if (!item || !id) {
|
if (!id) return;
|
||||||
if (notebooks) {
|
console.log("useNotebook.onRequestUpdate", id, Date.now());
|
||||||
setNotebooks(undefined);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log("useNotebook.onRequestUpdate", id);
|
|
||||||
db.relations
|
db.relations
|
||||||
.from(item, "notebook")
|
.from(
|
||||||
|
{
|
||||||
|
type: "notebook",
|
||||||
|
id: id
|
||||||
|
},
|
||||||
|
"notebook"
|
||||||
|
)
|
||||||
.selector.sorted(db.settings.getGroupOptions("notebooks"))
|
.selector.sorted(db.settings.getGroupOptions("notebooks"))
|
||||||
.then((notebooks) => {
|
.then((notebooks) => {
|
||||||
setNotebooks(notebooks);
|
setNotebooks(notebooks);
|
||||||
});
|
});
|
||||||
}, [item, id, notebooks]);
|
}, [id]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onRequestUpdate();
|
console.log("useNotebook.useEffect.onRequestUpdate");
|
||||||
}, [item, onRequestUpdate]);
|
|
||||||
|
|
||||||
const onUpdate = useCallback(() => {
|
|
||||||
setGroupOptions({ ...(db.settings.getGroupOptions("notebooks") as any) });
|
|
||||||
onRequestUpdate();
|
onRequestUpdate();
|
||||||
}, [onRequestUpdate]);
|
}, [onRequestUpdate]);
|
||||||
|
|
||||||
|
const onUpdate = useCallback(
|
||||||
|
(type: string) => {
|
||||||
|
if (type !== "notebooks") return;
|
||||||
|
setGroupOptions({ ...(db.settings.getGroupOptions("notebooks") as any) });
|
||||||
|
onRequestUpdate();
|
||||||
|
console.log("useNotebook.onUpdate", id, Date.now());
|
||||||
|
},
|
||||||
|
[id, onRequestUpdate]
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const onNotebookUpdate = (id?: string) => {
|
const onNotebookUpdate = (id?: string) => {
|
||||||
if (typeof id === "string" && id !== id) return;
|
if (typeof id === "string" && id !== id) return;
|
||||||
@@ -71,10 +78,10 @@ export const useNotebook = (
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
eSubscribeEvent("groupOptionsUpdate", onUpdate);
|
eSubscribeEvent(eGroupOptionsUpdated, onUpdate);
|
||||||
eSubscribeEvent(eOnNotebookUpdated, onNotebookUpdate);
|
eSubscribeEvent(eOnNotebookUpdated, onNotebookUpdate);
|
||||||
return () => {
|
return () => {
|
||||||
eUnSubscribeEvent("groupOptionsUpdate", onUpdate);
|
eUnSubscribeEvent(eGroupOptionsUpdated, onUpdate);
|
||||||
eUnSubscribeEvent(eOnNotebookUpdated, onNotebookUpdate);
|
eUnSubscribeEvent(eOnNotebookUpdated, onNotebookUpdate);
|
||||||
};
|
};
|
||||||
}, [onUpdate, onRequestUpdate, id, refresh]);
|
}, [onUpdate, onRequestUpdate, id, refresh]);
|
||||||
@@ -82,7 +89,7 @@ export const useNotebook = (
|
|||||||
return {
|
return {
|
||||||
notebook: item,
|
notebook: item,
|
||||||
nestedNotebookNotesCount,
|
nestedNotebookNotesCount,
|
||||||
nestedNotebooks: notebooks,
|
nestedNotebooks: item ? notebooks : undefined,
|
||||||
onUpdate: onRequestUpdate,
|
onUpdate: onRequestUpdate,
|
||||||
groupOptions
|
groupOptions
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,24 +17,23 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { Item } from "@notesnook/core";
|
||||||
import { useSelectionStore } from "../stores/use-selection-store";
|
import { useSelectionStore } from "../stores/use-selection-store";
|
||||||
|
|
||||||
export default function useIsSelected(item: any) {
|
export default function useIsSelected(item: Item) {
|
||||||
const selectionMode = useSelectionStore((state) => state.selectionMode);
|
const selectionMode = useSelectionStore((state) => state.selectionMode);
|
||||||
const selectedItemsList = useSelectionStore(
|
const selectedItemsList = useSelectionStore(
|
||||||
(state) => state.selectedItemsList
|
(state) => state.selectedItemsList
|
||||||
);
|
);
|
||||||
const selected =
|
const selected =
|
||||||
selectionMode &&
|
selectionMode &&
|
||||||
selectedItemsList.findIndex(
|
selectedItemsList.findIndex((selectedId) => selectedId === item.id) > -1;
|
||||||
(selectedItem: any) => selectedItem.id === item.id
|
|
||||||
) > -1;
|
|
||||||
|
|
||||||
function toggle() {
|
function toggle() {
|
||||||
if (!useSelectionStore.getState().selectionMode) {
|
if (useSelectionStore.getState().selectionMode !== item.type) {
|
||||||
useSelectionStore.getState().setSelectionMode(true);
|
useSelectionStore.getState().setSelectionMode(item.type);
|
||||||
}
|
}
|
||||||
useSelectionStore.getState().setSelectedItem(item);
|
useSelectionStore.getState().setSelectedItem(item.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [selected, toggle];
|
return [selected, toggle];
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const _Tabs = () => {
|
|||||||
const screenHeight = height - (50 + insets.top + insets.bottom);
|
const screenHeight = height - (50 + insets.top + insets.bottom);
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
useNavigationStore.getState().update({ name: homepage });
|
useNavigationStore.getState().update(homepage);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}, [homepage]);
|
}, [homepage]);
|
||||||
|
|
||||||
|
|||||||
@@ -18,25 +18,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { db } from "../../common/database";
|
|
||||||
import DelayLayout from "../../components/delay-layout";
|
import DelayLayout from "../../components/delay-layout";
|
||||||
|
import { Header } from "../../components/header";
|
||||||
import List from "../../components/list";
|
import List from "../../components/list";
|
||||||
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
|
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
|
||||||
import Navigation, { NavigationProps } from "../../services/navigation";
|
import Navigation, { NavigationProps } from "../../services/navigation";
|
||||||
import SearchService from "../../services/search";
|
|
||||||
import SettingsService from "../../services/settings";
|
import SettingsService from "../../services/settings";
|
||||||
import { useFavoriteStore } from "../../stores/use-favorite-store";
|
import { useFavoriteStore } from "../../stores/use-favorite-store";
|
||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
import { useNoteStore } from "../../stores/use-notes-store";
|
import { useNoteStore } from "../../stores/use-notes-store";
|
||||||
import { Header } from "../../components/header";
|
import SelectionHeader from "../../components/selection-header";
|
||||||
const prepareSearch = () => {
|
|
||||||
SearchService.update({
|
|
||||||
placeholder: "Search in favorites",
|
|
||||||
type: "notes",
|
|
||||||
title: "Favorites",
|
|
||||||
get: () => db.notes?.favorites
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const Favorites = ({
|
export const Favorites = ({
|
||||||
navigation,
|
navigation,
|
||||||
@@ -52,7 +43,6 @@ export const Favorites = ({
|
|||||||
Navigation.routeUpdateFunctions[route.name]
|
Navigation.routeUpdateFunctions[route.name]
|
||||||
);
|
);
|
||||||
useNavigationStore.getState().setFocusedRouteId(route?.name);
|
useNavigationStore.getState().setFocusedRouteId(route?.name);
|
||||||
SearchService.prepareSearch = prepareSearch;
|
|
||||||
return !prev?.current;
|
return !prev?.current;
|
||||||
},
|
},
|
||||||
onBlur: () => false,
|
onBlur: () => false,
|
||||||
@@ -61,6 +51,7 @@ export const Favorites = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={favorites} type="note" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={route.name}
|
title={route.name}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import SettingsService from "../../services/settings";
|
|||||||
import { useNoteStore } from "../../stores/use-notes-store";
|
import { useNoteStore } from "../../stores/use-notes-store";
|
||||||
import { openEditor } from "../notes/common";
|
import { openEditor } from "../notes/common";
|
||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
|
||||||
export const Home = ({ navigation, route }: NavigationProps<"Notes">) => {
|
export const Home = ({ navigation, route }: NavigationProps<"Notes">) => {
|
||||||
const notes = useNoteStore((state) => state.notes);
|
const notes = useNoteStore((state) => state.notes);
|
||||||
@@ -47,6 +48,7 @@ export const Home = ({ navigation, route }: NavigationProps<"Notes">) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={notes} type="note" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={route.name}
|
title={route.name}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import { NotebookHeader } from "../../components/list-items/headers/notebook-hea
|
|||||||
import { AddNotebookSheet } from "../../components/sheets/add-notebook";
|
import { AddNotebookSheet } from "../../components/sheets/add-notebook";
|
||||||
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
|
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
|
||||||
import {
|
import {
|
||||||
|
eSendEvent,
|
||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent
|
eUnSubscribeEvent
|
||||||
} from "../../services/event-manager";
|
} from "../../services/event-manager";
|
||||||
@@ -34,8 +35,10 @@ import Navigation, { NavigationProps } from "../../services/navigation";
|
|||||||
import useNavigationStore, {
|
import useNavigationStore, {
|
||||||
NotebookScreenParams
|
NotebookScreenParams
|
||||||
} from "../../stores/use-navigation-store";
|
} from "../../stores/use-navigation-store";
|
||||||
import { eOnNewTopicAdded } from "../../utils/events";
|
import { eUpdateNotebookRoute } from "../../utils/events";
|
||||||
|
import { findRootNotebookId } from "../../utils/notebooks";
|
||||||
import { openEditor, setOnFirstSave } from "../notes/common";
|
import { openEditor, setOnFirstSave } from "../notes/common";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
|
||||||
const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
||||||
const [notes, setNotes] = useState<VirtualizedGrouping<Note>>();
|
const [notes, setNotes] = useState<VirtualizedGrouping<Note>>();
|
||||||
@@ -64,8 +67,24 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
|||||||
|
|
||||||
const onRequestUpdate = React.useCallback(
|
const onRequestUpdate = React.useCallback(
|
||||||
async (data?: NotebookScreenParams) => {
|
async (data?: NotebookScreenParams) => {
|
||||||
|
if (data?.item?.id && params.current.item?.id !== data?.item?.id) {
|
||||||
|
const nextRootNotebookId = await findRootNotebookId(data?.item?.id);
|
||||||
|
const currentNotebookRoot = await findRootNotebookId(
|
||||||
|
params.current.item.id
|
||||||
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
nextRootNotebookId !== currentNotebookRoot ||
|
||||||
|
nextRootNotebookId === params.current?.item?.id
|
||||||
|
) {
|
||||||
|
// Never update notebook in route if root is different or if the root is current notebook.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (data) params.current = data;
|
if (data) params.current = data;
|
||||||
params.current.title = params.current.item.title;
|
params.current.title = params.current.item.title;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const notebook = await db.notebooks?.notebook(
|
const notebook = await db.notebooks?.notebook(
|
||||||
params?.current?.item?.id
|
params?.current?.item?.id
|
||||||
@@ -89,9 +108,9 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onRequestUpdate();
|
onRequestUpdate();
|
||||||
eSubscribeEvent(eOnNewTopicAdded, onRequestUpdate);
|
eSubscribeEvent(eUpdateNotebookRoute, onRequestUpdate);
|
||||||
return () => {
|
return () => {
|
||||||
eUnSubscribeEvent(eOnNewTopicAdded, onRequestUpdate);
|
eUnSubscribeEvent(eUpdateNotebookRoute, onRequestUpdate);
|
||||||
};
|
};
|
||||||
}, [onRequestUpdate]);
|
}, [onRequestUpdate]);
|
||||||
|
|
||||||
@@ -103,6 +122,7 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={notes} type="note" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={params.current.item?.title}
|
title={params.current.item?.title}
|
||||||
@@ -117,6 +137,7 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
|||||||
ids: notes?.ids.filter((id) => typeof id === "string") as string[]
|
ids: notes?.ids.filter((id) => typeof id === "string") as string[]
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
titleHiddenOnRender
|
||||||
id={params.current.item?.id}
|
id={params.current.item?.id}
|
||||||
onPressDefaultRightButton={openEditor}
|
onPressDefaultRightButton={openEditor}
|
||||||
/>
|
/>
|
||||||
@@ -154,13 +175,49 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
NotebookScreen.navigate = (item: Notebook, canGoBack?: boolean) => {
|
NotebookScreen.navigate = async (item: Notebook, canGoBack?: boolean) => {
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
Navigation.navigate<"Notebook">("Notebook", {
|
const { currentRoute, focusedRouteId } = useNavigationStore.getState();
|
||||||
|
if (currentRoute === "Notebooks") {
|
||||||
|
Navigation.push("Notebook", {
|
||||||
title: item.title,
|
title: item.title,
|
||||||
item: item,
|
item: item,
|
||||||
canGoBack
|
canGoBack
|
||||||
});
|
});
|
||||||
|
} else if (currentRoute === "Notebook") {
|
||||||
|
if (!focusedRouteId) return;
|
||||||
|
const rootNotebookId = await findRootNotebookId(focusedRouteId);
|
||||||
|
const currentNotebookRoot = await findRootNotebookId(item?.id);
|
||||||
|
|
||||||
|
if (
|
||||||
|
(rootNotebookId === currentNotebookRoot &&
|
||||||
|
focusedRouteId !== rootNotebookId) ||
|
||||||
|
focusedRouteId == item?.id
|
||||||
|
) {
|
||||||
|
// Update the route in place instead
|
||||||
|
console.log("Updating existing route in place");
|
||||||
|
eSendEvent(eUpdateNotebookRoute, {
|
||||||
|
item: item,
|
||||||
|
title: item.title,
|
||||||
|
canGoBack: canGoBack
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("Pushing new notebook route");
|
||||||
|
// Push a new route
|
||||||
|
Navigation.push("Notebook", {
|
||||||
|
title: item.title,
|
||||||
|
item: item,
|
||||||
|
canGoBack
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Push a new route anyways
|
||||||
|
Navigation.push("Notebook", {
|
||||||
|
title: item.title,
|
||||||
|
item: item,
|
||||||
|
canGoBack
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default NotebookScreen;
|
export default NotebookScreen;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import Navigation, { NavigationProps } from "../../services/navigation";
|
|||||||
import SettingsService from "../../services/settings";
|
import SettingsService from "../../services/settings";
|
||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
import { useNotebookStore } from "../../stores/use-notebook-store";
|
import { useNotebookStore } from "../../stores/use-notebook-store";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
|
||||||
const onButtonPress = () => {
|
const onButtonPress = () => {
|
||||||
AddNotebookSheet.present();
|
AddNotebookSheet.present();
|
||||||
@@ -65,6 +66,7 @@ export const Notebooks = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={notebooks} type="notebook" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={route.name}
|
title={route.name}
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ import React from "react";
|
|||||||
import NotesPage from ".";
|
import NotesPage from ".";
|
||||||
import { db } from "../../common/database";
|
import { db } from "../../common/database";
|
||||||
import Navigation, { NavigationProps } from "../../services/navigation";
|
import Navigation, { NavigationProps } from "../../services/navigation";
|
||||||
import { NotesScreenParams } from "../../stores/use-navigation-store";
|
import useNavigationStore, {
|
||||||
|
NotesScreenParams
|
||||||
|
} from "../../stores/use-navigation-store";
|
||||||
import { PLACEHOLDER_DATA, openEditor, toCamelCase } from "./common";
|
import { PLACEHOLDER_DATA, openEditor, toCamelCase } from "./common";
|
||||||
export const ColoredNotes = ({
|
export const ColoredNotes = ({
|
||||||
navigation,
|
navigation,
|
||||||
@@ -53,7 +55,15 @@ ColoredNotes.get = async (params: NotesScreenParams, grouped = true) => {
|
|||||||
|
|
||||||
ColoredNotes.navigate = (item: Color, canGoBack: boolean) => {
|
ColoredNotes.navigate = (item: Color, canGoBack: boolean) => {
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
Navigation.navigate<"ColoredNotes">("ColoredNotes", {
|
|
||||||
|
const { focusedRouteId } = useNavigationStore.getState();
|
||||||
|
|
||||||
|
if (focusedRouteId === item.id) {
|
||||||
|
console.log("ColoredNotes.navigate: route already focused for color");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Navigation.push<"ColoredNotes">("ColoredNotes", {
|
||||||
item: item,
|
item: item,
|
||||||
canGoBack,
|
canGoBack,
|
||||||
title: toCamelCase(item.title)
|
title: toCamelCase(item.title)
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import {
|
|||||||
eUnSubscribeEvent
|
eUnSubscribeEvent
|
||||||
} from "../../services/event-manager";
|
} from "../../services/event-manager";
|
||||||
import Navigation, { NavigationProps } from "../../services/navigation";
|
import Navigation, { NavigationProps } from "../../services/navigation";
|
||||||
import SearchService from "../../services/search";
|
|
||||||
import useNavigationStore, {
|
import useNavigationStore, {
|
||||||
HeaderRightButton,
|
HeaderRightButton,
|
||||||
NotesScreenParams,
|
NotesScreenParams,
|
||||||
@@ -102,18 +101,6 @@ const NotesPage = ({
|
|||||||
focusOnInit: !focusControl
|
focusOnInit: !focusControl
|
||||||
});
|
});
|
||||||
|
|
||||||
const prepareSearch = React.useCallback(() => {
|
|
||||||
const { item } = params.current;
|
|
||||||
SearchService.update({
|
|
||||||
placeholder: `Search in ${item.title}`,
|
|
||||||
type: "notes",
|
|
||||||
title: item.type === "tag" ? "#" + item.title : item.title,
|
|
||||||
get: () => {
|
|
||||||
return get(params.current, false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, [get]);
|
|
||||||
|
|
||||||
const syncWithNavigation = React.useCallback(() => {
|
const syncWithNavigation = React.useCallback(() => {
|
||||||
const { item } = params.current;
|
const { item } = params.current;
|
||||||
|
|
||||||
@@ -126,13 +113,7 @@ const NotesPage = ({
|
|||||||
type: getItemType(route.name),
|
type: getItemType(route.name),
|
||||||
id: item.id
|
id: item.id
|
||||||
});
|
});
|
||||||
}, [
|
}, [isMonograph, route.name]);
|
||||||
isMonograph,
|
|
||||||
onPressFloatingButton,
|
|
||||||
prepareSearch,
|
|
||||||
rightButtons,
|
|
||||||
route.name
|
|
||||||
]);
|
|
||||||
|
|
||||||
const onRequestUpdate = React.useCallback(
|
const onRequestUpdate = React.useCallback(
|
||||||
async (data?: NotesScreenParams) => {
|
async (data?: NotesScreenParams) => {
|
||||||
@@ -188,7 +169,7 @@ const NotesPage = ({
|
|||||||
<>
|
<>
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={title}
|
title={title || route.name}
|
||||||
canGoBack={params?.current?.canGoBack}
|
canGoBack={params?.current?.canGoBack}
|
||||||
hasSearch={true}
|
hasSearch={true}
|
||||||
id={
|
id={
|
||||||
@@ -214,7 +195,7 @@ const NotesPage = ({
|
|||||||
dataType="note"
|
dataType="note"
|
||||||
onRefresh={onRequestUpdate}
|
onRefresh={onRequestUpdate}
|
||||||
loading={loading || !isFocused}
|
loading={loading || !isFocused}
|
||||||
renderedInRoute="Notes"
|
renderedInRoute={route.name}
|
||||||
headerTitle={title}
|
headerTitle={title}
|
||||||
customAccentColor={accentColor}
|
customAccentColor={accentColor}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ import React from "react";
|
|||||||
import NotesPage from ".";
|
import NotesPage from ".";
|
||||||
import { db } from "../../common/database";
|
import { db } from "../../common/database";
|
||||||
import Navigation, { NavigationProps } from "../../services/navigation";
|
import Navigation, { NavigationProps } from "../../services/navigation";
|
||||||
import { NotesScreenParams } from "../../stores/use-navigation-store";
|
import useNavigationStore, {
|
||||||
|
NotesScreenParams
|
||||||
|
} from "../../stores/use-navigation-store";
|
||||||
import { PLACEHOLDER_DATA, openEditor } from "./common";
|
import { PLACEHOLDER_DATA, openEditor } from "./common";
|
||||||
|
|
||||||
export const TaggedNotes = ({
|
export const TaggedNotes = ({
|
||||||
@@ -54,7 +56,15 @@ TaggedNotes.get = async (params: NotesScreenParams, grouped = true) => {
|
|||||||
|
|
||||||
TaggedNotes.navigate = (item: Tag, canGoBack?: boolean) => {
|
TaggedNotes.navigate = (item: Tag, canGoBack?: boolean) => {
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
Navigation.navigate<"TaggedNotes">("TaggedNotes", {
|
|
||||||
|
const { focusedRouteId } = useNavigationStore.getState();
|
||||||
|
|
||||||
|
if (focusedRouteId === item.id) {
|
||||||
|
console.log("TaggedNotes.navigate: route already focused for tag");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Navigation.push<"TaggedNotes">("TaggedNotes", {
|
||||||
item: item,
|
item: item,
|
||||||
canGoBack,
|
canGoBack,
|
||||||
title: item.title
|
title: item.title
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import Navigation, { NavigationProps } from "../../services/navigation";
|
|||||||
import SettingsService from "../../services/settings";
|
import SettingsService from "../../services/settings";
|
||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
import { useReminderStore } from "../../stores/use-reminder-store";
|
import { useReminderStore } from "../../stores/use-reminder-store";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
|
||||||
export const Reminders = ({
|
export const Reminders = ({
|
||||||
navigation,
|
navigation,
|
||||||
@@ -50,6 +51,7 @@ export const Reminders = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={reminders} type="reminder" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={route.name}
|
title={route.name}
|
||||||
@@ -63,6 +65,7 @@ export const Reminders = ({
|
|||||||
route: route.name
|
route: route.name
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
isBeta
|
||||||
id={route.name}
|
id={route.name}
|
||||||
onPressDefaultRightButton={() => {
|
onPressDefaultRightButton={() => {
|
||||||
ReminderSheet.present();
|
ReminderSheet.present();
|
||||||
|
|||||||
@@ -18,18 +18,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Item, VirtualizedGrouping } from "@notesnook/core";
|
import { Item, VirtualizedGrouping } from "@notesnook/core";
|
||||||
import React, { useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import DelayLayout from "../../components/delay-layout";
|
import { db } from "../../common/database";
|
||||||
import List from "../../components/list";
|
import List from "../../components/list";
|
||||||
import { NavigationProps } from "../../services/navigation";
|
import { NavigationProps } from "../../services/navigation";
|
||||||
import { SearchBar } from "./search-bar";
|
import { SearchBar } from "./search-bar";
|
||||||
import { db } from "../../common/database";
|
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
|
||||||
export const Search = ({ route }: NavigationProps<"Search">) => {
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
|
import {
|
||||||
|
eSubscribeEvent,
|
||||||
|
eUnSubscribeEvent
|
||||||
|
} from "../../services/event-manager";
|
||||||
|
import { eOnRefreshSearch } from "../../utils/events";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
export const Search = ({ route, navigation }: NavigationProps<"Search">) => {
|
||||||
const [results, setResults] = useState<VirtualizedGrouping<Item>>();
|
const [results, setResults] = useState<VirtualizedGrouping<Item>>();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [searchStatus, setSearchStatus] = useState<string>();
|
const [searchStatus, setSearchStatus] = useState<string>();
|
||||||
|
const currentQuery = useRef<string>();
|
||||||
|
const isFocused = useNavigationFocus(navigation, {
|
||||||
|
onFocus: (prev) => {
|
||||||
|
useNavigationStore.getState().setFocusedRouteId(route.name);
|
||||||
|
return !prev?.current;
|
||||||
|
},
|
||||||
|
onBlur: () => false
|
||||||
|
});
|
||||||
|
|
||||||
const onSearch = async (query: string) => {
|
const onSearch = React.useCallback(
|
||||||
|
async (query?: string) => {
|
||||||
|
currentQuery.current = query;
|
||||||
if (!query) {
|
if (!query) {
|
||||||
setResults(undefined);
|
setResults(undefined);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -49,7 +66,7 @@ export const Search = ({ route }: NavigationProps<"Search">) => {
|
|||||||
const results = await db.lookup[type](
|
const results = await db.lookup[type](
|
||||||
query,
|
query,
|
||||||
route.params?.type === "note" ? route.params?.ids : undefined
|
route.params?.type === "note" ? route.params?.ids : undefined
|
||||||
);
|
).sorted();
|
||||||
console.log(`Found ${results.ids?.length} results for ${query}`);
|
console.log(`Found ${results.ids?.length} results for ${query}`);
|
||||||
setResults(results);
|
setResults(results);
|
||||||
if (results.ids?.length === 0) {
|
if (results.ids?.length === 0) {
|
||||||
@@ -61,10 +78,30 @@ export const Search = ({ route }: NavigationProps<"Search">) => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
[route.params?.ids, route.params.type]
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const onRefreshSearch = (type: string) => {
|
||||||
|
if (type === route.params?.type) {
|
||||||
|
onSearch(currentQuery.current);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
eSubscribeEvent(eOnRefreshSearch, onRefreshSearch);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
eUnSubscribeEvent(eOnRefreshSearch, onRefreshSearch);
|
||||||
|
};
|
||||||
|
}, [onSearch, route.params?.type]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader
|
||||||
|
id={route.name}
|
||||||
|
items={results}
|
||||||
|
type={route.params?.type}
|
||||||
|
/>
|
||||||
<SearchBar onChangeText={onSearch} loading={loading} />
|
<SearchBar onChangeText={onSearch} loading={loading} />
|
||||||
<List
|
<List
|
||||||
data={results}
|
data={results}
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import Navigation from "../../services/navigation";
|
|||||||
import { SIZE } from "../../utils/size";
|
import { SIZE } from "../../utils/size";
|
||||||
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
||||||
import { DDS } from "../../services/device-detection";
|
import { DDS } from "../../services/device-detection";
|
||||||
|
import { useSelectionStore } from "../../stores/use-selection-store";
|
||||||
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
export const SearchBar = ({
|
export const SearchBar = ({
|
||||||
onChangeText,
|
onChangeText,
|
||||||
loading
|
loading
|
||||||
@@ -33,6 +35,10 @@ export const SearchBar = ({
|
|||||||
onChangeText: (value: string) => void;
|
onChangeText: (value: string) => void;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
|
const selectionMode = useSelectionStore((state) => state.selectionMode);
|
||||||
|
const isFocused = useNavigationStore(
|
||||||
|
(state) => state.focusedRouteId === "Search"
|
||||||
|
);
|
||||||
const insets = useGlobalSafeAreaInsets();
|
const insets = useGlobalSafeAreaInsets();
|
||||||
const { colors } = useThemeColors();
|
const { colors } = useThemeColors();
|
||||||
const inputRef = useRef<TextInput>(null);
|
const inputRef = useRef<TextInput>(null);
|
||||||
@@ -40,7 +46,7 @@ export const SearchBar = ({
|
|||||||
onChangeText(value);
|
onChangeText(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return selectionMode && isFocused ? null : (
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
height: 50 + insets.top,
|
height: 50 + insets.top,
|
||||||
|
|||||||
@@ -107,16 +107,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {
|
|||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case "screen":
|
case "screen":
|
||||||
navigation.dispatch(StackActions.push("SettingsGroup", item));
|
navigation.dispatch(StackActions.push("SettingsGroup", item));
|
||||||
useNavigationStore.getState().update(
|
useNavigationStore.getState().update("Settings");
|
||||||
{
|
|
||||||
name: "SettingsGroup" as never,
|
|
||||||
title:
|
|
||||||
typeof item.name === "function"
|
|
||||||
? item.name(current)
|
|
||||||
: item.name
|
|
||||||
},
|
|
||||||
true
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
case "switch":
|
case "switch":
|
||||||
onChangeSettings();
|
onChangeSettings();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import SettingsService from "../../services/settings";
|
|||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
import { useTagStore } from "../../stores/use-tag-store";
|
import { useTagStore } from "../../stores/use-tag-store";
|
||||||
import { db } from "../../common/database";
|
import { db } from "../../common/database";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
|
||||||
export const Tags = ({ navigation, route }: NavigationProps<"Tags">) => {
|
export const Tags = ({ navigation, route }: NavigationProps<"Tags">) => {
|
||||||
const tags = useTagStore((state) => state.tags);
|
const tags = useTagStore((state) => state.tags);
|
||||||
@@ -45,6 +46,7 @@ export const Tags = ({ navigation, route }: NavigationProps<"Tags">) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={tags} type="tag" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={route.name}
|
title={route.name}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import Navigation, { NavigationProps } from "../../services/navigation";
|
|||||||
import useNavigationStore from "../../stores/use-navigation-store";
|
import useNavigationStore from "../../stores/use-navigation-store";
|
||||||
import { useSelectionStore } from "../../stores/use-selection-store";
|
import { useSelectionStore } from "../../stores/use-selection-store";
|
||||||
import { useTrashStore } from "../../stores/use-trash-store";
|
import { useTrashStore } from "../../stores/use-trash-store";
|
||||||
|
import SelectionHeader from "../../components/selection-header";
|
||||||
|
|
||||||
const onPressFloatingButton = () => {
|
const onPressFloatingButton = () => {
|
||||||
presentDialog({
|
presentDialog({
|
||||||
@@ -87,6 +88,7 @@ export const Trash = ({ navigation, route }: NavigationProps<"Trash">) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<SelectionHeader id={route.name} items={trash} type="trash" />
|
||||||
<Header
|
<Header
|
||||||
renderedInRoute={route.name}
|
renderedInRoute={route.name}
|
||||||
title={route.name}
|
title={route.name}
|
||||||
|
|||||||
@@ -221,7 +221,10 @@ async function unlockVault() {
|
|||||||
*
|
*
|
||||||
* @param {"txt" | "pdf" | "md" | "html" | "md-frontmatter"} type
|
* @param {"txt" | "pdf" | "md" | "html" | "md-frontmatter"} type
|
||||||
*/
|
*/
|
||||||
async function exportNote(note, type) {
|
async function exportNote(id, type) {
|
||||||
|
const note = await db.notes.note(id);
|
||||||
|
if (!note) return;
|
||||||
|
|
||||||
let content;
|
let content;
|
||||||
|
|
||||||
if (note.locked) {
|
if (note.locked) {
|
||||||
@@ -283,7 +286,7 @@ function getUniqueFileName(fileName, results) {
|
|||||||
*
|
*
|
||||||
* @param {"txt" | "pdf" | "md" | "html" | "md-frontmatter"} type
|
* @param {"txt" | "pdf" | "md" | "html" | "md-frontmatter"} type
|
||||||
*/
|
*/
|
||||||
async function bulkExport(notes, type, callback) {
|
async function bulkExport(ids, type, callback) {
|
||||||
let path = await getPath(FolderNames[type]);
|
let path = await getPath(FolderNames[type]);
|
||||||
if (!path) return;
|
if (!path) return;
|
||||||
|
|
||||||
@@ -309,9 +312,11 @@ async function bulkExport(notes, type, callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const results = {};
|
const results = {};
|
||||||
for (var i = 0; i < notes.length; i++) {
|
for (var i = 0; i < ids.length; i++) {
|
||||||
try {
|
try {
|
||||||
let note = notes[i];
|
let note = await db.notes.note(ids[i]);
|
||||||
|
if (!note) continue;
|
||||||
|
|
||||||
let content;
|
let content;
|
||||||
if (note.locked) {
|
if (note.locked) {
|
||||||
try {
|
try {
|
||||||
@@ -326,6 +331,7 @@ async function bulkExport(notes, type, callback) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = await exportAs(type, note, true, content);
|
let result = await exportAs(type, note, true, content);
|
||||||
let fileName = sanitizeFilename(note.title, {
|
let fileName = sanitizeFilename(note.title, {
|
||||||
replacement: "_"
|
replacement: "_"
|
||||||
@@ -390,12 +396,12 @@ async function bulkExport(notes, type, callback) {
|
|||||||
writeFile(`/${exportedNoteName}`, result);
|
writeFile(`/${exportedNoteName}`, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback(`${i + 1}/${notes.length}`);
|
callback(`${i + 1}/${ids.length}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
DatabaseLogger.error(e);
|
DatabaseLogger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fileName = `nn-export-${notes.length}-${type}-${Date.now()}.zip`;
|
const fileName = `nn-export-${ids.length}-${type}-${Date.now()}.zip`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
callback("zipping");
|
callback("zipping");
|
||||||
|
|||||||
@@ -30,11 +30,9 @@ import { useNoteStore } from "../stores/use-notes-store";
|
|||||||
import { useReminderStore } from "../stores/use-reminder-store";
|
import { useReminderStore } from "../stores/use-reminder-store";
|
||||||
import { useTagStore } from "../stores/use-tag-store";
|
import { useTagStore } from "../stores/use-tag-store";
|
||||||
import { useTrashStore } from "../stores/use-trash-store";
|
import { useTrashStore } from "../stores/use-trash-store";
|
||||||
import { eOnNewTopicAdded } from "../utils/events";
|
import { eOnRefreshSearch, eUpdateNotebookRoute } from "../utils/events";
|
||||||
import { rootNavigatorRef, tabBarRef } from "../utils/global-refs";
|
import { rootNavigatorRef, tabBarRef } from "../utils/global-refs";
|
||||||
import { eSendEvent } from "./event-manager";
|
import { eSendEvent } from "./event-manager";
|
||||||
import SearchService from "./search";
|
|
||||||
import SettingsService from "./settings";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routes that should be updated on focus
|
* Routes that should be updated on focus
|
||||||
@@ -80,14 +78,14 @@ const routeUpdateFunctions: {
|
|||||||
Tags: () => useTagStore.getState().setTags(),
|
Tags: () => useTagStore.getState().setTags(),
|
||||||
Favorites: () => useFavoriteStore.getState().setFavorites(),
|
Favorites: () => useFavoriteStore.getState().setFavorites(),
|
||||||
Trash: () => useTrashStore.getState().setTrash(),
|
Trash: () => useTrashStore.getState().setTrash(),
|
||||||
Notebook: (params) => eSendEvent(eOnNewTopicAdded, params),
|
Notebook: (params) => eSendEvent(eUpdateNotebookRoute, params),
|
||||||
NotesPage: (params) => eSendEvent("NotesPage", params),
|
NotesPage: (params) => eSendEvent("NotesPage", params),
|
||||||
TaggedNotes: (params) => eSendEvent("TaggedNotes", params),
|
TaggedNotes: (params) => eSendEvent("TaggedNotes", params),
|
||||||
ColoredNotes: (params) => eSendEvent("ColoredNotes", params),
|
ColoredNotes: (params) => eSendEvent("ColoredNotes", params),
|
||||||
TopicNotes: (params) => eSendEvent("TopicNotes", params),
|
TopicNotes: (params) => eSendEvent("TopicNotes", params),
|
||||||
Monographs: (params) => eSendEvent("Monographs", params),
|
Monographs: (params) => eSendEvent("Monographs", params),
|
||||||
Reminders: () => useReminderStore.getState().setReminders(),
|
Reminders: () => useReminderStore.getState().setReminders(),
|
||||||
Search: () => SearchService.updateAndSearch()
|
Search: () => eSendEvent(eOnRefreshSearch)
|
||||||
};
|
};
|
||||||
|
|
||||||
function clearRouteFromQueue(routeName: RouteName) {
|
function clearRouteFromQueue(routeName: RouteName) {
|
||||||
@@ -124,6 +122,7 @@ function queueRoutesForUpdate(...routesToUpdate: RouteName[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function navigate<T extends RouteName>(screen: T, params?: RouteParams[T]) {
|
function navigate<T extends RouteName>(screen: T, params?: RouteParams[T]) {
|
||||||
|
console.log(`Navigation.navigate ${screen} route`);
|
||||||
rootNavigatorRef.current?.navigate(screen as any, params);
|
rootNavigatorRef.current?.navigate(screen as any, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,14 +131,17 @@ function goBack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function push<T extends RouteName>(screen: T, params: RouteParams[T]) {
|
function push<T extends RouteName>(screen: T, params: RouteParams[T]) {
|
||||||
|
console.log(`Navigation.push ${screen} route`);
|
||||||
rootNavigatorRef.current?.dispatch(StackActions.push(screen as any, params));
|
rootNavigatorRef.current?.dispatch(StackActions.push(screen as any, params));
|
||||||
}
|
}
|
||||||
|
|
||||||
function replace<T extends RouteName>(screen: T, params: RouteParams[T]) {
|
function replace<T extends RouteName>(screen: T, params: RouteParams[T]) {
|
||||||
|
console.log(`Navigation.replace ${screen} route`);
|
||||||
rootNavigatorRef.current?.dispatch(StackActions.replace(screen, params));
|
rootNavigatorRef.current?.dispatch(StackActions.replace(screen, params));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popToTop() {
|
function popToTop() {
|
||||||
|
console.log(`Navigation.popToTop`);
|
||||||
rootNavigatorRef.current?.dispatch(StackActions.popToTop());
|
rootNavigatorRef.current?.dispatch(StackActions.popToTop());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,46 +17,48 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Item } from "@notesnook/core/dist/types";
|
import { ItemType } from "@notesnook/core";
|
||||||
import create, { State } from "zustand";
|
import create, { State } from "zustand";
|
||||||
|
|
||||||
export interface SelectionStore extends State {
|
export interface SelectionStore extends State {
|
||||||
selectedItemsList: Array<unknown>;
|
selectedItemsList: Array<string>;
|
||||||
selectionMode: boolean;
|
selectionMode?: ItemType;
|
||||||
setAll: (all: Array<unknown>) => void;
|
setAll: (all: Array<string>) => void;
|
||||||
setSelectionMode: (mode: boolean) => void;
|
setSelectionMode: (mode?: ItemType) => void;
|
||||||
setSelectedItem: (item: Item) => void;
|
setSelectedItem: (item: string) => void;
|
||||||
clearSelection: () => void;
|
clearSelection: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useSelectionStore = create<SelectionStore>((set, get) => ({
|
export const useSelectionStore = create<SelectionStore>((set, get) => ({
|
||||||
selectedItemsList: [],
|
selectedItemsList: [],
|
||||||
selectionMode: false,
|
selectionMode: undefined,
|
||||||
setAll: (all) => {
|
setAll: (all) => {
|
||||||
set({ selectedItemsList: all });
|
set({ selectedItemsList: all });
|
||||||
},
|
},
|
||||||
setSelectionMode: (mode) => {
|
setSelectionMode: (mode) => {
|
||||||
set({
|
set({
|
||||||
selectionMode: mode,
|
selectionMode: mode,
|
||||||
selectedItemsList: mode ? get().selectedItemsList : []
|
selectedItemsList:
|
||||||
|
mode === get().selectionMode ? get().selectedItemsList : []
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setSelectedItem: (item) => {
|
setSelectedItem: (id) => {
|
||||||
let selectedItems = get().selectedItemsList as Item[];
|
let selectedItems = get().selectedItemsList as string[];
|
||||||
const index = selectedItems.findIndex((i) => (i as Item).id === item.id);
|
const index = selectedItems.findIndex((i) => i === id);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
selectedItems.splice(index, 1);
|
selectedItems.splice(index, 1);
|
||||||
} else {
|
} else {
|
||||||
selectedItems.push(item);
|
selectedItems.push(id);
|
||||||
}
|
}
|
||||||
selectedItems = [...new Set(selectedItems)];
|
selectedItems = [...new Set(selectedItems)];
|
||||||
|
|
||||||
set({
|
set({
|
||||||
selectedItemsList: selectedItems,
|
selectedItemsList: selectedItems,
|
||||||
selectionMode: selectedItems.length === 0 ? false : get().selectionMode
|
selectionMode:
|
||||||
|
selectedItems.length === 0 ? undefined : get().selectionMode
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clearSelection: () => {
|
clearSelection: () => {
|
||||||
set({ selectionMode: false, selectedItemsList: [] });
|
set({ selectionMode: undefined, selectedItemsList: [] });
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export const eThemeUpdated = "527";
|
|||||||
|
|
||||||
export const eScrollEvent = "528";
|
export const eScrollEvent = "528";
|
||||||
|
|
||||||
export const eOnNewTopicAdded = "529";
|
export const eUpdateNotebookRoute = "529";
|
||||||
|
|
||||||
export const eOpenVaultDialog = "530";
|
export const eOpenVaultDialog = "530";
|
||||||
|
|
||||||
@@ -161,3 +161,5 @@ export const eUserLoggedIn = "608";
|
|||||||
|
|
||||||
export const eLoginSessionExpired = "609";
|
export const eLoginSessionExpired = "609";
|
||||||
export const eDBItemUpdate = "610";
|
export const eDBItemUpdate = "610";
|
||||||
|
export const eGroupOptionsUpdated = "611";
|
||||||
|
export const eOnRefreshSearch = "612";
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import { db } from "../common/database";
|
|||||||
import { presentDialog } from "../components/dialog/functions";
|
import { presentDialog } from "../components/dialog/functions";
|
||||||
import { eSendEvent, ToastManager } from "../services/event-manager";
|
import { eSendEvent, ToastManager } from "../services/event-manager";
|
||||||
import Navigation from "../services/navigation";
|
import Navigation from "../services/navigation";
|
||||||
import SearchService from "../services/search";
|
|
||||||
import { useMenuStore } from "../stores/use-menu-store";
|
import { useMenuStore } from "../stores/use-menu-store";
|
||||||
import { useRelationStore } from "../stores/use-relation-store";
|
import { useRelationStore } from "../stores/use-relation-store";
|
||||||
import { useSelectionStore } from "../stores/use-selection-store";
|
import { useSelectionStore } from "../stores/use-selection-store";
|
||||||
@@ -75,35 +74,15 @@ async function deleteNotebook(id, deleteNotes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const deleteItems = async (item, context) => {
|
export const deleteItems = async (items, type, context) => {
|
||||||
if (item && db.monographs.isPublished(item.id)) {
|
const ids = items ? items : useSelectionStore.getState().selectedItemsList;
|
||||||
ToastManager.show({
|
|
||||||
heading: "Can not delete note",
|
|
||||||
message: "Unpublish note to delete it",
|
|
||||||
type: "error",
|
|
||||||
context: "global"
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const itemsToDelete = item
|
if (type === "reminder") {
|
||||||
? [item]
|
await db.reminders.remove(...ids);
|
||||||
: useSelectionStore.getState().selectedItemsList;
|
|
||||||
|
|
||||||
let notes = itemsToDelete.filter((i) => i.type === "note");
|
|
||||||
let notebooks = itemsToDelete.filter((i) => i.type === "notebook");
|
|
||||||
let reminders = itemsToDelete.filter((i) => i.type === "reminder");
|
|
||||||
|
|
||||||
if (reminders.length > 0) {
|
|
||||||
for (let reminder of reminders) {
|
|
||||||
await db.reminders.remove(reminder.id);
|
|
||||||
}
|
|
||||||
useRelationStore.getState().update();
|
useRelationStore.getState().update();
|
||||||
}
|
} else if (type === "note") {
|
||||||
|
for (const id of ids) {
|
||||||
if (notes?.length > 0) {
|
if (db.monographs.isPublished(id)) {
|
||||||
for (const note of notes) {
|
|
||||||
if (db.monographs.isPublished(note.id)) {
|
|
||||||
ToastManager.show({
|
ToastManager.show({
|
||||||
heading: "Some notes are published",
|
heading: "Some notes are published",
|
||||||
message: "Unpublish published notes to delete them",
|
message: "Unpublish published notes to delete them",
|
||||||
@@ -112,53 +91,54 @@ export const deleteItems = async (item, context) => {
|
|||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
await db.notes.delete(note.id);
|
await db.notes.moveToTrash(id);
|
||||||
}
|
}
|
||||||
eSendEvent(eClearEditor);
|
eSendEvent(eClearEditor);
|
||||||
}
|
} else if (type === "notebook") {
|
||||||
|
const result = await confirmDeleteAllNotes(ids, "notebook", context);
|
||||||
if (notebooks?.length > 0) {
|
|
||||||
const result = await confirmDeleteAllNotes(notebooks, "notebook", context);
|
|
||||||
if (!result.delete) return;
|
if (!result.delete) return;
|
||||||
for (const notebook of notebooks) {
|
for (const id of ids) {
|
||||||
await deleteNotebook(notebook.id, result.deleteNotes);
|
await deleteNotebook(id, result.deleteNotes);
|
||||||
|
eSendEvent(eOnNotebookUpdated, await getParentNotebookId(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let message = `${itemsToDelete.length} ${
|
let message = `${ids.length} ${
|
||||||
itemsToDelete.length === 1 ? "item" : "items"
|
ids.length === 1 ? "item" : "items"
|
||||||
} moved to trash.`;
|
} moved to trash.`;
|
||||||
|
|
||||||
let deletedItems = [...itemsToDelete];
|
let deletedIds = [...ids];
|
||||||
if (reminders.length === 0 && (notes.length > 0 || notebooks.length > 0)) {
|
if (type === "notebook" || type === "note") {
|
||||||
ToastManager.show({
|
ToastManager.show({
|
||||||
heading: message,
|
heading: message,
|
||||||
type: "success",
|
type: "success",
|
||||||
func: async () => {
|
func: async () => {
|
||||||
let trash = db.trash.all;
|
await db.trash.restore(...deletedIds);
|
||||||
let ids = [];
|
|
||||||
for (var i = 0; i < deletedItems.length; i++) {
|
|
||||||
let it = deletedItems[i];
|
|
||||||
let trashItem = trash.find((item) => item.id === it.id);
|
|
||||||
ids.push(trashItem.id);
|
|
||||||
}
|
|
||||||
await db.trash.restore(...ids);
|
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
useMenuStore.getState().setMenuPins();
|
useMenuStore.getState().setMenuPins();
|
||||||
useMenuStore.getState().setColorNotes();
|
useMenuStore.getState().setColorNotes();
|
||||||
ToastManager.hide();
|
ToastManager.hide();
|
||||||
|
if (type === "notebook") {
|
||||||
|
deletedIds.forEach(async (id) => {
|
||||||
|
eSendEvent(eOnNotebookUpdated, await getParentNotebookId(id));
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
actionText: "Undo"
|
actionText: "Undo"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigation.queueRoutesForUpdate();
|
Navigation.queueRoutesForUpdate();
|
||||||
if (!item) {
|
if (!items) {
|
||||||
useSelectionStore.getState().clearSelection();
|
useSelectionStore.getState().clearSelection();
|
||||||
}
|
}
|
||||||
useMenuStore.getState().setMenuPins();
|
|
||||||
useMenuStore.getState().setColorNotes();
|
useMenuStore.getState().setColorNotes();
|
||||||
SearchService.updateAndSearch();
|
if (type === "notebook") {
|
||||||
|
ids.forEach(async (id) => {
|
||||||
|
eSendEvent(eOnNotebookUpdated, await getParentNotebookId(id));
|
||||||
|
});
|
||||||
|
useMenuStore.getState().setMenuPins();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const openLinkInBrowser = async (link) => {
|
export const openLinkInBrowser = async (link) => {
|
||||||
|
|||||||
@@ -1,4 +1,24 @@
|
|||||||
|
/*
|
||||||
|
This file is part of the Notesnook project (https://notesnook.com/)
|
||||||
|
|
||||||
|
Copyright (C) 2023 Streetwriters (Private) Limited
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
import { db } from "../common/database";
|
import { db } from "../common/database";
|
||||||
|
import { eSendEvent } from "../services/event-manager";
|
||||||
|
import { eOnNotebookUpdated } from "./events";
|
||||||
|
|
||||||
export async function findRootNotebookId(id: string) {
|
export async function findRootNotebookId(id: string) {
|
||||||
const relation = await db.relations
|
const relation = await db.relations
|
||||||
@@ -30,3 +50,10 @@ export async function getParentNotebookId(id: string) {
|
|||||||
|
|
||||||
return relation?.[0]?.fromId;
|
return relation?.[0]?.fromId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function updateNotebook(id?: string) {
|
||||||
|
eSendEvent(eOnNotebookUpdated, id);
|
||||||
|
if (id) {
|
||||||
|
eSendEvent(eOnNotebookUpdated, await getParentNotebookId(id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -8,6 +8,8 @@ import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|||||||
import appJson from './app.json';
|
import appJson from './app.json';
|
||||||
import Notifications from "../app/services/notifications";
|
import Notifications from "../app/services/notifications";
|
||||||
import NetInfo from "@react-native-community/netinfo";
|
import NetInfo from "@react-native-community/netinfo";
|
||||||
|
import { enableFreeze } from "react-native-screens";
|
||||||
|
enableFreeze(true);
|
||||||
NetInfo.configure({
|
NetInfo.configure({
|
||||||
reachabilityUrl: "https://notesnook.com",
|
reachabilityUrl: "https://notesnook.com",
|
||||||
reachabilityTest: (response) => {
|
reachabilityTest: (response) => {
|
||||||
|
|||||||
114
apps/mobile/package-lock.json
generated
114
apps/mobile/package-lock.json
generated
@@ -22927,6 +22927,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/editor/node_modules/react": {
|
"../../packages/editor/node_modules/react": {
|
||||||
"version": "17.0.2",
|
"version": "17.0.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -22946,6 +22947,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/editor/node_modules/react-dom": {
|
"../../packages/editor/node_modules/react-dom": {
|
||||||
"version": "17.0.2",
|
"version": "17.0.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -23072,6 +23074,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/editor/node_modules/scheduler": {
|
"../../packages/editor/node_modules/scheduler": {
|
||||||
"version": "0.20.2",
|
"version": "0.20.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -25657,6 +25660,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/theme/node_modules/loose-envify": {
|
"../../packages/theme/node_modules/loose-envify": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||||
@@ -25756,6 +25760,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/theme/node_modules/react": {
|
"../../packages/theme/node_modules/react": {
|
||||||
"version": "17.0.2",
|
"version": "17.0.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -26754,6 +26759,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/ui/node_modules/react": {
|
"../../packages/ui/node_modules/react": {
|
||||||
"version": "17.0.2",
|
"version": "17.0.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -26765,6 +26771,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/ui/node_modules/react-dom": {
|
"../../packages/ui/node_modules/react-dom": {
|
||||||
"version": "17.0.2",
|
"version": "17.0.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -26828,6 +26835,7 @@
|
|||||||
},
|
},
|
||||||
"../../packages/ui/node_modules/scheduler": {
|
"../../packages/ui/node_modules/scheduler": {
|
||||||
"version": "0.20.2",
|
"version": "0.20.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
@@ -30610,6 +30618,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
|
"node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -30623,6 +30632,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
|
"node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -30769,6 +30779,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-proposal-private-property-in-object": {
|
"node_modules/@babel/plugin-proposal-private-property-in-object": {
|
||||||
"version": "7.21.0-placeholder-for-preset-env.2",
|
"version": "7.21.0-placeholder-for-preset-env.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@@ -30779,6 +30790,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-proposal-unicode-property-regex": {
|
"node_modules/@babel/plugin-proposal-unicode-property-regex": {
|
||||||
"version": "7.18.6",
|
"version": "7.18.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-regexp-features-plugin": "^7.18.6",
|
"@babel/helper-create-regexp-features-plugin": "^7.18.6",
|
||||||
@@ -30824,6 +30836,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-class-static-block": {
|
"node_modules/@babel/plugin-syntax-class-static-block": {
|
||||||
"version": "7.14.5",
|
"version": "7.14.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.14.5"
|
"@babel/helper-plugin-utils": "^7.14.5"
|
||||||
@@ -30860,6 +30873,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-export-namespace-from": {
|
"node_modules/@babel/plugin-syntax-export-namespace-from": {
|
||||||
"version": "7.8.3",
|
"version": "7.8.3",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.8.3"
|
"@babel/helper-plugin-utils": "^7.8.3"
|
||||||
@@ -30883,6 +30897,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-import-assertions": {
|
"node_modules/@babel/plugin-syntax-import-assertions": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -30896,6 +30911,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-import-attributes": {
|
"node_modules/@babel/plugin-syntax-import-attributes": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -30909,6 +30925,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-import-meta": {
|
"node_modules/@babel/plugin-syntax-import-meta": {
|
||||||
"version": "7.10.4",
|
"version": "7.10.4",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.10.4"
|
"@babel/helper-plugin-utils": "^7.10.4"
|
||||||
@@ -30919,6 +30936,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-json-strings": {
|
"node_modules/@babel/plugin-syntax-json-strings": {
|
||||||
"version": "7.8.3",
|
"version": "7.8.3",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.8.0"
|
"@babel/helper-plugin-utils": "^7.8.0"
|
||||||
@@ -30942,6 +30960,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-logical-assignment-operators": {
|
"node_modules/@babel/plugin-syntax-logical-assignment-operators": {
|
||||||
"version": "7.10.4",
|
"version": "7.10.4",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.10.4"
|
"@babel/helper-plugin-utils": "^7.10.4"
|
||||||
@@ -31002,6 +31021,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-private-property-in-object": {
|
"node_modules/@babel/plugin-syntax-private-property-in-object": {
|
||||||
"version": "7.14.5",
|
"version": "7.14.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.14.5"
|
"@babel/helper-plugin-utils": "^7.14.5"
|
||||||
@@ -31015,6 +31035,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-top-level-await": {
|
"node_modules/@babel/plugin-syntax-top-level-await": {
|
||||||
"version": "7.14.5",
|
"version": "7.14.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.14.5"
|
"@babel/helper-plugin-utils": "^7.14.5"
|
||||||
@@ -31041,6 +31062,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-syntax-unicode-sets-regex": {
|
"node_modules/@babel/plugin-syntax-unicode-sets-regex": {
|
||||||
"version": "7.18.6",
|
"version": "7.18.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-regexp-features-plugin": "^7.18.6",
|
"@babel/helper-create-regexp-features-plugin": "^7.18.6",
|
||||||
@@ -31068,6 +31090,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-async-generator-functions": {
|
"node_modules/@babel/plugin-transform-async-generator-functions": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-environment-visitor": "^7.22.5",
|
"@babel/helper-environment-visitor": "^7.22.5",
|
||||||
@@ -31125,6 +31148,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-class-properties": {
|
"node_modules/@babel/plugin-transform-class-properties": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-class-features-plugin": "^7.22.5",
|
"@babel/helper-create-class-features-plugin": "^7.22.5",
|
||||||
@@ -31139,6 +31163,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-class-static-block": {
|
"node_modules/@babel/plugin-transform-class-static-block": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-class-features-plugin": "^7.22.5",
|
"@babel/helper-create-class-features-plugin": "^7.22.5",
|
||||||
@@ -31202,6 +31227,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-dotall-regex": {
|
"node_modules/@babel/plugin-transform-dotall-regex": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-regexp-features-plugin": "^7.22.5",
|
"@babel/helper-create-regexp-features-plugin": "^7.22.5",
|
||||||
@@ -31216,6 +31242,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-duplicate-keys": {
|
"node_modules/@babel/plugin-transform-duplicate-keys": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -31229,6 +31256,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-dynamic-import": {
|
"node_modules/@babel/plugin-transform-dynamic-import": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31257,6 +31285,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-export-namespace-from": {
|
"node_modules/@babel/plugin-transform-export-namespace-from": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31313,6 +31342,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-json-strings": {
|
"node_modules/@babel/plugin-transform-json-strings": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31340,6 +31370,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-logical-assignment-operators": {
|
"node_modules/@babel/plugin-transform-logical-assignment-operators": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31367,6 +31398,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-modules-amd": {
|
"node_modules/@babel/plugin-transform-modules-amd": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-module-transforms": "^7.22.5",
|
"@babel/helper-module-transforms": "^7.22.5",
|
||||||
@@ -31396,6 +31428,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-modules-systemjs": {
|
"node_modules/@babel/plugin-transform-modules-systemjs": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-hoist-variables": "^7.22.5",
|
"@babel/helper-hoist-variables": "^7.22.5",
|
||||||
@@ -31412,6 +31445,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-modules-umd": {
|
"node_modules/@babel/plugin-transform-modules-umd": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-module-transforms": "^7.22.5",
|
"@babel/helper-module-transforms": "^7.22.5",
|
||||||
@@ -31440,6 +31474,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-new-target": {
|
"node_modules/@babel/plugin-transform-new-target": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -31453,6 +31488,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
|
"node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31467,6 +31503,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-numeric-separator": {
|
"node_modules/@babel/plugin-transform-numeric-separator": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31494,6 +31531,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-object-rest-spread": {
|
"node_modules/@babel/plugin-transform-object-rest-spread": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/compat-data": "^7.22.5",
|
"@babel/compat-data": "^7.22.5",
|
||||||
@@ -31525,6 +31563,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-optional-catch-binding": {
|
"node_modules/@babel/plugin-transform-optional-catch-binding": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31539,6 +31578,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-optional-chaining": {
|
"node_modules/@babel/plugin-transform-optional-chaining": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5",
|
"@babel/helper-plugin-utils": "^7.22.5",
|
||||||
@@ -31581,6 +31621,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-private-property-in-object": {
|
"node_modules/@babel/plugin-transform-private-property-in-object": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-annotate-as-pure": "^7.22.5",
|
"@babel/helper-annotate-as-pure": "^7.22.5",
|
||||||
@@ -31680,6 +31721,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-reserved-words": {
|
"node_modules/@babel/plugin-transform-reserved-words": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -31771,6 +31813,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-typeof-symbol": {
|
"node_modules/@babel/plugin-transform-typeof-symbol": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -31800,6 +31843,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-unicode-escapes": {
|
"node_modules/@babel/plugin-transform-unicode-escapes": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.22.5"
|
"@babel/helper-plugin-utils": "^7.22.5"
|
||||||
@@ -31813,6 +31857,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-unicode-property-regex": {
|
"node_modules/@babel/plugin-transform-unicode-property-regex": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-regexp-features-plugin": "^7.22.5",
|
"@babel/helper-create-regexp-features-plugin": "^7.22.5",
|
||||||
@@ -31841,6 +31886,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/plugin-transform-unicode-sets-regex": {
|
"node_modules/@babel/plugin-transform-unicode-sets-regex": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-create-regexp-features-plugin": "^7.22.5",
|
"@babel/helper-create-regexp-features-plugin": "^7.22.5",
|
||||||
@@ -31855,6 +31901,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/preset-env": {
|
"node_modules/@babel/preset-env": {
|
||||||
"version": "7.22.5",
|
"version": "7.22.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/compat-data": "^7.22.5",
|
"@babel/compat-data": "^7.22.5",
|
||||||
@@ -31947,6 +31994,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/preset-env/node_modules/semver": {
|
"node_modules/@babel/preset-env/node_modules/semver": {
|
||||||
"version": "6.3.0",
|
"version": "6.3.0",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
@@ -31969,6 +32017,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@babel/preset-modules": {
|
"node_modules/@babel/preset-modules": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "^7.0.0",
|
"@babel/helper-plugin-utils": "^7.0.0",
|
||||||
@@ -34581,6 +34630,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@types/eslint": {
|
"node_modules/@types/eslint": {
|
||||||
"version": "8.40.2",
|
"version": "8.40.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "*",
|
"@types/estree": "*",
|
||||||
@@ -34589,6 +34639,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@types/eslint-scope": {
|
"node_modules/@types/eslint-scope": {
|
||||||
"version": "3.7.4",
|
"version": "3.7.4",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint": "*",
|
"@types/eslint": "*",
|
||||||
@@ -34597,6 +34648,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/graceful-fs": {
|
"node_modules/@types/graceful-fs": {
|
||||||
@@ -35045,6 +35097,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/ast": {
|
"node_modules/@webassemblyjs/ast": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/helper-numbers": "1.11.6",
|
"@webassemblyjs/helper-numbers": "1.11.6",
|
||||||
@@ -35053,18 +35106,22 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/floating-point-hex-parser": {
|
"node_modules/@webassemblyjs/floating-point-hex-parser": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-api-error": {
|
"node_modules/@webassemblyjs/helper-api-error": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-buffer": {
|
"node_modules/@webassemblyjs/helper-buffer": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-numbers": {
|
"node_modules/@webassemblyjs/helper-numbers": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/floating-point-hex-parser": "1.11.6",
|
"@webassemblyjs/floating-point-hex-parser": "1.11.6",
|
||||||
@@ -35074,10 +35131,12 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
|
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-wasm-section": {
|
"node_modules/@webassemblyjs/helper-wasm-section": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.6",
|
||||||
@@ -35088,6 +35147,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/ieee754": {
|
"node_modules/@webassemblyjs/ieee754": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xtuc/ieee754": "^1.2.0"
|
"@xtuc/ieee754": "^1.2.0"
|
||||||
@@ -35095,6 +35155,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/leb128": {
|
"node_modules/@webassemblyjs/leb128": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
@@ -35102,10 +35163,12 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/utf8": {
|
"node_modules/@webassemblyjs/utf8": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-edit": {
|
"node_modules/@webassemblyjs/wasm-edit": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.6",
|
||||||
@@ -35120,6 +35183,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-gen": {
|
"node_modules/@webassemblyjs/wasm-gen": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.6",
|
||||||
@@ -35131,6 +35195,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-opt": {
|
"node_modules/@webassemblyjs/wasm-opt": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.6",
|
||||||
@@ -35141,6 +35206,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-parser": {
|
"node_modules/@webassemblyjs/wasm-parser": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.6",
|
||||||
@@ -35153,6 +35219,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wast-printer": {
|
"node_modules/@webassemblyjs/wast-printer": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.6",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.6",
|
||||||
@@ -35210,10 +35277,12 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@xtuc/ieee754": {
|
"node_modules/@xtuc/ieee754": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/@xtuc/long": {
|
"node_modules/@xtuc/long": {
|
||||||
"version": "4.2.2",
|
"version": "4.2.2",
|
||||||
|
"dev": true,
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
},
|
},
|
||||||
"node_modules/@yarnpkg/lockfile": {
|
"node_modules/@yarnpkg/lockfile": {
|
||||||
@@ -35269,6 +35338,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/acorn-import-assertions": {
|
"node_modules/acorn-import-assertions": {
|
||||||
"version": "1.9.0",
|
"version": "1.9.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"acorn": "^8"
|
"acorn": "^8"
|
||||||
@@ -36370,6 +36440,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/chrome-trace-event": {
|
"node_modules/chrome-trace-event": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0"
|
"node": ">=6.0"
|
||||||
@@ -37431,6 +37502,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.15.0",
|
"version": "5.15.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
@@ -37543,6 +37615,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/es-module-lexer": {
|
"node_modules/es-module-lexer": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/es-set-tostringtag": {
|
"node_modules/es-set-tostringtag": {
|
||||||
@@ -37873,6 +37946,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/eslint-scope": {
|
"node_modules/eslint-scope": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esrecurse": "^4.3.0",
|
"esrecurse": "^4.3.0",
|
||||||
@@ -37884,6 +37958,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/eslint-scope/node_modules/estraverse": {
|
"node_modules/eslint-scope/node_modules/estraverse": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=4.0"
|
"node": ">=4.0"
|
||||||
@@ -38069,6 +38144,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/esrecurse": {
|
"node_modules/esrecurse": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"estraverse": "^5.2.0"
|
"estraverse": "^5.2.0"
|
||||||
@@ -38079,6 +38155,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/estraverse": {
|
"node_modules/estraverse": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.0",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=4.0"
|
"node": ">=4.0"
|
||||||
@@ -38086,6 +38163,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/esutils": {
|
"node_modules/esutils": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
@@ -39138,6 +39216,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/glob-to-regexp": {
|
"node_modules/glob-to-regexp": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-2-Clause"
|
"license": "BSD-2-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/global": {
|
"node_modules/global": {
|
||||||
@@ -41375,6 +41454,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/json-parse-even-better-errors": {
|
"node_modules/json-parse-even-better-errors": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/json-schema-traverse": {
|
"node_modules/json-schema-traverse": {
|
||||||
@@ -41641,6 +41721,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/loader-runner": {
|
"node_modules/loader-runner": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.11.5"
|
"node": ">=6.11.5"
|
||||||
@@ -44263,6 +44344,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/randombytes": {
|
"node_modules/randombytes": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"safe-buffer": "^5.1.0"
|
"safe-buffer": "^5.1.0"
|
||||||
@@ -44312,28 +44394,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-dom": {
|
|
||||||
"version": "18.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
|
|
||||||
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"scheduler": "^0.23.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "^18.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react-dom/node_modules/scheduler": {
|
|
||||||
"version": "0.23.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
|
|
||||||
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react-freeze": {
|
"node_modules/react-freeze": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -45020,6 +45080,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/react-test-renderer": {
|
"node_modules/react-test-renderer": {
|
||||||
"version": "18.2.0",
|
"version": "18.2.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react-is": "^18.2.0",
|
"react-is": "^18.2.0",
|
||||||
@@ -45032,10 +45093,12 @@
|
|||||||
},
|
},
|
||||||
"node_modules/react-test-renderer/node_modules/react-is": {
|
"node_modules/react-test-renderer/node_modules/react-is": {
|
||||||
"version": "18.2.0",
|
"version": "18.2.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/react-test-renderer/node_modules/scheduler": {
|
"node_modules/react-test-renderer/node_modules/scheduler": {
|
||||||
"version": "0.23.0",
|
"version": "0.23.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0"
|
"loose-envify": "^1.1.0"
|
||||||
@@ -45870,6 +45933,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/serialize-javascript": {
|
"node_modules/serialize-javascript": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"randombytes": "^2.1.0"
|
"randombytes": "^2.1.0"
|
||||||
@@ -46924,6 +46988,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/terser-webpack-plugin": {
|
"node_modules/terser-webpack-plugin": {
|
||||||
"version": "5.3.9",
|
"version": "5.3.9",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/trace-mapping": "^0.3.17",
|
"@jridgewell/trace-mapping": "^0.3.17",
|
||||||
@@ -46956,6 +47021,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/terser-webpack-plugin/node_modules/jest-worker": {
|
"node_modules/terser-webpack-plugin/node_modules/jest-worker": {
|
||||||
"version": "27.5.1",
|
"version": "27.5.1",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -46968,6 +47034,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/terser-webpack-plugin/node_modules/supports-color": {
|
"node_modules/terser-webpack-plugin/node_modules/supports-color": {
|
||||||
"version": "8.1.1",
|
"version": "8.1.1",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"has-flag": "^4.0.0"
|
"has-flag": "^4.0.0"
|
||||||
@@ -47721,6 +47788,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/watchpack": {
|
"node_modules/watchpack": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob-to-regexp": "^0.4.1",
|
"glob-to-regexp": "^0.4.1",
|
||||||
@@ -47743,6 +47811,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/webpack": {
|
"node_modules/webpack": {
|
||||||
"version": "5.88.2",
|
"version": "5.88.2",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
@@ -47857,6 +47926,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/webpack-sources": {
|
"node_modules/webpack-sources": {
|
||||||
"version": "3.2.3",
|
"version": "3.2.3",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
diff --git a/node_modules/react-native-vector-icons/android/build/.transforms/9469767ddf733a51f4497b9a4a4c145a/results.bin b/node_modules/react-native-vector-icons/android/build/.transforms/9469767ddf733a51f4497b9a4a4c145a/results.bin
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..0d259dd
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/node_modules/react-native-vector-icons/android/build/.transforms/9469767ddf733a51f4497b9a4a4c145a/results.bin
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+o/classes
|
||||||
|
diff --git a/node_modules/react-native-vector-icons/android/build/.transforms/9469767ddf733a51f4497b9a4a4c145a/transformed/classes/classes.dex b/node_modules/react-native-vector-icons/android/build/.transforms/9469767ddf733a51f4497b9a4a4c145a/transformed/classes/classes.dex
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..d4bdd72
|
||||||
|
Binary files /dev/null and b/node_modules/react-native-vector-icons/android/build/.transforms/9469767ddf733a51f4497b9a4a4c145a/transformed/classes/classes.dex differ
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/results.bin b/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/results.bin
|
diff --git a/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/results.bin b/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/results.bin
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..0d259dd
|
index 0000000..0d259dd
|
||||||
@@ -7,8 +18,7 @@ index 0000000..0d259dd
|
|||||||
+o/classes
|
+o/classes
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/transformed/classes/classes.dex b/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/transformed/classes/classes.dex
|
diff --git a/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/transformed/classes/classes.dex b/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/transformed/classes/classes.dex
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..d4bdd72
|
index 0000000..e69de29
|
||||||
Binary files /dev/null and b/node_modules/react-native-vector-icons/android/build/.transforms/f1314fc28eaff1170375cbb76465cb24/transformed/classes/classes.dex differ
|
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/generated/source/buildConfig/debug/com/oblador/vectoricons/BuildConfig.java b/node_modules/react-native-vector-icons/android/build/generated/source/buildConfig/debug/com/oblador/vectoricons/BuildConfig.java
|
diff --git a/node_modules/react-native-vector-icons/android/build/generated/source/buildConfig/debug/com/oblador/vectoricons/BuildConfig.java b/node_modules/react-native-vector-icons/android/build/generated/source/buildConfig/debug/com/oblador/vectoricons/BuildConfig.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..52a02e0
|
index 0000000..52a02e0
|
||||||
@@ -2053,46 +2063,46 @@ index 0000000..5347f17
|
|||||||
+int xml rn_dev_preferences 0x0
|
+int xml rn_dev_preferences 0x0
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..c671bf3
|
index 0000000..aca2293
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties
|
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties
|
||||||
@@ -0,0 +1 @@
|
@@ -0,0 +1 @@
|
||||||
+#Mon Oct 02 09:47:12 PKT 2023
|
+#Thu Nov 23 08:23:53 PKT 2023
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..08d62cc
|
index 0000000..c417283
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml
|
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
+<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/res"/><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/rs/debug"/><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/res"/><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/rs/debug"/><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><mergedItems/></merger>
|
+<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/res"/><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/rs/debug"/><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/res"/><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/rs/debug"/><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><mergedItems/></merger>
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..12fc555
|
index 0000000..994a515
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml
|
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/jniLibs"/></dataSet></merger>
|
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/jniLibs"/></dataSet></merger>
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugShaders/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugShaders/merger.xml
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugShaders/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugShaders/merger.xml
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..7d757a3
|
index 0000000..75b5b1a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugShaders/merger.xml
|
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/mergeDebugShaders/merger.xml
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/shaders"/></dataSet></merger>
|
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/shaders"/></dataSet></merger>
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/packageDebugAssets/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/packageDebugAssets/merger.xml
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/incremental/packageDebugAssets/merger.xml b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/packageDebugAssets/merger.xml
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..ef96fe3
|
index 0000000..9b07b6e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/packageDebugAssets/merger.xml
|
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/incremental/packageDebugAssets/merger.xml
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/assets"/><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/intermediates/shader_assets/debug/out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/assets"/></dataSet></merger>
|
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/assets"/><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/build/intermediates/shader_assets/debug/out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/debug/assets"/></dataSet></merger>
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/javac/debug/classes/com/oblador/vectoricons/BuildConfig.class b/node_modules/react-native-vector-icons/android/build/intermediates/javac/debug/classes/com/oblador/vectoricons/BuildConfig.class
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/javac/debug/classes/com/oblador/vectoricons/BuildConfig.class b/node_modules/react-native-vector-icons/android/build/intermediates/javac/debug/classes/com/oblador/vectoricons/BuildConfig.class
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
@@ -2120,7 +2130,7 @@ index 0000000..78ac5b8
|
|||||||
+local
|
+local
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt b/node_modules/react-native-vector-icons/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt b/node_modules/react-native-vector-icons/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..8462a2c
|
index 0000000..d91dbc1
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt
|
+++ b/node_modules/react-native-vector-icons/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt
|
||||||
@@ -0,0 +1,8 @@
|
@@ -0,0 +1,8 @@
|
||||||
@@ -2129,7 +2139,7 @@ index 0000000..8462a2c
|
|||||||
+3 package="com.oblador.vectoricons" >
|
+3 package="com.oblador.vectoricons" >
|
||||||
+4
|
+4
|
||||||
+5 <uses-sdk android:minSdkVersion="21" />
|
+5 <uses-sdk android:minSdkVersion="21" />
|
||||||
+5-->/Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+5-->/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+6
|
+6
|
||||||
+7</manifest>
|
+7</manifest>
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml b/node_modules/react-native-vector-icons/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml
|
diff --git a/node_modules/react-native-vector-icons/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml b/node_modules/react-native-vector-icons/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml
|
||||||
@@ -3638,35 +3648,35 @@ index 0000000..873e0a9
|
|||||||
+xml rn_dev_preferences
|
+xml rn_dev_preferences
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/outputs/logs/manifest-merger-debug-report.txt b/node_modules/react-native-vector-icons/android/build/outputs/logs/manifest-merger-debug-report.txt
|
diff --git a/node_modules/react-native-vector-icons/android/build/outputs/logs/manifest-merger-debug-report.txt b/node_modules/react-native-vector-icons/android/build/outputs/logs/manifest-merger-debug-report.txt
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..f4f75c1
|
index 0000000..3d2b28a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/node_modules/react-native-vector-icons/android/build/outputs/logs/manifest-merger-debug-report.txt
|
+++ b/node_modules/react-native-vector-icons/android/build/outputs/logs/manifest-merger-debug-report.txt
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+-- Merging decision tree log ---
|
+-- Merging decision tree log ---
|
||||||
+manifest
|
+manifest
|
||||||
+ADDED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:1-2:12
|
+ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:1-2:12
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:1-2:12
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:1-2:12
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:1-2:12
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:1-2:12
|
||||||
+ package
|
+ package
|
||||||
+ ADDED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:70-103
|
+ ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:70-103
|
||||||
+ INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ xmlns:android
|
+ xmlns:android
|
||||||
+ ADDED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:11-69
|
+ ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml:1:11-69
|
||||||
+uses-sdk
|
+uses-sdk
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ android:targetSdkVersion
|
+ android:targetSdkVersion
|
||||||
+ INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ ADDED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ android:minSdkVersion
|
+ android:minSdkVersion
|
||||||
+ INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ ADDED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
+ INJECTED from /Users/ammarahmed/Repos/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-vector-icons/android/src/main/AndroidManifest.xml
|
||||||
diff --git a/node_modules/react-native-vector-icons/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin b/node_modules/react-native-vector-icons/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin
|
diff --git a/node_modules/react-native-vector-icons/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin b/node_modules/react-native-vector-icons/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..26da0e3
|
index 0000000..26da0e3
|
||||||
@@ -3687,7 +3697,7 @@ index 5485fac..ef3ccb3 100644
|
|||||||
generateAssetsTask.dependsOn(fontCopyTask)
|
generateAssetsTask.dependsOn(fontCopyTask)
|
||||||
}
|
}
|
||||||
diff --git a/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json b/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json
|
diff --git a/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json b/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json
|
||||||
index c06a819..13c76cc 100644
|
index c06a819..42f1a6d 100644
|
||||||
--- a/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json
|
--- a/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json
|
||||||
+++ b/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json
|
+++ b/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json
|
||||||
@@ -1,6598 +1 @@
|
@@ -1,6598 +1 @@
|
||||||
@@ -10290,7 +10300,7 @@ index c06a819..13c76cc 100644
|
|||||||
- "blank": 63116
|
- "blank": 63116
|
||||||
-}
|
-}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+{"menu":983900,"lock-open-outline":983872,"key-outline":986582,"pin-off-outline":985392,"pin-outline":985393,"star-off":984273,"star-outline":984274,"link-variant-remove":987393,"link-variant":983865,"bell":983194,"bell-off-outline":985745,"check":983340,"magnify":983881,"plus":984085,"view-list-outline":988299,"view-list":984434,"play":984074,"pause":984036,"notebook-outline":986815,"text-short":985513,"radiobox-marked":984126,"radiobox-blank":984125,"sort-descending":984253,"information":983804,"sort-ascending":984252,"alert":983078,"arrow-right":983124,"bookmark-outline":983235,"checkbox-marked":983346,"checkbox-blank-outline":983345,"unfold-less-horizontal":984398,"minus-circle":983926,"vibrate":984422,"volume-high":984446,"checkbox-blank-circle-outline":983344,"check-circle-outline":984545,"chevron-up":983363,"chevron-down":983360,"calendar":983277,"minus-circle-outline":983927,"close-circle-outline":983386,"qrcode":984114,"text":985512,"cloud":983391,"book-outline":985956,"pound":984099,"clock-plus-outline":989282,"cloud-upload-outline":985982,"export":983559,"message-badge-outline":989506,"square-edit-outline":985356,"content-copy":983439,"delete-restore":985113,"share-variant":984215,"pencil-lock":984046,"sync-off":984296,"content-duplicate":983441,"theme-light-dark":984334,"pencil":984043,"clock-outline":983376,"attachment":983142,"history":983770,"notebook":985134,"bookmark":983232,"delete-outline":985575,"delete":983476,"link":983863,"cloud-upload":983399,"star":984270,"key":983814,"account-outline":983059,"email":983534,"backup-restore":983151,"update":984752,"android":983090,"web":984479,"home-variant-outline":986023,"text-box-multiple-outline":985784,"download":983514,"arrow-left":983117,"dots-horizontal":983512,"chevron-right":983362,"close":983382,"cellphone-key":985422,"message-plus-outline":987323,"email-outline":983536,"shield-lock":985501,"chevron-left":983361,"minus":983924,"crown":983461,"account-cog":988016,"two-factor-authentication":985519,"information-outline":983805,"logout":983875,"autorenew":983146,"sync-alert":984295,"shape":985137,"circle-half":988053,"brightness-6":983263,"note-edit-outline":989058,"format-line-spacing":983672,"format-size":983679,"format-font":984790,"radar":984119,"arrow-decision-outline":985534,"fingerprint":983607,"eye-off-outline":984785,"folder":983627,"lock":983870,"form-textbox":984590,"bell-outline":983196,"bell-ring":983198,"bug":983268,"mail":986811,"file-document":983577,"mastodon":985809,"twitter":984388,"discord":984687,"open-source-initiative":986030,"monitor":983929,"chart-timeline":984686,"cellphone-arrow-down":985557,"alpha-v":985859,"circle-small":985567,"upload":984402,"file-check":983574,"file":983572,"alert-circle-outline":984534,"check-all":983341,"shield-key-outline":986053,"dots-vertical":983513,"emoticon-wink":986232,"sync":984294,"shield":984216,"billboard":987152,"cellphone":983324,"cellphone-lock":985423,"file-lock":983585,"image-multiple":983801,"harddisk":983754,"file-cabinet":985782,"refresh":984144,"emoticon":986216,"palette":984024,"pin":984067,"format-bold":983652,"table":984299,"language-markdown":983892,"gesture-tap-button":987816,"send-lock":985069,"bomb":984721,"file-pdf-box":983590,"language-html5":983837,"clipboard-text-outline":985656,"invert-colors":983809,"select-all":984198,"cog-outline":985275,"arrow-top-right-thick":985542,"checkbox-blank-circle":983343,"note":983962,"drag":983515,"menu-down":983901,"alert-circle":983080,"reload":984147,"card-text":985975,"open-in-new":984012,"eye":983560}
|
+{"menu":983900,"lock-open-outline":983872,"key-outline":986582,"pin-off-outline":985392,"pin-outline":985393,"star-off":984273,"star-outline":984274,"link-variant-remove":987393,"link-variant":983865,"bell":983194,"bell-off-outline":985745,"check":983340,"magnify":983881,"plus":984085,"view-list-outline":988299,"view-list":984434,"play":984074,"pause":984036,"notebook-outline":986815,"text-short":985513,"radiobox-marked":984126,"radiobox-blank":984125,"sort-descending":984253,"information":983804,"sort-ascending":984252,"alert":983078,"arrow-right":983124,"bookmark-outline":983235,"checkbox-marked":983346,"checkbox-blank-outline":983345,"unfold-less-horizontal":984398,"minus-circle":983926,"vibrate":984422,"volume-high":984446,"checkbox-blank-circle-outline":983344,"check-circle-outline":984545,"chevron-up":983363,"chevron-down":983360,"calendar":983277,"minus-circle-outline":983927,"close-circle-outline":983386,"qrcode":984114,"text":985512,"cloud":983391,"restore":985499,"delete-outline":985575,"link":983863,"square-edit-outline":985356,"pencil":984043,"delete-restore":985113,"delete":983476,"notebook":985134,"attachment":983142,"history":983770,"clock-outline":983376,"content-copy":983439,"share-variant":984215,"pencil-lock":984046,"sync-off":984296,"content-duplicate":983441,"clock-plus-outline":989282,"cloud-upload-outline":985982,"export":983559,"message-badge-outline":989506,"book-outline":985956,"pound":984099,"cloud-upload":983399,"star":984270,"key":983814,"account-outline":983059,"email":983534,"backup-restore":983151,"update":984752,"android":983090,"web":984479,"home-variant-outline":986023,"text-box-multiple-outline":985784,"download":983514,"circle-small":985567,"fingerprint":983607,"upload":984402,"file-check":983574,"form-textbox":984590,"file":983572,"alert-circle-outline":984534,"check-all":983341,"shield-key-outline":986053,"arrow-left":983117,"message-plus-outline":987323,"email-outline":983536,"cellphone-key":985422,"dots-vertical":983513,"close":983382,"chevron-right":983362,"emoticon-wink":986232,"sync":984294,"shield":984216,"billboard":987152,"cellphone":983324,"cellphone-lock":985423,"lock":983870,"file-lock":983585,"image-multiple":983801,"harddisk":983754,"file-cabinet":985782,"refresh":984144,"emoticon":986216,"palette":984024,"pin":984067,"format-bold":983652,"table":984299,"language-markdown":983892,"gesture-tap-button":987816,"send-lock":985069,"bomb":984721,"file-pdf-box":983590,"language-html5":983837,"clipboard-text-outline":985656,"theme-light-dark":984334,"invert-colors":983809,"crown":983461,"select-all":984198,"minus":983924,"information-outline":983805,"cog-outline":985275,"arrow-top-right-thick":985542,"checkbox-blank-circle":983343,"sync-alert":984295,"bookmark":983232,"note":983962,"dots-horizontal":983512,"shield-lock":985501,"chevron-left":983361,"account-cog":988016,"two-factor-authentication":985519,"logout":983875,"autorenew":983146,"shape":985137,"circle-half":988053,"brightness-6":983263,"note-edit-outline":989058,"format-line-spacing":983672,"format-size":983679,"format-font":984790,"radar":984119,"arrow-decision-outline":985534,"eye-off-outline":984785,"folder":983627,"bell-outline":983196,"bell-ring":983198,"bug":983268,"mail":986811,"file-document":983577,"mastodon":985809,"twitter":984388,"discord":984687,"open-source-initiative":986030,"monitor":983929,"chart-timeline":984686,"cellphone-arrow-down":985557,"alpha-v":985859,"alert-circle":983080,"reload":984147,"card-text":985975,"open-in-new":984012,"eye":983560,"drag":983515,"menu-down":983901}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.old.json b/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.old.json
|
diff --git a/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.old.json b/node_modules/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.old.json
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ const EXTRA_ICON_NAMES = [
|
|||||||
"close-circle-outline",
|
"close-circle-outline",
|
||||||
"qrcode",
|
"qrcode",
|
||||||
"text",
|
"text",
|
||||||
"cloud"
|
"cloud",
|
||||||
|
"restore"
|
||||||
];
|
];
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default class Lookup {
|
|||||||
)
|
)
|
||||||
.selectFrom("notes")
|
.selectFrom("notes")
|
||||||
.$if(!!noteIds && noteIds.length > 0, (eb) =>
|
.$if(!!noteIds && noteIds.length > 0, (eb) =>
|
||||||
eb.where("id", "in", noteIds!)
|
eb.where("notes.id", "in", noteIds!)
|
||||||
)
|
)
|
||||||
.$if(!!limit, (eb) => eb.limit(limit!))
|
.$if(!!limit, (eb) => eb.limit(limit!))
|
||||||
.where(isFalse("notes.deleted"))
|
.where(isFalse("notes.deleted"))
|
||||||
|
|||||||
Reference in New Issue
Block a user