@semcore/errors 16.1.7-prerelease.1 → 17.0.0-prerelease.17
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 +6 -0
- package/README.md +4 -4
- package/lib/cjs/AccessDenied/index.js +29 -40
- package/lib/cjs/AccessDenied/index.js.map +1 -1
- package/lib/cjs/AccessDenied/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/AccessDenied/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/Error.js +58 -63
- package/lib/cjs/Error.js.map +1 -1
- package/lib/cjs/Maintenance/index.js +28 -39
- package/lib/cjs/Maintenance/index.js.map +1 -1
- package/lib/cjs/Maintenance/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/Maintenance/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/PageError/index.js +30 -45
- package/lib/cjs/PageError/index.js.map +1 -1
- package/lib/cjs/PageError/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/PageError/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/PageNotFound/index.js +27 -38
- package/lib/cjs/PageNotFound/index.js.map +1 -1
- package/lib/cjs/PageNotFound/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/PageNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/ProjectNotFound/index.js +47 -65
- package/lib/cjs/ProjectNotFound/index.js.map +1 -1
- package/lib/cjs/ProjectNotFound/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/ProjectNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/index.d.js +2 -9
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +15 -15
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/errors.shadow.css +1 -0
- package/lib/es6/AccessDenied/index.js +22 -33
- package/lib/es6/AccessDenied/index.js.map +1 -1
- package/lib/es6/AccessDenied/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/AccessDenied/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/Error.js +52 -58
- package/lib/es6/Error.js.map +1 -1
- package/lib/es6/Maintenance/index.js +21 -32
- package/lib/es6/Maintenance/index.js.map +1 -1
- package/lib/es6/Maintenance/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/Maintenance/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/PageError/index.js +22 -37
- package/lib/es6/PageError/index.js.map +1 -1
- package/lib/es6/PageError/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/PageError/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/PageNotFound/index.js +20 -31
- package/lib/es6/PageNotFound/index.js.map +1 -1
- package/lib/es6/PageNotFound/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/PageNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/ProjectNotFound/index.js +40 -58
- package/lib/es6/ProjectNotFound/index.js.map +1 -1
- package/lib/es6/ProjectNotFound/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/ProjectNotFound/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/index.d.js +0 -14
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/errors.shadow.css +1 -0
- package/lib/esm/AccessDenied/index.mjs +23 -30
- package/lib/esm/AccessDenied/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/Error.mjs +51 -54
- package/lib/esm/Maintenance/index.mjs +22 -28
- package/lib/esm/Maintenance/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/PageError/index.mjs +22 -32
- package/lib/esm/PageError/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/PageNotFound/index.mjs +21 -28
- package/lib/esm/PageNotFound/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/ProjectNotFound/index.mjs +41 -53
- package/lib/esm/ProjectNotFound/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/style/errors.shadow.css +1 -0
- package/lib/types/index.d.ts +2 -16
- package/package.json +7 -8
package/lib/esm/Error.mjs
CHANGED
|
@@ -1,80 +1,77 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent, sstyled,
|
|
8
|
-
import { Flex, Box } from "@semcore/
|
|
2
|
+
import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
|
|
3
|
+
import { Flex, Box } from "@semcore/base-components";
|
|
9
4
|
import { getIllustrationPath } from "@semcore/illustration";
|
|
10
5
|
import React from "react";
|
|
11
6
|
/*!__reshadow-styles__:"./style/errors.shadow.css"*/
|
|
12
|
-
|
|
7
|
+
const style = (
|
|
13
8
|
/*__reshadow_css_start__*/
|
|
14
9
|
(sstyled.insert(
|
|
15
10
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
11
|
+
".___SError_vaafg_gg_{padding:var(--intergalactic-spacing-20x, 80px) var(--intergalactic-spacing-6x, 24px);margin:0 auto;max-width:960px}@media (max-width:647px){.___SError_vaafg_gg_{padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-20x, 80px)}}.___SError_vaafg_gg_ .___SControls_vaafg_gg_{display:flex;flex-wrap:wrap;gap:var(--intergalactic-spacing-3x, 12px);align-items:center}.___SError_vaafg_gg_ .___SInner_vaafg_gg_{width:100%;display:flex;justify-content:flex-start;align-items:flex-start;box-sizing:border-box}@media (max-width:647px){.___SError_vaafg_gg_ .___SInner_vaafg_gg_{flex-direction:column}}.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SImageWrapper_vaafg_gg_,.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SImage_vaafg_gg_{width:260px;height:260px}@media (max-width:647px){.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SImageWrapper_vaafg_gg_,.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SImage_vaafg_gg_{width:200px;height:200px}}.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SImageWrapper_vaafg_gg_{flex-shrink:0;margin-right:var(--intergalactic-spacing-10x, 40px)}.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SWrapper_vaafg_gg_{max-width:100%;margin-top:var(--intergalactic-spacing-8x, 32px)}.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___STitle_vaafg_gg_[data-errors-title]{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%);color:var(--intergalactic-text-primary, #191b23);font-weight:var(--intergalactic-semi-bold, 600);margin:0 0 var(--intergalactic-spacing-4x, 16px)0}.___SError_vaafg_gg_ .___SInner_vaafg_gg_ .___SDescription_vaafg_gg_{display:block;font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);color:var(--intergalactic-text-primary, #191b23);margin:0 0 var(--intergalactic-spacing-6x, 24px)0}",
|
|
17
12
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
13
|
+
"vaafg_gg_"
|
|
19
14
|
), /*__reshadow_css_end__*/
|
|
20
15
|
{
|
|
21
|
-
"__SError": "
|
|
22
|
-
"__SControls": "
|
|
23
|
-
"__SInner": "
|
|
24
|
-
"__SImageWrapper": "
|
|
25
|
-
"__SImage": "
|
|
26
|
-
"__SWrapper": "
|
|
27
|
-
"__STitle": "
|
|
28
|
-
"__SDescription": "
|
|
16
|
+
"__SError": "___SError_vaafg_gg_",
|
|
17
|
+
"__SControls": "___SControls_vaafg_gg_",
|
|
18
|
+
"__SInner": "___SInner_vaafg_gg_",
|
|
19
|
+
"__SImageWrapper": "___SImageWrapper_vaafg_gg_",
|
|
20
|
+
"__SImage": "___SImage_vaafg_gg_",
|
|
21
|
+
"__SWrapper": "___SWrapper_vaafg_gg_",
|
|
22
|
+
"__STitle": "___STitle_vaafg_gg_",
|
|
23
|
+
"__SDescription": "___SDescription_vaafg_gg_"
|
|
29
24
|
})
|
|
30
25
|
);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
const getIconPath = (name) => getIllustrationPath(name);
|
|
27
|
+
class RootError extends Component {
|
|
28
|
+
render() {
|
|
29
|
+
var _ref = this.asProps, _ref5;
|
|
30
|
+
const SError = Flex;
|
|
31
|
+
const {
|
|
32
|
+
Children,
|
|
33
|
+
styles,
|
|
34
|
+
icon
|
|
35
|
+
} = this.asProps;
|
|
36
|
+
const SInner = "div";
|
|
37
|
+
const SImageWrapper = "div";
|
|
38
|
+
const SWrapper = "div";
|
|
39
|
+
const SImage = "img";
|
|
40
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SError, _ref5.cn("SError", {
|
|
41
|
+
...assignProps({}, _ref)
|
|
42
|
+
}), /* @__PURE__ */ React.createElement(SInner, _ref5.cn("SInner", {}), icon && /* @__PURE__ */ React.createElement(SImageWrapper, _ref5.cn("SImageWrapper", {}), typeof icon === "string" ? /* @__PURE__ */ React.createElement(SImage, _ref5.cn("SImage", {
|
|
43
|
+
"src": icon,
|
|
44
|
+
"alt": ""
|
|
45
|
+
})) : icon), /* @__PURE__ */ React.createElement(SWrapper, _ref5.cn("SWrapper", {}), /* @__PURE__ */ React.createElement(Children, _ref5.cn("Children", {})))));
|
|
38
46
|
}
|
|
39
|
-
|
|
40
|
-
return _createClass(RootError2, [{
|
|
41
|
-
key: "render",
|
|
42
|
-
value: function render() {
|
|
43
|
-
var _ref = this.asProps, _ref5;
|
|
44
|
-
var SError = Flex;
|
|
45
|
-
var _this$asProps = this.asProps, Children = _this$asProps.Children, styles = _this$asProps.styles, icon = _this$asProps.icon;
|
|
46
|
-
var SInner = "div";
|
|
47
|
-
var SImageWrapper = "div";
|
|
48
|
-
var SWrapper = "div";
|
|
49
|
-
var SImage = "img";
|
|
50
|
-
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SError, _ref5.cn("SError", _objectSpread({}, assignProps({}, _ref))), /* @__PURE__ */ React.createElement(SInner, _ref5.cn("SInner", {}), icon && /* @__PURE__ */ React.createElement(SImageWrapper, _ref5.cn("SImageWrapper", {}), typeof icon === "string" ? /* @__PURE__ */ React.createElement(SImage, _ref5.cn("SImage", {
|
|
51
|
-
"src": icon,
|
|
52
|
-
"alt": ""
|
|
53
|
-
})) : icon), /* @__PURE__ */ React.createElement(SWrapper, _ref5.cn("SWrapper", {}), /* @__PURE__ */ React.createElement(Children, _ref5.cn("Children", {})))));
|
|
54
|
-
}
|
|
55
|
-
}]);
|
|
56
|
-
})(Component);
|
|
47
|
+
}
|
|
57
48
|
_defineProperty(RootError, "displayName", "Error");
|
|
58
49
|
_defineProperty(RootError, "style", style);
|
|
59
50
|
function Title(props) {
|
|
60
51
|
var _ref2 = arguments[0], _ref6;
|
|
61
|
-
|
|
62
|
-
return _ref6 = sstyled(props.styles), /* @__PURE__ */ React.createElement(STitle, _ref6.cn("STitle",
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
const STitle = Box;
|
|
53
|
+
return _ref6 = sstyled(props.styles), /* @__PURE__ */ React.createElement(STitle, _ref6.cn("STitle", {
|
|
54
|
+
...assignProps({
|
|
55
|
+
"data-errors-title": true,
|
|
56
|
+
"tag": "h2"
|
|
57
|
+
}, _ref2)
|
|
58
|
+
}));
|
|
66
59
|
}
|
|
67
60
|
function Description(props) {
|
|
68
61
|
var _ref3 = arguments[0], _ref7;
|
|
69
|
-
|
|
70
|
-
return _ref7 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDescription, _ref7.cn("SDescription",
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
const SDescription = Box;
|
|
63
|
+
return _ref7 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDescription, _ref7.cn("SDescription", {
|
|
64
|
+
...assignProps({
|
|
65
|
+
"tag": "p"
|
|
66
|
+
}, _ref3)
|
|
67
|
+
}));
|
|
73
68
|
}
|
|
74
69
|
function Controls(props) {
|
|
75
70
|
var _ref4 = arguments[0], _ref8;
|
|
76
|
-
|
|
77
|
-
return _ref8 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SControls, _ref8.cn("SControls",
|
|
71
|
+
const SControls = Box;
|
|
72
|
+
return _ref8 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SControls, _ref8.cn("SControls", {
|
|
73
|
+
...assignProps({}, _ref4)
|
|
74
|
+
}));
|
|
78
75
|
}
|
|
79
76
|
const Error = createComponent(RootError, {
|
|
80
77
|
Title,
|
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { createComponent,
|
|
2
|
+
import { createComponent, Component, assignProps } from "@semcore/core";
|
|
7
3
|
import Button from "@semcore/button";
|
|
8
4
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
5
|
import React from "react";
|
|
10
6
|
import Error, { getIconPath } from "../Error.mjs";
|
|
11
7
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
class RootMaintenance extends Component {
|
|
9
|
+
render() {
|
|
10
|
+
var _ref = this.asProps;
|
|
11
|
+
const {
|
|
12
|
+
Children,
|
|
13
|
+
getI18nText,
|
|
14
|
+
homeLink,
|
|
15
|
+
toolName,
|
|
16
|
+
titleTag
|
|
17
|
+
} = this.asProps;
|
|
18
|
+
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
19
|
+
tag: titleTag
|
|
20
|
+
}, `${toolName} ${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, {
|
|
21
|
+
tag: "a",
|
|
22
|
+
type: "none",
|
|
23
|
+
size: "l",
|
|
24
|
+
use: "primary",
|
|
25
|
+
theme: "info",
|
|
26
|
+
href: homeLink
|
|
27
|
+
}, getI18nText("btnHome"))));
|
|
16
28
|
}
|
|
17
|
-
|
|
18
|
-
return _createClass(RootMaintenance2, [{
|
|
19
|
-
key: "render",
|
|
20
|
-
value: function render() {
|
|
21
|
-
var _ref = this.asProps;
|
|
22
|
-
var _this$asProps = this.asProps, Children = _this$asProps.Children, getI18nText = _this$asProps.getI18nText, homeLink = _this$asProps.homeLink, toolName = _this$asProps.toolName, titleTag = _this$asProps.titleTag;
|
|
23
|
-
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
24
|
-
tag: titleTag
|
|
25
|
-
}, "".concat(toolName, " ").concat(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, {
|
|
26
|
-
tag: "a",
|
|
27
|
-
type: "none",
|
|
28
|
-
size: "l",
|
|
29
|
-
use: "primary",
|
|
30
|
-
theme: "info",
|
|
31
|
-
href: homeLink
|
|
32
|
-
}, getI18nText("btnHome"))));
|
|
33
|
-
}
|
|
34
|
-
}]);
|
|
35
|
-
})(Component);
|
|
29
|
+
}
|
|
36
30
|
_defineProperty(RootMaintenance, "displayName", "Maintenance");
|
|
37
31
|
_defineProperty(RootMaintenance, "enhance", [i18nEnhance(localizedMessages)]);
|
|
38
32
|
_defineProperty(RootMaintenance, "defaultProps", {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
2
|
import Button from "@semcore/button";
|
|
8
3
|
import { createComponent, Component } from "@semcore/core";
|
|
@@ -12,38 +7,33 @@ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
|
12
7
|
import React from "react";
|
|
13
8
|
import Error, { getIconPath } from "../Error.mjs";
|
|
14
9
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_classCallCheck(this, RootPageError2);
|
|
20
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
|
-
args[_key] = arguments[_key];
|
|
22
|
-
}
|
|
23
|
-
_this = _callSuper(this, RootPageError2, [].concat(args));
|
|
24
|
-
_defineProperty(_this, "handleReload", function() {
|
|
10
|
+
class RootPageError extends Component {
|
|
11
|
+
constructor(...args) {
|
|
12
|
+
super(...args);
|
|
13
|
+
_defineProperty(this, "handleReload", () => {
|
|
25
14
|
if (canUseDOM()) {
|
|
26
15
|
location.reload();
|
|
27
16
|
}
|
|
28
17
|
});
|
|
29
|
-
return _this;
|
|
30
18
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
19
|
+
render() {
|
|
20
|
+
const {
|
|
21
|
+
Children,
|
|
22
|
+
getI18nText,
|
|
23
|
+
onClick,
|
|
24
|
+
titleTag,
|
|
25
|
+
...other
|
|
26
|
+
} = this.asProps;
|
|
27
|
+
return /* @__PURE__ */ React.createElement(Error, other, /* @__PURE__ */ React.createElement(Error.Title, {
|
|
28
|
+
tag: titleTag
|
|
29
|
+
}, 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, {
|
|
30
|
+
onClick: callAllEventHandlers(onClick, this.handleReload),
|
|
31
|
+
size: "l",
|
|
32
|
+
use: "primary",
|
|
33
|
+
theme: "info"
|
|
34
|
+
}, getI18nText("btnRetry"))));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
47
37
|
_defineProperty(RootPageError, "displayName", "PageError");
|
|
48
38
|
_defineProperty(RootPageError, "enhance", [i18nEnhance(localizedMessages)]);
|
|
49
39
|
_defineProperty(RootPageError, "defaultProps", {
|
|
@@ -1,38 +1,31 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { createComponent,
|
|
2
|
+
import { createComponent, Component, assignProps } from "@semcore/core";
|
|
7
3
|
import Button from "@semcore/button";
|
|
8
4
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
5
|
import React from "react";
|
|
10
6
|
import Error, { getIconPath } from "../Error.mjs";
|
|
11
7
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
class RootPageNotFound extends Component {
|
|
9
|
+
render() {
|
|
10
|
+
var _ref = this.asProps;
|
|
11
|
+
const {
|
|
12
|
+
Children,
|
|
13
|
+
getI18nText,
|
|
14
|
+
homeLink,
|
|
15
|
+
titleTag
|
|
16
|
+
} = this.asProps;
|
|
17
|
+
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
18
|
+
tag: titleTag
|
|
19
|
+
}, 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, {
|
|
20
|
+
tag: "a",
|
|
21
|
+
type: "none",
|
|
22
|
+
size: "l",
|
|
23
|
+
use: "primary",
|
|
24
|
+
theme: "info",
|
|
25
|
+
href: homeLink
|
|
26
|
+
}, getI18nText("btnHome"))));
|
|
16
27
|
}
|
|
17
|
-
|
|
18
|
-
return _createClass(RootPageNotFound2, [{
|
|
19
|
-
key: "render",
|
|
20
|
-
value: function render() {
|
|
21
|
-
var _ref = this.asProps;
|
|
22
|
-
var _this$asProps = this.asProps, Children = _this$asProps.Children, getI18nText = _this$asProps.getI18nText, homeLink = _this$asProps.homeLink, titleTag = _this$asProps.titleTag;
|
|
23
|
-
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
24
|
-
tag: titleTag
|
|
25
|
-
}, 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, {
|
|
26
|
-
tag: "a",
|
|
27
|
-
type: "none",
|
|
28
|
-
size: "l",
|
|
29
|
-
use: "primary",
|
|
30
|
-
theme: "info",
|
|
31
|
-
href: homeLink
|
|
32
|
-
}, getI18nText("btnHome"))));
|
|
33
|
-
}
|
|
34
|
-
}]);
|
|
35
|
-
})(Component);
|
|
28
|
+
}
|
|
36
29
|
_defineProperty(RootPageNotFound, "displayName", "Maintenance");
|
|
37
30
|
_defineProperty(RootPageNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
38
31
|
_defineProperty(RootPageNotFound, "defaultProps", {
|
|
@@ -1,63 +1,51 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { createComponent,
|
|
2
|
+
import { createComponent, Component, assignProps } from "@semcore/core";
|
|
7
3
|
import Button from "@semcore/button";
|
|
8
4
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
|
-
import
|
|
5
|
+
import { Text } from "@semcore/typography";
|
|
10
6
|
import React from "react";
|
|
11
7
|
import Error, { getIconPath } from "../Error.mjs";
|
|
12
8
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
class RootProjectNotFound extends Component {
|
|
10
|
+
render() {
|
|
11
|
+
var _ref = this.asProps;
|
|
12
|
+
const {
|
|
13
|
+
Children,
|
|
14
|
+
getI18nText,
|
|
15
|
+
projectsLink,
|
|
16
|
+
contactsLink,
|
|
17
|
+
supportTeamLink,
|
|
18
|
+
titleTag
|
|
19
|
+
} = this.asProps;
|
|
20
|
+
const text = getI18nText("text", {
|
|
21
|
+
p: (chunk) => /* @__PURE__ */ React.createElement("p", null, chunk),
|
|
22
|
+
ul: (chunk) => /* @__PURE__ */ React.createElement("ul", null, chunk),
|
|
23
|
+
li: (chunk) => /* @__PURE__ */ React.createElement("li", null, chunk),
|
|
24
|
+
supportLink: (chunk) => /* @__PURE__ */ React.createElement("a", {
|
|
25
|
+
href: supportTeamLink
|
|
26
|
+
}, chunk)
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
29
|
+
tag: titleTag
|
|
30
|
+
}, getI18nText("title")), /* @__PURE__ */ React.createElement(Error.Description, {
|
|
31
|
+
tag: Text,
|
|
32
|
+
formatTags: true,
|
|
33
|
+
size: "300"
|
|
34
|
+
}, text), /* @__PURE__ */ React.createElement(Children, null), /* @__PURE__ */ React.createElement(Error.Controls, null, /* @__PURE__ */ React.createElement(Button, {
|
|
35
|
+
tag: "a",
|
|
36
|
+
type: "none",
|
|
37
|
+
size: "l",
|
|
38
|
+
use: "primary",
|
|
39
|
+
theme: "info",
|
|
40
|
+
href: projectsLink
|
|
41
|
+
}, getI18nText("btnProjects")), /* @__PURE__ */ React.createElement(Button, {
|
|
42
|
+
size: "l",
|
|
43
|
+
tag: "a",
|
|
44
|
+
type: "none",
|
|
45
|
+
href: contactsLink
|
|
46
|
+
}, getI18nText("btnContacts"))));
|
|
17
47
|
}
|
|
18
|
-
|
|
19
|
-
return _createClass(RootProjectNotFound2, [{
|
|
20
|
-
key: "render",
|
|
21
|
-
value: function render() {
|
|
22
|
-
var _ref = this.asProps;
|
|
23
|
-
var _this$asProps = this.asProps, Children = _this$asProps.Children, getI18nText = _this$asProps.getI18nText, projectsLink = _this$asProps.projectsLink, contactsLink = _this$asProps.contactsLink, supportTeamLink = _this$asProps.supportTeamLink, titleTag = _this$asProps.titleTag;
|
|
24
|
-
var text = getI18nText("text", {
|
|
25
|
-
p: function p(chunk) {
|
|
26
|
-
return /* @__PURE__ */ React.createElement("p", null, chunk);
|
|
27
|
-
},
|
|
28
|
-
ul: function ul(chunk) {
|
|
29
|
-
return /* @__PURE__ */ React.createElement("ul", null, chunk);
|
|
30
|
-
},
|
|
31
|
-
li: function li(chunk) {
|
|
32
|
-
return /* @__PURE__ */ React.createElement("li", null, chunk);
|
|
33
|
-
},
|
|
34
|
-
supportLink: function supportLink(chunk) {
|
|
35
|
-
return /* @__PURE__ */ React.createElement("a", {
|
|
36
|
-
href: supportTeamLink
|
|
37
|
-
}, chunk);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
41
|
-
tag: titleTag
|
|
42
|
-
}, getI18nText("title")), /* @__PURE__ */ React.createElement(Error.Description, {
|
|
43
|
-
tag: FormatText,
|
|
44
|
-
size: "l"
|
|
45
|
-
}, text), /* @__PURE__ */ React.createElement(Children, null), /* @__PURE__ */ React.createElement(Error.Controls, null, /* @__PURE__ */ React.createElement(Button, {
|
|
46
|
-
tag: "a",
|
|
47
|
-
type: "none",
|
|
48
|
-
size: "l",
|
|
49
|
-
use: "primary",
|
|
50
|
-
theme: "info",
|
|
51
|
-
href: projectsLink
|
|
52
|
-
}, getI18nText("btnProjects")), /* @__PURE__ */ React.createElement(Button, {
|
|
53
|
-
size: "l",
|
|
54
|
-
tag: "a",
|
|
55
|
-
type: "none",
|
|
56
|
-
href: contactsLink
|
|
57
|
-
}, getI18nText("btnContacts"))));
|
|
58
|
-
}
|
|
59
|
-
}]);
|
|
60
|
-
})(Component);
|
|
48
|
+
}
|
|
61
49
|
_defineProperty(RootProjectNotFound, "displayName", "Maintenance");
|
|
62
50
|
_defineProperty(RootProjectNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
63
51
|
_defineProperty(RootProjectNotFound, "defaultProps", {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Box, FlexProps } from '@semcore/base-components';
|
|
2
|
+
import type { Intergalactic, PropGetterFn } from '@semcore/core';
|
|
2
3
|
import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
3
|
-
import type { Box, FlexProps } from '@semcore/flex-box';
|
|
4
4
|
import type { TIllustrationNamesErrors } from '@semcore/illustration';
|
|
5
5
|
import type React from 'react';
|
|
6
6
|
|
|
7
7
|
export type iconNamesErrors = TIllustrationNamesErrors;
|
|
8
8
|
|
|
9
|
-
/** @deprecated */
|
|
10
|
-
export interface IErrorsProps extends ErrorsProps, UnknownProperties {}
|
|
11
9
|
export type ErrorsProps = FlexProps & {
|
|
12
10
|
/**
|
|
13
11
|
* Error icon
|
|
@@ -15,16 +13,12 @@ export type ErrorsProps = FlexProps & {
|
|
|
15
13
|
icon?: string | React.ReactNode;
|
|
16
14
|
};
|
|
17
15
|
|
|
18
|
-
/** @deprecated */
|
|
19
|
-
export interface IErrorsContext extends ErrorsContext, UnknownProperties {}
|
|
20
16
|
export type ErrorsContext = {
|
|
21
17
|
getTextProps: PropGetterFn;
|
|
22
18
|
getDescriptionProps: PropGetterFn;
|
|
23
19
|
getControlsProps: PropGetterFn;
|
|
24
20
|
};
|
|
25
21
|
|
|
26
|
-
/** @deprecated */
|
|
27
|
-
export interface IProjectNotFoundProps extends ProjectNotFoundProps, UnknownProperties {}
|
|
28
22
|
export type ProjectNotFoundProps = WithI18nEnhanceProps & {
|
|
29
23
|
/**
|
|
30
24
|
* URL for the "Go to Projects" button
|
|
@@ -48,8 +42,6 @@ export type ProjectNotFoundProps = WithI18nEnhanceProps & {
|
|
|
48
42
|
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
49
43
|
};
|
|
50
44
|
|
|
51
|
-
/** @deprecated */
|
|
52
|
-
export interface IPageNotFoundProps extends PageNotFoundProps, UnknownProperties {}
|
|
53
45
|
export type PageNotFoundProps = WithI18nEnhanceProps & {
|
|
54
46
|
/**
|
|
55
47
|
* href of the home link
|
|
@@ -63,8 +55,6 @@ export type PageNotFoundProps = WithI18nEnhanceProps & {
|
|
|
63
55
|
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
64
56
|
};
|
|
65
57
|
|
|
66
|
-
/** @deprecated */
|
|
67
|
-
export interface IPageErrorProps extends PageErrorProps, UnknownProperties {}
|
|
68
58
|
export type PageErrorProps = WithI18nEnhanceProps & {
|
|
69
59
|
/**
|
|
70
60
|
* Page reloading button click handler
|
|
@@ -78,8 +68,6 @@ export type PageErrorProps = WithI18nEnhanceProps & {
|
|
|
78
68
|
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
79
69
|
};
|
|
80
70
|
|
|
81
|
-
/** @deprecated */
|
|
82
|
-
export interface IMaintenanceProps extends MaintenanceProps, UnknownProperties {}
|
|
83
71
|
export type MaintenanceProps = WithI18nEnhanceProps & {
|
|
84
72
|
/**
|
|
85
73
|
* Tool name
|
|
@@ -97,8 +85,6 @@ export type MaintenanceProps = WithI18nEnhanceProps & {
|
|
|
97
85
|
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
98
86
|
};
|
|
99
87
|
|
|
100
|
-
/** @deprecated */
|
|
101
|
-
export interface IAccessDeniedProps extends AccessDeniedProps, UnknownProperties {}
|
|
102
88
|
export type AccessDeniedProps = WithI18nEnhanceProps & {
|
|
103
89
|
/**
|
|
104
90
|
* href of the home link
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/errors",
|
|
3
3
|
"description": "Semrush Errors Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-prerelease.17",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "16.0.
|
|
18
|
-
"@semcore/format-text": "16.1.1",
|
|
17
|
+
"@semcore/button": "^16.0.13-prerelease.17",
|
|
19
18
|
"@semcore/illustration": "16.0.12",
|
|
20
|
-
"@semcore/typography": "16.3.
|
|
21
|
-
"@semcore/flex-box": "16.0.11"
|
|
19
|
+
"@semcore/typography": "^16.3.3-prerelease.17"
|
|
22
20
|
},
|
|
23
21
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^
|
|
22
|
+
"@semcore/base-components": "^17.0.0-prerelease.17"
|
|
25
23
|
},
|
|
26
24
|
"repository": {
|
|
27
25
|
"type": "git",
|
|
@@ -29,8 +27,9 @@
|
|
|
29
27
|
"directory": "semcore/errors"
|
|
30
28
|
},
|
|
31
29
|
"devDependencies": {
|
|
32
|
-
"@semcore/
|
|
33
|
-
"@semcore/
|
|
30
|
+
"@semcore/core": "17.0.0-prerelease.17",
|
|
31
|
+
"@semcore/base-components": "17.0.0-prerelease.17",
|
|
32
|
+
"@semcore/testing-utils": "1.0.0"
|
|
34
33
|
},
|
|
35
34
|
"scripts": {
|
|
36
35
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|