@semcore/widget-empty 2.6.6 → 2.7.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [2.7.0] - 2022-04-14
6
+
7
+ ### Added
8
+
9
+ - Added `radial-tree-chart` illustration.
10
+
5
11
  ## [2.6.6] - 2022-03-14
6
12
 
7
13
  ### Changed
@@ -18,13 +24,13 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
18
24
 
19
25
  ### Changed
20
26
 
21
- - Remove don't use dependency `@semcore/link`, `@semcore/button`.
27
+ - Removed unused dependencies `@semcore/link`, `@semcore/button`.
22
28
 
23
29
  ## [2.6.3] - 2022-01-18
24
30
 
25
31
  ### Changed
26
32
 
27
- - Remove don't use dependency `@semcore/icon`.
33
+ - Removed unused dependencies `@semcore/icon`.
28
34
 
29
35
  ## [2.6.2] - 2021-8-26
30
36
 
@@ -86,8 +86,7 @@ var Error = /*#__PURE__*/function (_Component) {
86
86
  (0, _createClass2["default"])(Error, [{
87
87
  key: "render",
88
88
  value: function render() {
89
- var _ref = this ? this.asProps : arguments[0];
90
-
89
+ var _ref = this.asProps;
91
90
  var _this$asProps = this.asProps,
92
91
  Children = _this$asProps.Children,
93
92
  description = _this$asProps.description,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Error/index.jsx"],"names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","Error","asProps","Children","description","getI18nText","title","descriptionText","WidgetEmpty","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,EAAE,EAAFA,cAAF;AAAMC,EAAAA,EAAE,EAAFA,cAAN;AAAUC,EAAAA,EAAE,EAAFA,cAAV;AAAcC,EAAAA,EAAE,EAAFA,cAAd;AAAkBC,EAAAA,EAAE,EAAFA,cAAlB;AAAsBC,EAAAA,EAAE,EAAFA,cAAtB;AAA0BC,EAAAA,EAAE,EAAFA,cAA1B;AAA8BC,EAAAA,EAAE,EAAFA,cAA9B;AAAkCC,EAAAA,EAAE,EAAFA,cAAlC;AAAsCC,EAAAA,EAAE,EAAFA,cAAtC;AAA0CC,EAAAA,EAAE,EAAFA;AAA1C,CAAb;;IAEMC,K;;;;;;;;;;;;WAOJ,kBAAS;AAAA;;AACP,0BAA+C,KAAKC,OAApD;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,WAAlB,iBAAkBA,WAAlB;AAAA,UAA+BC,WAA/B,iBAA+BA,WAA/B;;AACA,yBAAgDA,WAAW,EAA3D;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAA4BC,eAA5B,gBAAeH,WAAf;;AAEA,0BACE,gCAAcI,uBAAd;AAAA,gBAAiC,8BAAY,SAAZ;AAAjC,6BACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBF,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;AAOD;;;EAlBiBE,e;;iCAAdR,K,iBACiB,a;iCADjBA,K,kBAEkB;AACpBZ,EAAAA,IAAI,EAAJA;AADoB,C;iCAFlBY,K,aAKa,CAAC,8BAAD,C;;eAgBJ,sBAAgBA,KAAhB,C","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/Error/index.jsx"],"names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","Error","asProps","Children","description","getI18nText","title","descriptionText","WidgetEmpty","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,EAAE,EAAFA,cAAF;AAAMC,EAAAA,EAAE,EAAFA,cAAN;AAAUC,EAAAA,EAAE,EAAFA,cAAV;AAAcC,EAAAA,EAAE,EAAFA,cAAd;AAAkBC,EAAAA,EAAE,EAAFA,cAAlB;AAAsBC,EAAAA,EAAE,EAAFA,cAAtB;AAA0BC,EAAAA,EAAE,EAAFA,cAA1B;AAA8BC,EAAAA,EAAE,EAAFA,cAA9B;AAAkCC,EAAAA,EAAE,EAAFA,cAAlC;AAAsCC,EAAAA,EAAE,EAAFA,cAAtC;AAA0CC,EAAAA,EAAE,EAAFA;AAA1C,CAAb;;IAEMC,K;;;;;;;;;;;;WAOJ,kBAAS;AAAA;AACP,0BAA+C,KAAKC,OAApD;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,WAAlB,iBAAkBA,WAAlB;AAAA,UAA+BC,WAA/B,iBAA+BA,WAA/B;;AACA,yBAAgDA,WAAW,EAA3D;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAA4BC,eAA5B,gBAAeH,WAAf;;AAEA,0BACE,gCAAcI,uBAAd;AAAA,gBAAiC,8BAAY,SAAZ;AAAjC,6BACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBF,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;AAOD;;;EAlBiBE,e;;iCAAdR,K,iBACiB,a;iCADjBA,K,kBAEkB;AACpBZ,EAAAA,IAAI,EAAJA;AADoB,C;iCAFlBY,K,aAKa,CAAC,8BAAD,C;;eAgBJ,sBAAgBA,KAAhB,C","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
@@ -86,8 +86,7 @@ var NoData = /*#__PURE__*/function (_Component) {
86
86
  (0, _createClass2["default"])(NoData, [{
87
87
  key: "render",
88
88
  value: function render() {
89
- var _ref = this ? this.asProps : arguments[0];
90
-
89
+ var _ref = this.asProps;
91
90
  var _this$asProps = this.asProps,
92
91
  Children = _this$asProps.Children,
93
92
  type = _this$asProps.type,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/NoData/index.jsx"],"names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","NoData","asProps","Children","type","description","getI18nText","title","descriptionText","WidgetEmpty","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,EAAE,EAAFA,cAAF;AAAMC,EAAAA,EAAE,EAAFA,cAAN;AAAUC,EAAAA,EAAE,EAAFA,cAAV;AAAcC,EAAAA,EAAE,EAAFA,cAAd;AAAkBC,EAAAA,EAAE,EAAFA,cAAlB;AAAsBC,EAAAA,EAAE,EAAFA,cAAtB;AAA0BC,EAAAA,EAAE,EAAFA,cAA1B;AAA8BC,EAAAA,EAAE,EAAFA,cAA9B;AAAkCC,EAAAA,EAAE,EAAFA,cAAlC;AAAsCC,EAAAA,EAAE,EAAFA,cAAtC;AAA0CC,EAAAA,EAAE,EAAFA;AAA1C,CAAb;;IAEMC,M;;;;;;;;;;;;WAQJ,kBAAS;AAAA;;AACP,0BAAqD,KAAKC,OAA1D;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,IAAlB,iBAAkBA,IAAlB;AAAA,UAAwBC,WAAxB,iBAAwBA,WAAxB;AAAA,UAAqCC,WAArC,iBAAqCA,WAArC;;AACA,yBAAgDA,WAAW,EAA3D;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAA4BC,eAA5B,gBAAeH,WAAf;;AACA,0BACE,gCAAcI,uBAAd;AAAA,gBAAiC,8BAAYL,IAAZ;AAAjC,6BACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBG,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;AAOD;;;EAlBkBE,e;;iCAAfT,M,iBACiB,c;iCADjBA,M,aAEa,CAAC,8BAAD,C;iCAFbA,M,kBAGkB;AACpBZ,EAAAA,IAAI,EAAJA,IADoB;AAEpBe,EAAAA,IAAI,EAAE;AAFc,C;;eAkBT,sBAAgBH,MAAhB,C","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/NoData/index.jsx"],"names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","NoData","asProps","Children","type","description","getI18nText","title","descriptionText","WidgetEmpty","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,EAAE,EAAFA,cAAF;AAAMC,EAAAA,EAAE,EAAFA,cAAN;AAAUC,EAAAA,EAAE,EAAFA,cAAV;AAAcC,EAAAA,EAAE,EAAFA,cAAd;AAAkBC,EAAAA,EAAE,EAAFA,cAAlB;AAAsBC,EAAAA,EAAE,EAAFA,cAAtB;AAA0BC,EAAAA,EAAE,EAAFA,cAA1B;AAA8BC,EAAAA,EAAE,EAAFA,cAA9B;AAAkCC,EAAAA,EAAE,EAAFA,cAAlC;AAAsCC,EAAAA,EAAE,EAAFA,cAAtC;AAA0CC,EAAAA,EAAE,EAAFA;AAA1C,CAAb;;IAEMC,M;;;;;;;;;;;;WAQJ,kBAAS;AAAA;AACP,0BAAqD,KAAKC,OAA1D;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,IAAlB,iBAAkBA,IAAlB;AAAA,UAAwBC,WAAxB,iBAAwBA,WAAxB;AAAA,UAAqCC,WAArC,iBAAqCA,WAArC;;AACA,yBAAgDA,WAAW,EAA3D;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAA4BC,eAA5B,gBAAeH,WAAf;;AACA,0BACE,gCAAcI,uBAAd;AAAA,gBAAiC,8BAAYL,IAAZ;AAAjC,6BACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBG,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;AAOD;;;EAlBkBE,e;;iCAAfT,M,iBACiB,c;iCADjBA,M,aAEa,CAAC,8BAAD,C;iCAFbA,M,kBAGkB;AACpBZ,EAAAA,IAAI,EAAJA,IADoB;AAEpBe,EAAAA,IAAI,EAAE;AAFc,C;;eAkBT,sBAAgBH,MAAhB,C","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
@@ -29,8 +29,6 @@ var _flexBox = require("@semcore/flex-box");
29
29
 
30
30
  var _isNode = _interopRequireDefault(require("@semcore/utils/lib/isNode"));
31
31
 
32
- var _this = void 0;
33
-
34
32
  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); }
35
33
 
36
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -58,7 +56,7 @@ _core.sstyled.insert(
58
56
  "__STitle": "___STitle_1ui0d_gg_",
59
57
  "__SDescription": "___SDescription_1ui0d_gg_"
60
58
  });
61
- var version = "2.6.6";
59
+ var version = "2.7.0";
62
60
 
63
61
  var getIconPath = function getIconPath(name) {
64
62
  return "https://static.semrush.com/ui-kit/widget-empty/".concat(version, "/").concat(name, ".svg");
@@ -79,7 +77,7 @@ var WidgetEmpty = /*#__PURE__*/function (_Component) {
79
77
  (0, _createClass2["default"])(WidgetEmpty, [{
80
78
  key: "render",
81
79
  value: function render() {
82
- var _ref = this ? this.asProps : arguments[0],
80
+ var _ref = this.asProps,
83
81
  _ref4;
84
82
 
85
83
  var SWidgetEmpty = _flexBox.Flex;
@@ -103,7 +101,7 @@ var WidgetEmpty = /*#__PURE__*/function (_Component) {
103
101
  (0, _defineProperty2["default"])(WidgetEmpty, "style", style);
104
102
 
105
103
  var Title = function Title(props) {
106
- var _ref2 = _this ? _this.asProps : arguments[0],
104
+ var _ref2 = arguments[0],
107
105
  _ref5;
108
106
 
109
107
  var STitle = _flexBox.Box;
@@ -112,7 +110,7 @@ var Title = function Title(props) {
112
110
  };
113
111
 
114
112
  var Description = function Description(props) {
115
- var _ref3 = _this ? _this.asProps : arguments[0],
113
+ var _ref3 = arguments[0],
116
114
  _ref6;
117
115
 
118
116
  var SDescription = _flexBox.Box;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/WidgetEmpty.jsx"],"names":["version","getIconPath","name","WidgetEmpty","SWidgetEmpty","Flex","asProps","Children","icon","styles","SImage","Component","style","Title","props","STitle","Box","Description","SDescription"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,OAAO,UAAb;;AAIO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD,EAAU;AACnC,kEAAyDF,OAAzD,cAAoEE,IAApE;AACD,CAFM;;;;IAIDC,W;;;;;;;;;;;;WAIJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,YAAY,GAKMC,aALxB;AACA,0BAAmC,KAAKC,OAAxC;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,IAAlB,iBAAkBA,IAAlB;AAAA,UAAwBC,MAAxB,iBAAwBA,MAAxB;AACA,UAAMC,MAAM,GAAG,KAAf;AAEA,qBAAO,mBAAQD,MAAR,CAAP,eACE,gCAAC,YAAD,iFACG,wBAAOD,IAAP,kBACC,gCAAC,MAAD,0BACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;AAAA,eAAUA,IAAV;AAAA,eAAoB,mBAApB;AAAA,iBAA+C,GAA/C;AAAA,kBAA4D;AAA5D,SADD,GAGCA,IAJJ,CAFJ,eAUE,gCAAC,QAAD,2BAVF,CADF;AAcD;;;EAvBuBG,e;;iCAApBR,W,iBACiB,a;iCADjBA,W,WAEWS,K;;AAwBjB,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD,EAAW;AAAA;AAAA;;AACvB,MAAMC,MAAM,GAE2BC,YAFvC;AACA,MAAQP,MAAR,GAAmBK,KAAnB,CAAQL,MAAR;AACA,iBAAO,mBAAQA,MAAR,CAAP,eAAuB,gCAAC,MAAD,2EAAvB;AACD,CAJD;;AAMA,IAAMQ,WAAW,GAAG,SAAdA,WAAc,CAACH,KAAD,EAAW;AAAA;AAAA;;AAC7B,MAAMI,YAAY,GAE2BF,YAF7C;AACA,MAAQP,MAAR,GAAmBK,KAAnB,CAAQL,MAAR;AACA,iBAAO,mBAAQA,MAAR,CAAP,eAAuB,gCAAC,YAAD,iFAAvB;AACD,CAJD;;eAMe,sBAAgBN,WAAhB,EAA6B;AAC1CU,EAAAA,KAAK,EAALA,KAD0C;AAE1CI,EAAAA,WAAW,EAAXA;AAF0C,CAA7B,C","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => {\n return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;\n};\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}>\n {isNode(icon) && (\n <SImage>\n {typeof icon === 'string' ? (\n <img src={icon} alt=\"widget empty icon\" width={100} height={72} />\n ) : (\n icon\n )}\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"],"file":"WidgetEmpty.js"}
1
+ {"version":3,"sources":["../../src/WidgetEmpty.jsx"],"names":["version","getIconPath","name","WidgetEmpty","SWidgetEmpty","Flex","asProps","Children","icon","styles","SImage","Component","style","Title","props","STitle","Box","Description","SDescription"],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,gCAAC,YAAD,iFAAvB;AACD,CAJD;;eAMe,sBAAgBN,WAAhB,EAA6B;AAC1CU,EAAAA,KAAK,EAALA,KAD0C;AAE1CI,EAAAA,WAAW,EAAXA;AAF0C,CAA7B,C","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => {\n return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;\n};\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}>\n {isNode(icon) && (\n <SImage>\n {typeof icon === 'string' ? (\n <img src={icon} alt=\"widget empty icon\" width={100} height={72} />\n ) : (\n icon\n )}\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"],"file":"WidgetEmpty.js"}
@@ -0,0 +1,65 @@
1
+ import { ComponentProps } from 'react';
2
+ import { CProps, ReturnEl } from '@semcore/core';
3
+ import { Box, IFlexProps } from '@semcore/flex-box';
4
+ import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
5
+
6
+ export type iconNames =
7
+ | 'area-chart'
8
+ | 'choropleth-map-chart'
9
+ | 'combined-chart'
10
+ | 'congrats'
11
+ | 'deleted-page'
12
+ | 'donut-chart'
13
+ | 'duplicates'
14
+ | 'funnel-chart'
15
+ | 'good'
16
+ | 'horizontal-bar-chart'
17
+ | 'line-chart'
18
+ | 'lollipop-chart'
19
+ | 'nexttime'
20
+ | 'nothing-found'
21
+ | 'other-data'
22
+ | 'pie-chart'
23
+ | 'processing'
24
+ | 'radar-chart'
25
+ | 'sankey-chart'
26
+ | 'scatter-plot-chart'
27
+ | 'stacked-area-chart'
28
+ | 'suggestions'
29
+ | 'table'
30
+ | 'tag-cloud'
31
+ | 'text-links-etc'
32
+ | 'venn-chart'
33
+ | 'vertical-bar-chart'
34
+ | 'warning';
35
+
36
+ export interface IWidgetEmptyProps extends IFlexProps {
37
+ /**
38
+ * URL before the icon or the whole component
39
+ */
40
+ icon?: React.ReactNode;
41
+ }
42
+
43
+ export interface IWidgetErrorProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
44
+ /** Error description. If it is absent, use the local default one */
45
+ description?: React.ReactNode;
46
+ }
47
+
48
+ export interface IWidgetNoDataProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
49
+ /** Error description. If it is absent, use the local default one */
50
+ description?: React.ReactNode;
51
+ /* Data types */
52
+ type?: iconNames;
53
+ }
54
+
55
+ declare const WidgetEmpty: (<T>(props: CProps<IWidgetEmptyProps> & T) => ReturnEl) & {
56
+ Title: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
57
+ Description: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
58
+ };
59
+
60
+ declare const NoData: <T>(props: CProps<IWidgetNoDataProps> & T) => ReturnEl;
61
+ declare const Error: <T>(props: CProps<IWidgetErrorProps> & T) => ReturnEl;
62
+ declare const getIconPath: (name: string) => string;
63
+
64
+ export default WidgetEmpty;
65
+ export { getIconPath, NoData, Error };
package/lib/cjs/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  var _typeof = require("@babel/runtime/helpers/typeof");
4
6
 
5
7
  Object.defineProperty(exports, "__esModule", {
@@ -42,33 +44,9 @@ Object.keys(_WidgetEmpty).forEach(function (key) {
42
44
  });
43
45
  });
44
46
 
45
- var _NoData = _interopRequireWildcard(require("./NoData"));
46
-
47
- Object.keys(_NoData).forEach(function (key) {
48
- if (key === "default" || key === "__esModule") return;
49
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
50
- if (key in exports && exports[key] === _NoData[key]) return;
51
- Object.defineProperty(exports, key, {
52
- enumerable: true,
53
- get: function get() {
54
- return _NoData[key];
55
- }
56
- });
57
- });
47
+ var _NoData = _interopRequireDefault(require("./NoData"));
58
48
 
59
- var _Error = _interopRequireWildcard(require("./Error"));
60
-
61
- Object.keys(_Error).forEach(function (key) {
62
- if (key === "default" || key === "__esModule") return;
63
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
64
- if (key in exports && exports[key] === _Error[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function get() {
68
- return _Error[key];
69
- }
70
- });
71
- });
49
+ var _Error = _interopRequireDefault(require("./Error"));
72
50
 
73
51
  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); }
74
52
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export { default } from './WidgetEmpty';\nexport * from './WidgetEmpty';\n\nexport { default as NoData } from './NoData';\nexport * from './NoData';\n\nexport { default as Error } from './Error';\nexport * from './Error';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAEA","sourcesContent":["export { default } from './WidgetEmpty';\nexport * from './WidgetEmpty';\n\nexport { default as NoData } from './NoData';\n\nexport { default as Error } from './Error';\n"],"file":"index.js"}
@@ -53,8 +53,7 @@ var Error = /*#__PURE__*/function (_Component) {
53
53
  _createClass(Error, [{
54
54
  key: "render",
55
55
  value: function render() {
56
- var _ref = this ? this.asProps : arguments[0];
57
-
56
+ var _ref = this.asProps;
58
57
  var _this$asProps = this.asProps,
59
58
  Children = _this$asProps.Children,
60
59
  description = _this$asProps.description,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Error/index.jsx"],"names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","Error","asProps","Children","description","getI18nText","title","descriptionText"],"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;AAEA,IAAMC,IAAI,GAAG;AAAEX,EAAAA,EAAE,EAAFA,EAAF;AAAMC,EAAAA,EAAE,EAAFA,EAAN;AAAUC,EAAAA,EAAE,EAAFA,EAAV;AAAcC,EAAAA,EAAE,EAAFA,EAAd;AAAkBC,EAAAA,EAAE,EAAFA,EAAlB;AAAsBC,EAAAA,EAAE,EAAFA,EAAtB;AAA0BE,EAAAA,EAAE,EAAFA,EAA1B;AAA8BC,EAAAA,EAAE,EAAFA,EAA9B;AAAkCF,EAAAA,EAAE,EAAFA,EAAlC;AAAsCG,EAAAA,EAAE,EAAFA,EAAtC;AAA0CC,EAAAA,EAAE,EAAFA;AAA1C,CAAb;;IAEME,K;;;;;;;;;;;;;WAOJ,kBAAS;AAAA;;AACP,0BAA+C,KAAKC,OAApD;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,WAAlB,iBAAkBA,WAAlB;AAAA,UAA+BC,WAA/B,iBAA+BA,WAA/B;;AACA,yBAAgDA,WAAW,EAA3D;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAA4BC,eAA5B,gBAAeH,WAAf;;AAEA,0BACE,oBAAcrB,WAAd;AAAA,gBAAiCC,WAAW,CAAC,SAAD;AAA5C,6BACE,oBAAC,WAAD,CAAa,KAAb,QAAoBsB,KAApB,CADF,eAEE,oBAAC,WAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,oBAAC,QAAD,OAHF,CADF;AAOD;;;;EAlBiBrB,S;;gBAAde,K,iBACiB,a;;gBADjBA,K,kBAEkB;AACpBD,EAAAA,IAAI,EAAJA;AADoB,C;;gBAFlBC,K,aAKa,CAACb,WAAW,EAAZ,C;;AAgBnB,eAAeH,eAAe,CAACgB,KAAD,CAA9B","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/Error/index.jsx"],"names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","Error","asProps","Children","description","getI18nText","title","descriptionText"],"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,w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Component, { 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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
@@ -53,8 +53,7 @@ var NoData = /*#__PURE__*/function (_Component) {
53
53
  _createClass(NoData, [{
54
54
  key: "render",
55
55
  value: function render() {
56
- var _ref = this ? this.asProps : arguments[0];
57
-
56
+ var _ref = this.asProps;
58
57
  var _this$asProps = this.asProps,
59
58
  Children = _this$asProps.Children,
60
59
  type = _this$asProps.type,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/NoData/index.jsx"],"names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","NoData","asProps","Children","type","description","getI18nText","title","descriptionText"],"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;AAC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0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,oBAAC,QAAD,OAHF,CADF;AAOD;;;;EAlBkBtB,S;;gBAAfe,M,iBACiB,c;;gBADjBA,M,aAEa,CAACb,WAAW,EAAZ,C;;gBAFba,M,kBAGkB;AACpBD,EAAAA,IAAI,EAAJA,IADoB;AAEpBI,EAAAA,IAAI,EAAE;AAFc,C;;AAkBxB,eAAenB,eAAe,CAACgB,MAAD,CAA9B","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/NoData/index.jsx"],"names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","NoData","asProps","Children","type","description","getI18nText","title","descriptionText"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IA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AAA,gBAAiCC,WAAW,CAACoB,IAAD;AAA5C,6BACE,oBAAC,WAAD,CAAa,KAAb,QAAoBG,KAApB,CADF,eAEE,oBAAC,WAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,oBAAC,QAAD,OAHF,CADF;AAOD;;;;EAlBkBtB,S;;gBAAfe,M,iBACiB,c;;gBADjBA,M,aAEa,CAACb,WAAW,EAAZ,C;;gBAFba,M,kBAGkB;AACpBD,EAAAA,IAAI,EAAJA,IADoB;AAEpBI,EAAAA,IAAI,EAAE;AAFc,C;;AAkBxB,eAAenB,eAAe,CAACgB,MAAD,CAA9B","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';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\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"],"file":"index.js"}
@@ -9,8 +9,6 @@ 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
 
12
- var _this = this;
13
-
14
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
13
 
16
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -39,7 +37,7 @@ _sstyled.insert(
39
37
  "__STitle": "___STitle_1ui0d_gg_",
40
38
  "__SDescription": "___SDescription_1ui0d_gg_"
41
39
  });
42
- var version = "2.6.6";
40
+ var version = "2.7.0";
43
41
  export var getIconPath = function getIconPath(name) {
44
42
  return "https://static.semrush.com/ui-kit/widget-empty/".concat(version, "/").concat(name, ".svg");
45
43
  };
@@ -58,7 +56,7 @@ var WidgetEmpty = /*#__PURE__*/function (_Component) {
58
56
  _createClass(WidgetEmpty, [{
59
57
  key: "render",
60
58
  value: function render() {
61
- var _ref = this ? this.asProps : arguments[0],
59
+ var _ref = this.asProps,
62
60
  _ref4;
63
61
 
64
62
  var SWidgetEmpty = Flex;
@@ -84,7 +82,7 @@ _defineProperty(WidgetEmpty, "displayName", 'WidgetEmpty');
84
82
  _defineProperty(WidgetEmpty, "style", style);
85
83
 
86
84
  var Title = function Title(props) {
87
- var _ref2 = _this ? _this.asProps : arguments[0],
85
+ var _ref2 = arguments[0],
88
86
  _ref5;
89
87
 
90
88
  var STitle = Box;
@@ -93,7 +91,7 @@ var Title = function Title(props) {
93
91
  };
94
92
 
95
93
  var Description = function Description(props) {
96
- var _ref3 = _this ? _this.asProps : arguments[0],
94
+ var _ref3 = arguments[0],
97
95
  _ref6;
98
96
 
99
97
  var SDescription = Box;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/WidgetEmpty.jsx"],"names":["React","createComponent","Component","sstyled","Root","Box","Flex","isNode","version","getIconPath","name","WidgetEmpty","SWidgetEmpty","asProps","Children","icon","styles","SImage","style","Title","props","STitle","Description","SDescription"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,IAA9C,QAA0D,eAA1D;AACA,SAASC,GAAT,EAAcC,IAAd,QAA0B,mBAA1B;AACA,OAAOC,MAAP,MAAmB,2BAAnB;;;;;;;;;;;;;;;;;AAIA,IAAMC,OAAO,UAAb;AAIA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD,EAAU;AACnC,kEAAyDF,OAAzD,cAAoEE,IAApE;AACD,CAFM;;IAIDC,W;;;;;;;;;;;;;WAIJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,YAAY,GAKMN,IALxB;AACA,0BAAmC,KAAKO,OAAxC;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,IAAlB,iBAAkBA,IAAlB;AAAA,UAAwBC,MAAxB,iBAAwBA,MAAxB;AACA,UAAMC,MAAM,GAAG,KAAf;AAEA,qBAAOd,OAAO,CAACa,MAAD,CAAd,eACE,oBAAC,YAAD,uEACGT,MAAM,CAACQ,IAAD,CAAN,iBACC,oBAAC,MAAD,0BACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;AAAA,eAAUA,IAAV;AAAA,eAAoB,mBAApB;AAAA,iBAA+C,GAA/C;AAAA,kBAA4D;AAA5D,SADD,GAGCA,IAJJ,CAFJ,eAUE,oBAAC,QAAD,2BAVF,CADF;AAcD;;;;EAvBuBb,S;;gBAApBS,W,iBACiB,a;;gBADjBA,W,WAEWO,K;;AAwBjB,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD,EAAW;AAAA;AAAA;;AACvB,MAAMC,MAAM,GAE2BhB,GAFvC;AACA,MAAQW,MAAR,GAAmBI,KAAnB,CAAQJ,MAAR;AACA,iBAAOb,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,MAAD,kEAAvB;AACD,CAJD;;AAMA,IAAMM,WAAW,GAAG,SAAdA,WAAc,CAACF,KAAD,EAAW;AAAA;AAAA;;AAC7B,MAAMG,YAAY,GAE2BlB,GAF7C;AACA,MAAQW,MAAR,GAAmBI,KAAnB,CAAQJ,MAAR;AACA,iBAAOb,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,YAAD,wEAAvB;AACD,CAJD;;AAMA,eAAef,eAAe,CAACU,WAAD,EAAc;AAC1CQ,EAAAA,KAAK,EAALA,KAD0C;AAE1CG,EAAAA,WAAW,EAAXA;AAF0C,CAAd,CAA9B","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => {\n return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;\n};\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}>\n {isNode(icon) && (\n <SImage>\n {typeof icon === 'string' ? (\n <img src={icon} alt=\"widget empty icon\" width={100} height={72} />\n ) : (\n icon\n )}\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"],"file":"WidgetEmpty.js"}
1
+ {"version":3,"sources":["../../src/WidgetEmpty.jsx"],"names":["React","createComponent","Component","sstyled","Root","Box","Flex","isNode","version","getIconPath","name","WidgetEmpty","SWidgetEmpty","asProps","Children","icon","styles","SImage","style","Title","props","STitle","Description","SDescription"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,IAA9C,QAA0D,eAA1D;AACA,SAASC,GAAT,EAAcC,IAAd,QAA0B,mBAA1B;AACA,OAAOC,MAAP,MAAmB,2BAAnB;;;;;;;;;;;;;;;;;AAIA,IAAMC,OAAO,UAAb;AAIA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD,EAAU;AACnC,kEAAyDF,OAAzD,cAAoEE,IAApE;AACD,CAFM;;IAIDC,W;;;;;;;;;;;;;WAIJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,YAAY,GAKMN,IALxB;AACA,0BAAmC,KAAKO,OAAxC;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,IAAlB,iBAAkBA,IAAlB;AAAA,UAAwBC,MAAxB,iBAAwBA,MAAxB;AACA,UAAMC,MAAM,GAAG,KAAf;AAEA,qBAAOd,OAAO,CAACa,MAAD,CAAd,eACE,oBAAC,YAAD,uEACGT,MAAM,CAACQ,IAAD,CAAN,iBACC,oBAAC,MAAD,0BACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;AAAA,eAAUA,IAAV;AAAA,eAAoB,mBAApB;AAAA,iBAA+C,GAA/C;AAAA,kBAA4D;AAA5D,SADD,GAGCA,IAJJ,CAFJ,eAUE,oBAAC,QAAD,2BAVF,CADF;AAcD;;;;EAvBuBb,S;;gBAApBS,W,iBACiB,a;;gBADjBA,W,WAEWO,K;;AAwBjB,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD,EAAW;AAAA;AAAA;;AACvB,MAAMC,MAAM,GAE2BhB,GAFvC;AACA,MAAQW,MAAR,GAAmBI,KAAnB,CAAQJ,MAAR;AACA,iBAAOb,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,MAAD,kEAAvB;AACD,CAJD;;AAMA,IAAMM,WAAW,GAAG,SAAdA,WAAc,CAACF,KAAD,EAAW;AAAA;AAAA;;AAC7B,MAAMG,YAAY,GAE2BlB,GAF7C;AACA,MAAQW,MAAR,GAAmBI,KAAnB,CAAQJ,MAAR;AACA,iBAAOb,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,YAAD,wEAAvB;AACD,CAJD;;AAMA,eAAef,eAAe,CAACU,WAAD,EAAc;AAC1CQ,EAAAA,KAAK,EAALA,KAD0C;AAE1CG,EAAAA,WAAW,EAAXA;AAF0C,CAAd,CAA9B","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => {\n return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;\n};\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}>\n {isNode(icon) && (\n <SImage>\n {typeof icon === 'string' ? (\n <img src={icon} alt=\"widget empty icon\" width={100} height={72} />\n ) : (\n icon\n )}\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"],"file":"WidgetEmpty.js"}
@@ -0,0 +1,65 @@
1
+ import { ComponentProps } from 'react';
2
+ import { CProps, ReturnEl } from '@semcore/core';
3
+ import { Box, IFlexProps } from '@semcore/flex-box';
4
+ import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
5
+
6
+ export type iconNames =
7
+ | 'area-chart'
8
+ | 'choropleth-map-chart'
9
+ | 'combined-chart'
10
+ | 'congrats'
11
+ | 'deleted-page'
12
+ | 'donut-chart'
13
+ | 'duplicates'
14
+ | 'funnel-chart'
15
+ | 'good'
16
+ | 'horizontal-bar-chart'
17
+ | 'line-chart'
18
+ | 'lollipop-chart'
19
+ | 'nexttime'
20
+ | 'nothing-found'
21
+ | 'other-data'
22
+ | 'pie-chart'
23
+ | 'processing'
24
+ | 'radar-chart'
25
+ | 'sankey-chart'
26
+ | 'scatter-plot-chart'
27
+ | 'stacked-area-chart'
28
+ | 'suggestions'
29
+ | 'table'
30
+ | 'tag-cloud'
31
+ | 'text-links-etc'
32
+ | 'venn-chart'
33
+ | 'vertical-bar-chart'
34
+ | 'warning';
35
+
36
+ export interface IWidgetEmptyProps extends IFlexProps {
37
+ /**
38
+ * URL before the icon or the whole component
39
+ */
40
+ icon?: React.ReactNode;
41
+ }
42
+
43
+ export interface IWidgetErrorProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
44
+ /** Error description. If it is absent, use the local default one */
45
+ description?: React.ReactNode;
46
+ }
47
+
48
+ export interface IWidgetNoDataProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
49
+ /** Error description. If it is absent, use the local default one */
50
+ description?: React.ReactNode;
51
+ /* Data types */
52
+ type?: iconNames;
53
+ }
54
+
55
+ declare const WidgetEmpty: (<T>(props: CProps<IWidgetEmptyProps> & T) => ReturnEl) & {
56
+ Title: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
57
+ Description: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
58
+ };
59
+
60
+ declare const NoData: <T>(props: CProps<IWidgetNoDataProps> & T) => ReturnEl;
61
+ declare const Error: <T>(props: CProps<IWidgetErrorProps> & T) => ReturnEl;
62
+ declare const getIconPath: (name: string) => string;
63
+
64
+ export default WidgetEmpty;
65
+ export { getIconPath, NoData, Error };
package/lib/es6/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  export { default } from './WidgetEmpty';
2
2
  export * from './WidgetEmpty';
3
3
  export { default as NoData } from './NoData';
4
- export * from './NoData';
5
4
  export { default as Error } from './Error';
6
- export * from './Error';
7
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.js"],"names":["default","NoData","Error"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB;AACA,cAAc,eAAd;AAEA,SAASA,OAAO,IAAIC,MAApB,QAAkC,UAAlC;AACA,cAAc,UAAd;AAEA,SAASD,OAAO,IAAIE,KAApB,QAAiC,SAAjC;AACA,cAAc,SAAd","sourcesContent":["export { default } from './WidgetEmpty';\nexport * from './WidgetEmpty';\n\nexport { default as NoData } from './NoData';\nexport * from './NoData';\n\nexport { default as Error } from './Error';\nexport * from './Error';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.js"],"names":["default","NoData","Error"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB;AACA,cAAc,eAAd;AAEA,SAASA,OAAO,IAAIC,MAApB,QAAkC,UAAlC;AAEA,SAASD,OAAO,IAAIE,KAApB,QAAiC,SAAjC","sourcesContent":["export { default } from './WidgetEmpty';\nexport * from './WidgetEmpty';\n\nexport { default as NoData } from './NoData';\n\nexport { default as Error } from './Error';\n"],"file":"index.js"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/widget-empty",
3
3
  "description": "SEMRush WidgetEmpty Component",
4
- "version": "2.6.6",
4
+ "version": "2.7.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -28,5 +28,8 @@
28
28
  "type": "git",
29
29
  "url": "https://github.com/semrush/intergalactic.git",
30
30
  "directory": "semcore/widget-empty"
31
+ },
32
+ "devDependencies": {
33
+ "@semcore/jest-preset-ui": "1.0.0"
31
34
  }
32
35
  }
package/src/index.js CHANGED
@@ -2,7 +2,5 @@ export { default } from './WidgetEmpty';
2
2
  export * from './WidgetEmpty';
3
3
 
4
4
  export { default as NoData } from './NoData';
5
- export * from './NoData';
6
5
 
7
6
  export { default as Error } from './Error';
8
- export * from './Error';
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="72" viewBox="0 0 100 72">
2
+ <g fill="none" transform="translate(1 12)">
3
+ <path fill="#CBD1D3"
4
+ d="M56 18H42a3 3 0 00-3 3v8a3 3 0 003 3h14a3 3 0 003-3v-8a3 3 0 00-3-3zm-14 2h14a1 1 0 011 1v8a1 1 0 01-1 1H42a1 1 0 01-1-1v-8a1 1 0 011-1z" />
5
+ <path fill="#CBD1D3"
6
+ d="M39.81 25.4l13.06-7.027a1 1 0 011.34.38l.015.026a.97.97 0 01-.38 1.34l-13.062 7.027a1 1 0 01-1.34-.38l-.015-.027a.97.97 0 01.381-1.34zM43.96 29.842l13.061-7.239a1 1 0 011.351.375l.009.015a.983.983 0 01-.375 1.35l-13.061 7.24a1 1 0 01-1.351-.375l-.009-.015a.983.983 0 01.375-1.35zM17 0H3a3 3 0 00-3 3v8a3 3 0 003 3h14a3 3 0 003-3V3a3 3 0 00-3-3zM3 2h14a1 1 0 011 1v8a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1z" />
7
+ <rect width="18" height="12" x="79" y="1" fill="#EEF0F1" rx="2" />
8
+ <rect width="18" height="12" x="1" y="37" fill="#EEF0F1" rx="2" />
9
+ <path fill="#CBD1D3"
10
+ d="M95 0H81a3 3 0 00-3 3v8a3 3 0 003 3h14a3 3 0 003-3V3a3 3 0 00-3-3zM81 2h14a1 1 0 011 1v8a1 1 0 01-1 1H81a1 1 0 01-1-1V3a1 1 0 011-1zM17 36H3a3 3 0 00-3 3v8a3 3 0 003 3h14a3 3 0 003-3v-8a3 3 0 00-3-3zM3 38h14a1 1 0 011 1v8a1 1 0 01-1 1H3a1 1 0 01-1-1v-8a1 1 0 011-1zm92-2H81a3 3 0 00-3 3v8a3 3 0 003 3h14a3 3 0 003-3v-8a3 3 0 00-3-3zm-14 2h14a1 1 0 011 1v8a1 1 0 01-1 1H81a1 1 0 01-1-1v-8a1 1 0 011-1z" />
11
+ <g fill="#CBD1D3">
12
+ <path
13
+ d="M24.05 12.107a1 1 0 011.343.444c1.582 3.143 4.41 5.657 8.523 7.54a1 1 0 11-.832 1.818c-4.505-2.062-7.677-4.882-9.477-8.46a1 1 0 01.444-1.342zM24.108 37.92a1 1 0 001.312-.528c1.604-3.767 4.424-6.587 8.502-8.485a1 1 0 00-.844-1.814c-4.516 2.102-7.696 5.282-9.498 9.515a1 1 0 00.528 1.312z" />
14
+ </g>
15
+ <g fill="#CBD1D3">
16
+ <path
17
+ d="M73.491 12.13a1 1 0 00-1.362.379c-1.802 3.194-4.646 5.721-8.56 7.588a1 1 0 10.862 1.806c4.27-2.038 7.426-4.843 9.44-8.412a1 1 0 00-.38-1.362zM73.437 37.9a1 1 0 01-1.336-.463c-1.848-3.8-4.687-6.638-8.543-8.54a1 1 0 11.884-1.794c4.253 2.098 7.414 5.26 9.457 9.46a1 1 0 01-.462 1.336z" />
18
+ </g>
19
+ </g>
20
+ </svg>