@overmap-ai/core 1.0.60-export-overmap-reducer.2 → 1.0.60-forms-removal.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/index.d.ts +0 -5
- package/dist/overmap-core.js +919 -13042
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +955 -13080
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/base.d.ts +11 -0
- package/dist/sdk/globals.d.ts +7 -0
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/sdk.d.ts +4 -51
- package/dist/sdk/services/AgentService.d.ts +4 -3
- package/dist/sdk/services/AssetAttachmentService.d.ts +4 -3
- package/dist/sdk/services/AssetService.d.ts +5 -4
- package/dist/sdk/services/AssetStageCompletionService.d.ts +5 -4
- package/dist/sdk/services/AssetStageService.d.ts +4 -3
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +4 -3
- package/dist/sdk/services/AssetTypeService.d.ts +5 -4
- package/dist/sdk/services/BaseApiService.d.ts +7 -4
- package/dist/sdk/services/BaseAttachmentService.d.ts +6 -5
- package/dist/sdk/services/BaseAuthService.d.ts +12 -0
- package/dist/sdk/services/BaseService.d.ts +15 -0
- package/dist/sdk/services/CategoryService.d.ts +5 -4
- package/dist/sdk/services/DocumentAttachmentService.d.ts +4 -3
- package/dist/sdk/services/DocumentService.d.ts +5 -4
- package/dist/sdk/services/EmailDomainsService.d.ts +4 -3
- package/dist/sdk/services/EmailVerificationService.d.ts +3 -2
- package/dist/sdk/services/FileService.d.ts +4 -1
- package/dist/sdk/services/IssueAttachmentService.d.ts +4 -3
- package/dist/sdk/services/IssueCommentService.d.ts +5 -4
- package/dist/sdk/services/IssueService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeService.d.ts +6 -5
- package/dist/sdk/services/IssueUpdateService.d.ts +4 -2
- package/dist/sdk/services/JWTAuthService.d.ts +36 -0
- package/dist/sdk/services/LicenseService.d.ts +4 -3
- package/dist/sdk/services/OrganizationAccessService.d.ts +4 -3
- package/dist/sdk/services/OrganizationService.d.ts +4 -4
- package/dist/sdk/services/ProjectAccessService.d.ts +4 -3
- package/dist/sdk/services/ProjectAttachmentService.d.ts +4 -3
- package/dist/sdk/services/ProjectFileService.d.ts +4 -2
- package/dist/sdk/services/ProjectService.d.ts +3 -2
- package/dist/sdk/services/TeamService.d.ts +6 -5
- package/dist/sdk/services/UserFormService.d.ts +5 -5
- package/dist/sdk/services/UserFormSubmissionService.d.ts +6 -6
- package/dist/sdk/services/UserService.d.ts +6 -0
- package/dist/sdk/services/WorkspaceService.d.ts +4 -1
- package/dist/sdk/services/index.d.ts +2 -2
- package/dist/sdk/typings.d.ts +5 -1
- package/dist/store/slices/agentsSlice.d.ts +2 -2
- package/dist/store/slices/assetAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/assetSlice.d.ts +6 -6
- package/dist/store/slices/assetStageCompletionSlice.d.ts +2 -2
- package/dist/store/slices/assetStageSlice.d.ts +7 -7
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/assetTypeSlice.d.ts +7 -7
- package/dist/store/slices/authSlice.d.ts +3 -3
- package/dist/store/slices/categorySlice.d.ts +4 -4
- package/dist/store/slices/documentAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/documentSlice.d.ts +17 -17
- package/dist/store/slices/emailDomainsSlice.d.ts +2 -2
- package/dist/store/slices/fileSlice.d.ts +2 -2
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/formRevisionSlice.d.ts +19 -19
- package/dist/store/slices/formSlice.d.ts +8 -8
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/formSubmissionSlice.d.ts +11 -11
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/issueSlice.d.ts +5 -5
- package/dist/store/slices/issueTypeSlice.d.ts +7 -7
- package/dist/store/slices/licenseSlice.d.ts +7 -7
- package/dist/store/slices/organizationAccessSlice.d.ts +4 -4
- package/dist/store/slices/organizationSlice.d.ts +13 -13
- package/dist/store/slices/outboxSlice.d.ts +3 -1
- package/dist/store/slices/projectAccessSlice.d.ts +6 -6
- package/dist/store/slices/projectAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/projectFileSlice.d.ts +4 -4
- package/dist/store/slices/projectSlice.d.ts +7 -7
- package/dist/store/slices/teamSlice.d.ts +6 -6
- package/dist/store/slices/userSlice.d.ts +2 -2
- package/dist/store/slices/workspaceSlice.d.ts +6 -6
- package/dist/store/store.d.ts +4 -5
- package/dist/typings/colors.d.ts +0 -3
- package/dist/typings/models/forms.d.ts +88 -1
- package/dist/typings/models/organizations.d.ts +0 -11
- package/dist/typings/models/store.d.ts +6 -4
- package/dist/typings/store.d.ts +4 -2
- package/dist/utils/colors.d.ts +0 -6
- package/dist/utils/file.d.ts +0 -6
- package/package.json +7 -36
- package/dist/components/ColorPicker/ColorPicker.d.ts +0 -10
- package/dist/components/ColorPicker/index.d.ts +0 -1
- package/dist/components/FileBadge/FileBadge.d.ts +0 -8
- package/dist/components/FileBadge/index.d.ts +0 -1
- package/dist/components/FileCard/FileCard.d.ts +0 -8
- package/dist/components/FileCard/index.d.ts +0 -1
- package/dist/components/FileIcon/FileIcon.d.ts +0 -5
- package/dist/components/FileIcon/index.d.ts +0 -1
- package/dist/components/FileViewer/FileViewerProvider.d.ts +0 -2
- package/dist/components/FileViewer/context.d.ts +0 -5
- package/dist/components/FileViewer/index.d.ts +0 -3
- package/dist/components/FileViewer/typings.d.ts +0 -5
- package/dist/components/ImageCard/ImageCard.d.ts +0 -9
- package/dist/components/ImageCard/index.d.ts +0 -1
- package/dist/components/ImageMarkup/ImageMarkup.d.ts +0 -14
- package/dist/components/ImageMarkup/index.d.ts +0 -1
- package/dist/components/ImageViewer/ImageViewer.d.ts +0 -8
- package/dist/components/ImageViewer/constants.d.ts +0 -1
- package/dist/components/ImageViewer/index.d.ts +0 -2
- package/dist/components/PDFViewer/PDFViewer.d.ts +0 -8
- package/dist/components/PDFViewer/constants.d.ts +0 -1
- package/dist/components/PDFViewer/index.d.ts +0 -2
- package/dist/components/SpreadsheetViewer/SpreadsheetViewer.d.ts +0 -8
- package/dist/components/SpreadsheetViewer/constants.d.ts +0 -1
- package/dist/components/SpreadsheetViewer/index.d.ts +0 -2
- package/dist/components/index.d.ts +0 -10
- package/dist/contexts/hooks.d.ts +0 -2
- package/dist/contexts/index.d.ts +0 -3
- package/dist/contexts/overmap.d.ts +0 -12
- package/dist/contexts/sdk/globals.d.ts +0 -4
- package/dist/contexts/sdk/hooks.d.ts +0 -4
- package/dist/contexts/sdk/index.d.ts +0 -2
- package/dist/contexts/sdk/sdk.d.ts +0 -15
- package/dist/forms/builder/DropDispatch.d.ts +0 -27
- package/dist/forms/builder/FieldActions.d.ts +0 -13
- package/dist/forms/builder/FieldBuilder.d.ts +0 -10
- package/dist/forms/builder/FieldSectionWithActions.d.ts +0 -11
- package/dist/forms/builder/FieldWithActions.d.ts +0 -10
- package/dist/forms/builder/FieldsEditor.d.ts +0 -6
- package/dist/forms/builder/FormBuilder.d.ts +0 -25
- package/dist/forms/builder/constants.d.ts +0 -18
- package/dist/forms/builder/hooks.d.ts +0 -7
- package/dist/forms/builder/index.d.ts +0 -2
- package/dist/forms/builder/typings.d.ts +0 -12
- package/dist/forms/builder/utils.d.ts +0 -24
- package/dist/forms/constants.d.ts +0 -2
- package/dist/forms/constantsJsx.d.ts +0 -9
- package/dist/forms/fields/BaseField/BaseField.d.ts +0 -52
- package/dist/forms/fields/BaseField/hooks.d.ts +0 -374
- package/dist/forms/fields/BaseField/index.d.ts +0 -4
- package/dist/forms/fields/BaseField/layouts.d.ts +0 -26
- package/dist/forms/fields/BaseField/typings.d.ts +0 -7
- package/dist/forms/fields/BooleanField/BooleanField.d.ts +0 -23
- package/dist/forms/fields/BooleanField/BooleanInput.d.ts +0 -4
- package/dist/forms/fields/BooleanField/index.d.ts +0 -2
- package/dist/forms/fields/CustomField/CustomField.d.ts +0 -24
- package/dist/forms/fields/CustomField/FieldInputClonerField/FieldInputCloner.d.ts +0 -8
- package/dist/forms/fields/CustomField/FieldInputClonerField/FieldInputClonerField.d.ts +0 -18
- package/dist/forms/fields/CustomField/FieldInputClonerField/index.d.ts +0 -3
- package/dist/forms/fields/CustomField/FieldInputClonerField/typings.d.ts +0 -5
- package/dist/forms/fields/CustomField/index.d.ts +0 -1
- package/dist/forms/fields/DateField/DateField.d.ts +0 -22
- package/dist/forms/fields/DateField/DateInput.d.ts +0 -4
- package/dist/forms/fields/DateField/index.d.ts +0 -2
- package/dist/forms/fields/FieldSection/FieldSection.d.ts +0 -33
- package/dist/forms/fields/FieldSection/FieldSectionLayout.d.ts +0 -7
- package/dist/forms/fields/FieldSection/index.d.ts +0 -1
- package/dist/forms/fields/MultiStringField/MultiStringField.d.ts +0 -40
- package/dist/forms/fields/MultiStringField/MultiStringInput.d.ts +0 -8
- package/dist/forms/fields/MultiStringField/index.d.ts +0 -2
- package/dist/forms/fields/NumberField/NumberField.d.ts +0 -46
- package/dist/forms/fields/NumberField/NumberInput.d.ts +0 -4
- package/dist/forms/fields/NumberField/index.d.ts +0 -2
- package/dist/forms/fields/QrField/QrField.d.ts +0 -21
- package/dist/forms/fields/QrField/QrInput.d.ts +0 -10
- package/dist/forms/fields/QrField/index.d.ts +0 -2
- package/dist/forms/fields/SelectField/BaseSelectField.d.ts +0 -34
- package/dist/forms/fields/SelectField/MultiSelectField.d.ts +0 -27
- package/dist/forms/fields/SelectField/MultiSelectInput.d.ts +0 -4
- package/dist/forms/fields/SelectField/SelectField.d.ts +0 -26
- package/dist/forms/fields/SelectField/SelectInput.d.ts +0 -4
- package/dist/forms/fields/SelectField/index.d.ts +0 -4
- package/dist/forms/fields/StringOrTextFields/StringField/StringField.d.ts +0 -26
- package/dist/forms/fields/StringOrTextFields/StringField/StringInput.d.ts +0 -4
- package/dist/forms/fields/StringOrTextFields/StringField/index.d.ts +0 -2
- package/dist/forms/fields/StringOrTextFields/StringOrTextField.d.ts +0 -34
- package/dist/forms/fields/StringOrTextFields/TextField/TextField.d.ts +0 -22
- package/dist/forms/fields/StringOrTextFields/TextField/TextInput.d.ts +0 -4
- package/dist/forms/fields/StringOrTextFields/TextField/index.d.ts +0 -2
- package/dist/forms/fields/StringOrTextFields/index.d.ts +0 -2
- package/dist/forms/fields/UploadField/UploadField.d.ts +0 -44
- package/dist/forms/fields/UploadField/UploadInput.d.ts +0 -4
- package/dist/forms/fields/UploadField/index.d.ts +0 -2
- package/dist/forms/fields/UploadField/utils.d.ts +0 -1
- package/dist/forms/fields/constants.d.ts +0 -106
- package/dist/forms/fields/hooks.d.ts +0 -6
- package/dist/forms/fields/index.d.ts +0 -12
- package/dist/forms/fields/typings.d.ts +0 -27
- package/dist/forms/fields/utils.d.ts +0 -17
- package/dist/forms/index.d.ts +0 -6
- package/dist/forms/provider.d.ts +0 -5
- package/dist/forms/renderer/FormBrowser/FormBrowser.d.ts +0 -11
- package/dist/forms/renderer/FormRenderer/FormRenderer.d.ts +0 -31
- package/dist/forms/renderer/FormSubmissionViewer/FormSubmissionViewer.d.ts +0 -17
- package/dist/forms/renderer/PatchForm/Field.d.ts +0 -17
- package/dist/forms/renderer/PatchForm/Provider.d.ts +0 -29
- package/dist/forms/renderer/PatchForm/index.d.ts +0 -2
- package/dist/forms/renderer/index.d.ts +0 -4
- package/dist/forms/typings.d.ts +0 -103
- package/dist/forms/utils.d.ts +0 -9
- package/dist/sdk/services/AuthService.d.ts +0 -54
- package/dist/sdk/services/MainService.d.ts +0 -16
- package/dist/style.css +0 -428
|
@@ -1,6 +1,92 @@
|
|
|
1
|
+
import { HTMLInputTypeAttribute } from "react";
|
|
1
2
|
import { CreatedByModel, OfflineModel, Payload, SubmittedAtModel } from "./base";
|
|
2
|
-
import { BaseSerializedObject, FieldValue, ISerializedField } from "../../forms";
|
|
3
3
|
import { FileWithNameModel } from '../files';
|
|
4
|
+
import { Marker } from "./geo";
|
|
5
|
+
export interface BaseSerializedField<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> extends BaseSerializedObject<TIdentifier> {
|
|
6
|
+
label: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
image?: File | Promise<File>;
|
|
9
|
+
}
|
|
10
|
+
export interface SerializedCondition<TValue extends FieldValue = FieldValue> {
|
|
11
|
+
identifier: string;
|
|
12
|
+
value: TValue;
|
|
13
|
+
}
|
|
14
|
+
export interface SerializedFieldSection extends BaseSerializedObject {
|
|
15
|
+
label: string | null;
|
|
16
|
+
type: "section";
|
|
17
|
+
conditional: boolean;
|
|
18
|
+
condition: SerializedCondition | null;
|
|
19
|
+
fields: Exclude<ISerializedField, SerializedFieldSection>[];
|
|
20
|
+
}
|
|
21
|
+
interface BaseSerializedStringField extends BaseSerializedField {
|
|
22
|
+
minimum_length?: number;
|
|
23
|
+
maximum_length: number;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
}
|
|
26
|
+
export type StringInputType = Exclude<HTMLInputTypeAttribute, "checkbox" | "number" | "button">;
|
|
27
|
+
export interface SerializedStringField extends BaseSerializedStringField {
|
|
28
|
+
type: "string";
|
|
29
|
+
input_type?: StringInputType;
|
|
30
|
+
}
|
|
31
|
+
export interface SerializedQrField extends BaseSerializedField {
|
|
32
|
+
type: "qr";
|
|
33
|
+
}
|
|
34
|
+
export interface SerializedTextField extends BaseSerializedStringField {
|
|
35
|
+
type: "text";
|
|
36
|
+
}
|
|
37
|
+
export interface SerializedMultiStringField extends BaseSerializedStringField {
|
|
38
|
+
type: "multi-string";
|
|
39
|
+
}
|
|
40
|
+
export interface SerializedBooleanField extends BaseSerializedField {
|
|
41
|
+
type: "boolean";
|
|
42
|
+
}
|
|
43
|
+
export interface SerializedNumberField extends BaseSerializedField {
|
|
44
|
+
type: "number";
|
|
45
|
+
minimum: number | undefined;
|
|
46
|
+
maximum: number | undefined;
|
|
47
|
+
integers: boolean;
|
|
48
|
+
placeholder?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface SerializedDateField extends BaseSerializedField {
|
|
51
|
+
type: "date";
|
|
52
|
+
}
|
|
53
|
+
export type SelectFieldOptionValue = string;
|
|
54
|
+
/** Represents an option in the select input. Not to be confused with the 'field options' of SelectField. */
|
|
55
|
+
export interface SelectFieldOption {
|
|
56
|
+
value: SelectFieldOptionValue;
|
|
57
|
+
label: string;
|
|
58
|
+
}
|
|
59
|
+
export interface SerializedSelectField extends BaseSerializedField {
|
|
60
|
+
type: "select";
|
|
61
|
+
options: SelectFieldOption[];
|
|
62
|
+
placeholder?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface SerializedMultiSelectField extends BaseSerializedField {
|
|
65
|
+
type: "multi-select";
|
|
66
|
+
options: SelectFieldOption[];
|
|
67
|
+
placeholder?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface SerializedUploadField extends BaseSerializedField {
|
|
70
|
+
type: "upload";
|
|
71
|
+
/** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept */
|
|
72
|
+
extensions?: string[];
|
|
73
|
+
/** in bytes */
|
|
74
|
+
maximum_size?: number;
|
|
75
|
+
/** how many files the user can upload to this field
|
|
76
|
+
* @default 1
|
|
77
|
+
*/
|
|
78
|
+
maximum_files?: number;
|
|
79
|
+
}
|
|
80
|
+
export type ISerializedField = SerializedTextField | SerializedBooleanField | SerializedNumberField | SerializedDateField | SerializedStringField | SerializedSelectField | SerializedFieldSection | SerializedMultiStringField | SerializedMultiSelectField | SerializedUploadField | SerializedQrField;
|
|
81
|
+
export type ISerializedOnlyField = Exclude<ISerializedField, SerializedFieldSection>;
|
|
82
|
+
/** All the possible field values */
|
|
83
|
+
export type FieldValue = string | number | boolean | string[] | File[] | Date | Marker | null;
|
|
84
|
+
export type FieldTypeIdentifier = "string" | "text" | "boolean" | "number" | "date" | "select" | "custom" | "section" | "multi-string" | "multi-select" | "upload" | "qr";
|
|
85
|
+
export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
|
|
86
|
+
description?: string | null;
|
|
87
|
+
identifier: string;
|
|
88
|
+
type: TIdentifier;
|
|
89
|
+
}
|
|
4
90
|
export interface UserForm extends OfflineModel {
|
|
5
91
|
favorite: boolean;
|
|
6
92
|
created_by: number;
|
|
@@ -45,3 +131,4 @@ export interface UserFormRevisionAttachment extends OfflineModel, FileWithNameMo
|
|
|
45
131
|
field_identifier: string;
|
|
46
132
|
}
|
|
47
133
|
export type UserFormSubmissionPayload = Omit<Payload<UserFormSubmission>, "created_by" | "submitted_at">;
|
|
134
|
+
export {};
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { CreatedByModel, Model } from "./base";
|
|
2
|
-
import { OrganizationAccess } from "./access";
|
|
3
|
-
import { EmailDomain } from "./emailDomain";
|
|
4
|
-
import { User } from "./users";
|
|
5
|
-
import { License } from "./license";
|
|
6
2
|
export interface Organization extends Model, CreatedByModel {
|
|
7
3
|
id: number;
|
|
8
4
|
name: string;
|
|
9
5
|
has_access: boolean;
|
|
10
6
|
}
|
|
11
|
-
export interface InitialOrganizationData {
|
|
12
|
-
organization: Organization;
|
|
13
|
-
users: User[];
|
|
14
|
-
organization_accesses: OrganizationAccess[];
|
|
15
|
-
email_domains: EmailDomain[];
|
|
16
|
-
licenses: License[];
|
|
17
|
-
}
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
import { OfflineState } from "@redux-offline/redux-offline/lib/types";
|
|
3
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
4
|
import { VersioningState } from "../../store/slices/versioningSlice";
|
|
5
|
-
export interface
|
|
6
|
-
|
|
5
|
+
export interface BaseState {
|
|
6
|
+
outboxReducer: OutboxState;
|
|
7
|
+
offline: OfflineState;
|
|
7
8
|
fileReducer: FileState;
|
|
8
9
|
authReducer: AuthState;
|
|
10
|
+
}
|
|
11
|
+
export interface OvermapRootState extends BaseState {
|
|
12
|
+
[VERSION_REDUCER_KEY]: VersioningState;
|
|
9
13
|
categoryReducer: CategoryState;
|
|
10
14
|
assetReducer: AssetState;
|
|
11
15
|
assetAttachmentReducer: AssetAttachmentState;
|
|
@@ -19,7 +23,6 @@ export interface OvermapRootState {
|
|
|
19
23
|
issueUpdateReducer: IssueUpdateState;
|
|
20
24
|
issueTypeReducer: IssueTypeState;
|
|
21
25
|
organizationReducer: OrganizationState;
|
|
22
|
-
outboxReducer: OutboxState;
|
|
23
26
|
projectReducer: ProjectState;
|
|
24
27
|
projectAttachmentReducer: ProjectAttachmentState;
|
|
25
28
|
projectAccessReducer: ProjectAccessState;
|
|
@@ -40,5 +43,4 @@ export interface OvermapRootState {
|
|
|
40
43
|
documentAttachmentReducer: DocumentAttachmentState;
|
|
41
44
|
teamReducer: TeamState;
|
|
42
45
|
agentsReducer: AgentsState;
|
|
43
|
-
offline: OfflineState;
|
|
44
46
|
}
|
package/dist/typings/store.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { OvermapRootState } from "./models";
|
|
2
|
-
export type SelectorWithArgs<TArgs, TRet> = (args: TArgs) => (state:
|
|
3
|
-
export type Selector<TRet> = (state:
|
|
2
|
+
export type SelectorWithArgs<TState, TArgs, TRet> = (args: TArgs) => (state: TState) => TRet | undefined;
|
|
3
|
+
export type Selector<TState, TRet> = (state: TState) => TRet;
|
|
4
|
+
export type OvermapSelectorWithArgs<TArgs, TRet> = SelectorWithArgs<OvermapRootState, TArgs, TRet>;
|
|
5
|
+
export type OvermapSelector<TRet> = Selector<OvermapRootState, TRet>;
|
|
4
6
|
export type Migrator = (state: Partial<OvermapRootState>) => Partial<OvermapRootState>;
|
|
5
7
|
export type Manifest = Record<number, Migrator>;
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThemeOptions } from "@overmap-ai/blocks";
|
|
2
1
|
import { CSSColor } from "../typings";
|
|
3
2
|
export declare const primaryColor: CSSColor;
|
|
4
3
|
export declare const successColor: CSSColor;
|
|
@@ -11,11 +10,6 @@ export interface BadgeColors {
|
|
|
11
10
|
textColor: CSSColor;
|
|
12
11
|
}
|
|
13
12
|
export declare const Colors: Record<string, CSSColor>;
|
|
14
|
-
/** This mapping is used to pick off a Radix-ui/themes Theme accentColor based on the passed in Radix-ui/colors
|
|
15
|
-
* hex color. We are currently offering the following colors in the "Colors" object defined above as possible colors for
|
|
16
|
-
* categories, any updates to those colors should also result in an update to this color mapping to ensure all Category
|
|
17
|
-
* Badges defined within the App receive the appropriate Radix-ui/themes accentColor, so they render properly. */
|
|
18
|
-
export declare const ColorsToString: Record<string, ThemeOptions["accentColor"]>;
|
|
19
13
|
export declare const AssetStageColors: Record<string, CSSColor>;
|
|
20
14
|
export declare const defaultBadgeColor: CSSColor;
|
|
21
15
|
export declare const generateBadgeColors: (rawColor: CSSColor) => BadgeColors;
|
package/dist/utils/file.d.ts
CHANGED
|
@@ -9,11 +9,5 @@ export declare function downloadInMemoryFile(filename: string, text: string): vo
|
|
|
9
9
|
export declare const constructUploadedFilePayloads: (files: File[]) => Promise<FileUploadPayload[]>;
|
|
10
10
|
export declare const fileToBlob: (dataUrl: string) => Promise<Blob>;
|
|
11
11
|
export declare const blobToBase64: (blob: Blob) => Promise<string>;
|
|
12
|
-
export interface useFileSrcProps {
|
|
13
|
-
file: string | null;
|
|
14
|
-
fileSha1: string | null;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
}
|
|
17
12
|
/** Converts a profile `file` and `fileSha1` into an img src that can be rendered. This relies on an API request. */
|
|
18
|
-
export declare const useFileSrc: (props: useFileSrcProps) => string | undefined;
|
|
19
13
|
export declare function downloadFile(file: File): void;
|
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-
|
|
6
|
+
"version": "1.0.60-forms-removal.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|
|
@@ -16,70 +16,44 @@
|
|
|
16
16
|
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
|
|
17
17
|
"preview": "vite preview",
|
|
18
18
|
"prepare": "husky install",
|
|
19
|
-
"storybook": "storybook dev -p 6006",
|
|
20
|
-
"build-storybook": "storybook build",
|
|
21
19
|
"test": "npx vitest"
|
|
22
20
|
},
|
|
23
21
|
"dependencies": {
|
|
24
|
-
"@
|
|
22
|
+
"@radix-ui/colors": "^3.0.0",
|
|
25
23
|
"@redux-offline/redux-offline": "^2.6.0",
|
|
26
24
|
"@reduxjs/toolkit": "^1.9.5",
|
|
25
|
+
"@types/file-saver": "^2.0.7",
|
|
27
26
|
"color": "^4.2.3",
|
|
28
27
|
"dependency-graph": "^1.0.0",
|
|
29
|
-
"eslint-plugin-vitest": "^0.3.20",
|
|
30
28
|
"file-saver": "^2.0.5",
|
|
31
|
-
"formik": "^2.4.5",
|
|
32
29
|
"idb": "^7.1.1",
|
|
33
30
|
"jwt-decode": "^3.1.2",
|
|
34
31
|
"leaflet-draw": "^1.0.4",
|
|
35
32
|
"leaflet.markercluster": "^1.5.3",
|
|
36
|
-
"linkify-react": "^4.1.3",
|
|
37
|
-
"linkifyjs": "^4.1.3",
|
|
38
33
|
"localforage": "^1.10.0",
|
|
39
|
-
"lodash.clonedeep": "^4.5.0",
|
|
40
|
-
"lodash.get": "^4.4.2",
|
|
41
|
-
"lodash.set": "^4.3.2",
|
|
42
|
-
"qr-scanner": "^1.4.2",
|
|
43
34
|
"react-leaflet": "^4.2.1",
|
|
44
|
-
"react-pdf": "^8.0.2",
|
|
45
|
-
"react-sketch-canvas": "^6.2.0",
|
|
46
|
-
"react-spreadsheet": "^0.9.4",
|
|
47
35
|
"redux-persist-migrate": "^5.0.0",
|
|
48
36
|
"superagent": "^8.1.2",
|
|
49
|
-
"uuid": "^9.0.0"
|
|
50
|
-
"xlsx": "^0.18.5"
|
|
37
|
+
"uuid": "^9.0.0"
|
|
51
38
|
},
|
|
52
39
|
"devDependencies": {
|
|
53
40
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
54
41
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
55
|
-
"@overmap-ai/blocks": "1.0.31-
|
|
42
|
+
"@overmap-ai/blocks": "1.0.31-tailwind-components.25",
|
|
56
43
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
57
|
-
"@storybook/addon-essentials": "7.3.2",
|
|
58
|
-
"@storybook/addon-interactions": "7.3.2",
|
|
59
|
-
"@storybook/addon-links": "7.3.2",
|
|
60
|
-
"@storybook/addon-onboarding": "1.0.8",
|
|
61
|
-
"@storybook/blocks": "7.3.2",
|
|
62
|
-
"@storybook/react": "7.3.2",
|
|
63
|
-
"@storybook/react-vite": "7.3.2",
|
|
64
|
-
"@storybook/testing-library": "0.2.0",
|
|
65
44
|
"@testing-library/dom": "^9.3.4",
|
|
66
45
|
"@testing-library/react": "^14.1.2",
|
|
67
46
|
"@testing-library/user-event": "^14.5.2",
|
|
68
47
|
"@tiptap/core": "^2.4.0",
|
|
69
48
|
"@types/color": "^3.0.4",
|
|
70
|
-
"@types/file-saver": "^2.0.7",
|
|
71
49
|
"@types/jwt-decode": "^3.1.0",
|
|
72
50
|
"@types/leaflet": "^1.9.3",
|
|
73
|
-
"@types/lodash.clonedeep": "^4.5.9",
|
|
74
|
-
"@types/lodash.get": "^4.4.9",
|
|
75
|
-
"@types/lodash.set": "^4.3.9",
|
|
76
51
|
"@types/node": "^20.12.11",
|
|
77
52
|
"@types/react": "^18.3.1",
|
|
78
53
|
"@types/react-dom": "^18.2.7",
|
|
79
54
|
"@types/react-redux": "^7.1.26",
|
|
80
55
|
"@types/superagent": "^4.1.18",
|
|
81
56
|
"@types/uuid": "^9.0.3",
|
|
82
|
-
"@types/xlsx": "^0.0.36",
|
|
83
57
|
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
84
58
|
"@typescript-eslint/parser": "^6.4.1",
|
|
85
59
|
"@vitejs/plugin-react-swc": "^3.3.2",
|
|
@@ -92,7 +66,7 @@
|
|
|
92
66
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
93
67
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
94
68
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
95
|
-
"eslint-plugin-
|
|
69
|
+
"eslint-plugin-vitest": "^0.3.20",
|
|
96
70
|
"happy-dom": "^13.3.1",
|
|
97
71
|
"husky": "^8.0.3",
|
|
98
72
|
"jsdom": "^23.2.0",
|
|
@@ -102,12 +76,9 @@
|
|
|
102
76
|
"react": "^18.2.0",
|
|
103
77
|
"react-dom": "^18.2.0",
|
|
104
78
|
"react-hooks": "^1.0.1",
|
|
105
|
-
"react-icons": "^5.4.0",
|
|
106
79
|
"react-redux": "^8.1.2",
|
|
107
80
|
"redux": "^4.2.1",
|
|
108
81
|
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
109
|
-
"sass": "^1.66.1",
|
|
110
|
-
"storybook": "7.3.2",
|
|
111
82
|
"typescript": "^5.2.2",
|
|
112
83
|
"vite": "^4.4.5",
|
|
113
84
|
"vite-plugin-dts": "^3.5.2",
|
|
@@ -115,7 +86,7 @@
|
|
|
115
86
|
"vitest": "^1.2.1"
|
|
116
87
|
},
|
|
117
88
|
"peerDependencies": {
|
|
118
|
-
"@overmap-ai/blocks": "1.0.31-
|
|
89
|
+
"@overmap-ai/blocks": "1.0.31-tailwind-components.25",
|
|
119
90
|
"@tiptap/core": "^2.4.0",
|
|
120
91
|
"leaflet": "^1.9.0",
|
|
121
92
|
"react": "^18.2.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { CSSColor } from "../../typings";
|
|
3
|
-
interface ColorPickerProps {
|
|
4
|
-
selectedColor: CSSColor | null;
|
|
5
|
-
allColors: CSSColor[];
|
|
6
|
-
onFinish: (color: CSSColor) => void;
|
|
7
|
-
trigger: ReactElement;
|
|
8
|
-
}
|
|
9
|
-
export declare const ColorPicker: import("react").MemoExoticComponent<(props: ColorPickerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ColorPicker";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BadgeProps } from "@overmap-ai/blocks";
|
|
3
|
-
export interface FileBadgeProps extends Omit<BadgeProps, "children"> {
|
|
4
|
-
file: File;
|
|
5
|
-
truncateLength?: number;
|
|
6
|
-
hideName?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const FileBadge: import("react").MemoExoticComponent<(props: FileBadgeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./FileBadge";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { OvermapItemProps } from "@overmap-ai/blocks";
|
|
3
|
-
export interface FileCardProps extends Omit<OvermapItemProps, "children" | "leftSlot"> {
|
|
4
|
-
file: File | null;
|
|
5
|
-
truncateLength?: number;
|
|
6
|
-
error?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const FileCard: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FileCardProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./FileCard";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./FileIcon";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FileViewerConfig } from "./typings";
|
|
3
|
-
export type FileViewerContextType = (func: (close: () => void) => FileViewerConfig) => void;
|
|
4
|
-
export declare const FileViewerContext: import("react").Context<FileViewerContextType>;
|
|
5
|
-
export declare const useFileViewer: () => FileViewerContextType;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { OvermapItemProps } from "@overmap-ai/blocks";
|
|
3
|
-
export interface ImageCardProps extends Omit<OvermapItemProps, "children" | "leftSlot"> {
|
|
4
|
-
file: File | null;
|
|
5
|
-
alt?: string;
|
|
6
|
-
error?: string;
|
|
7
|
-
truncateLength?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const ImageCard: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ImageCardProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ImageCard";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type FileWithObjectURL = File & {
|
|
3
|
-
objectURL?: string;
|
|
4
|
-
};
|
|
5
|
-
export interface AttachmentMarkupProps {
|
|
6
|
-
file: FileWithObjectURL;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
onSave: (imageWithMarkup: FileWithObjectURL) => void;
|
|
9
|
-
onDelete: (imageFile: FileWithObjectURL) => void;
|
|
10
|
-
dirty: boolean;
|
|
11
|
-
onDirty: (dirty: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const ImageMarkup: React.MemoExoticComponent<(props: AttachmentMarkupProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ImageMarkup";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface ImageViewerProps {
|
|
3
|
-
file: File;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
onDelete?: (file: File) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const ImageViewer: import("react").MemoExoticComponent<(props: ImageViewerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SUPPORTED_IMAGE_FILE_TYPES: string[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface PDFViewerProps {
|
|
3
|
-
file: File;
|
|
4
|
-
onDelete?: (file: File) => void;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const PDFViewer: import("react").MemoExoticComponent<(props: PDFViewerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SUPPORTED_PDF_FILE_TYPES: string[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface SpreadsheetViewerProps {
|
|
3
|
-
file: File;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
onDelete?: (file: File) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const SpreadsheetViewer: import("react").MemoExoticComponent<(props: SpreadsheetViewerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SUPPORTED_SPREADSHEET_FILE_EXTENSIONS: string[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./SpreadsheetViewer";
|
|
2
|
-
export * from "./ImageMarkup";
|
|
3
|
-
export * from "./PDFViewer";
|
|
4
|
-
export * from "./ImageViewer";
|
|
5
|
-
export * from "./FileViewer";
|
|
6
|
-
export * from "./ColorPicker";
|
|
7
|
-
export * from "./FileBadge";
|
|
8
|
-
export * from "./FileCard";
|
|
9
|
-
export * from "./FileIcon";
|
|
10
|
-
export * from "./ImageCard";
|
package/dist/contexts/hooks.d.ts
DELETED
package/dist/contexts/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
3
|
-
import { OvermapRootState } from "../typings";
|
|
4
|
-
interface OvermapProviderProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
production?: boolean;
|
|
7
|
-
disableDefaultTheme?: boolean;
|
|
8
|
-
store: ToolkitStore<OvermapRootState>;
|
|
9
|
-
}
|
|
10
|
-
declare const OvermapContext: React.Context<null>;
|
|
11
|
-
declare const OvermapProvider: (props: OvermapProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { OvermapProvider, OvermapContext };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
2
|
-
import { OvermapRootState } from "../../typings";
|
|
3
|
-
export declare function setClientStore(store: ToolkitStore<OvermapRootState>): void;
|
|
4
|
-
export declare function getClientStore(): ToolkitStore<OvermapRootState> | undefined;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OvermapSDK } from "../../sdk";
|
|
3
|
-
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
4
|
-
import { OvermapRootState } from "../../typings";
|
|
5
|
-
export interface ISDKContext {
|
|
6
|
-
sdk: OvermapSDK;
|
|
7
|
-
}
|
|
8
|
-
interface SDKProviderProps<TState extends OvermapRootState> {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
API_URL: string;
|
|
11
|
-
store: ToolkitStore<TState>;
|
|
12
|
-
}
|
|
13
|
-
declare const SDKContext: React.Context<ISDKContext>;
|
|
14
|
-
declare const SDKProvider: <TState extends OvermapRootState>(props: SDKProviderProps<TState>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export { SDKProvider, SDKContext };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Reducer } from "react";
|
|
2
|
-
import { SerializedFieldSection } from "../typings";
|
|
3
|
-
export interface SmallFieldSection {
|
|
4
|
-
/** is dropping disabled in this section? */
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
/** id's of field that may not be dropped on this section */
|
|
7
|
-
conditionFields: Set<string>;
|
|
8
|
-
/** the index of the section the condition is in */
|
|
9
|
-
conditionIndex?: number;
|
|
10
|
-
/** the index of the section */
|
|
11
|
-
index: number;
|
|
12
|
-
/** label of the section */
|
|
13
|
-
label: string | null;
|
|
14
|
-
}
|
|
15
|
-
export type DropState = Record<string, SmallFieldSection>;
|
|
16
|
-
export type DropAction = {
|
|
17
|
-
type: "release";
|
|
18
|
-
} | {
|
|
19
|
-
type: "hold";
|
|
20
|
-
fieldId: string;
|
|
21
|
-
} | {
|
|
22
|
-
type: "update";
|
|
23
|
-
state: DropState;
|
|
24
|
-
};
|
|
25
|
-
export declare const reducer: Reducer<DropState, DropAction>;
|
|
26
|
-
/** creates a `DropState` from a list of `SerializedFieldSection` objects */
|
|
27
|
-
export declare const initializer: (fields: SerializedFieldSection[]) => DropState;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent } from "react";
|
|
2
|
-
import { FieldTypeIdentifier } from "../typings";
|
|
3
|
-
interface FieldActionsProps {
|
|
4
|
-
index: number;
|
|
5
|
-
type: FieldTypeIdentifier;
|
|
6
|
-
sectionIndex?: number;
|
|
7
|
-
remove: () => void;
|
|
8
|
-
duplicate: () => void;
|
|
9
|
-
move: (direction: "up" | "down") => void;
|
|
10
|
-
upload?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const FieldActions: import("react").MemoExoticComponent<(props: FieldActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { NestedFieldPath } from "./typings";
|
|
3
|
-
import { ISerializedField } from "../typings";
|
|
4
|
-
export interface FieldBuilderProps {
|
|
5
|
-
index: number;
|
|
6
|
-
parentPath: NestedFieldPath;
|
|
7
|
-
initial: ISerializedField;
|
|
8
|
-
conditionalSourceFields?: ISerializedField[];
|
|
9
|
-
}
|
|
10
|
-
export declare const FieldBuilder: FC<FieldBuilderProps>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SerializedFieldSection } from "../typings";
|
|
3
|
-
import { DropState } from "./DropDispatch";
|
|
4
|
-
interface FieldSectionWithActionsProps {
|
|
5
|
-
field: SerializedFieldSection;
|
|
6
|
-
index: number;
|
|
7
|
-
dropState: DropState;
|
|
8
|
-
fieldsOnly: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const FieldSectionWithActions: import("react").MemoExoticComponent<(props: FieldSectionWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ISerializedField } from "../typings";
|
|
3
|
-
interface FieldWithActionsProps {
|
|
4
|
-
field: ISerializedField;
|
|
5
|
-
index: number;
|
|
6
|
-
sectionIndex: number;
|
|
7
|
-
remove: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const FieldWithActions: import("react").MemoExoticComponent<(props: FieldWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
-
export {};
|