@datawheel/data-explorer 0.3.18 → 0.3.20
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/main.mjs +7 -8
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -889,11 +889,16 @@ function filterSerialize(item) {
|
|
|
889
889
|
);
|
|
890
890
|
return `${item.measure}.${conditions.join(`.${item.joint}.`)}`;
|
|
891
891
|
}
|
|
892
|
+
function filterParseCondition(value) {
|
|
893
|
+
const index = value.indexOf(".");
|
|
894
|
+
const number = value.slice(index + 1);
|
|
895
|
+
return [Comparison[value.slice(0, index)], number, Number(number)];
|
|
896
|
+
}
|
|
892
897
|
function filterParse(item) {
|
|
893
898
|
const indexName = item.indexOf(".");
|
|
894
899
|
const condition = item.slice(indexName + 1);
|
|
895
900
|
const joint = condition.includes(".and.") ? "and" : "or";
|
|
896
|
-
const [cond1, cond2] = condition.split(joint);
|
|
901
|
+
const [cond1, cond2] = condition.split(`.${joint}.`);
|
|
897
902
|
return {
|
|
898
903
|
key: Math.random().toString(16).slice(2),
|
|
899
904
|
active: true,
|
|
@@ -903,11 +908,6 @@ function filterParse(item) {
|
|
|
903
908
|
conditionTwo: cond2 ? filterParseCondition(cond2) : void 0
|
|
904
909
|
};
|
|
905
910
|
}
|
|
906
|
-
function filterParseCondition(value) {
|
|
907
|
-
const index = value.indexOf(".");
|
|
908
|
-
const number = value.slice(index + 1);
|
|
909
|
-
return [Comparison[value.slice(0, index)], number, Number(number)];
|
|
910
|
-
}
|
|
911
911
|
|
|
912
912
|
// src/state/queries.ts
|
|
913
913
|
init_esm_shims();
|
|
@@ -2408,7 +2408,6 @@ function useFormatter() {
|
|
|
2408
2408
|
const { formatters } = useSettings();
|
|
2409
2409
|
const [formatMap, setFormatMap] = useState({});
|
|
2410
2410
|
const formatterMap = useRef(formatters);
|
|
2411
|
-
console.log(formatterMap, "formatMap");
|
|
2412
2411
|
return useMemo(() => {
|
|
2413
2412
|
return {
|
|
2414
2413
|
currentFormats: formatMap,
|
|
@@ -7779,7 +7778,7 @@ function VizbuilderView(props) {
|
|
|
7779
7778
|
data: ((_a = query.data) == null ? void 0 : _a.data) || [],
|
|
7780
7779
|
locale: params.locale || "en"
|
|
7781
7780
|
};
|
|
7782
|
-
}, [cube, result, params.locale]);
|
|
7781
|
+
}, [cube, result, params.locale, query]);
|
|
7783
7782
|
return !query.isLoading && /* @__PURE__ */ React19__default.createElement(
|
|
7784
7783
|
Vizbuilder,
|
|
7785
7784
|
{
|