diff --git a/apps/skolplattformen-app-new/.gitignore b/apps/skolplattformen-app-new/.gitignore deleted file mode 100644 index fba6c953..00000000 --- a/apps/skolplattformen-app-new/.gitignore +++ /dev/null @@ -1,71 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -ios/.xcode.env.local - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml -*.hprof -.cxx/ -!debug.keystore -release/ - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -**/fastlane/report.xml -**/fastlane/Preview.html -**/fastlane/screenshots -**/fastlane/test_output - -# Bundle artifact -*.jsbundle - -# Ruby / CocoaPods -/ios/Pods/ -/vendor/bundle/ - -# Temporary files created by Metro to check the health of the file watcher -.metro-health-check* - -# testing -/coverage - - -libraries.json - -keys.json \ No newline at end of file diff --git a/apps/skolplattformen-app-new/.prettierrc b/apps/skolplattformen-app-new/.prettierrc deleted file mode 100644 index 623163be..00000000 --- a/apps/skolplattformen-app-new/.prettierrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "trailingComma": "es5", - "bracketSpacing": true, - "bracketSameLine": false -} diff --git a/apps/skolplattformen-app-new/.watchmanconfig b/apps/skolplattformen-app-new/.watchmanconfig deleted file mode 100644 index 0967ef42..00000000 --- a/apps/skolplattformen-app-new/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/apps/skolplattformen-app-new/App.tsx b/apps/skolplattformen-app-new/App.tsx deleted file mode 100644 index 80500a95..00000000 --- a/apps/skolplattformen-app-new/App.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import * as eva from '@eva-design/eva' -import AsyncStorage from '@react-native-async-storage/async-storage' -import { ApiProvider, Reporter } from './libs/hooks/src' -import { ApplicationProvider, IconRegistry, Text } from '@ui-kitten/components' -import { EvaIconsPack } from '@ui-kitten/eva-icons' -import React from 'react' -import { StatusBar, useColorScheme, View } from 'react-native' -import { SafeAreaProvider } from 'react-native-safe-area-context' -import { AppNavigator } from './components/navigation.component' -import { FeatureProvider } from './context/feature/featureContext' -import { LanguageProvider } from './context/language/languageContext' -import { SchoolPlatformProvider } from './context/schoolPlatform/schoolPlatformContext' -import { schoolPlatforms } from './data/schoolPlatforms' -import { default as customMapping } from './design/mapping.json' -import { darkTheme, lightTheme } from './design/themes' -import useSettingsStorage from './hooks/useSettingsStorage' -import { translations } from './utils/translation' -import { GestureHandlerRootView } from 'react-native-gesture-handler' - -const reporter: Reporter | undefined = __DEV__ - ? { - log: (message: string) => console.log(message), - error: (error: Error, label?: string) => console.log(label, error), - } - : undefined - -if (__DEV__) { - const DevMenu = require('react-native-dev-menu') - DevMenu.addItem('Clear AsyncStorage from all contents', () => - AsyncStorage.clear().then(() => logAsyncStorage()) - ) - DevMenu.addItem('Log AsyncStorage contents', () => logAsyncStorage()) -} - -const safeJsonParse = (maybeJson: string) => { - if (maybeJson) { - try { - return JSON.parse(maybeJson) - } catch (error) { - return maybeJson - } - } - return 'null' -} - -const logAsyncStorage = async () => { - const allKeys = await AsyncStorage.getAllKeys() - const keysAndValues = await AsyncStorage.multiGet(allKeys) - console.log('*** AsyncStorage contents:') - keysAndValues.forEach((keyAndValue) => { - console.log( - keyAndValue[0], - '=>', - keyAndValue[1] ? safeJsonParse(keyAndValue[1]) : 'null' - ) - }) - console.log('***') -} - -export default () => { - const [usingSystemTheme] = useSettingsStorage('usingSystemTheme') - const [currentSchoolPlatform] = useSettingsStorage('currentSchoolPlatform') - const [theme] = useSettingsStorage('theme') - const systemTheme = useColorScheme() - const colorScheme = usingSystemTheme ? systemTheme : theme - - const platform = schoolPlatforms.find((pf) => pf.id === currentSchoolPlatform) - - if (!platform) { - return ( - - ERROR - - ) - } - - return ( - - - - - - - - - - - - - - - - - - ) -} diff --git a/apps/skolplattformen-app-new/README.md b/apps/skolplattformen-app-new/README.md deleted file mode 100644 index f22bc1fc..00000000 --- a/apps/skolplattformen-app-new/README.md +++ /dev/null @@ -1,84 +0,0 @@ -This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). - -# Getting Started - ->**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. - -## Getting started with Development - -### Please use node version 16 or higher - -To clone and build the project, you first need to install [git](https://git-scm.com/), [node](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/cli/v8/commands/npm-install). - -Clone the repo with -```bash -$ git clone https://github.com/Home-Biz-LLS/skolplattformen-react-native -``` - -Install dependencies -```bash -cd apps/skolplattformen-app-new/ && npm i -``` - -### iOS - -If you wanna run the iOS app, you need to setup a couple of things first, we have a guide that will assist you in getting started with the iOS app. A Mac is required to build projects with native code for iOS so we do not have support for Linux / Windows. - -* [Mac OS](https://reactnative.dev/docs/environment-setup) - -#### Step 1 -Make sure you have **Xcode** installed - - -#### Step 2 -Make sure **CocoaPods** is installed (you can do it easily with homebrew) - -* [CocoaPods homebrew](https://formulae.brew.sh/formula/cocoapods) -* [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) - - -#### Step 3 -```bash -cd apps/skolplattformen-app-new/ios && pod install -``` - -If you already setup everything, go into the - -"skolplattformen-app-new" directory - -Start the metro - -``` -npm run start -``` - -then - -``` -i -``` -to Start iOS app - -OR - -Start the iOS app directly -``` -npm run ios -``` - - - -### Android - -If you wanna run the Android app, you need to setup a couple of things first, we have created three different guides depending on your operating system. - -* [Mac OS](/docs/android_mac.md) -* [Windows](/docs/android_windows.md) -* [Linux](/docs/android_linux.md) - -If you already setup everything, you just need to run the following command in the project root: - -``` -yarn run android -``` - diff --git a/apps/skolplattformen-app-new/__mocks__/@react-native-async-storage/async-storage.js b/apps/skolplattformen-app-new/__mocks__/@react-native-async-storage/async-storage.js deleted file mode 100644 index d78ea925..00000000 --- a/apps/skolplattformen-app-new/__mocks__/@react-native-async-storage/async-storage.js +++ /dev/null @@ -1,4 +0,0 @@ -export { - default, - useAsyncStorage, -} from '@react-native-async-storage/async-storage/jest/async-storage-mock' diff --git a/apps/skolplattformen-app-new/__mocks__/react-native-localize.js b/apps/skolplattformen-app-new/__mocks__/react-native-localize.js deleted file mode 100644 index aa153569..00000000 --- a/apps/skolplattformen-app-new/__mocks__/react-native-localize.js +++ /dev/null @@ -1,40 +0,0 @@ -const getLocales = () => [ - { countryCode: 'EN', languageTag: 'en-US', languageCode: 'en', isRTL: false }, - { countryCode: 'SE', languageTag: 'sv-SE', languageCode: 'sv', isRTL: false }, -] - -const findBestAvailableLanguage = jest.fn(() => ({ - languageTag: 'sv', - isRTL: false, -})) - -const getNumberFormatSettings = () => ({ - decimalSeparator: '.', - groupingSeparator: ',', -}) - -const getCalendar = () => 'gregorian' -const getCountry = () => 'SE' -const getCurrencies = () => ['USD', 'SEK'] -const getTemperatureUnit = () => 'celsius' -const getTimeZone = () => 'Europe/Stockholm' -const uses24HourClock = () => true -const usesMetricSystem = () => true - -const addEventListener = jest.fn() -const removeEventListener = jest.fn() - -export { - findBestAvailableLanguage, - getLocales, - getNumberFormatSettings, - getCalendar, - getCountry, - getCurrencies, - getTemperatureUnit, - getTimeZone, - uses24HourClock, - usesMetricSystem, - addEventListener, - removeEventListener, -} diff --git a/apps/skolplattformen-app-new/__mocks__/react-native-safe-area-context.js b/apps/skolplattformen-app-new/__mocks__/react-native-safe-area-context.js deleted file mode 100644 index d75b1ff6..00000000 --- a/apps/skolplattformen-app-new/__mocks__/react-native-safe-area-context.js +++ /dev/null @@ -1,20 +0,0 @@ -// __mocks__/react-native-safe-area-context.js -import React from 'react' -import { View } from 'react-native' - -const inset = { - top: 0, - right: 0, - bottom: 0, - left: 0, -} - -export const SafeAreaProvider = ({ children }) => children - -export const SafeAreaConsumer = ({ children }) => children(inset) - -export const SafeAreaView = ({ children }) => ( - {children} -) - -export const useSafeAreaInsets = () => inset diff --git a/apps/skolplattformen-app-new/android/app/build.gradle b/apps/skolplattformen-app-new/android/app/build.gradle deleted file mode 100644 index 9ea1a1fc..00000000 --- a/apps/skolplattformen-app-new/android/app/build.gradle +++ /dev/null @@ -1,129 +0,0 @@ -apply plugin: "com.android.application" -apply plugin: "com.facebook.react" - -/** - * This is the configuration block to customize your React Native Android app. - * By default you don't need to apply any configuration, just uncomment the lines you need. - */ -react { - /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '..' - // root = file("../") - // The folder where the react-native NPM package is. Default is ../node_modules/react-native - // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen - // codegenDir = file("../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js - // cliFile = file("../node_modules/react-native/cli.js") - - /* Variants */ - // The list of variants to that are debuggable. For those we're going to - // skip the bundling of the JS bundle and the assets. By default is just 'debug'. - // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. - // debuggableVariants = ["liteDebug", "prodDebug"] - - /* Bundling */ - // A list containing the node command and its flags. Default is just 'node'. - // nodeExecutableAndArgs = ["node"] - // - // The command to run when bundling. By default is 'bundle' - // bundleCommand = "ram-bundle" - // - // The path to the CLI configuration file. Default is empty. - // bundleConfig = file(../rn-cli.config.js) - // - // The name of the generated asset file containing your JS bundle - // bundleAssetName = "MyApplication.android.bundle" - // - // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' - // entryFile = file("../js/MyApplication.android.js") - // - // A list of extra flags to pass to the 'bundle' commands. - // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle - // extraPackagerArgs = [] - - /* Hermes Commands */ - // The hermes compiler command to run. By default it is 'hermesc' - // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" - // - // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" - // hermesFlags = ["-O", "-output-source-map"] -} - -/** - * Set this to true to Run Proguard on Release builds to minify the Java bytecode. - */ -def enableProguardInReleaseBuilds = false - -/** - * The preferred build flavor of JavaScriptCore (JSC) - * - * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` - * - * The international variant includes ICU i18n library and necessary data - * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that - * this variant is about 6MiB larger per architecture than default. - */ -def jscFlavor = 'org.webkit:android-jsc:+' - -android { - ndkVersion rootProject.ext.ndkVersion - - compileSdkVersion rootProject.ext.compileSdkVersion - - namespace "com.oppna_skolplattformen_new.app" - defaultConfig { - applicationId "com.oppna_skolplattformen_new.app" - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 4 - versionName "1.0" - } - signingConfigs { - debug { - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - release { - storeFile file('release.jks') - storePassword 'leeandseb' - keyAlias 'upload' - keyPassword 'leeandseb' - } - } - buildTypes { - debug { - signingConfig signingConfigs.debug - } - release { - // Caution! In production, you need to generate your own keystore file. - // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.release - minifyEnabled true - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - } - } -} - -dependencies { - // The version of react-native is set by the React Native Gradle Plugin - implementation("com.facebook.react:react-android") - - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") - debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.squareup.okhttp3', module:'okhttp' - } - - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") - if (hermesEnabled.toBoolean()) { - implementation("com.facebook.react:hermes-android") - } else { - implementation jscFlavor - } -} - -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/apps/skolplattformen-app-new/android/app/debug.keystore b/apps/skolplattformen-app-new/android/app/debug.keystore deleted file mode 100644 index 364e105e..00000000 Binary files a/apps/skolplattformen-app-new/android/app/debug.keystore and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/proguard-rules.pro b/apps/skolplattformen-app-new/android/app/proguard-rules.pro deleted file mode 100644 index 11b02572..00000000 --- a/apps/skolplattformen-app-new/android/app/proguard-rules.pro +++ /dev/null @@ -1,10 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: diff --git a/apps/skolplattformen-app-new/android/app/release.keystore b/apps/skolplattformen-app-new/android/app/release.keystore deleted file mode 100644 index 3f0a4ced..00000000 Binary files a/apps/skolplattformen-app-new/android/app/release.keystore and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/debug/AndroidManifest.xml b/apps/skolplattformen-app-new/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 4b185bc1..00000000 --- a/apps/skolplattformen-app-new/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/apps/skolplattformen-app-new/android/app/src/debug/java/com/app/ReactNativeFlipper.java b/apps/skolplattformen-app-new/android/app/src/debug/java/com/app/ReactNativeFlipper.java deleted file mode 100644 index 9d6fd920..00000000 --- a/apps/skolplattformen-app-new/android/app/src/debug/java/com/app/ReactNativeFlipper.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - *

This source code is licensed under the MIT license found in the LICENSE file in the root - * directory of this source tree. - */ -package com.oppna_skolplattformen_new.app; - -import android.content.Context; -import com.facebook.flipper.android.AndroidFlipperClient; -import com.facebook.flipper.android.utils.FlipperUtils; -import com.facebook.flipper.core.FlipperClient; -import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; -import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; -import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; -import com.facebook.flipper.plugins.inspector.DescriptorMapping; -import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; -import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; -import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceEventListener; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.NetworkingModule; -import okhttp3.OkHttpClient; - -/** - * Class responsible of loading Flipper inside your React Native application. This is the debug - * flavor of it. Here you can add your own plugins and customize the Flipper setup. - */ -public class ReactNativeFlipper { - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - if (FlipperUtils.shouldEnableFlipper(context)) { - final FlipperClient client = AndroidFlipperClient.getInstance(context); - - client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new DatabasesFlipperPlugin(context)); - client.addPlugin(new SharedPreferencesFlipperPlugin(context)); - client.addPlugin(CrashReporterPlugin.getInstance()); - - NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); - NetworkingModule.setCustomClientBuilder( - new NetworkingModule.CustomClientBuilder() { - @Override - public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); - } - }); - client.addPlugin(networkFlipperPlugin); - client.start(); - - // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized - // Hence we run if after all native modules have been initialized - ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); - if (reactContext == null) { - reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceEventListener() { - @Override - public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); - reactContext.runOnNativeModulesQueueThread( - new Runnable() { - @Override - public void run() { - client.addPlugin(new FrescoFlipperPlugin()); - } - }); - } - }); - } else { - client.addPlugin(new FrescoFlipperPlugin()); - } - } - } -} diff --git a/apps/skolplattformen-app-new/android/app/src/main/AndroidManifest.xml b/apps/skolplattformen-app-new/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 8af2453d..00000000 --- a/apps/skolplattformen-app-new/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 036d09bc..00000000 --- a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 86b42de1..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 3aeffa06..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 5ff72be1..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png deleted file mode 100644 index 03734664..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 833c039a..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index b7e9942e..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index ac3d3c45..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 514d5c45..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 262960fa..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 0f9612b5..00000000 Binary files a/apps/skolplattformen-app-new/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/values/ic_launcher_background.xml b/apps/skolplattformen-app-new/android/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index c5d5899f..00000000 --- a/apps/skolplattformen-app-new/android/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #FFFFFF - \ No newline at end of file diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/values/strings.xml b/apps/skolplattformen-app-new/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 6614fac3..00000000 --- a/apps/skolplattformen-app-new/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Öppna Skolplattformen NEW - diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/values/styles.xml b/apps/skolplattformen-app-new/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 955d1571..00000000 --- a/apps/skolplattformen-app-new/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/apps/skolplattformen-app-new/android/app/src/release/java/com/app/ReactNativeFlipper.java b/apps/skolplattformen-app-new/android/app/src/release/java/com/app/ReactNativeFlipper.java deleted file mode 100644 index 7cdbff35..00000000 --- a/apps/skolplattformen-app-new/android/app/src/release/java/com/app/ReactNativeFlipper.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - *

This source code is licensed under the MIT license found in the LICENSE file in the root - * directory of this source tree. - */ -package com.oppna_skolplattformen_new.app; - -import android.content.Context; -import com.facebook.react.ReactInstanceManager; - -/** - * Class responsible of loading Flipper inside your React Native application. This is the release - * flavor of it so it's empty as we don't want to load Flipper. - */ -public class ReactNativeFlipper { - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - // Do nothing as we don't want to initialize Flipper on Release. - } -} diff --git a/apps/skolplattformen-app-new/android/build.gradle b/apps/skolplattformen-app-new/android/build.gradle deleted file mode 100644 index 34ea7181..00000000 --- a/apps/skolplattformen-app-new/android/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - ext { - buildToolsVersion = "33.0.0" - minSdkVersion = 21 - compileSdkVersion = 33 - targetSdkVersion = 33 - - // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. - ndkVersion = "23.1.7779620" - } - repositories { - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle") - classpath("com.facebook.react:react-native-gradle-plugin") - } -} diff --git a/apps/skolplattformen-app-new/android/gradle.properties b/apps/skolplattformen-app-new/android/gradle.properties deleted file mode 100644 index a3b2fa12..00000000 --- a/apps/skolplattformen-app-new/android/gradle.properties +++ /dev/null @@ -1,44 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true - -# Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.182.0 - -# Use this property to specify which architecture you want to build. -# You can also override it from the CLI using -# ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 - -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=false - -# Use this property to enable or disable the Hermes JS engine. -# If set to false, you will be using JSC instead. -hermesEnabled=true diff --git a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.jar b/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 943f0cbf..00000000 Binary files a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.properties b/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 6ec1567a..00000000 --- a/apps/skolplattformen-app-new/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip -networkTimeout=10000 -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/apps/skolplattformen-app-new/android/gradlew b/apps/skolplattformen-app-new/android/gradlew deleted file mode 100755 index 65dcd68d..00000000 --- a/apps/skolplattformen-app-new/android/gradlew +++ /dev/null @@ -1,244 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/apps/skolplattformen-app-new/android/gradlew.bat b/apps/skolplattformen-app-new/android/gradlew.bat deleted file mode 100644 index 6689b85b..00000000 --- a/apps/skolplattformen-app-new/android/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/apps/skolplattformen-app-new/android/settings.gradle b/apps/skolplattformen-app-new/android/settings.gradle deleted file mode 100644 index e4bc8891..00000000 --- a/apps/skolplattformen-app-new/android/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ -rootProject.name = 'app' -apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) -include ':app' -includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/apps/skolplattformen-app-new/app.json b/apps/skolplattformen-app-new/app.json deleted file mode 100644 index 71c44557..00000000 --- a/apps/skolplattformen-app-new/app.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "app", - "displayName": "app", - "schema": "oppnaskolplattformen://" -} diff --git a/apps/skolplattformen-app-new/assets/avatar.png b/apps/skolplattformen-app-new/assets/avatar.png deleted file mode 100644 index 4bae0b00..00000000 Binary files a/apps/skolplattformen-app-new/assets/avatar.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/bankid_low_rgb.png b/apps/skolplattformen-app-new/assets/bankid_low_rgb.png deleted file mode 100644 index 3931b98c..00000000 Binary files a/apps/skolplattformen-app-new/assets/bankid_low_rgb.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/bankid_vector_rgb.svg b/apps/skolplattformen-app-new/assets/bankid_vector_rgb.svg deleted file mode 100755 index 6031cee0..00000000 --- a/apps/skolplattformen-app-new/assets/bankid_vector_rgb.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/apps/skolplattformen-app-new/assets/boys.png b/apps/skolplattformen-app-new/assets/boys.png deleted file mode 100644 index e7ecb44d..00000000 Binary files a/apps/skolplattformen-app-new/assets/boys.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/children.png b/apps/skolplattformen-app-new/assets/children.png deleted file mode 100644 index 0a21526e..00000000 Binary files a/apps/skolplattformen-app-new/assets/children.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/OFL.txt b/apps/skolplattformen-app-new/assets/fonts/OFL.txt deleted file mode 100644 index 246c977c..00000000 --- a/apps/skolplattformen-app-new/assets/fonts/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Black.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Black.ttf deleted file mode 100644 index a9520b78..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Black.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-BlackItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-BlackItalic.ttf deleted file mode 100644 index ebfdd707..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-BlackItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Bold.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Bold.ttf deleted file mode 100644 index b94d47f3..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Bold.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-BoldItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-BoldItalic.ttf deleted file mode 100644 index e2e64456..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-BoldItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBold.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBold.ttf deleted file mode 100644 index 8f008c36..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBold.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBoldItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBoldItalic.ttf deleted file mode 100644 index b2a9bf55..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraBoldItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLight.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLight.ttf deleted file mode 100644 index ee623825..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLight.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLightItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLightItalic.ttf deleted file mode 100644 index e392492a..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ExtraLightItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Italic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Italic.ttf deleted file mode 100644 index 46203996..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Italic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Light.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Light.ttf deleted file mode 100644 index 2ab02219..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Light.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-LightItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-LightItalic.ttf deleted file mode 100644 index 6f9279da..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-LightItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Medium.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Medium.ttf deleted file mode 100644 index e90e87ed..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Medium.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-MediumItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-MediumItalic.ttf deleted file mode 100644 index d8a251c7..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-MediumItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Regular.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Regular.ttf deleted file mode 100644 index be06e7fd..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Regular.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBold.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBold.ttf deleted file mode 100644 index dabf7c24..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBold.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBoldItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBoldItalic.ttf deleted file mode 100644 index 29d5f741..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-SemiBoldItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-Thin.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-Thin.ttf deleted file mode 100644 index f5c0fdd5..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-Thin.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins-ThinItalic.ttf b/apps/skolplattformen-app-new/assets/fonts/Poppins-ThinItalic.ttf deleted file mode 100644 index b9100893..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins-ThinItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/fonts/Poppins.zip b/apps/skolplattformen-app-new/assets/fonts/Poppins.zip deleted file mode 100644 index 30d1b11e..00000000 Binary files a/apps/skolplattformen-app-new/assets/fonts/Poppins.zip and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/freja_eid_logo.png b/apps/skolplattformen-app-new/assets/freja_eid_logo.png deleted file mode 100644 index 62183108..00000000 Binary files a/apps/skolplattformen-app-new/assets/freja_eid_logo.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/girls.png b/apps/skolplattformen-app-new/assets/girls.png deleted file mode 100644 index 3a0a166a..00000000 Binary files a/apps/skolplattformen-app-new/assets/girls.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/kvinna.png b/apps/skolplattformen-app-new/assets/kvinna.png deleted file mode 100644 index ea2e8850..00000000 Binary files a/apps/skolplattformen-app-new/assets/kvinna.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/assets/logo_print.svg b/apps/skolplattformen-app-new/assets/logo_print.svg deleted file mode 100644 index a49325ce..00000000 --- a/apps/skolplattformen-app-new/assets/logo_print.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/skolplattformen-app-new/assets/man.png b/apps/skolplattformen-app-new/assets/man.png deleted file mode 100644 index bd5d07d9..00000000 Binary files a/apps/skolplattformen-app-new/assets/man.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/components/__tests__/Absence.test.js b/apps/skolplattformen-app-new/components/__tests__/Absence.test.js deleted file mode 100644 index 3a6901e6..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/Absence.test.js +++ /dev/null @@ -1,107 +0,0 @@ -import AsyncStorage from '@react-native-async-storage/async-storage' -import { useRoute } from '@react-navigation/native' -import { useUser } from '../../libs/hooks/src' -import { fireEvent, waitFor } from '@testing-library/react-native' -import Mockdate from 'mockdate' -import React from 'react' -import { useSMS } from '../../utils/SMS' -import { render } from '../../utils/testHelpers' -import Absence from '../absence.component' - -let sendSMS -let user = { personalNumber: '201701092395' } - -jest.mock('../../utils/SMS') -jest.mock('../../libs/hooks/src') - -const setup = (customProps = {}) => { - sendSMS = jest.fn() - - useSMS.mockReturnValue({ sendSMS }) - useRoute.mockReturnValue({ params: { child: { id: '1' } } }) - - const props = { - ...customProps, - } - - return render() -} - -beforeAll(() => { - // Hide errors from act - // https://github.com/callstack/react-native-testing-library/issues/379 - jest.spyOn(console, 'error').mockImplementation(() => { - // noop - }) -}) - -beforeEach(async () => { - jest.clearAllMocks() - useUser.mockReturnValue({ - data: user, - status: 'loaded', - }) - await AsyncStorage.clear() -}) - -test.skip('can fill out the form with full day absence', async () => { - const screen = setup() - - await waitFor(() => - fireEvent.changeText( - screen.getByTestId('personalIdentityNumberInput'), - '1212121212' - ) - ) - await waitFor(() => fireEvent.press(screen.getByText('Skicka'))) - - expect(screen.queryByText(/starttid/i)).toBeFalsy() - expect(screen.queryByText(/sluttid/i)).toBeFalsy() - - expect(sendSMS).toHaveBeenCalledWith('121212-1212') -}) - -test.skip('handles missing social security number', async () => { - const screen = setup() - - await waitFor(() => fireEvent.press(screen.getByText('Skicka'))) - - expect(screen.getByText(/Personnummer saknas/i)).toBeTruthy() - expect(sendSMS).not.toHaveBeenCalled() -}) - -test.skip('validates social security number', async () => { - const screen = setup() - - await waitFor(() => - fireEvent.changeText( - screen.getByTestId('personalIdentityNumberInput'), - '12121212' - ) - ) - await waitFor(() => fireEvent.press(screen.getByText('Skicka'))) - - expect(screen.getByText(/Personnumret är ogiltigt/i)).toBeTruthy() - expect(sendSMS).not.toHaveBeenCalled() -}) - -test.skip('can fill out the form with part of day absence', async () => { - Mockdate.set('2021-02-18 15:30') - - const screen = setup() - - await waitFor(() => - fireEvent.changeText( - screen.getByTestId('personalIdentityNumberInput'), - '1212121212' - ) - ) - await waitFor(() => fireEvent.press(screen.getByText('Heldag'))) - - expect(screen.getByText(/starttid/i)).toBeTruthy() - expect(screen.getByText(/sluttid/i)).toBeTruthy() - - await waitFor(() => fireEvent.press(screen.getByText('Skicka'))) - - expect(sendSMS).toHaveBeenCalledWith('121212-1212 1500-1700') -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/Children.test.js b/apps/skolplattformen-app-new/components/__tests__/Children.test.js deleted file mode 100644 index 0d518993..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/Children.test.js +++ /dev/null @@ -1,239 +0,0 @@ -import 'setImmediate' -import { useNavigation } from '@react-navigation/core' -import { - useApi, - useCalendar, - useChildList, - useClassmates, - useMenu, - useNews, - useNotifications, - useSchedule, - useTimetable, -} from '../../libs/hooks/src' -import React from 'react' -import * as RNLocalize from 'react-native-localize' -import { render } from '../../utils/testHelpers' -import { translate } from '../../utils/translation' -import { Children } from '../children.component' - -jest.mock('../../libs/hooks/src') - -const pause = (ms = 0) => new Promise((r) => setTimeout(r, ms)) - -const setup = () => { - return render() -} - -beforeEach(() => { - useApi.mockReturnValue({ - api: { on: jest.fn(), off: jest.fn(), logout: jest.fn() }, - isLoggedIn: false, - }) - RNLocalize.findBestAvailableLanguage.mockImplementationOnce(() => ({ - languageTag: 'sv', - isRTL: false, - })) - useCalendar.mockReturnValueOnce({ data: [], status: 'loaded' }) - useNotifications.mockReturnValueOnce({ data: [], status: 'loaded' }) - useNews.mockReturnValueOnce({ data: [], status: 'loaded' }) - useSchedule.mockReturnValueOnce({ data: [], status: 'loaded' }) - useMenu.mockReturnValueOnce({ data: [], status: 'loaded' }) - useTimetable.mockReturnValueOnce({ data: [], status: 'loaded' }) - useClassmates.mockReturnValueOnce({ data: [], status: 'loaded' }) - useNavigation.mockReturnValue({ navigate: jest.fn(), setOptions: jest.fn() }) -}) - -test('renders loading state', async () => { - useChildList.mockImplementationOnce(() => ({ - data: [], - status: 'loading', - })) - - const screen = setup() - expect(screen.getByText(translate('general.loading'))).toBeTruthy() -}) - -test('renders empty state message', () => { - useChildList.mockImplementationOnce(() => ({ - data: [], - status: 'loaded', - })) - const screen = setup() - - expect( - screen.getByText(translate('children.noKids_description')) - ).toBeTruthy() -}) - -test('renders error state message', () => { - useChildList.mockImplementationOnce(() => ({ - data: [], - status: 'error', - })) - - const screen = setup() - - expect( - screen.getByText(translate('children.loadingErrorHeading')) - ).toBeTruthy() -}) - -test('renders child in preschool', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Test Testsson', - status: 'F', - }, - ], - status: 'loaded', - })) - - const screen = setup() - - expect(screen.getByText('Test Testsson')).toBeTruthy() -}) - -test('renders child in elementary school', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Test Testsson', - status: 'GR', - }, - ], - status: 'loaded', - })) - - const screen = setup() - - expect(screen.getByText('Test Testsson')).toBeTruthy() -}) - -test('renders child in high school', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Test Testsson', - status: 'G', - }, - ], - status: 'loaded', - })) - - const screen = setup() - - expect(screen.getByText('Test Testsson')).toBeTruthy() - expect( - screen.getByText(translate('abbrevations.upperSecondarySchool')) - ).toBeTruthy() -}) - -test('renders multiple children', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Storasyster Testsson', - status: 'G', - }, - { - name: 'Lillebror Testsson', - status: 'GR', - }, - ], - status: 'loaded', - })) - - const screen = setup() - - expect(screen.getByText('Storasyster Testsson')).toBeTruthy() - expect( - screen.getByText(translate('abbrevations.upperSecondarySchool')) - ).toBeTruthy() - - expect(screen.getByText('Lillebror Testsson')).toBeTruthy() - expect( - screen.getByText(translate('abbrevations.compulsorySchool')) - ).toBeTruthy() -}) - -test('renders child in class', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Test Testsson', - status: 'G', - schoolID: 'Vallaskolan', - }, - ], - status: 'loaded', - })) - useClassmates.mockReset() - useClassmates.mockImplementationOnce(() => ({ - data: [ - { - className: '8C', - }, - ], - status: 'loaded', - })) - const screen = setup() - - expect(screen.getByText('Test Testsson')).toBeTruthy() - expect(screen.getByText('8C • Vallaskolan')).toBeTruthy() -}) - -test('removes any parenthesis from name', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Test Testsson (elev)', - status: 'G', - }, - ], - status: 'loaded', - })) - const screen = setup() - - expect(screen.getByText('Test Testsson')).toBeTruthy() -}) - -test('handles multiple statuses for a child', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Test Testsson(elev)', - status: 'G;GR;F', - }, - ], - status: 'loaded', - })) - const screen = setup() - - var multipleStatusesRendered = `${translate( - 'abbrevations.upperSecondarySchool' - )}, ${translate('abbrevations.compulsorySchool')}, ${translate( - 'abbrevations.leisureTimeCentre' - )}` - - expect(screen.getByText('Test Testsson')).toBeTruthy() - expect(screen.getByText(multipleStatusesRendered)).toBeTruthy() -}) - -test('says if there is nothing new this week', () => { - useChildList.mockImplementationOnce(() => ({ - data: [ - { - name: 'Kanye West', - status: 'F', - }, - ], - status: 'loaded', - })) - const screen = setup() - - expect( - screen.getByText(translate('news.noNewNewsItemsThisWeek')) - ).toBeTruthy() -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/Classmates.test.js b/apps/skolplattformen-app-new/components/__tests__/Classmates.test.js deleted file mode 100644 index 3b47326e..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/Classmates.test.js +++ /dev/null @@ -1,86 +0,0 @@ -import { useClassmates } from '../../libs/hooks/src' -import React from 'react' -import { render } from '../../utils/testHelpers' -import { ChildProvider } from '../childContext.component' -import { Classmates } from '../classmates.component' - -jest.mock('../../libs/hooks/src') - -const defaultClassmates = [ - { - className: '2B', - firstname: 'Tyrell', - lastname: 'Eriksson', - guardians: [ - { - firstname: 'Margaery', - lastname: 'Eriksson', - }, - { - firstname: 'Loras', - lastname: 'Eriksson', - }, - ], - }, - { - className: '2B', - firstname: 'Adam', - lastname: 'Svensson', - guardians: [ - { - firstname: 'Eva', - lastname: 'Svensson', - }, - ], - }, -] - -const setup = ({ classmates } = { classmates: defaultClassmates }) => { - useClassmates.mockReturnValue({ - data: classmates, - }) - - return render( - - - - ) -} - -test('gets the classmates for a child from context', () => { - setup() - - expect(useClassmates).toHaveBeenCalledWith({ id: 1 }) -}) - -test('renders class name', () => { - const screen = setup() - - expect(screen.getByText(/^klass 2b$/i)).toBeTruthy() -}) - -test('renders class without name', () => { - const screen = setup({ - classmates: [], - }) - - expect(screen.getByText(/^klass$/i)).toBeTruthy() -}) - -test('renders classmates sorted by first name', () => { - const screen = setup() - - expect(screen.getByLabelText('Barn 1')).toContainElement( - screen.getByText(/adam svensson/i) - ) - expect(screen.getByLabelText('Barn 2')).toContainElement( - screen.getByText(/tyrell eriksson/i) - ) -}) - -test('renders guardians sorted by first name', () => { - const screen = setup() - - expect(screen.getByText(/eva svensson/i)).toBeTruthy() - expect(screen.getByText(/^loras eriksson, margaery eriksson$/i)).toBeTruthy() -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/ContactMenu.test.js b/apps/skolplattformen-app-new/components/__tests__/ContactMenu.test.js deleted file mode 100644 index a9bf9720..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/ContactMenu.test.js +++ /dev/null @@ -1,137 +0,0 @@ -import { fireEvent } from '@testing-library/react-native' -import React from 'react' -import { Linking } from 'react-native' -import { render } from '../../utils/testHelpers' -import { ContactMenu } from '../contactMenu.component' -import { act } from 'react-test-renderer' - -const defaultGuardian = { - address: 'Testgatan', - email: 'adam@adamsson.se', - firstname: 'Adam', - lastname: 'Adamsson', - mobile: '0701234567', -} - -const defaultProps = { - contact: { - guardians: [defaultGuardian], - }, -} - -const setup = (customProps = {}) => { - const props = { - ...defaultProps, - ...customProps, - } - - return render() -} - -beforeAll(() => { - // Hide errors from state illegal state transition - // Probably due to mock - jest.spyOn(console, 'error').mockImplementation(() => { - // noop - }) -}) - -beforeEach(jest.clearAllMocks) - -test('renders a parent', () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - expect(screen.getByText(/adam adamsson/i)).toBeTruthy() -}) - -test('displays option to call and text guardian', () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - fireEvent.press(screen.getByText(/ring/i)) - expect(Linking.openURL).toHaveBeenCalledWith('tel:0701234567') - - fireEvent.press(screen.getByText(/sms/i)) - expect(Linking.openURL).toHaveBeenCalledWith('sms:0701234567') -}) - -test('hides options to call and text if no phone number', () => { - const guardianWithoutPhoneNumber = { - contact: { - guardians: [ - { - ...defaultGuardian, - mobile: null, - }, - ], - }, - } - - const screen = setup(guardianWithoutPhoneNumber) - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - expect(screen.queryByTestId('CallMenuItem')).toBeNull() - expect(screen.queryByTestId('SMSMenuItem')).toBeNull() -}) - -test('displays option to email guardian', () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - fireEvent.press(screen.getByText(/maila/i)) - expect(Linking.openURL).toHaveBeenCalledWith('mailto:adam@adamsson.se') -}) - -test('hides options to email phone number', () => { - const guardianWithoutEmail = { - contact: { - guardians: [ - { - ...defaultGuardian, - email: null, - }, - ], - }, - } - - const screen = setup(guardianWithoutEmail) - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - expect(screen.queryByTestId('SendEmailMenuItem')).toBeNull() -}) - -test('displays address of guardian', () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - fireEvent.press(screen.getByText(/adress/i)) - expect(Linking.openURL).toHaveBeenCalledWith( - 'http://maps.apple.com/?daddr=Testgatan' - ) -}) - -test('hides address if it does not exist', () => { - const guardianWithoutAddress = { - contact: { - guardians: [ - { - ...defaultGuardian, - address: null, - }, - ], - }, - } - - const screen = setup(guardianWithoutAddress) - - fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - - expect(screen.queryByTestId('ShowHomeMenuItem')).toBeNull() -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/Menu.test.js b/apps/skolplattformen-app-new/components/__tests__/Menu.test.js deleted file mode 100644 index 4f7fad18..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/Menu.test.js +++ /dev/null @@ -1,50 +0,0 @@ -import { useMenu } from '../../libs/hooks/src' -import React from 'react' -import { render } from '../../utils/testHelpers' -import { translate } from '../../utils/translation' -import { Menu } from '../menu.component' - -jest.mock('../../libs/hooks/src') - -const defaultItemList = [ - { - title: 'Måndag vecka 10', - description: 'Krämiga köttbullar', - }, - { - title: 'Tisdag vecka 10', - description: 'Kryddig falukorv', - }, - { - title: 'Onsdag vecka 10', - description: 'Sushi', - }, -] - -const setup = (itemList = defaultItemList) => { - useMenu.mockReturnValue({ - data: itemList, - }) - - return render(

) -} - -test('renders multiple days', () => { - const screen = setup() - - expect(screen.getByText('Måndag vecka 10')).toBeTruthy() - expect(screen.getByText('Tisdag vecka 10')).toBeTruthy() - expect(screen.getByText('Onsdag vecka 10')).toBeTruthy() -}) - -test('renders title and description', () => { - const screen = setup() - - expect(screen.getByText('Måndag vecka 10')).toBeTruthy() - expect(screen.getByText('Krämiga köttbullar')).toBeTruthy() -}) - -test('renders empty menu', () => { - const screen = setup([]) - expect(screen.getByText(translate('menu.emptyText'))).toBeTruthy() -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/NewsItem.test.js b/apps/skolplattformen-app-new/components/__tests__/NewsItem.test.js deleted file mode 100644 index 7d7670cf..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/NewsItem.test.js +++ /dev/null @@ -1,86 +0,0 @@ -import { useApi, useNewsDetails } from '../../libs/hooks/src' -import React from 'react' -import { render } from '../../utils/testHelpers' -import { NewsItem } from '../newsItem.component' - -jest.mock('../../libs/hooks/src') - -const defaultNewsItem = { - author: 'Köket', - fullImageUrl: 'test.png', - header: 'K-bullar!', - published: '2021-02-15T09:13:28.484Z', - modified: '2021-02-15T09:13:28.484Z', -} - -let navigation - -const setup = (customProps = { newsItem: {} }) => { - useApi.mockReturnValue({ api: { getSessionCookie: jest.fn() } }) - - useNewsDetails.mockReturnValue({ - data: { - body: 'Nu blir det köttbullar', - }, - }) - - navigation = { - goBack: jest.fn(), - } - - const newsItem = { - ...defaultNewsItem, - ...customProps.newsItem, - } - - const props = { - navigation, - route: { - params: { - child: { id: 1 }, - newsItem, - }, - }, - ...customProps, - } - - return render() -} - -test('gets article details using useNewsDetails', async () => { - setup() - - expect(useNewsDetails).toHaveBeenCalledWith({ id: 1 }, defaultNewsItem) -}) - -test('renders an article', () => { - const screen = setup() - - expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() - expect(screen.getByText('Publicerad: 15 feb 2021 10:13')).toBeTruthy() - expect(screen.getByText('Uppdaterad: 15 feb 2021 10:13')).toBeTruthy() -}) - -test('renders an article without published date if date is invalid', () => { - const newsItemWithoutPublishedDate = { - ...defaultNewsItem, - published: '2020-08-16T21:10:00.000+02:0', - } - const screen = setup({ newsItem: newsItemWithoutPublishedDate }) - - expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() - expect(screen.getByText('Uppdaterad: 15 feb 2021 10:13')).toBeTruthy() - expect(screen.queryByText('Publicerad: Invalid DateTime')).toBeFalsy() -}) - -test('renders an article without modified date if date is invalid', () => { - const newsItemWithoutPublishedDate = { - ...defaultNewsItem, - modified: null, - } - const screen = setup({ newsItem: newsItemWithoutPublishedDate }) - - expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() - expect(screen.getByText('Publicerad: 15 feb 2021 10:13')).toBeTruthy() - expect(screen.queryByText('Uppdaterad: Invalid DateTime')).toBeFalsy() -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/NewsListItem.test.js b/apps/skolplattformen-app-new/components/__tests__/NewsListItem.test.js deleted file mode 100644 index 51321df0..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/NewsListItem.test.js +++ /dev/null @@ -1,81 +0,0 @@ -import { useNavigation } from '@react-navigation/native' -import { fireEvent } from '@testing-library/react-native' -import MockDate from 'mockdate' -import React from 'react' -import { render } from '../../utils/testHelpers' -import { ChildProvider } from '../childContext.component' -import { NewsListItem } from '../newsListItem.component' - -const defaultItem = { - author: 'Köket', - intro: 'Nu blir det köttbullar', - header: 'K-bullar!', - published: '2021-02-15T09:13:28.484Z', - modified: '2021-02-15T09:13:28.484Z', -} - -const setup = (customProps = {}) => { - const props = { - item: defaultItem, - ...customProps, - } - - return render( - - - - ) -} - -beforeEach(() => { - MockDate.set('2021-02-15T09:30:28.484Z') -}) - -test('renders an article', () => { - const screen = setup() - - expect(screen.getByText(/k-bullar!/i)).toBeTruthy() - expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() - expect(screen.getByText('Köket • för 17 minuter sedan')).toBeTruthy() -}) - -test('renders article without date', () => { - const itemWithInvalidDate = { - ...defaultItem, - published: null, - modified: null, - } - - const screen = setup({ item: itemWithInvalidDate }) - - expect(screen.getByText(/k-bullar!/i)).toBeTruthy() - expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() - expect(screen.getByText(/^köket$/i)).toBeTruthy() -}) - -test('falls back to modified date if no published date', () => { - const itemWithInvalidDate = { - ...defaultItem, - published: null, - } - - const screen = setup({ item: itemWithInvalidDate }) - - expect(screen.getByText(/k-bullar!/i)).toBeTruthy() - expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() - expect(screen.getByText('Köket • för 17 minuter sedan')).toBeTruthy() -}) - -test('navigates to news article on press', () => { - const navigate = jest.fn() - useNavigation.mockReturnValue({ navigate }) - - const screen = setup() - - fireEvent.press(screen.getByText(/k-bullar!/i)) - - expect(navigate).toHaveBeenCalledWith('NewsItem', { - child: { id: 1 }, - newsItem: defaultItem, - }) -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/Notification.test.js b/apps/skolplattformen-app-new/components/__tests__/Notification.test.js deleted file mode 100644 index 91bcec08..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/Notification.test.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react' -import { render } from '../../utils/testHelpers' -import { Notification } from '../notification.component' -import MockDate from 'mockdate' - -const defaultItem = { - sender: 'Planering', - category: 'Bedömning', - dateCreated: '2021-02-15T09:13:28.484Z', - dateModified: '2021-02-15T09:14:28.484Z', -} - -// copied from https://github.com/react-native-webview/react-native-webview/issues/2934#issuecomment-1524101977 -jest.mock('react-native-webview', () => { - const { View } = require('react-native') - return { - WebView: View, - } -}) -// - -const setup = (customProps = {}) => { - const props = { - item: defaultItem, - ...customProps, - } - - return render() -} - -beforeEach(() => { - MockDate.set('2021-02-15T09:30:28.484Z') -}) - -test('renders subtitle with modified date', () => { - const screen = setup() - - expect(screen.getByText('Bedömning • för 16 minuter sedan')).toBeTruthy() -}) - -test('renders subtitle with created date', () => { - const itemWithoutModifiedDate = { - ...defaultItem, - dateModified: undefined, - } - - const screen = setup({ item: itemWithoutModifiedDate }) - - expect(screen.getByText('Bedömning • för 17 minuter sedan')).toBeTruthy() -}) - -test('renders subtitle without date', () => { - const itemWithoutDate = { - ...defaultItem, - dateCreated: undefined, - dateModified: undefined, - } - - const screen = setup({ item: itemWithoutDate }) - - expect(screen.getByText('Bedömning')).toBeTruthy() -}) - -test('renders subtitle without category', () => { - const itemWithoutCategory = { - ...defaultItem, - category: undefined, - } - - const screen = setup({ item: itemWithoutCategory }) - - expect(screen.getByText('för 16 minuter sedan')).toBeTruthy() -}) diff --git a/apps/skolplattformen-app-new/components/__tests__/saveToCalendar.test.js b/apps/skolplattformen-app-new/components/__tests__/saveToCalendar.test.js deleted file mode 100644 index 0dfbcc1b..00000000 --- a/apps/skolplattformen-app-new/components/__tests__/saveToCalendar.test.js +++ /dev/null @@ -1,133 +0,0 @@ -import { fireEvent } from '@testing-library/react-native' -import React from 'react' -import RNCalendarEvents from 'react-native-calendar-events' -import Toast from 'react-native-simple-toast' -import { render } from '../../utils/testHelpers' -import { SaveToCalendar } from '../saveToCalendar.component' - -const defaultEvent = { - title: 'Utvecklingssamtal', - startDate: '2021-06-19 13:00', - endDate: '2021-06-19 14:00', - location: 'Gubbängsskolan', -} - -const defaultProps = { - event: defaultEvent, -} - -const setup = (customProps = {}) => { - const props = { - ...defaultProps, - ...customProps, - } - - return render() -} - -beforeAll(() => { - // Hide errors from state illegal state transition - // Probably due to mock - jest.spyOn(console, 'error').mockImplementation(() => { - // noop - }) -}) - -beforeEach(jest.clearAllMocks) - -test('renders save to calendar', () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('actionsButton')) - - expect(screen.getByText(/Spara/i)).toBeTruthy() -}) - -test('requests calendar permissons', () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('actionsButton')) - fireEvent.press(screen.getByText(/Spara/i)) - - expect(RNCalendarEvents.requestPermissions).toHaveBeenCalled() -}) - -test('can save an event to the calendar', async () => { - const screen = setup({ - event: { - ...defaultEvent, - location: null, - description: null, - }, - }) - - fireEvent.press(screen.getByTestId('actionsButton')) - fireEvent.press(screen.getByText(/Spara/i)) - await RNCalendarEvents.requestPermissions() - - expect(RNCalendarEvents.saveEvent).toHaveBeenCalledWith('Utvecklingssamtal', { - startDate: '2021-06-19T11:00:00.000Z', - endDate: '2021-06-19T12:00:00.000Z', - }) -}) - -test('removes any null values from the event', async () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('actionsButton')) - fireEvent.press(screen.getByText(/Spara/i)) - await RNCalendarEvents.requestPermissions() - - expect(RNCalendarEvents.saveEvent).toHaveBeenCalledWith('Utvecklingssamtal', { - startDate: '2021-06-19T11:00:00.000Z', - endDate: '2021-06-19T12:00:00.000Z', - location: 'Gubbängsskolan', - }) -}) - -test('calls toast with success', async () => { - const screen = setup() - - fireEvent.press(screen.getByTestId('actionsButton')) - fireEvent.press(screen.getByText(/Spara/i)) - await RNCalendarEvents.requestPermissions() - await RNCalendarEvents.saveEvent() - - expect(Toast.showWithGravity).toHaveBeenCalledWith( - '✔️ Sparad till kalender', - 'short', - 'bottom' - ) -}) - -test('says if something goes wrong', async () => { - const screen = setup() - RNCalendarEvents.saveEvent.mockRejectedValueOnce() - - fireEvent.press(screen.getByTestId('actionsButton')) - fireEvent.press(screen.getByText(/Spara/i)) - await RNCalendarEvents.requestPermissions() - await RNCalendarEvents.saveEvent() - - expect(Toast.showWithGravity).toHaveBeenCalledWith( - 'Något gick fel', - 'short', - 'bottom' - ) -}) - -test('tells user if they havent authorized calendar', async () => { - const screen = setup() - RNCalendarEvents.requestPermissions.mockResolvedValueOnce('not auth') - - fireEvent.press(screen.getByTestId('actionsButton')) - fireEvent.press(screen.getByText(/Spara/i)) - await RNCalendarEvents.requestPermissions() - await RNCalendarEvents.saveEvent() - - expect(Toast.showWithGravity).toHaveBeenCalledWith( - 'Du måste godkänna åtkomst till kalendern', - 'short', - 'bottom' - ) -}) diff --git a/apps/skolplattformen-app-new/components/absence.component.tsx b/apps/skolplattformen-app-new/components/absence.component.tsx deleted file mode 100644 index 05bfad47..00000000 --- a/apps/skolplattformen-app-new/components/absence.component.tsx +++ /dev/null @@ -1,280 +0,0 @@ -import { RouteProp, useRoute } from '@react-navigation/native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { useUser } from '../libs/hooks/src' -import { - Button, - CheckBox, - Input, - StyleService, - Text, - useStyleSheet, -} from '@ui-kitten/components' -import { Formik } from 'formik' -import moment from 'moment' -import Personnummer from 'personnummer' -import React, { useCallback } from 'react' -import { View } from 'react-native' -import DateTimePickerModal from 'react-native-modal-datetime-picker' -import * as Yup from 'yup' -import { defaultStackStyling } from '../design/navigationThemes' -// import usePersonalStorage from '../hooks/usePersonalStorage'; -import useSettingsStorage from '../hooks/useSettingsStorage' -import { Layout as LayoutStyle, Sizing, Typography } from '../styles' -import { studentName } from '../utils/peopleHelpers' -import { useSMS } from '../utils/SMS' -import { translate } from '../utils/translation' -import { AlertIcon } from './icon.component' -import { RootStackParamList } from './navigation.component' -import { NavigationTitle } from './navigationTitle.component' - -type AbsenceRouteProps = RouteProp - -interface AbsenceFormValues { - displayStartTimePicker: boolean - displayEndTimePicker: boolean - personalIdentityNumber: string - isFullDay: boolean - startTime: moment.Moment - endTime: moment.Moment -} - -export const absenceRouteOptions = - (darkMode: boolean) => - ({ - route, - }: { - route: RouteProp - }): NativeStackNavigationOptions => { - const child = route.params.child - return { - ...defaultStackStyling(darkMode), - headerTitle: () => ( - - ), - } - } - -const Absence = () => { - const AbsenceSchema = Yup.object().shape({ - personalIdentityNumber: Yup.string() - .required(translate('abscense.personalNumberMissing')) - .test('is-valid', translate('abscense.invalidPersonalNumber'), (value) => - value ? Personnummer.valid(value) : true - ), - isFullDay: Yup.bool().required(), - }) - - const { data: user } = useUser() - const route = useRoute() - const { sendSMS } = useSMS() - const { child } = route.params - const [personalIdentityNumber, setPersonalIdentityNumber] = React.useState('') - const [personalIdsFromStorage, setPersonalIdInStorage] = useSettingsStorage( - 'childPersonalIdentityNumber' - ) - const personalIdKey = `@childPersonalIdNumber.${child.id}` - const minumumDate = moment().hours(8).minute(0) - const maximumDate = moment().hours(17).minute(0) - const styles = useStyleSheet(themedStyles) - - const submit = useCallback( - async (values: AbsenceFormValues) => { - const personalIdNumber = Personnummer.parse( - values.personalIdentityNumber - ).format() - - if (values.isFullDay) { - sendSMS(personalIdNumber) - } else { - sendSMS( - `${personalIdNumber} ${moment(values.startTime).format( - 'HHmm' - )}-${moment(values.endTime).format('HHmm')}` - ) - } - - const toStore = { - ...personalIdsFromStorage, - ...{ [personalIdKey]: personalIdNumber }, - } - setPersonalIdInStorage(toStore) - }, - [personalIdKey, personalIdsFromStorage, sendSMS, setPersonalIdInStorage] - ) - - React.useEffect(() => { - const personalIdFromStorage = personalIdsFromStorage[personalIdKey] || '' - setPersonalIdentityNumber(personalIdFromStorage || '') - }, [child, personalIdKey, personalIdsFromStorage, user]) - - const initialValues: AbsenceFormValues = { - displayStartTimePicker: false, - displayEndTimePicker: false, - personalIdentityNumber: personalIdentityNumber || '', - isFullDay: true, - startTime: moment().hours(Math.max(8, new Date().getHours())).minute(0), - endTime: maximumDate, - } - - return ( - - {({ - handleChange, - handleBlur, - handleSubmit, - setFieldValue, - values, - touched, - errors, - }) => { - const hasError = (field: keyof typeof values) => - errors[field] && touched[field] - - return ( - - - - {translate('abscense.childsPersonalNumber')} - - - {hasError('personalIdentityNumber') && ( - - {errors.personalIdentityNumber} - - )} - - - setFieldValue('isFullDay', checked)} - > - {translate('abscense.entireDay')} - - - {!values.isFullDay && ( - - - - {translate('abscense.startTime')} - - - { - setFieldValue('startTime', date) - setFieldValue('displayStartTimePicker', false) - }} - onCancel={() => - setFieldValue('displayStartTimePicker', false) - } - /> - - - - - {translate('abscense.endTime')} - - - { - setFieldValue('endTime', date) - setFieldValue('displayEndTimePicker', false) - }} - onCancel={() => - setFieldValue('displayEndTimePicker', false) - } - /> - - - )} - - - ) - }} - - ) -} - -export default Absence - -const themedStyles = StyleService.create({ - wrap: { - ...LayoutStyle.flex.full, - padding: Sizing.t4, - backgroundColor: 'background-basic-color-2', - }, - field: { marginBottom: Sizing.t4 }, - partOfDay: { ...LayoutStyle.flex.row, marginBottom: Sizing.t4 }, - spacer: { width: Sizing.t2 }, - inputHalf: { ...LayoutStyle.flex.full }, - input: { - backgroundColor: 'background-basic-color-1', - borderColor: 'color-input-border', - }, - // TODO: Refactor to use mapping.json in eva design - pickerButton: { - backgroundColor: 'background-basic-color-1', - }, - label: { - ...Typography.fontSize.sm, - ...Typography.fontWeight.bold, - marginBottom: Sizing.t2, - }, - error: { - color: 'color-primary-600', - }, -}) diff --git a/apps/skolplattformen-app-new/components/auth.component.tsx b/apps/skolplattformen-app-new/components/auth.component.tsx deleted file mode 100644 index c1d6ba30..00000000 --- a/apps/skolplattformen-app-new/components/auth.component.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { StackNavigationProp } from '@react-navigation/stack' -import { - StyleService, - Text, - useStyleSheet, - useTheme, -} from '@ui-kitten/components' -import React from 'react' -import { - Image, - ImageStyle, - Keyboard, - TouchableOpacity, - TouchableWithoutFeedback, - View, -} from 'react-native' -import { useTranslation } from '../hooks/useTranslation' -import { Layout as LayoutStyle, Sizing, Typography } from '../styles' -import { fontSize } from '../styles/typography' -import { KeyboardAvoidingView } from '../ui/keyboardAvoidingView.component' -import { SafeAreaView } from '../ui/safeAreaView.component' -import { SettingsIcon } from './icon.component' -import { Login } from './login.component' -import { RootStackParamList } from './navigation.component' - -const randomWord = ( - t: (scope: I18n.Scope, options?: I18n.TranslateOptions | undefined) => string -) => { - const words = t('auth.words') - const keys = Object.keys(words) - - const randomIndex: number = Math.floor(Math.random() * keys.length) - const argumentKey: string = keys[randomIndex] - - return words[argumentKey] -} - -interface AuthProps { - navigation: StackNavigationProp -} - -export const authRouteOptions = (): NativeStackNavigationOptions => { - return { - headerShown: false, - animationTypeForReplace: 'push', - animation: 'fade', - } -} - -export const Auth: React.FC = ({ navigation }) => { - const styles = useStyleSheet(themeStyles) - const colors = useTheme() - const { t } = useTranslation() - // const t = (key: string) => key; - - return ( - - - - navigation.navigate('Settings')} - accessibilityHint={t( - 'auth.a11y_navigate_to_settings' - // defaultValue: 'Navigerar till vyn för inställningar', - )} - accessibilityLabel={t( - 'auth.a11y_settings' - // { - // // defaultValue: 'Inställningar', - // } - )} - > - - - {t('general.settings')} - - - - - - - - - - Öppna skolplattformen - - - - {t('auth.subtitle', { - word: randomWord(t), - })} - - - - - - - - ) -} - -const themeStyles = StyleService.create({ - container: { - ...LayoutStyle.mainAxis.flexStart, - ...LayoutStyle.crossAxis.flexEnd, - padding: Sizing.t6, - }, - imageWrapper: { - flex: 1, - justifyContent: 'flex-end', - }, - image: { - ...Sizing.aspectRatio(1.5, Sizing.Ratio['4:3']), - }, - content: { - ...LayoutStyle.flex.full, - }, - header: { - width: '100%', - marginBottom: Sizing.t5, - fontFamily: 'Poppins-Black', - fontWeight: '900', - }, - subtitle: { - width: '100%', - textAlign: 'center', - ...Typography.fontSize.xs, - marginTop: Sizing.t5, - }, - language: { - flexDirection: 'row', - alignItems: 'center', - padding: Sizing.t3, - paddingLeft: Sizing.t5, - }, - languageText: { - ...fontSize.sm, - marginLeft: Sizing.t1, - }, - settingsLink: { - alignSelf: 'flex-start', - zIndex: 1, - }, -}) diff --git a/apps/skolplattformen-app-new/components/calendar.component.tsx b/apps/skolplattformen-app-new/components/calendar.component.tsx deleted file mode 100644 index a5b9ead4..00000000 --- a/apps/skolplattformen-app-new/components/calendar.component.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import { useCalendar } from '../libs/hooks/src' -import { CalendarItem } from '@skolplattformen/api' -import { - Divider, - List, - ListItem, - StyleService, - Text, - useStyleSheet, -} from '@ui-kitten/components' -import moment from 'moment' -import React from 'react' -import { Layout as LayoutStyle, Sizing, Typography } from '../styles' -import { ListRenderItemInfo, RefreshControl, View } from 'react-native' - -import { translate } from '../utils/translation' -import { useChild } from './childContext.component' -import { CalendarOutlineIcon } from './icon.component' -import { SaveToCalendar } from './saveToCalendar.component' -import { Week } from './week.component' - -// const translate = (key: string) => key; - -export const Calendar = () => { - const child = useChild() - const { data, status, reload } = useCalendar(child) - const styles = useStyleSheet(themedStyles) - - const formatStartDate = (startDate: moment.MomentInput) => { - const date = moment(startDate) - const output = `${date.format('dddd')} ${date.format( - 'll' - )} • ${date.fromNow()}` - - // Hack to remove year if it is this year - const currentYear = moment().year().toString(10) - return output.replace(currentYear, '') - } - - const sortedData = () => { - if (!data) { - return [] - } - - return data.sort((a, b) => - a.startDate && b.startDate ? a.startDate.localeCompare(b.startDate) : 0 - ) - } - - return ( - - - - - {translate('calender.emptyHeadline')} - - - {translate('calender.emptyText')} - - - } - renderItem={({ item }: ListRenderItemInfo) => ( - ( - - {formatStartDate(item.startDate)} - - )} - accessoryLeft={CalendarOutlineIcon} - accessoryRight={() => } - /> - )} - refreshControl={ - - } - /> - - ) -} - -const themedStyles = StyleService.create({ - container: { - backgroundColor: 'background-basic-color-1', - height: '100%', - width: '100%', - }, - description: { - ...Typography.fontSize.xs, - color: 'text-hint-color', - }, - emptyState: { - ...LayoutStyle.center, - ...LayoutStyle.flex.full, - }, - emptyStateHeadline: { - ...Typography.align.center, - margin: Sizing.t4, - }, - emptyStateDescription: { - ...Typography.align.center, - lineHeight: 21, - paddingHorizontal: Sizing.t3, - margin: Sizing.t4, - }, -}) diff --git a/apps/skolplattformen-app-new/components/child.component.tsx b/apps/skolplattformen-app-new/components/child.component.tsx deleted file mode 100644 index e5bd91fb..00000000 --- a/apps/skolplattformen-app-new/components/child.component.tsx +++ /dev/null @@ -1,216 +0,0 @@ -import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' -import { - getFocusedRouteNameFromRoute, - RouteProp, - useNavigation, - useRoute, -} from '@react-navigation/native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -// import {StackNavigationProp} from '@react-navigation/stack'; -import { Icon } from '@ui-kitten/components' -import React, { useEffect } from 'react' -// import {StyleProp, TextProps} from 'react-native'; -import { defaultStackStyling } from '../design/navigationThemes' -import { useFeature } from '../hooks/useFeature' -import { studentName } from '../utils/peopleHelpers' -import { translate } from '../utils/translation' -import { Calendar } from './calendar.component' -import { ChildProvider } from './childContext.component' -import { Classmates } from './classmates.component' -import { Menu } from './menu.component' -import { RootStackParamList } from './navigation.component' -import { NavigationTitle } from './navigationTitle.component' -import { NewsList } from './newsList.component' -import { NotificationsList } from './notificationsList.component' -import { TabBarLabel } from './tabBarLabel.component' - -// const translate = (key: string) => key; - -// type ChildNavigationProp = StackNavigationProp; -type ChildRouteProps = RouteProp - -export type ChildTabParamList = { - News: undefined - Notifications: undefined - Calendar: undefined - Menu: undefined - Classmates: undefined -} - -// interface TabTitleProps { -// children: string; -// style?: StyleProp; -// } - -const { Navigator, Screen } = createBottomTabNavigator() - -const NewsScreen = () => -const NotificationsScreen = () => -const CalendarScreen = () => -const MenuScreen = () => -const ClassmatesScreen = () => - -interface ScreenSettings { - NEWS_SCREEN: boolean - NOTIFICATIONS_SCREEN: boolean - CALENDER_SCREEN: boolean - MENU_SCREEN: boolean - CLASSMATES_SCREEN: boolean -} - -const TabNavigator = ({ - initialRouteName = 'News', - screenSettings, -}: { - initialRouteName?: keyof ChildTabParamList - screenSettings: ScreenSettings -}) => ( - { - return { - tabBarLabel: ({ focused }) => ( - - ), - tabBarIcon: ({ focused, color }) => { - let iconName = 'news' - - if (route.name === 'News') { - iconName = focused ? 'book-open' : 'book-open-outline' - } else if (route.name === 'Notifications') { - iconName = focused ? 'alert-circle' : 'alert-circle-outline' - } else if (route.name === 'Calendar') { - iconName = focused ? 'calendar' : 'calendar-outline' - } else if (route.name === 'Menu') { - iconName = focused ? 'clipboard' : 'clipboard-outline' - } else if (route.name === 'Classmates') { - iconName = focused ? 'people' : 'people-outline' - } - return - }, - } - }} - > - {screenSettings.NEWS_SCREEN && ( - - )} - {screenSettings.NOTIFICATIONS_SCREEN && ( - - )} - {screenSettings.CALENDER_SCREEN && ( - - )} - {screenSettings.MENU_SCREEN && ( - - )} - {screenSettings.CLASSMATES_SCREEN && ( - - )} - -) - -const getHeaderTitle = (route: any) => { - const routeName = - getFocusedRouteNameFromRoute(route) ?? - route.params.initialRouteName ?? - 'News' - return getRouteTitleFromName(routeName) -} - -const getRouteTitleFromName = (routeName: string) => { - switch (routeName) { - case 'News': - return translate('navigation.news') - case 'Notifications': - return translate('navigation.notifications') - case 'Calendar': - return translate('navigation.calender') - case 'Menu': - return translate('navigation.menu') - case 'Classmates': - return translate('navigation.classmates') - default: - return '' - } -} - -export const childRouteOptions = - (darkMode: boolean) => - ({ - route, - }: { - route: RouteProp - }): NativeStackNavigationOptions => { - const { child } = route.params - - return { - ...defaultStackStyling(darkMode), - headerTitle: () => ( - - ), - } - } - -export const Child = () => { - const route = useRoute() - const { child, initialRouteName } = route.params - const useFoodMenu = useFeature('FOOD_MENU') - const useClassList = useFeature('CLASS_LIST') - - const navigation = useNavigation() - - useEffect(() => { - navigation.setOptions({ title: getHeaderTitle(route) }) - }, [navigation, route]) - - const screenSettings: ScreenSettings = { - NEWS_SCREEN: true, - NOTIFICATIONS_SCREEN: true, - CALENDER_SCREEN: true, - MENU_SCREEN: useFoodMenu, - CLASSMATES_SCREEN: useClassList, - } - return ( - - - - ) -} diff --git a/apps/skolplattformen-app-new/components/childContext.component.tsx b/apps/skolplattformen-app-new/components/childContext.component.tsx deleted file mode 100644 index d4bbc51b..00000000 --- a/apps/skolplattformen-app-new/components/childContext.component.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Child } from '@skolplattformen/api' -import React, { createContext, useContext } from 'react' - -interface ChildProviderProps { - child: Child - children: React.ReactNode -} - -export const ChildContext = createContext({ - id: '', - sdsId: '', - name: '', -}) - -export const ChildProvider = ({ child, children }: ChildProviderProps) => { - return {children} -} - -export const useChild = () => useContext(ChildContext) diff --git a/apps/skolplattformen-app-new/components/childListItem.component.tsx b/apps/skolplattformen-app-new/components/childListItem.component.tsx deleted file mode 100644 index ee3a36b1..00000000 --- a/apps/skolplattformen-app-new/components/childListItem.component.tsx +++ /dev/null @@ -1,337 +0,0 @@ -import { useNavigation } from '@react-navigation/native' -import { StackNavigationProp } from '@react-navigation/stack' -import { Child } from '@skolplattformen/api' -import { - useCalendar, - useClassmates, - useMenu, - useNews, - useNotifications, - useSchedule, -} from '../libs/hooks/src' -import { - Button, - StyleService, - Text, - useStyleSheet, -} from '@ui-kitten/components' -import moment, { Moment } from 'moment' -import React, { useEffect } from 'react' -import { Pressable, useColorScheme, View } from 'react-native' -import { useTranslation } from '../hooks/useTranslation' -import { Colors, Layout, Sizing } from '../styles' -import { getMeaningfulStartingDate } from '../utils/calendarHelpers' -import { studentName } from '../utils/peopleHelpers' -import { DaySummary } from './daySummary.component' -import { AlertIcon, RightArrowIcon } from './icon.component' -import { RootStackParamList } from './navigation.component' -import { StudentAvatar } from './studentAvatar.component' - -interface ChildListItemProps { - child: Child - color: string - updated: string - currentDate?: Moment -} -type ChildListItemNavigationProp = StackNavigationProp< - RootStackParamList, - 'Children' -> - -export const ChildListItem = ({ - child, - color, - updated, - currentDate = moment(), -}: ChildListItemProps) => { - // Forces rerender when child.id changes - React.useEffect(() => { - // noop - }, [child.id]) - - const navigation = useNavigation() - - const { t } = useTranslation() - - const { data: notifications, reload: notificationsReload } = - useNotifications(child) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { data: news, status: newsStatus, reload: newsReload } = useNews(child) - const { data: classmates, reload: classmatesReload } = useClassmates(child) - const { data: calendar, reload: calendarReload } = useCalendar(child) - const { data: menu, reload: menuReload } = useMenu(child) - const { data: schedule, reload: scheduleReload } = useSchedule( - child, - moment(currentDate).toISOString(), - moment(currentDate).add(7, 'days').toISOString() - ) - - useEffect(() => { - // Do not refresh if updated is empty (first render of component) - if (updated === '') { - return - } - - newsReload() - classmatesReload() - notificationsReload() - calendarReload() - menuReload() - scheduleReload() - - // Without eslint-disable below we get into a forever loop - // because the function pointers to reload functions change on every reload. - // I do not know a workaround for this. - - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [updated]) - - const notificationsThisWeek = notifications.filter( - ({ dateCreated, dateModified }) => { - const date = dateModified || dateCreated - return date ? moment(date).isSame(moment(), 'week') : false - } - ) - - const newsThisWeek = news.filter(({ modified, published }) => { - const newsDate = modified || published - return newsDate ? moment(newsDate).isSame(currentDate, 'week') : false - }) - - const scheduleAndCalendarThisWeek = [ - ...(calendar ?? []), - ...(schedule ?? []), - ].filter(({ startDate }) => - startDate - ? moment(startDate).isBetween( - moment(currentDate).startOf('day'), - moment(currentDate).add(7, 'days') - ) - : false - ) - - const displayDate = (inputDate: moment.MomentInput) => { - return moment(inputDate).fromNow() - } - - const getClassName = () => { - // hack: we can find the class name (ex. 8C) from the classmates. - // let's pick the first one and select theirs class - // hack 2: we can find school namn in skola24 if child data is there - if (classmates.length > 0) { - return ( - classmates[0].className + - (child.schoolID == null ? '' : ' • ' + child.schoolID) - ) - } - - // Taken from Skolverket - // https://www.skolverket.se/skolutveckling/anordna-och-administrera-utbildning/administrera-utbildning/skoltermer-pa-engelska - const abbrevations = { - G: t('abbrevations.upperSecondarySchool'), - GR: t('abbrevations.compulsorySchool'), - F: t('abbrevations.leisureTimeCentre'), - FS: t('abbrevations.preSchool'), - } - - return child.status - ? child.status - .split(';') - .map((status) => { - const statusAsAbbreviation = status as keyof typeof abbrevations - - return abbrevations[statusAsAbbreviation] || status - }) - .join(', ') - : null - } - - const className = getClassName() - const styles = useStyleSheet(themeStyles) - const isDarkMode = useColorScheme() === 'dark' - const meaningfulStartingDate = getMeaningfulStartingDate(currentDate) - - // Hide menu if we want to show monday but it is not monday yet. - // The menu for next week is not available until monday - const shouldShowLunchMenu = - menu[meaningfulStartingDate.isoWeekday() - 1] && - !( - meaningfulStartingDate.isoWeekday() === 1 && - currentDate.isoWeekday() !== 1 - ) - - return ( - <> - - - [ - styles.cardHeaderLeft || {}, - { opacity: pressed ? 0.5 : 1 }, - ]} - onPress={() => navigation.navigate('Child', { child, color })} - > - - - - {studentName(child.name)} - {className ? {className} : null} - - - - - - - - ['' || {}, { opacity: pressed ? 0.5 : 1 }]} - onPress={() => - navigation.navigate('Child', { - child, - color, - initialRouteName: 'Calendar', - }) - } - > - - - {scheduleAndCalendarThisWeek.slice(0, 3).map((calendarItem, i) => ( - - {`${calendarItem.title} (${displayDate(calendarItem.startDate)})`} - - ))} - - ['' || {}, { opacity: pressed ? 0.5 : 1 }]} - onPress={() => - navigation.navigate('Child', { - child, - color, - initialRouteName: 'News', - }) - } - > - - {t('navigation.news')} - - {notificationsThisWeek.slice(0, 3).map((notification, i) => ( - - {notification.message} - - ))} - {newsThisWeek.slice(0, 3).map((newsItem, i) => ( - - {newsItem.header ?? ''} - - ))} - - - {scheduleAndCalendarThisWeek.length || - notificationsThisWeek.length || - newsThisWeek.length ? null : ( - - {t('news.noNewNewsItemsThisWeek')} - - )} - - {shouldShowLunchMenu ? ( - ['' || {}, { opacity: pressed ? 0.5 : 1 }]} - onPress={() => - navigation.navigate('Child', { - child, - color, - initialRouteName: 'Menu', - }) - } - > - - {meaningfulStartingDate.format( - '[' + t('schedule.lunch') + '] dddd' - )} - - - {menu[meaningfulStartingDate.isoWeekday() - 1]?.description} - - - ) : null} - - - - - - - ) -} - -const themeStyles = StyleService.create({ - card: { - borderRadius: 25, - padding: Sizing.t5, - marginBottom: Sizing.t4, - backgroundColor: 'background-basic-color-1', - }, - cardHeader: { - ...Layout.flex.row, - ...Layout.mainAxis.center, - ...Layout.crossAxis.spaceBetween, - marginBottom: Sizing.t4, - }, - cardHeaderLeft: { - ...Layout.flex.row, - ...Layout.mainAxis.center, - flex: 10, - }, - cardHeaderRight: { - ...Layout.flex.row, - ...Layout.crossAxis.flexEnd, - flex: 1, - }, - cardHeaderText: { - marginHorizontal: Sizing.t4, - flex: 10, - }, - icon: { - width: 32, - height: 32, - }, - label: { - marginTop: 10, - }, - itemFooter: { - ...Layout.flex.row, - justifyContent: 'space-between', - alignItems: 'flex-end', - marginTop: Sizing.t4, - }, - absenceButton: { - marginLeft: -20, - }, - itemFooterSpinner: { - alignSelf: 'flex-end', - }, - item: { - marginRight: 12, - paddingHorizontal: 2, - paddingVertical: 0, - marginBottom: 0, - }, - noNewNewsItemsText: {}, -}) diff --git a/apps/skolplattformen-app-new/components/children.component.tsx b/apps/skolplattformen-app-new/components/children.component.tsx deleted file mode 100644 index 8a7eba89..00000000 --- a/apps/skolplattformen-app-new/components/children.component.tsx +++ /dev/null @@ -1,214 +0,0 @@ -import { NavigationProp, useNavigation } from '@react-navigation/core' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { Child } from '@skolplattformen/api' -import { useApi, useChildList } from '../libs/hooks/src' -import { - Button, - List, - Spinner, - StyleService, - Text, - TopNavigationAction, - useStyleSheet, -} from '@ui-kitten/components' -import moment from 'moment' -import React, { useCallback, useEffect, useState } from 'react' -import { - Image, - ImageStyle, - Linking, - ListRenderItemInfo, - View, -} from 'react-native' -import { defaultStackStyling } from '../design/navigationThemes' -import AppStorage from '../services/appStorage' -import { Layout as LayoutStyle, Sizing, Typography } from '../styles' -import { translate } from '../utils/translation' -import { ChildListItem } from './childListItem.component' -import { RefreshIcon, SettingsIcon } from './icon.component' -import { RootStackParamList } from './navigation.component' - -const colors = ['primary', 'success', 'info', 'warning', 'danger'] - -export const childenRouteOptions = - (darkMode: boolean) => (): NativeStackNavigationOptions => { - return { - ...defaultStackStyling(darkMode), - title: translate('children.title'), - headerLargeTitle: false, - headerLargeTitleShadowVisible: false, - } - } - -export const Children = () => { - const styles = useStyleSheet(themedStyles) - - const navigation = useNavigation>() - - const { api } = useApi() - const { data: childList, status, reload } = useChildList() - const reloadChildren = useCallback(() => { - reload() - setUpdated(moment().toISOString()) - }, [reload]) - - const [updatedAt, setUpdated] = useState('') - - const logout = useCallback(() => { - AppStorage.clearTemporaryItems().then(() => api.logout()) - }, [api]) - - useEffect(() => { - navigation.setOptions({ - headerLeft: () => { - return ( - navigation.navigate('Settings')} - /> - ) - }, - headerRight: () => { - return ( - reloadChildren()} - accessibilityHint="Reload" - accessibilityLabel="Reload" - /> - ) - }, - }) - }, [navigation, reloadChildren]) - - // We need to skip safe area view here, due to the reason that it's adding a white border - // when this view is actually lightgrey. Taking the padding top value from the use inset hook. - return status === 'loaded' ? ( - - {translate('children.noKids_title')} - - {translate('children.noKids_description')} - - - - } - renderItem={({ item: child, index }: ListRenderItemInfo) => ( - - )} - /> - ) : ( - - - {status === 'error' ? ( - - {translate('children.loadingErrorHeading')} - - {translate('children.loadingErrorInformationText')} - - - - - - - - ) : ( - - - - {translate('general.loading')} - - - )} - - ) -} - -const themedStyles = StyleService.create({ - topContainer: { - ...LayoutStyle.flex.full, - paddingBottom: 0, - }, - loading: { - ...LayoutStyle.center, - ...LayoutStyle.flex.full, - }, - loadingImage: { - ...Sizing.aspectRatio(), - }, - loadingMessage: { - ...LayoutStyle.mainAxis.center, - ...LayoutStyle.flex.row, - marginTop: Sizing.t2, - }, - loadingText: { - marginLeft: Sizing.t5, - }, - errorButtons: { - height: Sizing.screen.height * 0.2, - width: Sizing.screen.width * 0.73, - justifyContent: 'space-evenly', - }, - errorMessage: { - height: Sizing.screen.height * 0.4, - width: Sizing.screen.width * 0.73, - justifyContent: 'space-evenly', - alignItems: 'center', - marginTop: Sizing.t2, - }, - errorText: { - marginBottom: Sizing.t3, - }, - childList: { - ...LayoutStyle.flex.full, - }, - childListContainer: { - paddingVertical: Sizing.t4, - paddingHorizontal: Sizing.t3, - }, - emptyState: { - ...LayoutStyle.center, - ...LayoutStyle.flex.full, - paddingHorizontal: Sizing.t5, - }, - emptyStateDescription: { - ...Typography.align.center, - lineHeight: 21, - marginTop: Sizing.t2, - }, - emptyStateImage: { - ...Sizing.aspectRatio(0.8), - marginTop: Sizing.t5, - }, - topNavigationTitle: { - ...Typography.fontWeight.semibold, - }, -}) diff --git a/apps/skolplattformen-app-new/components/classmates.component.tsx b/apps/skolplattformen-app-new/components/classmates.component.tsx deleted file mode 100644 index f9c701ef..00000000 --- a/apps/skolplattformen-app-new/components/classmates.component.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import { Classmate } from '@skolplattformen/api' -import { useClassmates } from '../libs/hooks/src' -import { - Divider, - Icon, - IconProps, - List, - ListItem, - Text, -} from '@ui-kitten/components' -import React from 'react' -import { ListRenderItemInfo, RefreshControl, StyleSheet } from 'react-native' -import { fullName, guardians, sortByFirstName } from '../utils/peopleHelpers' -import { translate } from '../utils/translation' -import { useChild } from './childContext.component' -import { ContactMenu } from './contactMenu.component' - -// const translate = (key: string) => key; - -// interface ClassmatesProps { -// setSelected: (value?: number | null) => void; -// } - -export const Classmates = () => { - const child = useChild() - - const { data, status, reload } = useClassmates(child) - const renderItemIcon = (props: IconProps) => ( - - ) - const [selected, setSelected] = React.useState() - const renderItem = ({ item, index }: ListRenderItemInfo) => ( - setSelected(item)} - description={guardians(item.guardians)} - accessoryLeft={renderItemIcon} - accessoryRight={() => ( - setSelected(undefined)} - /> - )} - /> - ) - return ( - - {data?.length - ? `${translate('classmates.class')} ${data[0].className}` - : translate('classmates.class')} - - } - renderItem={renderItem} - contentContainerStyle={styles.contentContainer} - refreshControl={ - - } - /> - ) -} - -const styles = StyleSheet.create({ - container: { - height: '100%', - width: '100%', - }, - contentContainer: { - margin: 10, - justifyContent: 'flex-start', - }, - topContainer: { - margin: 5, - flexDirection: 'row', - justifyContent: 'space-between', - }, - listHeader: { - paddingTop: 10, - paddingLeft: 15, - }, -}) diff --git a/apps/skolplattformen-app-new/components/contactMenu.component.tsx b/apps/skolplattformen-app-new/components/contactMenu.component.tsx deleted file mode 100644 index 264de9e8..00000000 --- a/apps/skolplattformen-app-new/components/contactMenu.component.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { Classmate } from '@skolplattformen/api' -import { - Button, - MenuGroup, - MenuItem, - OverflowMenu, -} from '@ui-kitten/components' -import React from 'react' -import { Linking, StyleSheet } from 'react-native' -import { fullName } from '../utils/peopleHelpers' -import { translate } from '../utils/translation' -import { - CallIcon, - EmailIcon, - MapIcon, - MoreIcon, - SMSIcon, -} from './icon.component' - -interface ContactMenuProps { - contact: Classmate - selected: boolean - setSelected: (value?: number | null) => void -} - -// const translate = (key: string) => key; - -export const ContactMenu = ({ - contact, - selected, - setSelected, -}: ContactMenuProps) => { - const [visible, setVisible] = React.useState(selected) - - const renderToggleButton = () => ( - - - - - setShowLoginMethod(false)} - backdropStyle={styles.backdrop} - > - - - {t('auth.chooseLoginMethod')} - - f.id !== 'freja') - } - ItemSeparatorComponent={Divider} - renderItem={({ item }) => ( - { - setLoginMethodId(item.id) - setShowLoginMethod(false) - }} - /> - )} - /> - - - - showModal(false)} - backdropStyle={styles.backdrop} - > - - {loginStatusText} - - - - setShowSchoolPlatformPicker(false)} - backdropStyle={styles.backdrop} - > - - - {t('auth.chooseSchoolPlatform')} - - ( - { - changeSchoolPlatform(item.id) - setShowSchoolPlatformPicker(false) - }} - /> - )} - /> - - - - - ) -} - -const themedStyles = StyleService.create({ - backdrop: { - backgroundColor: 'rgba(0, 0, 0, 0.5)', - }, - loginForm: { - ...Layout.mainAxis.flexStart, - }, - pnrInput: { minHeight: 70 }, - loginButtonGroup: { - minHeight: 45, - }, - loginButton: { ...Layout.flex.full }, - loginMethodButton: { width: 45 }, - modal: { - width: '90%', - }, - bankIdLoading: { margin: 10 }, - cancelButtonStyle: { marginTop: 15 }, - icon: { - width: 20, - height: 20, - }, - platformPicker: { - width: '100%', - }, -}) diff --git a/apps/skolplattformen-app-new/components/markdown.component.tsx b/apps/skolplattformen-app-new/components/markdown.component.tsx deleted file mode 100644 index ebd0a842..00000000 --- a/apps/skolplattformen-app-new/components/markdown.component.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { Text } from '@ui-kitten/components' -import React from 'react' -import { Dimensions, Linking, StyleSheet } from 'react-native' -import MarkdownBase, { - RenderRules, -} from '@ronradtke/react-native-markdown-display' -import { Sizing } from '../styles' -import { Image } from './image.component' - -interface MarkdownProps { - children: React.ReactNode - style?: StyleSheet.NamedStyles -} - -const rules: RenderRules = { - image: (node) => { - const { src } = node.attributes - const url = src.startsWith('/') - ? `https://elevstockholm.sharepoint.com${src}` - : src - return ( - - ) - }, - link: (node, children, _parent, styles) => { - if (children) { - return ( - Linking.openURL(node.attributes.href)} - > - {children.map((child, index) => ( - {child} - ))} - - ) - } - return null - }, -} - -export const Markdown = ({ style, children }: MarkdownProps) => { - return ( - - {children} - - ) -} - -const styles = StyleSheet.create({ - markdownImage: { width: '100%', borderRadius: 15 }, -}) diff --git a/apps/skolplattformen-app-new/components/menu.component.tsx b/apps/skolplattformen-app-new/components/menu.component.tsx deleted file mode 100644 index 49cc91b9..00000000 --- a/apps/skolplattformen-app-new/components/menu.component.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { MenuItem } from '@skolplattformen/api' -import { useMenu } from '../libs/hooks/src' -import { - Divider, - List, - StyleService, - Text, - useStyleSheet, -} from '@ui-kitten/components' -import 'moment/locale/sv' -import React from 'react' -import { - Image, - ImageStyle, - ListRenderItemInfo, - RefreshControl, - View, -} from 'react-native' -import { Layout as LayoutStyle, Sizing, Typography } from '../styles' -import { translate } from '../utils/translation' -import { useChild } from './childContext.component' -import { MenuListItem } from './menuListItem.component' - -// const translate = (key: string) => key; - -export const Menu = () => { - const styles = useStyleSheet(themedStyles) - const child = useChild() - const { data, status, reload } = useMenu(child) - - return ( - - {translate('menu.emptyHeadline')} - - {translate('menu.emptyText')} - - - - } - renderItem={({ item }: ListRenderItemInfo) => ( - - )} - style={styles.container} - refreshControl={ - - } - /> - ) -} - -const themedStyles = StyleService.create({ - container: { - height: '100%', - width: '100%', - padding: Sizing.t3, - }, - contentContainer: { - paddingHorizontal: Sizing.t5, - paddingVertical: Sizing.t2, - backgroundColor: 'background-basic-color-1', - borderRadius: 25, - }, - emptyState: { - ...LayoutStyle.center, - ...LayoutStyle.flex.full, - }, - emptyStateDescription: { - ...Typography.align.center, - lineHeight: 21, - paddingHorizontal: Sizing.t3, - marginTop: Sizing.t3, - }, - emptyStateImage: { - ...Sizing.aspectRatio(0.8), - marginTop: 50, - }, -}) diff --git a/apps/skolplattformen-app-new/components/menuListItem.component.tsx b/apps/skolplattformen-app-new/components/menuListItem.component.tsx deleted file mode 100644 index 235d9c92..00000000 --- a/apps/skolplattformen-app-new/components/menuListItem.component.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { MenuItem } from '@skolplattformen/api' -import { StyleService, Text, useStyleSheet } from '@ui-kitten/components' -import React from 'react' -import { View } from 'react-native' -import { Sizing, Typography } from '../styles' - -interface MenuListItemProps { - item: MenuItem -} - -export const MenuListItem = ({ item }: MenuListItemProps) => { - const styles = useStyleSheet(themedStyles) - return ( - - {item.title} - {item.description} - - ) -} - -const themedStyles = StyleService.create({ - container: { - width: '100%', - paddingVertical: Sizing.t3, - }, - topContainer: { - margin: Sizing.t1, - flexDirection: 'row', - justifyContent: 'space-between', - }, - title: { - ...Typography.header, - marginBottom: Sizing.t1, - }, -}) diff --git a/apps/skolplattformen-app-new/components/modalWebView.component.tsx b/apps/skolplattformen-app-new/components/modalWebView.component.tsx deleted file mode 100644 index 071d23e0..00000000 --- a/apps/skolplattformen-app-new/components/modalWebView.component.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { useApi } from '../libs/hooks/src' -import { StyleService, Text, useStyleSheet } from '@ui-kitten/components' -import React, { useEffect, useState } from 'react' -import { Linking, Modal, TouchableOpacity, View } from 'react-native' -import { SafeAreaView } from 'react-native-safe-area-context' -import { WebView } from 'react-native-webview' -import { Layout, Sizing } from '../styles' -import { BackIcon, ExternalLinkIcon } from './icon.component' - -interface ModalWebViewProps { - url: string - sharedCookiesEnabled: boolean - onClose: () => void -} -export const ModalWebView = ({ - url, - onClose, - sharedCookiesEnabled, -}: ModalWebViewProps) => { - const [modalVisible, setModalVisible] = React.useState(true) - const { api } = useApi() - const [title, setTitle] = React.useState('...') - const [headers, setHeaders] = useState<{ [index: string]: string }>() - - useEffect(() => { - const getHeaders = async (urlToGetSessionFor: string) => { - if (sharedCookiesEnabled) { - return - } - const newHeaders = await api.getSessionHeaders(urlToGetSessionFor) - setHeaders(newHeaders) - } - - getHeaders(url) - }, [url, sharedCookiesEnabled, api]) - - const closeModal = () => { - setModalVisible(false) - onClose() - } - const openInApp = () => { - Linking.openURL(url) - } - - const styles = useStyleSheet(themedStyles) - - return ( - - - - - - - - - {title} - - - - - - - {(headers || sharedCookiesEnabled) && ( - { - setTitle(event.nativeEvent.title) - }} - /> - )} - - - ) -} - -const themedStyles = StyleService.create({ - container: { - flex: 1, - backgroundColor: 'background-basic-color-2', - }, - headerWrapper: { - marginTop: Sizing.t1, - padding: Sizing.t1, - borderRadius: 2, - borderColor: 'basic-color-200', - borderBottomWidth: 1, - backgroundColor: 'background-basic-color-2', - }, - backdrop: { - backgroundColor: 'color-basic-transparent-600', - }, - headerText: { - overflow: 'hidden', - width: '85%', - paddingRight: 2, - }, - header: { - ...Layout.flex.row, - ...Layout.mainAxis.center, - paddingHorizontal: Sizing.t3, - paddingVertical: Sizing.t1, - backgroundColor: 'background-basic-color-2', - }, - shareIcon: { - width: 24, - height: 24, - shadowColor: 'color-basic-600', - }, - backIcon: { - width: 24, - height: 24, - marginRight: Sizing.t4, - shadowColor: 'color-basic-600', - }, - webview: {}, -}) diff --git a/apps/skolplattformen-app-new/components/navigation.component.tsx b/apps/skolplattformen-app-new/components/navigation.component.tsx deleted file mode 100644 index e1d8ff4b..00000000 --- a/apps/skolplattformen-app-new/components/navigation.component.tsx +++ /dev/null @@ -1,193 +0,0 @@ -import { NavigationContainer } from '@react-navigation/native' -import { createNativeStackNavigator } from '@react-navigation/native-stack' -import { - Child as ChildType, - NewsItem as NewsItemType, -} from '@skolplattformen/api' -import { useApi } from '../libs/hooks/src' -import { useTheme } from '@ui-kitten/components' -import { Library } from 'libraries.json' -import React, { useEffect } from 'react' -import { StatusBar, useColorScheme } from 'react-native' -import { schema } from '../app.json' -import { - darkNavigationTheme, - lightNavigationTheme, -} from '../design/navigationThemes' -import { useAppState } from '../hooks/useAppState' -import { useLangCode } from '../hooks/useLangCode' -import useSettingsStorage, { - initializeSettingsState, -} from '../hooks/useSettingsStorage' -import { isRTL } from '../services/languageService' -import Absence, { absenceRouteOptions } from './absence.component' -import { Auth, authRouteOptions } from './auth.component' -import { Child, childRouteOptions } from './child.component' -import { childenRouteOptions, Children } from './children.component' -import { libraryRouteOptions, LibraryScreen } from './library.component' -import { NewsItem, newsItemRouteOptions } from './newsItem.component' -import { SetLanguage, setLanguageRouteOptions } from './setLanguage.component' -import { settingsRouteOptions, SettingsScreen } from './settings.component' -import { - settingsAppearanceRouteOptions, - SettingsAppearanceScreen, -} from './settingsAppearance.component' -import { - settingsAppearanceThemeRouteOptions, - SettingsAppearanceThemeScreen, -} from './settingsAppearanceTheme.component' -import { - settingsLicensesRouteOptions, - SettingsLicensesScreen, -} from './settingsLicenses.component' - -export type RootStackParamList = { - Login: undefined - IsLoggedIn: undefined - Children: undefined - Settings: { rand?: number } | undefined - SettingsAppearance: undefined - SettingsAppearanceTheme: undefined - SettingsLicenses: undefined - Library: { - library: Library - } - Child: { - child: ChildType - color: string - initialRouteName?: string - } - NewsItem: { newsItem: NewsItemType; child: ChildType } - Absence: { child: ChildType } - SetLanguage: undefined -} - -const { Navigator, Screen } = createNativeStackNavigator() - -const linking = { - prefixes: [schema], - config: { - screens: { - Login: 'login', - }, - }, -} - -export const AppNavigator = () => { - const { isLoggedIn, api } = useApi() - - const [usingSystemTheme] = useSettingsStorage('usingSystemTheme') - const [theme] = useSettingsStorage('theme') - const systemTheme = useColorScheme() - const colorScheme = usingSystemTheme ? systemTheme : theme - const langCode = useLangCode() - - const colors = useTheme() - - const currentAppState = useAppState() - - useEffect(() => { - initializeSettingsState() - }, []) - - useEffect(() => { - const checkUser = async () => { - if (currentAppState === 'active' && isLoggedIn) { - const { isAuthenticated } = await api.getUser() - - if (!isAuthenticated) { - await api.logout() - } - } - } - checkUser() - }, [currentAppState, isLoggedIn, api]) - - return ( - - - - ({ - headerLargeTitle: false, - headerLargeTitleHideShadow: true, - direction: isRTL(langCode) ? 'rtl' : 'ltr', - headerStyle: { - backgroundColor: - colorScheme === 'dark' - ? colors['background-basic-color-2'] - : colors['background-basic-color-1'], - }, - headerLargeStyle: { - backgroundColor: colors['background-basic-color-2'], - }, - headerLargeTitleStyle: { - fontFamily: 'Poppins-ExtraBold', - }, - })} - > - {isLoggedIn ? ( - <> - - - - - - ) : ( - - )} - - - - - - - - - ) -} diff --git a/apps/skolplattformen-app-new/components/navigationTitle.component.tsx b/apps/skolplattformen-app-new/components/navigationTitle.component.tsx deleted file mode 100644 index 5543175b..00000000 --- a/apps/skolplattformen-app-new/components/navigationTitle.component.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { Text } from '@ui-kitten/components' -import React from 'react' -import { StyleSheet, View } from 'react-native' -import { Layout } from '../styles' -import { fontSize } from '../styles/typography' - -interface NavigationTitleProps { - title?: string - subtitle?: string -} -/** - * Navigation Title with a smaller subtitle. - */ -export const NavigationTitle = ({ title, subtitle }: NavigationTitleProps) => { - return ( - - {title && ( - - {title} - - )} - {subtitle && ( - - {subtitle.substring(0, subtitle.indexOf(' '))} - - )} - - ) -} - -const styles = StyleSheet.create({ - container: { - ...Layout.center, - }, - title: { - ...fontSize.sm, - fontWeight: '500', - }, - subtitle: { ...fontSize.base }, -}) diff --git a/apps/skolplattformen-app-new/components/newsItem.component.tsx b/apps/skolplattformen-app-new/components/newsItem.component.tsx deleted file mode 100644 index 972ad663..00000000 --- a/apps/skolplattformen-app-new/components/newsItem.component.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import { RouteProp } from '@react-navigation/native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { StackNavigationProp } from '@react-navigation/stack' -import { useNewsDetails } from '../libs/hooks/src' -import { StyleService, Text, useStyleSheet } from '@ui-kitten/components' -import moment from 'moment' -import 'moment/locale/sv' -import React from 'react' -import { - Dimensions, - ImageStyle, - RefreshControl, - ScrollView, - View, -} from 'react-native' -import { defaultStackStyling } from '../design/navigationThemes' -import { Layout, Sizing, Typography } from '../styles' -import { studentName } from '../utils/peopleHelpers' -import { translate } from '../utils/translation' -import { Image } from './image.component' -import { Markdown } from './markdown.component' -import { RootStackParamList } from './navigation.component' -import { NavigationTitle } from './navigationTitle.component' - -// const translate = (key: string) => key; - -interface NewsItemProps { - navigation: StackNavigationProp - route: RouteProp -} - -const displayDate = (date: string | undefined) => moment(date).format('lll') - -const dateIsValid = (date: string | undefined) => - moment(date, moment.ISO_8601).isValid() - -export const newsItemRouteOptions = - (darkMode: boolean) => - ({ - route, - }: { - route: RouteProp - }): NativeStackNavigationOptions => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const newsItem = route.params.newsItem - const { child } = route.params - return { - ...defaultStackStyling(darkMode), - headerTitle: () => , - } - } - -export const NewsItem = ({ route }: NewsItemProps) => { - const { newsItem, child } = route.params - const { data, status, reload } = useNewsDetails(child, newsItem) - const styles = useStyleSheet(themedStyles) - const stylesMarkdown = useStyleSheet(themedStylesMarkdown) - - return ( - - } - > - - {newsItem.header} - - {dateIsValid(newsItem.published) && ( - - {translate('news.published')}:{' '} - {displayDate(newsItem.published)} - - )} - {dateIsValid(newsItem.modified) && ( - - {translate('news.updated')}:{' '} - {displayDate(newsItem.modified)} - - )} - - {data.body} - {newsItem.fullImageUrl && ( - - )} - - - ) -} - -const themedStylesMarkdown = StyleService.create({ - body: { - ...Typography.fontSize.base, - color: 'text-basic-color', - lineHeight: 26, - }, - heading1: { - ...Typography.fontSize.xl, - color: 'text-basic-color', - }, - heading2: { - ...Typography.fontSize.lg, - color: 'text-basic-color', - }, - code_block: { - color: 'text-basic-color', - backgroundColor: 'background-basic-color-1', - borderColor: 'color-basic-400', - }, -}) - -const themedStyles = StyleService.create({ - article: { - padding: Sizing.t5, - backgroundColor: 'background-basic-color-1', - }, - scrollView: { - ...Layout.flex.full, - }, - image: { - width: '100%', - marginTop: Sizing.t4, - borderRadius: 15, - }, - title: { - ...Typography.fontWeight.bold, - fontSize: 30, - marginBottom: 8, - }, - subtitle: { - ...Typography.fontSize.xs, - color: 'text-hint-color', - }, - strong: { - ...Typography.fontSize.xs, - ...Typography.fontWeight.bold, - color: 'text-hint-color', - }, - published: { - marginBottom: Sizing.t1, - }, - body: { - marginTop: Sizing.t4, - }, - topNavigationTitle: { - ...Typography.fontWeight.semibold, - }, -}) diff --git a/apps/skolplattformen-app-new/components/newsList.component.tsx b/apps/skolplattformen-app-new/components/newsList.component.tsx deleted file mode 100644 index 21179f2b..00000000 --- a/apps/skolplattformen-app-new/components/newsList.component.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { useNews } from '../libs/hooks/src' -import { Input, List, StyleService, useStyleSheet } from '@ui-kitten/components' -import React, { useMemo, useState } from 'react' -import { TouchableOpacity, View, RefreshControl } from 'react-native' -import { Sizing } from '../styles' -import { - renderSearchResultPreview, - useNewsListSearchResults, -} from '../utils/search' -import { translate } from '../utils/translation' -import { useChild } from './childContext.component' -import { CloseOutlineIcon, SearchIcon } from './icon.component' -import { NewsListItem } from './newsListItem.component' - -// const translate = (key: string) => key; - -export const NewsList = () => { - const styles = useStyleSheet(themedStyles) - const child = useChild() - const { data, status, reload } = useNews(child) - - const [searchQuery, setSearchQuery] = useState('') - const searchResults = useNewsListSearchResults(searchQuery) - - const header = useMemo( - () => ( - - searchQuery.length > 0 ? ( - setSearchQuery('')}> - - - ) : ( - - ) - } - /> - ), - [searchQuery, styles.search] - ) - - if (searchQuery) { - return ( - ( - - {renderSearchResultPreview(searchResult)} - - )} - refreshControl={ - - } - /> - ) - } - - return ( - } - refreshControl={ - - } - /> - ) -} - -const themedStyles = StyleService.create({ - container: { - height: '100%', - width: '100%', - }, - contentContainer: { - paddingVertical: Sizing.t3, - paddingHorizontal: Sizing.t3, - }, - search: { - backgroundColor: 'background-basic-color-1', - borderRadius: 40, - marginBottom: Sizing.t2, - }, -}) diff --git a/apps/skolplattformen-app-new/components/newsListItem.component.tsx b/apps/skolplattformen-app-new/components/newsListItem.component.tsx deleted file mode 100644 index 1b917043..00000000 --- a/apps/skolplattformen-app-new/components/newsListItem.component.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { useNavigation } from '@react-navigation/native' -import { StackNavigationProp } from '@react-navigation/stack' -import { NewsItem } from '@skolplattformen/api' -import { StyleService, useStyleSheet } from '@ui-kitten/components' -import moment from 'moment' -import React, { ReactNode } from 'react' -import { - Dimensions, - ImageStyle, - Text, - TouchableOpacity, - View, -} from 'react-native' -import { Layout, Sizing, Typography } from '../styles' -import { useChild } from './childContext.component' -import { Image } from './image.component' -import { RootStackParamList } from './navigation.component' - -interface NewsListItemProps { - item: NewsItem - children?: ReactNode -} - -type NewsListItemNavigationProp = StackNavigationProp< - RootStackParamList, - 'NewsItem' -> - -const { width } = Dimensions.get('window') - -export const NewsListItem = ({ item, children }: NewsListItemProps) => { - const styles = useStyleSheet(themedStyles) - const navigation = useNavigation() - const child = useChild() - const hasDate = item.modified || item.published - - const displayDate = hasDate ? moment(hasDate).fromNow() : null - - return ( - navigation.navigate('NewsItem', { newsItem: item, child })} - > - - {width > 320 && item.fullImageUrl ? ( - - ) : null} - - - {item.header} - - {item.author} - {item.author && displayDate ? ' • ' : ''} - {displayDate} - - - {children ?? item.intro} - - - - - - ) -} - -const themedStyles = StyleService.create({ - card: { - ...Layout.flex.full, - ...Layout.flex.row, - borderRadius: 15, - paddingVertical: Sizing.t4, - paddingHorizontal: Sizing.t4, - marginBottom: Sizing.t3, - backgroundColor: 'background-basic-color-1', - }, - text: { - ...Layout.flex.full, - }, - title: { - ...Typography.header, - marginBottom: Sizing.t1, - color: 'text-basic-color', - }, - subtitle: { - ...Typography.fontSize.xs, - marginBottom: Sizing.t2, - color: 'text-hint-color', - }, - intro: { - ...Typography.fontSize.sm, - color: 'text-basic-color', - }, - image: { - borderRadius: 50, - width: 50, - height: 50, - marginRight: Sizing.t3, - }, -}) diff --git a/apps/skolplattformen-app-new/components/notification.component.tsx b/apps/skolplattformen-app-new/components/notification.component.tsx deleted file mode 100644 index e859d026..00000000 --- a/apps/skolplattformen-app-new/components/notification.component.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { Notification as NotificationType } from '@skolplattformen/api' -import { StyleService, Text, useStyleSheet } from '@ui-kitten/components' -import moment from 'moment' -import React from 'react' -import { TouchableOpacity, View } from 'react-native' -import { Layout, Sizing, Typography } from '../styles' -import { ModalWebView } from './modalWebView.component' - -interface NotificationProps { - item: NotificationType -} - -export const Notification = ({ item }: NotificationProps) => { - const styles = useStyleSheet(themedStyles) - const [isOpen, setIsOpen] = React.useState(false) - const open = () => setIsOpen(true) - const close = () => setIsOpen(false) - - const date = item.dateModified || item.dateCreated - const displayDate = date ? moment(date).fromNow() : null - - const sharedCookiesEnabled = Boolean( - item.url && - (item.url.startsWith('https://start.unikum.net/') || - item.url.startsWith('https://hjarntorget.goteborg.se')) - ) - - return ( - <> - - - - {item.sender} - - {item.category ? item.category : ''} - {item.category && displayDate ? ' • ' : ''} - {displayDate ? displayDate : ''} - - - {item.message} - - - {isOpen && ( - - )} - - ) -} - -const themedStyles = StyleService.create({ - card: { - ...Layout.flex.full, - borderRadius: 15, - paddingVertical: Sizing.t4, - paddingHorizontal: Sizing.t4, - marginBottom: Sizing.t3, - backgroundColor: 'background-basic-color-1', - }, - title: { - ...Typography.header, - marginBottom: Sizing.t1, - }, - subtitle: { - ...Typography.fontSize.xs, - color: 'text-hint-color', - marginBottom: Sizing.t2, - }, -}) diff --git a/apps/skolplattformen-app-new/components/notificationsList.component.tsx b/apps/skolplattformen-app-new/components/notificationsList.component.tsx deleted file mode 100644 index 8e0209c2..00000000 --- a/apps/skolplattformen-app-new/components/notificationsList.component.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useNotifications } from '../libs/hooks/src' -import { List, StyleService, useStyleSheet } from '@ui-kitten/components' -import React from 'react' -import { RefreshControl } from 'react-native' -import { Sizing } from '../styles' -import { useChild } from './childContext.component' -import { Notification } from './notification.component' - -export const NotificationsList = () => { - const styles = useStyleSheet(themedStyles) - const child = useChild() - const { data, status, reload } = useNotifications(child) - - return ( - ( - - )} - refreshControl={ - - } - /> - ) -} - -const themedStyles = StyleService.create({ - container: { - height: '100%', - width: '100%', - }, - contentContainer: { - paddingHorizontal: Sizing.t3, - paddingVertical: Sizing.t3, - }, -}) diff --git a/apps/skolplattformen-app-new/components/saveToCalendar.component.tsx b/apps/skolplattformen-app-new/components/saveToCalendar.component.tsx deleted file mode 100644 index 9b368cdf..00000000 --- a/apps/skolplattformen-app-new/components/saveToCalendar.component.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { CalendarItem } from '@skolplattformen/api' -import { Button, MenuItem, OverflowMenu, Text } from '@ui-kitten/components' -import React from 'react' -import RNCalendarEvents from 'react-native-calendar-events' -import Toast from 'react-native-simple-toast' -import { translate } from '../utils/translation' -import { CalendarOutlineIcon, MoreIcon } from './icon.component' - -interface SaveToCalendarProps { - event: CalendarItem -} - -// const translate = (key: string) => key; - -export const SaveToCalendar = ({ event }: SaveToCalendarProps) => { - const [visible, setVisible] = React.useState(false) - - const renderToggleButton = () => ( - - - - ) -} - -const themedStyles = StyleService.create({ - languageList: { - flex: 1, - alignSelf: 'stretch', - flexDirection: 'column', - marginTop: 8, - paddingHorizontal: Sizing.t4, - }, - icon: { - width: 30, - height: 30, - }, - container: { - flex: 1, - }, - scrollView: { - padding: Sizing.t4, - }, - buttonGroup: { - minHeight: 45, - marginTop: 20, - marginHorizontal: Sizing.t5, - }, - button: { ...LayoutStyle.flex.full }, -}) diff --git a/apps/skolplattformen-app-new/components/settings.component.tsx b/apps/skolplattformen-app-new/components/settings.component.tsx deleted file mode 100644 index 1b41eace..00000000 --- a/apps/skolplattformen-app-new/components/settings.component.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { NavigationProp, useNavigation } from '@react-navigation/core' -import { useApi, useUser } from '../libs/hooks/src' -import React, { useCallback } from 'react' -import { ScrollView, Text } from 'react-native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import useSettingsStorage from '../hooks/useSettingsStorage' -import AppStorage from '../services/appStorage' -import { LanguageService } from '../services/languageService' -import { Layout as LayoutStyle, Sizing } from '../styles' -import { languages, translate } from '../utils/translation' -import { AwardIcon, BrushIcon, GlobeIcon } from './icon.component' -import { RootStackParamList } from './navigation.component' -import { - SettingGroup, - SettingListItem, - SettingListSeparator, -} from './settingsComponents.component' -import { VersionInfo } from './versionInfo.component' - -export const settingsRouteOptions = (): NativeStackNavigationOptions => ({ - title: translate('settings.settings'), -}) - -export const SettingsScreen = () => { - const [isUsingSystemTheme] = useSettingsStorage('usingSystemTheme') - const [settingsTheme] = useSettingsStorage('theme') - const navigation = useNavigation>() - const langCode = LanguageService.getLanguageCode() - const language = languages.find((l) => l.langCode === langCode) - const { api } = useApi() - const { data: user } = useUser() - - const logout = useCallback(async () => { - await AppStorage.clearTemporaryItems() - await AppStorage.clearPersonalData(user) - await api.logout() - navigation.reset({ - routes: [{ name: 'Login' }], - }) - }, [api, navigation, user]) - - return ( - - Settings - - navigation.navigate('SettingsAppearance')} - /> - - navigation.navigate('SetLanguage')} - /> - - - navigation.navigate('SettingsLicenses')} - /> - - - {api.isLoggedIn && ( - - - - )} - - - - ) -} diff --git a/apps/skolplattformen-app-new/components/settingsAppearance.component.tsx b/apps/skolplattformen-app-new/components/settingsAppearance.component.tsx deleted file mode 100644 index 442622a7..00000000 --- a/apps/skolplattformen-app-new/components/settingsAppearance.component.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { NavigationProp, useNavigation } from '@react-navigation/core' -import React from 'react' -import { ScrollView, StyleSheet, Switch } from 'react-native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import useSettingsStorage from '../hooks/useSettingsStorage' -import { Layout as LayoutStyle, Sizing } from '../styles' -import { translate } from '../utils/translation' -import { RootStackParamList } from './navigation.component' -import { - SettingGroup, - SettingListItem, - SettingListSeparator, -} from './settingsComponents.component' - -export const settingsAppearanceRouteOptions = - (): NativeStackNavigationOptions => ({ - title: translate('settings.appearance'), - }) - -export const SettingsAppearanceScreen = () => { - const [isUsingSystemTheme, setUsingSystemTheme] = - useSettingsStorage('usingSystemTheme') - const navigation = useNavigation>() - - const [settingsTheme] = useSettingsStorage('theme') - - return ( - - - - - - {!isUsingSystemTheme && ( - <> - - navigation.navigate('SettingsAppearanceTheme')} - /> - - )} - - - ) -} - -const styles = StyleSheet.create({ - container: { - padding: Sizing.t4, - }, -}) diff --git a/apps/skolplattformen-app-new/components/settingsAppearanceTheme.component.tsx b/apps/skolplattformen-app-new/components/settingsAppearanceTheme.component.tsx deleted file mode 100644 index 7e792b96..00000000 --- a/apps/skolplattformen-app-new/components/settingsAppearanceTheme.component.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react' -import { ScrollView, StyleSheet, View } from 'react-native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import useSettingsStorage from '../hooks/useSettingsStorage' -import { Layout as LayoutStyle, Sizing } from '../styles' -import { translate } from '../utils/translation' -import { - SettingGroup, - SettingListItemSelectable, -} from './settingsComponents.component' - -export const settingsAppearanceThemeRouteOptions = - (): NativeStackNavigationOptions => ({ - title: translate('settings.theme'), - }) - -const themes = ['light', 'dark'] - -export const SettingsAppearanceThemeScreen = () => { - const [settingsTheme, setSettingsTheme] = useSettingsStorage('theme') - - return ( - - - - {themes.map((theme) => { - return ( - setSettingsTheme(theme)} - title={translate(`themes.${theme}`)} - isSelected={theme === settingsTheme} - /> - ) - })} - - - - ) -} - -const styles = StyleSheet.create({ - container: { - padding: Sizing.t4, - }, - themeList: { - paddingHorizontal: Sizing.t4, - }, -}) diff --git a/apps/skolplattformen-app-new/components/settingsComponents.component.tsx b/apps/skolplattformen-app-new/components/settingsComponents.component.tsx deleted file mode 100644 index dd00822c..00000000 --- a/apps/skolplattformen-app-new/components/settingsComponents.component.tsx +++ /dev/null @@ -1,194 +0,0 @@ -import { - IconProps, - StyleService, - Text, - useStyleSheet, - useTheme, -} from '@ui-kitten/components' -import React, { useState } from 'react' -import { Pressable, TouchableOpacity, View } from 'react-native' -import { useLangRTL } from '../hooks/useLangRTL' -import { Sizing } from '../styles' -import { fontSize } from '../styles/typography' -import { CheckIcon, RightArrowIcon } from './icon.component' - -export const SettingListItem = ({ - label, - value, - icon: Icon, - onNavigate, - onPress, - children, -}: { - label?: string - value?: string - icon?: (props: IconProps) => JSX.Element - onNavigate?: () => void - onPress?: () => void - children?: React.ReactNode -}) => { - const textHintColor = useTheme()['text-hint-color'] - const styles = useStyleSheet(themedStyles) - const isRTL = useLangRTL() - - const [isPressing, setIsPressing] = useState(false) - - return ( - setIsPressing(true)} - onPressOut={() => setIsPressing(false)} - > - - {Icon && ( - - - - )} - - {label && ( - - {label} - - )} - {value && {value}} - {children} - - {onNavigate && ( - - - - )} - - - ) -} - -export const SettingListSeparator = () => { - const styles = useStyleSheet(themedStyles) - return -} - -export const SettingListItemWrapper = ({ - children, - isPressing = false, -}: { - isPressing?: boolean - children?: React.ReactNode -}) => { - const styles = useStyleSheet(themedStyles) - return ( - - {children} - - ) -} - -export const SettingGroup = ({ children }: { children?: React.ReactNode }) => { - const styles = useStyleSheet(themedStyles) - - return {children} -} - -export const SettingListItemSelectable = ({ - title, - subTitle, - isSelected, - onPress, -}: { - title: string - subTitle?: string - isSelected?: boolean - onPress: () => void -}) => { - const styles = useStyleSheet(themedStyles) - const colors = useTheme() - - return ( - - - {title} - {subTitle && ( - {subTitle} - )} - - {isSelected ? ( - - ) : null} - - ) -} - -const themedStyles = StyleService.create({ - group: { - backgroundColor: 'background-basic-color-1', - borderRadius: 15, - marginBottom: Sizing.t5, - overflow: 'hidden', - }, - listItem: { - paddingHorizontal: Sizing.t4, - paddingVertical: Sizing.t2, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'space-between', - }, - listItemButton: { - color: 'color-tab-focused', - }, - listItemPressed: { - backgroundColor: 'color-separator', - }, - listItemText: { - flex: 1, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'space-between', - }, - listItemLabel: { - ...fontSize.sm, - }, - listItemValue: { - ...fontSize.xs, - color: 'text-hint-color', - flexShrink: 0, - }, - separator: { - height: 1, - marginLeft: Sizing.t4, - backgroundColor: 'color-separator', - }, - icon: { - backgroundColor: 'color-primary-500', - borderRadius: 5, - padding: 3, - marginRight: Sizing.t3, - }, - arrow: { flexShrink: 0 }, - selectableButton: { - paddingVertical: Sizing.t2, - minHeight: 45, - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - }, - selectableButtonTitle: { - ...fontSize.base, - textAlign: 'left', - }, - selectableButtonSubtitle: { - ...fontSize.sm, - color: 'text-hint-color', - textAlign: 'left', - }, -}) diff --git a/apps/skolplattformen-app-new/components/settingsLicenses.component.tsx b/apps/skolplattformen-app-new/components/settingsLicenses.component.tsx deleted file mode 100644 index 03e78fed..00000000 --- a/apps/skolplattformen-app-new/components/settingsLicenses.component.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import libraries from '../libraries.json' -import { translate } from '../utils/translation' -import { LibraryList } from './libraryList.component' - -export const settingsLicensesRouteOptions = - (): NativeStackNavigationOptions => ({ - title: `${translate('settings.licenses')}`, - }) - -export const SettingsLicensesScreen = () => { - return -} diff --git a/apps/skolplattformen-app-new/components/studentAvatar.component.tsx b/apps/skolplattformen-app-new/components/studentAvatar.component.tsx deleted file mode 100644 index 2989ca6b..00000000 --- a/apps/skolplattformen-app-new/components/studentAvatar.component.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Text, useTheme } from '@ui-kitten/components' -import React from 'react' -import { StyleSheet, View } from 'react-native' -import { fontSize } from '../styles/typography' -import { initials } from '../utils/peopleHelpers' - -export type StudentAvatarProps = { - name?: string - color: string -} - -export const StudentAvatar = ({ name, color }: StudentAvatarProps) => { - const colors = useTheme() - const bgColor = colors[`color-${color}-100`] - const textColor = colors[`color-${color}-900`] - - return ( - - {initials(name)} - - ) -} - -export const styles = StyleSheet.create({ - container: { - height: 44, - width: 44, - borderRadius: 300, - alignItems: 'center', - justifyContent: 'center', - }, - text: { - ...fontSize.lg, - fontFamily: 'Poppins-Medium', - fontWeight: '500', - }, -}) diff --git a/apps/skolplattformen-app-new/components/tabBarLabel.component.tsx b/apps/skolplattformen-app-new/components/tabBarLabel.component.tsx deleted file mode 100644 index 77336577..00000000 --- a/apps/skolplattformen-app-new/components/tabBarLabel.component.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { StyleService, Text, useStyleSheet } from '@ui-kitten/components' -import React from 'react' -import { View } from 'react-native' -import { fontSize } from '../styles/typography' - -export type TabBarLabelProps = { - label: string - focused: boolean -} - -export const TabBarLabel = ({ label, focused }: TabBarLabelProps) => { - const styles = useStyleSheet(themedStyles) - - return ( - - - {label} - - - ) -} - -const themedStyles = StyleService.create({ - label: { - fontWeight: '500', - color: 'color-tab-default', - ...fontSize.xxs, - }, - focused: { - color: 'color-tab-focused', - }, -}) diff --git a/apps/skolplattformen-app-new/components/transitionView.component.tsx b/apps/skolplattformen-app-new/components/transitionView.component.tsx deleted file mode 100644 index fc85da38..00000000 --- a/apps/skolplattformen-app-new/components/transitionView.component.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React, { FunctionComponent } from 'react' -import { ViewProps } from 'react-native' -import * as Animatable from 'react-native-animatable' - -interface TransitionViewPropsType extends ViewProps { - animation?: string - duration?: number - index?: number -} -const transitionDuration = 500 - -export const TransitionView: FunctionComponent = ({ - index, - children, - ...rest -}) => { - return ( - - {children} - - ) -} diff --git a/apps/skolplattformen-app-new/components/versionInfo.component.tsx b/apps/skolplattformen-app-new/components/versionInfo.component.tsx deleted file mode 100644 index 81073908..00000000 --- a/apps/skolplattformen-app-new/components/versionInfo.component.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Text } from '@ui-kitten/components' -import React from 'react' -import { StyleSheet, View } from 'react-native' -import { getBuildNumber, getVersion } from 'react-native-device-info' - -export const VersionInfo = () => { - return ( - - - v{getVersion()} ({getBuildNumber()}) - - - ) -} - -const styles = StyleSheet.create({ - container: { - alignItems: 'center', - }, -}) diff --git a/apps/skolplattformen-app-new/components/week.component.tsx b/apps/skolplattformen-app-new/components/week.component.tsx deleted file mode 100644 index b55fd253..00000000 --- a/apps/skolplattformen-app-new/components/week.component.tsx +++ /dev/null @@ -1,277 +0,0 @@ -import { Child, MenuItem, TimetableEntry } from '@skolplattformen/api' -import { useMenu, useTimetable } from '../libs/hooks/src' -import { - List, - ListItem, - StyleService, - Tab, - TabBar, - Text, - useStyleSheet, - ViewPager, -} from '@ui-kitten/components' -import moment from 'moment' -import React, { useEffect, useState } from 'react' -import { View } from 'react-native' -import { LanguageService } from '../services/languageService' -import { Sizing, Typography } from '../styles' -import { TransitionView } from './transitionView.component' -import { getMeaningfulStartingDate } from '../utils/calendarHelpers' -import { translate } from '../utils/translation' - -interface WeekProps { - child: Child -} - -interface LessonListProps { - lessons: TimetableEntry[] - lunch?: MenuItem - header: string -} - -interface DayProps { - weekDay: string - lunch?: MenuItem - lessons: TimetableEntry[] -} - -const LessonList = ({ lessons, header, lunch }: LessonListProps) => { - const styles = useStyleSheet(themedStyles) - - return ( - ( - - {header} - - )} - renderItem={({ - item: { id, code, name, timeStart, timeEnd, teacher, location }, - }) => ( - ( - - - {name} - - - )} - description={() => ( - - {`${timeStart.slice(0, 5)}-${timeEnd.slice(0, 5)} ${ - location === '' ? '' : '(' + location + ')' - } `} - - {code?.toUpperCase() === 'LUNCH' ? lunch?.description : teacher} - - - )} - /> - )} - /> - ) -} - -export const Day = ({ weekDay, lunch, lessons }: DayProps) => { - const styles = useStyleSheet(themedStyles) - - if (lessons.length <= 0) { - return null - } - return ( - - timeStart < '12:00')} - /> - timeStart >= '12:00')} - /> - - ) -} - -export const Week = ({ child }: WeekProps) => { - // const translate = (key: string) => key; - - moment.locale(LanguageService.getLocale()) - const days = moment.weekdaysShort().slice(1, 6) - const displayDate = getMeaningfulStartingDate(moment()) - - const currentDayIndex = Math.min(moment(displayDate).isoWeekday() - 1, 5) - const [selectedIndex, setSelectedIndex] = useState(currentDayIndex) - const [showSchema, setShowSchema] = useState(false) - const [year, week] = [displayDate.isoWeekYear(), displayDate.isoWeek()] - const { data: lessons } = useTimetable( - child, - week, - year, - LanguageService.getLanguageCode() - ) - let { data: menu } = useMenu(child) - - // Hide menu if we want to show next week but it is not monday yet. - // The menu for next week is not available until monday - const currentDate = moment() - const shouldShowLunchMenu = - menu[displayDate.isoWeekday() - 1] && - !(displayDate.isoWeekday() === 1 && currentDate.isoWeekday() !== 1) - if (!shouldShowLunchMenu) { - menu = [] - } - - const styles = useStyleSheet(themedStyles) - - useEffect(() => { - const shouldShowSchema = lessons.length > 0 - setShowSchema(shouldShowSchema) - }, [lessons]) - - const getWeekText = (date = moment()) => { - return `${translate('schedule.week')} ${date.isoWeek()}` - } - - return showSchema ? ( - - - {getWeekText(displayDate)} - setSelectedIndex(index)} - > - {days.map((weekDay, index) => ( - ( - <> - {weekDay} - - {displayDate - .startOf('isoWeek') - .add(index, 'day') - .format('D')} - - - )} - /> - ))} - - - setSelectedIndex(index)} - > - {days.map((weekDay, index) => ( - days[lesson.dayOfWeek - 1] === weekDay) - .sort((a, b) => a.timeStart.localeCompare(b.timeStart))} - /> - ))} - - - - ) : null -} - -const themedStyles = StyleService.create({ - view: { - backgroundColor: 'background-basic-color-1', - maxHeight: '65%', - paddingBottom: 0, - margin: 0, - }, - innerView: { - paddingBottom: 170, - margin: 0, - }, - part: { - backgroundColor: 'transparent', - width: '33%', - }, - tab: { - flexDirection: 'row', - padding: 0, - }, - item: { - height: 90, - backgroundColor: 'background-basic-color-2', - paddingHorizontal: 0, - borderRadius: 2, - margin: 2, - paddingLeft: Sizing.t2, - paddingRight: Sizing.t2, - width: '90%', - }, - time: { - color: 'color-basic-500', - fontSize: 9, - }, - dayTab: { - textAlign: 'left', - }, - summary: { - paddingRight: 20, - paddingLeft: 2, - }, - startTime: { - paddingBottom: 2, - }, - lunchLabel: { - paddingTop: 10, - paddingBottom: 2, - }, - lunch: { - width: 100, - }, - endTime: { - paddingTop: 10, - }, - pager: { - margin: 10, - ...Typography.fontWeight.bold, - }, - header: { - paddingLeft: 10, - }, - lessonTitle: { - ...Typography.fontWeight.semibold, - fontSize: 13, - }, - lessonDescription: { - fontSize: 13, - }, - lesson: { - flexDirection: 'column', - }, - weekNumber: { - marginLeft: 10, - marginTop: 10, - ...Typography.fontWeight.bold, - }, - tabTitle: { - textAlign: 'center', - }, - tabTitleDate: { - textAlign: 'center', - }, -}) diff --git a/apps/skolplattformen-app-new/context/feature/featureContext.tsx b/apps/skolplattformen-app-new/context/feature/featureContext.tsx deleted file mode 100644 index 8b4d2194..00000000 --- a/apps/skolplattformen-app-new/context/feature/featureContext.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Features } from '@skolplattformen/api' - -import React from 'react' - -export const FeatureFlagsContext = React.createContext({ - LOGIN_BANK_ID_SAME_DEVICE_WITHOUT_ID: true, - FOOD_MENU: false, - CLASS_LIST: true, - LOGIN_FREJA_EID: false, //! this has been added -}) - -interface Props { - features: Features - children: React.ReactNode //! this has been added -} - -export const FeatureProvider: React.FC = (props) => { - return ( - - {props.children} - - ) -} diff --git a/apps/skolplattformen-app-new/context/language/languageContext.tsx b/apps/skolplattformen-app-new/context/language/languageContext.tsx deleted file mode 100644 index 3148e688..00000000 --- a/apps/skolplattformen-app-new/context/language/languageContext.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import React, { useState, useEffect, ReactNode } from 'react' -import * as RNLocalize from 'react-native-localize' -import { LoadingComponent } from '../../components/loading.component' - -import { LanguageService } from '../../services/languageService' -import { translations } from '../../utils/translation' - -import AppStorage from '../../services/appStorage' - -interface LanguageContextProps { - Strings: Record - languageCode?: string -} - -export const LanguageContext = React.createContext({ - Strings: {}, - languageCode: '', -}) - -interface Props { - children: ReactNode - data: any - initialLanguageCode?: string - cache: any -} - -export const LanguageProvider: React.FC = ({ - children, - data, - initialLanguageCode, - cache, -}) => { - const fallBack = { languageTag: 'sv', isRTL: false } - - LanguageService.setAllData({ data }) - - const [languageCode, setLanguageCode] = useState( - undefined - ) - - const setLanguageConfig = (langCode: string) => { - LanguageService.setLanguageCode({ langCode: langCode }) - LanguageService.seti18nConfig({ langCode: langCode }) - setLanguageCode(langCode) - } - - const [Strings, setStrings] = useState(() => { - if (initialLanguageCode && data[initialLanguageCode]) { - setLanguageConfig(initialLanguageCode) - - return data[initialLanguageCode] - } - - const { languageTag } = - RNLocalize.findBestLanguageTag(Object.keys(translations)) || fallBack - - const bestStrings = data[languageTag] - - return bestStrings - }) - - useEffect(() => { - LanguageService.onChange( - { key: 'LanguageProvider' }, - (langCode: string) => { - if (langCode && data[langCode]) { - setLanguageCode(langCode) - setStrings(data[langCode]) - if (cache) { - AppStorage.setSetting('langCode', langCode) - } - } - } - ) - - const checkLanguageLocal = async () => { - // Saved language - if (cache) { - // Get cached lang - const cachedLang = await AppStorage.getSetting('langCode') - - // Try to find best suited language - const { languageTag } = - RNLocalize.findBestLanguageTag(Object.keys(translations)) || fallBack - - const currentLanguageCode = cachedLang || languageTag - - setLanguageConfig(currentLanguageCode) - } - } - checkLanguageLocal() - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - - return ( - - {languageCode ? children : } - - ) -} diff --git a/apps/skolplattformen-app-new/context/schoolPlatform/schoolPlatformContext.tsx b/apps/skolplattformen-app-new/context/schoolPlatform/schoolPlatformContext.tsx deleted file mode 100644 index e9bc4265..00000000 --- a/apps/skolplattformen-app-new/context/schoolPlatform/schoolPlatformContext.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import useSettingsStorage from '../../hooks/useSettingsStorage' -import React, { createContext } from 'react' - -interface SchoolPlatformProps { - currentSchoolPlatform?: string - changeSchoolPlatform: (platform: string) => void -} - -const defaultState: SchoolPlatformProps = { - changeSchoolPlatform: (platform: string) => - console.log('DEBUG ONLY: changing to', platform), -} - -type SchoolPlatformProviderProps = { - children: React.ReactNode -} - -export const SchoolPlatformProvider: React.FC = ({ - children, -}) => { - const [currentSchoolPlatform, setCurrentSchoolPlatform] = useSettingsStorage( - 'currentSchoolPlatform' - ) - - const changeSchoolPlatform = (platform: any) => { - setCurrentSchoolPlatform(platform) - } - - return ( - - {children} - - ) -} - -export const SchoolPlatformContext = - createContext(defaultState) diff --git a/apps/skolplattformen-app-new/data/schoolPlatforms.ts b/apps/skolplattformen-app-new/data/schoolPlatforms.ts deleted file mode 100644 index 37ad63e3..00000000 --- a/apps/skolplattformen-app-new/data/schoolPlatforms.ts +++ /dev/null @@ -1,22 +0,0 @@ -import CookieManager from '@react-native-cookies/cookies' -import initHjarntorget, { - features as featuresHjarntorget, -} from '../libs/api-hjarntorget/lib/' -import initSkolplattformen, { - features as featuresSkolPlattformen, -} from '../libs/api-skolplattformen/lib/' - -export const schoolPlatforms = [ - { - id: 'stockholm-skolplattformen', - displayName: 'Stockholms stad (Skolplattformen)', - api: initSkolplattformen(fetch as any, CookieManager), - features: featuresSkolPlattformen, - }, - { - id: 'goteborg-hjarntorget', - displayName: 'Göteborgs Stad (Hjärntorget)', - api: initHjarntorget(fetch as any, CookieManager), - features: featuresHjarntorget, - }, -] diff --git a/apps/skolplattformen-app-new/design/dark.json b/apps/skolplattformen-app-new/design/dark.json deleted file mode 100644 index ba349dbe..00000000 --- a/apps/skolplattformen-app-new/design/dark.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "color-primary-50": "#FFECF9", - "color-primary-100": "#FEC9EF", - "color-primary-200": "#FD82DA", - "color-primary-300": "#FB3CC6", - "color-primary-400": "#EC04AB", - "color-primary-500": "#A60378", - "color-primary-600": "#880262", - "color-primary-700": "#6A024D", - "color-primary-800": "#4C0137", - "color-primary-900": "#2E0121", - "color-primary-transparent-100": "rgba(219, 37, 117, 0.08)", - "color-primary-transparent-200": "rgba(219, 37, 117, 0.16)", - "color-primary-transparent-300": "rgba(219, 37, 117, 0.24)", - "color-primary-transparent-400": "rgba(219, 37, 117, 0.32)", - "color-primary-transparent-500": "rgba(219, 37, 117, 0.4)", - "color-primary-transparent-600": "rgba(219, 37, 117, 0.48)", - "color-success-100": "#EEFACF", - "color-success-200": "#DAF6A1", - "color-success-300": "#B8E36F", - "color-success-400": "#93C948", - "color-success-500": "#64A518", - "color-success-600": "#4E8D11", - "color-success-700": "#3B760C", - "color-success-800": "#2A5F07", - "color-success-900": "#1E4F04", - "color-success-transparent-100": "rgba(100, 165, 24, 0.08)", - "color-success-transparent-200": "rgba(100, 165, 24, 0.16)", - "color-success-transparent-300": "rgba(100, 165, 24, 0.24)", - "color-success-transparent-400": "rgba(100, 165, 24, 0.32)", - "color-success-transparent-500": "rgba(100, 165, 24, 0.4)", - "color-success-transparent-600": "rgba(100, 165, 24, 0.48)", - "color-info-100": "#CFE3FB", - "color-info-200": "#A1C5F8", - "color-info-300": "#6F9EEA", - "color-info-400": "#4A7AD5", - "color-info-500": "#184BBA", - "color-info-600": "#11399F", - "color-info-700": "#0C2A85", - "color-info-800": "#071D6B", - "color-info-900": "#041459", - "color-info-transparent-100": "rgba(24, 75, 186, 0.08)", - "color-info-transparent-200": "rgba(24, 75, 186, 0.16)", - "color-info-transparent-300": "rgba(24, 75, 186, 0.24)", - "color-info-transparent-400": "rgba(24, 75, 186, 0.32)", - "color-info-transparent-500": "rgba(24, 75, 186, 0.4)", - "color-info-transparent-600": "rgba(24, 75, 186, 0.48)", - "color-warning-transparent-100": "rgba(204, 130, 4, 0.08)", - "color-warning-transparent-200": "rgba(204, 130, 4, 0.16)", - "color-warning-transparent-300": "rgba(204, 130, 4, 0.24)", - "color-warning-transparent-400": "rgba(204, 130, 4, 0.32)", - "color-warning-transparent-500": "rgba(204, 130, 4, 0.4)", - "color-warning-transparent-600": "rgba(204, 130, 4, 0.48)", - "color-danger-100": "#FBD6DC", - "color-danger-200": "#F8AFC2", - "color-danger-300": "#EA83A9", - "color-danger-400": "#D56097", - "color-danger-500": "#BA327F", - "color-danger-600": "#9F2476", - "color-danger-700": "#85196C", - "color-danger-800": "#6B0F5F", - "color-danger-900": "#590956", - "color-danger-transparent-100": "rgba(186, 50, 127, 0.08)", - "color-danger-transparent-200": "rgba(186, 50, 127, 0.16)", - "color-danger-transparent-300": "rgba(186, 50, 127, 0.24)", - "color-danger-transparent-400": "rgba(186, 50, 127, 0.32)", - "color-danger-transparent-500": "rgba(186, 50, 127, 0.4)", - "color-danger-transparent-600": "rgba(186, 50, 127, 0.48)", - "background-basic-color-1": "#0F1117", - "background-basic-color-2": "#030200", - "text-hint-color": "#B3BBCB", - "color-control-default": "#E5E7EB", - "color-basic-default": "$color-primary-800", - "color-basic-focus": "$color-primary-700", - "color-basic-hover": "$color-primary-700", - "color-basic-active": "$color-primary-700", - "color-basic-text": "$color-primary-100", - "color-input-border": "$color-basic-300", - "color-tab-default": "$color-primary-50", - "color-tab-focused": "$color-primary-200", - "color-button-ghost-text": "$color-primary-200", - "color-separator": "$color-basic-900" -} diff --git a/apps/skolplattformen-app-new/design/light.json b/apps/skolplattformen-app-new/design/light.json deleted file mode 100644 index 2fd6fadf..00000000 --- a/apps/skolplattformen-app-new/design/light.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "color-primary-50": "#FFECF9", - "color-primary-100": "#FEC9EF", - "color-primary-200": "#FD82DA", - "color-primary-300": "#FB3CC6", - "color-primary-400": "#EC04AB", - "color-primary-500": "#A60378", - "color-primary-600": "#880262", - "color-primary-700": "#6A024D", - "color-primary-800": "#4C0137", - "color-primary-900": "#2E0121", - "color-primary-transparent-100": "rgba(219, 37, 117, 0.08)", - "color-primary-transparent-200": "rgba(219, 37, 117, 0.16)", - "color-primary-transparent-300": "rgba(219, 37, 117, 0.24)", - "color-primary-transparent-400": "rgba(219, 37, 117, 0.32)", - "color-primary-transparent-500": "rgba(219, 37, 117, 0.4)", - "color-primary-transparent-600": "rgba(219, 37, 117, 0.48)", - "color-success-100": "#EEFACF", - "color-success-200": "#DAF6A1", - "color-success-300": "#B8E36F", - "color-success-400": "#93C948", - "color-success-500": "#64A518", - "color-success-600": "#4E8D11", - "color-success-700": "#3B760C", - "color-success-800": "#2A5F07", - "color-success-900": "#1E4F04", - "color-success-transparent-100": "rgba(100, 165, 24, 0.08)", - "color-success-transparent-200": "rgba(100, 165, 24, 0.16)", - "color-success-transparent-300": "rgba(100, 165, 24, 0.24)", - "color-success-transparent-400": "rgba(100, 165, 24, 0.32)", - "color-success-transparent-500": "rgba(100, 165, 24, 0.4)", - "color-success-transparent-600": "rgba(100, 165, 24, 0.48)", - "color-info-100": "#C6EEF8", - "color-info-200": "#90D9F1", - "color-info-300": "#55AED5", - "color-info-400": "#2B7DAC", - "color-info-500": "#004475", - "color-info-600": "#003464", - "color-info-700": "#002754", - "color-info-800": "#001B43", - "color-info-900": "#001338", - "color-info-transparent-100": "rgba(0, 68, 117, 0.08)", - "color-info-transparent-200": "rgba(0, 68, 117, 0.16)", - "color-info-transparent-300": "rgba(0, 68, 117, 0.24)", - "color-info-transparent-400": "rgba(0, 68, 117, 0.32)", - "color-info-transparent-500": "rgba(0, 68, 117, 0.4)", - "color-info-transparent-600": "rgba(0, 68, 117, 0.48)", - "color-warning-100": "#FCF1CA", - "color-warning-200": "#F9E097", - "color-warning-300": "#EFC662", - "color-warning-400": "#E0A93B", - "color-warning-500": "#CC8204", - "color-warning-600": "#AF6902", - "color-warning-700": "#925202", - "color-warning-800": "#763D01", - "color-warning-900": "#612F00", - "color-warning-transparent-100": "rgba(204, 130, 4, 0.08)", - "color-warning-transparent-200": "rgba(204, 130, 4, 0.16)", - "color-warning-transparent-300": "rgba(204, 130, 4, 0.24)", - "color-warning-transparent-400": "rgba(204, 130, 4, 0.32)", - "color-warning-transparent-500": "rgba(204, 130, 4, 0.4)", - "color-warning-transparent-600": "rgba(204, 130, 4, 0.48)", - "color-danger-100": "#FBD6DC", - "color-danger-200": "#F8AFC2", - "color-danger-300": "#EA83A9", - "color-danger-400": "#D56097", - "color-danger-500": "#BA327F", - "color-danger-600": "#9F2476", - "color-danger-700": "#85196C", - "color-danger-800": "#6B0F5F", - "color-danger-900": "#590956", - "color-danger-transparent-100": "rgba(186, 50, 127, 0.08)", - "color-danger-transparent-200": "rgba(186, 50, 127, 0.16)", - "color-danger-transparent-300": "rgba(186, 50, 127, 0.24)", - "color-danger-transparent-400": "rgba(186, 50, 127, 0.32)", - "color-danger-transparent-500": "rgba(186, 50, 127, 0.4)", - "color-danger-transparent-600": "rgba(186, 50, 127, 0.48)", - "text-hint-color": "#4B5466", - "color-basic-default": "$color-primary-50", - "color-basic-focus": "$color-primary-100", - "color-basic-hover": "$color-primary-100", - "color-basic-active": "$color-primary-100", - "color-basic-text": "$color-primary-800", - "color-input-border": "$color-basic-800", - "background-basic-color-1": "#fff", - "background-basic-color-2": "#F2F1F6", - "color-tab-default": "$color-basic-700", - "color-tab-focused": "$color-primary-500", - "color-button-ghost-text": "$color-primary-500", - "color-separator": "$color-basic-400" -} diff --git a/apps/skolplattformen-app-new/design/mapping.json b/apps/skolplattformen-app-new/design/mapping.json deleted file mode 100644 index 673f12c5..00000000 --- a/apps/skolplattformen-app-new/design/mapping.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "strict": { - "text-font-family": "Poppins-Regular", - "border-radius": 10 - }, - "components": { - "Button": { - "meta": {}, - "appearances": { - "ghost": { - "variantGroups": { - "status": { - "primary": { - "textColor": "$color-button-ghost-text", - "iconTintColor": "$color-button-ghost-text" - } - } - } - }, - "filled": { - "mapping": {}, - "variantGroups": { - "status": { - "basic": { - "textColor": "$color-basic-text" - } - } - } - } - } - } - } -} diff --git a/apps/skolplattformen-app-new/design/navigationThemes.ts b/apps/skolplattformen-app-new/design/navigationThemes.ts deleted file mode 100644 index 88f6d5f5..00000000 --- a/apps/skolplattformen-app-new/design/navigationThemes.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { DarkTheme, DefaultTheme, Theme } from '@react-navigation/native' -import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { darkTheme, lightTheme } from './themes' - -export const darkNavigationTheme: Theme = { - ...DarkTheme, - colors: { - ...DarkTheme.colors, - background: darkTheme['background-basic-color-2'], - border: darkTheme['background-basic-color-2'], - card: darkTheme['background-basic-color-2'], - primary: darkTheme['color-primary-200'], - text: '#ddd', - }, -} - -export const lightNavigationTheme: Theme = { - ...DefaultTheme, - colors: { - ...DefaultTheme.colors, - background: lightTheme['background-basic-color-2'], - border: lightTheme['background-basic-color-1'], - card: lightTheme['background-basic-color-1'], - primary: lightTheme['color-primary-500'], - }, -} - -export const defaultStackStyling = ( - darkMode: boolean -): NativeStackNavigationOptions => { - return { - headerStyle: { - backgroundColor: darkMode - ? darkTheme['background-basic-color-2'] - : lightTheme['background-basic-color-1'], - }, - headerLargeStyle: { - backgroundColor: darkMode - ? darkTheme['background-basic-color-2'] - : lightTheme['background-basic-color-2'], - }, - headerTitleStyle: { - fontFamily: 'Poppins-Medium', - }, - headerBackTitleStyle: { - fontFamily: 'Poppins-Regular', - }, - } -} diff --git a/apps/skolplattformen-app-new/design/themes.ts b/apps/skolplattformen-app-new/design/themes.ts deleted file mode 100644 index 83722b7e..00000000 --- a/apps/skolplattformen-app-new/design/themes.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as eva from '@eva-design/eva' -import darkJsonTheme from './dark.json' -import lightJsonTheme from './light.json' - -export const darkTheme = { - ...eva.dark, - ...darkJsonTheme, -} -export const lightTheme = { - ...eva.light, - ...lightJsonTheme, -} diff --git a/apps/skolplattformen-app-new/hooks/__tests__/usePersonalStorage.tests.ts b/apps/skolplattformen-app-new/hooks/__tests__/usePersonalStorage.tests.ts deleted file mode 100644 index 5a14ebf7..00000000 --- a/apps/skolplattformen-app-new/hooks/__tests__/usePersonalStorage.tests.ts +++ /dev/null @@ -1,82 +0,0 @@ -import AsyncStorage from '@react-native-async-storage/async-storage' -import { User } from '@skolplattformen/api' -import { act, renderHook } from '@testing-library/react' -import usePersonalStorage from '../usePersonalStorage' - -beforeEach(async () => { - jest.clearAllMocks() - await AsyncStorage.clear() -}) - -const user: User = { personalNumber: '201701012393' } -const prefix = user.personalNumber + '_' - -test('use key prefix on set', async () => { - const { result } = renderHook(() => usePersonalStorage(user, 'key', '')) - - const [, setValue] = result.current - await act(() => { - setValue('foo') - }) - - expect(await AsyncStorage.getItem(prefix + 'key')).toEqual( - JSON.stringify('foo') - ) -}) - -test('return inital value if no set', async () => { - const { result } = renderHook(() => - usePersonalStorage(user, 'key', 'initialValue') - ) - - const [value] = result.current - - expect(value).toEqual('initialValue') - expect(await AsyncStorage.getItem(prefix + 'key')).toEqual(null) -}) - -test('update value', async () => { - const { result } = renderHook(() => - usePersonalStorage(user, 'key', 'initialValue') - ) - - const [initValue, setValue] = result.current - - await act(() => { - setValue('update') - }) - - const [updateValue] = result.current - - expect(initValue).toEqual('initialValue') - expect(updateValue).toEqual('update') - - expect(await AsyncStorage.getItem(prefix + 'key')).toEqual( - JSON.stringify('update') - ) -}) - -test('do nothing if personalId is empty', async () => { - const emptyUser: User = { personalNumber: '' } - let hookUser = emptyUser - const { result, rerender } = renderHook(() => - usePersonalStorage(hookUser, 'key', '') - ) - - await act(() => { - const [, setValue] = result.current - setValue('foo') - }) - - expect(AsyncStorage.setItem).not.toHaveBeenCalled() - - hookUser = user - rerender() - - await act(() => { - const [, setValue] = result.current - setValue('foo') - }) - - expect(AsyncStorage.setItem).toHaveBeenCalled() -}) diff --git a/apps/skolplattformen-app-new/hooks/__tests__/useSettingsStorage.tests.ts b/apps/skolplattformen-app-new/hooks/__tests__/useSettingsStorage.tests.ts deleted file mode 100644 index b79d339f..00000000 --- a/apps/skolplattformen-app-new/hooks/__tests__/useSettingsStorage.tests.ts +++ /dev/null @@ -1,47 +0,0 @@ -import AsyncStorage from '@react-native-async-storage/async-storage' -import { act, renderHook } from '@testing-library/react' -import AppStorage from '../../services/appStorage' -import useSettingsStorage, { settingsState } from '../useSettingsStorage' - -beforeEach(() => { - AsyncStorage.clear() - // TODO: This is a bit ugly. Should probably fix that. - settingsState.settings.theme = 'light' -}) - -const prefix = AppStorage.settingsStorageKeyPrefix - -test('use key prefix on set', async () => { - const { result } = renderHook(() => useSettingsStorage('theme')) - - const [, setValue] = result.current - - await act(async () => { - setValue('dark') - }) - - const data = await AsyncStorage.getItem(prefix + 'SETTINGS') - const parsed = JSON.parse(data ?? '') - - expect(parsed.theme).toEqual('dark') -}) - -test('update value', async () => { - const { result } = renderHook(() => useSettingsStorage('theme')) - - const [initValue, setValue] = result.current - - await act(async () => { - setValue('dark') - }) - - const [updateValue] = result.current - - expect(initValue).toEqual('light') - expect(updateValue).toEqual('dark') - - const data = await AsyncStorage.getItem(prefix + 'SETTINGS') - const parsed = JSON.parse(data ?? '') - - expect(parsed.theme).toEqual('dark') -}) diff --git a/apps/skolplattformen-app-new/hooks/__tests__/useTempStorage.tests.ts b/apps/skolplattformen-app-new/hooks/__tests__/useTempStorage.tests.ts deleted file mode 100644 index 89821670..00000000 --- a/apps/skolplattformen-app-new/hooks/__tests__/useTempStorage.tests.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { renderHook, act } from '@testing-library/react' -import AsyncStorage from '@react-native-async-storage/async-storage' -import useTempStorage from '../useTempStorage' -import AppStorage from '../../services/appStorage' - -beforeEach(() => { - AsyncStorage.clear() -}) - -const prefix = AppStorage.tempStorageKeyPrefix - -test('use key prefix on set', async () => { - const { result } = renderHook(() => useTempStorage('key', '')) - - await act(() => { - const [, setValue] = result.current - setValue('foo') - }) - - expect(await AsyncStorage.getItem(prefix + 'key')).toEqual( - JSON.stringify('foo') - ) -}) - -test('return inital value if no set', async () => { - const { result } = renderHook(() => useTempStorage('key', 'initialValue')) - - const [value] = result.current - - expect(value).toEqual('initialValue') - expect(await AsyncStorage.getItem(prefix + 'key')).toEqual(null) -}) - -test('update value', async () => { - const { result } = renderHook(() => useTempStorage('key', 'initialValue')) - - const [initValue, setValue] = result.current - - await act(() => { - setValue('update') - }) - - const [updateValue] = result.current - - expect(initValue).toEqual('initialValue') - expect(updateValue).toEqual('update') - - expect(await AsyncStorage.getItem(prefix + 'key')).toEqual( - JSON.stringify('update') - ) -}) diff --git a/apps/skolplattformen-app-new/hooks/useAppState.tsx b/apps/skolplattformen-app-new/hooks/useAppState.tsx deleted file mode 100644 index e59c1d0b..00000000 --- a/apps/skolplattformen-app-new/hooks/useAppState.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect, useState } from 'react' -import { AppState, AppStateStatus } from 'react-native' - -export const useAppState = () => { - const currentState = AppState.currentState - const [appState, setAppState] = useState(currentState) - - function onChange(newState: AppStateStatus) { - setAppState(newState) - } - - useEffect(() => { - AppState.addEventListener('change', onChange) - - // return () => { - // AppState.removeEventListener('change', onChange); - // }; - }, []) - - return appState -} diff --git a/apps/skolplattformen-app-new/hooks/useAsyncStorage.tsx b/apps/skolplattformen-app-new/hooks/useAsyncStorage.tsx deleted file mode 100644 index 84868fa2..00000000 --- a/apps/skolplattformen-app-new/hooks/useAsyncStorage.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import AsyncStorage from '@react-native-async-storage/async-storage' -import { useEffect, useState } from 'react' - -export default function useAsyncStorage( - storageKey: string, - defaultValue: T -): [T, (val: T) => void] { - const [storageItem, setStorageItem] = useState(defaultValue) - - async function setStoredValue(value: T) { - try { - if (!storageKey) { - return - } - await AsyncStorage.setItem(storageKey, JSON.stringify(value)) - setStorageItem(value) - } catch (e) { - // noop - } - } - - useEffect(() => { - async function getStoredValue() { - try { - const data = await AsyncStorage.getItem(storageKey) - if (typeof data === 'string') { - setStorageItem(JSON.parse(data)) - } - } catch (e) { - // noop - } - } - - getStoredValue() - }, [storageKey]) - - return [ - storageItem !== undefined ? storageItem : defaultValue, - setStoredValue, - ] -} diff --git a/apps/skolplattformen-app-new/hooks/useFeature.tsx b/apps/skolplattformen-app-new/hooks/useFeature.tsx deleted file mode 100644 index fb822ddb..00000000 --- a/apps/skolplattformen-app-new/hooks/useFeature.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Features, FeatureType } from '@skolplattformen/api' -import React from 'react' -import { FeatureFlagsContext } from '../context/feature/featureContext' - -export const useFeature = (name: FeatureType) => { - const features = React.useContext(FeatureFlagsContext) - if (features === null) { - throw new Error('You must wrap your components in a FeatureProvider.') - } - - return features[name] -} diff --git a/apps/skolplattformen-app-new/hooks/useLangCode.tsx b/apps/skolplattformen-app-new/hooks/useLangCode.tsx deleted file mode 100644 index 014c532e..00000000 --- a/apps/skolplattformen-app-new/hooks/useLangCode.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { useEffect, useRef, useState } from 'react' -import { LanguageService } from '../services/languageService' - -const generateKey = () => { - return `${Date.now()}-${Math.random() * 1000}` -} - -export const useLangCode = () => { - const [langCode, setLangCode] = useState(LanguageService.getLanguageCode()) - - const key = useRef(generateKey()) - - useEffect(() => { - const unsubscribe = LanguageService.onChange( - { key: key.current }, - (lang) => { - setLangCode(lang) - } - ) - - return () => unsubscribe() - }, []) - - return langCode -} diff --git a/apps/skolplattformen-app-new/hooks/useLangRTL.tsx b/apps/skolplattformen-app-new/hooks/useLangRTL.tsx deleted file mode 100644 index 747b8f7b..00000000 --- a/apps/skolplattformen-app-new/hooks/useLangRTL.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { isRTL } from '../services/languageService' -import { useLangCode } from './useLangCode' - -export const useLangRTL = () => { - const langCode = useLangCode() - return isRTL(langCode) -} diff --git a/apps/skolplattformen-app-new/hooks/useLanguage.tsx b/apps/skolplattformen-app-new/hooks/useLanguage.tsx deleted file mode 100644 index b6c815c7..00000000 --- a/apps/skolplattformen-app-new/hooks/useLanguage.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useContext } from 'react' -import { LanguageContext } from '../context/language/languageContext' -import { LanguageService } from '../services/languageService' - -export const useLanguage = () => { - const { Strings } = useContext(LanguageContext) - - const setLanguageCode = ({ languageCode }: { languageCode: string }) => { - LanguageService.setLanguageCode({ langCode: languageCode }) - LanguageService.seti18nConfig({ langCode: languageCode }) - } - - return { Strings, setLanguageCode } -} diff --git a/apps/skolplattformen-app-new/hooks/usePersonalStorage.tsx b/apps/skolplattformen-app-new/hooks/usePersonalStorage.tsx deleted file mode 100644 index 7143a5f7..00000000 --- a/apps/skolplattformen-app-new/hooks/usePersonalStorage.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { User } from '@skolplattformen/api' -import useAsyncStorage from './useAsyncStorage' - -export default function usePersonalStorage( - user: User, - storageKey: string, - defaultValue: T -): [T, (val: T) => void] { - const internalKey = - user && user.personalNumber ? user.personalNumber + '_' + storageKey : '' - return useAsyncStorage(internalKey, defaultValue) -} diff --git a/apps/skolplattformen-app-new/hooks/useSettingsStorage.tsx b/apps/skolplattformen-app-new/hooks/useSettingsStorage.tsx deleted file mode 100644 index 90e82460..00000000 --- a/apps/skolplattformen-app-new/hooks/useSettingsStorage.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { useCallback } from 'react' -import { proxy, subscribe, useSnapshot } from 'valtio' -import AppStorage from '../services/appStorage' - -export type ChildPersonalNumbers = Record - -export const settingsState = proxy({ - hydrated: false, - settings: { - loginMethodId: 'thisdevice' as - | 'thisdevice' - | 'otherdevice' - | 'testuser' - | 'freja', - usingSystemTheme: true, - theme: 'light', - cachedPersonalIdentityNumber: '', - currentSchoolPlatform: 'stockholm-skolplattformen' as - | 'stockholm-skolplattformen' - | 'goteborg-hjarntorget', - childPersonalIdentityNumber: {} as ChildPersonalNumbers, - }, -}) - -export type Settings = (typeof settingsState)['settings'] - -const SETTINGS_STORAGE_KEY = 'SETTINGS' - -subscribe(settingsState, () => { - AppStorage.setSetting(SETTINGS_STORAGE_KEY, settingsState.settings) -}) - -export const initializeSettingsState = async () => { - const settings = await AppStorage.getSetting(SETTINGS_STORAGE_KEY) - - settingsState.hydrated = true - - if (settings) { - settingsState.settings = { - ...settingsState.settings, - ...settings, - } - } -} - -export default function useSettingsStorage< - TKey extends keyof Settings, - TValue = Settings[TKey] ->(key: TKey) { - const { settings } = useSnapshot(settingsState) - - const setter = useCallback( - (value: TValue) => { - settingsState.settings[key] = value as any - }, - [key] - ) - - return [settings[key], setter] as const -} diff --git a/apps/skolplattformen-app-new/hooks/useTempStorage.tsx b/apps/skolplattformen-app-new/hooks/useTempStorage.tsx deleted file mode 100644 index 3de5875d..00000000 --- a/apps/skolplattformen-app-new/hooks/useTempStorage.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import useAsyncStorage from './useAsyncStorage' -import AppStorage from '../services/appStorage' - -export default function useTempStorage( - storageKey: string, - defaultValue: T -): [T, (val: T) => void] { - const tempKey = AppStorage.tempStorageKeyPrefix + storageKey - return useAsyncStorage(tempKey, defaultValue) -} diff --git a/apps/skolplattformen-app-new/hooks/useTranslation.tsx b/apps/skolplattformen-app-new/hooks/useTranslation.tsx deleted file mode 100644 index 973e71c0..00000000 --- a/apps/skolplattformen-app-new/hooks/useTranslation.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import i18n from 'i18n-js' -import { useMemo } from 'react' -import { useLangCode } from './useLangCode' - -// const i18n = new I18n(); - -export const useTranslation = () => { - const langCode = useLangCode() - const output = useMemo(() => { - return { t: i18n.t, langCode } - }, [langCode]) - return output -} diff --git a/apps/skolplattformen-app-new/index.js b/apps/skolplattformen-app-new/index.js deleted file mode 100644 index cbef63e5..00000000 --- a/apps/skolplattformen-app-new/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @format - */ - -import { AppRegistry } from 'react-native' -import App from './App' -import { name as appName } from './app.json' - -AppRegistry.registerComponent(appName, () => App) diff --git a/apps/skolplattformen-app-new/ios/Podfile b/apps/skolplattformen-app-new/ios/Podfile deleted file mode 100644 index f1b70386..00000000 --- a/apps/skolplattformen-app-new/ios/Podfile +++ /dev/null @@ -1,62 +0,0 @@ -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p', - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip - -platform :ios, min_ios_version_supported -prepare_react_native_project! - -# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. -# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded -# -# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` -# ```js -# module.exports = { -# dependencies: { -# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), -# ``` -flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled - -linkage = ENV['USE_FRAMEWORKS'] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end - -target 'app' do - config = use_native_modules! - - # Flags change depending on the env values. - flags = get_default_flags() - - use_react_native!( - :path => config[:reactNativePath], - # Hermes is now enabled by default. Disable by setting this flag to false. - :hermes_enabled => flags[:hermes_enabled], - :fabric_enabled => flags[:fabric_enabled], - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable the next line. - :flipper_configuration => flipper_config, - # An absolute path to your application root. - :app_path => "#{Pod::Config.instance.installation_root}/.." - ) - - target 'appTests' do - inherit! :complete - # Pods for testing - end - - post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false - ) - __apply_Xcode_12_5_M1_post_install_workaround(installer) - end -end diff --git a/apps/skolplattformen-app-new/ios/Podfile.lock b/apps/skolplattformen-app-new/ios/Podfile.lock deleted file mode 100644 index 4764324b..00000000 --- a/apps/skolplattformen-app-new/ios/Podfile.lock +++ /dev/null @@ -1,804 +0,0 @@ -PODS: - - boost (1.76.0) - - CocoaAsyncSocket (7.6.5) - - DoubleConversion (1.1.6) - - FBLazyVector (0.72.5) - - FBReactNativeSpec (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.72.5) - - RCTTypeSafety (= 0.72.5) - - React-Core (= 0.72.5) - - React-jsi (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - Flipper (0.182.0): - - Flipper-Folly (~> 2.6) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - FlipperKit (0.182.0): - - FlipperKit/Core (= 0.182.0) - - FlipperKit/Core (0.182.0): - - Flipper (~> 0.182.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.182.0): - - Flipper (~> 0.182.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.182.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.182.0) - - FlipperKit/FKPortForwarding (0.182.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.182.0) - - FlipperKit/FlipperKitLayoutHelpers (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.182.0) - - FlipperKit/FlipperKitNetworkPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - - fmt (6.2.1) - - glog (0.3.5) - - hermes-engine (0.72.5): - - hermes-engine/Pre-built (= 0.72.5) - - hermes-engine/Pre-built (0.72.5) - - libevent (2.1.12) - - OpenSSL-Universal (1.1.1100) - - RCT-Folly (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Default (= 2021.07.22.00) - - RCT-Folly/Default (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Futures (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - libevent - - RCTRequired (0.72.5) - - RCTTypeSafety (0.72.5): - - FBLazyVector (= 0.72.5) - - RCTRequired (= 0.72.5) - - React-Core (= 0.72.5) - - React (0.72.5): - - React-Core (= 0.72.5) - - React-Core/DevSupport (= 0.72.5) - - React-Core/RCTWebSocket (= 0.72.5) - - React-RCTActionSheet (= 0.72.5) - - React-RCTAnimation (= 0.72.5) - - React-RCTBlob (= 0.72.5) - - React-RCTImage (= 0.72.5) - - React-RCTLinking (= 0.72.5) - - React-RCTNetwork (= 0.72.5) - - React-RCTSettings (= 0.72.5) - - React-RCTText (= 0.72.5) - - React-RCTVibration (= 0.72.5) - - React-callinvoker (0.72.5) - - React-Codegen (0.72.5): - - DoubleConversion - - FBReactNativeSpec - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-jsi - - React-jsiexecutor - - React-NativeModulesApple - - React-rncore - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-Core (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.5) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/CoreModulesHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/Default (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/DevSupport (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.5) - - React-Core/RCTWebSocket (= 0.72.5) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector (= 0.72.5) - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTActionSheetHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTAnimationHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTBlobHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTImageHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTLinkingHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTTextHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTWebSocket (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.5) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-CoreModules (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.5) - - React-Codegen (= 0.72.5) - - React-Core/CoreModulesHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - React-RCTBlob - - React-RCTImage (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - SocketRocket (= 0.6.1) - - React-cxxreact (0.72.5): - - boost (= 1.76.0) - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.5) - - React-debug (= 0.72.5) - - React-jsi (= 0.72.5) - - React-jsinspector (= 0.72.5) - - React-logger (= 0.72.5) - - React-perflogger (= 0.72.5) - - React-runtimeexecutor (= 0.72.5) - - React-debug (0.72.5) - - React-hermes (0.72.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.72.5) - - React-jsi - - React-jsiexecutor (= 0.72.5) - - React-jsinspector (= 0.72.5) - - React-perflogger (= 0.72.5) - - React-jsi (0.72.5): - - boost (= 1.76.0) - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.72.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.72.5) - - React-jsi (= 0.72.5) - - React-perflogger (= 0.72.5) - - React-jsinspector (0.72.5) - - React-logger (0.72.5): - - glog - - react-native-cookies (6.2.1): - - React-Core - - react-native-restart (0.0.27): - - React-Core - - react-native-safe-area-context (4.7.2): - - React-Core - - react-native-simple-toast (3.0.1): - - React-Core - - Toast (~> 4) - - react-native-webview (13.6.0): - - React-Core - - React-NativeModulesApple (0.72.5): - - hermes-engine - - React-callinvoker - - React-Core - - React-cxxreact - - React-jsi - - React-runtimeexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-perflogger (0.72.5) - - React-RCTActionSheet (0.72.5): - - React-Core/RCTActionSheetHeaders (= 0.72.5) - - React-RCTAnimation (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.5) - - React-Codegen (= 0.72.5) - - React-Core/RCTAnimationHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-RCTAppDelegate (0.72.5): - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-CoreModules - - React-hermes - - React-NativeModulesApple - - React-RCTImage - - React-RCTNetwork - - React-runtimescheduler - - ReactCommon/turbomodule/core - - React-RCTBlob (0.72.5): - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.72.5) - - React-Core/RCTBlobHeaders (= 0.72.5) - - React-Core/RCTWebSocket (= 0.72.5) - - React-jsi (= 0.72.5) - - React-RCTNetwork (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-RCTImage (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.5) - - React-Codegen (= 0.72.5) - - React-Core/RCTImageHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - React-RCTNetwork (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-RCTLinking (0.72.5): - - React-Codegen (= 0.72.5) - - React-Core/RCTLinkingHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-RCTNetwork (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.5) - - React-Codegen (= 0.72.5) - - React-Core/RCTNetworkHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-RCTSettings (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.5) - - React-Codegen (= 0.72.5) - - React-Core/RCTSettingsHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-RCTText (0.72.5): - - React-Core/RCTTextHeaders (= 0.72.5) - - React-RCTVibration (0.72.5): - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.72.5) - - React-Core/RCTVibrationHeaders (= 0.72.5) - - React-jsi (= 0.72.5) - - ReactCommon/turbomodule/core (= 0.72.5) - - React-rncore (0.72.5) - - React-runtimeexecutor (0.72.5): - - React-jsi (= 0.72.5) - - React-runtimescheduler (0.72.5): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker - - React-debug - - React-jsi - - React-runtimeexecutor - - React-utils (0.72.5): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-debug - - ReactCommon/turbomodule/bridging (0.72.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.5) - - React-cxxreact (= 0.72.5) - - React-jsi (= 0.72.5) - - React-logger (= 0.72.5) - - React-perflogger (= 0.72.5) - - ReactCommon/turbomodule/core (0.72.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.5) - - React-cxxreact (= 0.72.5) - - React-jsi (= 0.72.5) - - React-logger (= 0.72.5) - - React-perflogger (= 0.72.5) - - RNCalendarEvents (2.2.0): - - React - - RNCAsyncStorage (1.19.3): - - React-Core - - RNDateTimePicker (7.6.0): - - React-Core - - RNDeviceInfo (10.11.0): - - React-Core - - RNDevMenu (4.1.1): - - React-Core - - React-Core/DevSupport - - React-RCTNetwork - - RNGestureHandler (2.13.1): - - React-Core - - RNLocalize (3.0.2): - - React-Core - - RNScreens (3.25.0): - - React-Core - - React-RCTImage - - RNSVG (13.14.0): - - React-Core - - SocketRocket (0.6.1) - - Toast (4.0.0) - - Yoga (1.14.0) - - YogaKit (1.18.1): - - Yoga (~> 1.14) - -DEPENDENCIES: - - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.182.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - FlipperKit (= 0.182.0) - - FlipperKit/Core (= 0.182.0) - - FlipperKit/CppBridge (= 0.182.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.182.0) - - FlipperKit/FBDefines (= 0.182.0) - - FlipperKit/FKPortForwarding (= 0.182.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.182.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.182.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.182.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.182.0) - - FlipperKit/FlipperKitReactPlugin (= 0.182.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.182.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.182.0) - - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../node_modules/react-native/`) - - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - - React-Codegen (from `build/generated/ios`) - - React-Core (from `../node_modules/react-native/`) - - React-Core/DevSupport (from `../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) - - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - - "react-native-cookies (from `../node_modules/@react-native-cookies/cookies`)" - - react-native-restart (from `../node_modules/react-native-restart`) - - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - - react-native-simple-toast (from `../node_modules/react-native-simple-toast`) - - react-native-webview (from `../node_modules/react-native-webview`) - - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - React-rncore (from `../node_modules/react-native/ReactCommon`) - - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - RNCalendarEvents (from `../node_modules/react-native-calendar-events`) - - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - - "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)" - - RNDeviceInfo (from `../node_modules/react-native-device-info`) - - RNDevMenu (from `../node_modules/react-native-dev-menu`) - - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - - RNLocalize (from `../node_modules/react-native-localize`) - - RNScreens (from `../node_modules/react-native-screens`) - - RNSVG (from `../node_modules/react-native-svg`) - - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - FlipperKit - - fmt - - libevent - - OpenSSL-Universal - - SocketRocket - - Toast - - YogaKit - -EXTERNAL SOURCES: - boost: - :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - FBLazyVector: - :path: "../node_modules/react-native/Libraries/FBLazyVector" - FBReactNativeSpec: - :path: "../node_modules/react-native/React/FBReactNativeSpec" - glog: - :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0 - RCT-Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - RCTRequired: - :path: "../node_modules/react-native/Libraries/RCTRequired" - RCTTypeSafety: - :path: "../node_modules/react-native/Libraries/TypeSafety" - React: - :path: "../node_modules/react-native/" - React-callinvoker: - :path: "../node_modules/react-native/ReactCommon/callinvoker" - React-Codegen: - :path: build/generated/ios - React-Core: - :path: "../node_modules/react-native/" - React-CoreModules: - :path: "../node_modules/react-native/React/CoreModules" - React-cxxreact: - :path: "../node_modules/react-native/ReactCommon/cxxreact" - React-debug: - :path: "../node_modules/react-native/ReactCommon/react/debug" - React-hermes: - :path: "../node_modules/react-native/ReactCommon/hermes" - React-jsi: - :path: "../node_modules/react-native/ReactCommon/jsi" - React-jsiexecutor: - :path: "../node_modules/react-native/ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector" - React-logger: - :path: "../node_modules/react-native/ReactCommon/logger" - react-native-cookies: - :path: "../node_modules/@react-native-cookies/cookies" - react-native-restart: - :path: "../node_modules/react-native-restart" - react-native-safe-area-context: - :path: "../node_modules/react-native-safe-area-context" - react-native-simple-toast: - :path: "../node_modules/react-native-simple-toast" - react-native-webview: - :path: "../node_modules/react-native-webview" - React-NativeModulesApple: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" - React-perflogger: - :path: "../node_modules/react-native/ReactCommon/reactperflogger" - React-RCTActionSheet: - :path: "../node_modules/react-native/Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../node_modules/react-native/Libraries/AppDelegate" - React-RCTBlob: - :path: "../node_modules/react-native/Libraries/Blob" - React-RCTImage: - :path: "../node_modules/react-native/Libraries/Image" - React-RCTLinking: - :path: "../node_modules/react-native/Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../node_modules/react-native/Libraries/Network" - React-RCTSettings: - :path: "../node_modules/react-native/Libraries/Settings" - React-RCTText: - :path: "../node_modules/react-native/Libraries/Text" - React-RCTVibration: - :path: "../node_modules/react-native/Libraries/Vibration" - React-rncore: - :path: "../node_modules/react-native/ReactCommon" - React-runtimeexecutor: - :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" - React-runtimescheduler: - :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" - React-utils: - :path: "../node_modules/react-native/ReactCommon/react/utils" - ReactCommon: - :path: "../node_modules/react-native/ReactCommon" - RNCalendarEvents: - :path: "../node_modules/react-native-calendar-events" - RNCAsyncStorage: - :path: "../node_modules/@react-native-async-storage/async-storage" - RNDateTimePicker: - :path: "../node_modules/@react-native-community/datetimepicker" - RNDeviceInfo: - :path: "../node_modules/react-native-device-info" - RNDevMenu: - :path: "../node_modules/react-native-dev-menu" - RNGestureHandler: - :path: "../node_modules/react-native-gesture-handler" - RNLocalize: - :path: "../node_modules/react-native-localize" - RNScreens: - :path: "../node_modules/react-native-screens" - RNSVG: - :path: "../node_modules/react-native-svg" - Yoga: - :path: "../node_modules/react-native/ReactCommon/yoga" - -SPEC CHECKSUMS: - boost: 57d2868c099736d80fcd648bf211b4431e51a558 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: 71803c074f6325f10b5ec891c443b6bbabef0ca7 - FBReactNativeSpec: 448e08a759d29a96e15725ae532445bf4343567c - Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6 - fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: f6cf92a471053245614d9d8097736f6337d5b86c - libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: df81ab637d35fac9e6eb94611cfd20f0feb05455 - RCTTypeSafety: 4636e4a36c7c2df332bda6d59b19b41c443d4287 - React: e0cc5197a804031a6c53fb38483c3485fcb9d6f3 - React-callinvoker: 1a635856fe0c3d8b13fccd4ed7e76283b99b0868 - React-Codegen: 78d61f981cccc68a771a598f71621cb7db14b04c - React-Core: 252f8e9ca5a4e91af9b9be58670846d662b1c49f - React-CoreModules: f8b9e91fac7bd5d18729ce961a4978c70b5031cc - React-cxxreact: 70284b32dcd367439d7dae84d9f72660544181b5 - React-debug: ee33d7ba43766d9b10b32561527b57ccfbcb6bd1 - React-hermes: 91f97ea2669dc5847e1f26c243aaad913319c570 - React-jsi: bd68b7779746014f01ea72d1b738809e132d7f1e - React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a - React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba - React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4 - react-native-cookies: f54fcded06bb0cda05c11d86788020b43528a26c - react-native-restart: 7595693413fe3ca15893702f2c8306c62a708162 - react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284 - react-native-simple-toast: 0c7d14bcad288b5b83ae4b0eea65651b4ca829b0 - react-native-webview: 669ae162965f629a8d6a4bdd3b99a304d36ef1f2 - React-NativeModulesApple: 797bc6078d566eef3fb3f74127e6e1d2e945a15f - React-perflogger: cd8886513f68e1c135a1e79d20575c6489641597 - React-RCTActionSheet: 726d2615ca62a77ce3e2c13d87f65379cdc73498 - React-RCTAnimation: 8f2716b881c37c64858e4ecee0f58bfa57ff9afd - React-RCTAppDelegate: d4a213f29e81682f6b9c7d22f62a2ccab6d125ae - React-RCTBlob: dfaa933231c3497915bbcc9d98fcff7b6b60582c - React-RCTImage: 747e3d7b656a67470f9c234baedb8d41bbc4e745 - React-RCTLinking: 148332b5b0396b280b05534f7d168e560a3bbd5f - React-RCTNetwork: 1d818121a8e678f064de663a6db7aaefc099e53c - React-RCTSettings: 4b95d26ebc88bfd3b6535b2d7904914ff88dbfc2 - React-RCTText: ce4499e4f2d8f85dc4b93ff0559313a016c4f3e2 - React-RCTVibration: 45372e61b35e96d16893540958d156675afbeb63 - React-rncore: a79d1cb3d6c01b358a8aa0b31ccc04ab5f0dbebc - React-runtimeexecutor: 7e31e2bc6d0ecc83d4ba05eadc98401007abc10c - React-runtimescheduler: cc32add98c45c5df18436a6a52a7e1f6edec102c - React-utils: 7a9918a1ffdd39aba67835d42386f592ea3f8e76 - ReactCommon: 91ece8350ebb3dd2be9cef662abd78b6948233c0 - RNCalendarEvents: 7e65eb4a94f53c1744d1e275f7fafcfaa619f7a3 - RNCAsyncStorage: c913ede1fa163a71cea118ed4670bbaaa4b511bb - RNDateTimePicker: ccd988deb223cbb2e669e157ec576c2c6217128c - RNDeviceInfo: bf8a32acbcb875f568217285d1793b0e8588c974 - RNDevMenu: 72807568fe4188bd4c40ce32675d82434b43c45d - RNGestureHandler: 38aa38413896620338948fbb5c90579a7b1c3fde - RNLocalize: dbea38dcb344bf80ff18a1757b1becf11f70cae4 - RNScreens: 85d3880b52d34db7b8eeebe2f1a0e807c05e69fa - RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396 - SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 - Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6 - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a - -PODFILE CHECKSUM: 65fac31507ce363c84c5ab1cb333c7f711468d6a - -COCOAPODS: 1.12.1 diff --git a/apps/skolplattformen-app-new/ios/app.xcodeproj/project.pbxproj b/apps/skolplattformen-app-new/ios/app.xcodeproj/project.pbxproj deleted file mode 100644 index fc536736..00000000 --- a/apps/skolplattformen-app-new/ios/app.xcodeproj/project.pbxproj +++ /dev/null @@ -1,721 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* appTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* appTests.m */; }; - 0C80B921A6F3F58F76C31292 /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-app.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 7699B88040F8A987B510C191 /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-app-appTests.a */; }; - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = app; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* appTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = appTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* appTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = appTests.m; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = app/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = app/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = app/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = app/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = app/main.m; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = app/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = ""; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7699B88040F8A987B510C191 /* libPods-app-appTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0C80B921A6F3F58F76C31292 /* libPods-app.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* appTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* appTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = appTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* app */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = app; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-app.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-app-appTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* app */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* appTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - BBD78D7AC51CEA395F1C20DB /* Pods */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* app.app */, - 00E356EE1AD99517003FC87E /* appTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - BBD78D7AC51CEA395F1C20DB /* Pods */ = { - isa = PBXGroup; - children = ( - 3B4392A12AC88292D35C810B /* Pods-app.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-app.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-app-appTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-app-appTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* appTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "appTests" */; - buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = appTests; - productName = appTests; - productReference = 00E356EE1AD99517003FC87E /* appTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* app */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app" */; - buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - FD10A7F022414F080027D42C /* Start Packager */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = app; - productName = app; - productReference = 13B07F961A680F5B00A75B9A /* app.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1210; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "app" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* app */, - 00E356ED1AD99517003FC87E /* appTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/.xcode.env", - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; - }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-app-appTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-app-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - FD10A7F022414F080027D42C /* Start Packager */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Start Packager"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* appTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* app */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-app-appTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = appTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/app.app/app"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-app-appTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = appTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/app.app/app"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-app.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = app/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = app; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-app.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = app/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = app; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - "-Wl -ld_classic ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION, - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - "-Wl -ld_classic ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "appTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "app" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/apps/skolplattformen-app-new/ios/app.xcworkspace/contents.xcworkspacedata b/apps/skolplattformen-app-new/ios/app.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b83e63c3..00000000 --- a/apps/skolplattformen-app-new/ios/app.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/apps/skolplattformen-app-new/ios/app/AppDelegate.h b/apps/skolplattformen-app-new/ios/app/AppDelegate.h deleted file mode 100644 index 5d280825..00000000 --- a/apps/skolplattformen-app-new/ios/app/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : RCTAppDelegate - -@end diff --git a/apps/skolplattformen-app-new/ios/app/Images.xcassets/AppIcon.appiconset/Contents.json b/apps/skolplattformen-app-new/ios/app/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 81213230..00000000 --- a/apps/skolplattformen-app-new/ios/app/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/apps/skolplattformen-app-new/ios/app/Images.xcassets/Contents.json b/apps/skolplattformen-app-new/ios/app/Images.xcassets/Contents.json deleted file mode 100644 index 2d92bd53..00000000 --- a/apps/skolplattformen-app-new/ios/app/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/apps/skolplattformen-app-new/ios/app/Info.plist b/apps/skolplattformen-app-new/ios/app/Info.plist deleted file mode 100644 index a3f8d6b7..00000000 --- a/apps/skolplattformen-app-new/ios/app/Info.plist +++ /dev/null @@ -1,55 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - app - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/apps/skolplattformen-app-new/ios/app/LaunchScreen.storyboard b/apps/skolplattformen-app-new/ios/app/LaunchScreen.storyboard deleted file mode 100644 index 61f6b47a..00000000 --- a/apps/skolplattformen-app-new/ios/app/LaunchScreen.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/skolplattformen-app-new/ios/app/main.m b/apps/skolplattformen-app-new/ios/app/main.m deleted file mode 100644 index d645c724..00000000 --- a/apps/skolplattformen-app-new/ios/app/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/apps/skolplattformen-app-new/ios/appTests/Info.plist b/apps/skolplattformen-app-new/ios/appTests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/apps/skolplattformen-app-new/ios/appTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/apps/skolplattformen-app-new/ios/appTests/appTests.m b/apps/skolplattformen-app-new/ios/appTests/appTests.m deleted file mode 100644 index bc0d3a08..00000000 --- a/apps/skolplattformen-app-new/ios/appTests/appTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface appTests : XCTestCase - -@end - -@implementation appTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/apps/skolplattformen-app-new/jest.config.js b/apps/skolplattformen-app-new/jest.config.js deleted file mode 100644 index c2d9d8fc..00000000 --- a/apps/skolplattformen-app-new/jest.config.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - preset: 'react-native', - moduleFileExtensions: ['ts', 'js', 'html', 'tsx', 'jsx'], - setupFilesAfterEnv: ['/test-setup.ts'], - transform: { - // '\\.(js|ts|tsx)$': require.resolve('react-native/jest/preprocessor.js'), - '^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve( - 'react-native/jest/assetFileTransformer.js' - ), - }, - transformIgnorePatterns: [ - // 'node_modules/(?!(@react-native|react-native|@ronradtke/react-native-markdown-display|react-native-webview|react-native-calendar-events|react-native-simple-toast|react-native-modal-datetime-picker|@react-native-community/datetimepicker)/)', - 'node_modules/(?!(@react-native|react-native|@ronradtke/react-native-markdown-display|react-native-webview|react-native-calendar-events|react-native-simple-toast|react-native-modal-datetime-picker|@react-native-community/datetimepicker|@ui-kitten)/)', - ], - testEnvironment: 'jsdom', -} diff --git a/apps/skolplattformen-app-new/libs/api-skolplattformen/@react-native-cookies/cookies.ts b/apps/skolplattformen-app-new/libs/api-skolplattformen/@react-native-cookies/cookies.ts deleted file mode 100644 index 7ce777bc..00000000 --- a/apps/skolplattformen-app-new/libs/api-skolplattformen/@react-native-cookies/cookies.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { CookieJar, Cookie as TCookie } from 'tough-cookie' - -export interface Cookie { - name: string - value: string - path?: string - domain?: string - version?: string - expires?: string - secure?: boolean - httpOnly?: boolean -} - -export interface Cookies { - [key: string]: Cookie -} - -export interface CookieManagerStatic { - set(url: string, cookie: Cookie, useWebKit?: boolean): Promise - setFromResponse(url: string, cookie: string): Promise - - get(url: string, useWebKit?: boolean): Promise - - clearAll(useWebKit?: boolean): Promise -} - -const convertTtoC = (cookie: string | TCookie): Cookie => { - if (typeof cookie === 'string') { - return convertTtoC(TCookie.parse(cookie) as TCookie) - } - return { - name: cookie.key, - value: cookie.value, - domain: cookie.domain || undefined, - expires: - cookie.expires === 'Infinity' ? undefined : cookie.expires.toUTCString(), - httpOnly: cookie.httpOnly || undefined, - path: cookie.path || undefined, - secure: cookie.secure, - } -} -const convertCtoT = (cookie: Cookie): TCookie => - new TCookie({ - key: cookie.name, - value: cookie.value, - domain: cookie.domain, - expires: cookie.expires ? new Date(cookie.expires) : undefined, - httpOnly: cookie.httpOnly || false, - path: cookie.path, - secure: cookie.secure || false, - }) -const convertCookies = (cookies: TCookie[]): Cookies => - cookies.reduce( - (map, cookie) => ({ - ...map, - [cookie.key]: convertTtoC(cookie), - }), - {} as Cookies - ) - -const jar = new CookieJar() -const CookieManager: CookieManagerStatic = { - clearAll: async () => { - await jar.removeAllCookies() - return true - }, - get: async (url) => { - const cookies = await jar.getCookies(url) - return convertCookies(cookies) - }, - set: async (url, cookie) => { - await jar.setCookie(convertCtoT(cookie), url) - return true - }, - setFromResponse: async (url, cookie) => { - await jar.setCookie(cookie, url) - return true - }, -} - -export default CookieManager diff --git a/apps/skolplattformen-app-new/metro.config.js b/apps/skolplattformen-app-new/metro.config.js deleted file mode 100644 index 7d886e3a..00000000 --- a/apps/skolplattformen-app-new/metro.config.js +++ /dev/null @@ -1,11 +0,0 @@ -const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config') - -/** - * Metro configuration - * https://facebook.github.io/metro/docs/configuration - * - * @type {import('metro-config').MetroConfig} - */ -const config = {} - -module.exports = mergeConfig(getDefaultConfig(__dirname), config) diff --git a/apps/skolplattformen-app-new/package.json b/apps/skolplattformen-app-new/package.json deleted file mode 100644 index 9201d985..00000000 --- a/apps/skolplattformen-app-new/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "oppna_skolplattformen_new", - "version": "0.0.1", - "private": true, - "scripts": { - "android": "react-native run-android", - "ios": "react-native run-ios --simulator \"iPhone 15\"", - "lint": "eslint .", - "start": "react-native start", - "test": "jest", - "extract-licenses": "react-native-oss-license --json > licenses-oss.json && node library-extractor.js && rm licenses-oss.json", - "postinstall": "yarn extract-licenses" - }, - "dependencies": { - "@eva-design/eva": "^2.2.0", - "@react-native-async-storage/async-storage": "^1.19.3", - "@react-native-community/datetimepicker": "^7.6.0", - "@react-native-cookies/cookies": "^6.2.1", - "@react-navigation/bottom-tabs": "^6.5.9", - "@react-navigation/native": "^6.1.8", - "@react-navigation/native-stack": "^6.9.14", - "@react-navigation/stack": "^6.3.18", - "@ronradtke/react-native-markdown-display": "^8.0.0", - "@types/i18n-js": "^3.8.5", - "@types/luxon": "^3.3.2", - "@ui-kitten/components": "^5.3.1", - "@ui-kitten/eva-icons": "^5.3.1", - "camelcase-keys": "^7.0.1", - "change-case": "^4.1.2", - "events": "^3.3.0", - "fast-fuzzy": "^1.12.0", - "formik": "^2.4.5", - "h2m": "^0.7.0", - "he": "^1.2.0", - "i18n-js": "^3.8.0", - "js-htmlencode": "^0.3.0", - "luxon": "^3.4.3", - "mockdate": "^3.0.5", - "moment": "^2.29.4", - "node-blob": "^0.0.2", - "node-html-parser": "^6.1.10", - "personnummer": "^3.2.1", - "react": "18.2.0", - "react-native": "0.72.5", - "react-native-animatable": "^1.3.3", - "react-native-calendar-events": "^2.2.0", - "react-native-dev-menu": "^4.1.1", - "react-native-device-info": "^10.11.0", - "react-native-gesture-handler": "^2.13.1", - "react-native-localize": "^3.0.2", - "react-native-modal-datetime-picker": "^17.1.0", - "react-native-oss-license": "^0.7.0", - "react-native-restart": "^0.0.27", - "react-native-safe-area-context": "^4.7.2", - "react-native-screens": "^3.25.0", - "react-native-simple-toast": "^3.0.1", - "react-native-svg": "^13.14.0", - "react-native-typography": "^1.4.1", - "react-native-webview": "^13.6.0", - "react-redux": "^8.1.2", - "redux": "^4.2.1", - "setimmediate": "^1.0.5", - "tough-cookie": "4.1.3", - "tslib": "^2.6.2", - "valtio": "^1.11.2", - "yup": "^1.3.1" - }, - "devDependencies": { - "@babel/core": "^7.23.2", - "@babel/preset-env": "^7.23.2", - "@babel/preset-typescript": "^7.23.2", - "@babel/runtime": "^7.20.0", - "@react-native/eslint-config": "^0.72.2", - "@react-native/metro-config": "^0.72.11", - "@testing-library/jest-dom": "^6.1.3", - "@testing-library/jest-native": "^5.4.3", - "@testing-library/react": "^14.0.0", - "@testing-library/react-native": "^12.3.0", - "@tsconfig/react-native": "^3.0.0", - "@types/he": "^1.2.1", - "@types/jest": "^29.5.5", - "@types/react": "^18.0.24", - "@types/react-test-renderer": "^18.0.0", - "babel-jest": "^29.7.0", - "babel-plugin-module-resolver": "^5.0.0", - "eslint": "^8.19.0", - "esm": "^3.2.25", - "jest": "^29.2.1", - "jest-environment-jsdom": "^29.7.0", - "metro-react-native-babel-preset": "0.76.8", - "prettier": "^2.4.1", - "react-test-renderer": "18.2.0", - "typescript": "4.8.4" - }, - "engines": { - "node": ">=16" - } -} diff --git a/apps/skolplattformen-app-new/services/__tests__/appStorage.tests.ts b/apps/skolplattformen-app-new/services/__tests__/appStorage.tests.ts deleted file mode 100644 index 230e017a..00000000 --- a/apps/skolplattformen-app-new/services/__tests__/appStorage.tests.ts +++ /dev/null @@ -1,159 +0,0 @@ -import AsyncStorage from '@react-native-async-storage/async-storage' -import { User } from '@skolplattformen/api' -import AppStorage from '../appStorage' - -beforeEach(() => { - jest.clearAllMocks() - AsyncStorage.clear() -}) - -const prefix = AppStorage.settingsStorageKeyPrefix -const temp = AppStorage.tempStorageKeyPrefix - -test('Sets setting with prefix in storage', async () => { - await AppStorage.setSetting('key', 'value') - - expect(AsyncStorage.setItem).toHaveBeenCalledWith( - prefix + 'key', - JSON.stringify('value') - ) -}) - -test('Can get setting from storage', async () => { - await AppStorage.setSetting('key', 'value') - const result = await AppStorage.getSetting('key') - - expect(result).toEqual('value') - expect(AsyncStorage.getItem).toHaveBeenCalledWith(prefix + 'key') -}) - -test('Clear only settings', async () => { - const user: User = { personalNumber: '201701012393' } - await AppStorage.setSetting('key', 'value') - await AppStorage.setSetting('key2', 'value2') - await AppStorage.setSetting('key3', 'value3') - - await AppStorage.setTemporaryItem('nonSetting', 'nonSettingValue') - await AppStorage.setPersonalData(user, 'personalData', 'personal id value') - - await AppStorage.clearAllSettings() - - const allKeys = await AsyncStorage.getAllKeys() - - expect(allKeys).toHaveLength(2) - expect(allKeys[0]).toEqual(temp + 'nonSetting') - expect(allKeys[1]).toEqual(user.personalNumber + '_' + 'personalData') -}) - -test('Clear temporary items', async () => { - const user: User = { personalNumber: '201701012393' } - await AppStorage.setSetting('settingKey1', 'settingValue1') - await AppStorage.setSetting('settingKey2', 'settingValue2') - await AppStorage.setSetting('settingKey3', 'settingValue3') - await AppStorage.setTemporaryItem('tempKey1', 'tempValue1') - await AppStorage.setTemporaryItem('tempKey2', 'tempValue2') - await AppStorage.setTemporaryItem('tempKey3', 'tempValue3') - await AppStorage.setPersonalData(user, 'personalData', 'personal id value') - - await AppStorage.clearTemporaryItems() - - const allKeys = await AsyncStorage.getAllKeys() - - expect(allKeys).toHaveLength(4) - expect(allKeys[0]).toEqual(prefix + 'settingKey1') - expect(allKeys[3]).toEqual(user.personalNumber + '_' + 'personalData') -}) - -test('Store temporary string in AsyncStorage', async () => { - await AppStorage.setTemporaryItem('tempkey', 'tempvalue') - - expect(AsyncStorage.setItem).toHaveBeenCalledWith( - temp + 'tempkey', - JSON.stringify('tempvalue') - ) -}) - -test('Get temporary string from AsyncStorage', async () => { - await AppStorage.getTemporaryItem('tempkey') - - expect(AsyncStorage.getItem).toHaveBeenCalledWith(temp + 'tempkey') -}) - -test('Store temporary object in AsyncStorage', async () => { - const obj = { a: 'foo', b: 5 } - await AppStorage.setTemporaryItem('tempkey', obj) - - expect(AsyncStorage.setItem).toHaveBeenCalledWith( - temp + 'tempkey', - JSON.stringify(obj) - ) -}) - -test('Get temporary object from AsyncStorage', async () => { - await AppStorage.getTemporaryItem('tempkey') - - expect(AsyncStorage.getItem).toHaveBeenCalledWith(temp + 'tempkey') -}) - -test('Set personal data with personal number prefix', async () => { - const obj = { a: 'gdpr', b: 'is fun' } - const user: User = { personalNumber: '201701012393' } - await AppStorage.setPersonalData(user, 'key', obj) - - expect(AsyncStorage.setItem).toHaveBeenCalledWith( - user.personalNumber + '_' + 'key', - JSON.stringify(obj) - ) -}) - -test('Set personal data does nothing if personal number missing', async () => { - const obj = { a: 'gdpr', b: 'is fun' } - const user: User = { personalNumber: '' } - await AppStorage.setPersonalData(user, 'key', obj) - - expect(AsyncStorage.setItem).not.toHaveBeenCalled() -}) - -test('Get personal data gets data if personal number matches', async () => { - const data = 'personal data' - const user: User = { personalNumber: '201701012393' } - - await AppStorage.setPersonalData(user, 'key', data) - const storedData = await AppStorage.getPersonalData(user, 'key') - - expect(storedData).toEqual(data) -}) - -test('Get no personal data gets data if personal number does not match', async () => { - const data = 'personal data' - const user: User = { personalNumber: '201701012393' } - const anotherAser: User = { personalNumber: '202112312380' } - - await AppStorage.setPersonalData(user, 'key', data) - const storedData = await AppStorage.getPersonalData(anotherAser, 'key') - - expect(user).not.toEqual(anotherAser) - expect(storedData).toEqual(null) -}) - -test('Clear only PersonalData', async () => { - await AppStorage.setSetting('settingKey1', 'settingValue1') - await AppStorage.setTemporaryItem('tempKey1', 'tempValue1') - - const data = 'personal data' - const user: User = { personalNumber: '201701012393' } - await AppStorage.setPersonalData(user, 'key', data) - - await AppStorage.clearPersonalData(user) - - const allKeys = await AsyncStorage.getAllKeys() - expect(allKeys).toHaveLength(2) - expect(allKeys).not.toContain(user.personalNumber + '_key') -}) - -test('Clear PersonalData does nothing if personalnumber is empty', async () => { - const user: User = { personalNumber: '' } - await AppStorage.clearPersonalData(user) - - expect(AsyncStorage.multiRemove).not.toHaveBeenCalled() -}) diff --git a/apps/skolplattformen-app-new/services/appStorage.ts b/apps/skolplattformen-app-new/services/appStorage.ts deleted file mode 100644 index 81e27dbc..00000000 --- a/apps/skolplattformen-app-new/services/appStorage.ts +++ /dev/null @@ -1,124 +0,0 @@ -import AsyncStorage from '@react-native-async-storage/async-storage' -import { User } from '@skolplattformen/api' - -export default class AppStorage { - static settingsStorageKeyPrefix = 'appsetting_' - static tempStorageKeyPrefix = 'tempItem_' - - /** - * Stores a setting - * @param key - * @param value - */ - static async setSetting(key: string, value: T) { - const jsonValue = JSON.stringify(value) - await AsyncStorage.setItem(this.settingsStorageKeyPrefix + key, jsonValue) - } - - /** - * Gets a stored setting - * @param key - * @returns - */ - static async getSetting(key: string): Promise { - const value = await AsyncStorage.getItem( - this.settingsStorageKeyPrefix + key - ) - return value ? (JSON.parse(value) as T) : null - } - - /** - * Stores a personal data item - * @param user - * @param key - * @param value - */ - static async setPersonalData(user: User, key: string, value: T) { - const jsonValue = JSON.stringify(value) - if (user.personalNumber) { - const storageKey = user.personalNumber + '_' + key - await AsyncStorage.setItem(storageKey, jsonValue) - } - } - - /** - * Get stored personal data - * @param user - * @param key - * @returns - */ - static async getPersonalData(user: User, key: string): Promise { - if (user.personalNumber) { - const value = await AsyncStorage.getItem(user.personalNumber + '_' + key) - return value ? (JSON.parse(value) as T) : null - } - return null - } - - /** - * Stores a temporary items. The items are cleared at logout. - * Think of this as a session storage - * @param key - * @param value - */ - static async setTemporaryItem(key: string, value: T) { - const jsonValue = JSON.stringify(value) - await AsyncStorage.setItem(this.tempStorageKeyPrefix + key, jsonValue) - } - - /** - * Gets a temporary stored item - * @param key - * @returns - */ - static async getTemporaryItem(key: string): Promise { - const value = await AsyncStorage.getItem(this.tempStorageKeyPrefix + key) - return value ? (JSON.parse(value) as T) : null - } - - /** - * Clears all settings - */ - static async clearAllSettings(): Promise { - const allKeys = await AsyncStorage.getAllKeys() - const settingsKeys = allKeys.filter((x) => - x.startsWith(this.settingsStorageKeyPrefix) - ) - await AsyncStorage.multiRemove(settingsKeys) - } - - /** - * Clear all temporary items - */ - static async clearTemporaryItems() { - const allKeys = await AsyncStorage.getAllKeys() - const notSettingsKeys = allKeys.filter((x) => - x.startsWith(this.tempStorageKeyPrefix) - ) - await AsyncStorage.multiRemove(notSettingsKeys) - } - - /** - * Clears all personal identififieble data (GDPR) - * @param user - * @returns - */ - static async clearPersonalData(user: User): Promise { - if (!user.personalNumber) { - return - } - - const allKeys = await AsyncStorage.getAllKeys() - const personalDataKeys = allKeys.filter((x) => - x.startsWith(user.personalNumber ?? '') - ) - await AsyncStorage.multiRemove(personalDataKeys) - } - - /** - * Clears all async storage for this app and all libs that it uses - */ - static async nukeAllStorage() { - await AsyncStorage.clear() - } -} diff --git a/apps/skolplattformen-app-new/services/languageService.ts b/apps/skolplattformen-app-new/services/languageService.ts deleted file mode 100644 index 643a223b..00000000 --- a/apps/skolplattformen-app-new/services/languageService.ts +++ /dev/null @@ -1,95 +0,0 @@ -import merge from 'deepmerge' -import i18n from 'i18n-js' -import moment from 'moment' -import 'moment/locale/ar' -import 'moment/locale/de' -import 'moment/locale/es' -import 'moment/locale/fi' -import 'moment/locale/fr' -import 'moment/locale/it' -import 'moment/locale/ja' -import 'moment/locale/nb' -import 'moment/locale/nl' -import 'moment/locale/pl' -import 'moment/locale/pt' -import 'moment/locale/ru' -import 'moment/locale/sv' -import 'moment/locale/th' -import 'moment/locale/uk' -import 'moment/locale/zh-cn' -import { I18nManager } from 'react-native' -import { languages } from '../utils/translation' - -// const i18n = new I18n(); - -const changeListeners: Record = {} - -let allString: Record = {} - -let Strings: Record = {} -let languageCode: string -let momentLocale: string - -const rtlList: { [key: string]: boolean } = { - en: false, - de: false, - pl: false, - sv: false, - so: false, - ar: true, -} - -export const isRTL = (langCode: string) => { - if (!Object.prototype.hasOwnProperty.call(rtlList, langCode)) { - return false - } - return rtlList[langCode] -} - -const getCorrespondingMomentLocale = (languageCode?: string): string => { - const lang = languages.find(({ langCode }) => langCode === languageCode) - return lang?.locale || 'sv' -} - -export const LanguageService = { - get: () => Strings, - getLanguageCode: () => languageCode, - getLocale: () => momentLocale, - setAllData: ({ data }: { data: Record }) => { - allString = data - }, - seti18nConfig: ({ langCode }: { langCode?: string }) => { - i18n.defaultLocale = 'sv' - if (langCode) { - i18n.translations = { [langCode]: Strings } - i18n.locale = langCode - I18nManager.forceRTL(isRTL(langCode)) - } - moment.locale(momentLocale) - }, - setLanguageCode: ({ langCode }: { langCode?: string }) => { - if (langCode && allString[langCode]) { - languageCode = langCode - momentLocale = getCorrespondingMomentLocale(langCode) - Strings = merge(allString.sv, allString[langCode]) - } else { - const dataKeys = Object.keys(allString) - languageCode = dataKeys[0] - Strings = allString[languageCode] - } - Object.keys(changeListeners).forEach((k) => { - changeListeners[k](langCode) - }) - return Strings - }, - onChange: ({ key }: { key: string }, cb: (langCode: string) => void) => { - const unsubscribe = () => { - delete changeListeners[key] - } - changeListeners[key] = (langCode: string) => cb(langCode) - - return unsubscribe - }, -} - -export const i18nService = i18n diff --git a/apps/skolplattformen-app-new/styles/colors.ts b/apps/skolplattformen-app-new/styles/colors.ts deleted file mode 100644 index fc549ce0..00000000 --- a/apps/skolplattformen-app-new/styles/colors.ts +++ /dev/null @@ -1,22 +0,0 @@ -type Neutral = - | 'white' - | 'black' - | 'gray200' - | 'gray500' - | 'gray600' - | 'gray700' - | 'gray800' -export const neutral: Record = { - white: '#ffffff', - gray200: '#E5E7EB', - gray500: '#6B7280', // 4.83 (AA) on white - gray600: '#4B5563', // 7.56 (AAA) on white - gray700: '#374151', // 10.31 (AAA) on white - gray800: '#1F2937', // 14.68 (AAA) on white - black: '#000000', // 21 (AAA) on white -} - -type Primary = 'primary600' -export const primary: Record = { - primary600: '#DB2575', -} diff --git a/apps/skolplattformen-app-new/styles/index.ts b/apps/skolplattformen-app-new/styles/index.ts deleted file mode 100644 index e0760fd9..00000000 --- a/apps/skolplattformen-app-new/styles/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as Colors from './colors' -import * as Layout from './layout' -import * as Sizing from './sizing' -import * as Typography from './typography' - -export { Colors, Layout, Sizing, Typography } diff --git a/apps/skolplattformen-app-new/styles/layout.ts b/apps/skolplattformen-app-new/styles/layout.ts deleted file mode 100644 index ccbb8f1d..00000000 --- a/apps/skolplattformen-app-new/styles/layout.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ViewStyle } from 'react-native' - -type MainAxis = 'center' | 'flexStart' | 'flexEnd' -// @ts-expect-error Fix later -export const mainAxis: Record = { - center: { - alignItems: 'center', - }, - flexStart: { - alignItems: 'flex-start', - }, -} - -type CrossAxis = 'center' | 'flexEnd' | 'evenly' | 'spaceBetween' -export const crossAxis: Record = { - center: { - justifyContent: 'center', - }, - evenly: { - justifyContent: 'space-evenly', - }, - flexEnd: { - justifyContent: 'flex-end', - }, - spaceBetween: { - justifyContent: 'space-between', - }, -} - -export const center: ViewStyle = { - ...mainAxis.center, - ...crossAxis.center, -} - -type Flex = 'full' | 'row' -export const flex: Record = { - full: { - flex: 1, - }, - row: { - flexDirection: 'row', - }, -} diff --git a/apps/skolplattformen-app-new/styles/sizing.ts b/apps/skolplattformen-app-new/styles/sizing.ts deleted file mode 100644 index 2210da31..00000000 --- a/apps/skolplattformen-app-new/styles/sizing.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Dimensions, ImageStyle } from 'react-native' - -const { height: screenHeight, width: screenWidth } = Dimensions.get('screen') -type Screen = 'width' | 'height' -export const screen: Record = { - width: screenWidth, - height: screenHeight, -} - -export enum Ratio { - '4:3', - '16:9', -} - -export const aspectRatio = ( - modifier = 1, - ratio: Ratio = Ratio['16:9'] -): ImageStyle => { - switch (ratio) { - case Ratio['16:9']: - return { - height: ((screen.width * modifier) / 16) * 9, - width: screen.width * modifier, - } - case Ratio['4:3']: - return { - height: ((screen.width * modifier) / 4) * 3, - width: screen.width * modifier, - } - } -} - -type Layout = 't1' | 't2' | 't3' | 't4' | 't5' | 't6' -export const layout: Record = { - t1: 4, - t2: 8, - t3: 12, - t4: 16, - t5: 20, - t6: 30, -} - -/** 4px */ -export const t1 = layout.t1 -/** 8px */ -export const t2 = layout.t2 -/** 12px */ -export const t3 = layout.t3 -/** 16px */ -export const t4 = layout.t4 -/** 20px */ -export const t5 = layout.t5 -/** 30px */ -export const t6 = layout.t6 diff --git a/apps/skolplattformen-app-new/styles/typography.ts b/apps/skolplattformen-app-new/styles/typography.ts deleted file mode 100644 index 04ec09a6..00000000 --- a/apps/skolplattformen-app-new/styles/typography.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { TextStyle } from 'react-native' -import { systemWeights } from 'react-native-typography' - -type FontSize = 'xxs' | 'xs' | 'sm' | 'base' | 'lg' | 'xl' -export const fontSize: Record = { - xxs: { - fontSize: 10, - }, - xs: { - fontSize: 12, - }, - sm: { - fontSize: 14, - }, - base: { - fontSize: 16, - }, - lg: { - fontSize: 18, - }, - xl: { - fontSize: 20, - }, -} - -type FontWeight = 'regular' | 'semibold' | 'bold' -export const fontWeight: Record = { - regular: { - ...systemWeights.regular, - }, - semibold: { - ...systemWeights.semibold, - }, - bold: { - ...systemWeights.bold, - }, -} - -export const header: TextStyle = { - ...fontSize.base, - ...fontWeight.bold, -} - -type Align = 'center' -export const align: Record = { - center: { - textAlign: 'center', - }, -} diff --git a/apps/skolplattformen-app-new/test-setup.ts b/apps/skolplattformen-app-new/test-setup.ts deleted file mode 100644 index d858ee72..00000000 --- a/apps/skolplattformen-app-new/test-setup.ts +++ /dev/null @@ -1,39 +0,0 @@ -import '@testing-library/jest-native/extend-expect' -import moment from 'moment' -import 'moment/locale/sv' -import 'react-native-gesture-handler/jestSetup' - -moment.locale('sv') - -// Mock hooks -jest.mock('./libs/hooks/src') - -// Silence useNativeDriver error -jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper') - -jest.mock('@react-navigation/native') -jest.mock('@react-navigation/core') -jest.mock('react-native-localize') -jest.mock('react-native/Libraries/Linking/Linking', () => ({ - openURL: jest.fn(() => Promise.resolve('mockResolve')), -})) -jest.mock('react-native', () => { - const RN = jest.requireActual('react-native') - - RN.UIManager.measureInWindow = (_node, callback) => { - callback(0, 0, 42, 42) - } - - return RN -}) - -jest.mock('react-native-simple-toast', () => ({ - SHORT: 'short', - BOTTOM: 'bottom', - showWithGravity: jest.fn(), -})) - -jest.mock('react-native-calendar-events', () => ({ - saveEvent: jest.fn().mockResolvedValue('52'), - requestPermissions: jest.fn().mockResolvedValue('authorized'), -})) diff --git a/apps/skolplattformen-app-new/translations/ar.json b/apps/skolplattformen-app-new/translations/ar.json deleted file mode 100644 index ab60e33c..00000000 --- a/apps/skolplattformen-app-new/translations/ar.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "المدرسة الاجبارية", - "leisureTimeCentre": "مركز أوقات الفراغ", - "preSchool": "مرحلة ما قبل المدرسة", - "upperSecondarySchool": "المدرسه الثانوية العليا" - }, - "abscense": { - "endTime": "وقت الإنتهاء", - "entireDay": "كل اليوم", - "invalidPersonalNumber": "الرقم الوطني غير صالح", - "personalNumberMissing": "الرقم الوطني مطلوب", - "selectAbscenseEndTime": "اختر وقت الانتهاء", - "selectAbscenseStartTime": "اختر وقت البداية", - "startTime": "وقت البداية", - "title": "الإبلاغ عن الغياب" - }, - "auth": { - "bankid": { - "OpenManually": "قم بتشغيل BankID يدوياً", - "OpenOnAnotherDevice": "افتح BankID على جهاز آخر", - "OpenOnThisDevice": "افتح BankID على هذا الجهاز", - "Waiting": "في انتظار BankID…" - }, - "chooseLoginMethod": "اختر طريقة تسجيل الدخول", - "loginAsTestUser": "سجل الدخول كمستخدم تجريبي", - "loginFailed": "تعذر تسجيل الدخول. يرجى المحاولة مرة أخرى.", - "placeholder_SocialSecurityNumber": "رقمك الوطني", - "subtitle": "البديل {{word}}", - "words": { - "agile": "رشيق", - "awaited": "في انتظار", - "better": "أفضل", - "cheap": "رخيص", - "cooler": "برودة", - "enlightened": "المستنير", - "fantastic": "جميل", - "fast": "سريع", - "first": "أول", - "free": "مجانا", - "fun": "مرح", - "homemade": "محلي الصنع", - "imperfect": "غير تام", - "open": "افتح", - "rebellious": "انفصام شخصيه", - "simple": "بسيط", - "working": "عمل" - } - }, - "calender": { - "approveAccessToCalender": "يجب عليك الموافقة على الوصول إلى التقويم الخاص بك", - "saveToCalender": "احفظ الى التقويم", - "saveToCalenderError": "هناك خطأ ما", - "saveToCalenderSuccess": "✔️ تم الحفظ في التقويم", - "showCalenderActions": "إظهار إجراءات التقويم" - }, - "children": { - "loadingErrorHeading": "عفواً!", - "loadingErrorInformationText": "تعذر تحميل هذه الصفحة. حاول من جديد أو تفقد الحالة على skolplattformen.org.", - "noKids_description": "لا يوجد أطفال مسجلين برقم الضمان الاجتماعي الخاص بك في استاد ستوكهولم", - "noKids_title": "لا اطفال", - "title": "الأطفال", - "tryAgain": "حاول من جديد", - "viewStatus": "View status on skolplattformen.org" - }, - "general": { - "changeLanguage": "تغيير اللغة", - "confirm": "تأكيد", - "loading": "جاري التحميل…", - "logout": "تسجيل خروج", - "send": "Send", - "settings": "الإعدادات", - "socialSecurityNumber": "الرقم الشخصي الوطني", - "title": "منصة المدرسة المفتوحة" - }, - "language": { - "changeLanguage": "تغيير اللغة", - "changeLanguageButton": "يحفظ" - }, - "menu": { - "emptyHeadline": "يبدو أن القائمة فارغة", - "emptyText": "لم يتم العثور على شيء لهذا الأسبوع" - }, - "navigation": { - "calender": "رزنامة", - "menu": "لائحة الطعام", - "news": "أخبار", - "notifications": "إشعارات" - }, - "news": { - "backToChild": "العودة إلى الطفل", - "noNewNewsItemsThisWeek": "لا توجد أخبار جديدة هذا الأسبوع.", - "notificationTitle": "أخبار: {{header}} ({{published}})", - "published": "منشور", - "title": "أخبار من منصة المدرسة", - "updated": "محدث" - }, - "notifications": { - "notificationTitle": "إشعار: {{message}} ({{dateCreated}})" - } -} diff --git a/apps/skolplattformen-app-new/translations/de.json b/apps/skolplattformen-app-new/translations/de.json deleted file mode 100644 index 9c0514ab..00000000 --- a/apps/skolplattformen-app-new/translations/de.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "Grundschule", - "leisureTimeCentre": "Hort", - "preSchool": "Vorschule", - "upperSecondarySchool": "Gymnasium" - }, - "abscense": { - "endTime": "Endzeit", - "entireDay": "Ganzen Tag", - "invalidPersonalNumber": "Personenkennziffer ungültig", - "personalNumberMissing": "Personenkennziffer fehlt", - "selectAbscenseEndTime": "Endzeit wählen", - "selectAbscenseStartTime": "Startzeit wählen", - "startTime": "Startzeit", - "title": "Abwesenheit anmelden", - "childsPersonalNumber": "Personenkennziffer des Kindes" - }, - "auth": { - "bankid": { - "OpenManually": "BankID manuell öffnen", - "OpenOnAnotherDevice": "BankID auf einem anderen Gerät öffnen", - "OpenOnThisDevice": "BankID auf diesem Gerät öffnen", - "Waiting": "Wartet auf BankID…" - }, - "chooseLoginMethod": "Anmeldemethode auswählen", - "loginAsTestUser": "Als Testbenutzer einloggen", - "loginFailed": "Die Anmeldung ist fehlgeschlagen. Bitte versuche es nochmal.", - "placeholder_SocialSecurityNumber": "Deine Personenkennziffer", - "subtitle": "Die {{word}} Alternative", - "words": { - "agile": "agile", - "awaited": "erwartete", - "better": "bessere", - "cheap": "billige", - "cooler": "coolere", - "enlightened": "erleuchtete", - "fantastic": "fantastische", - "fast": "schnelle", - "first": "erste", - "free": "freie", - "fun": "lustige", - "homemade": "selbstgemachte", - "imperfect": "unvollkommene", - "open": "offene", - "rebellious": "rebellische", - "simple": "einfache", - "working": "funktionierende" - }, - "a11y_select_login_method": "Wähle die Anmeldemethode", - "a11y_clear_social_security_input_field": "Personenkennziffer-Feld löschen", - "a11y_image_two_boys": "Bild von zwei Personen, die ihre Mobiltelefon überprüfen", - "a11y_change_language": "Wähle deine Sprache", - "chooseSchoolPlatform": "Plattform wählen", - "freja": { - "Waiting": "Wartet auf Freja eID+…", - "OpenManually": "Freja eID+ manuell öffnen", - "OpenOnThisDevice": "Freja eID+ auf diesem Gerät öffnen" - }, - "loginSuccessful": "Eingeloggt, wird geladen…" - }, - "calender": { - "approveAccessToCalender": "Du musst Zugriff auf deinen Kalender erlauben", - "saveToCalender": "Im Kalender speichern", - "saveToCalenderError": "Ein Fehler ist aufgetreten", - "saveToCalenderSuccess": "✔️ Im Kalender gespeichert", - "showCalenderActions": "Kalender-Actions zeigen", - "emptyHeadline": "Der Kalender sieht leer aus", - "emptyText": "Nichts wurde gefunden" - }, - "children": { - "loadingErrorHeading": "Hoppla!", - "loadingErrorInformationText": "Diese Seite kann nicht geladen werden. Versuche es nochmal oder kontrolliere den aktuellen Status auf skolplattformen.org.", - "noKids_description": "Für diese Personenkennziffer gibt es keine in Stockholm registrierten Kinder", - "noKids_title": "Keine Kinder", - "title": "Deine Kinder", - "tryAgain": "Nochmal versuchen", - "viewStatus": "Status kontrollieren auf skolplattformen.org" - }, - "general": { - "changeLanguage": "Sprache ändern", - "confirm": "Bestätigen", - "loading": "Wird geladen…", - "logout": "Ausloggen", - "send": "Senden", - "settings": "Einstellungen", - "socialSecurityNumber": "Personenkennziffer", - "title": "Öppna skolplattformen", - "cancel": "Abbrechen", - "logoutAndClearPersonalData": "Ausloggen und persönliche Daten löschen", - "logoutAndClearAllDataInclSettings": "Ausloggen und alle Daten inkl. Einstellungen löschen", - "tomorrow": "Morgen" - }, - "language": { - "changeLanguage": "Sprache ändern", - "changeLanguageButton": "Speichern" - }, - "menu": { - "emptyHeadline": "Die Speisekarte sieht ein bisschen leer aus", - "emptyText": "Nichts zu zeigen für diese Woche" - }, - "navigation": { - "calender": "Kalender", - "menu": "Speisekarte", - "news": "Nachrichten", - "notifications": "Mitteilungen", - "classmates": "Mitschüler" - }, - "news": { - "backToChild": "Zurück zum Kind", - "noNewNewsItemsThisWeek": "Keine neuen Nachrichten diese Woche.", - "notificationTitle": "Nachricht: {{header}} ({{published}})", - "published": "Veröffentlicht", - "title": "Nachricht von Skolplattformen", - "updated": "Aktualisiert", - "search": { - "placeholder": "Alle Nachrichten durchsuchen …" - } - }, - "notifications": { - "notificationTitle": "Mitteilung: {{message}} ({{dateCreated}})" - }, - "schedule": { - "gymBag": "Turnbeutel", - "lunch": "Mittagessen", - "end": "Ende", - "start": "Anfang", - "week": "Woche" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Zeigt Kontaktinformation an", - "home": "Adresse", - "email": "E-Mail", - "sms": "SMS", - "call": "Anrufen", - "a11y_show_contact_info_button_label": "Kontaktinformationen anzeigen" - }, - "classmates": { - "contactsForGuardiansFor": "Kontaktinformationen der Erziehungsberechtigten für", - "child": "Kind", - "class": "Klasse" - }, - "settings": { - "appearance": "Modus", - "licenses": "Lizenzen", - "language": "Sprache", - "themeAuto": "Automatisch", - "useSystemTheme": "Systemmodus benutzen", - "settings": "Einstellungen", - "theme": "Modus" - }, - "themes": { - "light": "Hell", - "dark": "Dunkel" - } -} diff --git a/apps/skolplattformen-app-new/translations/en.json b/apps/skolplattformen-app-new/translations/en.json deleted file mode 100644 index b51da78e..00000000 --- a/apps/skolplattformen-app-new/translations/en.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "Primary/lower-secondary school", - "leisureTimeCentre": "After-school care", - "preSchool": "Preschool", - "upperSecondarySchool": "Upper-secondary school" - }, - "abscense": { - "endTime": "End time", - "entireDay": "Whole day", - "childsPersonalNumber": "Child's personal identity number", - "invalidPersonalNumber": "Personal identity number invalid", - "personalNumberMissing": "Personal identity number missing", - "selectAbscenseEndTime": "Choose end time", - "selectAbscenseStartTime": "Choose start time", - "startTime": "Start time", - "title": "Report absence" - }, - "auth": { - "bankid": { - "OpenManually": "Open BankID manually", - "OpenOnAnotherDevice": "Open BankID on another device", - "OpenOnThisDevice": "Open BankID on this device", - "Waiting": "Waiting for BankID…" - }, - "freja": { - "OpenManually": "Open Freja eID+ manually", - "OpenOnThisDevice": "Open Freja eID+ on this device", - "Waiting": "Waiting for Freja eID+…" - }, - "chooseLoginMethod": "Choose login method", - "chooseSchoolPlatform": "Choose platform", - "loginAsTestUser": "Log in as a test user", - "loginFailed": "Could not log in. Please try again.", - "loginSuccessful": "Login successful, loading…", - "placeholder_SocialSecurityNumber": "Your personal identity number", - "subtitle": "The {{word}} alternative", - "words": { - "agile": "agile", - "awaited": "awaited", - "better": "better", - "cheap": "cheap", - "cooler": "cooler", - "enlightened": "enlightened", - "fantastic": "fantastic", - "fast": "fast", - "first": "first", - "free": "free", - "fun": "fun", - "homemade": "homemade", - "imperfect": "imperfect", - "open": "open", - "rebellious": "rebellious", - "simple": "simple", - "working": "working" - }, - "a11y_change_language": "Select your language", - "a11y_image_two_boys": "Picture of two people checking their mobile phones", - "a11y_clear_social_security_input_field": "Clear the personal identity number field", - "a11y_select_login_method": "Select the login method" - }, - "calender": { - "approveAccessToCalender": "You have to approve access to your calendar", - "saveToCalender": "Save in calendar", - "saveToCalenderError": "Something went wrong", - "saveToCalenderSuccess": "✔️ Saved in calendar", - "showCalenderActions": "Show calendar actions", - "emptyHeadline": "The calendar looks kinda empty", - "emptyText": "Couldn't find anything to show" - }, - "children": { - "loadingErrorHeading": "Oops!", - "loadingErrorInformationText": "This page cannot be loaded. Try again or view current status on skolplattformen.org.", - "noKids_description": "There are no children registered in the City of Stockholm for your personal identity number", - "noKids_title": "No children", - "title": "Your children", - "tryAgain": "Try again", - "viewStatus": "View status on skolplattformen.org" - }, - "general": { - "cancel": "Cancel", - "changeLanguage": "Change language", - "confirm": "Confirm", - "loading": "Loading…", - "logout": "Log out", - "logoutAndClearPersonalData": "Log out and clear personal data", - "logoutAndClearAllDataInclSettings": "Log out and clear all data including settings", - "send": "Send", - "settings": "Settings", - "socialSecurityNumber": "Personal identity number", - "title": "Öppna skolplattformen", - "tomorrow": "Tomorrow" - }, - "language": { - "changeLanguage": "Change language", - "changeLanguageButton": "Save" - }, - "menu": { - "emptyHeadline": "The lunch menu looks kinda empty", - "emptyText": "Couldn't find anything for this week" - }, - "navigation": { - "calender": "Calendar", - "menu": "Lunch", - "news": "News", - "notifications": "Notifications", - "classmates": "Classmates" - }, - "settings": { - "settings": "Settings", - "appearance": "Appearance", - "theme": "Theme", - "licenses": "Licenses", - "language": "Language", - "themeAuto": "Auto", - "useSystemTheme": "Use System Light/Dark Theme" - }, - "themes": { - "light": "Light", - "dark": "Dark" - }, - "news": { - "backToChild": "Back to child", - "noNewNewsItemsThisWeek": "No news this week.", - "notificationTitle": "News: {{header}} ({{published}})", - "published": "Published", - "title": "News from Skolplattformen", - "updated": "Updated", - "search": { - "placeholder": "Search in news…" - } - }, - "notifications": { - "notificationTitle": "Notification: {{message}} ({{dateCreated}})" - }, - "schedule": { - "start": "Start", - "end": "End", - "lunch": "Lunch", - "gymBag": "Gym bag", - "week": "Week" - }, - "classmates": { - "class": "Class", - "child": "Child", - "contactsForGuardiansFor": "Contact information for guardians for" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Shows contact information", - "a11y_show_contact_info_button_label": "Show contact information", - "call": "Call", - "sms": "SMS", - "email": "E-mail", - "home": "Address" - } -} diff --git a/apps/skolplattformen-app-new/translations/es.json b/apps/skolplattformen-app-new/translations/es.json deleted file mode 100644 index 4032a1d6..00000000 --- a/apps/skolplattformen-app-new/translations/es.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "news": { - "notificationTitle": "Noticia: {{header}} ({{published}})", - "noNewNewsItemsThisWeek": "No hay noticias nuevas esta semana.", - "backToChild": "Volver al niño", - "title": "Noticias de Skolplattformen", - "published": "Publicada" - }, - "navigation": { - "notifications": "Notificaciones", - "news": "Noticias", - "calender": "Calendario", - "menu": "Menú" - }, - "language": { - "changeLanguage": "Cambiar idioma", - "changeLanguageButton": "Guardar" - }, - "general": { - "send": "Enviar", - "logout": "Cerrar sesión", - "changeLanguage": "Cambiar idioma", - "socialSecurityNumber": "Personnummer", - "settings": "Configuración", - "loading": "Cargando…", - "confirm": "Confirmar", - "title": "Öppna skolplattformen", - "cancel": "Anular" - }, - "children": { - "viewStatus": "Ver estado en skolplattformen.org", - "tryAgain": "Intentar otra vez", - "title": "Tus hijos", - "noKids_title": "Sin niños" - }, - "calender": { - "showCalenderActions": "Mostrar acciones de calendario", - "saveToCalenderSuccess": "✔️ Guardado en el calendario", - "saveToCalenderError": "Algo salió mal", - "saveToCalender": "Guardar en calendario", - "approveAccessToCalender": "Tienes que aprobar el acceso a tu calendario" - }, - "auth": { - "words": { - "simple": "fácil", - "rebellious": "rebelde", - "free": "libre", - "cooler": "más guay", - "working": "funcional", - "imperfect": "imperfecto", - "first": "el primero", - "enlightened": "ilustrada", - "awaited": "esperado", - "agile": "ágil", - "fantastic": "fantástica", - "cheap": "barato", - "better": "mejor", - "homemade": "artesanal", - "open": "abierto", - "fast": "rápida", - "fun": "divertido" - }, - "subtitle": "La alternativa {{word}}", - "placeholder_SocialSecurityNumber": "Tu personnummer", - "loginFailed": "No se pudo iniciar sesión. Vuelva a intentarlo.", - "chooseLoginMethod": "Elija el método de inicio de sesión", - "bankid": { - "Waiting": "Esperando BankID…", - "OpenOnThisDevice": "Abra BankID en este dispositivo", - "OpenOnAnotherDevice": "Abra BankID en otro dispositivo", - "OpenManually": "Abrir BankID manualmente" - }, - "loginAsTestUser": "Inicie sesión como usuario de pruebas", - "a11y_change_language": "Elija su idioma", - "a11y_image_two_boys": "Fotografia de dos personas mirando su telefono movil" - }, - "abscense": { - "title": "Informar ausencia", - "startTime": "hora de inicio", - "selectAbscenseStartTime": "Elige la hora de inicio", - "personalNumberMissing": "Falta el personnummer", - "invalidPersonalNumber": "El personnumer no es válido", - "entireDay": "Día completo", - "endTime": "hora de finalización", - "selectAbscenseEndTime": "Elige la hora de finalización" - }, - "abbrevations": { - "upperSecondarySchool": "Escuela Secundaria Obligatoria", - "preSchool": "Guardería (förskola)", - "leisureTimeCentre": "Extraexcolar (fritids)", - "compulsorySchool": "Escuela obligatoria" - }, - "notifications": { - "notificationTitle": "Notificación: {{message}} ({{dateCreated}})" - } -} diff --git a/apps/skolplattformen-app-new/translations/fi.json b/apps/skolplattformen-app-new/translations/fi.json deleted file mode 100644 index b372ec56..00000000 --- a/apps/skolplattformen-app-new/translations/fi.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "auth": { - "placeholder_SocialSecurityNumber": "Henkilötunnuksesi", - "bankid": { - "Waiting": "Odotetaan BankID:iä…", - "OpenOnThisDevice": "Avaa BankID tällä laitteella", - "OpenOnAnotherDevice": "Avaa BankID toisessa laitteessa", - "OpenManually": "Avaa BankID manuaalisesti" - }, - "words": { - "working": "toimiva", - "simple": "yksinkertainen", - "rebellious": "kapinallinen", - "open": "avoin", - "imperfect": "epätäydellinen", - "homemade": "kotitekoinen", - "fun": "hauskaa", - "free": "ilmainen", - "first": "ensimmäinen", - "fast": "nopea", - "fantastic": "fantastinen", - "enlightened": "valaistunut", - "cooler": "viileämpi", - "cheap": "halpa", - "better": "parempi", - "awaited": "odotettu", - "agile": "ketterä" - }, - "subtitle": "{{word}} vaihtoehto", - "loginFailed": "Sisäänkirjautuminen epäonnistui. Yritä uudelleen.", - "loginAsTestUser": "Kirjaudu sisään testikäyttäjänä", - "chooseLoginMethod": "Valitse kirjautumistapa" - }, - "notifications": { - "notificationTitle": "Ilmoitus: {{message}} ({{dateCreated}})" - }, - "news": { - "updated": "Päivitetty", - "title": "Uutisia Skolplattformenilta", - "published": "Julkaistu", - "notificationTitle": "Uutiset: {{header}} ({{published}})", - "noNewNewsItemsThisWeek": "Tällä viikolla ei ole uusia uutisia.", - "backToChild": "Takaisin lapselle" - }, - "navigation": { - "notifications": "Ilmoitukset", - "news": "Uutiset", - "menu": "Valikko", - "calender": "Kalenteri" - }, - "menu": { - "emptyText": "Ei löytynyt mitään tälle viikolle", - "emptyHeadline": "Valikko näyttää melko tyhjältä" - }, - "language": { - "changeLanguageButton": "Tallenna", - "changeLanguage": "Vaihda kieltä" - }, - "general": { - "title": "Öppna skolplattformen", - "socialSecurityNumber": "Henkilötunnus", - "settings": "Asetukset", - "send": "Lähetä", - "logout": "Kirjaudu ulos", - "loading": "Ladataan…", - "confirm": "Hyväksy", - "changeLanguage": "Vaihda kieltä", - "cancel": "Keskeytä" - }, - "children": { - "viewStatus": "Näytä tila osoitteessa skolplattformen.org", - "tryAgain": "Yritä uudelleen", - "title": "Lapsesi", - "noKids_title": "Ei lapsia", - "noKids_description": "Tukholman kaupungilla ei ole rekisteröityjä lapsia henkilötunnuksellesi", - "loadingErrorInformationText": "Tätä sivua ei voi ladata. Yritä uudelleen tai katso nykyinen tila osoitteessa skolplattformen.org.", - "loadingErrorHeading": "Hups!" - }, - "calender": { - "showCalenderActions": "Näytä kalenteritoiminnot", - "saveToCalenderSuccess": "✔️ Tallennettu kalenteriin", - "saveToCalenderError": "Jokin meni pieleen", - "saveToCalender": "Tallenna kalenteriin", - "approveAccessToCalender": "Sinun on hyväksyttävä kalenterisi käyttöoikeus" - }, - "abscense": { - "title": "Ilmoita poissaolosta", - "startTime": "Aloitusaika", - "selectAbscenseStartTime": "Valitse aloitusaika", - "selectAbscenseEndTime": "Valitse päättymisaika", - "personalNumberMissing": "Henkilötunnus puuttuu", - "invalidPersonalNumber": "Henkilötunnus on virheellinen", - "entireDay": "Kokopäivä", - "endTime": "Lopetusaika" - }, - "abbrevations": { - "upperSecondarySchool": "Lukio", - "preSchool": "Esikoulu", - "leisureTimeCentre": "Vapaa-ajankoti", - "compulsorySchool": "Peruskoulu" - } -} diff --git a/apps/skolplattformen-app-new/translations/fr.json b/apps/skolplattformen-app-new/translations/fr.json deleted file mode 100644 index f4e6a3b1..00000000 --- a/apps/skolplattformen-app-new/translations/fr.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "general": { - "loading": "Chargement…", - "title": "Öppna skolplattformen", - "socialSecurityNumber": "Numéro d'identité personnel", - "settings": "Paramètres", - "send": "Envoyer", - "logout": "Se déconnecter", - "confirm": "Confirmer", - "changeLanguage": "Changer de langue", - "cancel": "Annuler", - "logoutAndClearPersonalData": "Se déconnecter et effacer les données personnelles", - "logoutAndClearAllDataInclSettings": "Se déconnecter et effacer toutes les données, y compris les paramètres", - "tomorrow": "Demain" - }, - "calender": { - "saveToCalenderError": "Un problème est survenu", - "saveToCalender": "Enregistrer dans le calendrier", - "approveAccessToCalender": "Vous devez approuver l'accès à votre calendrier", - "showCalenderActions": "Afficher les actions du calendrier", - "saveToCalenderSuccess": "✔️ Enregistré dans le calendrier" - }, - "auth": { - "words": { - "working": "fonctionnement", - "first": "premier", - "better": "mieux", - "simple": "simple", - "rebellious": "rebelle", - "open": "ouverte", - "imperfect": "imparfaite", - "homemade": "maison", - "fun": "amusante", - "free": "gratuite", - "fast": "rapide", - "fantastic": "fantastique", - "enlightened": "éclairée", - "cooler": "plus cool", - "cheap": "bon marché", - "awaited": "attendue", - "agile": "agile" - }, - "placeholder_SocialSecurityNumber": "Votre numéro d'identité personnel", - "subtitle": "L'alternative {{word}}", - "bankid": { - "OpenManually": "Ouvrir BankID manuellement", - "OpenOnAnotherDevice": "Ouvrez BankID sur un autre appareil", - "Waiting": "En attente de BankID…", - "OpenOnThisDevice": "Ouvrez BankID sur cet appareil" - }, - "loginFailed": "La connexion a échoué, veuillez réessayer.", - "loginAsTestUser": "Connectez-vous en tant qu'utilisateur test", - "chooseLoginMethod": "Choisissez la méthode de connexion", - "a11y_select_login_method": "Sélectionnez la méthode de connexion", - "a11y_clear_social_security_input_field": "Effacer le champ du numéro national d’identité", - "a11y_image_two_boys": "Photo de deux personnes consultant leur téléphone portable", - "a11y_change_language": "Sélectionnez votre langue", - "chooseSchoolPlatform": "Choisir la plateforme" - }, - "abscense": { - "startTime": "Heure de début", - "selectAbscenseStartTime": "Choisissez l'heure de début", - "personalNumberMissing": "Numéro personnel manquant", - "invalidPersonalNumber": "Numéro personnel invalide", - "endTime": "Heure de fin", - "selectAbscenseEndTime": "Choisissez l'heure de la fin", - "entireDay": "Toute la journée", - "title": "Signaler une absence", - "childsPersonalNumber": "Numéro national d’identité de l'enfant" - }, - "notifications": { - "notificationTitle": "Notification : {{message}} ({{dateCreated}})" - }, - "news": { - "updated": "Mise à jour", - "title": "Nouvelles de Skolplattformen", - "published": "Publié", - "notificationTitle": "Nouvelles : {{header}} ({{published}})", - "noNewNewsItemsThisWeek": "Pas de nouvelles actualités cette semaine.", - "backToChild": "Retour à l'enfant", - "search": { - "placeholder": "Rechercher toutes les nouvelles…" - } - }, - "navigation": { - "notifications": "Notifications", - "news": "Nouvelles", - "menu": "Menu", - "calender": "Calendrier", - "classmates": "Camarades de classe" - }, - "menu": { - "emptyText": "Je n'ai rien trouvé pour cette semaine", - "emptyHeadline": "Le menu a l'air un peu vide" - }, - "language": { - "changeLanguageButton": "Sauvegarder", - "changeLanguage": "Changer de langue" - }, - "children": { - "viewStatus": "Voir le statut sur skolplattformen.org", - "tryAgain": "Réessayer", - "title": "Vos enfants", - "noKids_title": "Pas d'enfants", - "noKids_description": "Il n'y a pas d'enfants enregistrés dans la ville de Stockholm pour votre numéro d'identité personnel", - "loadingErrorInformationText": "Cette page ne peut pas être chargée. Réessayez ou consultez l'état actuel sur skolplattformen.org.", - "loadingErrorHeading": "Oups !" - }, - "abbrevations": { - "upperSecondarySchool": "École secondaire supérieure", - "preSchool": "Préscolaire", - "leisureTimeCentre": "Centre de loisirs", - "compulsorySchool": "École obligatoire" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Affiche les informations de contact", - "home": "Adresse", - "email": "Courriel", - "sms": "Texto", - "call": "Appeler", - "a11y_show_contact_info_button_label": "Afficher les informations de contact" - }, - "schedule": { - "gymBag": "Sac de sport", - "lunch": "Déjeuner", - "end": "Fin", - "start": "Début" - }, - "classmates": { - "contactsForGuardiansFor": "Coordonnées des tuteurs pour", - "child": "Enfant", - "class": "Classe" - }, - "settings": { - "settings": "Paramètres", - "useSystemTheme": "Utiliser le thème clair/sombre du système", - "language": "Langue", - "appearance": "Apparence", - "theme": "Thème", - "licenses": "Licences", - "themeAuto": "Automatique" - }, - "themes": { - "light": "Clair", - "dark": "Sombre" - } -} diff --git a/apps/skolplattformen-app-new/translations/it.json b/apps/skolplattformen-app-new/translations/it.json deleted file mode 100644 index e2252cfc..00000000 --- a/apps/skolplattformen-app-new/translations/it.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "notifications": { - "notificationTitle": "Notifica: {{message}} ({{dateCreated}})" - }, - "news": { - "notificationTitle": "Novità: {{header}} ({{published}})", - "noNewNewsItemsThisWeek": "Nessuna novità questa settimana.", - "title": "Novità da skolplattformen", - "backToChild": "Ritorna a figlio", - "search": { - "placeholder": "Cerca tutte le notizie…" - }, - "updated": "Aggiornato", - "published": "Pubblicato" - }, - "general": { - "title": "Öppna skolplattformen", - "socialSecurityNumber": "Personnummer svedese", - "settings": "Impostazioni", - "send": "Invia", - "logout": "Logout", - "loading": "Caricamento in corso…", - "confirm": "Conferma", - "changeLanguage": "Cambia lingua", - "cancel": "Interrompere", - "logoutAndClearPersonalData": "Esci ed elimina i dati personali", - "logoutAndClearAllDataInclSettings": "Esci ed elimina tutti i dati, comprese le impostazioni" - }, - "schedule": { - "end": "Finische", - "start": "Inizia", - "lunch": "Pranzo", - "gymBag": "I vestiti di ginnastica" - }, - "navigation": { - "notifications": "Notifiche", - "news": "Novità", - "menu": "Menù pranzo", - "calender": "Calendario", - "classmates": "Compagni di classe" - }, - "language": { - "changeLanguageButton": "Salva", - "changeLanguage": "Cambia lingua" - }, - "children": { - "loadingErrorHeading": "Ops!", - "title": "I tuoi figli", - "noKids_title": "Non ci sono figli", - "noKids_description": "No ci sono figli registrati a questo personnummer a Stoccolma", - "tryAgain": "Riprova", - "viewStatus": "Vedi stato su skolplattformen.org", - "loadingErrorInformationText": "Questa pagina non può essere caricata. Riprova o visualizza lo stato attuale su skolplattformen.org." - }, - "calender": { - "showCalenderActions": "Mostra calendario actions", - "saveToCalenderSuccess": "✔️ Salvato in calendario", - "saveToCalenderError": "Errore, non salvato", - "saveToCalender": "Salva in calendario", - "approveAccessToCalender": "Approva l'accesso al calendario" - }, - "auth": { - "words": { - "working": "funzionante", - "simple": "facile", - "rebellious": "ribelle", - "open": "accessibile", - "imperfect": "imperfetta", - "homemade": "fatta a mano", - "fun": "divertente", - "free": "libera", - "first": "prima", - "fast": "veloce", - "fantastic": "fantastica", - "enlightened": "illumminata", - "cooler": "più cool", - "cheap": "economica", - "better": "migliore", - "awaited": "attesa", - "agile": "agile" - }, - "subtitle": "L'alternativa {{word}}", - "placeholder_SocialSecurityNumber": "Il tuo personnummer svedese", - "loginFailed": "Accesso non riuscito, riprova.", - "loginAsTestUser": "Entra come utente test", - "chooseLoginMethod": "Scegli metodo di accesso", - "bankid": { - "Waiting": "Attendere BankID…", - "OpenOnThisDevice": "Apri BankID su questa unità", - "OpenOnAnotherDevice": "Apri BankID su un'altra unità", - "OpenManually": "Apri BankID manualmente" - }, - "a11y_select_login_method": "Seleziona il metodo di accesso", - "a11y_clear_social_security_input_field": "Cancella il campo del numero di previdenza sociale", - "a11y_image_two_boys": "Immagine di due persone che controllano i loro telefoni cellulari", - "a11y_change_language": "Seleziona la tua lingua" - }, - "abscense": { - "title": "Registra l'assenza", - "entireDay": "Giorno intero", - "endTime": "Fine", - "selectAbscenseEndTime": "Fine a", - "selectAbscenseStartTime": "Inizio da", - "startTime": "Inizio", - "personalNumberMissing": "Codice Fiscale mancante", - "invalidPersonalNumber": "Codice Fiscale non valido" - }, - "abbrevations": { - "upperSecondarySchool": "Scuola superiore", - "preSchool": "Scuola materna", - "leisureTimeCentre": "Tempo pieno", - "compulsorySchool": "Scuola inferiore e media" - }, - "menu": { - "emptyHeadline": "Il menù sembra piuttosto vuoto", - "emptyText": "Non ho trovato nulla per questa settimana" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Mostra le informazioni di contatto", - "call": "Chiama", - "sms": "SMS", - "email": "E-mail", - "home": "Indirizzo", - "a11y_show_contact_info_button_label": "Mostra le informazioni di contatto" - }, - "settings": { - "settings": "Impostazioni", - "theme": "Tema", - "themeAuto": "Automatico", - "licenses": "Licenze", - "language": "Lingua", - "appearance": "Aspetto", - "useSystemTheme": "Usa il tema chiaro/scuro del sistema" - }, - "themes": { - "light": "Chiaro", - "dark": "Scuro" - }, - "classmates": { - "class": "Classe", - "child": "Bambino", - "contactsForGuardiansFor": "Informazioni di contatto per i tutori per" - } -} diff --git a/apps/skolplattformen-app-new/translations/ja.json b/apps/skolplattformen-app-new/translations/ja.json deleted file mode 100644 index 295e8d39..00000000 --- a/apps/skolplattformen-app-new/translations/ja.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "navigation": { - "notifications": "通知", - "menu": "メニュー", - "calender": "カレンダー", - "classmates": "同級生", - "news": "ニュース" - }, - "abscense": { - "endTime": "終了時間", - "personalNumberMissing": "個人識別番号が入力されていない", - "invalidPersonalNumber": "個人識別番号が無効", - "entireDay": "一日中", - "title": "不在を報告する", - "selectAbscenseEndTime": "終了時間を選択します", - "selectAbscenseStartTime": "開始時間を選択します", - "startTime": "開始時間", - "childsPersonalNumber": "子供の個人識別番号" - }, - "abbrevations": { - "upperSecondarySchool": "ギムナジウム", - "preSchool": "就学前学級", - "leisureTimeCentre": "学童保育", - "compulsorySchool": "基礎学校" - }, - "general": { - "settings": "設定", - "tomorrow": "明日" - }, - "children": { - "tryAgain": "やり直してください", - "title": "あなたの子供", - "noKids_title": "子供のない", - "loadingErrorHeading": "おっと!", - "loadingErrorInformationText": "このページを読み込むことができません。もう一度してみるか、skolplattformen.orgで現在のステータスを調べてください。", - "noKids_description": "ストックホルム市にその個人識別番号で登録された子供はいません" - }, - "auth": { - "a11y_image_two_boys": "自分の携帯電話を見ている二人", - "a11y_change_language": "あなたの言語を選択して下さい", - "words": { - "simple": "簡単", - "homemade": "自家製", - "imperfect": "不完全", - "agile": "アジャイル", - "open": "オープン", - "fun": "楽しい", - "free": "自由な", - "first": "最初", - "fast": "速い", - "fantastic": "素晴らしい", - "cheap": "安い", - "better": "より良い", - "working": "いいな機能性", - "rebellious": "反抗的な", - "enlightened": "エンライテンド", - "cooler": "かっこいい", - "awaited": "待ち受ける" - }, - "subtitle": "{{word}}の選択肢", - "chooseLoginMethod": "ログイン方法を選んでください", - "loginAsTestUser": "テスト・ユーザーでログインしてください", - "bankid": { - "OpenManually": "手動でBankIDを開ける", - "OpenOnAnotherDevice": "別のデバイスでBankIDを使用する", - "Waiting": "BankIDを待っています…", - "OpenOnThisDevice": "このデバイスでBankIDを使用する" - }, - "loginFailed": "ログインできませんでした。再試行してください。", - "placeholder_SocialSecurityNumber": "あなたの個人番号", - "freja": { - "OpenOnThisDevice": "このデバイスで Freja eID+を使用する", - "OpenManually": "手動でFreja eID+を開ける", - "Waiting": "Freja eID+を待っています…" - }, - "a11y_clear_social_security_input_field": "個人識別番号のフィールドを空にする", - "chooseSchoolPlatform": "ログイン方法を選んでください", - "loginSuccessful": "ログインは完成した、よみこんでいる。。。", - "a11y_select_login_method": "ログインする方法を選ぶ" - }, - "language": { - "changeLanguage": "他の言語を選択" - }, - "contact": { - "home": "住所" - }, - "calender": { - "approveAccessToCalender": "カレンダーのアクセスを許可する必要があります", - "saveToCalenderError": "エラーが発生しました", - "saveToCalender": "カレンダーに保存する", - "saveToCalenderSuccess": "✔️ カレンダーへに保存しました", - "emptyHeadline": "カレンダーがなんか空っぽになりそう", - "emptyText": "表示するものが見つかりませんでした" - }, - "classmates": { - "child": "子供" - } -} diff --git a/apps/skolplattformen-app-new/translations/la.json b/apps/skolplattformen-app-new/translations/la.json deleted file mode 100644 index 290361ea..00000000 --- a/apps/skolplattformen-app-new/translations/la.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "auth": { - "placeholder_SocialSecurityNumber": "Numerus personalis tuus", - "loginFailed": "Nomen dare non possibilis erat. Denuo conare.", - "chooseLoginMethod": "Methodum nomen dare legere", - "bankid": { - "Waiting": "BankID exspectans…", - "OpenOnThisDevice": "In hac machina BankID aperire", - "OpenOnAnotherDevice": "In machina differenti BankID aperire", - "OpenManually": "Manualiter BankID aperire" - }, - "words": { - "awaited": "exspectata", - "agile": "agilis", - "better": "melior", - "cheap": "vilis", - "cooler": "amatior", - "working": "operans", - "simple": "simplex", - "rebellious": "rebellis", - "open": "aperta", - "imperfect": "imperfecta", - "fun": "oblectans", - "free": "libera", - "fast": "celeris", - "fantastic": "mirifica", - "enlightened": "illuminata", - "first": "prima", - "homemade": "domi facta" - }, - "subtitle": "Optio {{word}}", - "loginAsTestUser": "In parte investigatoris nomen dare", - "a11y_select_login_method": "Methodum nomen dare legere", - "a11y_change_language": "Linguam legere", - "a11y_image_two_boys": "Pictura duobus hominibus telephona sua specientibus", - "a11y_clear_social_security_input_field": "Cellam numeri personalis vacuare", - "chooseSchoolPlatform": "Rostra legere", - "loginSuccessful": "Nomen tuum datum est, carricans…", - "freja": { - "OpenManually": "Manualiter Freja eID+ aperire", - "Waiting": "Freja eID+ exspectans…", - "OpenOnThisDevice": "In hac machina Freja eID+ aperire" - } - }, - "abscense": { - "title": "Absentiam referre", - "selectAbscenseStartTime": "Horam exordii legere", - "selectAbscenseEndTime": "Horam terminalem legere", - "startTime": "Hora exordii", - "personalNumberMissing": "Numerus personalis absens est", - "invalidPersonalNumber": "Numerus personalis irritus est", - "entireDay": "Totus dies", - "endTime": "Hora terminalis", - "childsPersonalNumber": "Numerus personalis filii" - }, - "abbrevations": { - "upperSecondarySchool": "Lyceum superius", - "preSchool": "Praeschola", - "leisureTimeCentre": "Centrum otii", - "compulsorySchool": "Schola fundamentalis" - }, - "children": { - "loadingErrorHeading": "Eheu!", - "loadingErrorInformationText": "Haec pagina non carricari potest. Aut denuo conare, aut statum actualem in skolplattformen.org vide.", - "viewStatus": "Statum in skolplattformen.org videre", - "tryAgain": "Denuo conare", - "title": "Filii tui", - "noKids_title": "Nulli filii", - "noKids_description": "Nulli filii pro numero personali tuo in Urbe Holmiense censi sunt" - }, - "calender": { - "showCalenderActions": "Actiones calendarii exhibere", - "saveToCalenderSuccess": "✔️ In calendarium servatus", - "saveToCalender": "In calendarium servare", - "approveAccessToCalender": "Aditum in calendarium approbare debes", - "saveToCalenderError": "Aliquis deerat", - "emptyHeadline": "Calendarium vacuum videtur", - "emptyText": "Nihil invenitur ostendere" - }, - "menu": { - "emptyText": "Hac septimana nihil invenire poterat", - "emptyHeadline": "Charta vacua videtur" - }, - "news": { - "noNewNewsItemsThisWeek": "Hac septimana nulli novi nuncii.", - "updated": "Ad diurnum missus", - "title": "Nuntii ex Skolplattformen", - "published": "Divulgatus", - "notificationTitle": "Nuntii: {{header}} ({{published}})", - "backToChild": "Ad filium revertere", - "search": { - "placeholder": "Omnibus nuntiis quaerere…" - } - }, - "notifications": { - "notificationTitle": "Nuntius: {{message}} ({{dateCreated}})" - }, - "navigation": { - "notifications": "Eventa", - "news": "Nuntii", - "menu": "Charta", - "calender": "Calendarium", - "classmates": "Discipuli" - }, - "language": { - "changeLanguageButton": "Servare", - "changeLanguage": "Linguam permutare" - }, - "general": { - "title": "Öppna skolplattformen", - "socialSecurityNumber": "Numerus personalis", - "settings": "Configurationes", - "send": "Mittere", - "logout": "Secedere", - "loading": "Carricans…", - "confirm": "Confirmare", - "changeLanguage": "Linguam permutare", - "cancel": "Rescindere", - "tomorrow": "Cras", - "logoutAndClearPersonalData": "Secedere et informationes personales purgare", - "logoutAndClearAllDataInclSettings": "Secedere et omnes informationes configurationesque purgare" - }, - "schedule": { - "start": "Exordium", - "gymBag": "Saccus gymnasticus", - "lunch": "Prandium", - "end": "Finis", - "week": "Septimana" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Notationes contactus exhibet", - "home": "Domus", - "email": "Nuntiare electrice", - "sms": "SMS", - "call": "Vocare", - "a11y_show_contact_info_button_label": "Notationes contactus exhibere" - }, - "classmates": { - "contactsForGuardiansFor": "Notationes contactus custodum", - "child": "Filius", - "class": "Classis" - }, - "settings": { - "licenses": "Licentiae", - "appearance": "Species", - "language": "Lingua", - "themeAuto": "Automato", - "useSystemTheme": "Themate lucido/obscuro systemae uti", - "settings": "Configurationes", - "theme": "Thema" - }, - "themes": { - "light": "Lucidus", - "dark": "Obscurus" - } -} diff --git a/apps/skolplattformen-app-new/translations/nb_NO.json b/apps/skolplattformen-app-new/translations/nb_NO.json deleted file mode 100644 index 11755b51..00000000 --- a/apps/skolplattformen-app-new/translations/nb_NO.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "children": { - "noKids_description": "Det er ingen barn registrert i Stockholm by med det personnummeret", - "viewStatus": "Vis status på skolplattformen.org", - "tryAgain": "Prøv igjen", - "title": "Dine barn", - "noKids_title": "Ingen barn", - "loadingErrorInformationText": "Denne siden kan ikke lastes inn. Prøv igjen eller vis nåværende status på skolplattformen.org.", - "loadingErrorHeading": "Oida." - }, - "auth": { - "bankid": { - "Waiting": "Venter på BankID …", - "OpenOnThisDevice": "Åpne BankID på denne enheten", - "OpenOnAnotherDevice": "Åpne BankID på en annen enhet", - "OpenManually": "Åpne BankID manuelt" - }, - "loginAsTestUser": "Logg inn som tekstbruker", - "loginFailed": "Kunne ikke logge inn. Prøv igjen.", - "words": { - "free": "frie", - "working": "fungerende", - "simple": "enkle", - "rebellious": "rebelske", - "open": "åpne", - "imperfect": "uperfekte", - "homemade": "hjemmelagde", - "fun": "morsomme", - "first": "første", - "fast": "raske", - "fantastic": "fantastiske", - "enlightened": "opplyste", - "cooler": "kulere", - "cheap": "billige", - "better": "bedre", - "awaited": "etterlengtede", - "agile": "smidige" - }, - "subtitle": "Det {{word}} alternativet", - "placeholder_SocialSecurityNumber": "Ditt personnummer", - "chooseLoginMethod": "Velg innloggingsmetode", - "a11y_select_login_method": "Velg innloggingsmetode", - "a11y_clear_social_security_input_field": "Tøm personnummerfeltet", - "a11y_image_two_boys": "Bilde av to folk som sjekker mobiltelefonene sine", - "a11y_change_language": "Velg språk", - "chooseSchoolPlatform": "Velg plattform" - }, - "calender": { - "saveToCalender": "Lagre i kalender", - "saveToCalenderSuccess": "✔️ Lagret i kalender", - "showCalenderActions": "Vis kalenderhandlinger", - "saveToCalenderError": "Noe gikk galt", - "approveAccessToCalender": "Du må innvilge tilgang til kalenderen din", - "emptyHeadline": "Kalenderen ser tom ut", - "emptyText": "Ingenting å vise" - }, - "general": { - "loading": "Laster inn …", - "logout": "Logg ut", - "title": "Öppna skolplattformen", - "socialSecurityNumber": "Personnummer", - "confirm": "Bekreft", - "changeLanguage": "Endre språk", - "settings": "Innstillinger", - "send": "Send", - "cancel": "Avbryt", - "logoutAndClearPersonalData": "Logg ut og tøm personlig data", - "logoutAndClearAllDataInclSettings": "Logg ut og tøm all data, inkludert innstillinger", - "tomorrow": "I morgen" - }, - "news": { - "updated": "Oppdatert", - "notificationTitle": "Nyheter: {{header}} ){{published}})", - "backToChild": "Tilbake til barn", - "published": "Publisert", - "title": "Nyheter fra Skolplattformen", - "noNewNewsItemsThisWeek": "Ingen nye nyhetselementer denne uken.", - "search": { - "placeholder": "Søk i alle nyheter …" - } - }, - "abscense": { - "title": "Rapporter fravær", - "startTime": "Starttid", - "selectAbscenseStartTime": "Velg starttid", - "selectAbscenseEndTime": "Velg slutt-tid", - "personalNumberMissing": "Personnummer mangler", - "invalidPersonalNumber": "Ugyldig personnummer", - "entireDay": "Hele dagen", - "endTime": "Slutt", - "childsPersonalNumber": "Barnets personnummer" - }, - "abbrevations": { - "upperSecondarySchool": "Videregående", - "preSchool": "Førskole", - "leisureTimeCentre": "Skolefritidsordning", - "compulsorySchool": "Grunnskole" - }, - "notifications": { - "notificationTitle": "Merknad: {{message}} ({{dateCreated}})" - }, - "navigation": { - "notifications": "Merknader", - "news": "Nyheter", - "menu": "Meny", - "calender": "Kalender", - "classmates": "Klassekamerater" - }, - "menu": { - "emptyText": "Fant ikke noe denne uken", - "emptyHeadline": "Menyen ser ganske tom ut" - }, - "language": { - "changeLanguageButton": "Lagre", - "changeLanguage": "Endre språk" - }, - "schedule": { - "gymBag": "Gym-bag", - "lunch": "Lunsj", - "end": "Slutt", - "start": "Start", - "week": "Uke" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Vis kontaktinfo", - "call": "Ring", - "a11y_show_contact_info_button_label": "Vis kontaktinfo", - "sms": "SMS", - "email": "E-post", - "home": "Adresse" - }, - "classmates": { - "contactsForGuardiansFor": "Foresattes kontaktinfo for", - "class": "Klasse", - "child": "Barn" - }, - "settings": { - "settings": "Innstillinger", - "appearance": "Utseende", - "themeAuto": "Auto", - "theme": "Drakt", - "language": "Språk", - "licenses": "Lisenser", - "useSystemTheme": "Ifør systemets drakt" - }, - "themes": { - "light": "Lys", - "dark": "Mørk" - } -} diff --git a/apps/skolplattformen-app-new/translations/nl.json b/apps/skolplattformen-app-new/translations/nl.json deleted file mode 100644 index a7e3a943..00000000 --- a/apps/skolplattformen-app-new/translations/nl.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "general": { - "loading": "Bezig met laden…", - "settings": "Instellingen", - "send": "Sturen", - "title": "Öppna skolplattformen", - "logout": "Uitloggen", - "confirm": "Bevestigen", - "changeLanguage": "Taal wijzigen", - "socialSecurityNumber": "Burgerservicenummer", - "cancel": "Annuleren", - "logoutAndClearAllDataInclSettings": "Log uit en wis alle gegevens inclusief instellingen", - "logoutAndClearPersonalData": "Uitloggen en persoonlijke gegevens wissen" - }, - "auth": { - "placeholder_SocialSecurityNumber": "Jouw burgerservicenummer", - "loginFailed": "Inloggen mislukt. Probeer het opnieuw.", - "loginAsTestUser": "Inloggen als testgebruiker", - "words": { - "working": "werkende", - "simple": "simpele", - "rebellious": "opstandige", - "open": "open", - "imperfect": "onvolmaakte", - "homemade": "zelfgemaakte", - "fun": "leuke", - "fast": "snellere", - "fantastic": "fantastische", - "enlightened": "verlichte", - "cooler": "koelere", - "agile": "flexibele", - "cheap": "goedkopere", - "better": "betere", - "awaited": "verwachte", - "free": "gratis", - "first": "eerste" - }, - "subtitle": "Het {{word}} alternatief", - "bankid": { - "OpenOnThisDevice": "Open BankID op dit apparaat", - "OpenOnAnotherDevice": "Open BankID op een andere apparaat", - "Waiting": "Watchen op BankID…", - "OpenManually": "Open BankID handmatig" - }, - "chooseLoginMethod": "Kies inlogmethode", - "a11y_select_login_method": "Selecteer de inlogmethode", - "a11y_clear_social_security_input_field": "Wis het veld voor het burgerservicenummer", - "a11y_image_two_boys": "Foto van twee mensen die naar hun mobiele telefoons kijken", - "a11y_change_language": "Selecteer je taal" - }, - "abbrevations": { - "preSchool": "Peuterschool", - "leisureTimeCentre": "Centrum voor vrijetijdsbesteding", - "compulsorySchool": "Basisschool", - "upperSecondarySchool": "Middelbare school" - }, - "abscense": { - "title": "Afwezigheid melden", - "invalidPersonalNumber": "Ongeldig burgerservicenummer", - "endTime": "Eindtijd", - "startTime": "Starttijd", - "personalNumberMissing": "Burgerservicenummer ontbreekt", - "selectAbscenseEndTime": "Kies eindtijd", - "selectAbscenseStartTime": "Kies starttijd", - "entireDay": "Hele dag", - "childsPersonalNumber": "Kinds burgerservicenummer" - }, - "children": { - "noKids_description": "Er zijn geen kinderen geregistreerd in de stad Stockholm voor jouw burgerservicenummer", - "loadingErrorInformationText": "Deze pagina kan niet worden geladen. Probeer het opnieuw of bekijk de status op skolplattformen.org.", - "viewStatus": "Bekijk de status op skolplattformen.org", - "tryAgain": "Probeer het opnieuw", - "noKids_title": "Geen kinderen", - "title": "Jouw kinderen", - "loadingErrorHeading": "Oeps!" - }, - "menu": { - "emptyText": "Vond niets te zien voor deze week", - "emptyHeadline": "Het ziet er leeg uit in het menu" - }, - "news": { - "backToChild": "Terug naar kind", - "notificationTitle": "Nieuws: {{header}} ({{published}})", - "noNewNewsItemsThisWeek": "Geen nieuwe nieuwsberichten deze week.", - "updated": "Bijgewerkt", - "title": "Nieuws van Skolplattformen", - "published": "Gepubliceerd", - "search": { - "placeholder": "Zoek al het nieuws…" - } - }, - "language": { - "changeLanguage": "Taal wijzigen", - "changeLanguageButton": "Opslaan" - }, - "calender": { - "showCalenderActions": "Agenda-acties weergeven", - "approveAccessToCalender": "Je moet de toegang tot je agenda goedkeuren", - "saveToCalenderError": "Er is iets fout gegaan", - "saveToCalenderSuccess": "✔️ Opgeslagen in kalender", - "saveToCalender": "Opslaan in kalender" - }, - "notifications": { - "notificationTitle": "Melding: {{message}} ({{dateCreated}})" - }, - "navigation": { - "notifications": "Meldingen", - "calender": "Agenda", - "menu": "Menu", - "news": "Nieuws", - "classmates": "Klasgenoten" - }, - "schedule": { - "end": "Eind", - "gymBag": "Sporttas", - "lunch": "Middageten", - "start": "Start" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Toon contactgegevens", - "email": "E-mail", - "home": "Adres", - "call": "Telefoongesprek", - "sms": "SMS", - "a11y_show_contact_info_button_label": "Toon contactgegevens" - }, - "settings": { - "useSystemTheme": "Gebruik systeem licht/donker thema", - "appearance": "Verschijning", - "theme": "Thema", - "licenses": "Licenties", - "language": "Taal", - "themeAuto": "Auto", - "settings": "Instellingen" - }, - "classmates": { - "class": "Klas", - "child": "Kind", - "contactsForGuardiansFor": "Contactgegevens voor voogden voor" - }, - "themes": { - "light": "Licht", - "dark": "Donker" - } -} diff --git a/apps/skolplattformen-app-new/translations/pl.json b/apps/skolplattformen-app-new/translations/pl.json deleted file mode 100644 index fd8599bf..00000000 --- a/apps/skolplattformen-app-new/translations/pl.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "Szkoła podstawowa", - "leisureTimeCentre": "Świetlica", - "preSchool": "Przedszkole", - "upperSecondarySchool": "Liceum" - }, - "abscense": { - "endTime": "Czas zakończenia", - "entireDay": "Cały dzień", - "childsPersonalNumber": "Personnummer dziecka", - "invalidPersonalNumber": "Błąd w personnumerze", - "personalNumberMissing": "Brak personnumeru", - "selectAbscenseEndTime": "Wybierz czas zakończenia", - "selectAbscenseStartTime": "Wybierz czas rozpoczęcia", - "startTime": "Czas rozpoczęcia", - "title": "Zgłoś nieobecność" - }, - "auth": { - "bankid": { - "OpenManually": "Otwórz BankID manualnie", - "OpenOnAnotherDevice": "Otwórz BankID na innym urządzeniu", - "OpenOnThisDevice": "Otwórz BankID na tym urządzeniu", - "Waiting": "Oczekiwanie na BankID…" - }, - "freja": { - "OpenManually": "Otwórz Freja eID+ manualnie", - "OpenOnThisDevice": "Otwórz Freja eID+ na tym urządzeniu", - "Waiting": "Oczekiwanie na Freja eID+…" - }, - "chooseLoginMethod": "Wybierz sposób logowania", - "loginAsTestUser": "Zaloguj się jako użytkownik testowy", - "loginFailed": "Logowanie nie powiodło się. Spróbuj ponownie.", - "placeholder_SocialSecurityNumber": "Twój personnummer", - "subtitle": "{{word}} alternatywa", - "words": { - "agile": "Szybka", - "awaited": "Oczekiwana", - "better": "Lepsza", - "cheap": "Tania", - "cooler": "Odlotowa", - "enlightened": "Oświecona", - "fantastic": "Fantastyczna", - "fast": "Szybka", - "first": "Pierwsza", - "free": "Uwolniona", - "fun": "Śmieszna", - "homemade": "Domowa", - "imperfect": "Niedoskonała", - "open": "Otwarta", - "rebellious": "Buntownicza", - "simple": "Prosta", - "working": "Działająca" - }, - "a11y_select_login_method": "Wybierz metodę logowania", - "a11y_clear_social_security_input_field": "Wyczyść pole z personnumerem", - "a11y_image_two_boys": "Ilustracja: dwie osoby patrzą w telefony komórkowe", - "a11y_change_language": "Wybierz język", - "chooseSchoolPlatform": "Wybierz platformę", - "loginSuccessful": "Logowanie powiodło się. Trwa ładowanie…" - }, - "calender": { - "approveAccessToCalender": "Musisz zatwierdzić dostęp do kalendarza", - "saveToCalender": "Zapisz w kalendarzu", - "saveToCalenderError": "Coś poszło nie tak", - "saveToCalenderSuccess": "✔️ Zapisano w kalendarzu", - "showCalenderActions": "Pokaż opcje kalendarza", - "emptyHeadline": "Kalendarz jest pusty", - "emptyText": "Nie znaleziono nic do pokazania" - }, - "children": { - "loadingErrorHeading": "Oj!", - "loadingErrorInformationText": "Ładowanie strony nie powiodło się. Spróbuj ponownie, albo sprawdź status na skolplattformen.org.", - "noKids_description": "Nie znaleziono dzieci zarejestrowanych na Twój personnummer w mieście Sztokholm", - "noKids_title": "Nie znaleziono dzieci", - "title": "Twoje dzieci", - "tryAgain": "Spróbuj ponownie", - "viewStatus": "Sprawdź status na skolplattformen.org" - }, - "general": { - "changeLanguage": "Zmień język", - "confirm": "Potwierdź", - "loading": "Ładowanie…", - "logout": "Wyloguj", - "send": "Wyślij", - "settings": "Ustawienia", - "socialSecurityNumber": "Personnummer", - "title": "Öppna skolplattformen", - "cancel": "Anuluj", - "logoutAndClearPersonalData": "Wyloguj i skasuj dane osobowe", - "logoutAndClearAllDataInclSettings": "Wyloguj i skasuj wszystkie dane łącznie z ustawieniami", - "tomorrow": "Jutro" - }, - "language": { - "changeLanguage": "Zmień język", - "changeLanguageButton": "Zachowaj" - }, - "menu": { - "emptyHeadline": "Brak informacji", - "emptyText": "Nie znaleziono jadłospisu na ten tydzień" - }, - "navigation": { - "calender": "Kalendarz", - "menu": "Jadłospis", - "news": "Wiadomości", - "notifications": "Powiadomienia", - "classmates": "Klasa" - }, - "news": { - "backToChild": "Z powrotem do dzieci", - "noNewNewsItemsThisWeek": "Nie ma nowych wiadomości w tym tygodniu.", - "notificationTitle": "Wiadomość: {{header}} ({{published}})", - "published": "Opublikowano", - "title": "Wiadomość od szkoły", - "updated": "Uaktualniono", - "search": { - "placeholder": "Szukaj w wiadomościach…" - } - }, - "notifications": { - "notificationTitle": "Wiadomość: {{message}} ({{dateCreated}})" - }, - "schedule": { - "gymBag": "Ubrania do WF", - "lunch": "Lunch", - "end": "Kończy", - "start": "Zaczyna", - "week": "Tydzień" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Pokazuje dane kontaktowe", - "home": "Adres", - "email": "E-mail", - "sms": "SMS", - "call": "Zadzwoń", - "a11y_show_contact_info_button_label": "Pokaż dane kontaktowe" - }, - "classmates": { - "child": "Dziecko", - "class": "Klasa", - "contactsForGuardiansFor": "Dane kontaktowe do opiekuna" - }, - "themes": { - "dark": "Ciemny", - "light": "Jasny" - }, - "settings": { - "useSystemTheme": "Użyj ustawień systemu", - "themeAuto": "Auto", - "language": "Język", - "licenses": "Licencje", - "theme": "Tryb", - "appearance": "Wygląd", - "settings": "Ustawienia" - } -} diff --git a/apps/skolplattformen-app-new/translations/pt.json b/apps/skolplattformen-app-new/translations/pt.json deleted file mode 100644 index 97f0e62b..00000000 --- a/apps/skolplattformen-app-new/translations/pt.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "abscense": { - "entireDay": "O dia inteiro", - "selectAbscenseStartTime": "Indique a hora de início", - "startTime": "Hora de início", - "title": "Reportar ausência", - "selectAbscenseEndTime": "Indique a hora de fim", - "endTime": "Hora de fim", - "invalidPersonalNumber": "Número de identidade pessoal inválido", - "personalNumberMissing": "Falta o número de identidade pessoal", - "childsPersonalNumber": "Número de identidade pessoal da criança" - }, - "auth": { - "bankid": { - "OpenManually": "Abrir BankID manualmente", - "OpenOnAnotherDevice": "Abrir BankID noutro dispositivo", - "Waiting": "A aguardar pelo BankID…", - "OpenOnThisDevice": "Abrir BankID neste dispositivo" - }, - "loginAsTestUser": "Autenticar como utilizador em teste", - "loginFailed": "Não foi possível autenticar. Por favor tente novamente.", - "placeholder_SocialSecurityNumber": "O seu número de identidade pessoal", - "words": { - "agile": "ágil", - "better": "melhor", - "awaited": "esperada", - "free": "livre", - "cooler": "interessante", - "enlightened": "mais clara", - "fantastic": "fantástica", - "first": "inicial", - "homemade": "caseira", - "imperfect": "imperfeita", - "open": "aberta", - "simple": "fácil", - "working": "funcional", - "cheap": "barata", - "fun": "divertida", - "fast": "rápida", - "rebellious": "rebelde" - }, - "subtitle": "A alternativa {{word}}", - "a11y_change_language": "Selecione o seu idioma", - "a11y_image_two_boys": "Fotografia de duas pessoas a verem os seus telemóveis", - "a11y_clear_social_security_input_field": "Limpar o campo do número de identificação pessoal", - "chooseLoginMethod": "Escolha o método de autenticação", - "a11y_select_login_method": "Selecione o método de autenticação", - "chooseSchoolPlatform": "Escolha a plataforma" - }, - "abbrevations": { - "compulsorySchool": "Escola primária / secundária inferior", - "leisureTimeCentre": "Cuidados pós-escolares", - "upperSecondarySchool": "Escola secundária superior", - "preSchool": "Pré-escola" - }, - "calender": { - "showCalenderActions": "Mostrar ações do calendário", - "saveToCalenderError": "Algo correu mal", - "saveToCalenderSuccess": "✔️ Guardado no calendário", - "approveAccessToCalender": "Tem de autorizar o acesso ao seu calendário", - "saveToCalender": "Guardar no calendário", - "emptyHeadline": "O calendário parece um pouco vazio", - "emptyText": "Não encontrei nada para mostrar" - }, - "children": { - "loadingErrorHeading": "Ups!", - "loadingErrorInformationText": "Esta página não pode ser carregada. Tente novamente ou veja o estado atual em skolplattformen.org", - "noKids_description": "Não existem crianças registadas na cidade de Estocolmo para o seu número de identificação pessoal", - "noKids_title": "Sem crianças", - "tryAgain": "Tentar novamente", - "title": "Os seus filhos", - "viewStatus": "Ver estado em skolplattformen.org" - }, - "general": { - "changeLanguage": "Alterar idioma", - "confirm": "Confirmar", - "loading": "A carregar…", - "logout": "Sair", - "logoutAndClearAllDataInclSettings": "Sair e limpar todos os dados, incluindo as configurações", - "send": "Enviar", - "socialSecurityNumber": "Número de identidade pessoal", - "title": "Öppna skolplattformen", - "logoutAndClearPersonalData": "Sair e limpar dados pessoais", - "cancel": "Cancelar", - "settings": "Configurações", - "tomorrow": "Amanhã" - }, - "language": { - "changeLanguage": "Alterar idioma", - "changeLanguageButton": "Guardar" - }, - "menu": { - "emptyHeadline": "O menu do almoço parece um pouco vazio", - "emptyText": "Não consegui encontrar nada para esta semana" - }, - "navigation": { - "calender": "Calendário", - "menu": "Almoço", - "news": "Notícias", - "notifications": "Notificações", - "classmates": "Colegas de turma" - }, - "settings": { - "settings": "Configurações", - "useSystemTheme": "Usar o tema claro / escuro do sistema", - "appearance": "Aparência", - "theme": "Tema", - "licenses": "Licenças", - "language": "Idioma", - "themeAuto": "Automático" - }, - "themes": { - "light": "Claro", - "dark": "Escuro" - }, - "news": { - "backToChild": "Voltar à criança", - "noNewNewsItemsThisWeek": "Não há novidades esta semana.", - "notificationTitle": "Notícia: {{header}} ({{published}})", - "published": "Publicada", - "updated": "Atualizada", - "title": "Notícias de Skolplattformen", - "search": { - "placeholder": "Procurar nas notícias…" - } - }, - "schedule": { - "start": "Início", - "end": "Fim", - "lunch": "Almoço", - "gymBag": "Saco de ginástica", - "week": "Semana" - }, - "classmates": { - "class": "Turma", - "child": "Criança", - "contactsForGuardiansFor": "Informações de contacto dos tutores para" - }, - "contact": { - "call": "Ligar", - "email": "E-mail", - "home": "Morada", - "a11y_show_contact_info_button_hint": "Mostra informações de contacto", - "a11y_show_contact_info_button_label": "Mostrar informações de contacto", - "sms": "SMS" - }, - "notifications": { - "notificationTitle": "Notificação: {{message}} ({{dateCreated}})" - } -} diff --git a/apps/skolplattformen-app-new/translations/readme.md b/apps/skolplattformen-app-new/translations/readme.md deleted file mode 100644 index f7a3e044..00000000 --- a/apps/skolplattformen-app-new/translations/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# How to help out with translating Öppna skolplattformen using Weblate - -We are using Weblate to translate our app. You can find the project [here](https://hosted.weblate.org/projects/skolplattformen-app/app-translation/). - -![Image of the weblate project](https://hosted.weblate.org/widgets/skolplattformen-app/-/app-translation/open-graph.png) - -## OSS License - -Weblate is sponsering this project through their open source license and we would be very happy if you donated to them! - -[Contribute to Weblate](https://weblate.org/sv/contribute/) diff --git a/apps/skolplattformen-app-new/translations/ru.json b/apps/skolplattformen-app-new/translations/ru.json deleted file mode 100644 index 0967ef42..00000000 --- a/apps/skolplattformen-app-new/translations/ru.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/apps/skolplattformen-app-new/translations/so.json b/apps/skolplattformen-app-new/translations/so.json deleted file mode 100644 index 2c848001..00000000 --- a/apps/skolplattformen-app-new/translations/so.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "Dugsiga khasabka ah", - "leisureTimeCentre": "Waqtiga firaaqada", - "preSchool": "Dugsiga barbaarinta", - "upperSecondarySchool": "Dugsiga sare" - }, - "abscense": { - "endTime": "End time", - "entireDay": "Maalintoo dhan", - "invalidPersonalNumber": "Personal number invalid", - "personalNumberMissing": "Personal number missing", - "selectAbscenseEndTime": "Xulo waqtiga dhamaadka", - "selectAbscenseStartTime": "Choose start time", - "startTime": "Start time", - "title": "Maqnaanshaha ka warbixi" - }, - "auth": { - "bankid": { - "OpenManually": "Sugaya BankID ...", - "OpenOnAnotherDevice": "Ku fur BankID qalab kale", - "OpenOnThisDevice": "Ku fur BankID qalabkan", - "Waiting": "Sugaya BankID ..." - }, - "chooseLoginMethod": "Xulo habka galitaanka", - "loginAsTestUser": "Soo gal isticmaalaha imtixaanka", - "loginFailed": "Soo galitaanku wuu fashilmay, fadlan iskuday markale!", - "placeholder_SocialSecurityNumber": "Lambarkaaga gaarka ah", - "subtitle": "Beddelka {{word}}", - "words": { - "agile": "kacsan", - "awaited": "sugayay", - "better": "fiican", - "cheap": "jaban", - "cooler": "ccooleroolare", - "enlightened": "iftiimiyay", - "fantastic": "cajiib ah", - "fast": "soon", - "first": "marka hore", - "free": "bilaash ah", - "fun": "madadaalo", - "homemade": "macmal ah", - "imperfect": "aan dhammaystirnayn", - "open": "furid", - "rebellious": "caasiyoobay", - "simple": "fudud", - "working": "shaqeeya" - } - }, - "calender": { - "approveAccessToCalender": "Waa inaad ansixisaa helitaanka jadwalkaaga", - "saveToCalender": "Save to calender", - "saveToCalenderError": "Waxbaa qaldamay", - "saveToCalenderSuccess": "Ved Lagu keydiyey calender", - "showCalenderActions": "Muuji ficilada calender-ka" - }, - "children": { - "loadingErrorHeading": "Oops!", - "loadingErrorInformationText": "This page cannot be loaded. Try again or view current status on skolplattformen.org.", - "noKids_description": "Ma jiraan caruur ka diiwaan gashan lambarkaaga sooshiyal sekuyuuriyada Stockholm", - "noKids_title": "Carruur ma leh", - "title": "Your kids", - "tryAgain": "Try again", - "viewStatus": "View status on skolplattformen.org" - }, - "general": { - "changeLanguage": "Change language", - "confirm": "Confirm", - "loading": "Loading...", - "logout": "Logout", - "send": "Send", - "settings": "Settings", - "socialSecurityNumber": "Personal identity number", - "title": "Öppna skolplattformen", - "cancel": "Abort" - }, - "language": { - "changeLanguage": "Beddel luqadda", - "changeLanguageButton": "Keydso" - }, - "menu": { - "emptyHeadline": "The menu looks kinda empty", - "emptyText": "Couldn't find anything for this week" - }, - "navigation": { - "calender": "Calendar", - "menu": "Liiska", - "news": "Wararka", - "notifications": "Ogeysiisyada" - }, - "news": { - "backToChild": "Ku noqo ilmaha", - "noNewNewsItemsThisWeek": "Ma jiraan warar cusub toddobaadkan.", - "notificationTitle": "Warar: {{header}} ({{published}})", - "published": "Published", - "title": "Wararka ka imanaya madasha dugsiga", - "updated": "Updated" - }, - "notifications": { - "notificationTitle": "Ogeysiis: {{message}} ({{dateCreated}})" - } -} diff --git a/apps/skolplattformen-app-new/translations/sv.json b/apps/skolplattformen-app-new/translations/sv.json deleted file mode 100644 index bfd4303b..00000000 --- a/apps/skolplattformen-app-new/translations/sv.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "Grundskola", - "leisureTimeCentre": "Fritids", - "preSchool": "Förskola", - "upperSecondarySchool": "Gymnasieskola" - }, - "abscense": { - "endTime": "Sluttid", - "entireDay": "Heldag", - "childsPersonalNumber": "Barnets personnummer", - "invalidPersonalNumber": "Personnumret är ogiltigt", - "personalNumberMissing": "Personnummer saknas", - "selectAbscenseEndTime": "Välj sluttid", - "selectAbscenseStartTime": "Välj startid", - "startTime": "Starttid", - "title": "Anmäl frånvaro" - }, - "auth": { - "bankid": { - "OpenManually": "Öppna BankID manuellt", - "OpenOnAnotherDevice": "Öppna BankID på annan enhet", - "OpenOnThisDevice": "Logga in med BankID", - "Waiting": "Väntar på BankID…" - }, - "freja": { - "OpenManually": "Öppna Freja eID+ manuellt", - "OpenOnThisDevice": "Logga in med Freja eID+", - "Waiting": "Väntar på Freja eID+…" - }, - "chooseLoginMethod": "Välj inloggningsmetod", - "chooseSchoolPlatform": "Välj plattform", - "loginAsTestUser": "Logga in som testanvändare", - "loginFailed": "Inloggningen misslyckades, försök igen!", - "loginSuccessful": "Du är inloggad! - laddar…", - "placeholder_SocialSecurityNumber": "Ditt personnummer", - "subtitle": "Det {{word}} alternativet", - "words": { - "agile": "agila", - "awaited": "efterlängtade", - "better": "bättre", - "cheap": "billiga", - "cooler": "coolare", - "enlightened": "upplysta", - "fantastic": "fantastiska", - "fast": "snabba", - "first": "första", - "free": "fria", - "fun": "roliga", - "homemade": "hemmagjorda", - "imperfect": "operfekta", - "open": "öppna", - "rebellious": "rebelliska", - "simple": "enkla", - "working": "fungerande" - }, - "a11y_change_language": "Välj språk", - "a11y_image_two_boys": "Bild på två personer som kollar i mobilen", - "a11y_clear_social_security_input_field": "Rensa fältet för personnummer", - "a11y_select_login_method": "Välj hur du vill logga in" - }, - "calender": { - "approveAccessToCalender": "Du måste godkänna åtkomst till kalendern", - "saveToCalender": "Spara till kalender", - "saveToCalenderError": "Något gick fel", - "saveToCalenderSuccess": "✔️ Sparad till kalender", - "showCalenderActions": "Visa kalenderfunktioner", - "emptyText": "Hittade ingenting att visa", - "emptyHeadline": "Det ser lite tomt ut i kalendern" - }, - "children": { - "loadingErrorHeading": "Hoppsan!", - "loadingErrorInformationText": "Vi lyckades inte ladda sidan. Försök igen eller se status på skolplattformen.org.", - "noKids_description": "Det finns inga barn registrerade för ditt personnummer i Stockholms stad", - "noKids_title": "Inga barn", - "title": "Dina barn", - "tryAgain": "Försök igen", - "viewStatus": "Se status på skolplattformen.org" - }, - "general": { - "changeLanguage": "Byt språk", - "confirm": "Bekräfta", - "loading": "Laddar…", - "logout": "Logga ut", - "send": "Skicka", - "settings": "Inställningar", - "socialSecurityNumber": "Personnummer", - "title": "Öppna skolplattformen", - "cancel": "Avbryt", - "logoutAndClearAllDataInclSettings": "Logga ut och rensa all sparad data inkl inställningar", - "logoutAndClearPersonalData": "Logga ut och rensa all personlig data", - "tomorrow": "Imorgon" - }, - "language": { - "changeLanguage": "Byt språk", - "changeLanguageButton": "Spara" - }, - "menu": { - "emptyHeadline": "Det ser lite tomt ut i matsedeln", - "emptyText": "Hittade ingenting att visa för den här veckan" - }, - "navigation": { - "calender": "Kalender", - "menu": "Matsedel", - "news": "Nyheter", - "notifications": "Aviseringar", - "classmates": "Klassen" - }, - "settings": { - "settings": "Inställningar", - "appearance": "Utseende", - "theme": "Tema", - "licenses": "Licenser", - "language": "Språk", - "themeAuto": "Auto", - "useSystemTheme": "Använd telefonens inställning" - }, - "themes": { - "light": "Ljust", - "dark": "Mörkt" - }, - "news": { - "backToChild": "Tillbaka till barn", - "noNewNewsItemsThisWeek": "Inga nya inlägg denna vecka.", - "notificationTitle": "Nyhet: {{header}} ({{published}})", - "published": "Publicerad", - "title": "Nyhet från Skolplattformen", - "updated": "Uppdaterad", - "search": { - "placeholder": "Sök i alla nyheter…" - } - }, - "notifications": { - "notificationTitle": "Avisering: {{message}} ({{dateCreated}})" - }, - "schedule": { - "start": "Börjar", - "end": "Slutar", - "lunch": "Lunch", - "gymBag": "Gympapåse", - "week": "Vecka" - }, - "classmates": { - "class": "Klass", - "child": "Barn", - "contactsForGuardiansFor": "Kontaktuppgifter för vårdnadshavare till" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Visar kontaktinformation", - "a11y_show_contact_info_button_label": "Visa kontaktinformation", - "call": "Ring", - "sms": "SMS", - "email": "Maila", - "home": "Adress" - } -} diff --git a/apps/skolplattformen-app-new/translations/th.json b/apps/skolplattformen-app-new/translations/th.json deleted file mode 100644 index 3df06f60..00000000 --- a/apps/skolplattformen-app-new/translations/th.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "abscense": { - "entireDay": "ทั้งวัน", - "childsPersonalNumber": "เลขบัตรประจำตัวประชาชนของลูก", - "invalidPersonalNumber": "เลขบัตรประจำตัวประชาชนผิด", - "personalNumberMissing": "เลขบัตรประจำตัวประชาชนหายไป" - }, - "abbrevations": { - "preSchool": "อนุบาล", - "upperSecondarySchool": "มัธยมปลาย", - "compulsorySchool": "ประถม/มัธยมต้น" - }, - "auth": { - "bankid": { - "OpenOnAnotherDevice": "เปิด BankID ในเครื่องอื่น", - "OpenOnThisDevice": "เปิด BankID ในเครื่องนี้", - "Waiting": "กำลังรอ BankID…" - }, - "words": { - "cooler": "เจ๋งขึ้น", - "fast": "เร็ว", - "first": "แรก", - "free": "ฟรี", - "fun": "สนุก", - "imperfect": "ไม่สมบูรณ์", - "open": "เปิด", - "better": "ดีกว่า", - "cheap": "ถูก", - "simple": "ง่าย", - "fantastic": "ดีเยี่ยม", - "agile": "เปรียว", - "working": "ใช้งานได้" - }, - "loginFailed": "เข้าสู่ระบบไม่ได้ กรุณาลองใหม่อีกครั้ง", - "subtitle": "ทางเลือกที่{{word}}", - "placeholder_SocialSecurityNumber": "เลขบัตรประจำตัวประชาชนของคุณ", - "a11y_change_language": "เลือกภาษา", - "a11y_select_login_method": "เลือกวิธีการเข้าสู่ระบบ", - "freja": { - "Waiting": "กำลังรอ Freja eID+…" - } - }, - "language": { - "changeLanguageButton": "บันทึก", - "changeLanguage": "เปลี่ยนภาษา" - }, - "navigation": { - "calender": "ปฏิทิน", - "news": "ข่าวใหม่", - "notifications": "การแจ้งเตือน", - "classmates": "เพื่อนร่วมชั้น", - "menu": "อาหารเที่ยง" - }, - "general": { - "send": "ส่ง", - "cancel": "ยกเลิก", - "loading": "กำลังโหลด…", - "settings": "การตั้งค่า", - "title": "Öppna skolplattformen", - "socialSecurityNumber": "เลขบัตรประจำตัวประชาชน", - "tomorrow": "พรุ่งนี้", - "confirm": "ยืนยัน", - "changeLanguage": "เปลี่ยนภาษา", - "logout": "ออกจากระบบ" - }, - "children": { - "title": "ลูกของคุณ", - "tryAgain": "ลองอีกครั้ง", - "noKids_title": "ไม่มีลูก", - "viewStatus": "ดูสถานะบน skolplattformen.org" - }, - "settings": { - "settings": "การตั้งค่า", - "language": "ภาษา", - "themeAuto": "อัตโนมัติ", - "licenses": "ได้รับอนุญาต" - }, - "contact": { - "email": "อีเมล", - "call": "โทร", - "sms": "ข้อความ", - "home": "ที่อยู่", - "a11y_show_contact_info_button_hint": "แสดงข้อมูลการติดต่อ", - "a11y_show_contact_info_button_label": "แสดงข้อมูลการติดต่อ" - }, - "themes": { - "dark": "มืด", - "light": "แสงสว่าง" - }, - "news": { - "noNewNewsItemsThisWeek": "อาทิตย์นี้ไม่มีข่าว", - "notificationTitle": "ข่าว: {{header}} ({{published}})", - "title": "ข่าวจาก Skolplattformen", - "search": { - "placeholder": "ค้นหาข่าวต่างๆๆ…" - }, - "backToChild": "กลับไปหน้าหลักของลูก", - "published": "สิ่งที่ตีพิมพ์" - }, - "schedule": { - "week": "อาทิตย์", - "lunch": "อาหารเที่ยง", - "start": "เริ่มต้น", - "end": "สิ้นสุด" - }, - "classmates": { - "child": "ลูก", - "class": "ชั้นเรียน" - }, - "notifications": { - "notificationTitle": "การแจ้งเตือน: {{message}} ({{dateCreated}})" - }, - "calender": { - "saveToCalender": "บันทึกไว้ในปฏิทิน" - } -} diff --git a/apps/skolplattformen-app-new/translations/uk.json b/apps/skolplattformen-app-new/translations/uk.json deleted file mode 100644 index c1681857..00000000 --- a/apps/skolplattformen-app-new/translations/uk.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "abbrevations": { - "preSchool": "дитячий сад", - "upperSecondarySchool": "Старша школа", - "compulsorySchool": "Молодша/середня школа", - "leisureTimeCentre": "Група продовженого дня (\"Продленка\")" - }, - "abscense": { - "entireDay": "Цілий день", - "childsPersonalNumber": "Ідентифікаційний номер дитини", - "endTime": "час закінчення", - "invalidPersonalNumber": "Невірний ідентифікаційний номер", - "personalNumberMissing": "Ідентифікаційний код відсутній", - "startTime": "Час початку", - "title": "Додати відсутність", - "selectAbscenseEndTime": "Виберіть кінцевий час", - "selectAbscenseStartTime": "Виберіть час початку" - }, - "auth": { - "bankid": { - "OpenManually": "Відкрити BankID власноруч", - "OpenOnAnotherDevice": "Відкрити BankID на іншому пристрої", - "OpenOnThisDevice": "Відкрити BankID на цьому пристрої", - "Waiting": "Очікую на BankID…" - }, - "chooseLoginMethod": "Оберіть як увійти", - "chooseSchoolPlatform": "Оберіть платформу", - "loginFailed": "Не зміг увійти. Спробуйте ще раз.", - "placeholder_SocialSecurityNumber": "Ваш ідентифікаційний номер", - "loginAsTestUser": "Увійти як тестовий користувач", - "subtitle": "{{word}} альтернатива", - "words": { - "agile": "Гнучка", - "awaited": "Очікувана", - "better": "Краща", - "cheap": "Дешева", - "cooler": "Крутіша", - "enlightened": "Освічена", - "fantastic": "Фантастична", - "fast": "Швидка", - "first": "Перша", - "free": "Безкоштовна", - "fun": "Весела", - "homemade": "Домашня", - "imperfect": "Недосконала", - "open": "Відкрита", - "rebellious": "Бунтівна", - "simple": "Проста", - "working": "Робоча" - }, - "a11y_change_language": "Оберіть вашу мову", - "a11y_image_two_boys": "Зображення двох людей, які перевіряють свої телефони", - "a11y_clear_social_security_input_field": "Очистити поле вводу ідентифікаційного номера", - "a11y_select_login_method": "Оберіть як увійти", - "freja": { - "Waiting": "Очікую на Freja eID+…", - "OpenManually": "Відкрити Freja eID+ власноруч", - "OpenOnThisDevice": "Відкрити Freja eID+ на цьому пристрої" - } - }, - "calender": { - "approveAccessToCalender": "Вам потрібно дозволити доступ до вашого календаря", - "saveToCalender": "Зберегти у каледарі", - "saveToCalenderError": "Помилка збереження у календарі", - "saveToCalenderSuccess": "✔️ Збережено у календарі", - "showCalenderActions": "Показати дії у календарі", - "emptyHeadline": "У вашому календарі немає записів", - "emptyText": "Нічого показати" - }, - "children": { - "loadingErrorHeading": "Помилка!", - "loadingErrorInformationText": "Неможливо завантажити цю сторінку. Спробуйте ще раз або дізнайтеся статус на skolplattformen.org.", - "noKids_description": "На ваш ідентифікаційний номер не зареєстровано жодної дитини в Стокгольмі", - "noKids_title": "Немає дітей", - "title": "Ваші діти", - "tryAgain": "Спробуйте ще", - "viewStatus": "Дізнайтеся статус на skolplattformen.org" - }, - "general": { - "cancel": "Скасувати", - "changeLanguage": "Змінити мову", - "confirm": "Підтвердити", - "loading": "Завантаження…", - "logout": "Вийти", - "logoutAndClearPersonalData": "Вийти та очистити персональні дані", - "send": "Відправити", - "settings": "Налаштування", - "socialSecurityNumber": "Ідентифікаційний номер", - "title": "Відкрити skolplattformen", - "tomorrow": "Завтра", - "logoutAndClearAllDataInclSettings": "Вийти та очистити дані, включаючи налаштування" - }, - "language": { - "changeLanguage": "Змінити мову", - "changeLanguageButton": "Зберегти" - }, - "menu": { - "emptyHeadline": "Нічого немає в меню на обід", - "emptyText": "На цьому тижні нічого немає" - }, - "navigation": { - "calender": "Календар", - "menu": "Обід", - "news": "Новини", - "notifications": "Повідомлення", - "classmates": "Однокласники" - }, - "settings": { - "settings": "Налаштування", - "appearance": "Зовнішній вигляд", - "theme": "Тема", - "licenses": "Ліцензії", - "language": "Мова", - "themeAuto": "Автоматично", - "useSystemTheme": "Використати системну світлу/темну тему" - }, - "themes": { - "light": "Світла", - "dark": "Темна" - }, - "news": { - "backToChild": "Назад до дитини", - "noNewNewsItemsThisWeek": "Цього тижня новин немає.", - "notificationTitle": "Новини: {{header}} ({{published}})", - "published": "Опубліковано", - "title": "Новини від Skolplattformen", - "updated": "Оновлено", - "search": { - "placeholder": "Шукати у новинах…" - } - }, - "notifications": { - "notificationTitle": "Повідомлення: {{message}} ({{dateCreated}})" - }, - "schedule": { - "start": "Початок", - "end": "Кінець", - "lunch": "Обід", - "week": "Тиждень", - "gymBag": "Спортивна сумка" - }, - "classmates": { - "class": "Клас", - "child": "Дитина", - "contactsForGuardiansFor": "Контактна інформація для опікунів для" - }, - "contact": { - "a11y_show_contact_info_button_hint": "Показує контактну інформацію", - "a11y_show_contact_info_button_label": "Показати контактну інформацію", - "call": "Дзвінок", - "sms": "СМС", - "email": "Е-мейл", - "home": "Адреса" - } -} diff --git a/apps/skolplattformen-app-new/translations/zh_Hans.json b/apps/skolplattformen-app-new/translations/zh_Hans.json deleted file mode 100644 index fcddd06f..00000000 --- a/apps/skolplattformen-app-new/translations/zh_Hans.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "abbrevations": { - "preSchool": "学前班", - "upperSecondarySchool": "高中", - "compulsorySchool": "小学/初中", - "leisureTimeCentre": "课后托管" - }, - "abscense": { - "endTime": "结束时间", - "entireDay": "全天", - "selectAbscenseEndTime": "选择结束时间", - "selectAbscenseStartTime": "选择开始时间", - "title": "报告缺席情况", - "invalidPersonalNumber": "个人身份号码无效", - "personalNumberMissing": "缺少个人身份号码", - "startTime": "开始时间", - "childsPersonalNumber": "孩子的个人身份号码" - }, - "auth": { - "bankid": { - "OpenManually": "手动打开 BankID", - "OpenOnAnotherDevice": "在另一台设备上打开 BankID", - "OpenOnThisDevice": "在本设备上打开 BankID", - "Waiting": "正在等待 BankID 响应…" - }, - "loginAsTestUser": "以测试用户身份登录", - "loginFailed": "无法登录。请重试。", - "placeholder_SocialSecurityNumber": "你的个人身份号码", - "words": { - "agile": "轻快", - "awaited": "久违", - "better": "更佳", - "cheap": "价廉", - "cooler": "酷乐", - "enlightened": "开明", - "fantastic": "匪夷", - "fast": "迅捷", - "free": "自由", - "fun": "乐趣", - "homemade": "手制", - "open": "开放", - "rebellious": "逆流", - "simple": "简单", - "imperfect": "有瑕", - "first": "一流", - "working": "可用" - }, - "subtitle": "{{word}}之选", - "a11y_clear_social_security_input_field": "清空个人身份号码栏", - "chooseLoginMethod": "选择登录方式", - "a11y_change_language": "选择您的语言", - "a11y_image_two_boys": "两个人看手机的图片", - "a11y_select_login_method": "选择登录方式", - "chooseSchoolPlatform": "选择平台", - "freja": { - "OpenManually": "手动打开 Freja eID+", - "OpenOnThisDevice": "在此设备上打开 Freja eID+", - "Waiting": "正在等待 Freja eID+ 响应…" - }, - "loginSuccessful": "登录成功,正在加载…" - }, - "calender": { - "saveToCalender": "保存到日历中", - "saveToCalenderError": "出了点问题", - "saveToCalenderSuccess": "✔️ 已保存到日历中", - "showCalenderActions": "显示日历操作", - "approveAccessToCalender": "您必须允许访问日历", - "emptyHeadline": "日历看起来有点空", - "emptyText": "找不到任何可以显示的东西" - }, - "children": { - "loadingErrorHeading": "啊噢!", - "loadingErrorInformationText": "这个页面无法加载。请重试或在 skolplattformen.org 网站上查看当前状态。", - "noKids_title": "没有找到孩子", - "title": "您的孩子", - "tryAgain": "请重试", - "viewStatus": "在 skolplattformen.org 网站上查看状态", - "noKids_description": "您的个人身份号码下没有注册在斯德哥尔摩市的孩子" - }, - "general": { - "cancel": "取消", - "changeLanguage": "更改语言", - "confirm": "确认", - "loading": "正在加载…", - "logout": "登出", - "logoutAndClearPersonalData": "登出并清除个人数据", - "logoutAndClearAllDataInclSettings": "登出并清除包括设置在内的所有数据", - "send": "发送", - "socialSecurityNumber": "个人身份号码", - "title": "开放学校平台", - "settings": "设置", - "tomorrow": "明天" - }, - "language": { - "changeLanguage": "更改语言", - "changeLanguageButton": "保存" - }, - "menu": { - "emptyHeadline": "午餐菜单看起来有点空", - "emptyText": "找不到有关这个星期的任何内容" - }, - "navigation": { - "calender": "日历", - "menu": "午餐", - "news": "新闻", - "notifications": "通知", - "classmates": "同班同学" - }, - "settings": { - "appearance": "外观", - "licenses": "许可证", - "language": "语言", - "themeAuto": "自动", - "useSystemTheme": "使用系统亮色/暗色主题", - "settings": "设置", - "theme": "主题" - }, - "themes": { - "light": "亮色", - "dark": "暗色" - }, - "news": { - "backToChild": "返回到孩子页面", - "noNewNewsItemsThisWeek": "这个星期没有新闻。", - "notificationTitle": "新闻:{{header}}({{published}})", - "published": "已发布", - "updated": "已更新", - "search": { - "placeholder": "在新闻中搜索…" - }, - "title": "来自学校平台的新闻" - }, - "notifications": { - "notificationTitle": "通知:{{message}}({{dateCreated}})" - }, - "schedule": { - "start": "开始", - "end": "结束", - "lunch": "午餐", - "gymBag": "健身袋", - "week": "星期" - }, - "classmates": { - "class": "课堂", - "child": "孩子", - "contactsForGuardiansFor": "监护人的联系信息" - }, - "contact": { - "a11y_show_contact_info_button_hint": "显示联系信息", - "a11y_show_contact_info_button_label": "显示联系信息", - "sms": "短信", - "call": "电话", - "email": "电子邮箱", - "home": "家庭地址" - } -} diff --git a/apps/skolplattformen-app-new/translations/zh_Hant.json b/apps/skolplattformen-app-new/translations/zh_Hant.json deleted file mode 100644 index 20cfe3eb..00000000 --- a/apps/skolplattformen-app-new/translations/zh_Hant.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "abbrevations": { - "compulsorySchool": "小學/初中", - "leisureTimeCentre": "課後託管", - "preSchool": "學前班", - "upperSecondarySchool": "高中" - }, - "abscense": { - "endTime": "結束時間", - "entireDay": "全天", - "invalidPersonalNumber": "個人身份號碼無效", - "personalNumberMissing": "缺少個人身份號碼", - "selectAbscenseEndTime": "選擇結束時間", - "selectAbscenseStartTime": "選擇開始時間", - "startTime": "開始時間", - "title": "報告缺席情況" - }, - "auth": { - "bankid": { - "OpenManually": "手動開啟 BankID", - "OpenOnAnotherDevice": "在另一臺裝置上開啟 BankID", - "OpenOnThisDevice": "在本裝置上開啟 BankID", - "Waiting": "正在等待 BankID 響應…" - }, - "chooseLoginMethod": "選擇登入方式", - "loginAsTestUser": "以測試使用者身份登入", - "loginFailed": "無法登入。請重試。", - "placeholder_SocialSecurityNumber": "你的個人身份號碼", - "subtitle": "{{word}}之選", - "words": { - "agile": "輕快", - "awaited": "久違", - "better": "更佳", - "cheap": "價廉", - "cooler": "酷樂", - "enlightened": "開明", - "fantastic": "匪夷", - "fast": "迅捷", - "first": "一流", - "free": "自由", - "fun": "樂趣", - "homemade": "手製", - "imperfect": "有瑕", - "open": "開放", - "rebellious": "逆流", - "simple": "簡單", - "working": "可用" - }, - "a11y_change_language": "選擇您的語言", - "a11y_image_two_boys": "兩個人看手機的圖片", - "a11y_clear_social_security_input_field": "清空個人身份號碼欄", - "a11y_select_login_method": "選擇登入方式" - }, - "calender": { - "approveAccessToCalender": "您必須允許訪問日曆", - "saveToCalender": "儲存到日曆中", - "saveToCalenderError": "出了點問題", - "saveToCalenderSuccess": "✔️ 已儲存到日曆中", - "showCalenderActions": "顯示日曆操作" - }, - "children": { - "loadingErrorHeading": "啊噢!", - "loadingErrorInformationText": "這個頁面無法載入。請重試或在 skolplattformen.org 網站上檢視當前狀態。", - "noKids_description": "您的個人身份號碼下沒有註冊在斯德哥爾摩市的孩子", - "noKids_title": "沒有找到孩子", - "title": "您的孩子", - "tryAgain": "請重試", - "viewStatus": "在 skolplattformen.org 網站上檢視狀態" - }, - "general": { - "cancel": "取消", - "changeLanguage": "更改語言", - "confirm": "確認", - "loading": "正在載入…", - "logout": "登出", - "logoutAndClearPersonalData": "登出並清除個人資料", - "logoutAndClearAllDataInclSettings": "登出並清除包括設定在內的所有資料", - "send": "傳送", - "settings": "設定", - "socialSecurityNumber": "個人身份號碼", - "title": "開放學校平臺" - }, - "language": { - "changeLanguage": "更改語言", - "changeLanguageButton": "儲存" - }, - "menu": { - "emptyHeadline": "午餐選單看起來有點空", - "emptyText": "找不到有關這個星期的任何內容" - }, - "navigation": { - "calender": "日曆", - "menu": "午餐", - "news": "新聞", - "notifications": "通知", - "classmates": "同班同學" - }, - "settings": { - "settings": "設定", - "appearance": "外觀", - "theme": "主題", - "licenses": "許可證", - "language": "語言", - "themeAuto": "自動", - "useSystemTheme": "使用系統亮色/暗色主題" - }, - "themes": { - "light": "亮色", - "dark": "暗色" - }, - "news": { - "backToChild": "返回到孩子頁面", - "noNewNewsItemsThisWeek": "這個星期沒有新聞。", - "notificationTitle": "新聞:{{header}}({{published}})", - "published": "已釋出", - "title": "來自學校平臺的新聞", - "updated": "已更新", - "search": { - "placeholder": "在新聞中搜索…" - } - }, - "notifications": { - "notificationTitle": "通知:{{message}}({{dateCreated}})" - }, - "schedule": { - "start": "開始", - "end": "結束", - "lunch": "午餐", - "gymBag": "健身袋" - }, - "classmates": { - "class": "課堂", - "child": "孩子", - "contactsForGuardiansFor": "監護人的聯絡資訊" - }, - "contact": { - "a11y_show_contact_info_button_hint": "顯示聯絡資訊", - "a11y_show_contact_info_button_label": "顯示聯絡資訊", - "call": "電話", - "sms": "簡訊", - "email": "電子郵箱", - "home": "家庭地址" - } -} diff --git a/apps/skolplattformen-app-new/tsconfig.json b/apps/skolplattformen-app-new/tsconfig.json deleted file mode 100644 index a5cadaeb..00000000 --- a/apps/skolplattformen-app-new/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "@tsconfig/react-native/tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@skolplattformen/api": ["libs/api/lib/index.ts"], - "@skolplattformen/api-hjarntorget": ["libs/api-hjarntorget/lib/index.ts"], - "@skolplattformen/api-skolplattformen": [ - "libs/api-skolplattformen/lib/index.ts" - ], - "@skolplattformen/curriculum": ["libs/curriculum/src/index.ts"], - "@skolplattformen/hooks": ["libs/hooks/src/index.ts"] - } - } -} diff --git a/apps/skolplattformen-app-new/types.d.ts b/apps/skolplattformen-app-new/types.d.ts deleted file mode 100644 index 9536d3d1..00000000 --- a/apps/skolplattformen-app-new/types.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -declare module 'libraries.json' { - export interface Library { - libraryName: string - version: string - _license?: License | string - _description?: string - homepage?: string - author?: Author | string - repository?: Repository - _licenseContent?: string - } - - export interface License { - type: string - url: string - } - - export interface Author { - name: string - url?: string - email?: string - } - - export interface Repository { - type?: string - url: string - directory?: string - baseUrl?: string - web?: string - dist?: string - } - - const libraries: Library[] - - export default libraries -} diff --git a/apps/skolplattformen-app-new/ui/keyboardAvoidingView.component.tsx b/apps/skolplattformen-app-new/ui/keyboardAvoidingView.component.tsx deleted file mode 100644 index 1e9dfa42..00000000 --- a/apps/skolplattformen-app-new/ui/keyboardAvoidingView.component.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { StyleService, useStyleSheet } from '@ui-kitten/components' -import React from 'react' -import { - KeyboardAvoidingView as RNKeyboardAvoidingView, - Platform, -} from 'react-native' -import { Layout } from '../styles' - -type KeyboardAvoidingViewProps = { - children: React.ReactNode -} - -export const KeyboardAvoidingView: React.FC = ({ - children, -}) => { - const styles = useStyleSheet(themedStyles) - - return ( - - {children} - - ) -} - -const themedStyles = StyleService.create({ - keyboardAvoidingView: { - ...Layout.flex.full, - }, -}) diff --git a/apps/skolplattformen-app-new/ui/safeAreaView.component.tsx b/apps/skolplattformen-app-new/ui/safeAreaView.component.tsx deleted file mode 100644 index 659e95f5..00000000 --- a/apps/skolplattformen-app-new/ui/safeAreaView.component.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { StyleService, useStyleSheet } from '@ui-kitten/components' -import React from 'react' -import { ViewProps } from 'react-native' -import { SafeAreaView as RNSafeAreaView } from 'react-native-safe-area-context' -import { Layout } from '../styles' - -export const SafeAreaView: React.FC = ({ children }) => { - const styles = useStyleSheet(themedStyles) - - return {children} -} - -const themedStyles = StyleService.create({ - safeArea: { - ...Layout.flex.full, - backgroundColor: 'background-basic-color-2', - }, -}) diff --git a/apps/skolplattformen-app-new/ui/safeAreaViewContainer.component.tsx b/apps/skolplattformen-app-new/ui/safeAreaViewContainer.component.tsx deleted file mode 100644 index 496ebaa4..00000000 --- a/apps/skolplattformen-app-new/ui/safeAreaViewContainer.component.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react' -import { View, StyleSheet, Platform, StatusBar } from 'react-native' - -/** - * This view takes in account for the status bar current height on Android - */ -type SafeAreaViewContainerProps = { - children: React.ReactNode -} - -export const SafeAreaViewContainer: React.FC = ({ - children, -}) => { - return {children} -} - -const styles = StyleSheet.create({ - wrapper: { - flex: 1, - paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0, - }, -}) diff --git a/apps/skolplattformen-app-new/utils/SMS.ts b/apps/skolplattformen-app-new/utils/SMS.ts deleted file mode 100644 index ad5914ae..00000000 --- a/apps/skolplattformen-app-new/utils/SMS.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Linking, Platform } from 'react-native' - -const phoneNumber = '+46730121740' - -export const useSMS = () => { - const sendSMS = async (message: string) => { - const separator = Platform.OS === 'ios' ? '&' : '?' - const url = `sms:${phoneNumber}${separator}body=${message}` - await Linking.openURL(url) - } - - return { sendSMS } -} diff --git a/apps/skolplattformen-app-new/utils/__tests__/calendarHelpers.test.ts b/apps/skolplattformen-app-new/utils/__tests__/calendarHelpers.test.ts deleted file mode 100644 index 2e1b996e..00000000 --- a/apps/skolplattformen-app-new/utils/__tests__/calendarHelpers.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import moment from 'moment' -import { getMeaningfulStartingDate } from '../calendarHelpers' - -const tuesdayMorning = moment('2021-11-30T08:20:00+0100') -const tuesdayEvening = moment('2021-11-30T19:20:26+0100') -const wednesdayEvening = moment('2021-12-01T19:20:26+0100') -const fridayEvening = moment('2021-12-03T19:20:26+0100') -const saturdayEvening = moment('2021-12-04T19:20:26+0100') -const sundayEvening = moment('2021-12-05T19:20:26+0100') -const mondayEvening = moment('2021-12-06T19:20:26+0100') - -describe('getMeaningfulStartingDate should not touch inputdate', () => { - const origDate = moment() - const origDateClone = origDate.clone() - getMeaningfulStartingDate(origDate) - - expect(origDate).toEqual(origDateClone) -}) - -describe('getMeaningfulStartingDate on weekends', () => { - it('should give next monday if on friday evening', () => { - const startDate = getMeaningfulStartingDate(fridayEvening) - expect(startDate.toISOString()).toEqual(mondayEvening.toISOString()) - }) - - it('should give next monday if on saturday', () => { - const startDate = getMeaningfulStartingDate(saturdayEvening) - expect(startDate.toISOString()).toEqual(mondayEvening.toISOString()) - }) - - it('should give next monday if on sunday', () => { - const startDate = getMeaningfulStartingDate(sundayEvening) - expect(startDate.toISOString()).toEqual(mondayEvening.toISOString()) - }) -}) - -describe('getMeaningfulStartingDate on weekdays', () => { - it('should give next day if on tuesday evening', () => { - const startDate = getMeaningfulStartingDate(tuesdayEvening) - expect(startDate.toISOString()).toEqual(wednesdayEvening.toISOString()) - }) - - it('should give same day if on tuesday morning', () => { - const startDate = getMeaningfulStartingDate(tuesdayMorning) - expect(startDate.toISOString()).toEqual(tuesdayMorning.toISOString()) - }) -}) diff --git a/apps/skolplattformen-app-new/utils/__tests__/peopleHelpers.test.ts b/apps/skolplattformen-app-new/utils/__tests__/peopleHelpers.test.ts deleted file mode 100644 index 1d23ce0d..00000000 --- a/apps/skolplattformen-app-new/utils/__tests__/peopleHelpers.test.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { - fullName, - guardians, - initials, - sortByFirstName, - studentName, -} from '../peopleHelpers' - -describe('#studentName', () => { - test('should remove student from name', () => { - expect(studentName('Alan Nilsson (elev)')).toEqual('Alan Nilsson') - }) - - test('should remove student without spacing from name', () => { - expect(studentName('Alan Nilsson(elev)')).toEqual('Alan Nilsson') - }) - - test('handles undefined name', () => { - expect(studentName(undefined)).toBeUndefined() - }) -}) - -describe('#fullName', () => { - test('should', () => { - expect( - fullName({ - firstname: 'Margaery', - lastname: 'Eriksson', - }) - ).toEqual('Margaery Eriksson') - }) -}) - -describe('#sortByFirstName', () => { - test('sort arrays by first name', () => { - expect( - sortByFirstName([ - { - firstname: 'Margaery', - lastname: 'Eriksson', - }, - { - firstname: 'Loras', - lastname: 'Eriksson', - }, - ]) - ).toEqual([ - { - firstname: 'Loras', - lastname: 'Eriksson', - }, - { - firstname: 'Margaery', - lastname: 'Eriksson', - }, - ]) - }) -}) - -describe('#guardians', () => { - test('should join a list of guardians sorted by firstname', () => { - expect( - guardians([ - { - firstname: 'Margaery', - lastname: 'Eriksson', - }, - { - firstname: 'Loras', - lastname: 'Eriksson', - }, - ]) - ).toEqual('Loras Eriksson, Margaery Eriksson') - }) -}) -describe('#initials', () => { - test('should extract initials from name', () => { - expect(initials('Namn Namnsson')).toEqual('Na') - expect(initials('Nisse Namnsson')).toEqual('Ni') - }) - - test('handles undefined name', () => { - expect(initials(undefined)).toBeUndefined() - }) -}) diff --git a/apps/skolplattformen-app-new/utils/__tests__/translation.test.ts b/apps/skolplattformen-app-new/utils/__tests__/translation.test.ts deleted file mode 100644 index c8c47336..00000000 --- a/apps/skolplattformen-app-new/utils/__tests__/translation.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -import i18n from 'i18n-js' -import { translate, translations } from '../translation' - -describe('translation in swedish', () => { - beforeAll(() => { - i18n.translations = { sv: translations.sv } - i18n.locale = 'sv' - }) - it('should be able to translate the word settings', () => { - expect(translate('general.settings')).toEqual('Inställningar') - }) -}) - -describe('translation in english', () => { - beforeAll(() => { - i18n.translations = { en: translations.en } - i18n.locale = 'en' - }) - it('should be able to translate the word settings', () => { - expect(translate('general.settings')).toEqual('Settings') - }) -}) diff --git a/apps/skolplattformen-app-new/utils/calendarHelpers.ts b/apps/skolplattformen-app-new/utils/calendarHelpers.ts deleted file mode 100644 index c75961ec..00000000 --- a/apps/skolplattformen-app-new/utils/calendarHelpers.ts +++ /dev/null @@ -1,20 +0,0 @@ -import moment from 'moment' - -export const getMeaningfulStartingDate = (date = moment()) => { - const originalDate = date.clone() - let returnDate = date.clone() - // are we on the evening? - if (date.hour() > 17) { - returnDate.add('1', 'day') - } - // are we on the weekend - if (returnDate.isoWeekday() > 5) { - returnDate = returnDate.add(5, 'days').startOf('isoWeek') - returnDate - .hour(originalDate.hour()) - .minute(originalDate.minute()) - .second(originalDate.second()) - } - - return returnDate -} diff --git a/apps/skolplattformen-app-new/utils/peopleHelpers.ts b/apps/skolplattformen-app-new/utils/peopleHelpers.ts deleted file mode 100644 index fe30b9d9..00000000 --- a/apps/skolplattformen-app-new/utils/peopleHelpers.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Guardian } from '@skolplattformen/api' - -export const studentName = (name?: string) => name?.replace(/\s?\(\w+\)$/, '') - -export const sortByFirstName = ( - data: T[] -): T[] => data.sort((a, b) => a.firstname.localeCompare(b.firstname)) - -export const guardians = (data: Guardian[]) => - sortByFirstName(data).map(fullName).join(', ') - -export const fullName = (person: Guardian) => - `${person.firstname} ${person.lastname}` - -export const initials = (name?: string) => { - return name?.slice(0, 2) -} diff --git a/apps/skolplattformen-app-new/utils/search.tsx b/apps/skolplattformen-app-new/utils/search.tsx deleted file mode 100644 index 0f3101d9..00000000 --- a/apps/skolplattformen-app-new/utils/search.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { NewsItem } from '@skolplattformen/api' -import { useNews } from '../libs/hooks/src' -import { MatchData, Searcher } from 'fast-fuzzy' -import React, { ReactNode, useMemo } from 'react' -import { Text } from 'react-native' -import { useChild } from '../components/childContext.component' -import { Typography } from '../styles' - -// https://github.com/facebook/react-native/issues/14796#issuecomment-389743259 - -global.Buffer = global.Buffer || require('buffer').Buffer - -const NUM_CHARS_AROUND_SEARCH_MATCH = 20 - -export function useNewsListSearchResults( - searchQuery: string -): MatchData[] { - const child = useChild() - const { data } = useNews(child) - - const searcher = useMemo(() => { - return new Searcher(data, { - threshold: 0.7, - keySelector: (newsItem) => newsItem.body ?? '', - returnMatchData: true, - }) - }, [data]) - - return useMemo(() => { - if (!searchQuery) { - return [] - } - return searcher.search(searchQuery) - }, [searchQuery, searcher]) -} - -function replaceNewLines(string: string): string { - return string.replace(/\n/g, ' ') -} - -export function renderSearchResultPreview( - searchResult: MatchData -): ReactNode { - const start = searchResult.match.index - const end = start + searchResult.match.length - - const beforeMatch = replaceNewLines( - searchResult.original.slice(start - NUM_CHARS_AROUND_SEARCH_MATCH, start) - ) - const match = replaceNewLines(searchResult.original.slice(start, end)) - const afterMatch = replaceNewLines( - searchResult.original.slice(end, end + NUM_CHARS_AROUND_SEARCH_MATCH) - ) - return ( - <> - {!!beforeMatch && `...${beforeMatch}`} - {match} - {!!afterMatch && `${afterMatch}...`} - - ) -} diff --git a/apps/skolplattformen-app-new/utils/testHelpers.tsx b/apps/skolplattformen-app-new/utils/testHelpers.tsx deleted file mode 100644 index ebe8b5b6..00000000 --- a/apps/skolplattformen-app-new/utils/testHelpers.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import * as eva from '@eva-design/eva' -import { render as rtlRender } from '@testing-library/react-native' -import { ApplicationProvider, IconRegistry } from '@ui-kitten/components' -import { EvaIconsPack } from '@ui-kitten/eva-icons' -import React, { ReactElement } from 'react' -import { LanguageProvider } from '../context/language/languageContext' -import { translations } from './translation' -import { lightTheme } from '../design/themes' - -type AllTheProvidersProps = { - children: React.ReactNode -} - -export const render = ( - ui: ReactElement, - { language = 'sv', ...options } = {} -) => { - const AllTheProviders: React.FC = ({ children }) => { - return ( - <> - - - - {children} - - - - ) - } - - return rtlRender(ui, { wrapper: AllTheProviders, ...options }) -} diff --git a/apps/skolplattformen-app-new/utils/translation.ts b/apps/skolplattformen-app-new/utils/translation.ts deleted file mode 100644 index fce555d7..00000000 --- a/apps/skolplattformen-app-new/utils/translation.ts +++ /dev/null @@ -1,183 +0,0 @@ -import i18n, { TranslateOptions } from 'i18n-js' - -// const i18n = new I18n(); - -interface Language { - langCode: string - languageName: string - languageLocalName: string - locale: string - active: boolean -} - -export const languages: Language[] = [ - { - langCode: 'sv', - languageName: 'Swedish', - languageLocalName: 'Svenska', - locale: 'sv', - active: true, - }, - { - langCode: 'ar', - languageName: 'Arabic', - languageLocalName: 'اَلْعَرَبِيَّةُ', - locale: 'ar', - active: true, - }, - { - langCode: 'zh_Hant', - languageName: 'Chinese (traditional)', - languageLocalName: '繁體中文', - locale: 'zh-cn', - active: true, - }, - { - langCode: 'zh_Hans', - languageName: 'Chinese (simplified)', - languageLocalName: '简体中文', - locale: 'zh-cn', - active: true, - }, - { - langCode: 'nl', - languageName: 'Dutch', - languageLocalName: 'Nederlands', - locale: 'nl', - active: true, - }, - { - langCode: 'en', - languageName: 'English', - languageLocalName: 'English', - locale: 'en', - active: true, - }, - - { - langCode: 'de', - languageName: 'German', - languageLocalName: 'Deutsch', - locale: 'de', - active: true, - }, - - { - langCode: 'fi', - languageName: 'Finnish', - languageLocalName: 'Suomi', - locale: 'fi', - active: true, - }, - { - langCode: 'fr', - languageName: 'French', - languageLocalName: 'Français', - locale: 'fr', - active: true, - }, - { - langCode: 'it', - languageName: 'Italian', - languageLocalName: 'Italiano', - locale: 'it', - active: true, - }, - { - langCode: 'ja', - languageName: 'Japanese', - languageLocalName: '日本語', - locale: 'ja', - active: true, - }, - { - langCode: 'la', - languageName: 'Latin', - languageLocalName: 'Latina', - locale: 'sv', - active: true, - }, - { - langCode: 'nb_NO', - languageName: 'Norwegian Bokmål', - languageLocalName: 'Norsk bokmål', - locale: 'nb', - active: true, - }, - { - langCode: 'pl', - languageName: 'Polish', - languageLocalName: 'Polski', - locale: 'pl', - active: true, - }, - { - langCode: 'pt', - languageName: 'Portuguese', - languageLocalName: 'Português', - locale: 'pt', - active: true, - }, - { - langCode: 'ru', - languageName: 'Russian', - languageLocalName: 'русский', - locale: 'ru', - active: false, - }, - { - langCode: 'so', - languageName: 'Somali', - languageLocalName: 'af-Soomaali', - locale: 'sv', - active: true, - }, - { - langCode: 'es', - languageName: 'Spanish', - languageLocalName: 'Español', - locale: 'es', - active: true, - }, - { - langCode: 'th', - languageName: 'Thai', - languageLocalName: 'ไทย', - locale: 'th', - active: true, - }, - { - langCode: 'uk', - languageName: 'Ukrainian', - languageLocalName: 'український', - locale: 'uk', - active: true, - }, -] - -export const translations = { - ar: require('../translations/ar.json'), - de: require('../translations/de.json'), - en: require('../translations/en.json'), - es: require('../translations/es.json'), - fi: require('../translations/fi.json'), - fr: require('../translations/fr.json'), - it: require('../translations/it.json'), - ja: require('../translations/ja.json'), - la: require('../translations/la.json'), - nb_NO: require('../translations/nb_NO.json'), - nl: require('../translations/nl.json'), - pl: require('../translations/pl.json'), - pt: require('../translations/pt.json'), - ru: require('../translations/ru.json'), - so: require('../translations/so.json'), - sv: require('../translations/sv.json'), - th: require('../translations/th.json'), - uk: require('../translations/uk.json'), - zh_Hans: require('../translations/zh_Hans.json'), - zh_Hant: require('../translations/zh_Hant.json'), -} - -export const translate = (key: string, options?: TranslateOptions) => { - return i18n.t(key, options) -} diff --git a/apps/skolplattformen-app/.babelrc b/apps/skolplattformen-app/.babelrc deleted file mode 100644 index d4b74b5b..00000000 --- a/apps/skolplattformen-app/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["module:metro-react-native-babel-preset"] -} diff --git a/apps/skolplattformen-app/.buckconfig b/apps/skolplattformen-app/.buckconfig deleted file mode 100644 index 934256cb..00000000 --- a/apps/skolplattformen-app/.buckconfig +++ /dev/null @@ -1,6 +0,0 @@ - -[android] - target = Google Inc.:Google APIs:23 - -[maven_repositories] - central = https://repo1.maven.org/maven2 diff --git a/apps/skolplattformen-app-new/.bundle/config b/apps/skolplattformen-app/.bundle/config similarity index 100% rename from apps/skolplattformen-app-new/.bundle/config rename to apps/skolplattformen-app/.bundle/config diff --git a/apps/skolplattformen-app-new/.eslintrc.js b/apps/skolplattformen-app/.eslintrc.js similarity index 100% rename from apps/skolplattformen-app-new/.eslintrc.js rename to apps/skolplattformen-app/.eslintrc.js diff --git a/apps/skolplattformen-app/.eslintrc.json b/apps/skolplattformen-app/.eslintrc.json deleted file mode 100644 index a7fd39f6..00000000 --- a/apps/skolplattformen-app/.eslintrc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": [ - "@react-native-community", - "plugin:react-native-a11y/all", - "plugin:@nrwl/nx/react", - "../../.eslintrc.json" - ], - "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {"no-console":"warn"} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": { - "@typescript-eslint/ban-ts-comment": "off" - } - }, - { - "files": ["*.js", "*.jsx"], - "rules": { - "@typescript-eslint/no-var-requires": "off" - } - } - ] -} diff --git a/apps/skolplattformen-app/.flowconfig b/apps/skolplattformen-app/.flowconfig deleted file mode 100644 index 6009e737..00000000 --- a/apps/skolplattformen-app/.flowconfig +++ /dev/null @@ -1,70 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -/\.buckd/ - -; Ignore polyfills -node_modules/react-native/Libraries/polyfills/.* - -; These should not be required directly -; require from fbjs/lib instead: require('fbjs/lib/warning') -node_modules/warning/.* - -; Flow doesn't support platforms -.*/Libraries/Utilities/LoadingView.js - -[untyped] -.*/node_modules/@react-native-community/cli/.*/.* - -[include] - -[libs] -node_modules/react-native/interface.js -node_modules/react-native/flow/ - -[options] -emoji=true - -esproposal.optional_chaining=enable -esproposal.nullish_coalescing=enable - -module.file_ext=.js -module.file_ext=.json -module.file_ext=.ios.js - -munge_underscores=true - -module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' -module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState - -[lints] -sketchy-null-number=warn -sketchy-null-mixed=warn -sketchy-number=warn -untyped-type-import=warn -nonstrict-import=warn -deprecated-type=warn -unsafe-getters-setters=warn -unnecessary-invariant=warn -signature-verification-failure=warn - -exact_by_default=true - -[strict] -deprecated-type -nonstrict-import -sketchy-null -unclear-type -unsafe-getters-setters -untyped-import -untyped-type-import - -[version] -^0.158.0 diff --git a/apps/skolplattformen-app/.gitattributes b/apps/skolplattformen-app/.gitattributes deleted file mode 100644 index d42ff183..00000000 --- a/apps/skolplattformen-app/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.pbxproj -text diff --git a/apps/skolplattformen-app/.gitignore b/apps/skolplattformen-app/.gitignore index 9055c4ed..fba6c953 100644 --- a/apps/skolplattformen-app/.gitignore +++ b/apps/skolplattformen-app/.gitignore @@ -20,6 +20,7 @@ DerivedData *.hmap *.ipa *.xcuserstate +ios/.xcode.env.local # Android/IntelliJ # @@ -28,6 +29,10 @@ build/ .gradle local.properties *.iml +*.hprof +.cxx/ +!debug.keystore +release/ # node.js # @@ -35,10 +40,6 @@ node_modules/ npm-debug.log yarn-error.log -# BUCK -buck-out/ -\.buckd/ - # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the @@ -46,14 +47,25 @@ buck-out/ # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/ -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output # Bundle artifact *.jsbundle -# CocoaPods +# Ruby / CocoaPods /ios/Pods/ +/vendor/bundle/ -libraries.json \ No newline at end of file +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage + + +libraries.json + +keys.json \ No newline at end of file diff --git a/apps/skolplattformen-app/.nvmrc b/apps/skolplattformen-app/.nvmrc deleted file mode 100644 index 9a0c3d3f..00000000 --- a/apps/skolplattformen-app/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v14.15.4 diff --git a/apps/skolplattformen-app/.watchmanconfig b/apps/skolplattformen-app/.watchmanconfig index 9e26dfee..0967ef42 100644 --- a/apps/skolplattformen-app/.watchmanconfig +++ b/apps/skolplattformen-app/.watchmanconfig @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/apps/skolplattformen-app/App.tsx b/apps/skolplattformen-app/App.tsx index df692246..80500a95 100644 --- a/apps/skolplattformen-app/App.tsx +++ b/apps/skolplattformen-app/App.tsx @@ -1,6 +1,6 @@ import * as eva from '@eva-design/eva' import AsyncStorage from '@react-native-async-storage/async-storage' -import { ApiProvider, Reporter } from '@skolplattformen/hooks' +import { ApiProvider, Reporter } from './libs/hooks/src' import { ApplicationProvider, IconRegistry, Text } from '@ui-kitten/components' import { EvaIconsPack } from '@ui-kitten/eva-icons' import React from 'react' @@ -15,6 +15,7 @@ import { default as customMapping } from './design/mapping.json' import { darkTheme, lightTheme } from './design/themes' import useSettingsStorage from './hooks/useSettingsStorage' import { translations } from './utils/translation' +import { GestureHandlerRootView } from 'react-native-gesture-handler' const reporter: Reporter | undefined = __DEV__ ? { @@ -24,7 +25,6 @@ const reporter: Reporter | undefined = __DEV__ : undefined if (__DEV__) { - // eslint-disable-next-line @typescript-eslint/no-var-requires const DevMenu = require('react-native-dev-menu') DevMenu.addItem('Clear AsyncStorage from all contents', () => AsyncStorage.clear().then(() => logAsyncStorage()) @@ -66,12 +66,13 @@ export default () => { const platform = schoolPlatforms.find((pf) => pf.id === currentSchoolPlatform) - if (!platform) + if (!platform) { return ( ERROR ) + } return ( @@ -97,7 +98,9 @@ export default () => { theme={colorScheme === 'dark' ? darkTheme : lightTheme} > - + + + diff --git a/apps/skolplattformen-app-new/Gemfile b/apps/skolplattformen-app/Gemfile similarity index 100% rename from apps/skolplattformen-app-new/Gemfile rename to apps/skolplattformen-app/Gemfile diff --git a/apps/skolplattformen-app-new/Gemfile.lock b/apps/skolplattformen-app/Gemfile.lock similarity index 100% rename from apps/skolplattformen-app-new/Gemfile.lock rename to apps/skolplattformen-app/Gemfile.lock diff --git a/apps/skolplattformen-app-new/README-NEW.md b/apps/skolplattformen-app/README-NEW.md similarity index 100% rename from apps/skolplattformen-app-new/README-NEW.md rename to apps/skolplattformen-app/README-NEW.md diff --git a/apps/skolplattformen-app/README.md b/apps/skolplattformen-app/README.md index 2407f6a7..f22bc1fc 100644 --- a/apps/skolplattformen-app/README.md +++ b/apps/skolplattformen-app/README.md @@ -1,59 +1,84 @@ -# Öppna skolplattformen App +This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). -This is the app for Öppna skolplattformen. +# Getting Started -## Getting started +>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. -Have a look at the [overall readme](../../) for general instructions on getting started. +## Getting started with Development -### Prerequisites +### Please use node version 16 or higher -We use `yarn` as our package manager. To install it, run `sudo npm install -g yarn`. All the commands described here should be run from the `packages/app` directory. +To clone and build the project, you first need to install [git](https://git-scm.com/), [node](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/cli/v8/commands/npm-install). + +Clone the repo with +```bash +$ git clone https://github.com/Home-Biz-LLS/skolplattformen-react-native +``` + +Install dependencies +```bash +cd apps/skolplattformen-app-new/ && npm i +``` ### iOS -To get started using the iOS simulator start by installing the JavaScript -dependencies using +If you wanna run the iOS app, you need to setup a couple of things first, we have a guide that will assist you in getting started with the iOS app. A Mac is required to build projects with native code for iOS so we do not have support for Linux / Windows. +* [Mac OS](https://reactnative.dev/docs/environment-setup) + +#### Step 1 +Make sure you have **Xcode** installed + + +#### Step 2 +Make sure **CocoaPods** is installed (you can do it easily with homebrew) + +* [CocoaPods homebrew](https://formulae.brew.sh/formula/cocoapods) +* [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) + + +#### Step 3 ```bash -$ yarn +cd apps/skolplattformen-app-new/ios && pod install ``` -Next you need to install the [Cocoapods](https://cocoapods.org/) dependencies -for the iOS project +If you already setup everything, go into the -```bash -$ cd ios -$ pod setup -$ pod install +"skolplattformen-app-new" directory + +Start the metro + +``` +npm run start ``` -You should now be setup to run the app in the Simulator. Run the `ios` command -in the root of the app. +then -```bash -$ yarn ios ``` +i +``` +to Start iOS app + +OR + +Start the iOS app directly +``` +npm run ios +``` + + ### Android -Android development requires that you have [Android Studio](https://developer.android.com/studio) and relevant build tools installed. +If you wanna run the Android app, you need to setup a couple of things first, we have created three different guides depending on your operating system. -Start by installing JavaScript dependencies using +* [Mac OS](/docs/android_mac.md) +* [Windows](/docs/android_windows.md) +* [Linux](/docs/android_linux.md) -```bash -$ yarn +If you already setup everything, you just need to run the following command in the project root: + +``` +yarn run android ``` -Before running the app you should start an emulator from Android Studio. Then -run the following command to start the build - -```bash -$ yarn android -``` - -## Running tests - -```bash -$ yarn test -``` diff --git a/apps/skolplattformen-app/android/app/_BUCK b/apps/skolplattformen-app/android/app/_BUCK deleted file mode 100644 index e4851a5b..00000000 --- a/apps/skolplattformen-app/android/app/_BUCK +++ /dev/null @@ -1,55 +0,0 @@ -# To learn about Buck see [Docs](https://buckbuild.com/). -# To run your application with Buck: -# - install Buck -# - `npm start` - to start the packager -# - `cd android` -# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` -# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck -# - `buck install -r android/app` - compile, install and run application -# - -load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") - -lib_deps = [] - -create_aar_targets(glob(["libs/*.aar"])) - -create_jar_targets(glob(["libs/*.jar"])) - -android_library( - name = "all-libs", - exported_deps = lib_deps, -) - -android_library( - name = "app-code", - srcs = glob([ - "src/main/java/**/*.java", - ]), - deps = [ - ":all-libs", - ":build_config", - ":res", - ], -) - -android_build_config( - name = "build_config", - package = "com.app", -) - -android_resource( - name = "res", - package = "com.app", - res = "src/main/res", -) - -android_binary( - name = "app", - keystore = "//android/keystores:debug", - manifest = "src/main/AndroidManifest.xml", - package_type = "debug", - deps = [ - ":app-code", - ], -) diff --git a/apps/skolplattformen-app/android/app/build.gradle b/apps/skolplattformen-app/android/app/build.gradle index 564e2a27..9ea1a1fc 100644 --- a/apps/skolplattformen-app/android/app/build.gradle +++ b/apps/skolplattformen-app/android/app/build.gradle @@ -1,153 +1,85 @@ apply plugin: "com.android.application" - -import com.android.build.OutputFile +apply plugin: "com.facebook.react" /** - * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets - * and bundleReleaseJsAndAssets). - * These basically call `react-native bundle` with the correct arguments during the Android build - * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the - * bundle directly from the development server. Below you can see all the possible configurations - * and their defaults. If you decide to add a configuration block, make sure to add it before the - * `apply from: "../../node_modules/react-native/react.gradle"` line. - * - * project.ext.react = [ - * // the name of the generated asset file containing your JS bundle - * bundleAssetName: "index.android.bundle", - * - * // the entry file for bundle generation. If none specified and - * // "index.android.js" exists, it will be used. Otherwise "index.js" is - * // default. Can be overridden with ENTRY_FILE environment variable. - * entryFile: "index.android.js", - * - * // https://reactnative.dev/docs/performance#enable-the-ram-format - * bundleCommand: "ram-bundle", - * - * // whether to bundle JS and assets in debug mode - * bundleInDebug: false, - * - * // whether to bundle JS and assets in release mode - * bundleInRelease: true, - * - * // whether to bundle JS and assets in another build variant (if configured). - * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants - * // The configuration property can be in the following formats - * // 'bundleIn${productFlavor}${buildType}' - * // 'bundleIn${buildType}' - * // bundleInFreeDebug: true, - * // bundleInPaidRelease: true, - * // bundleInBeta: true, - * - * // whether to disable dev mode in custom build variants (by default only disabled in release) - * // for example: to disable dev mode in the staging build type (if configured) - * devDisabledInStaging: true, - * // The configuration property can be in the following formats - * // 'devDisabledIn${productFlavor}${buildType}' - * // 'devDisabledIn${buildType}' - * - * // the root of your project, i.e. where "package.json" lives - * root: "../../", - * - * // where to put the JS bundle asset in debug mode - * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", - * - * // where to put the JS bundle asset in release mode - * jsBundleDirRelease: "$buildDir/intermediates/assets/release", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in debug mode - * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in release mode - * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", - * - * // by default the gradle tasks are skipped if none of the JS files or assets change; this means - * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to - * // date; if you have any other folders that you want to ignore for performance reasons (gradle - * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ - * // for example, you might want to remove it from here. - * inputExcludes: ["android/**", "ios/**"], - * - * // override which node gets called and with what additional arguments - * nodeExecutableAndArgs: ["node"], - * - * // supply additional arguments to the packager - * extraPackagerArgs: [] - * ] + * This is the configuration block to customize your React Native Android app. + * By default you don't need to apply any configuration, just uncomment the lines you need. */ +react { + /* Folders */ + // The root of your project, i.e. where "package.json" lives. Default is '..' + // root = file("../") + // The folder where the react-native NPM package is. Default is ../node_modules/react-native + // reactNativeDir = file("../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen + // codegenDir = file("../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js + // cliFile = file("../node_modules/react-native/cli.js") -project.ext.react = [ - entryFile: "apps/skolplattformen-app/index.js", - enableHermes: true, // clean and rebuild if changing -] + /* Variants */ + // The list of variants to that are debuggable. For those we're going to + // skip the bundling of the JS bundle and the assets. By default is just 'debug'. + // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. + // debuggableVariants = ["liteDebug", "prodDebug"] -apply from: "../../node_modules/react-native/react.gradle" + /* Bundling */ + // A list containing the node command and its flags. Default is just 'node'. + // nodeExecutableAndArgs = ["node"] + // + // The command to run when bundling. By default is 'bundle' + // bundleCommand = "ram-bundle" + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // A list of extra flags to pass to the 'bundle' commands. + // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle + // extraPackagerArgs = [] + + /* Hermes Commands */ + // The hermes compiler command to run. By default it is 'hermesc' + // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] +} /** - * Set this to true to create two separate APKs instead of one: - * - An APK that only works on ARM devices - * - An APK that only works on x86 devices - * The advantage is the size of the APK is reduced by about 4MB. - * Upload all the APKs to the Play Store and people will download - * the correct one based on the CPU architecture of their device. - */ -def enableSeparateBuildPerCPUArchitecture = false - -/** - * Run Proguard to shrink the Java bytecode in release builds. + * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ def enableProguardInReleaseBuilds = false /** - * The preferred build flavor of JavaScriptCore. + * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that + * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Whether to enable the Hermes VM. - * - * This should be set on project.ext.react and mirrored here. If it is not set - * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode - * and the benefits of using Hermes will therefore be sharply reduced. - */ -def enableHermes = project.ext.react.get("enableHermes", false); - -/** - * Architectures to build native code for in debug. - */ -def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") - android { + ndkVersion rootProject.ext.ndkVersion + compileSdkVersion rootProject.ext.compileSdkVersion - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - + namespace "com.oppna_skolplattformen_new.app" defaultConfig { - applicationId "org.skolplattformen.app" + applicationId "com.oppna_skolplattformen_new.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 20000 - versionName "3.0.6" - } - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" - } + versionCode 4 + versionName "1.0" } signingConfigs { debug { @@ -157,82 +89,41 @@ android { keyPassword 'android' } release { - storeFile file('release.keystore') - storePassword 'skolplattform' - keyAlias 'skolplattform' - keyPassword 'skolplattform' + storeFile file('release.jks') + storePassword 'leeandseb' + keyAlias 'upload' + keyPassword 'leeandseb' } } buildTypes { debug { signingConfig signingConfigs.debug - if (nativeArchitectures) { - ndk { - abiFilters nativeArchitectures.split(',') - } - } - } release { // Caution! In production, you need to generate your own keystore file. // see https://reactnative.dev/docs/signed-apk-android. signingConfig signingConfigs.release - minifyEnabled enableProguardInReleaseBuilds + minifyEnabled true proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode - } - - } - } } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - //noinspection GradleDynamicVersion - implementation "com.facebook.react:react-native:+" // From node_modules - - implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" - - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { - exclude group:'com.facebook.fbjni' - } + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' exclude group:'com.squareup.okhttp3', module:'okhttp' } - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - } - - if (enableHermes) { - def hermesPath = "../../node_modules/hermes-engine/android/"; - debugImplementation files(hermesPath + "hermes-debug.aar") - releaseImplementation files(hermesPath + "hermes-release.aar") + debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") } else { implementation jscFlavor } - -} - -// Run this once to be able to run the application with BUCK -// puts all compile dependencies into folder libs for BUCK to use -task copyDownloadableDepsToLibs(type: Copy) { - from configurations.implementation - into 'libs' } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/apps/skolplattformen-app/android/app/build_defs.bzl b/apps/skolplattformen-app/android/app/build_defs.bzl deleted file mode 100644 index fff270f8..00000000 --- a/apps/skolplattformen-app/android/app/build_defs.bzl +++ /dev/null @@ -1,19 +0,0 @@ -"""Helper definitions to glob .aar and .jar targets""" - -def create_aar_targets(aarfiles): - for aarfile in aarfiles: - name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] - lib_deps.append(":" + name) - android_prebuilt_aar( - name = name, - aar = aarfile, - ) - -def create_jar_targets(jarfiles): - for jarfile in jarfiles: - name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] - lib_deps.append(":" + name) - prebuilt_jar( - name = name, - binary_jar = jarfile, - ) diff --git a/apps/skolplattformen-app-new/android/app/release.jks b/apps/skolplattformen-app/android/app/release.jks similarity index 100% rename from apps/skolplattformen-app-new/android/app/release.jks rename to apps/skolplattformen-app/android/app/release.jks diff --git a/apps/skolplattformen-app/android/app/release.keystore b/apps/skolplattformen-app/android/app/release.keystore index 6bef3f4e..3f0a4ced 100644 Binary files a/apps/skolplattformen-app/android/app/release.keystore and b/apps/skolplattformen-app/android/app/release.keystore differ diff --git a/apps/skolplattformen-app/android/app/src/debug/AndroidManifest.xml b/apps/skolplattformen-app/android/app/src/debug/AndroidManifest.xml index fa3e4f9a..4b185bc1 100644 --- a/apps/skolplattformen-app/android/app/src/debug/AndroidManifest.xml +++ b/apps/skolplattformen-app/android/app/src/debug/AndroidManifest.xml @@ -8,5 +8,6 @@ android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning"> + diff --git a/apps/skolplattformen-app/android/app/src/debug/java/com/app/ReactNativeFlipper.java b/apps/skolplattformen-app/android/app/src/debug/java/com/app/ReactNativeFlipper.java index 9f3d347f..9d6fd920 100644 --- a/apps/skolplattformen-app/android/app/src/debug/java/com/app/ReactNativeFlipper.java +++ b/apps/skolplattformen-app/android/app/src/debug/java/com/app/ReactNativeFlipper.java @@ -1,14 +1,12 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and affiliates. * *

This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. */ -package com.app; +package com.oppna_skolplattformen_new.app; import android.content.Context; -import android.util.Log; - import com.facebook.flipper.android.AndroidFlipperClient; import com.facebook.flipper.android.utils.FlipperUtils; import com.facebook.flipper.core.FlipperClient; @@ -19,27 +17,23 @@ import com.facebook.flipper.plugins.inspector.DescriptorMapping; import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; +import com.facebook.react.ReactInstanceEventListener; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - -import okhttp3.Cookie; -import okhttp3.CookieJar; import okhttp3.OkHttpClient; +/** + * Class responsible of loading Flipper inside your React Native application. This is the debug + * flavor of it. Here you can add your own plugins and customize the Flipper setup. + */ public class ReactNativeFlipper { public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { if (FlipperUtils.shouldEnableFlipper(context)) { final FlipperClient client = AndroidFlipperClient.getInstance(context); client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new ReactFlipperPlugin()); client.addPlugin(new DatabasesFlipperPlugin(context)); client.addPlugin(new SharedPreferencesFlipperPlugin(context)); client.addPlugin(CrashReporterPlugin.getInstance()); @@ -49,7 +43,6 @@ public class ReactNativeFlipper { new NetworkingModule.CustomClientBuilder() { @Override public void apply(OkHttpClient.Builder builder) { - builder.callTimeout(5000, TimeUnit.MILLISECONDS); builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); } }); @@ -61,7 +54,7 @@ public class ReactNativeFlipper { ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceManager.ReactInstanceEventListener() { + new ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); diff --git a/apps/skolplattformen-app/android/app/src/main/AndroidManifest.xml b/apps/skolplattformen-app/android/app/src/main/AndroidManifest.xml index ce01587e..8af2453d 100644 --- a/apps/skolplattformen-app/android/app/src/main/AndroidManifest.xml +++ b/apps/skolplattformen-app/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + @@ -11,23 +10,15 @@ android:theme="@style/AppTheme"> + android:windowSoftInputMode="adjustResize" + android:exported="true"> - - - - - - - - diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Black.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Black.ttf deleted file mode 100644 index a9520b78..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Black.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-BlackItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-BlackItalic.ttf deleted file mode 100644 index ebfdd707..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-BlackItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Bold.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Bold.ttf deleted file mode 100644 index b94d47f3..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Bold.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-BoldItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-BoldItalic.ttf deleted file mode 100644 index e2e64456..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-BoldItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraBold.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraBold.ttf deleted file mode 100644 index 8f008c36..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraBold.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraBoldItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraBoldItalic.ttf deleted file mode 100644 index b2a9bf55..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraBoldItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraLight.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraLight.ttf deleted file mode 100644 index ee623825..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraLight.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraLightItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraLightItalic.ttf deleted file mode 100644 index e392492a..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ExtraLightItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Italic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Italic.ttf deleted file mode 100644 index 46203996..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Italic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Light.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Light.ttf deleted file mode 100644 index 2ab02219..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Light.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-LightItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-LightItalic.ttf deleted file mode 100644 index 6f9279da..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-LightItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Medium.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Medium.ttf deleted file mode 100644 index e90e87ed..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Medium.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-MediumItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-MediumItalic.ttf deleted file mode 100644 index d8a251c7..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-MediumItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Regular.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Regular.ttf deleted file mode 100644 index be06e7fd..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Regular.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-SemiBold.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-SemiBold.ttf deleted file mode 100644 index dabf7c24..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-SemiBold.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-SemiBoldItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-SemiBoldItalic.ttf deleted file mode 100644 index 29d5f741..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-SemiBoldItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Thin.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Thin.ttf deleted file mode 100644 index f5c0fdd5..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-Thin.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ThinItalic.ttf b/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ThinItalic.ttf deleted file mode 100644 index b9100893..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/assets/fonts/Poppins-ThinItalic.ttf and /dev/null differ diff --git a/apps/skolplattformen-app/android/app/src/main/ic_launcher-playstore.png b/apps/skolplattformen-app/android/app/src/main/ic_launcher-playstore.png deleted file mode 100644 index 215f5e01..00000000 Binary files a/apps/skolplattformen-app/android/app/src/main/ic_launcher-playstore.png and /dev/null differ diff --git a/apps/skolplattformen-app-new/android/app/src/main/java/com/app/MainActivity.java b/apps/skolplattformen-app/android/app/src/main/java/com/app/MainActivity.java similarity index 100% rename from apps/skolplattformen-app-new/android/app/src/main/java/com/app/MainActivity.java rename to apps/skolplattformen-app/android/app/src/main/java/com/app/MainActivity.java diff --git a/apps/skolplattformen-app-new/android/app/src/main/java/com/app/MainApplication.java b/apps/skolplattformen-app/android/app/src/main/java/com/app/MainApplication.java similarity index 100% rename from apps/skolplattformen-app-new/android/app/src/main/java/com/app/MainApplication.java rename to apps/skolplattformen-app/android/app/src/main/java/com/app/MainApplication.java diff --git a/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/CookieInterceptor.java b/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/CookieInterceptor.java deleted file mode 100644 index 66fa96a8..00000000 --- a/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/CookieInterceptor.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.skolplattformen.app; - -import android.util.Log; - -import org.jetbrains.annotations.NotNull; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import kotlin.Pair; -import okhttp3.Cookie; -import okhttp3.CookieJar; -import okhttp3.HttpUrl; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -class CookieInterceptor implements Interceptor { - private final List cookies; - private final CookieJar cookieJar; - - public CookieInterceptor(CookieJar cookieJar) { - this.cookies = new ArrayList<>(); - this.cookieJar = cookieJar; - } - - @NotNull - @Override - public Response intercept(@NotNull Chain chain) throws IOException { - // TODO: Clean up the code so only the necessary feeding of cookies to - // the cookie jar remains. That is needed because of: - // https://reactnative.dev/docs/0.64/network#known-issues-with-fetch-and-cookie-based-authentication - // Specifically react native's fetch does not respect multiple `set-cookie` headers and only - // seem to set one cookie per request. Some of the login calls in the api-hjarntorget lib - // receives multiple `set-cookie` headers. - String domain = chain.request().url().topPrivateDomain(); - Log.d("Skolplattformen", "requseting resource on domain: " + domain); - if(domain == null || !domain.contains("goteborg.se") && !domain.contains("funktionstjanster.se")) { - return chain.proceed(chain.request()); - } - - Log.d("Skolplattformen", "\n\n<<<<<<<<<<<<<<<<<<<<< BEGIN >>>>>>>>>>>>>>>>>>"); - Log.d("Skolplattformen", "" + chain.request().method() + " " + chain.request().url()); - Log.d("Skolplattformen", "url have length: " + chain.request().url().toString().length()); - Iterator> iterator = chain.request().headers().iterator(); - while (iterator.hasNext()) { - Pair header = iterator.next(); - Log.d("Skolplattformen", "SENT " + header.getFirst() + ": " + header.getSecond() + ""); - } - Request request = chain.request(); - Response response = chain.proceed(request); - - String location = response.header("Location"); - location = location != null ? location : ""; - Log.d("Skolplattformen", "url=" + response.request().url()); - Log.d("Skolplattformen", "isRedirect=" + response.isRedirect()); - Log.d("Skolplattformen", "responseCode=" + response.code()); - Log.d("Skolplattformen", "redirectUri has length=" + location.length()); - - iterator = response.headers().iterator(); - cookies.clear(); - while (iterator.hasNext()) { - Pair header = iterator.next(); - Log.d("Skolplattformen", "RECEIVED " + header.getFirst() + ": " + header.getSecond() + ""); - if (header.getFirst().equals("Set-Cookie")) { - Cookie c = Cookie.parse(response.request().url(), header.getSecond()); - cookies.add(c); - } - } - - HttpUrl url = new HttpUrl.Builder().host(request.url().host()).scheme("https").build(); - cookieJar.saveFromResponse(url, cookies); - Log.d("Skolplattformen", "<<<<<<<<<<<<<<<<<<<<< END >>>>>>>>>>>>>>>>>>\n\n"); - return response; - - } -} diff --git a/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/MainActivity.java b/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/MainActivity.java deleted file mode 100644 index db9b9a81..00000000 --- a/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/MainActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.skolplattformen.app; - -import com.facebook.react.ReactActivity; - -public class MainActivity extends ReactActivity { - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "app"; - } -} diff --git a/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/MainApplication.java b/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/MainApplication.java deleted file mode 100644 index f076fb5b..00000000 --- a/apps/skolplattformen-app/android/app/src/main/java/org/skolplattformen/app/MainApplication.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.skolplattformen.app; - -import android.app.Application; -import android.content.Context; -import android.util.Log; - -import com.facebook.react.PackageList; -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.OkHttpClientProvider; -import com.facebook.react.modules.network.ReactCookieJarContainer; -import com.facebook.soloader.SoLoader; - -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.util.Collections; -import java.util.List; - -import okhttp3.CookieJar; -import okhttp3.Interceptor; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; - -public class MainApplication extends Application implements ReactApplication { - private final ReactNativeHost mReactNativeHost = - new ReactNativeHost(this) { - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - @SuppressWarnings("UnnecessaryLocalVariable") - List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "apps/skolplattformen-app/index"; - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } - - @Override - public void onCreate() { - super.onCreate(); - SoLoader.init(this, /* native exopackage */ false); - initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - - OkHttpClientProvider.setOkHttpClientFactory(() -> { - ReactContext currentReactContext = mReactNativeHost.getReactInstanceManager().getCurrentReactContext(); - OkHttpClient.Builder builder = OkHttpClientProvider.createClientBuilder(currentReactContext); - @SuppressWarnings("KotlinInternalInJava") CookieJar cookieJar = builder.getCookieJar$okhttp(); - builder.addNetworkInterceptor(new CookieInterceptor(cookieJar)); - return builder.build(); - }); - } - - /** - * Loads Flipper in React Native templates. Call this in the onCreate method with something like - * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - * - * @param context - * @param reactInstanceManager - */ - private static void initializeFlipper( - Context context, ReactInstanceManager reactInstanceManager) { - if (BuildConfig.DEBUG) { - try { - /* - We use reflection here to pick up the class that initializes Flipper, - since Flipper library is not available in release mode - */ - Class aClass = Class.forName("com.app.ReactNativeFlipper"); - aClass - .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) - .invoke(null, context, reactInstanceManager); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } - } - } - - -} diff --git a/apps/skolplattformen-app-new/android/app/src/main/res/drawable/rn_edit_text_material.xml b/apps/skolplattformen-app/android/app/src/main/res/drawable/rn_edit_text_material.xml similarity index 100% rename from apps/skolplattformen-app-new/android/app/src/main/res/drawable/rn_edit_text_material.xml rename to apps/skolplattformen-app/android/app/src/main/res/drawable/rn_edit_text_material.xml diff --git a/apps/skolplattformen-app/android/app/src/main/res/values/strings.xml b/apps/skolplattformen-app/android/app/src/main/res/values/strings.xml index ae9ef7bd..6614fac3 100644 --- a/apps/skolplattformen-app/android/app/src/main/res/values/strings.xml +++ b/apps/skolplattformen-app/android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - Öppna Skolplattformen + Öppna Skolplattformen NEW diff --git a/apps/skolplattformen-app/android/app/src/main/res/values/styles.xml b/apps/skolplattformen-app/android/app/src/main/res/values/styles.xml index 691a5285..955d1571 100644 --- a/apps/skolplattformen-app/android/app/src/main/res/values/styles.xml +++ b/apps/skolplattformen-app/android/app/src/main/res/values/styles.xml @@ -1,5 +1,7 @@ + diff --git a/apps/skolplattformen-app/android/build.gradle b/apps/skolplattformen-app/android/build.gradle index ce281b99..34ea7181 100644 --- a/apps/skolplattformen-app/android/build.gradle +++ b/apps/skolplattformen-app/android/build.gradle @@ -2,46 +2,20 @@ buildscript { ext { - buildToolsVersion = "30.0.2" + buildToolsVersion = "33.0.0" minSdkVersion = 21 - compileSdkVersion = 31 - targetSdkVersion = 31 - ndkVersion = "21.4.7075529" - kotlinVersion = "1.6.0" + compileSdkVersion = 33 + targetSdkVersion = 33 + + // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. + ndkVersion = "23.1.7779620" } repositories { google() mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:4.2.2") - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - mavenCentral() - mavenLocal() - maven { - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url("$rootDir/../node_modules/react-native/android") - } - maven { - // Android JSC is installed from npm - url("$rootDir/../node_modules/jsc-android/dist") - } - - google() - maven { url 'https://www.jitpack.io' } - } -} - -subprojects { - configurations.all { - resolutionStrategy { - force 'androidx.vectordrawable:vectordrawable-animated:1.1.0' - } + classpath("com.android.tools.build:gradle") + classpath("com.facebook.react:react-native-gradle-plugin") } } diff --git a/apps/skolplattformen-app-new/android/fastlane/Appfile b/apps/skolplattformen-app/android/fastlane/Appfile similarity index 100% rename from apps/skolplattformen-app-new/android/fastlane/Appfile rename to apps/skolplattformen-app/android/fastlane/Appfile diff --git a/apps/skolplattformen-app-new/android/fastlane/Fastfile b/apps/skolplattformen-app/android/fastlane/Fastfile similarity index 100% rename from apps/skolplattformen-app-new/android/fastlane/Fastfile rename to apps/skolplattformen-app/android/fastlane/Fastfile diff --git a/apps/skolplattformen-app/android/gradle.deps b/apps/skolplattformen-app/android/gradle.deps deleted file mode 100644 index 138daaf6..00000000 --- a/apps/skolplattformen-app/android/gradle.deps +++ /dev/null @@ -1 +0,0 @@ -02dd6e8cd1138dfaefd4e955be6e632bb9d61118ebc852e464cbf7f913017022a61be5c76153ce2218ccbd83e3f9aec2 \ No newline at end of file diff --git a/apps/skolplattformen-app/android/gradle.properties b/apps/skolplattformen-app/android/gradle.properties index ae54b0c2..a3b2fa12 100644 --- a/apps/skolplattformen-app/android/gradle.properties +++ b/apps/skolplattformen-app/android/gradle.properties @@ -1,17 +1,44 @@ -## For more details on how to configure your build environment visit +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html -# + # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx1024m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -# +# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m + # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -#Thu Apr 01 10:00:57 CEST 2021 -FLIPPER_VERSION=0.99.0 -android.enableJetifier=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true -org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true + +# Version of flipper SDK to use with React Native +FLIPPER_VERSION=0.182.0 + +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 + +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +newArchEnabled=false + +# Use this property to enable or disable the Hermes JS engine. +# If set to false, you will be using JSC instead. +hermesEnabled=true diff --git a/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.jar b/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.jar index f3d88b1c..943f0cbf 100644 Binary files a/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.jar and b/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.properties b/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.properties index 7665b0fa..6ec1567a 100644 --- a/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.properties +++ b/apps/skolplattformen-app/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/skolplattformen-app/android/gradlew b/apps/skolplattformen-app/android/gradlew index 2fe81a7d..65dcd68d 100755 --- a/apps/skolplattformen-app/android/gradlew +++ b/apps/skolplattformen-app/android/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,78 +17,113 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -105,79 +140,105 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/apps/skolplattformen-app/android/gradlew.bat b/apps/skolplattformen-app/android/gradlew.bat old mode 100755 new mode 100644 index cc0d3f1a..6689b85b --- a/apps/skolplattformen-app/android/gradlew.bat +++ b/apps/skolplattformen-app/android/gradlew.bat @@ -1,103 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/apps/skolplattformen-app/android/settings.gradle b/apps/skolplattformen-app/android/settings.gradle index b98c2182..e4bc8891 100644 --- a/apps/skolplattformen-app/android/settings.gradle +++ b/apps/skolplattformen-app/android/settings.gradle @@ -1,3 +1,4 @@ rootProject.name = 'app' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' +includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/apps/skolplattformen-app-new/babel.config.js b/apps/skolplattformen-app/babel.config.js similarity index 100% rename from apps/skolplattformen-app-new/babel.config.js rename to apps/skolplattformen-app/babel.config.js diff --git a/apps/skolplattformen-app/components/__tests__/Absence.test.js b/apps/skolplattformen-app/components/__tests__/Absence.test.js index 076d803e..3a6901e6 100644 --- a/apps/skolplattformen-app/components/__tests__/Absence.test.js +++ b/apps/skolplattformen-app/components/__tests__/Absence.test.js @@ -1,6 +1,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage' import { useRoute } from '@react-navigation/native' -import { useUser } from '@skolplattformen/hooks' +import { useUser } from '../../libs/hooks/src' import { fireEvent, waitFor } from '@testing-library/react-native' import Mockdate from 'mockdate' import React from 'react' @@ -12,7 +12,7 @@ let sendSMS let user = { personalNumber: '201701092395' } jest.mock('../../utils/SMS') -jest.mock('@skolplattformen/hooks') +jest.mock('../../libs/hooks/src') const setup = (customProps = {}) => { sendSMS = jest.fn() diff --git a/apps/skolplattformen-app/components/__tests__/Children.test.js b/apps/skolplattformen-app/components/__tests__/Children.test.js index 2913e469..0d518993 100644 --- a/apps/skolplattformen-app/components/__tests__/Children.test.js +++ b/apps/skolplattformen-app/components/__tests__/Children.test.js @@ -1,3 +1,4 @@ +import 'setImmediate' import { useNavigation } from '@react-navigation/core' import { useApi, @@ -9,14 +10,16 @@ import { useNotifications, useSchedule, useTimetable, -} from '@skolplattformen/hooks' +} from '../../libs/hooks/src' import React from 'react' import * as RNLocalize from 'react-native-localize' import { render } from '../../utils/testHelpers' import { translate } from '../../utils/translation' import { Children } from '../children.component' -jest.mock('@skolplattformen/hooks') +jest.mock('../../libs/hooks/src') + +const pause = (ms = 0) => new Promise((r) => setTimeout(r, ms)) const setup = () => { return render() @@ -41,14 +44,13 @@ beforeEach(() => { useNavigation.mockReturnValue({ navigate: jest.fn(), setOptions: jest.fn() }) }) -test('renders loading state', () => { +test('renders loading state', async () => { useChildList.mockImplementationOnce(() => ({ data: [], status: 'loading', })) const screen = setup() - expect(screen.getByText(translate('general.loading'))).toBeTruthy() }) @@ -57,7 +59,6 @@ test('renders empty state message', () => { data: [], status: 'loaded', })) - const screen = setup() expect( @@ -177,7 +178,6 @@ test('renders child in class', () => { ], status: 'loaded', })) - const screen = setup() expect(screen.getByText('Test Testsson')).toBeTruthy() @@ -194,7 +194,6 @@ test('removes any parenthesis from name', () => { ], status: 'loaded', })) - const screen = setup() expect(screen.getByText('Test Testsson')).toBeTruthy() @@ -210,7 +209,6 @@ test('handles multiple statuses for a child', () => { ], status: 'loaded', })) - const screen = setup() var multipleStatusesRendered = `${translate( diff --git a/apps/skolplattformen-app/components/__tests__/Classmates.test.js b/apps/skolplattformen-app/components/__tests__/Classmates.test.js index 597dab5a..3b47326e 100644 --- a/apps/skolplattformen-app/components/__tests__/Classmates.test.js +++ b/apps/skolplattformen-app/components/__tests__/Classmates.test.js @@ -1,10 +1,10 @@ -import { useClassmates } from '@skolplattformen/hooks' +import { useClassmates } from '../../libs/hooks/src' import React from 'react' import { render } from '../../utils/testHelpers' import { ChildProvider } from '../childContext.component' import { Classmates } from '../classmates.component' -jest.mock('@skolplattformen/hooks') +jest.mock('../../libs/hooks/src') const defaultClassmates = [ { diff --git a/apps/skolplattformen-app/components/__tests__/ContactMenu.test.js b/apps/skolplattformen-app/components/__tests__/ContactMenu.test.js index aa9cf869..a9bf9720 100644 --- a/apps/skolplattformen-app/components/__tests__/ContactMenu.test.js +++ b/apps/skolplattformen-app/components/__tests__/ContactMenu.test.js @@ -3,6 +3,7 @@ import React from 'react' import { Linking } from 'react-native' import { render } from '../../utils/testHelpers' import { ContactMenu } from '../contactMenu.component' +import { act } from 'react-test-renderer' const defaultGuardian = { address: 'Testgatan', @@ -73,8 +74,8 @@ test('hides options to call and text if no phone number', () => { fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - expect(screen.getByTestId('CallMenuItem')).toHaveStyle({ display: 'none' }) - expect(screen.getByTestId('SMSMenuItem')).toHaveStyle({ display: 'none' }) + expect(screen.queryByTestId('CallMenuItem')).toBeNull() + expect(screen.queryByTestId('SMSMenuItem')).toBeNull() }) test('displays option to email guardian', () => { @@ -102,9 +103,7 @@ test('hides options to email phone number', () => { fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - expect(screen.getByTestId('SendEmailMenuItem')).toHaveStyle({ - display: 'none', - }) + expect(screen.queryByTestId('SendEmailMenuItem')).toBeNull() }) test('displays address of guardian', () => { @@ -134,7 +133,5 @@ test('hides address if it does not exist', () => { fireEvent.press(screen.getByTestId('ShowContactInfoButton')) - expect(screen.getByTestId('ShowHomeMenuItem')).toHaveStyle({ - display: 'none', - }) + expect(screen.queryByTestId('ShowHomeMenuItem')).toBeNull() }) diff --git a/apps/skolplattformen-app/components/__tests__/Menu.test.js b/apps/skolplattformen-app/components/__tests__/Menu.test.js index a78811fd..4f7fad18 100644 --- a/apps/skolplattformen-app/components/__tests__/Menu.test.js +++ b/apps/skolplattformen-app/components/__tests__/Menu.test.js @@ -1,10 +1,10 @@ -import { useMenu } from '@skolplattformen/hooks' +import { useMenu } from '../../libs/hooks/src' import React from 'react' import { render } from '../../utils/testHelpers' import { translate } from '../../utils/translation' import { Menu } from '../menu.component' -jest.mock('@skolplattformen/hooks') +jest.mock('../../libs/hooks/src') const defaultItemList = [ { diff --git a/apps/skolplattformen-app/components/__tests__/NewsItem.test.js b/apps/skolplattformen-app/components/__tests__/NewsItem.test.js index 6005fa7c..7d7670cf 100644 --- a/apps/skolplattformen-app/components/__tests__/NewsItem.test.js +++ b/apps/skolplattformen-app/components/__tests__/NewsItem.test.js @@ -1,9 +1,9 @@ -import { useApi, useNewsDetails } from '@skolplattformen/hooks' +import { useApi, useNewsDetails } from '../../libs/hooks/src' import React from 'react' import { render } from '../../utils/testHelpers' import { NewsItem } from '../newsItem.component' -jest.mock('@skolplattformen/hooks') +jest.mock('../../libs/hooks/src') const defaultNewsItem = { author: 'Köket', @@ -17,6 +17,7 @@ let navigation const setup = (customProps = { newsItem: {} }) => { useApi.mockReturnValue({ api: { getSessionCookie: jest.fn() } }) + useNewsDetails.mockReturnValue({ data: { body: 'Nu blir det köttbullar', @@ -46,7 +47,7 @@ const setup = (customProps = { newsItem: {} }) => { return render() } -test('gets article details using useNewsDetails', () => { +test('gets article details using useNewsDetails', async () => { setup() expect(useNewsDetails).toHaveBeenCalledWith({ id: 1 }, defaultNewsItem) @@ -65,7 +66,6 @@ test('renders an article without published date if date is invalid', () => { ...defaultNewsItem, published: '2020-08-16T21:10:00.000+02:0', } - const screen = setup({ newsItem: newsItemWithoutPublishedDate }) expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() @@ -78,7 +78,6 @@ test('renders an article without modified date if date is invalid', () => { ...defaultNewsItem, modified: null, } - const screen = setup({ newsItem: newsItemWithoutPublishedDate }) expect(screen.getByText(/nu blir det köttbullar/i)).toBeTruthy() diff --git a/apps/skolplattformen-app/components/__tests__/Notification.test.js b/apps/skolplattformen-app/components/__tests__/Notification.test.js index 3a205795..91bcec08 100644 --- a/apps/skolplattformen-app/components/__tests__/Notification.test.js +++ b/apps/skolplattformen-app/components/__tests__/Notification.test.js @@ -10,6 +10,15 @@ const defaultItem = { dateModified: '2021-02-15T09:14:28.484Z', } +// copied from https://github.com/react-native-webview/react-native-webview/issues/2934#issuecomment-1524101977 +jest.mock('react-native-webview', () => { + const { View } = require('react-native') + return { + WebView: View, + } +}) +// + const setup = (customProps = {}) => { const props = { item: defaultItem, diff --git a/apps/skolplattformen-app/components/absence.component.tsx b/apps/skolplattformen-app/components/absence.component.tsx index 39464d10..05bfad47 100644 --- a/apps/skolplattformen-app/components/absence.component.tsx +++ b/apps/skolplattformen-app/components/absence.component.tsx @@ -1,6 +1,6 @@ import { RouteProp, useRoute } from '@react-navigation/native' import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { useUser } from '@skolplattformen/hooks' +import { useUser } from '../libs/hooks/src' import { Button, CheckBox, @@ -17,7 +17,7 @@ import { View } from 'react-native' import DateTimePickerModal from 'react-native-modal-datetime-picker' import * as Yup from 'yup' import { defaultStackStyling } from '../design/navigationThemes' -import usePersonalStorage from '../hooks/usePersonalStorage' +// import usePersonalStorage from '../hooks/usePersonalStorage'; import useSettingsStorage from '../hooks/useSettingsStorage' import { Layout as LayoutStyle, Sizing, Typography } from '../styles' import { studentName } from '../utils/peopleHelpers' diff --git a/apps/skolplattformen-app/components/auth.component.tsx b/apps/skolplattformen-app/components/auth.component.tsx index 3983ff17..c1d6ba30 100644 --- a/apps/skolplattformen-app/components/auth.component.tsx +++ b/apps/skolplattformen-app/components/auth.component.tsx @@ -52,6 +52,7 @@ export const Auth: React.FC = ({ navigation }) => { const styles = useStyleSheet(themeStyles) const colors = useTheme() const { t } = useTranslation() + // const t = (key: string) => key; return ( @@ -60,12 +61,16 @@ export const Auth: React.FC = ({ navigation }) => { navigation.navigate('Settings')} - accessibilityHint={t('auth.a11y_navigate_to_settings', { - defaultValue: 'Navigerar till vyn för inställningar', - })} - accessibilityLabel={t('auth.a11y_settings', { - defaultValue: 'Inställningar', - })} + accessibilityHint={t( + 'auth.a11y_navigate_to_settings' + // defaultValue: 'Navigerar till vyn för inställningar', + )} + accessibilityLabel={t( + 'auth.a11y_settings' + // { + // // defaultValue: 'Inställningar', + // } + )} > = ({ navigation }) => { diff --git a/apps/skolplattformen-app/components/calendar.component.tsx b/apps/skolplattformen-app/components/calendar.component.tsx index 25c9b6d1..a5b9ead4 100644 --- a/apps/skolplattformen-app/components/calendar.component.tsx +++ b/apps/skolplattformen-app/components/calendar.component.tsx @@ -1,4 +1,4 @@ -import { useCalendar } from '@skolplattformen/hooks' +import { useCalendar } from '../libs/hooks/src' import { CalendarItem } from '@skolplattformen/api' import { Divider, @@ -10,14 +10,17 @@ import { } from '@ui-kitten/components' import moment from 'moment' import React from 'react' -import { ListRenderItemInfo, RefreshControl, View } from 'react-native' import { Layout as LayoutStyle, Sizing, Typography } from '../styles' +import { ListRenderItemInfo, RefreshControl, View } from 'react-native' + import { translate } from '../utils/translation' import { useChild } from './childContext.component' import { CalendarOutlineIcon } from './icon.component' import { SaveToCalendar } from './saveToCalendar.component' import { Week } from './week.component' +// const translate = (key: string) => key; + export const Calendar = () => { const child = useChild() const { data, status, reload } = useCalendar(child) @@ -35,7 +38,9 @@ export const Calendar = () => { } const sortedData = () => { - if (!data) return [] + if (!data) { + return [] + } return data.sort((a, b) => a.startDate && b.startDate ? a.startDate.localeCompare(b.startDate) : 0 diff --git a/apps/skolplattformen-app/components/child.component.tsx b/apps/skolplattformen-app/components/child.component.tsx index c7985cb6..e5bd91fb 100644 --- a/apps/skolplattformen-app/components/child.component.tsx +++ b/apps/skolplattformen-app/components/child.component.tsx @@ -6,10 +6,10 @@ import { useRoute, } from '@react-navigation/native' import { NativeStackNavigationOptions } from '@react-navigation/native-stack' -import { StackNavigationProp } from '@react-navigation/stack' +// import {StackNavigationProp} from '@react-navigation/stack'; import { Icon } from '@ui-kitten/components' import React, { useEffect } from 'react' -import { StyleProp, TextProps } from 'react-native' +// import {StyleProp, TextProps} from 'react-native'; import { defaultStackStyling } from '../design/navigationThemes' import { useFeature } from '../hooks/useFeature' import { studentName } from '../utils/peopleHelpers' @@ -24,7 +24,9 @@ import { NewsList } from './newsList.component' import { NotificationsList } from './notificationsList.component' import { TabBarLabel } from './tabBarLabel.component' -type ChildNavigationProp = StackNavigationProp +// const translate = (key: string) => key; + +// type ChildNavigationProp = StackNavigationProp; type ChildRouteProps = RouteProp export type ChildTabParamList = { @@ -35,10 +37,10 @@ export type ChildTabParamList = { Classmates: undefined } -interface TabTitleProps { - children: string - style?: StyleProp -} +// interface TabTitleProps { +// children: string; +// style?: StyleProp; +// } const { Navigator, Screen } = createBottomTabNavigator() @@ -76,16 +78,17 @@ const TabNavigator = ({ tabBarIcon: ({ focused, color }) => { let iconName = 'news' - if (route.name === 'News') + if (route.name === 'News') { iconName = focused ? 'book-open' : 'book-open-outline' - else if (route.name === 'Notifications') + } else if (route.name === 'Notifications') { iconName = focused ? 'alert-circle' : 'alert-circle-outline' - else if (route.name === 'Calendar') + } else if (route.name === 'Calendar') { iconName = focused ? 'calendar' : 'calendar-outline' - else if (route.name === 'Menu') + } else if (route.name === 'Menu') { iconName = focused ? 'clipboard' : 'clipboard-outline' - else if (route.name === 'Classmates') + } else if (route.name === 'Classmates') { iconName = focused ? 'people' : 'people-outline' + } return }, } @@ -139,7 +142,10 @@ const TabNavigator = ({ ) const getHeaderTitle = (route: any) => { - const routeName = getFocusedRouteNameFromRoute(route) ?? 'News' + const routeName = + getFocusedRouteNameFromRoute(route) ?? + route.params.initialRouteName ?? + 'News' return getRouteTitleFromName(routeName) } diff --git a/apps/skolplattformen-app/components/childListItem.component.tsx b/apps/skolplattformen-app/components/childListItem.component.tsx index 8ca199f5..ee3a36b1 100644 --- a/apps/skolplattformen-app/components/childListItem.component.tsx +++ b/apps/skolplattformen-app/components/childListItem.component.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react-native-a11y/has-accessibility-hint */ import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' import { Child } from '@skolplattformen/api' @@ -9,7 +8,7 @@ import { useNews, useNotifications, useSchedule, -} from '@skolplattformen/hooks' +} from '../libs/hooks/src' import { Button, StyleService, @@ -18,7 +17,7 @@ import { } from '@ui-kitten/components' import moment, { Moment } from 'moment' import React, { useEffect } from 'react' -import { TouchableOpacity, useColorScheme, View } from 'react-native' +import { Pressable, useColorScheme, View } from 'react-native' import { useTranslation } from '../hooks/useTranslation' import { Colors, Layout, Sizing } from '../styles' import { getMeaningfulStartingDate } from '../utils/calendarHelpers' @@ -51,9 +50,12 @@ export const ChildListItem = ({ }, [child.id]) const navigation = useNavigation() + const { t } = useTranslation() + const { data: notifications, reload: notificationsReload } = useNotifications(child) + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { data: news, status: newsStatus, reload: newsReload } = useNews(child) const { data: classmates, reload: classmatesReload } = useClassmates(child) const { data: calendar, reload: calendarReload } = useCalendar(child) @@ -66,7 +68,9 @@ export const ChildListItem = ({ useEffect(() => { // Do not refresh if updated is empty (first render of component) - if (updated === '') return + if (updated === '') { + return + } newsReload() classmatesReload() @@ -157,51 +161,76 @@ export const ChildListItem = ({ ) return ( - navigation.navigate('Child', { child, color })} - > + <> - - - - {studentName(child.name)} - {className ? {className} : null} + [ + styles.cardHeaderLeft || {}, + { opacity: pressed ? 0.5 : 1 }, + ]} + onPress={() => navigation.navigate('Child', { child, color })} + > + + + + {studentName(child.name)} + {className ? {className} : null} + - - - - + + + + + ['' || {}, { opacity: pressed ? 0.5 : 1 }]} + onPress={() => + navigation.navigate('Child', { + child, + color, + initialRouteName: 'Calendar', + }) + } + > + - - - {scheduleAndCalendarThisWeek.slice(0, 3).map((calendarItem, i) => ( - - {`${calendarItem.title} (${displayDate(calendarItem.startDate)})`} + {scheduleAndCalendarThisWeek.slice(0, 3).map((calendarItem, i) => ( + + {`${calendarItem.title} (${displayDate(calendarItem.startDate)})`} + + ))} + + ['' || {}, { opacity: pressed ? 0.5 : 1 }]} + onPress={() => + navigation.navigate('Child', { + child, + color, + initialRouteName: 'News', + }) + } + > + + {t('navigation.news')} - ))} - - - {t('navigation.news')} - - {notificationsThisWeek.slice(0, 3).map((notification, i) => ( - - {notification.message} - - ))} - - {newsThisWeek.slice(0, 3).map((newsItem, i) => ( - - {newsItem.header ?? ''} - - ))} + {notificationsThisWeek.slice(0, 3).map((notification, i) => ( + + {notification.message} + + ))} + {newsThisWeek.slice(0, 3).map((newsItem, i) => ( + + {newsItem.header ?? ''} + + ))} + {scheduleAndCalendarThisWeek.length || notificationsThisWeek.length || @@ -210,8 +239,18 @@ export const ChildListItem = ({ {t('news.noNewNewsItemsThisWeek')} )} + {shouldShowLunchMenu ? ( - <> + ['' || {}, { opacity: pressed ? 0.5 : 1 }]} + onPress={() => + navigation.navigate('Child', { + child, + color, + initialRouteName: 'Menu', + }) + } + > {meaningfulStartingDate.format( '[' + t('schedule.lunch') + '] dddd' @@ -220,7 +259,7 @@ export const ChildListItem = ({ {menu[meaningfulStartingDate.isoWeekday() - 1]?.description} - + ) : null} @@ -238,7 +277,7 @@ export const ChildListItem = ({ - + ) } diff --git a/apps/skolplattformen-app/components/children.component.tsx b/apps/skolplattformen-app/components/children.component.tsx index 04f18bc9..8a7eba89 100644 --- a/apps/skolplattformen-app/components/children.component.tsx +++ b/apps/skolplattformen-app/components/children.component.tsx @@ -1,7 +1,7 @@ import { NavigationProp, useNavigation } from '@react-navigation/core' import { NativeStackNavigationOptions } from '@react-navigation/native-stack' import { Child } from '@skolplattformen/api' -import { useApi, useChildList } from '@skolplattformen/hooks' +import { useApi, useChildList } from '../libs/hooks/src' import { Button, List, @@ -35,7 +35,7 @@ export const childenRouteOptions = return { ...defaultStackStyling(darkMode), title: translate('children.title'), - headerLargeTitle: true, + headerLargeTitle: false, headerLargeTitleShadowVisible: false, } } diff --git a/apps/skolplattformen-app/components/classmates.component.tsx b/apps/skolplattformen-app/components/classmates.component.tsx index 8ae74d45..f9c701ef 100644 --- a/apps/skolplattformen-app/components/classmates.component.tsx +++ b/apps/skolplattformen-app/components/classmates.component.tsx @@ -1,5 +1,5 @@ import { Classmate } from '@skolplattformen/api' -import { useClassmates } from '@skolplattformen/hooks' +import { useClassmates } from '../libs/hooks/src' import { Divider, Icon, @@ -15,9 +15,11 @@ import { translate } from '../utils/translation' import { useChild } from './childContext.component' import { ContactMenu } from './contactMenu.component' -interface ClassmatesProps { - setSelected: (value?: number | null) => void -} +// const translate = (key: string) => key; + +// interface ClassmatesProps { +// setSelected: (value?: number | null) => void; +// } export const Classmates = () => { const child = useChild() diff --git a/apps/skolplattformen-app/components/contactMenu.component.tsx b/apps/skolplattformen-app/components/contactMenu.component.tsx index 6421291a..264de9e8 100644 --- a/apps/skolplattformen-app/components/contactMenu.component.tsx +++ b/apps/skolplattformen-app/components/contactMenu.component.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react-native-a11y/has-accessibility-hint */ import { Classmate } from '@skolplattformen/api' import { Button, @@ -24,6 +23,8 @@ interface ContactMenuProps { setSelected: (value?: number | null) => void } +// const translate = (key: string) => key; + export const ContactMenu = ({ contact, selected, @@ -35,18 +36,20 @@ export const ContactMenu = ({