@datatechsolutions/ui 2.9.8 → 2.10.0

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.
@@ -12319,10 +12319,18 @@ function GeoMapCanvasInner({
12319
12319
  const isDimmed = hasAnyActiveFilter && !isActive && hasItems;
12320
12320
  let pathData = pathGenerator(feature);
12321
12321
  if (pathData && projectionType === "albersUsa") {
12322
- const firstZ = pathData.indexOf("Z");
12323
- if (firstZ > 0 && firstZ < 200) {
12324
- pathData = pathData.slice(firstZ + 1) || null;
12325
- }
12322
+ const subpaths = pathData.split("Z").filter(Boolean);
12323
+ const cleaned = subpaths.filter((sub) => {
12324
+ const lCount = (sub.match(/L/g) || []).length;
12325
+ if (lCount !== 3) return true;
12326
+ const nums = sub.match(/-?\d+\.?\d*/g)?.map(Number);
12327
+ if (!nums || nums.length !== 8) return true;
12328
+ const [x1, y1, x2, y2, x3, y3, x4, y4] = nums;
12329
+ const xs = /* @__PURE__ */ new Set([x1, x2, x3, x4]);
12330
+ const ys = /* @__PURE__ */ new Set([y1, y2, y3, y4]);
12331
+ return xs.size !== 2 || ys.size !== 2;
12332
+ });
12333
+ pathData = cleaned.length > 0 ? cleaned.join("Z") + "Z" : null;
12326
12334
  }
12327
12335
  if (!pathData) return null;
12328
12336
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -23894,5 +23902,5 @@ exports.useGeoMapState = useGeoMapState;
23894
23902
  exports.useNotifications = useNotifications;
23895
23903
  exports.usePlatformShellStore = usePlatformShellStore;
23896
23904
  exports.usePullToRefresh = usePullToRefresh;
23897
- //# sourceMappingURL=chunk-4OTIBU7Y.js.map
23898
- //# sourceMappingURL=chunk-4OTIBU7Y.js.map
23905
+ //# sourceMappingURL=chunk-AFEELRUB.js.map
23906
+ //# sourceMappingURL=chunk-AFEELRUB.js.map