@overmap-ai/core 1.0.65-mapbox.1 → 1.0.65-strip-workspace-access.1

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.
@@ -7,7 +7,7 @@ import type { BaseSDK } from "../base";
7
7
  * TODO: Support editing and deleting categories
8
8
  */
9
9
  export declare abstract class CategoryService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
10
- add(category: Omit<Payload<Category>, "workspace">, workspaceId: string): OptimisticModelResult<Category>;
10
+ add(payload: Omit<Payload<Category>, "workspace">, workspaceId: string): OptimisticModelResult<Category>;
11
11
  update(category: Offline<Partial<Category>>, workspaceId: string): OptimisticModelResult<Category>;
12
12
  remove(category: Category, workspaceId: string): Promise<undefined>;
13
13
  refreshStore(projectId: number): Promise<undefined>;
@@ -15,8 +15,6 @@ export declare abstract class FormService<TState extends OvermapRootState, TSDK
15
15
  Promise<Created<FormRevision>>,
16
16
  Promise<Created<FormRevisionAttachment>[]>
17
17
  ]>;
18
- favorite(formId: string, projectId: number): Promise<undefined>;
19
- unfavorite(formId: string, projectId: number): Promise<undefined>;
20
18
  delete(formId: string): Promise<undefined>;
21
19
  refreshStore(projectId: number): Promise<void>;
22
20
  }
@@ -5,7 +5,7 @@ import { OvermapRootState } from "../../typings";
5
5
  import { BaseApiService } from "./BaseApiService";
6
6
  import type { BaseSDK } from "../base";
7
7
  export declare abstract class WorkspaceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
8
- add(workspace: Payload<Workspace>): OptimisticModelResult<Workspace>;
8
+ add(payload: Payload<Workspace>): OptimisticModelResult<Workspace>;
9
9
  update(workspace: Workspace): OptimisticModelResult<Workspace>;
10
10
  delete(workspaceId: string): Promise<undefined>;
11
11
  refreshStore(projectId: number): Promise<undefined>;
