@semcore/errors 3.11.3 → 4.0.0-beta.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 CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [3.11.3] - 2023-06-30
5
+ ## [4.0.0] - 2023-07-15
6
6
 
7
- ### Changed
7
+ ### Break
8
8
 
9
- - Version patch update due to children dependencies update (`@semcore/button` [4.4.8 ~> 4.4.9], `@semcore/utils` [3.54.0 ~> 3.54.1]).
9
+ - Strict, backward incompatible typings.
10
10
 
11
11
  ## [3.11.2] - 2023-06-27
12
12
 
package/lib/cjs/Error.js CHANGED
@@ -17,15 +17,15 @@ var _react = _interopRequireDefault(require("react"));
17
17
  var _flexBox = require("@semcore/flex-box");
18
18
  var _illustration = require("@semcore/illustration");
19
19
  /*__reshadow-styles__:"./style/errors.shadow.css"*/
20
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SError_467rx_gg_{padding:var(--intergalactic-spacing-20x, 80px)0;margin:0 auto;max-width:960px}@media (max-width:768px){.___SError_467rx_gg_{padding:var(--intergalactic-spacing-20x, 80px) var(--intergalactic-spacing-8x, 32px)}}@media (max-width:320px){.___SError_467rx_gg_{padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-20x, 80px)}}.___SInner_467rx_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}.___SImageWrapper_467rx_gg_,.___SImage_467rx_gg_{width:260px;height:260px}@media (max-width:320px){.___SImageWrapper_467rx_gg_,.___SImage_467rx_gg_{width:200px;height:200px}}.___SImageWrapper_467rx_gg_{margin-right:var(--intergalactic-spacing-10x, 40px)}.___SWrapper_467rx_gg_{flex:1 0 300px;max-width:100%;margin-top:var(--intergalactic-spacing-8x, 32px)}.___STitle_467rx_gg_{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}.___SDescription_467rx_gg_{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}.___SControls_467rx_gg_{display:flex;align-items:center}.___SControls_467rx_gg_>:not(:last-child){margin-right:var(--intergalactic-spacing-3x, 12px)}" /*__inner_css_end__*/, "467rx_gg_") /*__reshadow_css_end__*/, {
21
- "__SError": "___SError_467rx_gg_",
22
- "__SInner": "___SInner_467rx_gg_",
23
- "__SImageWrapper": "___SImageWrapper_467rx_gg_",
24
- "__SImage": "___SImage_467rx_gg_",
25
- "__SWrapper": "___SWrapper_467rx_gg_",
26
- "__STitle": "___STitle_467rx_gg_",
27
- "__SDescription": "___SDescription_467rx_gg_",
28
- "__SControls": "___SControls_467rx_gg_"
20
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SError_1iz1k_gg_{padding:var(--intergalactic-spacing-20x, 80px)0;margin:0 auto;max-width:960px}@media (max-width:768px){.___SError_1iz1k_gg_{padding:var(--intergalactic-spacing-20x, 80px) var(--intergalactic-spacing-8x, 32px)}}@media (max-width:320px){.___SError_1iz1k_gg_{padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-20x, 80px)}}.___SInner_1iz1k_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}.___SImageWrapper_1iz1k_gg_,.___SImage_1iz1k_gg_{width:260px;height:260px}@media (max-width:320px){.___SImageWrapper_1iz1k_gg_,.___SImage_1iz1k_gg_{width:200px;height:200px}}.___SImageWrapper_1iz1k_gg_{margin-right:var(--intergalactic-spacing-10x, 40px)}.___SWrapper_1iz1k_gg_{flex:1 0 300px;max-width:100%;margin-top:var(--intergalactic-spacing-8x, 32px)}.___STitle_1iz1k_gg_{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}.___SDescription_1iz1k_gg_{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}.___SControls_1iz1k_gg_{display:flex;align-items:center}.___SControls_1iz1k_gg_>:not(:last-child){margin-right:var(--intergalactic-spacing-3x, 12px)}" /*__inner_css_end__*/, "1iz1k_gg_") /*__reshadow_css_end__*/, {
21
+ "__SError": "___SError_1iz1k_gg_",
22
+ "__SInner": "___SInner_1iz1k_gg_",
23
+ "__SImageWrapper": "___SImageWrapper_1iz1k_gg_",
24
+ "__SImage": "___SImage_1iz1k_gg_",
25
+ "__SWrapper": "___SWrapper_1iz1k_gg_",
26
+ "__STitle": "___STitle_1iz1k_gg_",
27
+ "__SDescription": "___SDescription_1iz1k_gg_",
28
+ "__SControls": "___SControls_1iz1k_gg_"
29
29
  });
