@semcore/d3-chart 2.8.7 → 2.8.9

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/lib/es6/Venn.js CHANGED
@@ -26,17 +26,17 @@ var style = (
26
26
  /*__reshadow_css_start__*/
27
27
  _sstyled.insert(
28
28
  /*__inner_css_start__*/
29
- ".___SCircle_1wbht_gg_{fill:var(--intergalactic-chart-palette-order-2,#59ddaa);stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1wbht);transition-timing-function:ease-in-out}@media (hover: hover){.___SCircle_1wbht_gg_:hover{fill-opacity:.7}}.___SCircle_1wbht_gg_.__color_1wbht_gg_{fill:var(--color_1wbht)}.___SCircle_1wbht_gg_.__transparent_1wbht_gg_{opacity:.3}.___SIntersection_1wbht_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover: hover){.___SIntersection_1wbht_gg_:hover{fill-opacity:.1}}.___SIntersection_1wbht_gg_.__transparent_1wbht_gg_{opacity:.3}"
29
+ ".___SCircle_1a0we_gg_{fill:var(--intergalactic-chart-palette-order-2,#59ddaa);stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1a0we);transition-timing-function:ease-in-out}@media (hover: hover){.___SCircle_1a0we_gg_:hover{fill-opacity:.7}}.___SCircle_1a0we_gg_.__color_1a0we_gg_{fill:var(--color_1a0we)}.___SCircle_1a0we_gg_.__transparent_1a0we_gg_{opacity:.3}.___SIntersection_1a0we_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover: hover){.___SIntersection_1a0we_gg_:hover{fill-opacity:.1}}.___SIntersection_1a0we_gg_.__transparent_1a0we_gg_{opacity:.3}"
30
30
  /*__inner_css_end__*/
31
- , "1wbht_gg_")
31
+ , "1a0we_gg_")
32
32
  /*__reshadow_css_end__*/
33
33
  , {
34
- "__SCircle": "___SCircle_1wbht_gg_",
35
- "--duration": "--duration_1wbht",
36
- "_color": "__color_1wbht_gg_",
37
- "--color": "--color_1wbht",
38
- "_transparent": "__transparent_1wbht_gg_",
39
- "__SIntersection": "___SIntersection_1wbht_gg_"
34
+ "__SCircle": "___SCircle_1a0we_gg_",
35
+ "--duration": "--duration_1a0we",
36
+ "_color": "__color_1a0we_gg_",
37
+ "--color": "--color_1a0we",
38
+ "_transparent": "__transparent_1a0we_gg_",
39
+ "__SIntersection": "___SIntersection_1a0we_gg_"
40
40
  });
41
41
 
42
42
  var VennRoot = /*#__PURE__*/function (_Component) {
@@ -20,12 +20,12 @@ var styles = (
20
20
  /*__reshadow_css_start__*/
21
21
  _sstyled.insert(
22
22
  /*__inner_css_start__*/
23
- ".___SPlotA11yModule_1fxbn_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1fxbn_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}"
23
+ ".___SPlotA11yModule_eo4n4_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_eo4n4_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}"
24
24
  /*__inner_css_end__*/
25
- , "1fxbn_gg_")
25
+ , "eo4n4_gg_")
26
26
  /*__reshadow_css_end__*/
27
27
  , {
28
- "__SPlotA11yModule": "___SPlotA11yModule_1fxbn_gg_"
28
+ "__SPlotA11yModule": "___SPlotA11yModule_eo4n4_gg_"
29
29
  });
