@semcore/errors 2.4.0 → 2.4.4
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 +26 -0
- package/lib/cjs/AccessDenied/translations/en.json +1 -1
- package/lib/cjs/Error.js +10 -10
- package/lib/cjs/Error.js.map +1 -1
- package/lib/cjs/Maintenance/translations/en.json +2 -2
- package/lib/cjs/PageNotFound/translations/en.json +3 -3
- package/lib/es6/AccessDenied/translations/en.json +1 -1
- package/lib/es6/Error.js +12 -12
- package/lib/es6/Error.js.map +1 -1
- package/lib/es6/Maintenance/translations/en.json +2 -2
- package/lib/es6/PageNotFound/translations/en.json +3 -3
- package/lib/types/index.d.ts +5 -6
- package/package.json +3 -6
- package/src/AccessDenied/translations/en.json +1 -1
- package/src/Error.js +3 -3
- package/src/Maintenance/translations/en.json +2 -2
- package/src/PageNotFound/translations/en.json +3 -3
- package/src/index.d.ts +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [2.4.4] - 2022-01-18
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Remove don't use dependency `@semcore/icon`.
|
|
10
|
+
|
|
11
|
+
## [2.4.3] - 2021-9-24
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Updated the `title`, `text` and `btnHome` fields for the `en` locale in the `PageNoData` component.
|
|
16
|
+
- Updated the `title` and `btnHome` fields for the `en` locale in the `Maintenance` component.
|
|
17
|
+
- Updated the `btnHome` field for the `en` locale in the `AccessDenied` component.
|
|
18
|
+
|
|
19
|
+
## [2.4.2] - 2021-8-26
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Add 'sideEffect=false' for more optimal build via webpack
|
|
24
|
+
|
|
25
|
+
## [2.4.1] - 2021-08-04
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- [TS] fixed types.
|
|
30
|
+
|
|
5
31
|
## [2.4.0] - 2021-07-05
|
|
6
32
|
|
|
7
33
|
### Changed
|
package/lib/cjs/Error.js
CHANGED
|
@@ -23,7 +23,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _core = _interopRequireWildcard(require("@semcore/core"));
|
|
25
25
|
|
|
26
|
-
var _react =
|
|
26
|
+
var _react = _interopRequireDefault(require("react"));
|
|
27
27
|
|
|
28
28
|
var _flexBox = require("@semcore/flex-box");
|
|
29
29
|
|
|
@@ -40,20 +40,20 @@ var style = (
|
|
|
40
40
|
/*__reshadow_css_start__*/
|
|
41
41
|
_core.sstyled.insert(
|
|
42
42
|
/*__inner_css_start__*/
|
|
43
|
-
".
|
|
43
|
+
".___SError_1dtfg_gg_{padding:96px 0;margin:0 auto;max-width:960px}.___SInner_1dtfg_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}@media (max-width:920px){.___SInner_1dtfg_gg_{padding:0 10px}}.___SImageWrapper_1dtfg_gg_{width:240px;height:240px;margin-right:80px}.___SWrapper_1dtfg_gg_{flex:1 0 320px;margin-top:32px}@media (max-width:920px){.___SWrapper_1dtfg_gg_{flex:1 0 300px;max-width:100%}}.___STitle_1dtfg_gg_{font-size:36px;line-height:1.17;font-weight:700;margin:0 0 16px 0}.___SDescription_1dtfg_gg_{font-size:16px;line-height:1.5;margin:0 0 24px 0}.___SControls_1dtfg_gg_{display:flex;align-items:center}.___SControls_1dtfg_gg_>:not(:last-child){margin-right:12px}"
|
|
44
44
|
/*__inner_css_end__*/
|
|
45
45
|
, "igorms_gg_")
|
|
46
46
|
/*__reshadow_css_end__*/
|
|
47
47
|
, {
|
|
48
|
-
"__SError": "
|
|
49
|
-
"__SInner": "
|
|
50
|
-
"__SImageWrapper": "
|
|
51
|
-
"__SWrapper": "
|
|
52
|
-
"__STitle": "
|
|
53
|
-
"__SDescription": "
|
|
54
|
-
"__SControls": "
|
|
48
|
+
"__SError": "___SError_1dtfg_gg_",
|
|
49
|
+
"__SInner": "___SInner_1dtfg_gg_",
|
|
50
|
+
"__SImageWrapper": "___SImageWrapper_1dtfg_gg_",
|
|
51
|
+
"__SWrapper": "___SWrapper_1dtfg_gg_",
|
|
52
|
+
"__STitle": "___STitle_1dtfg_gg_",
|
|
53
|
+
"__SDescription": "___SDescription_1dtfg_gg_",
|
|
54
|
+
"__SControls": "___SControls_1dtfg_gg_"
|
|
55
55
|
});
|
|
56
|
-
var version = "2.4.
|
|
56
|
+
var version = "2.4.4";
|
|
57
57
|
|
|
58
58
|
var getIconPath = function getIconPath(name) {
|
|
59
59
|
return "//static.semrush.com/ui-kit/errors/".concat(version, "/").concat(name, ".svg");
|
package/lib/cjs/Error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Error.js"],"names":["version","getIconPath","name","RootError","SError","Flex","asProps","Children","styles","icon","SInner","SImageWrapper","SWrapper","Component","style","Title","props","STitle","Box","Description","SDescription","Controls","SControls"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,OAAO,UAAb;;AAIO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD;AAAA,sDAAgDF,OAAhD,cAA2DE,IAA3D;AAAA,CAApB;;;;IAEDC,S;;;;;;;;;;;;WAIJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,MAAM,GAMMC,aANlB;AADO,0BAE4B,KAAKC,OAFjC;AAAA,UAECC,QAFD,iBAECA,QAFD;AAAA,UAEWC,MAFX,iBAEWA,MAFX;AAAA,UAEmBC,IAFnB,iBAEmBA,IAFnB;AAGP,UAAMC,MAAM,GAAG,KAAf;AACA,UAAMC,aAAa,GAAG,KAAtB;AACA,UAAMC,QAAQ,GAAG,KAAjB;AACA,qBAAO,mBAAQJ,MAAR,CAAP,eACE,gCAAC,MAAD,wFACE,gCAAC,MAAD,0BACGC,IAAI,iBACH,gCAAC,aAAD,iCACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;AAAA,iBAAY,GAAZ;AAAA,kBAAyB,GAAzB;AAAA,eAAmCA,IAAnC;AAAA,eAA6C;AAA7C,SADD,GAGCA,IAJJ,CAFJ,eAUE,gCAAC,QAAD,yCACE,gCAAC,QAAD,2BADF,CAVF,CADF,CADF;AAkBD;;;EA5BqBI,e;;iCAAlBV,S,iBACiB,O;iCADjBA,S,WAEWW,K;;AA6BjB,SAASC,KAAT,CAAeC,KAAf,EAAsB;AAAA;AAAA;;AACpB,MAAMC,MAAM,GACiCC,YAD7C;AACA,iBAAO,mBAAQF,KAAK,CAACR,MAAd,CAAP,eAA6B,gCAAC,MAAD;AAAA,WAAyB;AAAzB,cAA7B;AACD;;AAED,SAASW,WAAT,CAAqBH,KAArB,EAA4B;AAAA;AAAA;;AAC1B,MAAMI,YAAY,GACiCF,YADnD;AACA,iBAAO,mBAAQF,KAAK,CAACR,MAAd,CAAP,eAA6B,gCAAC,YAAD;AAAA,WAA+B;AAA/B,cAA7B;AACD;;AAED,SAASa,QAAT,CAAkBL,KAAlB,EAAyB;AAAA;AAAA;;AACvB,MAAMM,SAAS,GACiCJ,YADhD;AACA,iBAAO,mBAAQF,KAAK,CAACR,MAAd,CAAP,eAA6B,gCAAC,SAAD,8EAA7B;AACD;;eAEc,sBAAgBL,SAAhB,EAA2B;AACxCY,EAAAA,KAAK,EAALA,KADwC;AAExCI,EAAAA,WAAW,EAAXA,WAFwC;AAGxCE,EAAAA,QAAQ,EAARA;AAHwC,CAA3B,C","sourcesContent":["import React
|
|
1
|
+
{"version":3,"sources":["../../src/Error.js"],"names":["version","getIconPath","name","RootError","SError","Flex","asProps","Children","styles","icon","SInner","SImageWrapper","SWrapper","Component","style","Title","props","STitle","Box","Description","SDescription","Controls","SControls"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,OAAO,UAAb;;AAIO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD;AAAA,sDAAgDF,OAAhD,cAA2DE,IAA3D;AAAA,CAApB;;;;IAEDC,S;;;;;;;;;;;;WAIJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,MAAM,GAMMC,aANlB;AADO,0BAE4B,KAAKC,OAFjC;AAAA,UAECC,QAFD,iBAECA,QAFD;AAAA,UAEWC,MAFX,iBAEWA,MAFX;AAAA,UAEmBC,IAFnB,iBAEmBA,IAFnB;AAGP,UAAMC,MAAM,GAAG,KAAf;AACA,UAAMC,aAAa,GAAG,KAAtB;AACA,UAAMC,QAAQ,GAAG,KAAjB;AACA,qBAAO,mBAAQJ,MAAR,CAAP,eACE,gCAAC,MAAD,wFACE,gCAAC,MAAD,0BACGC,IAAI,iBACH,gCAAC,aAAD,iCACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;AAAA,iBAAY,GAAZ;AAAA,kBAAyB,GAAzB;AAAA,eAAmCA,IAAnC;AAAA,eAA6C;AAA7C,SADD,GAGCA,IAJJ,CAFJ,eAUE,gCAAC,QAAD,yCACE,gCAAC,QAAD,2BADF,CAVF,CADF,CADF;AAkBD;;;EA5BqBI,e;;iCAAlBV,S,iBACiB,O;iCADjBA,S,WAEWW,K;;AA6BjB,SAASC,KAAT,CAAeC,KAAf,EAAsB;AAAA;AAAA;;AACpB,MAAMC,MAAM,GACiCC,YAD7C;AACA,iBAAO,mBAAQF,KAAK,CAACR,MAAd,CAAP,eAA6B,gCAAC,MAAD;AAAA,WAAyB;AAAzB,cAA7B;AACD;;AAED,SAASW,WAAT,CAAqBH,KAArB,EAA4B;AAAA;AAAA;;AAC1B,MAAMI,YAAY,GACiCF,YADnD;AACA,iBAAO,mBAAQF,KAAK,CAACR,MAAd,CAAP,eAA6B,gCAAC,YAAD;AAAA,WAA+B;AAA/B,cAA7B;AACD;;AAED,SAASa,QAAT,CAAkBL,KAAlB,EAAyB;AAAA;AAAA;;AACvB,MAAMM,SAAS,GACiCJ,YADhD;AACA,iBAAO,mBAAQF,KAAK,CAACR,MAAd,CAAP,eAA6B,gCAAC,SAAD,8EAA7B;AACD;;eAEc,sBAAgBL,SAAhB,EAA2B;AACxCY,EAAAA,KAAK,EAALA,KADwC;AAExCI,EAAAA,WAAW,EAAXA,WAFwC;AAGxCE,EAAAA,QAAQ,EAARA;AAHwC,CAA3B,C","sourcesContent":["import React from 'react';\nimport { Box, Flex } from '@semcore/flex-box';\nimport createComponent, { Root, Component, sstyled } from '@semcore/core';\nimport style from './style/errors.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => `//static.semrush.com/ui-kit/errors/${version}/${name}.svg`;\n\nclass RootError extends Component {\n static displayName = 'Error';\n static style = style;\n\n render() {\n const SError = Root;\n const { Children, styles, icon } = this.asProps;\n const SInner = 'div';\n const SImageWrapper = 'div';\n const SWrapper = 'div';\n return sstyled(styles)(\n <SError render={Flex}>\n <SInner>\n {icon && (\n <SImageWrapper>\n {typeof icon === 'string' ? (\n <img width={240} height={240} src={icon} alt=\"error icon\" />\n ) : (\n icon\n )}\n </SImageWrapper>\n )}\n <SWrapper>\n <Children />\n </SWrapper>\n </SInner>\n </SError>,\n );\n }\n}\n\nfunction Title(props) {\n const STitle = Root;\n return sstyled(props.styles)(<STitle render={Box} tag=\"h2\" />);\n}\n\nfunction Description(props) {\n const SDescription = Root;\n return sstyled(props.styles)(<SDescription render={Box} tag=\"p\" />);\n}\n\nfunction Controls(props) {\n const SControls = Root;\n return sstyled(props.styles)(<SControls render={Box} />);\n}\n\nexport default createComponent(RootError, {\n Title,\n Description,\n Controls,\n});\n"],"file":"Error.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "
|
|
3
|
-
"text": "
|
|
4
|
-
"btnHome": "
|
|
2
|
+
"title": "We got lost",
|
|
3
|
+
"text": "It looks like this page doesn't exist. Try going back or click the button below and we'll take you home.",
|
|
4
|
+
"btnHome": "Go to homepage"
|
|
5
5
|
}
|
package/lib/es6/Error.js
CHANGED
|
@@ -18,29 +18,29 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
18
18
|
|
|
19
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
20
|
|
|
21
|
-
import React
|
|
22
|
-
import { Box, Flex
|
|
23
|
-
import createComponent, { Root, Component,
|
|
21
|
+
import React from 'react';
|
|
22
|
+
import { Box, Flex } from '@semcore/flex-box';
|
|
23
|
+
import createComponent, { Root, Component, sstyled } from '@semcore/core';
|
|
24
24
|
|
|
25
25
|
/*__reshadow-styles__:"./style/errors.shadow.css"*/
|
|
26
26
|
var style = (
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
_sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SError_1dtfg_gg_{padding:96px 0;margin:0 auto;max-width:960px}.___SInner_1dtfg_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}@media (max-width:920px){.___SInner_1dtfg_gg_{padding:0 10px}}.___SImageWrapper_1dtfg_gg_{width:240px;height:240px;margin-right:80px}.___SWrapper_1dtfg_gg_{flex:1 0 320px;margin-top:32px}@media (max-width:920px){.___SWrapper_1dtfg_gg_{flex:1 0 300px;max-width:100%}}.___STitle_1dtfg_gg_{font-size:36px;line-height:1.17;font-weight:700;margin:0 0 16px 0}.___SDescription_1dtfg_gg_{font-size:16px;line-height:1.5;margin:0 0 24px 0}.___SControls_1dtfg_gg_{display:flex;align-items:center}.___SControls_1dtfg_gg_>:not(:last-child){margin-right:12px}"
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
32
|
, "igorms_gg_")
|
|
33
33
|
/*__reshadow_css_end__*/
|
|
34
34
|
, {
|
|
35
|
-
"__SError": "
|
|
36
|
-
"__SInner": "
|
|
37
|
-
"__SImageWrapper": "
|
|
38
|
-
"__SWrapper": "
|
|
39
|
-
"__STitle": "
|
|
40
|
-
"__SDescription": "
|
|
41
|
-
"__SControls": "
|
|
35
|
+
"__SError": "___SError_1dtfg_gg_",
|
|
36
|
+
"__SInner": "___SInner_1dtfg_gg_",
|
|
37
|
+
"__SImageWrapper": "___SImageWrapper_1dtfg_gg_",
|
|
38
|
+
"__SWrapper": "___SWrapper_1dtfg_gg_",
|
|
39
|
+
"__STitle": "___STitle_1dtfg_gg_",
|
|
40
|
+
"__SDescription": "___SDescription_1dtfg_gg_",
|
|
41
|
+
"__SControls": "___SControls_1dtfg_gg_"
|
|
42
42
|
});
|
|
43
|
-
var version = "2.4.
|
|
43
|
+
var version = "2.4.4";
|
|
44
44
|
export var getIconPath = function getIconPath(name) {
|
|
45
45
|
return "//static.semrush.com/ui-kit/errors/".concat(version, "/").concat(name, ".svg");
|
|
46
46
|
};
|
package/lib/es6/Error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Error.js"],"names":["React","
|
|
1
|
+
{"version":3,"sources":["../../src/Error.js"],"names":["React","Box","Flex","createComponent","Root","Component","sstyled","version","getIconPath","name","RootError","SError","asProps","Children","styles","icon","SInner","SImageWrapper","SWrapper","style","Title","props","STitle","Description","SDescription","Controls","SControls"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,GAAT,EAAcC,IAAd,QAA0B,mBAA1B;AACA,OAAOC,eAAP,IAA0BC,IAA1B,EAAgCC,SAAhC,EAA2CC,OAA3C,QAA0D,eAA1D;;;;;;;;;;;;;;;;;;;;AAGA,IAAMC,OAAO,UAAb;AAIA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD;AAAA,sDAAgDF,OAAhD,cAA2DE,IAA3D;AAAA,CAApB;;IAEDC,S;;;;;;;;;;;;;WAIJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,MAAM,GAMMT,IANlB;AADO,0BAE4B,KAAKU,OAFjC;AAAA,UAECC,QAFD,iBAECA,QAFD;AAAA,UAEWC,MAFX,iBAEWA,MAFX;AAAA,UAEmBC,IAFnB,iBAEmBA,IAFnB;AAGP,UAAMC,MAAM,GAAG,KAAf;AACA,UAAMC,aAAa,GAAG,KAAtB;AACA,UAAMC,QAAQ,GAAG,KAAjB;AACA,qBAAOZ,OAAO,CAACQ,MAAD,CAAd,eACE,oBAAC,MAAD,8EACE,oBAAC,MAAD,0BACGC,IAAI,iBACH,oBAAC,aAAD,iCACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;AAAA,iBAAY,GAAZ;AAAA,kBAAyB,GAAzB;AAAA,eAAmCA,IAAnC;AAAA,eAA6C;AAA7C,SADD,GAGCA,IAJJ,CAFJ,eAUE,oBAAC,QAAD,yCACE,oBAAC,QAAD,2BADF,CAVF,CADF,CADF;AAkBD;;;;EA5BqBV,S;;gBAAlBK,S,iBACiB,O;;gBADjBA,S,WAEWS,K;;AA6BjB,SAASC,KAAT,CAAeC,KAAf,EAAsB;AAAA;AAAA;;AACpB,MAAMC,MAAM,GACiCrB,GAD7C;AACA,iBAAOK,OAAO,CAACe,KAAK,CAACP,MAAP,CAAd,eAA6B,oBAAC,MAAD;AAAA,WAAyB;AAAzB,cAA7B;AACD;;AAED,SAASS,WAAT,CAAqBF,KAArB,EAA4B;AAAA;AAAA;;AAC1B,MAAMG,YAAY,GACiCvB,GADnD;AACA,iBAAOK,OAAO,CAACe,KAAK,CAACP,MAAP,CAAd,eAA6B,oBAAC,YAAD;AAAA,WAA+B;AAA/B,cAA7B;AACD;;AAED,SAASW,QAAT,CAAkBJ,KAAlB,EAAyB;AAAA;AAAA;;AACvB,MAAMK,SAAS,GACiCzB,GADhD;AACA,iBAAOK,OAAO,CAACe,KAAK,CAACP,MAAP,CAAd,eAA6B,oBAAC,SAAD,qEAA7B;AACD;;AAED,eAAeX,eAAe,CAACO,SAAD,EAAY;AACxCU,EAAAA,KAAK,EAALA,KADwC;AAExCG,EAAAA,WAAW,EAAXA,WAFwC;AAGxCE,EAAAA,QAAQ,EAARA;AAHwC,CAAZ,CAA9B","sourcesContent":["import React from 'react';\nimport { Box, Flex } from '@semcore/flex-box';\nimport createComponent, { Root, Component, sstyled } from '@semcore/core';\nimport style from './style/errors.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => `//static.semrush.com/ui-kit/errors/${version}/${name}.svg`;\n\nclass RootError extends Component {\n static displayName = 'Error';\n static style = style;\n\n render() {\n const SError = Root;\n const { Children, styles, icon } = this.asProps;\n const SInner = 'div';\n const SImageWrapper = 'div';\n const SWrapper = 'div';\n return sstyled(styles)(\n <SError render={Flex}>\n <SInner>\n {icon && (\n <SImageWrapper>\n {typeof icon === 'string' ? (\n <img width={240} height={240} src={icon} alt=\"error icon\" />\n ) : (\n icon\n )}\n </SImageWrapper>\n )}\n <SWrapper>\n <Children />\n </SWrapper>\n </SInner>\n </SError>,\n );\n }\n}\n\nfunction Title(props) {\n const STitle = Root;\n return sstyled(props.styles)(<STitle render={Box} tag=\"h2\" />);\n}\n\nfunction Description(props) {\n const SDescription = Root;\n return sstyled(props.styles)(<SDescription render={Box} tag=\"p\" />);\n}\n\nfunction Controls(props) {\n const SControls = Root;\n return sstyled(props.styles)(<SControls render={Box} />);\n}\n\nexport default createComponent(RootError, {\n Title,\n Description,\n Controls,\n});\n"],"file":"Error.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "
|
|
3
|
-
"text": "
|
|
4
|
-
"btnHome": "
|
|
2
|
+
"title": "We got lost",
|
|
3
|
+
"text": "It looks like this page doesn't exist. Try going back or click the button below and we'll take you home.",
|
|
4
|
+
"btnHome": "Go to homepage"
|
|
5
5
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ export type iconNames =
|
|
|
17
17
|
| 'project_not_found'
|
|
18
18
|
| 'timeout';
|
|
19
19
|
|
|
20
|
-
export type getIconPath = (name: string) => string;
|
|
21
|
-
|
|
22
20
|
export interface IErrorsProps extends IFlexProps {
|
|
23
21
|
/**
|
|
24
22
|
* Error icon
|
|
@@ -44,7 +42,7 @@ export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
|
|
|
44
42
|
|
|
45
43
|
export interface IPageNotFoundProps extends IWithI18nEnhanceProps {
|
|
46
44
|
/**
|
|
47
|
-
* href of the link
|
|
45
|
+
* href of the home link
|
|
48
46
|
* @default /
|
|
49
47
|
*/
|
|
50
48
|
homeLink?: string;
|
|
@@ -64,7 +62,7 @@ export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
|
64
62
|
*/
|
|
65
63
|
toolName: string;
|
|
66
64
|
/**
|
|
67
|
-
* href of the link
|
|
65
|
+
* href of the home link
|
|
68
66
|
* @default /
|
|
69
67
|
*/
|
|
70
68
|
homeLink?: string;
|
|
@@ -72,7 +70,7 @@ export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
|
72
70
|
|
|
73
71
|
export interface IAccessDeniedProps extends IWithI18nEnhanceProps {
|
|
74
72
|
/**
|
|
75
|
-
* href of the link
|
|
73
|
+
* href of the home link
|
|
76
74
|
* @default /
|
|
77
75
|
*/
|
|
78
76
|
homeLink?: string;
|
|
@@ -88,6 +86,7 @@ declare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) =>
|
|
|
88
86
|
declare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;
|
|
89
87
|
declare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;
|
|
90
88
|
declare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;
|
|
89
|
+
declare const getIconPath: (name: iconNames) => string;
|
|
91
90
|
|
|
92
91
|
export default Error;
|
|
93
|
-
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied };
|
|
92
|
+
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/errors",
|
|
3
3
|
"description": "SEMRush Errors Component",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.4",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
|
-
"sideEffects":
|
|
9
|
-
"lib/*/Error.js"
|
|
10
|
-
],
|
|
8
|
+
"sideEffects": false,
|
|
11
9
|
"author": "Roman Lysov <r.lysov@semrush.com>",
|
|
12
10
|
"license": "MIT",
|
|
13
11
|
"scripts": {
|
|
@@ -20,8 +18,7 @@
|
|
|
20
18
|
"@semcore/button": "^3",
|
|
21
19
|
"@semcore/flex-box": "^4",
|
|
22
20
|
"@semcore/format-text": "^2",
|
|
23
|
-
"@semcore/typography": "^3"
|
|
24
|
-
"@semcore/icon": "^2"
|
|
21
|
+
"@semcore/typography": "^3"
|
|
25
22
|
},
|
|
26
23
|
"peerDependencies": {
|
|
27
24
|
"@semcore/core": "^1.11",
|
package/src/Error.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { Box, Flex
|
|
3
|
-
import createComponent, { Root, Component,
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Flex } from '@semcore/flex-box';
|
|
3
|
+
import createComponent, { Root, Component, sstyled } from '@semcore/core';
|
|
4
4
|
import style from './style/errors.shadow.css';
|
|
5
5
|
|
|
6
6
|
const version = preval`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "
|
|
3
|
-
"text": "
|
|
4
|
-
"btnHome": "
|
|
2
|
+
"title": "We got lost",
|
|
3
|
+
"text": "It looks like this page doesn't exist. Try going back or click the button below and we'll take you home.",
|
|
4
|
+
"btnHome": "Go to homepage"
|
|
5
5
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ export type iconNames =
|
|
|
17
17
|
| 'project_not_found'
|
|
18
18
|
| 'timeout';
|
|
19
19
|
|
|
20
|
-
export type getIconPath = (name: string) => string;
|
|
21
|
-
|
|
22
20
|
export interface IErrorsProps extends IFlexProps {
|
|
23
21
|
/**
|
|
24
22
|
* Error icon
|
|
@@ -44,7 +42,7 @@ export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
|
|
|
44
42
|
|
|
45
43
|
export interface IPageNotFoundProps extends IWithI18nEnhanceProps {
|
|
46
44
|
/**
|
|
47
|
-
* href of the link
|
|
45
|
+
* href of the home link
|
|
48
46
|
* @default /
|
|
49
47
|
*/
|
|
50
48
|
homeLink?: string;
|
|
@@ -64,7 +62,7 @@ export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
|
64
62
|
*/
|
|
65
63
|
toolName: string;
|
|
66
64
|
/**
|
|
67
|
-
* href of the link
|
|
65
|
+
* href of the home link
|
|
68
66
|
* @default /
|
|
69
67
|
*/
|
|
70
68
|
homeLink?: string;
|
|
@@ -72,7 +70,7 @@ export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
|
72
70
|
|
|
73
71
|
export interface IAccessDeniedProps extends IWithI18nEnhanceProps {
|
|
74
72
|
/**
|
|
75
|
-
* href of the link
|
|
73
|
+
* href of the home link
|
|
76
74
|
* @default /
|
|
77
75
|
*/
|
|
78
76
|
homeLink?: string;
|
|
@@ -88,6 +86,7 @@ declare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) =>
|
|
|
88
86
|
declare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;
|
|
89
87
|
declare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;
|
|
90
88
|
declare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;
|
|
89
|
+
declare const getIconPath: (name: iconNames) => string;
|
|
91
90
|
|
|
92
91
|
export default Error;
|
|
93
|
-
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied };
|
|
92
|
+
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };
|