@semcore/widget-empty 3.0.2 → 3.2.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +67 -0
  3. package/lib/cjs/Error/index.js.map +1 -1
  4. package/lib/cjs/NoData/index.js.map +1 -1
  5. package/lib/cjs/WidgetEmpty.js +7 -7
  6. package/lib/cjs/WidgetEmpty.js.map +1 -1
  7. package/lib/cjs/index.d.ts +2 -2
  8. package/lib/cjs/index.js.map +1 -1
  9. package/lib/es6/Error/index.js.map +1 -1
  10. package/lib/es6/NoData/index.js.map +1 -1
  11. package/lib/es6/WidgetEmpty.js +7 -7
  12. package/lib/es6/WidgetEmpty.js.map +1 -1
  13. package/lib/es6/index.d.ts +2 -2
  14. package/lib/es6/index.js.map +1 -1
  15. package/lib/types/index.d.ts +2 -2
  16. package/package.json +2 -2
  17. package/svg/area-chart.svg +12 -5
  18. package/svg/choropleth-map-chart.svg +14 -4
  19. package/svg/combined-chart.svg +22 -5
  20. package/svg/congrats.svg +26 -3
  21. package/svg/donut-chart.svg +17 -6
  22. package/svg/funnel-chart.svg +17 -3
  23. package/svg/heat-map-chart.svg +26 -11
  24. package/svg/horizontal-bar-chart.svg +18 -6
  25. package/svg/kagi-chart.svg +10 -2
  26. package/svg/line-chart.svg +11 -4
  27. package/svg/lollipop-chart.svg +13 -10
  28. package/svg/nothing-found.svg +20 -4
  29. package/svg/pie-chart.svg +15 -5
  30. package/svg/radar-chart.svg +17 -16
  31. package/svg/sankey-chart.svg +16 -8
  32. package/svg/scatter-plot-chart.svg +19 -7
  33. package/svg/stacked-area-chart.svg +16 -9
  34. package/svg/tag-cloud.svg +25 -3
  35. package/svg/venn-chart.svg +19 -10
  36. package/svg/vertical-bar-chart.svg +13 -5
  37. package/src/Error/index.jsx +0 -40
  38. package/src/Error/translations/de.json +0 -4
  39. package/src/Error/translations/en.json +0 -4
  40. package/src/Error/translations/es.json +0 -4
  41. package/src/Error/translations/fr.json +0 -4
  42. package/src/Error/translations/it.json +0 -4
  43. package/src/Error/translations/ja.json +0 -4
  44. package/src/Error/translations/ko.json +0 -4
  45. package/src/Error/translations/pt.json +0 -4
  46. package/src/Error/translations/ru.json +0 -4
  47. package/src/Error/translations/vi.json +0 -4
  48. package/src/Error/translations/zh.json +0 -4
  49. package/src/NoData/index.jsx +0 -40
  50. package/src/NoData/translations/de.json +0 -4
  51. package/src/NoData/translations/en.json +0 -4
  52. package/src/NoData/translations/es.json +0 -4
  53. package/src/NoData/translations/fr.json +0 -4
  54. package/src/NoData/translations/it.json +0 -4
  55. package/src/NoData/translations/ja.json +0 -4
  56. package/src/NoData/translations/ko.json +0 -4
  57. package/src/NoData/translations/pt.json +0 -4
  58. package/src/NoData/translations/ru.json +0 -4
  59. package/src/NoData/translations/vi.json +0 -4
  60. package/src/NoData/translations/zh.json +0 -4
  61. package/src/WidgetEmpty.jsx +0 -57
  62. package/src/index.d.ts +0 -71
  63. package/src/index.js +0 -6
  64. package/src/style/widget-empty.shadow.css +0 -41
