diff --git a/.gitignore b/.gitignore index dc46e1d846..4e2b869aab 100644 --- a/.gitignore +++ b/.gitignore @@ -131,4 +131,5 @@ target/ vite.config.*.timestamp* # AWS SAM -.aws-sam \ No newline at end of file +.aws-sam +vitest.config.*.timestamp* \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index 820c3a3066..abc70ae767 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,6 @@ # Run formatters and linters against staged git files pnpm dlx lint-staged --relative - # nx affected --uncommitted --target=lint # Re-index the staged files after they have been formatted -# git diff --name-only --cached | xargs -l git add \ No newline at end of file +# git diff --name-only --cached | xargs -l git add diff --git a/apps/agora/app-tailwind/.eslintrc.json b/apps/agora/app-tailwind/.eslintrc.json deleted file mode 100644 index 36040daaee..0000000000 --- a/apps/agora/app-tailwind/.eslintrc.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/agora/app-tailwind/jest.config.ts b/apps/agora/app-tailwind/jest.config.ts deleted file mode 100644 index 9c26b04161..0000000000 --- a/apps/agora/app-tailwind/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - displayName: 'agora-app-tailwind', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/apps/agora/app-tailwind', - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/agora/app-tailwind/project.json b/apps/agora/app-tailwind/project.json deleted file mode 100644 index 311d433978..0000000000 --- a/apps/agora/app-tailwind/project.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "agora-app-tailwind", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/agora/app-tailwind/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/agora/app-tailwind", - "index": "apps/agora/app-tailwind/src/index.html", - "browser": "apps/agora/app-tailwind/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/agora/app-tailwind/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - { - "glob": "**/*", - "input": "apps/agora/app-tailwind/public" - } - ], - "styles": ["apps/agora/app-tailwind/src/styles.scss"], - "scripts": [], - "server": "apps/agora/app-tailwind/src/main.server.ts", - "prerender": true, - "ssr": { - "entry": "apps/agora/app-tailwind/server.ts" - } - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "agora-app-tailwind:build:production" - }, - "development": { - "buildTarget": "agora-app-tailwind:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "agora-app-tailwind:build" - } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "apps/agora/app-tailwind/jest.config.ts" - } - }, - "serve-static": { - "executor": "@nx/web:file-server", - "options": { - "buildTarget": "agora-app-tailwind:build", - "staticFilePath": "dist/apps/agora/app-tailwind/browser", - "spa": true - } - } - } -} diff --git a/apps/agora/app-tailwind/public/favicon.ico b/apps/agora/app-tailwind/public/favicon.ico deleted file mode 100644 index 317ebcb233..0000000000 Binary files a/apps/agora/app-tailwind/public/favicon.ico and /dev/null differ diff --git a/apps/agora/app-tailwind/server.ts b/apps/agora/app-tailwind/server.ts deleted file mode 100644 index 9c65f56d29..0000000000 --- a/apps/agora/app-tailwind/server.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { APP_BASE_HREF } from '@angular/common'; -import { CommonEngine } from '@angular/ssr'; -import express from 'express'; -import { fileURLToPath } from 'node:url'; -import { dirname, join, resolve } from 'node:path'; -import bootstrap from './src/main.server'; - -// The Express app is exported so that it can be used by serverless Functions. -export function app(): express.Express { - const server = express(); - const serverDistFolder = dirname(fileURLToPath(import.meta.url)); - const browserDistFolder = resolve(serverDistFolder, '../browser'); - const indexHtml = join(serverDistFolder, 'index.server.html'); - - const commonEngine = new CommonEngine(); - - server.set('view engine', 'html'); - server.set('views', browserDistFolder); - - // Example Express Rest API endpoints - // server.get('/api/**', (req, res) => { }); - // Serve static files from /browser - server.get( - '**', - express.static(browserDistFolder, { - maxAge: '1y', - index: 'index.html', - }), - ); - - // All regular routes use the Angular engine - server.get('**', (req, res, next) => { - const { protocol, originalUrl, baseUrl, headers } = req; - - commonEngine - .render({ - bootstrap, - documentFilePath: indexHtml, - url: `${protocol}://${headers.host}${originalUrl}`, - publicPath: browserDistFolder, - providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }], - }) - .then((html) => res.send(html)) - .catch((err) => next(err)); - }); - - return server; -} - -function run(): void { - const port = process.env['PORT'] || 4000; - - // Start up the Node server - const server = app(); - server.listen(port, () => { - console.log(`Node Express server listening on http://localhost:${port}`); - }); -} - -run(); diff --git a/apps/agora/app-tailwind/src/app/app.component.html b/apps/agora/app-tailwind/src/app/app.component.html deleted file mode 100644 index 97a817a066..0000000000 --- a/apps/agora/app-tailwind/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/apps/agora/app-tailwind/src/app/app.component.scss b/apps/agora/app-tailwind/src/app/app.component.scss deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/agora/app-tailwind/src/app/app.component.spec.ts b/apps/agora/app-tailwind/src/app/app.component.spec.ts deleted file mode 100644 index b769543dc0..0000000000 --- a/apps/agora/app-tailwind/src/app/app.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { AppComponent } from './app.component'; -import { NxWelcomeComponent } from './nx-welcome.component'; -import { RouterModule } from '@angular/router'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [AppComponent, NxWelcomeComponent, RouterModule.forRoot([])], - }).compileComponents(); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain('Welcome agora-app-tailwind'); - }); - - it(`should have as title 'agora-app-tailwind'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('agora-app-tailwind'); - }); -}); diff --git a/apps/agora/app-tailwind/src/app/app.component.ts b/apps/agora/app-tailwind/src/app/app.component.ts deleted file mode 100644 index 4c9ca913a9..0000000000 --- a/apps/agora/app-tailwind/src/app/app.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { NxWelcomeComponent } from './nx-welcome.component'; - -@Component({ - standalone: true, - imports: [NxWelcomeComponent, RouterModule], - selector: 'app-root', - templateUrl: './app.component.html', - styleUrl: './app.component.scss', -}) -export class AppComponent { - title = 'agora-app-tailwind'; -} diff --git a/apps/agora/app-tailwind/src/app/app.config.server.ts b/apps/agora/app-tailwind/src/app/app.config.server.ts deleted file mode 100644 index 1980cfe118..0000000000 --- a/apps/agora/app-tailwind/src/app/app.config.server.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; -import { provideServerRendering } from '@angular/platform-server'; -import { appConfig } from './app.config'; - -const serverConfig: ApplicationConfig = { - providers: [provideServerRendering()], -}; - -export const config = mergeApplicationConfig(appConfig, serverConfig); diff --git a/apps/agora/app-tailwind/src/app/app.config.ts b/apps/agora/app-tailwind/src/app/app.config.ts deleted file mode 100644 index 8f91ae956c..0000000000 --- a/apps/agora/app-tailwind/src/app/app.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; -import { appRoutes } from './app.routes'; -import { provideClientHydration } from '@angular/platform-browser'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideClientHydration(), - provideZoneChangeDetection({ eventCoalescing: true }), - provideRouter(appRoutes), - ], -}; diff --git a/apps/agora/app-tailwind/src/app/app.routes.ts b/apps/agora/app-tailwind/src/app/app.routes.ts deleted file mode 100644 index 8762dfe2c6..0000000000 --- a/apps/agora/app-tailwind/src/app/app.routes.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Route } from '@angular/router'; - -export const appRoutes: Route[] = []; diff --git a/apps/agora/app-tailwind/src/app/nx-welcome.component.ts b/apps/agora/app-tailwind/src/app/nx-welcome.component.ts deleted file mode 100644 index e62375a271..0000000000 --- a/apps/agora/app-tailwind/src/app/nx-welcome.component.ts +++ /dev/null @@ -1,935 +0,0 @@ -import { Component, ViewEncapsulation } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@Component({ - selector: 'app-nx-welcome', - standalone: true, - imports: [CommonModule], - template: ` - - -
-
- -
-