30
30
  import { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';
31
31
  import { Box } from '@semcore/flex-box';
@@ -27,13 +27,13 @@ var styles = (
27
27
  /*__reshadow_css_start__*/
28
28
  _sstyled.insert(
29
29
  /*__inner_css_start__*/
30
- ".___SPlotA11yView_1fz4w_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral,#fff);color:var(--intergalactic-text-primary,#191b23);border:3px solid var(--intergalactic-border-primary,#c4c7cf);font-size:var(--intergalactic-fs-50,10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_1fz4w_gg_:focus,.___SPlotA11yView_1fz4w_gg_.__focus-within_1fz4w_gg_{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay,500);position:relative;display:block}.___SPlotA11yView_1fz4w_gg_:focus,.___SPlotA11yView_1fz4w_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay,500);position:relative;display:block}.___SPlotA11yView_1fz4w_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_1fz4w_gg_ table,.___SPlotA11yView_1fz4w_gg_ td,.___SPlotA11yView_1fz4w_gg_ th{border:1px solid var(--intergalactic-border-primary,#c4c7cf)}"
30
+ ".___SPlotA11yView_1h6u4_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral,#fff);color:var(--intergalactic-text-primary,#191b23);border:3px solid var(--intergalactic-border-primary,#c4c7cf);font-size:var(--intergalactic-fs-50,10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_1h6u4_gg_:focus,.___SPlotA11yView_1h6u4_gg_.__focus-within_1h6u4_gg_{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay,500);position:relative;display:block}.___SPlotA11yView_1h6u4_gg_:focus,.___SPlotA11yView_1h6u4_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay,500);position:relative;display:block}.___SPlotA11yView_1h6u4_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_1h6u4_gg_ table,.___SPlotA11yView_1h6u4_gg_ td,.___SPlotA11yView_1h6u4_gg_ th{border:1px solid var(--intergalactic-border-primary,#c4c7cf)}"
31
31
  /*__inner_css_end__*/
32
- , "1fz4w_gg_")
32
+ , "1h6u4_gg_")
33
33
  /*__reshadow_css_end__*/
34
34
  , {
35
- "__SPlotA11yView": "___SPlotA11yView_1fz4w_gg_",
36
- "_focus-within": "__focus-within_1fz4w_gg_"
35
+ "__SPlotA11yView": "___SPlotA11yView_1h6u4_gg_",
36
+ "_focus-within": "__focus-within_1h6u4_gg_"
37
37
  });
38
38
  import { Box } from '@semcore/flex-box';
39
39
  import { useAsyncI18nMessages } from '@semcore/utils/lib/enhances/i18nEnhance';
@@ -9,7 +9,7 @@ export var normalizeLocale = function normalizeLocale(providedLocale) {
9
9
  translationNames[_locale.toLowerCase()] = _locale;
10
10
  }
11
11
 
12
- providedLocale = (_ref = (_providedLocale = providedLocale) !== null && _providedLocale !== void 0 ? _providedLocale : globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 ? void 0 : _globalThis$navigator.language) !== null && _ref !== void 0 ? _ref : 'en';
12
+ providedLocale = (_ref = (_providedLocale = providedLocale) !== null && _providedLocale !== void 0 ? _providedLocale : isAvailableLocale(globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 ? void 0 : _globalThis$navigator.language, translations)) !== null && _ref !== void 0 ? _ref : 'en';
13
13
  var locale = providedLocale.toLowerCase();
14
14
 