30
30
  var getIconPath = function getIconPath(name) {
31
31
  return (0, _illustration.getIllustrationPath)(name);
@@ -4,6 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
+ /** @deprecated */
8
+ /** @deprecated */
9
+ /** @deprecated */
10
+ /** @deprecated */
11
+ /** @deprecated */
12
+ /** @deprecated */
13
+ /** @deprecated */
7
14
  var _default = Error;
8
15
  exports["default"] = _default;
9
16
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["Error","exports","_default"],"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,KAAK;AAAAC,OAAA,cAAAC,QAAA"}
1
+ {"version":3,"file":"index.d.js","names":["_default","Error","exports"],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { Box, FlexProps } from '@semcore/flex-box';\nimport { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport { TIllustrationNamesErrors } from '@semcore/illustration';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\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 * Link to the projects\n * @default /projects\n */\n projectsLink?: string;\n contactsLink?: string;\n supportTeamLink?: string;\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\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\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\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\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;AAYA;AAUA;AAUA;AAcA;AAAA,IAAAA,QAAA,GAsBeC,KAAK;AAAAC,OAAA,cAAAF,QAAA"}
package/lib/es6/Error.js CHANGED
@@ -14,15 +14,15 @@ import { Box, Flex } from '@semcore/flex-box';
14
14
  import createComponent, { Root, Component, sstyled } from '@semcore/core';
15
15
  import { getIllustrationPath } from '@semcore/illustration';
16
16
  /*__reshadow-styles__:"./style/errors.shadow.css"*/
17
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SError_467rx_gg_{padding:var(--intergalactic-spacing-20x, 80px)0;margin:0 auto;max-width:960px}@media (max-width:768px){.___SError_467rx_gg_{padding:var(--intergalactic-spacing-20x, 80px) var(--intergalactic-spacing-8x, 32px)}}@media (max-width:320px){.___SError_467rx_gg_{padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-20x, 80px)}}.___SInner_467rx_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}.___SImageWrapper_467rx_gg_,.___SImage_467rx_gg_{width:260px;height:260px}@media (max-width:320px){.___SImageWrapper_467rx_gg_,.___SImage_467rx_gg_{width:200px;height:200px}}.___SImageWrapper_467rx_gg_{margin-right:var(--intergalactic-spacing-10x, 40px)}.___SWrapper_467rx_gg_{flex:1 0 300px;max-width:100%;margin-top:var(--intergalactic-spacing-8x, 32px)}.___STitle_467rx_gg_{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}.___SDescription_467rx_gg_{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}.___SControls_467rx_gg_{display:flex;align-items:center}.___SControls_467rx_gg_>:not(:last-child){margin-right:var(--intergalactic-spacing-3x, 12px)}" /*__inner_css_end__*/, "467rx_gg_") /*__reshadow_css_end__*/, {
18
- "__SError": "___SError_467rx_gg_",
19
- "__SInner": "___SInner_467rx_gg_",
20
- "__SImageWrapper": "___SImageWrapper_467rx_gg_",
21
- "__SImage": "___SImage_467rx_gg_",
22
- "__SWrapper": "___SWrapper_467rx_gg_",
23
- "__STitle": "___STitle_467rx_gg_",
24
- "__SDescription": "___SDescription_467rx_gg_",
25
- "__SControls": "___SControls_467rx_gg_"
17
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SError_1iz1k_gg_{padding:var(--intergalactic-spacing-20x, 80px)0;margin:0 auto;max-width:960px}@media (max-width:768px){.___SError_1iz1k_gg_{padding:var(--intergalactic-spacing-20x, 80px) var(--intergalactic-spacing-8x, 32px)}}@media (max-width:320px){.___SError_1iz1k_gg_{padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-20x, 80px)}}.___SInner_1iz1k_gg_{width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}.___SImageWrapper_1iz1k_gg_,.___SImage_1iz1k_gg_{width:260px;height:260px}@media (max-width:320px){.___SImageWrapper_1iz1k_gg_,.___SImage_1iz1k_gg_{width:200px;height:200px}}.___SImageWrapper_1iz1k_gg_{margin-right:var(--intergalactic-spacing-10x, 40px)}.___SWrapper_1iz1k_gg_{flex:1 0 300px;max-width:100%;margin-top:var(--intergalactic-spacing-8x, 32px)}.___STitle_1iz1k_gg_{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}.___SDescription_1iz1k_gg_{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}.___SControls_1iz1k_gg_{display:flex;align-items:center}.___SControls_1iz1k_gg_>:not(:last-child){margin-right:var(--intergalactic-spacing-3x, 12px)}" /*__inner_css_end__*/, "1iz1k_gg_") /*__reshadow_css_end__*/, {
18
+ "__SError": "___SError_1iz1k_gg_",
19
+ "__SInner": "___SInner_1iz1k_gg_",
20
+ "__SImageWrapper": "___SImageWrapper_1iz1k_gg_",
21
+ "__SImage": "___SImage_1iz1k_gg_",
22
+ "__SWrapper": "___SWrapper_1iz1k_gg_",
23
+ "__STitle": "___STitle_1iz1k_gg_",
24
+ "__SDescription": "___SDescription_1iz1k_gg_",
25
+ "__SControls": "___SControls_1iz1k_gg_"
26
26
  });
