diff --git a/.editorconfig b/.editorconfig
index 54e4850b..0a592d43 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,14 +1,17 @@
-# Editor configuration, see http://editorconfig.org
+# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
-indent_size = 2
indent_style = space
+indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
+[*.ts]
+quote_type = single
+
[*.md]
max_line_length = off
trim_trailing_whitespace = false
diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
similarity index 100%
rename from CODE_OF_CONDUCT.md
rename to .github/CODE_OF_CONDUCT.md
diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md
similarity index 100%
rename from CONTRIBUTING.md
rename to .github/CONTRIBUTING.md
diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
similarity index 100%
rename from ISSUE_TEMPLATE.md
rename to .github/ISSUE_TEMPLATE.md
diff --git a/.github/workflows/daily-project-check.yml b/.github/workflows/daily-project-check.yml
new file mode 100644
index 00000000..59d77f6b
--- /dev/null
+++ b/.github/workflows/daily-project-check.yml
@@ -0,0 +1,56 @@
+name: Daily project check
+
+on:
+ schedule:
+ # build runs every weekday at 3AM UTC
+ - cron: '0 3 * * 1-5'
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [22.x]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'npm'
+ - name: Install dependencies
+ run: npm ci
+ - name: Project check
+ run: |
+ npm run build-lib:prod
+ npm run test-lib:prod
+# npm run lint
+ env:
+ CI: true
+
+ e2e-chrome:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Use Node.js 22
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ - run: npm ci
+ - name: e2e chrome test
+ uses: cypress-io/github-action@v6
+ timeout-minutes: 5
+ with:
+ browser: chrome
+ build: npm run build-lib:prod
+ start: npm start
+ wait-on: 'http://localhost:4200'
+ env:
+ BROWSER: chrome
diff --git a/.github/workflows/project-check.yml b/.github/workflows/project-check.yml
new file mode 100644
index 00000000..96224d27
--- /dev/null
+++ b/.github/workflows/project-check.yml
@@ -0,0 +1,60 @@
+name: Project check
+
+on:
+ push:
+ branches:
+ - master
+ - v2
+ pull_request:
+ branches:
+ - master
+ - v2
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [22.x]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'npm'
+ - name: Install dependencies
+ run: npm ci
+ - name: Project check
+ run: |
+ npm run build-lib:prod
+ npm run test-lib:prod
+# npm run lint
+ env:
+ CI: true
+
+ e2e-chrome:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Use Node.js 22
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ - run: npm ci
+ - name: e2e chrome test
+ uses: cypress-io/github-action@v6
+ timeout-minutes: 5
+ with:
+ browser: chrome
+ build: npm run build-lib:prod
+ start: npm start
+ wait-on: 'http://localhost:4200'
+ env:
+ BROWSER: chrome
diff --git a/.gitignore b/.gitignore
index 1b28fd59..eabd950d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,20 +1,46 @@
-# Misc
-# package-lock.json
+# See http://help.github.com/ignore-files/ for more about ignoring files.
-# Folders to ignore
-node_modules
-/coverage
+# Compiled output
+/dist
+/tmp
+/out-tsc
+/bazel-out
+
+# Node
+/node_modules
+npm-debug.log
+yarn-error.log
+
+# profiling files
+chrome-profiler-events*.json
+speed-measure-plugin*.json
# IDEs and editors
-/.idea
+.idea/
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
-# IDE - VSCode
+# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
+.history/*
+
+# Miscellaneous
+/.angular/cache
+.sass-cache/
+/connect.lock
+/coverage
+/libpeerconnection.log
+testem.log
+/typings
-# System Files
+# System files
.DS_Store
Thumbs.db
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 54f9dd8a..775e3052 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,496 @@
### [@coreui/angular](https://coreui.io/) changelog
+##### `v2.20.0`
+
+- update to `Angular 20.2`
+
+##### `v2.19.1`
+
+- fix(app-sidebar-nav-items): dropdown closes on item click, close #222, thanks @marcoscg
+- chore(dependencies): update
+
+##### `v2.19.0`
+
+- update to `Angular 19`
+
+##### `v2.18.0`
+
+- update to `Angular 18`
+
+##### `v2.17.0`
+
+- update to `Angular 17` - thanks: @vag1830
+
+##### `v2.16.1`
+
+- chore(dependencies): update
+
+##### `v2.16.0`
+
+- update to `Angular 16` - thanks: @vag1830
+
+##### `v2.15.1`
+
+- chore(e2e): migration to Cypress
+- fix(testapp): remove Ivy incompatible ngx-perfect-scrollbar
+- chore(workflows): update to npm 18
+- chore(dependencies): update
+
+##### `v2.15.0`
+
+- update to `Angular 15`
+- feat: standalone components
+
+##### `v2.14.1`
+
+- update to `Angular 14.3`
+
+##### `v2.14.0`
+
+- update to `Angular 14`
+
+##### `v2.13.0`
+
+- update to `Angular 13.3`
+
+###### dependencies update
+- update `@angular/animations` to `^13.3.0`
+- update `@angular/common` to `^13.3.0`
+- update `@angular/compiler` to `^13.3.0`
+- update `@angular/core` to `^13.3.0`
+- update `@angular/forms` to `^13.3.0`
+- update `@angular/localize` to `^13.3.0`
+- update `@angular/platform-browser` to `^13.3.0`
+- update `@angular/platform-browser-dynamic` to `^13.3.0`
+- update `@angular/router` to `^13.3.0`
+- update `rxjs` to `^7.5.5`
+- update `@angular-devkit/build-angular` to `^13.3.0`
+- update `@angular/cli` to `^13.3.0`
+- update `@angular/compiler-cli` to `^13.3.0`
+- update `@angular/language-service` to `^13.3.0`
+- update `@types/jasmine` to `^3.10.4`
+- update `@types/node` to `^16.11.26`
+- update `jasmine-core` to `~4.0.1`
+- update `karma-coverage` to `~2.1.1`
+- update `ng-packagr` to `^13.3.0`
+- update `typescript` to `~4.6.2`
+- update `node` to `^14.15.0 || >=16.10.0`
+
+##### `v2.12.0`
+
+- update to `Angular 12.2`
+- refactor(library): typings, api surface
+- refactor(app): minor fixes
+
+###### dependencies update
+- update `@angular/animations` to `^12.2.16`
+- update `@angular/common` to `^12.2.16`
+- update `@angular/compiler` to `^12.2.16`
+- update `@angular/core` to `^12.2.16`
+- update `@angular/forms` to `^12.2.16`
+- update `@angular/localize` to `^12.2.16`
+- update `@angular/platform-browser` to `^12.2.16`
+- update `@angular/platform-browser-dynamic` to `^12.2.16`
+- update `@angular/router` to `^12.2.16`
+- update `zone.js` to `~0.11.4`
+- update `@angular-devkit/build-angular` to `^12.2.16`
+- update `@angular/cli` to `^12.2.16`
+- update `@angular/compiler-cli` to `^12.2.16`
+- update `@angular/language-service` to `^12.2.16`
+- update `@types/jasminewd2` to `^2.0.10`
+- update `jasmine-spec-reporter` to `~7.0.0`
+- update `karma` to `^6.3.17`
+- update `ng-packagr` to `^12.2.7`
+- update `typescript` to `~4.3.5`
+
+##### `v2.11.3`
+
+- ##### `update to Angular 11.2.14`
+
+###### dependencies update
+- update `@angular/animations` to `^11.2.14`
+- update `@angular/common` to `^11.2.14`
+- update `@angular/compiler` to `^11.2.14`
+- update `@angular/core` to `^11.2.14`
+- update `@angular/forms` to `^11.2.14`
+- update `@angular/localize` to `^11.2.14`
+- update `@angular/platform-browser` to `^11.2.14`
+- update `@angular/platform-browser-dynamic` to `^11.2.14`
+- update `@angular/router` to `^11.2.14`
+- update `rxjs` to `^6.6.7`
+- update `tslib` to `^2.3.1`
+- update `zone.js` to `^0.11.5`
+- update `@angular-devkit/build-angular` to `^0.1102.18`
+- update `@angular/cli` to `^11.2.18`
+- update `@angular/compiler-cli` to `^11.2.14`
+- update `@angular/language-service` to `^11.2.14`
+- update `@types/jasmine` to `^3.6.11`
+- update `@types/node` to `^14.18.12`
+- update `codelyzer` to `^6.0.2`
+- update `jasmine-core` to `~3.10.1`
+- update `karma-chrome-launcher` to `~3.1.1`
+- update `karma-jasmine-html-reporter` to `^1.7.0`
+- update `ngx-perfect-scrollbar` to `^10.1.1`
+- update `shelljs` to `^0.8.5`
+- update `typescript` to `~4.0.8`
+
+##### `v2.11.2`
+
+- ##### `update to Angular 11.2`
+
+###### dependencies update
+- update `@angular/animations` to `^11.2.2`
+- update `@angular/common` to `^11.2.2`
+- update `@angular/compiler` to `^11.2.2`
+- update `@angular/core` to `^11.2.2`
+- update `@angular/forms` to `^11.2.2`
+- update `@angular/localize` to `^11.2.2`
+- update `@angular/platform-browser` to `^11.2.2`
+- update `@angular/platform-browser-dynamic` to `^11.2.2`
+- update `@angular/router` to `^11.2.2`
+- update `tslib` to `^2.1.0`
+- update `zone.js` to `^0.11.4`
+- update `@angular-devkit/build-angular` to `^0.1102.1`
+- update `@angular/cli` to `^11.2.1`
+- update `@angular/compiler-cli` to `^11.2.2`
+- update `@angular/language-service` to `^11.2.2`
+- update `@types/jasmine` to `^3.6.4`
+- update `@types/node` to `^14.14.31`
+- update `codelyzer` to `^6.0.1`
+- update `jasmine-spec-reporter` to `~5.0.2`
+- update `karma-jasmine` to `~4.0.1`
+- update `karma-jasmine-html-reporter` to `^1.5.4`
+- update `ng-packagr` to `^11.2.4`
+- update `tslint` to `~6.1.3`
+
+
+##### `v2.11.1`
+
+- ##### `update to Angular 11.1`
+
+###### dependencies update
+- update `@angular/animations` to `^11.1.0`
+- update `@angular/common` to `^11.1.0`
+- update `@angular/compiler` to `^11.1.0`
+- update `@angular/core` to `^11.1.0`
+- update `@angular/forms` to `^11.1.0`
+- update `@angular/localize` to `^11.1.0`
+- update `@angular/platform-browser` to `^11.1.0`
+- update `@angular/platform-browser-dynamic` to `^11.1.0`
+- update `@angular/router` to `^11.1.0`
+- update `@angular-devkit/build-angular` to `^0.1101.1`
+- update `@angular/cli` to `^11.1.1`
+- update `@angular/compiler-cli` to `^11.1.0`
+- update `@angular/language-service` to `^11.1.0`
+- update `@types/jasmine` to `^3.6.3`
+- update `@types/node` to `^14.14.22`
+- update `ng-packagr` to `^11.1.2`
+
+
+##### `v2.11.0`
+
+- chore: update to `Angular 11` and `TypeScript 4`
+ - [https://update.angular.io/](https://update.angular.io/?v=10.2-11.0)
+ - [https://v11.angular.io/guide/updating-to-version-11](https://angular.io/guide/updating-to-version-11)
+ - [TypeScript: Documentation - TypeScript 4.0](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html)
+ - remove deprecated support for IE 9, 10, and IE mobile
+
+###### dependencies update
+- update `@angular/animations` to `^11.0.9`
+- update `@angular/common` to `^11.0.9`
+- update `@angular/compiler` to `^11.0.9`
+- update `@angular/core` to `^11.0.9`
+- update `@angular/forms` to `^11.0.9`
+- update `@angular/localize` to `^11.0.9`
+- update `@angular/platform-browser` to `^11.0.9`
+- update `@angular/platform-browser-dynamic` to `^11.0.9`
+- update `@angular/router` to `^11.0.9`
+- update `zone.js` to `^0.11.3`
+- update `@angular-devkit/build-angular` to `^0.1100.7`
+- update `@angular/cli` to `^11.0.7`
+- update `@angular/compiler-cli` to `^11.0.9`
+- update `@angular/language-service` to `^11.0.9`
+- update `@types/jasmine` to `~3.6.0`
+- update `codelyzer` to `^6.0.0`
+- update `jasmine-core` to `~3.6.0`
+- update `karma` to `^5.2.3`
+- update `karma-coverage` to `~2.0.3`
+- update `ng-packagr` to `^11.0.3`
+- update `ts-node` to `^9.1.1`
+- update `typescript` to `~4.0.5`
+
+
+##### `v2.10.0`
+
+- chore: update to `Angular 10` and `TypeScript 3.9`
+ - [https://update.angular.io/](https://update.angular.io/?v=9.1-10.2)
+ - [https://v10.angular.io/guide/updating-to-version-10](https://v10.angular.io/guide/updating-to-version-10)
+ - [TypeScript: Documentation - TypeScript 3.9](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html)
+
+
+- test: deprecate `async()` in favour of `waitForAsync()`
+
+###### dependencies update
+- update `@angular/animations` to `^10.2.4`
+- update `@angular/common` to `^10.2.4`
+- update `@angular/compiler` to `^10.2.4`
+- update `@angular/core` to `^10.2.4`
+- update `@angular/forms` to `^10.2.4`
+- update `@angular/localize` to `^10.2.4`
+- update `@angular/platform-browser` to `^10.2.4`
+- update `@angular/platform-browser-dynamic` to `^10.2.4`
+- update `@angular/router` to `^10.2.4`
+- update `tslib` to `^2.0.0`
+- update `@angular-devkit/build-angular` to `^0.1002.1`
+- update `@angular-devkit/build-ng-packagr` to `^0.1002.1`
+- update `@angular/cli` to `^10.2.1`
+- update `@angular/compiler-cli` to `^10.2.4`
+- update `@angular/language-service` to `^10.2.4`
+- update `codelyzer` to `^6.0.1`
+- update `jasmine-spec-reporter` to `~5.0.0`
+- update `karma` to `~5.0.0`
+- update `karma-chrome-launcher` to `~3.1.0`
+- update `karma-coverage-istanbul-reporter` to `~3.0.2`
+- update `karma-jasmine` to `~4.0.0`
+- update `karma-jasmine-html-reporter` to `^1.5.0`
+- update `ng-packagr` to `^10.1.0`
+- update `ngx-perfect-scrollbar` to `^10.1.0`
+- update `protractor` to `~7.0.0`
+- update `tslint` to `~6.1.0`
+- update `typescript` to `~3.9.7`
+
+##### `v2.9.6`
+- fix: use type INavData instead of any
+- chore(.github): add project checks workflows
+- test: minor updates e2e, unit
+
+###### dependencies update
+- update `@angular/animations` to `^9.1.13`
+- update `@angular/common` to `^9.1.13`
+- update `@angular/compiler` to `^9.1.13`
+- update `@angular/core` to `^9.1.13`
+- update `@angular/forms` to `^9.1.13`
+- update `@angular/localize` to `^9.1.13`
+- update `@angular/platform-browser` to `^9.1.13`
+- update `@angular/platform-browser-dynamic` to `^9.1.13`
+- update `@angular/router` to `^9.1.13`
+- update `rxjs` to `^6.6.3`
+- update `tslib` to `^1.14.1`
+- update `@angular-devkit/build-angular` to `^0.901.13`
+- update `@angular-devkit/build-ng-packagr` to `^0.901.13`
+- update `@angular/cli` to `^9.1.13`
+- update `@angular/compiler-cli` to `^9.1.13`
+- update `@angular/language-service` to `^9.1.13`
+- update `@types/jasmine` to `^3.6.2`
+- update `@types/node` to `^14.14.20`
+- update `karma` to `^5.2.3`
+- update `simple-line-icons` to `^2.5.5`
+---
+- update `stylus@0.54.8` with `npm --depth 2 update stylus`
+
+##### `v2.9.4`
+- fix: routerLinkActiveOptions not passed to SidebarNavLink - thanks @CloudStrife28492 fixes #107
+
+##### `v2.9.3`
+- fix: add missing AppSidebarNavComponent/AppSidebarMinimizer to public api - thanks @coyoteecd fixes #110
+
+###### dependencies update
+- update `@angular/animations` to `^9.1.12`
+- update `@angular/common` to `^9.1.12`
+- update `@angular/compiler` to `^9.1.12`
+- update `@angular/core` to `^9.1.12`
+- update `@angular/forms` to `^9.1.12`
+- update `@angular/localize` to `^9.1.12`
+- update `@angular/platform-browser` to `^9.1.12`
+- update `@angular/platform-browser-dynamic` to `^9.1.12`
+- update `@angular/router` to `^9.1.12`
+- update `rxjs` to `^6.6.0`
+- update `tslib` to `^1.13.0`
+- update `@angular-devkit/build-angular` to `^0.901.11`
+- update `@angular-devkit/build-ng-packagr` to `^0.901.11`
+- update `@angular/cli` to `^9.1.11`
+- update `@angular/compiler-cli` to `^9.1.12`
+- update `@angular/language-service` to `^9.1.12`
+- update `@types/jasmine` to `^3.5.11`
+- update `@types/node` to `^13.13.14`
+- update `jasmine-spec-reporter` to `^5.0.2`
+- update `karma` to `^5.1.0`
+- update `karma-jasmine` to `^3.3.1`
+- update `karma-jasmine-html-reporter` to `^1.5.4`
+- update `ng-packagr` to `^9.1.5`
+- update `protractor` to `^7.0.0`
+- update `shelljs` to `^0.8.4`
+- update `ts-node` to `^8.10.2`
+- update `tslint` to `^6.1.2`
+
+##### `v2.9.2`
+- chore: update to `Angular 9.1.1`
+- chore: remove build artifacts from git
+
+###### dependencies update
+- update `@angular/animations` to `^9.1.1`
+- update `@angular/common` to `^9.1.1`
+- update `@angular/compiler` to `^9.1.1`
+- update `@angular/core` to `^9.1.1`
+- update `@angular/forms` to `^9.1.1`
+- update `@angular/localize` to `^9.1.1`
+- update `@angular/platform-browser` to `^9.1.1`
+- update `@angular/platform-browser-dynamic` to `^9.1.1`
+- update `@angular/router` to `^9.1.1`
+- update `rxjs` to `^6.5.5`
+- update `zone.js` to `^0.10.3`
+- update `@angular-devkit/build-angular` to `~0.901.1`
+- update `@angular-devkit/build-ng-packagr` to `~0.901.1`
+- update `@angular/cli` to `^9.1.1`
+- update `@angular/compiler-cli` to `^9.1.1`
+- update `@angular/language-service` to `^9.1.1`
+- update `@types/jasmine` to `^3.5.10`
+- update `@types/jasminewd2` to `~2.0.8`
+- update `@types/node` to `^13.11.1`
+- update `codelyzer` to `^5.2.2`
+- update `jasmine-spec-reporter` to `^5.0.1`
+- update `karma` to `^5.0.1`
+- update `karma-chrome-launcher` to `^3.1.0`
+- update `karma-coverage-istanbul-reporter` to `^2.1.1`
+- update `karma-jasmine` to `^3.1.1`
+- update `karma-jasmine-html-reporter` to `^1.5.3`
+- update `ng-packagr` to `^9.1.0`
+- update `protractor` to `^5.4.3`
+- update `ts-node` to `^8.8.2`
+- update `tslint` to `^6.1.1`
+- update `typescript` to `~3.6.5`
+
+##### `v2.9.1`
+- fix: downgrade TypeScript to ~3.6.4 - thanks @jrocha closes #103
+
+###### dependencies update
+- update `typescript` to `~3.6.4`
+- update `@angular/animations` to `~9.0.5`
+- update `@angular/common` to `~9.0.5`
+- update `@angular/compiler` to `~9.0.5`
+- update `@angular/core` to `~9.0.5`
+- update `@angular/forms` to `~9.0.5`
+- update `@angular/localize` to `^9.0.5`
+- update `@angular/platform-browser` to `~9.0.5`
+- update `@angular/platform-browser-dynamic` to `~9.0.5`
+- update `@angular/router` to `~9.0.5`
+- update `tslib` to `^1.11.1`
+- update `@angular-devkit/build-angular` to `~0.900.5`
+- update `@angular-devkit/build-ng-packagr` to `~0.900.5`
+- update `@angular/cli` to `~9.0.5`
+- update `@angular/compiler-cli` to `~9.0.5`
+- update `@angular/language-service` to `~9.0.5`
+- update `@types/jasmine` to `^3.5.7`
+- update `@types/node` to `^12.12.29`
+- update `ng-packagr` to `^9.0.2`
+- update `ngx-perfect-scrollbar` to `^9.0.0`
+
+##### `v2.9.0`
+- chore: update to `Angular 9.0.0`
+ - [https://update.angular.io/](https://update.angular.io/#8.0:9.0)
+ - [https://angular.io/guide/updating-to-version-9](https://angular.io/guide/updating-to-version-9)
+ - [https://blog.angular.io/version-9-of-angular-now-available-project-ivy-has-arrived](https://blog.angular.io/version-9-of-angular-now-available-project-ivy-has-arrived-23c97b63cfa3)
+
+- chore: update to `TypeScript 3.7`
+ - [https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html)
+ - [https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-6.html](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-6.html)
+
+###### dependencies update
+- update `@angular/animations` to `~9.0.0`
+- update `@angular/common` to `~9.0.0`
+- update `@angular/compiler` to `~9.0.0`
+- update `@angular/core` to `~9.0.0`
+- update `@angular/forms` to `~9.0.0`
+- update `@angular/localize` to `^9.0.0`
+- update `@angular/platform-browser` to `~9.0.0`
+- update `@angular/platform-browser-dynamic` to `~9.0.0`
+- update `@angular/router` to `~9.0.0`
+- update `@angular-devkit/build-angular` to `~0.900.1`
+- update `@angular-devkit/build-ng-packagr` to `~0.900.1`
+- update `@angular/cli` to `~9.0.1`
+- update `@angular/compiler-cli` to `~9.0.0`
+- update `@angular/language-service` to `~9.0.0`
+- update `@types/node` to `^12.12.26`
+- update `@types/jasmine` to `~3.5.3`
+- update `karma-jasmine-html-reporter` to `^1.5.2`
+- update `ng-packagr` to `^9.0.0`
+- update `typescript` to `~3.7.5`
+
+##### `v2.7.5`
+- chore: update to `Angular 9.0.0-rc.12`
+
+###### dependencies update
+- update `@angular/animations` to `~9.0.0-rc.12`
+- update `@angular/common` to `~9.0.0-rc.12`
+- update `@angular/compiler` to `~9.0.0-rc.12`
+- update `@angular/core` to `~9.0.0-rc.12`
+- update `@angular/forms` to `~9.0.0-rc.12`
+- update `@angular/localize` to `^9.0.0-rc.12`
+- update `@angular/platform-browser` to `~9.0.0-rc.12`
+- update `@angular/platform-browser-dynamic` to `~9.0.0-rc.12`
+- update `@angular/router` to `~9.0.0-rc.12`
+- update `@angular-devkit/build-angular` to `~0.900.0-rc.12`
+- update `@angular-devkit/build-ng-packagr` to `~0.900.0-rc.12`
+- update `@angular/cli` to `~9.0.0-rc.12`
+- update `@angular/compiler-cli` to `~9.0.0-rc.12`
+- update `@angular/language-service` to `~9.0.0-rc.12`
+
+##### `v2.7.4`
+- fix: add `SidebarNavHelper` to public-api surface - see: #67
+
+##### `v2.7.3`
+- chore: update to `Angular 9.0.0-rc.9`
+- refactor: `@coreui/angular` components library
+- tests: fix and add some missing tests
+
+###### dependencies update
+- update `@angular/animations` to `~9.0.0-rc.9`
+- update `@angular/common` to `~9.0.0-rc.9`
+- update `@angular/compiler` to `~9.0.0-rc.9`
+- update `@angular/core` to `~9.0.0-rc.9`
+- update `@angular/forms` to `~9.0.0-rc.9`
+- update `@angular/platform-browser` to `~9.0.0-rc.9`
+- update `@angular/platform-browser-dynamic` to `~9.0.0-rc.9`
+- update `@angular/router` to `~9.0.0-rc.9`
+- update `@angular-devkit/build-angular` to `~0.900.0-rc.9`
+- update `@angular-devkit/build-ng-packagr` to `~0.900.0-rc.9`
+- update `@angular/cli` to `~9.0.0-rc.9`
+- update `@angular/compiler-cli` to `~9.0.0-rc.9`
+- update `@angular/language-service` to `~9.0.0-rc.9`
+- update `@types/node` to `^12.11.1`
+- update `@types/jasmine` to `~3.5.0`
+- update `@types/jasminewd2` to `~2.0.3`
+- update `codelyzer` to `^5.1.2`
+- update `jasmine-core` to `~3.5.0`
+- update `jasmine-spec-reporter` to `~4.2.1`
+- update `karma` to `~4.3.0`
+- update `karma-chrome-launcher` to `~3.1.0`
+- update `karma-coverage-istanbul-reporter` to `~2.1.0`
+- update `ng-packagr` to `^9.0.0-rc.7`
+- update `protractor` to `~5.4.2`
+- update `ts-node` to `~8.3.0`
+- update `tslint` to `~5.18.0`
+
+##### `v2.7.2`
+- fix(sidebar-nav): AppSidebarNavLabelComponent is not exported in the AppSidebarModule - thanks @zwiras #63
+
+###### dependencies update
+- update `@angular/animations` to `^9.0.0-rc.7`
+- update `@angular/common` to `^9.0.0-rc.7`
+- update `@angular/compiler` to `^9.0.0-rc.7`
+- update `@angular/core` to `^9.0.0-rc.7`
+- update `@angular/forms` to `^9.0.0-rc.7`
+- update `@angular/platform-browser` to `^9.0.0-rc.7`
+- update `@angular/platform-browser-dynamic` to `^9.0.0-rc.7`
+- update `@angular/router` to `^9.0.0-rc.7`
+- update `@angular-devkit/build-angular` to `^0.900.0-rc.7`
+- update `@angular-devkit/build-ng-packagr` to `^0.900.0-rc.7`
+- update `@angular/cli` to `^9.0.0-rc.7`
+- update `@angular/compiler-cli` to `^9.0.0-rc.7`
+- update `@angular/language-service` to `^9.0.0-rc.7`
+- update `@types/node` to `^12.12.21`
+- update `codelyzer` to `^5.2.1`
+
##### `v2.7.1`
- fix(sidebar-nav): @angular/router has no exported member QueryParamsHandling, see:
- https://github.com/angular/angular/issues/30925
@@ -511,7 +1002,7 @@ usage: set toggler breakpoint
##### `v2.2.1`
- fix: remove `-fixed` class on layout components destroy
- chore: commit `package-lock.json`
-- chore: add [README](./projects/coreui/angular/README.md)
+- chore: add [README](projects/coreui-angular/README.md)
- update: `core-js` to `2.6.0`
- update: `@angular-devkit/build-angular` to `0.11.1`
- update: `@angular-devkit/build-ng-packagr` to `0.11.1`
diff --git a/CLI.md b/CLI.md
new file mode 100644
index 00000000..cdfd72b5
--- /dev/null
+++ b/CLI.md
@@ -0,0 +1,27 @@
+# Angular
+
+This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 20.2.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
+
+## Publishing
+
+After building your library with `ng build angular`, go to the dist folder `cd dist/angular` and run `npm publish`.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
diff --git a/README.md b/README.md
index 2aba3fdc..36f7cffe 100644
--- a/README.md
+++ b/README.md
@@ -1,62 +1,66 @@
# [@coreui/angular](https://coreui.io/angular)
-[![npm package][npm-coreui-angular-badge-latest]][npm-coreui-angular]
-[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
-[![npm-coreui-angular-next][npm-coreui-angular-badge-next]][npm-coreui-angular]
+
+[![npm package][npm-coreui-angular-badge-v2]][npm-coreui-angular]
+[![npm package][npm-coreui-angular-badge-latest]][npm-coreui-angular]
+[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
[](https://github.com/coreui/coreui)
+[![npm package][npm-coreui-badge-v2]][npm-coreui]
[![npm package][npm-coreui-badge]][npm-coreui]
-[![NPM downloads][npm-coreui-download]][npm-coreui]
-
+[![NPM downloads][npm-coreui-download]][npm-coreui]
+
[npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular
-[npm-coreui-angular-badge-latest]: https://img.shields.io/npm/v/@coreui/angular/latest?style=flat-square&color=red
+[npm-coreui-angular-badge-v2]: https://img.shields.io/npm/v/@coreui/angular/v2-ng20?style=flat-square&color=red
+[npm-coreui-angular-badge-latest]: https://img.shields.io/npm/v/@coreui/angular/latest?style=flat-square&color=red
[npm-coreui-angular-badge-next]: https://img.shields.io/npm/v/@coreui/angular/next?style=flat-square&color=red
[npm-coreui-angular-download]: https://img.shields.io/npm/dm/@coreui/angular.svg?style=flat-square
[npm-coreui-angular-next]: https://img.shields.io/npm/v/@coreui/angular/next?style=flat-square
[npm-coreui]: https://www.npmjs.com/package/@coreui/coreui
-[npm-coreui-badge]: https://img.shields.io/npm/v/@coreui/coreui.png?style=flat-square
+[npm-coreui-badge]: https://img.shields.io/npm/v/@coreui/coreui/latest?style=flat-square
+[npm-coreui-badge-v2]: https://img.shields.io/npm/v/@coreui/coreui/v2-lts?style=flat-square
[npm-coreui-download]: https://img.shields.io/npm/dm/@coreui/coreui.svg?style=flat-square
-# CoreUI for Angular 2+ - Free WebApp UI Kit built on top of Bootstrap 4 [](https://twitter.com/intent/tweet?text=CoreUI%20-%20Free%20Bootstrap%204%20Admin%20Template%20&url=https://coreui.io&hashtags=,admin,template,dashboard,panel,free,angular,react,vue)
-
-Please help us on [Product Hunt](https://www.producthunt.com/posts/coreui-open-source-bootstrap-4-admin-template-with-angular-2-react-js-vue-js-support) and [Designer News](https://www.designernews.co/stories/81127). Thanks in advance!
-
-Curious why I decided to create CoreUI? Please read this article: [Jack of all trades, master of none. Why Bootstrap Admin Templates suck.](https://medium.com/@lukaszholeczek/jack-of-all-trades-master-of-none-5ea53ef8a1f#.7eqx1bcd8)
+> [@coreui/angular](https://coreui.io/angular) v2 library project
+> for use with [CoreUI](https://coreui.io/angular/) v2 Bootstrap Admin Template
CoreUI is an Open Source UI Kit built on top of Bootstrap 4. CoreUI is the fastest way to build modern dashboard for any platforms, browser or device. A complete Dashboard and WebApp UI Kit that allows you to quickly build eye-catching, high-quality, high-performance responsive applications using your framework of choice.
## Table of Contents
-* [Templates](#templates)
-* [Admin Templates built on top of CoreUI Pro](#admin-templates-built-on-top-of-coreui-pro)
+* [Template](#template)
* [Prerequisites](#prerequisites)
* [Installation](#coreui-installation)
* [Usage](#usage)
* [What's included](#whats-included)
* [Documentation](#documentation)
-* [Contributing](#contributing)
+* [Changelog](#changelog)
+* [Frameworks](#frameworks)
+* [Templates](#templates)
* [Versioning](#versioning)
+* [Contributing](#contributing)
* [Creators](#creators)
* [Community](#community)
-* [License](#license)
* [Support CoreUI Development](#support-coreui-development)
+* [Copyright and license](#copyright-and-license)
-## Templates
+## Template
* [CoreUI Free Angular Admin Template](https://github.com/coreui/coreui-free-angular-admin-template)
-* 💪 [CoreUI Pro Angular Admin Template](https://coreui.io/pro/angular/)
-
-## Admin Templates built on top of CoreUI Pro
+* 💪 [CoreUI Pro Angular Admin Template](https://coreui.io/angular/)
-| CoreUI Pro | Prime | Root | Alba | Leaf |
-| --- | --- | --- | --- | --- |
-| [](https://coreui.io/pro/angular/)| [](https://coreui.io/admin-templates/angular/prime/?support=1)| [](https://coreui.io/admin-templates/angular/root/?support=1)| [](https://coreui.io/admin-templates/angular/alba/?support=1)| [](https://coreui.io/admin-templates/angular/leaf/?support=1)
#### Prerequisites
-Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager.
+Before you begin, make sure your development environment includes the supported version `Typescript` as well as `Node.js®` and an `npm` package manager.
+
+###### Typescript
+Angular 20 requires `Typescript` version `>=5.9.0 <6.0.0`.
+
+- To check your version, run `tsc -v` in a terminal/console window.
+- To get `Typescript`, go to [www.typescriptlang.org](https://www.typescriptlang.org/).
###### Node.js
-Angular 9 requires `Node.js` version 12.x
+Angular 20 requires `Node.js` version `^20.19.0 || ^22.12.0 || ^24.0.0` or newer.
- To check your version, run `node -v` in a terminal/console window.
- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).
@@ -64,13 +68,13 @@ Angular 9 requires `Node.js` version 12.x
###### Angular CLI
Install the Angular CLI globally using a terminal/console window.
```bash
-npm install -g @angular/cli
+npm install -g @angular/cli@20
```
-##### Update to Angular 9
-see: [https://update.angular.io](https://update.angular.io)
+##### Update to Angular 20
+see: [https://angular.dev/update-guide](https://angular.dev/update-guide?v=19.0-20.0&l=3)
-## CoreUI Installation
+## Installation
Several options are available:
@@ -83,20 +87,21 @@ $ git clone https://github.com/coreui/coreui-angular.git
### NPM
``` bash
-$ npm install @coreui/angular --save
-```
-
-### Yarn
-
-``` bash
-$ yarn add @coreui/angular
+$ npm install @coreui/angular@2.20 --save
```
## Usage
### CSS
-Copy-paste the stylesheet `` into your `
` before all other stylesheets to load our CSS.
+Import scss in `src/scss/style.scss`
+
+```scss
+// Import styles
+@import "@coreui/coreui/scss/coreui";
+```
+
+Or copy-paste the stylesheet `` into your `` before all other stylesheets to load our CSS.
``` html
@@ -110,25 +115,40 @@ Within the download you'll find the following directories and files, logically g
coreui/
├── build/
├── dist/
-├── scripts/
+├── projects/
└── src/
```
## Documentation
-The documentation for the CoreUI Free Bootstrap Admin Template is hosted at our website [CoreUI](https://coreui.io/angular/)
+The documentation for the CoreUI & CoreUI PRO is hosted at our website [CoreUI for Angular](https://coreui.io/angular/docs/)
-## Contributing
+### Changelog
-Please read through our [contributing guidelines](https://github.com/coreui/coreui-angular/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
+See the GitHub [release history](https://github.com/coreui/coreui-angular/releases).
-Editor preferences are available in the [editor config](https://github.com/coreui/coreui-angular/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at .
+## Frameworks
-## Versioning
+CoreUI supports most popular frameworks.
-For transparency into our release cycle and in striving to maintain backward compatibility,CoreUI Free Admin Template is maintained under [the Semantic Versioning guidelines](http://semver.org/).
+- [CoreUI for Bootstap(Vanilla JS)](https://github.com/coreui/coreui)
+- [CoreUI for React](https://github.com/coreui/coreui-react)
+- [CoreUI for Vue](https://github.com/coreui/coreui-vue)
+
+## Templates
+
+Fully featured, out-of-the-box, templates for your application based on CoreUI.
+
+- [Angular Admin Template](https://coreui.io/angular)
+- [Bootstrap Admin Template](https://coreui.io/)
+- [React Admin Template](https://coreui.io/react)
+- [Vue Admin Template](https://coreui.io/vue)
+
+## Contributing
-See [the Releases section of our project](https://github.com/coreui/coreui-angular/releases) for changelogs for each release version.
+Please read through our [contributing guidelines](https://github.com/coreui/coreui-angular/blob/main/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
+
+Editor preferences are available in the [editor config](https://github.com/coreui/coreui-angular/blob/main/.editorconfig) for easy use in common text editors. Read more and download plugins at .
## Creators
@@ -141,20 +161,55 @@ See [the Releases section of our project](https://github.com/coreui/coreui-angul
*
-## Community
+**The CoreUI Team**
-Get updates on CoreUI's development and chat with the project maintainers and community members.
+-
-- Follow [@core_ui on Twitter](https://twitter.com/core_ui).
-- Read and subscribe to [CoreUI Blog](https://coreui.io/blog/).
+## Community
-## Copyright and license
+Stay up to date on the development of CoreUI and reach out to the community with these helpful resources.
-copyright 2017-2019 creativeLabs Łukasz Holeczek. Code released under [the MIT license](https://github.com/coreui/coreui-angular/blob/master/LICENSE).
-There is only one limitation you can't can’t re-distribute the CoreUI as stock. You can’t do this if you modify the CoreUI. In past we faced some problems with persons who tried to sell CoreUI based templates.
+- Read and subscribe to [The Official CoreUI Blog](https://blog.coreui.io/).
+- You can also follow [@core_ui on Twitter](https://twitter.com/core_ui).
## Support CoreUI Development
-CoreUI is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support development by donating on [PayPal](https://www.paypal.me/holeczek), buying [CoreUI Pro Version](https://coreui.io/pro) or buying one of our [premium admin templates](https://genesisui.com/?support=1).
+CoreUI is an MIT-licensed open source project and is completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support development by buying the [CoreUI PRO](https://coreui.io/pricing/) or by becoming a sponsor via [Open Collective](https://opencollective.com/coreui/).
+
+
+
+### Platinum Sponsors
+
+Support this project by [becoming a Platinum Sponsor](https://opencollective.com/coreui/contribute/platinum-sponsor-40959/). A large company logo will be added here with a link to your website.
+
+
+
+### Gold Sponsors
+
+Support this project by [becoming a Gold Sponsor](https://opencollective.com/coreui/contribute/gold-sponsor-40960/). A big company logo will be added here with a link to your website.
+
+
+
+### Silver Sponsors
+
+Support this project by [becoming a Silver Sponsor](https://opencollective.com/coreui/contribute/silver-sponsor-40967/). A medium company logo will be added here with a link to your website.
+
+
+
+### Bronze Sponsors
+
+Support this project by [becoming a Bronze Sponsor](https://opencollective.com/coreui/contribute/bronze-sponsor-40966/). The company avatar will show up here with a link to your OpenCollective Profile.
+
+
+
+### Backers
+
+Thanks to all the backers and sponsors! Support this project by [becoming a backer](https://opencollective.com/coreui/contribute/backer-40965/).
+
+
+
+
+
+## Copyright and license
-As of now I am exploring the possibility of working on CoreUI fulltime - if you are a business that is building core products using CoreUI, I am also open to conversations regarding custom sponsorship / consulting arrangements. Get in touch on [Twitter](https://twitter.com/lukaszholeczek).
+Copyright 2025 creativeLabs Łukasz Holeczek. Code released under the [MIT License](https://github.com/coreui/coreui-angular/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
diff --git a/angular.json b/angular.json
index d2b6badc..65212686 100644
--- a/angular.json
+++ b/angular.json
@@ -3,21 +3,33 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
- "coreui": {
+ "coreui-demo": {
+ "projectType": "application",
+ "schematics": {
+ "@schematics/angular:component": {
+ "style": "scss"
+ },
+ "@schematics/angular:application": {
+ "strict": true
+ }
+ },
"root": "",
"sourceRoot": "src",
- "projectType": "application",
"prefix": "app",
- "schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
- "outputPath": "dist/coreui",
+ "outputPath": "dist/coreui-demo",
"index": "src/index.html",
"main": "src/main.ts",
- "polyfills": "src/polyfills.ts",
+ "polyfills": [
+ "@angular/localize/init",
+ "zone.js",
+ "zone.js/testing"
+ ],
"tsConfig": "src/tsconfig.app.json",
+ "inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
@@ -31,9 +43,15 @@
"configurations": {
"production": {
"budgets": [
+ {
+ "type": "initial",
+ "maximumWarning": "500kb",
+ "maximumError": "1mb"
+ },
{
"type": "anyComponentStyle",
- "maximumWarning": "6kb"
+ "maximumWarning": "2kb",
+ "maximumError": "6kb"
}
],
"fileReplacements": [
@@ -42,42 +60,49 @@
"with": "src/environments/environment.prod.ts"
}
],
- "optimization": true,
- "outputHashing": "all",
- "sourceMap": false,
- "extractCss": true,
- "namedChunks": false,
- "aot": true,
- "extractLicenses": true,
- "vendorChunk": false,
- "buildOptimizer": true
+ "outputHashing": "all"
+ },
+ "development": {
+ "buildOptimizer": false,
+ "optimization": false,
+ "vendorChunk": true,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "namedChunks": true
}
- }
+ },
+ "defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
- "options": {
- "browserTarget": "coreui:build"
- },
"configurations": {
"production": {
- "browserTarget": "coreui:build:production"
+ "buildTarget": "coreui-demo:build:production"
+ },
+ "development": {
+ "buildTarget": "coreui-demo:build:development"
}
- }
+ },
+ "defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
- "browserTarget": "coreui:build"
+ "buildTarget": "coreui-demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
- "polyfills": "src/polyfills.ts",
+ "polyfills": [
+ "@angular/localize/init",
+ "zone.js",
+ "zone.js/testing"
+ ],
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
+ "inlineStyleLanguage": "scss",
"styles": [
"src/scss/style.scss"
],
@@ -88,86 +113,102 @@
]
}
},
- "lint": {
- "builder": "@angular-devkit/build-angular:tslint",
+ "cypress-run": {
+ "builder": "@cypress/schematic:cypress",
"options": {
- "tsConfig": [
- "src/tsconfig.app.json",
- "src/tsconfig.spec.json"
- ],
- "exclude": [
- "**/node_modules/**"
- ]
+ "devServerTarget": "coreui-demo:serve"
+ },
+ "configurations": {
+ "production": {
+ "devServerTarget": "coreui-demo:serve:production"
+ }
}
- }
- }
- },
- "coreui-e2e": {
- "root": "e2e/",
- "projectType": "application",
- "architect": {
- "e2e": {
- "builder": "@angular-devkit/build-angular:protractor",
+ },
+ "cypress-open": {
+ "builder": "@cypress/schematic:cypress",
"options": {
- "protractorConfig": "e2e/protractor.conf.js",
- "devServerTarget": "coreui:serve"
+ "watch": true,
+ "headless": false
}
},
- "lint": {
- "builder": "@angular-devkit/build-angular:tslint",
+ "e2e": {
+ "builder": "@cypress/schematic:cypress",
"options": {
- "tsConfig": "e2e/tsconfig.e2e.json",
- "exclude": [
- "**/node_modules/**"
- ]
+ "devServerTarget": "coreui-demo:serve",
+ "watch": false,
+ "headless": true
+ },
+ "configurations": {
+ "production": {
+ "devServerTarget": "coreui-demo:serve:production"
+ }
}
}
}
},
- "@coreui/angular": {
- "root": "projects/coreui/angular",
- "sourceRoot": "projects/coreui/angular/src",
+ "coreui-angular": {
"projectType": "library",
+ "root": "projects/coreui-angular",
+ "sourceRoot": "projects/coreui-angular/src",
"prefix": "lib",
"architect": {
"build": {
- "builder": "@angular-devkit/build-ng-packagr:build",
+ "builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
- "tsConfig": "projects/coreui/angular/tsconfig.lib.json",
- "project": "projects/coreui/angular/ng-package.json"
+ "project": "projects/coreui-angular/ng-package.json"
},
"configurations": {
"production": {
- "project": "projects/coreui/angular/ng-package.prod.json",
- "tsConfig": "projects/coreui/angular/tsconfig.lib.prod.json"
+ "tsConfig": "projects/coreui-angular/tsconfig.lib.prod.json"
+ },
+ "development": {
+ "tsConfig": "projects/coreui-angular/tsconfig.lib.json"
}
- }
+ },
+ "defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
- "main": "projects/coreui/angular/src/test.ts",
- "tsConfig": "projects/coreui/angular/tsconfig.spec.json",
- "karmaConfig": "projects/coreui/angular/karma.conf.js"
- }
- },
- "lint": {
- "builder": "@angular-devkit/build-angular:tslint",
- "options": {
- "tsConfig": [
- "projects/coreui/angular/tsconfig.lib.json",
- "projects/coreui/angular/tsconfig.spec.json"
- ],
- "exclude": [
- "**/node_modules/**"
- ]
+ "main": "projects/coreui-angular/src/test.ts",
+ "tsConfig": "projects/coreui-angular/tsconfig.spec.json",
+ "karmaConfig": "projects/coreui-angular/karma.conf.js"
}
}
}
}
},
- "defaultProject": "coreui",
"cli": {
- "analytics": false
+ "analytics": false,
+ "schematicCollections": [
+ "@cypress/schematic",
+ "@schematics/angular"
+ ]
+ },
+ "schematics": {
+ "@schematics/angular:component": {
+ "type": "component"
+ },
+ "@schematics/angular:directive": {
+ "type": "directive"
+ },
+ "@schematics/angular:service": {
+ "type": "service"
+ },
+ "@schematics/angular:guard": {
+ "typeSeparator": "."
+ },
+ "@schematics/angular:interceptor": {
+ "typeSeparator": "."
+ },
+ "@schematics/angular:module": {
+ "typeSeparator": "."
+ },
+ "@schematics/angular:pipe": {
+ "typeSeparator": "."
+ },
+ "@schematics/angular:resolver": {
+ "typeSeparator": "."
+ }
}
-}
\ No newline at end of file
+}
diff --git a/browserslist b/browserslist
deleted file mode 100644
index 8e09ab49..00000000
--- a/browserslist
+++ /dev/null
@@ -1,9 +0,0 @@
-# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
-# For additional information regarding the format and rule options, please see:
-# https://github.com/browserslist/browserslist#queries
-# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
-> 0.5%
-last 2 versions
-Firefox ESR
-not dead
-# IE 9-11
\ No newline at end of file
diff --git a/cypress.config.ts b/cypress.config.ts
new file mode 100644
index 00000000..c038da15
--- /dev/null
+++ b/cypress.config.ts
@@ -0,0 +1,9 @@
+import { defineConfig } from 'cypress'
+
+export default defineConfig({
+
+ e2e: {
+ 'baseUrl': 'http://localhost:4200'
+ },
+
+})
diff --git a/cypress/e2e/spec.cy.ts b/cypress/e2e/spec.cy.ts
new file mode 100644
index 00000000..cc3b5a74
--- /dev/null
+++ b/cypress/e2e/spec.cy.ts
@@ -0,0 +1,41 @@
+///
+
+describe('CoreUI v2 template', () => {
+
+ beforeEach(() => {
+ cy.visit('/');
+ });
+
+ it('should display CoreUI Dashboard', () => {
+ cy.viewport(600, 800);
+ const paragraph = cy.get('ng-component');
+ paragraph.should('contain.text', 'CoreUI Dashboard');
+ });
+
+ it('should toggle `sidebar-minimized` body.class on `sidebar-minimizer` click', () => {
+ cy.viewport('macbook-16');
+ cy.get('.app').invoke('attr', 'class').should('not.contain', 'sidebar-minimized');
+ cy.get('.sidebar-minimizer').click();
+ cy.get('.app').invoke('attr', 'class').should('contain', 'sidebar-minimized');
+ cy.get('.sidebar-minimizer').click();
+ cy.get('.app').invoke('attr', 'class').should('not.contain', 'sidebar-minimized');
+ });
+
+ it('should toggle `sidebar-show` body.class on `navbar-toggler` click', () => {
+ cy.viewport(600, 800);
+ cy.get('.app').invoke('attr', 'class').should('not.contain', 'sidebar-show');
+ cy.get('.navbar-toggler.d-lg-none').first().click();
+ cy.get('.app').invoke('attr', 'class').should('contain', 'sidebar-show');
+ cy.get('.navbar-toggler').first().click();
+ cy.get('.app').invoke('attr', 'class').should('not.contain', 'sidebar-show');
+ });
+
+ it('should toggle `aside-menu-lg-show` body.class on `navbar-toggler` click', () => {
+ cy.viewport('macbook-16');
+ cy.get('.app').invoke('attr', 'class').should('not.contain', 'aside-menu-lg-show');
+ cy.get('.navbar-toggler.d-none.d-lg-block').last().click();
+ cy.get('.app').invoke('attr', 'class').should('contain', 'aside-menu-lg-show');
+ cy.get('.navbar-toggler.d-none.d-lg-block').last().click();
+ cy.get('.app').invoke('attr', 'class').should('not.contain', 'aside-menu-lg-show');
+ });
+});
diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json
new file mode 100644
index 00000000..20b22a17
--- /dev/null
+++ b/cypress/fixtures/example.json
@@ -0,0 +1,5 @@
+{
+ "name": "Using fixtures to represent data",
+ "email": "hello@cypress.io"
+}
+
\ No newline at end of file
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts
new file mode 100644
index 00000000..af1f44a0
--- /dev/null
+++ b/cypress/support/commands.ts
@@ -0,0 +1,43 @@
+// ***********************************************
+// This example namespace declaration will help
+// with Intellisense and code completion in your
+// IDE or Text Editor.
+// ***********************************************
+// declare namespace Cypress {
+// interface Chainable {
+// customCommand(param: any): typeof customCommand;
+// }
+// }
+//
+// function customCommand(param: any): void {
+// console.warn(param);
+// }
+//
+// NOTE: You can use it like so:
+// Cypress.Commands.add('customCommand', customCommand);
+//
+// ***********************************************
+// This example commands.js shows you how to
+// create various custom commands and overwrite
+// existing commands.
+//
+// For more comprehensive examples of custom
+// commands please read more here:
+// https://on.cypress.io/custom-commands
+// ***********************************************
+//
+//
+// -- This is a parent command --
+// Cypress.Commands.add("login", (email, password) => { ... })
+//
+//
+// -- This is a child command --
+// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
+//
+//
+// -- This is a dual command --
+// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
+//
+//
+// -- This will overwrite an existing command --
+// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts
new file mode 100644
index 00000000..55540ff7
--- /dev/null
+++ b/cypress/support/e2e.ts
@@ -0,0 +1,17 @@
+// ***********************************************************
+// This example support/e2e.ts is processed and
+// loaded automatically before your test files.
+//
+// This is a great place to put global configuration and
+// behavior that modifies Cypress.
+//
+// You can change the location of this file or turn off
+// automatically serving support files with the
+// 'supportFile' configuration option.
+//
+// You can read more here:
+// https://on.cypress.io/configuration
+// ***********************************************************
+
+// When a command from ./commands is ready to use, import with `import './commands'` syntax
+// import './commands';
diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json
new file mode 100644
index 00000000..9202a7ab
--- /dev/null
+++ b/cypress/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "../tsconfig.json",
+ "include": ["**/*.ts"],
+ "compilerOptions": {
+ "sourceMap": false,
+ "types": ["cypress"],
+ },
+ "exclude": [],
+}
diff --git a/dist/@coreui/angular/README.md b/dist/@coreui/angular/README.md
deleted file mode 100644
index daa168f4..00000000
--- a/dist/@coreui/angular/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# [@coreui/angular](https://coreui.io/angular)
-
-[](https://github.com/coreui/angular)
-[![npm package][npm-coreui-angular-badge]][npm-coreui-angular]
-[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
-[](https://github.com/coreui/coreui-angular)
-[![npm-coreui-angular-next][npm-coreui-angular-next]][npm-coreui-angular]
-[](https://github.com/coreui/coreui)
-[![npm package][npm-coreui-badge]][npm-coreui]
-[![NPM downloads][npm-coreui-download]][npm-coreui]
-
-
-[npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular
-[npm-coreui-angular-badge]: https://img.shields.io/npm/v/@coreui/angular.png?style=flat-square
-[npm-coreui-angular-download]: https://img.shields.io/npm/dm/@coreui/angular.svg?style=flat-square
-[npm-coreui-angular-next]: https://img.shields.io/npm/v/@coreui/angular/next.png?style=flat-square
-[npm-coreui]: https://www.npmjs.com/package/@coreui/coreui
-[npm-coreui-badge]: https://img.shields.io/npm/v/@coreui/coreui.png?style=flat-square
-[npm-coreui-download]: https://img.shields.io/npm/dm/@coreui/coreui.svg?style=flat-square
-
-> [@coreui/angular](https://coreui.io/angular) v2 library project
-> for use with [CoreUI](https://coreui.io/angular/) v2 Bootstrap Admin Template
-
-
-#### Prerequisites
-Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager.
-
-###### Node.js
-Angular requires `Node.js` version 8.x or 10.x.
-
-- To check your version, run `node -v` in a terminal/console window.
-- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).
-
-###### Angular CLI
-Install the Angular CLI globally using a terminal/console window.
-```bash
-npm install -g @angular/cli
-```
-
-### Installation
-Go to the workspace folder and install `@coreui/angular` as a dependency.
-```bash
-npm install @coreui/angular
-```
-
-### Changelog
-
-See the GitHub [release history](https://github.com/coreui/coreui-angular/releases).
-
-### Contributing
-
-See [CONTRIBUTING.md](https://github.com/coreui/coreui-angular/blob/master/CONTRIBUTING.md).
diff --git a/dist/@coreui/angular/bundles/coreui-angular.umd.js b/dist/@coreui/angular/bundles/coreui-angular.umd.js
deleted file mode 100644
index cd275828..00000000
--- a/dist/@coreui/angular/bundles/coreui-angular.umd.js
+++ /dev/null
@@ -1,1863 +0,0 @@
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('rxjs'), require('rxjs/operators')) :
- typeof define === 'function' && define.amd ? define('@coreui/angular', ['exports', '@angular/core', '@angular/common', '@angular/router', 'rxjs', 'rxjs/operators'], factory) :
- (global = global || self, factory((global.coreui = global.coreui || {}, global.coreui.angular = {}), global.ng.core, global.ng.common, global.ng.router, global.rxjs, global.rxjs.operators));
-}(this, (function (exports, core, common, router, rxjs, operators) { 'use strict';
-
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of the
- License at http://www.apache.org/licenses/LICENSE-2.0
-
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
- MERCHANTABLITY OR NON-INFRINGEMENT.
-
- See the Apache Version 2.0 License for specific language governing permissions
- and limitations under the License.
- ***************************************************************************** */
- /* global Reflect, Promise */
-
- var extendStatics = function(d, b) {
- extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
- return extendStatics(d, b);
- };
-
- function __extends(d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- }
-
- var __assign = function() {
- __assign = Object.assign || function __assign(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
- };
-
- function __rest(s, e) {
- var t = {};
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
- }
- return t;
- }
-
- function __decorate(decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- }
-
- function __param(paramIndex, decorator) {
- return function (target, key) { decorator(target, key, paramIndex); }
- }
-
- function __metadata(metadataKey, metadataValue) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
- }
-
- function __awaiter(thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- }
-
- function __generator(thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
- }
-
- function __exportStar(m, exports) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
- }
-
- function __values(o) {
- var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
- if (m) return m.call(o);
- return {
- next: function () {
- if (o && i >= o.length) o = void 0;
- return { value: o && o[i++], done: !o };
- }
- };
- }
-
- function __read(o, n) {
- var m = typeof Symbol === "function" && o[Symbol.iterator];
- if (!m) return o;
- var i = m.call(o), r, ar = [], e;
- try {
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
- }
- catch (error) { e = { error: error }; }
- finally {
- try {
- if (r && !r.done && (m = i["return"])) m.call(i);
- }
- finally { if (e) throw e.error; }
- }
- return ar;
- }
-
- function __spread() {
- for (var ar = [], i = 0; i < arguments.length; i++)
- ar = ar.concat(__read(arguments[i]));
- return ar;
- }
-
- function __spreadArrays() {
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
- r[k] = a[j];
- return r;
- };
-
- function __await(v) {
- return this instanceof __await ? (this.v = v, this) : new __await(v);
- }
-
- function __asyncGenerator(thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
- function fulfill(value) { resume("next", value); }
- function reject(value) { resume("throw", value); }
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
- }
-
- function __asyncDelegator(o) {
- var i, p;
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
- }
-
- function __asyncValues(o) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
- }
-
- function __makeTemplateObject(cooked, raw) {
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
- return cooked;
- };
-
- function __importStar(mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
- result.default = mod;
- return result;
- }
-
- function __importDefault(mod) {
- return (mod && mod.__esModule) ? mod : { default: mod };
- }
-
- var sidebarCssClasses = [
- 'sidebar-show',
- 'sidebar-sm-show',
- 'sidebar-md-show',
- 'sidebar-lg-show',
- 'sidebar-xl-show'
- ];
- var asideMenuCssClasses = [
- 'aside-menu-show',
- 'aside-menu-sm-show',
- 'aside-menu-md-show',
- 'aside-menu-lg-show',
- 'aside-menu-xl-show'
- ];
-
- var RemoveClasses = function (NewClassNames) {
- var MatchClasses = NewClassNames.map(function (Class) { return document.body.classList.contains(Class); });
- return MatchClasses.indexOf(true) !== -1;
- };
- var ɵ0 = RemoveClasses;
- var ToggleClasses = function (Toggle, ClassNames) {
- var Level = ClassNames.indexOf(Toggle);
- var NewClassNames = ClassNames.slice(0, Level + 1);
- if (RemoveClasses(NewClassNames)) {
- NewClassNames.map(function (Class) { return document.body.classList.remove(Class); });
- }
- else {
- document.body.classList.add(Toggle);
- }
- };
- var ClassToggler = /** @class */ (function () {
- function ClassToggler(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- }
- ClassToggler.prototype.removeClasses = function (NewClassNames) {
- var _this = this;
- var MatchClasses = NewClassNames.map(function (Class) { return _this.document.body.classList.contains(Class); });
- return MatchClasses.indexOf(true) !== -1;
- };
- ClassToggler.prototype.toggleClasses = function (Toggle, ClassNames) {
- var _this = this;
- var Level = ClassNames.indexOf(Toggle);
- var NewClassNames = ClassNames.slice(0, Level + 1);
- if (this.removeClasses(NewClassNames)) {
- NewClassNames.map(function (Class) { return _this.renderer.removeClass(_this.document.body, Class); });
- }
- else {
- this.renderer.addClass(this.document.body, Toggle);
- }
- };
- ClassToggler.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- ClassToggler = __decorate([
- core.Injectable(),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], ClassToggler);
- return ClassToggler;
- }());
-
- /**
- * Allows the sidebar to be toggled via click.
- */
- var SidebarToggleDirective = /** @class */ (function () {
- function SidebarToggleDirective(classToggler) {
- this.classToggler = classToggler;
- }
- SidebarToggleDirective.prototype.ngOnInit = function () {
- this.bp = this.breakpoint;
- };
- SidebarToggleDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- var cssClass = this.bp ? "sidebar-" + this.bp + "-show" : sidebarCssClasses[0];
- this.classToggler.toggleClasses(cssClass, sidebarCssClasses);
- };
- SidebarToggleDirective.ctorParameters = function () { return [
- { type: ClassToggler }
- ]; };
- __decorate([
- core.Input('appSidebarToggler'),
- __metadata("design:type", String)
- ], SidebarToggleDirective.prototype, "breakpoint", void 0);
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], SidebarToggleDirective.prototype, "toggleOpen", null);
- SidebarToggleDirective = __decorate([
- core.Directive({
- selector: '[appSidebarToggler]',
- providers: [ClassToggler]
- }),
- __metadata("design:paramtypes", [ClassToggler])
- ], SidebarToggleDirective);
- return SidebarToggleDirective;
- }());
- var SidebarMinimizeDirective = /** @class */ (function () {
- function SidebarMinimizeDirective(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- }
- SidebarMinimizeDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- var body = this.document.body;
- body.classList.contains('sidebar-minimized') ?
- this.renderer.removeClass(body, 'sidebar-minimized') :
- this.renderer.addClass(body, 'sidebar-minimized');
- };
- SidebarMinimizeDirective.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], SidebarMinimizeDirective.prototype, "toggleOpen", null);
- SidebarMinimizeDirective = __decorate([
- core.Directive({
- selector: '[appSidebarMinimizer]'
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], SidebarMinimizeDirective);
- return SidebarMinimizeDirective;
- }());
- var MobileSidebarToggleDirective = /** @class */ (function () {
- function MobileSidebarToggleDirective(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- }
- MobileSidebarToggleDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- var body = this.document.body;
- body.classList.contains('sidebar-show') ?
- this.renderer.removeClass(body, 'sidebar-show') :
- this.renderer.addClass(body, 'sidebar-show');
- };
- MobileSidebarToggleDirective.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], MobileSidebarToggleDirective.prototype, "toggleOpen", null);
- MobileSidebarToggleDirective = __decorate([
- core.Directive({
- selector: '[appMobileSidebarToggler]'
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], MobileSidebarToggleDirective);
- return MobileSidebarToggleDirective;
- }());
- /**
- * Allows the off-canvas sidebar to be closed via click.
- */
- var SidebarOffCanvasCloseDirective = /** @class */ (function () {
- function SidebarOffCanvasCloseDirective(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- }
- SidebarOffCanvasCloseDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- var body = this.document.body;
- if (body.classList.contains('sidebar-off-canvas')) {
- body.classList.contains('sidebar-show') ?
- this.renderer.removeClass(body, 'sidebar-show') :
- this.renderer.addClass(body, 'sidebar-show');
- }
- };
- SidebarOffCanvasCloseDirective.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], SidebarOffCanvasCloseDirective.prototype, "toggleOpen", null);
- SidebarOffCanvasCloseDirective = __decorate([
- core.Directive({
- selector: '[appSidebarClose]'
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], SidebarOffCanvasCloseDirective);
- return SidebarOffCanvasCloseDirective;
- }());
- var BrandMinimizeDirective = /** @class */ (function () {
- function BrandMinimizeDirective(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- }
- BrandMinimizeDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- var body = this.document.body;
- body.classList.contains('brand-minimized') ?
- this.renderer.removeClass(body, 'brand-minimized') :
- this.renderer.addClass(body, 'brand-minimized');
- };
- BrandMinimizeDirective.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], BrandMinimizeDirective.prototype, "toggleOpen", null);
- BrandMinimizeDirective = __decorate([
- core.Directive({
- selector: '[appBrandMinimizer]'
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], BrandMinimizeDirective);
- return BrandMinimizeDirective;
- }());
- /**
- * Allows the aside to be toggled via click.
- */
- var AsideToggleDirective = /** @class */ (function () {
- function AsideToggleDirective(classToggler) {
- this.classToggler = classToggler;
- }
- AsideToggleDirective.prototype.ngOnInit = function () {
- this.bp = this.breakpoint;
- };
- AsideToggleDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- var cssClass = this.bp ? "aside-menu-" + this.bp + "-show" : asideMenuCssClasses[0];
- this.classToggler.toggleClasses(cssClass, asideMenuCssClasses);
- };
- AsideToggleDirective.ctorParameters = function () { return [
- { type: ClassToggler }
- ]; };
- __decorate([
- core.Input('appAsideMenuToggler'),
- __metadata("design:type", String)
- ], AsideToggleDirective.prototype, "breakpoint", void 0);
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], AsideToggleDirective.prototype, "toggleOpen", null);
- AsideToggleDirective = __decorate([
- core.Directive({
- selector: '[appAsideMenuToggler]',
- providers: [ClassToggler]
- }),
- __metadata("design:paramtypes", [ClassToggler])
- ], AsideToggleDirective);
- return AsideToggleDirective;
- }());
- var HtmlAttributesDirective = /** @class */ (function () {
- function HtmlAttributesDirective(renderer, el) {
- this.renderer = renderer;
- this.el = el;
- }
- HtmlAttributesDirective.prototype.ngOnInit = function () {
- var attribs = this.appHtmlAttr;
- for (var attr in attribs) {
- if (attr === 'style' && typeof (attribs[attr]) === 'object') {
- this.setStyle(attribs[attr]);
- }
- else if (attr === 'class') {
- this.addClass(attribs[attr]);
- }
- else {
- this.setAttrib(attr, attribs[attr]);
- }
- }
- };
- HtmlAttributesDirective.prototype.setStyle = function (styles) {
- for (var style in styles) {
- this.renderer.setStyle(this.el.nativeElement, style, styles[style]);
- }
- };
- HtmlAttributesDirective.prototype.addClass = function (classes) {
- var _this = this;
- var classArray = (Array.isArray(classes) ? classes : classes.split(' '));
- classArray.filter(function (element) { return element.length > 0; }).forEach(function (element) {
- _this.renderer.addClass(_this.el.nativeElement, element);
- });
- };
- HtmlAttributesDirective.prototype.setAttrib = function (key, value) {
- value !== null ?
- this.renderer.setAttribute(this.el.nativeElement, key, value) :
- this.renderer.removeAttribute(this.el.nativeElement, key);
- };
- HtmlAttributesDirective.ctorParameters = function () { return [
- { type: core.Renderer2 },
- { type: core.ElementRef }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], HtmlAttributesDirective.prototype, "appHtmlAttr", void 0);
- HtmlAttributesDirective = __decorate([
- core.Directive({
- selector: '[appHtmlAttr]'
- }),
- __metadata("design:paramtypes", [core.Renderer2,
- core.ElementRef])
- ], HtmlAttributesDirective);
- return HtmlAttributesDirective;
- }());
-
- var LayoutModule = /** @class */ (function () {
- function LayoutModule() {
- }
- LayoutModule = __decorate([
- core.NgModule({
- imports: [
- common.CommonModule
- ],
- exports: [
- AsideToggleDirective,
- BrandMinimizeDirective,
- MobileSidebarToggleDirective,
- SidebarToggleDirective,
- SidebarMinimizeDirective,
- SidebarOffCanvasCloseDirective,
- HtmlAttributesDirective
- ],
- declarations: [
- AsideToggleDirective,
- BrandMinimizeDirective,
- MobileSidebarToggleDirective,
- SidebarToggleDirective,
- SidebarMinimizeDirective,
- SidebarOffCanvasCloseDirective,
- HtmlAttributesDirective
- ],
- providers: [
- ClassToggler
- ]
- })
- ], LayoutModule);
- return LayoutModule;
- }());
-
- function Replace(el) {
- var nativeElement = el.nativeElement;
- var parentElement = nativeElement.parentElement;
- // move all children out of the element
- while (nativeElement.firstChild) {
- parentElement.insertBefore(nativeElement.firstChild, nativeElement);
- }
- // remove the empty element(the host)
- parentElement.removeChild(nativeElement);
- }
-
- var AppAsideComponent = /** @class */ (function () {
- function AppAsideComponent(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- this.fixedClass = 'aside-menu-fixed';
- this._aside = true;
- }
- AppAsideComponent.prototype.ngOnInit = function () {
- this.isFixed(this.fixed);
- this.isOffCanvas(this.offCanvas);
- this.displayBreakpoint(this.display);
- };
- AppAsideComponent.prototype.ngOnDestroy = function () {
- this.renderer.removeClass(this.document.body, this.fixedClass);
- };
- AppAsideComponent.prototype.isFixed = function (fixed) {
- if (fixed === void 0) { fixed = this.fixed; }
- if (fixed) {
- this.renderer.addClass(this.document.body, this.fixedClass);
- }
- };
- AppAsideComponent.prototype.isOffCanvas = function (offCanvas) {
- if (offCanvas === void 0) { offCanvas = this.offCanvas; }
- if (offCanvas) {
- this.renderer.addClass(this.document.body, 'aside-menu-off-canvas');
- }
- };
- AppAsideComponent.prototype.displayBreakpoint = function (display) {
- if (display === void 0) { display = this.display; }
- if (display !== false) {
- var cssClass = this.display ? "aside-menu-" + this.display + "-show" : asideMenuCssClasses[0];
- this.renderer.addClass(this.document.body, cssClass);
- }
- };
- AppAsideComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppAsideComponent.prototype, "display", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppAsideComponent.prototype, "fixed", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppAsideComponent.prototype, "offCanvas", void 0);
- __decorate([
- core.HostBinding('class.aside-menu'),
- __metadata("design:type", Object)
- ], AppAsideComponent.prototype, "_aside", void 0);
- AppAsideComponent = __decorate([
- core.Component({
- selector: 'app-aside, cui-aside',
- template: ""
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], AppAsideComponent);
- return AppAsideComponent;
- }());
-
- var AppAsideModule = /** @class */ (function () {
- function AppAsideModule() {
- }
- AppAsideModule = __decorate([
- core.NgModule({
- imports: [
- common.CommonModule,
- LayoutModule
- ],
- exports: [
- AppAsideComponent,
- LayoutModule
- ],
- declarations: [
- AppAsideComponent
- ]
- })
- ], AppAsideModule);
- return AppAsideModule;
- }());
-
- var AppBreadcrumbService = /** @class */ (function () {
- function AppBreadcrumbService(router$1, route) {
- var _this = this;
- this.router = router$1;
- this.route = route;
- this._breadcrumbs = new rxjs.BehaviorSubject(new Array());
- this.breadcrumbs = this._breadcrumbs.asObservable();
- this.router.events.pipe(operators.filter(function (event) { return event instanceof router.NavigationEnd; })).subscribe(function (event) {
- var breadcrumbs = [];
- var currentRoute = _this.route.root, url = '';
- do {
- var childrenRoutes = currentRoute.children;
- currentRoute = null;
- // tslint:disable-next-line:no-shadowed-variable
- childrenRoutes.forEach(function (route) {
- if (route.outlet === 'primary') {
- var routeSnapshot = route.snapshot;
- url += '/' + routeSnapshot.url.map(function (segment) { return segment.path; }).join('/');
- breadcrumbs.push({
- label: route.snapshot.data,
- url: url
- });
- currentRoute = route;
- }
- });
- } while (currentRoute);
- _this._breadcrumbs.next(Object.assign([], breadcrumbs));
- return breadcrumbs;
- });
- }
- AppBreadcrumbService.ctorParameters = function () { return [
- { type: router.Router },
- { type: router.ActivatedRoute }
- ]; };
- AppBreadcrumbService.ɵprov = core.ɵɵdefineInjectable({ factory: function AppBreadcrumbService_Factory() { return new AppBreadcrumbService(core.ɵɵinject(router.Router), core.ɵɵinject(router.ActivatedRoute)); }, token: AppBreadcrumbService, providedIn: "root" });
- AppBreadcrumbService = __decorate([
- core.Injectable({
- providedIn: 'root'
- }),
- __metadata("design:paramtypes", [router.Router, router.ActivatedRoute])
- ], AppBreadcrumbService);
- return AppBreadcrumbService;
- }());
-
- var AppBreadcrumbComponent = /** @class */ (function () {
- function AppBreadcrumbComponent(document, renderer, service, el) {
- this.document = document;
- this.renderer = renderer;
- this.service = service;
- this.el = el;
- this.fixedClass = 'breadcrumb-fixed';
- }
- AppBreadcrumbComponent.prototype.ngOnInit = function () {
- Replace(this.el);
- this.isFixed(this.fixed);
- this.breadcrumbs = this.service.breadcrumbs;
- };
- AppBreadcrumbComponent.prototype.ngOnDestroy = function () {
- this.renderer.removeClass(this.document.body, this.fixedClass);
- };
- AppBreadcrumbComponent.prototype.isFixed = function (fixed) {
- if (fixed === void 0) { fixed = this.fixed; }
- if (fixed) {
- this.renderer.addClass(this.document.body, this.fixedClass);
- }
- };
- AppBreadcrumbComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 },
- { type: AppBreadcrumbService },
- { type: core.ElementRef }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppBreadcrumbComponent.prototype, "fixed", void 0);
- AppBreadcrumbComponent = __decorate([
- core.Component({
- selector: 'app-breadcrumb',
- template: "\n \n \n {{breadcrumb.label.title}}\n {{breadcrumb.label.title}}\n \n \n "
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2,
- AppBreadcrumbService,
- core.ElementRef])
- ], AppBreadcrumbComponent);
- return AppBreadcrumbComponent;
- }());
-
- var CuiBreadcrumbComponent = /** @class */ (function () {
- function CuiBreadcrumbComponent(document, renderer, service) {
- this.document = document;
- this.renderer = renderer;
- this.service = service;
- this.fixedClass = 'breadcrumb-fixed';
- }
- CuiBreadcrumbComponent.prototype.ngOnInit = function () {
- this.isFixed(this.fixed);
- this.breadcrumbs = this.service.breadcrumbs;
- };
- CuiBreadcrumbComponent.prototype.ngOnDestroy = function () {
- this.renderer.removeClass(this.document.body, this.fixedClass);
- };
- CuiBreadcrumbComponent.prototype.isFixed = function (fixed) {
- if (fixed === void 0) { fixed = this.fixed; }
- if (fixed) {
- this.renderer.addClass(this.document.body, this.fixedClass);
- }
- };
- CuiBreadcrumbComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 },
- { type: AppBreadcrumbService }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], CuiBreadcrumbComponent.prototype, "fixed", void 0);
- CuiBreadcrumbComponent = __decorate([
- core.Component({
- // tslint:disable-next-line:component-selector
- selector: 'cui-breadcrumb',
- template: "\r\n \r\n - \r\n {{breadcrumb.label.title}}\r\n {{breadcrumb.label.title}}\r\n
\r\n \r\n \r\n
\r\n"
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2,
- AppBreadcrumbService])
- ], CuiBreadcrumbComponent);
- return CuiBreadcrumbComponent;
- }());
-
- // @dynamic
- var AppBreadcrumbModule = /** @class */ (function () {
- function AppBreadcrumbModule() {
- }
- AppBreadcrumbModule_1 = AppBreadcrumbModule;
- AppBreadcrumbModule.forRoot = function (config) {
- return {
- ngModule: AppBreadcrumbModule_1,
- providers: [
- AppBreadcrumbService
- ]
- };
- };
- var AppBreadcrumbModule_1;
- AppBreadcrumbModule = AppBreadcrumbModule_1 = __decorate([
- core.NgModule({
- imports: [common.CommonModule, router.RouterModule],
- exports: [AppBreadcrumbComponent, CuiBreadcrumbComponent],
- declarations: [AppBreadcrumbComponent, CuiBreadcrumbComponent]
- })
- ], AppBreadcrumbModule);
- return AppBreadcrumbModule;
- }());
-
- var AppFooterComponent = /** @class */ (function () {
- function AppFooterComponent(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- this.fixedClass = 'footer-fixed';
- this._footer = true;
- }
- AppFooterComponent.prototype.ngOnInit = function () {
- this.isFixed(this.fixed);
- };
- AppFooterComponent.prototype.ngOnDestroy = function () {
- this.renderer.removeClass(this.document.body, this.fixedClass);
- };
- AppFooterComponent.prototype.isFixed = function (fixed) {
- if (fixed === void 0) { fixed = this.fixed; }
- if (fixed) {
- this.renderer.addClass(this.document.body, this.fixedClass);
- }
- };
- AppFooterComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppFooterComponent.prototype, "fixed", void 0);
- __decorate([
- core.HostBinding('class.app-footer'),
- __metadata("design:type", Object)
- ], AppFooterComponent.prototype, "_footer", void 0);
- AppFooterComponent = __decorate([
- core.Component({
- selector: 'app-footer, cui-footer',
- template: ""
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], AppFooterComponent);
- return AppFooterComponent;
- }());
-
- var AppFooterModule = /** @class */ (function () {
- function AppFooterModule() {
- }
- AppFooterModule = __decorate([
- core.NgModule({
- imports: [common.CommonModule],
- exports: [AppFooterComponent],
- declarations: [AppFooterComponent]
- })
- ], AppFooterModule);
- return AppFooterModule;
- }());
-
- var AppHeaderComponent = /** @class */ (function () {
- function AppHeaderComponent(document, renderer) {
- this.document = document;
- this.renderer = renderer;
- this.navbarBrandText = { icon: '🅲', text: '🅲 CoreUI' };
- this.navbarBrandRouterLink = '';
- this.fixedClass = 'header-fixed';
- this._header = true;
- this._navbar = true;
- this.breakpoints = ['xl', 'lg', 'md', 'sm', 'xs'];
- this.sidebarTogglerClass = 'd-none d-md-block';
- this.sidebarTogglerMobileClass = 'd-lg-none';
- this.asideTogglerClass = 'd-none d-md-block';
- this.asideTogglerMobileClass = 'd-lg-none';
- }
- AppHeaderComponent.prototype.ngOnInit = function () {
- this.isFixed(this.fixed);
- this.navbarBrandImg = Boolean(this.navbarBrand || this.navbarBrandFull || this.navbarBrandMinimized);
- this.navbarBrandRouterLink = this.navbarBrandRouterLink[0] ? this.navbarBrandRouterLink : this.navbarBrandHref;
- this.sidebarTogglerClass = this.setToggerBreakpointClass(this.sidebarToggler);
- this.sidebarTogglerMobileClass = this.setToggerMobileBreakpointClass(this.sidebarToggler);
- this.asideTogglerClass = this.setToggerBreakpointClass(this.asideMenuToggler);
- this.asideTogglerMobileClass = this.setToggerMobileBreakpointClass(this.asideMenuToggler);
- };
- AppHeaderComponent.prototype.ngOnDestroy = function () {
- this.renderer.removeClass(this.document.body, this.fixedClass);
- };
- AppHeaderComponent.prototype.isFixed = function (fixed) {
- if (fixed === void 0) { fixed = this.fixed; }
- if (fixed) {
- this.renderer.addClass(this.document.body, this.fixedClass);
- }
- };
- AppHeaderComponent.prototype.setToggerBreakpointClass = function (breakpoint) {
- if (breakpoint === void 0) { breakpoint = 'md'; }
- var togglerClass = 'd-none d-md-block';
- if (this.breakpoints.includes(breakpoint)) {
- var breakpointIndex = this.breakpoints.indexOf(breakpoint);
- togglerClass = "d-none d-" + breakpoint + "-block";
- }
- return togglerClass;
- };
- AppHeaderComponent.prototype.setToggerMobileBreakpointClass = function (breakpoint) {
- if (breakpoint === void 0) { breakpoint = 'lg'; }
- var togglerClass = 'd-lg-none';
- if (this.breakpoints.includes(breakpoint)) {
- togglerClass = "d-" + breakpoint + "-none";
- }
- return togglerClass;
- };
- AppHeaderComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppHeaderComponent.prototype, "fixed", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "navbarBrand", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "navbarBrandFull", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "navbarBrandMinimized", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "navbarBrandText", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", String)
- ], AppHeaderComponent.prototype, "navbarBrandHref", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "navbarBrandRouterLink", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "sidebarToggler", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppHeaderComponent.prototype, "mobileSidebarToggler", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "asideMenuToggler", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppHeaderComponent.prototype, "mobileAsideMenuToggler", void 0);
- __decorate([
- core.HostBinding('class.app-header'),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "_header", void 0);
- __decorate([
- core.HostBinding('class.navbar'),
- __metadata("design:type", Object)
- ], AppHeaderComponent.prototype, "_navbar", void 0);
- AppHeaderComponent = __decorate([
- core.Component({
- selector: 'app-header, cui-header',
- template: "\r\n \r\n\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n \r\n\r\n"
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2])
- ], AppHeaderComponent);
- return AppHeaderComponent;
- }());
-
- var AppHeaderModule = /** @class */ (function () {
- function AppHeaderModule() {
- }
- AppHeaderModule = __decorate([
- core.NgModule({
- imports: [
- common.CommonModule,
- router.RouterModule,
- LayoutModule
- ],
- exports: [
- AppHeaderComponent,
- LayoutModule
- ],
- declarations: [
- AppHeaderComponent
- ]
- })
- ], AppHeaderModule);
- return AppHeaderModule;
- }());
-
- var AppSidebarService = /** @class */ (function () {
- function AppSidebarService() {
- this.events = new rxjs.BehaviorSubject({});
- this.events$ = this.events.asObservable();
- }
- AppSidebarService.prototype.toggle = function (action) {
- this.events.next(action);
- };
- AppSidebarService.ɵprov = core.ɵɵdefineInjectable({ factory: function AppSidebarService_Factory() { return new AppSidebarService(); }, token: AppSidebarService, providedIn: "root" });
- AppSidebarService = __decorate([
- core.Injectable({
- providedIn: 'root'
- }),
- __metadata("design:paramtypes", [])
- ], AppSidebarService);
- return AppSidebarService;
- }());
-
- var AppSidebarComponent = /** @class */ (function () {
- function AppSidebarComponent(document, renderer, sidebarService) {
- this.document = document;
- this.renderer = renderer;
- this.sidebarService = sidebarService;
- this._minimized = false;
- /**
- * Emits whenever the minimized state of the sidebar changes.
- * Primarily used to facilitate two-way binding.
- */
- this.minimizedChange = new core.EventEmitter();
- this._sidebar = true;
- }
- Object.defineProperty(AppSidebarComponent.prototype, "minimized", {
- get: function () {
- return this._minimized;
- },
- set: function (value) {
- // only update / emit events when the value changes
- if (this._minimized !== value) {
- this._minimized = value;
- this._updateMinimized(value);
- this.minimizedChange.emit(value);
- this.sidebarService.toggle({ minimize: value });
- }
- },
- enumerable: true,
- configurable: true
- });
- AppSidebarComponent.prototype.ngOnInit = function () {
- var _this = this;
- this.displayBreakpoint(this.display);
- this.isCompact(this.compact);
- this.isFixed(this.fixed);
- this.isOffCanvas(this.offCanvas);
- this.sidebarService.toggle({ minimize: this.minimized });
- this.subscriptionEvents = this.sidebarService.events$.subscribe(function (action) {
- if (action.minimize !== undefined) {
- action.minimize === 'toggle' ? _this.toggleMinimized() : _this.minimized = !!action.minimize;
- }
- });
- };
- AppSidebarComponent.prototype.ngOnDestroy = function () {
- this.subscriptionEvents.unsubscribe();
- this.minimizedChange.complete();
- this.renderer.removeClass(this.document.body, 'sidebar-fixed');
- this._updateMinimized(false);
- };
- AppSidebarComponent.prototype.isCompact = function (compact) {
- if (compact === void 0) { compact = this.compact; }
- if (compact) {
- this.renderer.addClass(this.document.body, 'sidebar-compact');
- }
- };
- AppSidebarComponent.prototype.isFixed = function (fixed) {
- if (fixed === void 0) { fixed = this.fixed; }
- if (fixed) {
- this.renderer.addClass(this.document.body, 'sidebar-fixed');
- }
- };
- AppSidebarComponent.prototype.toggleMinimized = function () {
- this.minimized = !this._minimized;
- };
- AppSidebarComponent.prototype.isOffCanvas = function (offCanvas) {
- if (offCanvas === void 0) { offCanvas = this.offCanvas; }
- if (offCanvas) {
- this.renderer.addClass(this.document.body, 'sidebar-off-canvas');
- }
- };
- AppSidebarComponent.prototype.displayBreakpoint = function (display) {
- if (display === void 0) { display = this.display; }
- if (display !== false) {
- var cssClass = display ? "sidebar-" + display + "-show" : sidebarCssClasses[0];
- this.renderer.addClass(this.document.body, cssClass);
- }
- };
- AppSidebarComponent.prototype._updateMinimized = function (minimized) {
- var body = this.document.body;
- if (minimized) {
- this.renderer.addClass(body, 'sidebar-minimized');
- this.renderer.addClass(body, 'brand-minimized');
- }
- else {
- this.renderer.removeClass(body, 'sidebar-minimized');
- this.renderer.removeClass(body, 'brand-minimized');
- }
- };
- AppSidebarComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 },
- { type: AppSidebarService }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppSidebarComponent.prototype, "compact", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarComponent.prototype, "display", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppSidebarComponent.prototype, "fixed", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean)
- ], AppSidebarComponent.prototype, "offCanvas", void 0);
- __decorate([
- core.Input(),
- __metadata("design:type", Boolean),
- __metadata("design:paramtypes", [Boolean])
- ], AppSidebarComponent.prototype, "minimized", null);
- __decorate([
- core.Output(),
- __metadata("design:type", Object)
- ], AppSidebarComponent.prototype, "minimizedChange", void 0);
- __decorate([
- core.HostBinding('class.sidebar'),
- __metadata("design:type", Object)
- ], AppSidebarComponent.prototype, "_sidebar", void 0);
- AppSidebarComponent = __decorate([
- core.Component({
- selector: 'app-sidebar, cui-sidebar',
- template: ""
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2,
- AppSidebarService])
- ], AppSidebarComponent);
- return AppSidebarComponent;
- }());
-
- var AppSidebarFooterComponent = /** @class */ (function () {
- function AppSidebarFooterComponent() {
- this._sidebarFooter = true;
- }
- __decorate([
- core.HostBinding('class.sidebar-footer'),
- __metadata("design:type", Object)
- ], AppSidebarFooterComponent.prototype, "_sidebarFooter", void 0);
- AppSidebarFooterComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-footer, cui-sidebar-footer',
- template: ""
- }),
- __metadata("design:paramtypes", [])
- ], AppSidebarFooterComponent);
- return AppSidebarFooterComponent;
- }());
-
- var AppSidebarFormComponent = /** @class */ (function () {
- function AppSidebarFormComponent() {
- this._sidebarForm = true;
- }
- __decorate([
- core.HostBinding('class.sidebar-form'),
- __metadata("design:type", Object)
- ], AppSidebarFormComponent.prototype, "_sidebarForm", void 0);
- AppSidebarFormComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-form, cui-sidebar-form',
- template: ""
- }),
- __metadata("design:paramtypes", [])
- ], AppSidebarFormComponent);
- return AppSidebarFormComponent;
- }());
-
- var AppSidebarHeaderComponent = /** @class */ (function () {
- function AppSidebarHeaderComponent() {
- this._sidebarHeader = true;
- }
- __decorate([
- core.HostBinding('class.sidebar-header'),
- __metadata("design:type", Object)
- ], AppSidebarHeaderComponent.prototype, "_sidebarHeader", void 0);
- AppSidebarHeaderComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-header, cui-sidebar-header',
- template: ""
- }),
- __metadata("design:paramtypes", [])
- ], AppSidebarHeaderComponent);
- return AppSidebarHeaderComponent;
- }());
-
- var AppSidebarMinimizerComponent = /** @class */ (function () {
- function AppSidebarMinimizerComponent(sidebarService) {
- this.sidebarService = sidebarService;
- this.role = 'button';
- this._minimizer = true;
- }
- AppSidebarMinimizerComponent.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- this.sidebarService.toggle({ minimize: 'toggle' });
- };
- AppSidebarMinimizerComponent.ctorParameters = function () { return [
- { type: AppSidebarService }
- ]; };
- __decorate([
- core.HostBinding('attr.role'), core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarMinimizerComponent.prototype, "role", void 0);
- __decorate([
- core.HostBinding('class.sidebar-minimizer'),
- __metadata("design:type", Object)
- ], AppSidebarMinimizerComponent.prototype, "_minimizer", void 0);
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], AppSidebarMinimizerComponent.prototype, "toggleOpen", null);
- AppSidebarMinimizerComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-minimizer, cui-sidebar-minimizer',
- template: ""
- }),
- __metadata("design:paramtypes", [AppSidebarService])
- ], AppSidebarMinimizerComponent);
- return AppSidebarMinimizerComponent;
- }());
-
- var NavDropdownDirective = /** @class */ (function () {
- function NavDropdownDirective(el) {
- this.el = el;
- }
- NavDropdownDirective.prototype.toggle = function () {
- this.el.nativeElement.classList.toggle('open');
- };
- NavDropdownDirective.ctorParameters = function () { return [
- { type: core.ElementRef }
- ]; };
- NavDropdownDirective = __decorate([
- core.Directive({
- selector: '[appNavDropdown]'
- }),
- __metadata("design:paramtypes", [core.ElementRef])
- ], NavDropdownDirective);
- return NavDropdownDirective;
- }());
- /**
- * Allows the dropdown to be toggled via click.
- */
- var NavDropdownToggleDirective = /** @class */ (function () {
- function NavDropdownToggleDirective(dropdown) {
- this.dropdown = dropdown;
- }
- NavDropdownToggleDirective.prototype.toggleOpen = function ($event) {
- $event.preventDefault();
- this.dropdown.toggle();
- };
- NavDropdownToggleDirective.ctorParameters = function () { return [
- { type: NavDropdownDirective }
- ]; };
- __decorate([
- core.HostListener('click', ['$event']),
- __metadata("design:type", Function),
- __metadata("design:paramtypes", [Object]),
- __metadata("design:returntype", void 0)
- ], NavDropdownToggleDirective.prototype, "toggleOpen", null);
- NavDropdownToggleDirective = __decorate([
- core.Directive({
- selector: '[appNavDropdownToggle]'
- }),
- __metadata("design:paramtypes", [NavDropdownDirective])
- ], NavDropdownToggleDirective);
- return NavDropdownToggleDirective;
- }());
-
- var AppSidebarNavComponent = /** @class */ (function () {
- function AppSidebarNavComponent(router) {
- this.router = router;
- this.navItems = [];
- this._sidebarBav = true;
- this.role = 'nav';
- this.navItemsArray = [];
- }
- AppSidebarNavComponent.prototype.ngOnChanges = function (changes) {
- this.navItemsArray = Array.isArray(this.navItems) ? this.navItems.slice() : [];
- };
- AppSidebarNavComponent.ctorParameters = function () { return [
- { type: router.Router }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Array)
- ], AppSidebarNavComponent.prototype, "navItems", void 0);
- __decorate([
- core.HostBinding('class.sidebar-nav'),
- __metadata("design:type", Object)
- ], AppSidebarNavComponent.prototype, "_sidebarBav", void 0);
- __decorate([
- core.HostBinding('attr.role'), core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarNavComponent.prototype, "role", void 0);
- AppSidebarNavComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav, cui-sidebar-nav',
- template: "\n\n"
- }),
- __metadata("design:paramtypes", [router.Router])
- ], AppSidebarNavComponent);
- return AppSidebarNavComponent;
- }());
-
- var AppSidebarNavDividerComponent = /** @class */ (function () {
- function AppSidebarNavDividerComponent() {
- }
- AppSidebarNavDividerComponent.prototype.ngOnInit = function () { };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarNavDividerComponent.prototype, "item", void 0);
- AppSidebarNavDividerComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-divider, cui-sidebar-nav-divider',
- template: ""
- }),
- __metadata("design:paramtypes", [])
- ], AppSidebarNavDividerComponent);
- return AppSidebarNavDividerComponent;
- }());
-
- var SidebarNavService = /** @class */ (function () {
- function SidebarNavService() {
- }
- SidebarNavService = __decorate([
- core.Injectable()
- ], SidebarNavService);
- return SidebarNavService;
- }());
- var SidebarNavHelper = /** @class */ (function () {
- function SidebarNavHelper() {
- this.hasBadge = function (item) { return Boolean(item.badge); };
- this.hasIcon = function (item) { return Boolean(item.icon); };
- }
- SidebarNavHelper.prototype.itemType = function (item) {
- if (item.divider) {
- return 'divider';
- }
- else if (item.title) {
- return 'title';
- }
- else if (item.children) {
- return 'dropdown';
- }
- else if (item.label) {
- return 'label';
- }
- else if (!Object.keys(item).length) {
- return 'empty';
- }
- else {
- return 'link';
- }
- };
- SidebarNavHelper.prototype.isActive = function (router, item) {
- return router.isActive(item.url, false);
- };
- SidebarNavHelper.prototype.getIconClass = function (item) {
- var classes = {
- 'nav-icon': true
- };
- var icon = item.icon;
- classes[icon] = this.hasIcon(item);
- return classes;
- };
- SidebarNavHelper = __decorate([
- core.Injectable()
- ], SidebarNavHelper);
- return SidebarNavHelper;
- }());
-
- var AppSidebarNavDropdownComponent = /** @class */ (function () {
- function AppSidebarNavDropdownComponent(helper) {
- this.helper = helper;
- }
- AppSidebarNavDropdownComponent.ctorParameters = function () { return [
- { type: SidebarNavHelper }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarNavDropdownComponent.prototype, "item", void 0);
- AppSidebarNavDropdownComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-dropdown, cui-sidebar-nav-dropdown',
- template: "\n \n \n {{item.name}}\n {{ item.badge.text }}\n \n \n \n ",
- providers: [SidebarNavHelper],
- styles: ['.nav-dropdown-toggle { cursor: pointer; }',
- '.nav-dropdown-items { display: block; }']
- }),
- __metadata("design:paramtypes", [SidebarNavHelper])
- ], AppSidebarNavDropdownComponent);
- return AppSidebarNavDropdownComponent;
- }());
-
- var AppSidebarNavItemsComponent = /** @class */ (function () {
- function AppSidebarNavItemsComponent(document, renderer, router, helper) {
- this.document = document;
- this.renderer = renderer;
- this.router = router;
- this.helper = helper;
- }
- Object.defineProperty(AppSidebarNavItemsComponent.prototype, "items", {
- get: function () {
- return this._items;
- },
- set: function (items) {
- this._items = __spread(items);
- },
- enumerable: true,
- configurable: true
- });
- AppSidebarNavItemsComponent.prototype.hideMobile = function () {
- if (this.document.body.classList.contains('sidebar-show')) {
- this.renderer.removeClass(this.document.body, 'sidebar-show');
- }
- };
- AppSidebarNavItemsComponent.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
- { type: core.Renderer2 },
- { type: router.Router },
- { type: SidebarNavHelper }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Array),
- __metadata("design:paramtypes", [Array])
- ], AppSidebarNavItemsComponent.prototype, "items", null);
- AppSidebarNavItemsComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-items, cui-sidebar-nav-items',
- template: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "
- }),
- __param(0, core.Inject(common.DOCUMENT)),
- __metadata("design:paramtypes", [Object, core.Renderer2,
- router.Router,
- SidebarNavHelper])
- ], AppSidebarNavItemsComponent);
- return AppSidebarNavItemsComponent;
- }());
-
- var AppSidebarNavLinkContentComponent = /** @class */ (function () {
- function AppSidebarNavLinkContentComponent(helper) {
- this.helper = helper;
- }
- AppSidebarNavLinkContentComponent.ctorParameters = function () { return [
- { type: SidebarNavHelper }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarNavLinkContentComponent.prototype, "item", void 0);
- AppSidebarNavLinkContentComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-link-content, cui-sidebar-nav-link-content',
- template: "\n \n \n {{item.name}}\n {{ item.badge.text }}\n \n ",
- providers: [SidebarNavHelper]
- }),
- __metadata("design:paramtypes", [SidebarNavHelper])
- ], AppSidebarNavLinkContentComponent);
- return AppSidebarNavLinkContentComponent;
- }());
- var AppSidebarNavLinkComponent = /** @class */ (function () {
- function AppSidebarNavLinkComponent(router$1) {
- this.router = router$1;
- this.linkClick = new core.EventEmitter();
- this.navigationEndObservable = router$1.events.pipe(operators.filter(function (event) {
- return event instanceof router.NavigationEnd;
- }));
- }
- Object.defineProperty(AppSidebarNavLinkComponent.prototype, "item", {
- get: function () {
- return this._item;
- },
- set: function (item) {
- this._item = JSON.parse(JSON.stringify(item));
- },
- enumerable: true,
- configurable: true
- });
- AppSidebarNavLinkComponent.prototype.ngOnInit = function () {
- var _this = this;
- this.url = typeof this.item.url === 'string' ? this.item.url : this.router.serializeUrl(this.router.createUrlTree(this.item.url));
- this.linkType = this.getLinkType();
- this.href = this.isDisabled() ? '' : (this.item.href || this.url);
- this.linkActive = this.router.url.split(/[?#(;]/)[0] === this.href.split(/[?#(;]/)[0];
- this.navSubscription = this.navigationEndObservable.subscribe(function (event) {
- var itemUrlArray = _this.href.split(/[?#(;]/)[0].split('/');
- var urlArray = event.urlAfterRedirects.split(/[?#(;]/)[0].split('/');
- _this.linkActive = itemUrlArray.every(function (value, index) { return value === urlArray[index]; });
- });
- };
- AppSidebarNavLinkComponent.prototype.ngOnDestroy = function () {
- this.navSubscription.unsubscribe();
- };
- AppSidebarNavLinkComponent.prototype.getLinkType = function () {
- return this.isDisabled() ? 'disabled' : this.isExternalLink() ? 'external' : 'link';
- };
- AppSidebarNavLinkComponent.prototype.isDisabled = function () {
- return (this.item.attributes && this.item.attributes.disabled) ? true : null;
- };
- AppSidebarNavLinkComponent.prototype.isExternalLink = function () {
- return !!this.item.href || this.url.substring(0, 4) === 'http';
- };
- AppSidebarNavLinkComponent.prototype.linkClicked = function () {
- this.linkClick.emit();
- };
- AppSidebarNavLinkComponent.ctorParameters = function () { return [
- { type: router.Router }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object),
- __metadata("design:paramtypes", [Object])
- ], AppSidebarNavLinkComponent.prototype, "item", null);
- __decorate([
- core.Output(),
- __metadata("design:type", Object)
- ], AppSidebarNavLinkComponent.prototype, "linkClick", void 0);
- AppSidebarNavLinkComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-link, cui-sidebar-nav-link',
- template: "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n",
- providers: [SidebarNavHelper]
- }),
- __metadata("design:paramtypes", [router.Router])
- ], AppSidebarNavLinkComponent);
- return AppSidebarNavLinkComponent;
- }());
-
- var AppSidebarNavTitleComponent = /** @class */ (function () {
- function AppSidebarNavTitleComponent(el, renderer) {
- this.el = el;
- this.renderer = renderer;
- }
- AppSidebarNavTitleComponent.prototype.ngOnInit = function () {
- var nativeElement = this.el.nativeElement;
- var name = this.renderer.createText(this.item.name);
- if (this.item.class) {
- var classes = this.item.class;
- this.renderer.addClass(nativeElement, classes);
- }
- if (this.item.wrapper) {
- var wrapper = this.renderer.createElement(this.item.wrapper.element);
- this.addAttribs(this.item.wrapper.attributes, wrapper);
- this.renderer.appendChild(wrapper, name);
- this.renderer.appendChild(nativeElement, wrapper);
- }
- else {
- this.renderer.appendChild(nativeElement, name);
- }
- };
- AppSidebarNavTitleComponent.prototype.addAttribs = function (attribs, element) {
- if (attribs) {
- for (var attr in attribs) {
- if (attr === 'style' && typeof (attribs[attr]) === 'object') {
- this.setStyle(attribs[attr], element);
- }
- else if (attr === 'class') {
- this.addClass(attribs[attr], element);
- }
- else {
- this.setAttrib(attr, attribs[attr], element);
- }
- }
- }
- };
- AppSidebarNavTitleComponent.prototype.setStyle = function (styles, el) {
- for (var style in styles) {
- this.renderer.setStyle(el, style, styles[style]);
- }
- };
- AppSidebarNavTitleComponent.prototype.addClass = function (classes, el) {
- var _this = this;
- var classArray = (Array.isArray(classes) ? classes : classes.split(' '));
- classArray.filter(function (element) { return element.length > 0; }).forEach(function (element) {
- _this.renderer.addClass(el, element);
- });
- };
- AppSidebarNavTitleComponent.prototype.setAttrib = function (key, value, el) {
- this.renderer.setAttribute(el, key, value);
- };
- AppSidebarNavTitleComponent.ctorParameters = function () { return [
- { type: core.ElementRef },
- { type: core.Renderer2 }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarNavTitleComponent.prototype, "item", void 0);
- AppSidebarNavTitleComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-title, cui-sidebar-nav-title',
- template: ''
- }),
- __metadata("design:paramtypes", [core.ElementRef,
- core.Renderer2])
- ], AppSidebarNavTitleComponent);
- return AppSidebarNavTitleComponent;
- }());
-
- var AppSidebarNavLabelComponent = /** @class */ (function () {
- function AppSidebarNavLabelComponent(helper) {
- this.helper = helper;
- this.classes = {
- 'nav-label': true,
- 'active': true
- };
- this.iconClasses = {};
- }
- AppSidebarNavLabelComponent.prototype.ngOnInit = function () {
- this.iconClasses = this.helper.getIconClass(this.item);
- };
- AppSidebarNavLabelComponent.prototype.getItemClass = function () {
- var itemClass = this.item.class;
- this.classes[itemClass] = !!itemClass;
- return this.classes;
- };
- AppSidebarNavLabelComponent.prototype.getLabelIconClass = function () {
- var variant = "text-" + this.item.label.variant;
- this.iconClasses[variant] = !!this.item.label.variant;
- var labelClass = this.item.label.class;
- this.iconClasses[labelClass] = !!labelClass;
- return this.iconClasses;
- };
- AppSidebarNavLabelComponent.ctorParameters = function () { return [
- { type: SidebarNavHelper }
- ]; };
- __decorate([
- core.Input(),
- __metadata("design:type", Object)
- ], AppSidebarNavLabelComponent.prototype, "item", void 0);
- AppSidebarNavLabelComponent = __decorate([
- core.Component({
- selector: 'app-sidebar-nav-label, cui-sidebar-nav-label',
- template: "\r\n \r\n {{item.name}}\r\n {{ item.badge.text }}\r\n\r\n"
- }),
- __metadata("design:paramtypes", [SidebarNavHelper])
- ], AppSidebarNavLabelComponent);
- return AppSidebarNavLabelComponent;
- }());
-
- var AppSidebarNavIconPipe = /** @class */ (function () {
- function AppSidebarNavIconPipe() {
- }
- AppSidebarNavIconPipe.prototype.transform = function (item, args) {
- var classes = {
- 'nav-icon': true
- };
- var icon = item.icon;
- classes[icon] = !!item.icon;
- return classes;
- };
- AppSidebarNavIconPipe = __decorate([
- core.Pipe({
- name: 'appSidebarNavIcon'
- })
- ], AppSidebarNavIconPipe);
- return AppSidebarNavIconPipe;
- }());
-
- var AppSidebarNavBadgePipe = /** @class */ (function () {
- function AppSidebarNavBadgePipe() {
- }
- AppSidebarNavBadgePipe.prototype.transform = function (item, args) {
- var classes = {
- 'badge': true
- };
- var variant = "badge-" + item.badge.variant;
- classes[variant] = !!item.badge.variant;
- classes[item.badge.class] = !!item.badge.class;
- return classes;
- };
- AppSidebarNavBadgePipe = __decorate([
- core.Pipe({
- name: 'appSidebarNavBadge'
- })
- ], AppSidebarNavBadgePipe);
- return AppSidebarNavBadgePipe;
- }());
-
- var AppSidebarNavLinkPipe = /** @class */ (function () {
- function AppSidebarNavLinkPipe() {
- }
- AppSidebarNavLinkPipe.prototype.transform = function (item) {
- var classes = { 'nav-link': true };
- var disabled = item.attributes && item.attributes.disabled;
- classes['disabled'] = disabled;
- classes['btn-link'] = disabled;
- classes["nav-link-" + item.variant] = !!item.variant;
- return classes;
- };
- AppSidebarNavLinkPipe = __decorate([
- core.Pipe({
- name: 'appSidebarNavLink'
- })
- ], AppSidebarNavLinkPipe);
- return AppSidebarNavLinkPipe;
- }());
-
- var AppSidebarNavItemClassPipe = /** @class */ (function () {
- function AppSidebarNavItemClassPipe(helper) {
- this.helper = helper;
- }
- AppSidebarNavItemClassPipe.prototype.transform = function (item) {
- var args = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- args[_i - 1] = arguments[_i];
- }
- var itemType = this.helper.itemType(item);
- var itemClass;
- if (['divider', 'title'].includes(itemType)) {
- itemClass = "nav-" + itemType;
- }
- else if (itemType === 'dropdown') {
- itemClass = 'nav-item nav-dropdown';
- }
- else {
- itemClass = 'nav-item';
- }
- return item.class ? itemClass + " " + item.class : itemClass;
- };
- AppSidebarNavItemClassPipe.ctorParameters = function () { return [
- { type: SidebarNavHelper }
- ]; };
- AppSidebarNavItemClassPipe = __decorate([
- core.Pipe({
- name: 'appSidebarNavItemClass'
- }),
- __metadata("design:paramtypes", [SidebarNavHelper])
- ], AppSidebarNavItemClassPipe);
- return AppSidebarNavItemClassPipe;
- }());
-
- var AppSidebarModule = /** @class */ (function () {
- function AppSidebarModule() {
- }
- AppSidebarModule = __decorate([
- core.NgModule({
- imports: [
- common.CommonModule,
- router.RouterModule,
- LayoutModule
- ],
- exports: [
- AppSidebarFooterComponent,
- AppSidebarFormComponent,
- AppSidebarHeaderComponent,
- AppSidebarMinimizerComponent,
- AppSidebarComponent,
- AppSidebarNavItemsComponent,
- AppSidebarNavComponent,
- AppSidebarNavDividerComponent,
- AppSidebarNavDropdownComponent,
- AppSidebarNavLinkComponent,
- AppSidebarNavLinkContentComponent,
- AppSidebarNavTitleComponent,
- NavDropdownDirective,
- NavDropdownToggleDirective,
- LayoutModule
- ],
- declarations: [
- AppSidebarFooterComponent,
- AppSidebarFormComponent,
- AppSidebarHeaderComponent,
- AppSidebarMinimizerComponent,
- AppSidebarMinimizerComponent,
- AppSidebarComponent,
- AppSidebarNavItemsComponent,
- AppSidebarNavComponent,
- AppSidebarNavDividerComponent,
- AppSidebarNavDropdownComponent,
- AppSidebarNavLinkComponent,
- AppSidebarNavLinkContentComponent,
- AppSidebarNavTitleComponent,
- NavDropdownDirective,
- NavDropdownToggleDirective,
- AppSidebarNavLabelComponent,
- AppSidebarNavIconPipe,
- AppSidebarNavBadgePipe,
- AppSidebarNavLinkPipe,
- AppSidebarNavItemClassPipe
- ],
- providers: [
- SidebarNavHelper,
- AppSidebarService
- ]
- })
- ], AppSidebarModule);
- return AppSidebarModule;
- }());
-
- exports.AppAsideComponent = AppAsideComponent;
- exports.AppAsideModule = AppAsideModule;
- exports.AppBreadcrumbComponent = AppBreadcrumbComponent;
- exports.AppBreadcrumbModule = AppBreadcrumbModule;
- exports.AppFooterComponent = AppFooterComponent;
- exports.AppFooterModule = AppFooterModule;
- exports.AppHeaderComponent = AppHeaderComponent;
- exports.AppHeaderModule = AppHeaderModule;
- exports.AppSidebarComponent = AppSidebarComponent;
- exports.AppSidebarModule = AppSidebarModule;
- exports.CuiBreadcrumbComponent = CuiBreadcrumbComponent;
- exports.ɵa = LayoutModule;
- exports.ɵb = SidebarToggleDirective;
- exports.ɵba = AppSidebarNavIconPipe;
- exports.ɵbb = AppSidebarNavBadgePipe;
- exports.ɵbc = AppSidebarNavLinkPipe;
- exports.ɵbd = AppSidebarNavItemClassPipe;
- exports.ɵc = SidebarMinimizeDirective;
- exports.ɵd = MobileSidebarToggleDirective;
- exports.ɵe = SidebarOffCanvasCloseDirective;
- exports.ɵf = BrandMinimizeDirective;
- exports.ɵg = AsideToggleDirective;
- exports.ɵh = HtmlAttributesDirective;
- exports.ɵi = ClassToggler;
- exports.ɵj = AppBreadcrumbService;
- exports.ɵk = AppSidebarService;
- exports.ɵl = AppSidebarFooterComponent;
- exports.ɵm = AppSidebarFormComponent;
- exports.ɵn = AppSidebarHeaderComponent;
- exports.ɵo = AppSidebarMinimizerComponent;
- exports.ɵp = AppSidebarNavItemsComponent;
- exports.ɵq = SidebarNavHelper;
- exports.ɵr = AppSidebarNavComponent;
- exports.ɵs = AppSidebarNavDividerComponent;
- exports.ɵt = AppSidebarNavDropdownComponent;
- exports.ɵu = AppSidebarNavLinkContentComponent;
- exports.ɵv = AppSidebarNavLinkComponent;
- exports.ɵw = AppSidebarNavTitleComponent;
- exports.ɵx = NavDropdownDirective;
- exports.ɵy = NavDropdownToggleDirective;
- exports.ɵz = AppSidebarNavLabelComponent;
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
-})));
-//# sourceMappingURL=coreui-angular.umd.js.map
diff --git a/dist/@coreui/angular/bundles/coreui-angular.umd.js.map b/dist/@coreui/angular/bundles/coreui-angular.umd.js.map
deleted file mode 100644
index 8c68ffe5..00000000
--- a/dist/@coreui/angular/bundles/coreui-angular.umd.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"coreui-angular.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@coreui/angular/lib/shared/classes.ts","ng://@coreui/angular/lib/shared/toggle-classes.ts","ng://@coreui/angular/lib/shared/layout/layout.directive.ts","ng://@coreui/angular/lib/shared/layout/layout.module.ts","ng://@coreui/angular/lib/shared/replace.ts","ng://@coreui/angular/lib/aside/app-aside.component.ts","ng://@coreui/angular/lib/aside/app-aside.module.ts","ng://@coreui/angular/lib/breadcrumb/app-breadcrumb.service.ts","ng://@coreui/angular/lib/breadcrumb/app-breadcrumb.component.ts","ng://@coreui/angular/lib/breadcrumb/cui-breadcrumb.component.ts","ng://@coreui/angular/lib/breadcrumb/app-breadcrumb.module.ts","ng://@coreui/angular/lib/footer/app-footer.component.ts","ng://@coreui/angular/lib/footer/app-footer.module.ts","ng://@coreui/angular/lib/header/app-header.component.ts","ng://@coreui/angular/lib/header/app-header.module.ts","ng://@coreui/angular/lib/sidebar/app-sidebar.service.ts","ng://@coreui/angular/lib/sidebar/app-sidebar.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-footer.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-form.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-header.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-minimizer.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav.directive.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-divider.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav.service.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-dropdown.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-items.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-title.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-label.component.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-icon.pipe.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-badge.pipe.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.pipe.ts","ng://@coreui/angular/lib/sidebar/app-sidebar-nav/app-sidebar-nav-item-class.pipe.ts","ng://@coreui/angular/lib/sidebar/app-sidebar.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","export const sidebarCssClasses: Array = [\r\n 'sidebar-show',\r\n 'sidebar-sm-show',\r\n 'sidebar-md-show',\r\n 'sidebar-lg-show',\r\n 'sidebar-xl-show'\r\n];\r\n\r\nexport const asideMenuCssClasses: Array = [\r\n 'aside-menu-show',\r\n 'aside-menu-sm-show',\r\n 'aside-menu-md-show',\r\n 'aside-menu-lg-show',\r\n 'aside-menu-xl-show'\r\n];\r\n","import {Inject, Injectable, Renderer2} from '@angular/core';\r\nimport {DOCUMENT} from '@angular/common';\r\n\r\nconst RemoveClasses = (NewClassNames) => {\r\n const MatchClasses = NewClassNames.map((Class) => document.body.classList.contains(Class));\r\n return MatchClasses.indexOf(true) !== -1;\r\n};\r\n\r\nexport const ToggleClasses = (Toggle, ClassNames) => {\r\n const Level = ClassNames.indexOf(Toggle);\r\n const NewClassNames = ClassNames.slice(0, Level + 1);\r\n\r\n if (RemoveClasses(NewClassNames)) {\r\n NewClassNames.map((Class) => document.body.classList.remove(Class));\r\n } else {\r\n document.body.classList.add(Toggle);\r\n }\r\n};\r\n\r\n@Injectable()\r\nexport class ClassToggler {\r\n\r\n constructor(\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2,\r\n ) {}\r\n\r\n removeClasses(NewClassNames) {\r\n const MatchClasses = NewClassNames.map((Class) => this.document.body.classList.contains(Class));\r\n return MatchClasses.indexOf(true) !== -1;\r\n }\r\n\r\n toggleClasses(Toggle, ClassNames) {\r\n const Level = ClassNames.indexOf(Toggle);\r\n const NewClassNames = ClassNames.slice(0, Level + 1);\r\n\r\n if (this.removeClasses(NewClassNames)) {\r\n NewClassNames.map((Class) => this.renderer.removeClass(this.document.body, Class));\r\n } else {\r\n this.renderer.addClass(this.document.body, Toggle);\r\n }\r\n }\r\n}\r\n","import {Directive, ElementRef, HostListener, Inject, Input, OnInit, Renderer2} from '@angular/core';\r\nimport {DOCUMENT} from '@angular/common';\r\n\r\nimport { asideMenuCssClasses, sidebarCssClasses } from '../classes';\r\nimport { ClassToggler } from '../toggle-classes';\r\n\r\n/**\r\n* Allows the sidebar to be toggled via click.\r\n*/\r\n@Directive({\r\n selector: '[appSidebarToggler]',\r\n providers: [ClassToggler]\r\n})\r\nexport class SidebarToggleDirective implements OnInit {\r\n @Input('appSidebarToggler') breakpoint: string;\r\n public bp;\r\n constructor(private classToggler: ClassToggler) {}\r\n ngOnInit(): void {\r\n this.bp = this.breakpoint;\r\n }\r\n @HostListener('click', ['$event'])\r\n toggleOpen($event: any) {\r\n $event.preventDefault();\r\n const cssClass = this.bp ? `sidebar-${this.bp}-show` : sidebarCssClasses[0];\r\n this.classToggler.toggleClasses(cssClass, sidebarCssClasses);\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: '[appSidebarMinimizer]'\r\n})\r\nexport class SidebarMinimizeDirective {\r\n constructor(\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2,\r\n ) { }\r\n\r\n @HostListener('click', ['$event'])\r\n toggleOpen($event: any) {\r\n $event.preventDefault();\r\n const body = this.document.body;\r\n body.classList.contains('sidebar-minimized') ?\r\n this.renderer.removeClass(body, 'sidebar-minimized') :\r\n this.renderer.addClass(body, 'sidebar-minimized');\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: '[appMobileSidebarToggler]'\r\n})\r\nexport class MobileSidebarToggleDirective {\r\n constructor(\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2,\r\n ) { }\r\n\r\n @HostListener('click', ['$event'])\r\n toggleOpen($event: any) {\r\n $event.preventDefault();\r\n const body = this.document.body;\r\n body.classList.contains('sidebar-show') ?\r\n this.renderer.removeClass(body, 'sidebar-show') :\r\n this.renderer.addClass(body, 'sidebar-show');\r\n }\r\n}\r\n\r\n/**\r\n* Allows the off-canvas sidebar to be closed via click.\r\n*/\r\n@Directive({\r\n selector: '[appSidebarClose]'\r\n})\r\nexport class SidebarOffCanvasCloseDirective {\r\n constructor(\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2,\r\n ) { }\r\n\r\n @HostListener('click', ['$event'])\r\n toggleOpen($event: any) {\r\n $event.preventDefault();\r\n\r\n const body = this.document.body;\r\n if (body.classList.contains('sidebar-off-canvas')) {\r\n body.classList.contains('sidebar-show') ?\r\n this.renderer.removeClass(body, 'sidebar-show') :\r\n this.renderer.addClass(body, 'sidebar-show');\r\n }\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: '[appBrandMinimizer]'\r\n})\r\nexport class BrandMinimizeDirective {\r\n constructor(\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2,\r\n ) { }\r\n\r\n @HostListener('click', ['$event'])\r\n toggleOpen($event: any) {\r\n $event.preventDefault();\r\n const body = this.document.body;\r\n body.classList.contains('brand-minimized') ?\r\n this.renderer.removeClass(body, 'brand-minimized') :\r\n this.renderer.addClass(body, 'brand-minimized');\r\n }\r\n}\r\n\r\n\r\n/**\r\n* Allows the aside to be toggled via click.\r\n*/\r\n@Directive({\r\n selector: '[appAsideMenuToggler]',\r\n providers: [ClassToggler]\r\n})\r\nexport class AsideToggleDirective implements OnInit {\r\n @Input('appAsideMenuToggler') breakpoint: string;\r\n public bp;\r\n constructor(private classToggler: ClassToggler) {}\r\n ngOnInit(): void {\r\n this.bp = this.breakpoint;\r\n }\r\n @HostListener('click', ['$event'])\r\n toggleOpen($event: any) {\r\n $event.preventDefault();\r\n const cssClass = this.bp ? `aside-menu-${this.bp}-show` : asideMenuCssClasses[0];\r\n this.classToggler.toggleClasses(cssClass, asideMenuCssClasses);\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: '[appHtmlAttr]'\r\n})\r\nexport class HtmlAttributesDirective implements OnInit {\r\n @Input() appHtmlAttr: {[key: string]: string };\r\n\r\n constructor(\r\n private renderer: Renderer2,\r\n private el: ElementRef\r\n ) {}\r\n\r\n ngOnInit() {\r\n const attribs = this.appHtmlAttr;\r\n for (const attr in attribs) {\r\n if (attr === 'style' && typeof(attribs[attr]) === 'object' ) {\r\n this.setStyle(attribs[attr]);\r\n } else if (attr === 'class') {\r\n this.addClass(attribs[attr]);\r\n } else {\r\n this.setAttrib(attr, attribs[attr]);\r\n }\r\n }\r\n }\r\n\r\n private setStyle(styles) {\r\n for (const style in styles) {\r\n this.renderer.setStyle(this.el.nativeElement, style, styles[style] );\r\n }\r\n }\r\n\r\n private addClass(classes) {\r\n const classArray = (Array.isArray(classes) ? classes : classes.split(' '));\r\n classArray.filter((element) => element.length > 0).forEach(element => {\r\n this.renderer.addClass(this.el.nativeElement, element );\r\n });\r\n }\r\n\r\n private setAttrib(key, value) {\r\n value !== null ?\r\n this.renderer.setAttribute(this.el.nativeElement, key, value ) :\r\n this.renderer.removeAttribute(this.el.nativeElement, key);\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule} from '@angular/core';\r\nimport {\r\n AsideToggleDirective,\r\n BrandMinimizeDirective,\r\n MobileSidebarToggleDirective,\r\n SidebarToggleDirective,\r\n SidebarMinimizeDirective,\r\n SidebarOffCanvasCloseDirective,\r\n HtmlAttributesDirective\r\n} from './layout.directive';\r\nimport { ClassToggler } from '../toggle-classes';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n AsideToggleDirective,\r\n BrandMinimizeDirective,\r\n MobileSidebarToggleDirective,\r\n SidebarToggleDirective,\r\n SidebarMinimizeDirective,\r\n SidebarOffCanvasCloseDirective,\r\n HtmlAttributesDirective\r\n ],\r\n declarations: [\r\n AsideToggleDirective,\r\n BrandMinimizeDirective,\r\n MobileSidebarToggleDirective,\r\n SidebarToggleDirective,\r\n SidebarMinimizeDirective,\r\n SidebarOffCanvasCloseDirective,\r\n HtmlAttributesDirective\r\n ],\r\n providers: [\r\n ClassToggler\r\n ]\r\n})\r\nexport class LayoutModule { }\r\n","export function Replace(el: any): any {\r\n const nativeElement: HTMLElement = el.nativeElement;\r\n const parentElement: HTMLElement = nativeElement.parentElement;\r\n // move all children out of the element\r\n while (nativeElement.firstChild) {\r\n parentElement.insertBefore(nativeElement.firstChild, nativeElement);\r\n }\r\n // remove the empty element(the host)\r\n parentElement.removeChild(nativeElement);\r\n}\r\n","import {Component, Input, OnInit, OnDestroy, Inject, Renderer2, HostBinding} from '@angular/core';\r\nimport {DOCUMENT} from '@angular/common';\r\n\r\nimport { asideMenuCssClasses } from '../shared';\r\n\r\n@Component({\r\n selector: 'app-aside, cui-aside',\r\n template: ``\r\n})\r\nexport class AppAsideComponent implements OnInit, OnDestroy {\r\n @Input() display: any;\r\n @Input() fixed: boolean;\r\n @Input() offCanvas: boolean;\r\n\r\n private readonly fixedClass = 'aside-menu-fixed';\r\n\r\n @HostBinding('class.aside-menu') _aside = true;\r\n\r\n constructor(\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.isFixed(this.fixed);\r\n this.isOffCanvas(this.offCanvas);\r\n this.displayBreakpoint(this.display);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.renderer.removeClass(this.document.body, this.fixedClass);\r\n }\r\n\r\n isFixed(fixed: boolean = this.fixed): void {\r\n if (fixed) {\r\n this.renderer.addClass(this.document.body, this.fixedClass);\r\n }\r\n }\r\n\r\n isOffCanvas(offCanvas: boolean = this.offCanvas): void {\r\n if (offCanvas) {\r\n this.renderer.addClass(this.document.body, 'aside-menu-off-canvas');\r\n }\r\n }\r\n\r\n displayBreakpoint(display: any = this.display): void {\r\n if (display !== false ) {\r\n const cssClass = this.display ? `aside-menu-${this.display}-show` : asideMenuCssClasses[0];\r\n this.renderer.addClass(this.document.body, cssClass);\r\n }\r\n }\r\n}\r\n","import { CommonModule} from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { LayoutModule } from './../shared/layout/layout.module';\r\n\r\nimport { AppAsideComponent } from './app-aside.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n LayoutModule\r\n ],\r\n exports: [\r\n AppAsideComponent,\r\n LayoutModule\r\n ],\r\n declarations: [\r\n AppAsideComponent\r\n ]\r\n})\r\nexport class AppAsideModule {}\r\n","import { Injectable } from '@angular/core';\r\nimport { Router, ActivatedRoute, NavigationEnd } from '@angular/router';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n }\r\n)\r\nexport class AppBreadcrumbService {\r\n\r\n breadcrumbs: Observable>;\r\n\r\n private _breadcrumbs: BehaviorSubject>;\r\n\r\n constructor(private router: Router, private route: ActivatedRoute) {\r\n\r\n this._breadcrumbs = new BehaviorSubject