chore: upgrade Angular to 22 and Ionic to 9
This commit is contained in:
1 parent
512aa58949
commit
c5f9fa5e49
22 files changed
+7162
-8508
No files matched your search
+1
-5
@@ -8,8 +8,4 @@
|
|||||||
# You can see what browsers were selected by your queries by running:
|
# You can see what browsers were selected by your queries by running:
|
||||||
# npx browserslist
|
# npx browserslist
|
||||||
|
|
||||||
Chrome >=107
|
baseline widely available on 2026-05-07
|
||||||
Firefox >=106
|
|
||||||
Edge >=107
|
|
||||||
Safari >=16.1
|
|
||||||
iOS >=16.1
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"ignorePatterns": ["projects/**/*"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts"],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": ["tsconfig.json"],
|
|
||||||
"createDefaultProgram": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"plugin:@angular-eslint/recommended",
|
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@angular-eslint/component-class-suffix": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"suffixes": ["Page", "Component"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@angular-eslint/component-selector": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"type": "element",
|
|
||||||
"prefix": "app",
|
|
||||||
"style": "kebab-case"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@angular-eslint/directive-selector": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"type": "attribute",
|
|
||||||
"prefix": "app",
|
|
||||||
"style": "camelCase"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.html"],
|
|
||||||
"extends": ["plugin:@angular-eslint/template/recommended"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -6,8 +6,8 @@ Court Pilot is a badminton umpire rotation and court-assignment application. It
|
|||||||
|
|
||||||
## Technology
|
## Technology
|
||||||
|
|
||||||
- Angular 20 with standalone components and strict TypeScript
|
- Angular 22 with standalone components and strict TypeScript
|
||||||
- Ionic Angular 8 UI components
|
- Ionic Angular 9 UI components
|
||||||
- Angular signals and RxJS
|
- Angular signals and RxJS
|
||||||
- Dexie 4 / IndexedDB for local persistence
|
- Dexie 4 / IndexedDB for local persistence
|
||||||
- Angular CDK drag and drop
|
- Angular CDK drag and drop
|
||||||
@@ -45,7 +45,7 @@ Do not manually edit generated output or installed dependencies:
|
|||||||
## Implementation conventions
|
## Implementation conventions
|
||||||
|
|
||||||
- Preserve strict TypeScript and strict Angular template checks.
|
- Preserve strict TypeScript and strict Angular template checks.
|
||||||
- Use standalone Angular components and import Ionic components from `@ionic/angular/standalone`.
|
- Use standalone Angular components and import Ionic components from `@ionic/angular`.
|
||||||
- Prefer `inject()` for dependency injection, matching current components and services.
|
- Prefer `inject()` for dependency injection, matching current components and services.
|
||||||
- Keep persistent-data access in services rather than directly in page components.
|
- Keep persistent-data access in services rather than directly in page components.
|
||||||
- Expose reactive Dexie queries through signals when following an existing service pattern.
|
- Expose reactive Dexie queries through signals when following an existing service pattern.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Court Pilot is a local-first web and desktop application for managing badminton
|
|||||||
|
|
||||||
## Current stack
|
## Current stack
|
||||||
|
|
||||||
- Angular 20 and Ionic Angular 8
|
- Angular 22 and Ionic Angular 9
|
||||||
- Dexie / IndexedDB local persistence
|
- Dexie / IndexedDB local persistence
|
||||||
- Angular CDK drag and drop
|
- Angular CDK drag and drop
|
||||||
- Tauri 2 desktop application
|
- Tauri 2 desktop application
|
||||||
|
|||||||
+28
-1
@@ -5,7 +5,7 @@
|
|||||||
### Web development
|
### Web development
|
||||||
|
|
||||||
- NVM
|
- NVM
|
||||||
- Node.js `lts/jod` (Node.js 22), matching `.nvmrc` and the release workflow
|
- Node.js `lts/jod` (at least Node.js 22.22.3), matching `.nvmrc` and the release workflow
|
||||||
- npm
|
- npm
|
||||||
- Ionic CLI available as `ionic`
|
- Ionic CLI available as `ionic`
|
||||||
|
|
||||||
@@ -40,6 +40,10 @@ This also works in noninteractive Bash sessions that do not load `.bashrc`.
|
|||||||
Run each block from the project root. Stop if loading NVM or selecting Node fails;
|
Run each block from the project root. Stop if loading NVM or selecting Node fails;
|
||||||
do not fall back to the system Node version.
|
do not fall back to the system Node version.
|
||||||
|
|
||||||
|
Angular 22 requires TypeScript 6.0 and Node.js 22.22.3 or newer on the
|
||||||
|
Node.js 22 line. If your installed `lts/jod` is older, run `nvm install lts/jod`
|
||||||
|
after loading Bash NVM.
|
||||||
|
|
||||||
Install exact project dependencies with:
|
Install exact project dependencies with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -99,6 +103,29 @@ For VS Code, install the recommended `esbenp.prettier-vscode` extension, select
|
|||||||
|
|
||||||
Prettier is currently an editor workflow; the repository does not declare a Prettier npm dependency or formatting script. Do not claim a CLI formatting check exists unless one is added later.
|
Prettier is currently an editor workflow; the repository does not declare a Prettier npm dependency or formatting script. Do not claim a CLI formatting check exists unless one is added later.
|
||||||
|
|
||||||
|
## Dependency compatibility
|
||||||
|
|
||||||
|
Angular major upgrades must run `ng update` one major at a time. The Angular
|
||||||
|
21 and 22 migrations preserve Zone.js with `provideZoneChangeDetection()`
|
||||||
|
and explicitly select `ChangeDetectionStrategy.Eager` for existing components.
|
||||||
|
Ionic 9 standalone components are imported from `@ionic/angular`.
|
||||||
|
|
||||||
|
ESLint 10 uses `eslint.config.cjs`; the old `.eslintrc.json` format is no longer
|
||||||
|
supported. The flat configuration retains the Angular template and selector rules.
|
||||||
|
Unused legacy ESLint plugins and the unused Jasmine spec reporter were removed.
|
||||||
|
Tests use the replacement `@angular/platform-browser/testing` API, so the
|
||||||
|
deprecated `@angular/platform-browser-dynamic` package is no longer needed.
|
||||||
|
The unused `@angular/animations` package was also removed; Ionic manages its
|
||||||
|
own animations.
|
||||||
|
|
||||||
|
The browser target follows Angular 22's widely available Baseline date,
|
||||||
|
2026-05-07. Older browser versions outside that baseline are no longer targeted.
|
||||||
|
|
||||||
|
Two scoped npm overrides apply upstream security fixes: Angular's build package
|
||||||
|
uses Vite 8.3.5 or newer within v8, and Capacitor's Xcode parser uses UUID 11.1.1
|
||||||
|
or newer within v11. Xcode uses the compatible CommonJS `uuid.v4()` API.
|
||||||
|
Revisit these overrides when upstream packages include the patched versions.
|
||||||
|
|
||||||
## Tauri workflow
|
## Tauri workflow
|
||||||
|
|
||||||
Run Tauri commands through the npm script:
|
Run Tauri commands through the npm script:
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
Angular unit tests use Jasmine and Karma. Test files are colocated with their subjects as `*.spec.ts`. Karma launches Chrome by default and keeps running in watch mode for local development.
|
Angular unit tests use Jasmine and Karma. Test files are colocated with their subjects as `*.spec.ts`. Karma launches Chrome by default and keeps running in watch mode for local development.
|
||||||
|
|
||||||
|
Jasmine is kept on the compatible 6.x line. Jasmine 7 does not support Karma
|
||||||
|
or Zone.js. The npm overrides make Karma adapters use the same Jasmine core
|
||||||
|
as the app rather than installing an older nested copy.
|
||||||
|
|
||||||
## Local test commands
|
## Local test commands
|
||||||
|
|
||||||
These examples target Bash and run from the project root. Complete the
|
These examples target Bash and run from the project root. Complete the
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
const { defineConfig } = require('eslint/config');
|
||||||
|
const angular = require('angular-eslint');
|
||||||
|
|
||||||
|
module.exports = defineConfig(
|
||||||
|
{ ignores: ['projects/**', 'www/**', 'coverage/**'] },
|
||||||
|
{
|
||||||
|
files: ['src/**/*.ts'],
|
||||||
|
extends: angular.configs.tsRecommended,
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
project: ['./tsconfig.json'],
|
||||||
|
tsconfigRootDir: __dirname
|
||||||
|
}
|
||||||
|
},
|
||||||
|
processor: angular.processInlineTemplates,
|
||||||
|
rules: {
|
||||||
|
// Preserve existing Ionic page updates while retaining Zone.js.
|
||||||
|
'@angular-eslint/prefer-on-push-component-change-detection': 'off',
|
||||||
|
'@angular-eslint/component-class-suffix': [
|
||||||
|
'error',
|
||||||
|
{ suffixes: ['Page', 'Component'] }
|
||||||
|
],
|
||||||
|
'@angular-eslint/component-selector': [
|
||||||
|
'error',
|
||||||
|
{ type: 'element', prefix: 'app', style: 'kebab-case' }
|
||||||
|
],
|
||||||
|
'@angular-eslint/directive-selector': [
|
||||||
|
'error',
|
||||||
|
{ type: 'attribute', prefix: 'app', style: 'camelCase' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['src/**/*.html'],
|
||||||
|
extends: angular.configs.templateRecommended
|
||||||
|
}
|
||||||
|
);
|
||||||
Generated
+6946
-8358
File diff suppressed because it is too large.
Load diff
+54
-44
@@ -14,58 +14,68 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^20.3.28",
|
"@angular/cdk": "^22.2.4",
|
||||||
"@angular/cdk": "^20.2.14",
|
"@angular/common": "^22.2.3",
|
||||||
"@angular/common": "^20.3.28",
|
"@angular/compiler": "^22.2.3",
|
||||||
"@angular/compiler": "^20.3.28",
|
"@angular/core": "^22.2.3",
|
||||||
"@angular/core": "^20.3.28",
|
"@angular/forms": "^22.2.3",
|
||||||
"@angular/forms": "^20.3.28",
|
"@angular/platform-browser": "^22.2.3",
|
||||||
"@angular/platform-browser": "^20.3.28",
|
"@angular/router": "^22.2.3",
|
||||||
"@angular/platform-browser-dynamic": "^20.3.28",
|
"@capacitor/app": "8.1.2",
|
||||||
"@angular/router": "^20.3.28",
|
"@capacitor/core": "8.5.3",
|
||||||
"@capacitor/app": "8.1.0",
|
|
||||||
"@capacitor/core": "8.3.4",
|
|
||||||
"@capacitor/haptics": "8.0.2",
|
"@capacitor/haptics": "8.0.2",
|
||||||
"@capacitor/keyboard": "8.0.3",
|
"@capacitor/keyboard": "8.0.6",
|
||||||
"@capacitor/status-bar": "8.0.2",
|
"@capacitor/status-bar": "8.0.4",
|
||||||
"@ionic/angular": "^8.0.0",
|
"@ionic/angular": "^9.0.9",
|
||||||
"@tauri-apps/plugin-os": "^2.3.2",
|
"@tauri-apps/plugin-os": "^2.4.0",
|
||||||
"@tauri-apps/plugin-process": "^2.3.1",
|
"@tauri-apps/plugin-process": "^2.4.0",
|
||||||
"@tauri-apps/plugin-updater": "^2.10.1",
|
"@tauri-apps/plugin-updater": "^2.14.0",
|
||||||
"dexie": "^4.4.2",
|
"dexie": "^4.4.7",
|
||||||
"ionicons": "^7.0.0",
|
"ionicons": "^8.1.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"zone.js": "~0.15.0"
|
"zone.js": "~0.16.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^20.3.34",
|
"@angular-devkit/build-angular": "^22.2.4",
|
||||||
"@angular-eslint/builder": "^20.3.0",
|
"@angular-eslint/builder": "^22.6.0",
|
||||||
"@angular-eslint/eslint-plugin": "^20.3.0",
|
"@angular-eslint/eslint-plugin": "^22.6.0",
|
||||||
"@angular-eslint/eslint-plugin-template": "^20.3.0",
|
"@angular-eslint/eslint-plugin-template": "^22.6.0",
|
||||||
"@angular-eslint/schematics": "^20.3.0",
|
"@angular-eslint/schematics": "^22.6.0",
|
||||||
"@angular-eslint/template-parser": "^20.3.0",
|
"@angular-eslint/template-parser": "^22.6.0",
|
||||||
"@angular/cli": "^20.3.34",
|
"@angular/cli": "^22.2.4",
|
||||||
"@angular/compiler-cli": "^20.3.28",
|
"@angular/compiler-cli": "^22.2.3",
|
||||||
"@angular/language-service": "^20.3.28",
|
"@angular/language-service": "^22.2.3",
|
||||||
"@capacitor/cli": "8.3.4",
|
"@capacitor/cli": "8.5.3",
|
||||||
"@ionic/angular-toolkit": "^12.0.0",
|
"@ionic/angular-toolkit": "^13.0.0",
|
||||||
"@tauri-apps/cli": "^2.11.2",
|
"@tauri-apps/cli": "^2.12.4",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~6.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
"@typescript-eslint/eslint-plugin": "^8.72.0",
|
||||||
"@typescript-eslint/parser": "^8.18.0",
|
"@typescript-eslint/parser": "^8.72.0",
|
||||||
"eslint": "^9.16.0",
|
"eslint": "^10.13.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"istanbul-lib-instrument": "^6.0.3",
|
||||||
"eslint-plugin-jsdoc": "^48.2.1",
|
"jasmine-core": "~6.3.0",
|
||||||
"eslint-plugin-prefer-arrow": "1.2.2",
|
|
||||||
"jasmine-core": "~5.1.0",
|
|
||||||
"jasmine-spec-reporter": "~5.0.0",
|
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
"karma-chrome-launcher": "~3.2.0",
|
"karma-chrome-launcher": "~3.2.0",
|
||||||
"karma-coverage": "~2.2.0",
|
"karma-coverage": "~2.2.0",
|
||||||
"karma-jasmine": "~5.1.0",
|
"karma-jasmine": "~5.1.0",
|
||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.3.0",
|
||||||
"typescript": "~5.9.0"
|
"typescript": "~6.0.3",
|
||||||
|
"angular-eslint": "^22.6.0"
|
||||||
},
|
},
|
||||||
"description": "Manage court officials"
|
"description": "Manage court officials",
|
||||||
|
"overrides": {
|
||||||
|
"karma-jasmine": {
|
||||||
|
"jasmine-core": "$jasmine-core"
|
||||||
|
},
|
||||||
|
"karma-jasmine-html-reporter": {
|
||||||
|
"jasmine-core": "$jasmine-core"
|
||||||
|
},
|
||||||
|
"@angular/build": {
|
||||||
|
"vite": "^8.3.5"
|
||||||
|
},
|
||||||
|
"xcode": {
|
||||||
|
"uuid": "^11.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Component, inject } from '@angular/core';
|
import { Component, inject, ChangeDetectionStrategy } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AlertController,
|
AlertController,
|
||||||
IonApp,
|
IonApp,
|
||||||
IonRouterOutlet,
|
IonRouterOutlet,
|
||||||
LoadingController
|
LoadingController
|
||||||
} from '@ionic/angular/standalone';
|
} from '@ionic/angular';
|
||||||
import { check, DownloadEvent } from '@tauri-apps/plugin-updater';
|
import { check, DownloadEvent } from '@tauri-apps/plugin-updater';
|
||||||
import { isTauri } from '@tauri-apps/api/core';
|
import { isTauri } from '@tauri-apps/api/core';
|
||||||
import { platform } from '@tauri-apps/plugin-os';
|
import { platform } from '@tauri-apps/plugin-os';
|
||||||
@@ -15,6 +15,7 @@ import { ThemeService } from './services/theme.service';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: 'app.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [IonApp, IonRouterOutlet]
|
imports: [IonApp, IonRouterOutlet]
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|||||||
@@ -21,19 +21,25 @@
|
|||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<ion-item [lines]="'none'">
|
<ion-item [lines]="'none'">
|
||||||
<ion-label class="ion-text-center"> {{ 'umpire' | translate }} </ion-label>
|
<ion-label class="ion-text-center">
|
||||||
|
{{ 'umpire' | translate }}
|
||||||
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
@if (serviceJudgeEnabled()) {
|
@if (serviceJudgeEnabled()) {
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<ion-item [lines]="'none'">
|
<ion-item [lines]="'none'">
|
||||||
<ion-label class="ion-text-center"> {{ 'serviceJudge' | translate }} </ion-label>
|
<ion-label class="ion-text-center">
|
||||||
|
{{ 'serviceJudge' | translate }}
|
||||||
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
}
|
}
|
||||||
<ion-col size="2" sizeLg="1"></ion-col>
|
<ion-col size="2" sizeLg="1"></ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
@for (item of [].constructor(settings()?.numberOfCourts); track $index) {
|
@for (item of
|
||||||
|
[].constructor($safeNavigationMigration(settings()?.numberOfCourts)); track
|
||||||
|
$index) {
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col [size]="1" class="court-number">
|
<ion-col [size]="1" class="court-number">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
@@ -119,19 +125,25 @@
|
|||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col [size]="!serviceJudgeEnabled() ? 6 : 4">
|
<ion-col [size]="!serviceJudgeEnabled() ? 6 : 4">
|
||||||
<ion-item color="primary">
|
<ion-item color="primary">
|
||||||
<ion-label class="ion-text-center"> {{ 'umpires' | translate }} </ion-label>
|
<ion-label class="ion-text-center">
|
||||||
|
{{ 'umpires' | translate }}
|
||||||
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
@if (serviceJudgeEnabled()) {
|
@if (serviceJudgeEnabled()) {
|
||||||
<ion-col [size]="4">
|
<ion-col [size]="4">
|
||||||
<ion-item color="primary">
|
<ion-item color="primary">
|
||||||
<ion-label class="ion-text-center"> {{ 'serviceJudges' | translate }} </ion-label>
|
<ion-label class="ion-text-center">
|
||||||
|
{{ 'serviceJudges' | translate }}
|
||||||
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
}
|
}
|
||||||
<ion-col [size]="!serviceJudgeEnabled() ? 6 : 4">
|
<ion-col [size]="!serviceJudgeEnabled() ? 6 : 4">
|
||||||
<ion-item color="medium">
|
<ion-item color="medium">
|
||||||
<ion-label class="ion-text-center"> {{ 'notOnDuty' | translate }} </ion-label>
|
<ion-label class="ion-text-center">
|
||||||
|
{{ 'notOnDuty' | translate }}
|
||||||
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { signal } from '@angular/core';
|
import { signal } from '@angular/core';
|
||||||
import { AlertController } from '@ionic/angular/standalone';
|
import { AlertController } from '@ionic/angular';
|
||||||
import { CourtServiceJudge, CourtUmpire, Settings, Umpire } from 'db';
|
import { CourtServiceJudge, CourtUmpire, Settings, Umpire } from 'db';
|
||||||
import { Tab1Page } from './tab1.page';
|
import { Tab1Page } from './tab1.page';
|
||||||
import { SettingsService } from '../services/settings-service';
|
import { SettingsService } from '../services/settings-service';
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { Component, computed, inject } from '@angular/core';
|
import {
|
||||||
|
Component,
|
||||||
|
computed,
|
||||||
|
inject,
|
||||||
|
ChangeDetectionStrategy
|
||||||
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
IonHeader,
|
IonHeader,
|
||||||
IonToolbar,
|
IonToolbar,
|
||||||
@@ -13,7 +18,7 @@ import {
|
|||||||
IonIcon,
|
IonIcon,
|
||||||
IonButton,
|
IonButton,
|
||||||
AlertController
|
AlertController
|
||||||
} from '@ionic/angular/standalone';
|
} from '@ionic/angular';
|
||||||
import { SettingsService } from '../services/settings-service';
|
import { SettingsService } from '../services/settings-service';
|
||||||
import { UmpireService } from '../services/umpire.service';
|
import { UmpireService } from '../services/umpire.service';
|
||||||
import { Umpire } from 'db';
|
import { Umpire } from 'db';
|
||||||
@@ -27,7 +32,6 @@ import {
|
|||||||
CdkDropList,
|
CdkDropList,
|
||||||
CdkDropListGroup
|
CdkDropListGroup
|
||||||
} from '@angular/cdk/drag-drop';
|
} from '@angular/cdk/drag-drop';
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { CourtUmpireService } from '../services/court.umpire.service';
|
import { CourtUmpireService } from '../services/court.umpire.service';
|
||||||
import { CourtServiceJudgeService } from '../services/court.service.judge.service';
|
import { CourtServiceJudgeService } from '../services/court.service.judge.service';
|
||||||
import { addIcons } from 'ionicons';
|
import { addIcons } from 'ionicons';
|
||||||
@@ -40,6 +44,7 @@ import { TranslationService } from '../i18n/translation.service';
|
|||||||
templateUrl: 'tab1.page.html',
|
templateUrl: 'tab1.page.html',
|
||||||
styleUrls: ['tab1.page.scss'],
|
styleUrls: ['tab1.page.scss'],
|
||||||
providers: [FullnamePipe],
|
providers: [FullnamePipe],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [
|
imports: [
|
||||||
IonButton,
|
IonButton,
|
||||||
IonIcon,
|
IonIcon,
|
||||||
@@ -56,7 +61,6 @@ import { TranslationService } from '../i18n/translation.service';
|
|||||||
FullnamePipe,
|
FullnamePipe,
|
||||||
CdkDropList,
|
CdkDropList,
|
||||||
CdkDrag,
|
CdkDrag,
|
||||||
CommonModule,
|
|
||||||
CdkDragPlaceholder,
|
CdkDragPlaceholder,
|
||||||
CdkDropListGroup,
|
CdkDropListGroup,
|
||||||
TranslatePipe
|
TranslatePipe
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { Component, inject, ViewChild } from '@angular/core';
|
import {
|
||||||
|
Component,
|
||||||
|
inject,
|
||||||
|
ViewChild,
|
||||||
|
ChangeDetectionStrategy
|
||||||
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
IonHeader,
|
IonHeader,
|
||||||
IonToolbar,
|
IonToolbar,
|
||||||
@@ -18,7 +23,7 @@ import {
|
|||||||
IonCol,
|
IonCol,
|
||||||
IonLabel,
|
IonLabel,
|
||||||
AlertController
|
AlertController
|
||||||
} from '@ionic/angular/standalone';
|
} from '@ionic/angular';
|
||||||
import { UmpireService } from '../services/umpire.service';
|
import { UmpireService } from '../services/umpire.service';
|
||||||
import { Umpire } from 'db';
|
import { Umpire } from 'db';
|
||||||
import { addIcons } from 'ionicons';
|
import { addIcons } from 'ionicons';
|
||||||
@@ -35,6 +40,7 @@ import { TranslationService } from '../i18n/translation.service';
|
|||||||
templateUrl: 'tab2.page.html',
|
templateUrl: 'tab2.page.html',
|
||||||
styleUrls: ['tab2.page.scss'],
|
styleUrls: ['tab2.page.scss'],
|
||||||
providers: [FullnamePipe],
|
providers: [FullnamePipe],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [
|
imports: [
|
||||||
IonLabel,
|
IonLabel,
|
||||||
IonCol,
|
IonCol,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component, inject } from '@angular/core';
|
import { Component, inject, ChangeDetectionStrategy } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
IonHeader,
|
IonHeader,
|
||||||
IonToolbar,
|
IonToolbar,
|
||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
IonSelect,
|
IonSelect,
|
||||||
IonSelectOption,
|
IonSelectOption,
|
||||||
IonLabel
|
IonLabel
|
||||||
} from '@ionic/angular/standalone';
|
} from '@ionic/angular';
|
||||||
import { SettingsService } from '../services/settings-service';
|
import { SettingsService } from '../services/settings-service';
|
||||||
import { CourtUmpireService } from '../services/court.umpire.service';
|
import { CourtUmpireService } from '../services/court.umpire.service';
|
||||||
import { CourtServiceJudgeService } from '../services/court.service.judge.service';
|
import { CourtServiceJudgeService } from '../services/court.service.judge.service';
|
||||||
@@ -29,6 +29,7 @@ import { ThemePreference, ThemeService } from '../services/theme.service';
|
|||||||
selector: 'app-tab3',
|
selector: 'app-tab3',
|
||||||
templateUrl: 'tab3.page.html',
|
templateUrl: 'tab3.page.html',
|
||||||
styleUrls: ['tab3.page.scss'],
|
styleUrls: ['tab3.page.scss'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [
|
imports: [
|
||||||
IonRow,
|
IonRow,
|
||||||
IonCol,
|
IonCol,
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
import { Component, EnvironmentInjector, inject } from '@angular/core';
|
import {
|
||||||
|
Component,
|
||||||
|
EnvironmentInjector,
|
||||||
|
inject,
|
||||||
|
ChangeDetectionStrategy
|
||||||
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
IonTabs,
|
IonTabs,
|
||||||
IonTabBar,
|
IonTabBar,
|
||||||
IonTabButton,
|
IonTabButton,
|
||||||
IonIcon,
|
IonIcon,
|
||||||
IonLabel
|
IonLabel
|
||||||
} from '@ionic/angular/standalone';
|
} from '@ionic/angular';
|
||||||
import { addIcons } from 'ionicons';
|
import { addIcons } from 'ionicons';
|
||||||
import { gridOutline, peopleOutline, settingsOutline } from 'ionicons/icons';
|
import { gridOutline, peopleOutline, settingsOutline } from 'ionicons/icons';
|
||||||
import { TranslatePipe } from '../i18n/translation.pipe';
|
import { TranslatePipe } from '../i18n/translation.pipe';
|
||||||
@@ -14,6 +19,7 @@ import { TranslatePipe } from '../i18n/translation.pipe';
|
|||||||
selector: 'app-tabs',
|
selector: 'app-tabs',
|
||||||
templateUrl: 'tabs.page.html',
|
templateUrl: 'tabs.page.html',
|
||||||
styleUrls: ['tabs.page.scss'],
|
styleUrls: ['tabs.page.scss'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, TranslatePipe]
|
imports: [IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, TranslatePipe]
|
||||||
})
|
})
|
||||||
export class TabsPage {
|
export class TabsPage {
|
||||||
|
|||||||
+11
-4
@@ -1,14 +1,21 @@
|
|||||||
|
import { provideZoneChangeDetection } from '@angular/core';
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
|
import {
|
||||||
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';
|
RouteReuseStrategy,
|
||||||
|
provideRouter,
|
||||||
|
withPreloading,
|
||||||
|
PreloadAllModules
|
||||||
|
} from '@angular/router';
|
||||||
|
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular';
|
||||||
|
|
||||||
import { routes } from './app/app.routes';
|
import { routes } from './app/app.routes';
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, {
|
||||||
providers: [
|
providers: [
|
||||||
|
provideZoneChangeDetection(),
|
||||||
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
||||||
provideIonicAngular(),
|
provideIonicAngular(),
|
||||||
provideRouter(routes, withPreloading(PreloadAllModules)),
|
provideRouter(routes, withPreloading(PreloadAllModules))
|
||||||
],
|
]
|
||||||
});
|
});
|
||||||
+5
-5
@@ -3,12 +3,12 @@
|
|||||||
import 'zone.js/testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserTestingModule,
|
||||||
platformBrowserDynamicTesting
|
platformBrowserTesting
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(
|
getTestBed().initTestEnvironment(
|
||||||
BrowserDynamicTestingModule,
|
BrowserTestingModule,
|
||||||
platformBrowserDynamicTesting(),
|
platformBrowserTesting()
|
||||||
);
|
);
|
||||||
@@ -2,5 +2,4 @@
|
|||||||
* Prevents Angular change detection from
|
* Prevents Angular change detection from
|
||||||
* running with certain Web Component callbacks
|
* running with certain Web Component callbacks
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line no-underscore-dangle
|
|
||||||
(window as any).__Zone_disable_customElements = true;
|
(window as any).__Zone_disable_customElements = true;
|
||||||
+10
-7
@@ -5,11 +5,14 @@
|
|||||||
"outDir": "./out-tsc/app",
|
"outDir": "./out-tsc/app",
|
||||||
"types": []
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["src/main.ts", "src/polyfills.ts"],
|
||||||
"src/main.ts",
|
"include": ["src/**/*.d.ts"],
|
||||||
"src/polyfills.ts"
|
"angularCompilerOptions": {
|
||||||
],
|
"extendedDiagnostics": {
|
||||||
"include": [
|
"checks": {
|
||||||
"src/**/*.d.ts"
|
"nullishCoalescingNotNullable": "suppress",
|
||||||
]
|
"optionalChainNotNullable": "suppress"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+2
-3
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./",
|
"paths": { "db": ["./db.ts"] },
|
||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
@@ -14,11 +14,10 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "bundler",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "es2022",
|
"target": "es2022",
|
||||||
"module": "es2020",
|
"module": "es2020",
|
||||||
"lib": ["es2021", "dom"],
|
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"useDefineForClassFields": false
|
"useDefineForClassFields": false
|
||||||
},
|
},
|
||||||
|
|||||||
+11
-11
@@ -3,16 +3,16 @@
|
|||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/spec",
|
"outDir": "./out-tsc/spec",
|
||||||
"types": [
|
"types": ["jasmine"]
|
||||||
"jasmine"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["src/test.ts", "src/polyfills.ts"],
|
||||||
"src/test.ts",
|
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"],
|
||||||
"src/polyfills.ts"
|
"angularCompilerOptions": {
|
||||||
],
|
"extendedDiagnostics": {
|
||||||
"include": [
|
"checks": {
|
||||||
"src/**/*.spec.ts",
|
"nullishCoalescingNotNullable": "suppress",
|
||||||
"src/**/*.d.ts"
|
"optionalChainNotNullable": "suppress"
|
||||||
]
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user