@semcore/errors 16.2.0 → 16.2.1
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 +1 -1
- package/lib/cjs/AccessDenied/{AccessDenied.js → index.js} +1 -1
- package/lib/cjs/AccessDenied/index.js.map +1 -0
- package/lib/cjs/Error.js +15 -16
- package/lib/cjs/Error.js.map +1 -1
- package/lib/cjs/Maintenance/{Maintenance.js → index.js} +1 -1
- package/lib/cjs/Maintenance/index.js.map +1 -0
- package/lib/cjs/PageError/{PageError.js → index.js} +10 -10
- package/lib/cjs/PageError/index.js.map +1 -0
- package/lib/cjs/PageNotFound/{PageNotFound.js → index.js} +2 -2
- package/lib/cjs/PageNotFound/index.js.map +1 -0
- package/lib/cjs/ProjectNotFound/{ProjectNotFound.js → index.js} +5 -6
- package/lib/cjs/ProjectNotFound/index.js.map +1 -0
- package/lib/cjs/index.d.js +15 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/cjs/index.js +8 -76
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/errors.shadow.css +0 -1
- package/lib/es6/AccessDenied/{AccessDenied.js → index.js} +1 -1
- package/lib/es6/AccessDenied/index.js.map +1 -0
- package/lib/es6/Error.js +11 -12
- package/lib/es6/Error.js.map +1 -1
- package/lib/es6/Maintenance/{Maintenance.js → index.js} +1 -1
- package/lib/es6/Maintenance/index.js.map +1 -0
- package/lib/es6/PageError/{PageError.js → index.js} +7 -8
- package/lib/es6/PageError/index.js.map +1 -0
- package/lib/es6/PageNotFound/{PageNotFound.js → index.js} +2 -2
- package/lib/es6/PageNotFound/index.js.map +1 -0
- package/lib/es6/ProjectNotFound/{ProjectNotFound.js → index.js} +5 -6
- package/lib/es6/ProjectNotFound/index.js.map +1 -0
- package/lib/es6/index.d.js +16 -0
- package/lib/es6/index.d.js.map +1 -0
- package/lib/es6/index.js +7 -12
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/errors.shadow.css +0 -1
- package/lib/esm/AccessDenied/{AccessDenied.mjs → index.mjs} +3 -3
- package/lib/esm/Error.mjs +13 -13
- package/lib/esm/Maintenance/{Maintenance.mjs → index.mjs} +3 -3
- package/lib/esm/PageError/{PageError.mjs → index.mjs} +7 -8
- package/lib/esm/PageNotFound/{PageNotFound.mjs → index.mjs} +4 -4
- package/lib/esm/ProjectNotFound/{ProjectNotFound.mjs → index.mjs} +7 -8
- package/lib/esm/index.mjs +5 -11
- package/lib/esm/style/errors.shadow.css +0 -1
- package/lib/types/index.d.ts +128 -12
- package/package.json +8 -8
- package/lib/cjs/AccessDenied/AccessDenied.js.map +0 -1
- package/lib/cjs/AccessDenied/AccessDenied.type.js +0 -2
- package/lib/cjs/AccessDenied/AccessDenied.type.js.map +0 -1
- package/lib/cjs/Error.type.js +0 -2
- package/lib/cjs/Error.type.js.map +0 -1
- package/lib/cjs/Maintenance/Maintenance.js.map +0 -1
- package/lib/cjs/Maintenance/Maintenance.type.js +0 -2
- package/lib/cjs/Maintenance/Maintenance.type.js.map +0 -1
- package/lib/cjs/PageError/PageError.js.map +0 -1
- package/lib/cjs/PageError/PageError.type.js +0 -2
- package/lib/cjs/PageError/PageError.type.js.map +0 -1
- package/lib/cjs/PageNotFound/PageNotFound.js.map +0 -1
- package/lib/cjs/PageNotFound/PageNotFound.type.js +0 -2
- package/lib/cjs/PageNotFound/PageNotFound.type.js.map +0 -1
- package/lib/cjs/ProjectNotFound/ProjectNotFound.js.map +0 -1
- package/lib/cjs/ProjectNotFound/ProjectNotFound.type.js +0 -2
- package/lib/cjs/ProjectNotFound/ProjectNotFound.type.js.map +0 -1
- package/lib/es6/AccessDenied/AccessDenied.js.map +0 -1
- package/lib/es6/AccessDenied/AccessDenied.type.js +0 -2
- package/lib/es6/AccessDenied/AccessDenied.type.js.map +0 -1
- package/lib/es6/Error.type.js +0 -2
- package/lib/es6/Error.type.js.map +0 -1
- package/lib/es6/Maintenance/Maintenance.js.map +0 -1
- package/lib/es6/Maintenance/Maintenance.type.js +0 -2
- package/lib/es6/Maintenance/Maintenance.type.js.map +0 -1
- package/lib/es6/PageError/PageError.js.map +0 -1
- package/lib/es6/PageError/PageError.type.js +0 -2
- package/lib/es6/PageError/PageError.type.js.map +0 -1
- package/lib/es6/PageNotFound/PageNotFound.js.map +0 -1
- package/lib/es6/PageNotFound/PageNotFound.type.js +0 -2
- package/lib/es6/PageNotFound/PageNotFound.type.js.map +0 -1
- package/lib/es6/ProjectNotFound/ProjectNotFound.js.map +0 -1
- package/lib/es6/ProjectNotFound/ProjectNotFound.type.js +0 -2
- package/lib/es6/ProjectNotFound/ProjectNotFound.type.js.map +0 -1
- package/lib/esm/AccessDenied/AccessDenied.type.mjs +0 -1
- package/lib/esm/Error.type.mjs +0 -1
- package/lib/esm/Maintenance/Maintenance.type.mjs +0 -1
- package/lib/esm/PageError/PageError.type.mjs +0 -1
- package/lib/esm/PageNotFound/PageNotFound.type.mjs +0 -1
- package/lib/esm/ProjectNotFound/ProjectNotFound.type.mjs +0 -1
- package/lib/types/AccessDenied/AccessDenied.d.ts +0 -3
- package/lib/types/AccessDenied/AccessDenied.type.d.ts +0 -21
- package/lib/types/AccessDenied/translations/__intergalactic-dynamic-locales.d.ts +0 -77
- package/lib/types/Error.d.ts +0 -4
- package/lib/types/Error.type.d.ts +0 -40
- package/lib/types/Maintenance/Maintenance.d.ts +0 -3
- package/lib/types/Maintenance/Maintenance.type.d.ts +0 -25
- package/lib/types/Maintenance/translations/__intergalactic-dynamic-locales.d.ts +0 -77
- package/lib/types/PageError/PageError.d.ts +0 -3
- package/lib/types/PageError/PageError.type.d.ts +0 -21
- package/lib/types/PageError/translations/__intergalactic-dynamic-locales.d.ts +0 -77
- package/lib/types/PageNotFound/PageNotFound.d.ts +0 -3
- package/lib/types/PageNotFound/PageNotFound.type.d.ts +0 -21
- package/lib/types/PageNotFound/translations/__intergalactic-dynamic-locales.d.ts +0 -77
- package/lib/types/ProjectNotFound/ProjectNotFound.d.ts +0 -3
- package/lib/types/ProjectNotFound/ProjectNotFound.type.d.ts +0 -31
- package/lib/types/ProjectNotFound/translations/__intergalactic-dynamic-locales.d.ts +0 -92
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Button","createComponent","Component","Root","i18nEnhance","React","Error","getIconPath","localizedMessages","RootMaintenance","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","getI18nText","homeLink","toolName","titleTag","createElement","_assignProps","Title","tag","concat","Description","Controls","type","size","use","theme","href","_defineProperty","i18n","locale","icon"],"sources":["../../../src/Maintenance/index.jsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport React from 'react';\n\nimport Error, { getIconPath } from '../Error';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass RootMaintenance extends Component {\n static displayName = 'Maintenance';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n homeLink: '/',\n icon: getIconPath('maintenance'),\n titleTag: 'h2',\n };\n\n render() {\n const { Children, getI18nText, homeLink, toolName, titleTag } = this.asProps;\n\n return (\n <Root render={Error}>\n <Error.Title tag={titleTag}>{`${toolName} ${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(RootMaintenance);\n"],"mappings":";;;;;;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAChE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,KAAK,IAAIC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EAAEd;MAAS,GAC5ED,WAAW,CAAC,SAAS,CAChB,CACM,CACZ,CAAC;IAEX;EAAC;AAAA,EA1B2BrB,SAAS;AAAAqC,eAAA,CAAjC9B,eAAe,iBACE,aAAa;AAAA8B,eAAA,CAD9B9B,eAAe,aAEF,CAACL,WAAW,CAACI,iBAAiB,CAAC,CAAC;AAAA+B,eAAA,CAF7C9B,eAAe,kBAGG;EACpB+B,IAAI,EAAEhC,iBAAiB;EACvBiC,MAAM,EAAE,IAAI;EACZjB,QAAQ,EAAE,GAAG;EACbkB,IAAI,EAAEnC,WAAW,CAAC,aAAa,CAAC;EAChCmB,QAAQ,EAAE;AACZ,CAAC;AAoBH,eAAezB,eAAe,CAACQ,eAAe,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _callSuper from "@babel/runtime/helpers/callSuper";
|
|
4
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
|
-
|
|
7
|
+
var _excluded = ["Children", "getI18nText", "onClick", "titleTag"];
|
|
7
8
|
import Button from '@semcore/button';
|
|
8
|
-
import { createComponent, Component
|
|
9
|
+
import { createComponent, Component } from '@semcore/core';
|
|
9
10
|
import { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';
|
|
10
11
|
import canUseDOM from '@semcore/core/lib/utils/canUseDOM';
|
|
11
12
|
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
@@ -31,15 +32,13 @@ var RootPageError = /*#__PURE__*/function (_Component) {
|
|
|
31
32
|
return _createClass(RootPageError, [{
|
|
32
33
|
key: "render",
|
|
33
34
|
value: function render() {
|
|
34
|
-
var _ref = this.asProps;
|
|
35
35
|
var _this$asProps = this.asProps,
|
|
36
36
|
Children = _this$asProps.Children,
|
|
37
37
|
getI18nText = _this$asProps.getI18nText,
|
|
38
38
|
onClick = _this$asProps.onClick,
|
|
39
|
-
titleTag = _this$asProps.titleTag
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, _ref), /*#__PURE__*/React.createElement(Error.Title, {
|
|
39
|
+
titleTag = _this$asProps.titleTag,
|
|
40
|
+
other = _objectWithoutProperties(_this$asProps, _excluded);
|
|
41
|
+
return /*#__PURE__*/React.createElement(Error, other, /*#__PURE__*/React.createElement(Error.Title, {
|
|
43
42
|
tag: titleTag
|
|
44
43
|
}, 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, {
|
|
45
44
|
onClick: callAllEventHandlers(onClick, this.handleReload),
|
|
@@ -59,4 +58,4 @@ _defineProperty(RootPageError, "defaultProps", {
|
|
|
59
58
|
titleTag: 'h2'
|
|
60
59
|
});
|
|
61
60
|
export default createComponent(RootPageError);
|
|
62
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Button","createComponent","Component","callAllEventHandlers","canUseDOM","i18nEnhance","React","Error","getIconPath","localizedMessages","RootPageError","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","location","reload","_inherits","_createClass","key","value","render","_this$asProps","asProps","Children","getI18nText","onClick","titleTag","other","_objectWithoutProperties","_excluded","createElement","Title","tag","Description","Controls","handleReload","size","use","theme","i18n","locale","icon"],"sources":["../../../src/PageError/index.jsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { createComponent, Component } from '@semcore/core';\nimport { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport canUseDOM from '@semcore/core/lib/utils/canUseDOM';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport React from 'react';\n\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 titleTag: 'h2',\n };\n\n handleReload = () => {\n if (canUseDOM()) {\n location.reload();\n }\n };\n\n render() {\n const { Children, getI18nText, onClick, titleTag, ...other } = this.asProps;\n\n return (\n <Error {...other}>\n <Error.Title tag={titleTag}>{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>\n </Error.Controls>\n </Error>\n );\n }\n}\n\nexport default createComponent(RootPageError);\n"],"mappings":";;;;;;;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,QAAQ,eAAe;AAC1D,SAASC,oBAAoB,QAAQ,qCAAqC;AAC1E,OAAOC,SAAS,MAAM,mCAAmC;AACzD,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,KAAK,IAAIC,WAAW,QAAQ,UAAU;AAC7C,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC,IAE7EC,aAAa,0BAAAC,UAAA;EAAA,SAAAD,cAAA;IAAA,IAAAE,KAAA;IAAAC,eAAA,OAAAH,aAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;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M,CACX,CAAC;IAEZ;EAAC;AAAA,EApCyB/B,SAAS;AAAAoB,eAAA,CAA/BZ,aAAa,iBACI,WAAW;AAAAY,eAAA,CAD5BZ,aAAa,aAEA,CAACL,WAAW,CAACI,iBAAiB,CAAC,CAAC;AAAAa,eAAA,CAF7CZ,aAAa,kBAGK;EACpBsC,IAAI,EAAEvC,iBAAiB;EACvBwC,MAAM,EAAE,IAAI;EACZC,IAAI,EAAE1C,WAAW,CAAC,YAAY,CAAC;EAC/B2B,QAAQ,EAAE;AACZ,CAAC;AA+BH,eAAelC,eAAe,CAACS,aAAa,CAAC","ignoreList":[]}
|
|
@@ -38,7 +38,7 @@ var RootPageNotFound = /*#__PURE__*/function (_Component) {
|
|
|
38
38
|
}
|
|
39
39
|
}]);
|
|
40
40
|
}(Component);
|
|
41
|
-
_defineProperty(RootPageNotFound, "displayName", '
|
|
41
|
+
_defineProperty(RootPageNotFound, "displayName", 'Maintenance');
|
|
42
42
|
_defineProperty(RootPageNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
43
43
|
_defineProperty(RootPageNotFound, "defaultProps", {
|
|
44
44
|
i18n: localizedMessages,
|
|
@@ -48,4 +48,4 @@ _defineProperty(RootPageNotFound, "defaultProps", {
|
|
|
48
48
|
titleTag: 'h2'
|
|
49
49
|
});
|
|
50
50
|
export default createComponent(RootPageNotFound);
|
|
51
|
-
//# sourceMappingURL=
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Button","createComponent","Component","Root","i18nEnhance","React","Error","getIconPath","localizedMessages","RootPageNotFound","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","getI18nText","homeLink","titleTag","createElement","_assignProps","Title","tag","Description","Controls","type","size","use","theme","href","_defineProperty","i18n","locale","icon"],"sources":["../../../src/PageNotFound/index.jsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport React from 'react';\n\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 titleTag: 'h2',\n };\n\n render() {\n const { Children, getI18nText, homeLink, titleTag } = this.asProps;\n\n return (\n <Root render={Error}>\n <Error.Title tag={titleTag}>{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,MAAM,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAChE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,KAAK,IAAIC,WAAW,QAAQ,UAAU;AAC7C,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC,IAE7EC,gBAAgB,0BAAAC,UAAA;EAAA,SAAAD,iBAAA;IAAAE,eAAA,OAAAF,gBAAA;IAAA,OAAAG,UAAA,OAAAH,gBAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,gBAAA,EAAAC,UAAA;EAAA,OAAAK,YAAA,CAAAN,gBAAA;IAAAO,GAAA;IAAAC,KAAA,EAWpB,SAAAC,MAAMA,CAAA,EAAG;MAAA,IAAAC,IAAA,QAAAC,OAAA;MACP,IAAAC,aAAA,GAAsD,IAAI,CAACD,OAAO;QAA1DE,QAAQ,GAAAD,aAAA,CAARC,QAAQ;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|
|
|
7
7
|
import Button from '@semcore/button';
|
|
8
8
|
import { createComponent, Component, Root } from '@semcore/core';
|
|
9
9
|
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
10
|
-
import
|
|
10
|
+
import FormatText from '@semcore/format-text';
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import Error, { getIconPath } from '../Error';
|
|
13
13
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
@@ -47,9 +47,8 @@ var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
return /*#__PURE__*/React.createElement(Error, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Error.Title, {
|
|
48
48
|
tag: titleTag
|
|
49
49
|
}, getI18nText('title')), /*#__PURE__*/React.createElement(Error.Description, {
|
|
50
|
-
tag:
|
|
51
|
-
|
|
52
|
-
size: 300
|
|
50
|
+
tag: FormatText,
|
|
51
|
+
size: "l"
|
|
53
52
|
}, text), /*#__PURE__*/React.createElement(Children, null), /*#__PURE__*/React.createElement(Error.Controls, null, /*#__PURE__*/React.createElement(Button, {
|
|
54
53
|
tag: "a",
|
|
55
54
|
type: "none",
|
|
@@ -66,7 +65,7 @@ var RootProjectNotFound = /*#__PURE__*/function (_Component) {
|
|
|
66
65
|
}
|
|
67
66
|
}]);
|
|
68
67
|
}(Component);
|
|
69
|
-
_defineProperty(RootProjectNotFound, "displayName", '
|
|
68
|
+
_defineProperty(RootProjectNotFound, "displayName", 'Maintenance');
|
|
70
69
|
_defineProperty(RootProjectNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
71
70
|
_defineProperty(RootProjectNotFound, "defaultProps", {
|
|
72
71
|
i18n: localizedMessages,
|
|
@@ -78,4 +77,4 @@ _defineProperty(RootProjectNotFound, "defaultProps", {
|
|
|
78
77
|
titleTag: 'h2'
|
|
79
78
|
});
|
|
80
79
|
export default createComponent(RootProjectNotFound);
|
|
81
|
-
//# sourceMappingURL=
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Button","createComponent","Component","Root","i18nEnhance","FormatText","React","Error","getIconPath","localizedMessages","RootProjectNotFound","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","getI18nText","projectsLink","contactsLink","supportTeamLink","titleTag","text","p","chunk","createElement","ul","li","supportLink","href","_assignProps","Title","tag","Description","size","Controls","type","use","theme","_defineProperty","i18n","locale","icon"],"sources":["../../../src/ProjectNotFound/index.jsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport FormatText from '@semcore/format-text';\nimport React from 'react';\n\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: '/company/contacts',\n titleTag: 'h2',\n };\n\n render() {\n const { Children, getI18nText, projectsLink, contactsLink, supportTeamLink, titleTag } = this.asProps;\n const text = getI18nText('text', {\n p: (chunk) => <p>{chunk}</p>,\n ul: (chunk) => <ul>{chunk}</ul>,\n li: (chunk) => <li>{chunk}</li>,\n supportLink: (chunk) => <a href={supportTeamLink}>{chunk}</a>,\n });\n return (\n <Root render={Error}>\n <Error.Title tag={titleTag}>{getI18nText('title')}</Error.Title>\n <Error.Description tag={FormatText} size='l'>\n {text}\n </Error.Description>\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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qC,eAAA,CAF7CpC,mBAAmB,kBAGD;EACpBqC,IAAI,EAAEtC,iBAAiB;EACvBuC,MAAM,EAAE,IAAI;EACZC,IAAI,EAAEzC,WAAW,CAAC,mBAAmB,CAAC;EACtCiB,YAAY,EAAE,WAAW;EACzBC,YAAY,EAAE,mBAAmB;EACjCC,eAAe,EAAE,mBAAmB;EACpCC,QAAQ,EAAE;AACZ,CAAC;AA8BH,eAAe3B,eAAe,CAACS,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["Error"],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport type { Box, FlexProps } from '@semcore/flex-box';\nimport type { TIllustrationNamesErrors } from '@semcore/illustration';\nimport type React from 'react';\n\nexport type iconNamesErrors = TIllustrationNamesErrors;\n\n/** @deprecated */\nexport interface IErrorsProps extends ErrorsProps, UnknownProperties {}\nexport type ErrorsProps = FlexProps & {\n /**\n * Error icon\n */\n icon?: string | React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IErrorsContext extends ErrorsContext, UnknownProperties {}\nexport type ErrorsContext = {\n getTextProps: PropGetterFn;\n getDescriptionProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IProjectNotFoundProps extends ProjectNotFoundProps, UnknownProperties {}\nexport type ProjectNotFoundProps = WithI18nEnhanceProps & {\n /**\n * URL for the \"Go to Projects\" button\n * @default /projects\n */\n projectsLink?: string;\n /**\n * URL for the \"Contact us\" button\n * @default /company/contacts\n */\n contactsLink?: string;\n /**\n * URL for the \"Support Team\" link\n * @default /company/contacts\n */\n supportTeamLink?: string;\n /**\n * HTML tag of the error title\n * @default h2\n */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';\n};\n\n/** @deprecated */\nexport interface IPageNotFoundProps extends PageNotFoundProps, UnknownProperties {}\nexport type PageNotFoundProps = WithI18nEnhanceProps & {\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n /**\n * HTML tag of the error title\n * @default h2\n */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';\n};\n\n/** @deprecated */\nexport interface IPageErrorProps extends PageErrorProps, UnknownProperties {}\nexport type PageErrorProps = WithI18nEnhanceProps & {\n /**\n * Page reloading button click handler\n * @default () => { if (canUseDOM()) { location.reload(); } }\n */\n onClick?: (e: React.MouseEvent) => void;\n /**\n * HTML tag of the error title\n * @default h2\n */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';\n};\n\n/** @deprecated */\nexport interface IMaintenanceProps extends MaintenanceProps, UnknownProperties {}\nexport type MaintenanceProps = WithI18nEnhanceProps & {\n /**\n * Tool name\n */\n toolName: string;\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n /**\n * HTML tag of the error title\n * @default h2\n */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';\n};\n\n/** @deprecated */\nexport interface IAccessDeniedProps extends AccessDeniedProps, UnknownProperties {}\nexport type AccessDeniedProps = WithI18nEnhanceProps & {\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n /**\n * HTML tag of the error title\n * @default h2\n */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';\n};\n\ndeclare const Error: Intergalactic.Component<'div', ErrorsProps, ErrorsContext> & {\n Title: typeof Box;\n Description: typeof Box;\n Controls: typeof Box;\n};\ndeclare const ProjectNotFound: Intergalactic.Component<'div', ProjectNotFoundProps & ErrorsProps>;\ndeclare const PageNotFound: Intergalactic.Component<'div', PageNotFoundProps & ErrorsProps>;\ndeclare const PageError: Intergalactic.Component<'div', PageErrorProps & ErrorsProps>;\ndeclare const Maintenance: Intergalactic.Component<'div', MaintenanceProps & ErrorsProps>;\ndeclare const AccessDenied: Intergalactic.Component<'div', AccessDeniedProps & ErrorsProps>;\ndeclare const getIconPath: (name: iconNamesErrors) => string;\n\nexport default Error;\nexport { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };\n"],"mappings":"AAQA;;AASA;;AAQA;;AAyBA;;AAeA;;AAeA;;AAmBA;;AA2BA,eAAeA,KAAK","ignoreList":[]}
|
package/lib/es6/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
export { default
|
|
2
|
-
export * from './Error
|
|
3
|
-
export { default as AccessDenied } from './AccessDenied
|
|
4
|
-
export
|
|
5
|
-
export { default as
|
|
6
|
-
export
|
|
7
|
-
export { default as
|
|
8
|
-
export * from './PageError/PageError.type';
|
|
9
|
-
export { default as PageNotFound } from './PageNotFound/PageNotFound';
|
|
10
|
-
export * from './PageNotFound/PageNotFound.type';
|
|
11
|
-
export { default as ProjectNotFound } from './ProjectNotFound/ProjectNotFound';
|
|
12
|
-
export * from './ProjectNotFound/ProjectNotFound.type';
|
|
1
|
+
export { default } from './Error';
|
|
2
|
+
export * from './Error';
|
|
3
|
+
export { default as AccessDenied } from './AccessDenied';
|
|
4
|
+
export { default as Maintenance } from './Maintenance';
|
|
5
|
+
export { default as PageError } from './PageError';
|
|
6
|
+
export { default as PageNotFound } from './PageNotFound';
|
|
7
|
+
export { default as ProjectNotFound } from './ProjectNotFound';
|
|
13
8
|
//# sourceMappingURL=index.js.map
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","AccessDenied","Maintenance","PageError","PageNotFound","ProjectNotFound"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './Error';\nexport * from './Error';\nexport { default as AccessDenied } from './AccessDenied';\nexport { default as Maintenance } from './Maintenance';\nexport { default as PageError } from './PageError';\nexport { default as PageNotFound } from './PageNotFound';\nexport { default as ProjectNotFound } from './ProjectNotFound';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,SAAS;AACjC,cAAc,SAAS;AACvB,SAASA,OAAO,IAAIC,YAAY,QAAQ,gBAAgB;AACxD,SAASD,OAAO,IAAIE,WAAW,QAAQ,eAAe;AACtD,SAASF,OAAO,IAAIG,SAAS,QAAQ,aAAa;AAClD,SAASH,OAAO,IAAII,YAAY,QAAQ,gBAAgB;AACxD,SAASJ,OAAO,IAAIK,eAAe,QAAQ,mBAAmB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { assignProps, Component
|
|
6
|
+
import { createComponent, assignProps, Component } from "@semcore/core";
|
|
7
7
|
import Button from "@semcore/button";
|
|
8
8
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
9
|
import React from "react";
|
|
@@ -44,7 +44,7 @@ _defineProperty(RootAccessDenied, "defaultProps", {
|
|
|
44
44
|
icon: getIconPath("access_denied"),
|
|
45
45
|
titleTag: "h2"
|
|
46
46
|
});
|
|
47
|
-
const
|
|
47
|
+
const index = createComponent(RootAccessDenied);
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
index as default
|
|
50
50
|
};
|
package/lib/esm/Error.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
4
4
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { sstyled, assignProps, Component
|
|
8
|
-
import { Flex, Box } from "@semcore/
|
|
7
|
+
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
8
|
+
import { Flex, Box } from "@semcore/flex-box";
|
|
9
9
|
import { getIllustrationPath } from "@semcore/illustration";
|
|
10
10
|
import React from "react";
|
|
11
11
|
/*!__reshadow-styles__:"./style/errors.shadow.css"*/
|
|
@@ -13,19 +13,19 @@ var style = (
|
|
|
13
13
|
/*__reshadow_css_start__*/
|
|
14
14
|
(sstyled.insert(
|
|
15
15
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
16
|
+
".___SError_14xf4_gg_{padding:var(--intergalactic-spacing-20x, 80px) var(--intergalactic-spacing-6x, 24px);margin:0 auto;max-width:960px}@media (max-width:647px){.___SError_14xf4_gg_{padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-20x, 80px)}}.___SError_14xf4_gg_ .___SControls_14xf4_gg_{display:flex;flex-wrap:wrap;gap:var(--intergalactic-spacing-3x, 12px);align-items:center}.___SError_14xf4_gg_ .___SInner_14xf4_gg_{width:100%;display:flex;justify-content:flex-start;align-items:flex-start;box-sizing:border-box}@media (max-width:647px){.___SError_14xf4_gg_ .___SInner_14xf4_gg_{flex-direction:column}}.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SImageWrapper_14xf4_gg_,.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SImage_14xf4_gg_{width:260px;height:260px}@media (max-width:647px){.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SImageWrapper_14xf4_gg_,.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SImage_14xf4_gg_{width:200px;height:200px}}.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SImageWrapper_14xf4_gg_{flex-shrink:0;margin-right:var(--intergalactic-spacing-10x, 40px)}.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SWrapper_14xf4_gg_{max-width:100%;margin-top:var(--intergalactic-spacing-8x, 32px)}.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___STitle_14xf4_gg_[data-errors-title]{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%);color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899));font-weight:var(--intergalactic-semi-bold, 600);margin:0 0 var(--intergalactic-spacing-4x, 16px)0}.___SError_14xf4_gg_ .___SInner_14xf4_gg_ .___SDescription_14xf4_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899));margin:0 0 var(--intergalactic-spacing-6x, 24px)0}",
|
|
17
17
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
18
|
+
"14xf4_gg_"
|
|
19
19
|
), /*__reshadow_css_end__*/
|
|
20
20
|
{
|
|
21
|
-
"__SError": "
|
|
22
|
-
"__SControls": "
|
|
23
|
-
"__SInner": "
|
|
24
|
-
"__SImageWrapper": "
|
|
25
|
-
"__SImage": "
|
|
26
|
-
"__SWrapper": "
|
|
27
|
-
"__STitle": "
|
|
28
|
-
"__SDescription": "
|
|
21
|
+
"__SError": "___SError_14xf4_gg_",
|
|
22
|
+
"__SControls": "___SControls_14xf4_gg_",
|
|
23
|
+
"__SInner": "___SInner_14xf4_gg_",
|
|
24
|
+
"__SImageWrapper": "___SImageWrapper_14xf4_gg_",
|
|
25
|
+
"__SImage": "___SImage_14xf4_gg_",
|
|
26
|
+
"__SWrapper": "___SWrapper_14xf4_gg_",
|
|
27
|
+
"__STitle": "___STitle_14xf4_gg_",
|
|
28
|
+
"__SDescription": "___SDescription_14xf4_gg_"
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
var getIconPath = function getIconPath2(name) {
|
|
@@ -76,7 +76,7 @@ function Controls(props) {
|
|
|
76
76
|
var SControls = Box;
|
|
77
77
|
return _ref8 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SControls, _ref8.cn("SControls", _objectSpread({}, assignProps({}, _ref4))));
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
const Error = createComponent(RootError, {
|
|
80
80
|
Title,
|
|
81
81
|
Description,
|
|
82
82
|
Controls
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { assignProps, Component
|
|
6
|
+
import { createComponent, assignProps, Component } from "@semcore/core";
|
|
7
7
|
import Button from "@semcore/button";
|
|
8
8
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
9
|
import React from "react";
|
|
@@ -42,7 +42,7 @@ _defineProperty(RootMaintenance, "defaultProps", {
|
|
|
42
42
|
icon: getIconPath("maintenance"),
|
|
43
43
|
titleTag: "h2"
|
|
44
44
|
});
|
|
45
|
-
const
|
|
45
|
+
const index = createComponent(RootMaintenance);
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
index as default
|
|
48
48
|
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
4
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { assignProps, Component, createComponent } from "@semcore/core";
|
|
7
7
|
import Button from "@semcore/button";
|
|
8
|
+
import { createComponent, Component } from "@semcore/core";
|
|
8
9
|
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
9
10
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
10
11
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
11
12
|
import React from "react";
|
|
12
13
|
import Error, { getIconPath } from "../Error.mjs";
|
|
13
14
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
15
|
+
var _excluded = ["Children", "getI18nText", "onClick", "titleTag"];
|
|
14
16
|
var RootPageError = /* @__PURE__ */ (function(_Component) {
|
|
15
17
|
function RootPageError2() {
|
|
16
18
|
var _this;
|
|
@@ -30,11 +32,8 @@ var RootPageError = /* @__PURE__ */ (function(_Component) {
|
|
|
30
32
|
return _createClass(RootPageError2, [{
|
|
31
33
|
key: "render",
|
|
32
34
|
value: function render() {
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
return /* @__PURE__ */ React.createElement(Error, assignProps({
|
|
36
|
-
"__excludeProps": ["Children", "getI18nText", "onClick", "titleTag"]
|
|
37
|
-
}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
35
|
+
var _this$asProps = this.asProps, Children = _this$asProps.Children, getI18nText = _this$asProps.getI18nText, onClick = _this$asProps.onClick, titleTag = _this$asProps.titleTag, other = _objectWithoutProperties(_this$asProps, _excluded);
|
|
36
|
+
return /* @__PURE__ */ React.createElement(Error, other, /* @__PURE__ */ React.createElement(Error.Title, {
|
|
38
37
|
tag: titleTag
|
|
39
38
|
}, 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, {
|
|
40
39
|
onClick: callAllEventHandlers(onClick, this.handleReload),
|
|
@@ -53,7 +52,7 @@ _defineProperty(RootPageError, "defaultProps", {
|
|
|
53
52
|
icon: getIconPath("page_error"),
|
|
54
53
|
titleTag: "h2"
|
|
55
54
|
});
|
|
56
|
-
const
|
|
55
|
+
const index = createComponent(RootPageError);
|
|
57
56
|
export {
|
|
58
|
-
|
|
57
|
+
index as default
|
|
59
58
|
};
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { assignProps, Component
|
|
6
|
+
import { createComponent, assignProps, Component } from "@semcore/core";
|
|
7
7
|
import Button from "@semcore/button";
|
|
8
8
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
9
|
import React from "react";
|
|
@@ -33,7 +33,7 @@ var RootPageNotFound = /* @__PURE__ */ (function(_Component) {
|
|
|
33
33
|
}
|
|
34
34
|
}]);
|
|
35
35
|
})(Component);
|
|
36
|
-
_defineProperty(RootPageNotFound, "displayName", "
|
|
36
|
+
_defineProperty(RootPageNotFound, "displayName", "Maintenance");
|
|
37
37
|
_defineProperty(RootPageNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
38
38
|
_defineProperty(RootPageNotFound, "defaultProps", {
|
|
39
39
|
i18n: localizedMessages,
|
|
@@ -42,7 +42,7 @@ _defineProperty(RootPageNotFound, "defaultProps", {
|
|
|
42
42
|
homeLink: "/",
|
|
43
43
|
titleTag: "h2"
|
|
44
44
|
});
|
|
45
|
-
const
|
|
45
|
+
const index = createComponent(RootPageNotFound);
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
index as default
|
|
48
48
|
};
|
|
@@ -3,10 +3,10 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import { assignProps, Component
|
|
6
|
+
import { createComponent, assignProps, Component } from "@semcore/core";
|
|
7
7
|
import Button from "@semcore/button";
|
|
8
8
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
9
|
-
import
|
|
9
|
+
import FormatText from "@semcore/format-text";
|
|
10
10
|
import React from "react";
|
|
11
11
|
import Error, { getIconPath } from "../Error.mjs";
|
|
12
12
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
@@ -40,9 +40,8 @@ var RootProjectNotFound = /* @__PURE__ */ (function(_Component) {
|
|
|
40
40
|
return /* @__PURE__ */ React.createElement(Error, assignProps({}, _ref), /* @__PURE__ */ React.createElement(Error.Title, {
|
|
41
41
|
tag: titleTag
|
|
42
42
|
}, getI18nText("title")), /* @__PURE__ */ React.createElement(Error.Description, {
|
|
43
|
-
tag:
|
|
44
|
-
|
|
45
|
-
size: 300
|
|
43
|
+
tag: FormatText,
|
|
44
|
+
size: "l"
|
|
46
45
|
}, text), /* @__PURE__ */ React.createElement(Children, null), /* @__PURE__ */ React.createElement(Error.Controls, null, /* @__PURE__ */ React.createElement(Button, {
|
|
47
46
|
tag: "a",
|
|
48
47
|
type: "none",
|
|
@@ -59,7 +58,7 @@ var RootProjectNotFound = /* @__PURE__ */ (function(_Component) {
|
|
|
59
58
|
}
|
|
60
59
|
}]);
|
|
61
60
|
})(Component);
|
|
62
|
-
_defineProperty(RootProjectNotFound, "displayName", "
|
|
61
|
+
_defineProperty(RootProjectNotFound, "displayName", "Maintenance");
|
|
63
62
|
_defineProperty(RootProjectNotFound, "enhance", [i18nEnhance(localizedMessages)]);
|
|
64
63
|
_defineProperty(RootProjectNotFound, "defaultProps", {
|
|
65
64
|
i18n: localizedMessages,
|
|
@@ -70,7 +69,7 @@ _defineProperty(RootProjectNotFound, "defaultProps", {
|
|
|
70
69
|
supportTeamLink: "/company/contacts",
|
|
71
70
|
titleTag: "h2"
|
|
72
71
|
});
|
|
73
|
-
const
|
|
72
|
+
const index = createComponent(RootProjectNotFound);
|
|
74
73
|
export {
|
|
75
|
-
|
|
74
|
+
index as default
|
|
76
75
|
};
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { default as default2, getIconPath } from "./Error.mjs";
|
|
2
|
-
import "./
|
|
3
|
-
import { default as
|
|
4
|
-
import "./
|
|
5
|
-
import { default as
|
|
6
|
-
import "./
|
|
7
|
-
import { default as default5 } from "./PageError/PageError.mjs";
|
|
8
|
-
import "./PageError/PageError.type.mjs";
|
|
9
|
-
import { default as default6 } from "./PageNotFound/PageNotFound.mjs";
|
|
10
|
-
import "./PageNotFound/PageNotFound.type.mjs";
|
|
11
|
-
import { default as default7 } from "./ProjectNotFound/ProjectNotFound.mjs";
|
|
12
|
-
import "./ProjectNotFound/ProjectNotFound.type.mjs";
|
|
2
|
+
import { default as default3 } from "./AccessDenied/index.mjs";
|
|
3
|
+
import { default as default4 } from "./Maintenance/index.mjs";
|
|
4
|
+
import { default as default5 } from "./PageError/index.mjs";
|
|
5
|
+
import { default as default6 } from "./PageNotFound/index.mjs";
|
|
6
|
+
import { default as default7 } from "./ProjectNotFound/index.mjs";
|
|
13
7
|
export {
|
|
14
8
|
default3 as AccessDenied,
|
|
15
9
|
default4 as Maintenance,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,12 +1,128 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
1
|
+
import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';
|
|
2
|
+
import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
3
|
+
import type { Box, FlexProps } from '@semcore/flex-box';
|
|
4
|
+
import type { TIllustrationNamesErrors } from '@semcore/illustration';
|
|
5
|
+
import type React from 'react';
|
|
6
|
+
|
|
7
|
+
export type iconNamesErrors = TIllustrationNamesErrors;
|
|
8
|
+
|
|
9
|
+
/** @deprecated */
|
|
10
|
+
export interface IErrorsProps extends ErrorsProps, UnknownProperties {}
|
|
11
|
+
export type ErrorsProps = FlexProps & {
|
|
12
|
+
/**
|
|
13
|
+
* Error icon
|
|
14
|
+
*/
|
|
15
|
+
icon?: string | React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @deprecated */
|
|
19
|
+
export interface IErrorsContext extends ErrorsContext, UnknownProperties {}
|
|
20
|
+
export type ErrorsContext = {
|
|
21
|
+
getTextProps: PropGetterFn;
|
|
22
|
+
getDescriptionProps: PropGetterFn;
|
|
23
|
+
getControlsProps: PropGetterFn;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @deprecated */
|
|
27
|
+
export interface IProjectNotFoundProps extends ProjectNotFoundProps, UnknownProperties {}
|
|
28
|
+
export type ProjectNotFoundProps = WithI18nEnhanceProps & {
|
|
29
|
+
/**
|
|
30
|
+
* URL for the "Go to Projects" button
|
|
31
|
+
* @default /projects
|
|
32
|
+
*/
|
|
33
|
+
projectsLink?: string;
|
|
34
|
+
/**
|
|
35
|
+
* URL for the "Contact us" button
|
|
36
|
+
* @default /company/contacts
|
|
37
|
+
*/
|
|
38
|
+
contactsLink?: string;
|
|
39
|
+
/**
|
|
40
|
+
* URL for the "Support Team" link
|
|
41
|
+
* @default /company/contacts
|
|
42
|
+
*/
|
|
43
|
+
supportTeamLink?: string;
|
|
44
|
+
/**
|
|
45
|
+
* HTML tag of the error title
|
|
46
|
+
* @default h2
|
|
47
|
+
*/
|
|
48
|
+
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @deprecated */
|
|
52
|
+
export interface IPageNotFoundProps extends PageNotFoundProps, UnknownProperties {}
|
|
53
|
+
export type PageNotFoundProps = WithI18nEnhanceProps & {
|
|
54
|
+
/**
|
|
55
|
+
* href of the home link
|
|
56
|
+
* @default /
|
|
57
|
+
*/
|
|
58
|
+
homeLink?: string;
|
|
59
|
+
/**
|
|
60
|
+
* HTML tag of the error title
|
|
61
|
+
* @default h2
|
|
62
|
+
*/
|
|
63
|
+
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @deprecated */
|
|
67
|
+
export interface IPageErrorProps extends PageErrorProps, UnknownProperties {}
|
|
68
|
+
export type PageErrorProps = WithI18nEnhanceProps & {
|
|
69
|
+
/**
|
|
70
|
+
* Page reloading button click handler
|
|
71
|
+
* @default () => { if (canUseDOM()) { location.reload(); } }
|
|
72
|
+
*/
|
|
73
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
74
|
+
/**
|
|
75
|
+
* HTML tag of the error title
|
|
76
|
+
* @default h2
|
|
77
|
+
*/
|
|
78
|
+
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** @deprecated */
|
|
82
|
+
export interface IMaintenanceProps extends MaintenanceProps, UnknownProperties {}
|
|
83
|
+
export type MaintenanceProps = WithI18nEnhanceProps & {
|
|
84
|
+
/**
|
|
85
|
+
* Tool name
|
|
86
|
+
*/
|
|
87
|
+
toolName: string;
|
|
88
|
+
/**
|
|
89
|
+
* href of the home link
|
|
90
|
+
* @default /
|
|
91
|
+
*/
|
|
92
|
+
homeLink?: string;
|
|
93
|
+
/**
|
|
94
|
+
* HTML tag of the error title
|
|
95
|
+
* @default h2
|
|
96
|
+
*/
|
|
97
|
+
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** @deprecated */
|
|
101
|
+
export interface IAccessDeniedProps extends AccessDeniedProps, UnknownProperties {}
|
|
102
|
+
export type AccessDeniedProps = WithI18nEnhanceProps & {
|
|
103
|
+
/**
|
|
104
|
+
* href of the home link
|
|
105
|
+
* @default /
|
|
106
|
+
*/
|
|
107
|
+
homeLink?: string;
|
|
108
|
+
/**
|
|
109
|
+
* HTML tag of the error title
|
|
110
|
+
* @default h2
|
|
111
|
+
*/
|
|
112
|
+
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
declare const Error: Intergalactic.Component<'div', ErrorsProps, ErrorsContext> & {
|
|
116
|
+
Title: typeof Box;
|
|
117
|
+
Description: typeof Box;
|
|
118
|
+
Controls: typeof Box;
|
|
119
|
+
};
|
|
120
|
+
declare const ProjectNotFound: Intergalactic.Component<'div', ProjectNotFoundProps & ErrorsProps>;
|
|
121
|
+
declare const PageNotFound: Intergalactic.Component<'div', PageNotFoundProps & ErrorsProps>;
|
|
122
|
+
declare const PageError: Intergalactic.Component<'div', PageErrorProps & ErrorsProps>;
|
|
123
|
+
declare const Maintenance: Intergalactic.Component<'div', MaintenanceProps & ErrorsProps>;
|
|
124
|
+
declare const AccessDenied: Intergalactic.Component<'div', AccessDeniedProps & ErrorsProps>;
|
|
125
|
+
declare const getIconPath: (name: iconNamesErrors) => string;
|
|
126
|
+
|
|
127
|
+
export default Error;
|
|
128
|
+
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };
|