@overmap-ai/core 1.0.51 → 1.0.52
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/forms/builder/constants.d.ts +1 -0
- package/dist/forms/builder/utils.d.ts +1 -1
- package/dist/forms/fields/QrField/QrField.d.ts +21 -0
- package/dist/forms/fields/QrField/QrInput.d.ts +10 -0
- package/dist/forms/fields/QrField/index.d.ts +2 -0
- package/dist/forms/fields/constants.d.ts +8 -0
- package/dist/forms/fields/index.d.ts +1 -0
- package/dist/forms/renderer/FormSubmissionBrowser/FormSubmissionBrowser.d.ts +5 -5
- package/dist/forms/renderer/FormSubmissionViewer/FormSubmissionViewer.d.ts +3 -3
- package/dist/forms/typings.d.ts +5 -2
- package/dist/overmap-core.js +1172 -473
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1174 -476
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -1
- package/dist/sdk/services/AttachmentService.d.ts +2 -2
- package/dist/sdk/services/DocumentService.d.ts +5 -5
- package/dist/sdk/services/TeamService.d.ts +12 -0
- package/dist/sdk/services/UserFormSubmissionService.d.ts +9 -2
- package/dist/sdk/services/index.d.ts +1 -0
- package/dist/store/slices/categorySlice.d.ts +5 -1
- package/dist/store/slices/documentSlice.d.ts +352 -13
- package/dist/store/slices/formRevisionSlice.d.ts +66 -0
- package/dist/store/slices/formSlice.d.ts +110 -0
- package/dist/store/slices/formSubmissionSlice.d.ts +47 -0
- package/dist/store/slices/index.d.ts +4 -1
- package/dist/store/slices/issueSlice.d.ts +4 -1
- package/dist/store/slices/projectFileSlice.d.ts +4 -1
- package/dist/store/slices/teamSlice.d.ts +19 -0
- package/dist/store/slices/utils.d.ts +1 -0
- package/dist/store/slices/workspaceSlice.d.ts +4 -1
- package/dist/store/store.d.ts +13 -4
- package/dist/style.css +5 -0
- package/dist/typings/files.d.ts +11 -1
- package/dist/typings/models/attachments.d.ts +10 -13
- package/dist/typings/models/base.d.ts +10 -0
- package/dist/typings/models/documents.d.ts +19 -5
- package/dist/typings/models/forms.d.ts +8 -12
- package/dist/typings/models/index.d.ts +1 -0
- package/dist/typings/models/issues.d.ts +3 -2
- package/dist/typings/models/teams.d.ts +10 -0
- package/dist/utils/file.d.ts +2 -0
- package/dist/utils/forms.d.ts +2 -0
- package/package.json +2 -1
- package/dist/store/slices/userFormSlice.d.ts +0 -145
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Reducer, PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { CachedUserForm, UserForm } from '../../typings/models/forms';
|
|
3
|
+
import { SearchArgs } from '../../typings/search';
|
|
4
|
+
import { Selector, SelectorWithArgs } from '../../typings/store';
|
|
5
|
+
import { Stored, Submitted } from "../../typings";
|
|
6
|
+
export interface FormState {
|
|
7
|
+
forms: Record<string, Stored<UserForm>>;
|
|
8
|
+
}
|
|
9
|
+
export declare const formSlice: import("@reduxjs/toolkit").Slice<FormState, {
|
|
10
|
+
setForms: (state: import("immer/dist/internal.js").WritableDraft<FormState>, action: PayloadAction<Submitted<UserForm>[]>) => void;
|
|
11
|
+
addForm: (state: import("immer/dist/internal.js").WritableDraft<FormState>, action: PayloadAction<Submitted<UserForm>>) => void;
|
|
12
|
+
addForms: (state: import("immer/dist/internal.js").WritableDraft<FormState>, action: PayloadAction<Submitted<UserForm>[]>) => void;
|
|
13
|
+
favoriteForm: (state: import("immer/dist/internal.js").WritableDraft<FormState>, action: {
|
|
14
|
+
payload: {
|
|
15
|
+
formId: string;
|
|
16
|
+
};
|
|
17
|
+
}) => void;
|
|
18
|
+
unfavoriteForm: (state: import("immer/dist/internal.js").WritableDraft<FormState>, action: {
|
|
19
|
+
payload: {
|
|
20
|
+
formId: string;
|
|
21
|
+
};
|
|
22
|
+
}) => void;
|
|
23
|
+
deleteForm: (state: import("immer/dist/internal.js").WritableDraft<FormState>, action: PayloadAction<string>) => void;
|
|
24
|
+
}, "forms">;
|
|
25
|
+
export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPayload<((Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
|
|
26
|
+
favorite: boolean;
|
|
27
|
+
component_type?: string | undefined;
|
|
28
|
+
} & {
|
|
29
|
+
owner_organization: number;
|
|
30
|
+
owner_user: undefined;
|
|
31
|
+
} & {
|
|
32
|
+
offline_id: string;
|
|
33
|
+
} & import('../../typings/models/base').OfflineModel & {
|
|
34
|
+
created_by: number;
|
|
35
|
+
submitted_at: string;
|
|
36
|
+
}) | (Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
|
|
37
|
+
favorite: boolean;
|
|
38
|
+
component_type?: string | undefined;
|
|
39
|
+
} & {
|
|
40
|
+
owner_organization: undefined;
|
|
41
|
+
owner_user: number;
|
|
42
|
+
} & {
|
|
43
|
+
offline_id: string;
|
|
44
|
+
} & import('../../typings/models/base').OfflineModel & {
|
|
45
|
+
created_by: number;
|
|
46
|
+
submitted_at: string;
|
|
47
|
+
}))[], "forms/setForms">, addForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<(Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
|
|
48
|
+
favorite: boolean;
|
|
49
|
+
component_type?: string | undefined;
|
|
50
|
+
} & {
|
|
51
|
+
owner_organization: number;
|
|
52
|
+
owner_user: undefined;
|
|
53
|
+
} & {
|
|
54
|
+
offline_id: string;
|
|
55
|
+
} & import('../../typings/models/base').OfflineModel & {
|
|
56
|
+
created_by: number;
|
|
57
|
+
submitted_at: string;
|
|
58
|
+
}) | (Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
|
|
59
|
+
favorite: boolean;
|
|
60
|
+
component_type?: string | undefined;
|
|
61
|
+
} & {
|
|
62
|
+
owner_organization: undefined;
|
|
63
|
+
owner_user: number;
|
|
64
|
+
} & {
|
|
65
|
+
offline_id: string;
|
|
66
|
+
} & import('../../typings/models/base').OfflineModel & {
|
|
67
|
+
created_by: number;
|
|
68
|
+
submitted_at: string;
|
|
69
|
+
}), "forms/addForm">, addForms: import("@reduxjs/toolkit").ActionCreatorWithPayload<((Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
|
|
70
|
+
favorite: boolean;
|
|
71
|
+
component_type?: string | undefined;
|
|
72
|
+
} & {
|
|
73
|
+
owner_organization: number;
|
|
74
|
+
owner_user: undefined;
|
|
75
|
+
} & {
|
|
76
|
+
offline_id: string;
|
|
77
|
+
} & import('../../typings/models/base').OfflineModel & {
|
|
78
|
+
created_by: number;
|
|
79
|
+
submitted_at: string;
|
|
80
|
+
}) | (Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
|
|
81
|
+
favorite: boolean;
|
|
82
|
+
component_type?: string | undefined;
|
|
83
|
+
} & {
|
|
84
|
+
owner_organization: undefined;
|
|
85
|
+
owner_user: number;
|
|
86
|
+
} & {
|
|
87
|
+
offline_id: string;
|
|
88
|
+
} & import('../../typings/models/base').OfflineModel & {
|
|
89
|
+
created_by: number;
|
|
90
|
+
submitted_at: string;
|
|
91
|
+
}))[], "forms/addForms">, favoriteForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
92
|
+
formId: string;
|
|
93
|
+
}, "forms/favoriteForm">, unfavoriteForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
94
|
+
formId: string;
|
|
95
|
+
}, "forms/unfavoriteForm">, deleteForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "forms/deleteForm">;
|
|
96
|
+
export type FormSearchArgs = SearchArgs<{
|
|
97
|
+
/** `undefined` means don't filter by favorite. `boolean` filters forms. */
|
|
98
|
+
favorites?: boolean;
|
|
99
|
+
/** organization owner */
|
|
100
|
+
owner_organization?: number;
|
|
101
|
+
/** user owner */
|
|
102
|
+
owner_user?: number;
|
|
103
|
+
}>;
|
|
104
|
+
export declare const selectFilteredForms: SelectorWithArgs<FormSearchArgs, CachedUserForm[]>;
|
|
105
|
+
export declare const selectForm: SelectorWithArgs<string, Stored<UserForm>>;
|
|
106
|
+
export declare const selectFormMapping: Selector<Record<Stored<UserForm>["offline_id"], Stored<UserForm>>>;
|
|
107
|
+
export declare const selectFormOfComponentType: SelectorWithArgs<string, Stored<UserForm>>;
|
|
108
|
+
export declare const selectFormsCount: Selector<number>;
|
|
109
|
+
export declare const selectGeneralFormCount: Selector<number>;
|
|
110
|
+
export declare const formReducer: Reducer<FormState>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { Selector, SelectorWithArgs, Stored, UserFormSubmission, UserFormSubmissionAttachment } from "../../typings";
|
|
3
|
+
export interface FormSubmissionState {
|
|
4
|
+
formSubmissions: Record<UserFormSubmission["offline_id"], Stored<UserFormSubmission>>;
|
|
5
|
+
attachments: Record<UserFormSubmissionAttachment["offline_id"], Stored<UserFormSubmissionAttachment>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const formSubmissionSlice: import("@reduxjs/toolkit").Slice<FormSubmissionState, {
|
|
8
|
+
setFormSubmission: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<Stored<UserFormSubmission>>) => void;
|
|
9
|
+
setFormSubmissions: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
10
|
+
payload: Stored<UserFormSubmission>[];
|
|
11
|
+
}) => void;
|
|
12
|
+
addFormSubmission: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<Stored<UserFormSubmission>>) => void;
|
|
13
|
+
addFormSubmissions: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
14
|
+
payload: Stored<UserFormSubmission>[];
|
|
15
|
+
}) => void;
|
|
16
|
+
updateFormSubmission: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<Stored<UserFormSubmission>>) => void;
|
|
17
|
+
updateFormSubmissions: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
18
|
+
payload: Stored<UserFormSubmission>[];
|
|
19
|
+
}) => void;
|
|
20
|
+
deleteFormSubmission: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<UserFormSubmission["offline_id"]>) => void;
|
|
21
|
+
deleteFormSubmissions: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
22
|
+
payload: UserFormSubmission["offline_id"][];
|
|
23
|
+
}) => void;
|
|
24
|
+
addFormSubmissionAttachment: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<UserFormSubmissionAttachment>) => void;
|
|
25
|
+
addFormSubmissionAttachments: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
26
|
+
payload: UserFormSubmissionAttachment[];
|
|
27
|
+
}) => void;
|
|
28
|
+
setFormSubmissionAttachments: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
29
|
+
payload: UserFormSubmissionAttachment[];
|
|
30
|
+
}) => void;
|
|
31
|
+
updateFormSubmissionAttachments: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<Stored<UserFormSubmissionAttachment>[]>) => void;
|
|
32
|
+
deleteFormSubmissionAttachment: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: PayloadAction<UserFormSubmissionAttachment["offline_id"]>) => void;
|
|
33
|
+
deleteFormSubmissionAttachments: (state: import("immer/dist/internal.js").WritableDraft<FormSubmissionState>, action: {
|
|
34
|
+
payload: UserFormSubmissionAttachment["offline_id"][];
|
|
35
|
+
}) => void;
|
|
36
|
+
}, "formSubmissions">;
|
|
37
|
+
export declare const setFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmission>, "formSubmissions/setFormSubmission">, setFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmission>[], "formSubmissions/setFormSubmissions">, addFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmission>, "formSubmissions/addFormSubmission">, addFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmission>[], "formSubmissions/addFormSubmissions">, updateFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmission>, "formSubmissions/updateFormSubmission">, updateFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmission>[], "formSubmissions/updateFormSubmissions">, deleteFormSubmission: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formSubmissions/deleteFormSubmission">, deleteFormSubmissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formSubmissions/deleteFormSubmissions">, addFormSubmissionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<UserFormSubmissionAttachment, "formSubmissions/addFormSubmissionAttachment">, addFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<UserFormSubmissionAttachment[], "formSubmissions/addFormSubmissionAttachments">, setFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<UserFormSubmissionAttachment[], "formSubmissions/setFormSubmissionAttachments">, updateFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<UserFormSubmissionAttachment>[], "formSubmissions/updateFormSubmissionAttachments">, deleteFormSubmissionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formSubmissions/deleteFormSubmissionAttachment">, deleteFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formSubmissions/deleteFormSubmissionAttachments">;
|
|
38
|
+
export declare const selectFormSubmissionsMapping: Selector<FormSubmissionState["formSubmissions"]>;
|
|
39
|
+
export declare const selectFormSubmissions: Selector<Stored<UserFormSubmission>[]>;
|
|
40
|
+
export declare const selectFormSubmission: SelectorWithArgs<string, Stored<UserFormSubmission>>;
|
|
41
|
+
export declare const selectFormSubmissionsOfForm: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
|
|
42
|
+
export declare const selectFormSubmissionsOfIssue: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
|
|
43
|
+
export declare const selectFormSubmissionsOfComponent: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
|
|
44
|
+
export declare const selectFormSubmissionsByComponents: Selector<Record<string, Stored<UserFormSubmission>[]>>;
|
|
45
|
+
export declare const selectFormSubmissionAttachmentsMapping: Selector<FormSubmissionState["attachments"]>;
|
|
46
|
+
export declare const selectAttachmentsOfFormSubmission: SelectorWithArgs<string, Stored<UserFormSubmissionAttachment>[]>;
|
|
47
|
+
export declare const formSubmissionReducer: Reducer<FormSubmissionState>;
|
|
@@ -14,10 +14,13 @@ export * from "./projectFileSlice";
|
|
|
14
14
|
export * from "./projectSlice";
|
|
15
15
|
export * from "./rehydratedSlice";
|
|
16
16
|
export * from "./settingsSlice";
|
|
17
|
-
export * from "./
|
|
17
|
+
export * from "./formSlice";
|
|
18
|
+
export * from "./formSubmissionSlice";
|
|
19
|
+
export * from "./formRevisionSlice";
|
|
18
20
|
export * from "./userSlice";
|
|
19
21
|
export * from "./workspaceSlice";
|
|
20
22
|
export * from "./organizationAccessSlice";
|
|
21
23
|
export * from "./emailDomainsSlice";
|
|
22
24
|
export * from "./licenseSlice";
|
|
23
25
|
export * from "./documentSlice";
|
|
26
|
+
export * from "./teamSlice";
|
|
@@ -132,12 +132,15 @@ export declare const selectAllAttachments: ((state: import("redux").EmptyObject
|
|
|
132
132
|
projectFileReducer: import('..').ProjectFileState;
|
|
133
133
|
rehydratedReducer: import('..').RehydratedState;
|
|
134
134
|
settingReducer: import('..').SettingState;
|
|
135
|
-
|
|
135
|
+
formReducer: import('..').FormState;
|
|
136
136
|
userReducer: import('..').UserState;
|
|
137
|
+
formRevisionReducer: import('..').FormRevisionState;
|
|
138
|
+
formSubmissionReducer: import('..').FormSubmissionState;
|
|
137
139
|
workspaceReducer: import("./workspaceSlice").WorkspaceState;
|
|
138
140
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
139
141
|
licenseReducer: import('..').LicenseState;
|
|
140
142
|
documentsReducer: import('..').DocumentState;
|
|
143
|
+
teamReducer: import('..').TeamState;
|
|
141
144
|
} & {
|
|
142
145
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
143
146
|
}) => Stored<IssueAttachment>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<IssueAttachment>>) => Stored<IssueAttachment>[], {
|
|
@@ -68,12 +68,15 @@ export declare const selectProjectFiles: ((state: import("redux").EmptyObject &
|
|
|
68
68
|
projectFileReducer: ProjectFileState;
|
|
69
69
|
rehydratedReducer: import('..').RehydratedState;
|
|
70
70
|
settingReducer: import('..').SettingState;
|
|
71
|
-
|
|
71
|
+
formReducer: import('..').FormState;
|
|
72
72
|
userReducer: import('..').UserState;
|
|
73
|
+
formRevisionReducer: import('..').FormRevisionState;
|
|
74
|
+
formSubmissionReducer: import('..').FormSubmissionState;
|
|
73
75
|
workspaceReducer: import('..').WorkspaceState;
|
|
74
76
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
75
77
|
licenseReducer: import('..').LicenseState;
|
|
76
78
|
documentsReducer: import('..').DocumentState;
|
|
79
|
+
teamReducer: import('..').TeamState;
|
|
77
80
|
} & {
|
|
78
81
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
79
82
|
}) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile>, args_1: number | null) => ProjectFile[], {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { Team, Stored, Selector, SelectorWithArgs, Organization, User } from "../../typings";
|
|
3
|
+
export interface TeamState {
|
|
4
|
+
teams: Record<Team["offline_id"], Stored<Team>>;
|
|
5
|
+
}
|
|
6
|
+
export declare const teamSlice: import("@reduxjs/toolkit").Slice<TeamState, {
|
|
7
|
+
setTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>>) => void;
|
|
8
|
+
setTeams: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>[]>) => void;
|
|
9
|
+
addTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>>) => void;
|
|
10
|
+
updateTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>>) => void;
|
|
11
|
+
deleteTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Team["offline_id"]>) => void;
|
|
12
|
+
}, "teams">;
|
|
13
|
+
export declare const setTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>, "teams/setTeam">, setTeams: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>[], "teams/setTeams">, addTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>, "teams/addTeam">, updateTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>, "teams/updateTeam">, deleteTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "teams/deleteTeam">;
|
|
14
|
+
export declare const selectTeamsMapping: Selector<TeamState["teams"]>;
|
|
15
|
+
export declare const selectTeams: Selector<Stored<Team>[]>;
|
|
16
|
+
export declare const selectTeam: SelectorWithArgs<string, Stored<Team>>;
|
|
17
|
+
export declare const selectTeamsOfOrganization: SelectorWithArgs<Organization["id"], Stored<Team>[]>;
|
|
18
|
+
export declare const selectTeamsOfUser: SelectorWithArgs<User["id"], Stored<Team>[]>;
|
|
19
|
+
export declare const teamReducer: Reducer<TeamState>;
|
|
@@ -7,6 +7,7 @@ export declare function setAttachments<TAttachment, TState extends AttachmentSta
|
|
|
7
7
|
export declare function addAttachment<TAttachment, TState extends AttachmentState<TAttachment>>(state: TState, action: PayloadAction<Submitted<TAttachment>>): void;
|
|
8
8
|
export declare function addAttachments<TAttachment, TState extends AttachmentState<TAttachment>>(state: TState, action: PayloadAction<Submitted<TAttachment>[]>): void;
|
|
9
9
|
export declare function updateAttachment<TAttachment, TState extends AttachmentState<TAttachment>>(state: TState, action: PayloadAction<Submitted<TAttachment>>): void;
|
|
10
|
+
export declare function updateAttachments<TAttachment, TState extends AttachmentState<TAttachment>>(state: TState, action: PayloadAction<Submitted<TAttachment>[]>): void;
|
|
10
11
|
export declare function removeAttachment<TAttachment, TState extends AttachmentState<TAttachment>>(state: TState, action: PayloadAction<string>): void;
|
|
11
12
|
export declare function removeAttachments<TAttachment, TState extends AttachmentState<TAttachment>>(state: TState, action: PayloadAction<string[]>): void;
|
|
12
13
|
export {};
|
|
@@ -46,12 +46,15 @@ export declare const selectWorkspaces: ((state: import("redux").EmptyObject & {
|
|
|
46
46
|
projectFileReducer: import('..').ProjectFileState;
|
|
47
47
|
rehydratedReducer: import('..').RehydratedState;
|
|
48
48
|
settingReducer: import('..').SettingState;
|
|
49
|
-
|
|
49
|
+
formReducer: import('..').FormState;
|
|
50
50
|
userReducer: import('..').UserState;
|
|
51
|
+
formRevisionReducer: import('..').FormRevisionState;
|
|
52
|
+
formSubmissionReducer: import('..').FormSubmissionState;
|
|
51
53
|
workspaceReducer: WorkspaceState;
|
|
52
54
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
53
55
|
licenseReducer: import('..').LicenseState;
|
|
54
56
|
documentsReducer: import('..').DocumentState;
|
|
57
|
+
teamReducer: import('..').TeamState;
|
|
55
58
|
} & {
|
|
56
59
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
57
60
|
}) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
|
package/dist/store/store.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyAction, Reducer } from "redux";
|
|
|
3
3
|
import { Config, OfflineAction, OfflineMetadata, OfflineState } from "@redux-offline/redux-offline/lib/types";
|
|
4
4
|
import request from "superagent";
|
|
5
5
|
import { type OfflineMetaEffect, type OvermapSDK, RequestDetails } from "../sdk";
|
|
6
|
-
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState,
|
|
6
|
+
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, FormState, FormRevisionState, FormSubmissionState, UserState, WorkspaceState, TeamState } from "./slices";
|
|
7
7
|
import { VersioningState } from "./slices/versioningSlice";
|
|
8
8
|
import { RootState } from "../typings";
|
|
9
9
|
export declare const overmapReducers: {
|
|
@@ -25,12 +25,15 @@ export declare const overmapReducers: {
|
|
|
25
25
|
projectFileReducer: Reducer<ProjectFileState>;
|
|
26
26
|
rehydratedReducer: Reducer<RehydratedState>;
|
|
27
27
|
settingReducer: Reducer<SettingState>;
|
|
28
|
-
|
|
28
|
+
formReducer: Reducer<FormState>;
|
|
29
29
|
userReducer: Reducer<UserState>;
|
|
30
|
+
formRevisionReducer: Reducer<FormRevisionState>;
|
|
31
|
+
formSubmissionReducer: Reducer<FormSubmissionState>;
|
|
30
32
|
workspaceReducer: Reducer<WorkspaceState>;
|
|
31
33
|
emailDomainsReducer: Reducer<EmailDomainState>;
|
|
32
34
|
licenseReducer: Reducer<LicenseState>;
|
|
33
35
|
documentsReducer: Reducer<DocumentState>;
|
|
36
|
+
teamReducer: Reducer<TeamState>;
|
|
34
37
|
};
|
|
35
38
|
export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
36
39
|
versioning: VersioningState;
|
|
@@ -51,12 +54,15 @@ export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
|
51
54
|
projectFileReducer: ProjectFileState;
|
|
52
55
|
rehydratedReducer: RehydratedState;
|
|
53
56
|
settingReducer: SettingState;
|
|
54
|
-
|
|
57
|
+
formReducer: FormState;
|
|
55
58
|
userReducer: UserState;
|
|
59
|
+
formRevisionReducer: FormRevisionState;
|
|
60
|
+
formSubmissionReducer: FormSubmissionState;
|
|
56
61
|
workspaceReducer: WorkspaceState;
|
|
57
62
|
emailDomainsReducer: EmailDomainState;
|
|
58
63
|
licenseReducer: LicenseState;
|
|
59
64
|
documentsReducer: DocumentState;
|
|
65
|
+
teamReducer: TeamState;
|
|
60
66
|
}>, AnyAction>;
|
|
61
67
|
export declare const resetStore = "RESET";
|
|
62
68
|
export declare const rootReducer: Reducer<RootState>;
|
|
@@ -95,12 +101,15 @@ export declare const defaultStore: import("@reduxjs/toolkit/dist/configureStore"
|
|
|
95
101
|
projectFileReducer: ProjectFileState;
|
|
96
102
|
rehydratedReducer: RehydratedState;
|
|
97
103
|
settingReducer: SettingState;
|
|
98
|
-
|
|
104
|
+
formReducer: FormState;
|
|
99
105
|
userReducer: UserState;
|
|
106
|
+
formRevisionReducer: FormRevisionState;
|
|
107
|
+
formSubmissionReducer: FormSubmissionState;
|
|
100
108
|
workspaceReducer: WorkspaceState;
|
|
101
109
|
emailDomainsReducer: EmailDomainState;
|
|
102
110
|
licenseReducer: LicenseState;
|
|
103
111
|
documentsReducer: DocumentState;
|
|
112
|
+
teamReducer: TeamState;
|
|
104
113
|
} & {
|
|
105
114
|
offline: OfflineState;
|
|
106
115
|
}, AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<RootState, AnyAction>]>>;
|
package/dist/style.css
CHANGED
|
@@ -154,6 +154,11 @@
|
|
|
154
154
|
overflow-x: auto;
|
|
155
155
|
white-space: nowrap;
|
|
156
156
|
padding-top: calc(var(--space-1) + 1px);
|
|
157
|
+
}._QrScannerWrapper_1puz3_1 {
|
|
158
|
+
background: var(--color-background);
|
|
159
|
+
}
|
|
160
|
+
._QrScannerWrapper_1puz3_1 svg {
|
|
161
|
+
stroke: #29A383 !important;
|
|
157
162
|
}._PDFViewerTopbar_103p8_1 {
|
|
158
163
|
background: var(--color-background);
|
|
159
164
|
}
|
package/dist/typings/files.d.ts
CHANGED
|
@@ -5,7 +5,17 @@ export type MaybeObjectURL<T> = T & {
|
|
|
5
5
|
* Represents a file model that has been uploaded to the backend.
|
|
6
6
|
* A corresponding abstract model exists in the backend (FileModelMixin).
|
|
7
7
|
*/
|
|
8
|
-
export type
|
|
8
|
+
export type FileModel = MaybeObjectURL<{
|
|
9
9
|
file_sha1: string;
|
|
10
10
|
file: string;
|
|
11
11
|
}>;
|
|
12
|
+
export interface FileWithNameModel extends FileModel {
|
|
13
|
+
file_name: string;
|
|
14
|
+
}
|
|
15
|
+
/** the attributes needed to generate a presigned url for a file that is being attempted to be uploaded */
|
|
16
|
+
export interface FileUploadPayload {
|
|
17
|
+
sha1: string;
|
|
18
|
+
extension: string;
|
|
19
|
+
file_type: string;
|
|
20
|
+
size: number;
|
|
21
|
+
}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
import { OfflineModel } from "./base";
|
|
2
|
-
import { MaybeObjectURL,
|
|
2
|
+
import { MaybeObjectURL, FileModel, FileWithNameModel } from "../files";
|
|
3
3
|
import { Project } from "./projects";
|
|
4
|
-
import {
|
|
5
|
-
export interface Attachment extends OfflineModel,
|
|
4
|
+
import { Document } from "./documents";
|
|
5
|
+
export interface Attachment extends OfflineModel, FileWithNameModel {
|
|
6
6
|
description?: string;
|
|
7
|
-
file_name: string;
|
|
8
7
|
file_type: string;
|
|
9
8
|
submitted_at: string;
|
|
10
9
|
created_by: number;
|
|
11
10
|
}
|
|
12
|
-
export interface IssueAttachment extends Attachment
|
|
11
|
+
export interface IssueAttachment extends Attachment {
|
|
13
12
|
issue: string;
|
|
14
13
|
}
|
|
15
|
-
export interface ComponentAttachment extends Attachment
|
|
14
|
+
export interface ComponentAttachment extends Attachment {
|
|
16
15
|
component: string;
|
|
17
16
|
}
|
|
18
|
-
export interface ComponentTypeAttachment extends Attachment
|
|
17
|
+
export interface ComponentTypeAttachment extends Attachment {
|
|
19
18
|
component_type: string;
|
|
20
19
|
}
|
|
21
|
-
export interface ProjectAttachment extends Attachment
|
|
20
|
+
export interface ProjectAttachment extends Attachment {
|
|
22
21
|
project: Project["id"];
|
|
23
22
|
}
|
|
24
|
-
export interface DocumentAttachment extends Attachment
|
|
25
|
-
document:
|
|
23
|
+
export interface DocumentAttachment extends Attachment {
|
|
24
|
+
document: Document["offline_id"];
|
|
26
25
|
}
|
|
27
26
|
/** to get an AttachmentPayload for a specific type, pass in the given AttachmentType
|
|
28
27
|
* ex. AttachmentPayload<IssueAttachment> */
|
|
29
28
|
export type AttachmentPayload<TAttachment> = Omit<TAttachment, "file" | "submitted_at" | "created_by"> & {
|
|
30
29
|
file: MaybeObjectURL<File>;
|
|
31
30
|
};
|
|
32
|
-
export
|
|
33
|
-
file: string;
|
|
34
|
-
}
|
|
31
|
+
export type ProfilePic = FileModel;
|
|
@@ -4,6 +4,13 @@ export interface Model {
|
|
|
4
4
|
export interface OfflineModel extends Model {
|
|
5
5
|
offline_id: string;
|
|
6
6
|
}
|
|
7
|
+
export interface SubmittedAtModel extends Model {
|
|
8
|
+
submitted_at: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TimestampedModel extends Model {
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
}
|
|
7
14
|
export type Offline<T> = T & {
|
|
8
15
|
offline_id: string;
|
|
9
16
|
};
|
|
@@ -26,6 +33,9 @@ export interface OwnedByUserOrOrganization {
|
|
|
26
33
|
user_owner: number;
|
|
27
34
|
organization_owner: number;
|
|
28
35
|
}
|
|
36
|
+
export interface SubmittedAtModel {
|
|
37
|
+
submitted_at: string;
|
|
38
|
+
}
|
|
29
39
|
export interface IconModel {
|
|
30
40
|
icon: string;
|
|
31
41
|
icon_color: CSSColor;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import { OfflineModel } from "./base";
|
|
1
|
+
import { OfflineModel, Payload } from "./base";
|
|
2
2
|
import { User } from "./users";
|
|
3
|
-
export
|
|
3
|
+
export type SubmittedDocument = OfflineModel & {
|
|
4
4
|
title: string | null;
|
|
5
5
|
description: string | null;
|
|
6
6
|
content: string | null;
|
|
7
|
+
parent_document: string | null;
|
|
7
8
|
created_by: User["id"];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
} & ({
|
|
10
|
+
project: number;
|
|
11
|
+
organization: null;
|
|
12
|
+
} | {
|
|
13
|
+
organization: number;
|
|
14
|
+
project: null;
|
|
15
|
+
});
|
|
16
|
+
export type Document = SubmittedDocument & {
|
|
17
|
+
children_documents: string[];
|
|
18
|
+
};
|
|
19
|
+
export type CreatedDocument = Document & {
|
|
20
|
+
created_by: User["id"];
|
|
21
|
+
created_at: string;
|
|
22
|
+
updated_at: string;
|
|
23
|
+
};
|
|
24
|
+
export type DocumentPayload = Payload<Omit<SubmittedDocument, "project" | "organization" | "created_by">>;
|
|
11
25
|
export type MovePosition = "left" | "right" | "left-child" | "right-child";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OfflineModel, Payload } from "./base";
|
|
1
|
+
import { OfflineModel, Payload, SubmittedAtModel } from "./base";
|
|
2
2
|
import { BaseSerializedObject, FieldValue, ISerializedField } from "../../forms";
|
|
3
|
-
import {
|
|
3
|
+
import { FileWithNameModel } from '../files';
|
|
4
4
|
import { WorkspaceIndexedModel } from "./workspace";
|
|
5
5
|
export type UserForm = Pick<WorkspaceIndexedModel, "index_workspace"> & {
|
|
6
6
|
favorite: boolean;
|
|
@@ -28,28 +28,24 @@ export interface UserFormRevision<TFields extends BaseSerializedObject = ISerial
|
|
|
28
28
|
description?: string;
|
|
29
29
|
fields: TFields[];
|
|
30
30
|
created_by: number;
|
|
31
|
+
submitted_at: string;
|
|
31
32
|
revision: number | "Pending";
|
|
32
33
|
}
|
|
33
|
-
export type UserFormRevisionPayload = Omit<Payload<UserFormRevision>, "created_by" | "revision" | "form">;
|
|
34
|
-
export interface UserFormSubmission extends OfflineModel {
|
|
34
|
+
export type UserFormRevisionPayload = Omit<Payload<UserFormRevision>, "created_by" | "revision" | "form" | "submitted_at">;
|
|
35
|
+
export interface UserFormSubmission extends OfflineModel, SubmittedAtModel {
|
|
35
36
|
form_revision: string;
|
|
36
37
|
values: Record<string, FieldValue>;
|
|
37
38
|
created_by: number;
|
|
38
|
-
created_at: string;
|
|
39
|
-
submitted_at: string;
|
|
40
|
-
updated_at: string;
|
|
41
39
|
issue?: string;
|
|
42
40
|
component?: string;
|
|
43
41
|
component_stage?: string;
|
|
44
42
|
}
|
|
45
|
-
export interface UserFormSubmissionAttachment extends OfflineModel,
|
|
43
|
+
export interface UserFormSubmissionAttachment extends OfflineModel, FileWithNameModel {
|
|
46
44
|
submission: string;
|
|
47
|
-
file_name: string;
|
|
48
45
|
field_identifier: string;
|
|
49
46
|
}
|
|
50
|
-
export interface UserFormRevisionAttachment extends OfflineModel,
|
|
47
|
+
export interface UserFormRevisionAttachment extends OfflineModel, FileWithNameModel {
|
|
51
48
|
revision: string;
|
|
52
|
-
file_name: string;
|
|
53
49
|
field_identifier: string;
|
|
54
50
|
}
|
|
55
|
-
export type UserFormSubmissionPayload = Omit<Payload<UserFormSubmission>, "created_by">;
|
|
51
|
+
export type UserFormSubmissionPayload = Omit<Payload<UserFormSubmission>, "created_by" | "submitted_at">;
|
|
@@ -5,17 +5,18 @@ import { Marker } from "./geo";
|
|
|
5
5
|
import { CreatedUserForm, SubmittedUserForm, UserForm } from "./forms";
|
|
6
6
|
import { User } from "./users";
|
|
7
7
|
import { CSSColor } from "../colors";
|
|
8
|
+
import { CreatedDocument, SubmittedDocument } from "./documents";
|
|
8
9
|
/**
|
|
9
10
|
* Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
|
|
10
11
|
* all cases, the `offline_id`) are guaranteed to be set.
|
|
11
12
|
*/
|
|
12
|
-
export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends UserForm ? SubmittedUserForm : Omit<TModel, "created_at" | "created_by" | "id">);
|
|
13
|
+
export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends UserForm ? SubmittedUserForm : TModel extends Document ? SubmittedDocument : Omit<TModel, "created_at" | "created_by" | "id">);
|
|
13
14
|
/**
|
|
14
15
|
* Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
|
|
15
16
|
* typically have additional properties that are only known once it has been processed and accepted by the API, such as
|
|
16
17
|
* the `created_at` timestamp, which is the time at which the data was written to the database.
|
|
17
18
|
*/
|
|
18
|
-
export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends UserForm ? CreatedUserForm : TModel);
|
|
19
|
+
export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends UserForm ? CreatedUserForm : TModel extends Document ? CreatedDocument : TModel);
|
|
19
20
|
/**
|
|
20
21
|
* Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
|
|
21
22
|
* data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconModel, OfflineModel, Payload, SubmittedAtModel } from "./base";
|
|
2
|
+
import { Organization } from "./organizations";
|
|
3
|
+
import { User } from "./users";
|
|
4
|
+
export interface Team extends OfflineModel, SubmittedAtModel, IconModel {
|
|
5
|
+
name: string;
|
|
6
|
+
parent: OfflineModel["offline_id"] | null;
|
|
7
|
+
organization: Organization["id"];
|
|
8
|
+
members: User["id"][];
|
|
9
|
+
}
|
|
10
|
+
export type TeamPayload = Omit<Payload<Team>, "organization" | "submitted_at">;
|
package/dist/utils/file.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FileUploadPayload } from "../typings";
|
|
1
2
|
export declare const getFileS3Key: (file: File, hash?: string) => Promise<string>;
|
|
2
3
|
export declare function hashFile(file: Blob): Promise<string>;
|
|
3
4
|
export declare function getFileIdentifier(file: File): string;
|
|
@@ -5,6 +6,7 @@ export declare function getRenamedFile(file: File, newName: string): File & {
|
|
|
5
6
|
name: string;
|
|
6
7
|
};
|
|
7
8
|
export declare function downloadInMemoryFile(filename: string, text: string): void;
|
|
9
|
+
export declare const constructUploadedFilePayloads: (files: File[]) => Promise<FileUploadPayload[]>;
|
|
8
10
|
export declare const fileToBlob: (dataUrl: string) => Promise<Blob>;
|
|
9
11
|
export declare const blobToBase64: (blob: Blob) => Promise<string>;
|
|
10
12
|
export interface useFileSrcProps {
|
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.
|
|
6
|
+
"version": "1.0.52",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"lodash.clonedeep": "^4.5.0",
|
|
40
40
|
"lodash.get": "^4.4.2",
|
|
41
41
|
"lodash.set": "^4.3.2",
|
|
42
|
+
"qr-scanner": "^1.4.2",
|
|
42
43
|
"react-leaflet": "^4.2.1",
|
|
43
44
|
"react-pdf": "^8.0.2",
|
|
44
45
|
"react-sketch-canvas": "^6.2.0",
|