diff --git a/.changeset/bright-dryers-act.md b/.changeset/bright-dryers-act.md new file mode 100644 index 00000000..307c37e4 --- /dev/null +++ b/.changeset/bright-dryers-act.md @@ -0,0 +1,5 @@ +--- +'@openstapps/app': major +--- + +Update to Angular 16.1 diff --git a/.changeset/config.json b/.changeset/config.json index 46b0ea4a..d5229d5c 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -5,7 +5,7 @@ "fixed": [], "linked": [["@openstapps/*"]], "access": "restricted", - "baseBranch": "master", + "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] } diff --git a/.changeset/silent-maps-float.md b/.changeset/silent-maps-float.md new file mode 100644 index 00000000..2a872a64 --- /dev/null +++ b/.changeset/silent-maps-float.md @@ -0,0 +1,30 @@ +--- +'@openstapps/projectmanagement': patch +'@openstapps/prettier-config': patch +'@openstapps/app-release-template': patch +'@openstapps/es-mapping-generator': patch +'@openstapps/backend-config': patch +'@openstapps/eslint-config': patch +'@openstapps/minimal-deployment': patch +'@openstapps/minimal-connector': patch +'@openstapps/collection-utils': patch +'@openstapps/minimal-plugin': patch +'@openstapps/tsconfig': patch +'@openstapps/node-builder': patch +'@openstapps/api-plugin': patch +'@openstapps/core-tools': patch +'@openstapps/gitlab-api': patch +'@openstapps/app-builder-image': patch +'@openstapps/easy-ast': patch +'@openstapps/database': patch +'@openstapps/node-base': patch +'@openstapps/api-cli': patch +'@openstapps/backend': patch +'@openstapps/logger': patch +'@openstapps/proxy': patch +'@openstapps/core': patch +'@openstapps/app': patch +'@openstapps/api': patch +--- + +Update to TypeScript 5.1.6 diff --git a/.changeset/smart-ghosts-shout.md b/.changeset/smart-ghosts-shout.md new file mode 100644 index 00000000..4559c2a4 --- /dev/null +++ b/.changeset/smart-ghosts-shout.md @@ -0,0 +1,8 @@ +--- +'@openstapps/app': minor +--- + +Migrate to Ionic 7 + +- Migrate uses of `` with inputs to new syntax +- Fix infinite loop in schedule date picker (`datetime.confirm()` to `datetime.cancel()`) diff --git a/.syncpackrc.cjs b/.syncpackrc.cjs index 4ac035e1..a64a2161 100644 --- a/.syncpackrc.cjs +++ b/.syncpackrc.cjs @@ -53,12 +53,6 @@ const config = { packages: ['**'], pinVersion: 'workspace:*', }, - { - label: 'App may have some dependency exceptions', - dependencies: ['typescript', '@typescript-eslint/**', 'eslint**'], - packages: ['@openstapps/app'], - isIgnored: true, - }, ], }; diff --git a/backend/backend/package.json b/backend/backend/package.json index f3dbeb9f..ca95ace1 100644 --- a/backend/backend/package.json +++ b/backend/backend/package.json @@ -99,7 +99,7 @@ "supertest": "6.3.3", "ts-node": "10.9.1", "tsup": "6.7.0", - "typescript": "4.9.5" + "typescript": "5.1.6" }, "tsup": { "entry": [ diff --git a/backend/proxy/package.json b/backend/proxy/package.json index 0d7e614f..a12c6acb 100644 --- a/backend/proxy/package.json +++ b/backend/proxy/package.json @@ -51,7 +51,7 @@ "is-cidr": "4.0.2", "mustache": "4.2.0", "semver": "7.3.8", - "typescript": "4.9.5" + "typescript": "5.1.6" }, "devDependencies": { "@openstapps/api-cli": "workspace:*", diff --git a/configuration/eslint-config/package.json b/configuration/eslint-config/package.json index 4bf39314..047ab24b 100644 --- a/configuration/eslint-config/package.json +++ b/configuration/eslint-config/package.json @@ -19,7 +19,7 @@ "@openstapps/tsconfig": "workspace:*", "@types/node": "18.15.3", "eslint": "8.43.0", - "typescript": "4.9.5" + "typescript": "5.1.6" }, "peerDependencies": { "@typescript-eslint/eslint-plugin": "5.60.1", diff --git a/configuration/projectmanagement/package.json b/configuration/projectmanagement/package.json index 9701adbe..84e83799 100644 --- a/configuration/projectmanagement/package.json +++ b/configuration/projectmanagement/package.json @@ -65,7 +65,7 @@ "mocha-junit-reporter": "2.2.0", "ts-node": "10.9.1", "tsup": "6.7.0", - "typescript": "4.9.5" + "typescript": "5.1.6" }, "tsup": { "entry": [ diff --git a/configuration/tsconfig/tsconfig.json b/configuration/tsconfig/tsconfig.json index ffba3fde..6800ead8 100644 --- a/configuration/tsconfig/tsconfig.json +++ b/configuration/tsconfig/tsconfig.json @@ -1,12 +1,12 @@ { "compilerOptions": { "alwaysStrict": true, - "charset": "utf8", "declaration": true, "esModuleInterop": true, "experimentalDecorators": true, "forceConsistentCasingInFileNames": true, "skipLibCheck": true, + "downlevelIteration": true, "inlineSourceMap": true, "module": "NodeNext", "moduleResolution": "NodeNext", @@ -21,9 +21,9 @@ "noUnusedLocals": true, "noUnusedParameters": true, "outDir": "../../../lib/", - "lib": ["ES2021", "DOM"], + "lib": ["ES2022", "DOM"], "strict": true, - "target": "ES2021" + "target": "ES2022" }, "ts-node": { "transpileOnly": true diff --git a/examples/minimal-connector/package.json b/examples/minimal-connector/package.json index 693218c5..0eecd2e9 100644 --- a/examples/minimal-connector/package.json +++ b/examples/minimal-connector/package.json @@ -55,7 +55,7 @@ "nock": "13.3.1", "ts-node": "10.9.1", "tsup": "6.7.0", - "typescript": "4.9.5" + "typescript": "5.1.6" }, "tsup": { "entry": [ diff --git a/examples/minimal-plugin/package.json b/examples/minimal-plugin/package.json index 208f5f2f..20276ba2 100644 --- a/examples/minimal-plugin/package.json +++ b/examples/minimal-plugin/package.json @@ -44,7 +44,7 @@ "@types/express": "4.17.17", "@types/node": "18.15.3", "tsup": "6.7.0", - "typescript": "4.9.5" + "typescript": "5.1.6" }, "tsup": { "entry": [ diff --git a/frontend/app/.browserslistrc b/frontend/app/.browserslistrc index 80848532..fd6736a7 100644 --- a/frontend/app/.browserslistrc +++ b/frontend/app/.browserslistrc @@ -9,4 +9,6 @@ last 2 versions Firefox ESR not dead -not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file +not kaios 2.5 +not op_mini all +not IE 9-11 diff --git a/frontend/app/.editorconfig b/frontend/app/.editorconfig deleted file mode 100644 index 51873bc7..00000000 --- a/frontend/app/.editorconfig +++ /dev/null @@ -1,17 +0,0 @@ -# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -indent_style = space -indent_size = 2 - -# We recommend you to keep these unchanged -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false \ No newline at end of file diff --git a/frontend/app/.eslintrc.json b/frontend/app/.eslintrc.json index 8993d0b0..4f31912f 100644 --- a/frontend/app/.eslintrc.json +++ b/frontend/app/.eslintrc.json @@ -33,6 +33,7 @@ "unicorn/prefer-object-from-entries": "off", "unicorn/prefer-node-protocol": "off", "unicorn/no-process-exit": "off", + "unicorn/prefer-event-target": "off", "unicorn/prevent-abbreviations": [ "warn", { diff --git a/frontend/app/.gitlab-ci.yml.old b/frontend/app/.gitlab-ci.yml.old deleted file mode 100644 index 9297e585..00000000 --- a/frontend/app/.gitlab-ci.yml.old +++ /dev/null @@ -1,30 +0,0 @@ -build: - stage: build - script: - - npm run build - artifacts: - paths: - - www - except: - - schedules - -scheduled-build: - stage: build - script: - - npm run build - only: - - schedules - -unit: - stage: test - script: - - npm run check-icons - - npm run test -- --watch=false --no-progress --code-coverage - coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/' - artifacts: - paths: - - coverage - reports: - coverage_report: - coverage_format: cobertura - path: coverage/cobertura-coverage.xml diff --git a/frontend/app/.npmignore b/frontend/app/.npmignore deleted file mode 100644 index 203fae89..00000000 --- a/frontend/app/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -# Ignore all files/folders by default -# See https://stackoverflow.com/a/29932318 -/* -# Except these files/folders -!docs -!lib -!LICENSE -!package.json -!package-lock.json -!README.md -!src diff --git a/frontend/app/angular.json b/frontend/app/angular.json index 0b7986c9..56819e23 100644 --- a/frontend/app/angular.json +++ b/frontend/app/angular.json @@ -1,7 +1,6 @@ { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, - "defaultProject": "app", "newProjectRoot": "projects", "projects": { "app": { @@ -17,10 +16,17 @@ "outputPath": "www", "index": "src/index.html", "main": "src/main.ts", - "polyfills": "src/polyfills.ts", + "polyfills": "zone.js", "tsConfig": "tsconfig.app.json", + "allowedCommonJsDependencies": [ + "moment", + "opening_hours", + "leaflet", + "leaflet.markercluster", + "localforge", + "guid-typescript" + ], "aot": true, - "allowedCommonJsDependencies": ["moment", "opening_hours"], "assets": [ { "glob": "**/*", @@ -44,8 +50,7 @@ }, "./node_modules/leaflet/dist/leaflet.css", "./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css" - ], - "scripts": [] + ] }, "configurations": { "production": { @@ -102,7 +107,6 @@ "browserTarget": "app:build:development" }, "ci": { - "progress": false, "browserTarget": "app:build" }, "fake": { @@ -111,21 +115,13 @@ }, "defaultConfiguration": "development" }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "app:build" - } - }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", + "polyfills": ["zone.js", "zone.js/testing"], "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", - "styles": [], - "scripts": [], + "main": "src/test.ts", "assets": [ { "glob": "favicon.ico", @@ -143,12 +139,6 @@ "output": "assets/" } ] - }, - "configurations": { - "ci": { - "progress": false, - "watch": false - } } }, "lint": { @@ -206,7 +196,6 @@ }, "cli": { "packageManager": "pnpm", - "defaultCollection": "@ionic/angular-toolkit", "analytics": false }, "schematics": { diff --git a/frontend/app/karma.conf.js b/frontend/app/karma.conf.js index b14ad309..e5fa2523 100644 --- a/frontend/app/karma.conf.js +++ b/frontend/app/karma.conf.js @@ -1,3 +1,4 @@ +// @ts-check /* * Copyright (C) 2022 StApps * This program is free software: you can redistribute it and/or modify it @@ -13,10 +14,13 @@ * this program. If not, see . */ -// Karma configuration file, see link for more information +// Karma configuration file, see the link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html var isDocker = require('is-docker'); +/** + * @param config {import('karma').Config} + */ module.exports = function (config) { config.set({ basePath: '', @@ -25,9 +29,9 @@ module.exports = function (config) { require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma'), require('karma-mocha-reporter'), require('karma-junit-reporter'), + require('@angular-devkit/build-angular/plugins/karma'), ], client: { clearContext: false, // leave Jasmine Spec Runner output visible in browser @@ -44,19 +48,18 @@ module.exports = function (config) { useBrowserName: false, }, reporters: ['mocha', 'junit', 'coverage'], + singleRun: true, port: 9876, colors: true, logLevel: config.LOG_INFO, - autoWatch: true, browsers: ['ChromeNoSandbox'], customLaunchers: { ChromeNoSandbox: { base: 'ChromeHeadless', // We must disable the Chrome sandbox when running Chrome inside Docker, // see https://hackernoon.com/running-karma-tests-with-headless-chrome-inside-docker-ae4aceb06ed3 - flags: isDocker ? ['--no-sandbox'] : [], + flags: isDocker() ? ['--no-sandbox'] : [], }, }, - singleRun: false, }); }; diff --git a/frontend/app/ngcc-postinstall.mjs b/frontend/app/ngcc-postinstall.mjs deleted file mode 100644 index b0eb1751..00000000 --- a/frontend/app/ngcc-postinstall.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import {process} from '@angular/compiler-cli/ngcc'; -import path from 'path'; - -const legacyViewEngineLibraries = [ - ['@awesome-cordova-plugins', 'calendar'], - ['@ionic-native', 'core'], -]; - -for (const basePath of legacyViewEngineLibraries) { - process({basePath: path.resolve(path.join('node_modules', ...basePath))}); -} diff --git a/frontend/app/package.json b/frontend/app/package.json index 6ab40ece..37cfcd06 100644 --- a/frontend/app/package.json +++ b/frontend/app/package.json @@ -37,8 +37,7 @@ "lint": "ng lint && stylelint \"**/*.scss\"", "lint:fix": "eslint --fix -c .eslintrc.json --ignore-path .eslintignore --ext .ts,.html src/ && stylelint --fix \"**/*.scss\"", "minify-icons": "ts-node-esm scripts/minify-icon-font.ts", - "ng": "ng", - "postinstall": "(jetify && node ngcc-postinstall.mjs) || echo \"skipping jetify in production mode\"", + "postinstall": "jetify && echo \"skipping jetify in production mode\"", "preview": "http-server www --p 8101 -o", "push": "git push && git push origin \"v$npm_package_version\"", "resources:android": "cordova-res android --skip-config --copy", @@ -47,19 +46,19 @@ "start": "ionic serve", "start:external": "ionic serve --external", "start:prod": "ionic serve --prod", - "test": "ng test --watch=false --code-coverage", + "test": "ng test --code-coverage", "test:integration": "sh integration-test.sh" }, "dependencies": { - "@angular/animations": "13.4.0", - "@angular/cdk": "13.3.9", - "@angular/common": "13.4.0", - "@angular/core": "13.4.0", - "@angular/forms": "13.4.0", - "@angular/platform-browser": "13.4.0", - "@angular/router": "13.4.0", - "@asymmetrik/ngx-leaflet": "13.0.2", - "@asymmetrik/ngx-leaflet-markercluster": "13.0.1", + "@angular/animations": "16.1.4", + "@angular/cdk": "16.1.4", + "@angular/common": "16.1.4", + "@angular/core": "16.1.4", + "@angular/forms": "16.1.4", + "@angular/platform-browser": "16.1.4", + "@angular/router": "16.1.4", + "@asymmetrik/ngx-leaflet": "16.0.1", + "@asymmetrik/ngx-leaflet-markercluster": "16.0.0", "@awesome-cordova-plugins/calendar": "5.45.0", "@awesome-cordova-plugins/core": "5.45.0", "@capacitor/app": "4.1.1", @@ -79,10 +78,10 @@ "@capacitor/status-bar": "4.1.1", "@hugotomazi/capacitor-navigation-bar": "2.0.0", "@ionic-native/core": "5.36.0", - "@ionic/angular": "6.7.5", - "@ionic/storage": "4.0.0", - "@ngx-translate/core": "14.0.0", - "@ngx-translate/http-loader": "7.0.0", + "@ionic/angular": "7.1.3", + "@ionic/storage-angular": "4.0.0", + "@ngx-translate/core": "15.0.0", + "@ngx-translate/http-loader": "8.0.0", "@openid/appauth": "1.3.1", "@openstapps/api": "workspace:*", "@openstapps/core": "workspace:*", @@ -99,36 +98,36 @@ "material-symbols": "0.10.0", "moment": "2.29.4", "ngx-logger": "5.0.12", - "ngx-markdown": "13.1.0", + "ngx-markdown": "16.0.0", "ngx-moment": "6.0.2", "opening_hours": "3.8.0", - "rxjs": "7.8.0", + "rxjs": "7.8.1", "swiper": "8.4.5", "tslib": "2.4.1", - "zone.js": "0.12.0" + "zone.js": "0.13.1" }, "devDependencies": { - "@angular-devkit/architect": "0.1303.11", - "@angular-devkit/build-angular": "13.3.11", - "@angular-devkit/core": "13.3.11", - "@angular-devkit/schematics": "13.3.11", - "@angular-eslint/builder": "13.5.0", - "@angular-eslint/eslint-plugin": "13.5.0", - "@angular-eslint/eslint-plugin-template": "13.5.0", - "@angular-eslint/schematics": "13.5.0", - "@angular-eslint/template-parser": "13.5.0", - "@angular/cli": "13.3.11", - "@angular/compiler": "13.4.0", - "@angular/compiler-cli": "13.4.0", - "@angular/language-service": "13.4.0", - "@angular/platform-browser-dynamic": "13.3.11", + "@angular-devkit/architect": "0.1601.4", + "@angular-devkit/build-angular": "16.1.4", + "@angular-devkit/core": "16.1.4", + "@angular-devkit/schematics": "16.1.4", + "@angular-eslint/builder": "16.1.0", + "@angular-eslint/eslint-plugin": "16.1.0", + "@angular-eslint/eslint-plugin-template": "16.1.0", + "@angular-eslint/schematics": "16.1.0", + "@angular-eslint/template-parser": "16.1.0", + "@angular/cli": "16.1.4", + "@angular/compiler": "16.1.4", + "@angular/compiler-cli": "16.1.4", + "@angular/language-service": "16.1.4", + "@angular/platform-browser-dynamic": "16.1.4", "@capacitor/android": "4.6.1", "@capacitor/cli": "4.6.1", "@capacitor/ios": "4.6.1", "@compodoc/compodoc": "1.1.19", "@cypress/schematic": "1.7.0", - "@ionic/angular-toolkit": "6.1.0", - "@ionic/cli": "6.20.4", + "@ionic/angular-toolkit": "10.0.0", + "@ionic/cli": "7.1.1", "@openstapps/prettier-config": "workspace:*", "@openstapps/tsconfig": "workspace:*", "@types/fontkit": "1.8.0", @@ -137,33 +136,35 @@ "@types/jasmine": "4.3.1", "@types/jasminewd2": "2.0.10", "@types/jsonpath": "0.2.0", + "@types/karma": "6.3.4", + "@types/karma-coverage": "2.0.1", + "@types/karma-jasmine": "4.0.2", "@types/leaflet": "1.9.0", "@types/leaflet.markercluster": "1.5.1", "@types/node": "18.15.3", - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", + "@typescript-eslint/eslint-plugin": "5.60.1", + "@typescript-eslint/parser": "5.60.1", "cordova-res": "0.15.4", - "cypress": "12.0.1", - "eslint": "8.33.0", - "eslint-plugin-jsdoc": "39.7.4", + "cypress": "12.17.1", + "eslint": "8.43.0", + "eslint-plugin-jsdoc": "46.4.2", "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-unicorn": "45.0.2", + "eslint-plugin-unicorn": "47.0.0", "fontkit": "2.0.2", "glob": "10.2.7", "http-server": "14.1.1", "is-docker": "2.2.1", - "jasmine-core": "4.5.0", + "jasmine-core": "5.0.1", "jasmine-spec-reporter": "7.0.0", "jetifier": "2.0.0", "junit-report-merger": "6.0.2", - "karma": "6.4.1", - "karma-chrome-launcher": "3.1.1", + "karma": "6.4.2", + "karma-chrome-launcher": "3.2.0", "karma-coverage": "2.2.1", "karma-jasmine": "5.1.0", "karma-junit-reporter": "2.0.1", "karma-mocha-reporter": "2.2.5", "license-checker": "25.0.1", - "protractor": "7.0.0", "stylelint": "15.10.1", "stylelint-config-clean-order": "5.0.1", "stylelint-config-prettier-scss": "1.0.0", @@ -171,7 +172,7 @@ "stylelint-config-standard-scss": "10.0.0", "surge": "0.23.1", "ts-node": "10.9.1", - "typescript": "4.6.4", + "typescript": "5.1.6", "webpack-bundle-analyzer": "4.7.0" }, "prettier": "@openstapps/prettier-config", diff --git a/frontend/app/src/app/_helpers/collections/chunk.ts b/frontend/app/src/app/_helpers/collections/chunk.ts index 99f824fe..4d5422c5 100644 --- a/frontend/app/src/app/_helpers/collections/chunk.ts +++ b/frontend/app/src/app/_helpers/collections/chunk.ts @@ -15,7 +15,6 @@ /** * Chunk array into smaller arrays of a specified size. - * * @param array The array to chunk. * @param chunkSize The size of each chunk. */ diff --git a/frontend/app/src/app/_helpers/errors.ts b/frontend/app/src/app/_helpers/errors.ts index 81305104..f731f272 100644 --- a/frontend/app/src/app/_helpers/errors.ts +++ b/frontend/app/src/app/_helpers/errors.ts @@ -19,7 +19,6 @@ export class AppError extends Error { /** * TODO - * * @param name Name of the error * @param message Message of the error */ diff --git a/frontend/app/src/app/animation/animation-choreographer.ts b/frontend/app/src/app/animation/animation-choreographer.ts index cb7b49f6..1bb1fda7 100644 --- a/frontend/app/src/app/animation/animation-choreographer.ts +++ b/frontend/app/src/app/animation/animation-choreographer.ts @@ -25,13 +25,12 @@ import {SHARED_AXIS_DIRECTIONS} from './material-motion'; * * ```html *
- *
- *
+ * [@animation]='choreographer.animationState' + * [@animation.done]='choreographer.done()'> + *
+ *
*
* ``` - * * @see {@link https://material.io/design/motion/the-motion-system.html#shared-axis} */ export class SharedAxisChoreographer { diff --git a/frontend/app/src/app/animation/material-motion.ts b/frontend/app/src/app/animation/material-motion.ts index 5f95c95a..c4e6ba08 100644 --- a/frontend/app/src/app/animation/material-motion.ts +++ b/frontend/app/src/app/animation/material-motion.ts @@ -16,7 +16,6 @@ import {animate, sequence, state, style, transition, trigger} from '@angular/ani /** * Fade transition - * * @see {@link https://material.io/design/motion/the-motion-system.html#fade} */ export const materialFade = trigger('materialFade', [ @@ -27,7 +26,6 @@ export const materialFade = trigger('materialFade', [ /** * Fade transition - * * @see {@link https://material.io/design/motion/the-motion-system.html#fade} */ export const materialManualFade = trigger('materialManualFade', [ @@ -39,7 +37,6 @@ export const materialManualFade = trigger('materialManualFade', [ /** * Fade through transition - * * @see {@link https://material.io/design/motion/the-motion-system.html#fade-through} */ export const materialFadeThrough = trigger('materialFadeThrough', [ @@ -58,7 +55,6 @@ export const SHARED_AXIS_DIRECTIONS = { * Shared axis transition along the X-Axis * * Needs to be manually choreographed - * * @see {@link https://material.io/design/motion/the-motion-system.html#shared-axis} * @see {SharedAxisChoreographer} */ diff --git a/frontend/app/src/app/app.module.ts b/frontend/app/src/app/app.module.ts index 4c2b97bf..f9d9eba4 100644 --- a/frontend/app/src/app/app.module.ts +++ b/frontend/app/src/app/app.module.ts @@ -71,7 +71,6 @@ SwiperCore.use([FreeMode, Navigation]); /** * Initializes data needed on startup - * * @param storageProvider provider of the saved data (using framework's storage) * @param logger TODO * @param settingsProvider provider of settings (e.g. language that has been set) @@ -118,7 +117,6 @@ export function initializerFactory( /** * TODO - * * @param http TODO */ export function createTranslateLoader(http: HttpClient) { diff --git a/frontend/app/src/app/modules/about/about-page/about-page-content.html b/frontend/app/src/app/modules/about/about-page/about-page-content.html index 77a38f0f..0c837632 100644 --- a/frontend/app/src/app/modules/about/about-page/about-page-content.html +++ b/frontend/app/src/app/modules/about/about-page/about-page-content.html @@ -36,7 +36,7 @@ - + {{ 'title' | translateSimple : content }} diff --git a/frontend/app/src/app/modules/about/about-page/about-page.scss b/frontend/app/src/app/modules/about/about-page/about-page.scss index 5452dd06..803a03df 100644 --- a/frontend/app/src/app/modules/about/about-page/about-page.scss +++ b/frontend/app/src/app/modules/about/about-page/about-page.scss @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -@import '~src/theme/util/mixins'; +@import '../../../../theme/util/mixins'; ion-text { margin-inline: var(--spacing-md); diff --git a/frontend/app/src/app/modules/auth/auth-helper.service.ts b/frontend/app/src/app/modules/auth/auth-helper.service.ts index f0df0148..7dfdd726 100644 --- a/frontend/app/src/app/modules/auth/auth-helper.service.ts +++ b/frontend/app/src/app/modules/auth/auth-helper.service.ts @@ -122,7 +122,6 @@ export class AuthHelperService { /** * Ends browser session by opening endSessionEndpoint URL of the provider - * * @param providerType Type of the provider (e.g. 'default' or 'paia') */ async endBrowserSession(providerType: SCAuthorizationProviderType) { diff --git a/frontend/app/src/app/modules/calendar/add-event-review-modal.html b/frontend/app/src/app/modules/calendar/add-event-review-modal.html index 56e4c690..82a2d674 100644 --- a/frontend/app/src/app/modules/calendar/add-event-review-modal.html +++ b/frontend/app/src/app/modules/calendar/add-event-review-modal.html @@ -47,8 +47,9 @@
- {{ 'schedule.toCalendar.reviewModal.INCLUDE_CANCELLED' | translate }} - + {{ 'schedule.toCalendar.reviewModal.INCLUDE_CANCELLED' | translate }}
diff --git a/frontend/app/src/app/modules/calendar/calendar.service.ts b/frontend/app/src/app/modules/calendar/calendar.service.ts index 984665b9..7627d5bb 100644 --- a/frontend/app/src/app/modules/calendar/calendar.service.ts +++ b/frontend/app/src/app/modules/calendar/calendar.service.ts @@ -105,7 +105,6 @@ export class CalendarService { /** * Emit the calendar index corresponding to the input date. - * * @param date Moment - date the calendar should go to */ emitGoToDate(date: Moment) { diff --git a/frontend/app/src/app/modules/calendar/ical/ical.ts b/frontend/app/src/app/modules/calendar/ical/ical.ts index 92c47537..47ecd34d 100644 --- a/frontend/app/src/app/modules/calendar/ical/ical.ts +++ b/frontend/app/src/app/modules/calendar/ical/ical.ts @@ -111,7 +111,7 @@ export function findRRules(dates: SCISO8601Date[]): Array for (let i = 0; i < sorted.length; i++) { const current = sorted[i]; const next = sorted[i + 1] as SCISO8601Date | undefined; - const element = output[output.length - 1]; + const element = output.at(-1); const units: unitOfTime.Diff[] = element?.freq ? [element.freq] : ['day', 'week', 'month', 'year']; const freq = minBy( @@ -242,7 +242,7 @@ export function iso8601ToICalDate(date: SCISO8601Date): string { */ function stringifyLinebreaks(value: T): T { if (typeof value === 'string') { - return value.replace(/\r?\n|\r/g, '\\n') as T; + return value.replaceAll(/\r?\n|\r/g, '\\n') as T; } if (Array.isArray(value)) { return value.map(stringifyLinebreaks) as T; diff --git a/frontend/app/src/app/modules/catalog/catalog.provider.ts b/frontend/app/src/app/modules/catalog/catalog.provider.ts index adef15ab..04a72358 100644 --- a/frontend/app/src/app/modules/catalog/catalog.provider.ts +++ b/frontend/app/src/app/modules/catalog/catalog.provider.ts @@ -33,7 +33,6 @@ export class CatalogProvider { /** * Get news messages * TODO: make dates sortable on the backend side and then adjust this method - * * @param offset TODO * @param superCatalog TODO * @param semesterUID TODO diff --git a/frontend/app/src/app/modules/config/config.provider.ts b/frontend/app/src/app/modules/config/config.provider.ts index b483f4b3..259f1790 100644 --- a/frontend/app/src/app/modules/config/config.provider.ts +++ b/frontend/app/src/app/modules/config/config.provider.ts @@ -64,7 +64,6 @@ export class ConfigProvider { /** * Constructor, initialise api client - * * @param storageProvider StorageProvider to load persistent configuration * @param swHttpClient Api client * @param logger An angular logger @@ -90,7 +89,6 @@ export class ConfigProvider { /** * Returns the value of an app configuration - * * @param attribute requested attribute from app configuration */ public getValue(attribute: keyof SCAppConfiguration) { @@ -102,7 +100,6 @@ export class ConfigProvider { /** * Returns a value of the configuration (not only app configuration) - * * @param attribute requested attribute from the configuration */ public getAnyValue(attribute: keyof SCIndexResponse) { @@ -114,7 +111,6 @@ export class ConfigProvider { /** * Initialises the ConfigProvider - * * @throws ConfigInitError if no configuration could be loaded. * @throws WrongConfigVersionInStorage if fetch failed and saved config has wrong SCVersion */ @@ -154,7 +150,6 @@ export class ConfigProvider { /** * Returns saved configuration from StorageModule - * * @throws SavedConfigNotAvailable if no configuration could be loaded */ async loadLocal(): Promise { @@ -167,7 +162,6 @@ export class ConfigProvider { /** * Saves the configuration from the provider - * * @param config configuration to save */ async save(config: SCIndexResponse): Promise { @@ -176,7 +170,6 @@ export class ConfigProvider { /** * Sets the configuration in the module and writes it into app storage - * * @param config SCIndexResponse to set */ async set(config: SCIndexResponse): Promise { diff --git a/frontend/app/src/app/modules/dashboard/dashboard.provider.ts b/frontend/app/src/app/modules/dashboard/dashboard.provider.ts index cecceca7..4fa80dab 100644 --- a/frontend/app/src/app/modules/dashboard/dashboard.provider.ts +++ b/frontend/app/src/app/modules/dashboard/dashboard.provider.ts @@ -32,7 +32,6 @@ export class DashboardProvider { /** * Get news messages - * * @param size How many messages/news to fetch * @param from From which (results) page to start * @param filters Additional filters to apply diff --git a/frontend/app/src/app/modules/data/chips/edit-event-selection.component.ts b/frontend/app/src/app/modules/data/chips/edit-event-selection.component.ts index 182e1f56..2f643a8c 100644 --- a/frontend/app/src/app/modules/data/chips/edit-event-selection.component.ts +++ b/frontend/app/src/app/modules/data/chips/edit-event-selection.component.ts @@ -13,7 +13,7 @@ * this program. If not, see . */ import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; -import {ModalController, PopoverController} from '@ionic/angular'; +import {ModalController} from '@ionic/angular'; import {SCDateSeries} from '@openstapps/core'; import { DateSeriesRelevantData, @@ -21,7 +21,6 @@ import { toDateSeriesRelevantData, } from '../../calendar/schedule.provider'; import {CalendarService} from '../../calendar/calendar.service'; -import {ThingTranslatePipe} from '../../../translation/thing-translate.pipe'; import {groupBy, groupByProperty} from '../../../_helpers/collections/group-by'; import {mapValues} from '../../../_helpers/collections/map-values'; import {stringSortBy} from '../../../_helpers/collections/string-sort'; @@ -59,10 +58,8 @@ export class EditEventSelectionComponent implements OnInit { constructor( readonly ref: ChangeDetectorRef, readonly scheduleProvider: ScheduleProvider, - readonly popoverController: PopoverController, readonly calendar: CalendarService, readonly modalController: ModalController, - readonly thingTranslatePipe: ThingTranslatePipe, ) {} ngOnInit() { diff --git a/frontend/app/src/app/modules/data/chips/edit-event-selection.html b/frontend/app/src/app/modules/data/chips/edit-event-selection.html index ea3af15c..22349804 100644 --- a/frontend/app/src/app/modules/data/chips/edit-event-selection.html +++ b/frontend/app/src/app/modules/data/chips/edit-event-selection.html @@ -13,32 +13,35 @@ ~ this program. If not, see . --> - - - {{ 'data.chips.add_events.popover.ALL' | translate }} - - + + + {{ 'data.chips.add_events.popover.ALL' | translate }} - - - {{ frequency.children[0].item.repeatFrequency ? (frequency.children[0].item.repeatFrequency | + + + + {{ frequency.children[0].item.repeatFrequency ? (frequency.children[0].item.repeatFrequency | durationLocalized: true | sentencecase) : ('data.chips.add_events.popover.SINGLE' | translate | - titlecase) }} - - - + titlecase) }} + - - + + {{ date.item.dates[0] | amDateFormat: 'dddd, LT' }} - {{ date.item.dates[0] | amAdd: @@ -69,8 +72,7 @@ {{ 'inPlace.name' | thingTranslate: date.item }} - - + diff --git a/frontend/app/src/app/modules/data/chips/edit-event-selection.scss b/frontend/app/src/app/modules/data/chips/edit-event-selection.scss index 7d7e6257..12b8dbce 100644 --- a/frontend/app/src/app/modules/data/chips/edit-event-selection.scss +++ b/frontend/app/src/app/modules/data/chips/edit-event-selection.scss @@ -16,17 +16,17 @@ --padding-start: 0; --background: var(--ion-color-primary-shade); - > ion-list-header { - --color: var(--ion-color-primary-contrast); - --background: none; - } - > ion-checkbox { --background: none; - --border-color: rgb(var(--ion-color-primary-contrast-rgb) 0.77); - --background-checked: var(--ion-color-primary-contrast); + --border-color: var(--ion-color-primary-contrast); + --checkbox-background-checked: var(--ion-color-primary-contrast); --border-color-checked: var(--ion-color-primary-contrast); --checkmark-color: var(--ion-color-primary); + + > ion-list-header { + --color: var(--ion-color-primary-contrast); + --background: none; + } } } diff --git a/frontend/app/src/app/modules/data/data-facets.provider.ts b/frontend/app/src/app/modules/data/data-facets.provider.ts index 73df472c..8e29e014 100644 --- a/frontend/app/src/app/modules/data/data-facets.provider.ts +++ b/frontend/app/src/app/modules/data/data-facets.provider.ts @@ -27,7 +27,6 @@ export class DataFacetsProvider { * Adds buckets to a map of buckets (e.g. if a buckets array is [{foo: 1}, {bar: 3}], * its bucketsMap is {foo: 1, bar: 3}), if a field 'bar' is added to it it becomes: * {foo: 1, bar: 4} - * * @param bucketsMap Buckets array transformed into a map * @param fields A field that should be added to buckets (its map) */ @@ -42,7 +41,6 @@ export class DataFacetsProvider { /** * Converts a buckets array to a map - * * @param buckets Buckets from a facet */ // eslint-disable-next-line class-methods-use-this @@ -57,7 +55,6 @@ export class DataFacetsProvider { /** * Extract facets from data items, optionally combine them with a list of existing facets - * * @param items Items to extract facets from * @param aggregations Aggregations configuration(s) from backend * @param facets Existing facets to be combined with the facets from the items @@ -103,7 +100,6 @@ export class DataFacetsProvider { /** * Converts facets array into a map (for quicker operations with facets) - * * @param facets Array of facets */ facetsToMap(facets: SCFacet[]): {[key: string]: {[key: string]: number}} { @@ -117,7 +113,6 @@ export class DataFacetsProvider { /** * Converts a buckets map into buckets array (as it is inside of a facet) - * * @param bucketsMap A map from a buckets array */ // eslint-disable-next-line class-methods-use-this @@ -135,7 +130,6 @@ export class DataFacetsProvider { /** * Converts facets map into an array of facets (as they are provided by backend) - * * @param facetsMap A map from facets array */ mapToFacets(facetsMap: {[key: string]: {[key: string]: number}}): SCFacet[] { diff --git a/frontend/app/src/app/modules/data/data-routing.service.ts b/frontend/app/src/app/modules/data/data-routing.service.ts index 687953d9..ea0fd7c7 100644 --- a/frontend/app/src/app/modules/data/data-routing.service.ts +++ b/frontend/app/src/app/modules/data/data-routing.service.ts @@ -32,7 +32,6 @@ export class DataRoutingService { /** * Provides the thing that was selected - * * @param thing The selected thing */ emitChildEvent(thing: SCThings) { diff --git a/frontend/app/src/app/modules/data/data.provider.ts b/frontend/app/src/app/modules/data/data.provider.ts index 17a730f2..cf9d23f8 100644 --- a/frontend/app/src/app/modules/data/data.provider.ts +++ b/frontend/app/src/app/modules/data/data.provider.ts @@ -107,7 +107,6 @@ export class DataProvider { /** * Simplify creation of a value filter - * * @param field Database field for apply the filter to * @param value Value to match with */ @@ -123,7 +122,6 @@ export class DataProvider { /** * Create a facet from data - * * @param items Data to generate facet for * @param field Field for which to generate facet */ @@ -145,7 +143,6 @@ export class DataProvider { /** * TODO - * * @param stAppsWebHttpClient TODO * @param storageProvider TODO */ @@ -156,7 +153,6 @@ export class DataProvider { /** * Create savable thing from an indexable thing - * * @param item An indexable to create savable thing from * @param type The type (falls back to the type of the indexable thing) */ @@ -175,7 +171,6 @@ export class DataProvider { /** * Delete a data item - * * @param uid Unique identifier of the saved data item */ async delete(uid: string): Promise { @@ -206,7 +201,6 @@ export class DataProvider { /** * Provides a thing from the local database only, backend only or both, depending on the scope - * * @param uid Unique identifier of a thing * @param scope From where data should be provided */ @@ -246,7 +240,6 @@ export class DataProvider { /** * Provides key for storing data into the local database - * * @param uid Unique identifier of a resource */ getDataKey(uid: string): string { @@ -255,7 +248,6 @@ export class DataProvider { /** * Provides information if something with an UID is saved as a data item - * * @param uid Unique identifier of the saved data item */ async isSaved(uid: string): Promise { @@ -264,7 +256,6 @@ export class DataProvider { /** * Performs multiple searches at once and returns their responses - * * @param query - query to send to the backend (auto-splits according to the backend limit) */ async multiSearch(query: SCMultiSearchRequest): Promise { @@ -281,7 +272,6 @@ export class DataProvider { /** * Save a data item - * * @param item An item that needs to be saved */ async put(item: SCIndexableThings): Promise { @@ -293,7 +283,6 @@ export class DataProvider { /** * Send a feedback message (request) - * * @param feedback Feedback message to be sent to the backend */ async sendFeedback(feedback: SCFeedbackRequest) { @@ -302,7 +291,6 @@ export class DataProvider { /** * Searches the backend using the provided query and returns response - * * @param query - query to send to the backend */ async search(query: SCSearchRequest): Promise { diff --git a/frontend/app/src/app/modules/data/detail/data-detail-content.scss b/frontend/app/src/app/modules/data/detail/data-detail-content.scss index 68906e6f..b7f5bc64 100644 --- a/frontend/app/src/app/modules/data/detail/data-detail-content.scss +++ b/frontend/app/src/app/modules/data/detail/data-detail-content.scss @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -@import '~src/theme/util/mixins'; +@import '../../../../theme/util/mixins'; stapps-origin-detail { // css hack to make the element stick to the bottom of the scroll container even diff --git a/frontend/app/src/app/modules/data/detail/data-detail.component.spec.ts b/frontend/app/src/app/modules/data/detail/data-detail.component.spec.ts index c471b7a3..91469523 100644 --- a/frontend/app/src/app/modules/data/detail/data-detail.component.spec.ts +++ b/frontend/app/src/app/modules/data/detail/data-detail.component.spec.ts @@ -65,7 +65,7 @@ describe('DataDetailComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - RouterModule.forRoot([], {relativeLinkResolution: 'legacy'}), + RouterModule.forRoot([]), DataRoutingModule, DataModule, TranslateModule.forRoot({ diff --git a/frontend/app/src/app/modules/data/detail/data-detail.component.ts b/frontend/app/src/app/modules/data/detail/data-detail.component.ts index 55e1f1fb..0d880722 100644 --- a/frontend/app/src/app/modules/data/detail/data-detail.component.ts +++ b/frontend/app/src/app/modules/data/detail/data-detail.component.ts @@ -112,7 +112,6 @@ export class DataDetailComponent implements ViewWillEnter { /** * Provides data item with given UID - * * @param uid Unique identifier of a thing * @param forceReload Indicating whether cached data should be ignored */ diff --git a/frontend/app/src/app/modules/data/elements/favorite-button.component.ts b/frontend/app/src/app/modules/data/elements/favorite-button.component.ts index f86be061..f7116014 100644 --- a/frontend/app/src/app/modules/data/elements/favorite-button.component.ts +++ b/frontend/app/src/app/modules/data/elements/favorite-button.component.ts @@ -60,7 +60,6 @@ export class FavoriteButtonComponent { /** * Add or remove the thing from favorites (depending on its current status) - * * @param event A click event */ async toggle(event: Event) { diff --git a/frontend/app/src/app/modules/data/list/data-list-item.scss b/frontend/app/src/app/modules/data/list/data-list-item.scss index 7f54bf16..cdc6012a 100644 --- a/frontend/app/src/app/modules/data/list/data-list-item.scss +++ b/frontend/app/src/app/modules/data/list/data-list-item.scss @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -@import '~src/theme/util/mixins'; +@import '../../../../theme/util/mixins'; :host { display: block; @@ -33,6 +33,9 @@ ion-item { ion-thumbnail { --ion-margin: var(--spacing-xs); + + margin-inline-start: var(--spacing-md); + padding: 0; } ion-label { diff --git a/frontend/app/src/app/modules/data/list/search-page.component.ts b/frontend/app/src/app/modules/data/list/search-page.component.ts index 699a0e6c..f108a5bb 100644 --- a/frontend/app/src/app/modules/data/list/search-page.component.ts +++ b/frontend/app/src/app/modules/data/list/search-page.component.ts @@ -150,7 +150,6 @@ export class SearchPageComponent implements OnInit, OnDestroy { /** * Injects the providers and creates subscriptions - * * @param alertController AlertController * @param dataProvider DataProvider * @param contextMenuService ContextMenuService @@ -180,7 +179,6 @@ export class SearchPageComponent implements OnInit, OnDestroy { /** * Fetches items with set query configuration - * * @param append If true fetched data gets appended to existing, override otherwise (default false) */ protected async fetchAndUpdateItems(append = false): Promise { diff --git a/frontend/app/src/app/modules/data/stapps-web-http-client.provider.ts b/frontend/app/src/app/modules/data/stapps-web-http-client.provider.ts index 17f79aec..341229d3 100644 --- a/frontend/app/src/app/modules/data/stapps-web-http-client.provider.ts +++ b/frontend/app/src/app/modules/data/stapps-web-http-client.provider.ts @@ -42,7 +42,6 @@ export class StAppsWebHttpClient implements HttpClientInterface { /** * Make a request - * * @param requestConfig Configuration of the request */ async request(requestConfig: HttpClientRequest): Promise> { diff --git a/frontend/app/src/app/modules/data/types/message/message-detail-content.component.ts b/frontend/app/src/app/modules/data/types/message/message-detail-content.component.ts index 5315d5d3..1e4eb0bf 100644 --- a/frontend/app/src/app/modules/data/types/message/message-detail-content.component.ts +++ b/frontend/app/src/app/modules/data/types/message/message-detail-content.component.ts @@ -34,7 +34,6 @@ export class MessageDetailContentComponent { /** * Open the external link when clicked - * * @param url Web address to open */ onLinkClick(url: string) { diff --git a/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts b/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts index 3b6ddedf..48fbcb3f 100644 --- a/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts +++ b/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts @@ -46,7 +46,6 @@ export class PlaceDetailContentComponent implements OnInit, OnDestroy { /** * TODO - * * @param item TODO */ hasCategories(item: SCThings): item is SCThings & {categories: string[]} { @@ -55,7 +54,6 @@ export class PlaceDetailContentComponent implements OnInit, OnDestroy { /** * Helper function as 'typeof' is not accessible in HTML - * * @param item TODO */ isMensaThing(item: SCThings): boolean { diff --git a/frontend/app/src/app/modules/data/types/place/place-types.ts b/frontend/app/src/app/modules/data/types/place/place-types.ts index d2cb1d30..1daf37ef 100644 --- a/frontend/app/src/app/modules/data/types/place/place-types.ts +++ b/frontend/app/src/app/modules/data/types/place/place-types.ts @@ -28,7 +28,6 @@ export type PlaceTypesWithDistance = PlaceTypes & { /** * Detects "null island" places, which means places with point coordinates [0, 0] - * * @param place A place to check */ export function hasValidLocation(place: Exclude) { @@ -37,7 +36,6 @@ export function hasValidLocation(place: Exclude) { /** * Provide information if a place is a floor - * * @param place A place to check */ export function isSCFloor(place: PlaceTypes): place is SCFloor { diff --git a/frontend/app/src/app/modules/favorites/favorites.service.ts b/frontend/app/src/app/modules/favorites/favorites.service.ts index 7876bd39..9c8cf121 100644 --- a/frontend/app/src/app/modules/favorites/favorites.service.ts +++ b/frontend/app/src/app/modules/favorites/favorites.service.ts @@ -59,7 +59,6 @@ export class FavoritesService { /** * Provides the type value from a filter - * * @param filter Filter to get the type from */ static getFilterType(filter: SCSearchBooleanFilter | SCSearchValueFilter) { @@ -84,7 +83,6 @@ export class FavoritesService { /** * Sorts provided items by the provided field - * * @param items Items to sort * @param field The field to use for sorting the items * @param sortType In which order to sort the provided textual field @@ -132,7 +130,6 @@ export class FavoritesService { /** * Provides key for storing data into the local database - * * @param uid Unique identifier of a resource */ getStorageKey(uid: string): string { @@ -141,7 +138,6 @@ export class FavoritesService { /** * Removes an item from favorites - * * @param item Data item that needs to be deleted */ async delete(item: SCIndexableThings): Promise { @@ -151,7 +147,6 @@ export class FavoritesService { /** * Save an item as a favorite - * * @param item Data item that needs to be saved */ async put(item: SCIndexableThings): Promise { @@ -174,7 +169,6 @@ export class FavoritesService { /** * Search through the (saved) favorites - * * @param queryText Text to filter the data with * @param filterQuery Filters to apply on the data * @param sortQuery Sort to apply on the data diff --git a/frontend/app/src/app/modules/feedback/feedback-page.html b/frontend/app/src/app/modules/feedback/feedback-page.html index 252ca273..1b4e58e5 100644 --- a/frontend/app/src/app/modules/feedback/feedback-page.html +++ b/frontend/app/src/app/modules/feedback/feedback-page.html @@ -26,17 +26,19 @@
- {{ 'feedback.form.name.label' | translate }} - {{ 'feedback.form.type.label' | translate }} - {{ 'feedback.form.email.label' | translate }} - {{ 'feedback.form.message.label' | translate }} - {{ 'feedback.form.termsAgree.0' | translate }} + >{{ 'feedback.form.termsAgree.0' | translate }} - {{ 'feedback.form.protocolDataAgree' | translate }} + >{{ 'feedback.form.protocolDataAgree' | translate }} diff --git a/frontend/app/src/app/modules/feedback/feedback-page.scss b/frontend/app/src/app/modules/feedback/feedback-page.scss index 661dc74b..46c4472d 100644 --- a/frontend/app/src/app/modules/feedback/feedback-page.scss +++ b/frontend/app/src/app/modules/feedback/feedback-page.scss @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -@import '~src/theme/util/mixins'; +@import '../../../theme/util/mixins'; pre { white-space: pre-wrap; diff --git a/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.spec.ts b/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.spec.ts index ed1fd3a7..a1fa70a4 100644 --- a/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.spec.ts +++ b/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.spec.ts @@ -65,7 +65,7 @@ describe('DaiaAvailabilityComponent', () => { configProviderMock = jasmine.createSpyObj('ConfigProvider', ['init', 'getValue', 'getAnyValue']); TestBed.configureTestingModule({ imports: [ - RouterModule.forRoot([], {relativeLinkResolution: 'legacy'}), + RouterModule.forRoot([]), HebisRoutingModule, HebisModule, TranslateModule.forRoot({ diff --git a/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.ts b/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.ts index 1a709865..abc053f6 100644 --- a/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.ts +++ b/frontend/app/src/app/modules/hebis/daia-availability/daia-availability.component.ts @@ -69,7 +69,6 @@ export class DaiaAvailabilityComponent extends DataDetailComponent implements On /** * Provides data item with given UID - * * @param uid Unique identifier of a thing */ async getAvailability(uid: SCUuid) { diff --git a/frontend/app/src/app/modules/hebis/daia-data.provider.ts b/frontend/app/src/app/modules/hebis/daia-data.provider.ts index 58c780d8..860ed3a6 100644 --- a/frontend/app/src/app/modules/hebis/daia-data.provider.ts +++ b/frontend/app/src/app/modules/hebis/daia-data.provider.ts @@ -46,7 +46,6 @@ export class DaiaDataProvider { /** * TODO - * * @param storageProvider TODO * @param httpClient TODO * @param configProvider TODO diff --git a/frontend/app/src/app/modules/hebis/hebis-data.provider.ts b/frontend/app/src/app/modules/hebis/hebis-data.provider.ts index 72598f41..d989190a 100644 --- a/frontend/app/src/app/modules/hebis/hebis-data.provider.ts +++ b/frontend/app/src/app/modules/hebis/hebis-data.provider.ts @@ -48,7 +48,6 @@ export class HebisDataProvider extends DataProvider { /** * TODO - * * @param stAppsWebHttpClient TODO * @param storageProvider TODO * @param httpClient TODO @@ -68,7 +67,6 @@ export class HebisDataProvider extends DataProvider { * Send a search request to the backend * * All results will be returned if no size is set in the request. - * * @param searchRequest Search request * @param options Search options * @param options.addPrefix Add HeBIS prefix (useful when having only an ID, e.g. when using PAIA) diff --git a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.spec.ts b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.spec.ts index 55a69a31..9923d456 100644 --- a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.spec.ts +++ b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.spec.ts @@ -65,7 +65,7 @@ describe('HebisDetailComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - RouterModule.forRoot([], {relativeLinkResolution: 'legacy'}), + RouterModule.forRoot([]), HebisRoutingModule, HebisModule, IonicModule, diff --git a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.ts b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.ts index c0f486ce..d4644bd8 100644 --- a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.ts +++ b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.component.ts @@ -64,7 +64,6 @@ export class HebisDetailComponent extends DataDetailComponent { /** * Provides data item with given UID - * * @param uid Unique identifier of a thing * @param _forceReload Ignore any cached data */ diff --git a/frontend/app/src/app/modules/hebis/hebis.module.ts b/frontend/app/src/app/modules/hebis/hebis.module.ts index 26cca1ce..863bdd9b 100644 --- a/frontend/app/src/app/modules/hebis/hebis.module.ts +++ b/frontend/app/src/app/modules/hebis/hebis.module.ts @@ -32,7 +32,6 @@ import {DaiaDataProvider} from './daia-data.provider'; import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider'; import {HebisRoutingModule} from './hebis-routing.module'; import {DataModule} from '../data/data.module'; -import {DataListComponent} from '../data/list/data-list.component'; import {DaiaAvailabilityComponent} from './daia-availability/daia-availability.component'; import {UtilModule} from '../../util/util.module'; import {IonIconModule} from '../../util/ion-icon/ion-icon.module'; @@ -49,7 +48,6 @@ import {DaiaHoldingComponent} from './daia-availability/daia-holding.component'; DaiaAvailabilityComponent, DaiaHoldingComponent, ], - entryComponents: [DataListComponent], imports: [ CommonModule, DataModule, diff --git a/frontend/app/src/app/modules/hebis/list/hebis-search-page.component.ts b/frontend/app/src/app/modules/hebis/list/hebis-search-page.component.ts index 82259bcf..18672e19 100644 --- a/frontend/app/src/app/modules/hebis/list/hebis-search-page.component.ts +++ b/frontend/app/src/app/modules/hebis/list/hebis-search-page.component.ts @@ -47,7 +47,6 @@ export class HebisSearchPageComponent extends SearchPageComponent implements OnI /** * Injects the providers and creates subscriptions - * * @param alertController AlertController * @param dataProvider HebisProvider * @param contextMenuService ContextMenuService @@ -89,7 +88,6 @@ export class HebisSearchPageComponent extends SearchPageComponent implements OnI /** * Fetches items with set query configuration - * * @param append If true fetched data gets appended to existing, override otherwise (default false) */ protected async fetchAndUpdateItems(append = false): Promise { diff --git a/frontend/app/src/app/modules/map/map.module.ts b/frontend/app/src/app/modules/map/map.module.ts index 9868bc36..5eaf5cd4 100644 --- a/frontend/app/src/app/modules/map/map.module.ts +++ b/frontend/app/src/app/modules/map/map.module.ts @@ -38,7 +38,6 @@ import {IonIconModule} from '../../util/ion-icon/ion-icon.module'; /** * Initializes the default area to show in advance (before components are initialized) - * * @param configProvider An instance of the ConfigProvider to read the campus polygon from * @param mapProvider An instance of the MapProvider to set the default polygon (area to show on the map) */ diff --git a/frontend/app/src/app/modules/map/map.provider.ts b/frontend/app/src/app/modules/map/map.provider.ts index 6ec931ae..ee488dce 100644 --- a/frontend/app/src/app/modules/map/map.provider.ts +++ b/frontend/app/src/app/modules/map/map.provider.ts @@ -43,7 +43,6 @@ export class MapProvider { /** * Provide a point marker for a leaflet map - * * @param point Point to get marker for * @param className CSS class name * @param iconSize Size of the position icon @@ -65,7 +64,6 @@ export class MapProvider { /** * Provide a position marker for a leaflet map - * * @param position Current position * @param className CSS class name * @param iconSize Size of the position icon @@ -98,7 +96,6 @@ export class MapProvider { /** * Fixes the issue of missing tiles when map renders before its container element - * * @param map The initialized map * @param element The element containing the map * @param interval Interval to clear when map's appearance is corrected @@ -124,7 +121,6 @@ export class MapProvider { /** * Provide the specific place by its UID - * * @param uid UUID of the place to look for */ async searchPlace(uid: SCUuid): Promise { @@ -141,7 +137,6 @@ export class MapProvider { /** * Provide places (buildings and canteens) const result = await this.dataProvider.search(query); - * * @param contextFilter Additional contextual filter (e.g. from the context menu) * @param queryText Query (text) of the search query */ diff --git a/frontend/app/src/app/modules/map/page/map-page.component.ts b/frontend/app/src/app/modules/map/page/map-page.component.ts index 9f6d0136..d28b182c 100644 --- a/frontend/app/src/app/modules/map/page/map-page.component.ts +++ b/frontend/app/src/app/modules/map/page/map-page.component.ts @@ -150,7 +150,6 @@ export class MapPageComponent { /** * Animate to coordinates - * * @param latLng Coordinates to animate to */ private focus(latLng?: LatLng) { @@ -163,7 +162,6 @@ export class MapPageComponent { /** * Add places to the map - * * @param items Places to add to the map * @param clean Remove everything from the map first * @param focus Animate to the item(s) @@ -213,7 +211,6 @@ export class MapPageComponent { /** * Fetches items with set query configuration - * * @param fetchAll Should fetch all items * @param animate Should the fly animation be used */ @@ -395,7 +392,6 @@ export class MapPageComponent { /** * On enter key up do the search - * * @param event Keyboard keyup event */ searchKeyUp(event: KeyboardEvent) { @@ -406,7 +402,6 @@ export class MapPageComponent { /** * Search event of search bar - * * @param queryText New query text to be set */ searchStringChanged(queryText?: string) { @@ -416,7 +411,6 @@ export class MapPageComponent { /** * Show an single place - * * @param uid Uuid of the place */ async showItem(uid: SCUuid) { diff --git a/frontend/app/src/app/modules/map/position.service.ts b/frontend/app/src/app/modules/map/position.service.ts index 45643bba..bb89f5f0 100644 --- a/frontend/app/src/app/modules/map/position.service.ts +++ b/frontend/app/src/app/modules/map/position.service.ts @@ -52,7 +52,6 @@ export class PositionService { /** * Gets current coordinates information of the device - * * @param options Options which define which data should be provided (e.g. how accurate or how old) * @param fake If set, the fake position will be returned */ @@ -73,7 +72,6 @@ export class PositionService { /** * Provides distance from users position - * * @param point Point to which distance should be calculated */ getDistance(point: Point): number | undefined { @@ -88,7 +86,6 @@ export class PositionService { /** * Watches (continuously gets) current coordinates information of the device - * * @param caller Identifier for later reference. (I.e use of `clearWatcher`) * @param options Options which define which data should be provided (e.g. how accurate or how old) */ @@ -115,7 +112,6 @@ export class PositionService { /** * Clears watcher for a certain caller - * * @param caller Identifier of the caller wanting to clear the watcher */ async clearWatcher(caller: string): Promise { diff --git a/frontend/app/src/app/modules/menu/context/context-menu.component.spec.ts b/frontend/app/src/app/modules/menu/context/context-menu.component.spec.ts index eade660a..5e6e1597 100644 --- a/frontend/app/src/app/modules/menu/context/context-menu.component.spec.ts +++ b/frontend/app/src/app/modules/menu/context/context-menu.component.spec.ts @@ -56,7 +56,7 @@ describe('ContextMenuComponent', async () => { TranslateModule.forRoot(), CommonModule, SettingsModule, - RouterModule.forRoot([], {relativeLinkResolution: 'legacy'}), + RouterModule.forRoot([]), ], }).compileComponents(); @@ -68,8 +68,7 @@ describe('ContextMenuComponent', async () => { instance.sortOption = getSortContextType(); fixture.detectChanges(); const sort: HTMLElement = fixture.debugElement.nativeElement.querySelector('.context-sort'); - const sortItem = sort.querySelector('.sort-item'); - expect(sortItem!.querySelector('ion-label')?.textContent).toContain('relevance'); + expect(sort!.querySelector('ion-radio')?.textContent).toContain('relevance'); }); it('should show items in filter context', () => { @@ -128,8 +127,7 @@ describe('ContextMenuComponent', async () => { expect(filterGroup).toBeDefined(); - // @ts-expect-error it is defined - const filterItems = filterGroup.querySelectorAll('.filter-item-label'); + const filterItems = filterGroup!.querySelectorAll('.filter-item-label'); if (filterItems.length !== facet.buckets.length) { console.log(JSON.stringify(facet)); diff --git a/frontend/app/src/app/modules/menu/context/context-menu.html b/frontend/app/src/app/modules/menu/context/context-menu.html index aee27fa8..d06eccf3 100644 --- a/frontend/app/src/app/modules/menu/context/context-menu.html +++ b/frontend/app/src/app/modules/menu/context/context-menu.html @@ -32,14 +32,13 @@ *ngFor="let value of sortOption.values; index as i" (click)="sortChanged(sortOption, sortOption.values[i])" > - {{ 'menu.context.sort.' + value.value | translate | titlecase }} + + {{ 'menu.context.sort.' + value.value | translate | titlecase }} - - + @@ -69,11 +68,6 @@ : facet.buckets " > - - ({{ bucket.count }}) {{ facet.field === 'type' ? (getTranslatedPropertyValue($any(bucket.key), - 'type') | titlecase) : (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key) - | titlecase) }} - + ({{ bucket.count }}) {{ facet.field === 'type' ? (getTranslatedPropertyValue($any(bucket.key), + 'type') | titlecase) : (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key) + | titlecase) }} { @@ -144,7 +143,6 @@ export class ContextMenuService { /** * Returns SCSearchSort if sorting value is set, undefined otherwise - * * @param sortContext SortContext to build SCSearchSort from */ buildSortQuery = (sortContext: SortContext): SCSearchSort[] | undefined => { diff --git a/frontend/app/src/app/modules/menu/navigation/navigation.scss b/frontend/app/src/app/modules/menu/navigation/navigation.scss index 492d2b0e..172bdd9e 100644 --- a/frontend/app/src/app/modules/menu/navigation/navigation.scss +++ b/frontend/app/src/app/modules/menu/navigation/navigation.scss @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -@import '~src/theme/util/mixins'; +@import '../../../../theme/util/mixins'; stapps-navigation-tabs { @include ion-xl-up { diff --git a/frontend/app/src/app/modules/news/elements/news-filter-settings/news-settings-filter.component.ts b/frontend/app/src/app/modules/news/elements/news-filter-settings/news-settings-filter.component.ts index 8c3f7322..ec4a46df 100644 --- a/frontend/app/src/app/modules/news/elements/news-filter-settings/news-settings-filter.component.ts +++ b/frontend/app/src/app/modules/news/elements/news-filter-settings/news-settings-filter.component.ts @@ -54,7 +54,6 @@ export class NewsSettingsFilterComponent implements OnInit { /** * To be executed when a chip filter has been enabled/disabled - * * @param setting The value of the filter */ stateChanged(setting: SCSetting) { diff --git a/frontend/app/src/app/modules/news/news.provider.ts b/frontend/app/src/app/modules/news/news.provider.ts index c83c30aa..7dfdfe7a 100644 --- a/frontend/app/src/app/modules/news/news.provider.ts +++ b/frontend/app/src/app/modules/news/news.provider.ts @@ -65,7 +65,6 @@ export class NewsProvider { /** * Get news messages - * * @param size How many messages/news to fetch * @param from From which (results) page to start * @param filters Additional filters to apply diff --git a/frontend/app/src/app/modules/news/page/news-page.component.ts b/frontend/app/src/app/modules/news/page/news-page.component.ts index 7498f54a..07e6cdb6 100644 --- a/frontend/app/src/app/modules/news/page/news-page.component.ts +++ b/frontend/app/src/app/modules/news/page/news-page.component.ts @@ -108,7 +108,6 @@ export class NewsPageComponent implements OnInit { /** * Updates the shown list - * * @param refresher Refresher component that triggers the update */ async refresh(refresher: IonRefresher) { @@ -123,7 +122,6 @@ export class NewsPageComponent implements OnInit { /** * Executed when filters have been changed - * * @param filters Current filters to be used */ toggleFilter(filters: SCSearchValueFilter[]) { diff --git a/frontend/app/src/app/modules/schedule/page/components/calendar.component.ts b/frontend/app/src/app/modules/schedule/page/components/calendar.component.ts index 092f5748..f116459f 100644 --- a/frontend/app/src/app/modules/schedule/page/components/calendar.component.ts +++ b/frontend/app/src/app/modules/schedule/page/components/calendar.component.ts @@ -125,7 +125,7 @@ export class CalendarComponent implements OnInit, OnDestroy { let dayString: string | number | null = this.activatedRoute.snapshot.paramMap.get('date'); if (dayString == undefined || dayString === 'now') { const fragments = window.location.href.split('/'); - const urlFragment: string = fragments[fragments.length - 1] ?? ''; + const urlFragment: string = fragments.at(-1) ?? ''; dayString = /^\d{4}-\d{2}-\d{2}$/.test(urlFragment) ? urlFragment : moment.now(); } @@ -159,7 +159,6 @@ export class CalendarComponent implements OnInit, OnDestroy { /** * Get date from baseline date and index of current slide. - * * @param index number * @param delta number - is added to index * @param dateFormat string @@ -210,7 +209,8 @@ export class CalendarComponent implements OnInit, OnDestroy { mainSwiper.goToIndex(nextIndex).then(() => { this.setDateRange(nextIndex); }); - popoverDateTime.confirm(true); + + void popoverDateTime.cancel(true); } /** diff --git a/frontend/app/src/app/modules/schedule/page/schedule-page.component.ts b/frontend/app/src/app/modules/schedule/page/schedule-page.component.ts index 57ab8593..51c9b3cb 100644 --- a/frontend/app/src/app/modules/schedule/page/schedule-page.component.ts +++ b/frontend/app/src/app/modules/schedule/page/schedule-page.component.ts @@ -102,11 +102,9 @@ export class SchedulePageComponent implements OnInit, AfterViewInit { static getDaysToDisplay(width: number): ScheduleResponsiveBreakpoint { // the search could be optimized, but probably would have little // actual effect with five entries. - // we can be sure we get an hit when the last value.until is infinity + // we can be sure we get a hit when the last value.until is infinity // (unless someone has a display that reaches across the universe) - return ( - responsiveConfig.find(value => width < value.until) ?? responsiveConfig[responsiveConfig.length - 1] - ); + return responsiveConfig.find(value => width < value.until) ?? responsiveConfig.at(-1)!; } constructor( @@ -128,11 +126,11 @@ export class SchedulePageComponent implements OnInit, AfterViewInit { */ ionViewWillEnter() { this.onInit(); - this.segmentView.value = this.tabChoreographer.currentValue; + this.segmentView.value = this.tabChoreographer.currentValue ?? undefined; } ngAfterViewInit() { - this.segmentView.value = this.tabChoreographer.currentValue; + this.segmentView.value = this.tabChoreographer.currentValue ?? undefined; } onInit() { @@ -166,7 +164,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit { onSegmentChange() { const url = this.router.createUrlTree(['schedule', this.segmentView.value]).toString(); this.location.go(url); - this.tabChoreographer.changeViewForState(this.segmentView.value); + this.tabChoreographer.changeViewForState(this.segmentView.value as string | undefined); } onTodayClick() { diff --git a/frontend/app/src/app/modules/settings/item/settings-item.component.ts b/frontend/app/src/app/modules/settings/item/settings-item.component.ts index 2c0fd718..e67aa918 100644 --- a/frontend/app/src/app/modules/settings/item/settings-item.component.ts +++ b/frontend/app/src/app/modules/settings/item/settings-item.component.ts @@ -62,7 +62,6 @@ export class SettingsItemComponent { /** * Shows alert with given title and message and a 'ok' button - * * @param title Title of the alert * @param message Message of the alert */ diff --git a/frontend/app/src/app/modules/settings/item/settings-item.html b/frontend/app/src/app/modules/settings/item/settings-item.html index 56c9c106..8e62ef21 100644 --- a/frontend/app/src/app/modules/settings/item/settings-item.html +++ b/frontend/app/src/app/modules/settings/item/settings-item.html @@ -33,7 +33,6 @@
- - - - -
diff --git a/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html b/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html index 1ef5b2a0..22db7154 100644 --- a/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html +++ b/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html @@ -28,6 +28,8 @@ + {{ 'settings.calendar.sync.syncWithCalendar' | translate }} - {{ 'settings.calendar.sync.syncWithCalendar' | translate }}