@overmap-ai/core 1.0.51 → 1.0.53-issue-types.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/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 +1451 -485
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1451 -486
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +3 -1
- package/dist/sdk/services/AttachmentService.d.ts +2 -2
- package/dist/sdk/services/DocumentService.d.ts +5 -5
- package/dist/sdk/services/IssueService.d.ts +2 -2
- package/dist/sdk/services/IssueTypeService.d.ts +9 -0
- package/dist/sdk/services/TeamService.d.ts +12 -0
- package/dist/sdk/services/UserFormService.d.ts +10 -2
- package/dist/sdk/services/UserFormSubmissionService.d.ts +9 -2
- package/dist/sdk/services/index.d.ts +2 -0
- package/dist/store/slices/categorySlice.d.ts +6 -1
- package/dist/store/slices/documentSlice.d.ts +325 -13
- package/dist/store/slices/formRevisionSlice.d.ts +67 -0
- package/dist/store/slices/formSlice.d.ts +117 -0
- package/dist/store/slices/formSubmissionSlice.d.ts +49 -0
- package/dist/store/slices/index.d.ts +5 -1
- package/dist/store/slices/issueSlice.d.ts +10 -2
- package/dist/store/slices/issueTypeSlice.d.ts +20 -0
- package/dist/store/slices/projectFileSlice.d.ts +5 -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 +5 -1
- package/dist/store/store.d.ts +16 -4
- package/dist/style.css +5 -0
- package/dist/typings/files.d.ts +11 -1
- package/dist/typings/models/attachments.d.ts +11 -15
- package/dist/typings/models/base.d.ts +14 -0
- package/dist/typings/models/documents.d.ts +18 -7
- package/dist/typings/models/forms.d.ts +9 -13
- package/dist/typings/models/index.d.ts +2 -0
- package/dist/typings/models/issueTypes.d.ts +8 -0
- package/dist/typings/models/issues.d.ts +7 -7
- package/dist/typings/models/organizations.d.ts +2 -3
- 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
|
@@ -12,6 +12,7 @@ export declare const CompleteFieldTypeToClsMapping: {
|
|
|
12
12
|
text: typeof import('../fields/StringOrTextFields/TextField/TextField').TextField;
|
|
13
13
|
custom: typeof import('../fields/CustomField').CustomField;
|
|
14
14
|
upload: typeof import('../fields/UploadField').UploadField;
|
|
15
|
+
qr: typeof import('../fields/QrField/QrField').QrField;
|
|
15
16
|
"multi-string": typeof import('../fields/MultiStringField/MultiStringField').MultiStringField;
|
|
16
17
|
"multi-select": typeof import('../fields/SelectField/MultiSelectField').MultiSelectField;
|
|
17
18
|
};
|
|
@@ -12,7 +12,7 @@ export declare function insert<T>(list: T[] | undefined, index: number, value: T
|
|
|
12
12
|
export declare function remove<T>(list: T[], index: number): T[];
|
|
13
13
|
export declare const makeIdentifier: (existing: unknown, label: string) => string;
|
|
14
14
|
export declare const findFieldByIdentifier: (fields: ISerializedField[], identifier?: string) => ISerializedField | null;
|
|
15
|
-
export declare const makeConditionalSourceFields: (sections: SerializedFieldSection[], index: number) => (import("../typings").SerializedTextField | import("../typings").SerializedBooleanField | import("../typings").SerializedNumberField | import("../typings").SerializedDateField | import("../typings").SerializedStringField | import("../typings").SerializedSelectField | import("../typings").SerializedMultiStringField | import("../typings").SerializedMultiSelectField | import("../typings").SerializedUploadField)[];
|
|
15
|
+
export declare const makeConditionalSourceFields: (sections: SerializedFieldSection[], index: number) => (import("../typings").SerializedTextField | import("../typings").SerializedBooleanField | import("../typings").SerializedNumberField | import("../typings").SerializedDateField | import("../typings").SerializedStringField | import("../typings").SerializedSelectField | import("../typings").SerializedMultiStringField | import("../typings").SerializedMultiSelectField | import("../typings").SerializedUploadField | import("../typings").SerializedQrField)[];
|
|
16
16
|
export type NewFieldInitialValues = Omit<ISerializedField, "identifier"> & {
|
|
17
17
|
label: string;
|
|
18
18
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { RiQrCodeLine } from "react-icons/ri";
|
|
3
|
+
import { BaseField, ChildFieldOptions } from "../BaseField";
|
|
4
|
+
import { ISerializedField, SerializedQrField } from "../../typings";
|
|
5
|
+
import { ComponentProps } from "../typings";
|
|
6
|
+
export declare const emptyQrField: {
|
|
7
|
+
type: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare class QrField extends BaseField<string, "qr"> {
|
|
13
|
+
static readonly fieldTypeName = "QR";
|
|
14
|
+
static readonly fieldTypeDescription = "Used for scanning/reading QR codes.";
|
|
15
|
+
readonly onlyValidateAfterTouched = false;
|
|
16
|
+
static Icon: typeof RiQrCodeLine;
|
|
17
|
+
constructor(options: ChildFieldOptions<string>);
|
|
18
|
+
serialize(): SerializedQrField;
|
|
19
|
+
static deserialize(data: ISerializedField): QrField;
|
|
20
|
+
getInput(props: ComponentProps<QrField>): ReactNode;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentProps } from "../typings";
|
|
3
|
+
import { QrField } from "./QrField";
|
|
4
|
+
export declare const QrInput: import("react").MemoExoticComponent<(props: ComponentProps<QrField>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
interface QrScannerProps {
|
|
6
|
+
onQrScan: (data: string) => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const QrScanner: import("react").MemoExoticComponent<(props: QrScannerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
+
export {};
|
|
@@ -6,6 +6,7 @@ import { MultiSelectField, SelectField } from "./SelectField";
|
|
|
6
6
|
import { CustomField } from "./CustomField";
|
|
7
7
|
import { MultiStringField } from "./MultiStringField";
|
|
8
8
|
import { UploadField } from "./UploadField";
|
|
9
|
+
import { QrField } from "./QrField";
|
|
9
10
|
export declare const FieldTypeToClsMapping: {
|
|
10
11
|
readonly date: typeof DateField;
|
|
11
12
|
readonly number: typeof NumberField;
|
|
@@ -15,6 +16,7 @@ export declare const FieldTypeToClsMapping: {
|
|
|
15
16
|
readonly text: typeof TextField;
|
|
16
17
|
readonly custom: typeof CustomField;
|
|
17
18
|
readonly upload: typeof UploadField;
|
|
19
|
+
readonly qr: typeof QrField;
|
|
18
20
|
readonly "multi-string": typeof MultiStringField;
|
|
19
21
|
readonly "multi-select": typeof MultiSelectField;
|
|
20
22
|
};
|
|
@@ -77,6 +79,12 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
77
79
|
description: string;
|
|
78
80
|
required: boolean;
|
|
79
81
|
};
|
|
82
|
+
readonly qr: {
|
|
83
|
+
type: string;
|
|
84
|
+
label: string;
|
|
85
|
+
description: string;
|
|
86
|
+
required: boolean;
|
|
87
|
+
};
|
|
80
88
|
readonly "multi-string": {
|
|
81
89
|
type: string;
|
|
82
90
|
minimum_length: number;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Stored, UserFormSubmission } from "../../../typings";
|
|
3
3
|
export interface FormSubmissionClickEvent {
|
|
4
|
-
submission:
|
|
4
|
+
submission: Stored<UserFormSubmission>;
|
|
5
5
|
}
|
|
6
6
|
interface UserFormSubmissionBrowserEntryProps {
|
|
7
|
-
submission:
|
|
7
|
+
submission: Stored<UserFormSubmission>;
|
|
8
8
|
onSubmissionClick?: (e: FormSubmissionClickEvent) => void;
|
|
9
|
-
rowDecorator?: (submission:
|
|
9
|
+
rowDecorator?: (submission: Stored<UserFormSubmission>, Row: ReactNode) => ReactNode;
|
|
10
10
|
compact: boolean;
|
|
11
11
|
labelType: "creator" | "formName";
|
|
12
12
|
}
|
|
13
13
|
interface FormSubmissionBrowserProps {
|
|
14
14
|
formId?: string;
|
|
15
|
-
submissions?:
|
|
15
|
+
submissions?: Stored<UserFormSubmission>[];
|
|
16
16
|
onSubmissionClick?: (e: FormSubmissionClickEvent) => void;
|
|
17
17
|
rowDecorator?: UserFormSubmissionBrowserEntryProps["rowDecorator"];
|
|
18
18
|
/** @default false */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Stored, UserFormSubmission } from "../../../typings";
|
|
3
3
|
interface FormSubmissionViewerProps {
|
|
4
4
|
/** The submission to render for viewing */
|
|
5
|
-
submission:
|
|
5
|
+
submission: Stored<UserFormSubmission>;
|
|
6
6
|
/** @default false */
|
|
7
7
|
showFormDescription?: boolean;
|
|
8
8
|
/** @default true */
|
|
9
9
|
showFormTitle?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Wrapper for `FormRenderer` that takes a `
|
|
12
|
+
* Wrapper for `FormRenderer` that takes a `Stored<UserFormSubmission` instead of an `ISchema`.
|
|
13
13
|
* Also, unlike `FormRenderer`, this component depends on the redux store.
|
|
14
14
|
* @see FormRenderer
|
|
15
15
|
*/
|
package/dist/forms/typings.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { AnyField, BaseField } from "./fields";
|
|
|
16
16
|
export type Form = Record<string, FieldValue | Promise<File>[]>;
|
|
17
17
|
/** Helper type that extracts the TValue type from a BaseField. */
|
|
18
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";
|
|
19
|
+
export type FieldTypeIdentifier = "string" | "text" | "boolean" | "number" | "date" | "select" | "custom" | "section" | "multi-string" | "multi-select" | "upload" | "qr";
|
|
20
20
|
export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
|
|
21
21
|
description?: string | null;
|
|
22
22
|
identifier: string;
|
|
@@ -50,6 +50,9 @@ export interface SerializedStringField extends BaseSerializedStringField {
|
|
|
50
50
|
type: "string";
|
|
51
51
|
input_type?: StringInputType;
|
|
52
52
|
}
|
|
53
|
+
export interface SerializedQrField extends BaseSerializedField {
|
|
54
|
+
type: "qr";
|
|
55
|
+
}
|
|
53
56
|
export interface SerializedTextField extends BaseSerializedStringField {
|
|
54
57
|
type: "text";
|
|
55
58
|
}
|
|
@@ -96,5 +99,5 @@ export interface SerializedUploadField extends BaseSerializedField {
|
|
|
96
99
|
*/
|
|
97
100
|
maximum_files?: number;
|
|
98
101
|
}
|
|
99
|
-
export type ISerializedField = SerializedTextField | SerializedBooleanField | SerializedNumberField | SerializedDateField | SerializedStringField | SerializedSelectField | SerializedFieldSection | SerializedMultiStringField | SerializedMultiSelectField | SerializedUploadField;
|
|
102
|
+
export type ISerializedField = SerializedTextField | SerializedBooleanField | SerializedNumberField | SerializedDateField | SerializedStringField | SerializedSelectField | SerializedFieldSection | SerializedMultiStringField | SerializedMultiSelectField | SerializedUploadField | SerializedQrField;
|
|
100
103
|
export {};
|