@semcore/errors 3.3.5 → 3.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/lib/cjs/Error.js +10 -10
- package/lib/cjs/index.d.js +9 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/es6/Error.js +10 -10
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/package.json +8 -6
- package/lib/cjs/index.d.ts +0 -81
- package/lib/es6/index.d.ts +0 -81
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.3.7] - 2022-10-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/button` [4.0.17 ~> 4.0.18], `@semcore/utils` [3.37.1 ~> 3.37.2]).
|
|
10
|
+
|
|
11
|
+
## [3.3.6] - 2022-10-03
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/illustration` [1.1.3 ~> 1.1.4]).
|
|
16
|
+
|
|
5
17
|
## [3.3.5] - 2022-09-27
|
|
6
18
|
|
|
7
19
|
### Changed
|
package/lib/cjs/Error.js
CHANGED
|
@@ -46,19 +46,19 @@ var style = (
|
|
|
46
46
|
/*__reshadow_css_start__*/
|
|
47
47
|
_core.sstyled.insert(
|
|
48
48
|
/*__inner_css_start__*/
|
|
49
|
-
".
|
|
49
|
+
".___SError_8828p_gg_{padding:96px 0;margin:0 auto;max-width:960px}.___SInner_8828p_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}.___SImage_8828p_gg_,.___SImageWrapper_8828p_gg_{width:260px;height:260px}@media (max-width:320px){.___SImage_8828p_gg_,.___SImageWrapper_8828p_gg_{width:200px;height:200px}}.___SImageWrapper_8828p_gg_{margin-right:40px}.___SWrapper_8828p_gg_{flex:1 0 300px;max-width:100%;margin-top:32px}.___STitle_8828p_gg_{font-size:36px;line-height:1.1;color:#191b23;font-weight:700;margin:0 0 16px 0}.___SDescription_8828p_gg_{font-size:16px;line-height:1.5;color:#191b23;margin:0 0 24px 0}.___SControls_8828p_gg_{display:flex;align-items:center}.___SControls_8828p_gg_>:not(:last-child){margin-right:12px}"
|
|
50
50
|
/*__inner_css_end__*/
|
|
51
|
-
, "
|
|
51
|
+
, "8828p_gg_")
|
|
52
52
|
/*__reshadow_css_end__*/
|
|
53
53
|
, {
|
|
54
|
-
"__SError": "
|
|
55
|
-
"__SInner": "
|
|
56
|
-
"__SImage": "
|
|
57
|
-
"__SImageWrapper": "
|
|
58
|
-
"__SWrapper": "
|
|
59
|
-
"__STitle": "
|
|
60
|
-
"__SDescription": "
|
|
61
|
-
"__SControls": "
|
|
54
|
+
"__SError": "___SError_8828p_gg_",
|
|
55
|
+
"__SInner": "___SInner_8828p_gg_",
|
|
56
|
+
"__SImage": "___SImage_8828p_gg_",
|
|
57
|
+
"__SImageWrapper": "___SImageWrapper_8828p_gg_",
|
|
58
|
+
"__SWrapper": "___SWrapper_8828p_gg_",
|
|
59
|
+
"__STitle": "___STitle_8828p_gg_",
|
|
60
|
+
"__SDescription": "___SDescription_8828p_gg_",
|
|
61
|
+
"__SControls": "___SControls_8828p_gg_"
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
var getIconPath = function getIconPath(name) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["Error"],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { Box, IFlexProps } from '@semcore/flex-box';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { TIllustrationNamesErrors } from '@semcore/illustration';\nimport { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\n\nexport type iconNamesErrors = TIllustrationNamesErrors;\n\nexport interface IErrorsProps extends IFlexProps {\n /**\n * Error icon\n */\n icon?: string | React.ReactNode;\n}\n\nexport interface IErrorsContext {\n getTextProps: PropGetterFn;\n getDescriptionProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n}\n\nexport interface IProjectNotFoundProps extends IWithI18nEnhanceProps {\n /**\n * Link to the projects\n * @default /projects\n */\n projectsLink?: string;\n contactsLink?: string;\n supportTeamLink?: string;\n}\n\nexport interface IPageNotFoundProps extends IWithI18nEnhanceProps {\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n}\n\nexport interface IPageErrorProps extends IWithI18nEnhanceProps {\n /**\n * Page reloading button click handler\n * @default () => { if (canUseDOM()) { location.reload(); } }\n */\n onClick?: (e: React.MouseEvent) => void;\n}\n\nexport interface IMaintenanceProps extends IWithI18nEnhanceProps {\n /**\n * Tool name\n */\n toolName: string;\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n}\n\nexport interface IAccessDeniedProps extends IWithI18nEnhanceProps {\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n}\n\ndeclare const Error: (<T>(props: CProps<IErrorsProps & T, IErrorsContext>) => ReturnEl) & {\n Title: typeof Box;\n Description: typeof Box;\n Controls: typeof Box;\n};\ndeclare const ProjectNotFound: <T>(props: IProjectNotFoundProps & IErrorsProps & T) => ReturnEl;\ndeclare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) => ReturnEl;\ndeclare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;\ndeclare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;\ndeclare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;\ndeclare const getIconPath: (name: iconNamesErrors) => string;\n\nexport default Error;\nexport { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };\n"],"mappings":";;;;;;eA+EeA,K"}
|
package/lib/es6/Error.js
CHANGED
|
@@ -28,19 +28,19 @@ var style = (
|
|
|
28
28
|
/*__reshadow_css_start__*/
|
|
29
29
|
_sstyled.insert(
|
|
30
30
|
/*__inner_css_start__*/
|
|
31
|
-
".
|
|
31
|
+
".___SError_8828p_gg_{padding:96px 0;margin:0 auto;max-width:960px}.___SInner_8828p_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}.___SImage_8828p_gg_,.___SImageWrapper_8828p_gg_{width:260px;height:260px}@media (max-width:320px){.___SImage_8828p_gg_,.___SImageWrapper_8828p_gg_{width:200px;height:200px}}.___SImageWrapper_8828p_gg_{margin-right:40px}.___SWrapper_8828p_gg_{flex:1 0 300px;max-width:100%;margin-top:32px}.___STitle_8828p_gg_{font-size:36px;line-height:1.1;color:#191b23;font-weight:700;margin:0 0 16px 0}.___SDescription_8828p_gg_{font-size:16px;line-height:1.5;color:#191b23;margin:0 0 24px 0}.___SControls_8828p_gg_{display:flex;align-items:center}.___SControls_8828p_gg_>:not(:last-child){margin-right:12px}"
|
|
32
32
|
/*__inner_css_end__*/
|
|
33
|
-
, "
|
|
33
|
+
, "8828p_gg_")
|
|
34
34
|
/*__reshadow_css_end__*/
|
|
35
35
|
, {
|
|
36
|
-
"__SError": "
|
|
37
|
-
"__SInner": "
|
|
38
|
-
"__SImage": "
|
|
39
|
-
"__SImageWrapper": "
|
|
40
|
-
"__SWrapper": "
|
|
41
|
-
"__STitle": "
|
|
42
|
-
"__SDescription": "
|
|
43
|
-
"__SControls": "
|
|
36
|
+
"__SError": "___SError_8828p_gg_",
|
|
37
|
+
"__SInner": "___SInner_8828p_gg_",
|
|
38
|
+
"__SImage": "___SImage_8828p_gg_",
|
|
39
|
+
"__SImageWrapper": "___SImageWrapper_8828p_gg_",
|
|
40
|
+
"__SWrapper": "___SWrapper_8828p_gg_",
|
|
41
|
+
"__STitle": "___STitle_8828p_gg_",
|
|
42
|
+
"__SDescription": "___SDescription_8828p_gg_",
|
|
43
|
+
"__SControls": "___SControls_8828p_gg_"
|
|
44
44
|
});
|
|
45
45
|
export var getIconPath = function getIconPath(name) {
|
|
46
46
|
return getIllustrationPath(name);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["Error"],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { Box, IFlexProps } from '@semcore/flex-box';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { TIllustrationNamesErrors } from '@semcore/illustration';\nimport { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\n\nexport type iconNamesErrors = TIllustrationNamesErrors;\n\nexport interface IErrorsProps extends IFlexProps {\n /**\n * Error icon\n */\n icon?: string | React.ReactNode;\n}\n\nexport interface IErrorsContext {\n getTextProps: PropGetterFn;\n getDescriptionProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n}\n\nexport interface IProjectNotFoundProps extends IWithI18nEnhanceProps {\n /**\n * Link to the projects\n * @default /projects\n */\n projectsLink?: string;\n contactsLink?: string;\n supportTeamLink?: string;\n}\n\nexport interface IPageNotFoundProps extends IWithI18nEnhanceProps {\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n}\n\nexport interface IPageErrorProps extends IWithI18nEnhanceProps {\n /**\n * Page reloading button click handler\n * @default () => { if (canUseDOM()) { location.reload(); } }\n */\n onClick?: (e: React.MouseEvent) => void;\n}\n\nexport interface IMaintenanceProps extends IWithI18nEnhanceProps {\n /**\n * Tool name\n */\n toolName: string;\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n}\n\nexport interface IAccessDeniedProps extends IWithI18nEnhanceProps {\n /**\n * href of the home link\n * @default /\n */\n homeLink?: string;\n}\n\ndeclare const Error: (<T>(props: CProps<IErrorsProps & T, IErrorsContext>) => ReturnEl) & {\n Title: typeof Box;\n Description: typeof Box;\n Controls: typeof Box;\n};\ndeclare const ProjectNotFound: <T>(props: IProjectNotFoundProps & IErrorsProps & T) => ReturnEl;\ndeclare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) => ReturnEl;\ndeclare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;\ndeclare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;\ndeclare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;\ndeclare const getIconPath: (name: iconNamesErrors) => string;\n\nexport default Error;\nexport { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };\n"],"mappings":"AA+EA,eAAeA,KAAf"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/errors",
|
|
3
3
|
"description": "Semrush Errors Component",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.7",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@semcore/utils": "^3.27",
|
|
17
16
|
"@semcore/button": "^4",
|
|
18
17
|
"@semcore/flex-box": "^4",
|
|
19
18
|
"@semcore/format-text": "^3.0.0",
|
|
20
|
-
"@semcore/illustration": "1.1.
|
|
21
|
-
"@semcore/typography": "^4"
|
|
19
|
+
"@semcore/illustration": "1.1.5",
|
|
20
|
+
"@semcore/typography": "^4",
|
|
21
|
+
"@semcore/utils": "^3.27"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@semcore/core": "^1.11",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"directory": "semcore/errors"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@
|
|
36
|
+
"@types/react": "16.8 - 17",
|
|
37
|
+
"@semcore/jest-preset-ui": "1.0.0",
|
|
38
|
+
"@types/node": "^17.0.45"
|
|
37
39
|
}
|
|
38
40
|
}
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box, IFlexProps } from '@semcore/flex-box';
|
|
3
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
4
|
-
import { TIllustrationNamesErrors } from '@semcore/illustration';
|
|
5
|
-
import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
6
|
-
|
|
7
|
-
export type iconNamesErrors = TIllustrationNamesErrors;
|
|
8
|
-
|
|
9
|
-
export interface IErrorsProps extends IFlexProps {
|
|
10
|
-
/**
|
|
11
|
-
* Error icon
|
|
12
|
-
*/
|
|
13
|
-
icon?: string | React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface IErrorsContext {
|
|
17
|
-
getTextProps: PropGetterFn;
|
|
18
|
-
getDescriptionProps: PropGetterFn;
|
|
19
|
-
getControlsProps: PropGetterFn;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
|
|
23
|
-
/**
|
|
24
|
-
* Link to the projects
|
|
25
|
-
* @default /projects
|
|
26
|
-
*/
|
|
27
|
-
projectsLink?: string;
|
|
28
|
-
contactsLink?: string;
|
|
29
|
-
supportTeamLink?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface IPageNotFoundProps extends IWithI18nEnhanceProps {
|
|
33
|
-
/**
|
|
34
|
-
* href of the home link
|
|
35
|
-
* @default /
|
|
36
|
-
*/
|
|
37
|
-
homeLink?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface IPageErrorProps extends IWithI18nEnhanceProps {
|
|
41
|
-
/**
|
|
42
|
-
* Page reloading button click handler
|
|
43
|
-
* @default () => { if (canUseDOM()) { location.reload(); } }
|
|
44
|
-
*/
|
|
45
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
49
|
-
/**
|
|
50
|
-
* Tool name
|
|
51
|
-
*/
|
|
52
|
-
toolName: string;
|
|
53
|
-
/**
|
|
54
|
-
* href of the home link
|
|
55
|
-
* @default /
|
|
56
|
-
*/
|
|
57
|
-
homeLink?: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface IAccessDeniedProps extends IWithI18nEnhanceProps {
|
|
61
|
-
/**
|
|
62
|
-
* href of the home link
|
|
63
|
-
* @default /
|
|
64
|
-
*/
|
|
65
|
-
homeLink?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
declare const Error: (<T>(props: CProps<IErrorsProps & T, IErrorsContext>) => ReturnEl) & {
|
|
69
|
-
Title: typeof Box;
|
|
70
|
-
Description: typeof Box;
|
|
71
|
-
Controls: typeof Box;
|
|
72
|
-
};
|
|
73
|
-
declare const ProjectNotFound: <T>(props: IProjectNotFoundProps & IErrorsProps & T) => ReturnEl;
|
|
74
|
-
declare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) => ReturnEl;
|
|
75
|
-
declare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;
|
|
76
|
-
declare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;
|
|
77
|
-
declare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;
|
|
78
|
-
declare const getIconPath: (name: iconNamesErrors) => string;
|
|
79
|
-
|
|
80
|
-
export default Error;
|
|
81
|
-
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box, IFlexProps } from '@semcore/flex-box';
|
|
3
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
4
|
-
import { TIllustrationNamesErrors } from '@semcore/illustration';
|
|
5
|
-
import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
6
|
-
|
|
7
|
-
export type iconNamesErrors = TIllustrationNamesErrors;
|
|
8
|
-
|
|
9
|
-
export interface IErrorsProps extends IFlexProps {
|
|
10
|
-
/**
|
|
11
|
-
* Error icon
|
|
12
|
-
*/
|
|
13
|
-
icon?: string | React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface IErrorsContext {
|
|
17
|
-
getTextProps: PropGetterFn;
|
|
18
|
-
getDescriptionProps: PropGetterFn;
|
|
19
|
-
getControlsProps: PropGetterFn;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
|
|
23
|
-
/**
|
|
24
|
-
* Link to the projects
|
|
25
|
-
* @default /projects
|
|
26
|
-
*/
|
|
27
|
-
projectsLink?: string;
|
|
28
|
-
contactsLink?: string;
|
|
29
|
-
supportTeamLink?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface IPageNotFoundProps extends IWithI18nEnhanceProps {
|
|
33
|
-
/**
|
|
34
|
-
* href of the home link
|
|
35
|
-
* @default /
|
|
36
|
-
*/
|
|
37
|
-
homeLink?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface IPageErrorProps extends IWithI18nEnhanceProps {
|
|
41
|
-
/**
|
|
42
|
-
* Page reloading button click handler
|
|
43
|
-
* @default () => { if (canUseDOM()) { location.reload(); } }
|
|
44
|
-
*/
|
|
45
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface IMaintenanceProps extends IWithI18nEnhanceProps {
|
|
49
|
-
/**
|
|
50
|
-
* Tool name
|
|
51
|
-
*/
|
|
52
|
-
toolName: string;
|
|
53
|
-
/**
|
|
54
|
-
* href of the home link
|
|
55
|
-
* @default /
|
|
56
|
-
*/
|
|
57
|
-
homeLink?: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface IAccessDeniedProps extends IWithI18nEnhanceProps {
|
|
61
|
-
/**
|
|
62
|
-
* href of the home link
|
|
63
|
-
* @default /
|
|
64
|
-
*/
|
|
65
|
-
homeLink?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
declare const Error: (<T>(props: CProps<IErrorsProps & T, IErrorsContext>) => ReturnEl) & {
|
|
69
|
-
Title: typeof Box;
|
|
70
|
-
Description: typeof Box;
|
|
71
|
-
Controls: typeof Box;
|
|
72
|
-
};
|
|
73
|
-
declare const ProjectNotFound: <T>(props: IProjectNotFoundProps & IErrorsProps & T) => ReturnEl;
|
|
74
|
-
declare const PageNotFound: <T>(props: IPageNotFoundProps & IErrorsProps & T) => ReturnEl;
|
|
75
|
-
declare const PageError: <T>(props: IPageErrorProps & IErrorsProps & T) => ReturnEl;
|
|
76
|
-
declare const Maintenance: <T>(props: IMaintenanceProps & IErrorsProps & T) => ReturnEl;
|
|
77
|
-
declare const AccessDenied: <T>(props: IAccessDeniedProps & IErrorsProps & T) => ReturnEl;
|
|
78
|
-
declare const getIconPath: (name: iconNamesErrors) => string;
|
|
79
|
-
|
|
80
|
-
export default Error;
|
|
81
|
-
export { ProjectNotFound, PageNotFound, PageError, Maintenance, AccessDenied, getIconPath };
|