- Hello there, - Welcome agora-app-tailwind 👋 -

-
- -
-
-

- - - - You're up and running -

- What's next? -
-
- - - -
-
- - - -
-

Next steps

-

Here are some things you can do with Nx:

-
- - - - - Build, test and lint your app - -
# Build
-nx build 
-# Test
-nx test 
-# Lint
-nx lint 
-# Run them together!
-nx run-many -t build test lint
-
-
- - - - - View project details - -
nx show project agora-app-tailwind
-
- -
- - - - - View interactive project graph - -
nx graph
-
- -
- - - - - Add UI library - -
# Generate UI lib
-nx g @nx/angular:lib ui
-# Add a component
-nx g @nx/angular:component ui/src/lib/button
-
-
-

- Carefully crafted with - - - -

-
-
- `, - styles: [], - encapsulation: ViewEncapsulation.None, -}) -export class NxWelcomeComponent {} diff --git a/apps/agora/app-tailwind/src/index.html b/apps/agora/app-tailwind/src/index.html deleted file mode 100644 index 09a0008b78..0000000000 --- a/apps/agora/app-tailwind/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - agora-app-tailwind - - - - - - - - diff --git a/apps/agora/app-tailwind/src/main.server.ts b/apps/agora/app-tailwind/src/main.server.ts deleted file mode 100644 index 4b9d4d1545..0000000000 --- a/apps/agora/app-tailwind/src/main.server.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { config } from './app/app.config.server'; - -const bootstrap = () => bootstrapApplication(AppComponent, config); - -export default bootstrap; diff --git a/apps/agora/app-tailwind/src/main.ts b/apps/agora/app-tailwind/src/main.ts deleted file mode 100644 index 17447a5dce..0000000000 --- a/apps/agora/app-tailwind/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)); diff --git a/apps/agora/app-tailwind/src/styles.scss b/apps/agora/app-tailwind/src/styles.scss deleted file mode 100644 index 77e408aa8b..0000000000 --- a/apps/agora/app-tailwind/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/agora/app-tailwind/src/test-setup.ts b/apps/agora/app-tailwind/src/test-setup.ts deleted file mode 100644 index ab1eeeb335..0000000000 --- a/apps/agora/app-tailwind/src/test-setup.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment -globalThis.ngJest = { - testEnvironmentOptions: { - errorOnUnknownElements: true, - errorOnUnknownProperties: true, - }, -}; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/agora/app-tailwind/tailwind.config.js b/apps/agora/app-tailwind/tailwind.config.js deleted file mode 100644 index 38183db2c8..0000000000 --- a/apps/agora/app-tailwind/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/agora/app-tailwind/tsconfig.app.json b/apps/agora/app-tailwind/tsconfig.app.json deleted file mode 100644 index 2afe01ea4a..0000000000 --- a/apps/agora/app-tailwind/tsconfig.app.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": ["node"] - }, - "files": ["src/main.ts", "src/main.server.ts", "server.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/agora/app-tailwind/tsconfig.editor.json b/apps/agora/app-tailwind/tsconfig.editor.json deleted file mode 100644 index a8ac182c08..0000000000 --- a/apps/agora/app-tailwind/tsconfig.editor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": {}, - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/agora/app-tailwind/tsconfig.json b/apps/agora/app-tailwind/tsconfig.json deleted file mode 100644 index ddb3050218..0000000000 --- a/apps/agora/app-tailwind/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/agora/app-tailwind/tsconfig.spec.json b/apps/agora/app-tailwind/tsconfig.spec.json deleted file mode 100644 index e637bf83b5..0000000000 --- a/apps/agora/app-tailwind/tsconfig.spec.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "target": "es2016", - "types": ["jest", "node"] - }, - "files": ["src/test-setup.ts"], - "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] -} diff --git a/apps/agora/app/.eslintrc.json b/apps/agora/app/.eslintrc.json index 36040daaee..579327ff90 100644 --- a/apps/agora/app/.eslintrc.json +++ b/apps/agora/app/.eslintrc.json @@ -21,7 +21,8 @@ "prefix": "app", "style": "kebab-case" } - ] + ], + "@angular-eslint/prefer-standalone": "off" } }, { diff --git a/apps/agora/app/server.ts b/apps/agora/app/server.ts index 0f44c67540..a311c011e5 100644 --- a/apps/agora/app/server.ts +++ b/apps/agora/app/server.ts @@ -1,7 +1,7 @@ import 'zone.js/node'; import { APP_BASE_HREF } from '@angular/common'; -import { CommonEngine } from '@angular/ssr'; +import { CommonEngine } from '@angular/ssr/node'; import * as express from 'express'; import { existsSync } from 'node:fs'; import { join } from 'node:path'; diff --git a/apps/agora/app/src/_app-theme.scss b/apps/agora/app/src/_app-theme.scss index 2a721a9e1a..3a4b88c44c 100644 --- a/apps/agora/app/src/_app-theme.scss +++ b/apps/agora/app/src/_app-theme.scss @@ -3,13 +3,12 @@ @use 'libs/agora/themes/src/fonts' as fonts; @use 'libs/agora/themes/src/palettes' as palettes; @use 'libs/agora/themes/src/index' as agora; - @include mat.typography-hierarchy(fonts.$lato); -@include mat.core(); +@include mat.elevation-classes; +@include mat.app-background; $primary: mat.m2-define-palette(palettes.$dark-blue-palette, 600); $accent: mat.m2-define-palette(palettes.$accent-purple-palette, 400); - $theme: mat.m2-define-light-theme( ( color: ( @@ -33,7 +32,8 @@ $theme: map.deep-merge( ); // Emit theme-dependent styles for common features used across multiple components. -@include mat.core-theme($theme); +@include mat.elevation-classes; +@include mat.app-background; // Emit styles for MatButton based on `$theme`. @include mat.button-theme($theme); @@ -44,5 +44,5 @@ $theme: map.deep-merge( :root { --color-btn-primary: #39bde7; --color-btn-disabled: #ebebe4; - --color-btn-shadow: rgba(196, 196, 196, 1); + --color-btn-shadow: rgb(196 196 196 / 100%); } diff --git a/apps/agora/app/src/app/app.component.ts b/apps/agora/app/src/app/app.component.ts index e0d484a7fb..9b9a664c9b 100644 --- a/apps/agora/app/src/app/app.component.ts +++ b/apps/agora/app/src/app/app.component.ts @@ -11,7 +11,6 @@ import { ToastModule } from 'primeng/toast'; import { MessageService } from 'primeng/api'; @Component({ - standalone: true, imports: [RouterModule, HeaderComponent, FooterComponent, LoadingOverlayComponent, ToastModule], providers: [MessageService], selector: 'app-root', diff --git a/apps/agora/app/src/app/app.config.ts b/apps/agora/app/src/app/app.config.ts index f739075fed..4c09b56ce1 100644 --- a/apps/agora/app/src/app/app.config.ts +++ b/apps/agora/app/src/app/app.config.ts @@ -1,4 +1,4 @@ -import { ApplicationConfig, APP_INITIALIZER, APP_ID } from '@angular/core'; +import { ApplicationConfig, APP_ID, inject, provideAppInitializer } from '@angular/core'; import { provideRouter, withEnabledBlockingInitialNavigation, @@ -30,12 +30,10 @@ export const appConfig: ApplicationConfig = { useFactory: () => 'https://repo-prod.prod.sagebase.org', deps: [], }, - { - provide: APP_INITIALIZER, - useFactory: configFactory, - deps: [ConfigService], - multi: true, - }, + provideAppInitializer(() => { + const initializerFn = configFactory(inject(ConfigService)); + return initializerFn(); + }), { provide: API_CLIENT_BASE_PATH, useFactory: (configService: ConfigService) => diff --git a/apps/model-ad/app/.eslintrc.json b/apps/model-ad/app/.eslintrc.json index 36040daaee..579327ff90 100644 --- a/apps/model-ad/app/.eslintrc.json +++ b/apps/model-ad/app/.eslintrc.json @@ -21,7 +21,8 @@ "prefix": "app", "style": "kebab-case" } - ] + ], + "@angular-eslint/prefer-standalone": "off" } }, { diff --git a/apps/model-ad/app/server.ts b/apps/model-ad/app/server.ts index 609b265d60..2965c63fe4 100644 --- a/apps/model-ad/app/server.ts +++ b/apps/model-ad/app/server.ts @@ -1,7 +1,7 @@ import 'zone.js/node'; import { APP_BASE_HREF } from '@angular/common'; -import { CommonEngine } from '@angular/ssr'; +import { CommonEngine } from '@angular/ssr/node'; import * as express from 'express'; import { existsSync } from 'node:fs'; import { join } from 'node:path'; diff --git a/apps/model-ad/app/src/_app-theme.scss b/apps/model-ad/app/src/_app-theme.scss index c88aa8777f..0b7cb45646 100644 --- a/apps/model-ad/app/src/_app-theme.scss +++ b/apps/model-ad/app/src/_app-theme.scss @@ -3,13 +3,12 @@ @use 'libs/model-ad/themes/src/fonts' as fonts; @use 'libs/model-ad/themes/src/palettes' as palettes; @use 'libs/model-ad/themes/src/index' as model-ad; - @include mat.typography-hierarchy(fonts.$lato); -@include mat.core(); +@include mat.elevation-classes; +@include mat.app-background; $primary: mat.m2-define-palette(palettes.$dark-blue-palette, 600); $accent: mat.m2-define-palette(palettes.$accent-purple-palette, 400); - $theme: mat.m2-define-light-theme( ( color: ( @@ -33,7 +32,8 @@ $theme: map.deep-merge( ); // Emit theme-dependent styles for common features used across multiple components. -@include mat.core-theme($theme); +@include mat.elevation-classes; +@include mat.app-background; // Emit styles for MatButton based on `$theme`. @include mat.button-theme($theme); @@ -44,5 +44,5 @@ $theme: map.deep-merge( :root { --color-btn-primary: #39bde7; --color-btn-disabled: #ebebe4; - --color-btn-shadow: rgba(196, 196, 196, 1); + --color-btn-shadow: rgb(196 196 196 / 100%); } diff --git a/apps/model-ad/app/src/app/app.component.ts b/apps/model-ad/app/src/app/app.component.ts index 676d8f4717..dc93bfeae6 100644 --- a/apps/model-ad/app/src/app/app.component.ts +++ b/apps/model-ad/app/src/app/app.component.ts @@ -3,7 +3,6 @@ import { RouterModule } from '@angular/router'; import { FooterComponent } from '@sagebionetworks/model-ad/ui'; @Component({ - standalone: true, imports: [RouterModule, FooterComponent], selector: 'app-root', templateUrl: './app.component.html', diff --git a/apps/model-ad/app/src/app/app.config.ts b/apps/model-ad/app/src/app/app.config.ts index 7f3195d255..c6c159bb85 100644 --- a/apps/model-ad/app/src/app/app.config.ts +++ b/apps/model-ad/app/src/app/app.config.ts @@ -1,4 +1,4 @@ -import { ApplicationConfig, APP_INITIALIZER, APP_ID } from '@angular/core'; +import { ApplicationConfig, APP_ID, inject, provideAppInitializer } from '@angular/core'; import { provideRouter, withEnabledBlockingInitialNavigation, @@ -24,12 +24,10 @@ export const appConfig: ApplicationConfig = { useFactory: () => '.', deps: [], }, - { - provide: APP_INITIALIZER, - useFactory: configFactory, - deps: [ConfigService], - multi: true, - }, + provideAppInitializer(() => { + const initializerFn = configFactory(inject(ConfigService)); + return initializerFn(); + }), { provide: API_CLIENT_BASE_PATH, useFactory: (configService: ConfigService) => diff --git a/apps/openchallenges/app/.eslintrc.json b/apps/openchallenges/app/.eslintrc.json index 984ee36364..1e5d8a352c 100644 --- a/apps/openchallenges/app/.eslintrc.json +++ b/apps/openchallenges/app/.eslintrc.json @@ -21,7 +21,8 @@ "prefix": "app", "style": "kebab-case" } - ] + ], + "@angular-eslint/prefer-standalone": "off" } }, { diff --git a/apps/openchallenges/app/server.ts b/apps/openchallenges/app/server.ts index a7a96c6764..7e61878cfd 100644 --- a/apps/openchallenges/app/server.ts +++ b/apps/openchallenges/app/server.ts @@ -1,5 +1,5 @@ import { APP_BASE_HREF } from '@angular/common'; -import { CommonEngine } from '@angular/ssr'; +import { CommonEngine } from '@angular/ssr/node'; import express from 'express'; import { fileURLToPath } from 'node:url'; import { dirname, join, resolve } from 'node:path'; diff --git a/apps/openchallenges/app/src/_app-theme.scss b/apps/openchallenges/app/src/_app-theme.scss index b15b9205e5..d1babe8494 100644 --- a/apps/openchallenges/app/src/_app-theme.scss +++ b/apps/openchallenges/app/src/_app-theme.scss @@ -4,7 +4,8 @@ @use 'openchallenges/themes/src/palettes' as palettes; @use 'openchallenges/themes/src/index' as openchallenges; @include mat.typography-hierarchy(fonts.$lato); -@include mat.core; +@include mat.elevation-classes; +@include mat.app-background; $primary: mat.m2-define-palette(palettes.$dark-blue-palette, 600); $accent: mat.m2-define-palette(palettes.$accent-purple-palette, 400); @@ -31,7 +32,8 @@ $theme: map.deep-merge( ); // Emit theme-dependent styles for common features used across multiple components. -@include mat.core-theme($theme); +@include mat.elevation-classes; +@include mat.app-background; // Emit styles for MatButton based on `$theme`. @include mat.button-theme($theme); diff --git a/apps/openchallenges/app/src/app/app.component.ts b/apps/openchallenges/app/src/app/app.component.ts index 28f74b9a5d..bcd858ff03 100644 --- a/apps/openchallenges/app/src/app/app.component.ts +++ b/apps/openchallenges/app/src/app/app.component.ts @@ -20,7 +20,6 @@ import { NgIf } from '@angular/common'; selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], - standalone: true, imports: [NavbarComponent, RouterOutlet, NgIf, GoogleTagManagerComponent], }) export class AppComponent implements OnInit, OnDestroy { diff --git a/apps/openchallenges/app/src/app/app.config.ts b/apps/openchallenges/app/src/app/app.config.ts index 43b862581d..2a60057092 100644 --- a/apps/openchallenges/app/src/app/app.config.ts +++ b/apps/openchallenges/app/src/app/app.config.ts @@ -1,8 +1,9 @@ import { ApplicationConfig, provideZoneChangeDetection, - APP_INITIALIZER, APP_ID, + inject, + provideAppInitializer, } from '@angular/core'; import { provideRouter, @@ -19,12 +20,10 @@ import { provideHttpClient, withFetch } from '@angular/common/http'; export const appConfig: ApplicationConfig = { providers: [ { provide: APP_ID, useValue: 'openchallenges-app' }, - { - provide: APP_INITIALIZER, - useFactory: configFactory, - deps: [ConfigService], - multi: true, - }, + provideAppInitializer(() => { + const initializerFn = configFactory(inject(ConfigService)); + return initializerFn(); + }), { provide: API_CLIENT_BASE_PATH, useFactory: (configService: ConfigService) => diff --git a/apps/sandbox/angular-app/.eslintrc.json b/apps/sandbox/angular-app/.eslintrc.json index 36040daaee..579327ff90 100644 --- a/apps/sandbox/angular-app/.eslintrc.json +++ b/apps/sandbox/angular-app/.eslintrc.json @@ -21,7 +21,8 @@ "prefix": "app", "style": "kebab-case" } - ] + ], + "@angular-eslint/prefer-standalone": "off" } }, { diff --git a/apps/sandbox/angular-app/project.json b/apps/sandbox/angular-app/project.json index bd366b65bc..3725e45aa3 100644 --- a/apps/sandbox/angular-app/project.json +++ b/apps/sandbox/angular-app/project.json @@ -43,8 +43,8 @@ }, { "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" + "maximumWarning": "8kb", + "maximumError": "10kb" } ], "outputHashing": "all" diff --git a/apps/sandbox/angular-app/server.ts b/apps/sandbox/angular-app/server.ts index 9c65f56d29..afd50c9643 100644 --- a/apps/sandbox/angular-app/server.ts +++ b/apps/sandbox/angular-app/server.ts @@ -1,5 +1,5 @@ import { APP_BASE_HREF } from '@angular/common'; -import { CommonEngine } from '@angular/ssr'; +import { CommonEngine } from '@angular/ssr/node'; import express from 'express'; import { fileURLToPath } from 'node:url'; import { dirname, join, resolve } from 'node:path'; diff --git a/apps/sandbox/angular-app/src/app/app.component.ts b/apps/sandbox/angular-app/src/app/app.component.ts index 2038a20fcf..4c4d95eb56 100644 --- a/apps/sandbox/angular-app/src/app/app.component.ts +++ b/apps/sandbox/angular-app/src/app/app.component.ts @@ -4,7 +4,6 @@ import { NxWelcomeComponent } from './nx-welcome.component'; import { SandboxAngularLibComponent } from '@sagebionetworks/sandbox-angular-lib'; @Component({ - standalone: true, imports: [NxWelcomeComponent, RouterModule, SandboxAngularLibComponent], selector: 'app-root', templateUrl: './app.component.html', diff --git a/apps/sandbox/angular-app/src/app/nx-welcome.component.ts b/apps/sandbox/angular-app/src/app/nx-welcome.component.ts index f1f3f44307..bf733b0666 100644 --- a/apps/sandbox/angular-app/src/app/nx-welcome.component.ts +++ b/apps/sandbox/angular-app/src/app/nx-welcome.component.ts @@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common'; @Component({ selector: 'app-nx-welcome', - standalone: true, imports: [CommonModule], template: `