@devgateway/dvz-ui-react 1.1.1 → 1.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.
- package/dist/cjs/embeddable/big-number/index.js +1 -1
- package/dist/cjs/embeddable/chart/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/index.js +1 -1
- package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
- package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
- package/dist/cjs/embeddable/d3Map/FlowLayer.js +1 -1
- package/dist/cjs/embeddable/d3Map/ZoomControl.js +1 -1
- package/dist/cjs/embeddable/d3Map/index.js +1 -1
- package/dist/cjs/embeddable/posts-with-filters/DropDownFilter.js +1 -0
- package/dist/cjs/embeddable/posts-with-filters/Post.js +1 -1
- package/dist/cjs/embeddable/posts-with-filters/index.js +1 -1
- package/dist/cjs/embeddable/reducers/data-api.js +1 -1
- package/dist/cjs/layout/containers/SlugPostContainer.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/esm/embeddable/big-number/index.js +92 -85
- package/dist/esm/embeddable/chart/Bar.js +128 -123
- package/dist/esm/embeddable/chart/index.js +229 -225
- package/dist/esm/embeddable/d3Map/BaseLayer.js +40 -27
- package/dist/esm/embeddable/d3Map/DataLayer.js +196 -204
- package/dist/esm/embeddable/d3Map/FlowLayer.js +104 -101
- package/dist/esm/embeddable/d3Map/ZoomControl.js +64 -54
- package/dist/esm/embeddable/d3Map/index.js +110 -99
- package/dist/esm/embeddable/posts-with-filters/DropDownFilter.js +25 -0
- package/dist/esm/embeddable/posts-with-filters/Post.js +49 -24
- package/dist/esm/embeddable/posts-with-filters/index.js +120 -119
- package/dist/esm/embeddable/reducers/data-api.js +13 -11
- package/dist/esm/layout/containers/SlugPostContainer.js +3 -3
- package/dist/esm/styles.css +1 -1
- package/dist/types/embeddable/chart/Bar.d.ts +2 -0
- package/dist/types/embeddable/d3Map/BaseLayer.d.ts +1 -0
- package/dist/types/embeddable/d3Map/ZoomControl.d.ts +2 -1
- package/dist/types/embeddable/posts-with-filters/DropDownFilter.d.ts +4 -0
- package/dist/types/embeddable/posts-with-filters/Post.d.ts +4 -2
- package/package.json +4 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as m, jsxs as ce } from "react/jsx-runtime";
|
|
2
|
-
import { useState as E, useRef as
|
|
2
|
+
import { useState as E, useRef as Ka, useEffect as ue } from "react";
|
|
3
3
|
import { Container as me } from "semantic-ui-react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import Qa from "../data/DataProvider.js";
|
|
5
|
+
import Za from "../data/DataConsumer.js";
|
|
6
|
+
import Oa from "../../utils/deviceType.js";
|
|
7
|
+
import ja from "./Pie.js";
|
|
8
8
|
import "immutable";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { PostContent as
|
|
9
|
+
import er from "./Radar.js";
|
|
10
|
+
import tr from "./Bar.js";
|
|
11
|
+
import ar from "./Line.js";
|
|
12
|
+
import { PostContent as rr } from "@devgateway/wp-react-lib";
|
|
13
13
|
import K from "./data/index.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { connect as
|
|
18
|
-
import { injectIntl as
|
|
19
|
-
const
|
|
14
|
+
import or from "./CSVDataFrame.js";
|
|
15
|
+
import nr from "./colors/ColorProvider.js";
|
|
16
|
+
import it from "./Messages.js";
|
|
17
|
+
import { connect as ir } from "react-redux";
|
|
18
|
+
import { injectIntl as sr } from "react-intl";
|
|
19
|
+
const dr = (R) => {
|
|
20
20
|
let {
|
|
21
21
|
parent: pe,
|
|
22
22
|
editing: s = !1,
|
|
@@ -32,137 +32,139 @@ const ir = (C) => {
|
|
|
32
32
|
//'data-source': source = 'gender/smoke',f
|
|
33
33
|
"data-dimension1": F,
|
|
34
34
|
"data-dimension2": fe,
|
|
35
|
-
"data-dimension3":
|
|
35
|
+
"data-dimension3": ur,
|
|
36
36
|
"data-color-by": Z = "index",
|
|
37
37
|
"data-scheme": be = "system",
|
|
38
|
-
"data-group-mode":
|
|
39
|
-
"data-left-legend":
|
|
40
|
-
"data-legend-label":
|
|
41
|
-
"data-bottom-legend":
|
|
42
|
-
"data-dualmode":
|
|
38
|
+
"data-group-mode": st = "grouped",
|
|
39
|
+
"data-left-legend": dt = "Left Legend",
|
|
40
|
+
"data-legend-label": lt = "",
|
|
41
|
+
"data-bottom-legend": ct = "Bottom Legend",
|
|
42
|
+
"data-dualmode": ut,
|
|
43
43
|
"data-legend-position": we = "right",
|
|
44
44
|
"data-show-legends": xe = "true",
|
|
45
|
-
"data-data-source-label":
|
|
46
|
-
"data-chart-data-source":
|
|
47
|
-
"data-toggle-info-label":
|
|
48
|
-
"data-toggle-chart-label":
|
|
45
|
+
"data-data-source-label": mr = "Source",
|
|
46
|
+
"data-chart-data-source": pr = "Data Source",
|
|
47
|
+
"data-toggle-info-label": hr = "Info Graphic",
|
|
48
|
+
"data-toggle-chart-label": gr = "Chart",
|
|
49
49
|
//'data-number-format': format = '{"style":"percent", "minimumFractionDigits": 1, "maximumFractionDigits": 1}',
|
|
50
50
|
"data-tick-rotation": u = 0,
|
|
51
|
-
"data-tick-color":
|
|
52
|
-
"data-measures":
|
|
53
|
-
"data-format":
|
|
54
|
-
"data-csv":
|
|
55
|
-
"data-margin-left":
|
|
56
|
-
"data-margin-top":
|
|
57
|
-
"data-margin-right":
|
|
58
|
-
"data-margin-bottom":
|
|
59
|
-
"data-start-angle":
|
|
60
|
-
"data-end-angle":
|
|
51
|
+
"data-tick-color": mt = "rgb(92,93,99)",
|
|
52
|
+
"data-measures": pt = "{}",
|
|
53
|
+
"data-format": fr = "{}",
|
|
54
|
+
"data-csv": ht = "",
|
|
55
|
+
"data-margin-left": gt = 50,
|
|
56
|
+
"data-margin-top": ft = 25,
|
|
57
|
+
"data-margin-right": bt = 25,
|
|
58
|
+
"data-margin-bottom": wt = 25,
|
|
59
|
+
"data-start-angle": xt = 0,
|
|
60
|
+
"data-end-angle": vt = 360,
|
|
61
61
|
"data-view-mode": ve = "info",
|
|
62
|
-
"data-filters":
|
|
62
|
+
"data-filters": Lt = "[]",
|
|
63
63
|
//filters
|
|
64
|
-
"data-tooltip-html":
|
|
64
|
+
"data-tooltip-html": yt = "",
|
|
65
65
|
"data-layout": O = "vertical",
|
|
66
66
|
"data-reverse": Le = "false",
|
|
67
|
-
"data-offset-y":
|
|
67
|
+
"data-offset-y": kt = "-40",
|
|
68
68
|
"data-line-layer-enabled": ye = "false",
|
|
69
69
|
//"data-csv-line-layer-data": csvLineLayerData = "",
|
|
70
70
|
//"data-csv-line-color": lineColor = "#000000",
|
|
71
71
|
//"data-csv-line-tooltip": lineTooltip = "",
|
|
72
72
|
//"data-csv-line-title": lineTitle = "",
|
|
73
|
-
"data-overlays":
|
|
74
|
-
"data-max-value":
|
|
75
|
-
"data-value-scale":
|
|
73
|
+
"data-overlays": Tt = "[]",
|
|
74
|
+
"data-max-value": It = "auto",
|
|
75
|
+
"data-value-scale": Ct = "linear",
|
|
76
76
|
"data-swap": G = "false",
|
|
77
|
-
"data-no-data-message":
|
|
78
|
-
"data-bar-color":
|
|
77
|
+
"data-no-data-message": Mt = "No data matches your selection",
|
|
78
|
+
"data-bar-color": Dt = "rgb(0,0,0)",
|
|
79
79
|
"data-override-tick-color": ke = "false",
|
|
80
80
|
"data-fixed-min-value": Rt = 0,
|
|
81
|
-
"data-fixed-max-value":
|
|
82
|
-
"data-bar-padding":
|
|
83
|
-
"data-bar-label-position":
|
|
84
|
-
"data-line-label-position":
|
|
81
|
+
"data-fixed-max-value": At = 0,
|
|
82
|
+
"data-bar-padding": Ft = 0.15,
|
|
83
|
+
"data-bar-label-position": Bt = "middle",
|
|
84
|
+
"data-line-label-position": Pt = "none",
|
|
85
85
|
"data-show-grid": Te = "true",
|
|
86
|
-
"data-include-overall":
|
|
87
|
-
"data-bar-inner-padding":
|
|
88
|
-
"data-x-label-color":
|
|
89
|
-
"data-bar-label-color":
|
|
90
|
-
"data-legend-label-color":
|
|
91
|
-
"data-tooltip-enabled":
|
|
92
|
-
"data-use-check-box-background":
|
|
93
|
-
"data-use-label-background":
|
|
94
|
-
"data-highlight-xaxis-line":
|
|
86
|
+
"data-include-overall": Ie = "false",
|
|
87
|
+
"data-bar-inner-padding": Et = 0.7,
|
|
88
|
+
"data-x-label-color": Nt = "#000",
|
|
89
|
+
"data-bar-label-color": zt = "#000",
|
|
90
|
+
"data-legend-label-color": Gt = "#000",
|
|
91
|
+
"data-tooltip-enabled": Ce = "true",
|
|
92
|
+
"data-use-check-box-background": Me = "false",
|
|
93
|
+
"data-use-label-background": De = "true",
|
|
94
|
+
"data-highlight-xaxis-line": Re = "false",
|
|
95
95
|
"data-show-tick-line": Ae = "true",
|
|
96
96
|
"data-show-right-axis": Fe = "true",
|
|
97
|
-
"data-manual-colors":
|
|
98
|
-
"data-right-legend":
|
|
99
|
-
"data-offset-right":
|
|
100
|
-
"data-offset-bottom":
|
|
101
|
-
"data-hidden-bars":
|
|
102
|
-
"data-confidence-intervals":
|
|
97
|
+
"data-manual-colors": Vt = "{}",
|
|
98
|
+
"data-right-legend": Xt = "",
|
|
99
|
+
"data-offset-right": Ut = "40",
|
|
100
|
+
"data-offset-bottom": $t = "40",
|
|
101
|
+
"data-hidden-bars": St = [],
|
|
102
|
+
"data-confidence-intervals": Ht = "[]",
|
|
103
103
|
"data-enable-area": Be = "false",
|
|
104
|
-
"data-area-shading-criteria":
|
|
105
|
-
"data-area-lower-bound":
|
|
106
|
-
"data-area-upper-bound":
|
|
104
|
+
"data-area-shading-criteria": Wt = "DEFAULT",
|
|
105
|
+
"data-area-lower-bound": Yt = "",
|
|
106
|
+
"data-area-upper-bound": qt = "",
|
|
107
107
|
"data-show-points": Pe = "true",
|
|
108
|
-
"data-center-label":
|
|
108
|
+
"data-center-label": Jt = "",
|
|
109
109
|
"data-show-arc-labels": Ee = "true",
|
|
110
110
|
"data-show-arc-link-labels": Ne = "true",
|
|
111
|
-
"data-slice-padding":
|
|
112
|
-
"data-center-label-font-weight":
|
|
113
|
-
"data-center-label-font-size":
|
|
114
|
-
"data-center-label-xoffset":
|
|
115
|
-
"data-center-label-yoffset":
|
|
116
|
-
"data-group-total-measure":
|
|
111
|
+
"data-slice-padding": _t = 1,
|
|
112
|
+
"data-center-label-font-weight": Kt = "normal",
|
|
113
|
+
"data-center-label-font-size": Qt = "12",
|
|
114
|
+
"data-center-label-xoffset": Zt = 0,
|
|
115
|
+
"data-center-label-yoffset": Ot = 0,
|
|
116
|
+
"data-group-total-measure": jt = "",
|
|
117
117
|
"data-show-group-total": ze = "true",
|
|
118
|
-
"data-group-total-label":
|
|
119
|
-
"data-group-total-format":
|
|
120
|
-
"data-group-total-label-offset":
|
|
118
|
+
"data-group-total-label": ea = "",
|
|
119
|
+
"data-group-total-format": ta = "{}",
|
|
120
|
+
"data-group-total-label-offset": aa,
|
|
121
121
|
"data-group-total-fixed-position": Ge = "false",
|
|
122
122
|
"data-tooltip-enable-markdown": V = "false",
|
|
123
123
|
"data-y-axis-tick-values": Ve = "10",
|
|
124
124
|
"data-x-axis-tick-values": Xe = "10",
|
|
125
125
|
"data-enable-grid-y": L = "true",
|
|
126
126
|
"data-enable-grid-x": y = "false",
|
|
127
|
-
"data-offset-text":
|
|
127
|
+
"data-offset-text": ra = 0,
|
|
128
128
|
"data-overall-label": j = "Overall",
|
|
129
|
-
"data-min-max-clamp":
|
|
129
|
+
"data-min-max-clamp": oa = "false",
|
|
130
130
|
"data-reverse-legend": Ue = "false",
|
|
131
131
|
"data-sort": $e = "default",
|
|
132
132
|
"data-sort-reverse": X = "false",
|
|
133
133
|
"data-sort-second-dimension": Se = "default",
|
|
134
134
|
"data-sort-reverse-second-dimension": U = "false",
|
|
135
|
-
"data-radar-curve":
|
|
136
|
-
"data-radar-fill-opacity":
|
|
137
|
-
"data-radar-border-width":
|
|
138
|
-
"data-radar-grid-levels":
|
|
139
|
-
"data-radar-grid-shape":
|
|
140
|
-
"data-radar-grid-label-offset":
|
|
135
|
+
"data-radar-curve": na = "linearClosed",
|
|
136
|
+
"data-radar-fill-opacity": ia = 0.25,
|
|
137
|
+
"data-radar-border-width": sa = 2,
|
|
138
|
+
"data-radar-grid-levels": da = 3,
|
|
139
|
+
"data-radar-grid-shape": la = "circular",
|
|
140
|
+
"data-radar-grid-label-offset": ca = 36,
|
|
141
141
|
"data-radar-enable-dots": He = "true",
|
|
142
|
-
"data-radar-dot-size":
|
|
142
|
+
"data-radar-dot-size": ua = 8,
|
|
143
143
|
"data-radar-enable-dot-label": We = "true",
|
|
144
|
-
"data-radar-dot-label-offset":
|
|
144
|
+
"data-radar-dot-label-offset": ma = -12,
|
|
145
145
|
"data-mobile-customization": Ye = "{}",
|
|
146
146
|
"data-show-percentage": qe = "false",
|
|
147
147
|
"data-preview-mode": p = "Desktop",
|
|
148
|
-
"data-wait-for-filters":
|
|
149
|
-
"data-line-curve":
|
|
148
|
+
"data-wait-for-filters": pa = "false",
|
|
149
|
+
"data-line-curve": ha = "linear",
|
|
150
|
+
"data-show-legends-in-columns": Je = "false",
|
|
151
|
+
"data-number-of-legend-columns": ga = 4,
|
|
150
152
|
pageModuleProps: h
|
|
151
|
-
} =
|
|
152
|
-
const
|
|
153
|
+
} = R;
|
|
154
|
+
const fa = s, t = JSON.parse(
|
|
153
155
|
decodeURIComponent(Ye)
|
|
154
|
-
), [ee,
|
|
156
|
+
), [ee, ba] = E(
|
|
155
157
|
window.innerWidth <= 1250
|
|
156
158
|
), f = ee && ((t == null ? void 0 : t.showCustomization) ?? !1);
|
|
157
159
|
h != null && h.previewMode && (h != null && h.editing) && (p = h.previewMode, s = h.editing);
|
|
158
|
-
const
|
|
160
|
+
const wa = ["Tablet"].includes(p) && s, xa = ["Mobile"].includes(p) && s, va = ["Desktop"].includes(p) && s, l = f && p !== "Desktop", c = f && !s, te = () => {
|
|
159
161
|
const e = window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches, n = window.matchMedia("(max-width: 767px)").matches;
|
|
160
162
|
switch (!0) {
|
|
161
|
-
case
|
|
163
|
+
case va:
|
|
162
164
|
return u;
|
|
163
|
-
case
|
|
165
|
+
case wa:
|
|
164
166
|
return f ? (t == null ? void 0 : t.tabletXAxisTextRotation) ?? u : u;
|
|
165
|
-
case
|
|
167
|
+
case xa:
|
|
166
168
|
return f ? (t == null ? void 0 : t.mobileXAxisTextRotation) ?? u : u;
|
|
167
169
|
case e:
|
|
168
170
|
return f ? (t == null ? void 0 : t.tabletXAxisTextRotation) ?? u : u;
|
|
@@ -171,20 +173,20 @@ const ir = (C) => {
|
|
|
171
173
|
default:
|
|
172
174
|
return u;
|
|
173
175
|
}
|
|
174
|
-
},
|
|
176
|
+
}, La = te(), [ya, _e] = E(La), Ke = R.intl.locale, $ = Ka(null), Qe = (e) => {
|
|
175
177
|
try {
|
|
176
|
-
return
|
|
178
|
+
return fa ? e : decodeURIComponent(e);
|
|
177
179
|
} catch {
|
|
178
180
|
return console.error(`error decoding value:${e}`), e;
|
|
179
181
|
}
|
|
180
182
|
}, k = (e) => {
|
|
181
183
|
try {
|
|
182
|
-
return JSON.parse(
|
|
184
|
+
return JSON.parse(Qe(e));
|
|
183
185
|
} catch {
|
|
184
186
|
console.error(`error parsing value:${e}`);
|
|
185
187
|
}
|
|
186
188
|
return null;
|
|
187
|
-
},
|
|
189
|
+
}, ka = () => k(Vt)[r], Ta = () => k(pt), Ze = () => {
|
|
188
190
|
var e;
|
|
189
191
|
if (a != null && a[r]) {
|
|
190
192
|
let n = (e = a == null ? void 0 : a[r]) == null ? void 0 : e.format;
|
|
@@ -199,10 +201,10 @@ const ir = (C) => {
|
|
|
199
201
|
return n;
|
|
200
202
|
}
|
|
201
203
|
return a != null && a.csv ? a.csv.format : null;
|
|
202
|
-
},
|
|
204
|
+
}, Ia = () => {
|
|
203
205
|
let e = null;
|
|
204
206
|
return a != null && a[r] ? a[r].useCustomAxisFormat && a[r].customFormat && (e = a[r].customFormat) : a != null && a.csv && a.csv.useCustomAxisFormat && a.csv.customFormat && (e = a.csv.customFormat), e;
|
|
205
|
-
},
|
|
207
|
+
}, Ca = () => a != null && a[r] ? Object.keys(a[r]).map((e) => ({ value: e, ...a[r][e] })).filter((e) => e.selected).map((e) => e.value) : [], Oe = () => {
|
|
206
208
|
const e = {};
|
|
207
209
|
return a != null && a[r] && Object.keys(a[r]).map((o) => ({ value: o, ...a[r][o] })).filter((o) => o.selected && o.hasCustomLabel).forEach((o) => {
|
|
208
210
|
e[o.value] = o.customLabel;
|
|
@@ -210,14 +212,14 @@ const ir = (C) => {
|
|
|
210
212
|
}, Ma = () => a != null && a[r] ? Object.keys(a[r]).filter(
|
|
211
213
|
(e) => a[r][e].allowSelection
|
|
212
214
|
) : [];
|
|
213
|
-
let a =
|
|
215
|
+
let a = Ta(), b = Ca(), g = Ze();
|
|
214
216
|
const Da = Ma();
|
|
215
|
-
let ae =
|
|
217
|
+
let ae = dt, re = Xt, oe = Qe(yt);
|
|
216
218
|
if (d != null && d[r]) {
|
|
217
219
|
const e = Object.keys(d[r].measures).map((n) => ({ value: n, ...d[r].measures[n] })).filter((n) => n.selected).map((n) => n.value);
|
|
218
|
-
a = d, b = e, g =
|
|
220
|
+
a = d, b = e, g = Ze(), ae = d.leftTitle, re = d.rightTitle, d.customTooltip && (oe = d.customTooltip);
|
|
219
221
|
}
|
|
220
|
-
const
|
|
222
|
+
const Ra = g ? {
|
|
221
223
|
style: g.style === "compacted" ? "decimal" : g.style,
|
|
222
224
|
notation: g.style === "compacted" ? "compact" : "standard",
|
|
223
225
|
currency: g.currency,
|
|
@@ -228,7 +230,7 @@ const ir = (C) => {
|
|
|
228
230
|
currency: "USD",
|
|
229
231
|
minimumFractionDigits: 2,
|
|
230
232
|
maximumFractionDigits: 2
|
|
231
|
-
},
|
|
233
|
+
}, Aa = Ia(), i = k(ta), Fa = {
|
|
232
234
|
style: (i == null ? void 0 : i.style) === "compacted" ? "decimal" : i == null ? void 0 : i.style,
|
|
233
235
|
notation: (i == null ? void 0 : i.style) === "compacted" ? "compact" : "standard",
|
|
234
236
|
currency: i == null ? void 0 : i.currency,
|
|
@@ -238,28 +240,28 @@ const ir = (C) => {
|
|
|
238
240
|
maximumFractionDigits: parseInt(
|
|
239
241
|
i == null ? void 0 : i.maximumFractionDigits
|
|
240
242
|
)
|
|
241
|
-
}, [
|
|
243
|
+
}, [Ba, br] = E(ve), Pa = s ? ve : Ba, Ea = {
|
|
242
244
|
scheme: be,
|
|
243
245
|
colorBy: Z
|
|
244
|
-
}, S = s ? z - 80 : z,
|
|
245
|
-
left:
|
|
246
|
-
bottom:
|
|
247
|
-
right:
|
|
246
|
+
}, S = s ? z - 80 : z, Na = () => (l || c) && !(t != null && t.showXAxisTitle) ? "" : ct, za = () => l || c ? t != null && t.showYAxisTitle ? ae : "" : ae, Ga = () => l || c ? t != null && t.showRightAxisTitle ? re : "" : re, Va = {
|
|
247
|
+
left: za(),
|
|
248
|
+
bottom: Na(),
|
|
249
|
+
right: Ga()
|
|
248
250
|
}, H = (e) => {
|
|
249
251
|
if (e === "true" || e === !0)
|
|
250
252
|
return !0;
|
|
251
253
|
if (e === "false" || e === !1)
|
|
252
254
|
return !1;
|
|
253
|
-
},
|
|
255
|
+
}, je = () => {
|
|
254
256
|
H(y) && !H(L) ? (y = !1, L = !0) : !H(y) && H(L) && (y = !0, L = !1);
|
|
255
|
-
},
|
|
257
|
+
}, Xa = () => O === "horizontal" ? (je(), "vertical") : (je(), "horizontal"), Ua = () => t != null && t.chartLayoutOverride ? Xa() : O, W = (e, n, o) => e ? Number.parseInt(n) ?? o : o, et = (e, n, o) => e ? n ?? o : o;
|
|
256
258
|
ue(() => {
|
|
257
259
|
const e = () => {
|
|
258
|
-
|
|
260
|
+
ba(window.innerWidth <= 1250);
|
|
259
261
|
const n = te();
|
|
260
|
-
|
|
262
|
+
_e(n);
|
|
261
263
|
};
|
|
262
|
-
return window.addEventListener("resize", e),
|
|
264
|
+
return window.addEventListener("resize", e), _e(te()), () => {
|
|
263
265
|
window.removeEventListener("resize", e);
|
|
264
266
|
};
|
|
265
267
|
}, [
|
|
@@ -270,144 +272,146 @@ const ir = (C) => {
|
|
|
270
272
|
t == null ? void 0 : t.tabletXAxisTextRotation,
|
|
271
273
|
t == null ? void 0 : t.mobileXAxisTextRotation
|
|
272
274
|
]);
|
|
273
|
-
const
|
|
274
|
-
const e = ["tablet", "mobile", "midTablet"].includes(
|
|
275
|
+
const $a = () => {
|
|
276
|
+
const e = ["tablet", "mobile", "midTablet"].includes(Oa());
|
|
275
277
|
return s && p === "Desktop" ? we : e ? "bottom" : we;
|
|
276
|
-
},
|
|
278
|
+
}, tt = {
|
|
277
279
|
app: r,
|
|
278
280
|
editing: s,
|
|
279
|
-
tickColor: decodeURIComponent(
|
|
280
|
-
tickRotation:
|
|
281
|
-
layout: l || c ?
|
|
281
|
+
tickColor: decodeURIComponent(mt),
|
|
282
|
+
tickRotation: ya,
|
|
283
|
+
layout: l || c ? Ua() : O,
|
|
282
284
|
reverse: Le == !0 || Le == "true",
|
|
283
285
|
showLegends: xe == !0 || xe == "true",
|
|
284
|
-
legendLabel:
|
|
286
|
+
legendLabel: lt,
|
|
285
287
|
swap: G == !0 || G == "true",
|
|
286
288
|
showGrid: Te == !0 || Te == "true",
|
|
287
289
|
showPercentage: qe == !0 || qe == "true",
|
|
288
290
|
marginLeft: W(
|
|
289
291
|
l || c,
|
|
290
292
|
Number.parseInt(t == null ? void 0 : t.marginLeft),
|
|
291
|
-
parseInt(
|
|
293
|
+
parseInt(gt)
|
|
292
294
|
),
|
|
293
295
|
marginTop: W(
|
|
294
296
|
l || c,
|
|
295
297
|
Number.parseInt(t == null ? void 0 : t.marginTop),
|
|
296
|
-
parseInt(
|
|
298
|
+
parseInt(ft)
|
|
297
299
|
),
|
|
298
300
|
marginRight: W(
|
|
299
301
|
l || c,
|
|
300
302
|
Number.parseInt(t == null ? void 0 : t.marginRight),
|
|
301
|
-
Number.parseInt(
|
|
303
|
+
Number.parseInt(bt)
|
|
302
304
|
),
|
|
303
305
|
marginBottom: W(
|
|
304
306
|
l || c,
|
|
305
307
|
Number.parseInt(t == null ? void 0 : t.marginBottom),
|
|
306
|
-
Number.parseInt(
|
|
308
|
+
Number.parseInt(wt)
|
|
307
309
|
),
|
|
308
310
|
height: `${S}px`,
|
|
309
|
-
legendPosition:
|
|
310
|
-
legends:
|
|
311
|
+
legendPosition: $a(),
|
|
312
|
+
legends: Va,
|
|
311
313
|
tooltip: V == !0 || V == "true" ? oe : oe.replace(/\r\n/g, "<hr/>").replace(/[\r\n]/g, "<hr/>"),
|
|
312
|
-
colors:
|
|
313
|
-
groupMode:
|
|
314
|
-
format:
|
|
315
|
-
startAngle:
|
|
316
|
-
endAngle:
|
|
317
|
-
offsetY:
|
|
314
|
+
colors: Ea,
|
|
315
|
+
groupMode: st,
|
|
316
|
+
format: Ra,
|
|
317
|
+
startAngle: xt,
|
|
318
|
+
endAngle: vt,
|
|
319
|
+
offsetY: kt,
|
|
318
320
|
// csvLineLayerData,
|
|
319
321
|
// lineColor: decodeURIComponent(lineColor),
|
|
320
322
|
// lineTooltip,
|
|
321
323
|
// lineTitle,
|
|
322
|
-
maxValue:
|
|
323
|
-
valueScale:
|
|
324
|
+
maxValue: It,
|
|
325
|
+
valueScale: Ct,
|
|
324
326
|
categories: N,
|
|
325
327
|
lineLayerEnabled: ye == !0 || ye == "true",
|
|
326
|
-
overlays: k(
|
|
327
|
-
barColor: decodeURIComponent(
|
|
328
|
+
overlays: k(Tt) || [],
|
|
329
|
+
barColor: decodeURIComponent(Dt),
|
|
328
330
|
overrideTickColor: ke == !0 || ke == "true",
|
|
329
331
|
fixedMinValue: Rt,
|
|
330
|
-
fixedMaxValue:
|
|
331
|
-
barPadding:
|
|
332
|
+
fixedMaxValue: At,
|
|
333
|
+
barPadding: et(
|
|
332
334
|
l || c,
|
|
333
335
|
t == null ? void 0 : t.barPadding,
|
|
334
|
-
|
|
336
|
+
Ft
|
|
335
337
|
),
|
|
336
|
-
barLabelPosition:
|
|
337
|
-
lineLabelPosition:
|
|
338
|
-
barInnerPadding:
|
|
338
|
+
barLabelPosition: Bt,
|
|
339
|
+
lineLabelPosition: Pt,
|
|
340
|
+
barInnerPadding: et(
|
|
339
341
|
l || c,
|
|
340
342
|
t == null ? void 0 : t.barInnerPadding,
|
|
341
|
-
|
|
343
|
+
Et
|
|
342
344
|
),
|
|
343
|
-
xLabelColor: decodeURIComponent(
|
|
344
|
-
barLabelColor: decodeURIComponent(
|
|
345
|
-
legendLabelColor: decodeURIComponent(
|
|
346
|
-
tooltipEnabled:
|
|
347
|
-
legendLabelBack:
|
|
348
|
-
legendCheckBack:
|
|
349
|
-
highlightXAxisLine:
|
|
345
|
+
xLabelColor: decodeURIComponent(Nt),
|
|
346
|
+
barLabelColor: decodeURIComponent(zt),
|
|
347
|
+
legendLabelColor: decodeURIComponent(Gt),
|
|
348
|
+
tooltipEnabled: Ce == !0 || Ce == "true",
|
|
349
|
+
legendLabelBack: De == !0 || De == "true",
|
|
350
|
+
legendCheckBack: Me == !0 || Me == "true",
|
|
351
|
+
highlightXAxisLine: Re == !0 || Re == "true",
|
|
350
352
|
showTickLine: Ae == !0 || Ae == "true",
|
|
351
353
|
showRightAxis: Fe == !0 || Fe == "true",
|
|
352
|
-
offsetRight:
|
|
353
|
-
offsetBottom:
|
|
354
|
-
confidenceIntervals: k(
|
|
354
|
+
offsetRight: Ut,
|
|
355
|
+
offsetBottom: $t,
|
|
356
|
+
confidenceIntervals: k(Ht) || [],
|
|
355
357
|
showPoints: Pe == !0 || Pe == "true",
|
|
356
358
|
enableArea: Be == !0 || Be == "true",
|
|
357
|
-
areaShadingCriteria:
|
|
358
|
-
areaLowerBound:
|
|
359
|
-
areaUpperBound:
|
|
359
|
+
areaShadingCriteria: Wt,
|
|
360
|
+
areaLowerBound: Yt,
|
|
361
|
+
areaUpperBound: qt,
|
|
360
362
|
showGroupTotal: ze == !0 || ze == "true",
|
|
361
|
-
groupTotalMeasure:
|
|
362
|
-
groupTotalLabel:
|
|
363
|
-
groupTotalFormat:
|
|
364
|
-
groupTotalOffset:
|
|
363
|
+
groupTotalMeasure: jt,
|
|
364
|
+
groupTotalLabel: ea,
|
|
365
|
+
groupTotalFormat: Fa,
|
|
366
|
+
groupTotalOffset: aa,
|
|
365
367
|
groupTotalFixedPosition: Ge == !0 || Ge == "true",
|
|
366
|
-
centerLabel:
|
|
368
|
+
centerLabel: Jt,
|
|
367
369
|
showArcLabels: Ee == !0 || Ee == "true",
|
|
368
370
|
showArcLinkLabels: Ne == !0 || Ne == "true",
|
|
369
|
-
slicePadding:
|
|
370
|
-
centerLabelFontWeight:
|
|
371
|
-
centerLabelFontSize:
|
|
372
|
-
centerLabelXOffset:
|
|
373
|
-
centerLabelYOffset:
|
|
371
|
+
slicePadding: _t,
|
|
372
|
+
centerLabelFontWeight: Kt,
|
|
373
|
+
centerLabelFontSize: Qt,
|
|
374
|
+
centerLabelXOffset: Zt,
|
|
375
|
+
centerLabelYOffset: Ot,
|
|
374
376
|
userMeasures: Da,
|
|
375
377
|
tooltipEnableMarkdown: V == !0 || V == "true",
|
|
376
378
|
yAxisTickValues: l || c ? t.yAxisTickValues ?? Ve : Ve,
|
|
377
379
|
xAxisTickValues: l || c ? t.xAxisTickValues ?? Xe : Xe,
|
|
378
380
|
enableGridY: L == !0 || L == "true",
|
|
379
381
|
enableGridX: y == !0 || y == "true",
|
|
380
|
-
offsetText:
|
|
382
|
+
offsetText: ra,
|
|
381
383
|
selectedMeasures: b,
|
|
382
384
|
overallLabel: j,
|
|
383
|
-
minMaxClamp:
|
|
385
|
+
minMaxClamp: oa,
|
|
384
386
|
reverseLegend: Ue == !0 || Ue == "true",
|
|
385
|
-
customAxisFormat:
|
|
387
|
+
customAxisFormat: Aa,
|
|
386
388
|
sort: $e,
|
|
387
389
|
sortReverse: X == !0 || X == "true",
|
|
388
390
|
sortReverseSecondDimension: U == !0 || U == "true",
|
|
389
|
-
radarCurve:
|
|
390
|
-
radarFillOpacity:
|
|
391
|
-
radarBorderWidth:
|
|
392
|
-
radarGridLevels:
|
|
393
|
-
radarGridShape:
|
|
394
|
-
radarGridLabelOffset:
|
|
391
|
+
radarCurve: na,
|
|
392
|
+
radarFillOpacity: ia,
|
|
393
|
+
radarBorderWidth: sa,
|
|
394
|
+
radarGridLevels: da,
|
|
395
|
+
radarGridShape: la,
|
|
396
|
+
radarGridLabelOffset: ca,
|
|
395
397
|
radarEnableDots: He == !0 || He == "true",
|
|
396
|
-
radarDotSize:
|
|
398
|
+
radarDotSize: ua,
|
|
397
399
|
radarEnableDotLabel: We == !0 || We == "true",
|
|
398
|
-
radarDotLabelOffset:
|
|
400
|
+
radarDotLabelOffset: ma,
|
|
399
401
|
sortSecondDimension: Se,
|
|
400
402
|
mobileCustomization: Ye,
|
|
401
403
|
dimension1: F,
|
|
402
404
|
previewMode: p,
|
|
403
|
-
lineCurve:
|
|
404
|
-
|
|
405
|
+
lineCurve: ha,
|
|
406
|
+
showLegendsInColumns: Je == !0 || Je == "true",
|
|
407
|
+
numberOfLegendColumns: parseInt(ga) || 4
|
|
408
|
+
}, ne = {}, ie = k(Lt) || {};
|
|
405
409
|
ie && ie.forEach && ie.forEach((e) => {
|
|
406
410
|
e.value != null && e.value.filter((n) => n != null && n.toString().trim() != "").length > 0 && (ne[e.param] = e.value);
|
|
407
411
|
}), he && (ne.dvzProxyDatasetId = he);
|
|
408
|
-
let T = null,
|
|
412
|
+
let T = null, I = null;
|
|
409
413
|
if (r === "csv")
|
|
410
|
-
T =
|
|
414
|
+
T = or;
|
|
411
415
|
else
|
|
412
416
|
switch (A) {
|
|
413
417
|
case "line":
|
|
@@ -423,28 +427,28 @@ const ir = (C) => {
|
|
|
423
427
|
T = K.BarDataFrame;
|
|
424
428
|
break;
|
|
425
429
|
}
|
|
426
|
-
let
|
|
430
|
+
let C = !1;
|
|
427
431
|
switch (A) {
|
|
428
432
|
case "bar":
|
|
429
|
-
|
|
433
|
+
I = tr, C = r != "csv" && F == "none" && b.length == 0;
|
|
430
434
|
break;
|
|
431
435
|
case "line":
|
|
432
|
-
|
|
436
|
+
I = ar, C = r !== "csv" && (b.length === 0 || F === "none");
|
|
433
437
|
break;
|
|
434
438
|
case "pie":
|
|
435
|
-
|
|
439
|
+
C = r != "csv" && b.length == 0, I = ja;
|
|
436
440
|
break;
|
|
437
441
|
case "radar":
|
|
438
|
-
|
|
442
|
+
C = r != "csv" && b.length == 0, I = er;
|
|
439
443
|
break;
|
|
440
444
|
default:
|
|
441
|
-
|
|
445
|
+
I = /* @__PURE__ */ m("div", { children: "No Chart" });
|
|
442
446
|
break;
|
|
443
447
|
}
|
|
444
|
-
const
|
|
448
|
+
const Sa = ut === "true", B = [];
|
|
445
449
|
F != "none" && B.push(F), fe != "none" && B.push(fe);
|
|
446
|
-
const [
|
|
447
|
-
function
|
|
450
|
+
const [at, Ha] = E(0), [wr, Wa] = E(rt());
|
|
451
|
+
function rt() {
|
|
448
452
|
var e;
|
|
449
453
|
return ((e = window.screen.orientation) == null ? void 0 : e.type) || (window.innerWidth > window.innerHeight ? "landscape-primary" : "portrait-primary");
|
|
450
454
|
}
|
|
@@ -455,35 +459,35 @@ const ir = (C) => {
|
|
|
455
459
|
".legends.container.has-standard-12-font-size.bottom"
|
|
456
460
|
) || $.current.querySelector(".legends.container.items-section");
|
|
457
461
|
if (!o) return;
|
|
458
|
-
const { clientHeight: w } = o, P = window.getComputedStyle(o),
|
|
462
|
+
const { clientHeight: w } = o, P = window.getComputedStyle(o), Ya = parseInt(P.marginTop), ot = parseInt(P.marginBottom), qa = parseInt(P.paddingTop), Ja = parseInt(P.paddingBottom), _a = w + Ya + ot + qa + Ja, nt = o.closest(
|
|
459
463
|
".ui.fluid.container.content"
|
|
460
464
|
);
|
|
461
|
-
if (
|
|
462
|
-
const x =
|
|
465
|
+
if (nt) {
|
|
466
|
+
const x = nt.querySelector(".data-source");
|
|
463
467
|
if (x) {
|
|
464
|
-
const
|
|
465
|
-
if (
|
|
468
|
+
const M = x.getBoundingClientRect(), D = o.getBoundingClientRect();
|
|
469
|
+
if (D.bottom !== 0 && M.top !== 0) {
|
|
466
470
|
if (o.textContent.trim() === "") return;
|
|
467
|
-
const Y =
|
|
471
|
+
const Y = ot, q = D.bottom + Y, de = window.getComputedStyle(x), J = parseFloat(de.marginTop) || 0, _ = M.top - J;
|
|
468
472
|
if (q > _) {
|
|
469
473
|
let le = q - _;
|
|
470
474
|
le < 5 && (le += 1), x.style.marginTop = `${le + 1}px`;
|
|
471
475
|
}
|
|
472
476
|
} else
|
|
473
477
|
setTimeout(() => {
|
|
474
|
-
|
|
478
|
+
M.top < D.bottom && (x.style.marginTop = `${D.bottom - M.top + 1}px`);
|
|
475
479
|
}, 1e3);
|
|
476
480
|
}
|
|
477
481
|
}
|
|
478
482
|
const se = o.closest(".chart.container");
|
|
479
483
|
if (se) {
|
|
480
|
-
const x = se.getBoundingClientRect(),
|
|
484
|
+
const x = se.getBoundingClientRect(), M = window.getComputedStyle(se), D = Number.parseFloat(M.marginBottom) || 0, Y = x.bottom + D, q = o.getBoundingClientRect(), de = Number.parseFloat(P.marginTop) || 0, J = q.top - de;
|
|
481
485
|
if (J < Y) {
|
|
482
486
|
const _ = Y - J;
|
|
483
487
|
o.style.marginTop = `${_ + 1}px`;
|
|
484
488
|
}
|
|
485
489
|
}
|
|
486
|
-
|
|
490
|
+
Ha(_a);
|
|
487
491
|
})();
|
|
488
492
|
}, 100);
|
|
489
493
|
return () => {
|
|
@@ -492,7 +496,7 @@ const ir = (C) => {
|
|
|
492
496
|
}, [ee, $]), ue(() => {
|
|
493
497
|
const e = () => {
|
|
494
498
|
setTimeout(() => {
|
|
495
|
-
|
|
499
|
+
Wa(rt());
|
|
496
500
|
}, 100);
|
|
497
501
|
};
|
|
498
502
|
return window.screen.orientation ? window.screen.orientation.addEventListener("change", e) : window.addEventListener("resize", e), () => {
|
|
@@ -503,20 +507,20 @@ const ir = (C) => {
|
|
|
503
507
|
{
|
|
504
508
|
className: "chart container",
|
|
505
509
|
style: {
|
|
506
|
-
minHeight: A === "pie" && window.innerWidth <= 480 ? `${parseInt(z) + parseInt(
|
|
510
|
+
minHeight: A === "pie" && window.innerWidth <= 480 ? `${parseInt(z) + parseInt(at) * 0.5}px` : `${parseInt(z) + parseInt(at)}px`
|
|
507
511
|
},
|
|
508
512
|
fluid: !0,
|
|
509
513
|
children: [
|
|
510
514
|
/* @__PURE__ */ m(
|
|
511
|
-
|
|
515
|
+
Qa,
|
|
512
516
|
{
|
|
513
517
|
editing: s,
|
|
514
518
|
style: { height: `${S}px` },
|
|
515
519
|
params: ne,
|
|
516
|
-
waitForFilters:
|
|
520
|
+
waitForFilters: pa === "true",
|
|
517
521
|
app: r,
|
|
518
522
|
group: ge,
|
|
519
|
-
csv:
|
|
523
|
+
csv: ht,
|
|
520
524
|
store: [r, Q, ...B],
|
|
521
525
|
source: B.join("/"),
|
|
522
526
|
children: /* @__PURE__ */ ce(
|
|
@@ -526,19 +530,19 @@ const ir = (C) => {
|
|
|
526
530
|
className: "body",
|
|
527
531
|
fluid: !0,
|
|
528
532
|
children: [
|
|
529
|
-
|
|
530
|
-
!
|
|
531
|
-
/* @__PURE__ */ m(
|
|
533
|
+
C && /* @__PURE__ */ m(it, { editing: s }),
|
|
534
|
+
!C && /* @__PURE__ */ ce(Za, { children: [
|
|
535
|
+
/* @__PURE__ */ m(it, { app: r, group: ge, noDataMsg: Mt, children: " " }),
|
|
532
536
|
/* @__PURE__ */ m(
|
|
533
537
|
T,
|
|
534
538
|
{
|
|
535
|
-
locale:
|
|
539
|
+
locale: Ke,
|
|
536
540
|
colorBy: Z,
|
|
537
|
-
hiddenBars:
|
|
541
|
+
hiddenBars: St,
|
|
538
542
|
swap: G === "true" || G === !0,
|
|
539
543
|
type: A,
|
|
540
544
|
includeTotal: !0,
|
|
541
|
-
includeOverall:
|
|
545
|
+
includeOverall: Ie === !0 || Ie === "true",
|
|
542
546
|
overallLabel: j,
|
|
543
547
|
measures: b,
|
|
544
548
|
dimensions: [...B],
|
|
@@ -546,20 +550,20 @@ const ir = (C) => {
|
|
|
546
550
|
sortReverse: X === !0 || X === "true",
|
|
547
551
|
sortSecondDimension: Se,
|
|
548
552
|
sortReverseSecondDimension: U === !0 || U === "true",
|
|
549
|
-
customLabels:
|
|
553
|
+
customLabels: Oe(),
|
|
550
554
|
children: /* @__PURE__ */ m(
|
|
551
|
-
|
|
555
|
+
nr,
|
|
552
556
|
{
|
|
553
557
|
type: A,
|
|
554
558
|
app: r,
|
|
555
|
-
locale:
|
|
559
|
+
locale: Ke,
|
|
556
560
|
overallLabel: j,
|
|
557
|
-
customLabels:
|
|
558
|
-
manualColors:
|
|
561
|
+
customLabels: Oe(),
|
|
562
|
+
manualColors: ka(),
|
|
559
563
|
colorBy: Z,
|
|
560
564
|
scheme: be,
|
|
561
|
-
barColor:
|
|
562
|
-
children: /* @__PURE__ */ m(
|
|
565
|
+
barColor: tt.barColor,
|
|
566
|
+
children: /* @__PURE__ */ m(I, { ...tt })
|
|
563
567
|
}
|
|
564
568
|
)
|
|
565
569
|
}
|
|
@@ -571,14 +575,14 @@ const ir = (C) => {
|
|
|
571
575
|
}
|
|
572
576
|
),
|
|
573
577
|
/* @__PURE__ */ m("br", {}),
|
|
574
|
-
|
|
578
|
+
Sa && v && Pa === "info" && /* @__PURE__ */ m(
|
|
575
579
|
me,
|
|
576
580
|
{
|
|
577
581
|
fluid: !0,
|
|
578
582
|
style: { height: S + "px" },
|
|
579
583
|
className: "body",
|
|
580
584
|
children: /* @__PURE__ */ m(
|
|
581
|
-
|
|
585
|
+
rr,
|
|
582
586
|
{
|
|
583
587
|
post: { content: { rendered: v } }
|
|
584
588
|
}
|
|
@@ -588,13 +592,13 @@ const ir = (C) => {
|
|
|
588
592
|
]
|
|
589
593
|
}
|
|
590
594
|
) });
|
|
591
|
-
},
|
|
592
|
-
const { "data-app": s, "data-group": Q } = pe, v =
|
|
595
|
+
}, lr = (R, pe) => {
|
|
596
|
+
const { "data-app": s, "data-group": Q } = pe, v = R.getIn(["data", "measures", s, Q]), N = R.getIn([
|
|
593
597
|
"data",
|
|
594
598
|
"pageModuleProps"
|
|
595
599
|
]), d = {};
|
|
596
600
|
return v && Object.keys(v).length > 0 && (d.injectedMeasures = v ?? {}), N && (d.pageModuleProps = N), d;
|
|
597
|
-
},
|
|
601
|
+
}, cr = {}, Gr = ir(lr, cr)(sr(dr));
|
|
598
602
|
export {
|
|
599
|
-
|
|
603
|
+
Gr as default
|
|
600
604
|
};
|