@digigov/nextjs 0.4.5 → 0.5.1
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/CHANGELOG.md +20 -1
- package/Link.js +4 -3
- package/es/Link.js +4 -3
- package/esm/Link.js +4 -3
- package/esm/index.js +1 -1
- package/libs/ui/src/app/i18n.d.ts +2 -0
- package/libs/ui/src/locales/el.d.ts +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
# Change Log - @digigov/nextjs
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 19 Apr 2022 12:17:34 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.5.1
|
|
6
|
+
Tue, 19 Apr 2022 12:17:34 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- Fix a bug where using target=_blank would not open the link at all. Now it opens in a new window using our CoreLink.
|
|
11
|
+
|
|
12
|
+
## 0.5.0
|
|
13
|
+
Mon, 18 Apr 2022 13:00:33 GMT
|
|
14
|
+
|
|
15
|
+
### Minor changes
|
|
16
|
+
|
|
17
|
+
- Upgrade @types/node version
|
|
18
|
+
|
|
19
|
+
## 0.4.6
|
|
20
|
+
Thu, 14 Apr 2022 12:32:51 GMT
|
|
21
|
+
|
|
22
|
+
_Version update only_
|
|
4
23
|
|
|
5
24
|
## 0.4.5
|
|
6
25
|
Wed, 30 Mar 2022 13:17:56 GMT
|
package/Link.js
CHANGED
|
@@ -21,9 +21,10 @@ var _excluded = ["href"];
|
|
|
21
21
|
|
|
22
22
|
var NextLink = function NextLink(props, ref) {
|
|
23
23
|
var href = props.href,
|
|
24
|
-
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
25
|
+
var isExternalLink = //check if url has a file extension
|
|
26
|
+
/^(?:[a-z]+:)?\/\/|.pdf|.docx?|.xlsx?/i.test(href || '') || // or if props has a target or rel
|
|
27
|
+
other.target === '_blank';
|
|
27
28
|
|
|
28
29
|
if (isExternalLink) {
|
|
29
30
|
return /*#__PURE__*/_react["default"].createElement(_Link["default"], (0, _extends2["default"])({
|
package/es/Link.js
CHANGED
|
@@ -7,10 +7,11 @@ import CoreLink from '@digigov/react-core/Link';
|
|
|
7
7
|
|
|
8
8
|
var NextLink = function NextLink(props, ref) {
|
|
9
9
|
var href = props.href,
|
|
10
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
10
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var isExternalLink = //check if url has a file extension
|
|
13
|
+
/^(?:[a-z]+:)?\/\/|.pdf|.docx?|.xlsx?/i.test(href || '') || // or if props has a target or rel
|
|
14
|
+
other.target === '_blank';
|
|
14
15
|
|
|
15
16
|
if (isExternalLink) {
|
|
16
17
|
return /*#__PURE__*/React.createElement(CoreLink, _extends({
|
package/esm/Link.js
CHANGED
|
@@ -7,10 +7,11 @@ import CoreLink from '@digigov/react-core/Link';
|
|
|
7
7
|
|
|
8
8
|
var NextLink = function NextLink(props, ref) {
|
|
9
9
|
var href = props.href,
|
|
10
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
10
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var isExternalLink = //check if url has a file extension
|
|
13
|
+
/^(?:[a-z]+:)?\/\/|.pdf|.docx?|.xlsx?/i.test(href || '') || // or if props has a target or rel
|
|
14
|
+
other.target === '_blank';
|
|
14
15
|
|
|
15
16
|
if (isExternalLink) {
|
|
16
17
|
return /*#__PURE__*/React.createElement(CoreLink, _extends({
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface I18NContextProps {
|
|
3
|
+
Trans?: any;
|
|
3
4
|
t: (str: string) => string;
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
i18n?: any;
|
|
6
7
|
}
|
|
8
|
+
export declare const defaultTranslate: (key: any) => any;
|
|
7
9
|
export declare const I18NContext: React.Context<I18NContextProps>;
|
|
8
10
|
export declare const I18NProvider: React.FC<I18NContextProps>;
|
|
9
11
|
export declare const useTranslation: () => I18NContextProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/nextjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "next specific utilities for @digigov apps",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"main": "dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@digigov/ui": "0.
|
|
13
|
+
"@digigov/ui": "0.17.0",
|
|
14
14
|
"@material-ui/core": "4.11.3",
|
|
15
15
|
"@material-ui/icons": "4.11.2",
|
|
16
16
|
"clsx": "1.1.1",
|