@tmf_ciclica/ciclicastorybook 1.1.98 → 1.1.101
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/index.cjs.js +3 -3
- package/dist/index.es.js +723 -727
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -7,8 +7,8 @@ import { useTranslation as k, Trans as Ae } from "react-i18next";
|
|
|
7
7
|
import { motion as Ie } from "framer-motion";
|
|
8
8
|
import { create as vt } from "zustand";
|
|
9
9
|
import * as Pe from "d3";
|
|
10
|
-
import
|
|
11
|
-
import { useSelector as
|
|
10
|
+
import wt from "mapbox-gl";
|
|
11
|
+
import { useSelector as xt, useDispatch as Nt } from "react-redux";
|
|
12
12
|
import kt, { Source as Bt, Layer as St, NavigationControl as Dt, Popup as Mt } from "react-map-gl/mapbox";
|
|
13
13
|
import ye from "maplibre-gl";
|
|
14
14
|
import { Protocol as $t } from "pmtiles";
|
|
@@ -39,36 +39,36 @@ const jt = "_ambitSelector_mcunf_2", zt = "_header_mcunf_13", Zt = "_nameDateCon
|
|
|
39
39
|
onClickDelete: i,
|
|
40
40
|
onClickFilters: o,
|
|
41
41
|
onClickAmbit: t,
|
|
42
|
-
isActive:
|
|
43
|
-
activeColor:
|
|
42
|
+
isActive: r,
|
|
43
|
+
activeColor: a,
|
|
44
44
|
fontColor: l,
|
|
45
45
|
moreInfo: c
|
|
46
46
|
}) => {
|
|
47
|
-
const { nom: u, created_at: m, id:
|
|
47
|
+
const { nom: u, created_at: m, id: g, isBeingProcessed: y } = n;
|
|
48
48
|
return /* @__PURE__ */ p(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
className: oe.ambitItem,
|
|
52
52
|
style: { borderBottom: `1px solid ${l}` },
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ p("div", { className: oe.ambitNameDate, onClick: () => t(
|
|
54
|
+
/* @__PURE__ */ p("div", { className: oe.ambitNameDate, onClick: () => t(g), children: [
|
|
55
55
|
/* @__PURE__ */ p("div", { className: oe.ambitName, children: [
|
|
56
56
|
/* @__PURE__ */ s(
|
|
57
57
|
"img",
|
|
58
58
|
{
|
|
59
59
|
style: { marginRight: 9 },
|
|
60
|
-
src:
|
|
60
|
+
src: r ? s2 : r2
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
/* @__PURE__ */ s("span", { style: { color:
|
|
63
|
+
/* @__PURE__ */ s("span", { style: { color: r ? a : l }, children: u })
|
|
64
64
|
] }),
|
|
65
65
|
/* @__PURE__ */ s("div", { className: oe.ambitDate, children: m ? new Date(m).toLocaleDateString() : "" })
|
|
66
66
|
] }),
|
|
67
67
|
/* @__PURE__ */ p("div", { className: oe.ambitButtons, children: [
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */ s("button", { onClick: () => o(
|
|
70
|
-
/* @__PURE__ */ s("button", { onClick: () => d(
|
|
71
|
-
/* @__PURE__ */ s("button", { onClick: () => i(
|
|
68
|
+
y && /* @__PURE__ */ s("img", { src: o2 }),
|
|
69
|
+
/* @__PURE__ */ s("button", { onClick: () => o(g), disabled: n.is_default, children: /* @__PURE__ */ s("img", { src: i2 }) }),
|
|
70
|
+
/* @__PURE__ */ s("button", { onClick: () => d(g), children: /* @__PURE__ */ s("img", { src: n2 }) }),
|
|
71
|
+
/* @__PURE__ */ s("button", { onClick: () => i(g), disabled: n.is_default, children: /* @__PURE__ */ s("img", { src: t2 }) })
|
|
72
72
|
] })
|
|
73
73
|
]
|
|
74
74
|
}
|
|
@@ -100,8 +100,8 @@ const je = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
100
100
|
fontColor: i = "#605B56",
|
|
101
101
|
borderColor: o = "#605B56",
|
|
102
102
|
type: t = "button",
|
|
103
|
-
containerStyles:
|
|
104
|
-
disabled:
|
|
103
|
+
containerStyles: r = {},
|
|
104
|
+
disabled: a = !1
|
|
105
105
|
}) => /* @__PURE__ */ s(
|
|
106
106
|
"button",
|
|
107
107
|
{
|
|
@@ -109,11 +109,11 @@ const je = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
109
109
|
style: {
|
|
110
110
|
color: i,
|
|
111
111
|
border: `1.5px solid ${o}`,
|
|
112
|
-
...
|
|
112
|
+
...r
|
|
113
113
|
},
|
|
114
114
|
onClick: d,
|
|
115
115
|
type: t,
|
|
116
|
-
disabled:
|
|
116
|
+
disabled: a,
|
|
117
117
|
children: n
|
|
118
118
|
}
|
|
119
119
|
), c2 = ({
|
|
@@ -122,24 +122,24 @@ const je = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
122
122
|
fontColor: i = "#605B56",
|
|
123
123
|
activeColor: o,
|
|
124
124
|
nameLabel: t,
|
|
125
|
-
dateLabel:
|
|
126
|
-
newAmbitLabel:
|
|
125
|
+
dateLabel: r,
|
|
126
|
+
newAmbitLabel: a = "New field",
|
|
127
127
|
buttonContainerStyles: l = {},
|
|
128
128
|
containerStyles: c = {},
|
|
129
129
|
onCLickNewAmbit: u = () => console.log("New ambit clicked"),
|
|
130
|
-
onClickCopy: m = (
|
|
131
|
-
onCLickDelete:
|
|
132
|
-
onClickFilters:
|
|
133
|
-
onClickAmbit:
|
|
130
|
+
onClickCopy: m = (C) => console.log(`Copy ambit: ${C}`),
|
|
131
|
+
onCLickDelete: g = (C) => console.log(`Delete ambit: ${C}`),
|
|
132
|
+
onClickFilters: y = (C) => console.log(`Filters clicked: ${C}`),
|
|
133
|
+
onClickAmbit: b = (C) => console.log(`OnCLickAmbit: ${C}`)
|
|
134
134
|
}) => {
|
|
135
|
-
const { t:
|
|
135
|
+
const { t: C } = k(), [f, h] = $(n);
|
|
136
136
|
L(() => {
|
|
137
|
-
n &&
|
|
137
|
+
n && h(n);
|
|
138
138
|
}, [n]);
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
let
|
|
142
|
-
|
|
139
|
+
const _ = (v) => {
|
|
140
|
+
if (f && f.length > 0) {
|
|
141
|
+
let x = [...f];
|
|
142
|
+
x.sort((w, N) => w[v].localeCompare(N[v])), h(x);
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
return /* @__PURE__ */ p(
|
|
@@ -155,12 +155,12 @@ const je = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
155
155
|
style: { borderBottom: `1px solid ${i}` },
|
|
156
156
|
children: [
|
|
157
157
|
/* @__PURE__ */ p("div", { className: z.nameDateContainer, children: [
|
|
158
|
-
/* @__PURE__ */ s("div", { className: z.ambitName, children: /* @__PURE__ */ p("button", { onClick: () =>
|
|
159
|
-
/* @__PURE__ */ s("span", { children:
|
|
158
|
+
/* @__PURE__ */ s("div", { className: z.ambitName, children: /* @__PURE__ */ p("button", { onClick: () => _("name"), children: [
|
|
159
|
+
/* @__PURE__ */ s("span", { children: C(t) }),
|
|
160
160
|
/* @__PURE__ */ s("img", { src: je })
|
|
161
161
|
] }) }),
|
|
162
|
-
/* @__PURE__ */ s("div", { className: z.ambitDate, children: /* @__PURE__ */ p("button", { onClick: () =>
|
|
163
|
-
/* @__PURE__ */ s("span", { children:
|
|
162
|
+
/* @__PURE__ */ s("div", { className: z.ambitDate, children: /* @__PURE__ */ p("button", { onClick: () => _("date"), children: [
|
|
163
|
+
/* @__PURE__ */ s("span", { children: C(r) }),
|
|
164
164
|
/* @__PURE__ */ s("img", { src: je })
|
|
165
165
|
] }) })
|
|
166
166
|
] }),
|
|
@@ -168,19 +168,19 @@ const je = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
168
168
|
]
|
|
169
169
|
}
|
|
170
170
|
),
|
|
171
|
-
/* @__PURE__ */ s("div", { className: z.ambitListContainer, children:
|
|
171
|
+
/* @__PURE__ */ s("div", { className: z.ambitListContainer, children: f && f.length > 0 && f.map((v) => /* @__PURE__ */ s(
|
|
172
172
|
tt,
|
|
173
173
|
{
|
|
174
|
-
isActive: d ==
|
|
175
|
-
ambit:
|
|
174
|
+
isActive: d == v.id,
|
|
175
|
+
ambit: v,
|
|
176
176
|
fontColor: i,
|
|
177
177
|
activeColor: o,
|
|
178
178
|
onClickCopy: m,
|
|
179
|
-
onClickDelete:
|
|
180
|
-
onClickFilters:
|
|
181
|
-
onClickAmbit:
|
|
179
|
+
onClickDelete: g,
|
|
180
|
+
onClickFilters: y,
|
|
181
|
+
onClickAmbit: b
|
|
182
182
|
},
|
|
183
|
-
`ambitKey${
|
|
183
|
+
`ambitKey${v.id}`
|
|
184
184
|
)) }),
|
|
185
185
|
/* @__PURE__ */ s("div", { className: z.newAmbitButtonContainer, children: /* @__PURE__ */ s(
|
|
186
186
|
fe,
|
|
@@ -188,7 +188,7 @@ const je = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
188
188
|
style: { ...l },
|
|
189
189
|
onClick: u,
|
|
190
190
|
borderColor: "grey",
|
|
191
|
-
children:
|
|
191
|
+
children: C(a)
|
|
192
192
|
}
|
|
193
193
|
) })
|
|
194
194
|
]
|
|
@@ -244,9 +244,9 @@ const v2 = ({
|
|
|
244
244
|
showName: i = !0,
|
|
245
245
|
namePosition: o = "right",
|
|
246
246
|
useTooltip: t = !1,
|
|
247
|
-
tooltipPosition:
|
|
247
|
+
tooltipPosition: r = "top"
|
|
248
248
|
}) => {
|
|
249
|
-
const { t:
|
|
249
|
+
const { t: a } = k();
|
|
250
250
|
return /* @__PURE__ */ s(
|
|
251
251
|
"div",
|
|
252
252
|
{
|
|
@@ -256,25 +256,25 @@ const v2 = ({
|
|
|
256
256
|
const {
|
|
257
257
|
icon: u,
|
|
258
258
|
activeIcon: m,
|
|
259
|
-
isActive:
|
|
260
|
-
name:
|
|
261
|
-
onClick:
|
|
262
|
-
} = l,
|
|
263
|
-
i && o === "left" && /* @__PURE__ */ s("span", { className: K.buttonName, children:
|
|
264
|
-
/* @__PURE__ */ s("img", { src:
|
|
265
|
-
i && o === "right" && /* @__PURE__ */ s("span", { className: K.buttonName, children:
|
|
259
|
+
isActive: g,
|
|
260
|
+
name: y,
|
|
261
|
+
onClick: b
|
|
262
|
+
} = l, C = /* @__PURE__ */ p(Me, { children: [
|
|
263
|
+
i && o === "left" && /* @__PURE__ */ s("span", { className: K.buttonName, children: a(y) }),
|
|
264
|
+
/* @__PURE__ */ s("img", { src: g ? m : u, alt: a(y) }),
|
|
265
|
+
i && o === "right" && /* @__PURE__ */ s("span", { className: K.buttonName, children: a(y) })
|
|
266
266
|
] });
|
|
267
267
|
return /* @__PURE__ */ p("div", { className: "tooltip-parent", children: [
|
|
268
268
|
/* @__PURE__ */ s(
|
|
269
269
|
"button",
|
|
270
270
|
{
|
|
271
|
-
onClick:
|
|
271
|
+
onClick: b,
|
|
272
272
|
className: `${K.button}
|
|
273
|
-
${
|
|
274
|
-
children:
|
|
273
|
+
${g && K.active}`,
|
|
274
|
+
children: C
|
|
275
275
|
}
|
|
276
276
|
),
|
|
277
|
-
t && /* @__PURE__ */ s(Y, { text:
|
|
277
|
+
t && /* @__PURE__ */ s(Y, { text: y, position: r })
|
|
278
278
|
] }, c);
|
|
279
279
|
})
|
|
280
280
|
}
|
|
@@ -297,18 +297,18 @@ v2.propTypes = {
|
|
|
297
297
|
useTooltip: e.bool,
|
|
298
298
|
tooltipPosition: e.oneOf(["top", "bottom", "left", "right"])
|
|
299
299
|
};
|
|
300
|
-
const
|
|
301
|
-
indicatorsCategory:
|
|
302
|
-
title:
|
|
300
|
+
const w2 = "_indicatorsCategory_1cu33_2", x2 = "_title_1cu33_5", _e = {
|
|
301
|
+
indicatorsCategory: w2,
|
|
302
|
+
title: x2
|
|
303
303
|
}, Q = ({
|
|
304
304
|
isOpen: n,
|
|
305
305
|
onClick: d,
|
|
306
306
|
children: i,
|
|
307
307
|
color: o,
|
|
308
308
|
activeColor: t = "#F8A925",
|
|
309
|
-
title:
|
|
309
|
+
title: r = "Title",
|
|
310
310
|
//Change the height only if the title is more than one line or you change title fontSize, otherwise should be 53px
|
|
311
|
-
height:
|
|
311
|
+
height: a = 53,
|
|
312
312
|
//Adjust height if you change fontSize
|
|
313
313
|
titleFontStyles: l,
|
|
314
314
|
showBottomBar: c = !0,
|
|
@@ -319,8 +319,8 @@ const x2 = "_indicatorsCategory_1cu33_2", w2 = "_title_1cu33_5", _e = {
|
|
|
319
319
|
Ie.div,
|
|
320
320
|
{
|
|
321
321
|
className: _e.indicatorsCategory,
|
|
322
|
-
initial: { height: `${
|
|
323
|
-
animate: { height: n ? "auto" : `${
|
|
322
|
+
initial: { height: `${a}px` },
|
|
323
|
+
animate: { height: n ? "auto" : `${a}px` },
|
|
324
324
|
transition: { duration: 0.4 },
|
|
325
325
|
style: {
|
|
326
326
|
backgroundColor: "white",
|
|
@@ -339,7 +339,7 @@ const x2 = "_indicatorsCategory_1cu33_2", w2 = "_title_1cu33_5", _e = {
|
|
|
339
339
|
onClick: d,
|
|
340
340
|
children: [
|
|
341
341
|
/* @__PURE__ */ s("span", { style: { color: n ? t : o }, children: n ? "-" : "+" }),
|
|
342
|
-
/* @__PURE__ */ s("span", { style: { marginLeft: 12, color: n ? t : o }, children: m(
|
|
342
|
+
/* @__PURE__ */ s("span", { style: { marginLeft: 12, color: n ? t : o }, children: m(r) })
|
|
343
343
|
]
|
|
344
344
|
}
|
|
345
345
|
),
|
|
@@ -369,11 +369,11 @@ const mi = () => /* @__PURE__ */ s("div", { children: "EditAmbit" }), N2 = "data
|
|
|
369
369
|
tematicalFiltersSelected: [],
|
|
370
370
|
fontColor: "#605B56",
|
|
371
371
|
inputsColor: "#605B56"
|
|
372
|
-
})), nt = ({ title: n, onClick: d, isOpen: i = !0, textColor: o = "#ffffff", backgroundColor: t = "#605B5680", activeColor:
|
|
373
|
-
const { t:
|
|
372
|
+
})), nt = ({ title: n, onClick: d, isOpen: i = !0, textColor: o = "#ffffff", backgroundColor: t = "#605B5680", activeColor: r }) => {
|
|
373
|
+
const { t: a } = k(), { tematicalFiltersSelected: l } = T((u) => u), c = (u) => {
|
|
374
374
|
T.setState((m) => ({
|
|
375
375
|
tematicalFiltersSelected: m.tematicalFiltersSelected.filter(
|
|
376
|
-
(
|
|
376
|
+
(g) => g.code !== u
|
|
377
377
|
)
|
|
378
378
|
}));
|
|
379
379
|
};
|
|
@@ -382,10 +382,10 @@ const mi = () => /* @__PURE__ */ s("div", { children: "EditAmbit" }), N2 = "data
|
|
|
382
382
|
{
|
|
383
383
|
isOpen: i,
|
|
384
384
|
onClick: d,
|
|
385
|
-
title: n ?
|
|
386
|
-
activeColor:
|
|
385
|
+
title: n ? a(n) : "Applied Filters",
|
|
386
|
+
activeColor: r,
|
|
387
387
|
children: /* @__PURE__ */ s("div", { className: ze.AppliedFiltersContainer, children: l == null ? void 0 : l.map((u, m) => /* @__PURE__ */ p("div", { className: ze.AppliedFilterContent, style: { color: o, background: t }, children: [
|
|
388
|
-
|
|
388
|
+
a(u.name),
|
|
389
389
|
/* @__PURE__ */ s("img", { src: N2, alt: "CloseIcon", onClick: () => c(u.code), style: { cursor: "pointer" } })
|
|
390
390
|
] }, m)) })
|
|
391
391
|
}
|
|
@@ -405,15 +405,15 @@ nt.propTypes = {
|
|
|
405
405
|
),
|
|
406
406
|
activeColor: e.string
|
|
407
407
|
};
|
|
408
|
-
const it = ({ title: n, onClick: d, isOpen: i = !0, textColor: o = "#ffffff", backgroundColor: t = "#605B5680", activeColor:
|
|
409
|
-
const { t:
|
|
408
|
+
const it = ({ title: n, onClick: d, isOpen: i = !0, textColor: o = "#ffffff", backgroundColor: t = "#605B5680", activeColor: r }) => {
|
|
409
|
+
const { t: a } = k(), { tematicalFiltersSelected: l } = T((c) => c);
|
|
410
410
|
return /* @__PURE__ */ s(
|
|
411
411
|
Q,
|
|
412
412
|
{
|
|
413
413
|
isOpen: i,
|
|
414
414
|
onClick: d,
|
|
415
|
-
title: n ?
|
|
416
|
-
activeColor:
|
|
415
|
+
title: n ? a(n) : "Geographical Filters",
|
|
416
|
+
activeColor: r,
|
|
417
417
|
children: "A"
|
|
418
418
|
}
|
|
419
419
|
);
|
|
@@ -435,7 +435,7 @@ const S2 = "_checkboxContainer_zld97_2", D2 = {
|
|
|
435
435
|
indicator: o,
|
|
436
436
|
value: t
|
|
437
437
|
}) => {
|
|
438
|
-
const { t:
|
|
438
|
+
const { t: r } = k(), { title: a } = o || {}, { fontColor: l, inputsColor: c } = T((u) => u);
|
|
439
439
|
return /* @__PURE__ */ p(
|
|
440
440
|
"div",
|
|
441
441
|
{
|
|
@@ -457,7 +457,7 @@ const S2 = "_checkboxContainer_zld97_2", D2 = {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
),
|
|
460
|
-
/* @__PURE__ */ s("span", { className: "checkmark", children: a
|
|
460
|
+
/* @__PURE__ */ s("span", { className: "checkmark", children: r(a) })
|
|
461
461
|
]
|
|
462
462
|
}
|
|
463
463
|
);
|
|
@@ -484,7 +484,7 @@ function M2(n, d) {
|
|
|
484
484
|
function ve(n) {
|
|
485
485
|
return n && n.stopPropagation && n.stopPropagation(), n && n.preventDefault && n.preventDefault(), !1;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function we(n) {
|
|
488
488
|
return n == null ? [] : Array.isArray(n) ? n.slice() : [n];
|
|
489
489
|
}
|
|
490
490
|
function pe(n) {
|
|
@@ -526,8 +526,8 @@ let Fe = function(n) {
|
|
|
526
526
|
t.setState({ pending: !0 });
|
|
527
527
|
const c = t.getTouchPosition(l);
|
|
528
528
|
if (t.isScrolling === void 0) {
|
|
529
|
-
const
|
|
530
|
-
t.isScrolling = Math.abs(
|
|
529
|
+
const g = c[0] - t.startPosition[0], y = c[1] - t.startPosition[1];
|
|
530
|
+
t.isScrolling = Math.abs(y) > Math.abs(g);
|
|
531
531
|
}
|
|
532
532
|
if (t.isScrolling) return void t.setState({ index: -1 });
|
|
533
533
|
const u = t.getDiffPosition(c[0]), m = t.getValueFromPosition(u);
|
|
@@ -593,47 +593,47 @@ let Fe = function(n) {
|
|
|
593
593
|
}, 0);
|
|
594
594
|
t.pendingResizeTimeouts.push(l);
|
|
595
595
|
}, t.renderThumb = (l, c) => {
|
|
596
|
-
const u = t.props.thumbClassName + " " + t.props.thumbClassName + "-" + c + " " + (t.state.index === c ? t.props.thumbActiveClassName : ""), m = { ref: (
|
|
597
|
-
t["thumb" + c] =
|
|
598
|
-
}, key: t.props.thumbClassName + "-" + c, className: u, style: l, onMouseDown: t.createOnMouseDown(c), onTouchStart: t.createOnTouchStart(c), onFocus: t.createOnKeyDown(c), tabIndex: 0, role: "slider", "aria-orientation": t.props.orientation, "aria-valuenow": t.state.value[c], "aria-valuemin": t.props.min, "aria-valuemax": t.props.max, "aria-label": Array.isArray(t.props.ariaLabel) ? t.props.ariaLabel[c] : t.props.ariaLabel, "aria-labelledby": Array.isArray(t.props.ariaLabelledby) ? t.props.ariaLabelledby[c] : t.props.ariaLabelledby, "aria-disabled": t.props.disabled },
|
|
599
|
-
return t.props.ariaValuetext && (m["aria-valuetext"] = typeof t.props.ariaValuetext == "string" ? t.props.ariaValuetext : t.props.ariaValuetext(
|
|
596
|
+
const u = t.props.thumbClassName + " " + t.props.thumbClassName + "-" + c + " " + (t.state.index === c ? t.props.thumbActiveClassName : ""), m = { ref: (y) => {
|
|
597
|
+
t["thumb" + c] = y;
|
|
598
|
+
}, key: t.props.thumbClassName + "-" + c, className: u, style: l, onMouseDown: t.createOnMouseDown(c), onTouchStart: t.createOnTouchStart(c), onFocus: t.createOnKeyDown(c), tabIndex: 0, role: "slider", "aria-orientation": t.props.orientation, "aria-valuenow": t.state.value[c], "aria-valuemin": t.props.min, "aria-valuemax": t.props.max, "aria-label": Array.isArray(t.props.ariaLabel) ? t.props.ariaLabel[c] : t.props.ariaLabel, "aria-labelledby": Array.isArray(t.props.ariaLabelledby) ? t.props.ariaLabelledby[c] : t.props.ariaLabelledby, "aria-disabled": t.props.disabled }, g = { index: c, value: pe(t.state.value), valueNow: t.state.value[c] };
|
|
599
|
+
return t.props.ariaValuetext && (m["aria-valuetext"] = typeof t.props.ariaValuetext == "string" ? t.props.ariaValuetext : t.props.ariaValuetext(g)), t.props.renderThumb(m, g);
|
|
600
600
|
}, t.renderTrack = (l, c, u) => {
|
|
601
|
-
const m = { key: t.props.trackClassName + "-" + l, className: t.props.trackClassName + " " + t.props.trackClassName + "-" + l, style: t.buildTrackStyle(c, t.state.upperBound - u) },
|
|
602
|
-
return t.props.renderTrack(m,
|
|
601
|
+
const m = { key: t.props.trackClassName + "-" + l, className: t.props.trackClassName + " " + t.props.trackClassName + "-" + l, style: t.buildTrackStyle(c, t.state.upperBound - u) }, g = { index: l, value: pe(t.state.value) };
|
|
602
|
+
return t.props.renderTrack(m, g);
|
|
603
603
|
};
|
|
604
|
-
let
|
|
605
|
-
|
|
606
|
-
const
|
|
607
|
-
for (let l = 0; l <
|
|
608
|
-
return t.resizeObserver = null, t.resizeElementRef = B.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value:
|
|
604
|
+
let r = we(o.value);
|
|
605
|
+
r.length || (r = we(o.defaultValue)), t.pendingResizeTimeouts = [];
|
|
606
|
+
const a = [];
|
|
607
|
+
for (let l = 0; l < r.length; l += 1) r[l] = H(r[l], o), a.push(l);
|
|
608
|
+
return t.resizeObserver = null, t.resizeElementRef = B.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: r, zIndices: a }, t;
|
|
609
609
|
}
|
|
610
610
|
M2(d, n);
|
|
611
611
|
var i = d.prototype;
|
|
612
612
|
return i.componentDidMount = function() {
|
|
613
613
|
typeof window < "u" && (this.resizeObserver = new ResizeObserver(this.handleResize), this.resizeObserver.observe(this.resizeElementRef.current), this.resize());
|
|
614
614
|
}, d.getDerivedStateFromProps = function(o, t) {
|
|
615
|
-
const
|
|
616
|
-
return
|
|
615
|
+
const r = we(o.value);
|
|
616
|
+
return r.length ? t.pending ? null : { value: r.map((a) => H(a, o)) } : null;
|
|
617
617
|
}, i.componentDidUpdate = function() {
|
|
618
618
|
this.state.upperBound === 0 && this.resize();
|
|
619
619
|
}, i.componentWillUnmount = function() {
|
|
620
620
|
this.clearPendingResizeTimeouts(), this.resizeObserver && this.resizeObserver.disconnect();
|
|
621
621
|
}, i.onEnd = function(o) {
|
|
622
622
|
o && function(t) {
|
|
623
|
-
Object.keys(t).forEach((
|
|
624
|
-
typeof document < "u" && document.removeEventListener(
|
|
623
|
+
Object.keys(t).forEach((r) => {
|
|
624
|
+
typeof document < "u" && document.removeEventListener(r, t[r], !1);
|
|
625
625
|
});
|
|
626
626
|
}(o), this.hasMoved && this.fireChangeEvent("onAfterChange"), this.setState({ pending: !1 }), this.hasMoved = !1;
|
|
627
627
|
}, i.getValue = function() {
|
|
628
628
|
return pe(this.state.value);
|
|
629
629
|
}, i.getClosestIndex = function(o) {
|
|
630
|
-
let t = Number.MAX_VALUE,
|
|
631
|
-
const { value:
|
|
630
|
+
let t = Number.MAX_VALUE, r = -1;
|
|
631
|
+
const { value: a } = this.state, l = a.length;
|
|
632
632
|
for (let c = 0; c < l; c += 1) {
|
|
633
|
-
const u = this.calcOffset(
|
|
634
|
-
m < t && (t = m,
|
|
633
|
+
const u = this.calcOffset(a[c]), m = Math.abs(o - u);
|
|
634
|
+
m < t && (t = m, r = c);
|
|
635
635
|
}
|
|
636
|
-
return
|
|
636
|
+
return r;
|
|
637
637
|
}, i.getMousePosition = function(o) {
|
|
638
638
|
return [o["page" + this.axisKey()], o["page" + this.orthogonalAxisKey()]];
|
|
639
639
|
}, i.getTouchPosition = function(o) {
|
|
@@ -654,23 +654,23 @@ let Fe = function(n) {
|
|
|
654
654
|
}, i.resize = function() {
|
|
655
655
|
const { slider: o, thumb0: t } = this;
|
|
656
656
|
if (!o || !t) return;
|
|
657
|
-
const
|
|
658
|
-
this.state.upperBound ===
|
|
657
|
+
const r = this.sizeKey(), a = o.getBoundingClientRect(), l = o[r], c = a[this.posMaxKey()], u = a[this.posMinKey()], m = t.getBoundingClientRect()[r.replace("client", "").toLowerCase()], g = l - m, y = Math.abs(c - u);
|
|
658
|
+
this.state.upperBound === g && this.state.sliderLength === y && this.state.thumbSize === m || this.setState({ upperBound: g, sliderLength: y, thumbSize: m });
|
|
659
659
|
}, i.calcOffset = function(o) {
|
|
660
660
|
const t = this.props.max - this.props.min;
|
|
661
661
|
return t === 0 ? 0 : (o - this.props.min) / t * this.state.upperBound;
|
|
662
662
|
}, i.calcValue = function(o) {
|
|
663
663
|
return o / this.state.upperBound * (this.props.max - this.props.min) + this.props.min;
|
|
664
664
|
}, i.calcOffsetFromPosition = function(o) {
|
|
665
|
-
const { slider: t } = this,
|
|
666
|
-
let c = o - (window["page" + this.axisKey() + "Offset"] + (this.props.invert ?
|
|
665
|
+
const { slider: t } = this, r = t.getBoundingClientRect(), a = r[this.posMaxKey()], l = r[this.posMinKey()];
|
|
666
|
+
let c = o - (window["page" + this.axisKey() + "Offset"] + (this.props.invert ? a : l));
|
|
667
667
|
return this.props.invert && (c = this.state.sliderLength - c), c -= this.state.thumbSize / 2, c;
|
|
668
668
|
}, i.forceValueFromPosition = function(o, t) {
|
|
669
|
-
const
|
|
670
|
-
c[
|
|
669
|
+
const r = this.calcOffsetFromPosition(o), a = this.getClosestIndex(r), l = H(this.calcValue(r), this.props), c = this.state.value.slice();
|
|
670
|
+
c[a] = l;
|
|
671
671
|
for (let u = 0; u < c.length - 1; u += 1) if (c[u + 1] - c[u] < this.props.minDistance) return;
|
|
672
672
|
this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0, this.setState({ value: c }, () => {
|
|
673
|
-
t(
|
|
673
|
+
t(a), this.fireChangeEvent("onChange");
|
|
674
674
|
});
|
|
675
675
|
}, i.clearPendingResizeTimeouts = function() {
|
|
676
676
|
do {
|
|
@@ -678,49 +678,49 @@ let Fe = function(n) {
|
|
|
678
678
|
clearTimeout(o);
|
|
679
679
|
} while (this.pendingResizeTimeouts.length);
|
|
680
680
|
}, i.start = function(o, t) {
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
const { zIndices:
|
|
684
|
-
|
|
681
|
+
const r = this["thumb" + o];
|
|
682
|
+
r && r.focus();
|
|
683
|
+
const { zIndices: a } = this.state;
|
|
684
|
+
a.splice(a.indexOf(o), 1), a.push(o), this.setState((l) => ({ startValue: l.value[o], startPosition: t !== void 0 ? t : l.startPosition, index: o, zIndices: a }));
|
|
685
685
|
}, i.moveUpByStep = function(o) {
|
|
686
686
|
o === void 0 && (o = this.props.step);
|
|
687
|
-
const t = this.state.value[this.state.index],
|
|
688
|
-
this.move(Math.min(
|
|
687
|
+
const t = this.state.value[this.state.index], r = H(this.props.invert && this.props.orientation === "horizontal" ? t - o : t + o, this.props);
|
|
688
|
+
this.move(Math.min(r, this.props.max));
|
|
689
689
|
}, i.moveDownByStep = function(o) {
|
|
690
690
|
o === void 0 && (o = this.props.step);
|
|
691
|
-
const t = this.state.value[this.state.index],
|
|
692
|
-
this.move(Math.max(
|
|
691
|
+
const t = this.state.value[this.state.index], r = H(this.props.invert && this.props.orientation === "horizontal" ? t + o : t - o, this.props);
|
|
692
|
+
this.move(Math.max(r, this.props.min));
|
|
693
693
|
}, i.move = function(o) {
|
|
694
|
-
const t = this.state.value.slice(), { index:
|
|
694
|
+
const t = this.state.value.slice(), { index: r } = this.state, { length: a } = t, l = t[r];
|
|
695
695
|
if (o === l) return;
|
|
696
696
|
this.hasMoved || this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0;
|
|
697
|
-
const { pearling: c, max: u, min: m, minDistance:
|
|
697
|
+
const { pearling: c, max: u, min: m, minDistance: g } = this.props;
|
|
698
698
|
if (!c) {
|
|
699
|
-
if (
|
|
700
|
-
const
|
|
701
|
-
o <
|
|
699
|
+
if (r > 0) {
|
|
700
|
+
const y = t[r - 1];
|
|
701
|
+
o < y + g && (o = y + g);
|
|
702
702
|
}
|
|
703
|
-
if (
|
|
704
|
-
const
|
|
705
|
-
o >
|
|
703
|
+
if (r < a - 1) {
|
|
704
|
+
const y = t[r + 1];
|
|
705
|
+
o > y - g && (o = y - g);
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
t[
|
|
709
|
-
for (let
|
|
710
|
-
const
|
|
711
|
-
|
|
708
|
+
t[r] = o, c && a > 1 && (o > l ? (this.pushSucceeding(t, g, r), function(y, b, C, f) {
|
|
709
|
+
for (let h = 0; h < y; h += 1) {
|
|
710
|
+
const _ = f - h * C;
|
|
711
|
+
b[y - 1 - h] > _ && (b[y - 1 - h] = _);
|
|
712
712
|
}
|
|
713
|
-
}(
|
|
714
|
-
for (let
|
|
715
|
-
const
|
|
716
|
-
|
|
713
|
+
}(a, t, g, u)) : o < l && (this.pushPreceding(t, g, r), function(y, b, C, f) {
|
|
714
|
+
for (let h = 0; h < y; h += 1) {
|
|
715
|
+
const _ = f + h * C;
|
|
716
|
+
b[h] < _ && (b[h] = _);
|
|
717
717
|
}
|
|
718
|
-
}(
|
|
719
|
-
}, i.pushSucceeding = function(o, t,
|
|
720
|
-
let
|
|
721
|
-
for (
|
|
722
|
-
}, i.pushPreceding = function(o, t,
|
|
723
|
-
for (let
|
|
718
|
+
}(a, t, g, m))), this.setState({ value: t }, this.fireChangeEvent.bind(this, "onChange"));
|
|
719
|
+
}, i.pushSucceeding = function(o, t, r) {
|
|
720
|
+
let a, l;
|
|
721
|
+
for (a = r, l = o[a] + t; o[a + 1] !== null && l > o[a + 1]; a += 1, l = o[a] + t) o[a + 1] = Le(l, this.props);
|
|
722
|
+
}, i.pushPreceding = function(o, t, r) {
|
|
723
|
+
for (let a = r, l = o[a] - t; o[a - 1] !== null && l < o[a - 1]; a -= 1, l = o[a] - t) o[a - 1] = Le(l, this.props);
|
|
724
724
|
}, i.axisKey = function() {
|
|
725
725
|
return this.props.orientation === "vertical" ? "Y" : "X";
|
|
726
726
|
}, i.orthogonalAxisKey = function() {
|
|
@@ -734,39 +734,39 @@ let Fe = function(n) {
|
|
|
734
734
|
}, i.fireChangeEvent = function(o) {
|
|
735
735
|
this.props[o] && this.props[o](pe(this.state.value), this.state.index);
|
|
736
736
|
}, i.buildThumbStyle = function(o, t) {
|
|
737
|
-
const
|
|
738
|
-
return
|
|
737
|
+
const r = { position: "absolute", touchAction: "none", willChange: this.state.index >= 0 ? this.posMinKey() : void 0, zIndex: this.state.zIndices.indexOf(t) + 1 };
|
|
738
|
+
return r[this.posMinKey()] = o + "px", r;
|
|
739
739
|
}, i.buildTrackStyle = function(o, t) {
|
|
740
|
-
const
|
|
741
|
-
return
|
|
740
|
+
const r = { position: "absolute", willChange: this.state.index >= 0 ? this.posMinKey() + "," + this.posMaxKey() : void 0 };
|
|
741
|
+
return r[this.posMinKey()] = o, r[this.posMaxKey()] = t, r;
|
|
742
742
|
}, i.buildMarkStyle = function(o) {
|
|
743
743
|
var t;
|
|
744
744
|
return (t = { position: "absolute" })[this.posMinKey()] = o, t;
|
|
745
745
|
}, i.renderThumbs = function(o) {
|
|
746
|
-
const { length: t } = o,
|
|
747
|
-
for (let l = 0; l < t; l += 1)
|
|
748
|
-
const
|
|
749
|
-
for (let l = 0; l < t; l += 1)
|
|
750
|
-
return
|
|
746
|
+
const { length: t } = o, r = [];
|
|
747
|
+
for (let l = 0; l < t; l += 1) r[l] = this.buildThumbStyle(o[l], l);
|
|
748
|
+
const a = [];
|
|
749
|
+
for (let l = 0; l < t; l += 1) a[l] = this.renderThumb(r[l], l);
|
|
750
|
+
return a;
|
|
751
751
|
}, i.renderTracks = function(o) {
|
|
752
|
-
const t = [],
|
|
752
|
+
const t = [], r = o.length - 1;
|
|
753
753
|
t.push(this.renderTrack(0, 0, o[0]));
|
|
754
|
-
for (let
|
|
755
|
-
return t.push(this.renderTrack(
|
|
754
|
+
for (let a = 0; a < r; a += 1) t.push(this.renderTrack(a + 1, o[a], o[a + 1]));
|
|
755
|
+
return t.push(this.renderTrack(r + 1, o[r], this.state.upperBound)), t;
|
|
756
756
|
}, i.renderMarks = function() {
|
|
757
757
|
let { marks: o } = this.props;
|
|
758
758
|
const t = this.props.max - this.props.min + 1;
|
|
759
|
-
return typeof o == "boolean" ? o = Array.from({ length: t }).map((
|
|
760
|
-
const
|
|
759
|
+
return typeof o == "boolean" ? o = Array.from({ length: t }).map((r, a) => a) : typeof o == "number" && (o = Array.from({ length: t }).map((r, a) => a).filter((r) => r % o == 0)), o.map(parseFloat).sort((r, a) => r - a).map((r) => {
|
|
760
|
+
const a = this.calcOffset(r), l = { key: r, className: this.props.markClassName, style: this.buildMarkStyle(a) };
|
|
761
761
|
return this.props.renderMark(l);
|
|
762
762
|
});
|
|
763
763
|
}, i.render = function() {
|
|
764
|
-
const o = [], { value: t } = this.state,
|
|
765
|
-
for (let u = 0; u <
|
|
766
|
-
const
|
|
764
|
+
const o = [], { value: t } = this.state, r = t.length;
|
|
765
|
+
for (let u = 0; u < r; u += 1) o[u] = this.calcOffset(t[u], u);
|
|
766
|
+
const a = this.props.withTracks ? this.renderTracks(o) : null, l = this.renderThumbs(o), c = this.props.marks ? this.renderMarks() : null;
|
|
767
767
|
return B.createElement("div", { ref: (u) => {
|
|
768
768
|
this.slider = u, this.resizeElementRef.current = u;
|
|
769
|
-
}, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick },
|
|
769
|
+
}, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick }, a, l, c);
|
|
770
770
|
}, d;
|
|
771
771
|
}(B.Component);
|
|
772
772
|
Fe.displayName = "ReactSlider", Fe.defaultProps = { min: 0, max: 100, step: 1, pageFn: (n) => 10 * n, minDistance: 0, defaultValue: 0, orientation: "horizontal", className: "slider", thumbClassName: "thumb", thumbActiveClassName: "active", trackClassName: "track", markClassName: "mark", withTracks: !0, pearling: !1, disabled: !1, snapDragDisabled: !1, invert: !1, marks: [], renderThumb: (n) => B.createElement("div", n), renderTrack: (n) => B.createElement("div", n), renderMark: (n) => B.createElement("span", n) };
|
|
@@ -784,12 +784,12 @@ const L2 = "_container_15vgv_2", F2 = "_unitLabel_15vgv_9", T2 = "_slider_15vgv_
|
|
|
784
784
|
step: i = 1,
|
|
785
785
|
onChange: o,
|
|
786
786
|
width: t = 300,
|
|
787
|
-
unit:
|
|
788
|
-
fontColor:
|
|
787
|
+
unit: r,
|
|
788
|
+
fontColor: a = "#605B56",
|
|
789
789
|
defaultValue: l
|
|
790
790
|
}) => {
|
|
791
|
-
const { t: c } = k(), [u, m] = $([n, d]),
|
|
792
|
-
m(
|
|
791
|
+
const { t: c } = k(), [u, m] = $([n, d]), g = (y) => {
|
|
792
|
+
m(y), o == null || o({ min: y[0], max: y[1] });
|
|
793
793
|
};
|
|
794
794
|
return L(() => {
|
|
795
795
|
l || m([n, d]);
|
|
@@ -797,9 +797,9 @@ const L2 = "_container_15vgv_2", F2 = "_unitLabel_15vgv_9", T2 = "_slider_15vgv_
|
|
|
797
797
|
"div",
|
|
798
798
|
{
|
|
799
799
|
className: X.container,
|
|
800
|
-
style: { width: `${t}px`, color: `${
|
|
800
|
+
style: { width: `${t}px`, color: `${a}` },
|
|
801
801
|
children: [
|
|
802
|
-
/* @__PURE__ */ s("div", { className: X.unitLabel, children: /* @__PURE__ */ s("span", { children: c(
|
|
802
|
+
/* @__PURE__ */ s("div", { className: X.unitLabel, children: /* @__PURE__ */ s("span", { children: c(r) }) }),
|
|
803
803
|
/* @__PURE__ */ s(
|
|
804
804
|
$2,
|
|
805
805
|
{
|
|
@@ -810,7 +810,7 @@ const L2 = "_container_15vgv_2", F2 = "_unitLabel_15vgv_9", T2 = "_slider_15vgv_
|
|
|
810
810
|
max: d,
|
|
811
811
|
step: i,
|
|
812
812
|
value: u,
|
|
813
|
-
onAfterChange:
|
|
813
|
+
onAfterChange: g,
|
|
814
814
|
withTracks: !0,
|
|
815
815
|
pearling: !0,
|
|
816
816
|
minDistance: 0.1
|
|
@@ -848,30 +848,30 @@ const O2 = "_tematicalFiltersInputContainer_1vm1r_2", R2 = "_inputTypeContainer_
|
|
|
848
848
|
}) => {
|
|
849
849
|
const [i, o] = $(), {
|
|
850
850
|
type: t,
|
|
851
|
-
name:
|
|
852
|
-
values:
|
|
851
|
+
name: r,
|
|
852
|
+
values: a,
|
|
853
853
|
minValue: l,
|
|
854
854
|
maxValue: c,
|
|
855
855
|
unit: u,
|
|
856
856
|
step: m
|
|
857
|
-
} = n || {},
|
|
857
|
+
} = n || {}, g = le(
|
|
858
858
|
() => t == "cat" || i == "cat",
|
|
859
859
|
[i, t]
|
|
860
|
-
),
|
|
860
|
+
), y = le(
|
|
861
861
|
() => t == "abs" || i == "abs",
|
|
862
862
|
[i, t]
|
|
863
863
|
), {
|
|
864
|
-
tematicalFiltersSelected:
|
|
865
|
-
selectedIndicator:
|
|
866
|
-
fontColor:
|
|
867
|
-
inputsColor:
|
|
868
|
-
} = T((
|
|
869
|
-
if (
|
|
870
|
-
const { min:
|
|
871
|
-
let
|
|
872
|
-
de == "both" && (
|
|
864
|
+
tematicalFiltersSelected: b,
|
|
865
|
+
selectedIndicator: C,
|
|
866
|
+
fontColor: f,
|
|
867
|
+
inputsColor: h
|
|
868
|
+
} = T((x) => x), _ = (x) => {
|
|
869
|
+
if (x) {
|
|
870
|
+
const { min: w, max: N, valueClicked: S, allValues: D } = x || {}, { code: P, type: de } = n || {}, ue = y ? "abs" : g ? "cat" : "both";
|
|
871
|
+
let O = P[0];
|
|
872
|
+
de == "both" && (O = ue == "cat" ? P[1] : P[0]), ue == "cat" ? T.setState((q) => {
|
|
873
873
|
let E = q.tematicalFiltersSelected.find(
|
|
874
|
-
(V) => V.code ===
|
|
874
|
+
(V) => V.code === O
|
|
875
875
|
);
|
|
876
876
|
if (E) {
|
|
877
877
|
let V = [E.values];
|
|
@@ -879,21 +879,21 @@ const O2 = "_tematicalFiltersInputContainer_1vm1r_2", R2 = "_inputTypeContainer_
|
|
|
879
879
|
(I) => I !== S
|
|
880
880
|
) : V = [...E.values, S], V.length == D.length ? {
|
|
881
881
|
tematicalFiltersSelected: q.tematicalFiltersSelected.filter(
|
|
882
|
-
(I) => I.code !==
|
|
882
|
+
(I) => I.code !== O
|
|
883
883
|
)
|
|
884
884
|
} : {
|
|
885
885
|
tematicalFiltersSelected: q.tematicalFiltersSelected.map(
|
|
886
|
-
(I) => I.code ===
|
|
886
|
+
(I) => I.code === O ? { ...I, values: V } : I
|
|
887
887
|
)
|
|
888
888
|
};
|
|
889
889
|
} else {
|
|
890
890
|
let V = D.map((I, yt) => yt);
|
|
891
891
|
return {
|
|
892
892
|
tematicalFiltersSelected: [
|
|
893
|
-
...
|
|
893
|
+
...b,
|
|
894
894
|
{
|
|
895
895
|
type: "cat",
|
|
896
|
-
code:
|
|
896
|
+
code: O,
|
|
897
897
|
values: V.filter((I) => I !== S),
|
|
898
898
|
name: n.name
|
|
899
899
|
}
|
|
@@ -902,58 +902,58 @@ const O2 = "_tematicalFiltersInputContainer_1vm1r_2", R2 = "_inputTypeContainer_
|
|
|
902
902
|
}
|
|
903
903
|
}) : ue == "abs" && T.setState((q) => {
|
|
904
904
|
let E = q.tematicalFiltersSelected.find(
|
|
905
|
-
(V) => V.code ===
|
|
905
|
+
(V) => V.code === O
|
|
906
906
|
);
|
|
907
|
-
if (
|
|
907
|
+
if (w == n.minValue && N == n.maxValue)
|
|
908
908
|
return {
|
|
909
909
|
tematicalFiltersSelected: q.tematicalFiltersSelected.filter(
|
|
910
|
-
(V) => V.code !==
|
|
910
|
+
(V) => V.code !== O
|
|
911
911
|
)
|
|
912
912
|
};
|
|
913
913
|
if (E) {
|
|
914
914
|
let V = { ...E };
|
|
915
|
-
return V.min =
|
|
915
|
+
return V.min = w, V.max = N, {
|
|
916
916
|
tematicalFiltersSelected: q.tematicalFiltersSelected.map(
|
|
917
|
-
(I) => I.code ===
|
|
917
|
+
(I) => I.code === O ? V : I
|
|
918
918
|
)
|
|
919
919
|
};
|
|
920
920
|
} else
|
|
921
921
|
return {
|
|
922
922
|
tematicalFiltersSelected: [
|
|
923
|
-
...
|
|
924
|
-
{ type: "abs", code:
|
|
923
|
+
...b,
|
|
924
|
+
{ type: "abs", code: O, min: w, max: N, name: n.name }
|
|
925
925
|
]
|
|
926
926
|
};
|
|
927
927
|
});
|
|
928
928
|
}
|
|
929
|
-
},
|
|
930
|
-
const
|
|
931
|
-
if ((
|
|
932
|
-
for (const
|
|
933
|
-
|
|
934
|
-
return console.log("mapfilterSelected",
|
|
935
|
-
}, [
|
|
929
|
+
}, v = le(() => {
|
|
930
|
+
const x = {};
|
|
931
|
+
if ((b == null ? void 0 : b.length) > 0)
|
|
932
|
+
for (const w of b)
|
|
933
|
+
w.type === "cat" ? x[w.code] = new Set(w.values) : x[w.code] = [w.min, w.max];
|
|
934
|
+
return console.log("mapfilterSelected", x), x;
|
|
935
|
+
}, [b]);
|
|
936
936
|
return /* @__PURE__ */ s("div", { className: he.tematicalFiltersInputContainer, children: /* @__PURE__ */ p(
|
|
937
937
|
Q,
|
|
938
938
|
{
|
|
939
939
|
titleFontStyles: { fontSize: 16, fontWeight: 400 },
|
|
940
|
-
title:
|
|
941
|
-
isOpen:
|
|
940
|
+
title: r,
|
|
941
|
+
isOpen: C == `id${r}`,
|
|
942
942
|
onClick: () => T.setState(() => ({
|
|
943
|
-
selectedIndicator:
|
|
943
|
+
selectedIndicator: C == `id${r}` ? "" : `id${r}`
|
|
944
944
|
})),
|
|
945
945
|
showBottomBar: !1,
|
|
946
946
|
height: 42,
|
|
947
947
|
titleMarginChildren: 14,
|
|
948
948
|
className: "tematicalFiltersInputContainer",
|
|
949
|
-
color:
|
|
949
|
+
color: f,
|
|
950
950
|
activeColor: d,
|
|
951
951
|
children: [
|
|
952
952
|
t == "both" && /* @__PURE__ */ p(
|
|
953
953
|
"div",
|
|
954
954
|
{
|
|
955
955
|
className: he.inputTypeContainer,
|
|
956
|
-
style: { color:
|
|
956
|
+
style: { color: f },
|
|
957
957
|
children: [
|
|
958
958
|
/* @__PURE__ */ p("label", { children: [
|
|
959
959
|
/* @__PURE__ */ s(
|
|
@@ -967,8 +967,8 @@ const O2 = "_tematicalFiltersInputContainer_1vm1r_2", R2 = "_inputTypeContainer_
|
|
|
967
967
|
},
|
|
968
968
|
style: {
|
|
969
969
|
marginRight: 4,
|
|
970
|
-
backgroundColor: i == "abs" ?
|
|
971
|
-
border: `1.5px solid ${i == "abs" ?
|
|
970
|
+
backgroundColor: i == "abs" ? h : "white",
|
|
971
|
+
border: `1.5px solid ${i == "abs" ? h : f}`
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
),
|
|
@@ -986,8 +986,8 @@ const O2 = "_tematicalFiltersInputContainer_1vm1r_2", R2 = "_inputTypeContainer_
|
|
|
986
986
|
},
|
|
987
987
|
style: {
|
|
988
988
|
marginRight: 4,
|
|
989
|
-
backgroundColor: i == "cat" ?
|
|
990
|
-
border: `1.5px solid ${i == "cat" ?
|
|
989
|
+
backgroundColor: i == "cat" ? h : "white",
|
|
990
|
+
border: `1.5px solid ${i == "cat" ? h : f}`
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
),
|
|
@@ -996,26 +996,26 @@ const O2 = "_tematicalFiltersInputContainer_1vm1r_2", R2 = "_inputTypeContainer_
|
|
|
996
996
|
]
|
|
997
997
|
}
|
|
998
998
|
),
|
|
999
|
-
|
|
999
|
+
g && /* @__PURE__ */ s("div", { className: he.checkboxContainer, children: a.map((x, w) => {
|
|
1000
1000
|
var N;
|
|
1001
1001
|
return /* @__PURE__ */ s(
|
|
1002
1002
|
ot,
|
|
1003
1003
|
{
|
|
1004
|
-
onClick: () =>
|
|
1005
|
-
indicator:
|
|
1006
|
-
value: ((N =
|
|
1004
|
+
onClick: () => _({ valueClicked: w, allValues: a }),
|
|
1005
|
+
indicator: x,
|
|
1006
|
+
value: ((N = v[n.code[t == "both" ? 1 : 0]]) == null ? void 0 : N.has(w)) || !v[n.code[t == "both" ? 1 : 0]]
|
|
1007
1007
|
},
|
|
1008
|
-
`checkbox-${
|
|
1008
|
+
`checkbox-${w}`
|
|
1009
1009
|
);
|
|
1010
1010
|
}) }),
|
|
1011
|
-
|
|
1011
|
+
y && /* @__PURE__ */ s("div", { className: he.absoluteSliderContainer, children: /* @__PURE__ */ s(
|
|
1012
1012
|
st,
|
|
1013
1013
|
{
|
|
1014
|
-
onChange:
|
|
1014
|
+
onChange: _,
|
|
1015
1015
|
min: l,
|
|
1016
1016
|
max: c,
|
|
1017
1017
|
unit: u,
|
|
1018
|
-
defaultValue:
|
|
1018
|
+
defaultValue: v[n.code[0]] ? v[n.code[0]] : "",
|
|
1019
1019
|
step: m
|
|
1020
1020
|
}
|
|
1021
1021
|
) })
|
|
@@ -1044,15 +1044,15 @@ const rt = ({
|
|
|
1044
1044
|
activeColor: i
|
|
1045
1045
|
//onChangeBothType,
|
|
1046
1046
|
}) => {
|
|
1047
|
-
const { activeSubcategory: o } = T((
|
|
1047
|
+
const { activeSubcategory: o } = T((a) => a), { name: t, indicators: r } = n || {};
|
|
1048
1048
|
return /* @__PURE__ */ s(
|
|
1049
1049
|
Q,
|
|
1050
1050
|
{
|
|
1051
1051
|
title: t,
|
|
1052
1052
|
isOpen: o == `id${t}`,
|
|
1053
1053
|
onClick: () => {
|
|
1054
|
-
T.setState((
|
|
1055
|
-
activeSubcategory:
|
|
1054
|
+
T.setState((a) => ({
|
|
1055
|
+
activeSubcategory: a.activeSubcategory === `id${t}` ? "" : `id${t}`
|
|
1056
1056
|
}));
|
|
1057
1057
|
},
|
|
1058
1058
|
titleFontStyles: { fontSize: 16, fontWeight: 400 },
|
|
@@ -1061,10 +1061,10 @@ const rt = ({
|
|
|
1061
1061
|
height: 48,
|
|
1062
1062
|
color: d,
|
|
1063
1063
|
activeColor: i,
|
|
1064
|
-
children:
|
|
1064
|
+
children: r == null ? void 0 : r.map((a, l) => /* @__PURE__ */ s(
|
|
1065
1065
|
Oe,
|
|
1066
1066
|
{
|
|
1067
|
-
indicator:
|
|
1067
|
+
indicator: a,
|
|
1068
1068
|
fontColor: d,
|
|
1069
1069
|
activeColor: i
|
|
1070
1070
|
},
|
|
@@ -1091,26 +1091,26 @@ const at = ({
|
|
|
1091
1091
|
// onChangeBothType,
|
|
1092
1092
|
activeColor: d
|
|
1093
1093
|
}) => {
|
|
1094
|
-
const { name: i, subcategories: o, indicators: t } = n || {}, { activeCategory:
|
|
1094
|
+
const { name: i, subcategories: o, indicators: t } = n || {}, { activeCategory: r, fontColor: a } = T((l) => l);
|
|
1095
1095
|
return n && /* @__PURE__ */ s(
|
|
1096
1096
|
Q,
|
|
1097
1097
|
{
|
|
1098
1098
|
onClick: () => {
|
|
1099
1099
|
T.setState((l) => ({
|
|
1100
|
-
activeCategory:
|
|
1100
|
+
activeCategory: r === `id${i}` ? "" : `id${i}`
|
|
1101
1101
|
}));
|
|
1102
1102
|
},
|
|
1103
1103
|
title: i,
|
|
1104
|
-
isOpen:
|
|
1104
|
+
isOpen: r === `id${i}`,
|
|
1105
1105
|
titleFontStyles: { fontSize: 18, fontWeight: "bold" },
|
|
1106
1106
|
showBottomBar: !1,
|
|
1107
|
-
color:
|
|
1107
|
+
color: a,
|
|
1108
1108
|
activeColor: d,
|
|
1109
1109
|
children: o ? o.map((l, c) => /* @__PURE__ */ s(
|
|
1110
1110
|
rt,
|
|
1111
1111
|
{
|
|
1112
1112
|
subcategory: l,
|
|
1113
|
-
fontColor:
|
|
1113
|
+
fontColor: a,
|
|
1114
1114
|
activeColor: d
|
|
1115
1115
|
},
|
|
1116
1116
|
`subcategory-${c}`
|
|
@@ -1118,7 +1118,7 @@ const at = ({
|
|
|
1118
1118
|
Oe,
|
|
1119
1119
|
{
|
|
1120
1120
|
indicator: l,
|
|
1121
|
-
fontColor:
|
|
1121
|
+
fontColor: a,
|
|
1122
1122
|
activeColor: d
|
|
1123
1123
|
},
|
|
1124
1124
|
`indicator-${c}`
|
|
@@ -1142,9 +1142,9 @@ const lt = ({
|
|
|
1142
1142
|
fontColor: o = "#605B56",
|
|
1143
1143
|
//The color of the slider and the checkbox when is checked
|
|
1144
1144
|
inputsColor: t = "#605B56",
|
|
1145
|
-
activeColor:
|
|
1145
|
+
activeColor: r
|
|
1146
1146
|
}) => {
|
|
1147
|
-
const { tematicalFiltersSelected:
|
|
1147
|
+
const { tematicalFiltersSelected: a } = T((c) => c), { t: l } = k();
|
|
1148
1148
|
return L(() => {
|
|
1149
1149
|
o && T.setState(() => ({ fontColor: o }));
|
|
1150
1150
|
}, [o]), L(() => {
|
|
@@ -1155,13 +1155,13 @@ const lt = ({
|
|
|
1155
1155
|
isOpen: d,
|
|
1156
1156
|
title: i ? l(i) : "Tematical filters",
|
|
1157
1157
|
color: o,
|
|
1158
|
-
activeColor:
|
|
1158
|
+
activeColor: r,
|
|
1159
1159
|
children: n == null ? void 0 : n.map((c, u) => /* @__PURE__ */ s(
|
|
1160
1160
|
at,
|
|
1161
1161
|
{
|
|
1162
1162
|
category: c,
|
|
1163
1163
|
fontColor: o,
|
|
1164
|
-
activeColor:
|
|
1164
|
+
activeColor: r
|
|
1165
1165
|
},
|
|
1166
1166
|
`category-${u}`
|
|
1167
1167
|
))
|
|
@@ -1190,73 +1190,73 @@ const P2 = "_FiltersAmbitContainer_1g9xx_2", j2 = "_FiltersAmbitHeader_1g9xx_7",
|
|
|
1190
1190
|
defaultFilters: i,
|
|
1191
1191
|
indicators: o,
|
|
1192
1192
|
activeColor: t,
|
|
1193
|
-
textColor:
|
|
1194
|
-
backgroundColor:
|
|
1193
|
+
textColor: r,
|
|
1194
|
+
backgroundColor: a,
|
|
1195
1195
|
onChangeAppliedFilters: l,
|
|
1196
1196
|
saveAmbit: c,
|
|
1197
1197
|
namePlaceholder: u,
|
|
1198
1198
|
descPlaceholder: m,
|
|
1199
|
-
filtersTypes:
|
|
1200
|
-
nameRequiredText:
|
|
1201
|
-
onlyFilters:
|
|
1199
|
+
filtersTypes: g = ["geographical", "tematical"],
|
|
1200
|
+
nameRequiredText: y,
|
|
1201
|
+
onlyFilters: b = !1
|
|
1202
1202
|
//usamos esta opción para ocultar el nombre, la descripción y el botón de guardar ámbito
|
|
1203
1203
|
}) => {
|
|
1204
|
-
const { t:
|
|
1204
|
+
const { t: C } = k(), { tematicalFiltersSelected: f } = T((D) => D), [h, _] = $(n || null), [v, x] = $(d || null), [w, N] = $(!1);
|
|
1205
1205
|
L(() => {
|
|
1206
1206
|
i && i.length > 0 && T.setState((D) => ({
|
|
1207
1207
|
tematicalFiltersSelected: i
|
|
1208
1208
|
}));
|
|
1209
1209
|
}, [i]), L(() => {
|
|
1210
|
-
console.log("filtersSelected changed: ",
|
|
1211
|
-
}, [
|
|
1210
|
+
console.log("filtersSelected changed: ", f), l(f);
|
|
1211
|
+
}, [f]);
|
|
1212
1212
|
const S = () => {
|
|
1213
|
-
|
|
1213
|
+
h ? c({ name: h, description: v }) : N(!0);
|
|
1214
1214
|
};
|
|
1215
1215
|
return /* @__PURE__ */ p("div", { className: J.FiltersAmbitContainer, children: [
|
|
1216
|
-
!
|
|
1216
|
+
!b && /* @__PURE__ */ p("div", { className: J.FiltersAmbitHeader, children: [
|
|
1217
1217
|
/* @__PURE__ */ s("div", { className: J.FiltersAmbitTitle, children: /* @__PURE__ */ s(
|
|
1218
1218
|
"input",
|
|
1219
1219
|
{
|
|
1220
1220
|
type: "text",
|
|
1221
1221
|
onChange: (D) => {
|
|
1222
|
-
N(!1),
|
|
1222
|
+
N(!1), _(D.target.value);
|
|
1223
1223
|
},
|
|
1224
|
-
value:
|
|
1225
|
-
placeholder:
|
|
1224
|
+
value: h,
|
|
1225
|
+
placeholder: C(u)
|
|
1226
1226
|
}
|
|
1227
1227
|
) }),
|
|
1228
1228
|
/* @__PURE__ */ s("div", { className: J.FiltersAmbitDescription, children: /* @__PURE__ */ s("div", { className: J.FiltersAmbitDescriptionTitle, children: /* @__PURE__ */ s(
|
|
1229
1229
|
"textarea",
|
|
1230
1230
|
{
|
|
1231
|
-
value:
|
|
1232
|
-
onChange: (D) =>
|
|
1233
|
-
placeholder:
|
|
1231
|
+
value: v,
|
|
1232
|
+
onChange: (D) => x(D.target.value),
|
|
1233
|
+
placeholder: C(m)
|
|
1234
1234
|
}
|
|
1235
1235
|
) }) })
|
|
1236
1236
|
] }),
|
|
1237
1237
|
/* @__PURE__ */ s(
|
|
1238
1238
|
nt,
|
|
1239
1239
|
{
|
|
1240
|
-
title:
|
|
1240
|
+
title: C("applied_filters"),
|
|
1241
1241
|
isOpen: !0,
|
|
1242
|
-
textColor:
|
|
1243
|
-
backgroundColor:
|
|
1242
|
+
textColor: r || "#fff",
|
|
1243
|
+
backgroundColor: a || "#605B5680",
|
|
1244
1244
|
activeColor: t
|
|
1245
1245
|
}
|
|
1246
1246
|
),
|
|
1247
|
-
|
|
1248
|
-
|
|
1247
|
+
g.includes("geographical") && /* @__PURE__ */ s(it, { activeColor: t }),
|
|
1248
|
+
g.includes("tematical") && /* @__PURE__ */ s(
|
|
1249
1249
|
lt,
|
|
1250
1250
|
{
|
|
1251
1251
|
indicators: o,
|
|
1252
1252
|
inputsColor: t,
|
|
1253
|
-
textColor:
|
|
1253
|
+
textColor: r,
|
|
1254
1254
|
title: "tematical_filters",
|
|
1255
1255
|
activeColor: t
|
|
1256
1256
|
}
|
|
1257
1257
|
),
|
|
1258
|
-
|
|
1259
|
-
!
|
|
1258
|
+
w && /* @__PURE__ */ s("div", { className: J.warning, children: C(y) }),
|
|
1259
|
+
!b && /* @__PURE__ */ s("div", { className: "buttonContainer", children: /* @__PURE__ */ s(fe, { onClick: () => S(), children: C("save_ambit") }) })
|
|
1260
1260
|
] });
|
|
1261
1261
|
};
|
|
1262
1262
|
U2.propTypes = {
|
|
@@ -1282,22 +1282,22 @@ const G2 = "_barChartContainer_d2f1z_2", W2 = {
|
|
|
1282
1282
|
barHeight: i = 25,
|
|
1283
1283
|
gap: o = 23,
|
|
1284
1284
|
fontColor: t = "#605B56",
|
|
1285
|
-
verticalPaddign:
|
|
1286
|
-
horizontalPaddign:
|
|
1285
|
+
verticalPaddign: r = 10,
|
|
1286
|
+
horizontalPaddign: a = 20,
|
|
1287
1287
|
leftPadding: l = 200,
|
|
1288
1288
|
numberOfDivisions: c = 7,
|
|
1289
1289
|
maxValue: u = null
|
|
1290
1290
|
}) => {
|
|
1291
|
-
const { t: m } = k(), { xScale:
|
|
1291
|
+
const { t: m } = k(), { xScale: g, ticks: y, height: b } = le(() => {
|
|
1292
1292
|
if (n && n.length > 0) {
|
|
1293
|
-
const
|
|
1293
|
+
const C = (n == null ? void 0 : n.length) * (i + o) + r * 2, f = Pe.max(n, (v) => v.value) || 1, h = Pe.scaleLinear().domain([0, u || f]).range([0, d - l]), _ = Array.from({ length: c + 1 }, (v, x) => u ? u / c * x : f / c * x);
|
|
1294
1294
|
return {
|
|
1295
|
-
xScale:
|
|
1296
|
-
ticks:
|
|
1297
|
-
height:
|
|
1295
|
+
xScale: h,
|
|
1296
|
+
ticks: _,
|
|
1297
|
+
height: C,
|
|
1298
1298
|
width: d,
|
|
1299
|
-
verticalPaddign:
|
|
1300
|
-
horizontalPaddign:
|
|
1299
|
+
verticalPaddign: r,
|
|
1300
|
+
horizontalPaddign: a
|
|
1301
1301
|
};
|
|
1302
1302
|
} else
|
|
1303
1303
|
return { xScale: null, ticks: [], height: 0 };
|
|
@@ -1307,40 +1307,40 @@ const G2 = "_barChartContainer_d2f1z_2", W2 = {
|
|
|
1307
1307
|
c,
|
|
1308
1308
|
i,
|
|
1309
1309
|
o,
|
|
1310
|
-
r,
|
|
1311
1310
|
a,
|
|
1311
|
+
r,
|
|
1312
1312
|
u
|
|
1313
1313
|
]);
|
|
1314
|
-
return /* @__PURE__ */ s("div", { className: W2.barChartContainer, children: /* @__PURE__ */ s("svg", { width: d +
|
|
1315
|
-
/* @__PURE__ */ s("g", { transform: `translate(${l +
|
|
1316
|
-
const
|
|
1317
|
-
return /* @__PURE__ */ p("g", { transform: `translate(${
|
|
1314
|
+
return /* @__PURE__ */ s("div", { className: W2.barChartContainer, children: /* @__PURE__ */ s("svg", { width: d + a * 2, height: b, children: /* @__PURE__ */ p("g", { transform: `translate(0,${o})`, children: [
|
|
1315
|
+
/* @__PURE__ */ s("g", { transform: `translate(${l + a}, 0)`, children: y.map((C, f) => {
|
|
1316
|
+
const h = g(C);
|
|
1317
|
+
return /* @__PURE__ */ p("g", { transform: `translate(${h}, 0)`, children: [
|
|
1318
1318
|
/* @__PURE__ */ s(
|
|
1319
1319
|
"line",
|
|
1320
1320
|
{
|
|
1321
1321
|
y1: 0,
|
|
1322
|
-
y2:
|
|
1322
|
+
y2: b - o * 2,
|
|
1323
1323
|
stroke: "#ccc"
|
|
1324
1324
|
}
|
|
1325
1325
|
),
|
|
1326
1326
|
/* @__PURE__ */ s(
|
|
1327
1327
|
"text",
|
|
1328
1328
|
{
|
|
1329
|
-
y:
|
|
1329
|
+
y: b - o,
|
|
1330
1330
|
textAnchor: "middle",
|
|
1331
1331
|
fontSize: 10,
|
|
1332
1332
|
fill: t,
|
|
1333
|
-
children: parseInt(
|
|
1333
|
+
children: parseInt(C)
|
|
1334
1334
|
}
|
|
1335
1335
|
)
|
|
1336
|
-
] },
|
|
1336
|
+
] }, f);
|
|
1337
1337
|
}) }),
|
|
1338
|
-
n && n.length > 0 && (n == null ? void 0 : n.map((
|
|
1339
|
-
const
|
|
1338
|
+
n && n.length > 0 && (n == null ? void 0 : n.map((C, f) => {
|
|
1339
|
+
const h = g(C.value), _ = f * (i + o);
|
|
1340
1340
|
return /* @__PURE__ */ p(
|
|
1341
1341
|
"g",
|
|
1342
1342
|
{
|
|
1343
|
-
transform: `translate(${l +
|
|
1343
|
+
transform: `translate(${l + a}, ${_})`,
|
|
1344
1344
|
children: [
|
|
1345
1345
|
/* @__PURE__ */ s(
|
|
1346
1346
|
"text",
|
|
@@ -1349,21 +1349,21 @@ const G2 = "_barChartContainer_d2f1z_2", W2 = {
|
|
|
1349
1349
|
y: i / 2 + 5,
|
|
1350
1350
|
textAnchor: "end",
|
|
1351
1351
|
fill: t,
|
|
1352
|
-
children: m(
|
|
1352
|
+
children: m(C.title)
|
|
1353
1353
|
}
|
|
1354
1354
|
),
|
|
1355
1355
|
/* @__PURE__ */ s(
|
|
1356
1356
|
"rect",
|
|
1357
1357
|
{
|
|
1358
|
-
width:
|
|
1358
|
+
width: h,
|
|
1359
1359
|
height: i,
|
|
1360
|
-
fill:
|
|
1360
|
+
fill: C.color,
|
|
1361
1361
|
rx: 0
|
|
1362
1362
|
}
|
|
1363
1363
|
)
|
|
1364
1364
|
]
|
|
1365
1365
|
},
|
|
1366
|
-
|
|
1366
|
+
f
|
|
1367
1367
|
);
|
|
1368
1368
|
}))
|
|
1369
1369
|
] }) }) });
|
|
@@ -1393,8 +1393,8 @@ const Y2 = "_graphicContainer_c9zrg_2", Q2 = "_titleContainer_c9zrg_14", Ze = {
|
|
|
1393
1393
|
containerStyle: i,
|
|
1394
1394
|
borderColor: o = "#605B56",
|
|
1395
1395
|
title: t = "Graphic Title",
|
|
1396
|
-
fontColor:
|
|
1397
|
-
maxValue:
|
|
1396
|
+
fontColor: r = "#605B56",
|
|
1397
|
+
maxValue: a = null,
|
|
1398
1398
|
numberOfDivisions: l = 7,
|
|
1399
1399
|
leftPadding: c = 200
|
|
1400
1400
|
}) => {
|
|
@@ -1414,8 +1414,8 @@ const Y2 = "_graphicContainer_c9zrg_2", Q2 = "_titleContainer_c9zrg_14", Ze = {
|
|
|
1414
1414
|
{
|
|
1415
1415
|
data: n,
|
|
1416
1416
|
width: d,
|
|
1417
|
-
fontColor:
|
|
1418
|
-
maxValue:
|
|
1417
|
+
fontColor: r,
|
|
1418
|
+
maxValue: a,
|
|
1419
1419
|
numberOfDivisions: l,
|
|
1420
1420
|
leftPadding: c
|
|
1421
1421
|
}
|
|
@@ -1441,7 +1441,7 @@ X2.propTypes = {
|
|
|
1441
1441
|
numberOfDivisions: e.number,
|
|
1442
1442
|
leftPadding: e.number
|
|
1443
1443
|
};
|
|
1444
|
-
const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu33_11",
|
|
1444
|
+
const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu33_11", xe = {
|
|
1445
1445
|
indicatorsCategory: J2,
|
|
1446
1446
|
title: e0,
|
|
1447
1447
|
list: t0
|
|
@@ -1462,20 +1462,20 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1462
1462
|
activeColor: i,
|
|
1463
1463
|
defaultColor: o = "#92898A",
|
|
1464
1464
|
activeIndicator: t,
|
|
1465
|
-
activeIndicatorType:
|
|
1466
|
-
onClickIndicator:
|
|
1465
|
+
activeIndicatorType: r,
|
|
1466
|
+
onClickIndicator: a,
|
|
1467
1467
|
multiple: l = !1,
|
|
1468
1468
|
onChangeType: c
|
|
1469
1469
|
}) => {
|
|
1470
|
-
const { t: u } = k(), { name: m, type:
|
|
1470
|
+
const { t: u } = k(), { name: m, type: g } = n, [y, b] = $(!1);
|
|
1471
1471
|
L(() => {
|
|
1472
|
-
t &&
|
|
1472
|
+
t && b(
|
|
1473
1473
|
l ? t.some(
|
|
1474
|
-
(
|
|
1474
|
+
(h) => h.name == String(m)
|
|
1475
1475
|
) : t.name == m
|
|
1476
1476
|
);
|
|
1477
1477
|
}, [t]);
|
|
1478
|
-
const
|
|
1478
|
+
const C = () => /* @__PURE__ */ s("div", { className: F.switchExternalContainer, children: /* @__PURE__ */ s("div", { className: F.switchType, children: /* @__PURE__ */ p("div", { className: F.switchTypeOptions, children: [
|
|
1479
1479
|
/* @__PURE__ */ p(
|
|
1480
1480
|
"div",
|
|
1481
1481
|
{
|
|
@@ -1487,8 +1487,8 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1487
1487
|
{
|
|
1488
1488
|
className: `${F.customRadious}`,
|
|
1489
1489
|
style: {
|
|
1490
|
-
backgroundColor:
|
|
1491
|
-
borderColor:
|
|
1490
|
+
backgroundColor: r === "cat" ? i : "transparent",
|
|
1491
|
+
borderColor: r === "cat" ? i : o
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
1494
|
),
|
|
@@ -1497,7 +1497,7 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1497
1497
|
{
|
|
1498
1498
|
className: F.optionText,
|
|
1499
1499
|
style: {
|
|
1500
|
-
color:
|
|
1500
|
+
color: r === "cat" ? i : o
|
|
1501
1501
|
},
|
|
1502
1502
|
children: u("indicators.cat")
|
|
1503
1503
|
}
|
|
@@ -1516,8 +1516,8 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1516
1516
|
{
|
|
1517
1517
|
className: `${F.customRadious}`,
|
|
1518
1518
|
style: {
|
|
1519
|
-
backgroundColor:
|
|
1520
|
-
borderColor:
|
|
1519
|
+
backgroundColor: r === "abs" ? i : "transparent",
|
|
1520
|
+
borderColor: r === "abs" ? i : o
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
1523
|
),
|
|
@@ -1526,7 +1526,7 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1526
1526
|
{
|
|
1527
1527
|
className: F.optionText,
|
|
1528
1528
|
style: {
|
|
1529
|
-
color:
|
|
1529
|
+
color: r === "abs" ? i : o
|
|
1530
1530
|
},
|
|
1531
1531
|
children: u("indicators.abs")
|
|
1532
1532
|
}
|
|
@@ -1534,7 +1534,7 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1534
1534
|
]
|
|
1535
1535
|
}
|
|
1536
1536
|
)
|
|
1537
|
-
] }) }) }),
|
|
1537
|
+
] }) }) }), f = () => /* @__PURE__ */ s("div", { className: F.switchExternalContainer, children: /* @__PURE__ */ s("div", { className: F.switchType, children: /* @__PURE__ */ s("div", { className: F.switchTypeOptions, children: d.map((h, _) => /* @__PURE__ */ p(
|
|
1538
1538
|
"div",
|
|
1539
1539
|
{
|
|
1540
1540
|
className: F.optionContainer,
|
|
@@ -1545,23 +1545,23 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1545
1545
|
className: F.customRadious
|
|
1546
1546
|
}
|
|
1547
1547
|
),
|
|
1548
|
-
/* @__PURE__ */ s("h4", { children: u(
|
|
1548
|
+
/* @__PURE__ */ s("h4", { children: u(h.unit) })
|
|
1549
1549
|
]
|
|
1550
1550
|
},
|
|
1551
|
-
|
|
1551
|
+
_
|
|
1552
1552
|
)) }) }) });
|
|
1553
1553
|
return /* @__PURE__ */ p("div", { className: F.indicatorContainer, children: [
|
|
1554
1554
|
/* @__PURE__ */ p(
|
|
1555
1555
|
"div",
|
|
1556
1556
|
{
|
|
1557
1557
|
className: F.indicatorNameContainer,
|
|
1558
|
-
onClick: () =>
|
|
1558
|
+
onClick: () => a({ indicator: n }),
|
|
1559
1559
|
children: [
|
|
1560
1560
|
/* @__PURE__ */ s(
|
|
1561
1561
|
"div",
|
|
1562
1562
|
{
|
|
1563
1563
|
style: {
|
|
1564
|
-
border:
|
|
1564
|
+
border: y ? `1px solid ${i}` : `1px solid ${o}`
|
|
1565
1565
|
},
|
|
1566
1566
|
className: F.dot
|
|
1567
1567
|
}
|
|
@@ -1570,15 +1570,15 @@ const J2 = "_indicatorsCategory_1cu33_2", e0 = "_title_1cu33_5", t0 = "_list_1cu
|
|
|
1570
1570
|
"h4",
|
|
1571
1571
|
{
|
|
1572
1572
|
className: F.indicatorName,
|
|
1573
|
-
style: { color:
|
|
1573
|
+
style: { color: y ? i : o },
|
|
1574
1574
|
children: /* @__PURE__ */ s(Ae, { i18nKey: m, components: { sup: /* @__PURE__ */ s("sup", {}) }, shouldUnescape: !0 })
|
|
1575
1575
|
}
|
|
1576
1576
|
)
|
|
1577
1577
|
]
|
|
1578
1578
|
}
|
|
1579
1579
|
),
|
|
1580
|
-
(t == null ? void 0 : t.name) === m &&
|
|
1581
|
-
(t == null ? void 0 : t.name) === m &&
|
|
1580
|
+
(t == null ? void 0 : t.name) === m && g === "both" && /* @__PURE__ */ s("div", { children: C() }),
|
|
1581
|
+
(t == null ? void 0 : t.name) === m && g === "twoUnits" && /* @__PURE__ */ s("div", { children: f() })
|
|
1582
1582
|
] });
|
|
1583
1583
|
};
|
|
1584
1584
|
Re.propTypes = {
|
|
@@ -1602,48 +1602,48 @@ const p0 = "_indicatorsSubCategory_1dzsi_2", m0 = "_list_1dzsi_8", Ke = {
|
|
|
1602
1602
|
defaultColor: i,
|
|
1603
1603
|
activeColor: o,
|
|
1604
1604
|
activeSubCategory: t,
|
|
1605
|
-
onClickSubCategory:
|
|
1606
|
-
id:
|
|
1605
|
+
onClickSubCategory: r,
|
|
1606
|
+
id: a,
|
|
1607
1607
|
activeIndicator: l,
|
|
1608
1608
|
onClickIndicator: c,
|
|
1609
1609
|
multiple: u,
|
|
1610
1610
|
activeIndicatorType: m,
|
|
1611
|
-
onChangeType:
|
|
1611
|
+
onChangeType: g
|
|
1612
1612
|
}) => {
|
|
1613
|
-
const { t:
|
|
1613
|
+
const { t: y } = k(), [b, C] = $(!1);
|
|
1614
1614
|
return L(() => {
|
|
1615
|
-
|
|
1616
|
-
}, [t,
|
|
1615
|
+
C(t == a);
|
|
1616
|
+
}, [t, a]), /* @__PURE__ */ p(
|
|
1617
1617
|
Ie.div,
|
|
1618
1618
|
{
|
|
1619
1619
|
className: Ke.indicatorsSubCategory,
|
|
1620
1620
|
initial: { height: "43px" },
|
|
1621
|
-
animate: { height:
|
|
1621
|
+
animate: { height: b ? "auto" : "43px" },
|
|
1622
1622
|
transition: { duration: 0.4 },
|
|
1623
1623
|
children: [
|
|
1624
|
-
/* @__PURE__ */ s("button", { onClick: () => a
|
|
1625
|
-
/* @__PURE__ */ s("span", { style: { color:
|
|
1624
|
+
/* @__PURE__ */ s("button", { onClick: () => r(a), children: /* @__PURE__ */ p("h3", { style: { color: b ? o : i }, children: [
|
|
1625
|
+
/* @__PURE__ */ s("span", { style: { color: b ? o : i }, children: b ? "-" : "+" }),
|
|
1626
1626
|
/* @__PURE__ */ s(
|
|
1627
1627
|
"span",
|
|
1628
1628
|
{
|
|
1629
|
-
style: { marginLeft: 12, color:
|
|
1630
|
-
children:
|
|
1629
|
+
style: { marginLeft: 12, color: b ? o : i },
|
|
1630
|
+
children: y(n)
|
|
1631
1631
|
}
|
|
1632
1632
|
)
|
|
1633
1633
|
] }) }),
|
|
1634
|
-
d && /* @__PURE__ */ s("div", { className: Ke.list, children: d == null ? void 0 : d.map((
|
|
1634
|
+
d && /* @__PURE__ */ s("div", { className: Ke.list, children: d == null ? void 0 : d.map((f, h) => /* @__PURE__ */ s(
|
|
1635
1635
|
Re,
|
|
1636
1636
|
{
|
|
1637
|
-
indicator:
|
|
1637
|
+
indicator: f,
|
|
1638
1638
|
defaultColor: i,
|
|
1639
1639
|
activeColor: o,
|
|
1640
1640
|
activeIndicator: l,
|
|
1641
1641
|
onClickIndicator: c,
|
|
1642
1642
|
multiple: u,
|
|
1643
1643
|
activeIndicatorType: m,
|
|
1644
|
-
onChangeType:
|
|
1644
|
+
onChangeType: g
|
|
1645
1645
|
},
|
|
1646
|
-
"indicator" +
|
|
1646
|
+
"indicator" + h
|
|
1647
1647
|
)) })
|
|
1648
1648
|
]
|
|
1649
1649
|
}
|
|
@@ -1667,75 +1667,75 @@ const ut = ({
|
|
|
1667
1667
|
activeColor: i,
|
|
1668
1668
|
defaultColor: o,
|
|
1669
1669
|
onClickCategory: t,
|
|
1670
|
-
activeCategory:
|
|
1671
|
-
activeSubCategory:
|
|
1670
|
+
activeCategory: r,
|
|
1671
|
+
activeSubCategory: a,
|
|
1672
1672
|
onClickSubCategory: l,
|
|
1673
1673
|
activeIndicator: c,
|
|
1674
1674
|
onClickIndicator: u,
|
|
1675
1675
|
multiple: m,
|
|
1676
|
-
activeIndicatorType:
|
|
1677
|
-
onChangeType:
|
|
1676
|
+
activeIndicatorType: g,
|
|
1677
|
+
onChangeType: y
|
|
1678
1678
|
}) => {
|
|
1679
|
-
var
|
|
1680
|
-
const { t:
|
|
1679
|
+
var h;
|
|
1680
|
+
const { t: b } = k(), [C, f] = $(!1);
|
|
1681
1681
|
return L(() => {
|
|
1682
|
-
|
|
1683
|
-
}, [
|
|
1682
|
+
f(r === d);
|
|
1683
|
+
}, [r, d]), /* @__PURE__ */ p(
|
|
1684
1684
|
Ie.div,
|
|
1685
1685
|
{
|
|
1686
|
-
className:
|
|
1686
|
+
className: xe.indicatorsCategory,
|
|
1687
1687
|
initial: { height: "53px" },
|
|
1688
|
-
animate: { height:
|
|
1688
|
+
animate: { height: C ? "auto" : "53px" },
|
|
1689
1689
|
transition: { duration: 0.4 },
|
|
1690
1690
|
style: {
|
|
1691
1691
|
backgroundColor: "white",
|
|
1692
|
-
borderBottom:
|
|
1693
|
-
marginBottom:
|
|
1692
|
+
borderBottom: C ? `1px solid ${i}` : "0px",
|
|
1693
|
+
marginBottom: C ? "20px" : "0px"
|
|
1694
1694
|
},
|
|
1695
1695
|
children: [
|
|
1696
|
-
/* @__PURE__ */ p("h2", { className: `${
|
|
1697
|
-
/* @__PURE__ */ s("span", { style: { color:
|
|
1696
|
+
/* @__PURE__ */ p("h2", { className: `${xe.title}`, onClick: () => t(d), children: [
|
|
1697
|
+
/* @__PURE__ */ s("span", { style: { color: C ? i : o }, children: C ? "-" : "+" }),
|
|
1698
1698
|
/* @__PURE__ */ s(
|
|
1699
1699
|
"span",
|
|
1700
1700
|
{
|
|
1701
|
-
style: { marginLeft: 12, color:
|
|
1702
|
-
children:
|
|
1701
|
+
style: { marginLeft: 12, color: C ? i : o },
|
|
1702
|
+
children: b(n.name)
|
|
1703
1703
|
}
|
|
1704
1704
|
)
|
|
1705
1705
|
] }),
|
|
1706
1706
|
n.subcategories ? n.subcategories.map(
|
|
1707
|
-
({ name:
|
|
1707
|
+
({ name: _, subcategory: v, indicators: x }, w) => /* @__PURE__ */ s(
|
|
1708
1708
|
dt,
|
|
1709
1709
|
{
|
|
1710
|
-
id:
|
|
1711
|
-
activeSubCategory:
|
|
1712
|
-
subcName:
|
|
1710
|
+
id: v,
|
|
1711
|
+
activeSubCategory: a,
|
|
1712
|
+
subcName: _,
|
|
1713
1713
|
onClickSubCategory: l,
|
|
1714
1714
|
activeIndicator: c,
|
|
1715
1715
|
onClickIndicator: u,
|
|
1716
1716
|
multiple: m,
|
|
1717
1717
|
activeColor: i,
|
|
1718
1718
|
defaultColor: o,
|
|
1719
|
-
indicators:
|
|
1720
|
-
activeIndicatorType:
|
|
1721
|
-
onChangeType:
|
|
1719
|
+
indicators: x,
|
|
1720
|
+
activeIndicatorType: g,
|
|
1721
|
+
onChangeType: y
|
|
1722
1722
|
},
|
|
1723
|
-
`subcKey ${
|
|
1723
|
+
`subcKey ${w}`
|
|
1724
1724
|
)
|
|
1725
|
-
) : /* @__PURE__ */ s("div", { className:
|
|
1725
|
+
) : /* @__PURE__ */ s("div", { className: xe.list, children: (h = n.indicators) == null ? void 0 : h.map((_, v) => /* @__PURE__ */ s(
|
|
1726
1726
|
Re,
|
|
1727
1727
|
{
|
|
1728
|
-
indicator:
|
|
1729
|
-
values:
|
|
1728
|
+
indicator: _,
|
|
1729
|
+
values: _.type == "twoUnits" && _.values,
|
|
1730
1730
|
activeColor: i,
|
|
1731
1731
|
defaultColor: o,
|
|
1732
1732
|
activeIndicator: c,
|
|
1733
1733
|
onClickIndicator: u,
|
|
1734
1734
|
multiple: m,
|
|
1735
|
-
activeIndicatorType:
|
|
1736
|
-
onChangeType:
|
|
1735
|
+
activeIndicatorType: g,
|
|
1736
|
+
onChangeType: y
|
|
1737
1737
|
},
|
|
1738
|
-
`indicator${
|
|
1738
|
+
`indicator${v}`
|
|
1739
1739
|
)) })
|
|
1740
1740
|
]
|
|
1741
1741
|
}
|
|
@@ -1767,74 +1767,74 @@ const h0 = "_indicatorsList_fklyu_2", g0 = "_title_fklyu_6", He = {
|
|
|
1767
1767
|
// Selección multiple
|
|
1768
1768
|
multiple: t = !1,
|
|
1769
1769
|
// Si multiple es true, debe ser un array de strings, sino un string
|
|
1770
|
-
defaultValue:
|
|
1770
|
+
defaultValue: r = null,
|
|
1771
1771
|
//si el indicador es tipo "both" cuando se cambia el tipo
|
|
1772
|
-
changeIndType:
|
|
1772
|
+
changeIndType: a,
|
|
1773
1773
|
activeIndicatorType: l
|
|
1774
1774
|
}) => {
|
|
1775
|
-
const { t: c } = k(), [u, m] = $(), [
|
|
1776
|
-
m(u ==
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1779
|
-
},
|
|
1780
|
-
console.log("onClickIndicator: ",
|
|
1781
|
-
},
|
|
1775
|
+
const { t: c } = k(), [u, m] = $(), [g, y] = $(), [b, C] = $(), f = (w) => {
|
|
1776
|
+
m(u == w ? null : w);
|
|
1777
|
+
}, h = (w) => {
|
|
1778
|
+
y(g == w ? null : w);
|
|
1779
|
+
}, _ = ({ indicator: w }) => {
|
|
1780
|
+
console.log("onClickIndicator: ", w), v(w);
|
|
1781
|
+
}, v = (w) => {
|
|
1782
1782
|
if (!t)
|
|
1783
|
-
|
|
1784
|
-
(
|
|
1783
|
+
C(
|
|
1784
|
+
(b == null ? void 0 : b.name) == w.name ? null : w
|
|
1785
1785
|
);
|
|
1786
1786
|
else {
|
|
1787
|
-
let N =
|
|
1788
|
-
|
|
1787
|
+
let N = b && b.length > 0 ? [...b] : [];
|
|
1788
|
+
C(
|
|
1789
1789
|
N != null && N.some(
|
|
1790
|
-
(S) => S.name ==
|
|
1790
|
+
(S) => S.name == w.name
|
|
1791
1791
|
) ? N.filter(
|
|
1792
|
-
(S) => S.name != String(
|
|
1793
|
-
) : [...N,
|
|
1794
|
-
),
|
|
1792
|
+
(S) => S.name != String(w.name)
|
|
1793
|
+
) : [...N, w]
|
|
1794
|
+
), w.type == "both" && a("cat");
|
|
1795
1795
|
}
|
|
1796
1796
|
};
|
|
1797
1797
|
L(() => {
|
|
1798
|
-
console.log("activeindicator changed to: ",
|
|
1799
|
-
}, [
|
|
1800
|
-
if (
|
|
1801
|
-
if (t &&
|
|
1802
|
-
let
|
|
1803
|
-
|
|
1798
|
+
console.log("activeindicator changed to: ", b), o && typeof o == "function" && b && o({ activeIndicator: b });
|
|
1799
|
+
}, [b]), _t(() => {
|
|
1800
|
+
if (r && !b)
|
|
1801
|
+
if (t && r && Array.isArray(r)) {
|
|
1802
|
+
let w = b && b.length > 0 ? [...b] : [];
|
|
1803
|
+
C([...w, ...r]), x(r[0].name);
|
|
1804
1804
|
} else
|
|
1805
|
-
|
|
1805
|
+
v(r), x(r.name);
|
|
1806
1806
|
}, []);
|
|
1807
|
-
const
|
|
1807
|
+
const x = (w) => {
|
|
1808
1808
|
const N = n.find((S) => {
|
|
1809
1809
|
if (S.subcategories) {
|
|
1810
1810
|
let D = S.subcategories.find(
|
|
1811
|
-
(
|
|
1811
|
+
(P) => P.indicators.find((de) => de.name == w)
|
|
1812
1812
|
);
|
|
1813
1813
|
if (D)
|
|
1814
|
-
return
|
|
1814
|
+
return y(D.subcategory), D;
|
|
1815
1815
|
} else
|
|
1816
|
-
return S.indicators.some((D) => D.name ==
|
|
1816
|
+
return S.indicators.some((D) => D.name == w);
|
|
1817
1817
|
});
|
|
1818
1818
|
N && m(N.category);
|
|
1819
1819
|
};
|
|
1820
1820
|
return /* @__PURE__ */ p("div", { className: He.indicatorsList, children: [
|
|
1821
1821
|
/* @__PURE__ */ s("h2", { className: He.title, style: { color: i }, children: c("indicators.indicators") }),
|
|
1822
|
-
n.map((
|
|
1822
|
+
n.map((w, N) => /* @__PURE__ */ s(
|
|
1823
1823
|
ut,
|
|
1824
1824
|
{
|
|
1825
|
-
id:
|
|
1826
|
-
cat:
|
|
1827
|
-
onClickCategory:
|
|
1825
|
+
id: w.category,
|
|
1826
|
+
cat: w,
|
|
1827
|
+
onClickCategory: f,
|
|
1828
1828
|
activeCategory: u,
|
|
1829
|
-
onClickSubCategory:
|
|
1830
|
-
activeSubCategory:
|
|
1831
|
-
onClickIndicator:
|
|
1832
|
-
activeIndicator:
|
|
1829
|
+
onClickSubCategory: h,
|
|
1830
|
+
activeSubCategory: g,
|
|
1831
|
+
onClickIndicator: _,
|
|
1832
|
+
activeIndicator: b,
|
|
1833
1833
|
activeColor: d,
|
|
1834
1834
|
defaultColor: i,
|
|
1835
1835
|
multiple: t,
|
|
1836
1836
|
onChange: o,
|
|
1837
|
-
onChangeType:
|
|
1837
|
+
onChangeType: a,
|
|
1838
1838
|
activeIndicatorType: l
|
|
1839
1839
|
},
|
|
1840
1840
|
`categoryKey${N}`
|
|
@@ -1858,9 +1858,9 @@ const f0 = "_langSelector_o9enq_2", b0 = "_currentLang_o9enq_14", y0 = "_arrow_o
|
|
|
1858
1858
|
arrow: y0,
|
|
1859
1859
|
prevImg: _0,
|
|
1860
1860
|
langMenu: v0
|
|
1861
|
-
},
|
|
1862
|
-
const [o, t] = $(!1), { i18n:
|
|
1863
|
-
|
|
1861
|
+
}, w0 = ({ langs: n, arrow: d, imgPrev: i }) => {
|
|
1862
|
+
const [o, t] = $(!1), { i18n: r } = k(), a = n.find((c) => c.code == r.language), l = (c) => {
|
|
1863
|
+
r.changeLanguage(c), t(!1);
|
|
1864
1864
|
};
|
|
1865
1865
|
return /* @__PURE__ */ p("div", { className: ee.langSelector, children: [
|
|
1866
1866
|
/* @__PURE__ */ p(
|
|
@@ -1872,7 +1872,7 @@ const f0 = "_langSelector_o9enq_2", b0 = "_currentLang_o9enq_14", y0 = "_arrow_o
|
|
|
1872
1872
|
},
|
|
1873
1873
|
children: [
|
|
1874
1874
|
i && /* @__PURE__ */ s("img", { className: ee.prevImg, src: i }),
|
|
1875
|
-
(
|
|
1875
|
+
(a == null ? void 0 : a.titleSelected) || (a == null ? void 0 : a.title),
|
|
1876
1876
|
/* @__PURE__ */ s("img", { src: d, className: ee.arrow })
|
|
1877
1877
|
]
|
|
1878
1878
|
}
|
|
@@ -1880,7 +1880,7 @@ const f0 = "_langSelector_o9enq_2", b0 = "_currentLang_o9enq_14", y0 = "_arrow_o
|
|
|
1880
1880
|
o && /* @__PURE__ */ s("div", { className: ee.langMenu, children: n.map((c) => /* @__PURE__ */ s(
|
|
1881
1881
|
"button",
|
|
1882
1882
|
{
|
|
1883
|
-
className: (
|
|
1883
|
+
className: (a == null ? void 0 : a.code) == c.code ? ee.active : "",
|
|
1884
1884
|
onClick: () => l(c.code),
|
|
1885
1885
|
children: c.title
|
|
1886
1886
|
},
|
|
@@ -1888,7 +1888,7 @@ const f0 = "_langSelector_o9enq_2", b0 = "_currentLang_o9enq_14", y0 = "_arrow_o
|
|
|
1888
1888
|
)) })
|
|
1889
1889
|
] });
|
|
1890
1890
|
};
|
|
1891
|
-
|
|
1891
|
+
w0.propTypes = {
|
|
1892
1892
|
langs: e.arrayOf(
|
|
1893
1893
|
e.shape({
|
|
1894
1894
|
code: e.string,
|
|
@@ -1902,8 +1902,8 @@ x0.propTypes = {
|
|
|
1902
1902
|
arrow: e.object,
|
|
1903
1903
|
imgPrev: e.object
|
|
1904
1904
|
};
|
|
1905
|
-
const
|
|
1906
|
-
legendContainer:
|
|
1905
|
+
const x0 = "_legendContainer_qs4x9_3", N0 = "_closeButton_qs4x9_31", k0 = "_titleContainer_qs4x9_59", B0 = "_infoContainer_qs4x9_65", S0 = "_titleLegendList_qs4x9_76", D0 = "_legendListContainer_qs4x9_82", M0 = "_gridContainer_qs4x9_82", $0 = "_elementLegendContainer_qs4x9_88", L0 = "_colorDot_qs4x9_94", F0 = "_absoluteValueContainer_qs4x9_100", T0 = "_absoluteValueColor_qs4x9_103", V0 = "_absoluteValueText_qs4x9_108", A0 = "_noDataContainer_qs4x9_120", I0 = "_noData_qs4x9_120", O0 = "_moreInfoContainer_qs4x9_141", M = {
|
|
1906
|
+
legendContainer: x0,
|
|
1907
1907
|
closeButton: N0,
|
|
1908
1908
|
titleContainer: k0,
|
|
1909
1909
|
infoContainer: B0,
|
|
@@ -1933,10 +1933,10 @@ const w0 = "_legendContainer_qs4x9_3", N0 = "_closeButton_qs4x9_31", k0 = "_titl
|
|
|
1933
1933
|
//Should be an object with {maxColor, minColor, maxValue, minValue}
|
|
1934
1934
|
//If this has is not null or undefined, the legendList values wont be displayed.
|
|
1935
1935
|
//It will display only the absolute value indicator.
|
|
1936
|
-
absoluteValue:
|
|
1936
|
+
absoluteValue: r,
|
|
1937
1937
|
//Function to be called when the button is clicked (optional).
|
|
1938
1938
|
//If this is null or undefined the button wont be displayed.
|
|
1939
|
-
onClickMoreInfo:
|
|
1939
|
+
onClickMoreInfo: a,
|
|
1940
1940
|
//If not passed it will read t("moreInformation")
|
|
1941
1941
|
buttonTitle: l,
|
|
1942
1942
|
onClickClose: c
|
|
@@ -1950,49 +1950,49 @@ const w0 = "_legendContainer_qs4x9_3", N0 = "_closeButton_qs4x9_31", k0 = "_titl
|
|
|
1950
1950
|
children: [
|
|
1951
1951
|
/* @__PURE__ */ s("button", { className: M.closeButton, onClick: c }),
|
|
1952
1952
|
d && /* @__PURE__ */ s("div", { className: M.titleContainer, style: { marginBottom: (!i || i.length == 0) && "15px" }, children: /* @__PURE__ */ s("h2", { children: d }) }),
|
|
1953
|
-
i && i.length > 0 && /* @__PURE__ */ s("div", { className: M.infoContainer, children: /* @__PURE__ */ s("ul", { children: i.map(({ title: m, value:
|
|
1953
|
+
i && i.length > 0 && /* @__PURE__ */ s("div", { className: M.infoContainer, children: /* @__PURE__ */ s("ul", { children: i.map(({ title: m, value: g }) => /* @__PURE__ */ p("li", { children: [
|
|
1954
1954
|
/* @__PURE__ */ s("h3", { className: M.title, children: `${m}:` }),
|
|
1955
1955
|
/* @__PURE__ */ p("span", { className: M.value, children: [
|
|
1956
1956
|
" ",
|
|
1957
|
-
|
|
1957
|
+
g
|
|
1958
1958
|
] })
|
|
1959
1959
|
] }, d)) }) }),
|
|
1960
1960
|
/* @__PURE__ */ s("h3", { className: M.titleLegendList, style: { marginTop: i && i.length > 0 && "30px" }, children: t && /* @__PURE__ */ s(Ae, { i18nKey: t, components: { sup: /* @__PURE__ */ s("sup", {}) }, shouldUnescape: !0 }) }),
|
|
1961
1961
|
/* @__PURE__ */ p("div", { className: M.legendListContainer, children: [
|
|
1962
|
-
|
|
1962
|
+
r ? /* @__PURE__ */ p("div", { className: M.absoluteValueContainer, children: [
|
|
1963
1963
|
/* @__PURE__ */ s(
|
|
1964
1964
|
"div",
|
|
1965
1965
|
{
|
|
1966
1966
|
className: M.absoluteValueColor,
|
|
1967
1967
|
style: {
|
|
1968
|
-
background: `linear-gradient(to bottom, ${
|
|
1968
|
+
background: `linear-gradient(to bottom, ${r.maxColor} 0%, ${r.midColor ? `${r.midColor} 50%,` : ""} ${r.minColor} 100%)`
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
1971
1971
|
),
|
|
1972
1972
|
/* @__PURE__ */ p("div", { className: M.absoluteValueText, children: [
|
|
1973
1973
|
/* @__PURE__ */ p("span", { children: [
|
|
1974
|
-
|
|
1974
|
+
r.maxValue,
|
|
1975
1975
|
" ",
|
|
1976
|
-
u(
|
|
1976
|
+
u(r.unit)
|
|
1977
1977
|
] }),
|
|
1978
|
-
|
|
1979
|
-
|
|
1978
|
+
r.midValue && /* @__PURE__ */ p("span", { children: [
|
|
1979
|
+
r.midValue,
|
|
1980
1980
|
" ",
|
|
1981
|
-
u(
|
|
1981
|
+
u(r.unit)
|
|
1982
1982
|
] }),
|
|
1983
1983
|
/* @__PURE__ */ p("span", { children: [
|
|
1984
|
-
|
|
1984
|
+
r.minValue,
|
|
1985
1985
|
" ",
|
|
1986
|
-
u(
|
|
1986
|
+
u(r.unit)
|
|
1987
1987
|
] })
|
|
1988
1988
|
] })
|
|
1989
1989
|
] }) : o && o.length > 0 && /* @__PURE__ */ s("div", { className: M.gridContainer, children: o.map(
|
|
1990
|
-
({ title: m, color:
|
|
1990
|
+
({ title: m, color: g }) => /* @__PURE__ */ p("div", { className: M.elementLegendContainer, children: [
|
|
1991
1991
|
/* @__PURE__ */ s(
|
|
1992
1992
|
"div",
|
|
1993
1993
|
{
|
|
1994
1994
|
className: M.colorDot,
|
|
1995
|
-
style: { backgroundColor:
|
|
1995
|
+
style: { backgroundColor: g }
|
|
1996
1996
|
}
|
|
1997
1997
|
),
|
|
1998
1998
|
/* @__PURE__ */ p("div", { className: M.titleLegendElement, children: [
|
|
@@ -2001,20 +2001,20 @@ const w0 = "_legendContainer_qs4x9_3", N0 = "_closeButton_qs4x9_31", k0 = "_titl
|
|
|
2001
2001
|
] })
|
|
2002
2002
|
] }, d)
|
|
2003
2003
|
) }),
|
|
2004
|
-
|
|
2004
|
+
r.noDataColor && /* @__PURE__ */ p("div", { className: M.noDataContainer, children: [
|
|
2005
2005
|
/* @__PURE__ */ s(
|
|
2006
2006
|
"div",
|
|
2007
2007
|
{
|
|
2008
2008
|
className: M.noData,
|
|
2009
2009
|
style: {
|
|
2010
|
-
background:
|
|
2010
|
+
background: r.noDataColor
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
),
|
|
2014
|
-
/* @__PURE__ */ s("div", { className: M.absoluteValueText, children: /* @__PURE__ */ s("span", { children: u(
|
|
2014
|
+
/* @__PURE__ */ s("div", { className: M.absoluteValueText, children: /* @__PURE__ */ s("span", { children: u(r.noDataText) }) })
|
|
2015
2015
|
] })
|
|
2016
2016
|
] }),
|
|
2017
|
-
|
|
2017
|
+
a && /* @__PURE__ */ s("button", { className: M.moreInfoContainer, onClick: a, children: l || u("moreInformation") })
|
|
2018
2018
|
]
|
|
2019
2019
|
}
|
|
2020
2020
|
);
|
|
@@ -2061,65 +2061,65 @@ E0.propTypes = {
|
|
|
2061
2061
|
const P0 = "_mapContainer_84pkf_2", j0 = {
|
|
2062
2062
|
mapContainer: P0
|
|
2063
2063
|
};
|
|
2064
|
-
|
|
2064
|
+
wt.accessToken = "pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";
|
|
2065
2065
|
const z0 = ({
|
|
2066
2066
|
initialView: n = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
2067
2067
|
maxZoom: d = 17,
|
|
2068
2068
|
minZoom: i = 8,
|
|
2069
2069
|
mapStyle: o,
|
|
2070
2070
|
firstSymbolLayer: t,
|
|
2071
|
-
cssProps:
|
|
2072
|
-
onClick:
|
|
2071
|
+
cssProps: r = "",
|
|
2072
|
+
onClick: a = "",
|
|
2073
2073
|
interactiveLayers: l = [],
|
|
2074
2074
|
popUp: c = !1,
|
|
2075
2075
|
sources: u = [],
|
|
2076
2076
|
layers: m = []
|
|
2077
2077
|
}) => {
|
|
2078
|
-
const
|
|
2078
|
+
const g = ie(), [y, b] = $(null), C = xt((f) => f.mapState.showTexts);
|
|
2079
2079
|
return L(() => {
|
|
2080
|
-
if (
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2083
|
-
|
|
2080
|
+
if (g.current) {
|
|
2081
|
+
const f = g.current.getMap();
|
|
2082
|
+
f.getStyle().layers.map((_) => {
|
|
2083
|
+
_.type == "symbol" && _.id != "professionals" && (C ? f.setLayoutProperty(_.id, "visibility", "visible") : f.setLayoutProperty(_.id, "visibility", "none"));
|
|
2084
2084
|
});
|
|
2085
2085
|
}
|
|
2086
|
-
}, [
|
|
2086
|
+
}, [C]), /* @__PURE__ */ s("div", { className: `${j0.mapContainer}`, style: r, children: /* @__PURE__ */ p(
|
|
2087
2087
|
kt,
|
|
2088
2088
|
{
|
|
2089
2089
|
initialViewState: n,
|
|
2090
|
-
ref:
|
|
2090
|
+
ref: g,
|
|
2091
2091
|
hash: !1,
|
|
2092
2092
|
maxZoom: d,
|
|
2093
2093
|
minZoom: i,
|
|
2094
2094
|
mapStyle: o,
|
|
2095
|
-
onClick:
|
|
2095
|
+
onClick: a,
|
|
2096
2096
|
interactiveLayerIds: l,
|
|
2097
2097
|
children: [
|
|
2098
|
-
u.length && u.map((
|
|
2098
|
+
u.length && u.map((f, h) => /* @__PURE__ */ s(
|
|
2099
2099
|
Bt,
|
|
2100
2100
|
{
|
|
2101
|
-
...
|
|
2102
|
-
children: m.length && m.map((
|
|
2103
|
-
if (
|
|
2101
|
+
...f,
|
|
2102
|
+
children: m.length && m.map((_, v) => {
|
|
2103
|
+
if (_.sourceId == f.id) return /* @__PURE__ */ s(
|
|
2104
2104
|
St,
|
|
2105
2105
|
{
|
|
2106
|
-
...
|
|
2106
|
+
..._.layer,
|
|
2107
2107
|
beforeId: t
|
|
2108
2108
|
},
|
|
2109
|
-
|
|
2109
|
+
v
|
|
2110
2110
|
);
|
|
2111
2111
|
})
|
|
2112
2112
|
},
|
|
2113
|
-
|
|
2113
|
+
h
|
|
2114
2114
|
)),
|
|
2115
2115
|
/* @__PURE__ */ s(Dt, { position: "bottom-right", visualizePitch: !0 }),
|
|
2116
|
-
c &&
|
|
2116
|
+
c && y && /* @__PURE__ */ s(
|
|
2117
2117
|
Mt,
|
|
2118
2118
|
{
|
|
2119
2119
|
longitude: c.longitude,
|
|
2120
2120
|
latitude: c.latitude,
|
|
2121
2121
|
anchor: c.anchor,
|
|
2122
|
-
onClose: () =>
|
|
2122
|
+
onClose: () => b(null),
|
|
2123
2123
|
children: c.content
|
|
2124
2124
|
}
|
|
2125
2125
|
)
|
|
@@ -2196,69 +2196,69 @@ const Z0 = "_mapContainer_b0pyr_3", K0 = {
|
|
|
2196
2196
|
minZoom: i = 8,
|
|
2197
2197
|
mapStyle: o,
|
|
2198
2198
|
firstSymbolLayer: t,
|
|
2199
|
-
cssProps:
|
|
2200
|
-
onClick:
|
|
2199
|
+
cssProps: r = {},
|
|
2200
|
+
onClick: a = "",
|
|
2201
2201
|
interactiveLayers: l = [],
|
|
2202
2202
|
sources: c = [],
|
|
2203
2203
|
layers: u = [],
|
|
2204
2204
|
filters: m,
|
|
2205
|
-
popUpParams:
|
|
2206
|
-
onClosePopUp:
|
|
2207
|
-
showTexts:
|
|
2205
|
+
popUpParams: g,
|
|
2206
|
+
onClosePopUp: y,
|
|
2207
|
+
showTexts: b
|
|
2208
2208
|
}) => {
|
|
2209
2209
|
console.log(m);
|
|
2210
|
-
const
|
|
2210
|
+
const C = ie();
|
|
2211
2211
|
return L(() => {
|
|
2212
|
-
if (
|
|
2213
|
-
const
|
|
2214
|
-
|
|
2215
|
-
|
|
2212
|
+
if (C.current) {
|
|
2213
|
+
const f = C.current.getMap();
|
|
2214
|
+
f.getStyle().layers.map((_) => {
|
|
2215
|
+
_.type == "symbol" && _.id != "professionals" && (b ? f.setLayoutProperty(_.id, "visibility", "visible") : f.setLayoutProperty(_.id, "visibility", "none"));
|
|
2216
2216
|
});
|
|
2217
2217
|
}
|
|
2218
|
-
}, [
|
|
2219
|
-
let
|
|
2220
|
-
return ye.addProtocol("pmtiles",
|
|
2218
|
+
}, [b]), L(() => {
|
|
2219
|
+
let f = new $t();
|
|
2220
|
+
return ye.addProtocol("pmtiles", f.tile), () => {
|
|
2221
2221
|
ye.removeProtocol("pmtiles");
|
|
2222
2222
|
};
|
|
2223
|
-
}, []), /* @__PURE__ */ s("div", { className: `${K0.mapContainer}`, style:
|
|
2223
|
+
}, []), /* @__PURE__ */ s("div", { className: `${K0.mapContainer}`, style: r && r, children: /* @__PURE__ */ p(
|
|
2224
2224
|
Lt,
|
|
2225
2225
|
{
|
|
2226
2226
|
mapLib: ye,
|
|
2227
2227
|
initialViewState: n,
|
|
2228
|
-
ref:
|
|
2228
|
+
ref: C,
|
|
2229
2229
|
hash: !1,
|
|
2230
2230
|
maxZoom: d,
|
|
2231
2231
|
minZoom: i,
|
|
2232
2232
|
mapStyle: o,
|
|
2233
|
-
onClick:
|
|
2233
|
+
onClick: a,
|
|
2234
2234
|
interactiveLayerIds: l,
|
|
2235
2235
|
children: [
|
|
2236
|
-
c.length && c.map((
|
|
2236
|
+
c.length && c.map((f, h) => /* @__PURE__ */ s(
|
|
2237
2237
|
Ft,
|
|
2238
2238
|
{
|
|
2239
|
-
...
|
|
2240
|
-
children: u.length && u.map((
|
|
2241
|
-
if (
|
|
2239
|
+
...f,
|
|
2240
|
+
children: u.length && u.map((_, v) => {
|
|
2241
|
+
if (_.sourceId == f.id) return /* @__PURE__ */ s(
|
|
2242
2242
|
Tt,
|
|
2243
2243
|
{
|
|
2244
|
-
...
|
|
2244
|
+
..._.layer,
|
|
2245
2245
|
beforeId: t,
|
|
2246
2246
|
filter: m && m
|
|
2247
2247
|
},
|
|
2248
|
-
|
|
2248
|
+
v
|
|
2249
2249
|
);
|
|
2250
2250
|
})
|
|
2251
2251
|
},
|
|
2252
|
-
|
|
2252
|
+
h
|
|
2253
2253
|
)),
|
|
2254
2254
|
/* @__PURE__ */ s(Vt, { position: "bottom-right", visualizePitch: !0 }),
|
|
2255
|
-
|
|
2255
|
+
g && /* @__PURE__ */ s(
|
|
2256
2256
|
At,
|
|
2257
2257
|
{
|
|
2258
|
-
longitude:
|
|
2259
|
-
latitude:
|
|
2260
|
-
onClose:
|
|
2261
|
-
children: /* @__PURE__ */ s(G0, { props:
|
|
2258
|
+
longitude: g.lng,
|
|
2259
|
+
latitude: g.lat,
|
|
2260
|
+
onClose: y,
|
|
2261
|
+
children: /* @__PURE__ */ s(G0, { props: g.props })
|
|
2262
2262
|
}
|
|
2263
2263
|
)
|
|
2264
2264
|
]
|
|
@@ -2321,14 +2321,14 @@ const Y0 = "_sectionBar_1egwc_2", Q0 = "_leftContent_1egwc_14", X0 = "_textConta
|
|
|
2321
2321
|
subtitle: i,
|
|
2322
2322
|
rightContent: o,
|
|
2323
2323
|
mainColor: t,
|
|
2324
|
-
width:
|
|
2324
|
+
width: r
|
|
2325
2325
|
}) => {
|
|
2326
|
-
const { t:
|
|
2327
|
-
return /* @__PURE__ */ p("div", { className: U.sectionBar, style: { width:
|
|
2326
|
+
const { t: a } = k();
|
|
2327
|
+
return /* @__PURE__ */ p("div", { className: U.sectionBar, style: { width: r && r }, children: [
|
|
2328
2328
|
/* @__PURE__ */ p("div", { className: U.leftContent, children: [
|
|
2329
2329
|
n && /* @__PURE__ */ s("img", { src: n, alt: "Icono", className: U.icon }),
|
|
2330
2330
|
/* @__PURE__ */ p("div", { className: U.textContainer, children: [
|
|
2331
|
-
/* @__PURE__ */ s("div", { className: U.title, children:
|
|
2331
|
+
/* @__PURE__ */ s("div", { className: U.title, children: a(d) }),
|
|
2332
2332
|
i && /* @__PURE__ */ s("div", { className: U.subtitle, children: i })
|
|
2333
2333
|
] })
|
|
2334
2334
|
] }),
|
|
@@ -2365,31 +2365,31 @@ const Y0 = "_sectionBar_1egwc_2", Q0 = "_leftContent_1egwc_14", X0 = "_textConta
|
|
|
2365
2365
|
playButton: an,
|
|
2366
2366
|
sliderOpen: ln,
|
|
2367
2367
|
sliderResults: cn
|
|
2368
|
-
}, dn = ({ onResults: n = !1, defaultYear: d = 2025, firstYear: i = 2025, lastYear: o = 2050, zIndex: t = 10, rightBarOpen:
|
|
2369
|
-
const [
|
|
2370
|
-
l(
|
|
2371
|
-
}, [m,
|
|
2372
|
-
|
|
2373
|
-
},
|
|
2374
|
-
|
|
2368
|
+
}, dn = ({ onResults: n = !1, defaultYear: d = 2025, firstYear: i = 2025, lastYear: o = 2050, zIndex: t = 10, rightBarOpen: r = !1 }) => {
|
|
2369
|
+
const [a, l] = $(d), c = Nt(), u = (_, v) => {
|
|
2370
|
+
l(v), c(Ne(v - 2e3));
|
|
2371
|
+
}, [m, g] = $(!1), y = () => {
|
|
2372
|
+
g(!0);
|
|
2373
|
+
}, b = () => {
|
|
2374
|
+
g(!1);
|
|
2375
2375
|
};
|
|
2376
|
-
((
|
|
2377
|
-
const
|
|
2376
|
+
((_, v) => {
|
|
2377
|
+
const x = ie();
|
|
2378
2378
|
L(() => {
|
|
2379
|
-
|
|
2380
|
-
}, [
|
|
2381
|
-
function
|
|
2382
|
-
|
|
2379
|
+
x.current = _;
|
|
2380
|
+
}, [_]), L(() => {
|
|
2381
|
+
function w() {
|
|
2382
|
+
x.current();
|
|
2383
2383
|
}
|
|
2384
2384
|
{
|
|
2385
|
-
let N = setInterval(
|
|
2385
|
+
let N = setInterval(w, v);
|
|
2386
2386
|
return () => clearInterval(N);
|
|
2387
2387
|
}
|
|
2388
|
-
}, [
|
|
2388
|
+
}, [v]);
|
|
2389
2389
|
})(() => {
|
|
2390
|
-
m && (
|
|
2390
|
+
m && (a != 2050 ? (l(a + 1), c(Ne(a - 2e3 + 1))) : (l(2025), c(Ne(25))));
|
|
2391
2391
|
}, 1e3);
|
|
2392
|
-
const
|
|
2392
|
+
const f = Rt({
|
|
2393
2393
|
palette: {
|
|
2394
2394
|
primary: {
|
|
2395
2395
|
main: "#605b56"
|
|
@@ -2411,17 +2411,17 @@ const Y0 = "_sectionBar_1egwc_2", Q0 = "_leftContent_1egwc_14", X0 = "_textConta
|
|
|
2411
2411
|
}
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
|
-
}),
|
|
2414
|
+
}), h = [
|
|
2415
2415
|
{ label: "", value: 2025 },
|
|
2416
2416
|
{ label: "", value: 2032 },
|
|
2417
2417
|
{ label: "", value: 2041 },
|
|
2418
2418
|
{ label: "", value: 2050 }
|
|
2419
2419
|
];
|
|
2420
|
-
return /* @__PURE__ */ s(Et, { theme:
|
|
2420
|
+
return /* @__PURE__ */ s(Et, { theme: f, children: /* @__PURE__ */ p(
|
|
2421
2421
|
qt,
|
|
2422
2422
|
{
|
|
2423
2423
|
sx: { width: 400 },
|
|
2424
|
-
className: `${n ? se.sliderResults : se.slider} ${
|
|
2424
|
+
className: `${n ? se.sliderResults : se.slider} ${r ? se.sliderOpen : ""}`,
|
|
2425
2425
|
style: { zIndex: t },
|
|
2426
2426
|
children: [
|
|
2427
2427
|
i,
|
|
@@ -2429,10 +2429,10 @@ const Y0 = "_sectionBar_1egwc_2", Q0 = "_leftContent_1egwc_14", X0 = "_textConta
|
|
|
2429
2429
|
Ot,
|
|
2430
2430
|
{
|
|
2431
2431
|
"aria-label": "TimeSlider",
|
|
2432
|
-
value:
|
|
2432
|
+
value: a,
|
|
2433
2433
|
valueLabelDisplay: "on",
|
|
2434
2434
|
step: 1,
|
|
2435
|
-
marks:
|
|
2435
|
+
marks: h,
|
|
2436
2436
|
min: i,
|
|
2437
2437
|
max: o,
|
|
2438
2438
|
onChange: u,
|
|
@@ -2441,8 +2441,8 @@ const Y0 = "_sectionBar_1egwc_2", Q0 = "_leftContent_1egwc_14", X0 = "_textConta
|
|
|
2441
2441
|
}
|
|
2442
2442
|
),
|
|
2443
2443
|
o,
|
|
2444
|
-
!m && /* @__PURE__ */ s("button", { className: se.playButton, onClick:
|
|
2445
|
-
m && /* @__PURE__ */ s("button", { className: se.playButton, onClick:
|
|
2444
|
+
!m && /* @__PURE__ */ s("button", { className: se.playButton, onClick: y, children: /* @__PURE__ */ s("img", { src: on, alt: "Play" }) }),
|
|
2445
|
+
m && /* @__PURE__ */ s("button", { className: se.playButton, onClick: b, children: /* @__PURE__ */ s("img", { src: sn, alt: "Pause" }) })
|
|
2446
2446
|
]
|
|
2447
2447
|
}
|
|
2448
2448
|
) });
|
|
@@ -2464,22 +2464,22 @@ const un = "_TopNavMenuContainer_12mp4_2", pn = "_topNavOptions_12mp4_13", mn =
|
|
|
2464
2464
|
containerStyles: d,
|
|
2465
2465
|
borderColor: i = "red",
|
|
2466
2466
|
textColor: o = "white",
|
|
2467
|
-
onChangeNavLink: t = (
|
|
2468
|
-
console.log("Changed NavLink",
|
|
2467
|
+
onChangeNavLink: t = (r) => {
|
|
2468
|
+
console.log("Changed NavLink", r);
|
|
2469
2469
|
}
|
|
2470
2470
|
}) => {
|
|
2471
|
-
const { t:
|
|
2472
|
-
return /* @__PURE__ */ s("div", { className: ke.TopNavMenuContainer, style: { ...d }, children: n.map((
|
|
2471
|
+
const { t: r } = k();
|
|
2472
|
+
return /* @__PURE__ */ s("div", { className: ke.TopNavMenuContainer, style: { ...d }, children: n.map((a, l) => /* @__PURE__ */ s(
|
|
2473
2473
|
Pt,
|
|
2474
2474
|
{
|
|
2475
|
-
to:
|
|
2475
|
+
to: a.url,
|
|
2476
2476
|
className: ({ isActive: c }) => `${ke.topNavOptions} ${c ? ke.active : ""} `,
|
|
2477
|
-
onClick: () => t(
|
|
2477
|
+
onClick: () => t(a.url),
|
|
2478
2478
|
style: ({ isActive: c }) => ({
|
|
2479
2479
|
color: o,
|
|
2480
2480
|
borderBottom: c ? `5px solid ${i}` : "5px solid transparent"
|
|
2481
2481
|
}),
|
|
2482
|
-
children: a
|
|
2482
|
+
children: r(a.name)
|
|
2483
2483
|
},
|
|
2484
2484
|
l
|
|
2485
2485
|
)) });
|
|
@@ -2502,8 +2502,8 @@ const gn = "_LogInButton_1vxj5_2", Cn = {
|
|
|
2502
2502
|
loggedInLabel: i = "Log out",
|
|
2503
2503
|
containerStyles: o,
|
|
2504
2504
|
userName: t = "",
|
|
2505
|
-
isLoggedIn:
|
|
2506
|
-
onClickLogIn:
|
|
2505
|
+
isLoggedIn: r = !1,
|
|
2506
|
+
onClickLogIn: a = () => {
|
|
2507
2507
|
console.log("Login clicked");
|
|
2508
2508
|
},
|
|
2509
2509
|
onClickLogOut: l = () => {
|
|
@@ -2516,8 +2516,8 @@ const gn = "_LogInButton_1vxj5_2", Cn = {
|
|
|
2516
2516
|
{
|
|
2517
2517
|
style: { ...o },
|
|
2518
2518
|
className: `${Cn.LogInButton} link ${n}`,
|
|
2519
|
-
onClick:
|
|
2520
|
-
children:
|
|
2519
|
+
onClick: r ? l : a,
|
|
2520
|
+
children: r ? t || c(i) : c(d)
|
|
2521
2521
|
}
|
|
2522
2522
|
);
|
|
2523
2523
|
};
|
|
@@ -2529,16 +2529,16 @@ fn.propTypes = {
|
|
|
2529
2529
|
userName: e.string,
|
|
2530
2530
|
isLoggedIn: e.bool
|
|
2531
2531
|
};
|
|
2532
|
-
const bn = "_elementSelector_fd7az_2", yn = "_header_fd7az_13", _n = "_nameDateContainer_fd7az_23", vn = "_elementName_fd7az_39",
|
|
2532
|
+
const bn = "_elementSelector_fd7az_2", yn = "_header_fd7az_13", _n = "_nameDateContainer_fd7az_23", vn = "_elementName_fd7az_39", wn = "_elementDate_fd7az_53", xn = "_buttonsContainer_fd7az_67", Nn = "_elementListContainer_fd7az_76", kn = "_newElementButtonContainer_fd7az_80", j = {
|
|
2533
2533
|
elementSelector: bn,
|
|
2534
2534
|
header: yn,
|
|
2535
2535
|
nameDateContainer: _n,
|
|
2536
2536
|
elementName: vn,
|
|
2537
|
-
elementDate:
|
|
2538
|
-
buttonsContainer:
|
|
2537
|
+
elementDate: wn,
|
|
2538
|
+
buttonsContainer: xn,
|
|
2539
2539
|
elementListContainer: Nn,
|
|
2540
2540
|
newElementButtonContainer: kn
|
|
2541
|
-
}, Bn = "_listElement_1s506_2", Sn = "_elementNameDate_1s506_17", Dn = "_elementNameContainer_1s506_27", Mn = "_elementName_1s506_17", $n = "_elementDate_1s506_42", Ln = "_elementButtons_1s506_45", Fn = "_moreInfoContainer_1s506_68", Tn = "_moreInfo_1s506_68",
|
|
2541
|
+
}, Bn = "_listElement_1s506_2", Sn = "_elementNameDate_1s506_17", Dn = "_elementNameContainer_1s506_27", Mn = "_elementName_1s506_17", $n = "_elementDate_1s506_42", Ln = "_elementButtons_1s506_45", Fn = "_moreInfoContainer_1s506_68", Tn = "_moreInfo_1s506_68", R = {
|
|
2542
2542
|
listElement: Bn,
|
|
2543
2543
|
elementNameDate: Sn,
|
|
2544
2544
|
elementNameContainer: Dn,
|
|
@@ -2579,35 +2579,32 @@ const En = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%20
|
|
|
2579
2579
|
isActive: i,
|
|
2580
2580
|
activeColor: o,
|
|
2581
2581
|
fontColor: t,
|
|
2582
|
-
moreInfo:
|
|
2583
|
-
columns:
|
|
2582
|
+
moreInfo: r,
|
|
2583
|
+
columns: a,
|
|
2584
2584
|
elementButtons: l,
|
|
2585
2585
|
processTooltip: c,
|
|
2586
|
-
defaultTooltip: u
|
|
2586
|
+
defaultTooltip: u,
|
|
2587
|
+
showEye: m = !0
|
|
2587
2588
|
}) => {
|
|
2588
|
-
const { nom:
|
|
2589
|
+
const { nom: g, created_at: y, id: b, isBeingProcessed: C } = n, [f, h] = $(!1), { t: _ } = k();
|
|
2589
2590
|
return /* @__PURE__ */ p(
|
|
2590
2591
|
"div",
|
|
2591
2592
|
{
|
|
2592
|
-
className:
|
|
2593
|
+
className: R.listElement,
|
|
2593
2594
|
style: { borderBottom: `1px solid ${t}` },
|
|
2594
2595
|
children: [
|
|
2595
|
-
/* @__PURE__ */
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
{
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
r.ambit && /* @__PURE__ */ s("div", { className: O.elementDate, children: n.ambit }),
|
|
2608
|
-
r.escenari && /* @__PURE__ */ s("div", { className: O.elementDate, children: n.escenari })
|
|
2609
|
-
] }),
|
|
2610
|
-
/* @__PURE__ */ p("div", { className: O.elementButtons, children: [
|
|
2596
|
+
/* @__PURE__ */ s("div", { className: R.elementNameDate, onClick: () => d(b), children: Object.keys(a).map((v) => v === "nom" ? /* @__PURE__ */ s("div", { className: R.elementNameContainer, children: /* @__PURE__ */ p("div", { className: R.elementName, children: [
|
|
2597
|
+
m && (i ? /* @__PURE__ */ s(qn, { style: { color: o, marginRight: 9 } }) : /* @__PURE__ */ s(
|
|
2598
|
+
"img",
|
|
2599
|
+
{
|
|
2600
|
+
style: { marginRight: 9 },
|
|
2601
|
+
src: En,
|
|
2602
|
+
alt: "eye"
|
|
2603
|
+
}
|
|
2604
|
+
)),
|
|
2605
|
+
/* @__PURE__ */ s("span", { style: { color: i ? o : t }, children: g })
|
|
2606
|
+
] }) }) : v == "data" ? /* @__PURE__ */ s("div", { className: R.elementDate, children: y ? new Date(y).toLocaleDateString() : "" }) : /* @__PURE__ */ s("div", { className: R.elementDate, children: n[v] })) }),
|
|
2607
|
+
/* @__PURE__ */ p("div", { className: R.elementButtons, children: [
|
|
2611
2608
|
n.processing && /* @__PURE__ */ p("div", { className: "tooltip-parent", children: [
|
|
2612
2609
|
/* @__PURE__ */ s("img", { src: On }),
|
|
2613
2610
|
/* @__PURE__ */ s(Y, { text: c, position: "left" })
|
|
@@ -2629,13 +2626,13 @@ const En = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%20
|
|
|
2629
2626
|
/* @__PURE__ */ s(Y, { text: u, position: "left" })
|
|
2630
2627
|
] })
|
|
2631
2628
|
] }),
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
/* @__PURE__ */ p("div", { className:
|
|
2635
|
-
/* @__PURE__ */ s("span", { children:
|
|
2636
|
-
|
|
2629
|
+
r && /* @__PURE__ */ s("div", { className: R.break }),
|
|
2630
|
+
r && /* @__PURE__ */ p("div", { className: R.moreInfoContainer, children: [
|
|
2631
|
+
/* @__PURE__ */ p("div", { className: R.moreInfo, onClick: () => h(!f), children: [
|
|
2632
|
+
/* @__PURE__ */ s("span", { children: f ? "-" : "+" }),
|
|
2633
|
+
_(r.label)
|
|
2637
2634
|
] }),
|
|
2638
|
-
|
|
2635
|
+
r && f && /* @__PURE__ */ s("div", { className: R.moreInfoInfo, children: n[r.info] })
|
|
2639
2636
|
] })
|
|
2640
2637
|
]
|
|
2641
2638
|
}
|
|
@@ -2674,7 +2671,8 @@ pt.propTypes = {
|
|
|
2674
2671
|
})
|
|
2675
2672
|
}),
|
|
2676
2673
|
processTooltip: e.string,
|
|
2677
|
-
defaultTooltip: e.string
|
|
2674
|
+
defaultTooltip: e.string,
|
|
2675
|
+
showEye: e.bool
|
|
2678
2676
|
};
|
|
2679
2677
|
const Ye = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Pn = ({
|
|
2680
2678
|
elementsList: n,
|
|
@@ -2682,83 +2680,80 @@ const Ye = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
2682
2680
|
fontColor: i = "#605B56",
|
|
2683
2681
|
activeColor: o,
|
|
2684
2682
|
buttonContainerStyles: t = {},
|
|
2685
|
-
containerStyles:
|
|
2686
|
-
newElementButton:
|
|
2683
|
+
containerStyles: r = {},
|
|
2684
|
+
newElementButton: a,
|
|
2687
2685
|
//{label: 'text', onClick: function(), disabled}/null
|
|
2688
|
-
onClickElement: l = (
|
|
2686
|
+
onClickElement: l = (C) => console.log(`OnCLickElement: ${C}`),
|
|
2689
2687
|
columns: c,
|
|
2690
2688
|
// {'nom': nomLabel/null, 'data':dataLabel/null, 'ambit':ambitLabel/null, 'escenari':escenariLabel/null}
|
|
2691
2689
|
elementButtons: u,
|
|
2692
2690
|
//{'copy': {onClick:onClickCopy, tooltipText:'text'}/null, 'filter': {onClick:onClickFilter, tooltipText:'text'}/null, 'trash':{onClick:onClickTrash, tooltipText:'text'}/null}
|
|
2693
2691
|
moreInfo: m = !1,
|
|
2694
2692
|
//{label: 'x'}
|
|
2695
|
-
processTooltip:
|
|
2693
|
+
processTooltip: g,
|
|
2696
2694
|
//texto para el tooltip del simbolo "En proceso"
|
|
2697
|
-
defaultTooltip:
|
|
2695
|
+
defaultTooltip: y,
|
|
2698
2696
|
//texto para el tooltip del símbolo de candado para los elementos default
|
|
2697
|
+
showEye: b = !0
|
|
2699
2698
|
}) => {
|
|
2700
|
-
const { t:
|
|
2699
|
+
const { t: C } = k(), [f, h] = $(n);
|
|
2701
2700
|
L(() => {
|
|
2702
|
-
n &&
|
|
2701
|
+
n && h(n);
|
|
2703
2702
|
}, [n]);
|
|
2704
|
-
const
|
|
2705
|
-
if (
|
|
2706
|
-
let x = [...
|
|
2707
|
-
x.sort((w,
|
|
2703
|
+
const _ = (v) => {
|
|
2704
|
+
if (f && f.length > 0) {
|
|
2705
|
+
let x = [...f];
|
|
2706
|
+
x.sort((w, N) => w[v].localeCompare(N[v])), h(x);
|
|
2708
2707
|
}
|
|
2709
2708
|
};
|
|
2710
2709
|
return /* @__PURE__ */ p(
|
|
2711
2710
|
"div",
|
|
2712
2711
|
{
|
|
2713
|
-
className:
|
|
2714
|
-
style: { color: i, ...
|
|
2712
|
+
className: j.elementSelector,
|
|
2713
|
+
style: { color: i, ...r },
|
|
2715
2714
|
children: [
|
|
2716
2715
|
/* @__PURE__ */ p(
|
|
2717
2716
|
"div",
|
|
2718
2717
|
{
|
|
2719
|
-
className:
|
|
2718
|
+
className: j.header,
|
|
2720
2719
|
style: { borderBottom: `1px solid ${i}` },
|
|
2721
2720
|
children: [
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
] }) }),
|
|
2731
|
-
c.ambit && /* @__PURE__ */ s("div", { className: P.elementDate, children: /* @__PURE__ */ s("span", { children: f(c.ambit) }) }),
|
|
2732
|
-
c.escenari && /* @__PURE__ */ s("div", { className: P.elementDate, children: /* @__PURE__ */ s("span", { children: f(c.escenari) }) })
|
|
2733
|
-
] }),
|
|
2734
|
-
/* @__PURE__ */ s("div", { className: P.buttonsContainer })
|
|
2721
|
+
/* @__PURE__ */ s("div", { className: j.nameDateContainer, children: Object.keys(c).map((v) => v === "nom" ? /* @__PURE__ */ s("div", { className: j.elementName, children: /* @__PURE__ */ p("button", { onClick: () => _("name"), children: [
|
|
2722
|
+
/* @__PURE__ */ s("span", { children: C(c.nom) }),
|
|
2723
|
+
/* @__PURE__ */ s("img", { src: Ye, alt: "order arrow" })
|
|
2724
|
+
] }) }, v) : v === "data" ? /* @__PURE__ */ s("div", { className: j.elementDate, children: /* @__PURE__ */ p("button", { onClick: () => _("date"), children: [
|
|
2725
|
+
/* @__PURE__ */ s("span", { children: C(c.data) }),
|
|
2726
|
+
/* @__PURE__ */ s("img", { src: Ye, alt: "order arrow" })
|
|
2727
|
+
] }) }, v) : /* @__PURE__ */ s("div", { className: j.elementDate, children: /* @__PURE__ */ s("span", { children: C(c[v]) }) }, v)) }),
|
|
2728
|
+
/* @__PURE__ */ s("div", { className: j.buttonsContainer })
|
|
2735
2729
|
]
|
|
2736
2730
|
}
|
|
2737
2731
|
),
|
|
2738
|
-
/* @__PURE__ */ s("div", { className:
|
|
2732
|
+
/* @__PURE__ */ s("div", { className: j.elementListContainer, children: f && f.length > 0 && f.map((v) => /* @__PURE__ */ s(
|
|
2739
2733
|
pt,
|
|
2740
2734
|
{
|
|
2741
|
-
isActive: d ==
|
|
2742
|
-
listelement:
|
|
2735
|
+
isActive: d == v.id,
|
|
2736
|
+
listelement: v,
|
|
2743
2737
|
fontColor: i,
|
|
2744
2738
|
activeColor: o,
|
|
2745
2739
|
onClickElement: l,
|
|
2746
2740
|
columns: c,
|
|
2747
2741
|
elementButtons: u,
|
|
2748
2742
|
moreInfo: m,
|
|
2749
|
-
processTooltip:
|
|
2750
|
-
defaultTooltip:
|
|
2743
|
+
processTooltip: g,
|
|
2744
|
+
defaultTooltip: y,
|
|
2745
|
+
showEye: b
|
|
2751
2746
|
},
|
|
2752
|
-
`elementKey${
|
|
2747
|
+
`elementKey${v.id}`
|
|
2753
2748
|
)) }),
|
|
2754
|
-
|
|
2749
|
+
a && /* @__PURE__ */ s("div", { className: j.newElementButtonContainer, children: /* @__PURE__ */ s(
|
|
2755
2750
|
fe,
|
|
2756
2751
|
{
|
|
2757
2752
|
style: { ...t },
|
|
2758
|
-
onClick:
|
|
2753
|
+
onClick: a.onClick,
|
|
2759
2754
|
borderColor: "grey",
|
|
2760
|
-
disabled:
|
|
2761
|
-
children:
|
|
2755
|
+
disabled: a.disabled || !1,
|
|
2756
|
+
children: C(a.label)
|
|
2762
2757
|
}
|
|
2763
2758
|
) })
|
|
2764
2759
|
]
|
|
@@ -2809,7 +2804,8 @@ Pn.propTypes = {
|
|
|
2809
2804
|
info: e.any
|
|
2810
2805
|
}),
|
|
2811
2806
|
processTooltip: e.string,
|
|
2812
|
-
defaultTooltip: e.string
|
|
2807
|
+
defaultTooltip: e.string,
|
|
2808
|
+
showEye: e.bool
|
|
2813
2809
|
};
|
|
2814
2810
|
const ge = {
|
|
2815
2811
|
text: "text",
|
|
@@ -2847,15 +2843,15 @@ function ht(n) {
|
|
|
2847
2843
|
var gt = (n) => /^\w*$/.test(n), Ve = (n) => n === void 0, t1 = (n) => Array.isArray(n) ? n.filter(Boolean) : [], Ct = (n) => t1(n.replace(/["|']|\]/g, "").split(/\.|\[/)), A = (n, d, i) => {
|
|
2848
2844
|
if (!d || !ce(n))
|
|
2849
2845
|
return i;
|
|
2850
|
-
const o = (gt(d) ? [d] : Ct(d)).reduce((t,
|
|
2846
|
+
const o = (gt(d) ? [d] : Ct(d)).reduce((t, r) => mt(t) ? t : t[r], n);
|
|
2851
2847
|
return Ve(o) || o === n ? Ve(n[d]) ? i : n[d] : o;
|
|
2852
2848
|
}, Be = (n) => typeof n == "boolean", Qe = (n, d, i) => {
|
|
2853
2849
|
let o = -1;
|
|
2854
|
-
const t = gt(d) ? [d] : Ct(d),
|
|
2855
|
-
for (; ++o <
|
|
2850
|
+
const t = gt(d) ? [d] : Ct(d), r = t.length, a = r - 1;
|
|
2851
|
+
for (; ++o < r; ) {
|
|
2856
2852
|
const l = t[o];
|
|
2857
2853
|
let c = i;
|
|
2858
|
-
if (o !==
|
|
2854
|
+
if (o !== a) {
|
|
2859
2855
|
const u = n[l];
|
|
2860
2856
|
c = ce(u) || Array.isArray(u) ? u : isNaN(+t[o + 1]) ? {} : [];
|
|
2861
2857
|
}
|
|
@@ -2876,18 +2872,18 @@ var n1 = (n, d, i, o = !0) => {
|
|
|
2876
2872
|
const t = {
|
|
2877
2873
|
defaultValues: d._defaultValues
|
|
2878
2874
|
};
|
|
2879
|
-
for (const
|
|
2880
|
-
Object.defineProperty(t,
|
|
2875
|
+
for (const r in n)
|
|
2876
|
+
Object.defineProperty(t, r, {
|
|
2881
2877
|
get: () => {
|
|
2882
|
-
const
|
|
2883
|
-
return d._proxyFormState[
|
|
2878
|
+
const a = r;
|
|
2879
|
+
return d._proxyFormState[a] !== Je.all && (d._proxyFormState[a] = !o || Je.all), i && (i[a] = !0), n[a];
|
|
2884
2880
|
}
|
|
2885
2881
|
});
|
|
2886
2882
|
return t;
|
|
2887
2883
|
};
|
|
2888
2884
|
const bt = typeof window < "u" ? ne.useLayoutEffect : ne.useEffect;
|
|
2889
2885
|
function i1(n) {
|
|
2890
|
-
const d = qe(), { control: i = d.control, disabled: o, name: t, exact:
|
|
2886
|
+
const d = qe(), { control: i = d.control, disabled: o, name: t, exact: r } = n || {}, [a, l] = B.useState(i._formState), c = B.useRef({
|
|
2891
2887
|
isDirty: !1,
|
|
2892
2888
|
isLoading: !1,
|
|
2893
2889
|
dirtyFields: !1,
|
|
@@ -2900,31 +2896,31 @@ function i1(n) {
|
|
|
2900
2896
|
return bt(() => i._subscribe({
|
|
2901
2897
|
name: t,
|
|
2902
2898
|
formState: c.current,
|
|
2903
|
-
exact:
|
|
2899
|
+
exact: r,
|
|
2904
2900
|
callback: (u) => {
|
|
2905
2901
|
!o && l({
|
|
2906
2902
|
...i._formState,
|
|
2907
2903
|
...u
|
|
2908
2904
|
});
|
|
2909
2905
|
}
|
|
2910
|
-
}), [t, o,
|
|
2906
|
+
}), [t, o, r]), B.useEffect(() => {
|
|
2911
2907
|
c.current.isValid && i._setValid(!0);
|
|
2912
|
-
}, [i]), B.useMemo(() => n1(
|
|
2908
|
+
}, [i]), B.useMemo(() => n1(a, i, c.current, !1), [a, i]);
|
|
2913
2909
|
}
|
|
2914
|
-
var o1 = (n) => typeof n == "string", s1 = (n, d, i, o, t) => o1(n) ? A(i, n, t) : Array.isArray(n) ? n.map((
|
|
2910
|
+
var o1 = (n) => typeof n == "string", s1 = (n, d, i, o, t) => o1(n) ? A(i, n, t) : Array.isArray(n) ? n.map((r) => A(i, r)) : i;
|
|
2915
2911
|
function r1(n) {
|
|
2916
|
-
const d = qe(), { control: i = d.control, name: o, defaultValue: t, disabled:
|
|
2912
|
+
const d = qe(), { control: i = d.control, name: o, defaultValue: t, disabled: r, exact: a } = n || {}, l = B.useRef(t), [c, u] = B.useState(i._getWatch(o, l.current));
|
|
2917
2913
|
return bt(() => i._subscribe({
|
|
2918
2914
|
name: o,
|
|
2919
2915
|
formState: {
|
|
2920
2916
|
values: !0
|
|
2921
2917
|
},
|
|
2922
|
-
exact:
|
|
2923
|
-
callback: (m) => !
|
|
2924
|
-
}), [o, i,
|
|
2918
|
+
exact: a,
|
|
2919
|
+
callback: (m) => !r && u(s1(o, i._names, m.values || i._formValues, !1, l.current))
|
|
2920
|
+
}), [o, i, r, a]), B.useEffect(() => i._removeUnmounted()), c;
|
|
2925
2921
|
}
|
|
2926
2922
|
function a1(n) {
|
|
2927
|
-
const d = qe(), { name: i, disabled: o, control: t = d.control, shouldUnregister:
|
|
2923
|
+
const d = qe(), { name: i, disabled: o, control: t = d.control, shouldUnregister: r } = n, a = Xn(t._names.array, i), l = r1({
|
|
2928
2924
|
control: t,
|
|
2929
2925
|
name: i,
|
|
2930
2926
|
defaultValue: A(t._formValues, i, A(t._defaultValues, i, n.defaultValue)),
|
|
@@ -2937,7 +2933,7 @@ function a1(n) {
|
|
|
2937
2933
|
...n.rules,
|
|
2938
2934
|
value: l,
|
|
2939
2935
|
...Be(n.disabled) ? { disabled: n.disabled } : {}
|
|
2940
|
-
})),
|
|
2936
|
+
})), g = B.useMemo(() => Object.defineProperties({}, {
|
|
2941
2937
|
invalid: {
|
|
2942
2938
|
enumerable: !0,
|
|
2943
2939
|
get: () => !!A(c.errors, i)
|
|
@@ -2958,61 +2954,61 @@ function a1(n) {
|
|
|
2958
2954
|
enumerable: !0,
|
|
2959
2955
|
get: () => A(c.errors, i)
|
|
2960
2956
|
}
|
|
2961
|
-
}), [c, i]),
|
|
2957
|
+
}), [c, i]), y = B.useCallback((h) => m.current.onChange({
|
|
2962
2958
|
target: {
|
|
2963
|
-
value: Yn(
|
|
2959
|
+
value: Yn(h),
|
|
2964
2960
|
name: i
|
|
2965
2961
|
},
|
|
2966
2962
|
type: Xe.CHANGE
|
|
2967
|
-
}), [i]),
|
|
2963
|
+
}), [i]), b = B.useCallback(() => m.current.onBlur({
|
|
2968
2964
|
target: {
|
|
2969
2965
|
value: A(t._formValues, i),
|
|
2970
2966
|
name: i
|
|
2971
2967
|
},
|
|
2972
2968
|
type: Xe.BLUR
|
|
2973
|
-
}), [i, t._formValues]),
|
|
2974
|
-
const
|
|
2975
|
-
|
|
2976
|
-
focus: () =>
|
|
2977
|
-
select: () =>
|
|
2978
|
-
setCustomValidity: (
|
|
2979
|
-
reportValidity: () =>
|
|
2969
|
+
}), [i, t._formValues]), C = B.useCallback((h) => {
|
|
2970
|
+
const _ = A(t._fields, i);
|
|
2971
|
+
_ && h && (_._f.ref = {
|
|
2972
|
+
focus: () => h.focus && h.focus(),
|
|
2973
|
+
select: () => h.select && h.select(),
|
|
2974
|
+
setCustomValidity: (v) => h.setCustomValidity(v),
|
|
2975
|
+
reportValidity: () => h.reportValidity()
|
|
2980
2976
|
});
|
|
2981
|
-
}, [t._fields, i]),
|
|
2977
|
+
}, [t._fields, i]), f = B.useMemo(() => ({
|
|
2982
2978
|
name: i,
|
|
2983
2979
|
value: l,
|
|
2984
2980
|
...Be(o) || c.disabled ? { disabled: c.disabled || o } : {},
|
|
2985
|
-
onChange:
|
|
2986
|
-
onBlur:
|
|
2987
|
-
ref:
|
|
2988
|
-
}), [i, o, c.disabled,
|
|
2981
|
+
onChange: y,
|
|
2982
|
+
onBlur: b,
|
|
2983
|
+
ref: C
|
|
2984
|
+
}), [i, o, c.disabled, y, b, C, l]);
|
|
2989
2985
|
return B.useEffect(() => {
|
|
2990
|
-
const
|
|
2986
|
+
const h = t._options.shouldUnregister || r;
|
|
2991
2987
|
t.register(i, {
|
|
2992
2988
|
...u.current.rules,
|
|
2993
2989
|
...Be(u.current.disabled) ? { disabled: u.current.disabled } : {}
|
|
2994
2990
|
});
|
|
2995
|
-
const
|
|
2996
|
-
const
|
|
2997
|
-
|
|
2991
|
+
const _ = (v, x) => {
|
|
2992
|
+
const w = A(t._fields, v);
|
|
2993
|
+
w && w._f && (w._f.mount = x);
|
|
2998
2994
|
};
|
|
2999
|
-
if (
|
|
3000
|
-
const
|
|
3001
|
-
Qe(t._defaultValues, i,
|
|
2995
|
+
if (_(i, !0), h) {
|
|
2996
|
+
const v = ht(A(t._options.defaultValues, i));
|
|
2997
|
+
Qe(t._defaultValues, i, v), Ve(A(t._formValues, i)) && Qe(t._formValues, i, v);
|
|
3002
2998
|
}
|
|
3003
|
-
return !
|
|
3004
|
-
(
|
|
2999
|
+
return !a && t.register(i), () => {
|
|
3000
|
+
(a ? h && !t._state.action : h) ? t.unregister(i) : _(i, !1);
|
|
3005
3001
|
};
|
|
3006
|
-
}, [i, t,
|
|
3002
|
+
}, [i, t, a, r]), B.useEffect(() => {
|
|
3007
3003
|
t._setDisabledField({
|
|
3008
3004
|
disabled: o,
|
|
3009
3005
|
name: i
|
|
3010
3006
|
});
|
|
3011
3007
|
}, [o, i, t]), B.useMemo(() => ({
|
|
3012
|
-
field:
|
|
3008
|
+
field: f,
|
|
3013
3009
|
formState: c,
|
|
3014
|
-
fieldState:
|
|
3015
|
-
}), [
|
|
3010
|
+
fieldState: g
|
|
3011
|
+
}), [f, c, g]);
|
|
3016
3012
|
}
|
|
3017
3013
|
const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
3018
3014
|
errorMessage: l1
|
|
@@ -3035,38 +3031,38 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3035
3031
|
code: i,
|
|
3036
3032
|
type: o,
|
|
3037
3033
|
label: t,
|
|
3038
|
-
maxLength:
|
|
3039
|
-
required:
|
|
3034
|
+
maxLength: r,
|
|
3035
|
+
required: a,
|
|
3040
3036
|
validateFunction: l,
|
|
3041
3037
|
placeholder: c,
|
|
3042
3038
|
errorColor: u = "red",
|
|
3043
3039
|
width: m = 325,
|
|
3044
|
-
onClickForgotPass:
|
|
3040
|
+
onClickForgotPass: g = () => {
|
|
3045
3041
|
console.log("Click on forgot password");
|
|
3046
3042
|
},
|
|
3047
|
-
forgotPassLabel:
|
|
3048
|
-
} = n, { t:
|
|
3043
|
+
forgotPassLabel: y = "forgot-password"
|
|
3044
|
+
} = n, { t: b } = k(), { control: C, trigger: f, clearErrors: h } = d, [_, v] = $(!1), x = ie(a);
|
|
3049
3045
|
L(() => {
|
|
3050
|
-
|
|
3051
|
-
}, [
|
|
3052
|
-
const
|
|
3046
|
+
x.current !== a && (a ? f(i) : h(i), x.current = a);
|
|
3047
|
+
}, [a, i, f, h]);
|
|
3048
|
+
const w = () => o ? o === "password" && _ ? "text" : o : "text";
|
|
3053
3049
|
return /* @__PURE__ */ s(
|
|
3054
3050
|
Ee,
|
|
3055
3051
|
{
|
|
3056
3052
|
name: i,
|
|
3057
|
-
control:
|
|
3053
|
+
control: C,
|
|
3058
3054
|
rules: {
|
|
3059
|
-
required:
|
|
3060
|
-
maxLength:
|
|
3055
|
+
required: a ? `${b(t)} ${b("errorMessages.required")}` : !1,
|
|
3056
|
+
maxLength: r || void 0,
|
|
3061
3057
|
validate: l || void 0
|
|
3062
3058
|
},
|
|
3063
3059
|
render: ({ field: N, fieldState: S }) => {
|
|
3064
3060
|
var D;
|
|
3065
3061
|
return /* @__PURE__ */ p("div", { className: re.textInputContainer, children: [
|
|
3066
3062
|
/* @__PURE__ */ p("h3", { className: re.labelContainer, children: [
|
|
3067
|
-
|
|
3063
|
+
b(t),
|
|
3068
3064
|
" ",
|
|
3069
|
-
|
|
3065
|
+
a && /* @__PURE__ */ s("label", { style: { color: S.error ? u : "" }, children: "*" })
|
|
3070
3066
|
] }),
|
|
3071
3067
|
/* @__PURE__ */ p(
|
|
3072
3068
|
"div",
|
|
@@ -3077,25 +3073,25 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3077
3073
|
/* @__PURE__ */ s(
|
|
3078
3074
|
"input",
|
|
3079
3075
|
{
|
|
3080
|
-
type:
|
|
3076
|
+
type: w(),
|
|
3081
3077
|
...N,
|
|
3082
|
-
placeholder: c ?
|
|
3083
|
-
maxLength:
|
|
3078
|
+
placeholder: c ? b(c) : "",
|
|
3079
|
+
maxLength: r || void 0
|
|
3084
3080
|
}
|
|
3085
3081
|
),
|
|
3086
3082
|
o == "password" && /* @__PURE__ */ s(
|
|
3087
3083
|
"button",
|
|
3088
3084
|
{
|
|
3089
|
-
onClick: () =>
|
|
3085
|
+
onClick: () => v(!_),
|
|
3090
3086
|
type: "button",
|
|
3091
3087
|
className: re.showPasswordButton,
|
|
3092
|
-
children:
|
|
3088
|
+
children: _ ? "🙈" : "👁️"
|
|
3093
3089
|
}
|
|
3094
3090
|
)
|
|
3095
3091
|
]
|
|
3096
3092
|
}
|
|
3097
3093
|
),
|
|
3098
|
-
o == "password" && /* @__PURE__ */ s("div", { className: re.forgotPassButton, children: /* @__PURE__ */ s("button", { onClick:
|
|
3094
|
+
o == "password" && /* @__PURE__ */ s("div", { className: re.forgotPassButton, children: /* @__PURE__ */ s("button", { onClick: g, children: b(y) }) }),
|
|
3099
3095
|
/* @__PURE__ */ s(
|
|
3100
3096
|
be,
|
|
3101
3097
|
{
|
|
@@ -3125,51 +3121,51 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3125
3121
|
code: i,
|
|
3126
3122
|
type: o,
|
|
3127
3123
|
label: t,
|
|
3128
|
-
maxLength:
|
|
3129
|
-
required:
|
|
3124
|
+
maxLength: r,
|
|
3125
|
+
required: a,
|
|
3130
3126
|
validateFunction: l,
|
|
3131
3127
|
placeholder: c,
|
|
3132
3128
|
errorColor: u = "red",
|
|
3133
3129
|
width: m = 325,
|
|
3134
|
-
options:
|
|
3135
|
-
} = n, { t:
|
|
3130
|
+
options: g = []
|
|
3131
|
+
} = n, { t: y } = k(), { control: b, trigger: C, clearErrors: f } = d, h = ie(a);
|
|
3136
3132
|
return L(() => {
|
|
3137
|
-
|
|
3138
|
-
}, [
|
|
3133
|
+
h.current !== a && (a ? C(i) : f(i), h.current = a);
|
|
3134
|
+
}, [a, i, C, f]), /* @__PURE__ */ s(
|
|
3139
3135
|
Ee,
|
|
3140
3136
|
{
|
|
3141
3137
|
name: i,
|
|
3142
|
-
control:
|
|
3138
|
+
control: b,
|
|
3143
3139
|
rules: {
|
|
3144
|
-
required:
|
|
3140
|
+
required: a ? `${y(t)} ${y("errorMessages.required")}` : !1,
|
|
3145
3141
|
validate: l || void 0
|
|
3146
3142
|
},
|
|
3147
|
-
render: ({ field:
|
|
3148
|
-
var
|
|
3143
|
+
render: ({ field: _, fieldState: v }) => {
|
|
3144
|
+
var x;
|
|
3149
3145
|
return /* @__PURE__ */ p("div", { className: te.selectInputContainer, children: [
|
|
3150
3146
|
/* @__PURE__ */ p("h3", { className: te.labelContainer, children: [
|
|
3151
|
-
|
|
3147
|
+
y(t),
|
|
3152
3148
|
" ",
|
|
3153
|
-
|
|
3149
|
+
a && /* @__PURE__ */ s("label", { style: { color: v.error ? u : "" }, children: "*" })
|
|
3154
3150
|
] }),
|
|
3155
3151
|
/* @__PURE__ */ p("div", { className: te.inputContainer, style: { width: m }, children: [
|
|
3156
3152
|
/* @__PURE__ */ p(
|
|
3157
3153
|
"select",
|
|
3158
3154
|
{
|
|
3159
|
-
...
|
|
3160
|
-
onChange: (
|
|
3161
|
-
const N =
|
|
3162
|
-
|
|
3155
|
+
..._,
|
|
3156
|
+
onChange: (w) => {
|
|
3157
|
+
const N = w.target.value, S = g.every((D) => typeof D.value == "number") ? Number(N) : N;
|
|
3158
|
+
_.onChange(S);
|
|
3163
3159
|
},
|
|
3164
3160
|
className: te.selectInput,
|
|
3165
3161
|
children: [
|
|
3166
|
-
/* @__PURE__ */ s("option", { value: "", disabled: !0, hidden: !0, children:
|
|
3167
|
-
|
|
3162
|
+
/* @__PURE__ */ s("option", { value: "", disabled: !0, hidden: !0, children: y(c || "selectOption") }),
|
|
3163
|
+
g.map((w, N) => /* @__PURE__ */ s(
|
|
3168
3164
|
"option",
|
|
3169
3165
|
{
|
|
3170
|
-
value:
|
|
3166
|
+
value: w.value,
|
|
3171
3167
|
className: te.option,
|
|
3172
|
-
children:
|
|
3168
|
+
children: y(w.label)
|
|
3173
3169
|
},
|
|
3174
3170
|
N
|
|
3175
3171
|
))
|
|
@@ -3188,7 +3184,7 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3188
3184
|
/* @__PURE__ */ s(
|
|
3189
3185
|
be,
|
|
3190
3186
|
{
|
|
3191
|
-
errorMessage: (
|
|
3187
|
+
errorMessage: (x = v.error) == null ? void 0 : x.message,
|
|
3192
3188
|
errorColor: u
|
|
3193
3189
|
}
|
|
3194
3190
|
)
|
|
@@ -3196,9 +3192,9 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3196
3192
|
}
|
|
3197
3193
|
}
|
|
3198
3194
|
);
|
|
3199
|
-
},
|
|
3200
|
-
radioButtonContainer:
|
|
3201
|
-
wholeInputContainer:
|
|
3195
|
+
}, w1 = "_radioButtonContainer_1e994_2", x1 = "_wholeInputContainer_1e994_5", N1 = "_questionContainer_1e994_27", k1 = "_radioQuestion_1e994_59", B1 = "_inputContainer_1e994_63", S1 = "_radioInput_1e994_93", G = {
|
|
3196
|
+
radioButtonContainer: w1,
|
|
3197
|
+
wholeInputContainer: x1,
|
|
3202
3198
|
questionContainer: N1,
|
|
3203
3199
|
radioQuestion: k1,
|
|
3204
3200
|
inputContainer: B1,
|
|
@@ -3208,31 +3204,31 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3208
3204
|
code: i,
|
|
3209
3205
|
label: o,
|
|
3210
3206
|
required: t,
|
|
3211
|
-
validateFunction:
|
|
3212
|
-
errorColor:
|
|
3207
|
+
validateFunction: r,
|
|
3208
|
+
errorColor: a = "red",
|
|
3213
3209
|
options: l = [],
|
|
3214
3210
|
multi: c = !1
|
|
3215
|
-
} = n, { t: u } = k(), { control: m, trigger:
|
|
3216
|
-
if (c &&
|
|
3217
|
-
let
|
|
3218
|
-
|
|
3211
|
+
} = n, { t: u } = k(), { control: m, trigger: g, clearErrors: y } = d, b = ({ options: h, onChange: _, actualValue: v }) => {
|
|
3212
|
+
if (c && v && v.length > 0) {
|
|
3213
|
+
let x = v.filter((w) => w !== h);
|
|
3214
|
+
_(x);
|
|
3219
3215
|
}
|
|
3220
|
-
},
|
|
3221
|
-
c ?
|
|
3222
|
-
},
|
|
3216
|
+
}, C = ({ options: h, onChange: _, actualValue: v }) => {
|
|
3217
|
+
c ? v && v.length > 0 ? _([...v, h]) : _([h]) : _(h);
|
|
3218
|
+
}, f = ie(t);
|
|
3223
3219
|
return L(() => {
|
|
3224
|
-
|
|
3225
|
-
}, [t, i,
|
|
3220
|
+
f.current !== t && (t ? g(i) : y(i), f.current = t);
|
|
3221
|
+
}, [t, i, g, y]), /* @__PURE__ */ s(
|
|
3226
3222
|
Ee,
|
|
3227
3223
|
{
|
|
3228
3224
|
control: m,
|
|
3229
3225
|
name: i,
|
|
3230
3226
|
rules: {
|
|
3231
|
-
validate: (
|
|
3227
|
+
validate: (h) => t && (h == null || h === "") ? `${u(o)} ${u("errorMessages.required")}` : null
|
|
3232
3228
|
},
|
|
3233
3229
|
render: ({
|
|
3234
|
-
formState: { errors:
|
|
3235
|
-
field: { onChange:
|
|
3230
|
+
formState: { errors: h },
|
|
3231
|
+
field: { onChange: _, onBlur: v, value: x, ref: w },
|
|
3236
3232
|
fieldState: N
|
|
3237
3233
|
}) => {
|
|
3238
3234
|
var S;
|
|
@@ -3248,7 +3244,7 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3248
3244
|
t && /* @__PURE__ */ s(
|
|
3249
3245
|
"label",
|
|
3250
3246
|
{
|
|
3251
|
-
style: { color: N.error ?
|
|
3247
|
+
style: { color: N.error ? a : "" },
|
|
3252
3248
|
children: "*"
|
|
3253
3249
|
}
|
|
3254
3250
|
)
|
|
@@ -3259,11 +3255,11 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3259
3255
|
l.map(
|
|
3260
3256
|
({
|
|
3261
3257
|
label: D,
|
|
3262
|
-
value:
|
|
3258
|
+
value: P,
|
|
3263
3259
|
disabled: de = !1,
|
|
3264
3260
|
italicLabel: ue
|
|
3265
|
-
},
|
|
3266
|
-
const q =
|
|
3261
|
+
}, O) => {
|
|
3262
|
+
const q = x && c ? x.isArray && (x == null ? void 0 : x.length) > 0 && x.some((E) => E === P) : x === P;
|
|
3267
3263
|
return /* @__PURE__ */ p("label", { children: [
|
|
3268
3264
|
/* @__PURE__ */ s(
|
|
3269
3265
|
"input",
|
|
@@ -3271,29 +3267,29 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3271
3267
|
type: "radio",
|
|
3272
3268
|
checked: q,
|
|
3273
3269
|
onChange: () => {
|
|
3274
|
-
c ? q ?
|
|
3275
|
-
actualValue:
|
|
3270
|
+
c ? q ? b({
|
|
3271
|
+
actualValue: x,
|
|
3276
3272
|
options: l,
|
|
3277
|
-
onChange:
|
|
3278
|
-
}) :
|
|
3279
|
-
actualValue:
|
|
3273
|
+
onChange: _
|
|
3274
|
+
}) : C({
|
|
3275
|
+
actualValue: x,
|
|
3280
3276
|
options: l,
|
|
3281
|
-
onChange:
|
|
3282
|
-
}) :
|
|
3277
|
+
onChange: _
|
|
3278
|
+
}) : _(P);
|
|
3283
3279
|
},
|
|
3284
3280
|
className: G.radioInput
|
|
3285
3281
|
}
|
|
3286
3282
|
),
|
|
3287
3283
|
/* @__PURE__ */ s("span", { className: "radio-custom" }),
|
|
3288
3284
|
u(D)
|
|
3289
|
-
] }, `inputRadio ${
|
|
3285
|
+
] }, `inputRadio ${O}`);
|
|
3290
3286
|
}
|
|
3291
3287
|
),
|
|
3292
3288
|
/* @__PURE__ */ s(
|
|
3293
3289
|
be,
|
|
3294
3290
|
{
|
|
3295
3291
|
errorMessage: (S = N.error) == null ? void 0 : S.message,
|
|
3296
|
-
errorColor:
|
|
3292
|
+
errorColor: a
|
|
3297
3293
|
}
|
|
3298
3294
|
)
|
|
3299
3295
|
] })
|
|
@@ -3306,15 +3302,15 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3306
3302
|
inputContainerStyles: d,
|
|
3307
3303
|
reactHookFormInstance: i
|
|
3308
3304
|
}) => {
|
|
3309
|
-
const { watch: o } = i, t = o(),
|
|
3310
|
-
const l = typeof
|
|
3305
|
+
const { watch: o } = i, t = o(), r = le(() => n.map((a) => {
|
|
3306
|
+
const l = typeof a.required == "function" ? a.required(t) : a.required;
|
|
3311
3307
|
return {
|
|
3312
|
-
...
|
|
3308
|
+
...a,
|
|
3313
3309
|
required: l
|
|
3314
3310
|
};
|
|
3315
3311
|
}), [n, t]);
|
|
3316
|
-
return /* @__PURE__ */ s("div", { className: ae.inputsContainer, children:
|
|
3317
|
-
const { inputType: c } =
|
|
3312
|
+
return /* @__PURE__ */ s("div", { className: ae.inputsContainer, children: r == null ? void 0 : r.map((a, l) => {
|
|
3313
|
+
const { inputType: c } = a;
|
|
3318
3314
|
switch (c) {
|
|
3319
3315
|
case ge.text:
|
|
3320
3316
|
return /* @__PURE__ */ s(
|
|
@@ -3325,12 +3321,12 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3325
3321
|
children: /* @__PURE__ */ s(
|
|
3326
3322
|
et,
|
|
3327
3323
|
{
|
|
3328
|
-
input:
|
|
3324
|
+
input: a,
|
|
3329
3325
|
reactHookFormInstance: i
|
|
3330
3326
|
}
|
|
3331
3327
|
)
|
|
3332
3328
|
},
|
|
3333
|
-
`${
|
|
3329
|
+
`${a.code}${l}`
|
|
3334
3330
|
);
|
|
3335
3331
|
case ge.password:
|
|
3336
3332
|
return /* @__PURE__ */ s(
|
|
@@ -3341,12 +3337,12 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3341
3337
|
children: /* @__PURE__ */ s(
|
|
3342
3338
|
et,
|
|
3343
3339
|
{
|
|
3344
|
-
input:
|
|
3340
|
+
input: a,
|
|
3345
3341
|
reactHookFormInstance: i
|
|
3346
3342
|
}
|
|
3347
3343
|
)
|
|
3348
3344
|
},
|
|
3349
|
-
`${
|
|
3345
|
+
`${a.code}${l}`
|
|
3350
3346
|
);
|
|
3351
3347
|
case ge.select:
|
|
3352
3348
|
return /* @__PURE__ */ s(
|
|
@@ -3357,12 +3353,12 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3357
3353
|
children: /* @__PURE__ */ s(
|
|
3358
3354
|
v1,
|
|
3359
3355
|
{
|
|
3360
|
-
input:
|
|
3356
|
+
input: a,
|
|
3361
3357
|
reactHookFormInstance: i
|
|
3362
3358
|
}
|
|
3363
3359
|
)
|
|
3364
3360
|
},
|
|
3365
|
-
`${
|
|
3361
|
+
`${a.code}${l}`
|
|
3366
3362
|
);
|
|
3367
3363
|
case ge.radioList:
|
|
3368
3364
|
return /* @__PURE__ */ s(
|
|
@@ -3373,15 +3369,15 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3373
3369
|
children: /* @__PURE__ */ s(
|
|
3374
3370
|
D1,
|
|
3375
3371
|
{
|
|
3376
|
-
input:
|
|
3372
|
+
input: a,
|
|
3377
3373
|
reactHookFormInstance: i
|
|
3378
3374
|
}
|
|
3379
3375
|
)
|
|
3380
3376
|
},
|
|
3381
|
-
`${
|
|
3377
|
+
`${a.code}${l}`
|
|
3382
3378
|
);
|
|
3383
3379
|
default:
|
|
3384
|
-
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("h4", { children: "Default" }) }, `${
|
|
3380
|
+
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("h4", { children: "Default" }) }, `${a.code}${l}`);
|
|
3385
3381
|
}
|
|
3386
3382
|
}) });
|
|
3387
3383
|
}, yi = ({
|
|
@@ -3393,8 +3389,8 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3393
3389
|
CategoryComponent: i,
|
|
3394
3390
|
inputContainerStyles: o,
|
|
3395
3391
|
generalError: t,
|
|
3396
|
-
errorColor:
|
|
3397
|
-
submitButtonLabel:
|
|
3392
|
+
errorColor: r = "red",
|
|
3393
|
+
submitButtonLabel: a = "Submit",
|
|
3398
3394
|
submitButtonStyles: l = { width: 325 },
|
|
3399
3395
|
activeCategory: c = null,
|
|
3400
3396
|
// If provided, only the category with this categoryId will be displayed.
|
|
@@ -3402,37 +3398,37 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3402
3398
|
}) => {
|
|
3403
3399
|
const {
|
|
3404
3400
|
handleSubmit: m,
|
|
3405
|
-
control:
|
|
3406
|
-
formState: { errors:
|
|
3407
|
-
} = n, { t:
|
|
3401
|
+
control: g,
|
|
3402
|
+
formState: { errors: y }
|
|
3403
|
+
} = n, { t: b } = k();
|
|
3408
3404
|
return (
|
|
3409
3405
|
/* "handleSubmit" will validate your inputs before invoking "onSubmit" */
|
|
3410
3406
|
/* @__PURE__ */ p("form", { className: Se.formContainer, onSubmit: m(u), children: [
|
|
3411
|
-
/* @__PURE__ */ s("div", { className: Se.formObjectContainer, children: d && d.map((
|
|
3412
|
-
const { inputs:
|
|
3413
|
-
return
|
|
3407
|
+
/* @__PURE__ */ s("div", { className: Se.formObjectContainer, children: d && d.map((C, f) => {
|
|
3408
|
+
const { inputs: h } = C;
|
|
3409
|
+
return C.category ? i ? /* @__PURE__ */ s(
|
|
3414
3410
|
"div",
|
|
3415
3411
|
{
|
|
3416
3412
|
style: {
|
|
3417
|
-
display: c &&
|
|
3413
|
+
display: c && C.categoryId !== c ? "none" : "inherit",
|
|
3418
3414
|
width: "100%"
|
|
3419
3415
|
},
|
|
3420
3416
|
children: /* @__PURE__ */ s(
|
|
3421
3417
|
i,
|
|
3422
3418
|
{
|
|
3423
|
-
title:
|
|
3419
|
+
title: C.category,
|
|
3424
3420
|
children: /* @__PURE__ */ s(
|
|
3425
3421
|
De,
|
|
3426
3422
|
{
|
|
3427
|
-
inputs:
|
|
3428
|
-
control:
|
|
3423
|
+
inputs: h,
|
|
3424
|
+
control: g,
|
|
3429
3425
|
inputContainerStyles: o,
|
|
3430
|
-
errorColor:
|
|
3426
|
+
errorColor: r,
|
|
3431
3427
|
formInstance: n
|
|
3432
3428
|
}
|
|
3433
3429
|
)
|
|
3434
3430
|
},
|
|
3435
|
-
`${
|
|
3431
|
+
`${C.category}${f}`
|
|
3436
3432
|
)
|
|
3437
3433
|
}
|
|
3438
3434
|
) : /* @__PURE__ */ p(
|
|
@@ -3440,38 +3436,38 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3440
3436
|
{
|
|
3441
3437
|
style: {
|
|
3442
3438
|
width: "100%",
|
|
3443
|
-
display: c &&
|
|
3439
|
+
display: c && C.categoryId !== c ? "none" : "flex",
|
|
3444
3440
|
flexDirection: "column"
|
|
3445
3441
|
},
|
|
3446
3442
|
children: [
|
|
3447
|
-
/* @__PURE__ */ s("h2", { style: { marginBottom: 20 }, children:
|
|
3443
|
+
/* @__PURE__ */ s("h2", { style: { marginBottom: 20 }, children: b(C.category) }),
|
|
3448
3444
|
/* @__PURE__ */ s("div", { style: { paddingTop: 50, width: "100%" }, children: /* @__PURE__ */ s(
|
|
3449
3445
|
De,
|
|
3450
3446
|
{
|
|
3451
|
-
inputs:
|
|
3452
|
-
control:
|
|
3447
|
+
inputs: h,
|
|
3448
|
+
control: g,
|
|
3453
3449
|
inputContainerStyles: o,
|
|
3454
|
-
errorColor:
|
|
3450
|
+
errorColor: r,
|
|
3455
3451
|
reactHookFormInstance: n
|
|
3456
3452
|
}
|
|
3457
3453
|
) })
|
|
3458
3454
|
]
|
|
3459
3455
|
},
|
|
3460
|
-
`${
|
|
3456
|
+
`${C.category}${f}`
|
|
3461
3457
|
) : /* @__PURE__ */ s("div", { style: { width: "100%" }, children: /* @__PURE__ */ s(
|
|
3462
3458
|
De,
|
|
3463
3459
|
{
|
|
3464
3460
|
inputContainerStyles: o,
|
|
3465
|
-
inputs:
|
|
3466
|
-
control:
|
|
3467
|
-
errorColor:
|
|
3461
|
+
inputs: h,
|
|
3462
|
+
control: g,
|
|
3463
|
+
errorColor: r,
|
|
3468
3464
|
reactHookFormInstance: n
|
|
3469
3465
|
}
|
|
3470
|
-
) }, `inputKey${
|
|
3466
|
+
) }, `inputKey${f}`);
|
|
3471
3467
|
}) }),
|
|
3472
3468
|
/* @__PURE__ */ p("div", { className: Se.buttonContainer, children: [
|
|
3473
|
-
/* @__PURE__ */ s(fe, { containerStyles: l, type: "submit", children:
|
|
3474
|
-
/* @__PURE__ */ s(be, { errorMessage: t, errorColor:
|
|
3469
|
+
/* @__PURE__ */ s(fe, { containerStyles: l, type: "submit", children: b(a) }),
|
|
3470
|
+
/* @__PURE__ */ s(be, { errorMessage: t, errorColor: r })
|
|
3475
3471
|
] })
|
|
3476
3472
|
] })
|
|
3477
3473
|
);
|
|
@@ -3490,13 +3486,13 @@ const Ee = (n) => n.render(a1(n)), l1 = "_errorMessage_1xiyb_2", c1 = {
|
|
|
3490
3486
|
message: i,
|
|
3491
3487
|
submessage: o,
|
|
3492
3488
|
buttons: t,
|
|
3493
|
-
maxHeight:
|
|
3494
|
-
maxWidth:
|
|
3489
|
+
maxHeight: r = "450px",
|
|
3490
|
+
maxWidth: a = "450px"
|
|
3495
3491
|
}) => /* @__PURE__ */ s("div", { className: Z.overlay, children: /* @__PURE__ */ p(
|
|
3496
3492
|
"div",
|
|
3497
3493
|
{
|
|
3498
3494
|
className: Z.modal,
|
|
3499
|
-
style: { maxHeight:
|
|
3495
|
+
style: { maxHeight: r, maxWidth: a },
|
|
3500
3496
|
children: [
|
|
3501
3497
|
/* @__PURE__ */ s("button", { className: Z.closeButton, onClick: n, "aria-label": "Close modal", children: "✕" }),
|
|
3502
3498
|
d && /* @__PURE__ */ s("img", { src: d, alt: "icon", className: Z.icon }),
|
|
@@ -3534,8 +3530,8 @@ const R1 = "_header_13kbt_2", q1 = "_leftComponents_13kbt_13", E1 = "_centerComp
|
|
|
3534
3530
|
centerComponents: i = [],
|
|
3535
3531
|
rightComponents: o = [],
|
|
3536
3532
|
zIndex: t = 10,
|
|
3537
|
-
height:
|
|
3538
|
-
backgroundColor:
|
|
3533
|
+
height: r = 60,
|
|
3534
|
+
backgroundColor: a = "#605B56",
|
|
3539
3535
|
isFooter: l = !1
|
|
3540
3536
|
// If true, it will apply footer styles
|
|
3541
3537
|
}) => /* @__PURE__ */ p(
|
|
@@ -3545,8 +3541,8 @@ const R1 = "_header_13kbt_2", q1 = "_leftComponents_13kbt_13", E1 = "_centerComp
|
|
|
3545
3541
|
style: {
|
|
3546
3542
|
...n,
|
|
3547
3543
|
zIndex: t,
|
|
3548
|
-
height:
|
|
3549
|
-
backgroundColor:
|
|
3544
|
+
height: r,
|
|
3545
|
+
backgroundColor: a,
|
|
3550
3546
|
top: l ? "auto" : 0,
|
|
3551
3547
|
bottom: l ? 0 : "auto"
|
|
3552
3548
|
},
|
|
@@ -3611,7 +3607,7 @@ export {
|
|
|
3611
3607
|
X2 as Graphic,
|
|
3612
3608
|
z1 as HeaderSection,
|
|
3613
3609
|
C0 as IndicatorsList,
|
|
3614
|
-
|
|
3610
|
+
w0 as LangSelector,
|
|
3615
3611
|
R0 as Legend,
|
|
3616
3612
|
Pn as ListSelector,
|
|
3617
3613
|
fn as LogInButton,
|