@overmap-ai/core 1.0.48-add-agent-response-rating.2 → 1.0.48-bulk-form-submission.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.
Files changed (32) hide show
  1. package/README.md +4 -4
  2. package/dist/components/ImageCard/ImageCard.d.ts +1 -1
  3. package/dist/forms/builder/hooks.d.ts +2 -1
  4. package/dist/forms/renderer/FormSubmissionBrowser/FormSubmissionBrowser.d.ts +5 -5
  5. package/dist/forms/renderer/FormSubmissionViewer/FormSubmissionViewer.d.ts +3 -3
  6. package/dist/overmap-core.js +1014 -529
  7. package/dist/overmap-core.js.map +1 -1
  8. package/dist/overmap-core.umd.cjs +1013 -528
  9. package/dist/overmap-core.umd.cjs.map +1 -1
  10. package/dist/sdk/sdk.d.ts +2 -1
  11. package/dist/sdk/services/IssueCommentService.d.ts +2 -2
  12. package/dist/sdk/services/IssueUpdateService.d.ts +4 -0
  13. package/dist/sdk/services/UserFormSubmissionService.d.ts +9 -2
  14. package/dist/sdk/services/index.d.ts +1 -0
  15. package/dist/store/slices/categorySlice.d.ts +3 -1
  16. package/dist/store/slices/componentSlice.d.ts +1 -0
  17. package/dist/store/slices/componentStageSlice.d.ts +2 -0
  18. package/dist/store/slices/documentSlice.d.ts +3 -1
  19. package/dist/store/slices/formRevisionSlice.d.ts +73 -0
  20. package/dist/store/slices/formSubmissionSlice.d.ts +46 -0
  21. package/dist/store/slices/index.d.ts +2 -0
  22. package/dist/store/slices/issueSlice.d.ts +24 -4
  23. package/dist/store/slices/projectFileSlice.d.ts +3 -1
  24. package/dist/store/slices/userFormSlice.d.ts +38 -63
  25. package/dist/store/slices/workspaceSlice.d.ts +3 -1
  26. package/dist/store/store.d.ts +10 -4
  27. package/dist/typings/models/access.d.ts +1 -1
  28. package/dist/typings/models/attachments.d.ts +3 -1
  29. package/dist/typings/models/base.d.ts +7 -0
  30. package/dist/typings/models/forms.d.ts +3 -6
  31. package/dist/typings/models/issues.d.ts +35 -1
  32. package/package.json +152 -152
@@ -5,6 +5,8 @@ export interface Attachment extends OfflineModel, UploadedFileModel {
5
5
  description?: string;
6
6
  file_name: string;
7
7
  file_type: string;
8
+ submitted_at: string;
9
+ created_by: number;
8
10
  }
