From 5d5d93ba3c3dfee399bbe92a89327810c45d9f61 Mon Sep 17 00:00:00 2001
From: xidedix <xidedix@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:01:43 +0200
Subject: [PATCH 1/4] feat(schematics): ng-add basic integration

(cherry picked from commit b176cbec657e634199aadca1719cff6303db0df2)
---
 package.json                                  | 19 ++++--
 projects/coreui-angular-chartjs/package.json  | 14 +++-
 .../schematics/collection.json                |  9 +++
 .../schematics/ng-add/index.ts                | 39 +++++++++++
 .../schematics/ng-add/package-config.ts       | 66 +++++++++++++++++++
 .../tsconfig.schematics.json                  | 36 ++++++++++
 projects/coreui-angular/package.json          | 18 ++++-
 .../coreui-angular/schematics/collection.json |  9 +++
 .../coreui-angular/schematics/ng-add/index.ts | 52 +++++++++++++++
 .../schematics/ng-add/package-config.ts       | 66 +++++++++++++++++++
 .../coreui-angular/tsconfig.schematics.json   | 36 ++++++++++
 projects/coreui-icons-angular/package.json    | 14 +++-
 .../schematics/collection.json                |  9 +++
 .../schematics/ng-add/index.ts                | 10 +++
 .../tsconfig.schematics.json                  | 35 ++++++++++
 15 files changed, 420 insertions(+), 12 deletions(-)
 create mode 100644 projects/coreui-angular-chartjs/schematics/collection.json
 create mode 100644 projects/coreui-angular-chartjs/schematics/ng-add/index.ts
 create mode 100644 projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts
 create mode 100644 projects/coreui-angular-chartjs/tsconfig.schematics.json
 create mode 100644 projects/coreui-angular/schematics/collection.json
 create mode 100644 projects/coreui-angular/schematics/ng-add/index.ts
 create mode 100644 projects/coreui-angular/schematics/ng-add/package-config.ts
 create mode 100644 projects/coreui-angular/tsconfig.schematics.json
 create mode 100644 projects/coreui-icons-angular/schematics/collection.json
 create mode 100644 projects/coreui-icons-angular/schematics/ng-add/index.ts
 create mode 100644 projects/coreui-icons-angular/tsconfig.schematics.json

diff --git a/package.json b/package.json
index 57f86a2e..da58f7fc 100644
--- a/package.json
+++ b/package.json
@@ -9,27 +9,30 @@
     "lib": "ng",
     "watch:lib:dev": "ng build coreui-angular --watch --configuration production",
     "build:lib:prod": "ng build coreui-angular",
+    "postbuild:lib:prod": "npm run build --prefix projects/coreui-angular",
     "test:lib:dev": "ng test coreui-angular",
     "test:lib:prod": "ng test coreui-angular --karma-config=projects/coreui-angular/karma.conf.github.js",
-    "prepublish:lib": "npm run prepublish:icons && ng lint coreui-angular && ng test coreui-angular --watch=false && ng build coreui-angular",
+    "prepublish:lib": "npm run prepublish:icons && ng lint coreui-angular && ng test coreui-angular --watch=false && npm run build:lib:prod",
     "publish:lib": "cd dist/coreui-angular/ && npm publish --tag v5-ng17 --dry-run",
     "lint:lib": "ng lint coreui-angular",
     "link:lib": "cd dist/coreui-angular/ && npm link",
     "chartjs": "ng",
     "watch:chartjs:dev": "ng build coreui-angular-chartjs --watch --configuration development",
     "build:chartjs:prod": "ng build coreui-angular-chartjs",
+    "postbuild:chartjs:prod": "npm run build --prefix projects/coreui-angular-chartjs",
     "test:chartjs:dev": "ng test coreui-angular-chartjs",
     "test:chartjs:prod": "ng test coreui-angular-chartjs --karma-config=projects/coreui-angular-chartjs/karma.conf.github.js",
-    "prepublish:chartjs": "ng lint coreui-angular-chartjs && ng test coreui-angular-chartjs --watch=false && ng build coreui-angular-chartjs",
+    "prepublish:chartjs": "ng lint coreui-angular-chartjs && ng test coreui-angular-chartjs --watch=false && npm run build:chartjs:prod",
     "publish:chartjs": "cd dist/coreui-angular-chartjs/ && npm publish --tag v5-ng17 --dry-run",
     "lint:chartjs": "ng lint coreui-angular-chartjs",
     "link:chartjs": "cd dist/coreui-angular-chartjs/ && npm link",
     "icons": "ng",
     "watch:icons:dev": "ng build coreui-icons-angular --watch --configuration production",
     "build:icons:prod": "ng build coreui-icons-angular",
+    "postbuild:icons:prod": "npm run build --prefix projects/coreui-icons-angular",
     "test:icons:dev": "ng test coreui-icons-angular",
     "test:icons:prod": "ng test coreui-icons-angular --karma-config=projects/coreui-icons-angular/karma.conf.github.js",
-    "prepublish:icons": "ng lint coreui-icons-angular && ng test coreui-icons-angular --watch=false && ng build coreui-icons-angular",
+    "prepublish:icons": "ng lint coreui-icons-angular && ng test coreui-icons-angular --watch=false && npm run build:icons:prod",
     "publish:icons": "cd dist/coreui-icons-angular/ && npm publish --tag v5-ng17 --dry-run",
     "lint:icons": "ng lint coreui-icons-angular",
     "link:icons": "cd dist/coreui-icons-angular/ && npm link"
@@ -57,6 +60,7 @@
   },
   "devDependencies": {
     "@angular-devkit/build-angular": "^17.3.8",
+    "@angular-devkit/schematics": "^17.3.8",
     "@angular-eslint/builder": "^17.5.2",
     "@angular-eslint/eslint-plugin": "^17.5.2",
     "@angular-eslint/eslint-plugin-template": "^17.5.2",
@@ -67,11 +71,12 @@
     "@angular/language-service": "^17.3.12",
     "@types/jasmine": "^5.1.4",
     "@types/lodash-es": "^4.17.12",
-    "@types/node": "^20.14.11",
-    "@typescript-eslint/eslint-plugin": "^7.16.1",
-    "@typescript-eslint/parser": "^7.16.1",
+    "@types/node": "^20.14.12",
+    "@typescript-eslint/eslint-plugin": "^7.17.0",
+    "@typescript-eslint/parser": "^7.17.0",
+    "copyfiles": "^2.4.1",
     "eslint": "^8.57.0",
-    "jasmine-core": "^5.1.2",
+    "jasmine-core": "^5.2.0",
     "karma": "^6.4.3",
     "karma-chrome-launcher": "^3.2.0",
     "karma-coverage": "^2.2.1",
diff --git a/projects/coreui-angular-chartjs/package.json b/projects/coreui-angular-chartjs/package.json
index d758641b..ffe99bab 100644
--- a/projects/coreui-angular-chartjs/package.json
+++ b/projects/coreui-angular-chartjs/package.json
@@ -41,5 +41,17 @@
     "component",
     "chartjs",
     "angular"
-  ]
+  ],
+  "devDependencies": {
+    "copyfiles": "file:../../node_modules/copyfiles",
+    "typescript": "file:../../node_modules/typescript"
+  },
+  "schematics": "./schematics/collection.json",
+  "scripts": {
+    "build": "tsc -p tsconfig.schematics.json",
+    "postbuild": "copyfiles schematics/*/files/** schematics/collection.json ../../dist/coreui-angular-chartjs/"
+  },
+  "ng-add": {
+    "save": true
+  }
 }