27
27
  export var getIconPath = function getIconPath(name) {
28
28
  return getIllustrationPath(name);
@@ -1,2 +1,16 @@
1
+ /** @deprecated */
2
+
3
+ /** @deprecated */
4
+
5
+ /** @deprecated */
6
+
7
+ /** @deprecated */
8
+
9
+ /** @deprecated */
10
+
11
+ /** @deprecated */
12
+
13
+ /** @deprecated */
14
+
1
15
  export default Error;
2
16
  //# sourceMappingURL=index.d.js.map
@@ -1 +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,KAAK"}
1
+ {"version":3,"file":"index.d.js","names":["Error"],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { Box, FlexProps } from '@semcore/flex-box';\nimport { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport { TIllustrationNamesErrors } from '@semcore/illustration';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\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 * Link to the projects\n * @default /projects\n */\n projectsLink?: string;\n contactsLink?: string;\n supportTeamLink?: string;\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\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\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\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\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;;AAYA;;AAUA;;AAUA;;AAcA;;AAsBA,eAAeA,KAAK"}
@@ -1,25 +1,31 @@
1
1
  import React from 'react';
2
- import { Box, IFlexProps } from '@semcore/flex-box';
3
- import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
2
+ import { Box, FlexProps } from '@semcore/flex-box';
3
+ import { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';
4
4
  import { TIllustrationNamesErrors } from '@semcore/illustration';
5
- import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
5
+ import { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
6
6
 
7
7
  export type iconNamesErrors = TIllustrationNamesErrors;
8
8
 
9
- export interface IErrorsProps extends IFlexProps {
9
+ /** @deprecated */
10
+ export interface IErrorsProps extends ErrorsProps, UnknownProperties {}
11
+ export type ErrorsProps = FlexProps & {
10
12
  /**
11
13
  * Error icon
12
14
  */
13
15
  icon?: string | React.ReactNode;
14
- }
16
+ };
15
17
 
16
- export interface IErrorsContext {
18
+ /** @deprecated */
19
+ export interface IErrorsContext extends ErrorsContext, UnknownProperties {}
20
+ export type ErrorsContext = {
17
21
  getTextProps: PropGetterFn;
18
22
  getDescriptionProps: PropGetterFn;
19
23
  getControlsProps: PropGetterFn;
20
- }
24
+ };
21
25
 
22
- export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
26
+ /** @deprecated */
27
+ export interface IProjectNotFoundProps extends ProjectNotFoundProps, UnknownProperties {}
28
+ export type ProjectNotFoundProps = WithI18nEnhanceProps & {
23
29
  /**
24
30
  * Link to the projects
25
31
  * @default /projects
@@ -27,25 +33,31 @@ export interface IProjectNotFoundProps extends IWithI18nEnhanceProps {
27
33
  projectsLink?: string;
28
34
  contactsLink?: string;
29
35
  supportTeamLink?: string;
30
- }
36
+ };
31
37
 
32
- export interface IPageNotFoundProps extends IWithI18nEnhanceProps {
38
+ /** @deprecated */
39
+ export interface IPageNotFoundProps extends PageNotFoundProps, UnknownProperties {}
40
+ export type PageNotFoundProps = WithI18nEnhanceProps & {
33
41
  /**
34
42
  * href of the home link
35
43
  * @default /
36
44
  */
37
45
  homeLink?: string;
38
- }
46
+ };
39
47
 
40
- export interface IPageErrorProps extends IWithI18nEnhanceProps {
48
+ /** @deprecated */
49
+ export interface IPageErrorProps extends PageErrorProps, UnknownProperties {}
50
+ export type PageErrorProps = WithI18nEnhanceProps & {
41
51
  /**
42
52
  * Page reloading button click handler
43
53
  * @default () => { if (canUseDOM()) { location.reload(); } }
44
54
  */
45
55
  onClick?: (e: React.MouseEvent) => void;
46
- }
56
+ };
47
57
 
48
- export interface IMaintenanceProps extends IWithI18nEnhanceProps {
58
+ /** @deprecated */
59
+ export interface IMaintenanceProps extends MaintenanceProps, UnknownProperties {}
60
+ export type MaintenanceProps = WithI18nEnhanceProps & {
49
61
  /**
50
62
  * Tool name
51
63
  */
@@ -55,26 +67,28 @@ export interface IMaintenanceProps extends IWithI18nEnhanceProps {
55
67
  * @default /
56
68
  */
57
69
  homeLink?: string;
58
- }
70
+ };
59
71
 
60
- export interface IAccessDeniedProps extends IWithI18nEnhanceProps {
72
+ /** @deprecated */
73
+ export interface IAccessDeniedProps extends AccessDeniedProps, UnknownProperties {}
74
+ export type AccessDeniedProps = WithI18nEnhanceProps & {
61
75
  /**
62
76
  * href of the home link
63
77
  * @default /
64
78
  */
65
79
  homeLink?: string;
66
- }
80
+ };
67
81
 
68
- declare const Error: (<T>(props: CProps<IErrorsProps & T, IErrorsContext>) => ReturnEl) & {
82
+ declare const Error: Intergalactic.Component<'div', ErrorsProps, ErrorsContext> & {
69
83
  Title: typeof Box;
70
84
  Description: typeof Box;
71
85
  Controls: typeof Box;
72
86
  };
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;
87
+ declare const ProjectNotFound: Intergalactic.Component<'div', ProjectNotFoundProps & ErrorsProps>;
88
+ declare const PageNotFound: Intergalactic.Component<'div', PageNotFoundProps & ErrorsProps>;
89
+ declare const PageError: Intergalactic.Component<'div', PageErrorProps & ErrorsProps>;
90
+ declare const Maintenance: Intergalactic.Component<'div', MaintenanceProps & ErrorsProps>;
91
+ declare const AccessDenied: Intergalactic.Component<'div', AccessDeniedProps & ErrorsProps>;
78
92
  declare const getIconPath: (name: iconNamesErrors) => string;
79
93
 
80
94
  export default Error;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/errors",
3
3
  "description": "Semrush Errors Component",
4
- "version": "3.11.3",
4
+ "version": "4.0.0-beta.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,15 +9,15 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/button": "^4",
13
- "@semcore/flex-box": "^4",
14
- "@semcore/format-text": "^3.0.0",
15
- "@semcore/illustration": "1.4.30",
16
- "@semcore/typography": "^4",
17
- "@semcore/utils": "^3.27"
12
+ "@semcore/button": "5.0.0-beta.1",
13
+ "@semcore/flex-box": "5.0.0-beta.1",
14
+ "@semcore/format-text": "4.0.0-beta.1",
15
+ "@semcore/illustration": "2.0.0-beta.1",
16
+ "@semcore/typography": "5.0.0-beta.1",
17
+ "@semcore/utils": "4.0.0-beta.1"
18
18
  },
19
19
  "peerDependencies": {
20
- "@semcore/core": "^1.11",
20
+ "@semcore/core": "2.0.0-beta.1",
21
21
  "react": "16.8 - 18",
22
22
  "react-dom": "16.8 - 18"
23
23
  },