pnotify icon indicating copy to clipboard operation
pnotify copied to clipboard

pnotify v5.1.0 and angular 9

Open raymond10 opened this issue 5 years ago • 14 comments

Hi,

I use latest version of pnotify in my ng9 app but I'm facing of some issues I don't understand.

1 - I have error in in node_modules/@pnotify/core/Stack.d.ts line 1 TS wants import { Notice } from './'; instead of import Notice from './';

Stack.d.ts img Capture d’écran 2020-04-23 à 16 12 53

TS error img Capture d’écran 2020-04-23 à 16 12 46

2 - On notification, it displays on bottom left of my screen with no icons, no click button etc.. instead of top right of my screen

Notification img Capture d’écran 2020-04-23 à 16 07 52

Code img Capture d’écran 2020-04-23 à 16 11 19

Thanks for help

raymond10 avatar Apr 23 '20 14:04 raymond10

i have the same error .... in my app ... but:

I've changed index.d.ts, at line 232, From : export abstract class Notice extends NoticeProperties To : export default abstract class Notice extends NoticeProperties

and the error go away .... i think that, we have two abstract classes declared in this file, however, angular doesn't know what class is the "main" class of the file.

i think that it's the answer! See ya

CarlosScarpato avatar Apr 29 '20 00:04 CarlosScarpato

Hi, Thanks for reply (I go to modify in node_modules) but what the developer think about these issues ? Do they will be fixed in the next version to fit with angular 9 ?

raymond10 avatar Apr 30 '20 10:04 raymond10

Hi,

I made change in the core/index.d.ts but I have the same issue. The notification display but no icon, no button and always in bottom left.

Thanks

raymond10 avatar Apr 30 '20 10:04 raymond10

so, i've tested yesterday, and i got the same problem ... with pnotify, so, now, i saw that the developer has made some changes ... i'll try it again ...

see ya

CarlosScarpato avatar Apr 30 '20 22:04 CarlosScarpato

Hi,

I made change in the core/index.d.ts but I have the same issue. The notification display but no icon, no button and always in bottom left.

Thanks

Bro .... the error continues .... let wait other commit from developer ....

tks

CarlosScarpato avatar Apr 30 '20 23:04 CarlosScarpato

Hi,

Thanks for your assistance. I wait for the developer.

see ya

raymond10 avatar May 04 '20 12:05 raymond10

Looks like both of these PRs fix this issue in differing ways: #399 #398

jarodsmk avatar Sep 30 '20 15:09 jarodsmk

@hperrin if you get a moment, would you mind taking a look at them please? 🙌

jarodsmk avatar Sep 30 '20 15:09 jarodsmk

Managed to recreate this on codesandbox.io with Angular 11.2 which is interesting because no errors are thrown there, which is why I think this was overlooked

Easy way recreate this issue:

  1. ng new PNotifyTest
  2. npm i --save pnotify
  3. (Add code either from the PNotify Angular docs or from the provided codesandbox.io example)
  4. ng s

jarodsmk avatar Feb 18 '21 19:02 jarodsmk

I'm looking into this now.

hperrin avatar Feb 22 '21 17:02 hperrin

Is this only happening with Angular, or with any project using TypeScript?

hperrin avatar Feb 22 '21 17:02 hperrin

Is this only happening with Angular, or with any project using TypeScript?

Can't say for sure, I think everyone who commented here experienced it with Angular projects - I suspect Typescript projects may be affected too

jarodsmk avatar Feb 22 '21 18:02 jarodsmk

Since Svelte now supports TypeScript natively, I may be able to do away with the type definition file and convert PNotify to typed Svelte.

hperrin avatar Feb 22 '21 19:02 hperrin

Hey @hperrin - just wanted to follow up on this? :)

jarodsmk avatar Sep 02 '21 08:09 jarodsmk