@datawheel/data-explorer 0.3.18 → 0.3.19

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.
Files changed (2) hide show
  1. package/dist/main.mjs +7 -7
  2. package/package.json +1 -1
package/dist/main.mjs CHANGED
@@ -860,6 +860,7 @@ function requestToQueryParams(cube, search) {
860
860
  return buildMeasure(measureOlap ? { ...measureOlap, active: true } : { name: name4, active: true });
861
861
  });
862
862
  const filters = getList(search, "filters", ",").map(filterParse);
863
+ console.log(filters, "ACA");
863
864
  const [limit = "0", offset = "0"] = (search.get("limit") || "0").split(",");
864
865
  const [sortKey, sortDir] = (search.get("sort") || "").split(".");
865
866
  return {
@@ -889,11 +890,16 @@ function filterSerialize(item) {
889
890
  );
890
891
  return `${item.measure}.${conditions.join(`.${item.joint}.`)}`;
891
892
  }
893
+ function filterParseCondition(value) {
894
+ const index = value.indexOf(".");
895
+ const number = value.slice(index + 1);
896
+ return [Comparison[value.slice(0, index)], number, Number(number)];
897
+ }
892
898
  function filterParse(item) {
893
899
  const indexName = item.indexOf(".");
894
900
  const condition = item.slice(indexName + 1);
895
901
  const joint = condition.includes(".and.") ? "and" : "or";
896
- const [cond1, cond2] = condition.split(joint);
902
+ const [cond1, cond2] = condition.split(`.${joint}.`);
897
903
  return {
898
904
  key: Math.random().toString(16).slice(2),
899
905
  active: true,
@@ -903,11 +909,6 @@ function filterParse(item) {
903
909
  conditionTwo: cond2 ? filterParseCondition(cond2) : void 0
904
910
  };
905
911
  }
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
912
 
912
913
  // src/state/queries.ts
913
914
  init_esm_shims();
@@ -2408,7 +2409,6 @@ function useFormatter() {
2408
2409
  const { formatters } = useSettings();
2409
2410
  const [formatMap, setFormatMap] = useState({});
2410
2411
  const formatterMap = useRef(formatters);
2411
- console.log(formatterMap, "formatMap");
2412
2412
  return useMemo(() => {
2413
2413
  return {
2414
2414
  currentFormats: formatMap,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datawheel/data-explorer",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "main": "./dist/main.mjs",
5
5
  "types": "./dist/main.d.mts",
6
6
  "files": [