Skip to content

Commit

Permalink
feat(angular-18): added angular 18 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lexasq committed Nov 25, 2024
1 parent b8bdfb5 commit 738bf4c
Show file tree
Hide file tree
Showing 6 changed files with 40,056 additions and 16,102 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ Thumbs.db
.angular

.nx/cache
.nx/workspace-data
22 changes: 11 additions & 11 deletions apps/ng2-charts-demo/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@
@include mat.core();

// Define a light theme
$light-theme: mat.define-light-theme(
$light-theme: mat.m2-define-light-theme(
(
color: (
primary: mat.define-palette(mat.$deep-purple-palette),
accent: mat.define-palette(mat.$amber-palette),
primary: mat.m2-define-palette(mat.$m2-deep-purple-palette),
accent: mat.m2-define-palette(mat.$m2-amber-palette),
),
// Only include `typography` and `density` in the default dark theme.
typography: mat.define-typography-config(),
typography: mat.m2-define-typography-config(),
density: 0,
)
);

// Define a dark theme
$dark-theme: mat.define-dark-theme(
$dark-theme: mat.m2-define-dark-theme(
(
color: (
primary: mat.define-palette(mat.$deep-purple-palette, 300, 100, 500),
accent: mat.define-palette(mat.$amber-palette),
primary: mat.m2-define-palette(mat.$m2-deep-purple-palette, 300, 100, 500),
accent: mat.m2-define-palette(mat.$m2-amber-palette),
),
)
);

@mixin page-header-color($theme) {
// Get the color config from the theme.
$color-config: mat.get-color-config($theme);
$color-config: mat.m2-get-color-config($theme);

// Get the primary color palette from the color-config.
$primary-palette: map.get($color-config, 'primary');

.bd-pageheader {
color: mat.get-color-from-palette($primary-palette, '500-contrast');
color: mat.m2-get-color-from-palette($primary-palette, '500-contrast');
background-image: linear-gradient(
to bottom,
mat.get-color-from-palette($primary-palette, 700) 0,
mat.get-color-from-palette($primary-palette, 500) 100%
mat.m2-get-color-from-palette($primary-palette, 700) 0,
mat.m2-get-color-from-palette($primary-palette, 500) 100%
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ const PACKAGE_NAME = 'ng2-charts';
* Patches `app.config.ts` by adding our provider
*/
export function addChartsProviderToMain(options: Schema): Rule {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
return async (host: Tree) => {
const workspace = await getWorkspace(host);
const projectName =
options.project || (workspace.extensions['defaultProject'] as string);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const project = getProjectFromWorkspace(workspace, options.project);

if (!project) {
Expand Down
Loading

0 comments on commit 738bf4c

Please sign in to comment.