From c8fb6b327b5f480f470d956f033adf30475bbd5e Mon Sep 17 00:00:00 2001 From: Luiz Philippe Date: Wed, 27 Oct 2021 18:05:20 -0300 Subject: [PATCH 1/5] Replace tooltip package --- angular.json | 1 - package-lock.json | 44 ++++++++++++++++++- package.json | 1 + .../ng-github-contributions/ng-package.json | 2 +- projects/ng-github-contributions/package.json | 9 ++-- .../board-cell/board-cell.component.html | 6 +-- .../src/lib/constants.ts | 15 +++++++ .../src/lib/github-contributions.module.ts | 3 ++ 8 files changed, 70 insertions(+), 11 deletions(-) diff --git a/angular.json b/angular.json index 0c91731..be580e5 100644 --- a/angular.json +++ b/angular.json @@ -143,7 +143,6 @@ } }, "styles": [ - "node_modules/bootstrap/dist/css/bootstrap.min.css", "projects/ng-github-contributions/src/lib/styles.css" ] }, diff --git a/package-lock.json b/package-lock.json index d376a9a..ab6c033 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2959,6 +2959,16 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -5593,6 +5603,13 @@ } } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -8410,6 +8427,13 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true, + "optional": true + }, "nanoid": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", @@ -9571,6 +9595,14 @@ } } }, + "ng2-tooltip-directive": { + "version": "2.9.22", + "resolved": "https://registry.npmjs.org/ng2-tooltip-directive/-/ng2-tooltip-directive-2.9.22.tgz", + "integrity": "sha512-y54rP/AHKkcS/+lZPGil9uirbfWrbhS8vE1GWswB08sVfT4ztu2h6SmIf7cJM1YenTaWYvYfKth9oZQJljXV5Q==", + "requires": { + "tslib": "^2.0.0" + } + }, "ngx-md": { "version": "12.0.5", "resolved": "https://registry.npmjs.org/ngx-md/-/ngx-md-12.0.5.tgz", @@ -13935,7 +13967,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", @@ -14700,7 +14736,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", diff --git a/package.json b/package.json index 8975fc4..66aafb0 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@octokit/graphql": "^4.6.4", "bootstrap": "^4.5.0", "he": "^1.2.0", + "ng2-tooltip-directive": "~2.9.22", "ngx-md": "^12.0.5", "rxjs": "~6.6.0", "rxjs-compat": "^6.6.7", diff --git a/projects/ng-github-contributions/ng-package.json b/projects/ng-github-contributions/ng-package.json index f49c662..7580c02 100644 --- a/projects/ng-github-contributions/ng-package.json +++ b/projects/ng-github-contributions/ng-package.json @@ -6,6 +6,6 @@ }, "allowedNonPeerDependencies": [ "tslib", - "@ng-bootstrap/ng-bootstrap" + "ng2-tooltip-directive" ] } \ No newline at end of file diff --git a/projects/ng-github-contributions/package.json b/projects/ng-github-contributions/package.json index 3f0acf9..030d0f8 100644 --- a/projects/ng-github-contributions/package.json +++ b/projects/ng-github-contributions/package.json @@ -5,11 +5,11 @@ "peerDependencies": { "@angular/common": "^11.2.14", "@angular/core": "^11.2.14", - "@ng-bootstrap/ng-bootstrap": "^9.1.3" + "ng2-tooltip-directive": "~2.9.22" }, "dependencies": { - "tslib": "^2.0.0", - "@ng-bootstrap/ng-bootstrap": "^9.1.3" + "ng2-tooltip-directive": "~2.9.22", + "tslib": "~2.9.22" }, "keywords": [ "github", @@ -17,6 +17,7 @@ "contributions calendar", "contributions board", "github contributions", + "github calendar", "github mural", "octokit" ], @@ -30,4 +31,4 @@ "url": "https://github.com/luizppa/ng-github-contributions/issues" }, "homepage": "https://ghcontributions.luizp.ninja" -} \ No newline at end of file +} diff --git a/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html b/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html index bfbedb7..89658f7 100644 --- a/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html +++ b/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html @@ -1,8 +1,8 @@ +
Date: Wed, 27 Oct 2021 18:14:07 -0300 Subject: [PATCH 2/5] Lint fixes --- .../ng-github-contributions/src/lib/constants.ts | 12 ++++++------ .../src/lib/github-contributions.module.ts | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/projects/ng-github-contributions/src/lib/constants.ts b/projects/ng-github-contributions/src/lib/constants.ts index 32cbd1e..65effe3 100644 --- a/projects/ng-github-contributions/src/lib/constants.ts +++ b/projects/ng-github-contributions/src/lib/constants.ts @@ -1,17 +1,17 @@ import { TooltipOptions } from 'ng2-tooltip-directive/lib/tooltip-options.interface'; export const DefaultTooltipOptions: TooltipOptions = { - 'delay': 0, - 'placement': 'top', - 'autoPlacement': false, + delay: 0, + placement: 'top', + autoPlacement: false, + hideDelayTouchscreen: 0, + hideDelayAfterClick: 0, 'show-delay': 0, 'hide-delay': 0, 'hide-delay-mobile': 0, - 'hideDelayTouchscreen': 0, 'animation-duration': 0, 'animation-duration-default': 0, - 'hideDelayAfterClick': 0, -} +}; export const DEFAULT_CELL_SIZE = 10; diff --git a/projects/ng-github-contributions/src/lib/github-contributions.module.ts b/projects/ng-github-contributions/src/lib/github-contributions.module.ts index d1d6b35..02f9412 100644 --- a/projects/ng-github-contributions/src/lib/github-contributions.module.ts +++ b/projects/ng-github-contributions/src/lib/github-contributions.module.ts @@ -8,6 +8,8 @@ import { BoardLegendComponent } from './components/github-board/board-legend/boa import { TooltipModule } from 'ng2-tooltip-directive'; import { DefaultTooltipOptions } from './constants'; +const TooltipImport = TooltipModule.forRoot(DefaultTooltipOptions); + @NgModule({ declarations: [ GithubBoardComponent, @@ -18,7 +20,7 @@ import { DefaultTooltipOptions } from './constants'; imports: [ CommonModule, NgbModule, - TooltipModule.forRoot(DefaultTooltipOptions), + TooltipImport, ], exports: [ GithubBoardComponent, From c18a84e634139b7e7a7b156ab0cfd5013e98ec44 Mon Sep 17 00:00:00 2001 From: Luiz Philippe Date: Wed, 27 Oct 2021 18:16:56 -0300 Subject: [PATCH 3/5] Update documentation --- README.md | 2 +- projects/ng-github-contributions/README.md | 2 +- src/assets/code-samples/custom-color.sample.js | 2 +- src/assets/code-samples/custom-size.sample.js | 2 +- src/assets/code-samples/custom-time-span.sample.js | 2 +- src/assets/code-samples/hiding-labels.sample.js | 2 +- src/assets/code-samples/install.sample.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6ead914..d7b2fb2 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ npm i --save @luizppa/ng-github-contributions Import `GithubContributionsModule` into your app module: ```javascript -import { GithubContributionsModule } from "ng-github-contributions"; +import { GithubContributionsModule } from "@luizppa/ng-github-contributions"; //... diff --git a/projects/ng-github-contributions/README.md b/projects/ng-github-contributions/README.md index 6ead914..d7b2fb2 100644 --- a/projects/ng-github-contributions/README.md +++ b/projects/ng-github-contributions/README.md @@ -35,7 +35,7 @@ npm i --save @luizppa/ng-github-contributions Import `GithubContributionsModule` into your app module: ```javascript -import { GithubContributionsModule } from "ng-github-contributions"; +import { GithubContributionsModule } from "@luizppa/ng-github-contributions"; //... diff --git a/src/assets/code-samples/custom-color.sample.js b/src/assets/code-samples/custom-color.sample.js index 3643342..99985e4 100644 --- a/src/assets/code-samples/custom-color.sample.js +++ b/src/assets/code-samples/custom-color.sample.js @@ -1,4 +1,4 @@ -import { GithubBoardOptions, Themes } from 'ng-github-contributions'; +import { GithubBoardOptions, Themes } from '@luizppa/ng-github-contributions'; //... export class MyComponent { diff --git a/src/assets/code-samples/custom-size.sample.js b/src/assets/code-samples/custom-size.sample.js index eb9ac6e..812d6d5 100644 --- a/src/assets/code-samples/custom-size.sample.js +++ b/src/assets/code-samples/custom-size.sample.js @@ -1,4 +1,4 @@ -import { GithubBoardOptions } from 'ng-github-contributions'; +import { GithubBoardOptions } from '@luizppa/ng-github-contributions'; //... export class MyComponent { diff --git a/src/assets/code-samples/custom-time-span.sample.js b/src/assets/code-samples/custom-time-span.sample.js index cc683b2..23b4ea0 100644 --- a/src/assets/code-samples/custom-time-span.sample.js +++ b/src/assets/code-samples/custom-time-span.sample.js @@ -1,4 +1,4 @@ -import { GithubBoardOptions } from 'ng-github-contributions'; +import { GithubBoardOptions } from '@luizppa/ng-github-contributions'; //... export class MyComponent { diff --git a/src/assets/code-samples/hiding-labels.sample.js b/src/assets/code-samples/hiding-labels.sample.js index 63069e3..d5897fb 100644 --- a/src/assets/code-samples/hiding-labels.sample.js +++ b/src/assets/code-samples/hiding-labels.sample.js @@ -1,4 +1,4 @@ -import { GithubBoardOptions } from 'ng-github-contributions'; +import { GithubBoardOptions } from '@luizppa/ng-github-contributions'; //... export class MyComponent { diff --git a/src/assets/code-samples/install.sample.js b/src/assets/code-samples/install.sample.js index 4c67f74..d62859e 100644 --- a/src/assets/code-samples/install.sample.js +++ b/src/assets/code-samples/install.sample.js @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { GithubContributionsModule } from "ng-github-contributions"; +import { GithubContributionsModule } from "@luizppa/ng-github-contributions"; //... From bd08a9ac1491c3b24d63bd5115760a15c8d58bc1 Mon Sep 17 00:00:00 2001 From: Luiz Philippe Date: Wed, 27 Oct 2021 18:37:15 -0300 Subject: [PATCH 4/5] Remove function call from module import --- .../github-board/board-cell/board-cell.component.html | 3 ++- .../github-board/board-cell/board-cell.component.ts | 5 ++++- .../src/lib/github-contributions.module.ts | 5 +---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html b/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html index 89658f7..91f9a9c 100644 --- a/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html +++ b/projects/ng-github-contributions/src/lib/components/github-board/board-cell/board-cell.component.html @@ -1,7 +1,8 @@
Date: Wed, 27 Oct 2021 18:42:03 -0300 Subject: [PATCH 5/5] Fix tslib version --- projects/ng-github-contributions/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ng-github-contributions/package.json b/projects/ng-github-contributions/package.json index 030d0f8..34d30c5 100644 --- a/projects/ng-github-contributions/package.json +++ b/projects/ng-github-contributions/package.json @@ -8,8 +8,8 @@ "ng2-tooltip-directive": "~2.9.22" }, "dependencies": { - "ng2-tooltip-directive": "~2.9.22", - "tslib": "~2.9.22" + "tslib": "^2.0.0", + "ng2-tooltip-directive": "~2.9.22" }, "keywords": [ "github",