@datatechsolutions/ui 2.9.9 → 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,17 +12319,18 @@ function GeoMapCanvasInner({
12319
12319
  const isDimmed = hasAnyActiveFilter && !isActive && hasItems;
12320
12320
  let pathData = pathGenerator(feature);
12321
12321
  if (pathData && projectionType === "albersUsa") {
12322
- while (pathData) {
12323
- const firstZ = pathData.indexOf("Z");
12324
- if (firstZ < 0 || firstZ > 200) break;
12325
- const sub = pathData.slice(0, firstZ);
12322
+ const subpaths = pathData.split("Z").filter(Boolean);
12323
+ const cleaned = subpaths.filter((sub) => {
12326
12324
  const lCount = (sub.match(/L/g) || []).length;
12327
- if (lCount <= 4) {
12328
- pathData = pathData.slice(firstZ + 1) || null;
12329
- } else {
12330
- break;
12331
- }
12332
- }
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;
12333
12334
  }
12334
12335
  if (!pathData) return null;
12335
12336
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -23901,5 +23902,5 @@ exports.useGeoMapState = useGeoMapState;
23901
23902
  exports.useNotifications = useNotifications;
23902
23903
  exports.usePlatformShellStore = usePlatformShellStore;
23903
23904
  exports.usePullToRefresh = usePullToRefresh;
23904
- //# sourceMappingURL=chunk-G5MMZVTM.js.map
23905
- //# sourceMappingURL=chunk-G5MMZVTM.js.map
23905
+ //# sourceMappingURL=chunk-AFEELRUB.js.map
23906
+ //# sourceMappingURL=chunk-AFEELRUB.js.map