9
11
  export interface IssueAttachment extends Attachment, UploadedFileModel {
10
12
  issue: string;
@@ -20,7 +22,7 @@ export interface ProjectAttachment extends Attachment, UploadedFileModel {
20
22
  }
21
23
  /** to get an AttachmentPayload for a specific type, pass in the given AttachmentType
22
24
  * ex. AttachmentPayload<IssueAttachment> */
23
- export type AttachmentPayload<TAttachment> = Omit<TAttachment, "file"> & {
25
+ export type AttachmentPayload<TAttachment> = Omit<TAttachment, "file" | "submitted_at" | "created_by"> & {
24
26
  file: MaybeObjectURL<File>;
25
27
  };
26
28
  export interface ProfilePic extends UploadedFileModel {
@@ -3,6 +3,13 @@ export interface Model {
3
3
  export interface OfflineModel extends Model {
4
4
  offline_id: string;
5
5
  }
6
+ export interface SubmittedAtModel extends Model {
7
+ submitted_at: string;
8
+ }
9
+ export interface TimeStampedModel extends Model {
10
+ created_at: string;
11
+ updated_at: string;
12
+ }
6
13
  export type Offline<T> = T & {
7
14
  offline_id: string;
8
15
  };
@@ -1,4 +1,4 @@
1
- import { OfflineModel, Payload } from "./base";
1
+ import { OfflineModel, Payload, SubmittedAtModel } from "./base";
2
2
  import { BaseSerializedObject, FieldValue, ISerializedField } from "../../forms";
3
3
  import { UploadedFileModel } from '../files';
4
4
  import { WorkspaceIndexedModel } from "./workspace";
@@ -31,13 +31,10 @@ export interface UserFormRevision<TFields extends BaseSerializedObject = ISerial
31
31
  revision: number | "Pending";
32
32
  }
33
33
  export type UserFormRevisionPayload = Omit<Payload<UserFormRevision>, "created_by" | "revision" | "form">;
34
- export interface UserFormSubmission extends OfflineModel {
34
+ export interface UserFormSubmission extends OfflineModel, SubmittedAtModel {
35
35
  form_revision: string;
36
36
  values: Record<string, FieldValue>;
37
37
  created_by: number;
38
- created_at: string;
39
- submitted_at: string;
40
- updated_at: string;
41
38
  issue?: string;
42
39
  component?: string;
43
40
  component_stage?: string;
@@ -52,4 +49,4 @@ export interface UserFormRevisionAttachment extends OfflineModel, UploadedFileMo
52
49
  file_name: string;
53
50
  field_identifier: string;
54
51
  }
55
- export type UserFormSubmissionPayload = Omit<Payload<UserFormSubmission>, "created_by">;
52
+ export type UserFormSubmissionPayload = Omit<Payload<UserFormSubmission>, "created_by" | "submitted_at">;
@@ -3,11 +3,13 @@ import { IssuePriority, IssueStatus } from "../../enums";
3
3
  import { WorkspaceIndexedModel } from "./workspace";
4
4
  import { Marker } from "./geo";
5
5
  import { CreatedUserForm, SubmittedUserForm, UserForm } from "./forms";
6
+ import { User } from "./users";
7
+ import { CSSColor } from "../colors";
6
8
  /**
7
9
  * Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
8
10
  * all cases, the `offline_id`) are guaranteed to be set.
9
11
  */
10
- export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends IssueComment ? SubmittedIssueComment : TModel extends UserForm ? SubmittedUserForm : Omit<TModel, "created_at" | "created_by" | "id">);
12
+ export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends UserForm ? SubmittedUserForm : Omit<TModel, "created_at" | "created_by" | "id">);
11
13
  /**
12
14
  * Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
13
15
  * typically have additional properties that are only known once it has been processed and accepted by the API, such as
@@ -62,6 +64,7 @@ export interface IssueComment extends OfflineModel {
62
64
  content: string;
63
65
  author?: number;
64
66
  created_at?: string;
67
+ submitted_at: string;
65
68
  }
66
69
  export interface SubmittedIssueComment {
67
70
  created_at: Exclude<IssueComment["created_at"], undefined>;
@@ -71,3 +74,34 @@ export interface CreatedIssueComment {
71
74
  created_at: Exclude<IssueComment["created_at"], undefined>;
72
75
  }
73
76
  export type IssueCommentPayload = Omit<IssueComment, "author" | "created_at" | "offline_id">;
77
+ export declare enum IssueUpdateChange {
78
+ STATUS = "status",
79
+ PRIORITY = "priority",
80
+ CATEGORY = "category",
81
+ DESCRIPTION = "description",
82
+ TITLE = "title",
83
+ ASSIGNED_TO = "assigned_to",
84
+ DUE_DATE = "due_date"
85
+ }
86
+ export interface IssueUpdateChangeTypes {
87
+ status: IssueStatus;
88
+ priority: IssuePriority;
89
+ category: {
90
+ name: string;
91
+ color: CSSColor;
92
+ offline_id: OfflineModel["offline_id"];
93
+ } | null;
94
+ description: string;
95
+ title: string;
96
+ assigned_to: {
97
+ full_name: string;
98
+ id: User["id"];
99
+ } | null;
100
+ due_date: string;
101
+ }
102
+ export interface IssueUpdate extends OfflineModel {
103
+ submitted_at: string;
104
+ created_by: User["id"];
105
+ issue: OfflineModel["offline_id"];
106
+ changes: Partial<Record<IssueUpdateChange, IssueUpdateChangeTypes[IssueUpdateChange]>>;
107
+ }
package/package.json CHANGED
@@ -1,152 +1,152 @@
1
- {
2
- "name": "@overmap-ai/core",
3
- "description": "Core functionality for Overmap",
4
- "author": "Wôrdn Inc.",
5
- "license": "UNLICENSED",
6
- "version": "1.0.48-add-agent-response-rating.2",
7
- "type": "module",
8
- "main": "dist/overmap-core.umd.cjs",
9
- "module": "dist/overmap-core.js",
10
- "types": "dist/index.d.ts",
11
- "scripts": {
12
- "dev": "vite",
13
- "build": "tsc --noEmit && vite build",
14
- "lint": "tsc --noEmit && eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",
15
- "lint:fix": "eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0 --fix",
16
- "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
17
- "preview": "vite preview",
18
- "prepare": "husky install",
19
- "storybook": "storybook dev -p 6006",
20
- "build-storybook": "storybook build",
21
- "test": "npx vitest"
22
- },
23
- "dependencies": {
24
- "@hello-pangea/dnd": "^16.5.0",
25
- "@redux-offline/redux-offline": "^2.6.0",
26
- "@reduxjs/toolkit": "^1.9.5",
27
- "color": "^4.2.3",
28
- "dependency-graph": "^1.0.0",
29
- "eslint-plugin-vitest": "^0.3.20",
30
- "file-saver": "^2.0.5",
31
- "formik": "^2.4.5",
32
- "idb": "^7.1.1",
33
- "jwt-decode": "^3.1.2",
34
- "leaflet-draw": "^1.0.4",
35
- "leaflet.markercluster": "^1.5.3",
36
- "linkify-react": "^4.1.3",
37
- "linkifyjs": "^4.1.3",
38
- "localforage": "^1.10.0",
39
- "lodash.clonedeep": "^4.5.0",
40
- "lodash.get": "^4.4.2",
41
- "lodash.set": "^4.3.2",
42
- "react-leaflet": "^4.2.1",
43
- "react-pdf": "^8.0.2",
44
- "react-sketch-canvas": "^6.2.0",
45
- "react-spreadsheet": "^0.9.4",
46
- "redux-persist-migrate": "^5.0.0",
47
- "superagent": "^8.1.2",
48
- "uuid": "^9.0.0",
49
- "xlsx": "^0.18.5"
50
- },
51
- "devDependencies": {
52
- "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
53
- "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
54
- "@overmap-ai/blocks": "^1.0.29-alpha.0",
55
- "@rollup/plugin-commonjs": "^25.0.4",
56
- "@storybook/addon-essentials": "7.3.2",
57
- "@storybook/addon-interactions": "7.3.2",
58
- "@storybook/addon-links": "7.3.2",
59
- "@storybook/addon-onboarding": "1.0.8",
60
- "@storybook/blocks": "7.3.2",
61
- "@storybook/react": "7.3.2",
62
- "@storybook/react-vite": "7.3.2",
63
- "@storybook/testing-library": "0.2.0",
64
- "@testing-library/dom": "^9.3.4",
65
- "@testing-library/react": "^14.1.2",
66
- "@testing-library/user-event": "^14.5.2",
67
- "@types/color": "^3.0.4",
68
- "@types/file-saver": "^2.0.7",
69
- "@types/jwt-decode": "^3.1.0",
70
- "@types/leaflet": "^1.9.3",
71
- "@types/lodash.clonedeep": "^4.5.9",
72
- "@types/lodash.get": "^4.4.9",
73
- "@types/lodash.set": "^4.3.9",
74
- "@types/node": "^20.12.11",
75
- "@types/react": "^18.3.1",
76
- "@types/react-dom": "^18.2.7",
77
- "@types/react-redux": "^7.1.26",
78
- "@types/superagent": "^4.1.18",
79
- "@types/uuid": "^9.0.3",
80
- "@types/xlsx": "^0.0.36",
81
- "@typescript-eslint/eslint-plugin": "^6.4.1",
82
- "@typescript-eslint/parser": "^6.4.1",
83
- "@vitejs/plugin-react-swc": "^3.3.2",
84
- "@vitest/coverage-v8": "^1.2.1",
85
- "eslint": "^8.47.0",
86
- "eslint-config-prettier": "^9.0.0",
87
- "eslint-plugin-import": "^2.28.1",
88
- "eslint-plugin-prettier": "^5.0.0",
89
- "eslint-plugin-react": "^7.33.2",
90
- "eslint-plugin-react-hooks": "^4.6.0",
91
- "eslint-plugin-react-refresh": "^0.4.3",
92
- "eslint-plugin-simple-import-sort": "^10.0.0",
93
- "eslint-plugin-storybook": "^0.6.13",
94
- "happy-dom": "^13.3.1",
95
- "husky": "^8.0.3",
96
- "jsdom": "^23.2.0",
97
- "leaflet": "^1.9.0",
98
- "lint-staged": "^15.1.0",
99
- "prettier": "^3.0.2",
100
- "react": "^18.2.0",
101
- "react-dom": "^18.2.0",
102
- "react-hooks": "^1.0.1",
103
- "react-redux": "^8.1.2",
104
- "redux": "^4.2.1",
105
- "rollup-plugin-polyfill-node": "^0.12.0",
106
- "sass": "^1.66.1",
107
- "storybook": "7.3.2",
108
- "typescript": "^5.2.2",
109
- "vite": "^4.4.5",
110
- "vite-plugin-dts": "^3.5.2",
111
- "vite-plugin-externalize-deps": "^0.7.0",
112
- "vitest": "^1.2.1",
113
- "@tiptap/core": "^2.4.0"
114
- },
115
- "peerDependencies": {
116
- "@overmap-ai/blocks": "1.0.8",
117
- "leaflet": "^1.9.0",
118
- "react": "^18.2.0",
119
- "react-dom": "^18.2.0",
120
- "@tiptap/core": "^2.4.0",
121
- "react-redux": "^8.1.2"
122
- },
123
- "resolutions": {
124
- "//": "Workaround for eslint issue: https://github.com/eslint/eslint/discussions/17215",
125
- "strip-ansi": "6.0.1",
126
- "string-width": "4.2.2",
127
- "wrap-ansi": "7.0.0"
128
- },
129
- "lint-staged": {
130
- "src/**/*.{js,jsx,ts,tsx}": [
131
- "yarn lint",
132
- "yarn format"
133
- ]
134
- },
135
- "files": [
136
- "dist"
137
- ],
138
- "keywords": [
139
- "react",
140
- "geospacial",
141
- "map",
142
- "components"
143
- ],
144
- "homepage": "https://overmap.ai",
145
- "repository": {
146
- "type": "git",
147
- "url": "git+https://github.com/hemora-app/overmap-core.git"
148
- },
149
- "bugs": {
150
- "url": "https://github.com/hemora-app/overmap-core/issues"
151
- }
152
- }
1
+ {
2
+ "name": "@overmap-ai/core",
3
+ "description": "Core functionality for Overmap",
4
+ "author": "Wôrdn Inc.",
5
+ "license": "UNLICENSED",
6
+ "version": "1.0.48-bulk-form-submission.1",
7
+ "type": "module",
8
+ "main": "dist/overmap-core.umd.cjs",
9
+ "module": "dist/overmap-core.js",
10
+ "types": "dist/index.d.ts",
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "tsc --noEmit && vite build",
14
+ "lint": "tsc --noEmit && eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",
15
+ "lint:fix": "eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0 --fix",
16
+ "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
17
+ "preview": "vite preview",
18
+ "prepare": "husky install",
19
+ "storybook": "storybook dev -p 6006",
20
+ "build-storybook": "storybook build",
21
+ "test": "npx vitest"
22
+ },
23
+ "dependencies": {
24
+ "@hello-pangea/dnd": "^16.5.0",
25
+ "@redux-offline/redux-offline": "^2.6.0",
26
+ "@reduxjs/toolkit": "^1.9.5",
27
+ "color": "^4.2.3",
28
+ "dependency-graph": "^1.0.0",
29
+ "eslint-plugin-vitest": "^0.3.20",
30
+ "file-saver": "^2.0.5",
31
+ "formik": "^2.4.5",
32
+ "idb": "^7.1.1",
33
+ "jwt-decode": "^3.1.2",
34
+ "leaflet-draw": "^1.0.4",
35
+ "leaflet.markercluster": "^1.5.3",
36
+ "linkify-react": "^4.1.3",
37
+ "linkifyjs": "^4.1.3",
38
+ "localforage": "^1.10.0",
39
+ "lodash.clonedeep": "^4.5.0",
40
+ "lodash.get": "^4.4.2",
41
+ "lodash.set": "^4.3.2",
42
+ "react-leaflet": "^4.2.1",
43
+ "react-pdf": "^8.0.2",
44
+ "react-sketch-canvas": "^6.2.0",
45
+ "react-spreadsheet": "^0.9.4",
46
+ "redux-persist-migrate": "^5.0.0",
47
+ "superagent": "^8.1.2",
48
+ "uuid": "^9.0.0",
49
+ "xlsx": "^0.18.5"
50
+ },
51
+ "devDependencies": {
52
+ "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
53
+ "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
54
+ "@overmap-ai/blocks": "^1.0.29-alpha.1",
55
+ "@rollup/plugin-commonjs": "^25.0.4",
56
+ "@storybook/addon-essentials": "7.3.2",
57
+ "@storybook/addon-interactions": "7.3.2",
58
+ "@storybook/addon-links": "7.3.2",
59
+ "@storybook/addon-onboarding": "1.0.8",
60
+ "@storybook/blocks": "7.3.2",
61
+ "@storybook/react": "7.3.2",
62
+ "@storybook/react-vite": "7.3.2",
63
+ "@storybook/testing-library": "0.2.0",
64
+ "@testing-library/dom": "^9.3.4",
65
+ "@testing-library/react": "^14.1.2",
66
+ "@testing-library/user-event": "^14.5.2",
67
+ "@tiptap/core": "^2.4.0",
68
+ "@types/color": "^3.0.4",
69
+ "@types/file-saver": "^2.0.7",
70
+ "@types/jwt-decode": "^3.1.0",
71
+ "@types/leaflet": "^1.9.3",
72
+ "@types/lodash.clonedeep": "^4.5.9",
73
+ "@types/lodash.get": "^4.4.9",
74
+ "@types/lodash.set": "^4.3.9",
75
+ "@types/node": "^20.12.11",
76
+ "@types/react": "^18.3.1",
77
+ "@types/react-dom": "^18.2.7",
78
+ "@types/react-redux": "^7.1.26",
79
+ "@types/superagent": "^4.1.18",
80
+ "@types/uuid": "^9.0.3",
81
+ "@types/xlsx": "^0.0.36",
82
+ "@typescript-eslint/eslint-plugin": "^6.4.1",
83
+ "@typescript-eslint/parser": "^6.4.1",
84
+ "@vitejs/plugin-react-swc": "^3.3.2",
85
+ "@vitest/coverage-v8": "^1.2.1",
86
+ "eslint": "^8.47.0",
87
+ "eslint-config-prettier": "^9.0.0",
88
+ "eslint-plugin-import": "^2.28.1",
89
+ "eslint-plugin-prettier": "^5.0.0",
90
+ "eslint-plugin-react": "^7.33.2",
91
+ "eslint-plugin-react-hooks": "^4.6.0",
92
+ "eslint-plugin-react-refresh": "^0.4.3",
93
+ "eslint-plugin-simple-import-sort": "^10.0.0",
94
+ "eslint-plugin-storybook": "^0.6.13",
95
+ "happy-dom": "^13.3.1",
96
+ "husky": "^8.0.3",
97
+ "jsdom": "^23.2.0",
98
+ "leaflet": "^1.9.0",
99
+ "lint-staged": "^15.1.0",
100
+ "prettier": "^3.0.2",
101
+ "react": "^18.2.0",
102
+ "react-dom": "^18.2.0",
103
+ "react-hooks": "^1.0.1",
104
+ "react-redux": "^8.1.2",
105
+ "redux": "^4.2.1",
106
+ "rollup-plugin-polyfill-node": "^0.12.0",
107
+ "sass": "^1.66.1",
108
+ "storybook": "7.3.2",
109
+ "typescript": "^5.2.2",
110
+ "vite": "^4.4.5",
111
+ "vite-plugin-dts": "^3.5.2",
112
+ "vite-plugin-externalize-deps": "^0.7.0",
113
+ "vitest": "^1.2.1"
114
+ },
115
+ "peerDependencies": {
116
+ "@overmap-ai/blocks": "1.0.8",
117
+ "@tiptap/core": "^2.4.0",
118
+ "leaflet": "^1.9.0",
119
+ "react": "^18.2.0",
120
+ "react-dom": "^18.2.0",
121
+ "react-redux": "^8.1.2"
122
+ },
123
+ "resolutions": {
124
+ "//": "Workaround for eslint issue: https://github.com/eslint/eslint/discussions/17215",
125
+ "strip-ansi": "6.0.1",
126
+ "string-width": "4.2.2",
127
+ "wrap-ansi": "7.0.0"
128
+ },
129
+ "lint-staged": {
130
+ "src/**/*.{js,jsx,ts,tsx}": [
131
+ "yarn lint",
132
+ "yarn format"
133
+ ]
134
+ },
135
+ "files": [
136
+ "dist"
137
+ ],
138
+ "keywords": [
139
+ "react",
140
+ "geospacial",
141
+ "map",
142
+ "components"
143
+ ],
144
+ "homepage": "https://overmap.ai",
145
+ "repository": {
146
+ "type": "git",
147
+ "url": "git+https://github.com/hemora-app/overmap-core.git"
148
+ },
149
+ "bugs": {
150
+ "url": "https://github.com/hemora-app/overmap-core/issues"
151
+ }
152
+ }