15
15
  if (locale.includes('-') && !translations[locale]) {
@@ -37,4 +37,20 @@ export var normalizeLocale = function normalizeLocale(providedLocale) {
37
37
 
38
38
  return locale;
39
39
  };
40
+
41
+ var isAvailableLocale = function isAvailableLocale(locale, translations) {
42
+ if (typeof locale !== 'string') {
43
+ return undefined;
44
+ }
45
+
46
+ var _locale$split3 = locale.split('-'),
47
+ _locale$split4 = _slicedToArray(_locale$split3, 1),
48
+ localeBase = _locale$split4[0];
49
+
50
+ if (!translations[localeBase]) {
51
+ return undefined;
52
+ }
53
+
54
+ return localeBase;
55
+ };
40
56
  //# sourceMappingURL=locale.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"locale.js","names":["normalizeLocale","providedLocale","translations","translationNames","locale","toLowerCase","globalThis","navigator","language","includes","split","localeBase","availableLocales","Object","keys","join","process","env","NODE_ENV","console","error"],"sources":["../../../src/a11y/locale.ts"],"sourcesContent":["export const normalizeLocale = (\n providedLocale: string,\n translations: { [locale: string]: {} } = {},\n) => {\n const translationNames: { [lowercasedName: string]: string } = {};\n for (const locale in translations) {\n translationNames[locale.toLowerCase()] = locale;\n }\n providedLocale = providedLocale ?? globalThis?.navigator?.language ?? 'en';\n let locale = providedLocale.toLowerCase();\n if (locale.includes('-') && !translations[locale]) {\n const [localeBase] = locale.split('-');\n if (translations[localeBase]) {\n locale = localeBase;\n }\n }\n locale = translationNames[locale] ? translationNames[locale] : locale;\n if (!translations[locale]) {\n const availableLocales = Object.keys(translations).join(', ');\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(\n `[Intergalactic @semcore/d3-charts a11y module]: No locale \"${providedLocale}\" available. Available locales: ${availableLocales}`,\n );\n }\n return null;\n }\n return locale;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAC7BC,cAD6B,EAG1B;EAAA;;EAAA,IADHC,YACG,uEADsC,EACtC;EACH,IAAMC,gBAAsD,GAAG,EAA/D;;EACA,KAAK,IAAMC,OAAX,IAAqBF,YAArB,EAAmC;IACjCC,gBAAgB,CAACC,OAAM,CAACC,WAAP,EAAD,CAAhB,GAAyCD,OAAzC;EACD;;EACDH,cAAc,8BAAGA,cAAH,6DAAqBK,UAArB,aAAqBA,UAArB,gDAAqBA,UAAU,CAAEC,SAAjC,0DAAqB,sBAAuBC,QAA5C,uCAAwD,IAAtE;EACA,IAAIJ,MAAM,GAAGH,cAAc,CAACI,WAAf,EAAb;;EACA,IAAID,MAAM,CAACK,QAAP,CAAgB,GAAhB,KAAwB,CAACP,YAAY,CAACE,MAAD,CAAzC,EAAmD;IACjD,oBAAqBA,MAAM,CAACM,KAAP,CAAa,GAAb,CAArB;IAAA;IAAA,IAAOC,UAAP;;IACA,IAAIT,YAAY,CAACS,UAAD,CAAhB,EAA8B;MAC5BP,MAAM,GAAGO,UAAT;IACD;EACF;;EACDP,MAAM,GAAGD,gBAAgB,CAACC,MAAD,CAAhB,GAA2BD,gBAAgB,CAACC,MAAD,CAA3C,GAAsDA,MAA/D;;EACA,IAAI,CAACF,YAAY,CAACE,MAAD,CAAjB,EAA2B;IACzB,IAAMQ,gBAAgB,GAAGC,MAAM,CAACC,IAAP,CAAYZ,YAAZ,EAA0Ba,IAA1B,CAA+B,IAA/B,CAAzB;;IACA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;MACzC;MACAC,OAAO,CAACC,KAAR,uEACgEnB,cADhE,8CACiHW,gBADjH;IAGD;;IACD,OAAO,IAAP;EACD;;EACD,OAAOR,MAAP;AACD,CA5BM"}
1
+ {"version":3,"file":"locale.js","names":["normalizeLocale","providedLocale","translations","translationNames","locale","toLowerCase","isAvailableLocale","globalThis","navigator","language","includes","split","localeBase","availableLocales","Object","keys","join","process","env","NODE_ENV","console","error","undefined"],"sources":["../../../src/a11y/locale.ts"],"sourcesContent":["export const normalizeLocale = (\n providedLocale: string,\n translations: { [locale: string]: {} } = {},\n) => {\n const translationNames: { [lowercasedName: string]: string } = {};\n for (const locale in translations) {\n translationNames[locale.toLowerCase()] = locale;\n }\n providedLocale =\n providedLocale ?? isAvailableLocale(globalThis?.navigator?.language, translations) ?? 'en';\n let locale = providedLocale.toLowerCase();\n if (locale.includes('-') && !translations[locale]) {\n const [localeBase] = locale.split('-');\n if (translations[localeBase]) {\n locale = localeBase;\n }\n }\n locale = translationNames[locale] ? translationNames[locale] : locale;\n if (!translations[locale]) {\n const availableLocales = Object.keys(translations).join(', ');\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(\n `[Intergalactic @semcore/d3-charts a11y module]: No locale \"${providedLocale}\" available. Available locales: ${availableLocales}`,\n );\n }\n return null;\n }\n return locale;\n};\n\nconst isAvailableLocale = (locale: string, translations: { [locale: string]: {} }) => {\n if (typeof locale !== 'string') {\n return undefined;\n }\n const [localeBase] = locale.split('-');\n if (!translations[localeBase]) {\n return undefined;\n }\n return localeBase;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAC7BC,cAD6B,EAG1B;EAAA;;EAAA,IADHC,YACG,uEADsC,EACtC;EACH,IAAMC,gBAAsD,GAAG,EAA/D;;EACA,KAAK,IAAMC,OAAX,IAAqBF,YAArB,EAAmC;IACjCC,gBAAgB,CAACC,OAAM,CAACC,WAAP,EAAD,CAAhB,GAAyCD,OAAzC;EACD;;EACDH,cAAc,8BACZA,cADY,6DACMK,iBAAiB,CAACC,UAAD,aAACA,UAAD,gDAACA,UAAU,CAAEC,SAAb,0DAAC,sBAAuBC,QAAxB,EAAkCP,YAAlC,CADvB,uCAC0E,IADxF;EAEA,IAAIE,MAAM,GAAGH,cAAc,CAACI,WAAf,EAAb;;EACA,IAAID,MAAM,CAACM,QAAP,CAAgB,GAAhB,KAAwB,CAACR,YAAY,CAACE,MAAD,CAAzC,EAAmD;IACjD,oBAAqBA,MAAM,CAACO,KAAP,CAAa,GAAb,CAArB;IAAA;IAAA,IAAOC,UAAP;;IACA,IAAIV,YAAY,CAACU,UAAD,CAAhB,EAA8B;MAC5BR,MAAM,GAAGQ,UAAT;IACD;EACF;;EACDR,MAAM,GAAGD,gBAAgB,CAACC,MAAD,CAAhB,GAA2BD,gBAAgB,CAACC,MAAD,CAA3C,GAAsDA,MAA/D;;EACA,IAAI,CAACF,YAAY,CAACE,MAAD,CAAjB,EAA2B;IACzB,IAAMS,gBAAgB,GAAGC,MAAM,CAACC,IAAP,CAAYb,YAAZ,EAA0Bc,IAA1B,CAA+B,IAA/B,CAAzB;;IACA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;MACzC;MACAC,OAAO,CAACC,KAAR,uEACgEpB,cADhE,8CACiHY,gBADjH;IAGD;;IACD,OAAO,IAAP;EACD;;EACD,OAAOT,MAAP;AACD,CA7BM;;AA+BP,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CAACF,MAAD,EAAiBF,YAAjB,EAA4D;EACpF,IAAI,OAAOE,MAAP,KAAkB,QAAtB,EAAgC;IAC9B,OAAOkB,SAAP;EACD;;EACD,qBAAqBlB,MAAM,CAACO,KAAP,CAAa,GAAb,CAArB;EAAA;EAAA,IAAOC,UAAP;;EACA,IAAI,CAACV,YAAY,CAACU,UAAD,CAAjB,EAA+B;IAC7B,OAAOU,SAAP;EACD;;EACD,OAAOV,UAAP;AACD,CATD"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/d3-chart",
3
3
  "description": "Semrush D3 Chart Component",
4
- "version": "2.8.7",
4
+ "version": "2.8.9",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",