From 880ac8aeb1ee1d91988a044477a6938923d9586e Mon Sep 17 00:00:00 2001
From: eksrha <58111764+eksrha@users.noreply.github.com>
Date: Mon, 30 Jan 2023 15:53:16 +0100
Subject: [PATCH 1/5] feat: add linting + run prettier
---
.eslintrc.json | 55 ++++++++
.github/workflows/build-gh-pages-demo.yaml | 6 +-
.github/workflows/pull-request.yml | 8 +-
.github/workflows/release.yml | 23 ++--
.gitignore | 3 +-
.prettierignore | 44 +++++++
.prettierrc | 12 ++
.vscode/extensions.json | 8 +-
.vscode/settings.json | 32 +++--
README.md | 20 +--
angular.json | 26 +---
package.json | 15 ++-
projects/lib-workspace/karma.conf.js | 13 +-
.../src/app/app-routing.module.ts | 6 +-
.../lib-workspace/src/app/app.component.html | 6 +-
.../lib-workspace/src/app/app.component.scss | 1 -
.../src/app/app.component.spec.ts | 8 +-
.../lib-workspace/src/app/app.component.ts | 10 +-
projects/lib-workspace/src/app/app.module.ts | 17 +--
.../src/app/content/home/home.component.html | 10 +-
.../src/app/content/home/home.component.ts | 9 +-
.../showcase-calendar-panels.component.html | 23 ++--
.../showcase-calendar-panels.component.ts | 5 +-
.../showcase-calendar-table.component.html | 2 +-
.../showcase-nav-frame.component.html | 15 ++-
.../showcase-nav-frame.component.ts | 4 +-
.../src/environments/environment.prod.ts | 2 +-
.../src/environments/environment.ts | 2 +-
projects/lib-workspace/src/index.html | 30 +++--
projects/lib-workspace/src/main.ts | 3 +-
projects/lib-workspace/src/palettes.scss | 118 ++++++++---------
projects/lib-workspace/src/polyfills.ts | 3 +-
projects/lib-workspace/src/styles.scss | 34 +++--
projects/lib-workspace/src/test.ts | 16 ++-
projects/lib-workspace/tsconfig.app.json | 9 +-
projects/lib-workspace/tsconfig.spec.json | 14 +--
projects/ng-mat-components/README.md | 20 +--
projects/ng-mat-components/_index.scss | 6 +-
projects/ng-mat-components/_theme.scss | 12 +-
projects/ng-mat-components/karma.conf.js | 13 +-
projects/ng-mat-components/ng-package.json | 5 +-
.../ng-mat-components/src/assets/menu.svg | 5 +
.../src/fs-calendar/_index.scss | 2 +-
.../src/fs-calendar/_theme.scss | 52 ++++----
.../calendar-panels.component.html | 100 ++++-----------
.../calendar-panels.component.scss | 4 +-
.../calendar-panels.component.spec.ts | 5 +-
.../calendar-panels.component.ts | 60 ++-------
.../fs-calendar-table.component.html | 10 +-
.../fs-calendar-table.component.spec.ts | 5 +-
.../fs-calendar-table.component.ts | 18 +--
.../src/fs-calendar/fs-calendar.module.ts | 12 +-
.../services/fs-calendar.service.ts | 119 ++++--------------
.../src/fs-nav-frame/_index.scss | 2 +-
.../src/fs-nav-frame/_theme.scss | 32 ++---
.../fs-nav-frame-content.directive.ts | 6 +-
.../fs-nav-frame-toolbar-center.directive.ts | 6 +-
.../fs-nav-frame-toolbar-side.directive.ts | 6 +-
.../fs-nav-frame-toolbar-title.directive.ts | 6 +-
.../fs-nav-frame/fs-nav-frame.component.html | 44 +++----
.../fs-nav-frame/fs-nav-frame.component.scss | 5 +-
.../fs-nav-frame/fs-nav-frame.component.ts | 22 +---
.../src/fs-nav-frame/fs-nav-frame.module.ts | 11 +-
.../fs-nav-frame-toolbar.component.html | 18 +--
.../fs-nav-frame-toolbar.component.ts | 12 +-
.../src/fs-nav-frame/nav-frame.modules.ts | 13 +-
.../services/fs-nav-frame.service.ts | 5 +-
projects/ng-mat-components/src/test.ts | 16 ++-
projects/ng-mat-components/test.scss | 30 ++---
projects/ng-mat-components/tsconfig.lib.json | 5 +-
projects/ng-mat-components/tsconfig.spec.json | 13 +-
tailwind.config.js | 6 +-
tsconfig.json | 10 +-
73 files changed, 575 insertions(+), 753 deletions(-)
create mode 100644 .eslintrc.json
create mode 100644 .prettierignore
create mode 100644 .prettierrc
create mode 100644 projects/ng-mat-components/src/assets/menu.svg
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..59f4ec0
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,55 @@
+{
+ "root": true,
+ "ignorePatterns": ["projects/**/*"],
+ "overrides": [
+ {
+ "files": ["*.ts"],
+ "extends": [
+ "eslint:recommended",
+ "plugin:prettier/recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:@angular-eslint/recommended",
+ "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"
+ }
+ ]
+ }
+ },
+ // NOTE: WE ARE NOT APPLYING PRETTIER IN THIS OVERRIDE, ONLY @ANGULAR-ESLINT/TEMPLATE
+ {
+ "files": ["*.html"],
+ "extends": ["plugin:@angular-eslint/template/recommended"],
+ "rules": {}
+ },
+ // NOTE: WE ARE NOT APPLYING @ANGULAR-ESLINT/TEMPLATE IN THIS OVERRIDE, ONLY PRETTIER
+ {
+ "files": ["*.html"],
+ "excludedFiles": ["*inline-template-*.component.html"],
+ "extends": ["plugin:prettier/recommended"],
+ "rules": {
+ // NOTE: WE ARE OVERRIDING THE DEFAULT CONFIG TO ALWAYS SET THE PARSER TO ANGULAR (SEE BELOW)
+ "prettier/prettier": [
+ "error",
+ {
+ "parser": "angular"
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/.github/workflows/build-gh-pages-demo.yaml b/.github/workflows/build-gh-pages-demo.yaml
index 3a32bf9..3970747 100644
--- a/.github/workflows/build-gh-pages-demo.yaml
+++ b/.github/workflows/build-gh-pages-demo.yaml
@@ -3,7 +3,7 @@ name: Build GH Pages Demo
on:
push:
branches:
- - "main"
+ - 'main'
jobs:
build-gh-pages-demo:
@@ -15,7 +15,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
- node-version: "16.x"
+ node-version: '16.x'
- name: install packages
run: yarn
@@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: gh-pages-demo
- path: "gh-pages-demo"
+ path: 'gh-pages-demo'
- name: Clean out old dist and copy new dist
run: |
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index 53c1ddb..e44a9a5 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -15,13 +15,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
-
+
- name: Setup node
uses: actions/setup-node@v3
with:
- node-version: "16.x"
- registry-url: "https://npm.pkg.github.com"
- scope: "@fullstack-devops"
+ node-version: '16.x'
+ registry-url: 'https://npm.pkg.github.com'
+ scope: '@fullstack-devops'
- name: install packages
run: yarn
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3db5e17..adfbce0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -3,12 +3,12 @@ name: Release Package
on:
push:
branches:
- - "main"
+ - 'main'
paths-ignore:
- - "README.md"
- - "docs/**"
- - ".github/ISSUE_TEMPLATE/**"
- - ".github/PULL_REQUEST_TEMPLATE.md"
+ - 'README.md'
+ - 'docs/**'
+ - '.github/ISSUE_TEMPLATE/**'
+ - '.github/PULL_REQUEST_TEMPLATE.md'
jobs:
create_release:
@@ -26,9 +26,9 @@ jobs:
- name: Setup node for GitHub
uses: actions/setup-node@v3
with:
- node-version: "16.x"
- registry-url: "https://npm.pkg.github.com"
- scope: "@fullstack-devops"
+ node-version: '16.x'
+ registry-url: 'https://npm.pkg.github.com'
+ scope: '@fullstack-devops'
- name: install packages
run: yarn
@@ -46,10 +46,9 @@ jobs:
- name: Setup node for npmjs
uses: actions/setup-node@v3
with:
- node-version: "16.x"
- registry-url: "https://registry.npmjs.org"
- scope: "@fullstack-devops"
-
+ node-version: '16.x'
+ registry-url: 'https://registry.npmjs.org'
+ scope: '@fullstack-devops'
- name: npm publish to npmjs
working-directory: dist/ng-mat-components
diff --git a/.gitignore b/.gitignore
index 09d4e4f..6bcf713 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ projects/ng-nav-frame/README.md
npm-debug.log
yarn-error.log
yarn.lock
+package-lock.json
.yarn/
# IDEs and editors
@@ -47,4 +48,4 @@ testem.log
.DS_Store
Thumbs.db
.yarnrc
-package-lock.json
+package-lock.json
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..e1aaa78
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,44 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# Compiled output
+/dist
+/tmp
+/out-tsc
+/bazel-out
+
+# Node
+node_modules
+npm-debug.log
+yarn-error.log
+package-lock.json
+yarn.lock
+
+# IDEs and editors
+.idea/
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# Visual Studio Code
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+.history/*
+
+# Miscellaneous
+/.angular/cache
+.sass-cache/
+/connect.lock
+/coverage
+/libpeerconnection.log
+testem.log
+/typings
+
+# System files
+.DS_Store
+Thumbs.db
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..4ce7a55
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,12 @@
+{
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "semi": true,
+ "bracketSpacing": true,
+ "arrowParens": "avoid",
+ "trailingComma": "es5",
+ "bracketSameLine": true,
+ "printWidth": 160,
+ "htmlWhitespaceSensitivity": "ignore"
+}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 4b9dce2..7ac7adc 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,7 +1,11 @@
{
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": [
"angular.ng-template",
+ "johnpapa.Angular2",
+ "dbaeumer.vscode-eslint",
+ "esbenp.prettier-vscode",
+ "PKief.material-icon-theme",
+ "Mikael.Angular-BeastCode",
"bradlc.vscode-tailwindcss"
]
-}
\ No newline at end of file
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index e466729..1f7f72a 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,11 +1,9 @@
{
+ "editor.formatOnPaste": true,
"editor.formatOnSave": true,
- "editor.renderWhitespace": "all",
- "prettier.arrowParens": "avoid",
- "prettier.printWidth": 130,
- "editor.tabSize": 2,
- "files.trimTrailingWhitespace": true,
- "files.trimFinalNewlines": true,
+ "editor.codeActionsOnSave": {
+ "source.organizeImports": true
+ },
"workbench.iconTheme": "material-icon-theme",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
@@ -20,10 +18,24 @@
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
- "[typescript]": {
- "editor.defaultFormatter": "vscode.typescript-language-features"
- },
"[scss]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
-}
\ No newline at end of file
+ "[html]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": true
+ },
+ "editor.formatOnSave": true
+ },
+ "[typescript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": true
+ },
+ "editor.formatOnSave": true
+ },
+ "[xml]": {
+ "editor.defaultFormatter": "redhat.vscode-xml"
+ }
+}
diff --git a/README.md b/README.md
index c8e5f4b..73baa7c 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,25 @@
# ng-mat-components
-Components for @angular/material
+Components for @angular/material
## Installation
add to your local `.npmrc` the following line to be able to use this package:
+
```javascript
@fullstack-devops:registry=https://npm.pkg.github.com
```
And install it:
- - yarn
- ```javascript
- yarn add @fullstack-devops/ng-mat-components
- ```
- - npm
- ```javascript
- npm install @fullstack-devops/ng-mat-components
- ```
+
+- yarn
+ ```javascript
+ yarn add @fullstack-devops/ng-mat-components
+ ```
+- npm
+ ```javascript
+ npm install @fullstack-devops/ng-mat-components
+ ```
## Documentation
diff --git a/angular.json b/angular.json
index 4f8c26c..83095fe 100644
--- a/angular.json
+++ b/angular.json
@@ -58,17 +58,9 @@
"polyfills": "projects/lib-workspace/src/polyfills.ts",
"tsConfig": "projects/lib-workspace/tsconfig.app.json",
"inlineStyleLanguage": "scss",
- "allowedCommonJsDependencies": [
- "moment"
- ],
- "assets": [
- "projects/lib-workspace/src/favicon.ico",
- "projects/lib-workspace/src/assets"
- ],
- "styles": [
- "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
- "projects/lib-workspace/src/styles.scss"
- ],
+ "allowedCommonJsDependencies": ["moment"],
+ "assets": ["projects/lib-workspace/src/favicon.ico", "projects/lib-workspace/src/assets"],
+ "styles": ["./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "projects/lib-workspace/src/styles.scss"],
"scripts": []
},
"configurations": {
@@ -130,18 +122,12 @@
"tsConfig": "projects/lib-workspace/tsconfig.spec.json",
"karmaConfig": "projects/lib-workspace/karma.conf.js",
"inlineStyleLanguage": "scss",
- "assets": [
- "projects/lib-workspace/src/favicon.ico",
- "projects/lib-workspace/src/assets"
- ],
- "styles": [
- "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
- "projects/lib-workspace/src/styles.scss"
- ],
+ "assets": ["projects/lib-workspace/src/favicon.ico", "projects/lib-workspace/src/assets"],
+ "styles": ["./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "projects/lib-workspace/src/styles.scss"],
"scripts": []
}
}
}
}
}
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index 97e969b..badc73b 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,8 @@
"build:sass": "sass projects/ng-mat-components/_index.scss:dist/css/css",
"build:workspace": "ng build --project lib-workspace",
"watch": "ng build --watch --configuration development",
- "test": "ng test"
+ "test": "ng test",
+ "lint": "ng lint"
},
"private": true,
"dependencies": {
@@ -29,7 +30,6 @@
"@angular/platform-browser": "~13.3.11",
"@angular/platform-browser-dynamic": "~13.3.11",
"@angular/router": "~13.3.11",
- "autoprefixer": "^10.4.13",
"date-fns": "^2.29.3",
"postcss": "^8.4.20",
"rxjs": "~7.5.6",
@@ -39,10 +39,19 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.9",
+ "@angular-eslint/builder": "13.5.0",
+ "@angular-eslint/eslint-plugin": "13.5.0",
+ "@angular-eslint/eslint-plugin-template": "13.5.0",
+ "@angular-eslint/schematics": "13.5.0",
+ "@angular-eslint/template-parser": "13.5.0",
"@angular/cli": "~13.3.9",
"@angular/compiler-cli": "~13.3.11",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
+ "@typescript-eslint/eslint-plugin": "5.27.1",
+ "@typescript-eslint/parser": "5.27.1",
+ "autoprefixer": "^10.4.13",
+ "eslint": "^8.17.0",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
@@ -50,6 +59,8 @@
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"ng-packagr": "^13.0.0",
+ "prettier": "^2.8.3",
+ "prettier-eslint": "^15.0.1",
"sass": "^1.57.1",
"typescript": "~4.5.2"
}
diff --git a/projects/lib-workspace/karma.conf.js b/projects/lib-workspace/karma.conf.js
index de74d0c..0f97f95 100644
--- a/projects/lib-workspace/karma.conf.js
+++ b/projects/lib-workspace/karma.conf.js
@@ -10,7 +10,7 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
- require('@angular-devkit/build-angular/plugins/karma')
+ require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
jasmine: {
@@ -19,18 +19,15 @@ module.exports = function (config) {
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
- clearContext: false // leave Jasmine Spec Runner output visible in browser
+ clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
- suppressAll: true // removes the duplicated traces
+ suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/lib-workspace'),
subdir: '.',
- reporters: [
- { type: 'html' },
- { type: 'text-summary' }
- ]
+ reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
@@ -39,6 +36,6 @@ module.exports = function (config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
- restartOnFileChange: true
+ restartOnFileChange: true,
});
};
diff --git a/projects/lib-workspace/src/app/app-routing.module.ts b/projects/lib-workspace/src/app/app-routing.module.ts
index 788e956..2bd0ee4 100644
--- a/projects/lib-workspace/src/app/app-routing.module.ts
+++ b/projects/lib-workspace/src/app/app-routing.module.ts
@@ -51,9 +51,7 @@ export const routes: FrameRoutes = [
];
@NgModule({
- imports: [
- RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }),
- ],
+ imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })],
exports: [RouterModule],
})
-export class AppRoutingModule { }
+export class AppRoutingModule {}
diff --git a/projects/lib-workspace/src/app/app.component.html b/projects/lib-workspace/src/app/app.component.html
index 0dc9bec..043569a 100644
--- a/projects/lib-workspace/src/app/app.component.html
+++ b/projects/lib-workspace/src/app/app.component.html
@@ -20,9 +20,11 @@
-->
-
+ placeholder="Dummy Search" />
diff --git a/projects/lib-workspace/src/app/app.component.scss b/projects/lib-workspace/src/app/app.component.scss
index 8b13789..e69de29 100644
--- a/projects/lib-workspace/src/app/app.component.scss
+++ b/projects/lib-workspace/src/app/app.component.scss
@@ -1 +0,0 @@
-
diff --git a/projects/lib-workspace/src/app/app.component.spec.ts b/projects/lib-workspace/src/app/app.component.spec.ts
index 2217842..913c540 100644
--- a/projects/lib-workspace/src/app/app.component.spec.ts
+++ b/projects/lib-workspace/src/app/app.component.spec.ts
@@ -5,12 +5,8 @@ import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- imports: [
- RouterTestingModule
- ],
- declarations: [
- AppComponent
- ],
+ imports: [RouterTestingModule],
+ declarations: [AppComponent],
}).compileComponents();
});
diff --git a/projects/lib-workspace/src/app/app.component.ts b/projects/lib-workspace/src/app/app.component.ts
index 39684ee..9949861 100644
--- a/projects/lib-workspace/src/app/app.component.ts
+++ b/projects/lib-workspace/src/app/app.component.ts
@@ -2,12 +2,7 @@ import { registerLocaleData } from '@angular/common';
import localeDe from '@angular/common/locales/de';
import localeDeExtra from '@angular/common/locales/extra/de';
import { Component, OnInit } from '@angular/core';
-import {
- FrameConfig,
- FrameEvent,
- FrameEvents,
- NavUser,
-} from 'projects/ng-mat-components/src/public-api';
+import { FrameConfig, FrameEvent, FrameEvents, NavUser } from 'projects/ng-mat-components/src/public-api';
import { routes } from './app-routing.module';
@Component({
@@ -25,8 +20,7 @@ export class AppComponent implements OnInit {
logo: 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Angular_full_color_logo.svg/1024px-Angular_full_color_logo.svg.png',
};
navUser: NavUser = {
- profilePicture:
- 'https://material.angular.io/assets/img/examples/shiba1.jpg',
+ profilePicture: 'https://material.angular.io/assets/img/examples/shiba1.jpg',
name: 'Some User',
role: 'Engineer',
};
diff --git a/projects/lib-workspace/src/app/app.module.ts b/projects/lib-workspace/src/app/app.module.ts
index 00d96a9..8cb9da5 100644
--- a/projects/lib-workspace/src/app/app.module.ts
+++ b/projects/lib-workspace/src/app/app.module.ts
@@ -9,25 +9,14 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MAT_DATE_LOCALE } from '@angular/material/core';
-import {
- FsCalendarModule,
- FsCalendarService,
- FsMaterialFullModule,
- FsNavFrameModule,
-} from 'projects/ng-mat-components/src/public-api';
+import { FsCalendarModule, FsCalendarService, FsMaterialFullModule, FsNavFrameModule } from 'projects/ng-mat-components/src/public-api';
import { HomeComponent } from './content/home/home.component';
import { ShowcaseCalendarPanelsComponent } from './content/showcase-calendar-panels/showcase-calendar-panels.component';
import { ShowcaseCalendarTableComponent } from './content/showcase-calendar-table/showcase-calendar-table.component';
import { ShowcaseNavFrameComponent } from './content/showcase-nav-frame/showcase-nav-frame.component';
@NgModule({
- declarations: [
- AppComponent,
- HomeComponent,
- ShowcaseCalendarPanelsComponent,
- ShowcaseCalendarTableComponent,
- ShowcaseNavFrameComponent,
- ],
+ declarations: [AppComponent, HomeComponent, ShowcaseCalendarPanelsComponent, ShowcaseCalendarTableComponent, ShowcaseNavFrameComponent],
imports: [
FormsModule,
BrowserModule,
@@ -54,4 +43,4 @@ import { ShowcaseNavFrameComponent } from './content/showcase-nav-frame/showcase
],
bootstrap: [AppComponent],
})
-export class AppModule { }
+export class AppModule {}
diff --git a/projects/lib-workspace/src/app/content/home/home.component.html b/projects/lib-workspace/src/app/content/home/home.component.html
index 9b92680..5580b71 100644
--- a/projects/lib-workspace/src/app/content/home/home.component.html
+++ b/projects/lib-workspace/src/app/content/home/home.component.html
@@ -3,10 +3,7 @@
Nav Frame
-
- Bootstrap your Nav with this nice template and start right away with
- valuable content.
-
+ Bootstrap your Nav with this nice template and start right away with valuable content.
@@ -22,10 +19,7 @@
Calendar Table
-
- The perfect complement to the calendar panels when it comes to several
- independent entries.
-
+ The perfect complement to the calendar panels when it comes to several independent entries.
diff --git a/projects/lib-workspace/src/app/content/home/home.component.ts b/projects/lib-workspace/src/app/content/home/home.component.ts
index 33cc034..5f47fe4 100644
--- a/projects/lib-workspace/src/app/content/home/home.component.ts
+++ b/projects/lib-workspace/src/app/content/home/home.component.ts
@@ -3,13 +3,10 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'lib-home',
templateUrl: './home.component.html',
- styleUrls: ['./home.component.css']
+ styleUrls: ['./home.component.css'],
})
export class HomeComponent implements OnInit {
+ constructor() {}
- constructor() { }
-
- ngOnInit() {
- }
-
+ ngOnInit() {}
}
diff --git a/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.html b/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.html
index b0e1cb6..d54c106 100644
--- a/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.html
+++ b/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.html
@@ -1,24 +1,18 @@
-
- Days placeholder
-
+ Days placeholder
Months before
- {{
- num
- }}
+ {{ num }}
Months after
- {{
- num
- }}
+ {{ num }}
@@ -27,7 +21,12 @@
-
-
+
diff --git a/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.ts b/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.ts
index 3082b7e..b165199 100644
--- a/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.ts
+++ b/projects/lib-workspace/src/app/content/showcase-calendar-panels/showcase-calendar-panels.component.ts
@@ -1,8 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import {
- CalendarEvent,
- CalendarPanels,
-} from 'projects/ng-mat-components/src/public-api';
+import { CalendarEvent, CalendarPanels } from 'projects/ng-mat-components/src/public-api';
@Component({
selector: 'app-showcase-calendar-panels',
diff --git a/projects/lib-workspace/src/app/content/showcase-calendar-table/showcase-calendar-table.component.html b/projects/lib-workspace/src/app/content/showcase-calendar-table/showcase-calendar-table.component.html
index 5392b65..0e1fa4b 100644
--- a/projects/lib-workspace/src/app/content/showcase-calendar-table/showcase-calendar-table.component.html
+++ b/projects/lib-workspace/src/app/content/showcase-calendar-table/showcase-calendar-table.component.html
@@ -1,3 +1,3 @@
- Persons
+ Persons
diff --git a/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.html b/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.html
index 71331c2..25c678a 100644
--- a/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.html
+++ b/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.html
@@ -1,17 +1,16 @@
- ↑ Title can be changed vis contend projection
- Note: The toolbar is optional, but then you have to implement your own
- solution!
- This one is also slightly thinner than the original material bar in
- height.
+ ↑ Title can be changed vis contend projection
+
+
+ Note: The toolbar is optional, but then you have to implement your own solution!
+
+ This one is also slightly thinner than the original material bar in height.
↑ use perdifined content or your own
↑ like this search
-
- ← In the sidenav you can set preregisterd entrys
-
+
← In the sidenav you can set preregisterd entrys
diff --git a/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.ts b/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.ts
index 1b7c2c8..244be4a 100644
--- a/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.ts
+++ b/projects/lib-workspace/src/app/content/showcase-nav-frame/showcase-nav-frame.component.ts
@@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./showcase-nav-frame.component.css'],
})
export class ShowcaseNavFrameComponent implements OnInit {
- constructor() { }
+ constructor() {}
- ngOnInit() { }
+ ngOnInit() {}
}
diff --git a/projects/lib-workspace/src/environments/environment.prod.ts b/projects/lib-workspace/src/environments/environment.prod.ts
index 3612073..c966979 100644
--- a/projects/lib-workspace/src/environments/environment.prod.ts
+++ b/projects/lib-workspace/src/environments/environment.prod.ts
@@ -1,3 +1,3 @@
export const environment = {
- production: true
+ production: true,
};
diff --git a/projects/lib-workspace/src/environments/environment.ts b/projects/lib-workspace/src/environments/environment.ts
index f56ff47..66998ae 100644
--- a/projects/lib-workspace/src/environments/environment.ts
+++ b/projects/lib-workspace/src/environments/environment.ts
@@ -3,7 +3,7 @@
// The list of file replacements can be found in `angular.json`.
export const environment = {
- production: false
+ production: false,
};
/*
diff --git a/projects/lib-workspace/src/index.html b/projects/lib-workspace/src/index.html
index be1e016..1844993 100644
--- a/projects/lib-workspace/src/index.html
+++ b/projects/lib-workspace/src/index.html
@@ -1,19 +1,17 @@
-
+
+
+
+
LibWorkspace
+
+
+
+
+
+
+
-
-
-
LibWorkspace
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/projects/lib-workspace/src/main.ts b/projects/lib-workspace/src/main.ts
index c7b673c..fa4e0ae 100644
--- a/projects/lib-workspace/src/main.ts
+++ b/projects/lib-workspace/src/main.ts
@@ -8,5 +8,6 @@ if (environment.production) {
enableProdMode();
}
-platformBrowserDynamic().bootstrapModule(AppModule)
+platformBrowserDynamic()
+ .bootstrapModule(AppModule)
.catch(err => console.error(err));
diff --git a/projects/lib-workspace/src/palettes.scss b/projects/lib-workspace/src/palettes.scss
index 332574d..00b1a7c 100644
--- a/projects/lib-workspace/src/palettes.scss
+++ b/projects/lib-workspace/src/palettes.scss
@@ -2,65 +2,67 @@
/* For use in src/lib/core/theming/_palette.scss */
$md-primary: (
- 50 : #eaefe8,
- 100 : #c9d8c5,
- 200 : #a6be9e,
- 300 : #82a377,
- 400 : #679059,
- 500 : #4c7c3c,
- 600 : #457436,
- 700 : #3c692e,
- 800 : #335f27,
- 900 : #244c1a,
- A100 : #9fff8b,
- A200 : #75ff58,
- A400 : #4bff25,
- A700 : #36ff0c,
- contrast: (50 : #000000,
- 100 : #000000,
- 200 : #000000,
- 300 : #000000,
- 400 : #ffffff,
- 500 : #ffffff,
- 600 : #ffffff,
- 700 : #ffffff,
- 800 : #ffffff,
- 900 : #ffffff,
- A100 : #000000,
- A200 : #000000,
- A400 : #000000,
- A700 : #000000,
- )
+ 50: #eaefe8,
+ 100: #c9d8c5,
+ 200: #a6be9e,
+ 300: #82a377,
+ 400: #679059,
+ 500: #4c7c3c,
+ 600: #457436,
+ 700: #3c692e,
+ 800: #335f27,
+ 900: #244c1a,
+ A100: #9fff8b,
+ A200: #75ff58,
+ A400: #4bff25,
+ A700: #36ff0c,
+ contrast: (
+ 50: #000000,
+ 100: #000000,
+ 200: #000000,
+ 300: #000000,
+ 400: #ffffff,
+ 500: #ffffff,
+ 600: #ffffff,
+ 700: #ffffff,
+ 800: #ffffff,
+ 900: #ffffff,
+ A100: #000000,
+ A200: #000000,
+ A400: #000000,
+ A700: #000000,
+ ),
);
$md-accent: (
- 50 : #edf3f3,
- 100 : #d3e0e1,
- 200 : #b5cccd,
- 300 : #97b8b9,
- 400 : #81a8aa,
- 500 : #6b999b,
- 600 : #639193,
- 700 : #588689,
- 800 : #4e7c7f,
- 900 : #3c6b6d,
- A100 : #c2fbff,
- A200 : #8ff8ff,
- A400 : #5cf5ff,
- A700 : #42f4ff,
- contrast: (50 : #000000,
- 100 : #000000,
- 200 : #000000,
- 300 : #000000,
- 400 : #000000,
- 500 : #000000,
- 600 : #000000,
- 700 : #ffffff,
- 800 : #ffffff,
- 900 : #ffffff,
- A100 : #000000,
- A200 : #000000,
- A400 : #000000,
- A700 : #000000,
- )
+ 50: #edf3f3,
+ 100: #d3e0e1,
+ 200: #b5cccd,
+ 300: #97b8b9,
+ 400: #81a8aa,
+ 500: #6b999b,
+ 600: #639193,
+ 700: #588689,
+ 800: #4e7c7f,
+ 900: #3c6b6d,
+ A100: #c2fbff,
+ A200: #8ff8ff,
+ A400: #5cf5ff,
+ A700: #42f4ff,
+ contrast: (
+ 50: #000000,
+ 100: #000000,
+ 200: #000000,
+ 300: #000000,
+ 400: #000000,
+ 500: #000000,
+ 600: #000000,
+ 700: #ffffff,
+ 800: #ffffff,
+ 900: #ffffff,
+ A100: #000000,
+ A200: #000000,
+ A400: #000000,
+ A700: #000000,
+ ),
);
diff --git a/projects/lib-workspace/src/polyfills.ts b/projects/lib-workspace/src/polyfills.ts
index 429bb9e..e4555ed 100644
--- a/projects/lib-workspace/src/polyfills.ts
+++ b/projects/lib-workspace/src/polyfills.ts
@@ -45,8 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
-import 'zone.js'; // Included with Angular CLI.
-
+import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
diff --git a/projects/lib-workspace/src/styles.scss b/projects/lib-workspace/src/styles.scss
index cf9ca09..b748885 100644
--- a/projects/lib-workspace/src/styles.scss
+++ b/projects/lib-workspace/src/styles.scss
@@ -1,23 +1,31 @@
@use '@angular/material' as mat;
-@use "../../ng-mat-components" as fsc;
-@use "./palettes";
+@use '../../ng-mat-components' as fsc;
+@use './palettes';
@include mat.core();
// Define a dark theme
-$dark-theme: mat.define-dark-theme((color: (primary: mat.define-palette(palettes.$md-primary),
- accent: mat.define-palette(palettes.$md-accent),
- ),
- // Only include `typography` and `density` in the default dark theme.
- typography: mat.define-typography-config(),
- density: 0,
- ));
+$dark-theme: mat.define-dark-theme(
+ (
+ color: (
+ primary: mat.define-palette(palettes.$md-primary),
+ accent: mat.define-palette(palettes.$md-accent),
+ ),
+ // Only include `typography` and `density` in the default dark theme.
+ typography: mat.define-typography-config(),
+ density: 0,
+ )
+);
// Define a light theme
-$light-theme: mat.define-light-theme((color: (primary: mat.define-palette(palettes.$md-primary),
- accent: mat.define-palette(palettes.$md-accent),
- ),
- ));
+$light-theme: mat.define-light-theme(
+ (
+ color: (
+ primary: mat.define-palette(palettes.$md-primary),
+ accent: mat.define-palette(palettes.$md-accent),
+ ),
+ )
+);
// Apply the dark theme by default
@include mat.all-component-themes($dark-theme);
diff --git a/projects/lib-workspace/src/test.ts b/projects/lib-workspace/src/test.ts
index 00025da..437ca40 100644
--- a/projects/lib-workspace/src/test.ts
+++ b/projects/lib-workspace/src/test.ts
@@ -2,23 +2,21 @@
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
-import {
- BrowserDynamicTestingModule,
- platformBrowserDynamicTesting
-} from '@angular/platform-browser-dynamic/testing';
+import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
- context(path: string, deep?: boolean, filter?: RegExp): {
+ context(
+ path: string,
+ deep?: boolean,
+ filter?: RegExp
+ ): {
(id: string): T;
keys(): string[];
};
};
// First, initialize the Angular testing environment.
-getTestBed().initTestEnvironment(
- BrowserDynamicTestingModule,
- platformBrowserDynamicTesting(),
-);
+getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
diff --git a/projects/lib-workspace/tsconfig.app.json b/projects/lib-workspace/tsconfig.app.json
index fd37f74..c3c4837 100644
--- a/projects/lib-workspace/tsconfig.app.json
+++ b/projects/lib-workspace/tsconfig.app.json
@@ -5,11 +5,6 @@
"outDir": "../../out-tsc/app",
"types": []
},
- "files": [
- "src/main.ts",
- "src/polyfills.ts"
- ],
- "include": [
- "src/**/*.d.ts"
- ]
+ "files": ["src/main.ts", "src/polyfills.ts"],
+ "include": ["src/**/*.d.ts"]
}
diff --git a/projects/lib-workspace/tsconfig.spec.json b/projects/lib-workspace/tsconfig.spec.json
index b66a2f0..558b74c 100644
--- a/projects/lib-workspace/tsconfig.spec.json
+++ b/projects/lib-workspace/tsconfig.spec.json
@@ -3,16 +3,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
- "types": [
- "jasmine"
- ]
+ "types": ["jasmine"]
},
- "files": [
- "src/test.ts",
- "src/polyfills.ts"
- ],
- "include": [
- "src/**/*.spec.ts",
- "src/**/*.d.ts"
- ]
+ "files": ["src/test.ts", "src/polyfills.ts"],
+ "include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}
diff --git a/projects/ng-mat-components/README.md b/projects/ng-mat-components/README.md
index c8e5f4b..73baa7c 100644
--- a/projects/ng-mat-components/README.md
+++ b/projects/ng-mat-components/README.md
@@ -1,23 +1,25 @@
# ng-mat-components
-Components for @angular/material
+Components for @angular/material
## Installation
add to your local `.npmrc` the following line to be able to use this package:
+
```javascript
@fullstack-devops:registry=https://npm.pkg.github.com
```
And install it:
- - yarn
- ```javascript
- yarn add @fullstack-devops/ng-mat-components
- ```
- - npm
- ```javascript
- npm install @fullstack-devops/ng-mat-components
- ```
+
+- yarn
+ ```javascript
+ yarn add @fullstack-devops/ng-mat-components
+ ```
+- npm
+ ```javascript
+ npm install @fullstack-devops/ng-mat-components
+ ```
## Documentation
diff --git a/projects/ng-mat-components/_index.scss b/projects/ng-mat-components/_index.scss
index 7f28997..9acaecc 100644
--- a/projects/ng-mat-components/_index.scss
+++ b/projects/ng-mat-components/_index.scss
@@ -1,4 +1,4 @@
-@use "sass:color";
-@use "sass:map";
+@use 'sass:color';
+@use 'sass:map';
-@forward "theme" show all-component-themes;
+@forward 'theme' show all-component-themes;
diff --git a/projects/ng-mat-components/_theme.scss b/projects/ng-mat-components/_theme.scss
index 747b9a2..3f9b4fb 100644
--- a/projects/ng-mat-components/_theme.scss
+++ b/projects/ng-mat-components/_theme.scss
@@ -1,22 +1,21 @@
-@use "src/fs-calendar";
-@use "src/fs-nav-frame";
+@use 'src/fs-calendar';
+@use 'src/fs-nav-frame';
@mixin all-component-themes($theme) {
// Extract whichever individual palettes you need from the theme.
$primary: map-get($theme, primary);
$accent: map-get($theme, accent);
// Gets the standard material maps of fore/background
- $background: map-get($theme, "background");
- $foreground: map-get($theme, "foreground");
+ $background: map-get($theme, 'background');
+ $foreground: map-get($theme, 'foreground');
@include fs-calendar.fs-calendar-theme($theme);
@include fs-nav-frame.fs-nav-frame-theme($theme);
.svg-icon svg {
- fill: map-get($foreground, "text");
+ fill: map-get($foreground, 'text');
}
-
/* Tooltip container */
.tooltip {
position: relative;
@@ -57,5 +56,4 @@
visibility: visible;
opacity: 1;
}
-
}
diff --git a/projects/ng-mat-components/karma.conf.js b/projects/ng-mat-components/karma.conf.js
index 1c2dd1a..134bf28 100644
--- a/projects/ng-mat-components/karma.conf.js
+++ b/projects/ng-mat-components/karma.conf.js
@@ -10,7 +10,7 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
- require('@angular-devkit/build-angular/plugins/karma')
+ require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
jasmine: {
@@ -19,18 +19,15 @@ module.exports = function (config) {
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
- clearContext: false // leave Jasmine Spec Runner output visible in browser
+ clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
- suppressAll: true // removes the duplicated traces
+ suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/ng-mat-components'),
subdir: '.',
- reporters: [
- { type: 'html' },
- { type: 'text-summary' }
- ]
+ reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
@@ -39,6 +36,6 @@ module.exports = function (config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
- restartOnFileChange: true
+ restartOnFileChange: true,
});
};
diff --git a/projects/ng-mat-components/ng-package.json b/projects/ng-mat-components/ng-package.json
index 70b716d..28fa507 100644
--- a/projects/ng-mat-components/ng-package.json
+++ b/projects/ng-mat-components/ng-package.json
@@ -4,8 +4,5 @@
"lib": {
"entryFile": "src/public-api.ts"
},
- "assets": [
- "./_index.scss",
- "./_theming.scss"
- ]
+ "assets": ["./_index.scss", "./_theming.scss"]
}
diff --git a/projects/ng-mat-components/src/assets/menu.svg b/projects/ng-mat-components/src/assets/menu.svg
new file mode 100644
index 0000000..809729b
--- /dev/null
+++ b/projects/ng-mat-components/src/assets/menu.svg
@@ -0,0 +1,5 @@
+
+
+
+
\ No newline at end of file
diff --git a/projects/ng-mat-components/src/fs-calendar/_index.scss b/projects/ng-mat-components/src/fs-calendar/_index.scss
index befc25f..9f79221 100644
--- a/projects/ng-mat-components/src/fs-calendar/_index.scss
+++ b/projects/ng-mat-components/src/fs-calendar/_index.scss
@@ -1 +1 @@
-@forward "theme" show fs-calendar-theme;
+@forward 'theme' show fs-calendar-theme;
diff --git a/projects/ng-mat-components/src/fs-calendar/_theme.scss b/projects/ng-mat-components/src/fs-calendar/_theme.scss
index eddc0be..7b650bd 100644
--- a/projects/ng-mat-components/src/fs-calendar/_theme.scss
+++ b/projects/ng-mat-components/src/fs-calendar/_theme.scss
@@ -3,59 +3,59 @@
$primary: map-get($theme, primary);
$accent: map-get($theme, accent);
// Gets the standard material maps of fore/background
- $background: map-get($theme, "background");
- $foreground: map-get($theme, "foreground");
+ $background: map-get($theme, 'background');
+ $foreground: map-get($theme, 'foreground');
.fs-calendar-body-today {
- border: 1px solid map-get($foreground, "secondary-text");
+ border: 1px solid map-get($foreground, 'secondary-text');
}
.fs-calendar-switches svg {
- fill: map-get($foreground, "base");
+ fill: map-get($foreground, 'base');
}
.placeholderDay {
- color: map-get($foreground, "hint-text");
+ color: map-get($foreground, 'hint-text');
}
.fs-calendar-table-header tr:first-child {
- border-bottom: solid 1px map-get($foreground, "divider");
- color: map-get($foreground, "secondary-text");
+ border-bottom: solid 1px map-get($foreground, 'divider');
+ color: map-get($foreground, 'secondary-text');
}
.kw {
- border-right: solid 1px map-get($foreground, "divider");
- color: map-get($foreground, "secondary-text");
+ border-right: solid 1px map-get($foreground, 'divider');
+ color: map-get($foreground, 'secondary-text');
}
.clickable:hover {
- background-color: map-get($primary, "lighter");
+ background-color: map-get($primary, 'lighter');
}
.weekend {
- background-color: map-get($foreground, "divider");
+ background-color: map-get($foreground, 'divider');
}
.date-between::after,
.selected-start::after,
.selected-end::after {
- border-top: dashed 1px map-get($foreground, "secondary-text");
- border-bottom: dashed 1px map-get($foreground, "secondary-text");
+ border-top: dashed 1px map-get($foreground, 'secondary-text');
+ border-bottom: dashed 1px map-get($foreground, 'secondary-text');
}
.selected-set.date-between {
- color: map-get($primary, "lighter-contrast");
+ color: map-get($primary, 'lighter-contrast');
}
.selected-set.date-between::after,
.selected-set.selected-start::after,
.selected-set.selected-end::after {
- background-color: map-get($primary, "lighter");
+ background-color: map-get($primary, 'lighter');
}
.selected-set.selected-start,
.selected-set.selected-end {
- color: map-get($primary, "secondary-text");
+ color: map-get($primary, 'secondary-text');
}
.selected-start::before,
@@ -64,25 +64,27 @@
}
.blured-days::after {
- content: "";
- background: radial-gradient(circle at center,
- map-get($background, "background") 0,
- map-get($background, "background") 12px,
- transparent 14px,
- transparent 100%);
+ content: '';
+ background: radial-gradient(
+ circle at center,
+ map-get($background, 'background') 0,
+ map-get($background, 'background') 12px,
+ transparent 14px,
+ transparent 100%
+ );
}
.fs-calendar-table table thead tr th {
- border-bottom: solid 1px map-get($foreground, "divider");
+ border-bottom: solid 1px map-get($foreground, 'divider');
}
.fs-calendar-table-helper,
.fs-calendar-month {
- background-color: map-get($background, "card");
+ background-color: map-get($background, 'card');
}
.fs-calendar-table .box-base {
- background-color: map-get($foreground, "divider");
+ background-color: map-get($foreground, 'divider');
}
.fs-calendar-table .date-today {
diff --git a/projects/ng-mat-components/src/fs-calendar/calendar-panels/calendar-panels.component.html b/projects/ng-mat-components/src/fs-calendar/calendar-panels/calendar-panels.component.html
index 0810233..973cf2d 100644
--- a/projects/ng-mat-components/src/fs-calendar/calendar-panels/calendar-panels.component.html
+++ b/projects/ng-mat-components/src/fs-calendar/calendar-panels/calendar-panels.component.html
@@ -1,30 +1,15 @@
-
+
-
+
@@ -90,13 +57,8 @@
*ngIf="day._meta?.type == 'day'"
[ngClass]="dataSource.config.calendarWeek ? 'eight' : 'seven'"
(click)="onClick(day, 'date')"
- (mouseenter)="onMouseOver(day.date)"
- >
-
+ (mouseenter)="onMouseOver(day.date)">
+
+ [class.date-between]="getAmIBetween(day.date)">
{{ day._meta?.dayNumber }}
+ [class.weekend]="day._meta?.isWeekendDay && day.colors?.backgroundColor != '' && markWeekend"
+ [class.blured-days]="bluredDays && day.colors?.backgroundColor"
+ [ngStyle]="{ background: day.colors?.backgroundColor }">
- {{frameConfig.appNameShort}}
+ {{ frameConfig.appNameShort }}
-
+
+
- {{item.data?.sidenavIcon}}
+ {{ item.data?.sidenavIcon }}
- {{item.data?.sidenavText}}
+ {{ item.data?.sidenavText }}
@@ -43,34 +37,24 @@
-
- {{navUser.name}}
- {{navUser.role}}
+ {{ navUser.name }}
+ {{ navUser.role }}
-
- manage_accounts
-
+ manage_accounts
-
- logout
-
+ logout
-
diff --git a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.scss b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.scss
index 7261ae8..f536368 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.scss
+++ b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.scss
@@ -156,7 +156,7 @@ $toolbar-width-opened: 264px;
}
.sidebar .profile .user-infos .role {
- font-size: .8rem;
+ font-size: 0.8rem;
}
.nav-links li {
@@ -194,6 +194,5 @@ $toolbar-width-opened: 264px;
padding: 16px;
transition: all 0.3s ease-in-out;
overflow: auto;
- box-shadow: inset 5px 2px 4px -1px rgba(0, 0, 0, 0.2),
- 4px 4px 5px 0px rgba(0, 0, 0, 0.14);
+ box-shadow: inset 5px 2px 4px -1px rgba(0, 0, 0, 0.2), 4px 4px 5px 0px rgba(0, 0, 0, 0.14);
}
diff --git a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.ts b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.ts
index e90bbdf..828adaf 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.ts
+++ b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.ts
@@ -2,13 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { filter, map } from 'rxjs';
import { FsNavFrameService } from './services/fs-nav-frame.service';
-import {
- FrameConfig,
- FrameEvent,
- FrameEvents,
- FrameRoutes,
- NavUser,
-} from './nav-frame.modules';
+import { FrameConfig, FrameEvent, FrameEvents, FrameRoutes, NavUser } from './nav-frame.modules';
@Component({
selector: 'fs-nav-frame',
@@ -33,26 +27,22 @@ export class FsNavFrameComponent implements OnInit {
isActivePath: string = '';
navList: FrameRoutes = [];
- constructor(
- private frameService: FsNavFrameService,
- private router: Router,
- private activatedRoute: ActivatedRoute
- ) { }
+ constructor(private frameService: FsNavFrameService, private router: Router, private activatedRoute: ActivatedRoute) {}
ngOnInit(): void {
- this.navList = this.appRoutes.filter((elm) => {
+ this.navList = this.appRoutes.filter(elm => {
return elm.data?.displaySidemenu === true;
});
this.router.events
.pipe(
- filter((event) => event instanceof NavigationEnd),
+ filter(event => event instanceof NavigationEnd),
map(() => {
const child = this.activatedRoute.firstChild;
return child;
})
)
.subscribe((ttl: ActivatedRoute | null) => {
- ttl?.url.subscribe((obj) => {
+ ttl?.url.subscribe(obj => {
this.isActivePath = obj[0].path;
});
});
@@ -65,7 +55,7 @@ export class FsNavFrameComponent implements OnInit {
closeSidebar() {
if (!this.isClosed) {
- this.toggleSidemenu()
+ this.toggleSidemenu();
}
}
diff --git a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.module.ts b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.module.ts
index 646eb28..a04d9d3 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.module.ts
+++ b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.module.ts
@@ -15,14 +15,7 @@ import { FsNavFrameComponent } from './fs-nav-frame.component';
import { FsNavFrameToolbarComponent } from './nav-frame-toolbar/fs-nav-frame-toolbar.component';
@NgModule({
- imports: [
- CommonModule,
- BrowserModule,
- BrowserAnimationsModule,
- RouterModule,
- MatIconModule,
- MatButtonModule,
- ],
+ imports: [CommonModule, BrowserModule, BrowserAnimationsModule, RouterModule, MatIconModule, MatButtonModule],
exports: [
FsNavFrameComponent,
FsNavFrameToolbarComponent,
@@ -40,4 +33,4 @@ import { FsNavFrameToolbarComponent } from './nav-frame-toolbar/fs-nav-frame-too
FsNavFrameContentDirective,
],
})
-export class FsNavFrameModule { }
+export class FsNavFrameModule {}
diff --git a/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.html b/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.html
index 3f58639..dda77cf 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.html
+++ b/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.html
@@ -1,11 +1,11 @@
diff --git a/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.ts b/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.ts
index eb4bb32..8740215 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.ts
+++ b/projects/ng-mat-components/src/fs-nav-frame/nav-frame-toolbar/fs-nav-frame-toolbar.component.ts
@@ -1,12 +1,4 @@
-import {
- ChangeDetectionStrategy,
- Component,
- HostBinding,
- Input,
- OnDestroy,
- OnInit,
- ViewEncapsulation,
-} from '@angular/core';
+import { ChangeDetectionStrategy, Component, HostBinding, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FsNavFrameService } from '../services/fs-nav-frame.service';
@Component({
@@ -34,7 +26,7 @@ export class FsNavFrameToolbarComponent implements OnInit, OnDestroy {
});
}
- ngOnInit() { }
+ ngOnInit() {}
ngOnDestroy() {
this.frameService.isMenuClosed.unsubscribe();
diff --git a/projects/ng-mat-components/src/fs-nav-frame/nav-frame.modules.ts b/projects/ng-mat-components/src/fs-nav-frame/nav-frame.modules.ts
index af01efa..8b7d03b 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/nav-frame.modules.ts
+++ b/projects/ng-mat-components/src/fs-nav-frame/nav-frame.modules.ts
@@ -75,18 +75,11 @@ type StringOfLength = string & {
// This is a type guard function which can be used to assert that a string
// is of type StringOfLength
-const isStringOfLength = (
- str: string,
- min: Min,
- max: Max
-): str is StringOfLength => str.length >= min && str.length <= max;
+const isStringOfLength = (str: string, min: Min, max: Max): str is StringOfLength =>
+ str.length >= min && str.length <= max;
// type constructor function
-export const stringOfLength = (
- input: unknown,
- min: Min,
- max: Max
-): StringOfLength => {
+export const stringOfLength = (input: unknown, min: Min, max: Max): StringOfLength => {
if (typeof input !== 'string') {
throw new Error('invalid input');
}
diff --git a/projects/ng-mat-components/src/fs-nav-frame/services/fs-nav-frame.service.ts b/projects/ng-mat-components/src/fs-nav-frame/services/fs-nav-frame.service.ts
index 40b2af4..29a012e 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/services/fs-nav-frame.service.ts
+++ b/projects/ng-mat-components/src/fs-nav-frame/services/fs-nav-frame.service.ts
@@ -1,11 +1,10 @@
import { EventEmitter, Injectable } from '@angular/core';
@Injectable({
- providedIn: 'root'
+ providedIn: 'root',
})
export class FsNavFrameService {
-
isMenuClosed = new EventEmitter();
- constructor() { }
+ constructor() {}
}
diff --git a/projects/ng-mat-components/src/test.ts b/projects/ng-mat-components/src/test.ts
index bcca659..a10d3a7 100644
--- a/projects/ng-mat-components/src/test.ts
+++ b/projects/ng-mat-components/src/test.ts
@@ -3,23 +3,21 @@
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
-import {
- BrowserDynamicTestingModule,
- platformBrowserDynamicTesting
-} from '@angular/platform-browser-dynamic/testing';
+import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
- context(path: string, deep?: boolean, filter?: RegExp): {
+ context(
+ path: string,
+ deep?: boolean,
+ filter?: RegExp
+ ): {
(id: string): T;
keys(): string[];
};
};
// First, initialize the Angular testing environment.
-getTestBed().initTestEnvironment(
- BrowserDynamicTestingModule,
- platformBrowserDynamicTesting(),
-);
+getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
diff --git a/projects/ng-mat-components/test.scss b/projects/ng-mat-components/test.scss
index 395fb96..653b716 100644
--- a/projects/ng-mat-components/test.scss
+++ b/projects/ng-mat-components/test.scss
@@ -1,6 +1,6 @@
-@use "sass:map";
-@use "../../node_modules/@angular/material" as mat;
-@use "./index" as fsc;
+@use 'sass:map';
+@use '../../node_modules/@angular/material' as mat;
+@use './index' as fsc;
// @include mat.core();
@@ -10,22 +10,24 @@ $my-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
// The "warn" palette is optional and defaults to red if not specified.
$my-warn: mat.define-palette(mat.$red-palette);
-$my-theme: mat.define-light-theme((color: (primary: $my-primary,
- accent: $my-accent,
- warn: $my-warn,
- ),
- typography: mat.define-typography-config(),
- density: 0,
- ));
-
+$my-theme: mat.define-light-theme(
+ (
+ color: (
+ primary: $my-primary,
+ accent: $my-accent,
+ warn: $my-warn,
+ ),
+ typography: mat.define-typography-config(),
+ density: 0,
+ )
+);
// Extract whichever individual palettes you need from the theme.
$primary: map-get($my-theme, primary);
$accent: map-get($my-theme, accent);
// Gets the standard material maps of fore/background
-$background: map-get($my-theme, "background");
-$foreground: map-get($my-theme, "foreground");
-
+$background: map-get($my-theme, 'background');
+$foreground: map-get($my-theme, 'foreground');
@media (prefers-color-scheme: dark) {
@include fsc.all-component-themes($my-theme);
diff --git a/projects/ng-mat-components/tsconfig.lib.json b/projects/ng-mat-components/tsconfig.lib.json
index b77b13c..305b0b9 100644
--- a/projects/ng-mat-components/tsconfig.lib.json
+++ b/projects/ng-mat-components/tsconfig.lib.json
@@ -8,8 +8,5 @@
"inlineSources": true,
"types": []
},
- "exclude": [
- "src/test.ts",
- "**/*.spec.ts"
- ]
+ "exclude": ["src/test.ts", "**/*.spec.ts"]
}
diff --git a/projects/ng-mat-components/tsconfig.spec.json b/projects/ng-mat-components/tsconfig.spec.json
index 715dd0a..fafd1e1 100644
--- a/projects/ng-mat-components/tsconfig.spec.json
+++ b/projects/ng-mat-components/tsconfig.spec.json
@@ -3,15 +3,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
- "types": [
- "jasmine"
- ]
+ "types": ["jasmine"]
},
- "files": [
- "src/test.ts"
- ],
- "include": [
- "**/*.spec.ts",
- "**/*.d.ts"
- ]
+ "files": ["src/test.ts"],
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
}
diff --git a/tailwind.config.js b/tailwind.config.js
index 6e08aba..ae4a2b5 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,10 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
- content: [
- "./projects/lib-workspace/src/**/*.{html,ts}",
- ],
+ content: ['./projects/lib-workspace/src/**/*.{html,ts}'],
theme: {
extend: {},
},
plugins: [],
-}
+};
diff --git a/tsconfig.json b/tsconfig.json
index 0b7f692..6d47bba 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -12,10 +12,7 @@
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"paths": {
- "ng-mat-components": [
- "dist/ng-mat-components/ng-mat-components",
- "dist/ng-mat-components"
- ]
+ "ng-mat-components": ["dist/ng-mat-components/ng-mat-components", "dist/ng-mat-components"]
},
"declaration": false,
"downlevelIteration": true,
@@ -24,10 +21,7 @@
"importHelpers": true,
"target": "es2017",
"module": "es2020",
- "lib": [
- "es2020",
- "dom"
- ]
+ "lib": ["es2020", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
From 5bc6478a82a24776c76049c876b157d12f7d1fbb Mon Sep 17 00:00:00 2001
From: eksrha <58111764+eksrha@users.noreply.github.com>
Date: Mon, 30 Jan 2023 16:11:48 +0100
Subject: [PATCH 2/5] add app version
---
.../lib-workspace/src/app/app.component.html | 2 +-
.../lib-workspace/src/app/app.component.ts | 8 ++++----
.../fs-nav-frame/fs-nav-frame.component.html | 14 +++++--------
.../fs-nav-frame/fs-nav-frame.component.scss | 20 +++++++++++++++----
.../fs-nav-frame/fs-nav-frame.component.ts | 8 +++-----
.../src/fs-nav-frame/nav-frame.modules.ts | 12 +++++------
6 files changed, 35 insertions(+), 29 deletions(-)
diff --git a/projects/lib-workspace/src/app/app.component.html b/projects/lib-workspace/src/app/app.component.html
index 043569a..df71c97 100644
--- a/projects/lib-workspace/src/app/app.component.html
+++ b/projects/lib-workspace/src/app/app.component.html
@@ -1,4 +1,4 @@
-
+
Current App Title
diff --git a/projects/lib-workspace/src/app/app.component.ts b/projects/lib-workspace/src/app/app.component.ts
index 9949861..f98fbeb 100644
--- a/projects/lib-workspace/src/app/app.component.ts
+++ b/projects/lib-workspace/src/app/app.component.ts
@@ -2,7 +2,7 @@ import { registerLocaleData } from '@angular/common';
import localeDe from '@angular/common/locales/de';
import localeDeExtra from '@angular/common/locales/extra/de';
import { Component, OnInit } from '@angular/core';
-import { FrameConfig, FrameEvent, FrameEvents, NavUser } from 'projects/ng-mat-components/src/public-api';
+import { FrameEvent, FrameEvents, NavFrameConfig, NavUser } from 'projects/ng-mat-components/src/public-api';
import { routes } from './app-routing.module';
@Component({
@@ -14,10 +14,10 @@ export class AppComponent implements OnInit {
title = 'FS DevOps`s ng mat components';
appRoutes = routes;
- frameConfig: FrameConfig = {
+ navFrameConfig: NavFrameConfig = {
appName: 'Dummy App',
- // appNameShort: stringOfLength('DUMMY', 0, 6),
- logo: 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Angular_full_color_logo.svg/1024px-Angular_full_color_logo.svg.png',
+ appVersion: '0.0.0',
+ // logoSrc: 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Angular_full_color_logo.svg/1024px-Angular_full_color_logo.svg.png',
};
navUser: NavUser = {
profilePicture: 'https://material.angular.io/assets/img/examples/shiba1.jpg',
diff --git a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.html b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.html
index 52e790e..c77ecea 100644
--- a/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.html
+++ b/projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.html
@@ -2,12 +2,13 @@
@@ -15,11 +16,6 @@