@semcore/errors 2.4.3
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 +155 -0
- package/README.md +0 -0
- package/lib/cjs/AccessDenied/index.js +125 -0
- package/lib/cjs/AccessDenied/index.js.map +1 -0
- package/lib/cjs/AccessDenied/translations/de.json +5 -0
- package/lib/cjs/AccessDenied/translations/en.json +5 -0
- package/lib/cjs/AccessDenied/translations/es.json +5 -0
- package/lib/cjs/AccessDenied/translations/fr.json +5 -0
- package/lib/cjs/AccessDenied/translations/it.json +5 -0
- package/lib/cjs/AccessDenied/translations/ja.json +5 -0
- package/lib/cjs/AccessDenied/translations/ko.json +5 -0
- package/lib/cjs/AccessDenied/translations/pt.json +5 -0
- package/lib/cjs/AccessDenied/translations/ru.json +5 -0
- package/lib/cjs/AccessDenied/translations/vi.json +5 -0
- package/lib/cjs/AccessDenied/translations/zh.json +5 -0
- package/lib/cjs/Error.js +137 -0
- package/lib/cjs/Error.js.map +1 -0
- package/lib/cjs/Maintenance/index.js +124 -0
- package/lib/cjs/Maintenance/index.js.map +1 -0
- package/lib/cjs/Maintenance/translations/de.json +5 -0
- package/lib/cjs/Maintenance/translations/en.json +5 -0
- package/lib/cjs/Maintenance/translations/es.json +5 -0
- package/lib/cjs/Maintenance/translations/fr.json +5 -0
- package/lib/cjs/Maintenance/translations/it.json +5 -0
- package/lib/cjs/Maintenance/translations/ja.json +5 -0
- package/lib/cjs/Maintenance/translations/ko.json +5 -0
- package/lib/cjs/Maintenance/translations/pt.json +5 -0
- package/lib/cjs/Maintenance/translations/ru.json +5 -0
- package/lib/cjs/Maintenance/translations/vi.json +5 -0
- package/lib/cjs/Maintenance/translations/zh.json +5 -0
- package/lib/cjs/PageError/index.js +140 -0
- package/lib/cjs/PageError/index.js.map +1 -0
- package/lib/cjs/PageError/translations/de.json +5 -0
- package/lib/cjs/PageError/translations/en.json +5 -0
- package/lib/cjs/PageError/translations/es.json +5 -0
- package/lib/cjs/PageError/translations/fr.json +5 -0
- package/lib/cjs/PageError/translations/it.json +5 -0
- package/lib/cjs/PageError/translations/ja.json +5 -0
- package/lib/cjs/PageError/translations/ko.json +5 -0
- package/lib/cjs/PageError/translations/pt.json +5 -0
- package/lib/cjs/PageError/translations/ru.json +5 -0
- package/lib/cjs/PageError/translations/vi.json +5 -0
- package/lib/cjs/PageError/translations/zh.json +5 -0
- package/lib/cjs/PageNotFound/index.js +123 -0
- package/lib/cjs/PageNotFound/index.js.map +1 -0
- package/lib/cjs/PageNotFound/translations/de.json +5 -0
- package/lib/cjs/PageNotFound/translations/en.json +5 -0
- package/lib/cjs/PageNotFound/translations/es.json +5 -0
- package/lib/cjs/PageNotFound/translations/fr.json +5 -0
- package/lib/cjs/PageNotFound/translations/it.json +5 -0
- package/lib/cjs/PageNotFound/translations/ja.json +5 -0
- package/lib/cjs/PageNotFound/translations/ko.json +5 -0
- package/lib/cjs/PageNotFound/translations/pt.json +5 -0
- package/lib/cjs/PageNotFound/translations/ru.json +5 -0
- package/lib/cjs/PageNotFound/translations/vi.json +5 -0
- package/lib/cjs/PageNotFound/translations/zh.json +5 -0
- package/lib/cjs/ProjectNotFound/index.js +143 -0
- package/lib/cjs/ProjectNotFound/index.js.map +1 -0
- package/lib/cjs/ProjectNotFound/translations/de.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/en.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/es.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/fr.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/it.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/ja.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/ko.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/pt.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/ru.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/vi.json +6 -0
- package/lib/cjs/ProjectNotFound/translations/zh.json +6 -0
- package/lib/cjs/index.js +135 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/style/errors.shadow.css +57 -0
- package/lib/es6/AccessDenied/index.js +96 -0
- package/lib/es6/AccessDenied/index.js.map +1 -0
- package/lib/es6/AccessDenied/translations/de.json +5 -0
- package/lib/es6/AccessDenied/translations/en.json +5 -0
- package/lib/es6/AccessDenied/translations/es.json +5 -0
- package/lib/es6/AccessDenied/translations/fr.json +5 -0
- package/lib/es6/AccessDenied/translations/it.json +5 -0
- package/lib/es6/AccessDenied/translations/ja.json +5 -0
- package/lib/es6/AccessDenied/translations/ko.json +5 -0
- package/lib/es6/AccessDenied/translations/pt.json +5 -0
- package/lib/es6/AccessDenied/translations/ru.json +5 -0
- package/lib/es6/AccessDenied/translations/vi.json +5 -0
- package/lib/es6/AccessDenied/translations/zh.json +5 -0
- package/lib/es6/Error.js +122 -0
- package/lib/es6/Error.js.map +1 -0
- package/lib/es6/Maintenance/index.js +95 -0
- package/lib/es6/Maintenance/index.js.map +1 -0
- package/lib/es6/Maintenance/translations/de.json +5 -0
- package/lib/es6/Maintenance/translations/en.json +5 -0
- package/lib/es6/Maintenance/translations/es.json +5 -0
- package/lib/es6/Maintenance/translations/fr.json +5 -0
- package/lib/es6/Maintenance/translations/it.json +5 -0
- package/lib/es6/Maintenance/translations/ja.json +5 -0
- package/lib/es6/Maintenance/translations/ko.json +5 -0
- package/lib/es6/Maintenance/translations/pt.json +5 -0
- package/lib/es6/Maintenance/translations/ru.json +5 -0
- package/lib/es6/Maintenance/translations/vi.json +5 -0
- package/lib/es6/Maintenance/translations/zh.json +5 -0
- package/lib/es6/PageError/index.js +107 -0
- package/lib/es6/PageError/index.js.map +1 -0
- package/lib/es6/PageError/translations/de.json +5 -0
- package/lib/es6/PageError/translations/en.json +5 -0
- package/lib/es6/PageError/translations/es.json +5 -0
- package/lib/es6/PageError/translations/fr.json +5 -0
- package/lib/es6/PageError/translations/it.json +5 -0
- package/lib/es6/PageError/translations/ja.json +5 -0
- package/lib/es6/PageError/translations/ko.json +5 -0
- package/lib/es6/PageError/translations/pt.json +5 -0
- package/lib/es6/PageError/translations/ru.json +5 -0
- package/lib/es6/PageError/translations/vi.json +5 -0
- package/lib/es6/PageError/translations/zh.json +5 -0
- package/lib/es6/PageNotFound/index.js +94 -0
- package/lib/es6/PageNotFound/index.js.map +1 -0
- package/lib/es6/PageNotFound/translations/de.json +5 -0
- package/lib/es6/PageNotFound/translations/en.json +5 -0
- package/lib/es6/PageNotFound/translations/es.json +5 -0
- package/lib/es6/PageNotFound/translations/fr.json +5 -0
- package/lib/es6/PageNotFound/translations/it.json +5 -0
- package/lib/es6/PageNotFound/translations/ja.json +5 -0
- package/lib/es6/PageNotFound/translations/ko.json +5 -0
- package/lib/es6/PageNotFound/translations/pt.json +5 -0
- package/lib/es6/PageNotFound/translations/ru.json +5 -0
- package/lib/es6/PageNotFound/translations/vi.json +5 -0
- package/lib/es6/PageNotFound/translations/zh.json +5 -0
- package/lib/es6/ProjectNotFound/index.js +113 -0
- package/lib/es6/ProjectNotFound/index.js.map +1 -0
- package/lib/es6/ProjectNotFound/translations/de.json +6 -0
- package/lib/es6/ProjectNotFound/translations/en.json +6 -0
- package/lib/es6/ProjectNotFound/translations/es.json +6 -0
- package/lib/es6/ProjectNotFound/translations/fr.json +6 -0
- package/lib/es6/ProjectNotFound/translations/it.json +6 -0
- package/lib/es6/ProjectNotFound/translations/ja.json +6 -0
- package/lib/es6/ProjectNotFound/translations/ko.json +6 -0
- package/lib/es6/ProjectNotFound/translations/pt.json +6 -0
- package/lib/es6/ProjectNotFound/translations/ru.json +6 -0
- package/lib/es6/ProjectNotFound/translations/vi.json +6 -0
- package/lib/es6/ProjectNotFound/translations/zh.json +6 -0
- package/lib/es6/index.js +13 -0
- package/lib/es6/index.js.map +1 -0
- package/lib/es6/style/errors.shadow.css +57 -0
- package/lib/types/index.d.ts +92 -0
- package/package.json +31 -0
- package/src/AccessDenied/index.js +48 -0
- package/src/AccessDenied/translations/de.json +5 -0
- package/src/AccessDenied/translations/en.json +5 -0
- package/src/AccessDenied/translations/es.json +5 -0
- package/src/AccessDenied/translations/fr.json +5 -0
- package/src/AccessDenied/translations/it.json +5 -0
- package/src/AccessDenied/translations/ja.json +5 -0
- package/src/AccessDenied/translations/ko.json +5 -0
- package/src/AccessDenied/translations/pt.json +5 -0
- package/src/AccessDenied/translations/ru.json +5 -0
- package/src/AccessDenied/translations/vi.json +5 -0
- package/src/AccessDenied/translations/zh.json +5 -0
- package/src/Error.js +62 -0
- package/src/Maintenance/index.js +48 -0
- package/src/Maintenance/translations/de.json +5 -0
- package/src/Maintenance/translations/en.json +5 -0
- package/src/Maintenance/translations/es.json +5 -0
- package/src/Maintenance/translations/fr.json +5 -0
- package/src/Maintenance/translations/it.json +5 -0
- package/src/Maintenance/translations/ja.json +5 -0
- package/src/Maintenance/translations/ko.json +5 -0
- package/src/Maintenance/translations/pt.json +5 -0
- package/src/Maintenance/translations/ru.json +5 -0
- package/src/Maintenance/translations/vi.json +5 -0
- package/src/Maintenance/translations/zh.json +5 -0
- package/src/PageError/index.js +60 -0
- package/src/PageError/translations/de.json +5 -0
- package/src/PageError/translations/en.json +5 -0
- package/src/PageError/translations/es.json +5 -0
- package/src/PageError/translations/fr.json +5 -0
- package/src/PageError/translations/it.json +5 -0
- package/src/PageError/translations/ja.json +5 -0
- package/src/PageError/translations/ko.json +5 -0
- package/src/PageError/translations/pt.json +5 -0
- package/src/PageError/translations/ru.json +5 -0
- package/src/PageError/translations/vi.json +5 -0
- package/src/PageError/translations/zh.json +5 -0
- package/src/PageNotFound/index.js +48 -0
- package/src/PageNotFound/translations/de.json +5 -0
- package/src/PageNotFound/translations/en.json +5 -0
- package/src/PageNotFound/translations/es.json +5 -0
- package/src/PageNotFound/translations/fr.json +5 -0
- package/src/PageNotFound/translations/it.json +5 -0
- package/src/PageNotFound/translations/ja.json +5 -0
- package/src/PageNotFound/translations/ko.json +5 -0
- package/src/PageNotFound/translations/pt.json +5 -0
- package/src/PageNotFound/translations/ru.json +5 -0
- package/src/PageNotFound/translations/vi.json +5 -0
- package/src/PageNotFound/translations/zh.json +5 -0
- package/src/ProjectNotFound/index.js +54 -0
- package/src/ProjectNotFound/translations/de.json +6 -0
- package/src/ProjectNotFound/translations/en.json +6 -0
- package/src/ProjectNotFound/translations/es.json +6 -0
- package/src/ProjectNotFound/translations/fr.json +6 -0
- package/src/ProjectNotFound/translations/it.json +6 -0
- package/src/ProjectNotFound/translations/ja.json +6 -0
- package/src/ProjectNotFound/translations/ko.json +6 -0
- package/src/ProjectNotFound/translations/pt.json +6 -0
- package/src/ProjectNotFound/translations/ru.json +6 -0
- package/src/ProjectNotFound/translations/vi.json +6 -0
- package/src/ProjectNotFound/translations/zh.json +6 -0
- package/src/index.d.ts +92 -0
- package/src/index.js +12 -0
- package/src/style/errors.shadow.css +57 -0
- package/svg/access_denied.svg +85 -0
- package/svg/blocked.svg +1 -0
- package/svg/confirmation.svg +1 -0
- package/svg/connection_lost.svg +1 -0
- package/svg/deleted_account.svg +52 -0
- package/svg/dns.svg +1 -0
- package/svg/maintenance.svg +1 -0
- package/svg/no_payment.svg +33 -0
- package/svg/page_error.svg +1 -0
- package/svg/page_not_found.svg +1 -0
- package/svg/project_not_found.svg +1 -0
- package/svg/timeout.svg +1 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import { assignProps as _assignProps } from "@semcore/core";
|
|
8
|
+
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
|
|
11
|
+
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; } }
|
|
12
|
+
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import Button from '@semcore/button';
|
|
15
|
+
import FormatText from '@semcore/format-text';
|
|
16
|
+
import createComponent, { Component, Root } from '@semcore/core';
|
|
17
|
+
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
18
|
+
import Error, { getIconPath } from '../Error';
|
|
19
|
+
import de from './translations/de.json';
|
|
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
|
+
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
|
+
};
|
|
43
|
+
|
|
44
|
+
var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
45
|
+
_inherits(RootProjectNotFound, _Component);
|
|
46
|
+
|
|
47
|
+
var _super = _createSuper(RootProjectNotFound);
|
|
48
|
+
|
|
49
|
+
function RootProjectNotFound() {
|
|
50
|
+
_classCallCheck(this, RootProjectNotFound);
|
|
51
|
+
|
|
52
|
+
return _super.apply(this, arguments);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_createClass(RootProjectNotFound, [{
|
|
56
|
+
key: "render",
|
|
57
|
+
value: function render() {
|
|
58
|
+
var _ref = this ? this.asProps : arguments[0];
|
|
59
|
+
|
|
60
|
+
var _this$asProps = this.asProps,
|
|
61
|
+
Children = _this$asProps.Children,
|
|
62
|
+
getI18nText = _this$asProps.getI18nText,
|
|
63
|
+
projectsLink = _this$asProps.projectsLink,
|
|
64
|
+
contactsLink = _this$asProps.contactsLink,
|
|
65
|
+
supportTeamLink = _this$asProps.supportTeamLink;
|
|
66
|
+
|
|
67
|
+
var _getI18nText = getI18nText(),
|
|
68
|
+
title = _getI18nText.title,
|
|
69
|
+
btnProjects = _getI18nText.btnProjects,
|
|
70
|
+
btnContacts = _getI18nText.btnContacts;
|
|
71
|
+
|
|
72
|
+
var text = getI18nText('text', {
|
|
73
|
+
url: supportTeamLink
|
|
74
|
+
});
|
|
75
|
+
return /*#__PURE__*/React.createElement(Error, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Error.Title, null, title), /*#__PURE__*/React.createElement(Error.Description, {
|
|
76
|
+
tag: FormatText,
|
|
77
|
+
size: "xl",
|
|
78
|
+
dangerouslySetInnerHTML: {
|
|
79
|
+
__html: text
|
|
80
|
+
}
|
|
81
|
+
}), /*#__PURE__*/React.createElement(Children, null), /*#__PURE__*/React.createElement(Error.Controls, null, /*#__PURE__*/React.createElement(Button, {
|
|
82
|
+
tag: "a",
|
|
83
|
+
type: "none",
|
|
84
|
+
size: "xl",
|
|
85
|
+
use: "primary",
|
|
86
|
+
theme: "info",
|
|
87
|
+
href: projectsLink
|
|
88
|
+
}, btnProjects), /*#__PURE__*/React.createElement(Button, {
|
|
89
|
+
size: "xl",
|
|
90
|
+
tag: "a",
|
|
91
|
+
type: "none",
|
|
92
|
+
href: contactsLink
|
|
93
|
+
}, btnContacts)));
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
|
|
97
|
+
return RootProjectNotFound;
|
|
98
|
+
}(Component);
|
|
99
|
+
|
|
100
|
+
_defineProperty(RootProjectNotFound, "displayName", 'Maintenance');
|
|
101
|
+
|
|
102
|
+
_defineProperty(RootProjectNotFound, "enhance", [i18nEnhance()]);
|
|
103
|
+
|
|
104
|
+
_defineProperty(RootProjectNotFound, "defaultProps", {
|
|
105
|
+
i18n: i18n,
|
|
106
|
+
icon: getIconPath('project_not_found'),
|
|
107
|
+
projectsLink: '/projects',
|
|
108
|
+
contactsLink: '/company/contacts',
|
|
109
|
+
supportTeamLink: 'mailto:mail@semrush.com'
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export default createComponent(RootProjectNotFound);
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ProjectNotFound/index.js"],"names":["React","Button","FormatText","createComponent","Component","Root","i18nEnhance","Error","getIconPath","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","RootProjectNotFound","asProps","Children","getI18nText","projectsLink","contactsLink","supportTeamLink","title","btnProjects","btnContacts","text","url","__html","icon"],"mappings":"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","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 de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\n\nclass RootProjectNotFound extends Component {\n static displayName = 'Maintenance';\n static enhance = [i18nEnhance()];\n static defaultProps = {\n i18n,\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 { title, btnProjects, btnContacts } = getI18nText();\n const text = getI18nText('text', { url: supportTeamLink });\n return (\n <Root render={Error}>\n <Error.Title>{title}</Error.Title>\n <Error.Description tag={FormatText} size=\"xl\" dangerouslySetInnerHTML={{ __html: text }} />\n <Children />\n <Error.Controls>\n <Button tag=\"a\" type=\"none\" size=\"xl\" use=\"primary\" theme=\"info\" href={projectsLink}>\n {btnProjects}\n </Button>\n <Button size=\"xl\" tag=\"a\" type=\"none\" href={contactsLink}>\n {btnContacts}\n </Button>\n </Error.Controls>\n </Root>\n );\n }\n}\n\nexport default createComponent(RootProjectNotFound);\n"],"file":"index.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Projekt nicht gefunden",
|
|
3
|
+
"text": "<p>Das Projekt, auf das Sie zugreifen möchten, wurde nicht gefunden.</p><p>Überprüfen Sie, ob eines der folgenden Probleme vorliegt:</p><ul><li>Das Projekt wurde gelöscht, oder die eingegebene URL ist fehlerhaft.</li><li>Sie sind nicht berechtigt, das Projekt anzuzeigen. Bitten Sie den Projektverantwortlichen um Zugriffsrechte.</li></ul><p>Sie finden alle Ihre Projekte auf der Seite „Projekte“.</p><p>Wenn Sie andere Probleme mit dem Zugriff auf das Projekt haben, kontaktieren Sie unser <a href=\"{{url}}\">Support-Team.</a></p>",
|
|
4
|
+
"btnProjects": "Zu den Projekten",
|
|
5
|
+
"btnContacts": "Kontakt"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Project not found",
|
|
3
|
+
"text": "<p>We cannot find the project you’re trying to access.</p><p>Check one of the following issues:</p><ul><li>The project may have been deleted or there is an error in the URL entered.</li><li>Maybe you don’t have permission to view the project.Please request access from the project owner.</li></ul><p>You can find all your projects on the Projects page.</p><p>If you have any other problems with access to the project, please contact our <a href=\"{{url}}\">Support Team.</a></p>",
|
|
4
|
+
"btnProjects": "Go to Projects",
|
|
5
|
+
"btnContacts": "Contact us"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Proyecto no encontrado",
|
|
3
|
+
"text": "<p>No encontramos el proyecto al que quieres acceder.</p><p>Comprueba que no existan los siguientes problemas:</p><ul><li>El proyecto se ha borrado o la URL proporcionada es errónea.</li><li>No cuentas con los permisos para ver el proyecto. Solicita acceso al propietario del proyecto.</li></ul><p>Todos tus proyectos están disponibles en la sección de proyectos.</p><p>Para cualquier problema relacionado con el acceso a tus proyectos, contacta con nuestro <a href=\"{{url}}\">Equipo de asistencia técnica.</a></p>",
|
|
4
|
+
"btnProjects": "Ir a proyectos",
|
|
5
|
+
"btnContacts": "Contáctanos"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Projet introuvable",
|
|
3
|
+
"text": "<p>Nous ne trouvons pas le projet auquel vous essayez d'accéder.</p><p>Vérifiez s'il n'y pas l'un des problèmes suivants :</p><ul><li>Le projet a peut-être été supprimé ou il y a une erreur dans l'URL saisie.</li><li>Vous n'avez peut-être pas l'autorisation de voir le projet. Veuillez demander l'accès au propriétaire du projet.</li></ul><p>Vous pouvez trouver tous vos projets sur la page Projets.</p><p>Si vous rencontrez d'autres problèmes pour accéder au projet, veuillez contacter notre <a href=\"{{url}}}\">équipe d'assistance.</a></p>",
|
|
4
|
+
"btnProjects": "Aller vers Projets",
|
|
5
|
+
"btnContacts": "Nous contacter"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Progetto non trovato",
|
|
3
|
+
"text": "<p>Impossibile trovare il progetto a cui stai provando ad accedere.</p><p>Verifica se è presente uno dei seguenti errori:</p><ul><li>Il progetto potrebbe essere stato cancellato o c'è un errore nell'URL inserito.</li><li>Forse non hai i permessi per visualizzare il progetto. Richiedi l'accesso al proprietario del progetto.</li></ul><p>Puoi trovare tutti i tuoi progetti nella pagina Progetti.</p><p>Se hai ancora problemi nell'accedere al progetto, contatta il nostro <a href=\"{{url}}\">Team di assistenza.</a></p>",
|
|
4
|
+
"btnProjects": "Vai a Progetti",
|
|
5
|
+
"btnContacts": "Contattaci"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "プロジェクトが見つかりませんでした",
|
|
3
|
+
"text": "<p>アクセスしようとしているプロジェクトが見つかりません。</p><p>下記の問題をご確認ください:</p><ul><li>プロジェクトは削除されたか入力したURLにエラーがある。</li><li>プロジェクトを表示することが許可されていない。プロジェクトの所有者にアクセス許可をリクエストしてください。</li></ul><p>プロジェクトページですべてのプロジェクトを発見できます。</p><p>プロジェクトのアクセスにおいて他の問題がある場合は、<a href=\"{{url}}\"><a href=\"{{url}}\"><a href=\"{{url}}\">サポートチーム</a></p>にご連絡ください。",
|
|
4
|
+
"btnProjects": "プロジェクトに移動する",
|
|
5
|
+
"btnContacts": "お問い合わせ"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "프로젝트를 찾을 수 없음",
|
|
3
|
+
"text": "<p>액세스를 시도 중이신 프로젝트를 찾을 수 없습니다.</p><p>이유는 다음 중 하나일 수 있습니다.</p><ul><li>프로젝트가 삭제되었거나 입력하신 URL이 잘못되었을 수 있습니다.</li><li>해당 프로젝트를 볼 수 있는 권한이 없을 수 있습니다. 프로젝트 소유자에게 액세스 권한을 요청하세요.</li></ul><p>프로젝트 페이지에서 모든 프로젝트를 찾으실 수 있습니다.</p><p>프로젝트 액세스와 관련하여 다른 문제가 더 있으시다면 <a href=\"{{url}}\">지원팀에 문의해 주세요.</a></p>",
|
|
4
|
+
"btnProjects": "프로젝트로 이동",
|
|
5
|
+
"btnContacts": "문의하기"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Projeto não encontrado",
|
|
3
|
+
"text": "<p>Não foi possível encontrar o projeto que você está tentando acessar.</p><p>Verifique um dos seguintes problemas:</p><ul><li>O projeto pode ter sido excluído, ou há um erro na URL informada.</li><li>Talvez você não tenha permissão para visualizar o projeto. Solicite acesso ao proprietário do projeto.</li></ul><p>Todos os seus projetos podem ser encontrados na página Projetos.</p><p>Caso tenha algum outro problema no acesso ao projeto, entre em contato com a nossa <a href=\"{{url}}\">Equipe de suporte.</a></p>",
|
|
4
|
+
"btnProjects": "Ir a Projetos",
|
|
5
|
+
"btnContacts": "Fale conosco"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Проект не найден",
|
|
3
|
+
"text": "<p>Проект, который вы ищете, не найден.</p>\n<p>Это может быть связано с одной из следующих проблем:</p><ul><li>Проект был удален или введенный URL-адрес введен некорректно.</li><li>Возможно, у вас нет прав доступа для просмотра этого проекта. Пожалуйста, запросите доступ у владельца проекта.</li></ul><p>Все ваши проекты находятся в разделе «Проекты».</p><p>По другим вопросам, связанным с доступом к проекту, обратитесь в нашу <a href=\"{{url}}\">службу поддержки.</a></p>",
|
|
4
|
+
"btnProjects": "К проектам",
|
|
5
|
+
"btnContacts": "Написать нам"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Không tìm thấy trang",
|
|
3
|
+
"text": "<p>Chúng tôi không thể tìm thấy dự án bạn đang muốn truy cập.</p><p>Hãy kiểm tra một trong các vấn đề sau:</p><ul><li>Dự án có thể đã bị xóa hoặc có lỗi trong URL đã nhập.</li><li>Có thể bạn không có quyền xem dự án. Vui lòng yêu cầu quyền truy cập từ chủ sở hữu dự án.</li></ul><p>Bạn có thể tìm thấy tất cả các dự án của mình trên trang Dự án.</p><p>Nếu bạn gặp bất kỳ sự cố nàokhác về quyền truy cập vào dự án, vui lòng liên hệ với <a href=\"{{url}}\">Đội hỗ trợ của chúng tôi.</a></p>",
|
|
4
|
+
"btnProjects": "Chuyển đến dự án",
|
|
5
|
+
"btnContacts": "Liên hệ chúng tôi"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "无法找到此项目",
|
|
3
|
+
"text": "<p>我们找不到您尝试访问的项目。</p><p>检查是否存在以下问题:</p><ul><li>该项目可能已被删除,或者输入的 URL 中存在错误。</li><li>也许您没有查看该项目的权限。请向项目所有者请求访问权限。</li></ul><p>您可以在“项目”页面中找到所有项目。</p><p>如果您在访问项目时遇到任何其他问题,请联系我们的<a href=\"{{url}}\">支持团队。</a></p>",
|
|
4
|
+
"btnProjects": "转到项目",
|
|
5
|
+
"btnContacts": "联系我们"
|
|
6
|
+
}
|
package/lib/es6/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default } from './Error';
|
|
2
|
+
export * from './Error';
|
|
3
|
+
export { default as AccessDenied } from './AccessDenied';
|
|
4
|
+
export * from './AccessDenied';
|
|
5
|
+
export { default as Maintenance } from './Maintenance';
|
|
6
|
+
export * from './Maintenance';
|
|
7
|
+
export { default as PageError } from './PageError';
|
|
8
|
+
export * from './PageError';
|
|
9
|
+
export { default as PageNotFound } from './PageNotFound';
|
|
10
|
+
export * from './PageNotFound';
|
|
11
|
+
export { default as ProjectNotFound } from './ProjectNotFound';
|
|
12
|
+
export * from './ProjectNotFound';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":["default","AccessDenied","Maintenance","PageError","PageNotFound","ProjectNotFound"],"mappings":"AAAA,SAASA,OAAT,QAAwB,SAAxB;AACA,cAAc,SAAd;AACA,SAASA,OAAO,IAAIC,YAApB,QAAwC,gBAAxC;AACA,cAAc,gBAAd;AACA,SAASD,OAAO,IAAIE,WAApB,QAAuC,eAAvC;AACA,cAAc,eAAd;AACA,SAASF,OAAO,IAAIG,SAApB,QAAqC,aAArC;AACA,cAAc,aAAd;AACA,SAASH,OAAO,IAAII,YAApB,QAAwC,gBAAxC;AACA,cAAc,gBAAd;AACA,SAASJ,OAAO,IAAIK,eAApB,QAA2C,mBAA3C;AACA,cAAc,mBAAd","sourcesContent":["export { default } from './Error';\nexport * from './Error';\nexport { default as AccessDenied } from './AccessDenied';\nexport * from './AccessDenied';\nexport { default as Maintenance } from './Maintenance';\nexport * from './Maintenance';\nexport { default as PageError } from './PageError';\nexport * from './PageError';\nexport { default as PageNotFound } from './PageNotFound';\nexport * from './PageNotFound';\nexport { default as ProjectNotFound } from './ProjectNotFound';\nexport * from './ProjectNotFound';\n"],"file":"index.js"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@import '@semcore/utils/style/var.css';
|
|
2
|
+
|
|
3
|
+
SError {
|
|
4
|
+
padding: 96px 0;
|
|
5
|
+
margin: 0 auto;
|
|
6
|
+
max-width: 960px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
SInner {
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
|
|
17
|
+
@media (max-width: 920px) {
|
|
18
|
+
padding: 0 10px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
SImageWrapper {
|
|
23
|
+
width: 240px;
|
|
24
|
+
height: 240px;
|
|
25
|
+
margin-right: 80px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
SWrapper {
|
|
29
|
+
flex: 1 0 320px;
|
|
30
|
+
margin-top: 32px;
|
|
31
|
+
@media (max-width: 920px) {
|
|
32
|
+
flex: 1 0 300px;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
STitle {
|
|
38
|
+
font-size: var(--fs-700);
|
|
39
|
+
line-height: var(--lh-700);
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
margin: 0 0 16px 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
SDescription {
|
|
45
|
+
font-size: var(--fs-300);
|
|
46
|
+
line-height: var(--lh-300);
|
|
47
|
+
margin: 0 0 24px 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
SControls {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
|
|
54
|
+
& > *:not(:last-child) {
|
|
55
|
+
margin-right: 12px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, IFlexProps } from '@semcore/flex-box';
|
|
3
|
+
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
4
|
+
import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
5
|
+
|
|
6
|
+
export type iconNames =
|
|
7
|
+
| 'access_denied'
|
|
8
|
+
| 'blocked'
|
|
9
|
+
| 'confirmation'
|
|
10
|
+
| 'connection_lost'
|
|
11
|
+
| 'deleted_account'
|
|
12
|
+
| 'dns'
|
|
13
|
+
| 'maintenance'
|
|
14
|
+
| 'no_payment'
|
|
15
|
+
| 'page_error'
|
|
16
|
+
| 'page_not_found'
|
|
17
|
+
| 'project_not_found'
|
|
18
|
+
| 'timeout';
|
|
19
|
+
|
|
20
|
+
export interface IErrorsProps extends IFlexProps {
|
|
21
|
+
/**
|
|
22
|
+
* Error icon
|
|
23
|
+
*/
|
|
24
|
+
icon?: string | React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IErrorsContext {
|
|
28
|
+
getTextProps: PropGetterFn;
|
|
29
|
+
getDescriptionProps: PropGetterFn;
|
|
30
|
+
getControlsProps: PropGetterFn;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
|
|
34
|
+
/**
|
|
35
|
+
* Link to the projects
|
|
36
|
+
* @default /projects
|
|
37
|
+
*/
|
|
38
|
+
projectsLink?: string;
|
|
39
|
+
contactsLink?: string;
|
|
40
|
+
supportTeamLink?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IPageNotFoundProps extends IWithI18nEnhanceProps {
|
|
44
|
+
/**
|
|
45
|
+
* href of the home link
|
|
46
|
+
* @default /
|
|
47
|
+
*/
|
|
48
|
+
homeLink?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IPageErrorProps extends IWithI18nEnhanceProps {
|
|
52
|
+
/**
|
|
53
|
+
* Page reloading button click handler
|
|
54
|
+
* @default () => { if (canUseDOM()) { location.reload(); } }
|
|
55
|
+
*/
|
|
56
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
60
|
+
/**
|
|
61
|
+
* Tool name
|
|
62
|
+
*/
|
|
63
|
+
toolName: string;
|
|
64
|
+
/**
|
|
65
|
+
* href of the home link
|
|
66
|
+
* @default /
|
|
67
|
+
*/
|
|
68
|
+
homeLink?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface IAccessDeniedProps extends IWithI18nEnhanceProps {
|
|
72
|
+
/**
|
|
73
|
+
* href of the home link
|
|
74
|
+
* @default /
|
|
75
|
+
*/
|
|
76
|
+
homeLink?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare const Error: (<T>(props: CProps<IErrorsProps & T, IErrorsContext>) => ReturnEl) & {
|
|
80
|
+
Title: typeof Box;
|
|
81
|
+
Description: typeof Box;
|
|
82
|
+
Controls: typeof Box;
|
|
83
|
+
};
|
|
84
|
+
declare const ProjectNotFound: <T>(props: IProjectNotFoundProps & IErrorsProps & T) => ReturnEl;
|
|
85
|
+
declare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) => ReturnEl;
|
|
86
|
+
declare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;
|
|
87
|
+
declare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;
|
|
88
|
+
declare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;
|
|
89
|
+
declare const getIconPath: (name: iconNames) => string;
|
|
90
|
+
|
|
91
|
+
export default Error;
|
|
92
|
+
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@semcore/errors",
|
|
3
|
+
"description": "SEMRush Errors Component",
|
|
4
|
+
"version": "2.4.3",
|
|
5
|
+
"main": "lib/cjs/index.js",
|
|
6
|
+
"module": "lib/es6/index.js",
|
|
7
|
+
"typings": "lib/types/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"author": "Roman Lysov <r.lysov@semrush.com>",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "build --source=js",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"deploy": "gcs-upload svg/*.svg"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@semcore/utils": "^3.27",
|
|
18
|
+
"@semcore/button": "^3",
|
|
19
|
+
"@semcore/flex-box": "^4",
|
|
20
|
+
"@semcore/format-text": "^2",
|
|
21
|
+
"@semcore/typography": "^3",
|
|
22
|
+
"@semcore/icon": "^2"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@semcore/core": "^1.11",
|
|
26
|
+
"react": "16.8 - 17"
|
|
27
|
+
},
|
|
28
|
+
"jest": {
|
|
29
|
+
"preset": "jest-preset-ui"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
import Button from '@semcore/button';
|
|
3
|
+
import createComponent, { Component, Root } from '@semcore/core';
|
|
4
|
+
import i18nEnhance, { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
5
|
+
import Error, { getIconPath } from '../Error';
|
|
6
|
+
|
|
7
|
+
import de from './translations/de.json';
|
|
8
|
+
import en from './translations/en.json';
|
|
9
|
+
import es from './translations/es.json';
|
|
10
|
+
import fr from './translations/fr.json';
|
|
11
|
+
import it from './translations/it.json';
|
|
12
|
+
import ja from './translations/ja.json';
|
|
13
|
+
import pt from './translations/pt.json';
|
|
14
|
+
import ru from './translations/ru.json';
|
|
15
|
+
import zh from './translations/zh.json';
|
|
16
|
+
import ko from './translations/ko.json';
|
|
17
|
+
import vi from './translations/vi.json';
|
|
18
|
+
|
|
19
|
+
const i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };
|
|
20
|
+
|
|
21
|
+
class RootAccessDenied extends Component {
|
|
22
|
+
static displayName = 'AccessDenied';
|
|
23
|
+
static enhance = [i18nEnhance()];
|
|
24
|
+
static defaultProps = {
|
|
25
|
+
i18n,
|
|
26
|
+
homeLink: '/',
|
|
27
|
+
icon: getIconPath('access_denied'),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
render() {
|
|
31
|
+
const { Children, getI18nText, homeLink } = this.asProps;
|
|
32
|
+
const { title, text, btnHome } = getI18nText();
|
|
33
|
+
return (
|
|
34
|
+
<Root render={Error}>
|
|
35
|
+
<Error.Title>{title}</Error.Title>
|
|
36
|
+
<Error.Description wMax="640px">{text}</Error.Description>
|
|
37
|
+
<Children />
|
|
38
|
+
<Error.Controls>
|
|
39
|
+
<Button tag="a" type="none" size="xl" use="primary" theme="info" href={homeLink}>
|
|
40
|
+
{btnHome}
|
|
41
|
+
</Button>
|
|
42
|
+
</Error.Controls>
|
|
43
|
+
</Root>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default createComponent(RootAccessDenied);
|