@devgateway/dvz-ui-react 1.9.5 → 1.9.6

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),h=require("react");class g extends h.Component{constructor(l){super(l)}formatNumber(l){const{intl:i,format:a}=this.props;return i.formatNumber(a.style==="percent"?l/100:l,{style:a.style,notation:a.notation,maximumFractionDigits:a.maximumFractionDigits,minimuFractionDigits:0,currency:a.currency})}render(){const{filteredBreaks:l,formattedLegendTitle:i,showLegendLabels:a,symbols:m,legendFontSize:o,legendFontWeight:d,autoGenerateBreaks:n,intl:N,numberFormat:b,mapNoDataColor:u,showNoDataLegendItem:c,noDataText:x}=this.props,t={fontSize:o+"px",fontWeight:d};return e.jsxs("div",{className:"legend-container",children:[e.jsxs("div",{className:"legend-title-container",children:[e.jsx("span",{className:"legend-title",children:l&&l.length>0?i:""}),l.length>0&&e.jsx("span",{className:"vertical-spacer",children:"|"})]}),e.jsx("div",{className:"legend",children:e.jsxs("ul",{className:"legend-items-container",children:[l&&l.map((s,r)=>e.jsxs("li",{className:"legend-item",children:[e.jsx("span",{className:"symbol",style:{backgroundColor:s.color}}),a&&!n&&e.jsx("span",{className:"legend-label",style:t,children:s.label}),(!a||n)&&s.min!=null&&s.max!=null&&e.jsxs("span",{className:"legend-label",style:t,children:[this.formatNumber(s.min)," -"," ",this.formatNumber(s.max)]}),(!a||n)&&s.min==null&&s.max!=null&&e.jsxs("span",{className:"legend-label",style:t,children:[" ","< ",this.formatNumber(s.max)]}),(!a||n)&&s.min!=null&&s.max==null&&e.jsxs("span",{className:"legend-label",style:t,children:[" ","> ",this.formatNumber(s.min)," "]})]},"lg"+r)),console.log("showNoDataLegendItem",c),c&&e.jsxs("li",{className:"legend-item",children:[e.jsx("span",{className:"symbol",style:{backgroundColor:u}}),e.jsx("span",{className:"legend-label",style:t,children:x})]}),m&&m.map((s,r)=>e.jsxs("li",{className:"legend-item",children:[e.jsx("span",{className:"vertical-spacer",children:"|"}),s.image&&e.jsx("img",{style:{width:"40px",height:"40px",marginTop:"-8px",marginRight:"-4px"},src:"/"+s.image}),e.jsx("span",{className:"legend-label",style:t,children:s.label?s.label:""})]},"k"+r))]})})]})}}exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),g=require("react");class h extends g.Component{constructor(t){super(t)}formatNumber(t){const{intl:i,format:s}=this.props;return i.formatNumber(s.style==="percent"?t/100:t,{style:s.style,notation:s.notation,maximumFractionDigits:s.maximumFractionDigits,minimuFractionDigits:0,currency:s.currency})}render(){const{filteredBreaks:t,formattedLegendTitle:i,showLegendLabels:s,symbols:r,legendFontSize:c,legendFontWeight:d,autoGenerateBreaks:a,intl:N,numberFormat:b,mapNoDataColor:u,showNoDataLegendItem:o,noDataText:x}=this.props,n={fontSize:c+"px",fontWeight:d};return l.jsxs("div",{className:"legend-container",children:[l.jsx("div",{className:"legend-title-container",children:l.jsx("span",{className:"legend-title",children:t&&t.length>0?i:""})}),l.jsx("div",{className:"legend",children:l.jsxs("ul",{className:"legend-items-container",children:[t&&t.map((e,m)=>l.jsxs("li",{className:"legend-item",children:[l.jsx("span",{className:"symbol",style:{backgroundColor:e.color}}),s&&!a&&l.jsx("span",{className:"legend-label",style:n,children:e.label}),(!s||a)&&e.min!=null&&e.max!=null&&l.jsxs("span",{className:"legend-label",style:n,children:[this.formatNumber(e.min)," -"," ",this.formatNumber(e.max)]}),(!s||a)&&e.min==null&&e.max!=null&&l.jsxs("span",{className:"legend-label",style:n,children:[" ","< ",this.formatNumber(e.max)]}),(!s||a)&&e.min!=null&&e.max==null&&l.jsxs("span",{className:"legend-label",style:n,children:[" ","> ",this.formatNumber(e.min)," "]})]},"lg"+m)),console.log("showNoDataLegendItem",o),o&&l.jsxs("li",{className:"legend-item",children:[l.jsx("span",{className:"symbol",style:{backgroundColor:u}}),l.jsx("span",{className:"legend-label",style:n,children:x})]}),r&&r.map((e,m)=>l.jsxs("li",{className:"legend-item",children:[e.image&&l.jsx("img",{style:{width:"40px",height:"40px",marginTop:"-8px",marginRight:"-4px"},src:"/"+e.image}),l.jsx("span",{className:"legend-label",style:n,children:e.label?e.label:""})]},"k"+m))]})})]})}}exports.default=h;
@@ -1,44 +1,41 @@
1
- import { jsxs as s, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as n } from "react/jsx-runtime";
2
2
  import u from "react";