diff --git a/projects/coreui-angular-chartjs/schematics/collection.json b/projects/coreui-angular-chartjs/schematics/collection.json
new file mode 100644
index 00000000..7f426a32
--- /dev/null
+++ b/projects/coreui-angular-chartjs/schematics/collection.json
@@ -0,0 +1,9 @@
+{
+  "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
+  "schematics": {
+    "ng-add": {
+      "description": "Add @coreui/angular-chartjs library to the project.",
+      "factory": "./ng-add/index#ngAdd"
+    }
+  }
+}
diff --git a/projects/coreui-angular-chartjs/schematics/ng-add/index.ts b/projects/coreui-angular-chartjs/schematics/ng-add/index.ts
new file mode 100644
index 00000000..0bc59115
--- /dev/null
+++ b/projects/coreui-angular-chartjs/schematics/ng-add/index.ts
@@ -0,0 +1,39 @@
+import { chain, Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
+import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
+import { addPackageToPackageJson, getPackageVersionFromPackageJson, PackageJson } from './package-config';
+import * as pkgJson from '../../package.json';
+
+export function addCoreUIAngularChartJs(): Rule {
+  return (tree: Tree, context: SchematicContext) => {
+    context.logger.info('Installing @coreui/angular-chartjs ...');
+    context.addTask(new NodePackageInstallTask());
+    return tree;
+  };
+}
+
+export function ngAdd(): Rule {
+  return (tree: Tree, context: SchematicContext) => {
+    context.logger.info(``);
+    context.logger.info('Installing @coreui/angular-chartjs dependencies...');
+    const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
+    context.logger.info(`@angular/core version ${ngCoreVersionTag}`);
+    if (!ngCoreVersionTag) {
+      throw new SchematicsException('@angular/core version not found');
+    }
+    const pkg = pkgJson as PackageJson;
+    const libPeerDeps: string[] = ['@coreui/chartjs', 'chart.js'];
+    libPeerDeps.forEach((dep: string) => {
+      const version = pkg.peerDependencies[dep];
+      context.logger.info(`Including ${dep} version ${version}`);
+      addPackageToPackageJson(tree, dep, version);
+    });
+    const libDeps: string[] = ['lodash-es'];
+    libDeps.forEach((dep: string) => {
+      const version = pkg.dependencies[dep];
+      context.logger.info(`Including ${dep} version ${version}`);
+      addPackageToPackageJson(tree, dep, version);
+    });
+
+    return chain([addCoreUIAngularChartJs()]);
+  };
+}
diff --git a/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts b/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts
new file mode 100644
index 00000000..fbf362ea
--- /dev/null
+++ b/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts
@@ -0,0 +1,66 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { Tree } from '@angular-devkit/schematics';
+
+export interface PackageJson {
+  dependencies: Record<string, string>;
+  peerDependencies: Record<string, string>;
+}
+
+/**
+ * Sorts the keys of the given object.
+ * @returns A new object instance with sorted keys
+ */
+function sortObjectByKeys(obj: Record<string, string>) {
+  return Object.keys(obj)
+    .sort()
+    .reduce(
+      (result, key) => {
+        result[key] = obj[key];
+        return result;
+      },
+      {} as Record<string, string>
+    );
+}
+
+/** Adds a package to the package.json in the given host tree. */
+export function addPackageToPackageJson(host: Tree, pkg: string, version: string): Tree {
+  if (host.exists('package.json')) {
+    const sourceText = host.read('package.json')!.toString('utf-8');
+    const json = JSON.parse(sourceText) as PackageJson;
+
+    if (!json.dependencies) {
+      json.dependencies = {};
+    }
+
+    if (!json.dependencies[pkg]) {
+      json.dependencies[pkg] = version;
+      json.dependencies = sortObjectByKeys(json.dependencies);
+    }
+
+    host.overwrite('package.json', JSON.stringify(json, null, 2));
+  }
+
+  return host;
+}
+
+/** Gets the version of the specified package by looking at the package.json in the given tree. */
+export function getPackageVersionFromPackageJson(tree: Tree, name: string): string | null {
+  if (!tree.exists('package.json')) {
+    return null;
+  }
+
+  const packageJson = JSON.parse(tree.read('package.json')!.toString('utf8')) as PackageJson;
+
+  if (packageJson.dependencies && packageJson.dependencies[name]) {
+    return packageJson.dependencies[name];
+  }
+
+  return null;
+}
diff --git a/projects/coreui-angular-chartjs/tsconfig.schematics.json b/projects/coreui-angular-chartjs/tsconfig.schematics.json
new file mode 100644
index 00000000..acbc130f
--- /dev/null
+++ b/projects/coreui-angular-chartjs/tsconfig.schematics.json
@@ -0,0 +1,36 @@
+{
+  "compilerOptions": {
+    "baseUrl": ".",
+    "lib": [
+      "ES2022",
+      "dom"
+    ],
+    "declaration": true,
+    "module": "commonjs",
+    "moduleResolution": "node",
+    "noEmitOnError": true,
+    "noFallthroughCasesInSwitch": true,
+    "noImplicitAny": true,
+    "noImplicitThis": true,
+    "noUnusedParameters": true,
+    "noUnusedLocals": true,
+    "rootDir": "schematics",
+    "outDir": "../../dist/coreui-angular-chartjs/schematics",
+    "resolveJsonModule": true,
+    "skipDefaultLibCheck": true,
+    "skipLibCheck": true,
+    "sourceMap": true,
+    "strictNullChecks": true,
+    "target": "ES2022",
+    "types": [
+      "jasmine",
+      "node"
+    ]
+  },
+  "include": [
+    "schematics/**/*"
+  ],
+  "exclude": [
+    "schematics/*/files/**/*"
+  ]
+}
diff --git a/projects/coreui-angular/package.json b/projects/coreui-angular/package.json
index a9e94726..af9d553e 100644
--- a/projects/coreui-angular/package.json
+++ b/projects/coreui-angular/package.json
@@ -28,8 +28,8 @@
     "@angular/common": "^17.3.0",
     "@angular/core": "^17.3.0",
     "@angular/router": "^17.3.0",
-    "@coreui/coreui": "~5.0.0 || ~5.1.0",
-    "@coreui/icons-angular": "~5.0.0 || ~5.1.0",
+    "@coreui/coreui": "^5.1.0",
+    "@coreui/icons-angular": "~5.1.0",
     "rxjs": "^7.8.1"
   },
   "repository": {
@@ -49,5 +49,17 @@
     "component",
     "components"
   ],
