Merge branch 'master' into skeleton

This commit is contained in:
Sercan Yemen 2018-08-28 08:09:40 +03:00
commit bfa1dd9e84
19 changed files with 324 additions and 151 deletions

View File

@ -1,11 +1,11 @@
import { browser, by, element } from 'protractor'; import { browser, by, element } from 'protractor';
export class Fuse2Page { export class Fuse2Page {
navigateTo() { navigateTo(): any {
return browser.get('/'); return browser.get('/');
} }
getParagraphText() { getParagraphText(): any {
return element(by.css('app-root h1')).getText(); return element(by.css('app-root h1')).getText();
} }
} }

288
package-lock.json generated
View File

@ -434,6 +434,148 @@
"integrity": "sha1-NOZY7T2jfyOwogDi2lqJvpK7IJ8=", "integrity": "sha1-NOZY7T2jfyOwogDi2lqJvpK7IJ8=",
"dev": true "dev": true
}, },
"@babel/code-frame": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz",
"integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=",
"dev": true,
"requires": {
"@babel/highlight": "7.0.0-beta.51"
}
},
"@babel/generator": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz",
"integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=",
"dev": true,
"requires": {
"@babel/types": "7.0.0-beta.51",
"jsesc": "^2.5.1",
"lodash": "^4.17.5",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
},
"dependencies": {
"jsesc": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
"integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=",
"dev": true
}
}
},
"@babel/helper-function-name": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz",
"integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "7.0.0-beta.51",
"@babel/template": "7.0.0-beta.51",
"@babel/types": "7.0.0-beta.51"
}
},
"@babel/helper-get-function-arity": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz",
"integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=",
"dev": true,
"requires": {
"@babel/types": "7.0.0-beta.51"
}
},
"@babel/helper-split-export-declaration": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz",
"integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=",
"dev": true,
"requires": {
"@babel/types": "7.0.0-beta.51"
}
},
"@babel/highlight": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz",
"integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=",
"dev": true,
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^3.0.0"
}
},
"@babel/parser": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz",
"integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=",
"dev": true
},
"@babel/template": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz",
"integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=",
"dev": true,
"requires": {
"@babel/code-frame": "7.0.0-beta.51",
"@babel/parser": "7.0.0-beta.51",
"@babel/types": "7.0.0-beta.51",
"lodash": "^4.17.5"
}
},
"@babel/traverse": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz",
"integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=",
"dev": true,
"requires": {
"@babel/code-frame": "7.0.0-beta.51",
"@babel/generator": "7.0.0-beta.51",
"@babel/helper-function-name": "7.0.0-beta.51",
"@babel/helper-split-export-declaration": "7.0.0-beta.51",
"@babel/parser": "7.0.0-beta.51",
"@babel/types": "7.0.0-beta.51",
"debug": "^3.1.0",
"globals": "^11.1.0",
"invariant": "^2.2.0",
"lodash": "^4.17.5"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"globals": {
"version": "11.7.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
"dev": true
}
}
},
"@babel/types": {
"version": "7.0.0-beta.51",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz",
"integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=",
"dev": true,
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.5",
"to-fast-properties": "^2.0.0"
},
"dependencies": {
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
"dev": true
}
}
},
"@ngrx/effects": { "@ngrx/effects": {
"version": "6.1.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-6.1.0.tgz", "resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-6.1.0.tgz",
@ -578,9 +720,9 @@
"dev": true "dev": true
}, },
"@types/selenium-webdriver": { "@types/selenium-webdriver": {
"version": "2.53.43", "version": "3.0.10",
"resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.10.tgz",
"integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==", "integrity": "sha512-ikB0JHv6vCR1KYUQAzTO4gi/lXLElT4Tx+6De2pc/OZwizE9LRNiTa+U8TBFKBD/nntPnr/MPSHSnOTybjhqNA==",
"dev": true "dev": true
}, },
"@webassemblyjs/ast": { "@webassemblyjs/ast": {
@ -828,9 +970,9 @@
} }
}, },
"adm-zip": { "adm-zip": {
"version": "0.4.4", "version": "0.4.11",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz",
"integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=", "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==",
"dev": true "dev": true
}, },
"after": { "after": {
@ -1704,6 +1846,15 @@
"electron-to-chromium": "^1.3.47" "electron-to-chromium": "^1.3.47"
} }
}, },
"browserstack": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.1.tgz",
"integrity": "sha512-O8VMT64P9NOLhuIoD4YngyxBURefaSdR4QdhG8l6HZ9VxtU7jc3m6jLufFwKA5gaf7fetfB2TnRJnMxyob+heg==",
"dev": true,
"requires": {
"https-proxy-agent": "^2.2.1"
}
},
"buffer": { "buffer": {
"version": "4.9.1", "version": "4.9.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
@ -2133,9 +2284,9 @@
"dev": true "dev": true
}, },
"compare-versions": { "compare-versions": {
"version": "3.3.0", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.1.tgz",
"integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", "integrity": "sha512-GkIcfJ9sDt4+gS+RWH3X+kR7ezuKdu3fg2oA9nRA8HZoqZwAKv3ml3TyfB9OyV2iFXxCw7q5XfV6SyPbSCT2pw==",
"dev": true "dev": true
}, },
"component-bind": { "component-bind": {
@ -5826,9 +5977,9 @@
} }
}, },
"istanbul-api": { "istanbul-api": {
"version": "1.3.1", "version": "1.3.6",
"resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.6.tgz",
"integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", "integrity": "sha512-luJDnB1uJ5Qsg/WwusGfNXayQ4598yDgW5S0nUS85T576m1LVJzSqLrCDULkT6sTQXVKHa54093gNuCKumMCjQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"async": "^2.1.4", "async": "^2.1.4",
@ -5836,10 +5987,10 @@
"fileset": "^2.0.2", "fileset": "^2.0.2",
"istanbul-lib-coverage": "^1.2.0", "istanbul-lib-coverage": "^1.2.0",
"istanbul-lib-hook": "^1.2.0", "istanbul-lib-hook": "^1.2.0",
"istanbul-lib-instrument": "^1.10.1", "istanbul-lib-instrument": "^2.1.0",
"istanbul-lib-report": "^1.1.4", "istanbul-lib-report": "^1.1.4",
"istanbul-lib-source-maps": "^1.2.4", "istanbul-lib-source-maps": "^1.2.5",
"istanbul-reports": "^1.3.0", "istanbul-reports": "^1.4.1",
"js-yaml": "^3.7.0", "js-yaml": "^3.7.0",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"once": "^1.4.0" "once": "^1.4.0"
@ -5853,6 +6004,29 @@
"requires": { "requires": {
"lodash": "^4.17.10" "lodash": "^4.17.10"
} }
},
"istanbul-lib-instrument": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz",
"integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==",
"dev": true,
"requires": {
"@babel/generator": "7.0.0-beta.51",
"@babel/parser": "7.0.0-beta.51",
"@babel/template": "7.0.0-beta.51",
"@babel/traverse": "7.0.0-beta.51",
"@babel/types": "7.0.0-beta.51",
"istanbul-lib-coverage": "^2.0.1",
"semver": "^5.5.0"
},
"dependencies": {
"istanbul-lib-coverage": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
"integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==",
"dev": true
}
}
} }
} }
}, },
@ -5975,12 +6149,12 @@
} }
}, },
"istanbul-reports": { "istanbul-reports": {
"version": "1.3.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.0.tgz",
"integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", "integrity": "sha512-HeZG0WHretI9FXBni5wZ9DOgNziqDCEwetxnme5k1Vv5e81uTqcsy3fMH99gXGDGKr1ea87TyGseDMa2h4HEUA==",
"dev": true, "dev": true,
"requires": { "requires": {
"handlebars": "^4.0.3" "handlebars": "^4.0.11"
} }
}, },
"jasmine": { "jasmine": {
@ -6356,9 +6530,9 @@
} }
}, },
"karma-coverage-istanbul-reporter": { "karma-coverage-istanbul-reporter": {
"version": "2.0.1", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz", "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.2.tgz",
"integrity": "sha512-UcgrHkFehI5+ivMouD8NH/UOHiX4oCAtwaANylzPFdcAuD52fnCUuelacq2gh8tZ4ydhU3+xiXofSq7j5Ehygw==", "integrity": "sha512-IIIrfsfYJKkAyyjRrBx8CZRl2UXi2OSrxKRAA95mkpOMF3Zw5FpjE+v79pWuwu1Keu0pdjcfElmmOuAEjFQshA==",
"dev": true, "dev": true,
"requires": { "requires": {
"istanbul-api": "^1.3.1", "istanbul-api": "^1.3.1",
@ -7977,15 +8151,16 @@
"dev": true "dev": true
}, },
"protractor": { "protractor": {
"version": "5.3.2", "version": "5.4.0",
"resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.2.tgz", "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.0.tgz",
"integrity": "sha512-pw4uwwiy5lHZjIguxNpkEwJJa7hVz+bJsvaTI+IbXlfn2qXwzbF8eghW/RmrZwE2sGx82I8etb8lVjQ+JrjejA==", "integrity": "sha512-6TSYqMhUUzxr4/wN0ttSISqPMKvcVRXF4k8jOEpGWD8OioLak4KLgfzHK9FJ49IrjzRrZ+Mx1q2Op8Rk0zEcnQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/node": "^6.0.46", "@types/node": "^6.0.46",
"@types/q": "^0.0.32", "@types/q": "^0.0.32",
"@types/selenium-webdriver": "~2.53.39", "@types/selenium-webdriver": "^3.0.0",
"blocking-proxy": "^1.0.0", "blocking-proxy": "^1.0.0",
"browserstack": "^1.5.1",
"chalk": "^1.1.3", "chalk": "^1.1.3",
"glob": "^7.0.3", "glob": "^7.0.3",
"jasmine": "2.8.0", "jasmine": "2.8.0",
@ -7995,20 +8170,14 @@
"saucelabs": "^1.5.0", "saucelabs": "^1.5.0",
"selenium-webdriver": "3.6.0", "selenium-webdriver": "3.6.0",
"source-map-support": "~0.4.0", "source-map-support": "~0.4.0",
"webdriver-js-extender": "^1.0.0", "webdriver-js-extender": "2.0.0",
"webdriver-manager": "^12.0.6" "webdriver-manager": "^12.0.6"
}, },
"dependencies": { "dependencies": {
"@types/node": { "@types/node": {
"version": "6.0.114", "version": "6.0.116",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.114.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.116.tgz",
"integrity": "sha512-5ViC9dwf1VIAtrOFTvOuN04lJgw28eKjuy0Vg2Bd/fSlxKP2feCSkIw04ZgOENL2ywdWrtbkthp1XVLEjJmouw==", "integrity": "sha512-vToa8YEeulfyYg1gSOeHjvvIRqrokng62VMSj2hoZrwZNcYrp2h3AWo6KeBVuymIklQUaY5zgVJvVsC4KiiLkQ==",
"dev": true
},
"adm-zip": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz",
"integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==",
"dev": true "dev": true
}, },
"ansi-styles": { "ansi-styles": {
@ -10505,50 +10674,13 @@
} }
}, },
"webdriver-js-extender": { "webdriver-js-extender": {
"version": "1.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.0.0.tgz",
"integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", "integrity": "sha512-fbyKiVu3azzIc5d4+26YfuPQcFTlgFQV5yQ/0OQj4Ybkl4g1YQuIPskf5v5wqwRJhHJnPHthB6tqCjWHOKLWag==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/selenium-webdriver": "^2.53.35", "@types/selenium-webdriver": "^3.0.0",
"selenium-webdriver": "^2.53.2" "selenium-webdriver": "^3.0.1"
},
"dependencies": {
"sax": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz",
"integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=",
"dev": true
},
"selenium-webdriver": {
"version": "2.53.3",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz",
"integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=",
"dev": true,
"requires": {
"adm-zip": "0.4.4",
"rimraf": "^2.2.8",
"tmp": "0.0.24",
"ws": "^1.0.1",
"xml2js": "0.4.4"
}
},
"tmp": {
"version": "0.0.24",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz",
"integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=",
"dev": true
},
"xml2js": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz",
"integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=",
"dev": true,
"requires": {
"sax": "0.6.x",
"xmlbuilder": ">=1.0.0"
}
}
} }
}, },
"webpack": { "webpack": {

View File

@ -77,10 +77,10 @@
"jasmine-spec-reporter": "4.2.1", "jasmine-spec-reporter": "4.2.1",
"karma": "1.7.1", "karma": "1.7.1",
"karma-chrome-launcher": "2.2.0", "karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "2.0.1", "karma-coverage-istanbul-reporter": "2.0.2",
"karma-jasmine": "1.1.2", "karma-jasmine": "1.1.2",
"karma-jasmine-html-reporter": "0.2.2", "karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.3.2", "protractor": "5.4.0",
"ts-node": "5.0.1", "ts-node": "5.0.1",
"tslint": "5.9.1", "tslint": "5.9.1",
"typescript": "2.7.2", "typescript": "2.7.2",

View File

@ -1,4 +1,6 @@
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, Renderer2, RendererStyleFlags2, ViewEncapsulation } from '@angular/core'; import {
ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, Renderer2, RendererStyleFlags2, ViewEncapsulation
} from '@angular/core';
import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations'; import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
import { ObservableMedia } from '@angular/flex-layout'; import { ObservableMedia } from '@angular/flex-layout';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';

View File

@ -18,9 +18,10 @@
<h2>Color themes</h2> <h2>Color themes</h2>
<mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="colorTheme"> <mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="colorTheme">
<mat-radio-button class="mb-12" value="theme-default">Default</mat-radio-button> <mat-radio-button class="mb-12" value="theme-default">Default Light</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-default-dark">Default Dark</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-yellow-light">Yellow Light</mat-radio-button> <mat-radio-button class="mb-12" value="theme-yellow-light">Yellow Light</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-blue-gray-dark">Blue-Gray Dark</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-pink-dark">Pink Dark</mat-radio-button>
</mat-radio-group> </mat-radio-group>
</div> </div>

View File

@ -66,6 +66,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
// noinspection TypeScriptValidateTypes // noinspection TypeScriptValidateTypes
this.form = this._formBuilder.group({ this.form = this._formBuilder.group({
colorTheme : new FormControl(), colorTheme : new FormControl(),
customScrollbars: new FormControl(),
layout : this._formBuilder.group({ layout : this._formBuilder.group({
style : new FormControl(), style : new FormControl(),
width : new FormControl(), width : new FormControl(),
@ -93,8 +94,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
hidden : new FormControl(), hidden : new FormControl(),
position: new FormControl() position: new FormControl()
}) })
}), })
customScrollbars: new FormControl()
}); });
// Subscribe to the config changes // Subscribe to the config changes
@ -188,7 +188,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
width : 'fullwidth', width : 'fullwidth',
navbar : { navbar : {
primaryBackground : 'fuse-navy-700', primaryBackground : 'fuse-navy-700',
secondaryBackground: 'indigo-600', secondaryBackground: 'fuse-navy-900',
folded : false, folded : false,
hidden : false, hidden : false,
position : 'left', position : 'left',
@ -224,7 +224,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
width : 'fullwidth', width : 'fullwidth',
navbar : { navbar : {
primaryBackground : 'fuse-navy-700', primaryBackground : 'fuse-navy-700',
secondaryBackground: 'indigo-600', secondaryBackground: 'fuse-navy-900',
folded : false, folded : false,
hidden : false, hidden : false,
position : 'left', position : 'left',
@ -260,7 +260,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
width : 'fullwidth', width : 'fullwidth',
navbar : { navbar : {
primaryBackground : 'fuse-navy-700', primaryBackground : 'fuse-navy-700',
secondaryBackground: 'indigo-600', secondaryBackground: 'fuse-navy-900',
folded : false, folded : false,
hidden : false, hidden : false,
position : 'left', position : 'left',
@ -296,7 +296,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
width : 'fullwidth', width : 'fullwidth',
navbar : { navbar : {
primaryBackground : 'fuse-navy-700', primaryBackground : 'fuse-navy-700',
secondaryBackground: 'indigo-600', secondaryBackground: 'fuse-navy-900',
folded : false, folded : false,
hidden : false, hidden : false,
position : 'top', position : 'top',
@ -339,5 +339,4 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{ {
this._fuseSidebarService.getSidebar(key).toggleOpen(); this._fuseSidebarService.getSidebar(key).toggleOpen();
} }
} }

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule, MatCheckboxModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule } from '@angular/material'; import {
MatButtonModule, MatCheckboxModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule
} from '@angular/material';
import { FuseDirectivesModule } from '@fuse/directives/directives'; import { FuseDirectivesModule } from '@fuse/directives/directives';
import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module'; import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module';

View File

@ -15,11 +15,11 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
@HostBinding('class.mat-is-locked-open') @HostBinding('class.mat-is-locked-open')
isLockedOpen: boolean; isLockedOpen: boolean;
@Input('fuseMatSidenavHelper') @Input()
id: string; id: string;
@Input('mat-is-locked-open') @Input()
matIsLockedOpenBreakpoint: string; matIsLockedOpen: string;
// Private // Private
private _unsubscribeAll: Subject<any>; private _unsubscribeAll: Subject<any>;
@ -58,7 +58,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
// Register the sidenav to the service // Register the sidenav to the service
this._fuseMatSidenavHelperService.setSidenav(this.id, this._matSidenav); this._fuseMatSidenavHelperService.setSidenav(this.id, this._matSidenav);
if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) ) if ( this._observableMedia.isActive(this.matIsLockedOpen) )
{ {
this.isLockedOpen = true; this.isLockedOpen = true;
this._matSidenav.mode = 'side'; this._matSidenav.mode = 'side';
@ -74,7 +74,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
this._fuseMatchMediaService.onMediaChange this._fuseMatchMediaService.onMediaChange
.pipe(takeUntil(this._unsubscribeAll)) .pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => { .subscribe(() => {
if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) ) if ( this._observableMedia.isActive(this.matIsLockedOpen) )
{ {
this.isLockedOpen = true; this.isLockedOpen = true;
this._matSidenav.mode = 'side'; this._matSidenav.mode = 'side';
@ -105,8 +105,8 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
}) })
export class FuseMatSidenavTogglerDirective export class FuseMatSidenavTogglerDirective
{ {
@Input('fuseMatSidenavToggler') @Input()
id; id: string;
/** /**
* Constructor * Constructor
@ -126,7 +126,7 @@ export class FuseMatSidenavTogglerDirective
* On click * On click
*/ */
@HostListener('click') @HostListener('click')
onClick() onClick(): void
{ {
this._fuseMatSidenavHelperService.getSidenav(this.id).toggle(); this._fuseMatSidenavHelperService.getSidenav(this.id).toggle();
} }

View File

@ -687,7 +687,23 @@ const matColors = {
// tslint:disable-next-line // tslint:disable-next-line
const matPresetColors = [ const matPresetColors = [
'#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000', '#fce4ec', '#f8bbd0', '#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162', '#f3e5f5', '#e1bee7', '#ce93d8', '#ba68c8', '#ab47bc', '#9c27b0', '#8e24aa', '#7b1fa2', '#6a1b9a', '#4a148c', '#ea80fc', '#e040fb', '#d500f9', '#aa00ff', '#ede7f6', '#d1c4e9', '#b39ddb', '#9575cd', '#7e57c2', '#673ab7', '#5e35b1', '#512da8', '#4527a0', '#311b92', '#b388ff', '#7c4dff', '#651fff', '#6200ea', '#e8eaf6', '#c5cae9', '#9fa8da', '#7986cb', '#5c6bc0', '#3f51b5', '#3949ab', '#303f9f', '#283593', '#1a237e', '#8c9eff', '#536dfe', '#3d5afe', '#304ffe', '#e3f2fd', '#bbdefb', '#90caf9', '#64b5f6', '#42a5f5', '#2196f3', '#1e88e5', '#1976d2', '#1565c0', '#0d47a1', '#82b1ff', '#448aff', '#2979ff', '#2962ff', '#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b', '#80d8ff', '#40c4ff', '#00b0ff', '#0091ea', '#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064', '#84ffff', '#18ffff', '#00e5ff', '#00b8d4', '#e0f2f1', '#b2dfdb', '#80cbc4', '#4db6ac', '#26a69a', '#009688', '#00897b', '#00796b', '#00695c', '#004d40', '#a7ffeb', '#64ffda', '#1de9b6', '#00bfa5', '#e8f5e9', '#c8e6c9', '#a5d6a7', '#81c784', '#66bb6a', '#4caf50', '#43a047', '#388e3c', '#2e7d32', '#1b5e20', '#b9f6ca', '#69f0ae', '#00e676', '#00c853', '#f1f8e9', '#dcedc8', '#c5e1a5', '#aed581', '#9ccc65', '#8bc34a', '#7cb342', '#689f38', '#558b2f', '#33691e', '#ccff90', '#b2ff59', '#76ff03', '#64dd17', '#f9fbe7', '#f0f4c3', '#e6ee9c', '#dce775', '#d4e157', '#cddc39', '#c0ca33', '#afb42b', '#9e9d24', '#827717', '#f4ff81', '#eeff41', '#c6ff00', '#aeea00', '#fffde7', '#fff9c4', '#fff59d', '#fff176', '#ffee58', '#ffeb3b', '#fdd835', '#fbc02d', '#f9a825', '#f57f17', '#ffff8d', '#ffff00', '#ffea00', '#ffd600', '#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00', '#ffe57f', '#ffd740', '#ffc400', '#ffab00', '#fff3e0', '#ffe0b2', '#ffcc80', '#ffb74d', '#ffa726', '#ff9800', '#fb8c00', '#f57c00', '#ef6c00', '#e65100', '#ffd180', '#ffab40', '#ff9100', '#ff6d00', '#fbe9e7', '#ffccbc', '#ffab91', '#ff8a65', '#ff7043', '#ff5722', '#f4511e', '#e64a19', '#d84315', '#bf360c', '#ff9e80', '#ff6e40', '#ff3d00', '#dd2c00', '#efebe9', '#d7ccc8', '#bcaaa4', '#a1887f', '#8d6e63', '#795548', '#6d4c41', '#5d4037', '#4e342e', '#3e2723', '#d7ccc8', '#bcaaa4', '#8d6e63', '#5d4037', '#fafafa', '#f5f5f5', '#eeeeee', '#e0e0e0', '#bdbdbd', '#9e9e9e', '#757575', '#616161', '#424242', '#212121', '#ffffff', '#eeeeee', '#bdbdbd', '#616161', '#eceff1', '#cfd8dc', '#b0bec5', '#90a4ae', '#78909c', '#607d8b', '#546e7a', '#455a64', '#37474f', '#263238', '#cfd8dc', '#b0bec5', '#78909c', '#455a64' '#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000', '#fce4ec', '#f8bbd0',
'#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162', '#f3e5f5', '#e1bee7', '#ce93d8', '#ba68c8',
'#ab47bc', '#9c27b0', '#8e24aa', '#7b1fa2', '#6a1b9a', '#4a148c', '#ea80fc', '#e040fb', '#d500f9', '#aa00ff', '#ede7f6', '#d1c4e9', '#b39ddb', '#9575cd', '#7e57c2', '#673ab7',
'#5e35b1', '#512da8', '#4527a0', '#311b92', '#b388ff', '#7c4dff', '#651fff', '#6200ea', '#e8eaf6', '#c5cae9', '#9fa8da', '#7986cb', '#5c6bc0', '#3f51b5', '#3949ab', '#303f9f',
'#283593', '#1a237e', '#8c9eff', '#536dfe', '#3d5afe', '#304ffe', '#e3f2fd', '#bbdefb', '#90caf9', '#64b5f6', '#42a5f5', '#2196f3', '#1e88e5', '#1976d2', '#1565c0', '#0d47a1',
'#82b1ff', '#448aff', '#2979ff', '#2962ff', '#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b', '#80d8ff', '#40c4ff',
'#00b0ff', '#0091ea', '#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064', '#84ffff', '#18ffff', '#00e5ff', '#00b8d4',
'#e0f2f1', '#b2dfdb', '#80cbc4', '#4db6ac', '#26a69a', '#009688', '#00897b', '#00796b', '#00695c', '#004d40', '#a7ffeb', '#64ffda', '#1de9b6', '#00bfa5', '#e8f5e9', '#c8e6c9',
'#a5d6a7', '#81c784', '#66bb6a', '#4caf50', '#43a047', '#388e3c', '#2e7d32', '#1b5e20', '#b9f6ca', '#69f0ae', '#00e676', '#00c853', '#f1f8e9', '#dcedc8', '#c5e1a5', '#aed581',
'#9ccc65', '#8bc34a', '#7cb342', '#689f38', '#558b2f', '#33691e', '#ccff90', '#b2ff59', '#76ff03', '#64dd17', '#f9fbe7', '#f0f4c3', '#e6ee9c', '#dce775', '#d4e157', '#cddc39',
'#c0ca33', '#afb42b', '#9e9d24', '#827717', '#f4ff81', '#eeff41', '#c6ff00', '#aeea00', '#fffde7', '#fff9c4', '#fff59d', '#fff176', '#ffee58', '#ffeb3b', '#fdd835', '#fbc02d',
'#f9a825', '#f57f17', '#ffff8d', '#ffff00', '#ffea00', '#ffd600', '#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00',
'#ffe57f', '#ffd740', '#ffc400', '#ffab00', '#fff3e0', '#ffe0b2', '#ffcc80', '#ffb74d', '#ffa726', '#ff9800', '#fb8c00', '#f57c00', '#ef6c00', '#e65100', '#ffd180', '#ffab40',
'#ff9100', '#ff6d00', '#fbe9e7', '#ffccbc', '#ffab91', '#ff8a65', '#ff7043', '#ff5722', '#f4511e', '#e64a19', '#d84315', '#bf360c', '#ff9e80', '#ff6e40', '#ff3d00', '#dd2c00',
'#efebe9', '#d7ccc8', '#bcaaa4', '#a1887f', '#8d6e63', '#795548', '#6d4c41', '#5d4037', '#4e342e', '#3e2723', '#d7ccc8', '#bcaaa4', '#8d6e63', '#5d4037', '#fafafa', '#f5f5f5',
'#eeeeee', '#e0e0e0', '#bdbdbd', '#9e9e9e', '#757575', '#616161', '#424242', '#212121', '#ffffff', '#eeeeee', '#bdbdbd', '#616161', '#eceff1', '#cfd8dc', '#b0bec5', '#90a4ae',
'#78909c', '#607d8b', '#546e7a', '#455a64', '#37474f', '#263238', '#cfd8dc', '#b0bec5', '#78909c', '#455a64'
]; ];
/** /**
@ -699,7 +715,7 @@ export class MatColors
public static all = matColors; public static all = matColors;
public static presets = matPresetColors; public static presets = matPresetColors;
public static getColor(colorName) public static getColor(colorName): any
{ {
if ( matColors[colorName] ) if ( matColors[colorName] )
{ {

View File

@ -13,10 +13,10 @@
// If it's a light theme, use a darker background // If it's a light theme, use a darker background
// color other than the default #fafafa // color other than the default #fafafa
@if ($is-dark == false) { @if ($is-dark) {
background: #F5F5F5;
} @else {
background: map-get($background, background); background: map-get($background, background);
} @else {
background: #F5F5F5;
} }
} }
@ -300,7 +300,8 @@ $matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A70
} }
// Run the generator one more time for default values (500) // Run the generator one more time for default values (500)
@if ($hue == 500) { // if we are not working with primary, accent or warn palettes
@if ($hue == 500 and $paletteName != 'primary' and $paletteName != 'accent' and $paletteName != 'warn') {
// Generate color classes // Generate color classes
@include generate-color-classes($paletteName, $color, $contrast, ''); @include generate-color-classes($paletteName, $color, $contrast, '');
@ -318,6 +319,33 @@ $matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A70
} }
} }
} }
// Run the generator again for the selected default hue values for
// primary, accent and warn palettes
//
// We are doing this because the default hue value can be changed
// by the user when the Material theme being generated.
@if ($paletteName == 'primary' or $paletteName == 'accent' or $paletteName == 'warn') {
// Get the color and the contrasting color for the selected
// default hue
$color: map-get($palette, 'default');
$contrast: map-get($palette, 'default-contrast');
// Generate color classes
@include generate-color-classes($paletteName, $color, $contrast, '');
// Add color to the correct list depending on the contrasting color
// If the contrast color is dark
@if (rgba(black, 1) == rgba($contrast, 1)) {
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.#{$paletteName}'), 'comma');
}
// if the contrast color is light
@else {
$light-contrasting-classes: append($light-contrasting-classes, unquote('.#{$paletteName}'), 'comma');
}
}
} }
// Generate contrasting colors // Generate contrasting colors

View File

@ -129,6 +129,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
width: 100%; width: 100%;
min-width: 0; min-width: 0;
max-width: 100%; max-width: 100%;
height: 100%;
max-height: 100%; max-height: 100%;
> .header { > .header {
@ -325,6 +326,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
z-index: 3; z-index: 3;
margin-left: 32px; margin-left: 32px;
margin-right: 32px; margin-right: 32px;
width: 100%;
min-width: 0; min-width: 0;
> .header { > .header {
@ -563,6 +565,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
flex: 1 1 auto; flex: 1 1 auto;
z-index: 3; z-index: 3;
min-width: 0; min-width: 0;
width: 100%;
@include mat-elevation(7); @include mat-elevation(7);
> .header { > .header {

View File

@ -20,13 +20,6 @@
} }
} }
html, body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
// Reset non angular-material input's default browser/os styles // Reset non angular-material input's default browser/os styles
*:not(mat-form-field) { *:not(mat-form-field) {

View File

@ -1,5 +1,5 @@
import { Inject, Injectable, InjectionToken } from '@angular/core'; import { Inject, Injectable, InjectionToken } from '@angular/core';
import { NavigationStart, Router } from '@angular/router'; import { Router, RoutesRecognized } from '@angular/router';
import { Platform } from '@angular/cdk/platform'; import { Platform } from '@angular/cdk/platform';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { filter } from 'rxjs/operators'; import { filter } from 'rxjs/operators';
@ -93,15 +93,18 @@ export class FuseConfigService
// Set the config from the default config // Set the config from the default config
this._configSubject = new BehaviorSubject(_.cloneDeep(this._defaultConfig)); this._configSubject = new BehaviorSubject(_.cloneDeep(this._defaultConfig));
// Reload the default config on every navigation start if // Reload the default layout config on every RoutesRecognized event
// the current config is different from the default one // if the current layout config is different from the default one
this._router.events this._router.events
.pipe(filter(event => event instanceof NavigationStart)) .pipe(filter(event => event instanceof RoutesRecognized))
.subscribe(() => { .subscribe(() => {
if ( !_.isEqual(this._configSubject.getValue(), this._defaultConfig) ) if ( !_.isEqual(this._configSubject.getValue().layout, this._defaultConfig.layout) )
{ {
// Clone the default config // Clone the current config
const config = _.cloneDeep(this._defaultConfig); const config = _.cloneDeep(this._configSubject.getValue());
// Reset the layout from the default config
config.layout = _.cloneDeep(this._defaultConfig.layout);
// Set the config // Set the config
this._configSubject.next(config); this._configSubject.next(config);

View File

@ -1,6 +1,7 @@
export interface FuseConfig export interface FuseConfig
{ {
colorTheme: string; colorTheme: string;
customScrollbars: boolean;
layout: { layout: {
style: string, style: string,
width: 'fullwidth' | 'boxed', width: 'fullwidth' | 'boxed',
@ -29,5 +30,4 @@ export interface FuseConfig
position: 'left' | 'right' position: 'left' | 'right'
} }
}; };
customScrollbars: boolean;
} }

View File

@ -138,13 +138,16 @@ export class AppComponent implements OnInit, OnDestroy
this.document.body.classList.remove('boxed'); this.document.body.classList.remove('boxed');
} }
// Color theme // Color theme - Use normal for loop for IE11 compatibility
this.document.body.classList.forEach(className => { for ( let i = 0; i < this.document.body.classList.length; i++ )
{
const className = this.document.body.classList[i];
if ( className.startsWith('theme-') ) if ( className.startsWith('theme-') )
{ {
this.document.body.classList.remove(className); this.document.body.classList.remove(className);
} }
}); }
this.document.body.classList.add(this.fuseConfig.colorTheme); this.document.body.classList.add(this.fuseConfig.colorTheme);
}); });

View File

@ -11,6 +11,7 @@ import { FuseConfig } from '@fuse/types';
export const fuseConfig: FuseConfig = { export const fuseConfig: FuseConfig = {
// Color themes can be defined in src/app/app.theme.scss // Color themes can be defined in src/app/app.theme.scss
colorTheme : 'theme-default', colorTheme : 'theme-default',
customScrollbars: true,
layout : { layout : {
style : 'vertical-layout-1', style : 'vertical-layout-1',
width : 'fullwidth', width : 'fullwidth',
@ -38,6 +39,5 @@ export const fuseConfig: FuseConfig = {
hidden : false, hidden : false,
position: 'right' position: 'right'
} }
}, }
customScrollbars: true
}; };

View File

@ -22,7 +22,8 @@
</div> </div>
<div class="navbar-scroll-container" fusePerfectScrollbar [fusePerfectScrollbarOptions]="{suppressScrollX: true}"> <div class="navbar-scroll-container" [ngClass]="fuseConfig.layout.navbar.primaryBackground"
fusePerfectScrollbar [fusePerfectScrollbarOptions]="{suppressScrollX: true}">
<div class="user" fxLayout="column" [ngClass]="fuseConfig.layout.navbar.secondaryBackground"> <div class="user" fxLayout="column" [ngClass]="fuseConfig.layout.navbar.secondaryBackground">
@ -34,7 +35,7 @@
</div> </div>
<div class="navbar-content" [ngClass]="fuseConfig.layout.navbar.primaryBackground"> <div class="navbar-content">
<fuse-navigation layout="vertical"></fuse-navigation> <fuse-navigation layout="vertical"></fuse-navigation>
</div> </div>

View File

@ -1,7 +1,7 @@
import { Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router'; import { NavigationEnd, Router } from '@angular/router';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { filter, take, takeUntil } from 'rxjs/operators'; import { delay, filter, take, takeUntil } from 'rxjs/operators';
import { FuseConfigService } from '@fuse/services/config.service'; import { FuseConfigService } from '@fuse/services/config.service';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service'; import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
@ -17,7 +17,6 @@ import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';
export class NavbarVerticalStyle1Component implements OnInit, OnDestroy export class NavbarVerticalStyle1Component implements OnInit, OnDestroy
{ {
fuseConfig: any; fuseConfig: any;
fusePerfectScrollbarUpdateTimeout: any;
navigation: any; navigation: any;
// Private // Private
@ -60,11 +59,12 @@ export class NavbarVerticalStyle1Component implements OnInit, OnDestroy
// Update the scrollbar on collapsable item toggle // Update the scrollbar on collapsable item toggle
this._fuseNavigationService.onItemCollapseToggled this._fuseNavigationService.onItemCollapseToggled
.pipe(takeUntil(this._unsubscribeAll)) .pipe(
delay(500),
takeUntil(this._unsubscribeAll)
)
.subscribe(() => { .subscribe(() => {
this.fusePerfectScrollbarUpdateTimeout = setTimeout(() => {
this._fusePerfectScrollbar.update(); this._fusePerfectScrollbar.update();
}, 310);
}); });
// Scroll to the active item position // Scroll to the active item position
@ -135,11 +135,6 @@ export class NavbarVerticalStyle1Component implements OnInit, OnDestroy
*/ */
ngOnDestroy(): void ngOnDestroy(): void
{ {
if ( this.fusePerfectScrollbarUpdateTimeout )
{
clearTimeout(this.fusePerfectScrollbarUpdateTimeout);
}
// Unsubscribe from all subscriptions // Unsubscribe from all subscriptions
this._unsubscribeAll.next(); this._unsubscribeAll.next();
this._unsubscribeAll.complete(); this._unsubscribeAll.complete();

View File

@ -1,7 +1,7 @@
import { Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router'; import { NavigationEnd, Router } from '@angular/router';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { filter, take, takeUntil } from 'rxjs/operators'; import { delay, filter, take, takeUntil } from 'rxjs/operators';
import { FuseConfigService } from '@fuse/services/config.service'; import { FuseConfigService } from '@fuse/services/config.service';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service'; import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
@ -17,7 +17,6 @@ import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';
export class NavbarVerticalStyle2Component implements OnInit, OnDestroy export class NavbarVerticalStyle2Component implements OnInit, OnDestroy
{ {
fuseConfig: any; fuseConfig: any;
fusePerfectScrollbarUpdateTimeout: any;
navigation: any; navigation: any;
// Private // Private
@ -60,11 +59,12 @@ export class NavbarVerticalStyle2Component implements OnInit, OnDestroy
// Update the scrollbar on collapsable item toggle // Update the scrollbar on collapsable item toggle
this._fuseNavigationService.onItemCollapseToggled this._fuseNavigationService.onItemCollapseToggled
.pipe(takeUntil(this._unsubscribeAll)) .pipe(
delay(500),
takeUntil(this._unsubscribeAll)
)
.subscribe(() => { .subscribe(() => {
this.fusePerfectScrollbarUpdateTimeout = setTimeout(() => {
this._fusePerfectScrollbar.update(); this._fusePerfectScrollbar.update();
}, 310);
}); });
// Scroll to the active item position // Scroll to the active item position
@ -135,11 +135,6 @@ export class NavbarVerticalStyle2Component implements OnInit, OnDestroy
*/ */
ngOnDestroy(): void ngOnDestroy(): void
{ {
if ( this.fusePerfectScrollbarUpdateTimeout )
{
clearTimeout(this.fusePerfectScrollbarUpdateTimeout);
}
// Unsubscribe from all subscriptions // Unsubscribe from all subscriptions
this._unsubscribeAll.next(); this._unsubscribeAll.next();
this._unsubscribeAll.complete(); this._unsubscribeAll.complete();