@trackunit/filters-graphql-hook 2.1.71 → 2.1.75

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.
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "generators": {}
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/filters-graphql-hook",
3
- "version": "2.1.71",
3
+ "version": "2.1.75",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -10,14 +10,14 @@
10
10
  "@graphql-codegen/cli": "^5.0.3",
11
11
  "@graphql-typed-document-node/core": "^3.2.0",
12
12
  "zod": "^3.25.76",
13
- "@trackunit/iris-app-build-utilities": "2.0.47",
14
- "@trackunit/filters-filter-bar": "2.1.55",
15
- "@trackunit/shared-utils": "1.15.52",
16
- "@trackunit/iris-app-api": "2.0.44",
17
- "@trackunit/react-core-contexts-test": "1.17.57",
18
- "@trackunit/i18n-library-translation": "2.0.52",
19
- "@trackunit/iris-app-runtime-core-api": "1.16.57",
20
- "@trackunit/react-core-hooks": "1.17.63"
13
+ "@trackunit/iris-app-build-utilities": "2.0.50",
14
+ "@trackunit/filters-filter-bar": "2.1.58",
15
+ "@trackunit/shared-utils": "1.15.55",
16
+ "@trackunit/iris-app-api": "2.0.46",
17
+ "@trackunit/react-core-contexts-test": "1.17.60",
18
+ "@trackunit/i18n-library-translation": "2.0.55",
19
+ "@trackunit/iris-app-runtime-core-api": "1.16.60",
20
+ "@trackunit/react-core-hooks": "1.17.66"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@apollo/client": "^3.13.8",
@@ -26,6 +26,7 @@
26
26
  "react": "^19.0.0",
27
27
  "react-hook-form": "^7.62.0"
28
28
  },
29
+ "migrations": "./migrations.json",
29
30
  "module": "./index.esm.js",
30
31
  "main": "./index.cjs.js",
31
32
  "types": "./index.d.ts"
@@ -445,6 +445,18 @@ export declare const fleetDataHealthIssueType: {
445
445
  readonly UNUSUAL_OPERATING_HOURS: "UNUSUAL_OPERATING_HOURS";
446
446
  };
447
447
  export type FleetDataHealthIssueType = (typeof fleetDataHealthIssueType)[keyof typeof fleetDataHealthIssueType];
