@overmap-ai/core 1.0.60-model-adapter.1 → 1.0.60-move-active-states.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/enums/index.d.ts +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/overmap-core.js +1398 -10611
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1419 -10634
- 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 +12 -7
- package/dist/sdk/services/BaseAuthService.d.ts +12 -0
- package/dist/sdk/services/BaseService.d.ts +15 -0
- package/dist/sdk/services/BaseUploadService.d.ts +8 -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/GeoImageService.d.ts +11 -0
- 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 +6 -5
- 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 +8 -9
- 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 +3 -2
- package/dist/sdk/typings.d.ts +8 -3
- package/dist/store/index.d.ts +0 -1
- package/dist/store/slices/agentsSlice.d.ts +4 -4
- package/dist/store/slices/assetAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/assetSlice.d.ts +8 -8
- package/dist/store/slices/assetStageCompletionSlice.d.ts +3 -3
- package/dist/store/slices/assetStageSlice.d.ts +9 -9
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/assetTypeSlice.d.ts +8 -14
- package/dist/store/slices/authSlice.d.ts +3 -3
- package/dist/store/slices/categorySlice.d.ts +16 -72
- package/dist/store/slices/documentAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/documentSlice.d.ts +20 -62
- package/dist/store/slices/emailDomainsSlice.d.ts +4 -4
- 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 -61
- package/dist/store/slices/formSlice.d.ts +9 -8
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/formSubmissionSlice.d.ts +11 -11
- package/dist/store/slices/geoImageSlice.d.ts +48 -0
- package/dist/store/slices/index.d.ts +2 -1
- package/dist/store/slices/issueAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/issueCommentSlice.d.ts +3 -3
- package/dist/store/slices/issueSlice.d.ts +7 -17
- package/dist/store/slices/issueTypeSlice.d.ts +7 -7
- package/dist/store/slices/issueUpdateSlice.d.ts +3 -3
- package/dist/store/slices/licenseSlice.d.ts +7 -7
- package/dist/store/slices/organizationAccessSlice.d.ts +6 -6
- package/dist/store/slices/organizationSlice.d.ts +14 -25
- package/dist/store/slices/outboxSlice.d.ts +6 -4
- package/dist/store/slices/projectAccessSlice.d.ts +7 -7
- package/dist/store/slices/projectAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/projectFileSlice.d.ts +8 -62
- package/dist/store/slices/projectSlice.d.ts +10 -10
- package/dist/store/slices/rehydratedSlice.d.ts +3 -2
- package/dist/store/slices/settingsSlice.d.ts +3 -24
- package/dist/store/slices/teamSlice.d.ts +6 -6
- package/dist/store/slices/userSlice.d.ts +5 -5
- package/dist/store/slices/workspaceSlice.d.ts +9 -56
- package/dist/store/store.d.ts +9 -91
- package/dist/typings/colors.d.ts +0 -3
- package/dist/typings/models/{components.d.ts → assets.d.ts} +2 -3
- package/dist/typings/models/forms.d.ts +87 -1
- package/dist/typings/models/geo.d.ts +18 -6
- package/dist/typings/models/geoImages.d.ts +14 -0
- package/dist/typings/models/index.d.ts +2 -1
- package/dist/typings/models/issues.d.ts +3 -4
- package/dist/typings/models/organizations.d.ts +0 -11
- package/dist/typings/models/projects.d.ts +3 -5
- package/dist/typings/models/store.d.ts +43 -4
- package/dist/typings/store.d.ts +6 -4
- package/dist/utils/colors.d.ts +0 -6
- package/dist/utils/coordinates.d.ts +5 -7
- package/dist/utils/file.d.ts +0 -6
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/utils.d.ts +3 -3
- package/package.json +13 -41
- 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/enums/map.d.ts +0 -6
- 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 -25
- 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 -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/FormSubmissionBrowser/FormSubmissionBrowser.d.ts +0 -28
- 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 -5
- 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/store/hooks.d.ts +0 -4
- package/dist/store/slices/mapSlice.d.ts +0 -23
- package/dist/style.css +0 -435
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ISchema } from "../../fields";
|
|
3
|
-
import { Form } from "../../typings";
|
|
4
|
-
import { ButtonProps } from "@overmap-ai/blocks/dist/Buttons/typings";
|
|
5
|
-
interface FormRendererProps {
|
|
6
|
-
/** The schema of the form the render */
|
|
7
|
-
schema: ISchema;
|
|
8
|
-
/** Initial values of the form */
|
|
9
|
-
values?: Form;
|
|
10
|
-
onSubmit?: (values: Form) => Promise<void> | void;
|
|
11
|
-
/** @default "Submit" */
|
|
12
|
-
submitText?: string;
|
|
13
|
-
/** The text of the cancel button (hidden by default)
|
|
14
|
-
* @default null
|
|
15
|
-
*/
|
|
16
|
-
cancelText?: string;
|
|
17
|
-
onCancel?: () => void;
|
|
18
|
-
onDirty?: () => void;
|
|
19
|
-
onDirtyChange?: (dirty: boolean) => void;
|
|
20
|
-
/** Hide the form description
|
|
21
|
-
* @default false */
|
|
22
|
-
hideDescription?: boolean;
|
|
23
|
-
/** Hide the title (and description)
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
hideTitle?: boolean;
|
|
27
|
-
className?: string;
|
|
28
|
-
buttonProps?: Omit<ButtonProps, "children">;
|
|
29
|
-
}
|
|
30
|
-
export declare const FormRenderer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FormRendererProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
31
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { Stored, UserFormSubmission } from "../../../typings";
|
|
3
|
-
export interface FormSubmissionClickEvent {
|
|
4
|
-
submission: Stored<UserFormSubmission>;
|
|
5
|
-
}
|
|
6
|
-
interface UserFormSubmissionBrowserEntryProps {
|
|
7
|
-
submission: Stored<UserFormSubmission>;
|
|
8
|
-
onSubmissionClick?: (e: FormSubmissionClickEvent) => void;
|
|
9
|
-
rowDecorator?: (submission: Stored<UserFormSubmission>, Row: ReactNode) => ReactNode;
|
|
10
|
-
compact: boolean;
|
|
11
|
-
labelType: "creator" | "formName";
|
|
12
|
-
}
|
|
13
|
-
interface FormSubmissionBrowserProps {
|
|
14
|
-
formId?: string;
|
|
15
|
-
submissions?: Stored<UserFormSubmission>[];
|
|
16
|
-
onSubmissionClick?: (e: FormSubmissionClickEvent) => void;
|
|
17
|
-
rowDecorator?: UserFormSubmissionBrowserEntryProps["rowDecorator"];
|
|
18
|
-
/** @default false */
|
|
19
|
-
compact?: boolean;
|
|
20
|
-
labelType: "creator" | "formName";
|
|
21
|
-
className?: string;
|
|
22
|
-
/** @default outline */
|
|
23
|
-
variant?: "ghost" | "outline";
|
|
24
|
-
/** Content displayed within the container but after the list */
|
|
25
|
-
after?: ReactNode;
|
|
26
|
-
}
|
|
27
|
-
export declare const FormSubmissionBrowser: import("react").MemoExoticComponent<(props: FormSubmissionBrowserProps) => import("react/jsx-runtime").JSX.Element>;
|
|
28
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Stored, UserFormSubmission } from "../../../typings";
|
|
3
|
-
interface FormSubmissionViewerProps {
|
|
4
|
-
/** The submission to render for viewing */
|
|
5
|
-
submission: Stored<UserFormSubmission>;
|
|
6
|
-
/** @default false */
|
|
7
|
-
showFormDescription?: boolean;
|
|
8
|
-
/** @default true */
|
|
9
|
-
showFormTitle?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Wrapper for `FormRenderer` that takes a `Stored<UserFormSubmission` instead of an `ISchema`.
|
|
13
|
-
* Also, unlike `FormRenderer`, this component depends on the redux store.
|
|
14
|
-
* @see FormRenderer
|
|
15
|
-
*/
|
|
16
|
-
export declare const FormSubmissionViewer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FormSubmissionViewerProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { FieldMetaProps } from "formik";
|
|
3
|
-
import { FieldValue } from "../../typings";
|
|
4
|
-
interface RenderArgs {
|
|
5
|
-
value: FieldValue;
|
|
6
|
-
meta: FieldMetaProps<unknown>;
|
|
7
|
-
/** Intermediate changes to the field value */
|
|
8
|
-
setValue: (value: FieldValue) => void;
|
|
9
|
-
/** EX: when the onBlur event is fired */
|
|
10
|
-
patchValue: () => void;
|
|
11
|
-
}
|
|
12
|
-
interface PatchFieldProps {
|
|
13
|
-
name: string;
|
|
14
|
-
render: (args: RenderArgs) => ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const PatchField: import("react").MemoExoticComponent<(props: PatchFieldProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormikErrors } from "formik";
|
|
3
|
-
import { ISchema } from "../../fields";
|
|
4
|
-
import { Form } from "../../typings";
|
|
5
|
-
import { NewForm } from "../../builder";
|
|
6
|
-
interface PatchFormProviderProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
schema: ISchema;
|
|
9
|
-
values: Form;
|
|
10
|
-
/** Called when `patchValue` is called on a child `PatchField` and the form is valid.
|
|
11
|
-
* @example ```js
|
|
12
|
-
* {"field name": "field value"}
|
|
13
|
-
* ``` */
|
|
14
|
-
onPatch: (values: Form) => void;
|
|
15
|
-
/** Called when `patchValue` is called on a child `PatchField` and the form is not valid.
|
|
16
|
-
* After this event is fired, the form is reset to the initial values.
|
|
17
|
-
* @example ```js
|
|
18
|
-
* {"field name": "error message"}
|
|
19
|
-
* ``` */
|
|
20
|
-
onError: (error: FormikErrors<Form | NewForm>) => void;
|
|
21
|
-
className?: string;
|
|
22
|
-
/** If true (default), the form will only submit if there are changes. */
|
|
23
|
-
requiresDiff?: boolean;
|
|
24
|
-
/** Called when the form's dirty state changes. */
|
|
25
|
-
onDirtyChange?: (dirty: boolean) => void;
|
|
26
|
-
}
|
|
27
|
-
/** Use PatchForms to create patch edits to existing forms rather than editing the entire form. */
|
|
28
|
-
export declare const PatchFormProvider: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<PatchFormProviderProps & import("react").RefAttributes<HTMLFormElement>>>;
|
|
29
|
-
export {};
|
package/dist/forms/typings.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { HTMLInputTypeAttribute } from "react";
|
|
2
|
-
import { Marker } from "../typings";
|
|
3
|
-
import { AnyField, BaseField } from "./fields";
|
|
4
|
-
/**
|
|
5
|
-
* When upload fields are given initial values, that value will be
|
|
6
|
-
* a `Promise<File>[]` instead of a `File[]` as the files must be downloaded.
|
|
7
|
-
* `Promise<File>[]` is not add to the `FieldValue` type as it is not a valid
|
|
8
|
-
* value for submitted forms as the files must be present to be submitted
|
|
9
|
-
* TODO: This causes type errors in hemora-web. Maybe we should change this to:
|
|
10
|
-
* export type Form = {
|
|
11
|
-
* data: Record<string, FieldValue>,
|
|
12
|
-
* attachments: Record<string, Promise<File>[]>
|
|
13
|
-
* }
|
|
14
|
-
* Then, we could just use `data` for creating attachment instances.
|
|
15
|
-
*/
|
|
16
|
-
export type Form = Record<string, FieldValue | Promise<File>[]>;
|
|
17
|
-
/** Helper type that extracts the TValue type from a BaseField. */
|
|
18
|
-
export type ValueOfField<Type extends AnyField> = Type extends BaseField<infer TValue> ? TValue : never;
|
|
19
|
-
export type FieldTypeIdentifier = "string" | "text" | "boolean" | "number" | "date" | "select" | "custom" | "section" | "multi-string" | "multi-select" | "upload" | "qr";
|
|
20
|
-
export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
|
|
21
|
-
description?: string | null;
|
|
22
|
-
identifier: string;
|
|
23
|
-
type: TIdentifier;
|
|
24
|
-
}
|
|
25
|
-
export interface BaseSerializedField<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> extends BaseSerializedObject<TIdentifier> {
|
|
26
|
-
label: string;
|
|
27
|
-
required: boolean;
|
|
28
|
-
image?: File | Promise<File>;
|
|
29
|
-
}
|
|
30
|
-
/** All the possible field values */
|
|
31
|
-
export type FieldValue = string | number | boolean | string[] | File[] | Date | Marker | null;
|
|
32
|
-
export interface SerializedCondition<TValue extends FieldValue = FieldValue> {
|
|
33
|
-
identifier: string;
|
|
34
|
-
value: TValue;
|
|
35
|
-
}
|
|
36
|
-
export interface SerializedFieldSection extends BaseSerializedObject {
|
|
37
|
-
label: string | null;
|
|
38
|
-
type: "section";
|
|
39
|
-
conditional: boolean;
|
|
40
|
-
condition: SerializedCondition | null;
|
|
41
|
-
fields: Exclude<ISerializedField, SerializedFieldSection>[];
|
|
42
|
-
}
|
|
43
|
-
interface BaseSerializedStringField extends BaseSerializedField {
|
|
44
|
-
minimum_length?: number;
|
|
45
|
-
maximum_length: number;
|
|
46
|
-
placeholder?: string;
|
|
47
|
-
}
|
|
48
|
-
export type StringInputType = Exclude<HTMLInputTypeAttribute, "checkbox" | "number" | "button">;
|
|
49
|
-
export interface SerializedStringField extends BaseSerializedStringField {
|
|
50
|
-
type: "string";
|
|
51
|
-
input_type?: StringInputType;
|
|
52
|
-
}
|
|
53
|
-
export interface SerializedQrField extends BaseSerializedField {
|
|
54
|
-
type: "qr";
|
|
55
|
-
}
|
|
56
|
-
export interface SerializedTextField extends BaseSerializedStringField {
|
|
57
|
-
type: "text";
|
|
58
|
-
}
|
|
59
|
-
export interface SerializedMultiStringField extends BaseSerializedStringField {
|
|
60
|
-
type: "multi-string";
|
|
61
|
-
}
|
|
62
|
-
export interface SerializedBooleanField extends BaseSerializedField {
|
|
63
|
-
type: "boolean";
|
|
64
|
-
}
|
|
65
|
-
export interface SerializedNumberField extends BaseSerializedField {
|
|
66
|
-
type: "number";
|
|
67
|
-
minimum: number | undefined;
|
|
68
|
-
maximum: number | undefined;
|
|
69
|
-
integers: boolean;
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
}
|
|
72
|
-
export interface SerializedDateField extends BaseSerializedField {
|
|
73
|
-
type: "date";
|
|
74
|
-
}
|
|
75
|
-
export type SelectFieldOptionValue = string;
|
|
76
|
-
/** Represents an option in the select input. Not to be confused with the 'field options' of SelectField. */
|
|
77
|
-
export interface SelectFieldOption {
|
|
78
|
-
value: SelectFieldOptionValue;
|
|
79
|
-
label: string;
|
|
80
|
-
}
|
|
81
|
-
export interface SerializedSelectField extends BaseSerializedField {
|
|
82
|
-
type: "select";
|
|
83
|
-
options: SelectFieldOption[];
|
|
84
|
-
placeholder?: string;
|
|
85
|
-
}
|
|
86
|
-
export interface SerializedMultiSelectField extends BaseSerializedField {
|
|
87
|
-
type: "multi-select";
|
|
88
|
-
options: SelectFieldOption[];
|
|
89
|
-
placeholder?: string;
|
|
90
|
-
}
|
|
91
|
-
export interface SerializedUploadField extends BaseSerializedField {
|
|
92
|
-
type: "upload";
|
|
93
|
-
/** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept */
|
|
94
|
-
extensions?: string[];
|
|
95
|
-
/** in bytes */
|
|
96
|
-
maximum_size?: number;
|
|
97
|
-
/** how many files the user can upload to this field
|
|
98
|
-
* @default 1
|
|
99
|
-
*/
|
|
100
|
-
maximum_files?: number;
|
|
101
|
-
}
|
|
102
|
-
export type ISerializedField = SerializedTextField | SerializedBooleanField | SerializedNumberField | SerializedDateField | SerializedStringField | SerializedSelectField | SerializedFieldSection | SerializedMultiStringField | SerializedMultiSelectField | SerializedUploadField | SerializedQrField;
|
|
103
|
-
export {};
|
package/dist/forms/utils.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormikErrors } from "formik";
|
|
2
|
-
import { BaseFormElement, ISchema } from "./fields";
|
|
3
|
-
import { Form } from "./typings";
|
|
4
|
-
import { FormikUserFormRevision } from "./builder";
|
|
5
|
-
import { UserFormRevision } from "../typings";
|
|
6
|
-
export declare const hasKeys: (errors: object) => boolean;
|
|
7
|
-
export declare const validateForm: (schema: ISchema, form: Form | FormikUserFormRevision) => FormikErrors<Form> | FormikErrors<import('./builder/typings').NewForm> | undefined;
|
|
8
|
-
export declare const initialFormValues: (fields: BaseFormElement[], values: Form) => Form;
|
|
9
|
-
export declare const useAttachImagesToFormRevisionFields: (revision: UserFormRevision | undefined) => UserFormRevision | undefined;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import { RegistrationPayload, RegistrationReturn } from "../../typings";
|
|
3
|
-
/**
|
|
4
|
-
* Handles login, logout and renewing tokens
|
|
5
|
-
*/
|
|
6
|
-
export declare class AuthService extends BaseApiService {
|
|
7
|
-
private _getAccessToken;
|
|
8
|
-
private _getRefreshToken;
|
|
9
|
-
/**
|
|
10
|
-
* Takes credentials and gets a token pair
|
|
11
|
-
* @async
|
|
12
|
-
* @param credentials The username and password for obtaining a token pair
|
|
13
|
-
* @param logoutOnFailure Whether to log out if the request fails
|
|
14
|
-
* @returns An array containing two elements: 1) a Promise for the access and refresh tokens, and 2) the UUID of the
|
|
15
|
-
* request, so the request can be cancelled if necessary.
|
|
16
|
-
*/
|
|
17
|
-
private _getTokenPair;
|
|
18
|
-
/**
|
|
19
|
-
* Takes refresh token and gets a new token pair
|
|
20
|
-
* @async
|
|
21
|
-
* @param {string} refreshToken The refresh token used to get new tokens
|
|
22
|
-
* @returns {Promise<TokenPair>} The new access and refresh tokens
|
|
23
|
-
*/
|
|
24
|
-
private _getRenewedTokens;
|
|
25
|
-
/**
|
|
26
|
-
* Attempts to log into Hemora using given credentials
|
|
27
|
-
* @param {string} username
|
|
28
|
-
* @param {string} password
|
|
29
|
-
*/
|
|
30
|
-
login(username: string, password: string): Promise<undefined>;
|
|
31
|
-
/**
|
|
32
|
-
* Logs the user out
|
|
33
|
-
*/
|
|
34
|
-
logout(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Attempts to renew tokens
|
|
37
|
-
*/
|
|
38
|
-
renewTokens(): Promise<undefined>;
|
|
39
|
-
/**
|
|
40
|
-
* Register a new user
|
|
41
|
-
*/
|
|
42
|
-
register(payload: RegistrationPayload): Promise<RegistrationReturn>;
|
|
43
|
-
resetPassword(email: string): Promise<undefined>;
|
|
44
|
-
/**
|
|
45
|
-
* Checks whether the tokens will be expiring soon
|
|
46
|
-
* @returns {boolean}
|
|
47
|
-
*/
|
|
48
|
-
tokenIsExpiringSoon(): boolean;
|
|
49
|
-
replaceProfilePicture(file: File): Promise<undefined>;
|
|
50
|
-
addFavouriteProjectId(projectId: number): Promise<undefined>;
|
|
51
|
-
removeFavouriteProjectId(projectId: number): Promise<undefined>;
|
|
52
|
-
setTourStep(stepIndex: number): Promise<undefined>;
|
|
53
|
-
joinApplication(projectInviteId: string, verification_code: string, username: string, password: string): Promise<undefined>;
|
|
54
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import { License, Organization, Project, User, Workspace } from "../../typings";
|
|
3
|
-
export interface InitialAPIData {
|
|
4
|
-
projects: (Project & {
|
|
5
|
-
workspaces: Workspace[];
|
|
6
|
-
})[];
|
|
7
|
-
organizations: Organization[];
|
|
8
|
-
user: User;
|
|
9
|
-
licenses: License[];
|
|
10
|
-
}
|
|
11
|
-
export declare class MainService extends BaseApiService {
|
|
12
|
-
fetchInitialData(replaceExisting: boolean, uuid?: string): Promise<undefined>;
|
|
13
|
-
fetchProjectUsers(): Promise<User[]>;
|
|
14
|
-
fetchOrganizationUsers(orgId: number): Promise<User[]>;
|
|
15
|
-
_processInitialData(data: InitialAPIData, overwrite: boolean): Promise<void>;
|
|
16
|
-
}
|
package/dist/store/hooks.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TypedUseSelectorHook } from "react-redux";
|
|
2
|
-
import { RootState } from "../typings";
|
|
3
|
-
export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<RootState, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
-
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { MapStyle } from "../../enums";
|
|
3
|
-
import { RootState } from "../../typings";
|
|
4
|
-
export interface MapState {
|
|
5
|
-
mapStyle: MapStyle;
|
|
6
|
-
showTooltips: boolean;
|
|
7
|
-
centerMapToProject: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Stores map settings and current location
|
|
11
|
-
*/
|
|
12
|
-
export declare const mapSlice: import("@reduxjs/toolkit").Slice<MapState, {
|
|
13
|
-
setMapStyle: (state: import("immer/dist/internal.js").WritableDraft<MapState>, action: PayloadAction<MapStyle>) => void;
|
|
14
|
-
setShowTooltips: (state: import("immer/dist/internal.js").WritableDraft<MapState>, action: PayloadAction<boolean>) => void;
|
|
15
|
-
setCenterMapToProject: (state: import("immer/dist/internal.js").WritableDraft<MapState>, action: {
|
|
16
|
-
payload: boolean;
|
|
17
|
-
}) => void;
|
|
18
|
-
}, "map">;
|
|
19
|
-
export declare const setMapStyle: import("@reduxjs/toolkit").ActionCreatorWithPayload<MapStyle, "map/setMapStyle">, setShowTooltips: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "map/setShowTooltips">, setCenterMapToProject: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "map/setCenterMapToProject">;
|
|
20
|
-
export declare const selectMapStyle: (state: RootState) => MapStyle;
|
|
21
|
-
export declare const selectShowTooltips: (state: RootState) => boolean;
|
|
22
|
-
export declare const selectCenterMapToProject: (state: RootState) => boolean;
|
|
23
|
-
export declare const mapReducer: Reducer<MapState>;
|