@overmap-ai/core 1.0.60-forms-removal.9 → 1.0.60-forms-refactor-1.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.
- package/dist/overmap-core.js +449 -469
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +449 -469
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +8 -4
- package/dist/sdk/services/BaseUploadService.d.ts +8 -0
- package/dist/sdk/services/FormService.d.ts +18 -0
- package/dist/sdk/services/FormSubmissionService.d.ts +24 -0
- package/dist/sdk/services/GeoImageService.d.ts +11 -0
- package/dist/sdk/services/IssueService.d.ts +1 -1
- package/dist/sdk/services/index.d.ts +3 -2
- package/dist/sdk/typings.d.ts +3 -2
- package/dist/store/slices/assetTypeSlice.d.ts +2 -8
- package/dist/store/slices/categorySlice.d.ts +11 -25
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +20 -20
- package/dist/store/slices/formRevisionSlice.d.ts +21 -21
- package/dist/store/slices/formSlice.d.ts +19 -19
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +20 -20
- package/dist/store/slices/formSubmissionSlice.d.ts +26 -26
- package/dist/store/slices/geoImageSlice.d.ts +48 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueSlice.d.ts +2 -12
- package/dist/store/slices/organizationSlice.d.ts +6 -17
- package/dist/store/slices/projectFileSlice.d.ts +4 -15
- package/dist/store/slices/projectSlice.d.ts +1 -4
- package/dist/store/slices/workspaceSlice.d.ts +5 -10
- package/dist/store/store.d.ts +2 -1
- package/dist/typings/models/assets.d.ts +1 -1
- package/dist/typings/models/forms.d.ts +11 -11
- package/dist/typings/models/geo.d.ts +2 -1
- package/dist/typings/models/geoImages.d.ts +14 -0
- package/dist/typings/models/index.d.ts +1 -0
- package/dist/typings/models/issues.d.ts +3 -3
- package/dist/typings/models/store.d.ts +2 -2
- package/dist/utils/coordinates.d.ts +2 -1
- package/dist/utils/forms.d.ts +2 -2
- package/package.json +1 -1
- package/dist/sdk/services/UserFormService.d.ts +0 -18
- package/dist/sdk/services/UserFormSubmissionService.d.ts +0 -25
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { OvermapSelector, OvermapSelectorWithArgs, Stored,
|
|
2
|
+
import { OvermapSelector, OvermapSelectorWithArgs, Stored, FormSubmission } from "../../typings";
|
|
3
3
|
import { ModelState } from "../typings";
|
|
4
|
-
export type FormSubmissionState = ModelState<Stored<
|
|
4
|
+
export type FormSubmissionState = ModelState<Stored<FormSubmission>>;
|
|
5
5
|
export declare const formSubmissionSlice: import("@reduxjs/toolkit").Slice<FormSubmissionState, {
|
|
6
|
-
setFormSubmission: <TState extends ModelState<Stored<
|
|
7
|
-
payload: Stored<
|
|
6
|
+
setFormSubmission: <TState extends ModelState<Stored<FormSubmission>>>(state: TState, action: {
|
|
7
|
+
payload: Stored<FormSubmission>;
|
|
8
8
|
type: string;
|
|
9
9
|
}) => void;
|
|
10
|
-
setFormSubmissions: <TState_1 extends ModelState<Stored<
|
|
11
|
-
payload: Stored<
|
|
10
|
+
setFormSubmissions: <TState_1 extends ModelState<Stored<FormSubmission>>>(state: TState_1, action: {
|
|
11
|
+
payload: Stored<FormSubmission>[];
|
|
12
12
|
type: string;
|
|
13
13
|
}) => void;
|
|
14
|
-
addFormSubmission: <TState_2 extends ModelState<Stored<
|
|
15
|
-
payload: Stored<
|
|
14
|
+
addFormSubmission: <TState_2 extends ModelState<Stored<FormSubmission>>>(state: TState_2, action: {
|
|
15
|
+
payload: Stored<FormSubmission>;
|
|
16
16
|
type: string;
|
|
17
17
|
}) => void;
|
|
18
|
-
addFormSubmissions: <TState_3 extends ModelState<Stored<
|
|
19
|
-
payload: Stored<
|
|
18
|
+
addFormSubmissions: <TState_3 extends ModelState<Stored<FormSubmission>>>(state: TState_3, action: {
|
|
19
|
+
payload: Stored<FormSubmission>[];
|
|
20
20
|
type: string;
|
|
21
21
|
}) => void;
|
|
22
|
-
updateFormSubmission: <TState_4 extends ModelState<Stored<
|
|
23
|
-
payload: Stored<
|
|
22
|
+
updateFormSubmission: <TState_4 extends ModelState<Stored<FormSubmission>>>(state: TState_4, action: {
|
|
23
|
+
payload: Stored<FormSubmission>;
|
|
24
24
|
type: string;
|
|
25
25
|
}) => void;
|
|
26
|
-
updateFormSubmissions: <TState_5 extends ModelState<Stored<
|
|
27
|
-
payload: Stored<
|
|
26
|
+
updateFormSubmissions: <TState_5 extends ModelState<Stored<FormSubmission>>>(state: TState_5, action: {
|
|
27
|
+
payload: Stored<FormSubmission>[];
|
|
28
28
|
type: string;
|
|
29
29
|
}) => void;
|
|
30
|
-
deleteFormSubmission: <TState_6 extends ModelState<Stored<
|
|
30
|
+
deleteFormSubmission: <TState_6 extends ModelState<Stored<FormSubmission>>>(state: TState_6, action: {
|
|
31
31
|
payload: string;
|
|
32
32
|
type: string;
|
|
33
33
|
}) => void;
|
|
34
|
-
deleteFormSubmissions: <TState_7 extends ModelState<Stored<
|
|
34
|
+
deleteFormSubmissions: <TState_7 extends ModelState<Stored<FormSubmission>>>(state: TState_7, action: {
|
|
35
35
|
payload: string[];
|
|
36
36
|
type: string;
|
|
37
37
|
}) => void;
|
|
38
38
|
}, "formSubmissions">;
|
|
39
|
-
export declare const setFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<
|
|
39
|
+
export declare const setFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmission>, "formSubmissions/setFormSubmission">, setFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmission>[], "formSubmissions/setFormSubmissions">, addFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmission>, "formSubmissions/addFormSubmission">, addFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmission>[], "formSubmissions/addFormSubmissions">, updateFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmission>, "formSubmissions/updateFormSubmission">, updateFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmission>[], "formSubmissions/updateFormSubmissions">, deleteFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formSubmissions/deleteFormSubmission">, deleteFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formSubmissions/deleteFormSubmissions">;
|
|
40
40
|
export declare const selectFormSubmissionsMapping: OvermapSelector<FormSubmissionState["instances"]>;
|
|
41
|
-
export declare const selectFormSubmissions: OvermapSelector<Stored<
|
|
42
|
-
export declare const selectFormSubmission: OvermapSelectorWithArgs<string, Stored<
|
|
43
|
-
export declare const selectFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<
|
|
44
|
-
export declare const selectFormSubmissionsByFormRevisions: OvermapSelector<Record<string, Stored<
|
|
45
|
-
export declare const selectSortedFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<
|
|
46
|
-
export declare const selectFormSubmissionsOfIssue: OvermapSelectorWithArgs<string, Stored<
|
|
47
|
-
export declare const selectFormSubmissionsByIssues: OvermapSelectorWithArgs<string[], Record<string, Stored<
|
|
48
|
-
export declare const selectFormSubmissionsOfAsset: OvermapSelectorWithArgs<string, Stored<
|
|
49
|
-
export declare const selectFormSubmissionsByAssets: OvermapSelector<Record<string, Stored<
|
|
41
|
+
export declare const selectFormSubmissions: OvermapSelector<Stored<FormSubmission>[]>;
|
|
42
|
+
export declare const selectFormSubmission: OvermapSelectorWithArgs<string, Stored<FormSubmission>>;
|
|
43
|
+
export declare const selectFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
|
|
44
|
+
export declare const selectFormSubmissionsByFormRevisions: OvermapSelector<Record<string, Stored<FormSubmission>[]>>;
|
|
45
|
+
export declare const selectSortedFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
|
|
46
|
+
export declare const selectFormSubmissionsOfIssue: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
|
|
47
|
+
export declare const selectFormSubmissionsByIssues: OvermapSelectorWithArgs<string[], Record<string, Stored<FormSubmission>[]>>;
|
|
48
|
+
export declare const selectFormSubmissionsOfAsset: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
|
|
49
|
+
export declare const selectFormSubmissionsByAssets: OvermapSelector<Record<string, Stored<FormSubmission>[]>>;
|
|
50
50
|
export declare const formSubmissionReducer: Reducer<FormSubmissionState>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { GeoImage, OvermapRootState, Stored } from "../../typings";
|
|
3
|
+
import { ModelState } from "../typings";
|
|
4
|
+
export type GeoImageSliceState = ModelState<Stored<GeoImage>>;
|
|
5
|
+
export declare const geoImageSlice: import("@reduxjs/toolkit").Slice<GeoImageSliceState, {
|
|
6
|
+
initializeGeoImages: <TState extends ModelState<GeoImage>>(state: TState, action: {
|
|
7
|
+
payload: GeoImage[];
|
|
8
|
+
type: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
setGeoImage: <TState_1 extends ModelState<GeoImage>>(state: TState_1, action: {
|
|
11
|
+
payload: GeoImage;
|
|
12
|
+
type: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
setGeoImages: <TState_2 extends ModelState<GeoImage>>(state: TState_2, action: {
|
|
15
|
+
payload: GeoImage[];
|
|
16
|
+
type: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
addGeoImage: <TState_3 extends ModelState<GeoImage>>(state: TState_3, action: {
|
|
19
|
+
payload: GeoImage;
|
|
20
|
+
type: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
addGeoImages: <TState_4 extends ModelState<GeoImage>>(state: TState_4, action: {
|
|
23
|
+
payload: GeoImage[];
|
|
24
|
+
type: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
updateGeoImage: <TState_5 extends ModelState<GeoImage>>(state: TState_5, action: {
|
|
27
|
+
payload: GeoImage;
|
|
28
|
+
type: string;
|
|
29
|
+
}) => void;
|
|
30
|
+
updateGeoImages: <TState_6 extends ModelState<GeoImage>>(state: TState_6, action: {
|
|
31
|
+
payload: GeoImage[];
|
|
32
|
+
type: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
deleteGeoImage: <TState_7 extends ModelState<GeoImage>>(state: TState_7, action: {
|
|
35
|
+
payload: string;
|
|
36
|
+
type: string;
|
|
37
|
+
}) => void;
|
|
38
|
+
deleteGeoImages: <TState_8 extends ModelState<GeoImage>>(state: TState_8, action: {
|
|
39
|
+
payload: string[];
|
|
40
|
+
type: string;
|
|
41
|
+
}) => void;
|
|
42
|
+
}, "geoImages">;
|
|
43
|
+
export declare const initializeGeoImages: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage[], "geoImages/initializeGeoImages">, setGeoImage: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage, "geoImages/setGeoImage">, setGeoImages: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage[], "geoImages/setGeoImages">, addGeoImage: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage, "geoImages/addGeoImage">, addGeoImages: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage[], "geoImages/addGeoImages">, updateGeoImage: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage, "geoImages/updateGeoImage">, updateGeoImages: import("@reduxjs/toolkit").ActionCreatorWithPayload<GeoImage[], "geoImages/updateGeoImages">, deleteGeoImage: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "geoImages/deleteGeoImage">, deleteGeoImages: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "geoImages/deleteGeoImages">;
|
|
44
|
+
export declare const selectGeoImageMapping: (state: OvermapRootState) => Record<string, Stored<GeoImage>>;
|
|
45
|
+
export declare const selectGeoImages: (state: OvermapRootState) => Stored<GeoImage>[];
|
|
46
|
+
export declare const selectGeoImageById: (id: string) => (state: OvermapRootState) => Stored<GeoImage> | undefined;
|
|
47
|
+
export declare const selectGeoImagesOfProject: (args: number) => (state: OvermapRootState) => Stored<GeoImage>[];
|
|
48
|
+
export declare const geoImageReducer: Reducer<GeoImageSliceState>;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { Issue, OvermapRootState,
|
|
3
|
-
import { IssueStatus } from "../../enums";
|
|
2
|
+
import { Issue, OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, SearchableRecentResult, SearchArgs, SearchResult, Stored } from "../../typings";
|
|
4
3
|
import { ModelState } from "../typings";
|
|
5
4
|
interface RecentIssueId {
|
|
6
5
|
offlineId: string;
|
|
7
6
|
lastOpenedEpochTime: number;
|
|
8
7
|
}
|
|
9
8
|
export interface IssueState extends ModelState<Stored<Issue>> {
|
|
10
|
-
visibleStatuses: IssueStatus[];
|
|
11
|
-
visibleUserIds: (number | null)[] | null;
|
|
12
9
|
recentIssueIds: RecentIssueId[];
|
|
13
10
|
}
|
|
14
11
|
export declare const issueSlice: import("@reduxjs/toolkit").Slice<IssueState, {
|
|
@@ -36,10 +33,6 @@ export declare const issueSlice: import("@reduxjs/toolkit").Slice<IssueState, {
|
|
|
36
33
|
payload: string[];
|
|
37
34
|
type: string;
|
|
38
35
|
}) => void;
|
|
39
|
-
setVisibleStatuses: (state: import("immer/dist/internal.js").WritableDraft<IssueState>, action: PayloadAction<IssueStatus[]>) => void;
|
|
40
|
-
setVisibleUserIds: (state: import("immer/dist/internal.js").WritableDraft<IssueState>, action: {
|
|
41
|
-
payload: (number | null)[];
|
|
42
|
-
}) => void;
|
|
43
36
|
cleanRecentIssues: (state: import("immer/dist/internal.js").WritableDraft<IssueState>) => void;
|
|
44
37
|
addToRecentIssues: (state: import("immer/dist/internal.js").WritableDraft<IssueState>, action: {
|
|
45
38
|
payload: string;
|
|
@@ -47,7 +40,7 @@ export declare const issueSlice: import("@reduxjs/toolkit").Slice<IssueState, {
|
|
|
47
40
|
resetRecentIssues: (state: import("immer/dist/internal.js").WritableDraft<IssueState>) => void;
|
|
48
41
|
removeRecentIssue: (state: import("immer/dist/internal.js").WritableDraft<IssueState>, action: PayloadAction<string>) => void;
|
|
49
42
|
}, "issues">;
|
|
50
|
-
export declare const initializeIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>[], "issues/initializeIssues">, addIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>, "issues/addIssue">, addIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>[], "issues/addIssues">, updateIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>, "issues/updateIssue">, deleteIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "issues/deleteIssue">, deleteIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "issues/deleteIssues">,
|
|
43
|
+
export declare const initializeIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>[], "issues/initializeIssues">, addIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>, "issues/addIssue">, addIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>[], "issues/addIssues">, updateIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Issue>, "issues/updateIssue">, deleteIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "issues/deleteIssue">, deleteIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "issues/deleteIssues">, addToRecentIssues: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "issues/addToRecentIssues">, cleanRecentIssues: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"issues/cleanRecentIssues">, removeRecentIssue: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "issues/removeRecentIssue">, resetRecentIssues: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"issues/resetRecentIssues">;
|
|
51
44
|
export interface IssueFilterArgs {
|
|
52
45
|
filterByAssignedTo: boolean;
|
|
53
46
|
filterByStatus: boolean;
|
|
@@ -56,9 +49,6 @@ export interface IssueFilterArgs {
|
|
|
56
49
|
}
|
|
57
50
|
export declare const selectIssueMapping: (state: OvermapRootState) => Record<string, Stored<Issue>>;
|
|
58
51
|
export declare const selectRecentIssueIds: (state: OvermapRootState) => RecentIssueId[];
|
|
59
|
-
export declare const selectVisibleUserIds: (state: OvermapRootState) => (number | null)[] | null;
|
|
60
|
-
export declare const selectVisibleStatuses: (state: OvermapRootState) => IssueStatus[];
|
|
61
|
-
export declare const selectIssues: OvermapSelectorWithArgs<IssueFilterArgs, Stored<Issue>[]>;
|
|
62
52
|
export declare const selectIssue: OvermapSelectorWithArgs<string, Stored<Issue> | undefined>;
|
|
63
53
|
export declare const searchIssues: OvermapSelectorWithArgs<SearchArgs, SearchResult<Stored<Issue>>[]>;
|
|
64
54
|
export declare const selectRecentIssuesAsSearchResults: OvermapSelector<SearchableRecentResult<Stored<Issue>>[]>;
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
import { Reducer } from "@reduxjs/toolkit";
|
|
1
|
+
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
2
|
import { OvermapSelector, OvermapSelectorWithArgs } from '../../typings/store';
|
|
3
3
|
import { License, Organization, Project, User } from "../../typings";
|
|
4
4
|
export interface OrganizationState {
|
|
5
5
|
organizations: Record<number, Organization>;
|
|
6
|
-
activeOrganizationId: number | null;
|
|
7
6
|
}
|
|
8
7
|
export declare const organizationSlice: import("@reduxjs/toolkit").Slice<OrganizationState, {
|
|
9
|
-
setOrganizations: (state: import("immer/dist/internal.js").WritableDraft<OrganizationState>, action:
|
|
10
|
-
payload: Organization[];
|
|
11
|
-
}) => void;
|
|
12
|
-
updateActiveOrganization: (state: import("immer/dist/internal.js").WritableDraft<OrganizationState>, action: {
|
|
13
|
-
payload: Organization;
|
|
14
|
-
}) => void;
|
|
15
|
-
setActiveOrganizationId: (state: import("immer/dist/internal.js").WritableDraft<OrganizationState>, action: {
|
|
16
|
-
payload: number;
|
|
17
|
-
}) => void;
|
|
8
|
+
setOrganizations: (state: import("immer/dist/internal.js").WritableDraft<OrganizationState>, action: PayloadAction<Organization[]>) => void;
|
|
18
9
|
}, "organizations">;
|
|
19
|
-
export declare const setOrganizations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Organization[], "organizations/setOrganizations"
|
|
20
|
-
export declare const selectActiveOrganizationId: OvermapSelector<number | null>;
|
|
10
|
+
export declare const setOrganizations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Organization[], "organizations/setOrganizations">;
|
|
21
11
|
export declare const selectOrganizations: OvermapSelector<Organization[]>;
|
|
22
12
|
export declare const selectOrganizationsMapping: OvermapSelector<Record<number, Organization>>;
|
|
23
13
|
export declare const selectOrganizationsWithAccess: OvermapSelector<Organization[]>;
|
|
24
|
-
export declare const
|
|
14
|
+
export declare const selectOrganizationById: OvermapSelectorWithArgs<number, Organization>;
|
|
25
15
|
export declare const selectOrganizationUsersIds: OvermapSelector<number[]>;
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const selectSortedOrganizationLicenses: OvermapSelector<License[]>;
|
|
16
|
+
export declare const selectProjectsOfOrganization: OvermapSelectorWithArgs<number, Project[]>;
|
|
17
|
+
export declare const selectLicensesOfOrganization: OvermapSelectorWithArgs<number, License[]>;
|
|
29
18
|
export declare const selectOrganizationUsersAsMapping: OvermapSelector<Record<number, User>>;
|
|
30
19
|
export declare const selectSortedOrganizationUsers: OvermapSelector<User[]>;
|
|
31
20
|
export declare const selectOrganization: OvermapSelectorWithArgs<number, Organization | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import {
|
|
2
|
+
import { MultiPointGeometry, OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, ProjectFile } from "../../typings";
|
|
3
3
|
export interface ProjectFileState {
|
|
4
4
|
projectFiles: Record<string, ProjectFile>;
|
|
5
5
|
activeProjectFileId: string | null;
|
|
@@ -8,7 +8,6 @@ export interface ProjectFileState {
|
|
|
8
8
|
* imported and not a pre-existing one which is being edited
|
|
9
9
|
*/
|
|
10
10
|
isImportingProjectFile: boolean;
|
|
11
|
-
enabledProjectFiles: Record<string, boolean | undefined>;
|
|
12
11
|
}
|
|
13
12
|
export declare const projectFileSlice: import("@reduxjs/toolkit").Slice<ProjectFileState, {
|
|
14
13
|
addOrReplaceProjectFiles: (state: import("immer/dist/internal.js").WritableDraft<ProjectFileState>, action: {
|
|
@@ -17,12 +16,6 @@ export declare const projectFileSlice: import("@reduxjs/toolkit").Slice<ProjectF
|
|
|
17
16
|
addOrReplaceProjectFile: (state: import("immer/dist/internal.js").WritableDraft<ProjectFileState>, action: {
|
|
18
17
|
payload: ProjectFile;
|
|
19
18
|
}) => void;
|
|
20
|
-
setProjectFileVisible: (state: import("immer/dist/internal.js").WritableDraft<ProjectFileState>, action: {
|
|
21
|
-
payload: {
|
|
22
|
-
fileId: string;
|
|
23
|
-
visible: boolean;
|
|
24
|
-
};
|
|
25
|
-
}) => void;
|
|
26
19
|
setIsImportingProjectFile: (state: import("immer/dist/internal.js").WritableDraft<ProjectFileState>, action: {
|
|
27
20
|
payload: boolean;
|
|
28
21
|
}) => void;
|
|
@@ -40,13 +33,8 @@ export declare const projectFileSlice: import("@reduxjs/toolkit").Slice<ProjectF
|
|
|
40
33
|
}) => void;
|
|
41
34
|
resetProjectFileObjectUrls: (state: import("immer/dist/internal.js").WritableDraft<ProjectFileState>) => void;
|
|
42
35
|
}, "projectFiles">;
|
|
43
|
-
export declare const addOrReplaceProjectFiles: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectFile[], "projectFiles/addOrReplaceProjectFiles">, addOrReplaceProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectFile, "projectFiles/addOrReplaceProjectFile">,
|
|
44
|
-
|
|
45
|
-
visible: boolean;
|
|
46
|
-
}, "projectFiles/setProjectFileVisible">, setIsImportingProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "projectFiles/setIsImportingProjectFile">, setActiveProjectFileId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "projectFiles/setActiveProjectFileId">, saveActiveProjectFileBounds: import("@reduxjs/toolkit").ActionCreatorWithPayload<MultiPointGeometry, "projectFiles/saveActiveProjectFileBounds">, removeProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "projectFiles/removeProjectFile">, removeProjectFilesOfProject: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "projectFiles/removeProjectFilesOfProject">, resetProjectFileObjectUrls: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"projectFiles/resetProjectFileObjectUrls">;
|
|
47
|
-
export declare const selectEnabledProjectFiles: (state: OvermapRootState) => Record<string, boolean | undefined>;
|
|
48
|
-
export declare const selectProjectFileVisibility: OvermapSelector<Record<string, boolean>>;
|
|
49
|
-
export declare const selectEnabledProjectFileMapping: (state: OvermapRootState) => Record<string, ProjectFile>;
|
|
36
|
+
export declare const addOrReplaceProjectFiles: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectFile[], "projectFiles/addOrReplaceProjectFiles">, addOrReplaceProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectFile, "projectFiles/addOrReplaceProjectFile">, setIsImportingProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "projectFiles/setIsImportingProjectFile">, setActiveProjectFileId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "projectFiles/setActiveProjectFileId">, saveActiveProjectFileBounds: import("@reduxjs/toolkit").ActionCreatorWithPayload<MultiPointGeometry, "projectFiles/saveActiveProjectFileBounds">, removeProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "projectFiles/removeProjectFile">, removeProjectFilesOfProject: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "projectFiles/removeProjectFilesOfProject">, resetProjectFileObjectUrls: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"projectFiles/resetProjectFileObjectUrls">;
|
|
37
|
+
export declare const selectProjectFileMapping: (state: OvermapRootState) => Record<string, ProjectFile>;
|
|
50
38
|
export declare const selectProjectFiles: ((state: OvermapRootState) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile>, args_1: number | null) => ProjectFile[], {
|
|
51
39
|
clearCache: () => void;
|
|
52
40
|
}> & {
|
|
@@ -54,4 +42,5 @@ export declare const selectProjectFiles: ((state: OvermapRootState) => ProjectFi
|
|
|
54
42
|
};
|
|
55
43
|
export declare const selectActiveProjectFileId: OvermapSelector<string | null>;
|
|
56
44
|
export declare const selectIsImportingProjectFile: OvermapSelector<boolean>;
|
|
45
|
+
export declare const selectProjectFileById: OvermapSelectorWithArgs<string, ProjectFile>;
|
|
57
46
|
export declare const projectFileReducer: Reducer<ProjectFileState>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import {
|
|
2
|
+
import { OvermapRootState, OvermapSelector, Project, User } from "../../typings";
|
|
3
3
|
export interface ProjectState {
|
|
4
4
|
projects: Record<number, Project>;
|
|
5
5
|
activeProjectId: number | null;
|
|
6
|
-
recentProjectIds: number[];
|
|
7
|
-
recentSearchableQueries: string[];
|
|
8
6
|
}
|
|
9
7
|
export declare const projectSlice: import("@reduxjs/toolkit").Slice<ProjectState, {
|
|
10
8
|
setProjects: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
@@ -37,7 +35,6 @@ export declare const selectProjects: OvermapSelector<Record<number, Project>>;
|
|
|
37
35
|
export declare const selectActiveProjectId: (state: OvermapRootState) => number | null;
|
|
38
36
|
export declare const selectActiveProject: (state: OvermapRootState) => Project | null;
|
|
39
37
|
export declare const selectProject: (args: number) => (state: OvermapRootState) => Project | undefined;
|
|
40
|
-
export declare const selectSortedProjects: OvermapSelector<Project[]>;
|
|
41
38
|
export declare const projectReducer: Reducer<ProjectState>;
|
|
42
39
|
export declare const selectProjectUsersIds: OvermapSelector<number[]>;
|
|
43
40
|
export declare const selectProjectUsersAsMapping: OvermapSelector<Record<number, User>>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Reducer
|
|
2
|
-
import { OvermapRootState, OvermapSelector, Workspace } from "../../typings";
|
|
1
|
+
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, Stored, Workspace } from "../../typings";
|
|
3
3
|
import { ModelState } from "../typings";
|
|
4
|
-
export
|
|
5
|
-
activeWorkspaceId: string | null;
|
|
6
|
-
}
|
|
4
|
+
export type WorkspaceState = ModelState<Workspace>;
|
|
7
5
|
export declare const workspaceSlice: import("@reduxjs/toolkit").Slice<WorkspaceState, {
|
|
8
6
|
initializeWorkspaces: <TState extends ModelState<Workspace>>(state: TState, action: {
|
|
9
7
|
payload: Workspace[];
|
|
@@ -25,9 +23,8 @@ export declare const workspaceSlice: import("@reduxjs/toolkit").Slice<WorkspaceS
|
|
|
25
23
|
payload: string;
|
|
26
24
|
type: string;
|
|
27
25
|
}) => void;
|
|
28
|
-
setActiveWorkspaceId: (state: import("immer/dist/internal.js").WritableDraft<WorkspaceState>, action: PayloadAction<string | null>) => void;
|
|
29
26
|
}, "workspace">;
|
|
30
|
-
export declare const initializeWorkspaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace[], "workspace/initializeWorkspaces">, setWorkspaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace[], "workspace/setWorkspaces">, addWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace, "workspace/addWorkspace">, updateWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace, "workspace/updateWorkspace">,
|
|
27
|
+
export declare const initializeWorkspaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace[], "workspace/initializeWorkspaces">, setWorkspaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace[], "workspace/setWorkspaces">, addWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace, "workspace/addWorkspace">, updateWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace, "workspace/updateWorkspace">, deleteWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "workspace/deleteWorkspace">;
|
|
31
28
|
export declare const selectWorkspaceMapping: OvermapSelector<Record<string, Workspace>>;
|
|
32
29
|
export declare const selectWorkspaces: ((state: OvermapRootState) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
|
|
33
30
|
clearCache: () => void;
|
|
@@ -35,8 +32,6 @@ export declare const selectWorkspaces: ((state: OvermapRootState) => Workspace[]
|
|
|
35
32
|
clearCache: () => void;
|
|
36
33
|
};
|
|
37
34
|
export declare const selectMainWorkspace: OvermapSelector<Workspace | undefined>;
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const selectActiveWorkspaceId: OvermapSelector<string | null>;
|
|
40
|
-
export declare const selectActiveWorkspace: OvermapSelector<Workspace | null | undefined>;
|
|
35
|
+
export declare const selectWorkspaceById: OvermapSelectorWithArgs<string, Stored<Workspace>>;
|
|
41
36
|
export declare const selectPermittedWorkspaceIds: OvermapSelector<Set<string>>;
|
|
42
37
|
export declare const workspaceReducer: Reducer<WorkspaceState>;
|
package/dist/store/store.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Reducer } from "redux";
|
|
|
3
3
|
import { Config, OfflineAction, OfflineMetadata } from "@redux-offline/redux-offline/lib/types";
|
|
4
4
|
import request from "superagent";
|
|
5
5
|
import { type BaseSDK, type OfflineMetaEffect, OutboxCoordinator, RequestDetails } from "../sdk";
|
|
6
|
-
import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VersioningState, WorkspaceState } from "./slices";
|
|
6
|
+
import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VersioningState, WorkspaceState } from "./slices";
|
|
7
7
|
import { BaseState, OvermapRootState } from "../typings";
|
|
8
8
|
export declare const VERSION_REDUCER_KEY = "versioning";
|
|
9
9
|
export declare const overmapReducers: {
|
|
@@ -44,6 +44,7 @@ export declare const overmapReducers: {
|
|
|
44
44
|
issueCommentReducer: Reducer<IssueCommentState>;
|
|
45
45
|
issueUpdateReducer: Reducer<IssueUpdateState>;
|
|
46
46
|
issueAttachmentReducer: Reducer<IssueAttachmentState>;
|
|
47
|
+
geoImageReducer: Reducer<GeoImageSliceState>;
|
|
47
48
|
};
|
|
48
49
|
export declare const resetStore = "RESET";
|
|
49
50
|
export declare const overmapRootReducer: Reducer<OvermapRootState>;
|
|
@@ -15,7 +15,7 @@ export interface AssetStage extends OfflineModel {
|
|
|
15
15
|
name: string;
|
|
16
16
|
description?: string;
|
|
17
17
|
priority: number;
|
|
18
|
-
|
|
18
|
+
form?: string;
|
|
19
19
|
}
|
|
20
20
|
export type AssetStagePayload = Omit<AssetStage, "asset_type">;
|
|
21
21
|
export interface AssetStageCompletion extends Model {
|
|
@@ -86,7 +86,7 @@ export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier =
|
|
|
86
86
|
identifier: string;
|
|
87
87
|
type: TIdentifier;
|
|
88
88
|
}
|
|
89
|
-
export interface
|
|
89
|
+
export interface Form extends OfflineModel {
|
|
90
90
|
favorite: boolean;
|
|
91
91
|
created_by: number;
|
|
92
92
|
asset_type?: string;
|
|
@@ -94,17 +94,17 @@ export interface UserForm extends OfflineModel {
|
|
|
94
94
|
organization?: number;
|
|
95
95
|
project?: number;
|
|
96
96
|
}
|
|
97
|
-
export type
|
|
97
|
+
export type SubmittedForm = Form & OfflineModel & {
|
|
98
98
|
created_by: number;
|
|
99
99
|
submitted_at: string;
|
|
100
100
|
};
|
|
101
|
-
export type CreatedUserForm =
|
|
101
|
+
export type CreatedUserForm = SubmittedForm & {
|
|
102
102
|
created_at: string;
|
|
103
103
|
};
|
|
104
|
-
export type CachedUserForm =
|
|
105
|
-
latestRevision:
|
|
104
|
+
export type CachedUserForm = SubmittedForm & {
|
|
105
|
+
latestRevision: FormRevision;
|
|
106
106
|
};
|
|
107
|
-
export interface
|
|
107
|
+
export interface FormRevision<TFields extends BaseSerializedObject = ISerializedField> extends OfflineModel {
|
|
108
108
|
form: string;
|
|
109
109
|
title: string;
|
|
110
110
|
description?: string;
|
|
@@ -113,21 +113,21 @@ export interface UserFormRevision<TFields extends BaseSerializedObject = ISerial
|
|
|
113
113
|
submitted_at: string;
|
|
114
114
|
revision: number | "Pending";
|
|
115
115
|
}
|
|
116
|
-
export type
|
|
117
|
-
export interface
|
|
116
|
+
export type FormRevisionPayload = Omit<Payload<FormRevision>, "created_by" | "revision" | "form" | "submitted_at">;
|
|
117
|
+
export interface FormSubmission extends OfflineModel, SubmittedAtModel, CreatedByModel {
|
|
118
118
|
form_revision: string;
|
|
119
119
|
values: Record<string, FieldValue>;
|
|
120
120
|
issue?: string;
|
|
121
121
|
asset?: string;
|
|
122
122
|
asset_stage?: string;
|
|
123
123
|
}
|
|
124
|
-
export interface
|
|
124
|
+
export interface FormSubmissionAttachment extends OfflineModel, FileWithNameModel {
|
|
125
125
|
submission: string;
|
|
126
126
|
field_identifier: string;
|
|
127
127
|
}
|
|
128
|
-
export interface
|
|
128
|
+
export interface FormRevisionAttachment extends OfflineModel, FileWithNameModel {
|
|
129
129
|
revision: string;
|
|
130
130
|
field_identifier: string;
|
|
131
131
|
}
|
|
132
|
-
export type
|
|
132
|
+
export type FormSubmissionPayload = Omit<Payload<FormSubmission>, "created_by" | "submitted_at">;
|
|
133
133
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export type Coordinates = [number, number];
|
|
2
|
+
export type Bounds = [Coordinates, Coordinates];
|
|
2
3
|
export interface PointGeometry {
|
|
3
4
|
type: "Point";
|
|
4
5
|
coordinates: Coordinates;
|
|
5
6
|
}
|
|
6
7
|
export interface MultiPointGeometry {
|
|
7
8
|
type: "MultiPoint";
|
|
8
|
-
coordinates:
|
|
9
|
+
coordinates: Bounds;
|
|
9
10
|
}
|
|
10
11
|
export interface BoundableModel {
|
|
11
12
|
bounds?: MultiPointGeometry;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CreatedByModel, OfflineModel, SubmittedAtModel } from "./base";
|
|
2
|
+
import { CanvasMarkableModel, MarkableModel } from "./geo";
|
|
3
|
+
import { FileWithNameModel } from "../files";
|
|
4
|
+
export interface GeoImage extends OfflineModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, FileWithNameModel {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
project: number;
|
|
8
|
+
direction?: number;
|
|
9
|
+
original_date?: string;
|
|
10
|
+
}
|
|
11
|
+
export type GeoImagePayload = Omit<GeoImage, "offline_id" | "submitted_at" | "created_by" | "file_name" | "file_sha1" | "file"> & {
|
|
12
|
+
file: File;
|
|
13
|
+
};
|
|
14
|
+
export type BulkGeoImagePayload = Omit<GeoImagePayload, "project">;
|
|
@@ -2,7 +2,7 @@ import { CreatedByModel, Offline, OfflineModel } from "./base";
|
|
|
2
2
|
import { IssuePriority, IssueStatus } from "../../enums";
|
|
3
3
|
import { WorkspaceIndexedModel } from "./workspace";
|
|
4
4
|
import { CanvasMarkableModel, MarkableModel } from "./geo";
|
|
5
|
-
import { CreatedUserForm,
|
|
5
|
+
import { CreatedUserForm, SubmittedForm, Form } from "./forms";
|
|
6
6
|
import { User } from "./users";
|
|
7
7
|
import { CSSColor } from "../colors";
|
|
8
8
|
import { CreatedDocument, SubmittedDocument } from "./documents";
|
|
@@ -10,13 +10,13 @@ import { CreatedDocument, SubmittedDocument } from "./documents";
|
|
|
10
10
|
* Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
|
|
11
11
|
* all cases, the `offline_id`) are guaranteed to be set.
|
|
12
12
|
*/
|
|
13
|
-
export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends
|
|
13
|
+
export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends Form ? SubmittedForm : TModel extends Document ? SubmittedDocument : Omit<TModel, "created_at" | "created_by" | "id">);
|
|
14
14
|
/**
|
|
15
15
|
* Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
|
|
16
16
|
* typically have additional properties that are only known once it has been processed and accepted by the API, such as
|
|
17
17
|
* the `created_at` timestamp, which is the time at which the data was written to the database.
|
|
18
18
|
*/
|
|
19
|
-
export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends
|
|
19
|
+
export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends Form ? CreatedUserForm : TModel extends Document ? CreatedDocument : TModel);
|
|
20
20
|
/**
|
|
21
21
|
* Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
|
|
22
22
|
* data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="@redux-offline/redux-offline" />
|
|
2
2
|
import { OfflineState } from "@redux-offline/redux-offline/lib/types";
|
|
3
|
-
import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VERSION_REDUCER_KEY, WorkspaceState } from "../../store";
|
|
4
|
-
import { VersioningState } from "../../store/slices/versioningSlice";
|
|
3
|
+
import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VERSION_REDUCER_KEY, VersioningState, WorkspaceState } from "../../store";
|
|
5
4
|
export interface BaseState {
|
|
6
5
|
outboxReducer: OutboxState;
|
|
7
6
|
offline: OfflineState;
|
|
@@ -43,4 +42,5 @@ export interface OvermapRootState extends BaseState {
|
|
|
43
42
|
documentAttachmentReducer: DocumentAttachmentState;
|
|
44
43
|
teamReducer: TeamState;
|
|
45
44
|
agentsReducer: AgentsState;
|
|
45
|
+
geoImageReducer: GeoImageSliceState;
|
|
46
46
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import L from "leaflet";
|
|
2
|
-
import { Coordinates, MultiPointGeometry, PointGeometry } from "../typings";
|
|
2
|
+
import { Bounds, Coordinates, MultiPointGeometry, PointGeometry } from "../typings";
|
|
3
3
|
export declare const coordinatesToLiteral: (coordinates: Coordinates) => L.LatLngLiteral;
|
|
4
4
|
export declare const literalToCoordinates: (literal: L.LatLngLiteral) => Coordinates;
|
|
5
5
|
/**
|
|
6
6
|
* Flip coordinates from [lng, lat] to [lat, lng]
|
|
7
7
|
*/
|
|
8
8
|
export declare const flipCoordinates: (coordinates: L.LatLngTuple) => Coordinates;
|
|
9
|
+
export declare const flipBounds: (bounds: Bounds) => Bounds;
|
|
9
10
|
export declare function offsetPositionByMeters(originalPosition: L.LatLng, latMeters: number, lngMeters: number): L.LatLngLiteral;
|
|
10
11
|
export declare const createPointGeometry: (coordinates: Coordinates) => PointGeometry;
|
|
11
12
|
export declare const coordinatesAreEqual: (a: Coordinates, b: Coordinates) => boolean;
|
package/dist/utils/forms.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Stored,
|
|
2
|
-
export declare const formRevisionSortFn: (formRevisionA: Stored<
|
|
1
|
+
import { Stored, FormRevision } from "../typings";
|
|
2
|
+
export declare const formRevisionSortFn: (formRevisionA: Stored<FormRevision>, formRevisionB: Stored<FormRevision>) => 1 | -1;
|
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.60-forms-
|
|
6
|
+
"version": "1.0.60-forms-refactor-1.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ISerializedField, UserForm, UserFormRevision, UserFormRevisionPayload } from '../../typings/models/forms';
|
|
2
|
-
import { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { Created, Submitted, OvermapRootState } from "../../typings";
|
|
4
|
-
import { BaseApiService } from "./BaseApiService";
|
|
5
|
-
import type { BaseSDK } from "../base";
|
|
6
|
-
export declare abstract class UserFormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
-
private getAttachImagePromises;
|
|
8
|
-
private add;
|
|
9
|
-
addForOrganization(organizationId: number, initialRevision: UserFormRevisionPayload): Promise<[Submitted<UserForm>, Submitted<UserFormRevision<ISerializedField>>, Promise<Created<UserFormRevision<ISerializedField>>>, Promise<Created<UserFormRevision<ISerializedField>>>]>;
|
|
10
|
-
addForProject(projectId: number, initialRevision: UserFormRevisionPayload): Promise<[Submitted<UserForm>, Submitted<UserFormRevision<ISerializedField>>, Promise<Created<UserFormRevision<ISerializedField>>>, Promise<Created<UserFormRevision<ISerializedField>>>]>;
|
|
11
|
-
addForIssueType(issueTypeId: string, initialRevision: UserFormRevisionPayload): Promise<[Submitted<UserForm>, Submitted<UserFormRevision<ISerializedField>>, Promise<Created<UserFormRevision<ISerializedField>>>, Promise<Created<UserFormRevision<ISerializedField>>>]>;
|
|
12
|
-
addForAssetType(assetTypeId: string, initialRevision: UserFormRevisionPayload): Promise<[Submitted<UserForm>, Submitted<UserFormRevision<ISerializedField>>, Promise<Created<UserFormRevision<ISerializedField>>>, Promise<Created<UserFormRevision<ISerializedField>>>]>;
|
|
13
|
-
createRevision(formId: string, revision: UserFormRevisionPayload): Promise<OptimisticModelResult<UserFormRevision>>;
|
|
14
|
-
favorite(formId: string): Promise<undefined>;
|
|
15
|
-
unfavorite(formId: string): Promise<undefined>;
|
|
16
|
-
delete(formId: string): Promise<undefined>;
|
|
17
|
-
refreshStore(projectId: number): Promise<void>;
|
|
18
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Offline } from '../../typings/models/base';
|
|
2
|
-
import { FieldValue, UserFormSubmission, UserFormSubmissionAttachment, UserFormSubmissionPayload } from '../../typings/models/forms';
|
|
3
|
-
import { OptimisticModelResult } from "../typings";
|
|
4
|
-
import { Created, OvermapRootState, Stored } from "../../typings";
|
|
5
|
-
import { GetS3UrlSuccessResponse } from "./FileService";
|
|
6
|
-
import { BaseApiService } from "./BaseApiService";
|
|
7
|
-
import type { BaseSDK } from "../base";
|
|
8
|
-
interface BulkAddRequestReturnValue {
|
|
9
|
-
submissions: Created<UserFormSubmission>[];
|
|
10
|
-
attachments: Created<UserFormSubmissionAttachment>[];
|
|
11
|
-
presigned_urls: Record<string, GetS3UrlSuccessResponse>;
|
|
12
|
-
}
|
|
13
|
-
export declare abstract class UserFormSubmissionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
14
|
-
private getAttachFilesPromises;
|
|
15
|
-
add(payload: Offline<UserFormSubmissionPayload>): OptimisticModelResult<UserFormSubmission>;
|
|
16
|
-
bulkAdd(args: {
|
|
17
|
-
formRevision: string;
|
|
18
|
-
commonFieldValues: Record<string, FieldValue>;
|
|
19
|
-
fieldValuesByAsset: Record<string, Record<string, FieldValue>>;
|
|
20
|
-
}, batchSize: number): Promise<Promise<BulkAddRequestReturnValue>[]>;
|
|
21
|
-
update(submission: Stored<UserFormSubmission>): OptimisticModelResult<UserFormSubmission>;
|
|
22
|
-
delete(submissionId: string): Promise<undefined>;
|
|
23
|
-
refreshStore(projectId: number): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
export {};
|