@@ -1,11 +1,20 @@
1
- <svg width="100" height="72" viewBox="0 0 100 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M12 3a1 1 0 1 1 2 0v68a1 1 0 1 1-2 0V3Z" fill="#A9ABB6"/>
3
- <path d="M12 71a1 1 0 0 1 1-1h65a1 1 0 1 1 0 2H13a1 1 0 0 1-1-1ZM82 71a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2h-4a1 1 0 0 1-1-1Z" fill="#A9ABB6"/>
4
- <path d="M82 71a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2h-4a1 1 0 0 1-1-1Z" fill="#A9ABB6"/>
5
- <path fill-rule="evenodd" clip-rule="evenodd" d="M50 29a14 14 0 1 0 28 0 14 14 0 0 0-28 0Zm26 0a12 12 0 1 1-24 0 12 12 0 0 1 24 0Z" fill="#A9ABB6"/>
6
- <path fill-rule="evenodd" clip-rule="evenodd" d="M28 42a18 18 0 1 0 36 0 18 18 0 0 0-36 0Zm34 0a16 16 0 1 1-32 0 16 16 0 0 1 32 0Z" fill="#A9ABB6"/>
7
- <path d="M46 58a16 16 0 1 0 0-32 16 16 0 0 0 0 32Z" fill="#E0E1E9"/>
8
- <path fill-rule="evenodd" clip-rule="evenodd" d="M50.7 25a14 14 0 0 0 13.25 18.35c.02-.33.05-.66.05-1A18 18 0 0 0 50.7 25Zm1.43 2.6a16.03 16.03 0 0 1 9.83 13.58 12.03 12.03 0 0 1-9.83-13.58Z" fill="#A9ABB6"/>
9
- <path d="M52.13 27.6a16.03 16.03 0 0 1 9.83 13.58 12.03 12.03 0 0 1-9.83-13.58Z" fill="#fff"/>
10
- <path d="M50.38 32.07a1 1 0 0 1 .44-1.4l5.34-2.54 1 1.74-5.49 2.6a1 1 0 0 1-1.29-.4ZM53.23 36.53a1 1 0 0 1 .4-1.38l5.81-3.07a1 1 0 0 1 .94 1.77l-5.82 3.07a1 1 0 0 1-1.34-.39ZM57.13 40.23a1 1 0 0 1 .34-1.35l4.02-2.46a1 1 0 0 1 1.04 1.7l-4.02 2.46a1 1 0 0 1-1.38-.35Z" fill="#A9ABB6"/>
1
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3 40.99A38.86 38.86 0 0 0 41.24 79c.5 0 .92-.41.92-.9v-2.47C61.94 75.63 78 59.66 78 40 78 20.34 61.94 4.37 42.16 4.37V1.91c0-.5-.42-.91-.91-.91a39.36 39.36 0 0 0-26.16 10.78.9.9 0 0 0 0 1.23l1.73 1.73a35.4 35.4 0 0 0-10.5 25.18h-2.5c-.4.16-.82.57-.82 1.07Z" fill="#E0E1E9"/>
3
+ <path d="M65.92 57.6s.1-.05.12-.08l6.5-4.32-3.14-1.7-3.13.76-8.3-31.68a5.7 5.7 0 0 0-6.68-4.15L11.7 24.5l-1.4-3.12-3.4 5.88-.22.37v.02a5.64 5.64 0 0 0-.46 4.25l10.44 36.64a2.59 2.59 0 0 0 3.18 1.8L65.11 58c.27-.08.52-.21.75-.35l.05-.03.01-.01Z" fill="#E0E1E9" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="m71.76 53.55-47.67 13a2.73 2.73 0 0 1-3.35-1.89l-11-38.59a6.03 6.03 0 0 1 4.6-7.55L57.2 9.77a6.02 6.02 0 0 1 7.03 4.38l9.44 36.07a2.73 2.73 0 0 1-1.92 3.33Z" fill="#fff"/>
5
+ <path d="M65.45 18.82 11.06 30.76l-1.34-4.69a6.03 6.03 0 0 1 4.6-7.55L57.2 9.77a6.02 6.02 0 0 1 7.03 4.38l1.22 4.67Z" fill="#6C6E79"/>
6
+ <path d="M18.4 23.42a1.87 1.87 0 0 1-1.42 2.37 2.19 2.19 0 0 1-2.53-1.53 1.87 1.87 0 0 1 1.43-2.37 2.2 2.2 0 0 1 2.51 1.54v-.01Z" fill="#fff"/>
7
+ <path d="M25.37 21.94c.3 1.06-.32 2.1-1.4 2.33a2.15 2.15 0 0 1-2.47-1.52 1.85 1.85 0 0 1 1.4-2.35 2.14 2.14 0 0 1 2.47 1.53Z" fill="#E0E1E9"/>
8
+ <path d="M11.09 30.84s.32-3.15.6-6.38l-1.37-3.09-3.42 5.88a6.5 6.5 0 0 0-.21.37v.02a5.64 5.64 0 0 0-.46 4.25l1.4 4.9 3.46-5.96v.01Z" fill="#6C6E79"/>
9
+ <path d="m71.76 53.55-47.67 13a2.73 2.73 0 0 1-3.35-1.89l-11-38.59a6.03 6.03 0 0 1 4.6-7.55L57.2 9.77a6.02 6.02 0 0 1 7.03 4.38l9.44 36.07a2.73 2.73 0 0 1-1.92 3.33Z" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
10
+ <path d="m67.07 51.28-38.9 10.47-8.37-29.52" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <path d="M50.83 41.06c1.36 5-2.14 10.26-7.9 11.77-5.85 1.53-11.8-1.35-13.22-6.48-1.43-5.13 2.26-10.47 8.17-11.87 5.82-1.39 11.59 1.58 12.95 6.58Z" fill="#6C6E79" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
12
+ <path d="M57.36 31.9c1.03 3.82-1.61 7.77-5.96 8.86-4.39 1.1-8.85-1.15-9.9-5.04-1.08-3.9 1.68-7.91 6.1-8.94 4.37-1.02 8.73 1.28 9.76 5.11Z" fill="#fff" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
13
+ <path d="M41.26 34.15c.01.52.08 1.04.23 1.57 1.02 3.7 5.11 5.92 9.28 5.18-1.16-3.94-5.04-6.56-9.5-6.74v0Z" fill="#E0E1E9" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
14
+ <mask id="a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="40" y="33" width="12" height="9">
15
+ <path d="M41.26 34.15c.01.52.08 1.04.23 1.57 1.02 3.7 5.11 5.92 9.28 5.18-1.16-3.94-5.04-6.56-9.5-6.74v0Z" fill="#45DFA7" stroke="#000" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
16
+ </mask>
17
+ <g mask="url(#a)" stroke="#6C6E79" stroke-width=".7" stroke-miterlimit="10">
18
+ <path d="m46.18 25.45-8.43 12.3M49.79 27.93l-8.43 12.29M53.4 30.4 43.8 44.4M57 32.88l-9.24 13.49"/>
19
+ </g>
11
20
  </svg>
