@nextcloud/dialogs
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -105,5 +105,10 @@ /** | ||
let timeout = null | ||
if (options.timeout) { | ||
timeout = options.timeout === -1 ? -1 : options.timeout * 1000 | ||
} | ||
const toast = Toastify({ | ||
[!isNode ? 'text' : 'node']: data, | ||
duration: options.timeout ? options.timeout * 1000 : null, | ||
duration: timeout, | ||
callback: options.onRemove, | ||
@@ -179,3 +184,3 @@ onClick: options.onClick, | ||
// force 10 seconds of timeout | ||
timeout: 1000, | ||
timeout: 10000, | ||
// remove close button | ||
@@ -182,0 +187,0 @@ close: false |
{ | ||
"name": "@nextcloud/dialogs", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "", | ||
@@ -29,4 +29,5 @@ "main": "dist/index.js", | ||
"@nextcloud/l10n": "^1.3.0", | ||
"@nextcloud/typings": "latest", | ||
"core-js": "^3.6.4" | ||
"@nextcloud/typings": "^0.2.2", | ||
"core-js": "^3.6.4", | ||
"toastify-js": "^1.9.1" | ||
}, | ||
@@ -42,2 +43,3 @@ "devDependencies": { | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"babel-loader-exclude-node-modules-except": "^1.0.3", | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
@@ -50,4 +52,4 @@ "gettext-extractor": "^3.5.2", | ||
"tslib": "^2.0.1", | ||
"typedoc": "^0.17.3", | ||
"typescript": "^3.8.3" | ||
"typedoc": "^0.18.0", | ||
"typescript": "^4.0.2" | ||
}, | ||
@@ -54,0 +56,0 @@ "browserslist": [ |
@@ -17,3 +17,3 @@ # @nextcloud/dialogs | ||
import { showMessage, showInfo, showSuccess, showWarning, showError } from '@nextcloud/dialogs' | ||
import '@nextcloud/dialogs/styles/toast' | ||
import '@nextcloud/dialogs/styles/toast.scss' | ||
``` | ||
@@ -36,5 +36,5 @@ | ||
``` | ||
showError('This is an error shown without a timeout', { timeout: 0 }) | ||
showError('This is an error shown without a timeout', { timeout: -1 }) | ||
``` | ||
A full list of available options can be found in the [documentation](https://nextcloud.github.io/nextcloud-dialogs/). |
@@ -9,2 +9,3 @@ import fs from 'fs' | ||
import typescript from 'rollup-plugin-typescript2' | ||
import BabelLoaderExcludeNodeModulesExcept from 'babel-loader-exclude-node-modules-except' | ||
@@ -56,5 +57,5 @@ import { DEFAULT_EXTENSIONS } from '@babel/core' | ||
extensions, | ||
exclude: /node_modules/, | ||
exclude: BabelLoaderExcludeNodeModulesExcept(['toastify-js']), | ||
}), | ||
] | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1295669
47
12783
2
0
4
18
+ Addedtoastify-js@^1.9.1
+ Added@nextcloud/typings@0.2.4(transitive)
+ Added@types/jquery@2.0.54(transitive)
+ Addedtoastify-js@1.12.0(transitive)
- Removed@nextcloud/typings@1.9.1(transitive)
- Removed@types/jquery@3.5.16(transitive)
- Removed@types/sizzle@2.3.9(transitive)
Updated@nextcloud/typings@^0.2.2