diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7e804eb136..933619de73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,79 +1,83 @@ name: CI + on: push: - branches: [main] + branches: + - 'main' + pull_request: - branches: [main] + branches: + - 'main' + jobs: - build-macos: - runs-on: macOS-latest + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: ubuntu-latest + flutter_profile: development-linux-x86 + - os: macos-latest + flutter_profile: development-mac + runs-on: ${{ matrix.os }} + steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v2 + + - id: rust_toolchain + uses: actions-rs/toolchain@v1 with: toolchain: stable - - name: Checkout Flutter - uses: actions/checkout@v2 + + - id: flutter + uses: subosito/flutter-action@v2 with: - repository: flutter/flutter - path: flutter - - name: Flutter - working-directory: flutter - run: | - echo "$(pwd)/bin" >> $GITHUB_PATH - export PATH="$PATH:$(pwd)/bin" - flutter channel stable - flutter config --enable-macos-desktop - flutter doctor + channel: 'stable' + cache: true + + - name: Cache Cargo + uses: actions/cache@v2 + with: + path: | + ~/.cargo + key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }} + + - name: Cache Rust + uses: actions/cache@v2 + with: + path: | + frontend/rust-lib/target + key: ${{ runner.os }}-rust-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }} + + - name: Setup Environment + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub + sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list + sudo apt-get update + sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev + elif [ "$RUNNER_OS" == "macOS" ]; then + echo 'do nothing' + fi + shell: bash + - name: Deps working-directory: frontend run: | - cargo install --force cargo-make - cargo install --force duckscript_cli + cargo install cargo-make + cargo install duckscript_cli cargo make flowy_dev - echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH + + - name: Config Flutter + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + flutter config --enable-linux-desktop + elif [ "$RUNNER_OS" == "macOS" ]; then + flutter config --enable-macos-desktop + fi + shell: bash + - name: Build working-directory: frontend - run: cargo make --profile production-mac-x86 appflowy - build-ubuntu: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Packages run: | - sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub - sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list - sudo apt-get update - sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev - - name: Rust - run: | - curl \ - --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source $HOME/.cargo/env - rustup toolchain install stable - rustup default stable - - name: Checkout Flutter - uses: actions/checkout@v2 - with: - repository: flutter/flutter - path: flutter - - name: Flutter - working-directory: flutter - run: | - echo "$(pwd)/bin" >> $GITHUB_PATH - export PATH="$PATH:$(pwd)/bin" - flutter channel stable - flutter config --enable-linux-desktop - flutter doctor - - name: Deps - working-directory: frontend - run: | - cargo install --force cargo-make - cargo install --force duckscript_cli - cargo make flowy_dev - echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH - - name: Build - working-directory: frontend - run: cargo make --profile production-linux-x86 appflowy + cargo make --profile ${{ matrix.flutter_profile }} appflowy-dev \ No newline at end of file diff --git a/.github/workflows/dart_test.yml b/.github/workflows/dart_test.yml index b6b633cdc1..370c0d6021 100644 --- a/.github/workflows/dart_test.yml +++ b/.github/workflows/dart_test.yml @@ -22,7 +22,9 @@ jobs: with: toolchain: stable - name: Deps Flutter - run: flutter packages pub get + run: | + flutter config --enable-linux-desktop + flutter doctor working-directory: frontend/app_flowy - name: Deps Rust working-directory: frontend @@ -34,15 +36,16 @@ jobs: - name: Code Generation working-directory: frontend/app_flowy run: | + flutter packages pub get flutter packages pub run easy_localization:generate -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart flutter packages pub run build_runner build --delete-conflicting-outputs - name: Build FlowySDK working-directory: frontend run: | - flutter config --enable-linux-desktop cargo make --profile development-linux-x86 flowy-sdk-dev - name: Run bloc tests working-directory: frontend/app_flowy run: | + flutter pub get flutter test diff --git a/README.md b/README.md index 2c80d0aba3..4ee222140a 100644 --- a/README.md +++ b/README.md @@ -29,19 +29,6 @@ You are in charge of your data and customizations. Please view the [documentation](https://appflowy.gitbook.io/docs/essential-documentation/install-appflowy/installation-methods) for OS specific installation instructions. -You can also try AppFlowy using the docker image: - -``` -docker run --rm \ - -v $HOME/.Xauthority:/root/.Xauthority:rw \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v /dev/dri:/dev/dri \ - -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \ - -v appflowy-data:/home/appflowy \ - -e DISPLAY=${DISPLAY} \ - appflowyio/appflowy_client:latest -``` - ## Built With * [Flutter](https://flutter.dev/) diff --git a/commitlint.config.js b/commitlint.config.js index 91e40054f0..c59a378e48 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,20 +1,24 @@ // module.exports = {extends: ['@commitlint/config-conventional']} module.exports = { rules: { - 'type-enum': [2, 'always', ['chore', 'ci', 'docs', 'feat', 'fix', 'refactor', 'style', 'test']], - 'body-leading-blank': [1, 'always'], - 'body-max-line-length': [2, 'always', 100], - 'footer-leading-blank': [1, 'always'], - 'footer-max-line-length': [2, 'always', 100], 'header-max-length': [2, 'always', 100], + + 'type-enum': [2, 'always', ['build', 'chore', 'ci', 'docs', 'feat', 'feature', 'fix', 'refactor', 'style', 'test']], + 'type-empty': [2, 'never'], + 'type-case': [2, 'always', 'lower-case'], + + 'subject-empty': [2, 'never'], 'subject-case': [ - 2, + 0, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], ], - 'subject-empty': [2, 'never'], - 'type-empty': [2, 'never'], - 'type-case': [2, 'always', 'lower-case'], - 'body-case': [2, 'never', []] + + 'body-leading-blank': [2, 'always'], + 'body-max-line-length': [2, 'always', 200], + 'body-case': [0, 'never', []], + + 'footer-leading-blank': [1, 'always'], + 'footer-max-line-length': [2, 'always', 100] }, }; diff --git a/frontend/app_flowy/assets/translations/ca-ES.json b/frontend/app_flowy/assets/translations/ca-ES.json new file mode 100644 index 0000000000..d08639f5cf --- /dev/null +++ b/frontend/app_flowy/assets/translations/ca-ES.json @@ -0,0 +1,145 @@ +{ + "appName": "AppFlowy", + "defaultUsername": "Jo", + "welcomeText": "Benvingut a @:appName", + "githubStarText": "Preferit a Github", + "subscribeNewsletterText": "Subscriu-me al butlletí", + "letsGoButtonText": "Endavant", + "title": "Títol", + "signUp": { + "buttonText": "Registra't", + "title": "Registra't a @:appName", + "getStartedText": "Comencem", + "emptyPasswordError": "La contrasenya no pot ser buida", + "repeatPasswordEmptyError": "La contrasenya repetida no pot ser buida", + "unmatchedPasswordError": "Les contrasenyes no concorden", + "alreadyHaveAnAccount": "Ja tens un compte?", + "emailHint": "Correu electrònic", + "passwordHint": "Contrasenya", + "repeatPasswordHint": "Repeteix la contrasenya" + }, + "signIn": { + "loginTitle": "Inicia sessió a @:appName", + "loginButtonText": "Inicia sessió", + "buttonText": "Inicia sessió", + "forgotPassword": "Has oblidat la contrasenya?", + "emailHint": "Correu electrònic", + "passwordHint": "Contrasenya", + "dontHaveAnAccount": "No tens un compte?", + "repeatPasswordEmptyError": "La contrasenya repetida no pot ser buida", + "unmatchedPasswordError": "Les contrasenyes no concorden" + }, + "workspace": { + "create": "Crear un espai de treball", + "hint": "espai de treball", + "notFoundError": "No s'ha trobat l'espai de treball" + }, + "shareAction": { + "buttonText": "Compartir", + "workInProgress": "Pròximament", + "markdown": "Markdown", + "copyLink": "Copiar l'enllaç" + }, + "disclosureAction": { + "rename": "Canviar el nom", + "delete": "Eliminar", + "duplicate": "Duplicar" + }, + "blankPageTitle": "Pàgina en blanc", + "newPageText": "Nova pàgina", + "trash": { + "text": "Paperera", + "restoreAll": "Recuperar-ho tot", + "deleteAll": "Eliminar-ho tot", + "pageHeader": { + "fileName": "Nom del fitxer", + "lastModified": "Última modificació", + "created": "Creat" + } + }, + "deletePagePrompt": { + "text": "Aquest pàgina es troba a la paperera", + "restore": "Recuperar-la", + "deletePermanent": "Elimina-la" + }, + "dialogCreatePageNameHint": "Nom de la pàgina", + "questionBubble": { + "whatsNew": "Què hi ha de nou?", + "help": "Ajuda i Suport", + "debug": { + "name": "Informació de depuració", + "success": "S'ha copiat la informació de depuració!", + "fail": "No es pot copiar la informació de depuració" + } + }, + "menuAppHeader": { + "addPageTooltip": "Afegeix ràpidament una pàgina dins", + "defaultNewPageName": "Sense títol", + "renameDialog": "Canviar el nom" + }, + "toolbar": { + "undo": "Desfer", + "redo": "Refer", + "bold": "Negreta", + "italic": "Cursiva", + "underline": "Text subratllar", + "strike": "Ratllat", + "numList": "Llista numerada", + "bulletList": "Llista de punts", + "checkList": "Llista de comprovació", + "inlineCode": "Inserir codi", + "quote": "Bloc citat", + "header": "Capçalera", + "highlight": "Subratllar" + }, + "tooltip": { + "lightMode": "Canviar a mode clar", + "darkMode": "Canviar a mode fosc" + }, + "contactsPage": { + "title": "Contactes", + "whatsHappening": "Que passa aquesta setmana?", + "addContact": "Afegir un contacte", + "editContact": "Editar un contacte" + }, + "button": { + "OK": "OK", + "Cancel": "Cancel·lar", + "signIn": "Iniciar sessió", + "signOut": "Tancar sessió", + "complete": "Completar", + "save": "Guardar" + }, + "label": { + "welcome": "Benvingut!", + "firstName": "Nom", + "middleName": "Segon Nom", + "lastName": "Cognom", + "stepX": "Pas {X}" + }, + "oAuth": { + "err": { + "failedTitle": "No s'ha pogut connectar al teu compte.", + "failedMsg": "Assegureu-vos que heu completat el procés d'inici de sessió al vostre navegador." + }, + "google": { + "title": "Iniciar sessió amb Google", + "instruction1": "Per importar els vostres contactes de Google, haureu d'autoritzar aquesta aplicació mitjançant el vostre navegador web.", + "instruction2": "Copia aquest codi clicant la icona o seleccionant el text:", + "instruction3": "Navega al següent enllaç amb el teu navegador i insereix el codi anterior:", + "instruction4": "Pressiona el botó d'avall una vegada hagis completat el registre:" + } + }, + "settings": { + "title": "Configuració", + "menu": { + "appearance": "Aparença", + "language": "Idioma", + "open": "Obrir la configuració" + }, + "appearance": { + "lightLabel": "Mode Clar", + "darkLabel": "Mode Fosc" + } + } +} diff --git a/frontend/app_flowy/assets/translations/de-DE.json b/frontend/app_flowy/assets/translations/de-DE.json new file mode 100644 index 0000000000..5e1e5cd901 --- /dev/null +++ b/frontend/app_flowy/assets/translations/de-DE.json @@ -0,0 +1,146 @@ +{ + "appName": "AppFlowy", + "defaultUsername": "Ich", + "welcomeText": "Willkommen bei @:appName", + "githubStarText": "GitHub Star vergeben", + "subscribeNewsletterText": "Abonniere den Newsletter", + "letsGoButtonText": "Los geht's", + "title": "Titel", + "signUp": { + "buttonText": "Registrieren", + "title": "Registriere dich bei @:appName", + "getStartedText": "Erste Schritte", + "emptyPasswordError": "Passwort darf nicht leer sein", + "repeatPasswordEmptyError": "Passwortwiederholung darf nicht leer sein", + "unmatchedPasswordError": "Passwörter stimmen nicht überein", + "alreadyHaveAnAccount": "Bereits registriert?", + "emailHint": "E-Mail", + "passwordHint": "Passwort", + "repeatPasswordHint": "Wiederhole Passwort" + }, + "signIn": { + "loginTitle": "Bei @:appName einloggen", + "loginButtonText": "Anmelden", + "buttonText": "Anmelden", + "forgotPassword": "Passwort vergessen?", + "emailHint": "E-Mail", + "passwordHint": "Passwort", + "dontHaveAnAccount": "Du besitzt noch kein Konto?", + "repeatPasswordEmptyError": "Passwortwiederholung darf nicht leer sein", + "unmatchedPasswordError": "Passwörter stimmen nicht überein" + }, + "workspace": { + "create": "Arbeitsbereich erstellen", + "hint": "Arbeitsbereich", + "notFoundError": "Arbeitsbereich nicht gefunden" + }, + "shareAction": { + "buttonText": "Teilen", + "workInProgress": "Demnächst verfügbar", + "markdown": "Markdown", + "copyLink": "Link kopieren" + }, + "disclosureAction": { + "rename": "Umbenennen", + "delete": "Löschen", + "duplicate": "Duplizieren" + }, + "blankPageTitle": "Leere Seite", + "newPageText": "Neue Seite", + "trash": { + "text": "Papierkorb", + "restoreAll": "Alles wiederherstellen", + "deleteAll": "Alles löschen", + "pageHeader": { + "fileName": "Dateiname", + "lastModified": "Letzte Änderung", + "created": "Erstellt" + } + }, + "deletePagePrompt": { + "text": "Diese Seite ist im Papierkorb", + "restore": "Seite wiederherstellen", + "deletePermanent": "Dauerhaft löschen" + }, + "dialogCreatePageNameHint": "Seitenname", + "questionBubble": { + "whatsNew": "Was gibt es Neues?", + "help": "Hilfe & Support", + "debug": { + "name": "Debug-Informationen", + "success": "Debug-Informationen in die Zwischenablage kopiert!", + "fail": "Debug-Informationen können nicht in die Zwischenablage kopiert werden" + } + }, + "menuAppHeader": { + "addPageTooltip": "Schnell eine Seite innerhalb hinzufügen", + "defaultNewPageName": "Unbenannt", + "renameDialog": "Umbenennen" + }, + "toolbar": { + "undo": "Rückgängig", + "redo": "Wiederherstellen", + "bold": "Fett", + "italic": "Kursiv", + "underline": "Unterstreichen", + "strike": "Durchstreichen", + "numList": "Nummerierte Liste", + "bulletList": "Aufzählung", + "checkList": "Checkliste", + "inlineCode": "Inline-Code", + "quote": "Zitat", + "header": "Überschrift", + "highlight": "Hervorhebung" + }, + "tooltip": { + "lightMode": "In den hellen Modus wechseln", + "darkMode": "In den dunklen Modus wechseln" + }, + "contactsPage": { + "title": "Kontakte", + "whatsHappening": "Was geschieht diese Woche?", + "addContact": "Kontakt hinzufügen", + "editContact": "Kontakt bearbeiten" + }, + "button": { + "OK": "OK", + "Cancel": "Abbrechen", + "signIn": "Anmelden", + "signOut": "Abmelden", + "complete": "Fertig", + "save": "Speichern" + }, + "label": { + "welcome": "Willkommen!", + "firstName": "Vorname", + "middleName": "Zweiter Vorname", + "lastName": "Nachname", + "stepX": "Schritt {X}" + }, + "oAuth": { + "err": { + "failedTitle": "Keine Verbindung zu Ihrem Konto möglich.", + "failedMsg": "Bitte vergewissern Sie sich, dass Sie den Anmeldevorgang in Ihrem Browser abgeschlossen haben." + }, + "google": { + "title": "GOOGLE ANMELDUNG", + "instruction1": "Um Ihre Google-Kontakte zu importieren, müssen Sie diese Anwendung über Ihren Webbrowser autorisieren.", + "instruction2": "Kopieren Sie diesen Code in Ihre Zwischenablage, indem Sie auf das Symbol klicken oder den Text auswählen:", + "instruction3": "Rufen Sie den folgenden Link in Ihrem Webbrowser auf, und geben Sie den obigen Code ein:", + "instruction4": "Klicken Sie unten auf die Schaltfläche, wenn Sie die Anmeldung abgeschlossen haben:" + } + }, + "settings": { + "title": "Einstellungen", + "menu": { + "appearance": "Aussehen", + "language": "Sprache", + "open": "Einstellungen öffnen" + }, + "appearance": { + "lightLabel": "Heller Modus", + "darkLabel": "Dunkler Modus" + } + } + } + \ No newline at end of file diff --git a/frontend/app_flowy/assets/translations/fr-CA.json b/frontend/app_flowy/assets/translations/fr-CA.json index 7d7c51d22b..329576028b 100644 --- a/frontend/app_flowy/assets/translations/fr-CA.json +++ b/frontend/app_flowy/assets/translations/fr-CA.json @@ -1,75 +1,75 @@ { "appName": "AppFlowy", "defaultUsername": "Moi", - "welcomeText": "Bienvenu à @:appName", - "githubStarText": "Favorier sur GitHub", + "welcomeText": "Bienvenue sur @:appName", + "githubStarText": "Favoriser sur GitHub", "subscribeNewsletterText": "Abonnez-vous à notre courriel", "letsGoButtonText": "Allons-y", "title": "Titre", "signUp": { - "buttonText": "S'abonner", - "title": "S'abonner à @:appName", + "buttonText": "S'inscrire", + "title": "S'inscrire à @:appName", "getStartedText": "Commencer", - "emptyPasswordError": "Mot de passe ne doit pas être vide", + "emptyPasswordError": "Vous n'avez pas saisi votre mot de passe", "repeatPasswordEmptyError": "Mot de passe ne doit pas être vide", - "unmatchedPasswordError": "Les mots de pass ne concordent pas", + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques", "alreadyHaveAnAccount": "Avez-vous déjà un compte?", "emailHint": "courriel", "passwordHint": "Mot de passe", - "repeatPasswordHint": "Resaisir le mot de passe" + "repeatPasswordHint": "Ressaisir votre mot de passe" }, "signIn": { - "loginTitle": "Se connecter à @:appName", + "loginTitle": "Connexion à @:appName", "loginButtonText": "Connexion", - "buttonText": "Connexion", + "buttonText": "Se connecter", "forgotPassword": "Mot de passe oublié?", "emailHint": "courriel", "passwordHint": "Mot de passe", "dontHaveAnAccount": "Vous n'avez pas de compte?", "repeatPasswordEmptyError": "Mot de passe ne doit pas être vide", - "unmatchedPasswordError": "Les mots de passe ne concordent pas" + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques" }, "workspace": { - "create": "Créer une espace de travail", - "hint": "espace de travail", - "notFoundError": "Espace de travail non trouvé" + "create": "Créer un espace de travail", + "hint": "Espace de travail", + "notFoundError": "Espace de travail introuvable" }, "shareAction": { "buttonText": "Partager", "workInProgress": "Bientôt disponible", "markdown": "Markdown", - "copyLink": "Copier le liens" + "copyLink": "Copier le lien" }, "disclosureAction": { "rename": "Renommer", "delete": "Supprimer", "duplicate": "Dupliquer" }, - "blankPageTitle": "Page vide", + "blankPageTitle": "Page vierge", "newPageText": "Nouvelle page", "trash": { - "text": "Poubelle", + "text": "Corbeille", "restoreAll": "Tout récupérer", "deleteAll": "Tout supprimer", "pageHeader": { "fileName": "Nom de fichier", "lastModified": "Dernière modification", - "created": "Crée" + "created": "Créé" } }, "deletePagePrompt": { - "text": "Cette page est dans la poubelle", + "text": "Cette page est dans la corbeille", "restore": "Récupérer la page", - "deletePermanent": "Supprimer en permanence" + "deletePermanent": "Supprimer définitivement" }, "dialogCreatePageNameHint": "Nom de la page", "questionBubble": { - "whatsNew": "Quoi de neuf?", - "help": "Aide & Support Technique", + "whatsNew": "Nouveautés", + "help": "Aide et Support Technique", "debug": { - "name": "Info du système", + "name": "Infos du système", "success": "Info copié!", - "fail": "Incapable de copié l'info" + "fail": "Impossible de copier l'info" } }, "menuAppHeader": { @@ -79,67 +79,67 @@ }, "toolbar": { "undo": "Annuler", - "redo": "Refaire", + "redo": "Rétablir", "bold": "Gras", "italic": "Italique", - "underline": "Souligné", + "underline": "Souligner", "strike": "Barré", "numList": "Liste numérotée", "bulletList": "Liste à puces", "checkList": "Liste de contrôle", "inlineCode": "Code en ligne", "quote": "Citation", - "header": "en-tête", + "header": "En-tête", "highlight": "Surligner" }, "tooltip": { - "lightMode": "Aller en mode claire", - "darkMode": "Aller en mode foncé" + "lightMode": "Passer en mode clair", + "darkMode": "Passer en mode sombre" }, "contactsPage": { "title": "Contacts", "whatsHappening": "Quoi de neuf?", - "addContact": "Ajouter Contact", - "editContact": "Éditer Contact" + "addContact": "Ajouter un contact", + "editContact": "Modifier le contact" }, "button": { "OK": "OK", "Cancel": "Annuler", - "signIn": "Connecter", - "signOut": "Déconnecter", - "complete": "Complêt", + "signIn": "Se connecter", + "signOut": "Se déconnecter", + "complete": "Achevé", "save": "Sauvegarder" }, "label": { - "welcome": "Bienvenu!", + "welcome": "Bienvenue!", "firstName": "Prénom", - "middleName": "Nom", + "middleName": "Deuxième nom", "lastName": "Nom de famille", "stepX": "Étape {X}" }, "oAuth": { "err": { - "failedTitle": "Incapable de connecter à votre compte.", + "failedTitle": "Incapable de se connecter à votre compte.", "failedMsg": "SVP vous assurrez d'avoir complèté le processus d'enregistrement dans votre fureteur." }, "google": { "title": "S'identifier avec Google", "instruction1": "Pour importer vos contacts Google, vous devez autoriser cette application à l'aide de votre navigateur Web.", - "instruction2": "Copiez ce code dans votre presse-papiers en cliquant sur l'icône ou en sélectionnant le texte :", - "instruction3": "Accédez au lien suivant dans votre navigateur Web et saisissez le code ci-dessus :", - "instruction4": "Appuyez sur le bouton ci-dessous lorsque vous avez terminé votre inscription :" + "instruction2": "Copiez ce code dans votre presse-papiers en cliquant sur l'icône ou en sélectionnant le texte:", + "instruction3": "Accédez au lien suivant dans votre navigateur Web et saisissez le code ci-dessus:", + "instruction4": "Appuyez sur le bouton ci-dessous lorsque vous avez terminé votre inscription:" } }, "settings": { - "title": "Réglages", + "title": "Paramètres", "menu": { "appearance": "Apparence", "language": "Langue", - "open": "ouvrir les paramètres" + "open": "Ouvrir les paramètres" }, "appearance": { - "lightLabel": "Mode claire", - "darkLabel": "Mode foncé" + "lightLabel": "Mode clair", + "darkLabel": "Mode sombre" } } } diff --git a/frontend/app_flowy/assets/translations/fr.json b/frontend/app_flowy/assets/translations/fr-FR.json similarity index 61% rename from frontend/app_flowy/assets/translations/fr.json rename to frontend/app_flowy/assets/translations/fr-FR.json index 27c752d212..c05c9aba27 100644 --- a/frontend/app_flowy/assets/translations/fr.json +++ b/frontend/app_flowy/assets/translations/fr-FR.json @@ -1,44 +1,44 @@ { "appName": "AppFlowy", "defaultUsername": "Moi", - "welcomeText": "Bienvenue à @:appName", - "githubStarText": "Favorier sur GitHub", - "subscribeNewsletterText": "S'inscrire à la Bulletin", + "welcomeText": "Bienvenue sur @:appName", + "githubStarText": "Favoriser sur GitHub", + "subscribeNewsletterText": "S'inscrire à la Newsletter", "letsGoButtonText": "Allons-y", "title": "Titre", "signUp": { "buttonText": "S'inscrire", - "title": "Inscrivez-vous pour @:appName", + "title": "Inscrivez-vous sur @:appName", "getStartedText": "Commencer", - "emptyPasswordError": "Mot de passe ne peut pas être vide", - "repeatPasswordEmptyError": "Le mot de passe de répétition ne peut pas être vide", - "unmatchedPasswordError": "Le mot de passe de répétition n'est pas le même que le mot de passe", - "alreadyHaveAnAccount": "Vous avez déjà un compte?", + "emptyPasswordError": "Vous n'avez pas saisi votre mot de passe", + "repeatPasswordEmptyError": "Vous n'avez pas ressaisi votre mot de passe", + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques", + "alreadyHaveAnAccount": "Avez-vous déjà un compte ?", "emailHint": "Email", "passwordHint": "Mot de passe", - "repeatPasswordHint": "Répéter le mot de passe" + "repeatPasswordHint": "Ressaisir votre mot de passe" }, "signIn": { "loginTitle": "Connexion à @:appName", "loginButtonText": "Connexion", "buttonText": "Se connecter", - "forgotPassword": "Mot de passe oublié?", + "forgotPassword": "Mot de passe oublié ?", "emailHint": "Email", "passwordHint": "Mot de passe", - "dontHaveAnAccount": "Don't have an account?", - "repeatPasswordEmptyError": "Le mot de passe de répétition ne peut pas être vide", - "unmatchedPasswordError": "Le mot de passe de répétition n'est pas le même que le mot de passe" + "dontHaveAnAccount": "Vous n'avez pas encore créé votre compte ?", + "repeatPasswordEmptyError": "Vous n'avez pas ressaisi votre mot de passe", + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques" }, "workspace": { "create": "Créer un espace de travail", - "hint": "espace de travail", - "notFoundError": "L'espace de travail pas trouvé" + "hint": "Espace de travail", + "notFoundError": "Espace de travail introuvable" }, "shareAction": { "buttonText": "Partager", "workInProgress": "Bientôt disponible", "markdown": "Markdown", - "copyLink": "Copier Lien" + "copyLink": "Copier le lien" }, "disclosureAction": { "rename": "Renommer", @@ -49,16 +49,16 @@ "newPageText": "Nouvelle page", "trash": { "text": "Corbeille", - "restoreAll": "Restaurer Tout", - "deleteAll": "Supprimer Tout", + "restoreAll": "Restaurer tout", + "deleteAll": "Supprimer tout", "pageHeader": { "fileName": "Nom de fichier", - "lastModified": "Dernière Modification", + "lastModified": "Dernière modification", "created": "Créé" } }, "deletePagePrompt": { - "text": "Cette page est dans la corbeille", + "text": "Cette page a été supprimée, vous pouvez la retrouver dans la corbeille", "restore": "Restaurer la page", "deletePermanent": "Supprimer définitivement" }, @@ -68,8 +68,8 @@ "help": "Aide et Support", "debug": { "name": "Informations de Débogage", - "success": "Informations de débogage copiées dans le presse-papiers!", - "fail": "Impossible de copier informations de débogage dans le presse-papiers" + "success": "Informations de Débogage copiées dans le presse-papiers!", + "fail": "Impossible de copier les informations de Débogage dans le presse-papiers" } }, "menuAppHeader": { @@ -84,34 +84,34 @@ "italic": "Italique", "underline": "Souligner", "strike": "Barré", - "numList": "Liste Numérotée", - "bulletList": "Liste à Puces", - "checkList": "Liste de Contrôle", - "inlineCode": "Code en Ligne", - "quote": "Bloc Citation", + "numList": "Liste numérotée", + "bulletList": "Liste à puces", + "checkList": "To-Do List", + "inlineCode": "Code", + "quote": "Bloc de citation", "header": "En-tête", "highlight": "Surligner" }, "tooltip": { - "lightMode": "Passer en Mode Clair", - "darkMode": "Passer en Mode Sombre" + "lightMode": "Passer en mode clair", + "darkMode": "Passer en mode sombre" }, "contactsPage": { "title": "Contacts", - "whatsHappening": "Que se passe-t-il cette semaine?", + "whatsHappening": "Que se passe-t-il cette semaine ?", "addContact": "Ajouter un contact", "editContact": "Modifier le contact" }, "button": { "OK": "OK", "Cancel": "Annuler", - "signIn": "Se Connecter", - "signOut": "Se Déconnecter", - "complete": "Complêt", + "signIn": "Se connecter", + "signOut": "Se déconnecter", + "complete": "Achevé", "save": "Enregistrer" }, "label": { - "welcome": "Bienvenue!", + "welcome": "Bienvenue !", "firstName": "Prénom", "middleName": "Deuxième prénom", "lastName": "Nom", @@ -135,11 +135,11 @@ "menu": { "appearance": "Apparence", "language": "Langue", - "open": "Ouvrir les Paramètres" + "open": "Ouvrir les paramètres" }, "appearance": { - "lightLabel": "Mode Clair", - "darkLabel": "Mode Sombre" + "lightLabel": "Mode clair", + "darkLabel": "Mode sombre" } } } diff --git a/frontend/app_flowy/assets/translations/hu-HU.json b/frontend/app_flowy/assets/translations/hu-HU.json new file mode 100644 index 0000000000..a2f99c55e1 --- /dev/null +++ b/frontend/app_flowy/assets/translations/hu-HU.json @@ -0,0 +1,145 @@ +{ + "appName": "AppFlowy", + "defaultUsername": "Én", + "welcomeText": "Üdvözöl az @:appName", + "githubStarText": "GitHub csillagozás", + "subscribeNewsletterText": "Iratkozz fel a hírlevelünkre", + "letsGoButtonText": "Vágjunk bele", + "title": "Cím", + "signUp": { + "buttonText": "Regisztráció", + "title": "Regisztrálj az @:appName -ra", + "getStartedText": "Kezdés", + "emptyPasswordError": "A jelszó nem lehet üres", + "repeatPasswordEmptyError": "A jelszó megerősítése nem lehet üres", + "unmatchedPasswordError": "A jelszavak nem egyeznek", + "alreadyHaveAnAccount": "Rendelkezel már fiókkal?", + "emailHint": "Email", + "passwordHint": "Jelszó", + "repeatPasswordHint": "Jelszó megerősítése" + }, + "signIn": { + "loginTitle": "Bejelentkezés az @:appName -ba", + "loginButtonText": "Belépés", + "buttonText": "Bejelentkezés", + "forgotPassword": "Elfelejtett jelszó?", + "emailHint": "Email", + "passwordHint": "Jelszó", + "dontHaveAnAccount": "Még nincs fiókod?", + "repeatPasswordEmptyError": "A jelszó megerősítése nem lehet üres", + "unmatchedPasswordError": "A jelszavak nem egyeznek" + }, + "workspace": { + "create": "Új munkaterület létrehozása", + "hint": "munkaterület", + "notFoundError": "munkaterület nem található" + }, + "shareAction": { + "buttonText": "Megosztás", + "workInProgress": "Hamarosan érkezik...", + "markdown": "Markdown", + "copyLink": "Link másolása" + }, + "disclosureAction": { + "rename": "Átnevezés", + "delete": "Törlés", + "duplicate": "Duplikálás" + }, + "blankPageTitle": "Üres oldal", + "newPageText": "Új oldal", + "trash": { + "text": "Kuka", + "restoreAll": "Összes visszaállítása", + "deleteAll": "Összes törlése", + "pageHeader": { + "fileName": "Fájlnév", + "lastModified": "Utoljára módosítva", + "created": "Létrehozva" + } + }, + "deletePagePrompt": { + "text": "Ez az oldal a kukában van", + "restore": "Oldal visszaállítása", + "deletePermanent": "Végleges törlés" + }, + "dialogCreatePageNameHint": "Oldalnév", + "questionBubble": { + "whatsNew": "Újdonságok", + "help": "Segítség & Támogatás", + "debug": { + "name": "Debug Információ", + "success": "Debug információ a vágólapra másolva", + "fail": "A Debug információ nem másolható a vágólapra" + } + }, + "menuAppHeader": { + "addPageTooltip": "Belső oldal hozzáadása", + "defaultNewPageName": "Névtelen", + "renameDialog": "Átnevezés" + }, + "toolbar": { + "undo": "Vissza", + "redo": "Előre", + "bold": "Félkövér", + "italic": "Dőlt", + "underline": "Aláhúzott", + "strike": "Áthúzott", + "numList": "Számozott lista", + "bulletList": "Felsorolás", + "checkList": "Ellenőrző lista", + "inlineCode": "Inline kód", + "quote": "Idézet", + "header": "Címsor", + "highlight": "Kiemelés" + }, + "tooltip": { + "lightMode": "Világos mód", + "darkMode": "Éjjeli mód" + }, + "contactsPage": { + "title": "Kontaktok", + "whatsHappening": "Heti újdonságok", + "addContact": "Új Kontakt", + "editContact": "Kontakt Szerkesztése" + }, + "button": { + "OK": "OK", + "Cancel": "Mégse", + "signIn": "Bejelentkezés", + "signOut": "Kijelentkezés", + "complete": "Kész", + "save": "Mentés" + }, + "label": { + "welcome": "Üdvözlünk!", + "firstName": "Keresztnév", + "middleName": "Középső név", + "lastName": "Vezetéknév", + "stepX": "{X}. lépés" + }, + "oAuth": { + "err": { + "failedTitle": "Sikertelen bejelentkezés.", + "failedMsg": "Kérjük győződj meg róla, hogy elvégezted a bejelentkezési folyamatot a böngésződben" + }, + "google": { + "title": "Bejelentkezés Google-al", + "instruction1": "Ahhoz, hogy hozzáférj a Google Kontaktjaidhoz, kérjük hatalmazd fel ezt az alkalmazást a böngésződben.", + "instruction2": "Másold ezt a kódot a vágólapra az ikonra kattintással vagy a szöveg kijelölésével:", + "instruction3": "Nyisd meg ezt a linket a böngésződben, és írjd be a fenti kódot:", + "instruction4": "Nyomd meg az alábbi gombot, ha elvégezted a registrációt:" + } + }, + "settings": { + "title": "Beállítások", + "menu": { + "appearance": "Megjelenés", + "language": "Nyelv", + "open": "Beállítások megnyitása" + }, + "appearance": { + "lightLabel": "Világos mód", + "darkLabel": "Éjjeli mód" + } + } +} diff --git a/frontend/app_flowy/assets/translations/pt-BR.json b/frontend/app_flowy/assets/translations/pt-BR.json new file mode 100644 index 0000000000..e2f0b27032 --- /dev/null +++ b/frontend/app_flowy/assets/translations/pt-BR.json @@ -0,0 +1,146 @@ +{ + "appName": "AppFlowy", + "defaultUsername": "Me", + "welcomeText": "Bem vindo @:appName", + "githubStarText": "Star on GitHub", + "subscribeNewsletterText": "Se inscreva na Newsletter", + "letsGoButtonText": "Vamos lá", + "title": "Título", + "signUp": { + "buttonText": "Inscreve-se", + "title": "Inscrever-se @:appName", + "getStartedText": "Começar", + "emptyPasswordError": "Senha não pode ser em branco.", + "repeatPasswordEmptyError": "Confirmar a senha não pode ser em branco.", + "unmatchedPasswordError": "As senhas não conferem.", + "alreadyHaveAnAccount": "Já possui uma conta?", + "emailHint": "Email", + "passwordHint": "Senha", + "repeatPasswordHint": "Confirme a senha" + }, + "signIn": { + "loginTitle": "Login to @:appName", + "loginButtonText": "Login", + "buttonText": "Entre", + "forgotPassword": "Esqueceu a senha?", + "emailHint": "Email", + "passwordHint": "Senha", + "dontHaveAnAccount": "Não possui uma conta?", + "repeatPasswordEmptyError": "Confirmar a senha não pode ser em branco.", + "unmatchedPasswordError": "As senhas não conferem." + }, + "workspace": { + "create": "Crie uma área de trabalho", + "hint": "área de trabalho", + "notFoundError": "Área de trabalho não encontrada" + }, + "shareAction": { + "buttonText": "Compartilhar", + "workInProgress": "Em breve", + "markdown": "Markdown", + "copyLink": "Copiar o link" + }, + "disclosureAction": { + "rename": "Renomear", + "delete": "Deletar", + "duplicate": "Duplicar" + }, + "blankPageTitle": "Página em branco", + "newPageText": "Nova página", + "trash": { + "text": "Lixeira", + "restoreAll": "Restaurar todos", + "deleteAll": "Deletar todos", + "pageHeader": { + "fileName": "Nome do arquivo", + "lastModified": "Última modificação", + "created": "Criado" + } + }, + "deletePagePrompt": { + "text": "Está página está na lixeira", + "restore": "Restaurar a oágina", + "deletePermanent": "Deletar permanentemente" + }, + "dialogCreatePageNameHint": "Nome da página", + "questionBubble": { + "whatsNew": "O que há de novo?", + "help": "Ajuda & Suporte", + "debug": { + "name": "Informação de debug", + "success": "Copiar informação de debug para o clipboard!", + "fail": "Falha em copiar a informação de debug para o clipboard" + } + }, + "menuAppHeader": { + "addPageTooltip": "Adicione uma nova página.", + "defaultNewPageName": "Sem título", + "renameDialog": "Renomear" + }, + "toolbar": { + "undo": "Desfazer", + "redo": "Refazer", + "bold": "Negrito", + "italic": "Itálico", + "underline": "Sublinhado", + "strike": "Tachado", + "numList": "Lista numerada", + "bulletList": "Lista com marcadores", + "checkList": "Check List", + "inlineCode": "Embutir código", + "quote": "Citação em bloco", + "header": "Cabeçalho", + "highlight": "Realçar" + }, + "tooltip": { + "lightMode": "Mudar para o modo Claro.", + "darkMode": "Mudar para o modo Escuro." + }, + "contactsPage": { + "title": "Contatos", + "whatsHappening": "O que está acontecendo essa semana?", + "addContact": "Adicionar um contato", + "editContact": "Editar um contato" + }, + "button": { + "OK": "OK", + "Cancel": "Canelar", + "signIn": "Entrar", + "signOut": "Sair", + "complete": "Completar", + "save": "Salvar" + }, + "label": { + "welcome": "Bem vindo!", + "firstName": "Primeiro Nome", + "middleName": "Nome do Meio", + "lastName": "Último Nome", + "stepX": "Passo {X}" + }, + "oAuth": { + "err": { + "failedTitle": "Erro ao conectar a sua conta.", + "failedMsg": "Verifique se você concluiu o processo de login em seu navegador." + }, + "google": { + "title": "GOOGLE SIGN-IN", + "instruction1": "Para importar seus Contatos do Google, você precisará autorizar este aplicativo usando seu navegador web.", + "instruction2": "Copie este código para sua área de transferência clicando no ícone ou selecionando o texto:", + "instruction3": "Navegue até o link a seguir em seu navegador e digite o código acima:", + "instruction4": "Pressione o botão abaixo ao concluir a inscrição:" + } + }, + "settings": { + "title": "Configurações", + "menu": { + "appearance": "Aparência", + "language": "Idioma", + "open": "Abrir as Configurações" + }, + "appearance": { + "lightLabel": "Modo Claro", + "darkLabel": "Modo Escuro" + } + } + } + \ No newline at end of file diff --git a/frontend/app_flowy/lib/startup/tasks/app_widget.dart b/frontend/app_flowy/lib/startup/tasks/app_widget.dart index a50e871795..78158aacc5 100644 --- a/frontend/app_flowy/lib/startup/tasks/app_widget.dart +++ b/frontend/app_flowy/lib/startup/tasks/app_widget.dart @@ -29,11 +29,15 @@ class InitAppWidgetTask extends LaunchTask { EasyLocalization( supportedLocales: const [ // In alphabetical order + Locale('ca', 'ES'), + Locale('de', 'DE'), Locale('en'), Locale('es', 'VE'), - Locale('fr'), + Locale('fr', 'FR'), Locale('fr', 'CA'), + Locale('hu', 'HU'), Locale('it', 'IT'), + Locale('pt', 'BR'), Locale('ru', 'RU'), Locale('zh', 'CN'), ], diff --git a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart deleted file mode 100644 index 80804e8836..0000000000 --- a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart +++ /dev/null @@ -1,1225 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'doc_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$DocumentEventTearOff { - const _$DocumentEventTearOff(); - - Initial initial() { - return const Initial(); - } - - Deleted deleted() { - return const Deleted(); - } - - Restore restore() { - return const Restore(); - } - - RestorePage restorePage() { - return const RestorePage(); - } - - DeletePermanently deletePermanently() { - return const DeletePermanently(); - } -} - -/// @nodoc -const $DocumentEvent = _$DocumentEventTearOff(); - -/// @nodoc -mixin _$DocumentEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentEventCopyWith<$Res> { - factory $DocumentEventCopyWith( - DocumentEvent value, $Res Function(DocumentEvent) then) = - _$DocumentEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DocumentEventCopyWithImpl<$Res> - implements $DocumentEventCopyWith<$Res> { - _$DocumentEventCopyWithImpl(this._value, this._then); - - final DocumentEvent _value; - // ignore: unused_field - final $Res Function(DocumentEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'DocumentEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements DocumentEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $DeletedCopyWith<$Res> { - factory $DeletedCopyWith(Deleted value, $Res Function(Deleted) then) = - _$DeletedCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeletedCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $DeletedCopyWith<$Res> { - _$DeletedCopyWithImpl(Deleted _value, $Res Function(Deleted) _then) - : super(_value, (v) => _then(v as Deleted)); - - @override - Deleted get _value => super._value as Deleted; -} - -/// @nodoc - -class _$Deleted implements Deleted { - const _$Deleted(); - - @override - String toString() { - return 'DocumentEvent.deleted()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Deleted); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return deleted(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return deleted?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (deleted != null) { - return deleted(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return deleted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return deleted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (deleted != null) { - return deleted(this); - } - return orElse(); - } -} - -abstract class Deleted implements DocumentEvent { - const factory Deleted() = _$Deleted; -} - -/// @nodoc -abstract class $RestoreCopyWith<$Res> { - factory $RestoreCopyWith(Restore value, $Res Function(Restore) then) = - _$RestoreCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestoreCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $RestoreCopyWith<$Res> { - _$RestoreCopyWithImpl(Restore _value, $Res Function(Restore) _then) - : super(_value, (v) => _then(v as Restore)); - - @override - Restore get _value => super._value as Restore; -} - -/// @nodoc - -class _$Restore implements Restore { - const _$Restore(); - - @override - String toString() { - return 'DocumentEvent.restore()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Restore); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return restore(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return restore?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (restore != null) { - return restore(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return restore(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return restore?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (restore != null) { - return restore(this); - } - return orElse(); - } -} - -abstract class Restore implements DocumentEvent { - const factory Restore() = _$Restore; -} - -/// @nodoc -abstract class $RestorePageCopyWith<$Res> { - factory $RestorePageCopyWith( - RestorePage value, $Res Function(RestorePage) then) = - _$RestorePageCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestorePageCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $RestorePageCopyWith<$Res> { - _$RestorePageCopyWithImpl( - RestorePage _value, $Res Function(RestorePage) _then) - : super(_value, (v) => _then(v as RestorePage)); - - @override - RestorePage get _value => super._value as RestorePage; -} - -/// @nodoc - -class _$RestorePage implements RestorePage { - const _$RestorePage(); - - @override - String toString() { - return 'DocumentEvent.restorePage()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is RestorePage); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return restorePage(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return restorePage?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (restorePage != null) { - return restorePage(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return restorePage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return restorePage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (restorePage != null) { - return restorePage(this); - } - return orElse(); - } -} - -abstract class RestorePage implements DocumentEvent { - const factory RestorePage() = _$RestorePage; -} - -/// @nodoc -abstract class $DeletePermanentlyCopyWith<$Res> { - factory $DeletePermanentlyCopyWith( - DeletePermanently value, $Res Function(DeletePermanently) then) = - _$DeletePermanentlyCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeletePermanentlyCopyWithImpl<$Res> - extends _$DocumentEventCopyWithImpl<$Res> - implements $DeletePermanentlyCopyWith<$Res> { - _$DeletePermanentlyCopyWithImpl( - DeletePermanently _value, $Res Function(DeletePermanently) _then) - : super(_value, (v) => _then(v as DeletePermanently)); - - @override - DeletePermanently get _value => super._value as DeletePermanently; -} - -/// @nodoc - -class _$DeletePermanently implements DeletePermanently { - const _$DeletePermanently(); - - @override - String toString() { - return 'DocumentEvent.deletePermanently()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is DeletePermanently); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return deletePermanently(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return deletePermanently?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (deletePermanently != null) { - return deletePermanently(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return deletePermanently(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return deletePermanently?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (deletePermanently != null) { - return deletePermanently(this); - } - return orElse(); - } -} - -abstract class DeletePermanently implements DocumentEvent { - const factory DeletePermanently() = _$DeletePermanently; -} - -/// @nodoc -class _$DocumentStateTearOff { - const _$DocumentStateTearOff(); - - _DocumentState call( - {required DocumentLoadingState loadingState, - required bool isDeleted, - required bool forceClose}) { - return _DocumentState( - loadingState: loadingState, - isDeleted: isDeleted, - forceClose: forceClose, - ); - } -} - -/// @nodoc -const $DocumentState = _$DocumentStateTearOff(); - -/// @nodoc -mixin _$DocumentState { - DocumentLoadingState get loadingState => throw _privateConstructorUsedError; - bool get isDeleted => throw _privateConstructorUsedError; - bool get forceClose => throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $DocumentStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentStateCopyWith<$Res> { - factory $DocumentStateCopyWith( - DocumentState value, $Res Function(DocumentState) then) = - _$DocumentStateCopyWithImpl<$Res>; - $Res call( - {DocumentLoadingState loadingState, bool isDeleted, bool forceClose}); - - $DocumentLoadingStateCopyWith<$Res> get loadingState; -} - -/// @nodoc -class _$DocumentStateCopyWithImpl<$Res> - implements $DocumentStateCopyWith<$Res> { - _$DocumentStateCopyWithImpl(this._value, this._then); - - final DocumentState _value; - // ignore: unused_field - final $Res Function(DocumentState) _then; - - @override - $Res call({ - Object? loadingState = freezed, - Object? isDeleted = freezed, - Object? forceClose = freezed, - }) { - return _then(_value.copyWith( - loadingState: loadingState == freezed - ? _value.loadingState - : loadingState // ignore: cast_nullable_to_non_nullable - as DocumentLoadingState, - isDeleted: isDeleted == freezed - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - forceClose: forceClose == freezed - ? _value.forceClose - : forceClose // ignore: cast_nullable_to_non_nullable - as bool, - )); - } - - @override - $DocumentLoadingStateCopyWith<$Res> get loadingState { - return $DocumentLoadingStateCopyWith<$Res>(_value.loadingState, (value) { - return _then(_value.copyWith(loadingState: value)); - }); - } -} - -/// @nodoc -abstract class _$DocumentStateCopyWith<$Res> - implements $DocumentStateCopyWith<$Res> { - factory _$DocumentStateCopyWith( - _DocumentState value, $Res Function(_DocumentState) then) = - __$DocumentStateCopyWithImpl<$Res>; - @override - $Res call( - {DocumentLoadingState loadingState, bool isDeleted, bool forceClose}); - - @override - $DocumentLoadingStateCopyWith<$Res> get loadingState; -} - -/// @nodoc -class __$DocumentStateCopyWithImpl<$Res> - extends _$DocumentStateCopyWithImpl<$Res> - implements _$DocumentStateCopyWith<$Res> { - __$DocumentStateCopyWithImpl( - _DocumentState _value, $Res Function(_DocumentState) _then) - : super(_value, (v) => _then(v as _DocumentState)); - - @override - _DocumentState get _value => super._value as _DocumentState; - - @override - $Res call({ - Object? loadingState = freezed, - Object? isDeleted = freezed, - Object? forceClose = freezed, - }) { - return _then(_DocumentState( - loadingState: loadingState == freezed - ? _value.loadingState - : loadingState // ignore: cast_nullable_to_non_nullable - as DocumentLoadingState, - isDeleted: isDeleted == freezed - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - forceClose: forceClose == freezed - ? _value.forceClose - : forceClose // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc - -class _$_DocumentState implements _DocumentState { - const _$_DocumentState( - {required this.loadingState, - required this.isDeleted, - required this.forceClose}); - - @override - final DocumentLoadingState loadingState; - @override - final bool isDeleted; - @override - final bool forceClose; - - @override - String toString() { - return 'DocumentState(loadingState: $loadingState, isDeleted: $isDeleted, forceClose: $forceClose)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _DocumentState && - (identical(other.loadingState, loadingState) || - const DeepCollectionEquality() - .equals(other.loadingState, loadingState)) && - (identical(other.isDeleted, isDeleted) || - const DeepCollectionEquality() - .equals(other.isDeleted, isDeleted)) && - (identical(other.forceClose, forceClose) || - const DeepCollectionEquality() - .equals(other.forceClose, forceClose))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(loadingState) ^ - const DeepCollectionEquality().hash(isDeleted) ^ - const DeepCollectionEquality().hash(forceClose); - - @JsonKey(ignore: true) - @override - _$DocumentStateCopyWith<_DocumentState> get copyWith => - __$DocumentStateCopyWithImpl<_DocumentState>(this, _$identity); -} - -abstract class _DocumentState implements DocumentState { - const factory _DocumentState( - {required DocumentLoadingState loadingState, - required bool isDeleted, - required bool forceClose}) = _$_DocumentState; - - @override - DocumentLoadingState get loadingState => throw _privateConstructorUsedError; - @override - bool get isDeleted => throw _privateConstructorUsedError; - @override - bool get forceClose => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$DocumentStateCopyWith<_DocumentState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$DocumentLoadingStateTearOff { - const _$DocumentLoadingStateTearOff(); - - _Loading loading() { - return const _Loading(); - } - - _Finish finish(Either successOrFail) { - return _Finish( - successOrFail, - ); - } -} - -/// @nodoc -const $DocumentLoadingState = _$DocumentLoadingStateTearOff(); - -/// @nodoc -mixin _$DocumentLoadingState { - @optionalTypeArgs - TResult when({ - required TResult Function() loading, - required TResult Function(Either successOrFail) finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentLoadingStateCopyWith<$Res> { - factory $DocumentLoadingStateCopyWith(DocumentLoadingState value, - $Res Function(DocumentLoadingState) then) = - _$DocumentLoadingStateCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DocumentLoadingStateCopyWithImpl<$Res> - implements $DocumentLoadingStateCopyWith<$Res> { - _$DocumentLoadingStateCopyWithImpl(this._value, this._then); - - final DocumentLoadingState _value; - // ignore: unused_field - final $Res Function(DocumentLoadingState) _then; -} - -/// @nodoc -abstract class _$LoadingCopyWith<$Res> { - factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) = - __$LoadingCopyWithImpl<$Res>; -} - -/// @nodoc -class __$LoadingCopyWithImpl<$Res> - extends _$DocumentLoadingStateCopyWithImpl<$Res> - implements _$LoadingCopyWith<$Res> { - __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then) - : super(_value, (v) => _then(v as _Loading)); - - @override - _Loading get _value => super._value as _Loading; -} - -/// @nodoc - -class _$_Loading implements _Loading { - const _$_Loading(); - - @override - String toString() { - return 'DocumentLoadingState.loading()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is _Loading); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() loading, - required TResult Function(Either successOrFail) finish, - }) { - return loading(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - }) { - return loading?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - required TResult orElse(), - }) { - if (loading != null) { - return loading(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) { - return loading(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) { - return loading?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) { - if (loading != null) { - return loading(this); - } - return orElse(); - } -} - -abstract class _Loading implements DocumentLoadingState { - const factory _Loading() = _$_Loading; -} - -/// @nodoc -abstract class _$FinishCopyWith<$Res> { - factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) = - __$FinishCopyWithImpl<$Res>; - $Res call({Either successOrFail}); -} - -/// @nodoc -class __$FinishCopyWithImpl<$Res> - extends _$DocumentLoadingStateCopyWithImpl<$Res> - implements _$FinishCopyWith<$Res> { - __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then) - : super(_value, (v) => _then(v as _Finish)); - - @override - _Finish get _value => super._value as _Finish; - - @override - $Res call({ - Object? successOrFail = freezed, - }) { - return _then(_Finish( - successOrFail == freezed - ? _value.successOrFail - : successOrFail // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_Finish implements _Finish { - const _$_Finish(this.successOrFail); - - @override - final Either successOrFail; - - @override - String toString() { - return 'DocumentLoadingState.finish(successOrFail: $successOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _Finish && - (identical(other.successOrFail, successOrFail) || - const DeepCollectionEquality() - .equals(other.successOrFail, successOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail); - - @JsonKey(ignore: true) - @override - _$FinishCopyWith<_Finish> get copyWith => - __$FinishCopyWithImpl<_Finish>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() loading, - required TResult Function(Either successOrFail) finish, - }) { - return finish(successOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - }) { - return finish?.call(successOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - required TResult orElse(), - }) { - if (finish != null) { - return finish(successOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) { - return finish(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) { - return finish?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) { - if (finish != null) { - return finish(this); - } - return orElse(); - } -} - -abstract class _Finish implements DocumentLoadingState { - const factory _Finish(Either successOrFail) = _$_Finish; - - Either get successOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart deleted file mode 100644 index 2a2d9bcaa3..0000000000 --- a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart +++ /dev/null @@ -1,1129 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'trash_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$TrashEventTearOff { - const _$TrashEventTearOff(); - - Initial initial() { - return const Initial(); - } - - ReceiveTrash didReceiveTrash(List trash) { - return ReceiveTrash( - trash, - ); - } - - Putback putback(String trashId) { - return Putback( - trashId, - ); - } - - Delete delete(Trash trash) { - return Delete( - trash, - ); - } - - RestoreAll restoreAll() { - return const RestoreAll(); - } - - DeleteAll deleteAll() { - return const DeleteAll(); - } -} - -/// @nodoc -const $TrashEvent = _$TrashEventTearOff(); - -/// @nodoc -mixin _$TrashEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TrashEventCopyWith<$Res> { - factory $TrashEventCopyWith( - TrashEvent value, $Res Function(TrashEvent) then) = - _$TrashEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$TrashEventCopyWithImpl<$Res> implements $TrashEventCopyWith<$Res> { - _$TrashEventCopyWithImpl(this._value, this._then); - - final TrashEvent _value; - // ignore: unused_field - final $Res Function(TrashEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'TrashEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements TrashEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $ReceiveTrashCopyWith<$Res> { - factory $ReceiveTrashCopyWith( - ReceiveTrash value, $Res Function(ReceiveTrash) then) = - _$ReceiveTrashCopyWithImpl<$Res>; - $Res call({List trash}); -} - -/// @nodoc -class _$ReceiveTrashCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $ReceiveTrashCopyWith<$Res> { - _$ReceiveTrashCopyWithImpl( - ReceiveTrash _value, $Res Function(ReceiveTrash) _then) - : super(_value, (v) => _then(v as ReceiveTrash)); - - @override - ReceiveTrash get _value => super._value as ReceiveTrash; - - @override - $Res call({ - Object? trash = freezed, - }) { - return _then(ReceiveTrash( - trash == freezed - ? _value.trash - : trash // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc - -class _$ReceiveTrash implements ReceiveTrash { - const _$ReceiveTrash(this.trash); - - @override - final List trash; - - @override - String toString() { - return 'TrashEvent.didReceiveTrash(trash: $trash)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ReceiveTrash && - (identical(other.trash, trash) || - const DeepCollectionEquality().equals(other.trash, trash))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trash); - - @JsonKey(ignore: true) - @override - $ReceiveTrashCopyWith get copyWith => - _$ReceiveTrashCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return didReceiveTrash(trash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return didReceiveTrash?.call(trash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (didReceiveTrash != null) { - return didReceiveTrash(trash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return didReceiveTrash(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return didReceiveTrash?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (didReceiveTrash != null) { - return didReceiveTrash(this); - } - return orElse(); - } -} - -abstract class ReceiveTrash implements TrashEvent { - const factory ReceiveTrash(List trash) = _$ReceiveTrash; - - List get trash => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ReceiveTrashCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PutbackCopyWith<$Res> { - factory $PutbackCopyWith(Putback value, $Res Function(Putback) then) = - _$PutbackCopyWithImpl<$Res>; - $Res call({String trashId}); -} - -/// @nodoc -class _$PutbackCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $PutbackCopyWith<$Res> { - _$PutbackCopyWithImpl(Putback _value, $Res Function(Putback) _then) - : super(_value, (v) => _then(v as Putback)); - - @override - Putback get _value => super._value as Putback; - - @override - $Res call({ - Object? trashId = freezed, - }) { - return _then(Putback( - trashId == freezed - ? _value.trashId - : trashId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Putback implements Putback { - const _$Putback(this.trashId); - - @override - final String trashId; - - @override - String toString() { - return 'TrashEvent.putback(trashId: $trashId)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Putback && - (identical(other.trashId, trashId) || - const DeepCollectionEquality().equals(other.trashId, trashId))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trashId); - - @JsonKey(ignore: true) - @override - $PutbackCopyWith get copyWith => - _$PutbackCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return putback(trashId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return putback?.call(trashId); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (putback != null) { - return putback(trashId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return putback(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return putback?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (putback != null) { - return putback(this); - } - return orElse(); - } -} - -abstract class Putback implements TrashEvent { - const factory Putback(String trashId) = _$Putback; - - String get trashId => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $PutbackCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DeleteCopyWith<$Res> { - factory $DeleteCopyWith(Delete value, $Res Function(Delete) then) = - _$DeleteCopyWithImpl<$Res>; - $Res call({Trash trash}); -} - -/// @nodoc -class _$DeleteCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $DeleteCopyWith<$Res> { - _$DeleteCopyWithImpl(Delete _value, $Res Function(Delete) _then) - : super(_value, (v) => _then(v as Delete)); - - @override - Delete get _value => super._value as Delete; - - @override - $Res call({ - Object? trash = freezed, - }) { - return _then(Delete( - trash == freezed - ? _value.trash - : trash // ignore: cast_nullable_to_non_nullable - as Trash, - )); - } -} - -/// @nodoc - -class _$Delete implements Delete { - const _$Delete(this.trash); - - @override - final Trash trash; - - @override - String toString() { - return 'TrashEvent.delete(trash: $trash)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Delete && - (identical(other.trash, trash) || - const DeepCollectionEquality().equals(other.trash, trash))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trash); - - @JsonKey(ignore: true) - @override - $DeleteCopyWith get copyWith => - _$DeleteCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return delete(trash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return delete?.call(trash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (delete != null) { - return delete(trash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return delete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return delete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (delete != null) { - return delete(this); - } - return orElse(); - } -} - -abstract class Delete implements TrashEvent { - const factory Delete(Trash trash) = _$Delete; - - Trash get trash => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $DeleteCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RestoreAllCopyWith<$Res> { - factory $RestoreAllCopyWith( - RestoreAll value, $Res Function(RestoreAll) then) = - _$RestoreAllCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestoreAllCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $RestoreAllCopyWith<$Res> { - _$RestoreAllCopyWithImpl(RestoreAll _value, $Res Function(RestoreAll) _then) - : super(_value, (v) => _then(v as RestoreAll)); - - @override - RestoreAll get _value => super._value as RestoreAll; -} - -/// @nodoc - -class _$RestoreAll implements RestoreAll { - const _$RestoreAll(); - - @override - String toString() { - return 'TrashEvent.restoreAll()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is RestoreAll); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return restoreAll(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return restoreAll?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (restoreAll != null) { - return restoreAll(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return restoreAll(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return restoreAll?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (restoreAll != null) { - return restoreAll(this); - } - return orElse(); - } -} - -abstract class RestoreAll implements TrashEvent { - const factory RestoreAll() = _$RestoreAll; -} - -/// @nodoc -abstract class $DeleteAllCopyWith<$Res> { - factory $DeleteAllCopyWith(DeleteAll value, $Res Function(DeleteAll) then) = - _$DeleteAllCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeleteAllCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $DeleteAllCopyWith<$Res> { - _$DeleteAllCopyWithImpl(DeleteAll _value, $Res Function(DeleteAll) _then) - : super(_value, (v) => _then(v as DeleteAll)); - - @override - DeleteAll get _value => super._value as DeleteAll; -} - -/// @nodoc - -class _$DeleteAll implements DeleteAll { - const _$DeleteAll(); - - @override - String toString() { - return 'TrashEvent.deleteAll()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is DeleteAll); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return deleteAll(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return deleteAll?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (deleteAll != null) { - return deleteAll(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return deleteAll(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return deleteAll?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (deleteAll != null) { - return deleteAll(this); - } - return orElse(); - } -} - -abstract class DeleteAll implements TrashEvent { - const factory DeleteAll() = _$DeleteAll; -} - -/// @nodoc -class _$TrashStateTearOff { - const _$TrashStateTearOff(); - - _TrashState call( - {required List objects, - required Either successOrFailure}) { - return _TrashState( - objects: objects, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $TrashState = _$TrashStateTearOff(); - -/// @nodoc -mixin _$TrashState { - List get objects => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $TrashStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TrashStateCopyWith<$Res> { - factory $TrashStateCopyWith( - TrashState value, $Res Function(TrashState) then) = - _$TrashStateCopyWithImpl<$Res>; - $Res call({List objects, Either successOrFailure}); -} - -/// @nodoc -class _$TrashStateCopyWithImpl<$Res> implements $TrashStateCopyWith<$Res> { - _$TrashStateCopyWithImpl(this._value, this._then); - - final TrashState _value; - // ignore: unused_field - final $Res Function(TrashState) _then; - - @override - $Res call({ - Object? objects = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - objects: objects == freezed - ? _value.objects - : objects // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc -abstract class _$TrashStateCopyWith<$Res> implements $TrashStateCopyWith<$Res> { - factory _$TrashStateCopyWith( - _TrashState value, $Res Function(_TrashState) then) = - __$TrashStateCopyWithImpl<$Res>; - @override - $Res call({List objects, Either successOrFailure}); -} - -/// @nodoc -class __$TrashStateCopyWithImpl<$Res> extends _$TrashStateCopyWithImpl<$Res> - implements _$TrashStateCopyWith<$Res> { - __$TrashStateCopyWithImpl( - _TrashState _value, $Res Function(_TrashState) _then) - : super(_value, (v) => _then(v as _TrashState)); - - @override - _TrashState get _value => super._value as _TrashState; - - @override - $Res call({ - Object? objects = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_TrashState( - objects: objects == freezed - ? _value.objects - : objects // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_TrashState implements _TrashState { - const _$_TrashState({required this.objects, required this.successOrFailure}); - - @override - final List objects; - @override - final Either successOrFailure; - - @override - String toString() { - return 'TrashState(objects: $objects, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _TrashState && - (identical(other.objects, objects) || - const DeepCollectionEquality() - .equals(other.objects, objects)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(objects) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$TrashStateCopyWith<_TrashState> get copyWith => - __$TrashStateCopyWithImpl<_TrashState>(this, _$identity); -} - -abstract class _TrashState implements TrashState { - const factory _TrashState( - {required List objects, - required Either successOrFailure}) = _$_TrashState; - - @override - List get objects => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$TrashStateCopyWith<_TrashState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart deleted file mode 100644 index 51729bca73..0000000000 --- a/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart +++ /dev/null @@ -1,1155 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'view_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$ViewEventTearOff { - const _$ViewEventTearOff(); - - Initial initial() { - return const Initial(); - } - - SetEditing setIsEditing(bool isEditing) { - return SetEditing( - isEditing, - ); - } - - Rename rename(String newName) { - return Rename( - newName, - ); - } - - Delete delete() { - return const Delete(); - } - - Duplicate duplicate() { - return const Duplicate(); - } - - ViewDidUpdate viewDidUpdate(Either result) { - return ViewDidUpdate( - result, - ); - } -} - -/// @nodoc -const $ViewEvent = _$ViewEventTearOff(); - -/// @nodoc -mixin _$ViewEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ViewEventCopyWith<$Res> { - factory $ViewEventCopyWith(ViewEvent value, $Res Function(ViewEvent) then) = - _$ViewEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$ViewEventCopyWithImpl<$Res> implements $ViewEventCopyWith<$Res> { - _$ViewEventCopyWithImpl(this._value, this._then); - - final ViewEvent _value; - // ignore: unused_field - final $Res Function(ViewEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'ViewEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements ViewEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $SetEditingCopyWith<$Res> { - factory $SetEditingCopyWith( - SetEditing value, $Res Function(SetEditing) then) = - _$SetEditingCopyWithImpl<$Res>; - $Res call({bool isEditing}); -} - -/// @nodoc -class _$SetEditingCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $SetEditingCopyWith<$Res> { - _$SetEditingCopyWithImpl(SetEditing _value, $Res Function(SetEditing) _then) - : super(_value, (v) => _then(v as SetEditing)); - - @override - SetEditing get _value => super._value as SetEditing; - - @override - $Res call({ - Object? isEditing = freezed, - }) { - return _then(SetEditing( - isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc - -class _$SetEditing implements SetEditing { - const _$SetEditing(this.isEditing); - - @override - final bool isEditing; - - @override - String toString() { - return 'ViewEvent.setIsEditing(isEditing: $isEditing)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is SetEditing && - (identical(other.isEditing, isEditing) || - const DeepCollectionEquality() - .equals(other.isEditing, isEditing))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(isEditing); - - @JsonKey(ignore: true) - @override - $SetEditingCopyWith get copyWith => - _$SetEditingCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return setIsEditing(isEditing); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return setIsEditing?.call(isEditing); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (setIsEditing != null) { - return setIsEditing(isEditing); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return setIsEditing(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return setIsEditing?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (setIsEditing != null) { - return setIsEditing(this); - } - return orElse(); - } -} - -abstract class SetEditing implements ViewEvent { - const factory SetEditing(bool isEditing) = _$SetEditing; - - bool get isEditing => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $SetEditingCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RenameCopyWith<$Res> { - factory $RenameCopyWith(Rename value, $Res Function(Rename) then) = - _$RenameCopyWithImpl<$Res>; - $Res call({String newName}); -} - -/// @nodoc -class _$RenameCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $RenameCopyWith<$Res> { - _$RenameCopyWithImpl(Rename _value, $Res Function(Rename) _then) - : super(_value, (v) => _then(v as Rename)); - - @override - Rename get _value => super._value as Rename; - - @override - $Res call({ - Object? newName = freezed, - }) { - return _then(Rename( - newName == freezed - ? _value.newName - : newName // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Rename implements Rename { - const _$Rename(this.newName); - - @override - final String newName; - - @override - String toString() { - return 'ViewEvent.rename(newName: $newName)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Rename && - (identical(other.newName, newName) || - const DeepCollectionEquality().equals(other.newName, newName))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(newName); - - @JsonKey(ignore: true) - @override - $RenameCopyWith get copyWith => - _$RenameCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return rename(newName); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return rename?.call(newName); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (rename != null) { - return rename(newName); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return rename(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return rename?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (rename != null) { - return rename(this); - } - return orElse(); - } -} - -abstract class Rename implements ViewEvent { - const factory Rename(String newName) = _$Rename; - - String get newName => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $RenameCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DeleteCopyWith<$Res> { - factory $DeleteCopyWith(Delete value, $Res Function(Delete) then) = - _$DeleteCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeleteCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $DeleteCopyWith<$Res> { - _$DeleteCopyWithImpl(Delete _value, $Res Function(Delete) _then) - : super(_value, (v) => _then(v as Delete)); - - @override - Delete get _value => super._value as Delete; -} - -/// @nodoc - -class _$Delete implements Delete { - const _$Delete(); - - @override - String toString() { - return 'ViewEvent.delete()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Delete); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return delete(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return delete?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (delete != null) { - return delete(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return delete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return delete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (delete != null) { - return delete(this); - } - return orElse(); - } -} - -abstract class Delete implements ViewEvent { - const factory Delete() = _$Delete; -} - -/// @nodoc -abstract class $DuplicateCopyWith<$Res> { - factory $DuplicateCopyWith(Duplicate value, $Res Function(Duplicate) then) = - _$DuplicateCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DuplicateCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $DuplicateCopyWith<$Res> { - _$DuplicateCopyWithImpl(Duplicate _value, $Res Function(Duplicate) _then) - : super(_value, (v) => _then(v as Duplicate)); - - @override - Duplicate get _value => super._value as Duplicate; -} - -/// @nodoc - -class _$Duplicate implements Duplicate { - const _$Duplicate(); - - @override - String toString() { - return 'ViewEvent.duplicate()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Duplicate); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return duplicate(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return duplicate?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (duplicate != null) { - return duplicate(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return duplicate(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return duplicate?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (duplicate != null) { - return duplicate(this); - } - return orElse(); - } -} - -abstract class Duplicate implements ViewEvent { - const factory Duplicate() = _$Duplicate; -} - -/// @nodoc -abstract class $ViewDidUpdateCopyWith<$Res> { - factory $ViewDidUpdateCopyWith( - ViewDidUpdate value, $Res Function(ViewDidUpdate) then) = - _$ViewDidUpdateCopyWithImpl<$Res>; - $Res call({Either result}); -} - -/// @nodoc -class _$ViewDidUpdateCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $ViewDidUpdateCopyWith<$Res> { - _$ViewDidUpdateCopyWithImpl( - ViewDidUpdate _value, $Res Function(ViewDidUpdate) _then) - : super(_value, (v) => _then(v as ViewDidUpdate)); - - @override - ViewDidUpdate get _value => super._value as ViewDidUpdate; - - @override - $Res call({ - Object? result = freezed, - }) { - return _then(ViewDidUpdate( - result == freezed - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$ViewDidUpdate implements ViewDidUpdate { - const _$ViewDidUpdate(this.result); - - @override - final Either result; - - @override - String toString() { - return 'ViewEvent.viewDidUpdate(result: $result)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ViewDidUpdate && - (identical(other.result, result) || - const DeepCollectionEquality().equals(other.result, result))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(result); - - @JsonKey(ignore: true) - @override - $ViewDidUpdateCopyWith get copyWith => - _$ViewDidUpdateCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return viewDidUpdate(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return viewDidUpdate?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (viewDidUpdate != null) { - return viewDidUpdate(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return viewDidUpdate(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return viewDidUpdate?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (viewDidUpdate != null) { - return viewDidUpdate(this); - } - return orElse(); - } -} - -abstract class ViewDidUpdate implements ViewEvent { - const factory ViewDidUpdate(Either result) = - _$ViewDidUpdate; - - Either get result => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ViewDidUpdateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$ViewStateTearOff { - const _$ViewStateTearOff(); - - _ViewState call( - {required View view, - required bool isEditing, - required Either successOrFailure}) { - return _ViewState( - view: view, - isEditing: isEditing, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $ViewState = _$ViewStateTearOff(); - -/// @nodoc -mixin _$ViewState { - View get view => throw _privateConstructorUsedError; - bool get isEditing => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ViewStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ViewStateCopyWith<$Res> { - factory $ViewStateCopyWith(ViewState value, $Res Function(ViewState) then) = - _$ViewStateCopyWithImpl<$Res>; - $Res call( - {View view, bool isEditing, Either successOrFailure}); -} - -/// @nodoc -class _$ViewStateCopyWithImpl<$Res> implements $ViewStateCopyWith<$Res> { - _$ViewStateCopyWithImpl(this._value, this._then); - - final ViewState _value; - // ignore: unused_field - final $Res Function(ViewState) _then; - - @override - $Res call({ - Object? view = freezed, - Object? isEditing = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - view: view == freezed - ? _value.view - : view // ignore: cast_nullable_to_non_nullable - as View, - isEditing: isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc -abstract class _$ViewStateCopyWith<$Res> implements $ViewStateCopyWith<$Res> { - factory _$ViewStateCopyWith( - _ViewState value, $Res Function(_ViewState) then) = - __$ViewStateCopyWithImpl<$Res>; - @override - $Res call( - {View view, bool isEditing, Either successOrFailure}); -} - -/// @nodoc -class __$ViewStateCopyWithImpl<$Res> extends _$ViewStateCopyWithImpl<$Res> - implements _$ViewStateCopyWith<$Res> { - __$ViewStateCopyWithImpl(_ViewState _value, $Res Function(_ViewState) _then) - : super(_value, (v) => _then(v as _ViewState)); - - @override - _ViewState get _value => super._value as _ViewState; - - @override - $Res call({ - Object? view = freezed, - Object? isEditing = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_ViewState( - view: view == freezed - ? _value.view - : view // ignore: cast_nullable_to_non_nullable - as View, - isEditing: isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_ViewState implements _ViewState { - const _$_ViewState( - {required this.view, - required this.isEditing, - required this.successOrFailure}); - - @override - final View view; - @override - final bool isEditing; - @override - final Either successOrFailure; - - @override - String toString() { - return 'ViewState(view: $view, isEditing: $isEditing, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _ViewState && - (identical(other.view, view) || - const DeepCollectionEquality().equals(other.view, view)) && - (identical(other.isEditing, isEditing) || - const DeepCollectionEquality() - .equals(other.isEditing, isEditing)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(view) ^ - const DeepCollectionEquality().hash(isEditing) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$ViewStateCopyWith<_ViewState> get copyWith => - __$ViewStateCopyWithImpl<_ViewState>(this, _$identity); -} - -abstract class _ViewState implements ViewState { - const factory _ViewState( - {required View view, - required bool isEditing, - required Either successOrFailure}) = _$_ViewState; - - @override - View get view => throw _privateConstructorUsedError; - @override - bool get isEditing => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$ViewStateCopyWith<_ViewState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart deleted file mode 100644 index b82475bc73..0000000000 --- a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart +++ /dev/null @@ -1,890 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'welcome_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$WelcomeEventTearOff { - const _$WelcomeEventTearOff(); - - Initial initial() { - return const Initial(); - } - - CreateWorkspace createWorkspace(String name, String desc) { - return CreateWorkspace( - name, - desc, - ); - } - - OpenWorkspace openWorkspace(Workspace workspace) { - return OpenWorkspace( - workspace, - ); - } - - WorkspacesReceived workspacesReveived( - Either, FlowyError> workspacesOrFail) { - return WorkspacesReceived( - workspacesOrFail, - ); - } -} - -/// @nodoc -const $WelcomeEvent = _$WelcomeEventTearOff(); - -/// @nodoc -mixin _$WelcomeEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WelcomeEventCopyWith<$Res> { - factory $WelcomeEventCopyWith( - WelcomeEvent value, $Res Function(WelcomeEvent) then) = - _$WelcomeEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$WelcomeEventCopyWithImpl<$Res> implements $WelcomeEventCopyWith<$Res> { - _$WelcomeEventCopyWithImpl(this._value, this._then); - - final WelcomeEvent _value; - // ignore: unused_field - final $Res Function(WelcomeEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$WelcomeEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'WelcomeEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements WelcomeEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $CreateWorkspaceCopyWith<$Res> { - factory $CreateWorkspaceCopyWith( - CreateWorkspace value, $Res Function(CreateWorkspace) then) = - _$CreateWorkspaceCopyWithImpl<$Res>; - $Res call({String name, String desc}); -} - -/// @nodoc -class _$CreateWorkspaceCopyWithImpl<$Res> - extends _$WelcomeEventCopyWithImpl<$Res> - implements $CreateWorkspaceCopyWith<$Res> { - _$CreateWorkspaceCopyWithImpl( - CreateWorkspace _value, $Res Function(CreateWorkspace) _then) - : super(_value, (v) => _then(v as CreateWorkspace)); - - @override - CreateWorkspace get _value => super._value as CreateWorkspace; - - @override - $Res call({ - Object? name = freezed, - Object? desc = freezed, - }) { - return _then(CreateWorkspace( - name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - desc == freezed - ? _value.desc - : desc // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$CreateWorkspace implements CreateWorkspace { - const _$CreateWorkspace(this.name, this.desc); - - @override - final String name; - @override - final String desc; - - @override - String toString() { - return 'WelcomeEvent.createWorkspace(name: $name, desc: $desc)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is CreateWorkspace && - (identical(other.name, name) || - const DeepCollectionEquality().equals(other.name, name)) && - (identical(other.desc, desc) || - const DeepCollectionEquality().equals(other.desc, desc))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(name) ^ - const DeepCollectionEquality().hash(desc); - - @JsonKey(ignore: true) - @override - $CreateWorkspaceCopyWith get copyWith => - _$CreateWorkspaceCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return createWorkspace(name, desc); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return createWorkspace?.call(name, desc); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (createWorkspace != null) { - return createWorkspace(name, desc); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return createWorkspace(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return createWorkspace?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (createWorkspace != null) { - return createWorkspace(this); - } - return orElse(); - } -} - -abstract class CreateWorkspace implements WelcomeEvent { - const factory CreateWorkspace(String name, String desc) = _$CreateWorkspace; - - String get name => throw _privateConstructorUsedError; - String get desc => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $CreateWorkspaceCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $OpenWorkspaceCopyWith<$Res> { - factory $OpenWorkspaceCopyWith( - OpenWorkspace value, $Res Function(OpenWorkspace) then) = - _$OpenWorkspaceCopyWithImpl<$Res>; - $Res call({Workspace workspace}); -} - -/// @nodoc -class _$OpenWorkspaceCopyWithImpl<$Res> extends _$WelcomeEventCopyWithImpl<$Res> - implements $OpenWorkspaceCopyWith<$Res> { - _$OpenWorkspaceCopyWithImpl( - OpenWorkspace _value, $Res Function(OpenWorkspace) _then) - : super(_value, (v) => _then(v as OpenWorkspace)); - - @override - OpenWorkspace get _value => super._value as OpenWorkspace; - - @override - $Res call({ - Object? workspace = freezed, - }) { - return _then(OpenWorkspace( - workspace == freezed - ? _value.workspace - : workspace // ignore: cast_nullable_to_non_nullable - as Workspace, - )); - } -} - -/// @nodoc - -class _$OpenWorkspace implements OpenWorkspace { - const _$OpenWorkspace(this.workspace); - - @override - final Workspace workspace; - - @override - String toString() { - return 'WelcomeEvent.openWorkspace(workspace: $workspace)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is OpenWorkspace && - (identical(other.workspace, workspace) || - const DeepCollectionEquality() - .equals(other.workspace, workspace))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(workspace); - - @JsonKey(ignore: true) - @override - $OpenWorkspaceCopyWith get copyWith => - _$OpenWorkspaceCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return openWorkspace(workspace); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return openWorkspace?.call(workspace); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (openWorkspace != null) { - return openWorkspace(workspace); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return openWorkspace(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return openWorkspace?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (openWorkspace != null) { - return openWorkspace(this); - } - return orElse(); - } -} - -abstract class OpenWorkspace implements WelcomeEvent { - const factory OpenWorkspace(Workspace workspace) = _$OpenWorkspace; - - Workspace get workspace => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $OpenWorkspaceCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WorkspacesReceivedCopyWith<$Res> { - factory $WorkspacesReceivedCopyWith( - WorkspacesReceived value, $Res Function(WorkspacesReceived) then) = - _$WorkspacesReceivedCopyWithImpl<$Res>; - $Res call({Either, FlowyError> workspacesOrFail}); -} - -/// @nodoc -class _$WorkspacesReceivedCopyWithImpl<$Res> - extends _$WelcomeEventCopyWithImpl<$Res> - implements $WorkspacesReceivedCopyWith<$Res> { - _$WorkspacesReceivedCopyWithImpl( - WorkspacesReceived _value, $Res Function(WorkspacesReceived) _then) - : super(_value, (v) => _then(v as WorkspacesReceived)); - - @override - WorkspacesReceived get _value => super._value as WorkspacesReceived; - - @override - $Res call({ - Object? workspacesOrFail = freezed, - }) { - return _then(WorkspacesReceived( - workspacesOrFail == freezed - ? _value.workspacesOrFail - : workspacesOrFail // ignore: cast_nullable_to_non_nullable - as Either, FlowyError>, - )); - } -} - -/// @nodoc - -class _$WorkspacesReceived implements WorkspacesReceived { - const _$WorkspacesReceived(this.workspacesOrFail); - - @override - final Either, FlowyError> workspacesOrFail; - - @override - String toString() { - return 'WelcomeEvent.workspacesReveived(workspacesOrFail: $workspacesOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is WorkspacesReceived && - (identical(other.workspacesOrFail, workspacesOrFail) || - const DeepCollectionEquality() - .equals(other.workspacesOrFail, workspacesOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(workspacesOrFail); - - @JsonKey(ignore: true) - @override - $WorkspacesReceivedCopyWith get copyWith => - _$WorkspacesReceivedCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return workspacesReveived(workspacesOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return workspacesReveived?.call(workspacesOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (workspacesReveived != null) { - return workspacesReveived(workspacesOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return workspacesReveived(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return workspacesReveived?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (workspacesReveived != null) { - return workspacesReveived(this); - } - return orElse(); - } -} - -abstract class WorkspacesReceived implements WelcomeEvent { - const factory WorkspacesReceived( - Either, FlowyError> workspacesOrFail) = - _$WorkspacesReceived; - - Either, FlowyError> get workspacesOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $WorkspacesReceivedCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$WelcomeStateTearOff { - const _$WelcomeStateTearOff(); - - _WelcomeState call( - {required bool isLoading, - required List workspaces, - required Either successOrFailure}) { - return _WelcomeState( - isLoading: isLoading, - workspaces: workspaces, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $WelcomeState = _$WelcomeStateTearOff(); - -/// @nodoc -mixin _$WelcomeState { - bool get isLoading => throw _privateConstructorUsedError; - List get workspaces => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $WelcomeStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WelcomeStateCopyWith<$Res> { - factory $WelcomeStateCopyWith( - WelcomeState value, $Res Function(WelcomeState) then) = - _$WelcomeStateCopyWithImpl<$Res>; - $Res call( - {bool isLoading, - List workspaces, - Either successOrFailure}); -} - -/// @nodoc -class _$WelcomeStateCopyWithImpl<$Res> implements $WelcomeStateCopyWith<$Res> { - _$WelcomeStateCopyWithImpl(this._value, this._then); - - final WelcomeState _value; - // ignore: unused_field - final $Res Function(WelcomeState) _then; - - @override - $Res call({ - Object? isLoading = freezed, - Object? workspaces = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - workspaces: workspaces == freezed - ? _value.workspaces - : workspaces // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc -abstract class _$WelcomeStateCopyWith<$Res> - implements $WelcomeStateCopyWith<$Res> { - factory _$WelcomeStateCopyWith( - _WelcomeState value, $Res Function(_WelcomeState) then) = - __$WelcomeStateCopyWithImpl<$Res>; - @override - $Res call( - {bool isLoading, - List workspaces, - Either successOrFailure}); -} - -/// @nodoc -class __$WelcomeStateCopyWithImpl<$Res> extends _$WelcomeStateCopyWithImpl<$Res> - implements _$WelcomeStateCopyWith<$Res> { - __$WelcomeStateCopyWithImpl( - _WelcomeState _value, $Res Function(_WelcomeState) _then) - : super(_value, (v) => _then(v as _WelcomeState)); - - @override - _WelcomeState get _value => super._value as _WelcomeState; - - @override - $Res call({ - Object? isLoading = freezed, - Object? workspaces = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_WelcomeState( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - workspaces: workspaces == freezed - ? _value.workspaces - : workspaces // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_WelcomeState implements _WelcomeState { - const _$_WelcomeState( - {required this.isLoading, - required this.workspaces, - required this.successOrFailure}); - - @override - final bool isLoading; - @override - final List workspaces; - @override - final Either successOrFailure; - - @override - String toString() { - return 'WelcomeState(isLoading: $isLoading, workspaces: $workspaces, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _WelcomeState && - (identical(other.isLoading, isLoading) || - const DeepCollectionEquality() - .equals(other.isLoading, isLoading)) && - (identical(other.workspaces, workspaces) || - const DeepCollectionEquality() - .equals(other.workspaces, workspaces)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(isLoading) ^ - const DeepCollectionEquality().hash(workspaces) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$WelcomeStateCopyWith<_WelcomeState> get copyWith => - __$WelcomeStateCopyWithImpl<_WelcomeState>(this, _$identity); -} - -abstract class _WelcomeState implements WelcomeState { - const factory _WelcomeState( - {required bool isLoading, - required List workspaces, - required Either successOrFailure}) = _$_WelcomeState; - - @override - bool get isLoading => throw _privateConstructorUsedError; - @override - List get workspaces => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$WelcomeStateCopyWith<_WelcomeState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart index fe9ae8f05b..74982c752e 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart @@ -114,7 +114,7 @@ class _DeltaVisitor implements ast.NodeVisitor { // TODO(kolja): Determine which behavior we really want here. // We can either insert an additional newline or just have the // paragraphs as single lines. Zefyr will by default render two lines - // are different paragraphs so for now we will not add an additonal + // are different paragraphs so for now we will not add an additional // newline here. // // if (previousToplevelElement != null && diff --git a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart index 0f15a99e4d..8b47a97433 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart @@ -154,7 +154,7 @@ abstract class InlineSyntax { /// Tries to match at the parser's current position. /// - /// The parser's position can be overriden with [startMatchPos]. + /// The parser's position can be overridden with [startMatchPos]. /// Returns whether or not the pattern successfully matched. bool tryMatch(InlineParser parser, [int? startMatchPos]) { startMatchPos ??= parser.pos; @@ -609,7 +609,7 @@ class LinkSyntax extends TagSyntax { // // Once we have parsed `Text [`, there is one (pending) link in the state // stack. It is, by default, active. Once we parse the next possible link, - // `[more](links)`, as a real link, we must deactive the pending links (just + // `[more](links)`, as a real link, we must deactivate the pending links (just // the one, in this case). var _pendingStatesAreActive = true; @@ -933,7 +933,7 @@ class LinkSyntax extends TagSyntax { // followed by mystery characters; no longer a link. return null; } - // [_parseTitle] made sure the title was follwed by a closing `)` + // [_parseTitle] made sure the title was followed by a closing `)` // (but it's up to the code here to examine the balance of // parentheses). parenCount--; diff --git a/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart b/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart index bf3e66168b..eeebf2b145 100644 --- a/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart +++ b/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart @@ -75,7 +75,7 @@ class HomeMenu extends StatelessWidget { } Widget _renderBody(BuildContext context) { - // nested cloumn: https://siddharthmolleti.com/flutter-box-constraints-nested-column-s-row-s-3dfacada7361 + // nested column: https://siddharthmolleti.com/flutter-box-constraints-nested-column-s-row-s-3dfacada7361 final theme = context.watch(); return Container( color: theme.bg1, diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart index b7e71e87b9..26046af5bb 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart @@ -35,7 +35,7 @@ class Config { /// Can be smaller due to screen size and amount of columns final double emojiSizeMax; - /// Verical spacing between emojis + /// Vertical spacing between emojis final double verticalSpacing; /// Horizontal spacing between emojis @@ -57,7 +57,7 @@ class Config { /// The color of the category icon when selected final Color iconColorSelected; - /// The color of the loading indicator during initalization + /// The color of the loading indicator during initialization final Color progressIndicatorColor; /// The color of the backspace icon button diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart index cb06fe437a..f1e4420252 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart @@ -40,7 +40,7 @@ enum Category { /// Travel emojis TRAVEL, - /// Ojects emojis + /// Objects emojis OBJECTS, /// Sumbol emojis @@ -179,7 +179,7 @@ class _EmojiPickerState extends State { }; } - // Initalize emoji data + // Initialize emoji data Future _updateEmojis() async { categoryEmoji.clear(); if (widget.config.showRecentsTab) { diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart index 07b6ca7efe..ee00569852 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart @@ -4,7 +4,7 @@ import 'config.dart'; import 'emoji_view_state.dart'; /// Template class for custom implementation -/// Inhert this class to create your own EmojiPicker +/// Inherit this class to create your own EmojiPicker abstract class EmojiPickerBuilder extends StatefulWidget { /// Constructor const EmojiPickerBuilder(this.config, this.state, {Key? key}) : super(key: key); diff --git a/frontend/app_flowy/packages/flowy_infra/lib/language.dart b/frontend/app_flowy/packages/flowy_infra/lib/language.dart index 091151bc57..e6726c3dbc 100644 --- a/frontend/app_flowy/packages/flowy_infra/lib/language.dart +++ b/frontend/app_flowy/packages/flowy_infra/lib/language.dart @@ -9,14 +9,27 @@ String languageFromLocale(Locale locale) { return "简体中文"; // Then in alphabetical order + case "ca": + return "Català"; case "de": return "Deutsch"; case "es": return "Español"; case "fr": - return "Français"; + switch (locale.countryCode) { + case "CA": + return "Français (CA)"; + case "FR": + return "Français (FR)"; + default: + return locale.languageCode; + } + case "hu": + return "Magyar"; case "it": return "Italiano"; + case "pt": + return "Português"; case "ru": return "русский"; diff --git a/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart b/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart index 32ac147886..9c57883407 100644 --- a/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart +++ b/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart @@ -18,10 +18,10 @@ abstract class FlowyInfraUIPlatform extends PlatformInterface { } Stream get onKeyboardVisibilityChange { - throw UnimplementedError('`onKeyboardChange` should be overrided by subclass.'); + throw UnimplementedError('`onKeyboardChange` should be overridden by subclass.'); } Future getPlatformVersion() { - throw UnimplementedError('`getPlatformVersion` should be overrided by subclass.'); + throw UnimplementedError('`getPlatformVersion` should be overridden by subclass.'); } } diff --git a/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart b/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart index f39e13cd93..84c2cddd82 100644 --- a/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart +++ b/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart @@ -37,7 +37,7 @@ enum OverlapBehaviour { /// Maintain overlay size, which may cover the anchor widget. none, - /// Resize overlay to avoid overlaping the anchor widget. + /// Resize overlay to avoid overlapping the anchor widget. stretch, } diff --git a/frontend/app_flowy/web/index.html b/frontend/app_flowy/web/index.html index 501ec3737b..284a6312ec 100644 --- a/frontend/app_flowy/web/index.html +++ b/frontend/app_flowy/web/index.html @@ -82,7 +82,7 @@ }); // If service worker doesn't succeed in a reasonable amount of time, - // fallback to plaint