mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
AAE-34390 Clean old theming files (#10800)
This commit is contained in:
8
lib/.gitignore
vendored
8
lib/.gitignore
vendored
@@ -37,14 +37,6 @@ process-services-cloud/**/*.d.ts
|
||||
!config/karma-test-shim.js!
|
||||
|
||||
*.tgzf
|
||||
core/prebuilt-themes/
|
||||
/package/
|
||||
/bundles/
|
||||
index.d.ts
|
||||
/.happypack
|
||||
|
||||
process-services/_theming.scss
|
||||
content-services/_theming.scss
|
||||
core/_theming.scss
|
||||
insights/_theming.scss
|
||||
process-services-cloud/_theming.scss
|
||||
|
@@ -1,38 +0,0 @@
|
||||
function DisableOutputWebpackPlugin(options) {
|
||||
if (options && options.test && !Array.isArray(options.test))
|
||||
options.test = [options.test]
|
||||
|
||||
this.options = options
|
||||
}
|
||||
|
||||
DisableOutputWebpackPlugin.prototype.apply = function(compiler) {
|
||||
compiler.hooks.emit.tapAsync('DisableOutputWebpackPlugin', (compilation, callback) => {
|
||||
|
||||
if (this.options && this.options.test) {
|
||||
if (Object.keys(compilation.assets).length === 0 ) {
|
||||
throw Error ('Error: The asset pre-theme is not there!')
|
||||
}
|
||||
Object.keys(compilation.assets).forEach((asset) => {
|
||||
let output = true
|
||||
this.options.test.some((regex) => {
|
||||
if (asset.match(regex) != null) {
|
||||
output = false
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
if (!output)
|
||||
delete compilation.assets[asset]
|
||||
});
|
||||
} else {
|
||||
Object.keys(compilation.assets).forEach((asset) => {
|
||||
delete compilation.assets[asset]
|
||||
})
|
||||
}
|
||||
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = DisableOutputWebpackPlugin;
|
@@ -1,51 +0,0 @@
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const DisableOutputWebpackPlugin = require('./index');
|
||||
const path = require("path");
|
||||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
|
||||
mode: 'production',
|
||||
|
||||
optimization: {
|
||||
minimizer: [new CssMinimizerPlugin({})],
|
||||
},
|
||||
|
||||
entry: {
|
||||
'adf-blue-orange': './lib/core/src/lib/styles/prebuilt/adf-blue-orange.scss',
|
||||
'adf-blue-purple': './lib/core/src/lib/styles/prebuilt/adf-blue-purple.scss',
|
||||
'adf-cyan-orange': './lib/core/src/lib/styles/prebuilt/adf-cyan-orange.scss',
|
||||
'adf-cyan-purple': './lib/core/src/lib/styles/prebuilt/adf-cyan-purple.scss',
|
||||
'adf-green-purple': './lib/core/src/lib/styles/prebuilt/adf-green-purple.scss',
|
||||
'adf-green-orange': './lib/core/src/lib/styles/prebuilt/adf-green-orange.scss',
|
||||
'adf-pink-bluegrey': './lib/core/src/lib/styles/prebuilt/adf-pink-bluegrey.scss',
|
||||
'adf-indigo-pink': './lib/core/src/lib/styles/prebuilt/adf-indigo-pink.scss',
|
||||
'adf-purple-green': './lib/core/src/lib/styles/prebuilt/adf-purple-green.scss'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../dist/libs/core/lib/prebuilt-themes/'),
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.scss$/,
|
||||
use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"]
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: "[name].css",
|
||||
chunkFilename: "[id].css"
|
||||
}),
|
||||
new DisableOutputWebpackPlugin({
|
||||
test: /\.js$/,
|
||||
})
|
||||
],
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
'styles': path.resolve(__dirname, '../core/src/lib/styles'),
|
||||
}
|
||||
}
|
||||
};
|
@@ -18,7 +18,7 @@
|
||||
import { fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { CategoryService } from '../services/category.service';
|
||||
import { CategoryServiceMock } from '../mock/category-mock.service';
|
||||
import { TreeNodeType, TreeResponse } from '../../tree';
|
||||
import { TreeNodeType } from '../../tree';
|
||||
import { EMPTY, of } from 'rxjs';
|
||||
import { Pagination } from '@alfresco/js-api';
|
||||
import { CategoryTreeDatasourceService } from './category-tree-datasource.service';
|
||||
@@ -39,7 +39,7 @@ describe('CategoryTreeDatasourceService', () => {
|
||||
|
||||
it('should get root level categories', fakeAsync(() => {
|
||||
spyOn(categoryTreeDatasourceService, 'getParentNode').and.returnValue(undefined);
|
||||
categoryTreeDatasourceService.getSubNodes(null, 0, 100).subscribe((treeResponse: TreeResponse<CategoryNode>) => {
|
||||
categoryTreeDatasourceService.getSubNodes(null, 0, 100).subscribe((treeResponse) => {
|
||||
expect(treeResponse.entries.length).toBe(1);
|
||||
expect(treeResponse.entries[0].level).toBe(0);
|
||||
expect(treeResponse.entries[0].nodeType).toBe(TreeNodeType.RegularNode);
|
||||
@@ -57,7 +57,7 @@ describe('CategoryTreeDatasourceService', () => {
|
||||
nodeType: TreeNodeType.RegularNode
|
||||
};
|
||||
spyOn(categoryTreeDatasourceService, 'getParentNode').and.returnValue(parentNode);
|
||||
categoryTreeDatasourceService.getSubNodes(parentNode.id, 0, 100).subscribe((treeResponse: TreeResponse<CategoryNode>) => {
|
||||
categoryTreeDatasourceService.getSubNodes(parentNode.id, 0, 100).subscribe((treeResponse) => {
|
||||
expect(treeResponse.entries.length).toBe(2);
|
||||
expect(treeResponse.entries[0].parentId).toBe(parentNode.id);
|
||||
expect(treeResponse.entries[0].level).toBe(1);
|
||||
|
@@ -19,7 +19,6 @@ import { Injectable } from '@angular/core';
|
||||
import { TreeNodeType, TreeResponse, TreeService } from '../../tree';
|
||||
import { CategoryNode } from '../models/category-node.interface';
|
||||
import { CategoryService } from './category.service';
|
||||
import { CategoryEntry, CategoryPaging } from '@alfresco/js-api';
|
||||
import { from, Observable } from 'rxjs';
|
||||
import { map, mergeMap, toArray } from 'rxjs/operators';
|
||||
|
||||
@@ -32,9 +31,9 @@ export class CategoryTreeDatasourceService extends TreeService<CategoryNode> {
|
||||
public getSubNodes(parentNodeId: string, skipCount?: number, maxItems?: number, name?: string): Observable<TreeResponse<CategoryNode>> {
|
||||
return !name
|
||||
? this.categoryService.getSubcategories(parentNodeId, skipCount, maxItems).pipe(
|
||||
map((response: CategoryPaging) => {
|
||||
const parentNode: CategoryNode = this.getParentNode(parentNodeId);
|
||||
const nodesList: CategoryNode[] = response.list.entries.map((entry: CategoryEntry) => ({
|
||||
map((response) => {
|
||||
const parentNode = this.getParentNode(parentNodeId);
|
||||
const nodesList: CategoryNode[] = response.list.entries.map((entry) => ({
|
||||
id: entry.entry.id,
|
||||
nodeName: entry.entry.name,
|
||||
parentId: entry.entry.parentId,
|
||||
@@ -55,8 +54,7 @@ export class CategoryTreeDatasourceService extends TreeService<CategoryNode> {
|
||||
};
|
||||
nodesList.push(loadMoreNode);
|
||||
}
|
||||
const treeResponse: TreeResponse<CategoryNode> = { entries: nodesList, pagination: response.list.pagination };
|
||||
return treeResponse;
|
||||
return { entries: nodesList, pagination: response.list.pagination };
|
||||
})
|
||||
)
|
||||
: this.categoryService.searchCategories(name, skipCount, maxItems).pipe(
|
||||
|
@@ -27,13 +27,3 @@ typings/
|
||||
fonts/
|
||||
i18n/
|
||||
assets/
|
||||
!/lib/prebuilt-themes/
|
||||
!/lib/prebuilt-themes/adf-indigo-pink.css
|
||||
!/lib/prebuilt-themes/adf-cyan-purple.css
|
||||
!/lib/prebuilt-themes/adf-green-purple.css
|
||||
!/lib/prebuilt-themes/adf-cyan-orange.css
|
||||
!/lib/prebuilt-themes/adf-green-orange.css
|
||||
!/lib/prebuilt-themes/adf-blue-purple.css
|
||||
!/lib/prebuilt-themes/adf-blue-orange.css
|
||||
!/lib/prebuilt-themes/adf-pink-bluegrey.css
|
||||
!/lib/prebuilt-themes/adf-purple-green.css
|
||||
|
@@ -92,7 +92,7 @@
|
||||
"styles": [
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css",
|
||||
"lib/core/src/lib/styles/prebuilt/adf-blue-orange.scss"
|
||||
"node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["lib", "lib/core/src/lib"]
|
||||
@@ -124,19 +124,9 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"pretheme": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "npx webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"npm-publish": {
|
||||
"executor": "nx:run-commands",
|
||||
"dependsOn": ["build", "pretheme", "build-schematics"],
|
||||
"dependsOn": ["build", "build-schematics"],
|
||||
"options": {
|
||||
"cwd": "dist/libs/core",
|
||||
"commands": [
|
||||
|
@@ -1 +0,0 @@
|
||||
@import '../index';
|
@@ -1,21 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette($alfresco-ecm-blue);
|
||||
$accent: mat.define-palette($alfresco-accent-orange);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,21 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette(mat.$pink-palette, 700, 500, 900);
|
||||
$accent: mat.define-palette($alfresco-accent-purple);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,21 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette($alfresco-ecm-cyan);
|
||||
$accent: mat.define-palette($alfresco-accent-orange);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,21 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette($alfresco-ecm-cyan);
|
||||
$accent: mat.define-palette($alfresco-accent-purple);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,21 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette($alfresco-bpm-green);
|
||||
$accent: mat.define-palette($alfresco-accent-orange);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,21 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette($alfresco-bpm-green);
|
||||
$accent: mat.define-palette($alfresco-accent-purple);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,22 +0,0 @@
|
||||
/* stylelint-disable value-keyword-case */
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette(mat.$indigo-palette);
|
||||
$accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,22 +0,0 @@
|
||||
/* stylelint-disable value-keyword-case */
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette(mat.$pink-palette, 700, 500, 900);
|
||||
$accent: mat.define-palette(mat.$blue-grey-palette, A200, A100, A400);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-dark-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
@@ -1,22 +0,0 @@
|
||||
/* stylelint-disable value-keyword-case */
|
||||
@use '@angular/material' as mat;
|
||||
@import '../theming';
|
||||
@import './all-theme';
|
||||
@include mat.all-component-typographies;
|
||||
@include mat.core;
|
||||
|
||||
$primary: mat.define-palette(mat.$purple-palette, 700, 500, 800);
|
||||
$accent: mat.define-palette(mat.$green-palette, A200, A100, A400);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-dark-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
),
|
||||
typography: $alfresco-typography
|
||||
)
|
||||
);
|
||||
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
Reference in New Issue
Block a user