3
3
  class D extends u.Component {
4
- constructor(l) {
5
- super(l);
4
+ constructor(t) {
5
+ super(t);
6
6
  }
7
- formatNumber(l) {
8
- const { intl: m, format: a } = this.props;
9
- return m.formatNumber(a.style === "percent" ? l / 100 : l, {
10
- style: a.style,
11
- notation: a.notation,
12
- maximumFractionDigits: a.maximumFractionDigits,
7
+ formatNumber(t) {
8
+ const { intl: m, format: l } = this.props;
9
+ return m.formatNumber(l.style === "percent" ? t / 100 : t, {
10
+ style: l.style,
11
+ notation: l.notation,
12
+ maximumFractionDigits: l.maximumFractionDigits,
13
13
  minimuFractionDigits: 0,
14
- currency: a.currency
14
+ currency: l.currency
15
15
  });
16
16
  }
17
17
  render() {
18
18
  const {
19
- filteredBreaks: l,
19
+ filteredBreaks: t,
20
20
  formattedLegendTitle: m,
21
- showLegendLabels: a,
22
- symbols: c,
21
+ showLegendLabels: l,
22
+ symbols: o,
23
23
  legendFontSize: d,
24
24
  legendFontWeight: h,
25
25
  autoGenerateBreaks: i,
26
26
  intl: b,
27
27
  numberFormat: x,
28
- mapNoDataColor: p,
29
- showNoDataLegendItem: o,
30
- noDataText: g
31
- } = this.props, t = {
28
+ mapNoDataColor: g,
29
+ showNoDataLegendItem: c,
30
+ noDataText: p
31
+ } = this.props, s = {
32
32
  fontSize: d + "px",
33
33
  fontWeight: h
34
34
  };
35
- return /* @__PURE__ */ s("div", { className: "legend-container", children: [
36
- /* @__PURE__ */ s("div", { className: "legend-title-container", children: [
37
- /* @__PURE__ */ n("span", { className: "legend-title", children: l && l.length > 0 ? m : "" }),
38
- l.length > 0 && /* @__PURE__ */ n("span", { className: "vertical-spacer", children: "|" })
39
- ] }),
40
- /* @__PURE__ */ n("div", { className: "legend", children: /* @__PURE__ */ s("ul", { className: "legend-items-container", children: [
41
- l && l.map((e, r) => /* @__PURE__ */ s("li", { className: "legend-item", children: [
35
+ return /* @__PURE__ */ a("div", { className: "legend-container", children: [
36
+ /* @__PURE__ */ n("div", { className: "legend-title-container", children: /* @__PURE__ */ n("span", { className: "legend-title", children: t && t.length > 0 ? m : "" }) }),
37
+ /* @__PURE__ */ n("div", { className: "legend", children: /* @__PURE__ */ a("ul", { className: "legend-items-container", children: [
38
+ t && t.map((e, r) => /* @__PURE__ */ a("li", { className: "legend-item", children: [
42
39
  /* @__PURE__ */ n(
43
40
  "span",
44
41
  {
@@ -46,38 +43,37 @@ class D extends u.Component {
46
43
  style: { backgroundColor: e.color }
47
44
  }
48
45
  ),
49
- a && !i && /* @__PURE__ */ n("span", { className: "legend-label", style: t, children: e.label }),
50
- (!a || i) && e.min != null && e.max != null && /* @__PURE__ */ s("span", { className: "legend-label", style: t, children: [
46
+ l && !i && /* @__PURE__ */ n("span", { className: "legend-label", style: s, children: e.label }),
47
+ (!l || i) && e.min != null && e.max != null && /* @__PURE__ */ a("span", { className: "legend-label", style: s, children: [
51
48
  this.formatNumber(e.min),
52
49
  " -",
53
50
  " ",
54
51
  this.formatNumber(e.max)
55
52
  ] }),
56
- (!a || i) && e.min == null && e.max != null && /* @__PURE__ */ s("span", { className: "legend-label", style: t, children: [
53
+ (!l || i) && e.min == null && e.max != null && /* @__PURE__ */ a("span", { className: "legend-label", style: s, children: [
57
54
  " ",
58
55
  "< ",
59
56
  this.formatNumber(e.max)
60
57
  ] }),
61
- (!a || i) && e.min != null && e.max == null && /* @__PURE__ */ s("span", { className: "legend-label", style: t, children: [
58
+ (!l || i) && e.min != null && e.max == null && /* @__PURE__ */ a("span", { className: "legend-label", style: s, children: [
62
59
  " ",
63
60
  "> ",
64
61
  this.formatNumber(e.min),
65
62
  " "
66
63
  ] })
67
64
  ] }, "lg" + r)),
68
- console.log("showNoDataLegendItem", o),
69
- o && /* @__PURE__ */ s("li", { className: "legend-item", children: [
65
+ console.log("showNoDataLegendItem", c),
66
+ c && /* @__PURE__ */ a("li", { className: "legend-item", children: [
70
67
  /* @__PURE__ */ n(
71
68
  "span",
72
69
  {
73
70
  className: "symbol",
74
- style: { backgroundColor: p }
71
+ style: { backgroundColor: g }
75
72
  }
76
73
  ),
77
- /* @__PURE__ */ n("span", { className: "legend-label", style: t, children: g })
74
+ /* @__PURE__ */ n("span", { className: "legend-label", style: s, children: p })
78
75
  ] }),
79
- c && c.map((e, r) => /* @__PURE__ */ s("li", { className: "legend-item", children: [
80
- /* @__PURE__ */ n("span", { className: "vertical-spacer", children: "|" }),
76
+ o && o.map((e, r) => /* @__PURE__ */ a("li", { className: "legend-item", children: [
81
77
  e.image && /* @__PURE__ */ n(
82
78
  "img",
83
79
  {
@@ -90,7 +86,7 @@ class D extends u.Component {
90
86
  src: "/" + e.image
91
87
  }
92
88
  ),
93
- /* @__PURE__ */ n("span", { className: "legend-label", style: t, children: e.label ? e.label : "" })
89
+ /* @__PURE__ */ n("span", { className: "legend-label", style: s, children: e.label ? e.label : "" })
94
90
  ] }, "k" + r))
95
91
  ] }) })
96
92
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devgateway/dvz-ui-react",
3
- "version": "1.9.5",
3
+ "version": "1.9.6",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",