Skip to content

Commit e219259

Browse files
authored
Merge pull request #107 from ngneat/v15
V15
2 parents e5f5d0b + 15f9e8e commit e219259

File tree

18 files changed

+7519
-11430
lines changed

18 files changed

+7519
-11430
lines changed

.github/workflows/helipopper.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- uses: actions/setup-node@v1
3030
with:
31-
node-version: 14.15
31+
node-version: 16
3232

3333
- name: Install dependencies
3434
# If checksum for the `package-lock.json` hasn't changed then we shouldn't run
@@ -37,7 +37,7 @@ jobs:
3737
if: steps.npm-cache.outputs.cache-hit != 'true'
3838
env:
3939
HUSKY_SKIP_INSTALL: 'true'
40-
run: npm ci
40+
run: npm i --force
4141

4242
- name: Build library
4343
run: npm run build:lib

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [6.0.0](https://github.com/ngneat/helipopper/compare/v5.1.4...v6.0.0) (2022-11-27)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* upgrade to Angular 14
11+
12+
- Remove `TippyModule`
13+
- Peer dependency is now ng v14
14+
15+
### Features
16+
17+
* upgrade to Angular 14 ([e040211](https://github.com/ngneat/helipopper/commit/e04021193f063d5a3bd33334a579f2a130902f55))
18+
519
### [5.1.4](https://github.com/ngneat/helipopper/compare/v5.1.3...v5.1.4) (2022-02-04)
620

721

README.md

Lines changed: 22 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,22 @@ If you're using v1 and don't want to migrate, you can find it [here](https://git
4242
npm install @ngneat/helipopper @ngneat/overview
4343
```
4444

45-
It will automatically add the `TippyModule` to your `AppModule`. You can configure it as shown below:
45+
Configure it as shown below:
4646

4747
```ts
48-
import { TippyModule, tooltipVariation, popperVariation } from '@ngneat/helipopper';
49-
50-
@NgModule({
51-
declarations: [AppComponent],
52-
imports: [TippyModule.forRoot({
53-
defaultVariation: 'tooltip',
54-
variations: {
55-
tooltip: tooltipVariation,
56-
popper: popperVariation,
57-
}
58-
})],
59-
bootstrap: [AppComponent]
48+
import { provideTippyConfig, tooltipVariation, popperVariation } from '@ngneat/helipopper';
49+
50+
bootstrapApplication(AppComponent, {
51+
providers: [
52+
provideTippyConfig({
53+
defaultVariation: 'tooltip',
54+
variations: {
55+
tooltip: tooltipVariation,
56+
popper: popperVariation,
57+
}
58+
})
59+
]
6060
})
61-
export class AppModule {
62-
}
6361
```
6462

6563
Add the styles you want to `styles.scss`:
@@ -72,10 +70,9 @@ Add the styles you want to `styles.scss`:
7270

7371
You have the freedom to [customize](https://atomiks.github.io/tippyjs/v6/themes/) it if you need to.
7472

75-
Now you can use it in your templates:
73+
Import the standalone `TippyDirective` and use it in your templates:
7674

7775
```html
78-
7976
<button tippy="Helpful Message">
8077
I have a tooltip
8178
</button>
@@ -115,8 +112,7 @@ import { TIPPY_REF, TippyInstance } from '@ngneat/helipopper';
115112

116113
@Component()
117114
class MyComponent {
118-
constructor(@Inject(TIPPY_REF) tippy: TippyInstance) {
119-
}
115+
tippy = inject(TIPPY_REF);
120116
}
121117
```
122118

@@ -159,24 +155,23 @@ First, define the `contextMenu` variation:
159155
```ts
160156
import {
161157
popperVariation,
162-
TippyModule,
163158
tooltipVariation,
159+
provideTippyConfig,
164160
withContextMenuVariation
165161
} from '@ngneat/helipopper';
166162

167-
@NgModule({
168-
imports: [
169-
TippyModule.forRoot({
163+
bootstrapApplication(AppComponent, {
164+
providers: [
165+
provideTippyConfig({
170166
defaultVariation: 'tooltip',
171167
variations: {
172168
tooltip: tooltipVariation,
173169
popper: popperVariation,
174170
contextMenu: withContextMenuVariation(popperVariation),
175171
}
176172
})
177-
],
173+
]
178174
})
179-
export class AppModule {}
180175
```
181176

182177
Now you can use it in your template:
@@ -274,10 +269,7 @@ import { TippyService, TippyInstance } from '@ngneat/helipopper';
274269

275270
class Component {
276271
@ViewChild('inputName') inputName: ElementRef;
277-
private tippy: TippyInstance;
278-
279-
constructor(private tippy: TippyService) {
280-
}
272+
private tippy = inject(TippyService);
281273

282274
open() {
283275
if(!this.tippy) {
@@ -291,33 +283,4 @@ class Component {
291283
this.tippy?.destroy();
292284
}
293285
}
294-
```
295-
296-
## Contributors ✨
297-
298-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
299-
300-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
301-
<!-- prettier-ignore-start -->
302-
<!-- markdownlint-disable -->
303-
<table>
304-
<tr>
305-
<td align="center"><a href="https://www.netbasal.com/"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=NetanelBasal" title="Code">💻</a> <a href="https://github.com/@ngneat/helipopper/commits?author=NetanelBasal" title="Documentation">📖</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a></td>
306-
<td align="center"><a href="https://github.com/itayod"><img src="https://avatars2.githubusercontent.com/u/6719615?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Itay Oded</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=itayod" title="Code">💻</a></td>
307-
<td align="center"><a href="https://gerome-dev.netlify.com/"><img src="https://avatars0.githubusercontent.com/u/32737308?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gérôme Grignon</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=geromegrignon" title="Code">💻</a></td>
308-
<td align="center"><a href="https://medium.com/@overthesanity"><img src="https://avatars1.githubusercontent.com/u/7337691?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Artur Androsovych</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=arturovt" title="Code">💻</a> <a href="https://github.com/@ngneat/helipopper/commits?author=arturovt" title="Tests">⚠️</a></td>
309-
<td align="center"><a href="https://github.com/shaharkazaz"><img src="https://avatars2.githubusercontent.com/u/17194830?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shahar Kazaz</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=shaharkazaz" title="Code">💻</a> <a href="https://github.com/@ngneat/helipopper/commits?author=shaharkazaz" title="Documentation">📖</a></td>
310-
<td align="center"><a href="https://houseofangular.io/team/"><img src="https://avatars.githubusercontent.com/u/55434796?v=4?s=100" width="100px;" alt=""/><br /><sub><b>stefanoww</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=stefanoww" title="Code">💻</a></td>
311-
<td align="center"><a href="https://github.com/rhutchison"><img src="https://avatars.githubusercontent.com/u/1460261?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ryan Hutchison</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=rhutchison" title="Code">💻</a> <a href="https://github.com/@ngneat/helipopper/commits?author=rhutchison" title="Documentation">📖</a> <a href="#ideas-rhutchison" title="Ideas, Planning, & Feedback">🤔</a></td>
312-
</tr>
313-
</table>
314-
315-
<!-- markdownlint-restore -->
316-
<!-- prettier-ignore-end -->
317-
318-
<!-- ALL-CONTRIBUTORS-LIST:END -->
319-
320-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
321-
Contributions of any kind welcome!
322-
Icon made by <a href="https://www.flaticon.com/authors/freepik" title="freepik">Airport</a>
323-
from <a href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
286+
```

angular.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,5 @@
140140
}
141141
}
142142
}
143-
},
144-
"defaultProject": "helipopper-playground"
143+
}
145144
}

0 commit comments

Comments
 (0)