foris 6.0.2 → 6.0.3-beta.2f735163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap/NumberInput.js +4 -2
- package/bootstrap/PasswordInput.js +6 -2
- package/common/WiFiSettings/WiFiQRCode.js +11 -10
- package/foris-6.0.3.tgz +0 -0
- package/package.json +5 -2
- package/testUtils/setup.js +7 -2
- package/foris-6.0.2.tgz +0 -0
package/bootstrap/NumberInput.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
10
12
|
import PropTypes from "prop-types";
|
|
11
13
|
|
|
12
14
|
import Input from "./Input";
|
|
@@ -60,7 +62,7 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
|
|
|
60
62
|
onMouseUp={() => enableIncrease(false)}
|
|
61
63
|
aria-label="Increase"
|
|
62
64
|
>
|
|
63
|
-
<
|
|
65
|
+
<FontAwesomeIcon icon={faPlus} />
|
|
64
66
|
</button>
|
|
65
67
|
<button
|
|
66
68
|
type="button"
|
|
@@ -69,7 +71,7 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
|
|
|
69
71
|
onMouseUp={() => enableDecrease(false)}
|
|
70
72
|
aria-label="Decrease"
|
|
71
73
|
>
|
|
72
|
-
<
|
|
74
|
+
<FontAwesomeIcon icon={faMinus} />
|
|
73
75
|
</button>
|
|
74
76
|
</Input>
|
|
75
77
|
);
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useState } from "react";
|
|
9
9
|
|
|
10
|
+
import { faEye, faEyeSlash } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
10
12
|
import PropTypes from "prop-types";
|
|
11
13
|
|
|
12
14
|
import Input from "./Input";
|
|
@@ -44,8 +46,10 @@ function PasswordInput({ withEye, newPass, ...props }) {
|
|
|
44
46
|
setHidden((shouldBeHidden) => !shouldBeHidden);
|
|
45
47
|
}}
|
|
46
48
|
>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
+
<FontAwesomeIcon
|
|
50
|
+
icon={isHidden ? faEye : faEyeSlash}
|
|
51
|
+
style={{ width: "1.25rem" }}
|
|
52
|
+
className="text-dark"
|
|
49
53
|
/>
|
|
50
54
|
</button>
|
|
51
55
|
)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 CZ.NIC z.s.p.o. (
|
|
2
|
+
* Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
|
3
3
|
*
|
|
4
4
|
* This is free software, licensed under the GNU General Public License v3.
|
|
5
5
|
* See /LICENSE for more information.
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useState } from "react";
|
|
9
9
|
|
|
10
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
10
11
|
import PropTypes from "prop-types";
|
|
11
12
|
import QRCode from "qrcode.react";
|
|
12
13
|
|
|
@@ -18,15 +19,12 @@ import {
|
|
|
18
19
|
ModalFooter,
|
|
19
20
|
ModalHeader,
|
|
20
21
|
} from "../../bootstrap/Modal";
|
|
21
|
-
import { ForisURLs } from "../../utils/forisUrls";
|
|
22
22
|
|
|
23
23
|
WiFiQRCode.propTypes = {
|
|
24
24
|
SSID: PropTypes.string.isRequired,
|
|
25
25
|
password: PropTypes.string.isRequired,
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const QR_ICON_PATH = `${ForisURLs.static}/imgs/QR_icon.svg`;
|
|
29
|
-
|
|
30
28
|
export default function WiFiQRCode({ SSID, password }) {
|
|
31
29
|
const [modal, setModal] = useState(false);
|
|
32
30
|
|
|
@@ -40,11 +38,11 @@ export default function WiFiQRCode({ SSID, password }) {
|
|
|
40
38
|
setModal(true);
|
|
41
39
|
}}
|
|
42
40
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
<FontAwesomeIcon
|
|
42
|
+
icon="fa-solid fa-qrcode"
|
|
43
|
+
title={_("Show QR code")}
|
|
44
|
+
aria-label={_("Show QR code")}
|
|
45
|
+
className="text-dark"
|
|
48
46
|
/>
|
|
49
47
|
</button>
|
|
50
48
|
{modal ? (
|
|
@@ -88,7 +86,10 @@ function QRCodeModal({ shown, setShown, SSID, password }) {
|
|
|
88
86
|
createAndDownloadPdf(SSID, password);
|
|
89
87
|
}}
|
|
90
88
|
>
|
|
91
|
-
<
|
|
89
|
+
<FontAwesomeIcon
|
|
90
|
+
icon="fa-solid fa-file-download"
|
|
91
|
+
className="me-2"
|
|
92
|
+
/>
|
|
92
93
|
{_("Download PDF")}
|
|
93
94
|
</Button>
|
|
94
95
|
</ModalFooter>
|
package/foris-6.0.3.tgz
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foris",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3-beta.2f735163",
|
|
4
4
|
"description": "Foris JS library is a set of components and utils for reForis application and plugins.",
|
|
5
5
|
"author": "CZ.NIC, z.s.p.o.",
|
|
6
6
|
"repository": {
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"license": "GPL-3.0",
|
|
15
15
|
"main": "./index.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
18
|
+
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
|
19
|
+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
20
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
17
21
|
"axios": "^1.7.2",
|
|
18
22
|
"immutability-helper": "^3.1.1",
|
|
19
23
|
"moment": "^2.30.1",
|
|
@@ -34,7 +38,6 @@
|
|
|
34
38
|
"@babel/plugin-transform-runtime": "^7.24.7",
|
|
35
39
|
"@babel/preset-env": "^7.24.7",
|
|
36
40
|
"@babel/preset-react": "^7.24.7",
|
|
37
|
-
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
38
41
|
"@testing-library/react": "^8.0.9",
|
|
39
42
|
"babel-loader": "^8.1.0",
|
|
40
43
|
"babel-polyfill": "^6.26.0",
|
package/testUtils/setup.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 CZ.NIC z.s.p.o. (
|
|
2
|
+
* Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
|
3
3
|
*
|
|
4
4
|
* This is free software, licensed under the GNU General Public License v3.
|
|
5
5
|
* See /LICENSE for more information.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import React from "react";
|
|
8
8
|
import mockAxios from "jest-mock-axios";
|
|
9
9
|
import moment from "moment-timezone";
|
|
10
10
|
import "./mockGlobals";
|
|
@@ -26,3 +26,8 @@ jest.doMock("moment", () => {
|
|
|
26
26
|
return moment;
|
|
27
27
|
});
|
|
28
28
|
Date.now = jest.fn(() => new Date(Date.UTC(2019, 1, 1, 12, 13, 14)).valueOf());
|
|
29
|
+
|
|
30
|
+
// Mock Font Awesome v6 library
|
|
31
|
+
jest.mock("@fortawesome/react-fontawesome", () => ({
|
|
32
|
+
FontAwesomeIcon: () => <i className="fa" />,
|
|
33
|
+
}));
|
package/foris-6.0.2.tgz
DELETED
|
Binary file
|