angular 12 with theming workaround

This commit is contained in:
Denys Vuika
2022-02-23 12:10:03 +00:00
committed by eromano
parent 270d98b7dc
commit c2904c5a1d
37 changed files with 3394 additions and 4046 deletions

View File

@@ -1,11 +1,11 @@
@import '~@angular/material/theming';
@use '~@angular/material' as mat;
@import '../../lib/core/styles/index';
@include mat-core($alfresco-typography);
@include mat.core($alfresco-typography);
$primary: mat-palette($alfresco-accent-orange);
$accent: mat-palette($alfresco-accent-purple);
$warn: mat-palette($alfresco-warn);
$theme: mat-light-theme(
$primary: mat.define-palette($alfresco-accent-orange);
$accent: mat.define-palette($alfresco-accent-purple);
$warn: mat.define-palette($alfresco-warn);
$theme: mat.define-light-theme(
(
color: (
primary: $primary,
@@ -14,7 +14,7 @@ $theme: mat-light-theme(
)
);
@include angular-material-theme($theme);
@include mat.all-component-themes($theme);
@include alfresco-material-theme($theme);
body,
@@ -22,9 +22,9 @@ html {
margin: 0;
height: 100%;
overflow: hidden;
font-size: mat-font-size($alfresco-typography, body-1);
font-family: mat-font-family($alfresco-typography);
line-height: mat-line-height($alfresco-typography, body-1);
font-size: mat.font-size($alfresco-typography, body-1);
font-family: mat.font-family($alfresco-typography);
line-height: mat.line-height($alfresco-typography, body-1);
}
body {

View File

@@ -1,11 +1,11 @@
@import '~@angular/material/theming';
@use '~@angular/material' as mat;
@import '~@alfresco/adf-core/theming';
@include mat-core($alfresco-typography);
@include mat.core($alfresco-typography);
$primary: mat-palette($alfresco-accent-orange);
$accent: mat-palette($alfresco-accent-purple);
$warn: mat-palette($alfresco-warn);
$theme: mat-light-theme(
$primary: mat.define-palette($alfresco-accent-orange);
$accent: mat.define-palette($alfresco-accent-purple);
$warn: mat.define-palette($alfresco-warn);
$theme: mat.define-light-theme(
(
color: (
primary: $primary,
@@ -14,7 +14,7 @@ $theme: mat-light-theme(
)
);
@include angular-material-theme($theme);
@include mat.all-component-themes($theme);
@include alfresco-material-theme($theme);
body,
@@ -22,9 +22,9 @@ html {
margin: 0;
height: 100%;
overflow: hidden;
font-size: mat-font-size($alfresco-typography, body-1);
font-family: mat-font-family($alfresco-typography);
line-height: mat-line-height($alfresco-typography, body-1);
font-size: mat.font-size($alfresco-typography, body-1);
font-family: mat.font-family($alfresco-typography);
line-height: mat.line-height($alfresco-typography, body-1);
}
body {

View File

@@ -41,7 +41,7 @@
/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.
/**
* Support custom event in IE11

View File

@@ -17,7 +17,7 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,