update to angular 21
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
|
||||||
|
|
||||||
|
# Compiled output
|
||||||
|
/dist
|
||||||
|
/tmp
|
||||||
|
/out-tsc
|
||||||
|
/bazel-out
|
||||||
|
|
||||||
|
# Node
|
||||||
|
/node_modules
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
# IDEs and editors
|
||||||
|
.idea/
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.c9/
|
||||||
|
*.launch
|
||||||
|
.settings/
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.history/*
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
/.angular/cache
|
||||||
|
.sass-cache/
|
||||||
|
/connect.lock
|
||||||
|
/coverage
|
||||||
|
/libpeerconnection.log
|
||||||
|
testem.log
|
||||||
|
/typings
|
||||||
|
__screenshots__/
|
||||||
|
|
||||||
|
# System files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"git.ignoreLimitWarning": true
|
|
||||||
}
|
|
||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
# FamilyTree
|
# FamilyTreeUI
|
||||||
|
|
||||||
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.1.
|
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.0.2.
|
||||||
|
|
||||||
## Development server
|
## Development server
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ This will compile your project and store the build artifacts in the `dist/` dire
|
|||||||
|
|
||||||
## Running unit tests
|
## Running unit tests
|
||||||
|
|
||||||
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ng test
|
ng test
|
||||||
|
|||||||
+9
-22
@@ -1,9 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
|
"cli": {
|
||||||
|
"packageManager": "npm",
|
||||||
|
"analytics": false
|
||||||
|
},
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
"projects": {
|
"projects": {
|
||||||
"FamilyTree": {
|
"FamilyTreeUI": {
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"schematics": {},
|
"schematics": {},
|
||||||
"root": "",
|
"root": "",
|
||||||
@@ -26,6 +30,7 @@
|
|||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
"src/styles.css"
|
"src/styles.css"
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -56,36 +61,18 @@
|
|||||||
"builder": "@angular/build:dev-server",
|
"builder": "@angular/build:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"buildTarget": "FamilyTree:build:production"
|
"buildTarget": "FamilyTreeUI:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"buildTarget": "FamilyTree:build:development"
|
"buildTarget": "FamilyTreeUI:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
},
|
},
|
||||||
"extract-i18n": {
|
|
||||||
"builder": "@angular/build:extract-i18n"
|
|
||||||
},
|
|
||||||
"test": {
|
"test": {
|
||||||
"builder": "@angular/build:karma",
|
"builder": "@angular/build:unit-test"
|
||||||
"options": {
|
|
||||||
"tsConfig": "tsconfig.spec.json",
|
|
||||||
"assets": [
|
|
||||||
{
|
|
||||||
"glob": "**/*",
|
|
||||||
"input": "public"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"src/styles.css"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"cli": {
|
|
||||||
"analytics": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+10110
File diff suppressed because it is too large
Load Diff
+21
-23
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "family-tree",
|
"name": "family-tree-ui",
|
||||||
"version": "0.0.0",
|
"version": "1.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
"test": "ng test"
|
"test": "ng test"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
|
"printWidth": 100,
|
||||||
|
"singleQuote": true,
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": "*.html",
|
"files": "*.html",
|
||||||
@@ -19,38 +21,34 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"packageManager": "npm@11.6.4",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "^20.1.7",
|
"@angular/common": "^21.0.0",
|
||||||
"@angular/compiler": "^20.1.7",
|
"@angular/compiler": "^21.0.0",
|
||||||
"@angular/core": "^20.1.7",
|
"@angular/core": "^21.0.0",
|
||||||
"@angular/forms": "^20.1.7",
|
"@angular/forms": "^21.0.0",
|
||||||
"@angular/platform-browser": "^20.1.7",
|
"@angular/platform-browser": "^21.0.0",
|
||||||
"@angular/router": "^20.1.7",
|
"@angular/router": "^21.0.0",
|
||||||
"@primeuix/themes": "^1.2.1",
|
"@primeuix/themes": "^2.0.2",
|
||||||
"@tailwindcss/postcss": "^4.1.11",
|
"@tailwindcss/postcss": "^4.1.17",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"primeicons": "^7.0.0",
|
"primeicons": "^7.0.0",
|
||||||
"primeng": "^20.0.0",
|
"primeng": "^21.0.1",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tailwindcss": "^4.1.11",
|
"tailwindcss": "^4.1.17",
|
||||||
"tailwindcss-primeui": "^0.6.1",
|
"tailwindcss-primeui": "^0.6.1",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/build": "^20.1.6",
|
"@angular/build": "^21.0.2",
|
||||||
"@angular/cli": "^20.1.6",
|
"@angular/cli": "^21.0.2",
|
||||||
"@angular/compiler-cli": "^20.1.7",
|
"@angular/compiler-cli": "^21.0.0",
|
||||||
"@types/file-saver": "^2.0.7",
|
"@types/file-saver": "^2.0.7",
|
||||||
"@types/jasmine": "~5.1.0",
|
"jsdom": "^27.1.0",
|
||||||
"jasmine-core": "~5.8.0",
|
"typescript": "~5.9.2",
|
||||||
"karma": "~6.4.0",
|
"vitest": "^4.0.8"
|
||||||
"karma-chrome-launcher": "~3.2.0",
|
|
||||||
"karma-coverage": "~2.2.0",
|
|
||||||
"karma-jasmine": "~5.1.0",
|
|
||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
|
||||||
"typescript": "~5.8.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +1,11 @@
|
|||||||
import { ApplicationConfig, provideAppInitializer, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection } from '@angular/core';
|
import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
|
||||||
import { provideRouter, withComponentInputBinding } from '@angular/router';
|
import { provideRouter } from '@angular/router';
|
||||||
import { JwtInterceptor, ErrorInterceptor, initializeApp } from './shares';
|
|
||||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
|
||||||
import { providePrimeNG } from 'primeng/config';
|
|
||||||
import { provideHttpClient, withInterceptors } from '@angular/common/http';
|
|
||||||
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
||||||
import { routes } from './app.routes';
|
import { routes } from './app.routes';
|
||||||
import MyPreset from './mythem';
|
|
||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
provideBrowserGlobalErrorListeners(),
|
provideBrowserGlobalErrorListeners(),
|
||||||
MessageService, ConfirmationService,
|
provideRouter(routes)
|
||||||
provideAppInitializer(initializeApp()),
|
|
||||||
provideHttpClient(withInterceptors([JwtInterceptor, ErrorInterceptor])),
|
|
||||||
provideZonelessChangeDetection(),
|
|
||||||
provideAnimationsAsync(),
|
|
||||||
providePrimeNG({
|
|
||||||
theme: {
|
|
||||||
preset: MyPreset,
|
|
||||||
options: {
|
|
||||||
cssLayer: {
|
|
||||||
name: 'primeng',
|
|
||||||
order: 'theme, base, primeng'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
provideRouter(routes, withComponentInputBinding())
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
ng build --base-href "/familytreeui/" -c production
|
|
||||||
*/
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import { Component, signal } from '@angular/core';
|
import { Component, signal } from '@angular/core';
|
||||||
import { RouterOutlet } from '@angular/router';
|
import { RouterOutlet } from '@angular/router';
|
||||||
import { ToolbarComponent } from './toolbar/toolbar.component';
|
import { ToolbarComponent } from './toolbar/toolbar.component';
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
//mypreset.ts
|
|
||||||
import { definePreset } from '@primeuix/themes';
|
|
||||||
import Aura from '@primeuix/themes/aura';
|
|
||||||
import { primitive } from '@primeuix/themes/aura/base';
|
|
||||||
|
|
||||||
const MyPreset = definePreset(Aura, {
|
|
||||||
semantic: {
|
|
||||||
colorScheme: {
|
|
||||||
primitive: {
|
|
||||||
cyan: {
|
|
||||||
50: '{cyan.50}',
|
|
||||||
100: '{cyan.100}',
|
|
||||||
200: '{cyan.200}',
|
|
||||||
300: '{cyan.300}',
|
|
||||||
400: '{cyan.400}',
|
|
||||||
500: '{cyan.500}',
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
primary: {
|
|
||||||
50: '{zinc.50}',
|
|
||||||
100: '{zinc.100}',
|
|
||||||
200: '{zinc.200}',
|
|
||||||
300: '{zinc.300}',
|
|
||||||
400: '{zinc.400}',
|
|
||||||
500: '{zinc.500}',
|
|
||||||
600: '{zinc.600}',
|
|
||||||
700: '{zinc.700}',
|
|
||||||
800: '{zinc.800}',
|
|
||||||
900: '{zinc.900}',
|
|
||||||
950: '{zinc.950}'
|
|
||||||
},
|
|
||||||
light: {
|
|
||||||
surface: {
|
|
||||||
0: '#ffffff',
|
|
||||||
50: '{zinc.50}',
|
|
||||||
100: '{zinc.100}',
|
|
||||||
200: '{zinc.200}',
|
|
||||||
300: '{zinc.300}',
|
|
||||||
400: '{zinc.400}',
|
|
||||||
500: '{zinc.500}',
|
|
||||||
600: '{zinc.600}',
|
|
||||||
700: '{zinc.700}',
|
|
||||||
800: '{zinc.800}',
|
|
||||||
900: '{zinc.900}',
|
|
||||||
950: '{zinc.950}'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
surface: {
|
|
||||||
0: '#ffffff',
|
|
||||||
50: '{slate.50}',
|
|
||||||
100: '{slate.100}',
|
|
||||||
200: '{slate.200}',
|
|
||||||
300: '{slate.300}',
|
|
||||||
400: '{slate.400}',
|
|
||||||
500: '{slate.500}',
|
|
||||||
600: '{slate.600}',
|
|
||||||
700: '{slate.700}',
|
|
||||||
800: '{slate.800}',
|
|
||||||
900: '{slate.900}',
|
|
||||||
950: '{slate.950}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export default MyPreset;
|
|
||||||
@@ -192,7 +192,8 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
|||||||
width: '80%',
|
width: '80%',
|
||||||
maximizable: true
|
maximizable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
|
{
|
||||||
ref.onClose.subscribe((item: Person) => {
|
ref.onClose.subscribe((item: Person) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
//console.log("after close ward edit", item);
|
//console.log("after close ward edit", item);
|
||||||
@@ -201,7 +202,7 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
|||||||
this.updateList(item);
|
this.updateList(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateList(item: Person) :void {
|
updateList(item: Person) :void {
|
||||||
const idx = this.familyList.findIndex( x => x.id == item.id);
|
const idx = this.familyList.findIndex( x => x.id == item.id);
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
|||||||
width: '80%',
|
width: '80%',
|
||||||
maximizable: true
|
maximizable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
|
{
|
||||||
ref.onClose.subscribe((item: Person) => {
|
ref.onClose.subscribe((item: Person) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
//console.log("after close ward edit", item);
|
//console.log("after close ward edit", item);
|
||||||
@@ -175,7 +176,7 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
|||||||
this.updateList(item);
|
this.updateList(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateList(item: Person) :void {
|
updateList(item: Person) :void {
|
||||||
const idx = this.familyList.findIndex( x => x.id == item.id);
|
const idx = this.familyList.findIndex( x => x.id == item.id);
|
||||||
|
|||||||
@@ -282,15 +282,17 @@ export class FamilyList implements OnInit, OnDestroy{
|
|||||||
draggable: true,
|
draggable: true,
|
||||||
maximizable: true
|
maximizable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
ref.onClose.subscribe((item: Person) => {
|
{
|
||||||
if (item) {
|
ref.onClose.subscribe((item: Person) => {
|
||||||
//console.log("after close ward edit", item);
|
if (item) {
|
||||||
// this.messageService.add({severity:'success', summary: 'Save Family', detail: item.firstName!});
|
//console.log("after close ward edit", item);
|
||||||
//update the current list
|
// this.messageService.add({severity:'success', summary: 'Save Family', detail: item.firstName!});
|
||||||
this.updateList(item);
|
//update the current list
|
||||||
}
|
this.updateList(item);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showOrganise(id:number) {
|
showOrganise(id:number) {
|
||||||
@@ -304,7 +306,8 @@ export class FamilyList implements OnInit, OnDestroy{
|
|||||||
maximizable: true,
|
maximizable: true,
|
||||||
closable: true
|
closable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
|
{
|
||||||
ref.onClose.subscribe((item: Person) => {
|
ref.onClose.subscribe((item: Person) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
//console.log("after close ward edit", item);
|
//console.log("after close ward edit", item);
|
||||||
@@ -313,6 +316,7 @@ export class FamilyList implements OnInit, OnDestroy{
|
|||||||
//this.updateList(item);
|
//this.updateList(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateList(item: Person) :void {
|
updateList(item: Person) :void {
|
||||||
|
|||||||
@@ -316,15 +316,17 @@ doViewImage(imageName:string): void {
|
|||||||
modal:true,
|
modal:true,
|
||||||
maximizable: true
|
maximizable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
ref.onClose.subscribe((item: Person) => {
|
{
|
||||||
if (item) {
|
ref.onClose.subscribe((item: Person) => {
|
||||||
//console.log("after close ward edit", item);
|
if (item) {
|
||||||
this.messageService.add({severity:'success', summary: 'Select', detail: item.firstName!});
|
//console.log("after close ward edit", item);
|
||||||
//update the current list
|
this.messageService.add({severity:'success', summary: 'Select', detail: item.firstName!});
|
||||||
|
//update the current list
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assignValue(item:Person): void {
|
assignValue(item:Person): void {
|
||||||
@@ -628,7 +630,8 @@ showPickPerson(title:string, callback:(id: Person) => void) :void {
|
|||||||
draggable: true,
|
draggable: true,
|
||||||
maximizable: true
|
maximizable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
|
{
|
||||||
ref.onClose.subscribe((item: Person) => {
|
ref.onClose.subscribe((item: Person) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
//console.log("after close ward edit", item);
|
//console.log("after close ward edit", item);
|
||||||
@@ -637,6 +640,7 @@ showPickPerson(title:string, callback:(id: Person) => void) :void {
|
|||||||
callback(item);
|
callback(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showAttachment(title:string): void {
|
showAttachment(title:string): void {
|
||||||
@@ -650,7 +654,8 @@ showAttachment(title:string): void {
|
|||||||
draggable: true,
|
draggable: true,
|
||||||
maximizable: true
|
maximizable: true
|
||||||
});
|
});
|
||||||
|
if (ref)
|
||||||
|
{
|
||||||
ref.onClose.subscribe((ritem: any) => {
|
ref.onClose.subscribe((ritem: any) => {
|
||||||
const item = ritem.list;
|
const item = ritem.list;
|
||||||
const deleteIds = ritem.deleteIds;
|
const deleteIds = ritem.deleteIds;
|
||||||
@@ -682,6 +687,7 @@ showAttachment(title:string): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePhotoList(list: PersonPhotoDto[]): void {
|
updatePhotoList(list: PersonPhotoDto[]): void {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>FamilyTree</title>
|
<title>FamilyTreeUI</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
"enableI18nLegacyMessageIdFormat": false,
|
"enableI18nLegacyMessageIdFormat": false,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"strictInputAccessModifiers": true,
|
"strictInputAccessModifiers": true,
|
||||||
"typeCheckHostBindings": true,
|
|
||||||
"strictTemplates": true
|
"strictTemplates": true
|
||||||
},
|
},
|
||||||
"files": [],
|
"files": [],
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/spec",
|
"outDir": "./out-tsc/spec",
|
||||||
"types": [
|
"types": [
|
||||||
"jasmine"
|
"vitest/globals"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts"
|
"src/**/*.d.ts",
|
||||||
|
"src/**/*.spec.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user