Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngneat/hot-toast

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngneat/hot-toast - npm Package Compare versions

Comparing version 4.1.0 to 5.0.0-beta.1

index.d.ts

2

lib/components/animated-icon/animated-icon.component.d.ts

@@ -6,3 +6,3 @@ import { IconTheme } from '../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<AnimatedIconComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AnimatedIconComponent, "hot-toast-animated-icon", never, { "iconTheme": "iconTheme"; }, {}, never, ["*"]>;
static ɵcmp: i0.ɵɵComponentDeclaration<AnimatedIconComponent, "hot-toast-animated-icon", never, { "iconTheme": "iconTheme"; }, {}, never, ["*"], false, never>;
}

@@ -27,3 +27,3 @@ import { ChangeDetectorRef, QueryList } from '@angular/core';

static ɵfac: i0.ɵɵFactoryDeclaration<HotToastContainerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<HotToastContainerComponent, "hot-toast-container", never, { "defaultConfig": "defaultConfig"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<HotToastContainerComponent, "hot-toast-container", never, { "defaultConfig": "defaultConfig"; }, {}, never, never, false, never>;
}

@@ -21,4 +21,2 @@ import { AfterViewInit, EventEmitter, Injector, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core';

constructor(injector: Injector, renderer: Renderer2, ngZone: NgZone);
ngOnInit(): void;
ngAfterViewInit(): void;
get containerPositionStyle(): {

@@ -69,2 +67,4 @@ left: number;

get isIconString(): boolean;
ngOnInit(): void;
ngAfterViewInit(): void;
close(): void;

@@ -75,3 +75,3 @@ ngOnDestroy(): void;

static ɵfac: i0.ɵɵFactoryDeclaration<HotToastComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<HotToastComponent, "hot-toast", never, { "toast": "toast"; "offset": "offset"; "defaultConfig": "defaultConfig"; "toastRef": "toastRef"; }, { "height": "height"; "beforeClosed": "beforeClosed"; "afterClosed": "afterClosed"; }, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<HotToastComponent, "hot-toast", never, { "toast": "toast"; "offset": "offset"; "defaultConfig": "defaultConfig"; "toastRef": "toastRef"; }, { "height": "height"; "beforeClosed": "beforeClosed"; "afterClosed": "afterClosed"; }, never, never, false, never>;
}

@@ -6,3 +6,3 @@ import { IconTheme } from '../../../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<CheckMarkComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CheckMarkComponent, "hot-toast-checkmark", never, { "theme": "theme"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CheckMarkComponent, "hot-toast-checkmark", never, { "theme": "theme"; }, {}, never, never, false, never>;
}

@@ -6,3 +6,3 @@ import { IconTheme } from '../../../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "hot-toast-error", never, { "theme": "theme"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "hot-toast-error", never, { "theme": "theme"; }, {}, never, never, false, never>;
}

@@ -6,3 +6,3 @@ import { IconTheme } from '../../../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<InfoComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InfoComponent, "hot-toast-info", never, { "theme": "theme"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InfoComponent, "hot-toast-info", never, { "theme": "theme"; }, {}, never, never, false, never>;
}

@@ -6,3 +6,3 @@ import { IconTheme } from '../../../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<LoaderComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LoaderComponent, "hot-toast-loader", never, { "theme": "theme"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LoaderComponent, "hot-toast-loader", never, { "theme": "theme"; }, {}, never, never, false, never>;
}

@@ -6,3 +6,3 @@ import { IconTheme } from '../../../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<WarningComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<WarningComponent, "hot-toast-warning", never, { "theme": "theme"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<WarningComponent, "hot-toast-warning", never, { "theme": "theme"; }, {}, never, never, false, never>;
}

@@ -7,3 +7,3 @@ import { IconTheme, ToastType } from '../../hot-toast.model';

static ɵfac: i0.ɵɵFactoryDeclaration<IndicatorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IndicatorComponent, "hot-toast-indicator", never, { "theme": "theme"; "type": "type"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IndicatorComponent, "hot-toast-indicator", never, { "theme": "theme"; "type": "type"; }, {}, never, never, false, never>;
}

@@ -11,6 +11,7 @@ import { Content } from '@ngneat/overview';

private _dispose;
set dispose(value: () => void);
/** Subject for notifying the user that the toast has been closed. */
private _onClosed;
constructor(toast: Toast<DataType>);
get data(): DataType;
set dispose(value: () => void);
getToast(): Toast<DataType>;

