@semcore/errors 3.6.0 → 3.7.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 +12 -0
- package/lib/cjs/AccessDenied/index.js +7 -49
- package/lib/cjs/AccessDenied/index.js.map +1 -1
- package/lib/cjs/AccessDenied/translations/__intergalactic-dynamic-locales.js +49 -0
- package/lib/cjs/AccessDenied/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/cjs/Error.js +10 -10
- package/lib/cjs/Maintenance/index.js +6 -48
- package/lib/cjs/Maintenance/index.js.map +1 -1
- package/lib/cjs/Maintenance/translations/__intergalactic-dynamic-locales.js +49 -0
- package/lib/cjs/Maintenance/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/cjs/PageError/index.js +6 -48
- package/lib/cjs/PageError/index.js.map +1 -1
- package/lib/cjs/PageError/translations/__intergalactic-dynamic-locales.js +49 -0
- package/lib/cjs/PageError/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/cjs/PageNotFound/index.js +6 -48
- package/lib/cjs/PageNotFound/index.js.map +1 -1
- package/lib/cjs/PageNotFound/translations/__intergalactic-dynamic-locales.js +49 -0
- package/lib/cjs/PageNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/cjs/ProjectNotFound/index.js +7 -49
- package/lib/cjs/ProjectNotFound/index.js.map +1 -1
- package/lib/cjs/ProjectNotFound/translations/__intergalactic-dynamic-locales.js +49 -0
- package/lib/cjs/ProjectNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/es6/AccessDenied/index.js +7 -37
- package/lib/es6/AccessDenied/index.js.map +1 -1
- package/lib/es6/AccessDenied/translations/__intergalactic-dynamic-locales.js +27 -0
- package/lib/es6/AccessDenied/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/es6/Error.js +10 -10
- package/lib/es6/Maintenance/index.js +6 -36
- package/lib/es6/Maintenance/index.js.map +1 -1
- package/lib/es6/Maintenance/translations/__intergalactic-dynamic-locales.js +27 -0
- package/lib/es6/Maintenance/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/es6/PageError/index.js +6 -35
- package/lib/es6/PageError/index.js.map +1 -1
- package/lib/es6/PageError/translations/__intergalactic-dynamic-locales.js +27 -0
- package/lib/es6/PageError/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/es6/PageNotFound/index.js +6 -36
- package/lib/es6/PageNotFound/index.js.map +1 -1
- package/lib/es6/PageNotFound/translations/__intergalactic-dynamic-locales.js +27 -0
- package/lib/es6/PageNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/es6/ProjectNotFound/index.js +7 -37
- package/lib/es6/ProjectNotFound/index.js.map +1 -1
- package/lib/es6/ProjectNotFound/translations/__intergalactic-dynamic-locales.js +27 -0
- package/lib/es6/ProjectNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh","localizedMessages"],"sources":["../../../../src/Maintenance/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BZ,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA,EAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
|
|
@@ -19,32 +19,7 @@ import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
|
19
19
|
import canUseDOM from '@semcore/utils/lib/canUseDOM';
|
|
20
20
|
import { callAllEventHandlers } from '@semcore/utils/lib/assignProps';
|
|
21
21
|
import Error, { getIconPath } from '../Error';
|
|
22
|
-
import
|
|
23
|
-
import en from './translations/en.json';
|
|
24
|
-
import es from './translations/es.json';
|
|
25
|
-
import fr from './translations/fr.json';
|
|
26
|
-
import it from './translations/it.json';
|
|
27
|
-
import ja from './translations/ja.json';
|
|
28
|
-
import pt from './translations/pt.json';
|
|
29
|
-
import ru from './translations/ru.json';
|
|
30
|
-
import zh from './translations/zh.json';
|
|
31
|
-
import ko from './translations/ko.json';
|
|
32
|
-
import vi from './translations/vi.json';
|
|
33
|
-
import tr from './translations/tr.json';
|
|
34
|
-
var i18n = {
|
|
35
|
-
de: de,
|
|
36
|
-
en: en,
|
|
37
|
-
es: es,
|
|
38
|
-
fr: fr,
|
|
39
|
-
it: it,
|
|
40
|
-
ja: ja,
|
|
41
|
-
ru: ru,
|
|
42
|
-
zh: zh,
|
|
43
|
-
pt: pt,
|
|
44
|
-
ko: ko,
|
|
45
|
-
vi: vi,
|
|
46
|
-
tr: tr
|
|
47
|
-
};
|
|
22
|
+
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
48
23
|
|
|
49
24
|
var RootPageError = /*#__PURE__*/function (_Component) {
|
|
50
25
|
_inherits(RootPageError, _Component);
|
|
@@ -80,17 +55,12 @@ var RootPageError = /*#__PURE__*/function (_Component) {
|
|
|
80
55
|
onClick = _this$asProps.onClick,
|
|
81
56
|
other = _objectWithoutProperties(_this$asProps, _excluded);
|
|
82
57
|
|
|
83
|
-
|
|
84
|
-
title = _getI18nText.title,
|
|
85
|
-
text = _getI18nText.text,
|
|
86
|
-
btnRetry = _getI18nText.btnRetry;
|
|
87
|
-
|
|
88
|
-
return /*#__PURE__*/React.createElement(Error, other, /*#__PURE__*/React.createElement(Error.Title, null, title), /*#__PURE__*/React.createElement(Error.Description, null, text), /*#__PURE__*/React.createElement(Children, null), /*#__PURE__*/React.createElement(Error.Controls, null, /*#__PURE__*/React.createElement(Button, {
|
|
58
|
+
return /*#__PURE__*/React.createElement(Error, other, /*#__PURE__*/React.createElement(Error.Title, null, getI18nText('title')), /*#__PURE__*/React.createElement(Error.Description, null, getI18nText('text')), /*#__PURE__*/React.createElement(Children, null), /*#__PURE__*/React.createElement(Error.Controls, null, /*#__PURE__*/React.createElement(Button, {
|
|
89
59
|
onClick: callAllEventHandlers(onClick, this.handleReload),
|
|
90
60
|
size: "l",
|
|
91
61
|
use: "primary",
|
|
92
62
|
theme: "info"
|
|
93
|
-
}, btnRetry)));
|
|
63
|
+
}, getI18nText('btnRetry'))));
|
|
94
64
|
}
|
|
95
65
|
}]);
|
|
96
66
|
|
|
@@ -99,10 +69,11 @@ var RootPageError = /*#__PURE__*/function (_Component) {
|
|
|
99
69
|
|
|
100
70
|
_defineProperty(RootPageError, "displayName", 'PageError');
|
|
101
71
|
|
|
102
|
-
_defineProperty(RootPageError, "enhance", [i18nEnhance()]);
|
|
72
|
+
_defineProperty(RootPageError, "enhance", [i18nEnhance(localizedMessages)]);
|
|
103
73
|
|
|
104
74
|
_defineProperty(RootPageError, "defaultProps", {
|
|
105
|
-
i18n:
|
|
75
|
+
i18n: localizedMessages,
|
|
76
|
+
locale: 'en',
|
|
106
77
|
icon: getIconPath('page_error')
|
|
107
78
|
});
|
|
108
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","Button","createComponent","Component","i18nEnhance","canUseDOM","callAllEventHandlers","Error","getIconPath","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","Button","createComponent","Component","i18nEnhance","canUseDOM","callAllEventHandlers","Error","getIconPath","localizedMessages","RootPageError","location","reload","asProps","Children","getI18nText","onClick","other","handleReload","i18n","locale","icon"],"sources":["../../../src/PageError/index.jsx"],"sourcesContent":["import React from 'react';\nimport Button from '@semcore/button';\nimport createComponent, { Component } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport canUseDOM from '@semcore/utils/lib/canUseDOM';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport Error, { getIconPath } from '../Error';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass RootPageError extends Component {\n static displayName = 'PageError';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n icon: getIconPath('page_error'),\n };\n\n handleReload = () => {\n if (canUseDOM()) {\n location.reload();\n }\n };\n\n render() {\n const { Children, getI18nText, onClick, ...other } = this.asProps;\n\n return (\n <Error {...other}>\n <Error.Title>{getI18nText('title')}</Error.Title>\n <Error.Description>{getI18nText('text')}</Error.Description>\n <Children />\n <Error.Controls>\n <Button\n onClick={callAllEventHandlers(onClick, this.handleReload)}\n size=\"l\"\n use=\"primary\"\n theme=\"info\"\n >\n {getI18nText('btnRetry')}\n </Button>\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I,EAAEV,iBADc;EAEpBW,MAAM,EAAE,IAFY;EAGpBC,IAAI,EAAEb,WAAW,CAAC,YAAD;AAHG,C;;AAmCxB,eAAeN,eAAe,CAACQ,aAAD,CAA9B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import de from './de.json';
|
|
2
|
+
import en from './en.json';
|
|
3
|
+
import es from './es.json';
|
|
4
|
+
import fr from './fr.json';
|
|
5
|
+
import it from './it.json';
|
|
6
|
+
import ja from './ja.json';
|
|
7
|
+
import ko from './ko.json';
|
|
8
|
+
import pt from './pt.json';
|
|
9
|
+
import ru from './ru.json';
|
|
10
|
+
import tr from './tr.json';
|
|
11
|
+
import vi from './vi.json';
|
|
12
|
+
import zh from './zh.json';
|
|
13
|
+
export var localizedMessages = {
|
|
14
|
+
de: de,
|
|
15
|
+
en: en,
|
|
16
|
+
es: es,
|
|
17
|
+
fr: fr,
|
|
18
|
+
it: it,
|
|
19
|
+
ja: ja,
|
|
20
|
+
ko: ko,
|
|
21
|
+
pt: pt,
|
|
22
|
+
ru: ru,
|
|
23
|
+
tr: tr,
|
|
24
|
+
vi: vi,
|
|
25
|
+
zh: zh
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=__intergalactic-dynamic-locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh","localizedMessages"],"sources":["../../../../src/PageError/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BZ,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA,EAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
|
|
@@ -15,32 +15,7 @@ import Button from '@semcore/button';
|
|
|
15
15
|
import createComponent, { Component, Root } from '@semcore/core';
|
|
16
16
|
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
17
17
|
import Error, { getIconPath } from '../Error';
|
|
18
|
-
import
|
|
19
|
-
import en from './translations/en.json';
|
|
20
|
-
import es from './translations/es.json';
|
|
21
|
-
import fr from './translations/fr.json';
|
|
22
|
-
import it from './translations/it.json';
|
|
23
|
-
import ja from './translations/ja.json';
|
|
24
|
-
import pt from './translations/pt.json';
|
|
25
|
-
import ru from './translations/ru.json';
|
|
26
|
-
import zh from './translations/zh.json';
|
|
27
|
-
import ko from './translations/ko.json';
|
|
28
|
-
import vi from './translations/vi.json';
|
|
29
|
-
import tr from './translations/tr.json';
|
|
30
|
-
var i18n = {
|
|
31
|
-
de: de,
|
|
32
|
-
en: en,
|
|
33
|
-
es: es,
|
|
34
|
-
fr: fr,
|
|
35
|
-
it: it,
|
|
36
|
-
ja: ja,
|
|
37
|
-
ru: ru,
|
|
38
|
-
zh: zh,
|
|
39
|
-
pt: pt,
|
|
40
|
-
ko: ko,
|
|
41
|
-
vi: vi,
|
|
42
|
-
tr: tr
|
|
43
|
-
};
|
|
18
|
+
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
44
19
|
|
|
45
20
|
var RootPageNotFound = /*#__PURE__*/function (_Component) {
|
|
46
21
|
_inherits(RootPageNotFound, _Component);
|
|
@@ -61,20 +36,14 @@ var RootPageNotFound = /*#__PURE__*/function (_Component) {
|
|
|
61
36
|
Children = _this$asProps.Children,
|
|
62
37
|
getI18nText = _this$asProps.getI18nText,
|
|
63
38
|
homeLink = _this$asProps.homeLink;
|
|
64
|
-
|
|
65
|
-
var _getI18nText = getI18nText(),
|
|
66
|
-
title = _getI18nText.title,
|
|
67
|
-
text = _getI18nText.text,
|
|
68
|
-
btnHome = _getI18nText.btnHome;
|
|
69
|
-
|
|
70
|
-
return /*#__PURE__*/React.createElement(Error, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Error.Title, null, title), /*#__PURE__*/React.createElement(Error.Description, null, text), /*#__PURE__*/React.createElement(Children, null), /*#__PURE__*/React.createElement(Error.Controls, null, /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
return /*#__PURE__*/React.createElement(Error, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Error.Title, null, getI18nText('title')), /*#__PURE__*/React.createElement(Error.Description, null, getI18nText('text')), /*#__PURE__*/React.createElement(Children, null), /*#__PURE__*/React.createElement(Error.Controls, null, /*#__PURE__*/React.createElement(Button, {
|
|
71
40
|
tag: "a",
|
|
72
41
|
type: "none",
|
|
73
42
|
size: "l",
|
|
74
43
|
use: "primary",
|
|
75
44
|
theme: "info",
|
|
76
45
|
href: homeLink
|
|
77
|
-
}, btnHome)));
|
|
46
|
+
}, getI18nText('btnHome'))));
|
|
78
47
|
}
|
|
79
48
|
}]);
|
|
80
49
|
|
|
@@ -83,10 +52,11 @@ var RootPageNotFound = /*#__PURE__*/function (_Component) {
|
|
|
83
52
|
|
|
84
53
|
_defineProperty(RootPageNotFound, "displayName", 'Maintenance');
|
|
85
54
|
|
|
86
|
-
_defineProperty(RootPageNotFound, "enhance", [i18nEnhance()]);
|
|
55
|
+
_defineProperty(RootPageNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
87
56
|
|
|
88
57
|
_defineProperty(RootPageNotFound, "defaultProps", {
|
|
89
|
-
i18n:
|
|
58
|
+
i18n: localizedMessages,
|
|
59
|
+
locale: 'en',
|
|
90
60
|
icon: getIconPath('page_not_found'),
|
|
91
61
|
homeLink: '/'
|
|
92
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","Button","createComponent","Component","Root","i18nEnhance","Error","getIconPath","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","Button","createComponent","Component","Root","i18nEnhance","Error","getIconPath","localizedMessages","RootPageNotFound","asProps","Children","getI18nText","homeLink","i18n","locale","icon"],"sources":["../../../src/PageNotFound/index.jsx"],"sourcesContent":["import React from 'react';\nimport Button from '@semcore/button';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport Error, { getIconPath } from '../Error';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass RootPageNotFound extends Component {\n static displayName = 'Maintenance';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n icon: getIconPath('page_not_found'),\n homeLink: '/',\n };\n\n render() {\n const { Children, getI18nText, homeLink } = this.asProps;\n\n return (\n <Root render={Error}>\n <Error.Title>{getI18nText('title')}</Error.Title>\n <Error.Description>{getI18nText('text')}</Error.Description>\n <Children />\n <Error.Controls>\n <Button tag=\"a\" type=\"none\" size=\"l\" use=\"primary\" theme=\"info\" href={homeLink}>\n {getI18nText('btnHome')}\n </Button>\n </Error.Controls>\n </Root>\n );\n }\n}\n\nexport default createComponent(RootPageNotFound);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,WAAP,MAAwB,yCAAxB;AACA,OAAOC,KAAP,IAAgBC,WAAhB,QAAmC,UAAnC;AACA,SAASC,iBAAT,QAAkC,gDAAlC;;IAEMC,gB;;;;;;;;;;;;;WAUJ,kBAAS;MAAA;MACP,oBAA4C,KAAKC,OAAjD;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,QAA/B,iBAA+BA,QAA/B;MAEA,oBACE,oBAAcP,KAAd,uCACE,oBAAC,KAAD,CAAO,KAAP,QAAcM,WAAW,CAAC,OAAD,CAAzB,CADF,eAEE,oBAAC,KAAD,CAAO,WAAP,QAAoBA,WAAW,CAAC,MAAD,CAA/B,CAFF,eAGE,oBAAC,QAAD,OAHF,eAIE,oBAAC,KAAD,CAAO,QAAP,qBACE,oBAAC,MAAD;QAAQ,GAAG,EAAC,GAAZ;QAAgB,IAAI,EAAC,MAArB;QAA4B,IAAI,EAAC,GAAjC;QAAqC,GAAG,EAAC,SAAzC;QAAmD,KAAK,EAAC,MAAzD;QAAgE,IAAI,EAAEC;MAAtE,GACGD,WAAW,CAAC,SAAD,CADd,CADF,CAJF,CADF;IAYD;;;;EAzB4BT,S;;gBAAzBM,gB,iBACiB,a;;gBADjBA,gB,aAEa,CAACJ,WAAW,CAACG,iBAAD,CAAZ,C;;gBAFbC,gB,kBAGkB;EACpBK,IAAI,EAAEN,iBADc;EAEpBO,MAAM,EAAE,IAFY;EAGpBC,IAAI,EAAET,WAAW,CAAC,gBAAD,CAHG;EAIpBM,QAAQ,EAAE;AAJU,C;;AAyBxB,eAAeX,eAAe,CAACO,gBAAD,CAA9B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import de from './de.json';
|
|
2
|
+
import en from './en.json';
|
|
3
|
+
import es from './es.json';
|
|
4
|
+
import fr from './fr.json';
|
|
5
|
+
import it from './it.json';
|
|
6
|
+
import ja from './ja.json';
|
|
7
|
+
import ko from './ko.json';
|
|
8
|
+
import pt from './pt.json';
|
|
9
|
+
import ru from './ru.json';
|
|
10
|
+
import tr from './tr.json';
|
|
11
|
+
import vi from './vi.json';
|
|
12
|
+
import zh from './zh.json';
|
|
13
|
+
export var localizedMessages = {
|
|
14
|
+
de: de,
|
|
15
|
+
en: en,
|
|
16
|
+
es: es,
|
|
17
|
+
fr: fr,
|
|
18
|
+
it: it,
|
|
19
|
+
ja: ja,
|
|
20
|
+
ko: ko,
|
|
21
|
+
pt: pt,
|
|
22
|
+
ru: ru,
|
|
23
|
+
tr: tr,
|
|
24
|
+
vi: vi,
|
|
25
|
+
zh: zh
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=__intergalactic-dynamic-locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh","localizedMessages"],"sources":["../../../../src/PageNotFound/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BZ,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA,EAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
|
|
@@ -16,32 +16,7 @@ import FormatText from '@semcore/format-text';
|
|
|
16
16
|
import createComponent, { Component, Root } from '@semcore/core';
|
|
17
17
|
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
18
18
|
import Error, { getIconPath } from '../Error';
|
|
19
|
-
import
|
|
20
|
-
import en from './translations/en.json';
|
|
21
|
-
import es from './translations/es.json';
|
|
22
|
-
import fr from './translations/fr.json';
|
|
23
|
-
import it from './translations/it.json';
|
|
24
|
-
import ja from './translations/ja.json';
|
|
25
|
-
import pt from './translations/pt.json';
|
|
26
|
-
import ru from './translations/ru.json';
|
|
27
|
-
import zh from './translations/zh.json';
|
|
28
|
-
import ko from './translations/ko.json';
|
|
29
|
-
import vi from './translations/vi.json';
|
|
30
|
-
import tr from './translations/tr.json';
|
|
31
|
-
var i18n = {
|
|
32
|
-
de: de,
|
|
33
|
-
en: en,
|
|
34
|
-
es: es,
|
|
35
|
-
fr: fr,
|
|
36
|
-
it: it,
|
|
37
|
-
ja: ja,
|
|
38
|
-
ru: ru,
|
|
39
|
-
zh: zh,
|
|
40
|
-
pt: pt,
|
|
41
|
-
ko: ko,
|
|
42
|
-
vi: vi,
|
|
43
|
-
tr: tr
|
|
44
|
-
};
|
|
19
|
+
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
45
20
|
|
|
46
21
|
var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
47
22
|
_inherits(RootProjectNotFound, _Component);
|
|
@@ -64,16 +39,10 @@ var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
|
64
39
|
projectsLink = _this$asProps.projectsLink,
|
|
65
40
|
contactsLink = _this$asProps.contactsLink,
|
|
66
41
|
supportTeamLink = _this$asProps.supportTeamLink;
|
|
67
|
-
|
|
68
|
-
var _getI18nText = getI18nText(),
|
|
69
|
-
title = _getI18nText.title,
|
|
70
|
-
btnProjects = _getI18nText.btnProjects,
|
|
71
|
-
btnContacts = _getI18nText.btnContacts;
|
|
72
|
-
|
|
73
42
|
var text = getI18nText('text', {
|
|
74
43
|
url: supportTeamLink
|
|
75
44
|
});
|
|
76
|
-
return /*#__PURE__*/React.createElement(Error, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Error.Title, null, title), /*#__PURE__*/React.createElement(Error.Description, {
|
|
45
|
+
return /*#__PURE__*/React.createElement(Error, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Error.Title, null, getI18nText('title')), /*#__PURE__*/React.createElement(Error.Description, {
|
|
77
46
|
tag: FormatText,
|
|
78
47
|
size: "l",
|
|
79
48
|
dangerouslySetInnerHTML: {
|
|
@@ -86,12 +55,12 @@ var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
|
86
55
|
use: "primary",
|
|
87
56
|
theme: "info",
|
|
88
57
|
href: projectsLink
|
|
89
|
-
}, btnProjects), /*#__PURE__*/React.createElement(Button, {
|
|
58
|
+
}, getI18nText('btnProjects')), /*#__PURE__*/React.createElement(Button, {
|
|
90
59
|
size: "l",
|
|
91
60
|
tag: "a",
|
|
92
61
|
type: "none",
|
|
93
62
|
href: contactsLink
|
|
94
|
-
}, btnContacts)));
|
|
63
|
+
}, getI18nText('btnContacts'))));
|
|
95
64
|
}
|
|
96
65
|
}]);
|
|
97
66
|
|
|
@@ -100,10 +69,11 @@ var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
|
100
69
|
|
|
101
70
|
_defineProperty(RootProjectNotFound, "displayName", 'Maintenance');
|
|
102
71
|
|
|
103
|
-
_defineProperty(RootProjectNotFound, "enhance", [i18nEnhance()]);
|
|
72
|
+
_defineProperty(RootProjectNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
104
73
|
|
|
105
74
|
_defineProperty(RootProjectNotFound, "defaultProps", {
|
|
106
|
-
i18n:
|
|
75
|
+
i18n: localizedMessages,
|
|
76
|
+
locale: 'en',
|
|
107
77
|
icon: getIconPath('project_not_found'),
|
|
108
78
|
projectsLink: '/projects',
|
|
109
79
|
contactsLink: '/company/contacts',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","Button","FormatText","createComponent","Component","Root","i18nEnhance","Error","getIconPath","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","Button","FormatText","createComponent","Component","Root","i18nEnhance","Error","getIconPath","localizedMessages","RootProjectNotFound","asProps","Children","getI18nText","projectsLink","contactsLink","supportTeamLink","text","url","__html","i18n","locale","icon"],"sources":["../../../src/ProjectNotFound/index.jsx"],"sourcesContent":["import React from 'react';\nimport Button from '@semcore/button';\nimport FormatText from '@semcore/format-text';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport Error, { getIconPath } from '../Error';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass RootProjectNotFound extends Component {\n static displayName = 'Maintenance';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n icon: getIconPath('project_not_found'),\n projectsLink: '/projects',\n contactsLink: '/company/contacts',\n supportTeamLink: 'mailto:mail@semrush.com',\n };\n\n render() {\n const { Children, getI18nText, projectsLink, contactsLink, supportTeamLink } = this.asProps;\n const text = getI18nText('text', { url: supportTeamLink });\n return (\n <Root render={Error}>\n <Error.Title>{getI18nText('title')}</Error.Title>\n <Error.Description tag={FormatText} size=\"l\" dangerouslySetInnerHTML={{ __html: text }} />\n <Children />\n <Error.Controls>\n <Button tag=\"a\" type=\"none\" size=\"l\" use=\"primary\" theme=\"info\" href={projectsLink}>\n {getI18nText('btnProjects')}\n </Button>\n <Button size=\"l\" tag=\"a\" type=\"none\" href={contactsLink}>\n {getI18nText('btnContacts')}\n </Button>\n </Error.Controls>\n </Root>\n );\n }\n}\n\nexport default createComponent(RootProjectNotFound);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,OAAOC,UAAP,MAAuB,sBAAvB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,WAAP,MAAwB,yCAAxB;AACA,OAAOC,KAAP,IAAgBC,WAAhB,QAAmC,UAAnC;AACA,SAASC,iBAAT,QAAkC,gDAAlC;;IAEMC,mB;;;;;;;;;;;;;WAYJ,kBAAS;MAAA;MACP,oBAA+E,KAAKC,OAApF;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,YAA/B,iBAA+BA,YAA/B;MAAA,IAA6CC,YAA7C,iBAA6CA,YAA7C;MAAA,IAA2DC,eAA3D,iBAA2DA,eAA3D;MACA,IAAMC,IAA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
+
import it from './it.json';
|
|
6
|
+
import ja from './ja.json';
|
|
7
|
+
import ko from './ko.json';
|
|
8
|
+
import pt from './pt.json';
|
|
9
|
+
import ru from './ru.json';
|
|
10
|
+
import tr from './tr.json';
|
|
11
|
+
import vi from './vi.json';
|
|
12
|
+
import zh from './zh.json';
|
|
13
|
+
export var localizedMessages = {
|
|
14
|
+
de: de,
|
|
15
|
+
en: en,
|
|
16
|
+
es: es,
|
|
17
|
+
fr: fr,
|
|
18
|
+
it: it,
|
|
19
|
+
ja: ja,
|
|
20
|
+
ko: ko,
|
|
21
|
+
pt: pt,
|
|
22
|
+
ru: ru,
|
|
23
|
+
tr: tr,
|
|
24
|
+
vi: vi,
|
|
25
|
+
zh: zh
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=__intergalactic-dynamic-locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh","localizedMessages"],"sources":["../../../../src/ProjectNotFound/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BZ,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA,EAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/errors",
|
|
3
3
|
"description": "Semrush Errors Component",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"@semcore/button": "^4",
|
|
13
13
|
"@semcore/flex-box": "^4",
|
|
14
14
|
"@semcore/format-text": "^3.0.0",
|
|
15
|
-
"@semcore/illustration": "1.3.
|
|
15
|
+
"@semcore/illustration": "1.3.8",
|
|
16
16
|
"@semcore/typography": "^4",
|
|
17
17
|
"@semcore/utils": "^3.27"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@semcore/core": "^1.11",
|
|
21
|
-
"react": "16.8 - 18"
|
|
21
|
+
"react": "16.8 - 18",
|
|
22
|
+
"react-dom": "16.8 - 18"
|
|
22
23
|
},
|
|
23
24
|
"jest": {
|
|
24
25
|
"preset": "@semcore/jest-preset-ui"
|