MOBILE-3947 app: Upgrade to Ionic 7

main
Noel De Martin 2023-11-23 11:54:08 +01:00
parent ba50fb8d6e
commit dbb3db08ae
18 changed files with 24283 additions and 26220 deletions

View File

@ -5,6 +5,7 @@ const appConfig = {
node: true,
},
plugins: [
'@angular-eslint',
'@typescript-eslint',
'header',
'jsdoc',
@ -13,12 +14,12 @@ const appConfig = {
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:@angular-eslint/recommended',
'plugin:promise/recommended',
'plugin:jsdoc/recommended',
"plugin:deprecation/recommended",
'plugin:deprecation/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
@ -61,16 +62,6 @@ const appConfig = {
allowArgumentsExplicitlyTypedAsAny: true,
},
],
'@typescript-eslint/indent': [
'error',
4,
{
SwitchCase: 1,
ignoredNodes: [
'ClassProperty *',
],
},
],
'@typescript-eslint/lines-between-class-members': [
'error',
'always',
@ -103,6 +94,20 @@ const appConfig = {
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: [
'classProperty',
'objectLiteralProperty',
'typeProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod',
'accessor',
'enumMember'
],
modifiers: ['requiresQuotes'],
format: null,
},
{
selector: 'property',
format: ['camelCase'],
@ -200,17 +205,6 @@ const appConfig = {
],
'id-match': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/newline-after-description': 'error',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/require-param': 'off',
'jsdoc/check-values': 'off',
'jsdoc/check-tag-names': [
'warn',
{
"definedTags": ["deprecatedonmoodle"]
},
],
'jsdoc/check-param-names': [
'warn',
{
@ -218,6 +212,23 @@ const appConfig = {
enableFixer: true
},
],
'jsdoc/check-tag-names': [
'warn',
{
'definedTags': ['deprecatedonmoodle']
},
],
'jsdoc/check-values': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/tag-lines': [
'error',
'any',
{
startLines: 1,
},
],
'linebreak-style': [
'error',
'unix',
@ -240,7 +251,7 @@ const appConfig = {
'no-fallthrough': 'off',
'no-invalid-this': 'error',
'no-irregular-whitespace': 'error',
'no-multiple-empty-lines': ['error', { "max": 1 }],
'no-multiple-empty-lines': ['error', { max: 1 }],
'no-new-wrappers': 'error',
'no-sequences': 'error',
'no-trailing-spaces': 'error',
@ -318,15 +329,14 @@ module.exports = {
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {
'max-len': ['warn', { code: 140 }],
'@angular-eslint/template/accessibility-valid-aria': 'warn',
'@angular-eslint/template/accessibility-alt-text': 'error',
'@angular-eslint/template/accessibility-elements-content': 'error',
'@angular-eslint/template/accessibility-label-for': 'error',
'@angular-eslint/template/no-positive-tabindex': 'error',
'@angular-eslint/template/accessibility-table-scope': 'error',
'@angular-eslint/template/accessibility-valid-aria': 'error',
'@angular-eslint/template/alt-text': 'error',
'@angular-eslint/template/elements-content': 'error',
'@angular-eslint/template/label-has-associated-control': 'error',
'@angular-eslint/template/table-scope': 'error',
'@angular-eslint/template/valid-aria': 'error',
'@angular-eslint/template/no-duplicate-attributes': 'error',
'@angular-eslint/template/no-positive-tabindex': 'error',
'max-len': ['warn', { code: 140 }],
},
},
{

View File

@ -8,8 +8,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install npm packages

2
.nvmrc
View File

@ -1 +1 @@
v14.15.0
v18.18.2

View File

@ -1,5 +1,5 @@
## BUILD STAGE
FROM node:14 as build-stage
FROM node:18 as build-stage
WORKDIR /app

View File

@ -1,56 +0,0 @@
// (C) Copyright 2015 Moodle Pty Ltd.
//
// 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
//
// http://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.
// Based on the template node_modules/cordova-android/bin/templates/project/Activity.java
package com.moodle.moodlemobile;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import org.apache.cordova.*;
public class MainActivity extends CordovaActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// enable Cordova apps to be started in the background
Bundle extras = getIntent().getExtras();
if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
moveTaskToBack(true);
}
// Set by <content src="index.html" /> in config.xml
loadUrl(launchUrl);
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Forward back key events to the web view.
if (this.appView != null && event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
View webview = this.appView.getView();
if (webview != null) {
webview.dispatchKeyEvent(event);
}
return true;
}
return super.dispatchKeyEvent(event);
}
}

View File

@ -1,7 +1,6 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
@ -12,11 +11,8 @@
"schematics": {},
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"builder": "@angular-devkit/build-angular:browser",
"options": {
"customWebpackConfig": {
"path": "./webpack.config.js"
},
"allowedCommonJsDependencies":[
"chart.js"
],
@ -63,12 +59,6 @@
},
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
@ -77,24 +67,25 @@
}
]
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"testing": {
"optimization": {
"scripts": false,
"styles": true
},
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
},
"ci": {
"progress": false
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
@ -107,11 +98,12 @@
"production": {
"browserTarget": "app:build:production"
},
"ci": {
"progress": false
}
"development": {
"browserTarget": "app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
@ -129,7 +121,7 @@
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"builder": "@ionic/cordova-builders:cordova-build",
"options": {
"browserTarget": "app:build"
},
@ -140,7 +132,7 @@
}
},
"ionic-cordova-serve": {
"builder": "@ionic/angular-toolkit:cordova-serve",
"builder": "@ionic/cordova-builders:cordova-serve",
"options": {
"cordovaBuildTarget": "app:ionic-cordova-build",
"devServerTarget": "app:serve"
@ -157,7 +149,9 @@
},
"cli": {
"analytics": false,
"defaultCollection": "@ionic/angular-toolkit"
"schematicCollections": [
"@ionic/angular-toolkit"
]
},
"schematics": {
"@ionic/angular-toolkit:component": {

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="44000" id="com.moodle.moodlemobile" ios-CFBundleVersion="4.4.0.0" version="4.4.0" versionCode="44000" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.moodle.moodlemobile" version="4.4.0" versionCode="44000" android-versionCode="44000" ios-CFBundleVersion="4.4.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Moodle</name>
<description>Moodle official app</description>
<author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author>
@ -60,7 +60,6 @@
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/android-splash.xml" />
<preference name="AndroidWindowSplashScreenBackground" value="#FFFFFF" />
<preference name="AndroidWindowSplashScreenIconBackgroundColor" value="#FFFFFF" />
<resource-file src="MainActivity.java" target="app/src/main/java/com/moodle/moodlemobile/MainActivity.java" />
<resource-file src="google-services.json" target="app/google-services.json" />
<resource-file src="resources/android/icon/drawable-ldpi-smallicon.png" target="app/src/main/res/mipmap-ldpi/smallicon.png" />
<resource-file src="resources/android/icon/drawable-mdpi-smallicon.png" target="app/src/main/res/mipmap-mdpi/smallicon.png" />
@ -68,136 +67,16 @@
<resource-file src="resources/android/icon/drawable-xhdpi-smallicon.png" target="app/src/main/res/mipmap-xhdpi/smallicon.png" />
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<resource-file src="resources/android/xml/backup_rules.xml" target="app/src/main/res/xml/backup_rules.xml" />
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|screenLayout|smallestScreenSize" android:exported="true" />
</edit-config>
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:allowBackup="true" android:dataExtractionRules="@xml/backup_rules" android:largeHeap="true" android:networkSecurityConfig="@xml/network_security_config" />
</edit-config>
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="Clipboard">
<param name="android-package" value="com.verso.cordova.clipboard.Clipboard" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="CordovaHttpPlugin">
<param name="android-package" value="com.silkimen.cordovahttp.CordovaHttpPlugin" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="Camera">
<param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="LaunchMyApp">
<param name="android-package" value="nl.xservices.plugins.LaunchMyApp" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="File">
<param name="android-package" value="org.apache.cordova.file.FileUtils" />
<param name="onload" value="true" />
</feature>
<allow-navigation href="cdvfile:*" />
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="FileOpener2">
<param name="android-package" value="io.github.pwlin.cordova.plugins.fileopener2.FileOpener2" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="FileTransfer">
<param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="Geolocation">
<param name="android-package" value="org.apache.cordova.geolocation.Geolocation" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="LocalNotification">
<param name="android-package" value="de.appplant.cordova.plugin.localnotification.LocalNotification" />
</feature>
</config-file>
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<provider android:authorities="${applicationId}.localnotifications.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.plugin.notification.util.AssetProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/localnotification_provider_paths" />
</provider>
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.TriggerReceiver" />
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver" />
<service android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClickReceiver" />
<receiver android:directBootAware="true" android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
<intent-filter>
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="Capture">
<param name="android-package" value="org.apache.cordova.mediacapture.Capture" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="NetworkStatus">
<param name="android-package" value="org.apache.cordova.networkinformation.NetworkManager" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="QRScanner">
<param name="android-package" value="com.bitpay.cordova.qrscanner.QRScanner" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="CDVOrientation">
<param name="android-package" value="cordova.plugins.screenorientation.CDVOrientation" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="StatusBar">
<param name="android-package" value="org.apache.cordova.statusbar.StatusBar" />
<param name="onload" value="true" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="SQLitePlugin">
<param name="android-package" value="io.sqlc.SQLitePlugin" />
</feature>
</config-file>
<config-file parent="/*" target="res/xml/config.xml">
<feature name="PushNotification">
<param name="android-package" value="com.adobe.phonegap.push.PushPlugin" />
</feature>
</config-file>
<config-file parent="/*" target="AndroidManifest.xml">
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
</config-file>
<config-file parent="/*" target="AndroidManifest.xml">
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
</intent>
</queries>
</config-file>
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />

File diff suppressed because it is too large Load Diff

46772
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -45,39 +45,17 @@
"lang:create-langindex": "./scripts/create_langindex.sh"
},
"dependencies": {
"@angular/animations": "~10.0.14",
"@angular/common": "~10.0.14",
"@angular/core": "~10.0.14",
"@angular/forms": "~10.0.14",
"@angular/platform-browser": "~10.0.14",
"@angular/platform-browser-dynamic": "~10.0.14",
"@angular/router": "~10.0.14",
"@ionic-native/badge": "^5.36.0",
"@ionic-native/camera": "^5.36.0",
"@ionic-native/chooser": "^5.36.0",
"@ionic-native/clipboard": "^5.36.0",
"@ionic-native/core": "^5.36.0",
"@ionic-native/device": "^5.36.0",
"@ionic-native/diagnostic": "^5.36.0",
"@ionic-native/file": "^5.36.0",
"@ionic-native/file-opener": "^5.36.0",
"@ionic-native/file-transfer": "^5.36.0",
"@ionic-native/geolocation": "^5.36.0",
"@ionic-native/http": "^5.36.0",
"@ionic-native/in-app-browser": "^5.36.0",
"@ionic-native/ionic-webview": "^5.36.0",
"@ionic-native/keyboard": "^5.36.0",
"@ionic-native/local-notifications": "^5.36.0",
"@ionic-native/media-capture": "^5.36.0",
"@ionic-native/network": "^5.36.0",
"@ionic-native/qr-scanner": "^5.36.0",
"@ionic-native/splash-screen": "^5.36.0",
"@ionic-native/sqlite": "^5.36.0",
"@ionic-native/status-bar": "^5.36.0",
"@ionic-native/web-intent": "^5.36.0",
"@ionic-native/zip": "^5.36.0",
"@ionic/angular": "^5.9.4",
"@moodlehq/cordova-plugin-advanced-http": "^3.3.1-moodle.1",
"@angular/animations": "^16.2.0",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
"@angular/core": "^16.2.0",
"@angular/forms": "^16.2.0",
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"@ionic/angular": "^7.0.0",
"@ionic/cordova-builders": "^10.0.0",
"@moodlehq/cordova-plugin-advanced-http": "3.3.1-moodle.1",
"@moodlehq/cordova-plugin-camera": "6.0.0-moodle.2",
"@moodlehq/cordova-plugin-file-transfer": "1.7.1-moodle.5",
"@moodlehq/cordova-plugin-inappbrowser": "5.0.0-moodle.3",
@ -89,8 +67,8 @@
"@moodlehq/cordova-plugin-zip": "3.1.0-moodle.1",
"@moodlehq/ionic-native-push": "5.36.0-moodle.2",
"@moodlehq/phonegap-plugin-push": "4.0.0-moodle.7",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@types/chart.js": "^2.9.31",
"@types/cordova": "0.0.34",
"@types/dom-mediacapture-record": "1.0.7",
@ -119,7 +97,7 @@
"cordova.plugins.diagnostic": "^7.1.1",
"core-js": "^3.9.1",
"es6-promise-plugin": "^4.2.2",
"hammerjs": "^2.0.8",
"ionicons": "^7.0.0",
"jszip": "^3.7.1",
"mathjax": "2.7.9",
"moment": "^2.29.4",
@ -127,52 +105,42 @@
"mp3-mediarecorder": "4.0.5",
"nl.kingsquare.cordova.background-audio": "^1.0.1",
"ogv": "^1.8.9",
"rxjs": "~6.5.5",
"rxjs": "~7.8.0",
"ts-md5": "^1.2.7",
"tslib": "^2.3.1",
"tslib": "^2.3.0",
"video.js": "^7.21.1",
"zone.js": "~0.10.3"
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^10.0.1",
"@angular-devkit/architect": "^0.1202.7",
"@angular-devkit/build-angular": "~0.1000.8",
"@angular-eslint/builder": "^4.2.0",
"@angular-eslint/eslint-plugin": "^4.2.0",
"@angular-eslint/eslint-plugin-template": "^4.2.0",
"@angular-eslint/schematics": "^4.2.0",
"@angular-eslint/template-parser": "^4.2.0",
"@angular/cli": "~10.0.8",
"@angular/compiler": "~10.0.14",
"@angular/compiler-cli": "~10.0.14",
"@angular/language-service": "~10.0.14",
"@ionic/angular-toolkit": "^2.3.3",
"@ionic/cli": "^6.19.0",
"@storybook/addon-controls": "~6.1.21",
"@storybook/addon-viewport": "~6.1.21",
"@storybook/angular": "~6.1.21",
"@angular-devkit/build-angular": "^16.2.10",
"@angular-eslint/builder": "^16.2.0",
"@angular-eslint/eslint-plugin": "^16.2.0",
"@angular-eslint/eslint-plugin-template": "^16.2.0",
"@angular-eslint/schematics": "^16.2.0",
"@angular-eslint/template-parser": "^16.2.0",
"@angular/cli": "^16.2.10",
"@angular/compiler-cli": "^16.2.0",
"@angular/language-service": "^16.2.0",
"@ionic/angular-toolkit": "^10.0.0",
"@ionic/cli": "^7.1.5",
"@types/faker": "^5.1.3",
"@types/jest": "^26.0.24",
"@types/marked": "^4.3.1",
"@types/node": "^12.12.64",
"@types/node": "^18.0.0",
"@types/resize-observer-browser": "^0.1.5",
"@types/webpack-env": "^1.16.0",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"check-es-compat": "^1.1.1",
"compare-versions": "^4.1.4",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"check-es-compat": "^3.1.0",
"concurrently": "^8.2.0",
"cordova-plugin-moodleapp": "file:cordova-plugin-moodleapp",
"cross-env": "^7.0.3",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-deprecation": "^1.5.0",
"eslint": "^8.0.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^32.3.3",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jsdoc": "^46.9.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-promise": "^6.1.1",
"faker": "^5.1.0",
"fs-extra": "^9.1.0",
"gulp": "4.0.2",
@ -182,24 +150,17 @@
"gulp-htmlmin": "^5.0.1",
"gulp-rename": "^2.0.0",
"gulp-slash": "^1.1.3",
"jest": "^26.5.2",
"jest-preset-angular": "^8.3.1",
"jest-raw-loader": "^1.0.1",
"jest": "^29.7.0",
"jsonc-parser": "^2.3.1",
"marked": "^4.3.0",
"keytar": "^7.2.0",
"minimatch": "^5.1.0",
"native-run": "^1.4.0",
"native-run": "^2.0.0",
"patch-package": "^6.5.0",
"storybook-addon-designs": "~6.1.0",
"storybook-addon-rtl-direction": "0.0.19",
"storybook-dark-mode": "^3.0.0",
"terser-webpack-plugin": "^4.2.3",
"ts-jest": "^26.4.1",
"ts-node": "~8.3.0",
"typescript": "^3.9.9"
"ts-node": "^8.3.0",
"typescript": "~5.1.3"
},
"engines": {
"node": ">=14.15.0 <15"
"node": ">=18.18.2 <19"
},
"cordova": {
"platforms": [
@ -210,11 +171,26 @@
"@moodlehq/cordova-plugin-advanced-http": {
"ANDROIDBLACKLISTSECURESOCKETPROTOCOLS": "SSLv3,TLSv1"
},
"cordova-clipboard": {},
"cordova-plugin-badge": {},
"@moodlehq/cordova-plugin-camera": {
"ANDROIDX_CORE_VERSION": "1.6.+"
},
"@moodlehq/cordova-plugin-file-transfer": {},
"@moodlehq/cordova-plugin-inappbrowser": {},
"@moodlehq/cordova-plugin-intent": {},
"@moodlehq/cordova-plugin-ionic-webview": {},
"@moodlehq/cordova-plugin-local-notification": {
"ANDROID_SUPPORT_V4_VERSION": "26.+"
},
"@moodlehq/cordova-plugin-qrscanner": {},
"@moodlehq/cordova-plugin-statusbar": {},
"@moodlehq/cordova-plugin-zip": {},
"@moodlehq/phonegap-plugin-push": {
"ANDROIDX_CORE_VERSION": "1.6.+",
"FCM_VERSION": "23.+"
},
"cordova-clipboard": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-badge": {},
"cordova-plugin-chooser": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "moodlemobile",
@ -227,39 +203,20 @@
"cordova-plugin-geolocation": {
"GPS_REQUIRED": "false"
},
"@moodlehq/cordova-plugin-inappbrowser": {},
"cordova-plugin-ionic-keyboard": {},
"@moodlehq/cordova-plugin-ionic-webview": {},
"@moodlehq/cordova-plugin-local-notification": {
"ANDROID_SUPPORT_V4_VERSION": "26.+"
},
"cordova-plugin-media-capture": {},
"cordova-plugin-network-information": {},
"@moodlehq/cordova-plugin-qrscanner": {},
"@moodlehq/cordova-plugin-statusbar": {},
"cordova-plugin-prevent-override": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-wkuserscript": {},
"cordova-plugin-wkwebview-cookies": {},
"@moodlehq/cordova-plugin-zip": {},
"cordova-sqlite-storage": {},
"@moodlehq/phonegap-plugin-push": {
"ANDROIDX_CORE_VERSION": "1.6.+",
"FCM_VERSION": "23.+"
},
"@moodlehq/cordova-plugin-intent": {},
"nl.kingsquare.cordova.background-audio": {},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "28.+",
"ANDROIDX_VERSION": "1.0.0",
"ANDROIDX_APPCOMPAT_VERSION": "1.3.1"
},
"@moodlehq/cordova-plugin-file-transfer": {},
"cordova-plugin-prevent-override": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-moodleapp": {}
"nl.kingsquare.cordova.background-audio": {}
}
},
"optionalDependencies": {
"keytar": "^7.2.0"
}
}

View File

@ -1,13 +0,0 @@
diff --git a/node_modules/@ionic/core/dist/types/components.d.ts b/node_modules/@ionic/core/dist/types/components.d.ts
index fd9b7ad..4d29d1e 100644
--- a/node_modules/@ionic/core/dist/types/components.d.ts
+++ b/node_modules/@ionic/core/dist/types/components.d.ts
@@ -972,7 +972,7 @@ export namespace Components {
/**
* If `true`, a button tag will be rendered and the item will be tappable.
*/
- "button": boolean;
+ "button": boolean | '';
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/

View File

@ -1,21 +0,0 @@
diff --git a/node_modules/eslint-plugin-ecmascript-compat/lib/compatibility.js b/node_modules/eslint-plugin-ecmascript-compat/lib/compatibility.js
index 57772cd..f3667fd 100644
--- a/node_modules/eslint-plugin-ecmascript-compat/lib/compatibility.js
+++ b/node_modules/eslint-plugin-ecmascript-compat/lib/compatibility.js
@@ -1,5 +1,7 @@
/* eslint-disable camelcase, no-underscore-dangle */
+const compareVersions = require('compare-versions').compare;
+
function forbiddenFeatures(features, targets) {
return features.filter(feature => !isFeatureSupportedByTargets(feature, targets));
}
@@ -30,7 +32,7 @@ function isCompatFeatureSupportedByTarget(compatFeature, target) {
return true;
}
- return !support.isNone && target.version >= versionAdded;
+ return !support.isNone && target.version.split('-').every(version => compareVersions(version, versionAdded, '>='));
}
function getSimpleSupportStatement(compatFeature, target) {

View File

@ -1,30 +0,0 @@
diff --git a/node_modules/event-target-shim/index.d.ts b/node_modules/event-target-shim/index.d.ts
index 7a5bfc7..ba5e7d8 100644
--- a/node_modules/event-target-shim/index.d.ts
+++ b/node_modules/event-target-shim/index.d.ts
@@ -359,7 +359,7 @@ export declare namespace defineCustomEventTarget {
/**
* The interface of CustomEventTarget.
*/
- type CustomEventTarget<TEventMap extends Record<string, Event>, TMode extends "standard" | "strict"> = EventTarget<TEventMap, TMode> & defineEventAttribute.EventAttributes<any, TEventMap>;
+ type CustomEventTarget<TEventMap extends Record<string, Event>, TMode extends "standard" | "strict"> = EventTarget<TEventMap, TMode> & defineEventAttribute.EventAttributes<any>;
}
/**
* Define an event attribute.
@@ -368,14 +368,12 @@ export declare namespace defineCustomEventTarget {
* @param _eventClass Unused, but to infer `Event` class type.
* @deprecated Use `getEventAttributeValue`/`setEventAttributeValue` pair on your derived class instead because of static analysis friendly.
*/
-export declare function defineEventAttribute<TEventTarget extends EventTarget, TEventType extends string, TEventConstrucor extends typeof Event>(target: TEventTarget, type: TEventType, _eventClass?: TEventConstrucor): asserts target is TEventTarget & defineEventAttribute.EventAttributes<TEventTarget, Record<TEventType, InstanceType<TEventConstrucor>>>;
+export declare function defineEventAttribute<TEventTarget extends EventTarget, TEventType extends string, TEventConstrucor extends typeof Event>(target: TEventTarget, type: TEventType, _eventClass?: TEventConstrucor): asserts target is TEventTarget & defineEventAttribute.EventAttributes<TEventTarget>;
export declare namespace defineEventAttribute {
/**
* Definition of event attributes.
*/
- type EventAttributes<TEventTarget extends EventTarget<any, any>, TEventMap extends Record<string, Event>> = {
- [P in string & keyof TEventMap as `on${P}`]: EventTarget.CallbackFunction<TEventTarget, TEventMap[P]> | null;
- };
+ type EventAttributes<TEventTarget extends EventTarget<any, any>> = Record<string, EventTarget.CallbackFunction<TEventTarget, any> | null>;
}
/**
* Set the warning handler.

View File

@ -194,10 +194,7 @@ export const APP_ROUTES = new InjectionToken('APP_ROUTES');
@NgModule({
imports: [
RouterModule.forRoot([], {
preloadingStrategy: PreloadAllModules,
relativeLinkResolution: 'corrected',
}),
RouterModule.forRoot([], { preloadingStrategy: PreloadAllModules }),
],
providers: [
{ provide: ROUTES, multi: true, useFactory: buildAppRoutes, deps: [Injector] },

View File

@ -17,10 +17,6 @@ import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
import { CoreEmulatorCaptureHelper } from './capture-helper';
// @todo remove android.media.action.IMAGE_CAPTURE and android.intent.action.GET_CONTENT entries
// from config.xml once https://github.com/apache/cordova-plugin-camera/issues/673 is resolved.
// (this is written here because comments get stripped out from config.xml)
/**
* Emulates the Cordova Camera plugin in browser.
*/

View File

@ -16,7 +16,7 @@
window.__Zone_disable_customElements = true;
// Zone JS is required by default for Angular itself.
import 'zone.js/dist/zone';
import 'zone.js';
// Platform polyfills
import 'core-js/es/array/includes';

View File

@ -32,17 +32,17 @@
@import "bootstrap.scss";
/* Core CSS required for Ionic components to work properly */
@import "~@ionic/angular/css/core.css";
@import "@ionic/angular/css/core.css";
/* Basic CSS for apps built with Ionic */
@import "~@ionic/angular/css/normalize.css";
@import "~@ionic/angular/css/structure.css";
@import "~@ionic/angular/css/typography.css";
@import "~@ionic/angular/css/display.css";
@import "@ionic/angular/css/normalize.css";
@import "@ionic/angular/css/structure.css";
@import "@ionic/angular/css/typography.css";
@import "@ionic/angular/css/display.css";
/* Optional CSS utils that can be commented out */
@import "~@ionic/angular/css/padding.css";
@import "~@ionic/angular/css/float-elements.css";
@import "~@ionic/angular/css/text-alignment.css";
@import "~@ionic/angular/css/text-transformation.css";
@import "~@ionic/angular/css/flex-utils.css";
@import "@ionic/angular/css/padding.css";
@import "@ionic/angular/css/float-elements.css";
@import "@ionic/angular/css/text-alignment.css";
@import "@ionic/angular/css/text-transformation.css";
@import "@ionic/angular/css/flex-utils.css";

View File

@ -8,7 +8,6 @@
"cordova-plugin-moodleapp",
"cordova",
"dom-mediacapture-record",
"node",
"resize-observer-browser",
"webpack-env"
]