-  "eslintConfig": {}
+  "eslintConfig": {},
+  "devDependencies": {
+    "copyfiles": "file:../../node_modules/copyfiles",
+    "typescript": "file:../../node_modules/typescript"
+  },
+  "schematics": "./schematics/collection.json",
+  "scripts": {
+    "build": "tsc -p tsconfig.schematics.json",
+    "postbuild": "copyfiles schematics/*/files/** schematics/collection.json ../../dist/coreui-angular/"
+  },
+  "ng-add": {
+    "save": true
+  }
 }
diff --git a/projects/coreui-angular/schematics/collection.json b/projects/coreui-angular/schematics/collection.json
new file mode 100644
index 00000000..a1cb4b7f
--- /dev/null
+++ b/projects/coreui-angular/schematics/collection.json
@@ -0,0 +1,9 @@
+{
+  "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
+  "schematics": {
+    "ng-add": {
+      "description": "Add @coreui/angular library to the project.",
+      "factory": "./ng-add/index#ngAdd"
+    }
+  }
+}
diff --git a/projects/coreui-angular/schematics/ng-add/index.ts b/projects/coreui-angular/schematics/ng-add/index.ts
new file mode 100644
index 00000000..7021db23
--- /dev/null
+++ b/projects/coreui-angular/schematics/ng-add/index.ts
@@ -0,0 +1,52 @@
+import { chain, Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
+import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
+import { addPackageToPackageJson, getPackageVersionFromPackageJson, PackageJson } from './package-config';
+import * as pkgJson from '../../package.json';
+
+const addCoreUIIconsAngular = (): Rule => {
+  return (tree: Tree, context: SchematicContext) => {
+    context.logger.info(`Installing @coreui/icons-angular as dependency`);
+    context.addTask(new NodePackageInstallTask({ packageName: '@coreui/icons-angular' }));
+    return tree;
+  };
+};
+
+const addCoreUIAngular = (): Rule => {
+  return (tree: Tree, context: SchematicContext) => {
+    context.logger.info(`Installing @coreui/angular as dependency`);
+    context.addTask(new NodePackageInstallTask());
+    return tree;
+  };
+};
+
+export function ngAdd(): Rule {
+  return (tree: Tree, context: SchematicContext) => {
+    context.logger.info(``);
+    context.logger.info('Installing @coreui/angular dependencies...');
+    const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
+    context.logger.info(`@angular/core version ${ngCoreVersionTag}`);
+    if (!ngCoreVersionTag) {
+      throw new SchematicsException('@angular/core version not found');
+    }
+    const projDeps = ['@angular/animations', '@angular/common', '@angular/core', '@angular/router'];
+    projDeps.forEach((dep) => {
+      addPackageToPackageJson(tree, dep, ngCoreVersionTag);
+    });
+
+    const pkg = pkgJson as PackageJson;
+    const libPeerDeps: string[] = ['@angular/cdk', '@coreui/coreui'];
+    libPeerDeps.forEach((dep: string) => {
+      const version = pkg.peerDependencies[dep];
+      context.logger.info(`Including ${dep} version ${version}`);
+      addPackageToPackageJson(tree, dep, version);
+    });
+    const libDeps: string[] = ['@popperjs/core'];
+    libDeps.forEach((dep: string) => {
+      const version = pkg.dependencies[dep];
+      context.logger.info(`Including ${dep} version ${version}`);
+      addPackageToPackageJson(tree, dep, version);
+    });
+
+    return chain([addCoreUIIconsAngular(), addCoreUIAngular()]);
+  };
+}
diff --git a/projects/coreui-angular/schematics/ng-add/package-config.ts b/projects/coreui-angular/schematics/ng-add/package-config.ts
new file mode 100644
index 00000000..fbf362ea
--- /dev/null
+++ b/projects/coreui-angular/schematics/ng-add/package-config.ts
@@ -0,0 +1,66 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { Tree } from '@angular-devkit/schematics';
+
+export interface PackageJson {
+  dependencies: Record<string, string>;
+  peerDependencies: Record<string, string>;
+}
+
+/**
+ * Sorts the keys of the given object.
+ * @returns A new object instance with sorted keys
+ */
+function sortObjectByKeys(obj: Record<string, string>) {
+  return Object.keys(obj)
+    .sort()
+    .reduce(
+      (result, key) => {
+        result[key] = obj[key];
+        return result;
+      },
+      {} as Record<string, string>
+    );
+}
+
+/** Adds a package to the package.json in the given host tree. */
+export function addPackageToPackageJson(host: Tree, pkg: string, version: string): Tree {
+  if (host.exists('package.json')) {
+    const sourceText = host.read('package.json')!.toString('utf-8');
+    const json = JSON.parse(sourceText) as PackageJson;
+
+    if (!json.dependencies) {
+      json.dependencies = {};
+    }
+
+    if (!json.dependencies[pkg]) {
+      json.dependencies[pkg] = version;
+      json.dependencies = sortObjectByKeys(json.dependencies);
+    }
+
+    host.overwrite('package.json', JSON.stringify(json, null, 2));
+  }
+
+  return host;
+}
+
+/** Gets the version of the specified package by looking at the package.json in the given tree. */
+export function getPackageVersionFromPackageJson(tree: Tree, name: string): string | null {
+  if (!tree.exists('package.json')) {
+    return null;
+  }
+
+  const packageJson = JSON.parse(tree.read('package.json')!.toString('utf8')) as PackageJson;
+
+  if (packageJson.dependencies && packageJson.dependencies[name]) {
+    return packageJson.dependencies[name];
+  }
+
+  return null;
+}
diff --git a/projects/coreui-angular/tsconfig.schematics.json b/projects/coreui-angular/tsconfig.schematics.json
new file mode 100644
index 00000000..513e9c46
--- /dev/null
+++ b/projects/coreui-angular/tsconfig.schematics.json
@@ -0,0 +1,36 @@
+{
+  "compilerOptions": {
+    "baseUrl": ".",
+    "lib": [
+      "ES2022",
+      "dom"
+    ],
+    "declaration": true,
+    "module": "commonjs",
+    "moduleResolution": "node",
+    "noEmitOnError": true,
+    "noFallthroughCasesInSwitch": true,
+    "noImplicitAny": true,
+    "noImplicitThis": true,
+    "noUnusedParameters": true,
+    "noUnusedLocals": true,
+    "rootDir": "schematics",
+    "outDir": "../../dist/coreui-angular/schematics",
+    "resolveJsonModule": true,
+    "skipDefaultLibCheck": true,
+    "skipLibCheck": true,
+    "sourceMap": true,
+    "strictNullChecks": true,
+    "target": "ES2022",
+    "types": [
+      "jasmine",
+      "node"
+    ]
+  },
+  "include": [
+    "schematics/**/*"
+  ],
+  "exclude": [
+    "schematics/*/files/**/*"
+  ]
+}
diff --git a/projects/coreui-icons-angular/package.json b/projects/coreui-icons-angular/package.json
index a34af1b6..7d7cc4b2 100644
--- a/projects/coreui-icons-angular/package.json
+++ b/projects/coreui-icons-angular/package.json
@@ -43,5 +43,17 @@
     "layout",
     "component",
     "angular"
-  ]
+  ],
+  "devDependencies": {
+    "copyfiles": "file:../../node_modules/copyfiles",
+    "typescript": "file:../../node_modules/typescript"
+  },
+  "schematics": "./schematics/collection.json",
+  "scripts": {
+    "build": "tsc -p tsconfig.schematics.json",
+    "postbuild": "copyfiles schematics/*/files/** schematics/collection.json ../../dist/coreui-icons-angular/"
+  },
+  "ng-add": {
+    "save": true
+  }
 }
