@overmap-ai/core 1.0.60-forms-refactor-1.0 → 1.0.60-forms-refactor-1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +38 -40
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +38 -40
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/FormService.d.ts +2 -2
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +1 -1
- package/dist/store/slices/formSlice.d.ts +2 -2
- package/dist/typings/models/forms.d.ts +2 -2
- package/dist/typings/models/issues.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Form, FormRevision, FormRevisionPayload, ISerializedField } from '../../typings/models/forms';
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { Created,
|
|
3
|
+
import { Created, OvermapRootState, Submitted } from "../../typings";
|
|
4
4
|
import { BaseApiService } from "./BaseApiService";
|
|
5
5
|
import type { BaseSDK } from "../base";
|
|
6
6
|
export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
@@ -41,6 +41,6 @@ export declare const formRevisionAttachmentSlice: import("@reduxjs/toolkit").Sli
|
|
|
41
41
|
}) => void;
|
|
42
42
|
}, "formRevisionAttachments">;
|
|
43
43
|
export declare const initializeFormRevisionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>[], "formRevisionAttachments/initializeFormRevisionAttachments">, addFormRevisionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>, "formRevisionAttachments/addFormRevisionAttachment">, addFormRevisionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>[], "formRevisionAttachments/addFormRevisionAttachments">, setFormRevisionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>, "formRevisionAttachments/setFormRevisionAttachment">, setFormRevisionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>[], "formRevisionAttachments/setFormRevisionAttachments">, updateFormRevisionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>, "formRevisionAttachments/updateFormRevisionAttachment">, updateFormRevisionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevisionAttachment>[], "formRevisionAttachments/updateFormRevisionAttachments">, deleteFormRevisionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formRevisionAttachments/deleteFormRevisionAttachment">, deleteFormRevisionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formRevisionAttachments/deleteFormRevisionAttachments">;
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const selectFormRevisionAttachmentsMapping: OvermapSelector<FormRevisionAttachmentState["instances"]>;
|
|
45
45
|
export declare const selectAttachmentsOfFormRevision: OvermapSelectorWithArgs<string, Stored<FormRevisionAttachment>[]>;
|
|
46
46
|
export declare const formRevisionAttachmentReducer: Reducer<FormRevisionAttachmentState>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import {
|
|
2
|
+
import { CachedForm, Form } from '../../typings/models/forms';
|
|
3
3
|
import { SearchArgs } from '../../typings/search';
|
|
4
4
|
import { OvermapSelector, OvermapSelectorWithArgs } from '../../typings/store';
|
|
5
5
|
import { Stored } from "../../typings";
|
|
@@ -39,7 +39,7 @@ export type FormSearchArgs = SearchArgs<{
|
|
|
39
39
|
organization?: number;
|
|
40
40
|
}>;
|
|
41
41
|
export declare const selectFormsMapping: OvermapSelector<Record<Stored<Form>["offline_id"], Stored<Form>>>;
|
|
42
|
-
export declare const selectFilteredForms: OvermapSelectorWithArgs<FormSearchArgs,
|
|
42
|
+
export declare const selectFilteredForms: OvermapSelectorWithArgs<FormSearchArgs, CachedForm[]>;
|
|
43
43
|
export declare const selectForm: OvermapSelectorWithArgs<string, Stored<Form>>;
|
|
44
44
|
export declare const selectFormMapping: OvermapSelector<Record<Stored<Form>["offline_id"], Stored<Form>>>;
|
|
45
45
|
export declare const selectFormOfAssetType: OvermapSelectorWithArgs<string, Stored<Form>>;
|
|
@@ -98,10 +98,10 @@ export type SubmittedForm = Form & OfflineModel & {
|
|
|
98
98
|
created_by: number;
|
|
99
99
|
submitted_at: string;
|
|
100
100
|
};
|
|
101
|
-
export type
|
|
101
|
+
export type CreatedForm = SubmittedForm & {
|
|
102
102
|
created_at: string;
|
|
103
103
|
};
|
|
104
|
-
export type
|
|
104
|
+
export type CachedForm = SubmittedForm & {
|
|
105
105
|
latestRevision: FormRevision;
|
|
106
106
|
};
|
|
107
107
|
export interface FormRevision<TFields extends BaseSerializedObject = ISerializedField> extends OfflineModel {
|
|
@@ -2,7 +2,7 @@ import { CreatedByModel, Offline, OfflineModel } from "./base";
|
|
|
2
2
|
import { IssuePriority, IssueStatus } from "../../enums";
|
|
3
3
|
import { WorkspaceIndexedModel } from "./workspace";
|
|
4
4
|
import { CanvasMarkableModel, MarkableModel } from "./geo";
|
|
5
|
-
import {
|
|
5
|
+
import { CreatedForm, SubmittedForm, Form } from "./forms";
|
|
6
6
|
import { User } from "./users";
|
|
7
7
|
import { CSSColor } from "../colors";
|
|
8
8
|
import { CreatedDocument, SubmittedDocument } from "./documents";
|
|
@@ -16,7 +16,7 @@ export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? Submit
|
|
|
16
16
|
* typically have additional properties that are only known once it has been processed and accepted by the API, such as
|
|
17
17
|
* the `created_at` timestamp, which is the time at which the data was written to the database.
|
|
18
18
|
*/
|
|
19
|
-
export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends Form ?
|
|
19
|
+
export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends Form ? CreatedForm : TModel extends Document ? CreatedDocument : TModel);
|
|
20
20
|
/**
|
|
21
21
|
* Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
|
|
22
22
|
* data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core functionality for Overmap",
|
|
4
4
|
"author": "Wôrdn Inc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"version": "1.0.60-forms-refactor-1.
|
|
6
|
+
"version": "1.0.60-forms-refactor-1.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|