├── .github
├── FUNDING.yml
├── main.workflow
└── ISSUE_TEMPLATE
│ └── bug_report.md
├── setupJest.ts
├── docs
├── favicon.ico
├── index.html
├── runtime.ec2944dd8b20ec099bf3.js
├── 3rdpartylicenses.txt
├── polyfills.c6871e56cb80756a5498.js
└── styles.f2c05d70e222c7d40278.css
├── tsconfig.spec.json
├── .prettierrc
├── .travis.yml
├── lib
├── public_api.ts
└── src
│ ├── ngVirtualTable.module.ts
│ ├── interfaces
│ └── index.ts
│ ├── services
│ ├── ngVirtualTable.service.ts
│ └── ngVirtualTable.service.spec.ts
│ └── components
│ ├── virtual-table.component.html
│ ├── virtual-table.component.scss
│ └── virtual-table.component.ts
├── tsconfig.json
├── jest-global-mocks.ts
├── appTest
└── .gitignore
├── LICENSE
├── .gitignore
├── tslint.json
├── package.json
└── README.md
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: PxyUp
--------------------------------------------------------------------------------
/setupJest.ts:
--------------------------------------------------------------------------------
1 | import 'jest-preset-angular';
2 | import './jest-global-mocks';
3 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PxyUp/ng-virtual-table/HEAD/docs/favicon.ico
--------------------------------------------------------------------------------
/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": [
4 | "**/*.spec.ts",
5 | "**/*.d.ts"
6 | ]
7 | }
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/prettierrc",
3 | "printWidth": 100,
4 | "singleQuote": true,
5 | "tabWidth": 2,
6 | "trailingComma": "all"
7 | }
8 |
--------------------------------------------------------------------------------
/.github/main.workflow:
--------------------------------------------------------------------------------
1 | workflow "Build, Test, and Publish" {
2 | on = "push"
3 | resolves = ["Test"]
4 | }
5 |
6 | action "Build" {
7 | uses = "actions/npm@master"
8 | args = "install"
9 | }
10 |
11 | action "Test" {
12 | needs = "Build"
13 | uses = "actions/npm@master"
14 | args = "test"
15 | }
16 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: required
2 | dist: trusty
3 | language: node_js
4 | cache:
5 | yarn: true
6 | notifications:
7 | email: false
8 | node_js: lts/*
9 | branches:
10 | only:
11 | - master
12 | stages:
13 | - test
14 | - name: deploy
15 | if: branch = master and type != pull_request
16 | jobs:
17 | include:
18 | - stage: test
19 | script:
20 | - yarn build
21 | - yarn test:ci
22 | - yarn test:report
--------------------------------------------------------------------------------
/lib/public_api.ts:
--------------------------------------------------------------------------------
1 | export { NgVirtualTableModule } from './src/ngVirtualTable.module';
2 | export { VirtualTableComponent } from './src/components/virtual-table.component';
3 | export {
4 | VirtualTableItem,
5 | VirtualTableColumn,
6 | VirtualTableConfig,
7 | VirtualTableColumnComponent,
8 | VirtualTablePaginator,
9 | VirtualPageChange,
10 | VirtualTableEffect,
11 | ResponseStreamWithSize,
12 | VirtualSortEffect,
13 | sortColumn,
14 | } from './src/interfaces';
15 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "baseUrl": ".",
5 | "module": "commonjs",
6 | "moduleResolution": "node",
7 | "sourceMap": true,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": ["es2015", "dom", "esnext"],
11 | "noImplicitAny": true,
12 | "suppressImplicitAnyIndexErrors": true,
13 | "paths": {
14 | "@angular/*": [
15 | "./node_modules/@angular/*"
16 | ]
17 | },
18 | },
19 | "exclude": [
20 | "appTest/**/*"
21 | ]
22 | }
--------------------------------------------------------------------------------
/jest-global-mocks.ts:
--------------------------------------------------------------------------------
1 | const mock = () => {
2 | let storage = {};
3 | return {
4 | getItem: (key: any) => (key in storage ? storage[key] : null),
5 | setItem: (key: any, value: any) => (storage[key] = value || ''),
6 | removeItem: (key: any) => delete storage[key],
7 | clear: () => (storage = {}),
8 | };
9 | };
10 |
11 | Object.defineProperty(window, 'localStorage', { value: mock() });
12 | Object.defineProperty(window, 'sessionStorage', { value: mock() });
13 | Object.defineProperty(window, 'getComputedStyle', {
14 | value: () => ['-webkit-appearance'],
15 | });
16 |
--------------------------------------------------------------------------------
/appTest/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 |
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AppTest
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 |
5 | ---
6 |
7 | **Describe the bug**
8 | A clear and concise description of what the bug is.
9 |
10 | **To Reproduce**
11 | Steps to reproduce the behavior:
12 | 1. Go to '...'
13 | 2. Click on '....'
14 | 3. Scroll down to '....'
15 | 4. See error
16 |
17 | **Expected behavior**
18 | A clear and concise description of what you expected to happen.
19 |
20 | **Screenshots**
21 | If applicable, add screenshots to help explain your problem.
22 |
23 | **Desktop (please complete the following information):**
24 | - OS: [e.g. iOS]
25 | - Browser [e.g. chrome, safari]
26 | - Version [e.g. 22]
27 |
28 | **Smartphone (please complete the following information):**
29 | - Device: [e.g. iPhone6]
30 | - OS: [e.g. iOS8.1]
31 | - Browser [e.g. stock browser, safari]
32 | - Version [e.g. 22]
33 |
34 | **Additional context**
35 | Add any other context about the problem here.
36 |
37 |
38 | **Link stackblitz**
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Iurii Panarin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/lib/src/ngVirtualTable.module.ts:
--------------------------------------------------------------------------------
1 | import { CommonModule } from '@angular/common';
2 | import { DragDropModule } from '@angular/cdk/drag-drop';
3 | import { DynamicModule } from 'ng-dynamic-component';
4 | import { LayoutModule } from '@angular/cdk/layout';
5 | import { MatFormFieldModule } from '@angular/material/form-field';
6 | import { MatIconModule } from '@angular/material/icon';
7 | import { MatPaginatorModule } from '@angular/material/paginator';
8 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
9 | import { NgModule } from '@angular/core';
10 | import { ReactiveFormsModule } from '@angular/forms';
11 | import { ScrollingModule } from '@angular/cdk/scrolling';
12 | import { VirtualTableComponent } from './components/virtual-table.component';
13 |
14 | @NgModule({
15 | declarations: [VirtualTableComponent],
16 | imports: [
17 | CommonModule,
18 | ReactiveFormsModule,
19 | MatIconModule,
20 | MatFormFieldModule,
21 | ScrollingModule,
22 | DragDropModule,
23 | MatPaginatorModule,
24 | MatProgressSpinnerModule,
25 | LayoutModule,
26 | DynamicModule.withComponents([]),
27 | ],
28 | exports: [VirtualTableComponent],
29 | })
30 | export class NgVirtualTableModule {}
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | dist
8 | appTest/scr/**/*.*
9 | !appTest/dist/**/*.*
10 | !appTest/.gitignore
11 | appTest
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 | .vscode
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 |
24 | # nyc test coverage
25 | .nyc_output
26 |
27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28 | .grunt
29 |
30 | # Bower dependency directory (https://bower.io/)
31 | bower_components
32 |
33 | # node-waf configuration
34 | .lock-wscript
35 |
36 | # Compiled binary addons (https://nodejs.org/api/addons.html)
37 | build/Release
38 |
39 | # Dependency directories
40 | node_modules/
41 | jspm_packages/
42 |
43 | # TypeScript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # next.js build output
65 | .next
--------------------------------------------------------------------------------
/docs/runtime.ec2944dd8b20ec099bf3.js:
--------------------------------------------------------------------------------
1 | !function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c any;
14 | comp?: (a: any, b: any) => number;
15 | sort?: sortColumn;
16 | resizable?: boolean;
17 | draggable?: boolean;
18 | component?: VirtualTableColumnComponent | false;
19 | }
20 |
21 | export interface VirtualTableColumnInternal extends VirtualTableColumn {
22 | activeResize?: boolean;
23 | growDisabled?: boolean;
24 | width?: number;
25 | }
26 |
27 | export interface VirtualTableColumnComponent {
28 | componentConstructor: Type;
29 | inputs?: Object;
30 | outputs?: Object;
31 | }
32 |
33 | export interface VirtualTablePaginator {
34 | pageSize?: number;
35 | pageSizeOptions?: Array;
36 | showFirstLastButtons?: boolean;
37 | }
38 |
39 | export interface VirtualTableConfig {
40 | column?: Array;
41 | header?: boolean;
42 | filter?: boolean;
43 | pagination?: VirtualTablePaginator | boolean;
44 | serverSide?: boolean;
45 | serverSideResolver?: (effects: VirtualTableEffect) => Observable;
46 | }
47 |
48 | export interface ResponseStreamWithSize {
49 | stream: Array;
50 | totalSize: number;
51 | }
52 | export interface StreamWithEffect {
53 | stream: Array;
54 | effects?: VirtualTableEffect;
55 | }
56 |
57 | export interface VirtualTableEffect {
58 | filter?: string;
59 | sort?: VirtualSortEffect;
60 | pagination?: VirtualPageChange;
61 | }
62 |
63 | export interface VirtualPageChange {
64 | pageSize?: number;
65 | pageIndex?: number;
66 | }
67 |
68 | export interface VirtualSortEffect {
69 | sortColumn: string;
70 | sortType?: sortColumn;
71 | }
72 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": ["node_modules/codelyzer"],
3 | "extends": ["rxjs-tslint-rules"],
4 | "rules": {
5 | "arrow-return-shorthand": true,
6 | "callable-types": true,
7 | "class-name": true,
8 | "comment-format": [true, "check-space"],
9 | "curly": true,
10 | "deprecation": {
11 | "severity": "warn"
12 | },
13 | "eofline": true,
14 | "forin": true,
15 | "import-blacklist": [true, "rxjs/Rx"],
16 | "import-spacing": true,
17 | "indent": [true, "spaces"],
18 | "interface-over-type-literal": true,
19 | "label-position": true,
20 | "max-line-length": [true, 140],
21 | "member-access": false,
22 | "member-ordering": [
23 | true,
24 | {
25 | "order": ["static-field", "instance-field", "static-method", "instance-method"]
26 | }
27 | ],
28 | "no-arg": true,
29 | "no-bitwise": true,
30 | "no-console": [true, "log", "debug", "info", "time", "timeEnd", "trace"],
31 | "no-construct": true,
32 | "no-debugger": true,
33 | "no-duplicate-super": true,
34 | "no-empty": false,
35 | "no-empty-interface": true,
36 | "no-eval": true,
37 | "no-inferrable-types": [true, "ignore-params"],
38 | "no-misused-new": true,
39 | "no-non-null-assertion": true,
40 | "no-shadowed-variable": true,
41 | "no-string-literal": false,
42 | "no-string-throw": true,
43 | "no-switch-case-fall-through": true,
44 | "no-trailing-whitespace": true,
45 | "no-unnecessary-initializer": true,
46 | "no-unused-expression": true,
47 | "no-use-before-declare": true,
48 | "no-var-keyword": true,
49 | "object-literal-sort-keys": false,
50 | "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"],
51 | "prefer-const": true,
52 | "quotemark": [true, "single"],
53 | "radix": true,
54 | "rxjs-finnish": false,
55 | "rxjs-no-unsafe-takeuntil": true,
56 | "rxjs-no-internal": true,
57 | "rxjs-no-subject-unsubscribe": true,
58 | "semicolon": [true, "always", "ignore-bound-class-methods"],
59 | "triple-equals": [true, "allow-null-check"],
60 | "typedef-whitespace": [
61 | true,
62 | {
63 | "call-signature": "nospace",
64 | "index-signature": "nospace",
65 | "parameter": "nospace",
66 | "property-declaration": "nospace",
67 | "variable-declaration": "nospace"
68 | }
69 | ],
70 | "unified-signatures": true,
71 | "variable-name": false,
72 | "whitespace": [
73 | true,
74 | "check-branch",
75 | "check-decl",
76 | "check-operator",
77 | "check-module",
78 | "check-separator",
79 | "check-rest-spread",
80 | "check-type",
81 | "check-type-operator",
82 | "check-preblock"
83 | ],
84 | "directive-selector": [true, "attribute", false, "camelCase"],
85 | "component-selector": [true, "element", false, "kebab-case"],
86 | "no-output-on-prefix": true,
87 | "use-input-property-decorator": true,
88 | "use-output-property-decorator": true,
89 | "use-host-property-decorator": true,
90 | "no-input-rename": true,
91 | "no-output-rename": true,
92 | "use-life-cycle-interface": true,
93 | "use-pipe-transform-interface": true,
94 | "component-class-suffix": true,
95 | "directive-class-suffix": true,
96 | "space-within-parens": true
97 | }
98 | }
--------------------------------------------------------------------------------
/lib/src/services/ngVirtualTable.service.ts:
--------------------------------------------------------------------------------
1 | import {
2 | VirtualTableColumn,
3 | VirtualTableColumnInternal,
4 | VirtualTableItem,
5 | sortColumn,
6 | } from '../interfaces';
7 |
8 | import { Injectable } from '@angular/core';
9 |
10 | @Injectable({
11 | providedIn: 'root',
12 | })
13 | export class NgVirtualTableService {
14 | public defaultComparator(a: any, b: any): number {
15 | if (a > b) {
16 | return 1;
17 | }
18 | if (a < b) {
19 | return -1;
20 | }
21 | return 0;
22 | }
23 |
24 | public defaultGetter(item: VirtualTableItem, e: any) {
25 | return e[item.key];
26 | }
27 |
28 | public createColumnFromConfigColumn(
29 | item: string | VirtualTableColumn,
30 | ): VirtualTableColumnInternal {
31 | if (typeof item === 'string') {
32 | return {
33 | name: item,
34 | key: item,
35 | func: e => e[item],
36 | comp: this.defaultComparator,
37 | sort: null,
38 | resizable: true,
39 | component: false,
40 | draggable: true,
41 | };
42 | }
43 | if (!item.key) {
44 | throw Error(`Column key is required`);
45 | }
46 | return {
47 | name: item.name || item.key,
48 | key: item.key,
49 | func: typeof item.func === 'function' ? item.func : this.defaultGetter.bind(null, item),
50 | comp: typeof item.comp === 'function' ? item.comp : this.defaultComparator,
51 | sort: item.sort === false || item.sort ? item.sort : null,
52 | resizable: item.resizable === false || item.resizable ? item.resizable : true,
53 | component: item.component ? item.component : false,
54 | draggable: item.draggable === false || item.draggable ? item.draggable : true,
55 | };
56 | }
57 |
58 | public getElement(
59 | item: VirtualTableItem | number | string | boolean,
60 | func: (item: VirtualTableItem | number | string | boolean) => any,
61 | ) {
62 | return func(item);
63 | }
64 |
65 | public setSortOnColumnArray(
66 | sortColumnString: string,
67 | arr: Array,
68 | ): Array {
69 | return arr.map(item => {
70 | if (item.key !== sortColumnString) {
71 | return {
72 | ...item,
73 | sort: (item.sort === false ? false : null) as sortColumn,
74 | };
75 | }
76 |
77 | if (item.sort === false) {
78 | return {
79 | ...item,
80 | sort: false as sortColumn,
81 | };
82 | }
83 |
84 | if (item.sort === null) {
85 | return {
86 | ...item,
87 | sort: 'asc' as sortColumn,
88 | };
89 | }
90 |
91 | if (item.sort === 'asc') {
92 | return {
93 | ...item,
94 | sort: 'desc' as sortColumn,
95 | };
96 | }
97 |
98 | if (item.sort === 'desc') {
99 | return {
100 | ...item,
101 | sort: null as sortColumn,
102 | };
103 | }
104 | });
105 | }
106 |
107 | transformDynamicInput(input: Object, item: VirtualTableItem): Object {
108 | const answer = Object.create(null);
109 |
110 | if (!input) {
111 | return answer;
112 | }
113 |
114 | Object.keys(input).forEach(key => {
115 | if (typeof input[key] === 'function') {
116 | answer[key] = this.getElement(item, input[key]);
117 | return;
118 | }
119 | answer[key] = input[key];
120 | });
121 |
122 | return answer;
123 | }
124 |
125 | createColumnFromArray(
126 | arr: Array,
127 | ): Array {
128 | return arr.map((item: VirtualTableColumn) => this.createColumnFromConfigColumn(item));
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/lib/src/components/virtual-table.component.html:
--------------------------------------------------------------------------------
1 |
2 |
66 |
67 |
68 |
69 |
70 |
0; else emptyContainer"
72 | [itemSize]="itemSize"
73 | >
74 |
79 |
84 | {{ getElement(item, headerItem.func) }}
87 |
88 |
93 |
94 |
95 |
96 |
97 |
98 | {{ dataSetEmptyPlaceholder }}
99 |
100 |
101 |
102 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ng-virtual-table",
3 | "version": "2.0.0",
4 | "description": "Angular 7/8 virtual scroll table with support dynamic component, draggable, filtering, server side, sorting, pagination, resizable and custom config column",
5 | "main": "index.js",
6 | "repository": "git@github.com:PxyUp/ng-virtual-table.git",
7 | "author": "Iurii Panarin ",
8 | "license": "MIT",
9 | "scripts": {
10 | "build": "ng-packagr -p package.json",
11 | "ct": "git-cz",
12 | "pretest": "yarn cleancoverage",
13 | "test": "jest",
14 | "test:ci": "jest --runInBand --coverage",
15 | "test:report": "cd coverage && codecov",
16 | "cleancoverage": "rimraf coverage",
17 | "format:code": "prettier --write \"lib/src/**/*.{ts,js,?css,json}\"",
18 | "format:html": "prettyhtml \"lib/src/**/*.html\"",
19 | "format": "npm-run-all -p format:code format:html"
20 | },
21 | "ngPackage": {
22 | "lib": {
23 | "entryFile": "./lib/public_api.ts",
24 | "cssUrl": "inline"
25 | },
26 | "whitelistedNonPeerDependencies": [
27 | "angular",
28 | "rxjs",
29 | "ng-dynamic-component"
30 | ]
31 | },
32 | "husky": {
33 | "hooks": {
34 | "pre-commit": "lint-staged",
35 | "pre-push": "yarn test",
36 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
37 | }
38 | },
39 | "lint-staged": {
40 | "lib/src/**/*.{ts,js,?css,json}": [
41 | "prettier --write",
42 | "git add"
43 | ],
44 | "lib/src/**/*.{ts,js}": [
45 | "tslint -p tsconfig.json -c tslint.json --fix",
46 | "git add"
47 | ],
48 | "lib/src/**/*.html": [
49 | "prettyhtml",
50 | "git add"
51 | ]
52 | },
53 | "devDependencies": {
54 | "@angular/animations": "^8.0.0",
55 | "@angular/cdk": "^8.0.0",
56 | "@angular/cli": "^8.0.0",
57 | "@angular/common": "^8.0.0",
58 | "@angular/compiler": "^8.0.0",
59 | "@angular/compiler-cli": "^8.0.0",
60 | "@angular/core": "^8.0.0",
61 | "@angular/forms": "^8.0.0",
62 | "@angular/material": "^8.0.0",
63 | "@angular/platform-browser": "^8.0.0",
64 | "@angular/platform-browser-dynamic": "^8.0.0",
65 | "@commitlint/config-conventional": "^7.1.2",
66 | "@starptech/prettyhtml": "^0.5.1",
67 | "@types/jest": "^23.3.7",
68 | "browserslist": "^4.7.0",
69 | "caniuse-lite": "^1.0.30000997",
70 | "codecov": "^3.6.1",
71 | "codelyzer": "^5.1.0",
72 | "commitizen": "^3.0.4",
73 | "commitlint": "^7.2.1",
74 | "husky": "^1.1.2",
75 | "jest": "^23.6.0",
76 | "jest-preset-angular": "^6.0.1",
77 | "lint-staged": "^8.0.4",
78 | "ng-packagr": "^5.5.1",
79 | "npm-run-all": "^4.1.3",
80 | "prettier": "^1.14.3",
81 | "rimraf": "^2.6.2",
82 | "rxjs": "^6.4.0",
83 | "rxjs-tslint-rules": "^4.10.0",
84 | "scss-bundle": "^2.4.0",
85 | "ts-jest": "^23.10.4",
86 | "tsickle": "^0.37.0",
87 | "tslint": "^5.11.0",
88 | "typescript": "3.4.3",
89 | "zone.js": "~0.9.1"
90 | },
91 | "config": {
92 | "commitizen": {
93 | "path": "./node_modules/cz-conventional-changelog"
94 | }
95 | },
96 | "commitlint": {
97 | "extends": [
98 | "@commitlint/config-conventional"
99 | ],
100 | "rules": {
101 | "header-max-length": [
102 | 2,
103 | "always",
104 | 80
105 | ]
106 | }
107 | },
108 | "keywords": [
109 | "virtual scroll",
110 | "scroll",
111 | "ngx",
112 | "angular",
113 | "angular 7",
114 | "angular 8",
115 | "ngx",
116 | "dynamic",
117 | "component",
118 | "input",
119 | "output",
120 | "life-cycle"
121 | ],
122 | "peerDependencies": {
123 | "@angular/animations": "^8.0.0",
124 | "@angular/cdk": "^8.0.0",
125 | "@angular/core": "^8.0.0",
126 | "@angular/forms": "^8.0.0",
127 | "@angular/material": "^8.0.0"
128 | },
129 | "dependencies": {
130 | "ng-dynamic-component": "^5.0.0"
131 | },
132 | "jest": {
133 | "globals": {
134 | "ts-jest": {
135 | "tsConfig": "/tsconfig.spec.json"
136 | },
137 | "__TRANSFORM_HTML__": true
138 | },
139 | "coverageDirectory": "/coverage",
140 | "collectCoverageFrom": [
141 | "lib/src/**/*.ts",
142 | "!lib/src/ngVirtualTable.module.ts"
143 | ],
144 | "coverageThreshold": {
145 | "global": {
146 | "branches": 80,
147 | "functions": 90,
148 | "lines": 90,
149 | "statements": 90
150 | }
151 | },
152 | "transform": {
153 | "^.+\\.(ts|html)$": "jest-preset-angular/preprocessor.js"
154 | },
155 | "transformIgnorePatterns": [
156 | "node_modules/(?!@ngrx)"
157 | ],
158 | "preset": "jest-preset-angular",
159 | "setupTestFrameworkScriptFile": "/setupJest.ts",
160 | "testPathIgnorePatterns": [
161 | "/dist/",
162 | "/node_modules/",
163 | "/appTest/",
164 | "/docs"
165 | ]
166 | }
167 | }
168 |
--------------------------------------------------------------------------------
/lib/src/components/virtual-table.component.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Material Icons';
3 | font-style: normal;
4 | font-weight: 400;
5 | src: url(https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2)
6 | format('woff2');
7 | }
8 |
9 | $header-height: 40px;
10 | $padding-left: 16px;
11 | $row-height: 20px;
12 | $caret-padding: 0;
13 | $caret-width: 40px;
14 | $caret-height: 40px;
15 | $header-padding-top: 8px;
16 | $drag-animation: transform 250ms cubic-bezier(0, 0, 0.2, 1);
17 | $active-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),
18 | 0 3px 14px 2px rgba(0, 0, 0, 0.12);
19 | $pagination-size: 56px;
20 |
21 | :host {
22 | display: block;
23 | position: relative;
24 |
25 | mat-icon::ng-deep {
26 | font-family: 'Material Icons';
27 | }
28 |
29 | &.with-header {
30 | .virtual-table {
31 | &-loader,
32 | &-content {
33 | height: calc(100% - #{$header-height} - #{$header-padding-top} - 1px) !important;
34 | }
35 | }
36 | }
37 |
38 | &.with-pagination {
39 | .virtual-table {
40 | &-loader,
41 | &-content {
42 | height: calc(100% - #{$pagination-size}) !important;
43 | }
44 | }
45 | }
46 |
47 | &.with-pagination.with-header {
48 | .virtual-table {
49 | &-loader,
50 | &-content {
51 | height: calc(
52 | 100% - #{$header-height} - #{$header-padding-top} - 1px - #{$pagination-size}
53 | ) !important;
54 | }
55 | }
56 | }
57 | }
58 |
59 | .header-item {
60 | cursor: pointer;
61 | display: flex;
62 | align-items: center;
63 | height: 100%;
64 | position: relative;
65 | flex: 1 1 auto;
66 | min-width: $caret-width * 3;
67 |
68 | &.cdk-drag-preview {
69 | background-color: white;
70 | opacity: 1;
71 | box-sizing: border-box;
72 | border-radius: 4px;
73 | box-shadow: $active-box-shadow;
74 | }
75 |
76 | .drag-order-handle {
77 | cursor: move;
78 |
79 | svg {
80 | width: 18px;
81 | }
82 |
83 | margin-right: $padding-left/2;
84 | }
85 |
86 | &.active {
87 | transform: translateY(0) !important;
88 | box-shadow: $active-box-shadow;
89 |
90 | .grabber {
91 | &:after {
92 | color: #200eea;
93 | font-weight: bold;
94 | }
95 | }
96 | }
97 |
98 | &.resizable {
99 | justify-content: space-between;
100 | }
101 |
102 | .title {
103 | display: flex;
104 | align-items: center;
105 | }
106 |
107 | .grabber {
108 | width: $caret-width;
109 | height: $caret-height;
110 | position: relative;
111 | display: flex;
112 | align-items: center;
113 | justify-content: center;
114 | right: $caret-padding;
115 | cursor: col-resize;
116 | z-index: 1;
117 |
118 | &:after {
119 | content: 'swap_horiz';
120 | font-family: 'Material Icons';
121 | font-size: 24px;
122 | }
123 |
124 | &:active {
125 | &:after {
126 | color: #200eea;
127 | font-weight: bold;
128 | }
129 | }
130 | }
131 |
132 | &.not-clickable {
133 | cursor: default;
134 | }
135 |
136 | &.asc {
137 | .title {
138 | &:after {
139 | margin-right: 4px;
140 | content: 'arrow_downward';
141 | font-family: 'Material Icons';
142 | }
143 | }
144 | }
145 |
146 | &.desc {
147 | .title {
148 | &:after {
149 | margin-right: 4px;
150 | font-family: 'Material Icons';
151 | content: 'arrow_upward';
152 | }
153 | }
154 | }
155 | }
156 |
157 | .table {
158 | height: 100%;
159 | position: relative;
160 |
161 | .header {
162 | display: flex;
163 | margin-top: $header-padding-top;
164 | height: $header-height;
165 | align-items: center;
166 | overflow-x: auto;
167 | overflow-y: hidden;
168 | margin-left: $padding-left;
169 | margin-right: $padding-left;
170 | padding-right: $padding-left;
171 |
172 | &-item {
173 | &.cdk-drag-placeholder {
174 | opacity: 0;
175 | }
176 | }
177 |
178 | &.cdk-drop-list-dragging {
179 | .header-item {
180 | &:not(.cdk-drag-placeholder) {
181 | transition: $drag-animation;
182 | }
183 | }
184 | }
185 |
186 | .filter-spot {
187 | display: flex;
188 | align-items: center;
189 | right: $padding-left;
190 | width: $header-height/2;
191 | min-width: $header-height/2;
192 | z-index: 1;
193 | height: $header-height;
194 | position: absolute;
195 |
196 | .filter-spot-input {
197 | display: none;
198 | }
199 |
200 | mat-icon {
201 | cursor: pointer;
202 | margin-top: 9px;
203 | }
204 |
205 | &.open {
206 | z-index: 2;
207 |
208 | mat-icon {
209 | z-index: 2;
210 | }
211 |
212 | .filter-spot-input {
213 | display: block;
214 | position: absolute;
215 | right: 0;
216 | }
217 | }
218 | }
219 |
220 | border-bottom: 1px solid black;
221 | }
222 |
223 | .virtual-table {
224 | &-content {
225 | cdk-virtual-scroll-viewport::ng-deep {
226 | height: 100%;
227 | width: 100%;
228 | }
229 | }
230 |
231 | &-bottom {
232 | height: $pagination-size;
233 | width: 100%;
234 | }
235 |
236 | &-loader,
237 | &-content {
238 | display: flex;
239 | flex-direction: column;
240 | height: calc(100% - #{$header-height} - #{$header-padding-top} - 1px);
241 |
242 | &-empty {
243 | padding-left: $padding-left;
244 | }
245 | }
246 |
247 | &-loader {
248 | z-index: 1;
249 | background-color: white;
250 | align-items: center;
251 | justify-content: center;
252 | width: 100%;
253 | }
254 |
255 | &-row {
256 | display: flex;
257 | flex-direction: row;
258 | min-height: $row-height;
259 | align-items: stretch;
260 | margin-left: $padding-left;
261 | margin-right: $padding-left;
262 | cursor: pointer;
263 | }
264 |
265 | &-column {
266 | display: block;
267 | flex: 1 1 calc(100% - #{$padding-left});
268 | min-width: $caret-width * 3;
269 | white-space: nowrap;
270 | overflow: hidden;
271 | text-overflow: ellipsis;
272 | }
273 | }
274 | }
275 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## ng-virtual-table
2 |
3 | Angular 7/8 virtual scroll table with support dynamic component, draggable, filtering, sorting, paginations, resizable and custom config for each column
4 |
5 | [](https://travis-ci.org/PxyUp/ng-virtual-table)
6 | [](https://codecov.io/gh/PxyUp/ng-virtual-table)
7 | [](https://badge.fury.io/js/ng-virtual-table)
8 | [](https://www.npmjs.com/package/ng-virtual-table)
9 | [](https://github.com/PxyUp/ng-virtual-table/blob/master/LICENSE)
10 |
11 | ## Install and Use
12 |
13 | | Angular | ng-virtual-table | NPM package |
14 | |---------|------------------|-------------------------------|
15 | | 8.x.x | 2.x.x | `ng-virtual-table@^2.0.0` |
16 | | 7.x.x | 1.x.x | `ng-virtual-table@^1.0.0` |
17 |
18 | ```bash
19 | npm i ng-virtual-table
20 | yarn add ng-virtual-table
21 | ```
22 |
23 | Make sure you have:
24 | `@angular/cdk` `@angular/material` `@angular/forms`
25 |
26 | ```typescript
27 | import { NgVirtualTableModule } from 'ng-virtual-table';
28 |
29 | imports: [NgVirtualTableModule],
30 | ```
31 |
32 | ```html
33 |
34 | ```
35 | 📺 [STACKBLITZ](https://stackblitz.com/edit/angular-i7mm4w)
36 |
37 | 📺 [Demo](https://pxyup.github.io/ng-virtual-table)
38 |
39 |
40 | [](https://nodei.co/npm/ng-virtual-table/)
41 |
42 |
43 | ## Configuration
44 |
45 | ```typescript
46 |
47 | @Input() itemSize = 25;
48 |
49 | @Input() dataSource: Observable>;
50 |
51 | @Input() filterPlaceholder = 'Filter';
52 |
53 | @Input() dataSetEmptyPlaceholder = 'Data is empty';
54 |
55 | @Input() config: VirtualTableConfig;
56 |
57 | @Input() onRowClick: (item: VirtualTableItem) => void;
58 | ```
59 |
60 | ```typescript
61 | export type sortColumn = 'asc' | 'desc' | null | false;
62 |
63 |
64 | export interface VirtualPageChange {
65 | pageSize?: number; // pagination size
66 | pageIndex?: number; // page index
67 | }
68 |
69 | export interface VirtualSortEffect {
70 | sortColumn: string; // column for sort
71 | sortType?: sortColumn; // type sort
72 | }
73 |
74 | export interface VirtualTableColumn {
75 | name?: string; // Label for field, if absent will be use key
76 | key: string; // Uniq key for filed,
77 | func?: (item: VirtualTableItem) => any; // function for get value from dataSource item
78 | comp?: (a: any, b: any) => number; // function for compare two item, depend from `func` function
79 | sort?: 'asc' | 'desc' | null | false; // sort by default(support only one sort), false for disable
80 | resizable?: boolean; // default true(if not set `true`)
81 | draggable?: boolean; // default true (if not set `true`)
82 | component?: VirtualTableColumnComponent | false; // default false (You class component must be part of entryComponents in yor Module!!!!!)
83 | }
84 |
85 | export interface VirtualTableColumnComponent {
86 | componentConstructor: Type;
87 | inputs?: Object; // default {}
88 | outputs?: Object;
89 | }
90 |
91 | export interface VirtualTablePaginator {
92 | pageSize?: number; // default 10
93 | pageSizeOptions?: Array; // default [5, 10, 25, 100];
94 | showFirstLastButtons?: boolean; //default false;
95 | }
96 |
97 | export interface ResponseStreamWithSize {
98 | stream: Array; // stream for Server Side strategy
99 | totalSize: number; // total size of stream
100 | }
101 |
102 | export interface VirtualTableEffect {
103 | filter?: string; // filter string
104 | sort?: VirtualSortEffect; // sort effect
105 | pagination?: VirtualPageChange; // pagination effect
106 | }
107 |
108 | export interface VirtualTableConfig {
109 | column?: Array; // if config not provide will be auto generate column
110 | header?: boolean; // default false
111 | filter?: boolean; // default true
112 | pagination?: VirtualTablePaginator | boolean; // default false
113 | serverSide?: boolean; // default false;
114 | serverSideResolver?: (effects: VirtualTableEffect) => Observable;
115 | }
116 |
117 |
118 | ```
119 |
120 | ## Example
121 |
122 | ```typescript
123 | import { VirtualTableConfig } from 'ng-virtual-table';
124 |
125 | clickToItem(item: any) {
126 | console.log(item);
127 | }
128 |
129 | dataSource = of(
130 | Array(1000).fill(0).map((e) => ({
131 | name: Math.random().toString(36).substring(7),
132 | age: Math.round(Math.random() * 1000),
133 | })),
134 | );
135 |
136 | dataSource1 = of(
137 | Array(1000).fill(0).map((e) => ({
138 | name: Math.random().toString(36).substring(7),
139 | age: Math.round(Math.random() * 1000),
140 | age2: Math.round(Math.random() * 1000),
141 | label: {
142 | type: Math.random().toString(36).substring(7),
143 | },
144 | })),
145 | );
146 |
147 | config: VirtualTableConfig = {
148 | column: [
149 | {
150 | key: 'name',
151 | name: 'Full name',
152 | sort: false // disable sort
153 | },
154 | {
155 | key: 'age',
156 | name: 'Full Age',
157 | sort: 'desc', // pre defined sort
158 | component: {
159 | componentConstructor: InfoComponent,
160 | inputs: {
161 | title: (e) => e.age,
162 | },
163 | },
164 | },
165 | {
166 | key: 'label',
167 | name: 'Full Label',
168 | func: (e) => e.label.type,
169 | comp: (a, b) => a.indexOf('5') - b.indexOf('5'), // here a and b (e) => e.label.type
170 | },
171 | ],
172 | };
173 |
174 |
175 |
176 | @Component({
177 | selector: 'app-info',
178 | templateUrl: './info.component.html',
179 | styleUrls: ['./info.component.scss'],
180 | })
181 | export class InfoComponent {
182 | @Input() title: string;
183 |
184 | constructor() {}
185 | }
186 |
187 | ```
188 |
189 | ```html
190 |
191 |
192 |
193 | ```
194 |
--------------------------------------------------------------------------------
/lib/src/services/ngVirtualTable.service.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 | import { NgVirtualTableService } from './ngVirtualTable.service';
3 | import { sortColumn, VirtualTableColumn } from '../interfaces';
4 | import { Input } from '@angular/core';
5 |
6 | export class InfoComponent {
7 | @Input()
8 | name: string;
9 |
10 | constructor() {}
11 | }
12 |
13 | describe('NgVirtualTableService', () => {
14 | let service: NgVirtualTableService;
15 |
16 | beforeEach(() => {
17 | TestBed.configureTestingModule({
18 | providers: [NgVirtualTableService],
19 | });
20 | service = TestBed.get(NgVirtualTableService);
21 | });
22 |
23 | it('Should exist', () => {
24 | expect(service).toBeTruthy();
25 | });
26 |
27 | describe('defaultComparator', () => {
28 | it('should return 0', () => {
29 | const answer = service.defaultComparator(4, 4);
30 | expect(answer).toBe(0);
31 | const answer1 = service.defaultComparator(-4, -4);
32 | expect(answer1).toBe(0);
33 | const answer2 = service.defaultComparator('aaa', 'aaa');
34 | expect(answer).toBe(0);
35 | });
36 |
37 | it('should return 1', () => {
38 | const answer = service.defaultComparator(4, 3);
39 | expect(answer).toBe(1);
40 | const answer1 = service.defaultComparator(-4, -5);
41 | expect(answer1).toBe(1);
42 | const answer2 = service.defaultComparator('aaa', 'bbb');
43 | expect(answer).toBe(1);
44 | });
45 |
46 | it('should return -1', () => {
47 | const answer = service.defaultComparator(3, 4);
48 | expect(answer).toBe(-1);
49 | const answer1 = service.defaultComparator(-5, -4);
50 | expect(answer1).toBe(-1);
51 | const answer2 = service.defaultComparator('bbbb', 'aaa');
52 | expect(answer).toBe(-1);
53 | });
54 | });
55 |
56 | describe('getElement', () => {
57 | it('should return key of element', () => {
58 | const item = {
59 | name: 5,
60 | };
61 |
62 | expect(service.getElement(item, (e: any) => e.name)).toBe(5);
63 |
64 | const item2 = {
65 | name: 5,
66 | label: {
67 | test: {
68 | test: {
69 | test: 'name',
70 | },
71 | },
72 | },
73 | };
74 |
75 | expect(service.getElement(item, (e: any) => e.name)).toBe(5);
76 | expect(service.getElement(item2, (e: any) => e.label.test.test.test)).toBe('name');
77 | });
78 | });
79 |
80 | describe('createColumnFromConfigColumn', () => {
81 | it('should create item from string', () => {
82 | const createMock = {
83 | name: 'key',
84 | key: 'key',
85 | func: expect.any(Function),
86 | comp: service.defaultComparator,
87 | sort: null as sortColumn,
88 | resizable: true,
89 | component: false,
90 | draggable: true,
91 | };
92 |
93 | expect(service.createColumnFromConfigColumn('key')).toEqual(createMock);
94 | });
95 |
96 | it('should use `func` for get data', () => {
97 | function getData(item: any) {
98 | return item;
99 | }
100 | const mock2 = {
101 | name: 'Full Name',
102 | key: 'age2',
103 | func: getData,
104 | comp: service.defaultComparator,
105 | sort: null as sortColumn,
106 | resizable: false,
107 | component: {
108 | componentConstructor: InfoComponent,
109 | inputs: {
110 | name: expect.any(Function),
111 | },
112 | },
113 | draggable: true,
114 | };
115 | expect(
116 | service.createColumnFromConfigColumn({
117 | key: 'age2',
118 | name: 'Full Name',
119 | resizable: false,
120 | func: getData,
121 | comp: service.defaultComparator,
122 | component: {
123 | componentConstructor: InfoComponent,
124 | inputs: {
125 | name: (e: any) => e.name,
126 | },
127 | },
128 | }),
129 | ).toEqual(mock2);
130 | });
131 |
132 | it('should create default for `func`', () => {
133 | const mock2 = {
134 | name: 'Full Name',
135 | key: 'age2',
136 | func: expect.any(Function),
137 | comp: service.defaultComparator,
138 | sort: null as sortColumn,
139 | resizable: false,
140 | component: {
141 | componentConstructor: InfoComponent,
142 | inputs: {
143 | name: expect.any(Function),
144 | },
145 | },
146 | draggable: true,
147 | };
148 | expect(
149 | service.createColumnFromConfigColumn({
150 | key: 'age2',
151 | name: 'Full Name',
152 | resizable: false,
153 | func: null,
154 | comp: expect.any(Function),
155 | component: {
156 | componentConstructor: InfoComponent,
157 | inputs: {
158 | name: (e: any) => e.name,
159 | },
160 | },
161 | }),
162 | ).toEqual(mock2);
163 | });
164 |
165 | it('should throw error', () => {
166 | try {
167 | service.createColumnFromConfigColumn({
168 | name: 'Full name',
169 | sort: false,
170 | } as any);
171 | } catch (e) {
172 | expect(e.message).toBe('Column key is required');
173 | }
174 | });
175 |
176 | it('should create item from object', () => {
177 | const mock = {
178 | name: 'Full name',
179 | key: 'name',
180 | func: expect.any(Function),
181 | comp: service.defaultComparator,
182 | sort: false,
183 | resizable: true,
184 | component: false,
185 | draggable: true,
186 | };
187 | expect(
188 | service.createColumnFromConfigColumn({
189 | key: 'name',
190 | name: 'Full name',
191 | sort: false,
192 | }),
193 | ).toEqual(mock);
194 |
195 | const mock2 = {
196 | name: 'Full Name',
197 | key: 'age2',
198 | func: expect.any(Function),
199 | comp: service.defaultComparator,
200 | sort: null as sortColumn,
201 | resizable: false,
202 | component: {
203 | componentConstructor: InfoComponent,
204 | inputs: {
205 | name: expect.any(Function),
206 | },
207 | },
208 | draggable: true,
209 | };
210 | expect(
211 | service.createColumnFromConfigColumn({
212 | key: 'age2',
213 | name: 'Full Name',
214 | resizable: false,
215 | func: service.defaultGetter.bind(null),
216 | comp: service.defaultComparator,
217 | component: {
218 | componentConstructor: InfoComponent,
219 | inputs: {
220 | name: (e: any) => e.name,
221 | },
222 | },
223 | }),
224 | ).toEqual(mock2);
225 |
226 | const mock3 = {
227 | name: 'Full Name',
228 | key: 'age2',
229 | func: expect.any(Function),
230 | comp: service.defaultComparator,
231 | sort: null as sortColumn,
232 | resizable: false,
233 | component: {
234 | componentConstructor: InfoComponent,
235 | inputs: {
236 | name: expect.any(Function),
237 | },
238 | },
239 | draggable: false,
240 | };
241 | expect(
242 | service.createColumnFromConfigColumn({
243 | key: 'age2',
244 | name: 'Full Name',
245 | resizable: false,
246 | draggable: false,
247 | func: service.defaultGetter.bind(null),
248 | comp: service.defaultComparator,
249 | component: {
250 | componentConstructor: InfoComponent,
251 | inputs: {
252 | name: (e: any) => e.name,
253 | },
254 | },
255 | }),
256 | ).toEqual(mock3);
257 |
258 | const mock4 = {
259 | name: 'Full Name',
260 | key: 'age2',
261 | func: expect.any(Function),
262 | comp: service.defaultComparator,
263 | resizable: false,
264 | draggable: false,
265 | sort: false,
266 | component: false,
267 | };
268 | expect(
269 | service.createColumnFromConfigColumn({
270 | key: 'age2',
271 | name: 'Full Name',
272 | resizable: false,
273 | draggable: false,
274 | sort: false,
275 | func: service.defaultGetter.bind(null),
276 | comp: service.defaultComparator,
277 | }),
278 | ).toEqual(mock4);
279 |
280 | const mock5 = {
281 | name: 'age2',
282 | key: 'age2',
283 | func: expect.any(Function),
284 | comp: service.defaultComparator,
285 | resizable: false,
286 | draggable: false,
287 | sort: false,
288 | component: false,
289 | };
290 | expect(
291 | service.createColumnFromConfigColumn({
292 | key: 'age2',
293 | resizable: false,
294 | draggable: false,
295 | sort: false,
296 | func: service.defaultGetter.bind(null),
297 | comp: service.defaultComparator,
298 | }),
299 | ).toEqual(mock5);
300 | });
301 | });
302 |
303 | describe('setSortOnColumnArray', () => {
304 | it('should sort null', () => {
305 | const mock1 = [
306 | {
307 | key: 'key',
308 | sort: null as sortColumn,
309 | },
310 | {
311 | key: 'key2',
312 | sort: null as sortColumn,
313 | },
314 | ];
315 |
316 | expect(service.setSortOnColumnArray('key', mock1)).toEqual([
317 | {
318 | key: 'key',
319 | sort: 'asc',
320 | },
321 | {
322 | key: 'key2',
323 | sort: null as sortColumn,
324 | },
325 | ]);
326 |
327 | const mock2 = [
328 | {
329 | key: 'key',
330 | sort: null as sortColumn,
331 | },
332 | {
333 | key: 'key2',
334 | sort: null as sortColumn,
335 | },
336 | ];
337 |
338 | expect(service.setSortOnColumnArray('key3', mock2)).toEqual([
339 | {
340 | key: 'key',
341 | sort: null,
342 | },
343 | {
344 | key: 'key2',
345 | sort: null as sortColumn,
346 | },
347 | ]);
348 |
349 | const mock3 = [
350 | {
351 | key: 'key',
352 | sort: null as sortColumn,
353 | },
354 | ];
355 |
356 | expect(service.setSortOnColumnArray('key', mock3)).toEqual([
357 | {
358 | key: 'key',
359 | sort: 'asc',
360 | },
361 | ]);
362 | });
363 |
364 | it('should sort asc', () => {
365 | const mock1 = [
366 | {
367 | key: 'key',
368 | sort: 'asc',
369 | },
370 | {
371 | key: 'key2',
372 | sort: null as sortColumn,
373 | },
374 | ];
375 |
376 | expect(service.setSortOnColumnArray('key', mock1 as any)).toEqual([
377 | {
378 | key: 'key',
379 | sort: 'desc',
380 | },
381 | {
382 | key: 'key2',
383 | sort: null as sortColumn,
384 | },
385 | ]);
386 |
387 | const mock2 = [
388 | {
389 | key: 'key',
390 | sort: null as sortColumn,
391 | },
392 | {
393 | key: 'key2',
394 | sort: null as sortColumn,
395 | },
396 | ];
397 |
398 | expect(service.setSortOnColumnArray('key3', mock2)).toEqual([
399 | {
400 | key: 'key',
401 | sort: null,
402 | },
403 | {
404 | key: 'key2',
405 | sort: null as sortColumn,
406 | },
407 | ]);
408 |
409 | const mock3 = [
410 | {
411 | key: 'key',
412 | sort: 'asc' as sortColumn,
413 | },
414 | ];
415 |
416 | expect(service.setSortOnColumnArray('key', mock3)).toEqual([
417 | {
418 | key: 'key',
419 | sort: 'desc',
420 | },
421 | ]);
422 | });
423 |
424 | it('should sort false', () => {
425 | const mock1 = [
426 | {
427 | key: 'key',
428 | sort: false,
429 | },
430 | {
431 | key: 'key2',
432 | sort: false,
433 | },
434 | ];
435 |
436 | expect(service.setSortOnColumnArray('key', mock1 as any)).toEqual([
437 | {
438 | key: 'key',
439 | sort: false,
440 | },
441 | {
442 | key: 'key2',
443 | sort: false,
444 | },
445 | ]);
446 |
447 | const mock3 = [
448 | {
449 | key: 'key',
450 | sort: false as sortColumn,
451 | },
452 | ];
453 |
454 | expect(service.setSortOnColumnArray('key', mock3)).toEqual([
455 | {
456 | key: 'key',
457 | sort: false,
458 | },
459 | ]);
460 | });
461 |
462 | it('should sort desc', () => {
463 | const mock1 = [
464 | {
465 | key: 'key',
466 | sort: 'desc',
467 | },
468 | {
469 | key: 'key2',
470 | sort: null as sortColumn,
471 | },
472 | ];
473 |
474 | expect(service.setSortOnColumnArray('key', mock1 as any)).toEqual([
475 | {
476 | key: 'key',
477 | sort: null as sortColumn,
478 | },
479 | {
480 | key: 'key2',
481 | sort: null as sortColumn,
482 | },
483 | ]);
484 |
485 | const mock2 = [
486 | {
487 | key: 'key',
488 | sort: null as sortColumn,
489 | },
490 | {
491 | key: 'key2',
492 | sort: null as sortColumn,
493 | },
494 | ];
495 |
496 | expect(service.setSortOnColumnArray('key3', mock2)).toEqual([
497 | {
498 | key: 'key',
499 | sort: null,
500 | },
501 | {
502 | key: 'key2',
503 | sort: null as sortColumn,
504 | },
505 | ]);
506 |
507 | const mock3 = [
508 | {
509 | key: 'key',
510 | sort: 'desc' as sortColumn,
511 | },
512 | ];
513 |
514 | expect(service.setSortOnColumnArray('key', mock3)).toEqual([
515 | {
516 | key: 'key',
517 | sort: null,
518 | },
519 | ]);
520 | });
521 | });
522 |
523 | describe('defaultGetter()', () => {
524 | it('should return item.key', () => {
525 | const item = {
526 | key: 'name',
527 | name: 'title',
528 | };
529 |
530 | expect(service.defaultGetter(item, item)).toBe('title');
531 | });
532 | });
533 |
534 | describe('transformDynamicInput', () => {
535 | it('should translate input', () => {
536 | const mock = {};
537 |
538 | const mockItem = {
539 | name: 'title',
540 | label: 'label',
541 | };
542 | expect(service.transformDynamicInput(null, mockItem)).toEqual({});
543 |
544 | expect(service.transformDynamicInput(mock, mockItem)).toEqual({});
545 |
546 | const mock2 = {
547 | title: 5,
548 | };
549 |
550 | expect(service.transformDynamicInput(mock2, mockItem)).toEqual({
551 | title: 5,
552 | });
553 |
554 | const mock3 = {
555 | title: (e: any) => e.label,
556 | };
557 |
558 | expect(service.transformDynamicInput(mock3, mockItem)).toEqual({
559 | title: 'label',
560 | });
561 | });
562 |
563 | describe('createColumnFromArray', () => {
564 | it('should return array of column', () => {
565 | const mock2 = [
566 | {
567 | name: 'Full Name',
568 | key: 'age2',
569 | func: expect.any(Function),
570 | comp: service.defaultComparator,
571 | sort: null as sortColumn,
572 | resizable: false,
573 | component: {
574 | componentConstructor: InfoComponent,
575 | inputs: {
576 | name: expect.any(Function),
577 | },
578 | },
579 | draggable: true,
580 | },
581 | {
582 | name: 'name',
583 | key: 'name',
584 | func: expect.any(Function),
585 | comp: service.defaultComparator,
586 | sort: null as sortColumn,
587 | resizable: true,
588 | component: false,
589 | draggable: true,
590 | },
591 | ];
592 | expect(
593 | service.createColumnFromArray([
594 | {
595 | key: 'age2',
596 | name: 'Full Name',
597 | resizable: false,
598 | func: expect.any(Function),
599 | comp: service.defaultComparator,
600 | component: {
601 | componentConstructor: InfoComponent,
602 | inputs: {
603 | name: (e: any) => e.name,
604 | },
605 | },
606 | },
607 | 'name',
608 | ]),
609 | ).toEqual(mock2);
610 | });
611 | });
612 | });
613 | });
614 |
--------------------------------------------------------------------------------
/lib/src/components/virtual-table.component.ts:
--------------------------------------------------------------------------------
1 | import { CdkDragDrop, CdkDragMove, moveItemInArray } from '@angular/cdk/drag-drop';
2 | import {
3 | ChangeDetectionStrategy,
4 | ChangeDetectorRef,
5 | Component,
6 | ElementRef,
7 | HostBinding,
8 | Input,
9 | OnChanges,
10 | OnDestroy,
11 | SimpleChanges,
12 | ViewChild,
13 | } from '@angular/core';
14 | import { EMPTY, Observable, Observer, Subject, Subscription, combineLatest } from 'rxjs';
15 | import { MatPaginator, PageEvent } from '@angular/material/paginator';
16 | import {
17 | StreamWithEffect,
18 | VirtualPageChange,
19 | VirtualTableColumn,
20 | VirtualTableColumnInternal,
21 | VirtualTableConfig,
22 | VirtualTableEffect,
23 | VirtualTableItem,
24 | VirtualTablePaginator,
25 | } from '../interfaces';
26 | import {
27 | debounceTime,
28 | distinctUntilChanged,
29 | filter,
30 | map,
31 | publishBehavior,
32 | refCount,
33 | startWith,
34 | switchMap,
35 | take,
36 | takeUntil,
37 | tap,
38 | } from 'rxjs/operators';
39 |
40 | import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
41 | import { FormControl } from '@angular/forms';
42 | import { NgVirtualTableService } from '../services/ngVirtualTable.service';
43 |
44 | @Component({
45 | selector: 'ng-virtual-table',
46 | templateUrl: './virtual-table.component.html',
47 | styleUrls: ['./virtual-table.component.scss'],
48 | changeDetection: ChangeDetectionStrategy.OnPush,
49 | })
50 | export class VirtualTableComponent implements OnChanges, OnDestroy {
51 | private _config: VirtualTableConfig;
52 |
53 | private serverSideStrategy = false;
54 |
55 | public showLoading = false;
56 |
57 | public _oldWidth: number;
58 |
59 | private _headerWasSet = false;
60 |
61 | public showFirstLastButtons = false;
62 |
63 | public filterIsOpen = false;
64 |
65 | public paginationPageSize: number;
66 |
67 | public paginationPageOptions: Array;
68 |
69 | public defaultPaginationSetting: VirtualTablePaginator = {
70 | pageSize: 100,
71 | pageSizeOptions: [5, 10, 25, 100],
72 | };
73 |
74 | @Input() itemSize = 25;
75 |
76 | @ViewChild('inputFilterFocus', { static: false }) inputFilterFocus: ElementRef;
77 |
78 | @ViewChild('headerDiv', { static: false }) headerDiv: ElementRef;
79 |
80 | @ViewChild(MatPaginator, { static: false }) paginatorDiv: MatPaginator;
81 |
82 | @ViewChild(CdkVirtualScrollViewport, { static: false }) viewport: CdkVirtualScrollViewport;
83 |
84 | @Input() dataSource: Observable>;
85 |
86 | @Input() filterPlaceholder = 'Filter';
87 |
88 | @Input() dataSetEmptyPlaceholder = 'Data is empty';
89 |
90 | @Input() config: VirtualTableConfig;
91 |
92 | @Input() onRowClick: (item: VirtualTableItem) => void;
93 |
94 | public filterControl: FormControl = new FormControl('');
95 |
96 | public column: Array = [];
97 |
98 | public _dataStream: Observable>;
99 |
100 | private sort$: Subject = new Subject();
101 |
102 | private _destroyed$ = new Subject();
103 |
104 | private effectChanged$ = new Subject();
105 |
106 | @HostBinding('class.with-header') public showHeader = true;
107 |
108 | @HostBinding('class.with-pagination') public showPaginator = false;
109 |
110 | private filter$ = ((this.filterControl && this.filterControl.valueChanges) || EMPTY).pipe(
111 | debounceTime(350),
112 | startWith(null),
113 | tap(v => v && v.length && this.paginatorDiv && this.paginatorDiv.firstPage()),
114 | distinctUntilChanged(),
115 | takeUntil(this._destroyed$),
116 | );
117 |
118 | private _sort$: Observable = this.sort$.asObservable().pipe(takeUntil(this._destroyed$));
119 |
120 | public sliceSize = 0;
121 |
122 | private pageChange$: Subject = new Subject();
123 |
124 | private pageChangeObs$: Observable = this.pageChange$.asObservable().pipe(
125 | startWith(null),
126 | tap(() => this.viewport && this.viewport.scrollToIndex(0)),
127 | takeUntil(this._destroyed$),
128 | );
129 |
130 | private dataSourceSub$: Subscription;
131 |
132 | public dataArray: Array = null;
133 |
134 | constructor(private service: NgVirtualTableService, private cdr: ChangeDetectorRef) {}
135 |
136 | getElement(item: VirtualTableItem, func: (item: VirtualTableItem) => any) {
137 | return this.service.getElement(item, func);
138 | }
139 |
140 | applySort(column: string) {
141 | this.column = this.service.setSortOnColumnArray(column, this.column);
142 | this.sort$.next(column);
143 | }
144 |
145 | headerItemDragStarted() {
146 | (this.headerDiv.nativeElement as HTMLElement).classList.add('cdk-drop-list-dragging');
147 | }
148 |
149 | headerItemDragFinished() {
150 | (this.headerDiv.nativeElement as HTMLElement).classList.remove('cdk-drop-list-dragging');
151 | }
152 |
153 | applyConfig(config: VirtualTableConfig) {
154 | const columnArr = config.column;
155 | this.showLoading = false;
156 | this.showHeader = config.header === false ? false : true;
157 | this.showPaginator = config.pagination ? true : false;
158 | this.serverSideStrategy = config.serverSide === true ? true : false;
159 | this.showFirstLastButtons =
160 | (config && typeof config.pagination === 'object' && config.pagination.showFirstLastButtons) ||
161 | false;
162 | this.paginationPageSize =
163 | (config && typeof config.pagination === 'object' && config.pagination.pageSize) ||
164 | this.defaultPaginationSetting.pageSize;
165 | this.paginationPageOptions =
166 | (config && typeof config.pagination === 'object' && config.pagination.pageSizeOptions) ||
167 | this.defaultPaginationSetting.pageSizeOptions;
168 | if (Array.isArray(columnArr)) {
169 | this.column = this.createColumnFromArray(columnArr);
170 | }
171 | if (this.showPaginator && this.paginatorDiv) {
172 | this.paginatorDiv.firstPage();
173 | }
174 | this.pageChange$.next({
175 | pageIndex: 0,
176 | pageSize: this.paginationPageSize,
177 | });
178 | this.cdr.detectChanges();
179 | }
180 |
181 | applyDatasource(obs: Observable>) {
182 | if (this.dataSourceSub$) {
183 | this.dataSourceSub$.unsubscribe();
184 | }
185 | this.dataArray = null;
186 | this._dataStream = combineLatest(
187 | obs,
188 | this._sort$.pipe(startWith(this._sortAfterConfigWasSet())),
189 | this.filter$,
190 | this.pageChangeObs$.pipe(
191 | map(e => ({
192 | pageSize: (e && e.pageSize) || this.paginationPageSize,
193 | pageIndex: (e && e.pageIndex) || 0,
194 | })),
195 | ),
196 | ).pipe(
197 | map(([stream, sort, filterStr, pageChange]) => {
198 | const effect = this.createEffect(sort, filterStr, pageChange);
199 | this.effectChanged$.next();
200 | return {
201 | stream,
202 | effects: effect,
203 | };
204 | }),
205 | switchMap(streamWithEffect => {
206 | if (this.serverSideStrategy) {
207 | return this.serverSideStrategyObs(streamWithEffect);
208 | }
209 | return this.clientSideStrategyObs(streamWithEffect);
210 | }),
211 | publishBehavior([]),
212 | refCount(),
213 | takeUntil(this._destroyed$),
214 | );
215 |
216 | obs
217 | .pipe(
218 | filter(() => !this._headerWasSet && (!this._config || !this._config.column)),
219 | take(1),
220 | takeUntil(this._destroyed$),
221 | )
222 | .subscribe((stream: Array) => {
223 | const setOfColumn = new Set();
224 | stream.forEach(e => Object.keys(e).forEach(key => setOfColumn.add(key)));
225 | const autoColumnArray = Array.from(setOfColumn) as any;
226 | this.column = this.createColumnFromArray(autoColumnArray);
227 | this.cdr.detectChanges();
228 | });
229 |
230 | this.dataSourceSub$ = this._dataStream.pipe(takeUntil(this._destroyed$)).subscribe(stream => {
231 | if (this.dataArray === null) {
232 | if (this.showHeader) {
233 | this.columnResizeAction();
234 | }
235 | }
236 | this.dataArray = stream;
237 | this.cdr.detectChanges();
238 | });
239 | }
240 |
241 | ngOnChanges(changes: SimpleChanges) {
242 | if ('config' in changes) {
243 | this._config = changes.config.currentValue as VirtualTableConfig;
244 | this.applyConfig(this._config);
245 | }
246 |
247 | if (this.serverSideStrategy) {
248 | this.applyDatasource(
249 | EMPTY.pipe(
250 | startWith([]),
251 | takeUntil(this._destroyed$),
252 | ),
253 | );
254 | return;
255 | }
256 |
257 | if ('dataSource' in changes) {
258 | const newDataSource = changes.dataSource.currentValue as Observable>;
259 | this.applyDatasource(newDataSource.pipe(takeUntil(this._destroyed$)));
260 | }
261 | }
262 |
263 | private serverSideStrategyObs(
264 | streamWithEffect: StreamWithEffect,
265 | ): Observable> {
266 | this.showLoading = true;
267 | if (!this._config.serverSideResolver) {
268 | throw new Error('You use serverSide, serverSideResolver must be exist!');
269 | }
270 | const obs = this._config.serverSideResolver(streamWithEffect.effects);
271 | return obs.pipe(
272 | tap(response => {
273 | this.showLoading = false;
274 | this.sliceSize = response.totalSize;
275 | }),
276 | map(response => response.stream),
277 | takeUntil(this.effectChanged$),
278 | );
279 | }
280 |
281 | private clientSideStrategyObs(
282 | streamWithEffect: StreamWithEffect,
283 | ): Observable> {
284 | const obs = new Observable((observer: Observer) => {
285 | observer.next(streamWithEffect);
286 | observer.complete();
287 | }).pipe(
288 | map(streamWithEffects => this.sortingStream(streamWithEffects)),
289 | map(streamWithEffects => this.filterStream(streamWithEffects)),
290 | tap(streamWithEffects => (this.sliceSize = streamWithEffects.stream.length)),
291 | map(streamWithEffects => this.applyPagination(streamWithEffects)),
292 | map(streamWithEffects => streamWithEffects.stream),
293 | );
294 |
295 | return obs;
296 | }
297 |
298 | private createEffect(
299 | sort: string,
300 | filterStr: string,
301 | pageChange: VirtualPageChange,
302 | ): VirtualTableEffect {
303 | let sortEffect;
304 | let pagginationEffect;
305 | const columForSort = this.column.find(e => e.key === sort);
306 | if (!this.showPaginator) {
307 | pagginationEffect = undefined;
308 | } else {
309 | pagginationEffect = pageChange;
310 | }
311 | if (!columForSort) {
312 | sortEffect = undefined;
313 | } else {
314 | sortEffect = {
315 | sortColumn: sort,
316 | sortType: columForSort.sort,
317 | };
318 | }
319 | return {
320 | filter: filterStr,
321 | sort: sortEffect,
322 | pagination: pagginationEffect,
323 | };
324 | }
325 |
326 | public sortingStream(streamWithEffect: StreamWithEffect): StreamWithEffect {
327 | const sliceStream = streamWithEffect.stream.slice();
328 | const sort = streamWithEffect.effects && streamWithEffect.effects.sort;
329 | if (!sort) {
330 | return {
331 | stream: sliceStream,
332 | effects: streamWithEffect.effects,
333 | };
334 | }
335 |
336 | const sortColumn = this.column.find(e => e.key === sort.sortColumn);
337 |
338 | if (!sortColumn) {
339 | return {
340 | stream: sliceStream,
341 | effects: streamWithEffect.effects,
342 | };
343 | }
344 |
345 | if (!sort.sortType) {
346 | return {
347 | stream: sliceStream,
348 | effects: streamWithEffect.effects,
349 | };
350 | }
351 |
352 | if (sort.sortType === 'asc') {
353 | sliceStream.sort((a, b) =>
354 | sortColumn.comp(
355 | this.service.getElement(a, sortColumn.func),
356 | this.service.getElement(b, sortColumn.func),
357 | ),
358 | );
359 | } else {
360 | sliceStream.sort(
361 | (a, b) =>
362 | -sortColumn.comp(
363 | this.service.getElement(a, sortColumn.func),
364 | this.service.getElement(b, sortColumn.func),
365 | ),
366 | );
367 | }
368 |
369 | return {
370 | stream: sliceStream,
371 | effects: streamWithEffect.effects,
372 | };
373 | }
374 |
375 | public filterStream(streamWithEffect: StreamWithEffect): StreamWithEffect {
376 | const stream = streamWithEffect.stream;
377 | const filterStr = streamWithEffect.effects && streamWithEffect.effects.filter;
378 | if (!filterStr || !(this.config && this.config.filter)) {
379 | return {
380 | stream,
381 | effects: streamWithEffect.effects,
382 | };
383 | }
384 | const filterString = filterStr.toLocaleLowerCase();
385 |
386 | const filterSliceStream = stream.filter((item: VirtualTableItem) =>
387 | this.column.some(
388 | e =>
389 | this.service
390 | .getElement(item, e.func)
391 | .toString()
392 | .toLocaleLowerCase()
393 | .indexOf(filterString) > -1,
394 | ),
395 | );
396 | return {
397 | stream: filterSliceStream,
398 | effects: streamWithEffect.effects,
399 | };
400 | }
401 |
402 | public applyPagination(streamWithEffect: StreamWithEffect): StreamWithEffect {
403 | const stream = streamWithEffect.stream;
404 | const pagination = streamWithEffect.effects && streamWithEffect.effects.pagination;
405 | if (!pagination) {
406 | return {
407 | stream: stream.slice(),
408 | effects: streamWithEffect.effects,
409 | };
410 | }
411 | const pageSize = pagination.pageSize || this.defaultPaginationSetting.pageSize;
412 | const pageIndex = pagination.pageIndex;
413 | const sliceStream = stream.slice(
414 | pageSize * pageIndex,
415 | pageSize * (pageIndex + 1) > stream.length ? stream.length : pageSize * (pageIndex + 1),
416 | );
417 | return {
418 | stream: sliceStream,
419 | effects: streamWithEffect.effects,
420 | };
421 | }
422 |
423 | public _sortAfterConfigWasSet() {
424 | const columnPreSort = this.column.find(e => e.sort && e.sort !== null);
425 | if (columnPreSort) {
426 | return columnPreSort.key;
427 | }
428 | return null;
429 | }
430 |
431 | createColumnFromArray(
432 | arr: Array,
433 | ): Array {
434 | const columnArr = this.service.createColumnFromArray(arr);
435 | const set = new Set();
436 | columnArr.forEach(column => {
437 | if (set.has(column.key)) {
438 | throw Error(`Column key=${column.key} already declare`);
439 | } else {
440 | set.add(column.key);
441 | }
442 | });
443 | this._headerWasSet = true;
444 | return columnArr;
445 | }
446 |
447 | ngOnDestroy() {
448 | this._destroyed$.next();
449 | if (this.dataSourceSub$) {
450 | this.dataSourceSub$.unsubscribe();
451 | }
452 | }
453 |
454 | clickItem(item: VirtualTableItem) {
455 | if (typeof this.onRowClick === 'function') {
456 | this.onRowClick(item);
457 | } else {
458 | return false;
459 | }
460 | }
461 |
462 | resizeStart(column: VirtualTableColumnInternal, index: number) {
463 | column.activeResize = true;
464 | if (!column.width) {
465 | column.width = this.headerDiv.nativeElement.children[index].getBoundingClientRect().width;
466 | }
467 | }
468 |
469 | resizeEnd(column: VirtualTableColumnInternal, grabberReset = false, grabber?: HTMLElement) {
470 | column.activeResize = false;
471 | this._oldWidth = null;
472 | this.columnResizeAction();
473 | if (grabberReset) {
474 | grabber.style.transform = 'none';
475 | }
476 | }
477 |
478 | resizingEvent(event: CdkDragMove, column: VirtualTableColumnInternal) {
479 | const targetLeft = event.pointerPosition.x;
480 | const grabber = event.source.element.nativeElement as HTMLElement;
481 | const grabberSize = grabber.getBoundingClientRect().width;
482 | if (!this._oldWidth) {
483 | this._oldWidth = targetLeft;
484 | }
485 | const newWidth = column.width + (targetLeft - this._oldWidth);
486 | if (
487 | column.width + (targetLeft - this._oldWidth) <=
488 | this.headerDiv.nativeElement.getBoundingClientRect().width ||
489 | grabberSize * 3 > newWidth
490 | ) {
491 | column.width = newWidth;
492 | this._oldWidth = targetLeft;
493 | } else {
494 | this.resizeEnd(column, true, grabber);
495 | }
496 | }
497 |
498 | private columnResizeAction() {
499 | const parent = this.headerDiv.nativeElement;
500 | let i = 0;
501 | while (i < this.column.length) {
502 | this.column[i].width = parent.children[i].getBoundingClientRect().width;
503 | i += 1;
504 | }
505 | }
506 |
507 | toggleFilter() {
508 | this.filterIsOpen = !this.filterIsOpen;
509 | if (this.filterIsOpen) {
510 | setTimeout(() => {
511 | this.inputFilterFocus.nativeElement.focus();
512 | });
513 | }
514 | this.filterControl.setValue('', { emitEvent: !this.filterIsOpen });
515 | }
516 |
517 | dropColumn(event: CdkDragDrop) {
518 | moveItemInArray(this.column, event.previousIndex, event.currentIndex);
519 | }
520 |
521 | transformDynamicInput(input: Object, item: VirtualTableItem) {
522 | return this.service.transformDynamicInput(input, item);
523 | }
524 |
525 | onPageChange(event: PageEvent) {
526 | this.paginationPageSize = event.pageSize;
527 | this.pageChange$.next({
528 | pageIndex: event.pageIndex,
529 | pageSize: event.pageSize,
530 | });
531 | }
532 | }
533 |
--------------------------------------------------------------------------------
/docs/3rdpartylicenses.txt:
--------------------------------------------------------------------------------
1 | tslib
2 | Apache-2.0
3 | Apache License
4 |
5 | Version 2.0, January 2004
6 |
7 | http://www.apache.org/licenses/
8 |
9 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10 |
11 | 1. Definitions.
12 |
13 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
14 |
15 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
16 |
17 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
18 |
19 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
20 |
21 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
22 |
23 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
24 |
25 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
26 |
27 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
28 |
29 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
30 |
31 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
32 |
33 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
34 |
35 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
36 |
37 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
38 |
39 | You must give any other recipients of the Work or Derivative Works a copy of this License; and
40 |
41 | You must cause any modified files to carry prominent notices stating that You changed the files; and
42 |
43 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
44 |
45 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46 |
47 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
48 |
49 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
50 |
51 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
52 |
53 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
54 |
55 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
56 |
57 | END OF TERMS AND CONDITIONS
58 |
59 |
60 | rxjs
61 | Apache-2.0
62 | Apache License
63 | Version 2.0, January 2004
64 | http://www.apache.org/licenses/
65 |
66 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
67 |
68 | 1. Definitions.
69 |
70 | "License" shall mean the terms and conditions for use, reproduction,
71 | and distribution as defined by Sections 1 through 9 of this document.
72 |
73 | "Licensor" shall mean the copyright owner or entity authorized by
74 | the copyright owner that is granting the License.
75 |
76 | "Legal Entity" shall mean the union of the acting entity and all
77 | other entities that control, are controlled by, or are under common
78 | control with that entity. For the purposes of this definition,
79 | "control" means (i) the power, direct or indirect, to cause the
80 | direction or management of such entity, whether by contract or
81 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
82 | outstanding shares, or (iii) beneficial ownership of such entity.
83 |
84 | "You" (or "Your") shall mean an individual or Legal Entity
85 | exercising permissions granted by this License.
86 |
87 | "Source" form shall mean the preferred form for making modifications,
88 | including but not limited to software source code, documentation
89 | source, and configuration files.
90 |
91 | "Object" form shall mean any form resulting from mechanical
92 | transformation or translation of a Source form, including but
93 | not limited to compiled object code, generated documentation,
94 | and conversions to other media types.
95 |
96 | "Work" shall mean the work of authorship, whether in Source or
97 | Object form, made available under the License, as indicated by a
98 | copyright notice that is included in or attached to the work
99 | (an example is provided in the Appendix below).
100 |
101 | "Derivative Works" shall mean any work, whether in Source or Object
102 | form, that is based on (or derived from) the Work and for which the
103 | editorial revisions, annotations, elaborations, or other modifications
104 | represent, as a whole, an original work of authorship. For the purposes
105 | of this License, Derivative Works shall not include works that remain
106 | separable from, or merely link (or bind by name) to the interfaces of,
107 | the Work and Derivative Works thereof.
108 |
109 | "Contribution" shall mean any work of authorship, including
110 | the original version of the Work and any modifications or additions
111 | to that Work or Derivative Works thereof, that is intentionally
112 | submitted to Licensor for inclusion in the Work by the copyright owner
113 | or by an individual or Legal Entity authorized to submit on behalf of
114 | the copyright owner. For the purposes of this definition, "submitted"
115 | means any form of electronic, verbal, or written communication sent
116 | to the Licensor or its representatives, including but not limited to
117 | communication on electronic mailing lists, source code control systems,
118 | and issue tracking systems that are managed by, or on behalf of, the
119 | Licensor for the purpose of discussing and improving the Work, but
120 | excluding communication that is conspicuously marked or otherwise
121 | designated in writing by the copyright owner as "Not a Contribution."
122 |
123 | "Contributor" shall mean Licensor and any individual or Legal Entity
124 | on behalf of whom a Contribution has been received by Licensor and
125 | subsequently incorporated within the Work.
126 |
127 | 2. Grant of Copyright License. Subject to the terms and conditions of
128 | this License, each Contributor hereby grants to You a perpetual,
129 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
130 | copyright license to reproduce, prepare Derivative Works of,
131 | publicly display, publicly perform, sublicense, and distribute the
132 | Work and such Derivative Works in Source or Object form.
133 |
134 | 3. Grant of Patent License. Subject to the terms and conditions of
135 | this License, each Contributor hereby grants to You a perpetual,
136 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
137 | (except as stated in this section) patent license to make, have made,
138 | use, offer to sell, sell, import, and otherwise transfer the Work,
139 | where such license applies only to those patent claims licensable
140 | by such Contributor that are necessarily infringed by their
141 | Contribution(s) alone or by combination of their Contribution(s)
142 | with the Work to which such Contribution(s) was submitted. If You
143 | institute patent litigation against any entity (including a
144 | cross-claim or counterclaim in a lawsuit) alleging that the Work
145 | or a Contribution incorporated within the Work constitutes direct
146 | or contributory patent infringement, then any patent licenses
147 | granted to You under this License for that Work shall terminate
148 | as of the date such litigation is filed.
149 |
150 | 4. Redistribution. You may reproduce and distribute copies of the
151 | Work or Derivative Works thereof in any medium, with or without
152 | modifications, and in Source or Object form, provided that You
153 | meet the following conditions:
154 |
155 | (a) You must give any other recipients of the Work or
156 | Derivative Works a copy of this License; and
157 |
158 | (b) You must cause any modified files to carry prominent notices
159 | stating that You changed the files; and
160 |
161 | (c) You must retain, in the Source form of any Derivative Works
162 | that You distribute, all copyright, patent, trademark, and
163 | attribution notices from the Source form of the Work,
164 | excluding those notices that do not pertain to any part of
165 | the Derivative Works; and
166 |
167 | (d) If the Work includes a "NOTICE" text file as part of its
168 | distribution, then any Derivative Works that You distribute must
169 | include a readable copy of the attribution notices contained
170 | within such NOTICE file, excluding those notices that do not
171 | pertain to any part of the Derivative Works, in at least one
172 | of the following places: within a NOTICE text file distributed
173 | as part of the Derivative Works; within the Source form or
174 | documentation, if provided along with the Derivative Works; or,
175 | within a display generated by the Derivative Works, if and
176 | wherever such third-party notices normally appear. The contents
177 | of the NOTICE file are for informational purposes only and
178 | do not modify the License. You may add Your own attribution
179 | notices within Derivative Works that You distribute, alongside
180 | or as an addendum to the NOTICE text from the Work, provided
181 | that such additional attribution notices cannot be construed
182 | as modifying the License.
183 |
184 | You may add Your own copyright statement to Your modifications and
185 | may provide additional or different license terms and conditions
186 | for use, reproduction, or distribution of Your modifications, or
187 | for any such Derivative Works as a whole, provided Your use,
188 | reproduction, and distribution of the Work otherwise complies with
189 | the conditions stated in this License.
190 |
191 | 5. Submission of Contributions. Unless You explicitly state otherwise,
192 | any Contribution intentionally submitted for inclusion in the Work
193 | by You to the Licensor shall be under the terms and conditions of
194 | this License, without any additional terms or conditions.
195 | Notwithstanding the above, nothing herein shall supersede or modify
196 | the terms of any separate license agreement you may have executed
197 | with Licensor regarding such Contributions.
198 |
199 | 6. Trademarks. This License does not grant permission to use the trade
200 | names, trademarks, service marks, or product names of the Licensor,
201 | except as required for reasonable and customary use in describing the
202 | origin of the Work and reproducing the content of the NOTICE file.
203 |
204 | 7. Disclaimer of Warranty. Unless required by applicable law or
205 | agreed to in writing, Licensor provides the Work (and each
206 | Contributor provides its Contributions) on an "AS IS" BASIS,
207 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
208 | implied, including, without limitation, any warranties or conditions
209 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
210 | PARTICULAR PURPOSE. You are solely responsible for determining the
211 | appropriateness of using or redistributing the Work and assume any
212 | risks associated with Your exercise of permissions under this License.
213 |
214 | 8. Limitation of Liability. In no event and under no legal theory,
215 | whether in tort (including negligence), contract, or otherwise,
216 | unless required by applicable law (such as deliberate and grossly
217 | negligent acts) or agreed to in writing, shall any Contributor be
218 | liable to You for damages, including any direct, indirect, special,
219 | incidental, or consequential damages of any character arising as a
220 | result of this License or out of the use or inability to use the
221 | Work (including but not limited to damages for loss of goodwill,
222 | work stoppage, computer failure or malfunction, or any and all
223 | other commercial damages or losses), even if such Contributor
224 | has been advised of the possibility of such damages.
225 |
226 | 9. Accepting Warranty or Additional Liability. While redistributing
227 | the Work or Derivative Works thereof, You may choose to offer,
228 | and charge a fee for, acceptance of support, warranty, indemnity,
229 | or other liability obligations and/or rights consistent with this
230 | License. However, in accepting such obligations, You may act only
231 | on Your own behalf and on Your sole responsibility, not on behalf
232 | of any other Contributor, and only if You agree to indemnify,
233 | defend, and hold each Contributor harmless for any liability
234 | incurred by, or claims asserted against, such Contributor by reason
235 | of your accepting any such warranty or additional liability.
236 |
237 | END OF TERMS AND CONDITIONS
238 |
239 | APPENDIX: How to apply the Apache License to your work.
240 |
241 | To apply the Apache License to your work, attach the following
242 | boilerplate notice, with the fields enclosed by brackets "[]"
243 | replaced with your own identifying information. (Don't include
244 | the brackets!) The text should be enclosed in the appropriate
245 | comment syntax for the file format. We also recommend that a
246 | file or class name and description of purpose be included on the
247 | same "printed page" as the copyright notice for easier
248 | identification within third-party archives.
249 |
250 | Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
251 |
252 | Licensed under the Apache License, Version 2.0 (the "License");
253 | you may not use this file except in compliance with the License.
254 | You may obtain a copy of the License at
255 |
256 | http://www.apache.org/licenses/LICENSE-2.0
257 |
258 | Unless required by applicable law or agreed to in writing, software
259 | distributed under the License is distributed on an "AS IS" BASIS,
260 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
261 | See the License for the specific language governing permissions and
262 | limitations under the License.
263 |
264 |
265 |
266 | @angular/compiler
267 | MIT
268 |
269 | @angular/core
270 | MIT
271 |
272 | @angular/animations
273 | MIT
274 |
275 | @angular/cdk
276 | MIT
277 | The MIT License
278 |
279 | Copyright (c) 2018 Google LLC.
280 |
281 | Permission is hereby granted, free of charge, to any person obtaining a copy
282 | of this software and associated documentation files (the "Software"), to deal
283 | in the Software without restriction, including without limitation the rights
284 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
285 | copies of the Software, and to permit persons to whom the Software is
286 | furnished to do so, subject to the following conditions:
287 |
288 | The above copyright notice and this permission notice shall be included in
289 | all copies or substantial portions of the Software.
290 |
291 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
292 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
293 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
294 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
295 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
296 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
297 | THE SOFTWARE.
298 |
299 |
300 | @angular/common
301 | MIT
302 |
303 | @angular/material
304 | MIT
305 | The MIT License
306 |
307 | Copyright (c) 2018 Google LLC.
308 |
309 | Permission is hereby granted, free of charge, to any person obtaining a copy
310 | of this software and associated documentation files (the "Software"), to deal
311 | in the Software without restriction, including without limitation the rights
312 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
313 | copies of the Software, and to permit persons to whom the Software is
314 | furnished to do so, subject to the following conditions:
315 |
316 | The above copyright notice and this permission notice shall be included in
317 | all copies or substantial portions of the Software.
318 |
319 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
320 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
321 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
322 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
323 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
324 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
325 | THE SOFTWARE.
326 |
327 |
328 | @angular/platform-browser
329 | MIT
330 |
331 | @angular/material/tooltip
332 |
333 | @angular/forms
334 | MIT
335 |
336 | ng-virtual-table
337 | MIT
338 | MIT License
339 |
340 | Copyright (c) 2018 Iurii Panarin
341 |
342 | Permission is hereby granted, free of charge, to any person obtaining a copy
343 | of this software and associated documentation files (the "Software"), to deal
344 | in the Software without restriction, including without limitation the rights
345 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
346 | copies of the Software, and to permit persons to whom the Software is
347 | furnished to do so, subject to the following conditions:
348 |
349 | The above copyright notice and this permission notice shall be included in all
350 | copies or substantial portions of the Software.
351 |
352 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
353 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
354 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
355 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
356 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
357 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
358 | SOFTWARE.
359 |
360 |
361 | ng-dynamic-component
362 | MIT
363 | MIT License
364 |
365 | Copyright (c) 2016 Alex Malkevich
366 |
367 | Permission is hereby granted, free of charge, to any person obtaining a copy
368 | of this software and associated documentation files (the "Software"), to deal
369 | in the Software without restriction, including without limitation the rights
370 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
371 | copies of the Software, and to permit persons to whom the Software is
372 | furnished to do so, subject to the following conditions:
373 |
374 | The above copyright notice and this permission notice shall be included in all
375 | copies or substantial portions of the Software.
376 |
377 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
378 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
379 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
380 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
381 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
382 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
383 | SOFTWARE.
384 |
385 |
386 | @angular/material/icon
387 |
388 | @angular/material/progress-spinner
389 |
390 | @angular/cdk/scrolling
391 |
392 | @angular/material/core
393 |
394 | @angular/material/form-field
395 |
396 | @angular/material/select
397 |
398 | @angular/material/button
399 |
400 | @angular/material/paginator
401 |
402 | zone.js
403 | MIT
404 | The MIT License
405 |
406 | Copyright (c) 2016-2018 Google, Inc.
407 |
408 | Permission is hereby granted, free of charge, to any person obtaining a copy
409 | of this software and associated documentation files (the "Software"), to deal
410 | in the Software without restriction, including without limitation the rights
411 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
412 | copies of the Software, and to permit persons to whom the Software is
413 | furnished to do so, subject to the following conditions:
414 |
415 | The above copyright notice and this permission notice shall be included in
416 | all copies or substantial portions of the Software.
417 |
418 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
419 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
420 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
421 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
422 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
423 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
424 | THE SOFTWARE.
425 |
--------------------------------------------------------------------------------
/docs/polyfills.c6871e56cb80756a5498.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"0TWp":function(e,t,n){!function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}if(n("Zone"),e.Zone)throw new Error("Zone already loaded.");var o,a=function(){function t(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==D.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return z.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return O},enumerable:!0,configurable:!0}),t.__load_patch=function(o,a){if(D.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var i="Zone:"+o;n(i),D[o]=a(e,t,Z),r(i,i)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{z=z.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state!==y||e.type!==S){var r=e.state!=_;r&&e._transitionTo(_,m),e.runCount++;var o=O;O=e,z={parent:z,zone:this};try{e.type==E&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{e.state!==y&&e.state!==T&&(e.type==S||e.data&&e.data.isPeriodic?r&&e._transitionTo(m,_):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(y,_,y))),z=z.parent,O=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(k,y);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(T,k,y),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==k&&e._transitionTo(m,k),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new c(w,e,t,n,r,null))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new c(E,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new c(S,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(b,m,_);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(T,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,b),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),c=function(){function t(n,r,o,a,i,s){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=s,this.callback=o;var c=this;this.invoke=n===S&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),P++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==P&&v(),P--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(y,k)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==y&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),u=C("setTimeout"),l=C("Promise"),p=C("then"),f=[],h=!1;function d(t){0===P&&0===f.length&&(o||e[l]&&(o=e[l].resolve(0)),o?o[p](v):e[u](v,0)),t&&f.push(t)}function v(){if(!h){for(h=!0;f.length;){var e=f;f=[];for(var t=0;t=0;n--)"function"==typeof e[n]&&(e[n]=f(e[n],t+"_"+n));return e}function b(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,w=!("nw"in y)&&void 0!==y.process&&"[object process]"==={}.toString.call(y.process),E=!w&&!T&&!(!v||!g.HTMLElement),S=void 0!==y.process&&"[object process]"==={}.toString.call(y.process)&&!T&&!(!v||!g.HTMLElement),D={},Z=function(e){if(e=e||y.event){var t=D[e.type];t||(t=D[e.type]=d("ON_PROPERTY"+e.type));var n=(this||e.target||y)[t],r=n&&n.apply(this,arguments);return null==r||r||e.preventDefault(),r}};function z(n,r,o){var a=e(n,r);if(!a&&o&&e(o,r)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){delete a.writable,delete a.value;var i=a.get,s=a.set,c=r.substr(2),u=D[c];u||(u=D[c]=d("ON_PROPERTY"+c)),a.set=function(e){var t=this;t||n!==y||(t=y),t&&(t[u]&&t.removeEventListener(c,Z),s&&s.apply(t,m),"function"==typeof e?(t[u]=e,t.addEventListener(c,Z,!1)):t[u]=null)},a.get=function(){var e=this;if(e||n!==y||(e=y),!e)return null;var t=e[u];if(t)return t;if(i){var o=i&&i.call(this);if(o)return a.set.call(this,o),"function"==typeof e[k]&&e.removeAttribute(r),o}return null},t(n,r,a)}}function O(e,t,n){if(t)for(var r=0;r1?new s(t,n):new s(t),p=e(l,"onmessage");return p&&!1===p.configurable?(c=r(l),u=l,[a,i,"send","close"].forEach(function(e){c[e]=function(){var t=o.call(arguments);if(e===a||e===i){var n=t.length>0?t[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);l[r]=c[r]}}return l[e].apply(l,t)}})):c=l,O(c,["close","error","message","open"],u),c};var c=n.WebSocket;for(var u in s)c[u]=s[u]}(0,c)}}var pe=d("unbound");Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=O,n.patchMethod=C,n.bindArguments=_}),Zone.__load_patch("timers",function(e){X(e,"set","clear","Timeout"),X(e,"set","clear","Interval"),X(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e){X(e,"request","cancel","AnimationFrame"),X(e,"mozRequest","mozCancel","AnimationFrame"),X(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t){for(var n=["alert","prompt","confirm"],r=0;r=0&&"function"==typeof n[r.cbIdx]?h(r.name,n[r.cbIdx],r,a,null):e.apply(t,n)}})}()}),Zone.__load_patch("XHR",function(e,t){!function(t){var u=XMLHttpRequest.prototype,l=u[s],p=u[c];if(!l){var f=e.XMLHttpRequestEventTarget;if(f){var d=f.prototype;l=d[s],p=d[c]}}var v="readystatechange",g="scheduled";function y(e){XMLHttpRequest[a]=!1;var t=e.data,r=t.target,i=r[o];l||(l=r[s],p=r[c]),i&&p.call(r,v,i);var u=r[o]=function(){r.readyState===r.DONE&&!t.aborted&&XMLHttpRequest[a]&&e.state===g&&e.invoke()};return l.call(r,v,u),r[n]||(r[n]=e),b.apply(r,t.args),XMLHttpRequest[a]=!0,e}function k(){}function m(e){var t=e.data;return t.aborted=!0,T.apply(t.target,t.args)}var _=C(u,"open",function(){return function(e,t){return e[r]=0==t[2],e[i]=t[1],_.apply(e,t)}}),b=C(u,"send",function(){return function(e,t){return e[r]?b.apply(e,t):h("XMLHttpRequest.send",k,{target:e,url:e[i],isPeriodic:!1,delay:null,args:t,aborted:!1},y,m)}}),T=C(u,"abort",function(){return function(e){var t=e[n];if(t&&"string"==typeof t.type){if(null==t.cancelFn||t.data&&t.data.aborted)return;t.zone.cancelTask(t)}}})}();var n=d("xhrTask"),r=d("xhrSync"),o=d("xhrListener"),a=d("xhrScheduled"),i=d("xhrURL")}),Zone.__load_patch("geolocation",function(t){t.navigator&&t.navigator.geolocation&&function(t,n){for(var r=t.constructor.name,o=function(o){var a=n[o],i=t[a];if(i){if(!b(e(t,a)))return"continue";t[a]=function(e){var t=function(){return e.apply(this,_(arguments,r+"."+a))};return I(t,e),t}(i)}},a=0;a.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){color:rgba(0,0,0,.38)}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:rgba(0,0,0,.04)}.mat-calendar-body-today:not(.mat-calendar-body-selected){border-color:rgba(0,0,0,.38)}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected){border-color:rgba(0,0,0,.18)}.mat-calendar-body-selected{background-color:#673ab7;color:#fff}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:rgba(103,58,183,.4)}.mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-datepicker-content{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);background-color:#fff;color:rgba(0,0,0,.87)}.mat-datepicker-content.mat-accent .mat-calendar-body-selected{background-color:#ffd740;color:rgba(0,0,0,.87)}.mat-datepicker-content.mat-accent .mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:rgba(255,215,64,.4)}.mat-datepicker-content.mat-accent .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px rgba(0,0,0,.87)}.mat-datepicker-content.mat-warn .mat-calendar-body-selected{background-color:#f44336;color:#fff}.mat-datepicker-content.mat-warn .mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:rgba(244,67,54,.4)}.mat-datepicker-content.mat-warn .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-datepicker-content-touch{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-datepicker-toggle-active{color:#673ab7}.mat-datepicker-toggle-active.mat-accent{color:#ffd740}.mat-datepicker-toggle-active.mat-warn{color:#f44336}.mat-dialog-container{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background:#fff;color:rgba(0,0,0,.87)}.mat-divider{border-top-color:rgba(0,0,0,.12)}.mat-divider-vertical{border-right-color:rgba(0,0,0,.12)}.mat-expansion-panel{background:#fff;color:rgba(0,0,0,.87)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-action-row{border-top-color:rgba(0,0,0,.12)}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused,.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:rgba(0,0,0,.04)}@media (hover:none){.mat-expansion-panel:not(.mat-expanded):not([aria-disabled=true]) .mat-expansion-panel-header:hover{background:#fff}}.mat-expansion-panel-header-title{color:rgba(0,0,0,.87)}.mat-expansion-indicator::after,.mat-expansion-panel-header-description{color:rgba(0,0,0,.54)}.mat-expansion-panel-header[aria-disabled=true]{color:rgba(0,0,0,.26)}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title{color:inherit}.mat-form-field-label,.mat-hint{color:rgba(0,0,0,.6)}.mat-form-field.mat-focused .mat-form-field-label{color:#673ab7}.mat-form-field.mat-focused .mat-form-field-label.mat-accent{color:#ffd740}.mat-form-field.mat-focused .mat-form-field-label.mat-warn{color:#f44336}.mat-focused .mat-form-field-required-marker{color:#ffd740}.mat-form-field-ripple{background-color:rgba(0,0,0,.87)}.mat-form-field.mat-focused .mat-form-field-ripple{background-color:#673ab7}.mat-form-field.mat-focused .mat-form-field-ripple.mat-accent{background-color:#ffd740}.mat-form-field.mat-focused .mat-form-field-ripple.mat-warn{background-color:#f44336}.mat-form-field.mat-form-field-invalid .mat-form-field-label,.mat-form-field.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker,.mat-form-field.mat-form-field-invalid .mat-form-field-label.mat-accent{color:#f44336}.mat-form-field.mat-form-field-invalid .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple.mat-accent{background-color:#f44336}.mat-error{color:#f44336}.mat-form-field-appearance-legacy .mat-form-field-label,.mat-form-field-appearance-legacy .mat-hint{color:rgba(0,0,0,.54)}.mat-form-field-appearance-legacy .mat-form-field-underline{bottom:1.25em;background-color:rgba(0,0,0,.42)}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-image:linear-gradient(to right,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x}.mat-form-field-appearance-standard .mat-form-field-underline{background-color:rgba(0,0,0,.42)}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-image:linear-gradient(to right,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x}.mat-form-field-appearance-fill .mat-form-field-flex{background-color:rgba(0,0,0,.04)}.mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-flex{background-color:rgba(0,0,0,.02)}.mat-form-field-appearance-fill .mat-form-field-underline::before{background-color:rgba(0,0,0,.42)}.mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-label{color:rgba(0,0,0,.38)}.mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-underline::before{background-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline{color:rgba(0,0,0,.12)}.mat-form-field-appearance-outline .mat-form-field-outline-thick{color:rgba(0,0,0,.87)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#673ab7}.mat-form-field-appearance-outline.mat-focused.mat-accent .mat-form-field-outline-thick{color:#ffd740}.mat-form-field-appearance-outline.mat-focused.mat-warn .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid.mat-form-field-invalid .mat-form-field-outline-thick{color:#f44336}.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-label{color:rgba(0,0,0,.38)}.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:rgba(0,0,0,.06)}.mat-icon.mat-primary{color:#673ab7}.mat-icon.mat-accent{color:#ffd740}.mat-icon.mat-warn{color:#f44336}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{color:rgba(0,0,0,.54)}.mat-form-field-type-mat-native-select.mat-form-field-disabled .mat-form-field-infix::after,.mat-input-element:disabled{color:rgba(0,0,0,.38)}.mat-input-element{caret-color:#673ab7}.mat-input-element::-ms-input-placeholder{color:rgba(0,0,0,.42)}.mat-input-element::placeholder{color:rgba(0,0,0,.42)}.mat-input-element::-moz-placeholder{color:rgba(0,0,0,.42)}.mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,.42)}.mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,.42)}.mat-accent .mat-input-element{caret-color:#ffd740}.mat-form-field-invalid .mat-input-element,.mat-warn .mat-input-element{caret-color:#f44336}.mat-form-field-type-mat-native-select.mat-form-field-invalid .mat-form-field-infix::after{color:#f44336}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{color:rgba(0,0,0,.87)}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{font-family:Roboto,"Helvetica Neue",sans-serif;font-size:14px;font-weight:500;color:rgba(0,0,0,.54)}.mat-list-item-disabled{background-color:#eee}.mat-list-option:focus,.mat-list-option:hover,.mat-nav-list .mat-list-item:focus,.mat-nav-list .mat-list-item:hover{background:rgba(0,0,0,.04)}.mat-menu-panel{background:#fff}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.mat-menu-item{background:0 0;color:rgba(0,0,0,.87)}.mat-menu-item[disabled],.mat-menu-item[disabled]::after{color:rgba(0,0,0,.38)}.mat-menu-item .mat-icon:not([color]),.mat-menu-item-submenu-trigger::after{color:rgba(0,0,0,.54)}.mat-menu-item-highlighted:not([disabled]),.mat-menu-item.cdk-keyboard-focused:not([disabled]),.mat-menu-item.cdk-program-focused:not([disabled]),.mat-menu-item:hover:not([disabled]){background:rgba(0,0,0,.04)}.mat-paginator{background:#fff}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{color:rgba(0,0,0,.54)}.mat-paginator-decrement,.mat-paginator-increment{border-top:2px solid rgba(0,0,0,.54);border-right:2px solid rgba(0,0,0,.54)}.mat-paginator-first,.mat-paginator-last{border-top:2px solid rgba(0,0,0,.54)}.mat-icon-button[disabled] .mat-paginator-decrement,.mat-icon-button[disabled] .mat-paginator-first,.mat-icon-button[disabled] .mat-paginator-increment,.mat-icon-button[disabled] .mat-paginator-last{border-color:rgba(0,0,0,.38)}.mat-progress-bar-background{fill:#d1c4e9}.mat-progress-bar-buffer{background-color:#d1c4e9}.mat-progress-bar-fill::after{background-color:#673ab7}.mat-progress-bar.mat-accent .mat-progress-bar-background{fill:#ffe57f}.mat-progress-bar.mat-accent .mat-progress-bar-buffer{background-color:#ffe57f}.mat-progress-bar.mat-accent .mat-progress-bar-fill::after{background-color:#ffd740}.mat-progress-bar.mat-warn .mat-progress-bar-background{fill:#ffcdd2}.mat-progress-bar.mat-warn .mat-progress-bar-buffer{background-color:#ffcdd2}.mat-progress-bar.mat-warn .mat-progress-bar-fill::after{background-color:#f44336}.mat-progress-spinner circle,.mat-spinner circle{stroke:#673ab7}.mat-progress-spinner.mat-accent circle,.mat-spinner.mat-accent circle{stroke:#ffd740}.mat-progress-spinner.mat-warn circle,.mat-spinner.mat-warn circle{stroke:#f44336}.mat-radio-outer-circle{border-color:rgba(0,0,0,.54)}.mat-radio-button.mat-primary.mat-radio-checked .mat-radio-outer-circle{border-color:#673ab7}.mat-radio-button.mat-primary .mat-radio-inner-circle,.mat-radio-button.mat-primary .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),.mat-radio-button.mat-primary.mat-radio-checked .mat-radio-persistent-ripple,.mat-radio-button.mat-primary:active .mat-radio-persistent-ripple{background-color:#673ab7}.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ffd740}.mat-radio-button.mat-accent .mat-radio-inner-circle,.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-persistent-ripple,.mat-radio-button.mat-accent:active .mat-radio-persistent-ripple{background-color:#ffd740}.mat-radio-button.mat-warn.mat-radio-checked .mat-radio-outer-circle{border-color:#f44336}.mat-radio-button.mat-warn .mat-radio-inner-circle,.mat-radio-button.mat-warn .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),.mat-radio-button.mat-warn.mat-radio-checked .mat-radio-persistent-ripple,.mat-radio-button.mat-warn:active .mat-radio-persistent-ripple{background-color:#f44336}.mat-radio-button.mat-radio-disabled .mat-radio-outer-circle,.mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-outer-circle{border-color:rgba(0,0,0,.38)}.mat-radio-button.mat-radio-disabled .mat-radio-inner-circle,.mat-radio-button.mat-radio-disabled .mat-radio-ripple .mat-ripple-element{background-color:rgba(0,0,0,.38)}.mat-radio-button.mat-radio-disabled .mat-radio-label-content{color:rgba(0,0,0,.38)}.mat-radio-button .mat-ripple-element{background-color:#000}.mat-select-value{color:rgba(0,0,0,.87)}.mat-select-placeholder{color:rgba(0,0,0,.42)}.mat-select-disabled .mat-select-value{color:rgba(0,0,0,.38)}.mat-select-arrow{color:rgba(0,0,0,.54)}.mat-select-panel{background:#fff}.mat-select-panel:not([class*=mat-elevation-z]){box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple){background:rgba(0,0,0,.12)}.mat-form-field.mat-focused.mat-primary .mat-select-arrow{color:#673ab7}.mat-form-field.mat-focused.mat-accent .mat-select-arrow{color:#ffd740}.mat-form-field .mat-select.mat-select-invalid .mat-select-arrow,.mat-form-field.mat-focused.mat-warn .mat-select-arrow{color:#f44336}.mat-form-field .mat-select.mat-select-disabled .mat-select-arrow{color:rgba(0,0,0,.38)}.mat-drawer-container{background-color:#fafafa;color:rgba(0,0,0,.87)}.mat-drawer{background-color:#fff;color:rgba(0,0,0,.87)}.mat-drawer.mat-drawer-push{background-color:#fff}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-drawer-side{border-right:1px solid rgba(0,0,0,.12)}.mat-drawer-side.mat-drawer-end,[dir=rtl] .mat-drawer-side{border-left:1px solid rgba(0,0,0,.12);border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-left:none;border-right:1px solid rgba(0,0,0,.12)}.mat-drawer-backdrop.mat-drawer-shown{background-color:rgba(0,0,0,.6)}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#ffd740}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(255,215,64,.54)}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-ripple-element{background-color:#ffd740}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#673ab7}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(103,58,183,.54)}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-ripple-element{background-color:#673ab7}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#f44336}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(244,67,54,.54)}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-ripple-element{background-color:#f44336}.mat-slide-toggle:not(.mat-checked) .mat-ripple-element{background-color:#000}.mat-disabled .mat-slide-toggle-thumb{background-color:#bdbdbd}.mat-disabled .mat-slide-toggle-bar{background-color:rgba(0,0,0,.1)}.mat-slide-toggle-thumb{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);background-color:#fafafa}.mat-slide-toggle-bar{background-color:rgba(0,0,0,.38)}.mat-slider-track-background{background-color:rgba(0,0,0,.26)}.mat-primary .mat-slider-thumb,.mat-primary .mat-slider-thumb-label,.mat-primary .mat-slider-track-fill{background-color:#673ab7}.mat-primary .mat-slider-thumb-label-text{color:#fff}.mat-accent .mat-slider-thumb,.mat-accent .mat-slider-thumb-label,.mat-accent .mat-slider-track-fill{background-color:#ffd740}.mat-accent .mat-slider-thumb-label-text{color:rgba(0,0,0,.87)}.mat-warn .mat-slider-thumb,.mat-warn .mat-slider-thumb-label,.mat-warn .mat-slider-track-fill{background-color:#f44336}.mat-warn .mat-slider-thumb-label-text{color:#fff}.mat-slider-focus-ring{background-color:rgba(255,215,64,.2)}.cdk-focused .mat-slider-track-background,.mat-slider:hover .mat-slider-track-background{background-color:rgba(0,0,0,.38)}.mat-slider-disabled .mat-slider-thumb,.mat-slider-disabled .mat-slider-track-background,.mat-slider-disabled .mat-slider-track-fill,.mat-slider-disabled:hover .mat-slider-track-background{background-color:rgba(0,0,0,.26)}.mat-slider-min-value .mat-slider-focus-ring{background-color:rgba(0,0,0,.12)}.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb,.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb-label{background-color:rgba(0,0,0,.87)}.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb,.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb-label{background-color:rgba(0,0,0,.26)}.mat-slider-min-value:not(.mat-slider-thumb-label-showing) .mat-slider-thumb{border-color:rgba(0,0,0,.26);background-color:transparent}.mat-slider-min-value:not(.mat-slider-thumb-label-showing).cdk-focused .mat-slider-thumb,.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover .mat-slider-thumb{border-color:rgba(0,0,0,.38)}.mat-slider-min-value:not(.mat-slider-thumb-label-showing).cdk-focused.mat-slider-disabled .mat-slider-thumb,.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover.mat-slider-disabled .mat-slider-thumb{border-color:rgba(0,0,0,.26)}.mat-slider-has-ticks .mat-slider-wrapper::after{border-color:rgba(0,0,0,.7)}.mat-slider-horizontal .mat-slider-ticks{background-image:repeating-linear-gradient(to right,rgba(0,0,0,.7),rgba(0,0,0,.7) 2px,transparent 0,transparent);background-image:-moz-repeating-linear-gradient(.0001deg,rgba(0,0,0,.7),rgba(0,0,0,.7) 2px,transparent 0,transparent)}.mat-slider-vertical .mat-slider-ticks{background-image:repeating-linear-gradient(to bottom,rgba(0,0,0,.7),rgba(0,0,0,.7) 2px,transparent 0,transparent)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover{background-color:rgba(0,0,0,.04)}.mat-step-header .mat-step-label,.mat-step-header .mat-step-optional{color:rgba(0,0,0,.38)}.mat-step-header .mat-step-icon{background-color:rgba(0,0,0,.38);color:#fff}.mat-step-header .mat-step-icon-selected,.mat-step-header .mat-step-icon-state-done,.mat-step-header .mat-step-icon-state-edit{background-color:#673ab7;color:#fff}.mat-step-header .mat-step-icon-state-error{background-color:transparent;color:#f44336}.mat-step-header .mat-step-label.mat-step-label-active{color:rgba(0,0,0,.87)}.mat-step-header .mat-step-label.mat-step-label-error{color:#f44336}.mat-stepper-horizontal,.mat-stepper-vertical{background-color:#fff}.mat-stepper-vertical-line::before{border-left-color:rgba(0,0,0,.12)}.mat-stepper-horizontal-line{border-top-color:rgba(0,0,0,.12)}.mat-sort-header-arrow{color:#757575}.mat-tab-header,.mat-tab-nav-bar{border-bottom:1px solid rgba(0,0,0,.12)}.mat-tab-group-inverted-header .mat-tab-header,.mat-tab-group-inverted-header .mat-tab-nav-bar{border-top:1px solid rgba(0,0,0,.12);border-bottom:none}.mat-tab-label,.mat-tab-link{color:rgba(0,0,0,.87)}.mat-tab-label.mat-tab-disabled,.mat-tab-link.mat-tab-disabled{color:rgba(0,0,0,.38)}.mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,.87)}.mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,.38)}.mat-tab-group[class*=mat-background-] .mat-tab-header,.mat-tab-nav-bar[class*=mat-background-]{border-bottom:none;border-top:none}.mat-tab-group.mat-primary .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-primary .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-group.mat-primary .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-primary .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-primary .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-primary .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-primary .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-primary .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled){background-color:rgba(209,196,233,.3)}.mat-tab-group.mat-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary .mat-ink-bar{background-color:#673ab7}.mat-tab-group.mat-primary.mat-background-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary.mat-background-primary .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-accent .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-accent .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-group.mat-accent .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-accent .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-accent .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-accent .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-accent .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-accent .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled){background-color:rgba(255,229,127,.3)}.mat-tab-group.mat-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent .mat-ink-bar{background-color:#ffd740}.mat-tab-group.mat-accent.mat-background-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent.mat-background-accent .mat-ink-bar{background-color:rgba(0,0,0,.87)}.mat-tab-group.mat-warn .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-warn .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-group.mat-warn .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-warn .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-warn .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-warn .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-warn .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-warn .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled){background-color:rgba(255,205,210,.3)}.mat-tab-group.mat-warn .mat-ink-bar,.mat-tab-nav-bar.mat-warn .mat-ink-bar{background-color:#f44336}.mat-tab-group.mat-warn.mat-background-warn .mat-ink-bar,.mat-tab-nav-bar.mat-warn.mat-background-warn .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-background-primary .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-primary .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-primary .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-primary .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-primary .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-primary .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-primary .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-primary .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled){background-color:rgba(209,196,233,.3)}.mat-tab-group.mat-background-primary .mat-tab-header,.mat-tab-group.mat-background-primary .mat-tab-links,.mat-tab-nav-bar.mat-background-primary .mat-tab-header,.mat-tab-nav-bar.mat-background-primary .mat-tab-links{background-color:#673ab7}.mat-tab-group.mat-background-primary .mat-tab-label,.mat-tab-group.mat-background-primary .mat-tab-link,.mat-tab-nav-bar.mat-background-primary .mat-tab-label,.mat-tab-nav-bar.mat-background-primary .mat-tab-link{color:#fff}.mat-tab-group.mat-background-primary .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-primary .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-primary .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-primary .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,.4)}.mat-tab-group.mat-background-primary .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-primary .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-primary .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-primary .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,.4)}.mat-tab-group.mat-background-primary .mat-ripple-element,.mat-tab-nav-bar.mat-background-primary .mat-ripple-element{background-color:rgba(255,255,255,.12)}.mat-tab-group.mat-background-accent .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-accent .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-accent .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-accent .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-accent .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-accent .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-accent .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-accent .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled){background-color:rgba(255,229,127,.3)}.mat-tab-group.mat-background-accent .mat-tab-header,.mat-tab-group.mat-background-accent .mat-tab-links,.mat-tab-nav-bar.mat-background-accent .mat-tab-header,.mat-tab-nav-bar.mat-background-accent .mat-tab-links{background-color:#ffd740}.mat-tab-group.mat-background-accent .mat-tab-label,.mat-tab-group.mat-background-accent .mat-tab-link,.mat-tab-nav-bar.mat-background-accent .mat-tab-label,.mat-tab-nav-bar.mat-background-accent .mat-tab-link{color:rgba(0,0,0,.87)}.mat-tab-group.mat-background-accent .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-accent .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-accent .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-accent .mat-tab-link.mat-tab-disabled{color:rgba(0,0,0,.4)}.mat-tab-group.mat-background-accent .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-accent .mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,.87)}.mat-tab-group.mat-background-accent .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-accent .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,.4)}.mat-tab-group.mat-background-accent .mat-ripple-element,.mat-tab-nav-bar.mat-background-accent .mat-ripple-element{background-color:rgba(0,0,0,.12)}.mat-tab-group.mat-background-warn .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-warn .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-warn .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-group.mat-background-warn .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-warn .mat-tab-label.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-warn .mat-tab-label.cdk-program-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-warn .mat-tab-link.cdk-keyboard-focused:not(.mat-tab-disabled),.mat-tab-nav-bar.mat-background-warn .mat-tab-link.cdk-program-focused:not(.mat-tab-disabled){background-color:rgba(255,205,210,.3)}.mat-tab-group.mat-background-warn .mat-tab-header,.mat-tab-group.mat-background-warn .mat-tab-links,.mat-tab-nav-bar.mat-background-warn .mat-tab-header,.mat-tab-nav-bar.mat-background-warn .mat-tab-links{background-color:#f44336}.mat-tab-group.mat-background-warn .mat-tab-label,.mat-tab-group.mat-background-warn .mat-tab-link,.mat-tab-nav-bar.mat-background-warn .mat-tab-label,.mat-tab-nav-bar.mat-background-warn .mat-tab-link{color:#fff}.mat-tab-group.mat-background-warn .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-warn .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-warn .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-warn .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,.4)}.mat-tab-group.mat-background-warn .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-warn .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-warn .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-warn .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,.4)}.mat-tab-group.mat-background-warn .mat-ripple-element,.mat-tab-nav-bar.mat-background-warn .mat-ripple-element{background-color:rgba(255,255,255,.12)}.mat-toolbar{background:#f5f5f5;color:rgba(0,0,0,.87)}.mat-toolbar.mat-primary{background:#673ab7;color:#fff}.mat-toolbar.mat-accent{background:#ffd740;color:rgba(0,0,0,.87)}.mat-toolbar.mat-warn{background:#f44336;color:#fff}.mat-toolbar .mat-focused .mat-form-field-ripple,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-form-field-underline{background-color:currentColor}.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-select-value{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-tooltip{background:rgba(97,97,97,.9)}.mat-tree{font-family:Roboto,"Helvetica Neue",sans-serif;background:#fff}.mat-nested-tree-node,.mat-tree-node{font-weight:400;font-size:14px;color:rgba(0,0,0,.87)}.mat-snack-bar-container{color:rgba(255,255,255,.7);background:#323232;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-simple-snackbar-action{color:#ffd740}
--------------------------------------------------------------------------------