@semcore/widget-empty 3.7.1 → 3.8.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,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.8.1] - 2022-12-19
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/flex-box` [4.7.2 ~> 4.7.3], `@semcore/illustration` [1.3.8 ~> 1.3.9], `@semcore/utils` [3.44.0 ~> 3.44.1]).
10
+
11
+ ## [3.8.0] - 2022-12-14
12
+
13
+ ### Added
14
+
15
+ - Added internationalization of aria attributes.
16
+
5
17
  ## [3.7.1] - 2022-12-13
6
18
 
7
19
  ### Changed
@@ -29,29 +29,7 @@ var _WidgetEmpty = _interopRequireWildcard(require("../WidgetEmpty"));
29
29
 
30
30
  var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
31
31
 
32
- var _de = _interopRequireDefault(require("./translations/de.json"));
33
-
34
- var _en = _interopRequireDefault(require("./translations/en.json"));
35
-
36
- var _es = _interopRequireDefault(require("./translations/es.json"));
37
-
38
- var _fr = _interopRequireDefault(require("./translations/fr.json"));
39
-
40
- var _it = _interopRequireDefault(require("./translations/it.json"));
41
-
42
- var _ja = _interopRequireDefault(require("./translations/ja.json"));
43
-
44
- var _pt = _interopRequireDefault(require("./translations/pt.json"));
45
-
46
- var _ru = _interopRequireDefault(require("./translations/ru.json"));
47
-
48
- var _zh = _interopRequireDefault(require("./translations/zh.json"));
49
-
50
- var _ko = _interopRequireDefault(require("./translations/ko.json"));
51
-
52
- var _vi = _interopRequireDefault(require("./translations/vi.json"));
53
-
54
- var _tr = _interopRequireDefault(require("./translations/tr.json"));
32
+ var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
55
33
 
56
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
57
35
 
@@ -61,21 +39,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
61
39
 
62
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
63
41
 
64
- var i18n = {
65
- de: _de["default"],
66
- en: _en["default"],
67
- es: _es["default"],
68
- fr: _fr["default"],
69
- it: _it["default"],
70
- ja: _ja["default"],
71
- ru: _ru["default"],
72
- zh: _zh["default"],
73
- pt: _pt["default"],
74
- ko: _ko["default"],
75
- vi: _vi["default"],
76
- tr: _tr["default"]
77
- };
78
-
79
42
  var Error = /*#__PURE__*/function (_Component) {
80
43
  (0, _inherits2["default"])(Error, _Component);
81
44
 
@@ -94,14 +57,9 @@ var Error = /*#__PURE__*/function (_Component) {
94
57
  Children = _this$asProps.Children,
95
58
  description = _this$asProps.description,
96
59
  getI18nText = _this$asProps.getI18nText;
97
-
98
- var _getI18nText = getI18nText(),
99
- title = _getI18nText.title,
100
- descriptionText = _getI18nText.description;
101
-
102
60
  return /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"], (0, _core.assignProps)({
103
61
  "icon": (0, _WidgetEmpty.getIconPath)('warning')
104
- }, _ref), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Title, null, title), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Description, null, description || descriptionText), /*#__PURE__*/_react["default"].createElement(Children, null));
62
+ }, _ref), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Title, null, getI18nText('title')), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Description, null, description || getI18nText('description')), /*#__PURE__*/_react["default"].createElement(Children, null));
105
63
  }
106
64
  }]);
107
65
  return Error;
@@ -109,9 +67,10 @@ var Error = /*#__PURE__*/function (_Component) {
109
67
 
110
68
  (0, _defineProperty2["default"])(Error, "displayName", 'WidgetError');
111
69
  (0, _defineProperty2["default"])(Error, "defaultProps", {
112
- i18n: i18n
70
+ i18n: _intergalacticDynamicLocales.localizedMessages,
71
+ locale: 'en'
113
72
  });
114
- (0, _defineProperty2["default"])(Error, "enhance", [(0, _i18nEnhance["default"])()]);
73
+ (0, _defineProperty2["default"])(Error, "enhance", [(0, _i18nEnhance["default"])(_intergalacticDynamicLocales.localizedMessages)]);
115
74
 
116
75
  var _default = (0, _core["default"])(Error);
117
76
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","tr","Error","asProps","Children","description","getI18nText","title","descriptionText","WidgetEmpty","getIconPath","Component","i18nEnhance","createComponent"],"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/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\nimport tr from './translations/tr.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi, tr };\n\nclass Error extends Component {\n static displayName = 'WidgetError';\n static defaultProps = {\n i18n,\n };\n static enhance = [i18nEnhance()];\n\n render() {\n const { Children, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath('warning')}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(Error);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;EAAEC,EAAE,EAAFA,cAAF;EAAMC,EAAE,EAAFA,cAAN;EAAUC,EAAE,EAAFA,cAAV;EAAcC,EAAE,EAAFA,cAAd;EAAkBC,EAAE,EAAFA,cAAlB;EAAsBC,EAAE,EAAFA,cAAtB;EAA0BC,EAAE,EAAFA,cAA1B;EAA8BC,EAAE,EAAFA,cAA9B;EAAkCC,EAAE,EAAFA,cAAlC;EAAsCC,EAAE,EAAFA,cAAtC;EAA0CC,EAAE,EAAFA,cAA1C;EAA8CC,EAAE,EAAFA;AAA9C,CAAb;;IAEMC,K;;;;;;;;;;;;WAOJ,kBAAS;MAAA;MACP,oBAA+C,KAAKC,OAApD;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,WAA/B,iBAA+BA,WAA/B;;MACA,mBAAgDA,WAAW,EAA3D;MAAA,IAAQC,KAAR,gBAAQA,KAAR;MAAA,IAA4BC,eAA5B,gBAAeH,WAAf;;MAEA,oBACE,gCAAcI,uBAAd;QAAA,QAAiC,IAAAC,wBAAA,EAAY,SAAZ;MAAjC,uBACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBH,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;IAOD;;;EAlBiBG,e;;iCAAdT,K,iBACiB,a;iCADjBA,K,kBAEkB;EACpBb,IAAI,EAAJA;AADoB,C;iCAFlBa,K,aAKa,CAAC,IAAAU,uBAAA,GAAD,C;;eAgBJ,IAAAC,gBAAA,EAAgBX,KAAhB,C"}
1
+ {"version":3,"file":"index.js","names":["Error","asProps","Children","description","getI18nText","WidgetEmpty","getIconPath","Component","i18n","localizedMessages","locale","i18nEnhance","createComponent"],"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/utils/lib/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":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;;;;;;;;;IAEMA,K;;;;;;;;;;;;WAQJ,kBAAS;MAAA;MACP,oBAA+C,KAAKC,OAApD;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,WAA/B,iBAA+BA,WAA/B;MAEA,oBACE,gCAAcC,uBAAd;QAAA,QAAiC,IAAAC,wBAAA,EAAY,SAAZ;MAAjC,uBACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBF,WAAW,CAAC,OAAD,CAA/B,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QACGD,WAAW,IAAIC,WAAW,CAAC,aAAD,CAD7B,CAFF,eAKE,gCAAC,QAAD,OALF,CADF;IASD;;;EApBiBG,e;;iCAAdP,K,iBACiB,a;iCADjBA,K,kBAEkB;EACpBQ,IAAI,EAAEC,8CADc;EAEpBC,MAAM,EAAE;AAFY,C;iCAFlBV,K,aAMa,CAAC,IAAAW,uBAAA,EAAYF,8CAAZ,CAAD,C;;eAiBJ,IAAAG,gBAAA,EAAgBZ,KAAhB,C"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.localizedMessages = void 0;
9
+
10
+ var _de = _interopRequireDefault(require("./de.json"));
11
+
12
+ var _en = _interopRequireDefault(require("./en.json"));
13
+
14
+ var _es = _interopRequireDefault(require("./es.json"));
15
+
16
+ var _fr = _interopRequireDefault(require("./fr.json"));
17
+
18
+ var _it = _interopRequireDefault(require("./it.json"));
19
+
20
+ var _ja = _interopRequireDefault(require("./ja.json"));
21
+
22
+ var _ko = _interopRequireDefault(require("./ko.json"));
23
+
24
+ var _pt = _interopRequireDefault(require("./pt.json"));
25
+
26
+ var _ru = _interopRequireDefault(require("./ru.json"));
27
+
28
+ var _tr = _interopRequireDefault(require("./tr.json"));
29
+
30
+ var _vi = _interopRequireDefault(require("./vi.json"));
31
+
32
+ var _zh = _interopRequireDefault(require("./zh.json"));
33
+
34
+ var localizedMessages = {
35
+ de: _de["default"],
36
+ en: _en["default"],
37
+ es: _es["default"],
38
+ fr: _fr["default"],
39
+ it: _it["default"],
40
+ ja: _ja["default"],
41
+ ko: _ko["default"],
42
+ pt: _pt["default"],
43
+ ru: _ru["default"],
44
+ tr: _tr["default"],
45
+ vi: _vi["default"],
46
+ zh: _zh["default"]
47
+ };
48
+ exports.localizedMessages = localizedMessages;
49
+ //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["localizedMessages","de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh"],"sources":["../../../../src/Error/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEO,IAAMA,iBAAiB,GAAG;EAC/BC,EAAE,EAAFA,cAD+B;EAE/BC,EAAE,EAAFA,cAF+B;EAG/BC,EAAE,EAAFA,cAH+B;EAI/BC,EAAE,EAAFA,cAJ+B;EAK/BC,EAAE,EAAFA,cAL+B;EAM/BC,EAAE,EAAFA,cAN+B;EAO/BC,EAAE,EAAFA,cAP+B;EAQ/BC,EAAE,EAAFA,cAR+B;EAS/BC,EAAE,EAAFA,cAT+B;EAU/BC,EAAE,EAAFA,cAV+B;EAW/BC,EAAE,EAAFA,cAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
@@ -29,29 +29,7 @@ var _WidgetEmpty = _interopRequireWildcard(require("../WidgetEmpty"));
29
29
 
30
30
  var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
31
31
 
32
- var _de = _interopRequireDefault(require("./translations/de.json"));
33
-
34
- var _en = _interopRequireDefault(require("./translations/en.json"));
35
-
36
- var _es = _interopRequireDefault(require("./translations/es.json"));
37
-
38
- var _fr = _interopRequireDefault(require("./translations/fr.json"));
39
-
40
- var _it = _interopRequireDefault(require("./translations/it.json"));
41
-
42
- var _ja = _interopRequireDefault(require("./translations/ja.json"));
43
-
44
- var _pt = _interopRequireDefault(require("./translations/pt.json"));
45
-
46
- var _ru = _interopRequireDefault(require("./translations/ru.json"));
47
-
48
- var _zh = _interopRequireDefault(require("./translations/zh.json"));
49
-
50
- var _ko = _interopRequireDefault(require("./translations/ko.json"));
51
-
52
- var _vi = _interopRequireDefault(require("./translations/vi.json"));
53
-
54
- var _tr = _interopRequireDefault(require("./translations/tr.json"));
32
+ var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
55
33
 
56
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
57
35
 
@@ -61,21 +39,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
61
39
 
62
40
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
63
41
 
64
- var i18n = {
65
- de: _de["default"],
66
- en: _en["default"],
67
- es: _es["default"],
68
- fr: _fr["default"],
69
- it: _it["default"],
70
- ja: _ja["default"],
71
- ru: _ru["default"],
72
- zh: _zh["default"],
73
- pt: _pt["default"],
74
- ko: _ko["default"],
75
- vi: _vi["default"],
76
- tr: _tr["default"]
77
- };
78
-
79
42
  var NoData = /*#__PURE__*/function (_Component) {
80
43
  (0, _inherits2["default"])(NoData, _Component);
81
44
 
@@ -95,23 +58,19 @@ var NoData = /*#__PURE__*/function (_Component) {
95
58
  type = _this$asProps.type,
96
59
  description = _this$asProps.description,
97
60
  getI18nText = _this$asProps.getI18nText;
98
-
99
- var _getI18nText = getI18nText(),
100
- title = _getI18nText.title,
101
- descriptionText = _getI18nText.description;
102
-
103
61
  return /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"], (0, _core.assignProps)({
104
62
  "icon": (0, _WidgetEmpty.getIconPath)(type)
105
- }, _ref), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Title, null, title), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Description, null, description || descriptionText), /*#__PURE__*/_react["default"].createElement(Children, null));
63
+ }, _ref), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Title, null, getI18nText('title')), /*#__PURE__*/_react["default"].createElement(_WidgetEmpty["default"].Description, null, description || getI18nText('description')), /*#__PURE__*/_react["default"].createElement(Children, null));
106
64
  }
107
65
  }]);
108
66
  return NoData;
109
67
  }(_core.Component);
110
68
 
111
69
  (0, _defineProperty2["default"])(NoData, "displayName", 'WidgetNoData');
112
- (0, _defineProperty2["default"])(NoData, "enhance", [(0, _i18nEnhance["default"])()]);
70
+ (0, _defineProperty2["default"])(NoData, "enhance", [(0, _i18nEnhance["default"])(_intergalacticDynamicLocales.localizedMessages)]);
113
71
  (0, _defineProperty2["default"])(NoData, "defaultProps", {
114
- i18n: i18n,
72
+ i18n: _intergalacticDynamicLocales.localizedMessages,
73
+ locale: 'en',
115
74
  type: 'other-data'
116
75
  });
117
76
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","tr","NoData","asProps","Children","type","description","getI18nText","title","descriptionText","WidgetEmpty","getIconPath","Component","i18nEnhance","createComponent"],"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/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\nimport tr from './translations/tr.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi, tr };\n\nclass NoData extends Component {\n static displayName = 'WidgetNoData';\n static enhance = [i18nEnhance()];\n static defaultProps = {\n i18n,\n type: 'other-data',\n };\n\n render() {\n const { Children, type, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n return (\n <Root render={WidgetEmpty} icon={getIconPath(type)}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(NoData);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;EAAEC,EAAE,EAAFA,cAAF;EAAMC,EAAE,EAAFA,cAAN;EAAUC,EAAE,EAAFA,cAAV;EAAcC,EAAE,EAAFA,cAAd;EAAkBC,EAAE,EAAFA,cAAlB;EAAsBC,EAAE,EAAFA,cAAtB;EAA0BC,EAAE,EAAFA,cAA1B;EAA8BC,EAAE,EAAFA,cAA9B;EAAkCC,EAAE,EAAFA,cAAlC;EAAsCC,EAAE,EAAFA,cAAtC;EAA0CC,EAAE,EAAFA,cAA1C;EAA8CC,EAAE,EAAFA;AAA9C,CAAb;;IAEMC,M;;;;;;;;;;;;WAQJ,kBAAS;MAAA;MACP,oBAAqD,KAAKC,OAA1D;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,IAAlB,iBAAkBA,IAAlB;MAAA,IAAwBC,WAAxB,iBAAwBA,WAAxB;MAAA,IAAqCC,WAArC,iBAAqCA,WAArC;;MACA,mBAAgDA,WAAW,EAA3D;MAAA,IAAQC,KAAR,gBAAQA,KAAR;MAAA,IAA4BC,eAA5B,gBAAeH,WAAf;;MACA,oBACE,gCAAcI,uBAAd;QAAA,QAAiC,IAAAC,wBAAA,EAAYN,IAAZ;MAAjC,uBACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBG,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;IAOD;;;EAlBkBG,e;;iCAAfV,M,iBACiB,c;iCADjBA,M,aAEa,CAAC,IAAAW,uBAAA,GAAD,C;iCAFbX,M,kBAGkB;EACpBb,IAAI,EAAJA,IADoB;EAEpBgB,IAAI,EAAE;AAFc,C;;eAkBT,IAAAS,gBAAA,EAAgBZ,MAAhB,C"}
1
+ {"version":3,"file":"index.js","names":["NoData","asProps","Children","type","description","getI18nText","WidgetEmpty","getIconPath","Component","i18nEnhance","localizedMessages","i18n","locale","createComponent"],"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/utils/lib/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;;AAFA;;AACA;;AAEA;;AACA;;;;;;;;;;IAEMA,M;;;;;;;;;;;;WASJ,kBAAS;MAAA;MACP,oBAAqD,KAAKC,OAA1D;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,IAAlB,iBAAkBA,IAAlB;MAAA,IAAwBC,WAAxB,iBAAwBA,WAAxB;MAAA,IAAqCC,WAArC,iBAAqCA,WAArC;MAEA,oBACE,gCAAcC,uBAAd;QAAA,QAAiC,IAAAC,wBAAA,EAAYJ,IAAZ;MAAjC,uBACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBE,WAAW,CAAC,OAAD,CAA/B,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QACGD,WAAW,IAAIC,WAAW,CAAC,aAAD,CAD7B,CAFF,eAKE,gCAAC,QAAD,OALF,CADF;IASD;;;EArBkBG,e;;iCAAfR,M,iBACiB,c;iCADjBA,M,aAEa,CAAC,IAAAS,uBAAA,EAAYC,8CAAZ,CAAD,C;iCAFbV,M,kBAGkB;EACpBW,IAAI,EAAED,8CADc;EAEpBE,MAAM,EAAE,IAFY;EAGpBT,IAAI,EAAE;AAHc,C;;eAqBT,IAAAU,gBAAA,EAAgBb,MAAhB,C"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.localizedMessages = void 0;
9
+
10
+ var _de = _interopRequireDefault(require("./de.json"));
11
+
12
+ var _en = _interopRequireDefault(require("./en.json"));
13
+
14
+ var _es = _interopRequireDefault(require("./es.json"));
15
+
16
+ var _fr = _interopRequireDefault(require("./fr.json"));
17
+
18
+ var _it = _interopRequireDefault(require("./it.json"));
19
+
20
+ var _ja = _interopRequireDefault(require("./ja.json"));
21
+
22
+ var _ko = _interopRequireDefault(require("./ko.json"));
23
+
24
+ var _pt = _interopRequireDefault(require("./pt.json"));
25
+
26
+ var _ru = _interopRequireDefault(require("./ru.json"));
27
+
28
+ var _tr = _interopRequireDefault(require("./tr.json"));
29
+
30
+ var _vi = _interopRequireDefault(require("./vi.json"));
31
+
32
+ var _zh = _interopRequireDefault(require("./zh.json"));
33
+
34
+ var localizedMessages = {
35
+ de: _de["default"],
36
+ en: _en["default"],
37
+ es: _es["default"],
38
+ fr: _fr["default"],
39
+ it: _it["default"],
40
+ ja: _ja["default"],
41
+ ko: _ko["default"],
42
+ pt: _pt["default"],
43
+ ru: _ru["default"],
44
+ tr: _tr["default"],
45
+ vi: _vi["default"],
46
+ zh: _zh["default"]
47
+ };
48
+ exports.localizedMessages = localizedMessages;
49
+ //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["localizedMessages","de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh"],"sources":["../../../../src/NoData/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEO,IAAMA,iBAAiB,GAAG;EAC/BC,EAAE,EAAFA,cAD+B;EAE/BC,EAAE,EAAFA,cAF+B;EAG/BC,EAAE,EAAFA,cAH+B;EAI/BC,EAAE,EAAFA,cAJ+B;EAK/BC,EAAE,EAAFA,cAL+B;EAM/BC,EAAE,EAAFA,cAN+B;EAO/BC,EAAE,EAAFA,cAP+B;EAQ/BC,EAAE,EAAFA,cAR+B;EAS/BC,EAAE,EAAFA,cAT+B;EAU/BC,EAAE,EAAFA,cAV+B;EAW/BC,EAAE,EAAFA,cAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
@@ -48,15 +48,15 @@ var style = (
48
48
  /*__reshadow_css_start__*/
49
49
  _core.sstyled.insert(
50
50
  /*__inner_css_start__*/
51
- ".___SWidgetEmpty_wezuw_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x,16px)}.___SImage_wezuw_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x,12px)}.___STitle_wezuw_gg_{color:var(--intergalactic-text-secondary,#6c6e79)}.___STitle_wezuw_gg_{font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%);font-weight:var(--intergalactic-bold,700)}.___SDescription_wezuw_gg_{text-align:center;font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);color:var(--intergalactic-text-secondary,#6c6e79);max-width:400px}.___STitle_wezuw_gg_+.___SDescription_wezuw_gg_{margin-top:var(--intergalactic-spacing-1x,4px)}.___SDescription_wezuw_gg_+.___SDescription_wezuw_gg_{margin-top:var(--intergalactic-spacing-2x,8px)}"
51
+ ".___SWidgetEmpty_rnbau_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x,16px)}.___SImage_rnbau_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x,12px)}.___STitle_rnbau_gg_{color:var(--intergalactic-text-secondary,#6c6e79)}.___STitle_rnbau_gg_{font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%);font-weight:var(--intergalactic-bold,700)}.___SDescription_rnbau_gg_{text-align:center;font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);color:var(--intergalactic-text-secondary,#6c6e79);max-width:400px}.___STitle_rnbau_gg_+.___SDescription_rnbau_gg_{margin-top:var(--intergalactic-spacing-1x,4px)}.___SDescription_rnbau_gg_+.___SDescription_rnbau_gg_{margin-top:var(--intergalactic-spacing-2x,8px)}"
52
52
  /*__inner_css_end__*/
53
- , "wezuw_gg_")
53
+ , "rnbau_gg_")
54
54
  /*__reshadow_css_end__*/
55
55
  , {
56
- "__SWidgetEmpty": "___SWidgetEmpty_wezuw_gg_",
57
- "__SImage": "___SImage_wezuw_gg_",
58
- "__STitle": "___STitle_wezuw_gg_",
59
- "__SDescription": "___SDescription_wezuw_gg_"
56
+ "__SWidgetEmpty": "___SWidgetEmpty_rnbau_gg_",
57
+ "__SImage": "___SImage_rnbau_gg_",
58
+ "__STitle": "___STitle_rnbau_gg_",
59
+ "__SDescription": "___SDescription_rnbau_gg_"
60
60
  });
61
61
 
62
62
  var getIconPath = function getIconPath(name) {
@@ -14,32 +14,7 @@ import React from 'react';
14
14
  import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
15
15
  import createComponent, { Component, Root } from '@semcore/core';
16
16
  import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
17
- import de from './translations/de.json';
18
- import en from './translations/en.json';
19
- import es from './translations/es.json';
20
- import fr from './translations/fr.json';
21
- import it from './translations/it.json';
22
- import ja from './translations/ja.json';
23
- import pt from './translations/pt.json';
24
- import ru from './translations/ru.json';
25
- import zh from './translations/zh.json';
26
- import ko from './translations/ko.json';
27
- import vi from './translations/vi.json';
28
- import tr from './translations/tr.json';
29
- var i18n = {
30
- de: de,
31
- en: en,
32
- es: es,
33
- fr: fr,
34
- it: it,
35
- ja: ja,
36
- ru: ru,
37
- zh: zh,
38
- pt: pt,
39
- ko: ko,
40
- vi: vi,
41
- tr: tr
42
- };
17
+ import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
43
18
 
44
19
  var Error = /*#__PURE__*/function (_Component) {
45
20
  _inherits(Error, _Component);
@@ -60,14 +35,9 @@ var Error = /*#__PURE__*/function (_Component) {
60
35
  Children = _this$asProps.Children,
61
36
  description = _this$asProps.description,
62
37
  getI18nText = _this$asProps.getI18nText;
63
-
64
- var _getI18nText = getI18nText(),
65
- title = _getI18nText.title,
66
- descriptionText = _getI18nText.description;
67
-
68
38
  return /*#__PURE__*/React.createElement(WidgetEmpty, _assignProps({
69
39
  "icon": getIconPath('warning')
70
- }, _ref), /*#__PURE__*/React.createElement(WidgetEmpty.Title, null, title), /*#__PURE__*/React.createElement(WidgetEmpty.Description, null, description || descriptionText), /*#__PURE__*/React.createElement(Children, null));
40
+ }, _ref), /*#__PURE__*/React.createElement(WidgetEmpty.Title, null, getI18nText('title')), /*#__PURE__*/React.createElement(WidgetEmpty.Description, null, description || getI18nText('description')), /*#__PURE__*/React.createElement(Children, null));
71
41
  }
72
42
  }]);
73
43
 
@@ -77,10 +47,11 @@ var Error = /*#__PURE__*/function (_Component) {
77
47
  _defineProperty(Error, "displayName", 'WidgetError');
78
48
 
79
49
  _defineProperty(Error, "defaultProps", {
80
- i18n: i18n
50
+ i18n: localizedMessages,
51
+ locale: 'en'
81
52
  });
82
53
 
83
- _defineProperty(Error, "enhance", [i18nEnhance()]);
54
+ _defineProperty(Error, "enhance", [i18nEnhance(localizedMessages)]);
84
55
 
85
56
  export default createComponent(Error);
86
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","tr","i18n","Error","asProps","Children","description","getI18nText","title","descriptionText"],"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/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\nimport tr from './translations/tr.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi, tr };\n\nclass Error extends Component {\n static displayName = 'WidgetError';\n static defaultProps = {\n i18n,\n };\n static enhance = [i18nEnhance()];\n\n render() {\n const { Children, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath('warning')}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(Error);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,gBAAzC;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,WAAP,MAAwB,yCAAxB;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AAEA,IAAMC,IAAI,GAAG;EAAEZ,EAAE,EAAFA,EAAF;EAAMC,EAAE,EAAFA,EAAN;EAAUC,EAAE,EAAFA,EAAV;EAAcC,EAAE,EAAFA,EAAd;EAAkBC,EAAE,EAAFA,EAAlB;EAAsBC,EAAE,EAAFA,EAAtB;EAA0BE,EAAE,EAAFA,EAA1B;EAA8BC,EAAE,EAAFA,EAA9B;EAAkCF,EAAE,EAAFA,EAAlC;EAAsCG,EAAE,EAAFA,EAAtC;EAA0CC,EAAE,EAAFA,EAA1C;EAA8CC,EAAE,EAAFA;AAA9C,CAAb;;IAEME,K;;;;;;;;;;;;;WAOJ,kBAAS;MAAA;MACP,oBAA+C,KAAKC,OAApD;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,WAA/B,iBAA+BA,WAA/B;;MACA,mBAAgDA,WAAW,EAA3D;MAAA,IAAQC,KAAR,gBAAQA,KAAR;MAAA,IAA4BC,eAA5B,gBAAeH,WAAf;;MAEA,oBACE,oBAActB,WAAd;QAAA,QAAiCC,WAAW,CAAC,SAAD;MAA5C,uBACE,oBAAC,WAAD,CAAa,KAAb,QAAoBuB,KAApB,CADF,eAEE,oBAAC,WAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,oBAAC,QAAD,OAHF,CADF;IAOD;;;;EAlBiBtB,S;;gBAAdgB,K,iBACiB,a;;gBADjBA,K,kBAEkB;EACpBD,IAAI,EAAJA;AADoB,C;;gBAFlBC,K,aAKa,CAACd,WAAW,EAAZ,C;;AAgBnB,eAAeH,eAAe,CAACiB,KAAD,CAA9B"}
1
+ {"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","localizedMessages","Error","asProps","Children","description","getI18nText","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/utils/lib/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,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,gBAAzC;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,WAAP,MAAwB,yCAAxB;AACA,SAASC,iBAAT,QAAkC,gDAAlC;;IAEMC,K;;;;;;;;;;;;;WAQJ,kBAAS;MAAA;MACP,oBAA+C,KAAKC,OAApD;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,WAA/B,iBAA+BA,WAA/B;MAEA,oBACE,oBAAcX,WAAd;QAAA,QAAiCC,WAAW,CAAC,SAAD;MAA5C,uBACE,oBAAC,WAAD,CAAa,KAAb,QAAoBU,WAAW,CAAC,OAAD,CAA/B,CADF,eAEE,oBAAC,WAAD,CAAa,WAAb,QACGD,WAAW,IAAIC,WAAW,CAAC,aAAD,CAD7B,CAFF,eAKE,oBAAC,QAAD,OALF,CADF;IASD;;;;EApBiBR,S;;gBAAdI,K,iBACiB,a;;gBADjBA,K,kBAEkB;EACpBK,IAAI,EAAEN,iBADc;EAEpBO,MAAM,EAAE;AAFY,C;;gBAFlBN,K,aAMa,CAACF,WAAW,CAACC,iBAAD,CAAZ,C;;AAiBnB,eAAeJ,eAAe,CAACK,KAAD,CAA9B"}
@@ -0,0 +1,27 @@
1
+ import de from './de.json';
2
+ import en from './en.json';
3
+ import es from './es.json';
4
+ import fr from './fr.json';
5
+ import it from './it.json';
6
+ import ja from './ja.json';
7
+ import ko from './ko.json';
8
+ import pt from './pt.json';
9
+ import ru from './ru.json';
10
+ import tr from './tr.json';
11
+ import vi from './vi.json';
12
+ import zh from './zh.json';
13
+ export var localizedMessages = {
14
+ de: de,
15
+ en: en,
16
+ es: es,
17
+ fr: fr,
18
+ it: it,
19
+ ja: ja,
20
+ ko: ko,
21
+ pt: pt,
22
+ ru: ru,
23
+ tr: tr,
24
+ vi: vi,
25
+ zh: zh
26
+ };
27
+ //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh","localizedMessages"],"sources":["../../../../src/Error/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BZ,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA,EAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
@@ -14,32 +14,7 @@ import React from 'react';
14
14
  import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
15
15
  import createComponent, { Component, Root } from '@semcore/core';
16
16
  import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
17
- import de from './translations/de.json';
18
- import en from './translations/en.json';
19
- import es from './translations/es.json';
20
- import fr from './translations/fr.json';
21
- import it from './translations/it.json';
22
- import ja from './translations/ja.json';
23
- import pt from './translations/pt.json';
24
- import ru from './translations/ru.json';
25
- import zh from './translations/zh.json';
26
- import ko from './translations/ko.json';
27
- import vi from './translations/vi.json';
28
- import tr from './translations/tr.json';
29
- var i18n = {
30
- de: de,
31
- en: en,
32
- es: es,
33
- fr: fr,
34
- it: it,
35
- ja: ja,
36
- ru: ru,
37
- zh: zh,
38
- pt: pt,
39
- ko: ko,
40
- vi: vi,
41
- tr: tr
42
- };
17
+ import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
43
18
 
44
19
  var NoData = /*#__PURE__*/function (_Component) {
45
20
  _inherits(NoData, _Component);
@@ -61,14 +36,9 @@ var NoData = /*#__PURE__*/function (_Component) {
61
36
  type = _this$asProps.type,
62
37
  description = _this$asProps.description,
63
38
  getI18nText = _this$asProps.getI18nText;
64
-
65
- var _getI18nText = getI18nText(),
66
- title = _getI18nText.title,
67
- descriptionText = _getI18nText.description;
68
-
69
39
  return /*#__PURE__*/React.createElement(WidgetEmpty, _assignProps({
70
40
  "icon": getIconPath(type)
71
- }, _ref), /*#__PURE__*/React.createElement(WidgetEmpty.Title, null, title), /*#__PURE__*/React.createElement(WidgetEmpty.Description, null, description || descriptionText), /*#__PURE__*/React.createElement(Children, null));
41
+ }, _ref), /*#__PURE__*/React.createElement(WidgetEmpty.Title, null, getI18nText('title')), /*#__PURE__*/React.createElement(WidgetEmpty.Description, null, description || getI18nText('description')), /*#__PURE__*/React.createElement(Children, null));
72
42
  }
73
43
  }]);
74
44
 
@@ -77,10 +47,11 @@ var NoData = /*#__PURE__*/function (_Component) {
77
47
 
78
48
  _defineProperty(NoData, "displayName", 'WidgetNoData');
79
49
 
80
- _defineProperty(NoData, "enhance", [i18nEnhance()]);
50
+ _defineProperty(NoData, "enhance", [i18nEnhance(localizedMessages)]);
81
51
 
82
52
  _defineProperty(NoData, "defaultProps", {
83
- i18n: i18n,
53
+ i18n: localizedMessages,
54
+ locale: 'en',
84
55
  type: 'other-data'
85
56
  });
86
57
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","tr","i18n","NoData","asProps","Children","type","description","getI18nText","title","descriptionText"],"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/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\nimport tr from './translations/tr.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi, tr };\n\nclass NoData extends Component {\n static displayName = 'WidgetNoData';\n static enhance = [i18nEnhance()];\n static defaultProps = {\n i18n,\n type: 'other-data',\n };\n\n render() {\n const { Children, type, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n return (\n <Root render={WidgetEmpty} icon={getIconPath(type)}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(NoData);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,gBAAzC;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,WAAP,MAAwB,yCAAxB;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AACA,OAAOC,EAAP,MAAe,wBAAf;AAEA,IAAMC,IAAI,GAAG;EAAEZ,EAAE,EAAFA,EAAF;EAAMC,EAAE,EAAFA,EAAN;EAAUC,EAAE,EAAFA,EAAV;EAAcC,EAAE,EAAFA,EAAd;EAAkBC,EAAE,EAAFA,EAAlB;EAAsBC,EAAE,EAAFA,EAAtB;EAA0BE,EAAE,EAAFA,EAA1B;EAA8BC,EAAE,EAAFA,EAA9B;EAAkCF,EAAE,EAAFA,EAAlC;EAAsCG,EAAE,EAAFA,EAAtC;EAA0CC,EAAE,EAAFA,EAA1C;EAA8CC,EAAE,EAAFA;AAA9C,CAAb;;IAEME,M;;;;;;;;;;;;;WAQJ,kBAAS;MAAA;MACP,oBAAqD,KAAKC,OAA1D;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,IAAlB,iBAAkBA,IAAlB;MAAA,IAAwBC,WAAxB,iBAAwBA,WAAxB;MAAA,IAAqCC,WAArC,iBAAqCA,WAArC;;MACA,mBAAgDA,WAAW,EAA3D;MAAA,IAAQC,KAAR,gBAAQA,KAAR;MAAA,IAA4BC,eAA5B,gBAAeH,WAAf;;MACA,oBACE,oBAAcvB,WAAd;QAAA,QAAiCC,WAAW,CAACqB,IAAD;MAA5C,uBACE,oBAAC,WAAD,CAAa,KAAb,QAAoBG,KAApB,CADF,eAEE,oBAAC,WAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,oBAAC,QAAD,OAHF,CADF;IAOD;;;;EAlBkBvB,S;;gBAAfgB,M,iBACiB,c;;gBADjBA,M,aAEa,CAACd,WAAW,EAAZ,C;;gBAFbc,M,kBAGkB;EACpBD,IAAI,EAAJA,IADoB;EAEpBI,IAAI,EAAE;AAFc,C;;AAkBxB,eAAepB,eAAe,CAACiB,MAAD,CAA9B"}
1
+ {"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","localizedMessages","NoData","asProps","Children","type","description","getI18nText","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/utils/lib/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,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,gBAAzC;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,WAAP,MAAwB,yCAAxB;AACA,SAASC,iBAAT,QAAkC,gDAAlC;;IAEMC,M;;;;;;;;;;;;;WASJ,kBAAS;MAAA;MACP,oBAAqD,KAAKC,OAA1D;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,IAAlB,iBAAkBA,IAAlB;MAAA,IAAwBC,WAAxB,iBAAwBA,WAAxB;MAAA,IAAqCC,WAArC,iBAAqCA,WAArC;MAEA,oBACE,oBAAcZ,WAAd;QAAA,QAAiCC,WAAW,CAACS,IAAD;MAA5C,uBACE,oBAAC,WAAD,CAAa,KAAb,QAAoBE,WAAW,CAAC,OAAD,CAA/B,CADF,eAEE,oBAAC,WAAD,CAAa,WAAb,QACGD,WAAW,IAAIC,WAAW,CAAC,aAAD,CAD7B,CAFF,eAKE,oBAAC,QAAD,OALF,CADF;IASD;;;;EArBkBT,S;;gBAAfI,M,iBACiB,c;;gBADjBA,M,aAEa,CAACF,WAAW,CAACC,iBAAD,CAAZ,C;;gBAFbC,M,kBAGkB;EACpBM,IAAI,EAAEP,iBADc;EAEpBQ,MAAM,EAAE,IAFY;EAGpBJ,IAAI,EAAE;AAHc,C;;AAqBxB,eAAeR,eAAe,CAACK,MAAD,CAA9B"}
@@ -0,0 +1,27 @@
1
+ import de from './de.json';
2
+ import en from './en.json';
3
+ import es from './es.json';
4
+ import fr from './fr.json';
5
+ import it from './it.json';
6
+ import ja from './ja.json';
7
+ import ko from './ko.json';
8
+ import pt from './pt.json';
9
+ import ru from './ru.json';
10
+ import tr from './tr.json';
11
+ import vi from './vi.json';
12
+ import zh from './zh.json';
13
+ export var localizedMessages = {
14
+ de: de,
15
+ en: en,
16
+ es: es,
17
+ fr: fr,
18
+ it: it,
19
+ ja: ja,
20
+ ko: ko,
21
+ pt: pt,
22
+ ru: ru,
23
+ tr: tr,
24
+ vi: vi,
25
+ zh: zh
26
+ };
27
+ //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","ru","tr","vi","zh","localizedMessages"],"sources":["../../../../src/NoData/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n ru,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BZ,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA,EAX+B;EAY/BC,EAAE,EAAFA;AAZ+B,CAA1B"}
@@ -28,15 +28,15 @@ var style = (
28
28
  /*__reshadow_css_start__*/
29
29
  _sstyled.insert(
30
30
  /*__inner_css_start__*/
31
- ".___SWidgetEmpty_wezuw_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x,16px)}.___SImage_wezuw_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x,12px)}.___STitle_wezuw_gg_{color:var(--intergalactic-text-secondary,#6c6e79)}.___STitle_wezuw_gg_{font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%);font-weight:var(--intergalactic-bold,700)}.___SDescription_wezuw_gg_{text-align:center;font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);color:var(--intergalactic-text-secondary,#6c6e79);max-width:400px}.___STitle_wezuw_gg_+.___SDescription_wezuw_gg_{margin-top:var(--intergalactic-spacing-1x,4px)}.___SDescription_wezuw_gg_+.___SDescription_wezuw_gg_{margin-top:var(--intergalactic-spacing-2x,8px)}"
31
+ ".___SWidgetEmpty_rnbau_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x,16px)}.___SImage_rnbau_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x,12px)}.___STitle_rnbau_gg_{color:var(--intergalactic-text-secondary,#6c6e79)}.___STitle_rnbau_gg_{font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%);font-weight:var(--intergalactic-bold,700)}.___SDescription_rnbau_gg_{text-align:center;font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);color:var(--intergalactic-text-secondary,#6c6e79);max-width:400px}.___STitle_rnbau_gg_+.___SDescription_rnbau_gg_{margin-top:var(--intergalactic-spacing-1x,4px)}.___SDescription_rnbau_gg_+.___SDescription_rnbau_gg_{margin-top:var(--intergalactic-spacing-2x,8px)}"
32
32
  /*__inner_css_end__*/
33
- , "wezuw_gg_")
33
+ , "rnbau_gg_")
34
34
  /*__reshadow_css_end__*/
35
35
  , {
36
- "__SWidgetEmpty": "___SWidgetEmpty_wezuw_gg_",
37
- "__SImage": "___SImage_wezuw_gg_",
38
- "__STitle": "___STitle_wezuw_gg_",
39
- "__SDescription": "___SDescription_wezuw_gg_"
36
+ "__SWidgetEmpty": "___SWidgetEmpty_rnbau_gg_",
37
+ "__SImage": "___SImage_rnbau_gg_",
38
+ "__STitle": "___STitle_rnbau_gg_",
39
+ "__SDescription": "___SDescription_rnbau_gg_"
40
40
  });
41
41
  export var getIconPath = function getIconPath(name) {
42
42
  return getIllustrationPath(name);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/widget-empty",
3
3
  "description": "Semrush WidgetEmpty Component",
4
- "version": "3.7.1",
4
+ "version": "3.8.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@semcore/flex-box": "^4",
13
- "@semcore/illustration": "1.3.7",
13
+ "@semcore/illustration": "1.3.9",
14
14
  "@semcore/utils": "^3.27"
15
15
  },
16
16
  "peerDependencies": {