From 443f14d26c2fa99e6282d3f0dec0689a08e7fff8 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Mon, 31 Aug 2020 11:54:55 +0200 Subject: [PATCH 1/5] Add ability to select switch's form-group --- src/bootstrap/Switch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/Switch.js b/src/bootstrap/Switch.js index 1af8edb..1976e6c 100644 --- a/src/bootstrap/Switch.js +++ b/src/bootstrap/Switch.js @@ -23,7 +23,7 @@ Switch.propTypes = { export function Switch({ label, helpText, switchHeading, ...props }) { const uid = useUID(); return ( -
+
Date: Mon, 31 Aug 2020 11:55:20 +0200 Subject: [PATCH 2/5] Add "inline" option to RadioSet --- src/bootstrap/RadioSet.js | 19 +++++++++++++++---- src/bootstrap/Switch.js | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/RadioSet.js b/src/bootstrap/RadioSet.js index c9fede5..dbc5213 100644 --- a/src/bootstrap/RadioSet.js +++ b/src/bootstrap/RadioSet.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) + * 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. @@ -33,9 +33,18 @@ RadioSet.propTypes = { value: PropTypes.string, /** Help text message . */ helpText: PropTypes.string, + inline: PropTypes.bool, }; -export function RadioSet({ name, label, choices, value, helpText, ...props }) { +export function RadioSet({ + name, + label, + choices, + value, + helpText, + inline, + ...props +}) { const uid = useUID(); const radios = choices.map((choice, key) => { const id = `${name}-${key}`; @@ -48,6 +57,7 @@ export function RadioSet({ name, label, choices, value, helpText, ...props }) { value={choice.value} helpText={choice.helpText} checked={choice.value === value} + inline={inline} {...props} /> ); @@ -76,15 +86,16 @@ Radio.propTypes = { PropTypes.arrayOf(PropTypes.node), ]).isRequired, id: PropTypes.string.isRequired, + inline: PropTypes.bool, helpText: PropTypes.string, }; -export function Radio({ label, id, helpText, ...props }) { +export function Radio({ label, id, helpText, inline, ...props }) { return ( <>
+
Date: Mon, 31 Aug 2020 15:45:34 +0200 Subject: [PATCH 3/5] Update Snapshots --- .../__tests__/__snapshots__/RadioSet.test.js.snap | 6 +++--- .../__tests__/__snapshots__/Switch.test.js.snap | 4 ++-- .../__snapshots__/WiFiSettings.test.js.snap | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/bootstrap/__tests__/__snapshots__/RadioSet.test.js.snap b/src/bootstrap/__tests__/__snapshots__/RadioSet.test.js.snap index 7539dd2..9a57656 100644 --- a/src/bootstrap/__tests__/__snapshots__/RadioSet.test.js.snap +++ b/src/bootstrap/__tests__/__snapshots__/RadioSet.test.js.snap @@ -11,7 +11,7 @@ exports[` Render radio set 1`] = ` Radios set label
Render radio set 1`] = `
Render radio set 1`] = `
Render switch 1`] = `
Render switch 1`] = ` exports[` Render uncheked switch 1`] = `
Snapshot both modules disabled. 1`] = ` >
Snapshot both modules disabled. 1`] = `

Snapshot guest network. 1`] = ` +

Snapshot one module enabled. 1`] = ` + GHz + +
+ Snapshot one module enabled. 1`] = ` + +
+
+ Snapshot one module enabled. 1`] = ` + +
+
+
Snapshot one module enabled. 1`] = ` +

Date: Mon, 31 Aug 2020 15:54:22 +0200 Subject: [PATCH 4/5] NPM audit fix --- package-lock.json | 90 +++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index 555d878..24f7071 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5906,9 +5906,9 @@ "dev": true }, "copy-webpack-plugin": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz", - "integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz", + "integrity": "sha512-Uh7crJAco3AjBvgAy9Z75CjK8IG+gxaErro71THQ+vv/bl4HaQcpkexAY8KVW/T6D2W2IRr+couF/knIRkZMIQ==", "dev": true, "requires": { "cacache": "^12.0.3", @@ -5921,7 +5921,7 @@ "normalize-path": "^3.0.0", "p-limit": "^2.2.1", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^4.0.0", "webpack-log": "^2.0.0" }, "dependencies": { @@ -5962,6 +5962,15 @@ "ajv-keywords": "^3.1.0" } }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -15717,12 +15726,6 @@ } } }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true - }, "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -16879,25 +16882,6 @@ "supports-hyperlinks": "^2.0.0" } }, - "terser": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.7.tgz", - "integrity": "sha512-fmr7M1f7DBly5cX2+rFDvmGBAaaZyPrHYK4mMdHEDAdNTqXSZgSOfqsfGq2HqPGT/1V0foZZuCZFx8CHKgAk3g==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "terser-webpack-plugin": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", @@ -18108,20 +18092,51 @@ "dev": true }, "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^4.0.0", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" + }, + "dependencies": { + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + } } } } @@ -18483,15 +18498,6 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, "worker-rpc": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.1.tgz", From 896277b62a14b2029db6b54c4fa8b10d555299b6 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Mon, 31 Aug 2020 15:53:07 +0200 Subject: [PATCH 5/5] Bump v5.1.1 --- 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 24f7071..fb25c0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ca011a3..7b76a99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "5.1.0", + "version": "5.1.1", "description": "Set of components and utils for Foris and its plugins.", "author": "CZ.NIC, z.s.p.o.", "repository": {