@semcore/errors 16.2.0-prerelease.1 → 16.2.0

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.
Files changed (101) hide show
  1. package/lib/cjs/AccessDenied/{index.js → AccessDenied.js} +1 -1
  2. package/lib/cjs/AccessDenied/AccessDenied.js.map +1 -0
  3. package/lib/cjs/AccessDenied/AccessDenied.type.js +2 -0
  4. package/lib/cjs/AccessDenied/AccessDenied.type.js.map +1 -0
  5. package/lib/cjs/Error.js +16 -15
  6. package/lib/cjs/Error.js.map +1 -1
  7. package/lib/cjs/Error.type.js +2 -0
  8. package/lib/cjs/Error.type.js.map +1 -0
  9. package/lib/cjs/Maintenance/{index.js → Maintenance.js} +1 -1
  10. package/lib/cjs/Maintenance/Maintenance.js.map +1 -0
  11. package/lib/cjs/Maintenance/Maintenance.type.js +2 -0
  12. package/lib/cjs/Maintenance/Maintenance.type.js.map +1 -0
  13. package/lib/cjs/PageError/{index.js → PageError.js} +10 -10
  14. package/lib/cjs/PageError/PageError.js.map +1 -0
  15. package/lib/cjs/PageError/PageError.type.js +2 -0
  16. package/lib/cjs/PageError/PageError.type.js.map +1 -0
  17. package/lib/cjs/PageNotFound/{index.js → PageNotFound.js} +2 -2
  18. package/lib/cjs/PageNotFound/PageNotFound.js.map +1 -0
  19. package/lib/cjs/PageNotFound/PageNotFound.type.js +2 -0
  20. package/lib/cjs/PageNotFound/PageNotFound.type.js.map +1 -0
  21. package/lib/cjs/ProjectNotFound/{index.js → ProjectNotFound.js} +6 -5
  22. package/lib/cjs/ProjectNotFound/ProjectNotFound.js.map +1 -0
  23. package/lib/cjs/ProjectNotFound/ProjectNotFound.type.js +2 -0
  24. package/lib/cjs/ProjectNotFound/ProjectNotFound.type.js.map +1 -0
  25. package/lib/cjs/index.js +76 -8
  26. package/lib/cjs/index.js.map +1 -1
  27. package/lib/cjs/style/errors.shadow.css +1 -0
  28. package/lib/es6/AccessDenied/{index.js → AccessDenied.js} +1 -1
  29. package/lib/es6/AccessDenied/AccessDenied.js.map +1 -0
  30. package/lib/es6/AccessDenied/AccessDenied.type.js +2 -0
  31. package/lib/es6/AccessDenied/AccessDenied.type.js.map +1 -0
  32. package/lib/es6/Error.js +12 -11
  33. package/lib/es6/Error.js.map +1 -1
  34. package/lib/es6/Error.type.js +2 -0
  35. package/lib/es6/Error.type.js.map +1 -0
  36. package/lib/es6/Maintenance/{index.js → Maintenance.js} +1 -1
  37. package/lib/es6/Maintenance/Maintenance.js.map +1 -0
  38. package/lib/es6/Maintenance/Maintenance.type.js +2 -0
  39. package/lib/es6/Maintenance/Maintenance.type.js.map +1 -0
  40. package/lib/es6/PageError/{index.js → PageError.js} +8 -7
  41. package/lib/es6/PageError/PageError.js.map +1 -0
  42. package/lib/es6/PageError/PageError.type.js +2 -0
  43. package/lib/es6/PageError/PageError.type.js.map +1 -0
  44. package/lib/es6/PageNotFound/{index.js → PageNotFound.js} +2 -2
  45. package/lib/es6/PageNotFound/PageNotFound.js.map +1 -0
  46. package/lib/es6/PageNotFound/PageNotFound.type.js +2 -0
  47. package/lib/es6/PageNotFound/PageNotFound.type.js.map +1 -0
  48. package/lib/es6/ProjectNotFound/{index.js → ProjectNotFound.js} +6 -5
  49. package/lib/es6/ProjectNotFound/ProjectNotFound.js.map +1 -0
  50. package/lib/es6/ProjectNotFound/ProjectNotFound.type.js +2 -0
  51. package/lib/es6/ProjectNotFound/ProjectNotFound.type.js.map +1 -0
  52. package/lib/es6/index.js +12 -7
  53. package/lib/es6/index.js.map +1 -1
  54. package/lib/es6/style/errors.shadow.css +1 -0
  55. package/lib/esm/AccessDenied/{index.mjs → AccessDenied.mjs} +3 -3
  56. package/lib/esm/AccessDenied/AccessDenied.type.mjs +1 -0
  57. package/lib/esm/Error.mjs +13 -13
  58. package/lib/esm/Error.type.mjs +1 -0
  59. package/lib/esm/Maintenance/{index.mjs → Maintenance.mjs} +3 -3
  60. package/lib/esm/Maintenance/Maintenance.type.mjs +1 -0
  61. package/lib/esm/PageError/{index.mjs → PageError.mjs} +8 -7
  62. package/lib/esm/PageError/PageError.type.mjs +1 -0
  63. package/lib/esm/PageNotFound/{index.mjs → PageNotFound.mjs} +4 -4
  64. package/lib/esm/PageNotFound/PageNotFound.type.mjs +1 -0
  65. package/lib/esm/ProjectNotFound/{index.mjs → ProjectNotFound.mjs} +8 -7
  66. package/lib/esm/ProjectNotFound/ProjectNotFound.type.mjs +1 -0
  67. package/lib/esm/index.mjs +11 -5
  68. package/lib/esm/style/errors.shadow.css +1 -0
  69. package/lib/types/AccessDenied/AccessDenied.d.ts +3 -0
  70. package/lib/types/AccessDenied/AccessDenied.type.d.ts +21 -0
  71. package/lib/types/AccessDenied/translations/__intergalactic-dynamic-locales.d.ts +77 -0
  72. package/lib/types/Error.d.ts +4 -0
  73. package/lib/types/Error.type.d.ts +40 -0
  74. package/lib/types/Maintenance/Maintenance.d.ts +3 -0
  75. package/lib/types/Maintenance/Maintenance.type.d.ts +25 -0
  76. package/lib/types/Maintenance/translations/__intergalactic-dynamic-locales.d.ts +77 -0
  77. package/lib/types/PageError/PageError.d.ts +3 -0
  78. package/lib/types/PageError/PageError.type.d.ts +21 -0
  79. package/lib/types/PageError/translations/__intergalactic-dynamic-locales.d.ts +77 -0
  80. package/lib/types/PageNotFound/PageNotFound.d.ts +3 -0
  81. package/lib/types/PageNotFound/PageNotFound.type.d.ts +21 -0
  82. package/lib/types/PageNotFound/translations/__intergalactic-dynamic-locales.d.ts +77 -0
  83. package/lib/types/ProjectNotFound/ProjectNotFound.d.ts +3 -0
  84. package/lib/types/ProjectNotFound/ProjectNotFound.type.d.ts +31 -0
  85. package/lib/types/ProjectNotFound/translations/__intergalactic-dynamic-locales.d.ts +92 -0
  86. package/lib/types/index.d.ts +12 -128
  87. package/package.json +8 -8
  88. package/lib/cjs/AccessDenied/index.js.map +0 -1
  89. package/lib/cjs/Maintenance/index.js.map +0 -1
  90. package/lib/cjs/PageError/index.js.map +0 -1
  91. package/lib/cjs/PageNotFound/index.js.map +0 -1
  92. package/lib/cjs/ProjectNotFound/index.js.map +0 -1
  93. package/lib/cjs/index.d.js +0 -15
  94. package/lib/cjs/index.d.js.map +0 -1
  95. package/lib/es6/AccessDenied/index.js.map +0 -1
  96. package/lib/es6/Maintenance/index.js.map +0 -1
  97. package/lib/es6/PageError/index.js.map +0 -1
  98. package/lib/es6/PageNotFound/index.js.map +0 -1
  99. package/lib/es6/ProjectNotFound/index.js.map +0 -1
  100. package/lib/es6/index.d.js +0 -16
  101. package/lib/es6/index.d.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ title: string;
4
+ text: string;
5
+ btnHome: string;
6
+ };
7
+ en: {
8
+ title: string;
9
+ text: string;
10
+ btnHome: string;
11
+ };
12
+ es: {
13
+ title: string;
14
+ text: string;
15
+ btnHome: string;
16
+ };
17
+ fr: {
18
+ title: string;
19
+ text: string;
20
+ btnHome: string;
21
+ };
22
+ it: {
23
+ title: string;
24
+ text: string;
25
+ btnHome: string;
26
+ };
27
+ ja: {
28
+ title: string;
29
+ text: string;
30
+ btnHome: string;
31
+ };
32
+ ko: {
33
+ title: string;
34
+ text: string;
35
+ btnHome: string;
36
+ };
37
+ nl: {
38
+ title: string;
39
+ text: string;
40
+ btnHome: string;
41
+ };
42
+ pt: {
43
+ title: string;
44
+ text: string;
45
+ btnHome: string;
46
+ };
47
+ ru: {
48
+ title: string;
49
+ text: string;
50
+ btnHome: string;
51
+ };
52
+ tr: {
53
+ title: string;
54
+ text: string;
55
+ btnHome: string;
56
+ };
57
+ vi: {
58
+ title: string;
59
+ text: string;
60
+ btnHome: string;
61
+ };
62
+ zh: {
63
+ title: string;
64
+ text: string;
65
+ btnHome: string;
66
+ };
67
+ pl: {
68
+ title: string;
69
+ text: string;
70
+ btnHome: string;
71
+ };
72
+ sv: {
73
+ title: string;
74
+ text: string;
75
+ btnHome: string;
76
+ };
77
+ };
@@ -0,0 +1,4 @@
1
+ import type { NSErrors } from './Error.type';
2
+ export declare const getIconPath: (name: NSErrors.IconName) => string;
3
+ declare const Error: NSErrors.Component;
4
+ export default Error;
@@ -0,0 +1,40 @@
1
+ import type { Box, FlexProps } from '@semcore/base-components';
2
+ import type { Intergalactic, PropGetterFn } from '@semcore/core';
3
+ import type { TIllustrationNamesErrors } from '@semcore/illustration';
4
+ import type React from 'react';
5
+ declare namespace NSErrors {
6
+ type Props = FlexProps & {
7
+ /**
8
+ * Error icon
9
+ * Icon as a string is a URL to an image.
10
+ */
11
+ icon?: string | React.ReactNode;
12
+ };
13
+ type Ctx = {
14
+ getTextProps: PropGetterFn;
15
+ getDescriptionProps: PropGetterFn;
16
+ getControlsProps: PropGetterFn;
17
+ };
18
+ type IconName = TIllustrationNamesErrors;
19
+ namespace Title {
20
+ type Component = typeof Box;
21
+ }
22
+ namespace Description {
23
+ type Component = typeof Box;
24
+ }
25
+ namespace Controls {
26
+ type Component = typeof Box;
27
+ }
28
+ type Component = Intergalactic.Component<'div', Props, Ctx> & {
29
+ Title: Title.Component;
30
+ Description: Description.Component;
31
+ Controls: Controls.Component;
32
+ };
33
+ }
34
+ /** @deprecated It will be removed in v18. */
35
+ export type ErrorsProps = NSErrors.Props;
36
+ /** @deprecated It will be removed in v18. */
37
+ export type ErrorsContext = NSErrors.Ctx;
38
+ /** @deprecated It will be removed in v18. */
39
+ export type IconNamesErrors = NSErrors.IconName;
40
+ export type { NSErrors };
@@ -0,0 +1,3 @@
1
+ import type { NSMaintenance } from './Maintenance.type';
2
+ declare const _default: NSMaintenance.Component;
3
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import type { Intergalactic } from '@semcore/core';
2
+ import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
3
+ import type { NSErrors } from '../Error.type';
4
+ declare namespace NSMaintenance {
5
+ type Props = WithI18nEnhanceProps & {
6
+ /**
7
+ * Tool name
8
+ */
9
+ toolName: string;
10
+ /**
11
+ * href of the home link
12
+ * @default /
13
+ */
14
+ homeLink?: string;
15
+ /**
16
+ * HTML tag of the error title
17
+ * @default h2
18
+ */
19
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
20
+ };
21
+ type Component = Intergalactic.Component<'div', Props & NSErrors.Props>;
22
+ }
23
+ /** @deprecated It will be removed in v18. */
24
+ export type MaintenanceProps = NSMaintenance.Props;
25
+ export type { NSMaintenance };
@@ -0,0 +1,77 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ title: string;
4
+ text: string;
5
+ btnHome: string;
6
+ };
7
+ en: {
8
+ title: string;
9
+ text: string;
10
+ btnHome: string;
11
+ };
12
+ es: {
13
+ title: string;
14
+ text: string;
15
+ btnHome: string;
16
+ };
17
+ fr: {
18
+ title: string;
19
+ text: string;
20
+ btnHome: string;
21
+ };
22
+ it: {
23
+ title: string;
24
+ text: string;
25
+ btnHome: string;
26
+ };
27
+ ja: {
28
+ title: string;
29
+ text: string;
30
+ btnHome: string;
31
+ };
32
+ ko: {
33
+ title: string;
34
+ text: string;
35
+ btnHome: string;
36
+ };
37
+ nl: {
38
+ title: string;
39
+ text: string;
40
+ btnHome: string;
41
+ };
42
+ pt: {
43
+ title: string;
44
+ text: string;
45
+ btnHome: string;
46
+ };
47
+ ru: {
48
+ title: string;
49
+ text: string;
50
+ btnHome: string;
51
+ };
52
+ tr: {
53
+ title: string;
54
+ text: string;
55
+ btnHome: string;
56
+ };
57
+ vi: {
58
+ title: string;
59
+ text: string;
60
+ btnHome: string;
61
+ };
62
+ zh: {
63
+ title: string;
64
+ text: string;
65
+ btnHome: string;
66
+ };
67
+ pl: {
68
+ title: string;
69
+ text: string;
70
+ btnHome: string;
71
+ };
72
+ sv: {
73
+ title: string;
74
+ text: string;
75
+ btnHome: string;
76
+ };
77
+ };
@@ -0,0 +1,3 @@
1
+ import type { NSPageError } from './PageError.type';
2
+ declare const _default: NSPageError.Component;
3
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { Intergalactic } from '@semcore/core';
2
+ import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
3
+ import type { NSErrors } from '../Error.type';
4
+ declare namespace NSPageError {
5
+ type Props = WithI18nEnhanceProps & {
6
+ /**
7
+ * Page reloading button click handler
8
+ * @default () => { if (canUseDOM()) { location.reload(); } }
9
+ */
10
+ onClick?: (e: React.MouseEvent) => void;
11
+ /**
12
+ * HTML tag of the error title
13
+ * @default h2
14
+ */
15
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
16
+ };
17
+ type Component = Intergalactic.Component<'div', Props & NSErrors.Props>;
18
+ }
19
+ /** @deprecated It will be removed in v18. */
20
+ export type PageErrorProps = NSPageError.Props;
21
+ export type { NSPageError };
@@ -0,0 +1,77 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ title: string;
4
+ text: string;
5
+ btnRetry: string;
6
+ };
7
+ en: {
8
+ title: string;
9
+ text: string;
10
+ btnRetry: string;
11
+ };
12
+ es: {
13
+ title: string;
14
+ text: string;
15
+ btnRetry: string;
16
+ };
17
+ fr: {
18
+ title: string;
19
+ text: string;
20
+ btnRetry: string;
21
+ };
22
+ it: {
23
+ title: string;
24
+ text: string;
25
+ btnRetry: string;
26
+ };
27
+ ja: {
28
+ title: string;
29
+ text: string;
30
+ btnRetry: string;
31
+ };
32
+ ko: {
33
+ title: string;
34
+ text: string;
35
+ btnRetry: string;
36
+ };
37
+ nl: {
38
+ title: string;
39
+ text: string;
40
+ btnRetry: string;
41
+ };
42
+ pt: {
43
+ title: string;
44
+ text: string;
45
+ btnRetry: string;
46
+ };
47
+ ru: {
48
+ title: string;
49
+ text: string;
50
+ btnRetry: string;
51
+ };
52
+ tr: {
53
+ title: string;
54
+ text: string;
55
+ btnRetry: string;
56
+ };
57
+ vi: {
58
+ title: string;
59
+ text: string;
60
+ btnRetry: string;
61
+ };
62
+ zh: {
63
+ title: string;
64
+ text: string;
65
+ btnRetry: string;
66
+ };
67
+ pl: {
68
+ title: string;
69
+ text: string;
70
+ btnRetry: string;
71
+ };
72
+ sv: {
73
+ title: string;
74
+ text: string;
75
+ btnRetry: string;
76
+ };
77
+ };
@@ -0,0 +1,3 @@
1
+ import type { NSPageNotFound } from './PageNotFound.type';
2
+ declare const _default: NSPageNotFound.Component;
3
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { Intergalactic } from '@semcore/core';
2
+ import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
3
+ import type { NSErrors } from '../Error.type';
4
+ declare namespace NSPageNotFound {
5
+ type Props = WithI18nEnhanceProps & {
6
+ /**
7
+ * href of the home link
8
+ * @default /
9
+ */
10
+ homeLink?: string;
11
+ /**
12
+ * HTML tag of the error title
13
+ * @default h2
14
+ */
15
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
16
+ };
17
+ type Component = Intergalactic.Component<'div', Props & NSErrors.Props>;
18
+ }
19
+ /** @deprecated It will be removed in v18. */
20
+ export type PageNotFoundProps = NSPageNotFound.Props;
21
+ export type { NSPageNotFound };
@@ -0,0 +1,77 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ title: string;
4
+ text: string;
5
+ btnHome: string;
6
+ };
7
+ en: {
8
+ title: string;
9
+ text: string;
10
+ btnHome: string;
11
+ };
12
+ es: {
13
+ title: string;
14
+ text: string;
15
+ btnHome: string;
16
+ };
17
+ fr: {
18
+ title: string;
19
+ text: string;
20
+ btnHome: string;
21
+ };
22
+ it: {
23
+ title: string;
24
+ text: string;
25
+ btnHome: string;
26
+ };
27
+ ja: {
28
+ title: string;
29
+ text: string;
30
+ btnHome: string;
31
+ };
32
+ ko: {
33
+ title: string;
34
+ text: string;
35
+ btnHome: string;
36
+ };
37
+ nl: {
38
+ title: string;
39
+ text: string;
40
+ btnHome: string;
41
+ };
42
+ pt: {
43
+ title: string;
44
+ text: string;
45
+ btnHome: string;
46
+ };
47
+ ru: {
48
+ title: string;
49
+ text: string;
50
+ btnHome: string;
51
+ };
52
+ tr: {
53
+ title: string;
54
+ text: string;
55
+ btnHome: string;
56
+ };
57
+ vi: {
58
+ title: string;
59
+ text: string;
60
+ btnHome: string;
61
+ };
62
+ zh: {
63
+ title: string;
64
+ text: string;
65
+ btnHome: string;
66
+ };
67
+ pl: {
68
+ title: string;
69
+ text: string;
70
+ btnHome: string;
71
+ };
72
+ sv: {
73
+ title: string;
74
+ text: string;
75
+ btnHome: string;
76
+ };
77
+ };
@@ -0,0 +1,3 @@
1
+ import type { NSProjectNotFound } from './ProjectNotFound.type';
2
+ declare const _default: NSProjectNotFound.Component;
3
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import type { Intergalactic } from '@semcore/core';
2
+ import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
3
+ import type { NSErrors } from '../Error.type';
4
+ declare namespace NSProjectNotFound {
5
+ type Props = WithI18nEnhanceProps & {
6
+ /**
7
+ * URL for the "Go to Projects" button
8
+ * @default /projects
9
+ */
10
+ projectsLink?: string;
11
+ /**
12
+ * URL for the "Contact us" button
13
+ * @default /company/contacts
14
+ */
15
+ contactsLink?: string;
16
+ /**
17
+ * URL for the "Support Team" link
18
+ * @default /company/contacts
19
+ */
20
+ supportTeamLink?: string;
21
+ /**
22
+ * HTML tag of the error title
23
+ * @default h2
24
+ */
25
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p';
26
+ };
27
+ type Component = Intergalactic.Component<'div', Props & NSErrors.Props>;
28
+ }
29
+ /** @deprecated It will be removed in v18. */
30
+ export type ProjectNotFoundProps = NSProjectNotFound.Props;
31
+ export type { NSProjectNotFound };
@@ -0,0 +1,92 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ title: string;
4
+ text: string;
5
+ btnProjects: string;
6
+ btnContacts: string;
7
+ };
8
+ en: {
9
+ title: string;
10
+ text: string;
11
+ btnProjects: string;
12
+ btnContacts: string;
13
+ };
14
+ es: {
15
+ title: string;
16
+ text: string;
17
+ btnProjects: string;
18
+ btnContacts: string;
19
+ };
20
+ fr: {
21
+ title: string;
22
+ text: string;
23
+ btnProjects: string;
24
+ btnContacts: string;
25
+ };
26
+ it: {
27
+ title: string;
28
+ text: string;
29
+ btnProjects: string;
30
+ btnContacts: string;
31
+ };
32
+ ja: {
33
+ title: string;
34
+ text: string;
35
+ btnProjects: string;
36
+ btnContacts: string;
37
+ };
38
+ ko: {
39
+ title: string;
40
+ text: string;
41
+ btnProjects: string;
42
+ btnContacts: string;
43
+ };
44
+ nl: {
45
+ title: string;
46
+ text: string;
47
+ btnProjects: string;
48
+ btnContacts: string;
49
+ };
50
+ pt: {
51
+ title: string;
52
+ text: string;
53
+ btnProjects: string;
54
+ btnContacts: string;
55
+ };
56
+ ru: {
57
+ title: string;
58
+ text: string;
59
+ btnProjects: string;
60
+ btnContacts: string;
61
+ };
62
+ tr: {
63
+ title: string;
64
+ text: string;
65
+ btnProjects: string;
66
+ btnContacts: string;
67
+ };
68
+ vi: {
69
+ title: string;
70
+ text: string;
71
+ btnProjects: string;
72
+ btnContacts: string;
73
+ };
74
+ zh: {
75
+ title: string;
76
+ text: string;
77
+ btnProjects: string;
78
+ btnContacts: string;
79
+ };
80
+ pl: {
81
+ title: string;
82
+ text: string;
83
+ btnProjects: string;
84
+ btnContacts: string;
85
+ };
86
+ sv: {
87
+ title: string;
88
+ text: string;
89
+ btnProjects: string;
90
+ btnContacts: string;
91
+ };
92
+ };