diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index fb92325c6e..0000000000 --- a/.browserslistrc +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major version -last 2 iOS major versions -Firefox ESR -not IE 9-11 # For IE 9-11 support, remove 'not'. diff --git a/.eslintrc.js b/.eslintrc.js index e05c7e3899..ff098a708e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,7 @@ module.exports = { '**/scripts', '**/docs' ], - plugins: ['@nrwl/nx'], + plugins: ['@nx'], overrides: [ { files: ['*.ts'], @@ -19,11 +19,9 @@ module.exports = { createDefaultProgram: true }, extends: [ - 'plugin:@nrwl/nx/typescript', - 'plugin:@nrwl/nx/angular', + 'plugin:@nx/typescript', + 'plugin:@nx/angular', 'plugin:@cspell/recommended', - 'plugin:@angular-eslint/ng-cli-compat', - 'plugin:@angular-eslint/ng-cli-compat--formatting-add-on', 'plugin:@angular-eslint/template/process-inline-templates', 'plugin:jsdoc/recommended-typescript-error' ], diff --git a/.eslintrc.json b/.eslintrc.json index e05c7e3899..4bcc6cb1a0 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,188 +1,3 @@ -module.exports = { - root: true, - ignorePatterns: [ - 'projects/**/*', - '**/node_modules/**/*', - 'lib/cli/node_modules/**/*', - '**/node_modules', - '**/docker', - '**/assets', - '**/scripts', - '**/docs' - ], - plugins: ['@nrwl/nx'], - overrides: [ - { - files: ['*.ts'], - parserOptions: { - project: ['tsconfig.json', 'e2e/tsconfig.e2e.json'], - createDefaultProgram: true - }, - extends: [ - 'plugin:@nrwl/nx/typescript', - 'plugin:@nrwl/nx/angular', - 'plugin:@cspell/recommended', - 'plugin:@angular-eslint/ng-cli-compat', - 'plugin:@angular-eslint/ng-cli-compat--formatting-add-on', - 'plugin:@angular-eslint/template/process-inline-templates', - 'plugin:jsdoc/recommended-typescript-error' - ], - plugins: [ - 'eslint-plugin-unicorn', - 'eslint-plugin-rxjs', - 'prettier', - 'ban', - 'license-header', - '@cspell', - 'eslint-plugin-import', - '@angular-eslint/eslint-plugin', - '@typescript-eslint', - 'jsdoc' - ], - rules: { - // Uncomment this to enable prettier checks as part of the ESLint - // 'prettier/prettier': 'error', - 'ban/ban': [ - 'error', - { name: 'eval', message: 'Calls to eval is not allowed.' }, - { name: 'fdescribe', message: 'Calls to fdescribe is not allowed' }, - { name: 'fit', message: 'Calls to fit is not allowed' }, - { name: 'xit', message: 'Calls to xit is not allowed' }, - { name: 'xdescribe', message: 'Calls to xdescribe is not allowed' }, - { name: ['test', 'only'], message: 'Calls to test.only is not allowed' }, - { name: ['describe', 'only'], message: 'Calls to describe.only is not allowed' } - ], - '@angular-eslint/component-selector': [ - 'error', - { - type: 'element', - prefix: ['adf', 'app'], - style: 'kebab-case' - } - ], - '@angular-eslint/directive-selector': [ - 'error', - { - type: ['element', 'attribute'], - prefix: ['adf', 'app'], - style: 'kebab-case' - } - ], - '@angular-eslint/no-host-metadata-property': 'off', - '@angular-eslint/no-input-prefix': 'error', - '@typescript-eslint/consistent-type-definitions': 'error', - '@typescript-eslint/dot-notation': 'off', - '@typescript-eslint/explicit-member-accessibility': [ - 'off', - { - accessibility: 'explicit' - } - ], - '@typescript-eslint/await-thenable': 'error', - '@typescript-eslint/prefer-optional-chain': 'warn', - '@typescript-eslint/no-inferrable-types': 'off', - '@typescript-eslint/no-require-imports': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/naming-convention': [ - 'error', - { - selector: [ - 'classProperty', - 'objectLiteralProperty', - 'typeProperty', - 'classMethod', - 'objectLiteralMethod', - 'typeMethod', - 'accessor', - 'enumMember' - ], - format: null, - modifiers: ['requiresQuotes'] - } - ], - '@typescript-eslint/member-ordering': 'off', - 'prefer-arrow/prefer-arrow-functions': 'off', - 'prefer-promise-reject-errors': 'error', - 'brace-style': 'off', - '@typescript-eslint/brace-style': 'error', - 'comma-dangle': 'error', - 'default-case': 'error', - 'import/order': 'off', - 'max-len': [ - 'error', - { - code: 240 - } - ], - 'no-bitwise': 'off', - 'no-console': [ - 'error', - { - allow: [ - 'warn', - 'dir', - 'timeLog', - 'assert', - 'clear', - 'count', - 'countReset', - 'group', - 'groupEnd', - 'table', - 'dirxml', - 'error', - 'groupCollapsed', - 'Console', - 'profile', - 'profileEnd', - 'timeStamp', - 'context' - ] - } - ], - 'no-duplicate-imports': 'error', - 'no-multiple-empty-lines': 'error', - 'no-redeclare': 'error', - 'no-return-await': 'error', - 'rxjs/no-create': 'error', - 'rxjs/no-subject-unsubscribe': 'error', - 'rxjs/no-subject-value': 'error', - 'rxjs/no-unsafe-takeuntil': 'error', - 'unicorn/filename-case': 'error', - '@typescript-eslint/no-unused-expressions': [ - 'error', - { - allowShortCircuit: true, - allowTernary: true - } - ], - 'license-header/header': [ - 'error', - [ - '/*!', - ' * @license', - ' * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.', - ' *', - ' * Licensed under the Apache License, Version 2.0 (the "License");', - ' * you may not use this file except in compliance with the License.', - ' * You may obtain a copy of the License at', - ' *', - ' * http://www.apache.org/licenses/LICENSE-2.0', - ' *', - ' * Unless required by applicable law or agreed to in writing, software', - ' * distributed under the License is distributed on an "AS IS" BASIS,', - ' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.', - ' * See the License for the specific language governing permissions and', - ' * limitations under the License.', - ' */' - ] - ] - } - }, - { - files: ['*.html'], - extends: ['plugin:@angular-eslint/template/recommended'], - rules: {} - } - ] -}; +{ + "extends": ["../../.eslintrc.js"] +} diff --git a/.storybook/main.js b/.storybook/main.js index 51d3372dc5..801822372b 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,7 +1,5 @@ module.exports = { - stories: [], - addons: ['@storybook/addon-essentials'], framework: '@storybook/angular', - staticDirs: [ { from: '../../../demo-shell/src/app.config.json', to: 'app.config.json' } ], + staticDirs: [{ from: '../../../demo-shell/src/app.config.json', to: 'app.config.json' }], core: { builder: 'webpack5' } }; diff --git a/angular.json b/angular.json deleted file mode 100644 index 3ffa67f349..0000000000 --- a/angular.json +++ /dev/null @@ -1,1153 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "lib", - "projects": { - "demoshell": { - "root": "demo-shell", - "sourceRoot": "demo-shell/src", - "projectType": "application", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "allowedCommonJsDependencies": [ - "minimatch", - "minimatch-browser", - "superagent", - "event-emitter", - "brace-expansion", - "zen-observable", - "subscriptions-transport-ws", - "d", - "chart.js" - ], - "outputPath": "dist/demo-shell", - "index": "demo-shell/src/index.html", - "main": "demo-shell/src/main.ts", - "tsConfig": "tsconfig.dev.json", - "polyfills": "demo-shell/src/polyfills.ts", - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - }, - "assets": [ - "demo-shell/src/assets", - "demo-shell/src/favicon-96x96.png", - "demo-shell/src/app.config.json", - { - "glob": "**/*", - "input": "demo-shell/src/assets", - "output": "/assets" - }, - { - "glob": "app.config.json", - "input": "demo-shell/src", - "output": "/" - }, - { - "glob": "**/*", - "input": "demo-shell/resources", - "output": "/resources" - }, - { - "glob": "**/*", - "input": "lib/core/src/lib/assets", - "output": "/assets" - }, - { - "glob": "**/*", - "input": "lib/process-services/src/lib/assets", - "output": "/assets" - }, - { - "glob": "**/*", - "input": "lib/process-services-cloud/src/lib/assets", - "output": "/assets" - }, - { - "glob": "**/*", - "input": "lib/content-services/src/lib/assets", - "output": "/assets" - }, - { - "glob": "**/*", - "input": "lib/core/src/lib/i18n", - "output": "/assets/adf-core/i18n" - }, - { - "glob": "**/*", - "input": "lib/content-services/src/lib/i18n", - "output": "/assets/adf-content-services/i18n" - }, - { - "glob": "**/*", - "input": "lib/process-services/src/lib/i18n", - "output": "/assets/adf-process-services/i18n" - }, - { - "glob": "**/*", - "input": "lib/process-services-cloud/src/lib/i18n", - "output": "/assets/adf-process-services-cloud/i18n" - }, - { - "glob": "**/*", - "input": "lib/insights/src/lib/i18n", - "output": "/assets/adf-insights/i18n" - }, - { - "glob": "pdf.worker.min.js", - "input": "node_modules/pdfjs-dist/build", - "output": "/" - }, - { - "glob": "**/*", - "input": "node_modules/monaco-editor", - "output": "/assets/monaco/" - } - ], - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "scripts": [ - "node_modules/pdfjs-dist/build/pdf.js", - "node_modules/pdfjs-dist/web/pdf_viewer.js", - "node_modules/raphael/raphael.min.js" - ], - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "anyComponentStyle", - "maximumWarning": "12kb" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "buildOptimizer": true, - "verbose": false, - "fileReplacements": [ - { - "replace": "demo-shell/src/environments/environment.ts", - "with": "demo-shell/src/environments/environment.prod.ts" - } - ] - }, - "canary": { - "fileReplacements": [ - { - "replace": "demo-shell/src/environments/environment.ts", - "with": "demo-shell/src/environments/environment.canary.ts" - } - ] - }, - "e2e": { - "budgets": [ - { - "type": "anyComponentStyle", - "maximumWarning": "6kb" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "buildOptimizer": true, - "verbose": false, - "fileReplacements": [ - { - "replace": "demo-shell/src/environments/environment.ts", - "with": "demo-shell/src/environments/environment.e2e.ts" - } - ] - } - }, - "defaultConfiguration": "" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "demoshell:build", - "host": "0.0.0.0", - "port": 3000, - "proxyConfig": "demo-shell/proxy.conf.js", - "disableHostCheck": true - }, - "configurations": { - "production": { - "browserTarget": "demoshell:build:production" - }, - "canary": { - "browserTarget": "demoshell:build:canary" - }, - "e2e": { - "browserTarget": "demoshell:build:e2e" - } - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "demo-shell/**/*.ts", - "demo-shell/**/*.html" - ] - } - } - } - }, - "demoshell-e2e": { - "root": "demo-shell", - "sourceRoot": "./demo-shell", - "projectType": "application", - "architect": { - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "proxyConfig": "./e2e/proxy.conf.js", - "browserTarget": "dev:build", - "port": 3000 - }, - "configurations": { - "production": { - "browserTarget": "dev:build:production" - } - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "./e2e/protractor.conf.js", - "devServerTarget": "lib-e2e-test:serve" - } - } - } - }, - "core": { - "projectType": "library", - "root": "lib/core", - "sourceRoot": "lib/core", - "prefix": "adf", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "lib/core/tsconfig.lib.json", - "project": "lib/core/ng-package.json" - }, - "dependsOn": ["^build", "license"], - "configurations": { - "production": { - "project": "lib/core/ng-package.json", - "tsConfig": "lib/core/tsconfig.lib.prod.json" - }, - "development": { - "tsConfig": "lib/core/tsconfig.lib.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "lib/core/test.ts", - "tsConfig": "lib/core/tsconfig.spec.json", - "karmaConfig": "lib/core/karma.conf.js", - "sourceMap": true, - "codeCoverage": true, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - }, - "styles": [ - "demo-shell/src/styles.scss" - ] - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/core/**/*.ts", - "lib/core/**/*.html", - "lib/core/api/**/*.ts", - "lib/core/api/**/*.html", - "lib/core/auth/**/*.ts", - "lib/core/auth/**/*.html", - "lib/core/shell/**/*.ts", - "lib/core/shell/**/*.html", - "lib/core/breadcrumbs/**/*.ts", - "lib/core/breadcrumbs/**/*.html" - ] - } - }, - "storybook": { - "builder": "@storybook/angular:start-storybook", - "options": { - "port": 4400, - "browserTarget": "core:storybook", - "configDir": "lib/core/.storybook", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "builder": "@storybook/angular:build-storybook", - "options": { - "browserTarget": "core:build-storybook", - "configDir": "lib/core/.storybook", - "outputDir": "dist/storybook/core", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "stylelint": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx stylelint lib/core/**/*.scss --config stylelint-config.json" - } - ] - } - }, - "license": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx license-checker --production --failOn 'GPL;GPL-2.0' > licenses.txt" - } - ] - } - }, - "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" - ], - "options": { - "cwd": "dist/libs/core", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - } - } - } - }, - "content-services": { - "root": "lib/content-services", - "sourceRoot": "lib/content-services/src", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "lib/content-services/tsconfig.lib.json", - "project": "lib/content-services/ng-package.json" - }, - "configurations": { - "production": { - "project": "lib/content-services/ng-package.json", - "tsConfig": "lib/content-services/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "lib/content-services/src/test.ts", - "tsConfig": "lib/content-services/tsconfig.spec.json", - "karmaConfig": "lib/content-services/karma.conf.js", - "sourceMap": true, - "codeCoverage": true, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/content-services/**/*.ts", - "lib/content-services/**/*.html" - ] - } - }, - "storybook": { - "builder": "@storybook/angular:start-storybook", - "options": { - "port": 4400, - "browserTarget": "content-services:storybook", - "configDir": "lib/content-services/.storybook", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "builder": "@storybook/angular:build-storybook", - "options": { - "browserTarget": "content-services:build-storybook", - "configDir": "lib/content-services/.storybook", - "outputDir": "dist/storybook/content-services", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "stylelint": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx stylelint lib/content-services/**/*.scss --config stylelint-config.json" - } - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/content-services", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "process-services": { - "root": "lib/process-services", - "sourceRoot": "lib/process-services", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "lib/process-services/tsconfig.lib.json", - "project": "lib/process-services/ng-package.json" - }, - "configurations": { - "production": { - "project": "lib/process-services/ng-package.json", - "tsConfig": "lib/process-services/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "lib/process-services/src/test.ts", - "tsConfig": "lib/process-services/tsconfig.spec.json", - "karmaConfig": "lib/process-services/karma.conf.js", - "sourceMap": true, - "codeCoverage": true, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/process-services/**/*.ts", - "lib/process-services/**/*.html" - ] - } - }, - "stylelint": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx stylelint lib/process-services-cloud/**/*.scss --config stylelint-config.json" - } - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/process-services", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "process-services-cloud": { - "root": "lib/process-services-cloud", - "sourceRoot": "lib/process-services-cloud/src", - "projectType": "library", - "prefix": "adf-cloud", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "lib/process-services-cloud/tsconfig.lib.json", - "project": "lib/process-services-cloud/ng-package.json" - }, - "configurations": { - "production": { - "project": "lib/process-services-cloud/ng-package.json", - "tsConfig": "lib/process-services-cloud/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "lib/process-services-cloud/src/test.ts", - "tsConfig": "lib/process-services-cloud/tsconfig.spec.json", - "karmaConfig": "lib/process-services-cloud/karma.conf.js", - "sourceMap": true, - "codeCoverage": true, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/process-services-cloud/**/*.ts", - "lib/process-services-cloud/**/*.html" - ] - } - }, - "storybook": { - "builder": "@storybook/angular:start-storybook", - "options": { - "port": 4400, - "browserTarget": "process-services-cloud:storybook", - "configDir": "lib/process-services-cloud/.storybook", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "builder": "@storybook/angular:build-storybook", - "options": { - "browserTarget": "process-services-cloud:build-storybook", - "configDir": "lib/process-services-cloud/.storybook", - "outputDir": "dist/storybook/process-services-cloud", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - - "e2e-playwright": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx playwright test --config='e2e-playwright/playwright.config.ts'" - } - ] - } - }, - "stylelint": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx stylelint lib/process-services-cloud/**/*.scss --config stylelint-config.json" - } - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/process-services-cloud", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "insights": { - "root": "lib/insights", - "sourceRoot": "lib/insights/src", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "lib/insights/tsconfig.lib.json", - "project": "lib/insights/ng-package.json" - }, - "configurations": { - "production": { - "project": "lib/insights/ng-package.json", - "tsConfig": "lib/insights/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "lib/insights/src/test.ts", - "tsConfig": "lib/insights/tsconfig.spec.json", - "karmaConfig": "lib/insights/karma.conf.js", - "sourceMap": true, - "codeCoverage": true, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/insights/**/*.ts", - "lib/insights/**/*.html" - ] - } - }, - "stylelint": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "npx stylelint lib/insights/**/*.scss --config stylelint-config.json" - } - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/insights", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "extensions": { - "root": "lib/extensions", - "sourceRoot": "lib/extensions/src", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "lib/extensions/tsconfig.lib.json", - "project": "lib/extensions/ng-package.json" - }, - "configurations": { - "production": { - "tsConfig": "lib/extensions/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "lib/extensions/src/test.ts", - "tsConfig": "lib/extensions/tsconfig.spec.json", - "karmaConfig": "lib/extensions/karma.conf.js", - "sourceMap": true, - "codeCoverage": true, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - } - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/extensions/**/*.ts", - "lib/extensions/**/*.html" - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/extensions", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "testing": { - "root": "lib/testing", - "sourceRoot": "lib/testing/src", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "@nrwl/node:webpack", - "options": { - "projectRoot": "lib/testing", - "outputPath": "dist/libs/testing", - "main": "lib/testing/index.ts", - "generatePackageJson" : true, - "tsConfig": "lib/testing/tsconfig.lib.prod.json", - "additionalEntryPoints": [ - { - "entryName": "shared", - "entryPath": "/lib/testing/src/lib/shared/index.ts" - } - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "production": { - "projectRoot": "lib/testing", - "outputPath": "dist/libs/testing", - "main": "lib/testing/index.ts", - "generatePackageJson" : true, - "tsConfig": "lib/testing/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/testing/**/*.ts", - "lib/testing/**/*.html" - ] - } - }, - "bundle": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "echo testing bundle created" - } - ] - }, - "dependsOn": [ - "copyToNodeModules" - ] - }, - "copyToNodeModules": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "rm -rf ./node_modules/@alfresco/adf-testing/ && mkdir -p ./node_modules/@alfresco/adf-testing/ && cp -R ./dist/libs/testing/* ./node_modules/@alfresco/adf-testing/" - } - ] - }, - "dependsOn": [ - { - "projects": "self", - "target": "build" - } - ] - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/testing", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "eslint-angular": { - "root": "lib/eslint-angular", - "sourceRoot": "lib/eslint-angular/src", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "@nrwl/node:webpack", - "options": { - "projectRoot": "lib/eslint-angular", - "outputPath": "dist/libs/eslint-plugin-eslint-angular", - "main": "lib/eslint-angular/index.ts", - "generatePackageJson" : true, - "tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json", - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "production": { - "projectRoot": "lib/eslint-angular", - "outputPath": "dist/libs/eslint-plugin-eslint-angular", - "main": "lib/eslint-angular/index.ts", - "generatePackageJson" : true, - "tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json" - } - }, - "defaultConfiguration": "production" - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/eslint-angular/**/*.ts" - ] - } - }, - "bundle": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "echo testing bundle created" - } - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/eslint-plugin-eslint-angular", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "cli": { - "root": "lib/cli", - "sourceRoot": "lib/cli", - "projectType": "library", - "prefix": "adf", - "architect": { - "build": { - "builder": "nx:run-commands", - "options": { - "command": - "cd lib/cli && npm i && npm run dist", - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "production": { - "tsConfig": "lib/cli/tsconfig.json" - } - }, - "defaultConfiguration": "production" - }, - "bundle": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "echo cli bundle created" - } - ] - }, - "dependsOn": [ - "copyToNodeModules" - ] - }, - "copyToNodeModules": { - "executor": "nx:run-commands", - "options": { - "commands": [ - { - "command": "rm -rf ./node_modules/@alfresco/adf-cli/ && mkdir -p ./node_modules/@alfresco/adf-cli/ && cp -R ./dist/libs/cli/* ./node_modules/@alfresco/adf-cli/" - } - ] - }, - "dependsOn": [ - { - "projects": "self", - "target": "build" - } - ] - }, - "lint": { - "builder": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": [ - "lib/cli/**/*.ts", - "lib/cli/**/*.html" - ] - } - }, - "npm-publish": { - "executor": "nx:run-commands", - "dependsOn": [ - "build" - ], - "options": { - "cwd": "dist/libs/cli", - "commands": [ - { - "command": "npm publish --tag {args.tag}", - "forwardAllArgs": true - } - ] - } - } - } - }, - "stories": { - "root": "lib/stories", - "sourceRoot": "lib/stories", - "projectType": "library", - "architect": { - "storybook": { - "builder": "@storybook/angular:start-storybook", - "options": { - "port": 4400, - "browserTarget": "stories:storybook", - "configDir": "lib/stories/.storybook", - "compodoc": false, - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - }, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ] - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "builder": "@storybook/angular:build-storybook", - "options": { - "browserTarget": "stories:build-storybook", - "configDir": "lib/stories/.storybook", - "outputDir": "dist/storybook/stories", - "compodoc": false, - "styles": [ - "demo-shell/src/styles.scss", - "demo-shell/src/custom-style-dev.scss", - "node_modules/cropperjs/dist/cropper.min.css", - "node_modules/pdfjs-dist/web/pdf_viewer.css" - ], - "stylePreprocessorOptions": { - "includePaths": [ - "lib", "lib/core/src/lib" - ] - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - } - } - } - }, - "defaultProject": "demoshell" -} diff --git a/demo-shell/project.json b/demo-shell/project.json new file mode 100644 index 0000000000..344a052dd9 --- /dev/null +++ b/demo-shell/project.json @@ -0,0 +1,200 @@ +{ + "name": "demoshell", + "$schema": "../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "demo-shell/src", + "projectType": "application", + "targets": { + "build": { + "executor": "@angular-devkit/build-angular:browser", + "options": { + "allowedCommonJsDependencies": [ + "minimatch", + "minimatch-browser", + "superagent", + "event-emitter", + "brace-expansion", + "zen-observable", + "subscriptions-transport-ws", + "d", + "chart.js" + ], + "outputPath": "dist/demo-shell", + "index": "demo-shell/src/index.html", + "main": "demo-shell/src/main.ts", + "tsConfig": "tsconfig.dev.json", + "polyfills": "demo-shell/src/polyfills.ts", + "stylePreprocessorOptions": { + "includePaths": ["lib", "lib/core/src/lib"] + }, + "assets": [ + "demo-shell/src/assets", + "demo-shell/src/favicon-96x96.png", + "demo-shell/src/app.config.json", + { + "glob": "**/*", + "input": "demo-shell/src/assets", + "output": "/assets" + }, + { + "glob": "app.config.json", + "input": "demo-shell/src", + "output": "/" + }, + { + "glob": "**/*", + "input": "demo-shell/resources", + "output": "/resources" + }, + { + "glob": "**/*", + "input": "lib/core/src/lib/assets", + "output": "/assets" + }, + { + "glob": "**/*", + "input": "lib/process-services/src/lib/assets", + "output": "/assets" + }, + { + "glob": "**/*", + "input": "lib/process-services-cloud/src/lib/assets", + "output": "/assets" + }, + { + "glob": "**/*", + "input": "lib/content-services/src/lib/assets", + "output": "/assets" + }, + { + "glob": "**/*", + "input": "lib/core/src/lib/i18n", + "output": "/assets/adf-core/i18n" + }, + { + "glob": "**/*", + "input": "lib/content-services/src/lib/i18n", + "output": "/assets/adf-content-services/i18n" + }, + { + "glob": "**/*", + "input": "lib/process-services/src/lib/i18n", + "output": "/assets/adf-process-services/i18n" + }, + { + "glob": "**/*", + "input": "lib/process-services-cloud/src/lib/i18n", + "output": "/assets/adf-process-services-cloud/i18n" + }, + { + "glob": "**/*", + "input": "lib/insights/src/lib/i18n", + "output": "/assets/adf-insights/i18n" + }, + { + "glob": "pdf.worker.min.js", + "input": "node_modules/pdfjs-dist/build", + "output": "/" + }, + { + "glob": "**/*", + "input": "node_modules/monaco-editor", + "output": "/assets/monaco/" + } + ], + "styles": [ + "demo-shell/src/styles.scss", + "demo-shell/src/custom-style-dev.scss", + "node_modules/cropperjs/dist/cropper.min.css", + "node_modules/pdfjs-dist/web/pdf_viewer.css" + ], + "scripts": ["node_modules/pdfjs-dist/build/pdf.js", "node_modules/pdfjs-dist/web/pdf_viewer.js", "node_modules/raphael/raphael.min.js"], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "12kb" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "buildOptimizer": true, + "verbose": false, + "fileReplacements": [ + { + "replace": "demo-shell/src/environments/environment.ts", + "with": "demo-shell/src/environments/environment.prod.ts" + } + ] + }, + "canary": { + "fileReplacements": [ + { + "replace": "demo-shell/src/environments/environment.ts", + "with": "demo-shell/src/environments/environment.canary.ts" + } + ] + }, + "e2e": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "buildOptimizer": true, + "verbose": false, + "fileReplacements": [ + { + "replace": "demo-shell/src/environments/environment.ts", + "with": "demo-shell/src/environments/environment.e2e.ts" + } + ] + } + }, + "defaultConfiguration": "" + }, + "serve": { + "executor": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "demoshell:build", + "host": "0.0.0.0", + "port": 3000, + "proxyConfig": "demo-shell/proxy.conf.js", + "disableHostCheck": true + }, + "configurations": { + "production": { + "browserTarget": "demoshell:build:production" + }, + "canary": { + "browserTarget": "demoshell:build:canary" + }, + "e2e": { + "browserTarget": "demoshell:build:e2e" + } + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["demo-shell/**/*.ts", "demo-shell/**/*.html"] + } + } + } +} diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts index 2822b58c51..46d85528db 100644 --- a/demo-shell/src/app/app.module.ts +++ b/demo-shell/src/app/app.module.ts @@ -73,7 +73,7 @@ import { UserInfoComponent } from './components/app-layout/user-info/user-info.c BrowserModule, environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule, ReactiveFormsModule, - RouterModule.forRoot(appRoutes, { useHash: true, relativeLinkResolution: 'legacy' }), + RouterModule.forRoot(appRoutes, { useHash: true }), AuthModule.forRoot({ useHash: true }), FormsModule, HttpClientModule, diff --git a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss b/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss index 1e8697df81..a65c71f1ec 100644 --- a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss +++ b/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss @@ -31,7 +31,7 @@ } .app-form-editor-buttons { - & > .mat-raised-button { + & > .mat-mdc-raised-button { margin-right: 5px; } } diff --git a/demo-shell/src/app/components/cloud/cloud-layout.component.scss b/demo-shell/src/app/components/cloud/cloud-layout.component.scss index 7457ba1a16..79dda9ffb5 100644 --- a/demo-shell/src/app/components/cloud/cloud-layout.component.scss +++ b/demo-shell/src/app/components/cloud/cloud-layout.component.scss @@ -2,6 +2,8 @@ overflow: auto; } +/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */ +/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */ .app-cloud-layout-tab-body .mat-tab-body-wrapper { height: 100%; } diff --git a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html b/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html index 62f74a56fc..bdc8ab70be 100644 --- a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html +++ b/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html @@ -43,11 +43,11 @@