448
+ export declare const geometryFilterType: {
449
+ readonly MultiPolygon: "MultiPolygon";
450
+ readonly Polygon: "Polygon";
451
+ };
452
+ export type GeometryFilterType = (typeof geometryFilterType)[keyof typeof geometryFilterType];
453
+ export declare const geometryRelation: {
454
+ readonly CONTAINS: "CONTAINS";
455
+ readonly DISJOINT: "DISJOINT";
456
+ readonly INTERSECTS: "INTERSECTS";
457
+ readonly WITHIN: "WITHIN";
458
+ };
459
+ export type GeometryRelation = (typeof geometryRelation)[keyof typeof geometryRelation];
448
460
  export declare const metadataCompleteness: {
449
461
  readonly COMPLETE: "COMPLETE";
450
462
  readonly PARTIAL: "PARTIAL";
@@ -504,9 +516,9 @@ export type AggregatedNumberRange = {
504
516
  range: NumberRange;
505
517
  };
506
518
  export type AreaInput = {
507
- /** The coordinates of the GeoJSON geometry see [the GeoJSON RFC](https://www.rfc-editor.org/rfc/rfc7946.html#section-3.1) for details. */
519
+ /** Coordinates per RFC 7946 ring structure. Rings must be closed; longitude [-180, 180], latitude [-90, 90]. */
508
520
  coordinates: Array<Scalars["GeoJSONCoordinates"]["input"]>;
509
- /** The type of the GeoJSON object. */
521
+ /** The geometry type: Polygon or MultiPolygon. */
510
522
  type: AreaFilterGeoJsonGeometryType;
511
523
  };
512
524
  export type AssetFiltersInput = {
@@ -516,7 +528,10 @@ export type AssetFiltersInput = {
516
528
  activeFilter?: InputMaybe<Scalars["Boolean"]["input"]>;
517
529
  /** List of activities */
518
530
  activities?: InputMaybe<Array<AssetActivityState>>;
519
- /** Filter by area */
531
+ /**
532
+ * Filter by area
533
+ * @deprecated Use geometry instead
534
+ */
520
535
  area?: InputMaybe<AreaInput>;
521
536
  /** A list of asset ID's to do a bulk lookup for. */
522
537
  assetIds?: InputMaybe<Array<Scalars["ID"]["input"]>>;
@@ -524,12 +539,12 @@ export type AssetFiltersInput = {
524
539
  assetTypes?: InputMaybe<Array<AssetType>>;
525
540
  /**
526
541
  * Filter by bounding box
527
- * @deprecated Use area filter instead
542
+ * @deprecated Use geometry filter instead
528
543
  */
529
544
  boundingBox?: InputMaybe<BoundingBoxInput>;
530
545
  /**
531
546
  * Filter by bounding shape
532
- * @deprecated Use area filter instead
547
+ * @deprecated Use geometry filter instead
533
548
  */
534
549
  boundingShape?: InputMaybe<BoundingShapeInput>;
535
550
  /** Filter to only include this list of brands */
@@ -572,6 +587,15 @@ export type AssetFiltersInput = {
572
587
  fleetHealthTypes?: InputMaybe<Array<FleetDataHealthIssueType>>;
573
588
  /** Filter by if the asset is followed */
574
589
  followed?: InputMaybe<Scalars["Boolean"]["input"]>;
590
+ /**
591
+ * Filter assets by geographic area using a Polygon or MultiPolygon (RFC 7946).
592
+ * Holes (interior rings) are supported. Axis-aligned polygons that cross the antimeridian (±180°)
593
+ * are auto-split — no need to pre-split into a MultiPolygon for rectangular viewport queries.
594
+ * For irregular dateline crossings, pre-split manually into a MultiPolygon.
595
+ * Optional relation controls the spatial match (defaults to INTERSECTS).
596
+ * See GeometryFilterInput for the full coordinate contract and unsupported geometry types.
597
+ */
598
+ geometry?: InputMaybe<GeometryFilterInput>;
575
599
  /** Filter by groups */
576
600
  groups?: InputMaybe<Array<Scalars["String"]["input"]>>;
577
601
  /** Filter by insights on the asset. */
@@ -727,6 +751,22 @@ export type DateTimeRange = {
727
751
  /** End date */
728
752
  to?: InputMaybe<Scalars["DateTime"]["input"]>;
729
753
  };
754
+ export type GeometryFilterInput = {
755
+ /**
756
+ * Coordinates following RFC 7946:
757
+ * - Polygon: [ outerRing, holeRing* ] where each ring = [ [lng, lat], ... ]
758
+ * - MultiPolygon: [ [outerRing, holeRing*], [outerRing, holeRing*], ... ]
759
+ */
760
+ coordinates: Array<Scalars["GeoJSONCoordinates"]["input"]>;
761
+ /**
762
+ * Spatial relation between asset location and filter geometry. Defaults to INTERSECTS.
763
+ * Wired through to Elasticsearch geo_shape queries (INTERSECTS, DISJOINT, WITHIN, CONTAINS).
764
+ * Legacy area / boundingShape paths keep INTERSECTS behaviour.
765
+ */
766
+ relation?: InputMaybe<GeometryRelation>;
767
+ /** The geometry type: Polygon or MultiPolygon. */
768
+ type: GeometryFilterType;
769
+ };
730
770
  export type InsightsFilters = {
731
771
  /** The asset's after treatment diesel exhaust fluid tank level */
732
772
  afterTreatmentDieselExhaustFluidTankLevel?: InputMaybe<NumberRange>;