@digigov/nextjs 0.3.6 → 0.4.0

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 CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log - @digigov/nextjs
2
2
 
3
- This log was last generated on Thu, 10 Feb 2022 13:45:56 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 14 Feb 2022 09:56:29 GMT and should not be manually modified.
4
+
5
+ ## 0.4.0
6
+ Mon, 14 Feb 2022 09:56:29 GMT
7
+
8
+ ### Minor changes
9
+
10
+ - Replace <a> with Link from @digigov/react-core
4
11
 
5
12
  ## 0.3.6
6
13
  Thu, 10 Feb 2022 13:45:56 GMT
package/Link.js CHANGED
@@ -15,6 +15,8 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _link = _interopRequireDefault(require("next/link"));
17
17
 
18
+ var _Link = _interopRequireDefault(require("@digigov/react-core/Link"));
19
+
18
20
  var _excluded = ["href"];
19
21
 
20
22
  var NextLink = function NextLink(props, ref) {
@@ -24,7 +26,7 @@ var NextLink = function NextLink(props, ref) {
24
26
  var isExternalLink = /^(?:[a-z]+:)?\/\//i.test(href || '');
25
27
 
26
28
  if (isExternalLink) {
27
- return /*#__PURE__*/_react["default"].createElement("a", (0, _extends2["default"])({
29
+ return /*#__PURE__*/_react["default"].createElement(_Link["default"], (0, _extends2["default"])({
28
30
  ref: ref,
29
31
  href: href || '#'
30
32
  }, other), props.children);
@@ -32,7 +34,7 @@ var NextLink = function NextLink(props, ref) {
32
34
 
33
35
  return /*#__PURE__*/_react["default"].createElement(_link["default"], (0, _extends2["default"])({
34
36
  href: href || '#'
35
- }, other), /*#__PURE__*/_react["default"].createElement("a", (0, _extends2["default"])({
37
+ }, other), /*#__PURE__*/_react["default"].createElement(_Link["default"], (0, _extends2["default"])({
36
38
  ref: ref
37
39
  }, other), props.children));
38
40
  };
package/es/Link.js CHANGED
@@ -3,6 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["href"];
4
4
  import React from 'react';
5
5
  import Link from 'next/link';
6
+ import CoreLink from '@digigov/react-core/Link';
6
7
 
7
8
  var NextLink = function NextLink(props, ref) {
8
9
  var href = props.href,
@@ -12,7 +13,7 @@ var NextLink = function NextLink(props, ref) {
12
13
  var isExternalLink = /^(?:[a-z]+:)?\/\//i.test(href || '');
13
14
 
14
15
  if (isExternalLink) {
15
- return /*#__PURE__*/React.createElement("a", _extends({
16
+ return /*#__PURE__*/React.createElement(CoreLink, _extends({
16
17
  ref: ref,
17
18
  href: href || '#'
18
19
  }, other), props.children);
@@ -20,7 +21,7 @@ var NextLink = function NextLink(props, ref) {
20
21
 
21
22
  return /*#__PURE__*/React.createElement(Link, _extends({
22
23
  href: href || '#'
23
- }, other), /*#__PURE__*/React.createElement("a", _extends({
24
+ }, other), /*#__PURE__*/React.createElement(CoreLink, _extends({
24
25
  ref: ref
25
26
  }, other), props.children));
26
27
  };
package/esm/Link.js CHANGED
@@ -3,6 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["href"];
4
4
  import React from 'react';
5
5
  import Link from 'next/link';
6
+ import CoreLink from '@digigov/react-core/Link';
6
7
 
7
8
  var NextLink = function NextLink(props, ref) {
8
9
  var href = props.href,
@@ -12,7 +13,7 @@ var NextLink = function NextLink(props, ref) {
12
13
  var isExternalLink = /^(?:[a-z]+:)?\/\//i.test(href || '');
13
14
 
14
15
  if (isExternalLink) {
15
- return /*#__PURE__*/React.createElement("a", _extends({
16
+ return /*#__PURE__*/React.createElement(CoreLink, _extends({
16
17
  ref: ref,
17
18
  href: href || '#'
18
19
  }, other), props.children);
@@ -20,7 +21,7 @@ var NextLink = function NextLink(props, ref) {
20
21
 
21
22
  return /*#__PURE__*/React.createElement(Link, _extends({
22
23
  href: href || '#'
23
- }, other), /*#__PURE__*/React.createElement("a", _extends({
24
+ }, other), /*#__PURE__*/React.createElement(CoreLink, _extends({
24
25
  ref: ref
25
26
  }, other), props.children));
26
27
  };
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v0.3.6
1
+ /** @license Digigov v0.4.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
File without changes
File without changes
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { LinkProps } from '@digigov/ui/core/Link';
3
+ declare const _default: React.ForwardRefExoticComponent<Pick<LinkProps, "underline" | "className" | "children" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLAnchorElement>>;
4
+ export default _default;
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { BaseCSSProperties } from '@material-ui/core/styles/withStyles';
3
+ import { Theme } from '@material-ui/core/styles';
4
+ export declare const useAppStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root">;
5
+ export interface AppProps {
6
+ theme: Theme;
7
+ children?: React.ReactNode;
8
+ classes?: {
9
+ root: BaseCSSProperties;
10
+ };
11
+ }
12
+ declare const App: React.FC<AppProps>;
13
+ export declare const StaticApp: React.FC<AppProps>;
14
+ export default App;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface I18NContextProps {
3
+ t: (str: string) => string;
4
+ children?: React.ReactNode;
5
+ i18n?: any;
6
+ }
7
+ export declare const I18NContext: React.Context<I18NContextProps>;
8
+ export declare const I18NProvider: React.FC<I18NContextProps>;
9
+ export declare const useTranslation: () => I18NContextProps;
10
+ export default I18NProvider;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { LinkProps as CoreLinkProps } from '@digigov/react-core/Link';
3
+ export interface LinkComponentContextProps {
4
+ component: React.ElementType<LinkProps>;
5
+ }
6
+ export declare const CommonLink: React.FC<LinkProps>;
7
+ export declare const LinkProvider: React.FC<LinkComponentContextProps>;
8
+ export interface LinkProps extends CoreLinkProps {
9
+ ref?: React.Ref<HTMLAnchorElement>;
10
+ }
11
+ declare const Link: React.ExoticComponent<LinkProps>;
12
+ export default Link;
@@ -0,0 +1,46 @@
1
+ declare const _default: {
2
+ form: {
3
+ error: {
4
+ required: string;
5
+ number: string;
6
+ positive_number: string;
7
+ string: string;
8
+ email: string;
9
+ afm: string;
10
+ file_size: string;
11
+ mobile_phone: string;
12
+ uuid4: string;
13
+ };
14
+ };
15
+ button: {
16
+ start: string;
17
+ login: string;
18
+ back: string;
19
+ continue: string;
20
+ search_ref: string;
21
+ scan: string;
22
+ save: string;
23
+ logout: string;
24
+ submit: string;
25
+ delete: string;
26
+ };
27
+ footer: {
28
+ created_by: string;
29
+ grnet: string;
30
+ mindigital: string;
31
+ using: string;
32
+ open_source: string;
33
+ creative_commons: string;
34
+ };
35
+ notfound: {
36
+ page_not_found: string;
37
+ wrong_key_address: string;
38
+ wrong_cp_address: string;
39
+ service_contact: string;
40
+ };
41
+ outdated: {
42
+ mobile: string;
43
+ web: string;
44
+ };
45
+ };
46
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export const PORTAL_URL: "http://34.194.85.187/";
2
+ export default theme;
3
+ declare let theme: import("@material-ui/core/styles").Theme;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ declare type AElementAttributes = JSX.IntrinsicElements['a'];
3
+ export interface LinkProps extends AElementAttributes {
4
+ /**
5
+ * underline is optional. The default value is 'true'.
6
+ * Make it 'false' only if the context tells the user that the text is a link, even without the underline.
7
+ */
8
+ underline?: boolean;
9
+ }
10
+ /**
11
+ * This component defines a hyperlink, which is used to link from one page to another.
12
+ */
13
+ export declare const Link: React.ForwardRefExoticComponent<Pick<LinkProps, "underline" | "className" | "children" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLAnchorElement>>;
14
+ export default Link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/nextjs",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
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.10.4",
13
+ "@digigov/ui": "0.11.0",
14
14
  "@material-ui/core": "4.11.3",
15
15
  "@material-ui/icons": "4.11.2",
16
16
  "clsx": "1.1.1",
package/Link.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { LinkProps } from '@digigov/ui/core/Link';
3
- declare const _default: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
4
- export default _default;