diff --git a/projects/coreui-icons-angular/schematics/collection.json b/projects/coreui-icons-angular/schematics/collection.json
new file mode 100644
index 00000000..72b8543b
--- /dev/null
+++ b/projects/coreui-icons-angular/schematics/collection.json
@@ -0,0 +1,9 @@
+{
+  "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
+  "schematics": {
+    "ng-add": {
+      "description": "Add @coreui/icons-angular library to the project.",
+      "factory": "./ng-add/index#ngAdd"
+    }
+  }
+}
diff --git a/projects/coreui-icons-angular/schematics/ng-add/index.ts b/projects/coreui-icons-angular/schematics/ng-add/index.ts
new file mode 100644
index 00000000..b45d681f
--- /dev/null
+++ b/projects/coreui-icons-angular/schematics/ng-add/index.ts
@@ -0,0 +1,10 @@
+import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
+import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
+
+export function ngAdd(): Rule {
+  return (tree: Tree, context: SchematicContext) => {
+    context.logger.info('Installing @coreui/icons-angular ...');
+    context.addTask(new NodePackageInstallTask());
+    return tree;
+  };
+}
diff --git a/projects/coreui-icons-angular/tsconfig.schematics.json b/projects/coreui-icons-angular/tsconfig.schematics.json
new file mode 100644
index 00000000..e99caa20
--- /dev/null
+++ b/projects/coreui-icons-angular/tsconfig.schematics.json
@@ -0,0 +1,35 @@
+{
+  "compilerOptions": {
+    "baseUrl": ".",
+    "lib": [
+      "ES2022",
+      "dom"
+    ],
+    "declaration": true,
+    "module": "commonjs",
+    "moduleResolution": "node",
+    "noEmitOnError": true,
+    "noFallthroughCasesInSwitch": true,
+    "noImplicitAny": true,
+    "noImplicitThis": true,
+    "noUnusedParameters": true,
+    "noUnusedLocals": true,
+    "rootDir": "schematics",
+    "outDir": "../../dist/coreui-icons-angular/schematics",
+    "skipDefaultLibCheck": true,
+    "skipLibCheck": true,
+    "sourceMap": true,
+    "strictNullChecks": true,
+    "target": "ES2022",
+    "types": [
+      "jasmine",
+      "node"
+    ]
+  },
+  "include": [
+    "schematics/**/*"
+  ],
+  "exclude": [
+    "schematics/*/files/**/*"
+  ]
+}

From 2e4672c86881bc0e43ed5a65ffb28ed2704ae673 Mon Sep 17 00:00:00 2001
From: xidedix <xidedix@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:32:19 +0200
Subject: [PATCH 2/4] chore(release): ship v5.1.8

---
 CHANGELOG.md                                 |   7 +
 package-lock.json                            | 364 ++++++++++++++++---
 package.json                                 |   2 +-
 projects/coreui-angular-chartjs/package.json |   2 +-
 projects/coreui-angular/package.json         |   2 +-
 projects/coreui-icons-angular/package.json   |   2 +-
 6 files changed, 321 insertions(+), 58 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 68d5f423..366edffc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
 
 ---
 
+#### `5.1.8`
+
+- feat(schematics): ng-add basic integration
+- chore(dependencies): update
+
+---
+
 #### `5.1.7`
 
 - chore(dependencies): update
diff --git a/package-lock.json b/package-lock.json
index f82d6b70..21f3b454 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "coreui-angular-dev",
-  "version": "5.1.7",
+  "version": "5.1.8",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "coreui-angular-dev",
-      "version": "5.1.7",
+      "version": "5.1.8",
       "license": "MIT",
       "dependencies": {
         "@angular/animations": "^17.3.12",
@@ -30,6 +30,7 @@
       },
       "devDependencies": {
         "@angular-devkit/build-angular": "^17.3.8",
+        "@angular-devkit/schematics": "^17.3.8",
         "@angular-eslint/builder": "^17.5.2",
         "@angular-eslint/eslint-plugin": "^17.5.2",
         "@angular-eslint/eslint-plugin-template": "^17.5.2",
@@ -40,11 +41,12 @@
         "@angular/language-service": "^17.3.12",
         "@types/jasmine": "^5.1.4",
         "@types/lodash-es": "^4.17.12",
-        "@types/node": "^20.14.11",
-        "@typescript-eslint/eslint-plugin": "^7.16.1",
-        "@typescript-eslint/parser": "^7.16.1",
+        "@types/node": "^20.14.12",
+        "@typescript-eslint/eslint-plugin": "^7.17.0",
+        "@typescript-eslint/parser": "^7.17.0",
+        "copyfiles": "^2.4.1",
         "eslint": "^8.57.0",
-        "jasmine-core": "^5.1.2",
+        "jasmine-core": "^5.2.0",
         "karma": "^6.4.3",
         "karma-chrome-launcher": "^3.2.0",
         "karma-coverage": "^2.2.1",
@@ -4934,9 +4936,9 @@
       "license": "MIT"
     },
     "node_modules/@types/node": {
-      "version": "20.14.11",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz",
-      "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==",
+      "version": "20.14.12",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.12.tgz",
+      "integrity": "sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -5035,17 +5037,17 @@
       }
     },
     "node_modules/@typescript-eslint/eslint-plugin": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz",
-      "integrity": "sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.17.0.tgz",
+      "integrity": "sha512-pyiDhEuLM3PuANxH7uNYan1AaFs5XE0zw1hq69JBvGvE7gSuEoQl1ydtEe/XQeoC3GQxLXyOVa5kNOATgM638A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@eslint-community/regexpp": "^4.10.0",
-        "@typescript-eslint/scope-manager": "7.16.1",
-        "@typescript-eslint/type-utils": "7.16.1",
-        "@typescript-eslint/utils": "7.16.1",
-        "@typescript-eslint/visitor-keys": "7.16.1",
+        "@typescript-eslint/scope-manager": "7.17.0",
+        "@typescript-eslint/type-utils": "7.17.0",
+        "@typescript-eslint/utils": "7.17.0",
+        "@typescript-eslint/visitor-keys": "7.17.0",
         "graphemer": "^1.4.0",
         "ignore": "^5.3.1",
         "natural-compare": "^1.4.0",
