From de398901f3edd2a629bfbe56650e7dd552e5dbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Sa=C5=A1ek?= Date: Mon, 14 Dec 2020 19:04:41 +0100 Subject: [PATCH 1/2] Add isPluginInstalled function --- src/index.js | 1 + src/utils/isPluginInstalled.js | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/utils/isPluginInstalled.js diff --git a/src/index.js b/src/index.js index 651fdf9..3107c2d 100644 --- a/src/index.js +++ b/src/index.js @@ -70,6 +70,7 @@ export { ErrorMessage } from "./utils/ErrorMessage"; export { useClickOutside } from "./utils/hooks"; export { toLocaleDateString } from "./utils/datetime"; export { displayCard } from "./utils/displayCard"; +export { isPluginInstalled } from "./utils/isPluginInstalled"; // Foris URL export { ForisURLs, REFORIS_URL_PREFIX } from "./utils/forisUrls"; diff --git a/src/utils/isPluginInstalled.js b/src/utils/isPluginInstalled.js new file mode 100644 index 0000000..8193c99 --- /dev/null +++ b/src/utils/isPluginInstalled.js @@ -0,0 +1,9 @@ +/* + * Copyright (C) 2020 CZ.NIC z.s.p.o. (http://www.nic.cz/) + * + * This is free software, licensed under the GNU General Public License v3. + * See /LICENSE for more information. + */ + +export const isPluginInstalled = (pluginName) => + ForisPlugins.some((plugin) => plugin.name === pluginName); From 79006cfb99f2119779f9bf640f9b5dd75109ccfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Sa=C5=A1ek?= Date: Sat, 19 Dec 2020 00:25:44 +0100 Subject: [PATCH 2/2] Bump v5.1.8 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4853777..d4ca1e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "5.1.7", + "version": "5.1.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d36bbe4..ad465c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "5.1.7", + "version": "5.1.8", "description": "Set of components and utils for Foris and its plugins.", "author": "CZ.NIC, z.s.p.o.", "repository": {