@nextcloud/dialogs
Advanced tools
Comparing version 1.2.2 to 1.3.0
@@ -5,2 +5,9 @@ # Changelog | ||
## 1.3.0 - 2020-02-04 | ||
### Changed | ||
- Dependency updates | ||
### Fixed | ||
- Persistent notifications | ||
- Broader version ranges for dependencies to prevent bloat | ||
## 1.2.2 - 2020-03-19 | ||
@@ -7,0 +14,0 @@ ### Changed |
@@ -10,3 +10,3 @@ declare class ToastType { | ||
/** | ||
* Defines the timeout after which the toast is closed. Set to -1 to have a persistent toast. | ||
* Defines the timeout after which the toast is closed. Set to 0 to have a persistent toast. | ||
*/ | ||
@@ -13,0 +13,0 @@ timeout?: number; |
@@ -80,3 +80,3 @@ "use strict"; | ||
text: text, | ||
duration: options.timeout ? options.timeout * 1000 : null, | ||
duration: options.timeout === null || options.timeout === undefined ? null : options.timeout * 1000, | ||
callback: options.onRemove, | ||
@@ -103,3 +103,3 @@ onClick: options.onClick, | ||
function showError(text, options) { | ||
return showMessage(text, _objectSpread({}, options, { | ||
return showMessage(text, _objectSpread(_objectSpread({}, options), {}, { | ||
type: ToastType.ERROR | ||
@@ -117,3 +117,3 @@ })); | ||
function showWarning(text, options) { | ||
return showMessage(text, _objectSpread({}, options, { | ||
return showMessage(text, _objectSpread(_objectSpread({}, options), {}, { | ||
type: ToastType.WARNING | ||
@@ -131,3 +131,3 @@ })); | ||
function showInfo(text, options) { | ||
return showMessage(text, _objectSpread({}, options, { | ||
return showMessage(text, _objectSpread(_objectSpread({}, options), {}, { | ||
type: ToastType.INFO | ||
@@ -145,3 +145,3 @@ })); | ||
function showSuccess(text, options) { | ||
return showMessage(text, _objectSpread({}, options, { | ||
return showMessage(text, _objectSpread(_objectSpread({}, options), {}, { | ||
type: ToastType.SUCCESS | ||
@@ -148,0 +148,0 @@ })); |
@@ -13,3 +13,3 @@ import Toastify from 'toastify-js' | ||
/** | ||
* Defines the timeout after which the toast is closed. Set to -1 to have a persistent toast. | ||
* Defines the timeout after which the toast is closed. Set to 0 to have a persistent toast. | ||
*/ | ||
@@ -75,6 +75,5 @@ timeout?: number | ||
const toast = Toastify({ | ||
text: text, | ||
duration: options.timeout ? options.timeout * 1000 : null, | ||
duration: (options.timeout === null || options.timeout === undefined) ? null : options.timeout * 1000, | ||
callback: options.onRemove, | ||
@@ -81,0 +80,0 @@ onClick: options.onClick, |
{ | ||
"name": "@nextcloud/dialogs", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -25,15 +25,15 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"core-js": "3.6.4", | ||
"core-js": "^3.6.4", | ||
"toastify-js": "^1.7.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "7.8.4", | ||
"@babel/core": "7.8.7", | ||
"@babel/preset-env": "7.8.7", | ||
"@babel/preset-typescript": "7.8.3", | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.0", | ||
"@babel/preset-typescript": "^7.9.0", | ||
"@nextcloud/browserslist-config": "^1.0.0", | ||
"@nextcloud/typings": "^0.1.4", | ||
"babel-plugin-transform-class-properties": "6.24.1", | ||
"typedoc": "^0.16.7", | ||
"typescript": "3.8.3" | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
"typedoc": "^0.17.3", | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -40,0 +40,0 @@ "browserslist": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
609354
+ Addedcore-js@3.39.0(transitive)
- Removedcore-js@3.6.4(transitive)
Updatedcore-js@^3.6.4