@@ -5069,14 +5071,14 @@
       }
     },
     "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz",
-      "integrity": "sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.17.0.tgz",
+      "integrity": "sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/typescript-estree": "7.16.1",
-        "@typescript-eslint/utils": "7.16.1",
+        "@typescript-eslint/typescript-estree": "7.17.0",
+        "@typescript-eslint/utils": "7.17.0",
         "debug": "^4.3.4",
         "ts-api-utils": "^1.3.0"
       },
@@ -5097,16 +5099,16 @@
       }
     },
     "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.1.tgz",
-      "integrity": "sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.17.0.tgz",
+      "integrity": "sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.4.0",
-        "@typescript-eslint/scope-manager": "7.16.1",
-        "@typescript-eslint/types": "7.16.1",
-        "@typescript-eslint/typescript-estree": "7.16.1"
+        "@typescript-eslint/scope-manager": "7.17.0",
+        "@typescript-eslint/types": "7.17.0",
+        "@typescript-eslint/typescript-estree": "7.17.0"
       },
       "engines": {
         "node": "^18.18.0 || >=20.0.0"
@@ -5120,16 +5122,16 @@
       }
     },
     "node_modules/@typescript-eslint/parser": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.1.tgz",
-      "integrity": "sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.17.0.tgz",
+      "integrity": "sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A==",
       "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
-        "@typescript-eslint/scope-manager": "7.16.1",
-        "@typescript-eslint/types": "7.16.1",
-        "@typescript-eslint/typescript-estree": "7.16.1",
-        "@typescript-eslint/visitor-keys": "7.16.1",
+        "@typescript-eslint/scope-manager": "7.17.0",
+        "@typescript-eslint/types": "7.17.0",
+        "@typescript-eslint/typescript-estree": "7.17.0",
+        "@typescript-eslint/visitor-keys": "7.17.0",
         "debug": "^4.3.4"
       },
       "engines": {
@@ -5149,14 +5151,14 @@
       }
     },
     "node_modules/@typescript-eslint/scope-manager": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz",
-      "integrity": "sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.17.0.tgz",
+      "integrity": "sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "7.16.1",
-        "@typescript-eslint/visitor-keys": "7.16.1"
+        "@typescript-eslint/types": "7.17.0",
+        "@typescript-eslint/visitor-keys": "7.17.0"
       },
       "engines": {
         "node": "^18.18.0 || >=20.0.0"
@@ -5272,9 +5274,9 @@
       }
     },
     "node_modules/@typescript-eslint/types": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.1.tgz",
-      "integrity": "sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.17.0.tgz",
+      "integrity": "sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -5286,14 +5288,14 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz",
-      "integrity": "sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.17.0.tgz",
+      "integrity": "sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==",
       "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
-        "@typescript-eslint/types": "7.16.1",
-        "@typescript-eslint/visitor-keys": "7.16.1",
+        "@typescript-eslint/types": "7.17.0",
+        "@typescript-eslint/visitor-keys": "7.17.0",
         "debug": "^4.3.4",
         "globby": "^11.1.0",
         "is-glob": "^4.0.3",
@@ -5449,13 +5451,13 @@
       }
     },
     "node_modules/@typescript-eslint/visitor-keys": {
-      "version": "7.16.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz",
-      "integrity": "sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.17.0.tgz",
+      "integrity": "sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "7.16.1",
+        "@typescript-eslint/types": "7.17.0",
         "eslint-visitor-keys": "^3.4.3"
       },
       "engines": {
@@ -7073,6 +7075,158 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/copyfiles": {
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
+      "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "glob": "^7.0.5",
+        "minimatch": "^3.0.3",
+        "mkdirp": "^1.0.4",
+        "noms": "0.0.0",
+        "through2": "^2.0.1",
+        "untildify": "^4.0.0",
+        "yargs": "^16.1.0"
+      },
+      "bin": {
+        "copyfiles": "copyfiles",
+        "copyup": "copyfiles"
+      }
+    },
+    "node_modules/copyfiles/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "color-convert": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      }
+    },
+    "node_modules/copyfiles/node_modules/brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/copyfiles/node_modules/cliui": {
+      "version": "7.0.4",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+      "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "string-width": "^4.2.0",
+        "strip-ansi": "^6.0.0",
+        "wrap-ansi": "^7.0.0"
+      }
+    },
+    "node_modules/copyfiles/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
+      }
+    },
+    "node_modules/copyfiles/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/copyfiles/node_modules/minimatch": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/copyfiles/node_modules/mkdirp": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+      "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+      "dev": true,
+      "license": "MIT",
+      "bin": {
+        "mkdirp": "bin/cmd.js"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/copyfiles/node_modules/wrap-ansi": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ansi-styles": "^4.0.0",
+        "string-width": "^4.1.0",
+        "strip-ansi": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+      }
+    },
+    "node_modules/copyfiles/node_modules/yargs": {
+      "version": "16.2.0",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+      "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "cliui": "^7.0.2",
+        "escalade": "^3.1.1",
+        "get-caller-file": "^2.0.5",
+        "require-directory": "^2.1.1",
+        "string-width": "^4.2.0",
+        "y18n": "^5.0.5",
+        "yargs-parser": "^20.2.2"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/copyfiles/node_modules/yargs-parser": {
+      "version": "20.2.9",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
+      "dev": true,
+      "license": "ISC",
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/core-js-compat": {
       "version": "3.37.1",
       "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz",
@@ -10295,9 +10449,9 @@
       }
     },
     "node_modules/jasmine-core": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz",
-      "integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==",
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.2.0.tgz",
+      "integrity": "sha512-tSAtdrvWybZkQmmaIoDgnvHG8ORUNw5kEVlO5CvrXj02Jjr9TZrmjFq7FUiOUzJiOP2wLGYT6PgrQgQF4R1xiw==",
       "dev": true,
       "license": "MIT"
     },
@@ -12056,6 +12210,44 @@
       "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==",
       "license": "MIT"
     },
+    "node_modules/noms": {
+      "version": "0.0.0",
+      "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz",
+      "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "inherits": "^2.0.1",
+        "readable-stream": "~1.0.31"
+      }
+    },
+    "node_modules/noms/node_modules/isarray": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+      "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/noms/node_modules/readable-stream": {
+      "version": "1.0.34",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+      "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.1",
+        "isarray": "0.0.1",
+        "string_decoder": "~0.10.x"
+      }
+    },
+    "node_modules/noms/node_modules/string_decoder": {
+      "version": "0.10.31",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+      "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/nopt": {
       "version": "7.2.1",
       "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz",
@@ -15111,6 +15303,50 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/through2": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "readable-stream": "~2.3.6",
+        "xtend": "~4.0.1"
+      }
+    },
+    "node_modules/through2/node_modules/readable-stream": {
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+      "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      }
+    },
+    "node_modules/through2/node_modules/safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/through2/node_modules/string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
     "node_modules/thunky": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