@@ -1,6 +1,14 @@
1
- <svg width="100" height="72" viewBox="0 0 100 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M12 71a1 1 0 0 1 1-1h65a1 1 0 1 1 0 2H13a1 1 0 0 1-1-1ZM82 71a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2h-4a1 1 0 0 1-1-1Z" fill="#A9ABB6"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M35 42h-6a4 4 0 0 0-4 4v20h14V46a4 4 0 0 0-4-4Zm2 22H27V46c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v18ZM71 32h-6a4 4 0 0 0-4 4v30h14V36a4 4 0 0 0-4-4Zm2 32H63V36c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v28ZM53 24h-6a4 4 0 0 0-4 4v38h14V28a4 4 0 0 0-4-4Zm2 40H45V28c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v36Z" fill="#A9ABB6"/>
4
- <path d="M45 64h10V28a2 2 0 0 0-2-2h-6a2 2 0 0 0-2 2v36Z" fill="#E0E1E9"/>
5
- <path d="M26.36 51.03a1 1 0 0 1 .4-1.38l9.55-5.06a1 1 0 1 1 .93 1.76l-9.55 5.06a1 1 0 0 1-1.33-.38ZM25.23 58.54a1 1 0 0 1 .4-1.39l11.82-6.08a1 1 0 0 1 .91 1.78l-11.8 6.08a1 1 0 0 1-1.33-.39ZM26.13 65.24a1 1 0 0 1 .36-1.36l11-6.48a1 1 0 0 1 1.02 1.72l-11 6.48a1 1 0 0 1-1.38-.36Z" fill="#A9ABB6"/>
1
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M40.58 79C62 78.73 79 60.87 79 39.4V2a1 1 0 0 0-.99-.99H53.99A1 1 0 0 0 53 2v2.7H27.99a1 1 0 0 0-.99.99v34.35H1.99a1 1 0 0 0-.99 1A39.17 39.17 0 0 0 40.58 79Z" fill="#E0E1E9"/>
3
+ <path d="M65.92 57.6s.1-.05.12-.08l6.5-4.32-3.14-1.7-3.13.76-8.3-31.68a5.7 5.7 0 0 0-6.68-4.15L11.7 24.5l-1.4-3.12-3.4 5.88a6.5 6.5 0 0 0-.22.37v.02a5.64 5.64 0 0 0-.46 4.25l10.44 36.64a2.59 2.59 0 0 0 3.18 1.8L65.11 58c.27-.08.52-.2.75-.35l.05-.03.01-.01Z" fill="#E0E1E9" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="m71.76 53.55-47.67 13a2.73 2.73 0 0 1-3.35-1.89l-11-38.59a6.03 6.03 0 0 1 4.6-7.55l42.88-8.75a6.02 6.02 0 0 1 7.02 4.38l9.45 36.07a2.73 2.73 0 0 1-1.93 3.33Z" fill="#fff"/>
5
+ <path d="M65.45 18.82 11.07 30.76l-1.34-4.69a6.03 6.03 0 0 1 4.6-7.55L57.2 9.77a6.02 6.02 0 0 1 7.02 4.38l1.22 4.67Z" fill="#6C6E79"/>
6
+ <path d="M18.4 23.42a1.87 1.87 0 0 1-1.42 2.37 2.19 2.19 0 0 1-2.53-1.53 1.87 1.87 0 0 1 1.43-2.37 2.2 2.2 0 0 1 2.51 1.54v-.01Z" fill="#fff"/>
7
+ <path d="M25.38 21.94c.29 1.06-.33 2.1-1.4 2.33a2.15 2.15 0 0 1-2.47-1.52 1.85 1.85 0 0 1 1.4-2.35 2.14 2.14 0 0 1 2.47 1.53Z" fill="#E0E1E9"/>
8
+ <path d="M11.09 30.84s.32-3.15.6-6.38l-1.37-3.09-3.42 5.88a6.5 6.5 0 0 0-.21.37v.02a5.64 5.64 0 0 0-.46 4.25l1.4 4.9 3.46-5.96v.01Z" fill="#6C6E79"/>
9
+ <path d="m71.76 53.55-47.67 13a2.73 2.73 0 0 1-3.35-1.89l-11-38.59a6.03 6.03 0 0 1 4.6-7.55l42.88-8.75a6.02 6.02 0 0 1 7.02 4.38l9.45 36.07a2.73 2.73 0 0 1-1.93 3.33Z" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
10
+ <path d="m34 41.8-7.06 1.71a.8.8 0 0 0-.57.99l3.34 11.92 8.5-2.22-3.27-11.84a.8.8 0 0 0-.95-.56H34Z" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <path d="M44.22 28.76 37.4 30.3c-.45.1-.7.54-.59.99L42.8 53 51 50.87l-5.83-21.55a.78.78 0 0 0-.94-.56h-.01Z" fill="#6C6E79" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
12
+ <path d="m58.28 31.6-6.49 1.52c-.43.1-.7.54-.58.97l4.19 15.64 7.93-2.06-4.1-15.5a.79.79 0 0 0-.93-.56h-.02Z" fill="#E0E1E9" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
13
+ <path d="M23.36 61.28 70.2 48.9M27.56 48.6l4.3-6.28M35.5 44.76l-6.42 9.36M33.5 55.42l3.6-5.25" stroke="#6C6E79" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round"/>
6
14
  </svg>
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
3
- import createComponent, { Component, Root } from '@semcore/core';
4
- import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
5
- import de from './translations/de.json';
6
- import en from './translations/en.json';
7
- import es from './translations/es.json';
8
- import fr from './translations/fr.json';
9
- import it from './translations/it.json';
10
- import ja from './translations/ja.json';
11
- import pt from './translations/pt.json';
12
- import ru from './translations/ru.json';
13
- import zh from './translations/zh.json';
14
- import ko from './translations/ko.json';
15
- import vi from './translations/vi.json';
16
-
17
- const i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };
18
-
19
- class Error extends Component {
20
- static displayName = 'WidgetError';
21
- static defaultProps = {
22
- i18n,
23
- };
24
- static enhance = [i18nEnhance()];
25
-
26
- render() {
27
- const { Children, description, getI18nText } = this.asProps;
28
- const { title, description: descriptionText } = getI18nText();
29
-
30
- return (
31
- <Root render={WidgetEmpty} icon={getIconPath('warning')}>
32
- <WidgetEmpty.Title>{title}</WidgetEmpty.Title>
33
- <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>
34
- <Children />
35
- </Root>
36
- );
37
- }
38
- }
39
-
40
- export default createComponent(Error);
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Es ist ein Fehler aufgetreten",
3
- "description": "Keine Sorge – wir wissen von dem Problem und arbeiten an seiner Behebung. Bitte versuchen Sie es später erneut."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Something went wrong",
3
- "description": "Don't worry though, we are aware of the issue and are working to fix it. Please try again later."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Algo salió mal",
3
- "description": "De todas maneras no te preocupes, estamos al corriente del problema y estamos tratando de solucionarlo. Inténtalo de nuevo más tarde."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Une erreur est survenue",
3
- "description": "Ne vous inquiétez pas, nous avons connaissance du problème et travaillons pour le réparer. Veuillez réessayer plus tard."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Si è verificato un errore",
3
- "description": "Ma non preoccuparti, siamo a conoscenza del problema e stiamo lavorando per porvi rimedio. Riprova più tardi."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "エラーが発生しました",
3
- "description": "私たちは問題を把握し、解決に向けて取り組んでおります。ご安心ください。後で再試行してください。"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "오류가 발생했습니다",
3
- "description": "문제를 파악했으며 해결 중입니다. 나중에 다시 시도해 주세요."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Algo deu errado",
3
- "description": "Não se preocupe, estamos cientes do problema e estamos trabalhando para resolvê-lo. Tente novamente mais tarde."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Произошла ошибка",
3
- "description": "Мы уже знаем об этой проблеме и в настоящий момент устраняем ее. Повторите попытку позже."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Đã xảy ra lỗi",
3
- "description": "Đừng lo lắng, chúng tôi đã nhận thấy vấn đề và đang khắc phục nó. Vui lòng thử lại sau."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "出错了",
3
- "description": "不过别担心,我们已发现问题,正在努力解决。请稍后重试。"
4
- }
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
3
- import createComponent, { Component, Root } from '@semcore/core';
4
- import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
5
- import de from './translations/de.json';
6
- import en from './translations/en.json';
7
- import es from './translations/es.json';
8
- import fr from './translations/fr.json';
9
- import it from './translations/it.json';
10
- import ja from './translations/ja.json';
11
- import pt from './translations/pt.json';
12
- import ru from './translations/ru.json';
13
- import zh from './translations/zh.json';
14
- import ko from './translations/ko.json';
15
- import vi from './translations/vi.json';
16
-
17
- const i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };
18
-
19
- class NoData extends Component {
20
- static displayName = 'WidgetNoData';
21
- static enhance = [i18nEnhance()];
22
- static defaultProps = {
23
- i18n,
24
- type: 'other-data',
25
- };
26
-
27
- render() {
28
- const { Children, type, description, getI18nText } = this.asProps;
29
- const { title, description: descriptionText } = getI18nText();
30
- return (
31
- <Root render={WidgetEmpty} icon={getIconPath(type)}>
32
- <WidgetEmpty.Title>{title}</WidgetEmpty.Title>
33
- <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>
34
- <Children />
35
- </Root>
36
- );
37
- }
38
- }
39
-
40
- export default createComponent(NoData);
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Keine anzuzeigenden Daten",
3
- "description": "Ändern Sie die Datums- oder Filtereinstellungen."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "We have no data to show",
3
- "description": "Try selecting a different date or changing your filter settings."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "No hay datos para mostrar.",
3
- "description": "Intenta cambiar la fecha o la configuración de filtros."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Nous n'avons pas de données à afficher",
3
- "description": "Essayez de modifier la date ou les paramètres du filtre."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Nessun dato da visualizzare",
3
- "description": "Prova a modificare la data o le impostazioni del filtro."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "表示するデータはありません",
3
- "description": "日付かフィルタ適応の設定を変えて、結果をご覧ください。"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "표시할 데이터가 없습니다.",
3
- "description": "다른 날짜를 선택하거나 필터 설정을 변경하세요."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Não há dados a serem exibidos",
3
- "description": "Tente alterar a data ou as configurações do filtro."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Данные отсутствуют",
3
- "description": "Попробуйте изменить дату или настройки фильтров."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Chúng tôi không có dữ liệu để hiển thị",
3
- "description": "Vui lòng chọn ngày khác hoặc đổi chế độ lọc."
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "我们没有要显示的数据",
3
- "description": "尝试更改日期或过滤设置以查看结果。"
4
- }
@@ -1,57 +0,0 @@
1
- import React from 'react';
2
- import createComponent, { Component, sstyled, Root } from '@semcore/core';
3
- import { Box, Flex } from '@semcore/flex-box';
4
- import isNode from '@semcore/utils/lib/isNode';
5
-
6
- import style from './style/widget-empty.shadow.css';
7
-
8
- const version = preval`
9
- module.exports = require('../package.json').version
10
- `;
11
-
12
- export const getIconPath = (name) => {
13
- return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;
14
- };
15
-
16
- class WidgetEmpty extends Component {
17
- static displayName = 'WidgetEmpty';
18
- static style = style;
19
-
20
- render() {
21
- const SWidgetEmpty = Root;
22
- const { Children, icon, styles } = this.asProps;
23
- const SImage = 'div';
24
-
25
- return sstyled(styles)(
26
- <SWidgetEmpty render={Flex}>
27
- {isNode(icon) && (
28
- <SImage>
29
- {typeof icon === 'string' ? (
30
- <img src={icon} alt="widget empty icon" width={100} height={72} />
31
- ) : (
32
- icon
33
- )}
34
- </SImage>
35
- )}
36
- <Children />
37
- </SWidgetEmpty>,
38
- );
39
- }
40
- }
41
-
42
- const Title = (props) => {
43
- const STitle = Root;
44
- const { styles } = props;
45
- return sstyled(styles)(<STitle render={Box} />);
46
- };
47
-
48
- const Description = (props) => {
49
- const SDescription = Root;
50
- const { styles } = props;
51
- return sstyled(styles)(<SDescription render={Box} />);
52
- };
53
-
54
- export default createComponent(WidgetEmpty, {
55
- Title,
56
- Description,
57
- });
package/src/index.d.ts DELETED
@@ -1,71 +0,0 @@
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
- | 'coffee'
10
- | 'combined-chart'
11
- | 'congrats'
12
- | 'deleted-page'
13
- | 'donut-chart'
14
- | 'duplicates'
15
- | 'funnel-chart'
16
- | 'good'
17
- | 'heat-map-chart'
18
- | 'horizontal-bar-chart'
19
- | 'kagi-chart'
20
- | 'line-chart'
21
- | 'lollipop-chart'
22
- | 'nexttime'
23
- | 'nothing-found'
24
- | 'other-data'
25
- | 'pie-chart'
26
- | 'processing'
27
- | 'radar-chart'
28
- | 'radial-tree-chart'
29
- | 'sankey-chart'
30
- | 'scatter-plot-chart'
31
- | 'stacked-area-chart'
32
- | 'suggestion'
33
- | 'suggestions'
34
- | 'table'
35
- | 'tag-cloud'
36
- | 'text-links-etc'
37
- | 'under-construction'
38
- | 'venn-chart'
39
- | 'vertical-bar-chart'
40
- | 'warning';
41
-
42
- export interface IWidgetEmptyProps extends IFlexProps {
43
- /**
44
- * URL before the icon or the whole component
45
- */
46
- icon?: React.ReactNode;
47
- }
48
-
49
- export interface IWidgetErrorProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
50
- /** Error description. If it is absent, use the local default one */
51
- description?: React.ReactNode;
52
- }
53
-
54
- export interface IWidgetNoDataProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
55
- /** Error description. If it is absent, use the local default one */
56
- description?: React.ReactNode;
57
- /* Data types */
58
- type?: iconNames;
59
- }
60
-
61
- declare const WidgetEmpty: (<T>(props: CProps<IWidgetEmptyProps> & T) => ReturnEl) & {
62
- Title: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
63
- Description: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
64
- };
65
-
66
- declare const NoData: <T>(props: CProps<IWidgetNoDataProps> & T) => ReturnEl;
67
- declare const Error: <T>(props: CProps<IWidgetErrorProps> & T) => ReturnEl;
68
- declare const getIconPath: (name: string) => string;
69
-
70
- export default WidgetEmpty;
71
- export { getIconPath, NoData, Error };
package/src/index.js DELETED
@@ -1,6 +0,0 @@
1
- export { default } from './WidgetEmpty';
2
- export * from './WidgetEmpty';
3
-
4
- export { default as NoData } from './NoData';
5
-
6
- export { default as Error } from './Error';
@@ -1,41 +0,0 @@
1
- @import '@semcore/utils/style/var.css';
2
-
3
- SWidgetEmpty {
4
- flex-direction: column;
5
- justify-content: center;
6
- align-items: center;
7
- margin-bottom: 16px;
8
- }
9
-
10
- SImage {
11
- display: flex;
12
- align-items: flex-end;
13
- justify-content: center;
14
- margin-bottom: 12px;
15
- }
16
-
17
- STitle {
18
- color: var(--gray-500);
19
- }
20
-
21
- STitle {
22
- font-size: var(--fs-300);
23
- line-height: var(--lh-300);
24
- font-weight: bold;
25
- }
26
-
27
- SDescription {
28
- text-align: center;
29
- font-size: var(--fs-200);
30
- line-height: var(--lh-200);
31
- color: var(--gray-500);
32
- max-width: 400px;
33
- }
34
-
35
- STitle + SDescription {
36
- margin-top: 4px;
37
- }
38
-
39
- SDescription + SDescription {
40
- margin-top: 8px;
41
- }