Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to Angular 19 #715

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"sourceRoot": "apps/demo/src",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:application",
"executor": "@angular/build:application",
"options": {
"outputPath": "dist/demo",
"index": "apps/demo/src/index.html",
"browser": "apps/demo/src/main.ts",
"polyfills": ["zone.js"],
"polyfills": [],
"tsConfig": "apps/demo/tsconfig.app.json",
"baseHref": "./",
"assets": [
Expand Down Expand Up @@ -46,7 +46,7 @@
"defaultConfiguration": "production"
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
"executor": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "demo:build:production"
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {dirname, join, resolve} from 'node:path';
import {fileURLToPath} from 'node:url';

import {APP_BASE_HREF} from '@angular/common';
import {CommonEngine} from '@angular/ssr';
import {CommonEngine} from '@angular/ssr/node';
import {provideLocation, provideUserAgent} from '@ng-web-apis/universal';
import express from 'express';

Expand Down
5 changes: 2 additions & 3 deletions apps/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
import {RouterOutlet} from '@angular/router';
import {TuiRoot} from '@taiga-ui/core';
import {TuiEditor, TuiEditorSocket} from '@taiga-ui/editor';

@Component({
standalone: true,
selector: 'app',
imports: [RouterOutlet, TuiEditor, TuiEditorSocket, TuiRoot],
selector: 'app-root',
imports: [RouterOutlet, TuiRoot],
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
7 changes: 6 additions & 1 deletion apps/demo/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type {ApplicationConfig, Injector} from '@angular/core';
import {importProvidersFrom, INJECTOR} from '@angular/core';
import {
importProvidersFrom,
INJECTOR,
provideExperimentalZonelessChangeDetection,
} from '@angular/core';
import {provideClientHydration} from '@angular/platform-browser';
import {provideAnimations} from '@angular/platform-browser/animations';
import {provideRouter} from '@angular/router';
Expand All @@ -10,6 +14,7 @@ import {TUI_SANITIZER} from '@taiga-ui/legacy';

export const appConfig: ApplicationConfig = {
providers: [
provideExperimentalZonelessChangeDetection(),
provideClientHydration(),
provideAnimations(),
provideRouter([
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h2 class="title">
}
</div>
<div class="controls">
<label>
<label class="label">
<input
size="m"
tuiSwitch
Expand Down
14 changes: 9 additions & 5 deletions apps/demo/src/app/home/home.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
justify-content: space-between;
}

.button[data-size][data-shape],
.error[data-size][data-shape] {
.button[data-size],
.error[data-size] {
.transition(~'color, background');

background: var(--tui-background-base-alt);
Expand All @@ -54,7 +54,7 @@
}
}

.error[data-size][data-shape] {
.error[data-size] {
color: var(--tui-text-negative);

&:hover,
Expand Down Expand Up @@ -131,12 +131,12 @@ tui-dialog[data-appearance='call'][data-size] {
color: #fff;
}

.missed [data-appearance='custom'] {
.missed[data-appearance='custom'] {
background: rgb(210, 58, 71);
transform: rotate(135deg);
}

.income [data-appearance='custom'] {
.income[data-appearance='custom'] {
background: rgb(39, 187, 100);
}

Expand All @@ -146,6 +146,10 @@ tui-dialog[data-appearance='call'][data-size] {
}
}

.label {
display: flex;
}

@keyframes moveGradient {
50% {
background-position: 100% 50%;
Expand Down
6 changes: 2 additions & 4 deletions apps/demo/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {
TuiLabel,
TuiLink,
} from '@taiga-ui/core';
import {NgDompurifyPipe, NgDompurifySanitizer} from '@taiga-ui/dompurify';
import {TuiEditor, TuiEditorSocket, TuiEditorTool} from '@taiga-ui/editor';
import {NgDompurifySanitizer} from '@taiga-ui/dompurify';
import {TuiEditor, TuiEditorTool} from '@taiga-ui/editor';
import {TuiAccordion, TuiCheckbox, TuiPush, TuiSlider, TuiSwitch} from '@taiga-ui/kit';
import {
TuiInputDateModule,
Expand All @@ -35,14 +35,12 @@ import {
imports: [
CommonModule,
FormsModule,
NgDompurifyPipe,
TuiAccordion,
TuiButton,
TuiCalendar,
TuiCheckbox,
TuiDropdown,
TuiEditor,
TuiEditorSocket,
TuiHint,
TuiIcon,
TuiInputDateModule,
Expand Down
13 changes: 0 additions & 13 deletions apps/demo/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false,
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
5 changes: 2 additions & 3 deletions apps/demo/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/>
<meta
content="yes"
name="apple-mobile-web-app-capable"
name="mobile-web-app-capable"
/>
<meta
content="angular angularjs component library ui kit directive service typescript decorator javascript opensource open source open-source ng"
Expand Down Expand Up @@ -79,7 +79,6 @@
/>
</head>
<body>
<!-- eslint-disable-next-line @angular-eslint/template/prefer-self-closing-tags -->
<app></app>
<app-root></app-root>
</body>
</html>
Loading
Loading