@@ -34,8 +34,6 @@ export declare const formSlice: import("@reduxjs/toolkit").Slice<FormState, {
34
34
  export declare const initializeForms: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Form>[], "forms/initializeForms">, setForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Form>, "forms/setForm">, addForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Form>, "forms/addForm">, addForms: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Form>[], "forms/addForms">, updateForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Form>, "forms/updateForm">, deleteForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "forms/deleteForm">;
35
35
  export declare const formReducer: Reducer<FormState>;
36
36
  export type FormSearchArgs = SearchArgs<{
37
- /** `undefined` means don't filter by favorite. `boolean` filters forms. */
38
- favorites?: boolean;
39
37
  /** organization owner */
40
38
  organization?: number;
41
39
  }>;
@@ -44,5 +44,5 @@ export interface ColorModel {
44
44
  color: CSSColor;
45
45
  }
46
46
  export interface CreatedByModel {
47
- created_by: User["id"];
47
+ created_by?: User["id"] | null;
48
48
  }
@@ -1,6 +1,6 @@
1
- import { OfflineModel } from "./base";
1
+ import { CreatedByModel, OfflineModel, SubmittedAtModel, TimestampedModel } from "./base";
2
2
  import { CSSColor } from "../colors";
3
- export interface Category extends OfflineModel {
3
+ export interface Category extends OfflineModel, SubmittedAtModel, TimestampedModel, CreatedByModel {
4
4
  name: string;
5
5
  description?: string;
6
6
  color: CSSColor;
@@ -87,7 +87,6 @@ export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier =
87
87
  type: TIdentifier;
88
88
  }
89
89
  export interface Form extends OfflineModel, SubmittedAtModel {
90
- favorite: boolean;
91
90
  created_by: number;
92
91
  asset_type?: string;
93
92
  issue_type?: string;
@@ -1,8 +1,8 @@
1
- export type Position = [number, number];
2
- export type Bounds = [Position, Position];
1
+ export type Coordinates = [number, number];
2
+ export type Bounds = [Coordinates, Coordinates];
3
3
  export interface PointGeometry {
4
4
  type: "Point";
5
- coordinates: Position;
5
+ coordinates: Coordinates;
6
6
  }
7
7
  export interface MultiPointGeometry {
8
8
  type: "MultiPoint";
@@ -34,7 +34,6 @@ export interface Issue extends Pick<WorkspaceIndexedModel, "index_workspace">, M
34
34
  assigned_to?: number | null;
35
35
  due_date?: string | Date | null;
36
36
  category?: string | null;
37
- visible_in_workspaces: string[];
38
37
  issue_type?: string | null;
39
38
  }
40
39
  /**
@@ -1,5 +1,5 @@
1
- import { Model, OfflineModel } from "./base";
2
- export interface Workspace extends OfflineModel {
1
+ import { CreatedByModel, Model, OfflineModel, SubmittedAtModel, TimestampedModel } from "./base";
2
+ export interface Workspace extends OfflineModel, TimestampedModel, SubmittedAtModel, CreatedByModel {
3
3
  name: string;
4
4
  project: number;
5
5
  abbreviation: string | null;
@@ -7,5 +7,5 @@ export interface Workspace extends OfflineModel {
7
7
  }
8
8
  export interface WorkspaceIndexedModel extends Model {
9
9
  index: number | null;
10
- index_workspace: string | null;
10
+ index_workspace: string;
11
11
  }
@@ -1,4 +1,18 @@
1
- import type { Bounds, MultiPointGeometry, PointGeometry, Position } from "../typings";
2
- export declare const createPointGeometry: (position: Position) => PointGeometry;
3
- export declare const createMultiPointGeometry: (coordinates: Bounds) => MultiPointGeometry;
4
- export declare const coordinatesAreEqual: (a: Position, b: Position) => boolean;
1
+ import L from "leaflet";
2
+ import { Bounds, Coordinates, MultiPointGeometry, PointGeometry } from "../typings";
3
+ export declare const coordinatesToLiteral: (coordinates: Coordinates) => L.LatLngLiteral;
4
+ export declare const literalToCoordinates: (literal: L.LatLngLiteral) => Coordinates;
5
+ /**
6
+ * Flip coordinates from [lng, lat] to [lat, lng]
7
+ */
8
+ export declare const flipCoordinates: (coordinates: L.LatLngTuple) => Coordinates;
9
+ export declare const flipBounds: (bounds: Bounds) => Bounds;
10
+ export declare function offsetPositionByMeters(originalPosition: L.LatLng, latMeters: number, lngMeters: number): L.LatLngLiteral;
11
+ export declare const createPointGeometry: (coordinates: Coordinates) => PointGeometry;
12
+ export declare const coordinatesAreEqual: (a: Coordinates, b: Coordinates) => boolean;
13
+ export declare const coordinatesToText: (coordinates: Coordinates | null | undefined, decimalPlaces?: number) => string;
14
+ export declare const coordinatesToUrlText: (coordinates: Coordinates) => string;
15
+ export declare const openCoordsInGoogleMaps: (coordinates: Coordinates) => void;
16
+ export declare const openDirectionsInGoogleMaps: (startingPoint: Coordinates, destination: Coordinates) => void;
17
+ export declare const worldBounds: MultiPointGeometry;
18
+ export declare const createMultiPointGeometry: (coordinates: [Coordinates, Coordinates]) => MultiPointGeometry;
@@ -1,7 +1,13 @@
1
- import type { IssueAttachment, OfflineModel, OvermapRootState } from "../typings";
1
+ import { Coordinates, IssueAttachment, OfflineModel, OvermapRootState } from "../typings";
2
2
  type MemoizedSelectorWithArgs<TArgs, TRet> = (state: OvermapRootState, args: TArgs) => TRet;
3
3
  export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: OvermapRootState) => TRet;
4
4
  export declare function onlyUniqueOfflineIds(value: OfflineModel, index: number, self: OfflineModel[]): boolean;
5
5
  export declare function onlyUniqueHashes(value: IssueAttachment, index: number, self: IssueAttachment[]): boolean;
6
+ /**
7
+ *
8
+ * @param bounds order: [northEast, southWest]
9
+ * @param coordinates
10
+ */
11
+ export declare function boundsContainPoint(bounds: [Coordinates, Coordinates], coordinates: Coordinates): boolean;
6
12
  export declare const emailRegex: RegExp;
7
13
  export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core functionality for Overmap",
4
4
  "author": "Wôrdn Inc.",
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.65-mapbox.1",
6
+ "version": "1.0.65-strip-workspace-access.1",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -22,12 +22,16 @@
22
22
  "@radix-ui/colors": "^3.0.0",
23
23
  "@redux-offline/redux-offline": "^2.6.0",
24
24
  "@reduxjs/toolkit": "^1.9.5",
25
+ "@types/file-saver": "^2.0.7",
25
26
  "color": "^4.2.3",
26
27
  "dependency-graph": "^1.0.0",
27
28
  "file-saver": "^2.0.5",
28
29
  "idb": "^7.1.1",
29
30
  "jwt-decode": "^3.1.2",
31
+ "leaflet-draw": "^1.0.4",
32
+ "leaflet.markercluster": "^1.5.3",
30
33
  "localforage": "^1.10.0",
34
+ "react-leaflet": "^4.2.1",
31
35
  "redux-persist-migrate": "^5.0.0",
32
36
  "superagent": "^8.1.2",
33
37
  "uuid": "^9.0.0"
@@ -50,7 +54,6 @@
50
54
  "@types/react-redux": "^7.1.26",
51
55
  "@types/superagent": "^4.1.18",
52
56
  "@types/uuid": "^9.0.3",
53
- "@types/file-saver": "^2.0.7",
54
57
  "@typescript-eslint/eslint-plugin": "^6.4.1",
55
58
  "@typescript-eslint/parser": "^6.4.1",
56
59
  "@vitejs/plugin-react-swc": "^3.3.2",