@@ -31,3 +32,2 @@ /**Used for internal purpose

}): void;
get data(): DataType;
}

@@ -11,6 +11,6 @@ import { Content, ViewService } from '@ngneat/overview';

private _defaultConfig;
private _defaultPersistConfig;
constructor(_viewService: ViewService, platformId: string, config: ToastConfig);
get defaultConfig(): ToastConfig;
set defaultConfig(config: ToastConfig);
private _defaultPersistConfig;
constructor(_viewService: ViewService, platformId: string, config: ToastConfig);
/**

@@ -17,0 +17,0 @@ * Opens up an hot-toast without any pre-configurations

{
"name": "@ngneat/hot-toast",
"version": "4.1.0",
"version": "5.0.0-beta.1",
"description": "Smoking hot Notifications for Angular. Lightweight, customizable and beautiful by default.",

@@ -35,3 +35,3 @@ "schematics": "./schematics/collection.json",

"fesm2015": "fesm2015/ngneat-hot-toast.mjs",
"typings": "ngneat-hot-toast.d.ts",
"typings": "index.d.ts",
"exports": {

@@ -42,3 +42,3 @@ "./package.json": {

".": {
"types": "./ngneat-hot-toast.d.ts",
"types": "./index.d.ts",
"esm2020": "./esm2020/ngneat-hot-toast.mjs",

@@ -45,0 +45,0 @@ "es2020": "./fesm2020/ngneat-hot-toast.mjs",

@@ -237,10 +237,13 @@ <p align="center">

<table>
<tr>
<td align="center"><a href="https://github.com/shhdharmen"><img src="https://avatars3.githubusercontent.com/u/6831283?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dharmen Shah</b></sub></a><br /><a href="https://github.com/ngneat/hot-toast/commits?author=shhdharmen" title="Code">💻</a> <a href="#content-shhdharmen" title="Content">🖋</a> <a href="#design-shhdharmen" title="Design">🎨</a> <a href="https://github.com/ngneat/hot-toast/commits?author=shhdharmen" title="Documentation">📖</a> <a href="#example-shhdharmen" title="Examples">💡</a></td>
<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/hot-toast/issues?q=author%3ANetanelBasal" title="Bug reports">🐛</a> <a href="#business-NetanelBasal" title="Business development">💼</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-NetanelBasal" title="Maintenance">🚧</a> <a href="#mentoring-NetanelBasal" title="Mentoring">🧑‍🏫</a> <a href="#projectManagement-NetanelBasal" title="Project Management">📆</a> <a href="#research-NetanelBasal" title="Research">🔬</a> <a href="https://github.com/ngneat/hot-toast/pulls?q=is%3Apr+reviewed-by%3ANetanelBasal" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://timo.sh/"><img src="https://avatars.githubusercontent.com/u/1440854?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Timo Lins</b></sub></a><br /><a href="#design-timolins" title="Design">🎨</a> <a href="#ideas-timolins" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/patdx"><img src="https://avatars.githubusercontent.com/u/353863?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patrick Miller</b></sub></a><br /><a href="#maintenance-patdx" title="Maintenance">🚧</a> <a href="#platform-patdx" title="Packaging/porting to new platform">📦</a></td>
<td align="center"><a href="https://github.com/ritox842"><img src="https://avatars.githubusercontent.com/u/7280441?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gili Yaniv</b></sub></a><br /><a href="https://github.com/ngneat/hot-toast/commits?author=ritox842" title="Code">💻</a></td>
<td align="center"><a href="https://medium.com/@overthesanity"><img src="https://avatars.githubusercontent.com/u/7337691?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Artur Androsovych</b></sub></a><br /><a href="#maintenance-arturovt" title="Maintenance">🚧</a></td>
</tr>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shhdharmen"><img src="https://avatars3.githubusercontent.com/u/6831283?v=4?s=100" width="100px;" alt="Dharmen Shah"/><br /><sub><b>Dharmen Shah</b></sub></a><br /><a href="https://github.com/ngneat/hot-toast/commits?author=shhdharmen" title="Code">💻</a> <a href="#content-shhdharmen" title="Content">🖋</a> <a href="#design-shhdharmen" title="Design">🎨</a> <a href="https://github.com/ngneat/hot-toast/commits?author=shhdharmen" title="Documentation">📖</a> <a href="#example-shhdharmen" title="Examples">💡</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.netbasal.com/"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4?s=100" width="100px;" alt="Netanel Basal"/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/ngneat/hot-toast/issues?q=author%3ANetanelBasal" title="Bug reports">🐛</a> <a href="#business-NetanelBasal" title="Business development">💼</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-NetanelBasal" title="Maintenance">🚧</a> <a href="#mentoring-NetanelBasal" title="Mentoring">🧑‍🏫</a> <a href="#projectManagement-NetanelBasal" title="Project Management">📆</a> <a href="#research-NetanelBasal" title="Research">🔬</a> <a href="https://github.com/ngneat/hot-toast/pulls?q=is%3Apr+reviewed-by%3ANetanelBasal" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://timo.sh/"><img src="https://avatars.githubusercontent.com/u/1440854?v=4?s=100" width="100px;" alt="Timo Lins"/><br /><sub><b>Timo Lins</b></sub></a><br /><a href="#design-timolins" title="Design">🎨</a> <a href="#ideas-timolins" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/patdx"><img src="https://avatars.githubusercontent.com/u/353863?v=4?s=100" width="100px;" alt="Patrick Miller"/><br /><sub><b>Patrick Miller</b></sub></a><br /><a href="#maintenance-patdx" title="Maintenance">🚧</a> <a href="#platform-patdx" title="Packaging/porting to new platform">📦</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ritox842"><img src="https://avatars.githubusercontent.com/u/7280441?v=4?s=100" width="100px;" alt="Gili Yaniv"/><br /><sub><b>Gili Yaniv</b></sub></a><br /><a href="https://github.com/ngneat/hot-toast/commits?author=ritox842" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://medium.com/@overthesanity"><img src="https://avatars.githubusercontent.com/u/7337691?v=4?s=100" width="100px;" alt="Artur Androsovych"/><br /><sub><b>Artur Androsovych</b></sub></a><br /><a href="#maintenance-arturovt" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/luishcastroc"><img src="https://avatars.githubusercontent.com/u/13698269?v=4?s=100" width="100px;" alt="Luis Castro"/><br /><sub><b>Luis Castro</b></sub></a><br /><a href="https://github.com/ngneat/hot-toast/commits?author=luishcastroc" title="Code">💻</a></td>
</tr>
</tbody>
</table>

@@ -247,0 +250,0 @@

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
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) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,2 +21,3 @@ exports.ngAdd = void 0;

const ng_module_imports_1 = require("./utils/ng-module-imports");
const project_style_file_1 = require("./utils/project-style-file");
const importModuleSet = [

@@ -20,2 +30,3 @@ {

];
const stylesPath = `node_modules/@ngneat/hot-toast/src/styles`;
function ngAdd(options) {

@@ -32,2 +43,3 @@ return (tree) => {

addModuleToImports(options),
addHotToastAppStyles(options),
]);

@@ -116,2 +128,50 @@ };

}
/**
* Adds custom styles to the project style file.
*/
function addHotToastAppStyles(options) {
return (host, context) => __awaiter(this, void 0, void 0, function* () {
const workspace = yield (0, utils_1.getWorkspace)(host);
const project = (0, utils_1.getProjectFromWorkspace)(workspace, options.project ? options.project : Object.keys(workspace.projects)[0]);
const styleFilePath = (0, project_style_file_1.getProjectStyleFile)(project);
const logger = context.logger;
if (!styleFilePath) {
logger.error(`Could not find the default style file for this project.`);
logger.info(`Consider manually adding the hot-toast styles to your Application.`);
return;
}
const buffer = host.read(styleFilePath);
if (!buffer) {
logger.error(`Could not read the default style file within the project ` + `(${styleFilePath})`);
logger.info(`Please consider manually setting up the hot-toast styles.`);
return;
}
/** If the file is css then add the styles to the Angular.json else add it to the styles.scss */
if (styleFilePath.includes('.css')) {
return insertCSSDependency(options, 'build');
}
const htmlContent = buffer.toString();
const insertion = `@use '${stylesPath}/styles.scss'\n`;
if (htmlContent.includes(insertion)) {
return;
}
const recorder = host.beginUpdate(styleFilePath);
recorder.insertLeft(0, insertion);
host.commitUpdate(recorder);
context.logger.log('info', '✅ Styles Added to "' + styleFilePath);
});
}
function insertCSSDependency(options, targetName) {
return (host, context) => {
const workspace = (0, utils_1.getWorkspace)(host);
const project = (0, utils_1.getProjectFromWorkspace)(workspace, options.project ? options.project : Object.keys(workspace.projects)[0]);
if (!project || project.projectType !== 'application') {
throw new schematics_1.SchematicsException(`A client project type of "application" is required.`);
}
const cssfile = `${stylesPath}/styles.css`;
(0, utils_1.addStyleToTarget)(project, targetName, host, cssfile, workspace);
context.logger.log('info', '✅ Styles Imported in angular.json');
return host;
};
}
//# sourceMappingURL=index.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc