@semcore/widget-empty 4.43.1 → 16.0.0-prerelease.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/Error/index.js +3 -3
- package/lib/cjs/Error/index.js.map +1 -1
- package/lib/cjs/NoData/index.js +3 -3
- package/lib/cjs/NoData/index.js.map +1 -1
- package/lib/cjs/WidgetEmpty.js +8 -10
- package/lib/cjs/WidgetEmpty.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/Error/index.js +2 -2
- package/lib/es6/Error/index.js.map +1 -1
- package/lib/es6/NoData/index.js +2 -2
- package/lib/es6/NoData/index.js.map +1 -1
- package/lib/es6/WidgetEmpty.js +8 -8
- package/lib/es6/WidgetEmpty.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/Error/index.mjs +32 -29
- package/lib/esm/Error/translations/__intergalactic-dynamic-locales.mjs +32 -32
- package/lib/esm/Error/translations/de.json.mjs +8 -6
- package/lib/esm/Error/translations/en.json.mjs +8 -6
- package/lib/esm/Error/translations/es.json.mjs +8 -6
- package/lib/esm/Error/translations/fr.json.mjs +8 -6
- package/lib/esm/Error/translations/it.json.mjs +8 -6
- package/lib/esm/Error/translations/ja.json.mjs +8 -6
- package/lib/esm/Error/translations/ko.json.mjs +8 -6
- package/lib/esm/Error/translations/nl.json.mjs +8 -6
- package/lib/esm/Error/translations/pl.json.mjs +8 -6
- package/lib/esm/Error/translations/pt.json.mjs +8 -6
- package/lib/esm/Error/translations/ru.json.mjs +8 -6
- package/lib/esm/Error/translations/sv.json.mjs +8 -6
- package/lib/esm/Error/translations/tr.json.mjs +8 -6
- package/lib/esm/Error/translations/vi.json.mjs +8 -6
- package/lib/esm/Error/translations/zh.json.mjs +8 -6
- package/lib/esm/NoData/index.mjs +32 -29
- package/lib/esm/NoData/translations/__intergalactic-dynamic-locales.mjs +32 -32
- package/lib/esm/NoData/translations/de.json.mjs +8 -6
- package/lib/esm/NoData/translations/en.json.mjs +8 -6
- package/lib/esm/NoData/translations/es.json.mjs +8 -6
- package/lib/esm/NoData/translations/fr.json.mjs +8 -6
- package/lib/esm/NoData/translations/it.json.mjs +8 -6
- package/lib/esm/NoData/translations/ja.json.mjs +8 -6
- package/lib/esm/NoData/translations/ko.json.mjs +8 -6
- package/lib/esm/NoData/translations/nl.json.mjs +8 -6
- package/lib/esm/NoData/translations/pl.json.mjs +8 -6
- package/lib/esm/NoData/translations/pt.json.mjs +8 -6
- package/lib/esm/NoData/translations/ru.json.mjs +8 -6
- package/lib/esm/NoData/translations/sv.json.mjs +8 -6
- package/lib/esm/NoData/translations/tr.json.mjs +8 -6
- package/lib/esm/NoData/translations/vi.json.mjs +8 -6
- package/lib/esm/NoData/translations/zh.json.mjs +8 -6
- package/lib/esm/WidgetEmpty.mjs +63 -52
- package/lib/esm/index.mjs +7 -7
- package/lib/types/index.d.ts +1 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
package/lib/cjs/Error/index.js
CHANGED
|
@@ -11,10 +11,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
11
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
12
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _core =
|
|
14
|
+
var _core = require("@semcore/core");
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _WidgetEmpty = _interopRequireWildcard(require("../WidgetEmpty"));
|
|
17
|
-
var _i18nEnhance = _interopRequireDefault(require("@semcore/
|
|
17
|
+
var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
|
|
18
18
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
19
19
|
var Error = /*#__PURE__*/function (_Component) {
|
|
20
20
|
(0, _inherits2["default"])(Error, _Component);
|
|
@@ -44,6 +44,6 @@ var Error = /*#__PURE__*/function (_Component) {
|
|
|
44
44
|
locale: 'en'
|
|
45
45
|
});
|
|
46
46
|
(0, _defineProperty2["default"])(Error, "enhance", [(0, _i18nEnhance["default"])(_intergalacticDynamicLocales.localizedMessages)]);
|
|
47
|
-
var _default = (0, _core
|
|
47
|
+
var _default = (0, _core.createComponent)(Error);
|
|
48
48
|
exports["default"] = _default;
|
|
49
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_core","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_core","require","_react","_interopRequireDefault","_WidgetEmpty","_interopRequireWildcard","_i18nEnhance","_intergalacticDynamicLocales","Error","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_this$asProps","Children","description","getI18nText","createElement","WidgetEmpty","assignProps","getIconPath","Title","Description","Component","_defineProperty2","i18n","localizedMessages","locale","i18nEnhance","_default","createComponent","exports"],"sources":["../../../src/Error/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass Error extends Component {\n static displayName = 'WidgetError';\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n static enhance = [i18nEnhance(localizedMessages)];\n\n render() {\n const { Children, description, getI18nText } = this.asProps;\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath('warning')}>\n <WidgetEmpty.Title>{getI18nText('title')}</WidgetEmpty.Title>\n <WidgetEmpty.Description>\n {description || getI18nText('description')}\n </WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(Error);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AAvBzB,KAAK,iBACY,aAAa;AAAA,IAAAyB,gBAAA,aAD9BzB,KAAK,kBAEa;EACpB0B,IAAI,EAAEC,8CAAiB;EACvBC,MAAM,EAAE;AACV,CAAC;AAAA,IAAAH,gBAAA,aALGzB,KAAK,aAMQ,CAAC,IAAA6B,uBAAW,EAACF,8CAAiB,CAAC,CAAC;AAAA,IAAAG,QAAA,GAiBpC,IAAAC,qBAAe,EAAC/B,KAAK,CAAC;AAAAgC,OAAA,cAAAF,QAAA"}
|
package/lib/cjs/NoData/index.js
CHANGED
|
@@ -11,10 +11,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
11
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
12
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _core =
|
|
14
|
+
var _core = require("@semcore/core");
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _WidgetEmpty = _interopRequireWildcard(require("../WidgetEmpty"));
|
|
17
|
-
var _i18nEnhance = _interopRequireDefault(require("@semcore/
|
|
17
|
+
var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
|
|
18
18
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
19
19
|
var NoData = /*#__PURE__*/function (_Component) {
|
|
20
20
|
(0, _inherits2["default"])(NoData, _Component);
|
|
@@ -46,6 +46,6 @@ var NoData = /*#__PURE__*/function (_Component) {
|
|
|
46
46
|
locale: 'en',
|
|
47
47
|
type: 'other-data'
|
|
48
48
|
});
|
|
49
|
-
var _default = (0, _core
|
|
49
|
+
var _default = (0, _core.createComponent)(NoData);
|
|
50
50
|
exports["default"] = _default;
|
|
51
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_core","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_core","require","_react","_interopRequireDefault","_WidgetEmpty","_interopRequireWildcard","_i18nEnhance","_intergalacticDynamicLocales","NoData","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_this$asProps","Children","type","description","getI18nText","createElement","WidgetEmpty","assignProps","getIconPath","Title","Description","Component","_defineProperty2","i18nEnhance","localizedMessages","i18n","locale","_default","createComponent","exports"],"sources":["../../../src/NoData/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass NoData extends Component {\n static displayName = 'WidgetNoData';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n type: 'other-data',\n };\n\n render() {\n const { Children, type, description, getI18nText } = this.asProps;\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath(type)}>\n <WidgetEmpty.Title>{getI18nText('title')}</WidgetEmpty.Title>\n <WidgetEmpty.Description>\n {description || getI18nText('description')}\n </WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(NoData);\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAEA,IAAAK,YAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,4BAAA,GAAAN,OAAA;AAAmF,IAE7EO,MAAM,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,MAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,MAAA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AAAF,QAAA"}
|
package/lib/cjs/WidgetEmpty.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
@@ -12,18 +11,17 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
12
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
12
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
14
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var
|
|
16
|
-
var _core = _interopRequireWildcard(require("@semcore/core"));
|
|
14
|
+
var _core = require("@semcore/core");
|
|
17
15
|
var _react = _interopRequireDefault(require("react"));
|
|
18
16
|
var _illustration = require("@semcore/illustration");
|
|
19
17
|
var _flexBox = require("@semcore/flex-box");
|
|
20
|
-
var _isNode = _interopRequireDefault(require("@semcore/
|
|
18
|
+
var _isNode = _interopRequireDefault(require("@semcore/core/lib/utils/isNode"));
|
|
21
19
|
/*__reshadow-styles__:"./style/widget-empty.shadow.css"*/
|
|
22
|
-
var style = ( /*__reshadow_css_start__*/
|
|
23
|
-
"__SWidgetEmpty": "
|
|
24
|
-
"__SImage": "
|
|
25
|
-
"__STitle": "
|
|
26
|
-
"__SDescription": "
|
|
20
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_rymi7_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_rymi7_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_rymi7_gg_,.___STitle_rymi7_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_rymi7_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_rymi7_gg_{text-align:center;text-wrap:balance;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_rymi7_gg_+.___SDescription_rymi7_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_rymi7_gg_+.___SDescription_rymi7_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "rymi7_gg_") /*__reshadow_css_end__*/, {
|
|
21
|
+
"__SWidgetEmpty": "___SWidgetEmpty_rymi7_gg_",
|
|
22
|
+
"__SImage": "___SImage_rymi7_gg_",
|
|
23
|
+
"__STitle": "___STitle_rymi7_gg_",
|
|
24
|
+
"__SDescription": "___SDescription_rymi7_gg_"
|
|
27
25
|
});
|
|
28
26
|
var getIconPath = function getIconPath(name) {
|
|
29
27
|
return (0, _illustration.getIllustrationPath)(name);
|
|
@@ -75,7 +73,7 @@ var Description = function Description(props) {
|
|
|
75
73
|
var styles = props.styles;
|
|
76
74
|
return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDescription, _ref6.cn("SDescription", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref3))));
|
|
77
75
|
};
|
|
78
|
-
var _default = (0, _core
|
|
76
|
+
var _default = (0, _core.createComponent)(WidgetEmpty, {
|
|
79
77
|
Title: Title,
|
|
80
78
|
Description: Description
|
|
81
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetEmpty.js","names":["_core","
|
|
1
|
+
{"version":3,"file":"WidgetEmpty.js","names":["_core","require","_react","_interopRequireDefault","_illustration","_flexBox","_isNode","style","sstyled","insert","getIconPath","name","getIllustrationPath","exports","WidgetEmpty","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_ref4","SWidgetEmpty","Flex","_this$asProps","Children","icon","styles","SImage","createElement","cn","_objectSpread2","assignProps","isNode","Component","_defineProperty2","Title","props","_ref2","arguments[0]","_ref5","STitle","Box","Description","_ref3","_ref6","SDescription","_default","createComponent"],"sources":["../../src/WidgetEmpty.jsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { getIllustrationPath } from '@semcore/illustration';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/core/lib/utils/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nexport const getIconPath = (name) => getIllustrationPath(name);\n\nclass WidgetEmpty extends Component {\n static displayName = 'WidgetEmpty';\n static style = style;\n\n render() {\n const SWidgetEmpty = Root;\n const { Children, icon, styles } = this.asProps;\n const SImage = 'div';\n\n return sstyled(styles)(\n <SWidgetEmpty render={Flex} role='status'>\n {isNode(icon) && (\n <SImage aria-hidden='true'>\n {typeof icon === 'string' ? <img src={icon} alt='' /> : icon}\n </SImage>\n )}\n <Children />\n </SWidgetEmpty>,\n );\n }\n}\n\nconst Title = (props) => {\n const STitle = Root;\n const { styles } = props;\n return sstyled(styles)(<STitle render={Box} />);\n};\n\nconst Description = (props) => {\n const SDescription = Root;\n const { styles } = props;\n return sstyled(styles)(<SDescription render={Box} />);\n};\n\nexport default createComponent(WidgetEmpty, {\n Title,\n Description,\n});\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAoD;AAAA,IAAAM,KAAA,+BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;AA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":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { Intergalactic, UnknownProperties } from '@semcore/core';\nimport { Box, FlexProps } from '@semcore/flex-box';\nimport { TIllustrationNamesWidgetEmpty } from '@semcore/illustration';\nimport { WithI18nEnhanceProps } from '@semcore/
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { Intergalactic, UnknownProperties } from '@semcore/core';\nimport { Box, FlexProps } from '@semcore/flex-box';\nimport { TIllustrationNamesWidgetEmpty } from '@semcore/illustration';\nimport { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';\n\nexport type iconNamesWidgetEmpty = TIllustrationNamesWidgetEmpty;\n\n/** @deprecated */\nexport interface IWidgetEmptyProps extends WidgetEmptyProps, UnknownProperties {}\nexport type WidgetEmptyProps = FlexProps & {\n /**\n * URL before the icon or the whole component\n */\n icon?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IWidgetErrorProps extends WidgetErrorProps, UnknownProperties {}\nexport type WidgetErrorProps = WidgetEmptyProps &\n WithI18nEnhanceProps & {\n /** Error description. If it is absent, use the local default one */\n description?: React.ReactNode;\n };\n\n/** @deprecated */\nexport interface IWidgetNoDataProps extends WidgetNoDataProps, UnknownProperties {}\nexport type WidgetNoDataProps = WidgetEmptyProps &\n WithI18nEnhanceProps & {\n /** Error description. If it is absent, use the local default one */\n description?: React.ReactNode;\n /* Data types */\n type?: iconNamesWidgetEmpty;\n };\n\ndeclare const WidgetEmpty: Intergalactic.Component<'div', WidgetEmptyProps> & {\n Title: typeof Box;\n Description: typeof Box;\n};\n\nexport declare const NoData: Intergalactic.Component<'div', WidgetNoDataProps>;\nexport declare const Error: Intergalactic.Component<'div', WidgetErrorProps>;\nexport declare const getIconPath: (name: string) => string;\n\nexport default WidgetEmpty;\n"],"mappings":""}
|
package/lib/es6/Error/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
|
|
9
|
-
import createComponent,
|
|
10
|
-
import i18nEnhance from '@semcore/
|
|
9
|
+
import { createComponent, Component, Root } from '@semcore/core';
|
|
10
|
+
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
11
11
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
12
12
|
var Error = /*#__PURE__*/function (_Component) {
|
|
13
13
|
_inherits(Error, _Component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","localizedMessages","Error","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","description","getI18nText","createElement","_assignProps","Title","Description","_defineProperty","i18n","locale"],"sources":["../../../src/Error/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport createComponent,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","localizedMessages","Error","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","description","getI18nText","createElement","_assignProps","Title","Description","_defineProperty","i18n","locale"],"sources":["../../../src/Error/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass Error extends Component {\n static displayName = 'WidgetError';\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n static enhance = [i18nEnhance(localizedMessages)];\n\n render() {\n const { Children, description, getI18nText } = this.asProps;\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath('warning')}>\n <WidgetEmpty.Title>{getI18nText('title')}</WidgetEmpty.Title>\n <WidgetEmpty.Description>\n {description || getI18nText('description')}\n </WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(Error);\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,IAAIC,WAAW,QAAQ,gBAAgB;AACzD,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAChE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC,IAE7EC,KAAK,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,KAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,KAAA;EAAA,SAAAA,MAAA;IAAAK,eAAA,OAAAL,KAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,KAAA;IAAAS,GAAA;IAAAC,KAAA,EAQT,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;MACP,IAAAC,aAAA,GAA+C,IAAI,CAACD,OAAO;QAAnDE,QAAQ,GAAAD,aAAA,CAARC,QAAQ;QAAEC,WAAW,GAAAF,aAAA,CAAXE,WAAW;QAAEC,WAAW,GAAAH,aAAA,CAAXG,WAAW;MAE1C,oBACEzB,KAAA,CAAA0B,aAAA,CAAczB,WAAW,EAAA0B,YAAA;QAAA,QAAQzB,WAAW,CAAC,SAAS;MAAC,GAAAkB,IAAA,gBACrDpB,KAAA,CAAA0B,aAAA,CAACzB,WAAW,CAAC2B,KAAK,QAAEH,WAAW,CAAC,OAAO,CAAC,CAAqB,eAC7DzB,KAAA,CAAA0B,aAAA,CAACzB,WAAW,CAAC4B,WAAW,QACrBL,WAAW,IAAIC,WAAW,CAAC,aAAa,CAAC,CAClB,eAC1BzB,KAAA,CAAA0B,aAAA,CAACH,QAAQ,OAAG,CACP;IAEX;EAAC;EAAA,OAAAf,KAAA;AAAA,EApBiBJ,SAAS;AAAA0B,eAAA,CAAvBtB,KAAK,iBACY,aAAa;AAAAsB,eAAA,CAD9BtB,KAAK,kBAEa;EACpBuB,IAAI,EAAExB,iBAAiB;EACvByB,MAAM,EAAE;AACV,CAAC;AAAAF,eAAA,CALGtB,KAAK,aAMQ,CAACF,WAAW,CAACC,iBAAiB,CAAC,CAAC;AAiBnD,eAAeJ,eAAe,CAACK,KAAK,CAAC"}
|
package/lib/es6/NoData/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
|
|
9
|
-
import createComponent,
|
|
10
|
-
import i18nEnhance from '@semcore/
|
|
9
|
+
import { createComponent, Component, Root } from '@semcore/core';
|
|
10
|
+
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
11
11
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
12
12
|
var NoData = /*#__PURE__*/function (_Component) {
|
|
13
13
|
_inherits(NoData, _Component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","localizedMessages","NoData","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","type","description","getI18nText","createElement","_assignProps","Title","Description","_defineProperty","i18n","locale"],"sources":["../../../src/NoData/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport createComponent,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","localizedMessages","NoData","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_this$asProps","Children","type","description","getI18nText","createElement","_assignProps","Title","Description","_defineProperty","i18n","locale"],"sources":["../../../src/NoData/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport { createComponent, Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass NoData extends Component {\n static displayName = 'WidgetNoData';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n type: 'other-data',\n };\n\n render() {\n const { Children, type, description, getI18nText } = this.asProps;\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath(type)}>\n <WidgetEmpty.Title>{getI18nText('title')}</WidgetEmpty.Title>\n <WidgetEmpty.Description>\n {description || getI18nText('description')}\n </WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(NoData);\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,IAAIC,WAAW,QAAQ,gBAAgB;AACzD,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAChE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC,IAE7EC,MAAM,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,MAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,MAAA;EAAA,SAAAA,OAAA;IAAAK,eAAA,OAAAL,MAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,MAAA;IAAAS,GAAA;IAAAC,KAAA,EASV,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;MACP,IAAAC,aAAA,GAAqD,IAAI,CAACD,OAAO;QAAzDE,QAAQ,GAAAD,aAAA,CAARC,QAAQ;QAAEC,IAAI,GAAAF,aAAA,CAAJE,IAAI;QAAEC,WAAW,GAAAH,aAAA,CAAXG,WAAW;QAAEC,WAAW,GAAAJ,aAAA,CAAXI,WAAW;MAEhD,oBACE1B,KAAA,CAAA2B,aAAA,CAAc1B,WAAW,EAAA2B,YAAA;QAAA,QAAQ1B,WAAW,CAACsB,IAAI;MAAC,GAAAJ,IAAA,gBAChDpB,KAAA,CAAA2B,aAAA,CAAC1B,WAAW,CAAC4B,KAAK,QAAEH,WAAW,CAAC,OAAO,CAAC,CAAqB,eAC7D1B,KAAA,CAAA2B,aAAA,CAAC1B,WAAW,CAAC6B,WAAW,QACrBL,WAAW,IAAIC,WAAW,CAAC,aAAa,CAAC,CAClB,eAC1B1B,KAAA,CAAA2B,aAAA,CAACJ,QAAQ,OAAG,CACP;IAEX;EAAC;EAAA,OAAAf,MAAA;AAAA,EArBkBJ,SAAS;AAAA2B,eAAA,CAAxBvB,MAAM,iBACW,cAAc;AAAAuB,eAAA,CAD/BvB,MAAM,aAEO,CAACF,WAAW,CAACC,iBAAiB,CAAC,CAAC;AAAAwB,eAAA,CAF7CvB,MAAM,kBAGY;EACpBwB,IAAI,EAAEzB,iBAAiB;EACvB0B,MAAM,EAAE,IAAI;EACZT,IAAI,EAAE;AACR,CAAC;AAiBH,eAAerB,eAAe,CAACK,MAAM,CAAC"}
|
package/lib/es6/WidgetEmpty.js
CHANGED
|
@@ -4,21 +4,21 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
import { sstyled as _sstyled } from "@semcore/
|
|
7
|
+
import { sstyled as _sstyled } from "@semcore/core";
|
|
8
8
|
import { assignProps as _assignProps3 } from "@semcore/core";
|
|
9
9
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
10
10
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import createComponent,
|
|
12
|
+
import { createComponent, Component, sstyled, Root } from '@semcore/core';
|
|
13
13
|
import { getIllustrationPath } from '@semcore/illustration';
|
|
14
14
|
import { Box, Flex } from '@semcore/flex-box';
|
|
15
|
-
import isNode from '@semcore/
|
|
15
|
+
import isNode from '@semcore/core/lib/utils/isNode';
|
|
16
16
|
/*__reshadow-styles__:"./style/widget-empty.shadow.css"*/
|
|
17
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
18
|
-
"__SWidgetEmpty": "
|
|
19
|
-
"__SImage": "
|
|
20
|
-
"__STitle": "
|
|
21
|
-
"__SDescription": "
|
|
17
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_rymi7_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_rymi7_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_rymi7_gg_,.___STitle_rymi7_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_rymi7_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_rymi7_gg_{text-align:center;text-wrap:balance;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_rymi7_gg_+.___SDescription_rymi7_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_rymi7_gg_+.___SDescription_rymi7_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "rymi7_gg_") /*__reshadow_css_end__*/, {
|
|
18
|
+
"__SWidgetEmpty": "___SWidgetEmpty_rymi7_gg_",
|
|
19
|
+
"__SImage": "___SImage_rymi7_gg_",
|
|
20
|
+
"__STitle": "___STitle_rymi7_gg_",
|
|
21
|
+
"__SDescription": "___SDescription_rymi7_gg_"
|
|
22
22
|
});
|
|
23
23
|
export var getIconPath = function getIconPath(name) {
|
|
24
24
|
return getIllustrationPath(name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetEmpty.js","names":["React","createComponent","Component","sstyled","Root","getIllustrationPath","Box","Flex","isNode","style","_sstyled","insert","getIconPath","name","WidgetEmpty","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref4","SWidgetEmpty","_this$asProps","Children","icon","styles","SImage","createElement","cn","_objectSpread","_assignProps","_defineProperty","Title","props","_ref2","arguments[0]","_ref5","STitle","_assignProps2","Description","_ref3","_ref6","SDescription","_assignProps3"],"sources":["../../src/WidgetEmpty.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent,
|
|
1
|
+
{"version":3,"file":"WidgetEmpty.js","names":["React","createComponent","Component","sstyled","Root","getIllustrationPath","Box","Flex","isNode","style","_sstyled","insert","getIconPath","name","WidgetEmpty","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref4","SWidgetEmpty","_this$asProps","Children","icon","styles","SImage","createElement","cn","_objectSpread","_assignProps","_defineProperty","Title","props","_ref2","arguments[0]","_ref5","STitle","_assignProps2","Description","_ref3","_ref6","SDescription","_assignProps3"],"sources":["../../src/WidgetEmpty.jsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { getIllustrationPath } from '@semcore/illustration';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/core/lib/utils/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nexport const getIconPath = (name) => getIllustrationPath(name);\n\nclass WidgetEmpty extends Component {\n static displayName = 'WidgetEmpty';\n static style = style;\n\n render() {\n const SWidgetEmpty = Root;\n const { Children, icon, styles } = this.asProps;\n const SImage = 'div';\n\n return sstyled(styles)(\n <SWidgetEmpty render={Flex} role='status'>\n {isNode(icon) && (\n <SImage aria-hidden='true'>\n {typeof icon === 'string' ? <img src={icon} alt='' /> : icon}\n </SImage>\n )}\n <Children />\n </SWidgetEmpty>,\n );\n }\n}\n\nconst Title = (props) => {\n const STitle = Root;\n const { styles } = props;\n return sstyled(styles)(<STitle render={Box} />);\n};\n\nconst Description = (props) => {\n const SDescription = Root;\n const { styles } = props;\n return sstyled(styles)(<SDescription render={Box} />);\n};\n\nexport default createComponent(WidgetEmpty, {\n Title,\n Description,\n});\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,OAAOC,MAAM,MAAM,gCAAgC;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIpD,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAAI;EAAA,OAAKR,mBAAmB,CAACQ,IAAI,CAAC;AAAA;AAAC,IAEzDC,WAAW,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,WAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,WAAA;EAAA,SAAAA,YAAA;IAAAK,eAAA,OAAAL,WAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,WAAA;IAAAS,GAAA;IAAAC,KAAA,EAIf,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAA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A,CAAAR,EAAA,WAAAC,aAAA,KAAAS,aAAA,KAAAJ,KAAA,IAAgB;AAChD,CAAC;AAED,IAAMK,WAAW,GAAG,SAAdA,WAAWA,CAAIN,KAAK,EAAK;EAAA,IAAAO,KAAA,GAAAL,YAAA;IAAAM,KAAA;EAC7B,IAAMC,YAAY,GAE2B5C,GAAG;EADhD,IAAQ2B,MAAM,GAAKQ,KAAK,CAAhBR,MAAM;EACd,OAAAgB,KAAA,GAAO9C,OAAO,CAAC8B,MAAM,CAAC,eAACjC,KAAA,CAAAmC,aAAA,CAACe,YAAY,EAAAD,KAAA,CAAAb,EAAA,iBAAAC,aAAA,KAAAc,aAAA,KAAAH,KAAA,IAAgB;AACtD,CAAC;AAED,eAAe/C,eAAe,CAACa,WAAW,EAAE;EAC1C0B,KAAK,EAALA,KAAK;EACLO,WAAW,EAAXA;AACF,CAAC,CAAC"}
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { Intergalactic, UnknownProperties } from '@semcore/core';\nimport { Box, FlexProps } from '@semcore/flex-box';\nimport { TIllustrationNamesWidgetEmpty } from '@semcore/illustration';\nimport { WithI18nEnhanceProps } from '@semcore/
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { Intergalactic, UnknownProperties } from '@semcore/core';\nimport { Box, FlexProps } from '@semcore/flex-box';\nimport { TIllustrationNamesWidgetEmpty } from '@semcore/illustration';\nimport { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';\n\nexport type iconNamesWidgetEmpty = TIllustrationNamesWidgetEmpty;\n\n/** @deprecated */\nexport interface IWidgetEmptyProps extends WidgetEmptyProps, UnknownProperties {}\nexport type WidgetEmptyProps = FlexProps & {\n /**\n * URL before the icon or the whole component\n */\n icon?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IWidgetErrorProps extends WidgetErrorProps, UnknownProperties {}\nexport type WidgetErrorProps = WidgetEmptyProps &\n WithI18nEnhanceProps & {\n /** Error description. If it is absent, use the local default one */\n description?: React.ReactNode;\n };\n\n/** @deprecated */\nexport interface IWidgetNoDataProps extends WidgetNoDataProps, UnknownProperties {}\nexport type WidgetNoDataProps = WidgetEmptyProps &\n WithI18nEnhanceProps & {\n /** Error description. If it is absent, use the local default one */\n description?: React.ReactNode;\n /* Data types */\n type?: iconNamesWidgetEmpty;\n };\n\ndeclare const WidgetEmpty: Intergalactic.Component<'div', WidgetEmptyProps> & {\n Title: typeof Box;\n Description: typeof Box;\n};\n\nexport declare const NoData: Intergalactic.Component<'div', WidgetNoDataProps>;\nexport declare const Error: Intergalactic.Component<'div', WidgetErrorProps>;\nexport declare const getIconPath: (name: string) => string;\n\nexport default WidgetEmpty;\n"],"mappings":""}
|
package/lib/esm/Error/index.mjs
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { localizedMessages
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
+
import { createComponent, assignProps, Component } from "@semcore/core";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import WidgetEmpty, { getIconPath } from "../WidgetEmpty.mjs";
|
|
9
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
10
|
+
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
11
|
+
var Error = /* @__PURE__ */ function(_Component) {
|
|
12
|
+
_inherits(Error2, _Component);
|
|
13
|
+
var _super = _createSuper(Error2);
|
|
14
|
+
function Error2() {
|
|
15
|
+
_classCallCheck(this, Error2);
|
|
16
|
+
return _super.apply(this, arguments);
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
_createClass(Error2, [{
|
|
18
19
|
key: "render",
|
|
19
|
-
value: function() {
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
value: function render() {
|
|
21
|
+
var _ref = this.asProps;
|
|
22
|
+
var _this$asProps = this.asProps, Children = _this$asProps.Children, description = _this$asProps.description, getI18nText = _this$asProps.getI18nText;
|
|
23
|
+
return /* @__PURE__ */ React.createElement(WidgetEmpty, assignProps({
|
|
24
|
+
"icon": getIconPath("warning")
|
|
25
|
+
}, _ref), /* @__PURE__ */ React.createElement(WidgetEmpty.Title, null, getI18nText("title")), /* @__PURE__ */ React.createElement(WidgetEmpty.Description, null, description || getI18nText("description")), /* @__PURE__ */ React.createElement(Children, null));
|
|
24
26
|
}
|
|
25
|
-
}])
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
}]);
|
|
28
|
+
return Error2;
|
|
29
|
+
}(Component);
|
|
30
|
+
_defineProperty(Error, "displayName", "WidgetError");
|
|
31
|
+
_defineProperty(Error, "defaultProps", {
|
|
32
|
+
i18n: localizedMessages,
|
|
30
33
|
locale: "en"
|
|
31
34
|
});
|
|
32
|
-
|
|
33
|
-
const
|
|
35
|
+
_defineProperty(Error, "enhance", [i18nEnhance(localizedMessages)]);
|
|
36
|
+
const index = createComponent(Error);
|
|
34
37
|
export {
|
|
35
|
-
|
|
38
|
+
index as default
|
|
36
39
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
var
|
|
17
|
-
de
|
|
18
|
-
en
|
|
19
|
-
es
|
|
20
|
-
fr
|
|
21
|
-
it
|
|
22
|
-
ja
|
|
23
|
-
ko
|
|
24
|
-
nl
|
|
25
|
-
pt
|
|
26
|
-
ru
|
|
27
|
-
tr
|
|
28
|
-
vi
|
|
29
|
-
zh
|
|
30
|
-
pl
|
|
31
|
-
sv
|
|
1
|
+
import de from "./de.json.mjs";
|
|
2
|
+
import en from "./en.json.mjs";
|
|
3
|
+
import es from "./es.json.mjs";
|
|
4
|
+
import fr from "./fr.json.mjs";
|
|
5
|
+
import it from "./it.json.mjs";
|
|
6
|
+
import ja from "./ja.json.mjs";
|
|
7
|
+
import ko from "./ko.json.mjs";
|
|
8
|
+
import nl from "./nl.json.mjs";
|
|
9
|
+
import pt from "./pt.json.mjs";
|
|
10
|
+
import ru from "./ru.json.mjs";
|
|
11
|
+
import tr from "./tr.json.mjs";
|
|
12
|
+
import vi from "./vi.json.mjs";
|
|
13
|
+
import zh from "./zh.json.mjs";
|
|
14
|
+
import pl from "./pl.json.mjs";
|
|
15
|
+
import sv from "./sv.json.mjs";
|
|
16
|
+
var localizedMessages = {
|
|
17
|
+
de,
|
|
18
|
+
en,
|
|
19
|
+
es,
|
|
20
|
+
fr,
|
|
21
|
+
it,
|
|
22
|
+
ja,
|
|
23
|
+
ko,
|
|
24
|
+
nl,
|
|
25
|
+
pt,
|
|
26
|
+
ru,
|
|
27
|
+
tr,
|
|
28
|
+
vi,
|
|
29
|
+
zh,
|
|
30
|
+
pl,
|
|
31
|
+
sv
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
localizedMessages
|
|
35
35
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Es ist ein Fehler aufgetreten";
|
|
2
|
+
const description = "Dieses Problem ist uns bekannt und wir arbeiten an seiner Behebung. Bitte versuchen Sie es später erneut.";
|
|
3
|
+
const de = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
de as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Something went wrong";
|
|
2
|
+
const description = "We are aware of the issue and are working to fix it. Please try again later.";
|
|
3
|
+
const en = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
en as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Algo salió mal";
|
|
2
|
+
const description = "Somos conscientes del problema y estamos trabajando para solucionarlo. Inténtalo de nuevo más tarde.";
|
|
3
|
+
const es = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
es as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Une erreur est survenue";
|
|
2
|
+
const description = "Nous avons conscience de ce problème et nous nous efforçons de le résoudre. Veuillez réessayer plus tard.";
|
|
3
|
+
const fr = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
fr as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Si è verificato un errore";
|
|
2
|
+
const description = "Siamo a conoscenza del problema e stiamo lavorando per risolverlo. Riprova più tardi.";
|
|
3
|
+
const it = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
it as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "エラーが発生しました";
|
|
2
|
+
const description = "心配はありません。私たちは問題を把握し、解決に向けて動いています。あとで再試行してください。";
|
|
3
|
+
const ja = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
ja as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "오류가 발생했습니다";
|
|
2
|
+
const description = "문제를 파악했으며 해결 중입니다. 나중에 다시 시도해 주세요.";
|
|
3
|
+
const ko = {
|
|
4
|
+
title,
|
|
5
|
+
description
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
ko as default,
|
|
9
|
+
description,
|
|
10
|
+
title
|
|
9
11
|
};
|