@@ -15409,6 +15645,16 @@
         "node": ">= 0.8"
       }
     },
+    "node_modules/untildify": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
+      "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      }
+    },
     "node_modules/update-browserslist-db": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz",
@@ -16532,6 +16778,16 @@
         }
       }
     },
+    "node_modules/xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.4"
+      }
+    },
     "node_modules/y18n": {
       "version": "5.0.8",
       "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
diff --git a/package.json b/package.json
index da58f7fc..f499ba6c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "coreui-angular-dev",
-  "version": "5.1.7",
+  "version": "5.1.8",
   "description": "CoreUI Components Library for Angular",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
diff --git a/projects/coreui-angular-chartjs/package.json b/projects/coreui-angular-chartjs/package.json
index ffe99bab..336f7187 100644
--- a/projects/coreui-angular-chartjs/package.json
+++ b/projects/coreui-angular-chartjs/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@coreui/angular-chartjs",
-  "version": "5.1.7",
+  "version": "5.1.8",
   "description": "Angular wrapper component for Chart.js",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
diff --git a/projects/coreui-angular/package.json b/projects/coreui-angular/package.json
index af9d553e..87b69911 100644
--- a/projects/coreui-angular/package.json
+++ b/projects/coreui-angular/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@coreui/angular",
-  "version": "5.1.7",
+  "version": "5.1.8",
   "description": "CoreUI Components Library for Angular",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
diff --git a/projects/coreui-icons-angular/package.json b/projects/coreui-icons-angular/package.json
index 7d7cc4b2..6eec7be3 100644
--- a/projects/coreui-icons-angular/package.json
+++ b/projects/coreui-icons-angular/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@coreui/icons-angular",
-  "version": "5.1.7",
+  "version": "5.1.8",
   "description": "CoreUI Icons Angular component and service",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",

From 2c716b35743f3989e0cd84de138fe3434941d3cd Mon Sep 17 00:00:00 2001
From: xidedix <xidedix@users.noreply.github.com>
Date: Thu, 25 Jul 2024 18:43:33 +0200
Subject: [PATCH 3/4] refactor(schematics): add fixed dependency versions

---
 .../schematics/ng-add/index.ts                | 68 ++++++++-----
 .../schematics/ng-add/package-config.ts       |  2 +
 .../coreui-angular/schematics/ng-add/index.ts | 95 ++++++++++++-------
 .../schematics/ng-add/package-config.ts       |  2 +
 projects/coreui-angular/tsconfig.json         |  3 +
 .../schematics/ng-add/index.ts                | 43 ++++++++-
 .../schematics/ng-add/package-config.ts       | 68 +++++++++++++
 .../tsconfig.schematics.json                  |  1 +
 tsconfig.json                                 |  1 +
 9 files changed, 222 insertions(+), 61 deletions(-)
 create mode 100644 projects/coreui-icons-angular/schematics/ng-add/package-config.ts

diff --git a/projects/coreui-angular-chartjs/schematics/ng-add/index.ts b/projects/coreui-angular-chartjs/schematics/ng-add/index.ts
index 0bc59115..e2d9677e 100644
--- a/projects/coreui-angular-chartjs/schematics/ng-add/index.ts
+++ b/projects/coreui-angular-chartjs/schematics/ng-add/index.ts
@@ -1,39 +1,59 @@
-import { chain, Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
+import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
 import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
-import { addPackageToPackageJson, getPackageVersionFromPackageJson, PackageJson } from './package-config';
+import { addPackageJsonDependency, NodeDependency, NodeDependencyType } from '@schematics/angular/utility/dependencies';
+import { getPackageVersionFromPackageJson, PackageJson } from './package-config';
 import * as pkgJson from '../../package.json';
 
-export function addCoreUIAngularChartJs(): Rule {
-  return (tree: Tree, context: SchematicContext) => {
-    context.logger.info('Installing @coreui/angular-chartjs ...');
-    context.addTask(new NodePackageInstallTask());
-    return tree;
-  };
-}
-
 export function ngAdd(): Rule {
   return (tree: Tree, context: SchematicContext) => {
+    const pkg = pkgJson as unknown as PackageJson;
+
     context.logger.info(``);
-    context.logger.info('Installing @coreui/angular-chartjs dependencies...');
+    context.logger.info(`Installing ${pkg.name} dependencies...`);
+
     const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
     context.logger.info(`@angular/core version ${ngCoreVersionTag}`);
     if (!ngCoreVersionTag) {
       throw new SchematicsException('@angular/core version not found');
     }
-    const pkg = pkgJson as PackageJson;
-    const libPeerDeps: string[] = ['@coreui/chartjs', 'chart.js'];
-    libPeerDeps.forEach((dep: string) => {
-      const version = pkg.peerDependencies[dep];
-      context.logger.info(`Including ${dep} version ${version}`);
-      addPackageToPackageJson(tree, dep, version);
-    });
-    const libDeps: string[] = ['lodash-es'];
-    libDeps.forEach((dep: string) => {
-      const version = pkg.dependencies[dep];
-      context.logger.info(`Including ${dep} version ${version}`);
-      addPackageToPackageJson(tree, dep, version);
+
+    const libraryDeps: NodeDependency[] = [
+      {
+        name: '@coreui/chartjs',
+        type: NodeDependencyType.Default,
+        version: pkg.peerDependencies['@coreui/chartjs'],
+        overwrite: true
+      },
+      {
+        name: 'chart.js',
+        type: NodeDependencyType.Default,
+        version: pkg.peerDependencies['chart.js'],
+        overwrite: true
+      },
+      {
+        name: 'lodash-es',
+        type: NodeDependencyType.Default,
+        version: pkg.dependencies['lodash-es'],
+        overwrite: true
+      }
+    ];
+
+    libraryDeps.forEach((dep) => {
+      addPackageJsonDependency(tree, dep);
+      context.logger.info(`Added dependency: ${dep.name}@${dep.version}`);
     });
 
-    return chain([addCoreUIAngularChartJs()]);
+    const library: NodeDependency = {
+      name: pkg.name,
+      type: NodeDependencyType.Default,
+      version: `~${pkg.version}`,
+      overwrite: true
+    };
+
+    addPackageJsonDependency(tree, library);
+    context.logger.info(`Installing ${library.name}@${library.version}`);
+    context.addTask(new NodePackageInstallTask());
+
+    return tree;
   };
 }
diff --git a/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts b/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts
index fbf362ea..95c3c1d1 100644
--- a/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts
+++ b/projects/coreui-angular-chartjs/schematics/ng-add/package-config.ts
@@ -10,7 +10,9 @@ import { Tree } from '@angular-devkit/schematics';
 
 export interface PackageJson {
   dependencies: Record<string, string>;
+  name: string;
   peerDependencies: Record<string, string>;
+  version: string;
 }
 
 /**
diff --git a/projects/coreui-angular/schematics/ng-add/index.ts b/projects/coreui-angular/schematics/ng-add/index.ts
index 7021db23..54ce8f91 100644
--- a/projects/coreui-angular/schematics/ng-add/index.ts
+++ b/projects/coreui-angular/schematics/ng-add/index.ts
@@ -1,52 +1,77 @@
-import { chain, Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
+import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
 import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
-import { addPackageToPackageJson, getPackageVersionFromPackageJson, PackageJson } from './package-config';
+import { addPackageJsonDependency, NodeDependency, NodeDependencyType } from '@schematics/angular/utility/dependencies';
+import { getPackageVersionFromPackageJson, PackageJson } from './package-config';
 import * as pkgJson from '../../package.json';
 
-const addCoreUIIconsAngular = (): Rule => {
-  return (tree: Tree, context: SchematicContext) => {
-    context.logger.info(`Installing @coreui/icons-angular as dependency`);
-    context.addTask(new NodePackageInstallTask({ packageName: '@coreui/icons-angular' }));
-    return tree;
-  };
-};
-
-const addCoreUIAngular = (): Rule => {
-  return (tree: Tree, context: SchematicContext) => {
-    context.logger.info(`Installing @coreui/angular as dependency`);
-    context.addTask(new NodePackageInstallTask());
-    return tree;
-  };
-};
-
 export function ngAdd(): Rule {
   return (tree: Tree, context: SchematicContext) => {
+    const pkg = pkgJson as unknown as PackageJson;
+
     context.logger.info(``);
-    context.logger.info('Installing @coreui/angular dependencies...');
+    context.logger.info(`Installing ${pkg.name} dependencies...`);
+
     const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
     context.logger.info(`@angular/core version ${ngCoreVersionTag}`);
     if (!ngCoreVersionTag) {
       throw new SchematicsException('@angular/core version not found');
     }
-    const projDeps = ['@angular/animations', '@angular/common', '@angular/core', '@angular/router'];
-    projDeps.forEach((dep) => {
-      addPackageToPackageJson(tree, dep, ngCoreVersionTag);
-    });
 
-    const pkg = pkgJson as PackageJson;
-    const libPeerDeps: string[] = ['@angular/cdk', '@coreui/coreui'];
-    libPeerDeps.forEach((dep: string) => {
-      const version = pkg.peerDependencies[dep];
-      context.logger.info(`Including ${dep} version ${version}`);
-      addPackageToPackageJson(tree, dep, version);
+    const projectDeps: NodeDependency[] = [
+      { name: '@angular/animations', type: NodeDependencyType.Default, version: ngCoreVersionTag, overwrite: false },
+      { name: '@angular/common', type: NodeDependencyType.Default, version: ngCoreVersionTag, overwrite: false },
+      { name: '@angular/core', type: NodeDependencyType.Default, version: ngCoreVersionTag, overwrite: false },
+      { name: '@angular/router', type: NodeDependencyType.Default, version: ngCoreVersionTag, overwrite: false }
+    ];
+
+    projectDeps.forEach((dep) => {
+      addPackageJsonDependency(tree, dep);
+      context.logger.info(`Added dependency: ${dep.name}@${dep.version}`);
     });
-    const libDeps: string[] = ['@popperjs/core'];
-    libDeps.forEach((dep: string) => {
-      const version = pkg.dependencies[dep];
-      context.logger.info(`Including ${dep} version ${version}`);
-      addPackageToPackageJson(tree, dep, version);
+
+    const libraryDeps: NodeDependency[] = [
+      {
+        name: '@angular/cdk',
+        type: NodeDependencyType.Default,
+        version: pkg.peerDependencies['@angular/cdk'],
+        overwrite: false
+      },
+      {
+        name: '@coreui/coreui',
+        type: NodeDependencyType.Default,
+        version: pkg.peerDependencies['@coreui/coreui'],
+        overwrite: true
+      },
+      {
+        name: '@coreui/icons-angular',
+        type: NodeDependencyType.Default,
+        version: pkg.peerDependencies['@coreui/icons-angular'],
+        overwrite: true
+      },
+      {
+        name: '@popperjs/core',
+        type: NodeDependencyType.Default,
+        version: pkg.dependencies['@popperjs/core'],
+        overwrite: true
+      }
+    ];
+
+    libraryDeps.forEach((dep) => {
+      addPackageJsonDependency(tree, dep);
+      context.logger.info(`Added dependency: ${dep.name}@${dep.version}`);
     });
 
-    return chain([addCoreUIIconsAngular(), addCoreUIAngular()]);
+    const library: NodeDependency = {
+      name: pkg.name,
+      type: NodeDependencyType.Default,
+      version: `~${pkg.version}`,
+      overwrite: true
+    };
+
+    addPackageJsonDependency(tree, library);
+    context.logger.info(`Installing ${library.name}@${library.version}`);
+    context.addTask(new NodePackageInstallTask());
+
+    return tree;
   };
 }
diff --git a/projects/coreui-angular/schematics/ng-add/package-config.ts b/projects/coreui-angular/schematics/ng-add/package-config.ts
index fbf362ea..95c3c1d1 100644
--- a/projects/coreui-angular/schematics/ng-add/package-config.ts
+++ b/projects/coreui-angular/schematics/ng-add/package-config.ts
@@ -10,7 +10,9 @@ import { Tree } from '@angular-devkit/schematics';
 
 export interface PackageJson {
   dependencies: Record<string, string>;
+  name: string;
   peerDependencies: Record<string, string>;
+  version: string;
 }
 
 /**
diff --git a/projects/coreui-angular/tsconfig.json b/projects/coreui-angular/tsconfig.json
index b3e0d01a..56f4fc9e 100644
--- a/projects/coreui-angular/tsconfig.json
+++ b/projects/coreui-angular/tsconfig.json
@@ -9,6 +9,9 @@
     },
     {
       "path": "./tsconfig.spec.json"
+    },
+    {
+      "path": "./tsconfig.schematics.json"
     }
   ]
 }
diff --git a/projects/coreui-icons-angular/schematics/ng-add/index.ts b/projects/coreui-icons-angular/schematics/ng-add/index.ts
index b45d681f..13b3188d 100644
--- a/projects/coreui-icons-angular/schematics/ng-add/index.ts
+++ b/projects/coreui-icons-angular/schematics/ng-add/index.ts
@@ -1,10 +1,49 @@
-import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
+import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics';
 import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
+import { addPackageJsonDependency, NodeDependency, NodeDependencyType } from '@schematics/angular/utility/dependencies';
+import { getPackageVersionFromPackageJson, PackageJson } from './package-config';
+import * as pkgJson from '../../package.json';
 
 export function ngAdd(): Rule {
   return (tree: Tree, context: SchematicContext) => {
-    context.logger.info('Installing @coreui/icons-angular ...');
+    const pkg = pkgJson as unknown as PackageJson;
+
+    context.logger.info(``);
+    context.logger.info(`Installing ${pkg.name} dependencies...`);
+
+    const ngCoreVersionTag = getPackageVersionFromPackageJson(tree, '@angular/core');
+    context.logger.info(`@angular/core version ${ngCoreVersionTag}`);
+    if (!ngCoreVersionTag) {
+      throw new SchematicsException('@angular/core version not found');
+    }
+
+    const projectDeps: NodeDependency[] = [
+      { name: '@angular/common', type: NodeDependencyType.Default, version: ngCoreVersionTag, overwrite: false },
+      { name: '@angular/core', type: NodeDependencyType.Default, version: ngCoreVersionTag, overwrite: false },
+      {
+        name: '@angular/platform-browser',
+        type: NodeDependencyType.Default,
+        version: ngCoreVersionTag,
+        overwrite: false
+      }
+    ];
+
+    projectDeps.forEach((dep) => {
+      addPackageJsonDependency(tree, dep);
+      context.logger.info(`Added dependency: ${dep.name}@${dep.version}`);
+    });
+
+    const library: NodeDependency = {
+      name: pkg.name,
+      type: NodeDependencyType.Default,
+      version: `~${pkg.version}`,
+      overwrite: true
+    };
+
+    addPackageJsonDependency(tree, library);
+    context.logger.info(`Installing ${library.name}@${library.version}`);
     context.addTask(new NodePackageInstallTask());
+
     return tree;
   };
 }
diff --git a/projects/coreui-icons-angular/schematics/ng-add/package-config.ts b/projects/coreui-icons-angular/schematics/ng-add/package-config.ts
new file mode 100644
index 00000000..95c3c1d1
--- /dev/null
+++ b/projects/coreui-icons-angular/schematics/ng-add/package-config.ts
@@ -0,0 +1,68 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { Tree } from '@angular-devkit/schematics';
+
+export interface PackageJson {
+  dependencies: Record<string, string>;
+  name: string;
+  peerDependencies: Record<string, string>;
+  version: string;
+}
+
+/**
+ * Sorts the keys of the given object.
+ * @returns A new object instance with sorted keys
+ */
+function sortObjectByKeys(obj: Record<string, string>) {
+  return Object.keys(obj)
+    .sort()
+    .reduce(
+      (result, key) => {
+        result[key] = obj[key];
+        return result;
+      },
+      {} as Record<string, string>
+    );
+}
+
+/** Adds a package to the package.json in the given host tree. */
+export function addPackageToPackageJson(host: Tree, pkg: string, version: string): Tree {
+  if (host.exists('package.json')) {
+    const sourceText = host.read('package.json')!.toString('utf-8');
+    const json = JSON.parse(sourceText) as PackageJson;
+
+    if (!json.dependencies) {
+      json.dependencies = {};
+    }
+
+    if (!json.dependencies[pkg]) {
+      json.dependencies[pkg] = version;
+      json.dependencies = sortObjectByKeys(json.dependencies);
+    }
+
+    host.overwrite('package.json', JSON.stringify(json, null, 2));
+  }
+
+  return host;
+}
+
+/** Gets the version of the specified package by looking at the package.json in the given tree. */
+export function getPackageVersionFromPackageJson(tree: Tree, name: string): string | null {
+  if (!tree.exists('package.json')) {
+    return null;
+  }
+
+  const packageJson = JSON.parse(tree.read('package.json')!.toString('utf8')) as PackageJson;
+
+  if (packageJson.dependencies && packageJson.dependencies[name]) {
+    return packageJson.dependencies[name];
+  }
+
+  return null;
+}
diff --git a/projects/coreui-icons-angular/tsconfig.schematics.json b/projects/coreui-icons-angular/tsconfig.schematics.json
index e99caa20..13131e4f 100644
--- a/projects/coreui-icons-angular/tsconfig.schematics.json
+++ b/projects/coreui-icons-angular/tsconfig.schematics.json
@@ -16,6 +16,7 @@
     "noUnusedLocals": true,
     "rootDir": "schematics",
     "outDir": "../../dist/coreui-icons-angular/schematics",
+    "resolveJsonModule": true,
     "skipDefaultLibCheck": true,
     "skipLibCheck": true,
     "sourceMap": true,
diff --git a/tsconfig.json b/tsconfig.json
index 1d62e309..cef7b26e 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -27,6 +27,7 @@
     "declaration": false,
     "experimentalDecorators": true,
     "moduleResolution": "node",
+    "resolveJsonModule": true,
     "importHelpers": true,
     "target": "ES2022",
     "module": "ES2022",

From 71fdea400bd7518ba9b50b84cc057a0f697f1e9f Mon Sep 17 00:00:00 2001
From: xidedix <xidedix@users.noreply.github.com>
Date: Thu, 25 Jul 2024 18:44:11 +0200
Subject: [PATCH 4/4] chore(release): ship v5.1.11

---
 CHANGELOG.md                                 | 2 +-
 package.json                                 | 2 +-
 projects/coreui-angular-chartjs/package.json | 2 +-
 projects/coreui-angular/package.json         | 4 ++--
 projects/coreui-icons-angular/package.json   | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 366edffc..07d49314 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
 
 ---
 
-#### `5.1.8`
+#### `5.1.11`
 
 - feat(schematics): ng-add basic integration
 - chore(dependencies): update
diff --git a/package.json b/package.json
index f499ba6c..723a2a0e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "coreui-angular-dev",
-  "version": "5.1.8",
+  "version": "5.1.11",
   "description": "CoreUI Components Library for Angular",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
diff --git a/projects/coreui-angular-chartjs/package.json b/projects/coreui-angular-chartjs/package.json
index 336f7187..ca941302 100644
--- a/projects/coreui-angular-chartjs/package.json
+++ b/projects/coreui-angular-chartjs/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@coreui/angular-chartjs",
-  "version": "5.1.8",
+  "version": "5.1.11",
   "description": "Angular wrapper component for Chart.js",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
diff --git a/projects/coreui-angular/package.json b/projects/coreui-angular/package.json
index 87b69911..a0b702d4 100644
--- a/projects/coreui-angular/package.json
+++ b/projects/coreui-angular/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@coreui/angular",
-  "version": "5.1.8",
+  "version": "5.1.11",
   "description": "CoreUI Components Library for Angular",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
@@ -29,7 +29,7 @@
     "@angular/core": "^17.3.0",
     "@angular/router": "^17.3.0",
     "@coreui/coreui": "^5.1.0",
-    "@coreui/icons-angular": "~5.1.0",
+    "@coreui/icons-angular": "~5.1.11",
     "rxjs": "^7.8.1"
   },
   "repository": {
diff --git a/projects/coreui-icons-angular/package.json b/projects/coreui-icons-angular/package.json
index 6eec7be3..09348af3 100644
--- a/projects/coreui-icons-angular/package.json
+++ b/projects/coreui-icons-angular/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@coreui/icons-angular",
-  "version": "5.1.8",
+  "version": "5.1.11",
   "description": "CoreUI Icons Angular component and service",
   "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek",
   "license": "MIT",
