@overmap-ai/core 1.0.60-model-adapter.1 → 1.0.60-sdk-refactor.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 (111) hide show
  1. package/dist/enums/index.d.ts +0 -1
  2. package/dist/forms/builder/FormBuilder.d.ts +1 -0
  3. package/dist/forms/fields/BaseField/hooks.d.ts +11 -11
  4. package/dist/forms/fields/BaseField/layouts.d.ts +3 -2
  5. package/dist/forms/fields/typings.d.ts +3 -3
  6. package/dist/forms/index.d.ts +1 -0
  7. package/dist/forms/provider.d.ts +5 -0
  8. package/dist/forms/renderer/index.d.ts +0 -3
  9. package/dist/forms/utils.d.ts +0 -2
  10. package/dist/index.d.ts +0 -1
  11. package/dist/overmap-core.js +17955 -15482
  12. package/dist/overmap-core.js.map +1 -1
  13. package/dist/overmap-core.umd.cjs +17889 -15417
  14. package/dist/overmap-core.umd.cjs.map +1 -1
  15. package/dist/sdk/base.d.ts +22 -0
  16. package/dist/sdk/globals.d.ts +7 -0
  17. package/dist/sdk/index.d.ts +1 -0
  18. package/dist/sdk/sdk.d.ts +3 -51
  19. package/dist/sdk/services/AgentService.d.ts +3 -2
  20. package/dist/sdk/services/AssetAttachmentService.d.ts +4 -3
  21. package/dist/sdk/services/AssetService.d.ts +4 -3
  22. package/dist/sdk/services/AssetStageCompletionService.d.ts +4 -3
  23. package/dist/sdk/services/AssetStageService.d.ts +3 -2
  24. package/dist/sdk/services/AssetTypeAttachmentService.d.ts +4 -3
  25. package/dist/sdk/services/AssetTypeService.d.ts +4 -3
  26. package/dist/sdk/services/AuthService.d.ts +4 -3
  27. package/dist/sdk/services/BaseApiService.d.ts +15 -4
  28. package/dist/sdk/services/BaseAttachmentService.d.ts +5 -4
  29. package/dist/sdk/services/CategoryService.d.ts +4 -3
  30. package/dist/sdk/services/DocumentAttachmentService.d.ts +4 -3
  31. package/dist/sdk/services/DocumentService.d.ts +4 -3
  32. package/dist/sdk/services/EmailDomainsService.d.ts +3 -2
  33. package/dist/sdk/services/EmailVerificationService.d.ts +3 -3
  34. package/dist/sdk/services/FileService.d.ts +4 -1
  35. package/dist/sdk/services/IssueAttachmentService.d.ts +4 -3
  36. package/dist/sdk/services/IssueCommentService.d.ts +4 -3
  37. package/dist/sdk/services/IssueService.d.ts +4 -3
  38. package/dist/sdk/services/IssueTypeService.d.ts +4 -3
  39. package/dist/sdk/services/IssueUpdateService.d.ts +3 -1
  40. package/dist/sdk/services/LicenseService.d.ts +3 -2
  41. package/dist/sdk/services/OrganizationAccessService.d.ts +3 -2
  42. package/dist/sdk/services/OrganizationService.d.ts +3 -2
  43. package/dist/sdk/services/ProjectAccessService.d.ts +3 -2
  44. package/dist/sdk/services/ProjectAttachmentService.d.ts +4 -3
  45. package/dist/sdk/services/ProjectFileService.d.ts +3 -1
  46. package/dist/sdk/services/ProjectService.d.ts +3 -2
  47. package/dist/sdk/services/TeamService.d.ts +4 -3
  48. package/dist/sdk/services/UserFormService.d.ts +4 -3
  49. package/dist/sdk/services/UserFormSubmissionService.d.ts +4 -3
  50. package/dist/sdk/services/WorkspaceService.d.ts +3 -1
  51. package/dist/sdk/services/index.d.ts +0 -1
  52. package/dist/sdk/typings.d.ts +4 -1
  53. package/dist/store/index.d.ts +0 -1
  54. package/dist/store/slices/agentsSlice.d.ts +4 -4
  55. package/dist/store/slices/assetAttachmentSlice.d.ts +6 -6
  56. package/dist/store/slices/assetSlice.d.ts +8 -8
  57. package/dist/store/slices/assetStageCompletionSlice.d.ts +3 -3
  58. package/dist/store/slices/assetStageSlice.d.ts +9 -9
  59. package/dist/store/slices/assetTypeAttachmentSlice.d.ts +6 -6
  60. package/dist/store/slices/assetTypeSlice.d.ts +7 -7
  61. package/dist/store/slices/authSlice.d.ts +3 -3
  62. package/dist/store/slices/categorySlice.d.ts +8 -50
  63. package/dist/store/slices/documentAttachmentSlice.d.ts +6 -6
  64. package/dist/store/slices/documentSlice.d.ts +6 -48
  65. package/dist/store/slices/emailDomainsSlice.d.ts +4 -4
  66. package/dist/store/slices/fileSlice.d.ts +2 -2
  67. package/dist/store/slices/formRevisionAttachmentSlice.d.ts +3 -3
  68. package/dist/store/slices/formRevisionSlice.d.ts +8 -50
  69. package/dist/store/slices/formSlice.d.ts +8 -8
  70. package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +3 -3
  71. package/dist/store/slices/formSubmissionSlice.d.ts +11 -11
  72. package/dist/store/slices/index.d.ts +0 -1
  73. package/dist/store/slices/issueAttachmentSlice.d.ts +6 -6
  74. package/dist/store/slices/issueCommentSlice.d.ts +3 -3
  75. package/dist/store/slices/issueSlice.d.ts +9 -9
  76. package/dist/store/slices/issueTypeSlice.d.ts +7 -7
  77. package/dist/store/slices/issueUpdateSlice.d.ts +3 -3
  78. package/dist/store/slices/licenseSlice.d.ts +7 -7
  79. package/dist/store/slices/organizationAccessSlice.d.ts +6 -6
  80. package/dist/store/slices/organizationSlice.d.ts +13 -13
  81. package/dist/store/slices/outboxSlice.d.ts +3 -3
  82. package/dist/store/slices/projectAccessSlice.d.ts +7 -7
  83. package/dist/store/slices/projectAttachmentSlice.d.ts +6 -6
  84. package/dist/store/slices/projectFileSlice.d.ts +7 -49
  85. package/dist/store/slices/projectSlice.d.ts +10 -10
  86. package/dist/store/slices/rehydratedSlice.d.ts +3 -2
  87. package/dist/store/slices/settingsSlice.d.ts +3 -24
  88. package/dist/store/slices/teamSlice.d.ts +6 -6
  89. package/dist/store/slices/userSlice.d.ts +5 -5
  90. package/dist/store/slices/workspaceSlice.d.ts +8 -50
  91. package/dist/store/store.d.ts +8 -90
  92. package/dist/style.css +0 -18
  93. package/dist/typings/models/store.d.ts +43 -4
  94. package/dist/typings/store.d.ts +6 -4
  95. package/dist/utils/file.d.ts +0 -6
  96. package/dist/utils/utils.d.ts +3 -3
  97. package/package.json +5 -3
  98. package/dist/contexts/hooks.d.ts +0 -2
  99. package/dist/contexts/index.d.ts +0 -3
  100. package/dist/contexts/overmap.d.ts +0 -12
  101. package/dist/contexts/sdk/globals.d.ts +0 -4
  102. package/dist/contexts/sdk/hooks.d.ts +0 -4
  103. package/dist/contexts/sdk/index.d.ts +0 -2
  104. package/dist/contexts/sdk/sdk.d.ts +0 -15
  105. package/dist/enums/map.d.ts +0 -6
  106. package/dist/forms/renderer/FormBrowser/FormBrowser.d.ts +0 -11
  107. package/dist/forms/renderer/FormSubmissionBrowser/FormSubmissionBrowser.d.ts +0 -28
  108. package/dist/forms/renderer/FormSubmissionViewer/FormSubmissionViewer.d.ts +0 -17
  109. package/dist/sdk/services/MainService.d.ts +0 -16
  110. package/dist/store/hooks.d.ts +0 -4
  111. package/dist/store/slices/mapSlice.d.ts +0 -23
@@ -1,6 +1,5 @@
1
- /// <reference types="@redux-offline/redux-offline" />
2
1
  import { Reducer, PayloadAction } from "@reduxjs/toolkit";
3
- import { RootState, Selector, Workspace } from "../../typings";
2
+ import { OvermapRootState, OvermapSelector, Workspace } from "../../typings";
4
3
  import { ModelState } from "../typings";
5
4
  export interface WorkspaceState extends ModelState<Workspace> {
6
5
  activeWorkspaceId: string | null;
@@ -29,56 +28,15 @@ export declare const workspaceSlice: import("@reduxjs/toolkit").Slice<WorkspaceS
29
28
  setActiveWorkspaceId: (state: import("immer/dist/internal.js").WritableDraft<WorkspaceState>, action: PayloadAction<string | null>) => void;
30
29
  }, "workspace">;
31
30
  export declare const initializeWorkspaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace[], "workspace/initializeWorkspaces">, setWorkspaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace[], "workspace/setWorkspaces">, addWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace, "workspace/addWorkspace">, updateWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<Workspace, "workspace/updateWorkspace">, setActiveWorkspaceId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "workspace/setActiveWorkspaceId">, deleteWorkspace: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "workspace/deleteWorkspace">;
32
- export declare const selectWorkspaceMapping: Selector<Record<string, Workspace>>;
33
- export declare const selectWorkspaces: ((state: import("redux").EmptyObject & {
34
- versioning: import('../slices/versioningSlice').VersioningState;
35
- fileReducer: import('..').FileState;
36
- authReducer: import('..').AuthState;
37
- categoryReducer: import('..').CategoryState;
38
- assetReducer: import('..').AssetState;
39
- assetAttachmentReducer: import('..').AssetAttachmentState;
40
- assetStageCompletionReducer: import('..').AssetStageCompletionState;
41
- assetStageReducer: import('..').AssetStageState;
42
- assetTypeReducer: import('..').AssetTypeState;
43
- assetTypeAttachmentReducer: import('..').AssetTypeAttachmentState;
44
- issueReducer: import('..').IssueState;
45
- issueTypeReducer: import('..').IssueTypeState;
46
- mapReducer: import('..').MapState;
47
- organizationReducer: import('..').OrganizationState;
48
- outboxReducer: import('..').OutboxState;
49
- projectReducer: import('..').ProjectState;
50
- projectAttachmentReducer: import('..').ProjectAttachmentState;
51
- projectAccessReducer: import('..').ProjectAccessState;
52
- organizationAccessReducer: import('..').OrganizationAccessState;
53
- projectFileReducer: import('..').ProjectFileState;
54
- rehydratedReducer: import('..').RehydratedState;
55
- settingReducer: import('..').SettingState;
56
- formReducer: import('..').FormState;
57
- userReducer: import('..').UserState;
58
- formRevisionReducer: import('..').FormRevisionState;
59
- formRevisionAttachmentReducer: import('..').FormRevisionAttachmentState;
60
- formSubmissionAttachmentReducer: import('..').FormSubmissionAttachmentState;
61
- formSubmissionReducer: import('..').FormSubmissionState;
62
- workspaceReducer: WorkspaceState;
63
- emailDomainsReducer: import('..').EmailDomainState;
64
- licenseReducer: import('..').LicenseState;
65
- documentsReducer: import('..').DocumentState;
66
- documentAttachmentReducer: import('..').DocumentAttachmentState;
67
- teamReducer: import('..').TeamState;
68
- agentsReducer: import('..').AgentsState;
69
- issueCommentReducer: import('..').IssueCommentState;
70
- issueUpdateReducer: import('..').IssueUpdateState;
71
- issueAttachmentReducer: import('..').IssueAttachmentState;
72
- } & {
73
- offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
74
- }) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
31
+ export declare const selectWorkspaceMapping: OvermapSelector<Record<string, Workspace>>;
32
+ export declare const selectWorkspaces: ((state: OvermapRootState) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
75
33
  clearCache: () => void;
76
34
  }> & {
77
35
  clearCache: () => void;
78
36
  };
79
- export declare const selectMainWorkspace: Selector<Workspace | undefined>;
80
- export declare const selectWorkspace: (args: string) => (state: RootState) => Workspace | undefined;
81
- export declare const selectActiveWorkspaceId: Selector<string | null>;
82
- export declare const selectActiveWorkspace: Selector<Workspace | null | undefined>;
83
- export declare const selectPermittedWorkspaceIds: Selector<Set<string>>;
37
+ export declare const selectMainWorkspace: OvermapSelector<Workspace | undefined>;
38
+ export declare const selectWorkspace: (args: string) => (state: OvermapRootState) => Workspace | undefined;
39
+ export declare const selectActiveWorkspaceId: OvermapSelector<string | null>;
40
+ export declare const selectActiveWorkspace: OvermapSelector<Workspace | null | undefined>;
41
+ export declare const selectPermittedWorkspaceIds: OvermapSelector<Set<string>>;
84
42
  export declare const workspaceReducer: Reducer<WorkspaceState>;
@@ -1,11 +1,12 @@
1
1
  /// <reference types="@redux-offline/redux-offline" />
2
- import { AnyAction, Reducer } from "redux";
3
- import { Config, OfflineAction, OfflineMetadata, OfflineState } from "@redux-offline/redux-offline/lib/types";
2
+ import { Reducer } from "redux";
3
+ import { Config, OfflineAction, OfflineMetadata } from "@redux-offline/redux-offline/lib/types";
4
4
  import request from "superagent";
5
- import { type OfflineMetaEffect, OutboxCoordinator, type OvermapSDK, RequestDetails } from "../sdk";
6
- import { AgentsState, AuthState, CategoryState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeState, DocumentState, EmailDomainState, FileState, FormRevisionState, FormState, FormSubmissionState, IssueState, IssueTypeState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, UserState, WorkspaceState, TeamState, IssueCommentState, IssueUpdateState, AssetAttachmentState, AssetTypeAttachmentState, DocumentAttachmentState, IssueAttachmentState, ProjectAttachmentState, FormSubmissionAttachmentState, FormRevisionAttachmentState } from "./slices";
5
+ import { type OfflineMetaEffect, OutboxCoordinator, type BaseSDK, RequestDetails } from "../sdk";
6
+ import { AgentsState, AuthState, CategoryState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeState, DocumentState, EmailDomainState, FileState, FormRevisionState, FormState, FormSubmissionState, IssueState, IssueTypeState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, UserState, WorkspaceState, TeamState, IssueCommentState, IssueUpdateState, AssetAttachmentState, AssetTypeAttachmentState, DocumentAttachmentState, IssueAttachmentState, ProjectAttachmentState, FormSubmissionAttachmentState, FormRevisionAttachmentState } from "./slices";
7
7
  import { VersioningState } from "./slices/versioningSlice";
8
- import { RootState } from "../typings";
8
+ import { BaseState, OvermapRootState } from "../typings";
9
+ export declare const VERSION_REDUCER_KEY = "versioning";
9
10
  export declare const overmapReducers: {
10
11
  versioning: Reducer<VersioningState>;
11
12
  fileReducer: Reducer<FileState>;
@@ -19,7 +20,6 @@ export declare const overmapReducers: {
19
20
  assetTypeAttachmentReducer: Reducer<AssetTypeAttachmentState>;
20
21
  issueReducer: Reducer<IssueState>;
21
22
  issueTypeReducer: Reducer<IssueTypeState>;
22
- mapReducer: Reducer<MapState>;
23
23
  organizationReducer: Reducer<OrganizationState>;
24
24
  outboxReducer: Reducer<OutboxState>;
25
25
  projectReducer: Reducer<ProjectState>;
@@ -46,48 +46,8 @@ export declare const overmapReducers: {
46
46
  issueUpdateReducer: Reducer<IssueUpdateState>;
47
47
  issueAttachmentReducer: Reducer<IssueAttachmentState>;
48
48
  };
49
- export declare const overmapReducer: Reducer<import("redux").CombinedState<{
50
- versioning: VersioningState;
51
- fileReducer: FileState;
52
- authReducer: AuthState;
53
- categoryReducer: CategoryState;
54
- assetReducer: AssetState;
55
- assetAttachmentReducer: AssetAttachmentState;
56
- assetStageCompletionReducer: AssetStageCompletionState;
57
- assetStageReducer: AssetStageState;
58
- assetTypeReducer: AssetTypeState;
59
- assetTypeAttachmentReducer: AssetTypeAttachmentState;
60
- issueReducer: IssueState;
61
- issueTypeReducer: IssueTypeState;
62
- mapReducer: MapState;
63
- organizationReducer: OrganizationState;
64
- outboxReducer: OutboxState;
65
- projectReducer: ProjectState;
66
- projectAttachmentReducer: ProjectAttachmentState;
67
- projectAccessReducer: ProjectAccessState;
68
- organizationAccessReducer: OrganizationAccessState;
69
- projectFileReducer: ProjectFileState;
70
- rehydratedReducer: RehydratedState;
71
- settingReducer: SettingState;
72
- formReducer: FormState;
73
- userReducer: UserState;
74
- formRevisionReducer: FormRevisionState;
75
- formRevisionAttachmentReducer: FormRevisionAttachmentState;
76
- formSubmissionAttachmentReducer: FormSubmissionAttachmentState;
77
- formSubmissionReducer: FormSubmissionState;
78
- workspaceReducer: WorkspaceState;
79
- emailDomainsReducer: EmailDomainState;
80
- licenseReducer: LicenseState;
81
- documentsReducer: DocumentState;
82
- documentAttachmentReducer: DocumentAttachmentState;
83
- teamReducer: TeamState;
84
- agentsReducer: AgentsState;
85
- issueCommentReducer: IssueCommentState;
86
- issueUpdateReducer: IssueUpdateState;
87
- issueAttachmentReducer: IssueAttachmentState;
88
- }>, AnyAction>;
89
49
  export declare const resetStore = "RESET";
90
- export declare const rootReducer: Reducer<RootState>;
50
+ export declare const overmapRootReducer: Reducer<OvermapRootState>;
91
51
  export interface FullOfflineMetadata extends OfflineMetadata {
92
52
  effect: OfflineMetaEffect;
93
53
  }
@@ -105,47 +65,5 @@ export declare const dequeue: Config["queue"]["dequeue"];
105
65
  * Add to your store's `enhancers` array.
106
66
  */
107
67
  export declare const overmapEnhancer: (...args: any[]) => unknown;
108
- export declare const defaultStore: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
109
- versioning: VersioningState;
110
- fileReducer: FileState;
111
- authReducer: AuthState;
112
- categoryReducer: CategoryState;
113
- assetReducer: AssetState;
114
- assetAttachmentReducer: AssetAttachmentState;
115
- assetStageCompletionReducer: AssetStageCompletionState;
116
- assetStageReducer: AssetStageState;
117
- assetTypeReducer: AssetTypeState;
118
- assetTypeAttachmentReducer: AssetTypeAttachmentState;
119
- issueReducer: IssueState;
120
- issueTypeReducer: IssueTypeState;
121
- mapReducer: MapState;
122
- organizationReducer: OrganizationState;
123
- outboxReducer: OutboxState;
124
- projectReducer: ProjectState;
125
- projectAttachmentReducer: ProjectAttachmentState;
126
- projectAccessReducer: ProjectAccessState;
127
- organizationAccessReducer: OrganizationAccessState;
128
- projectFileReducer: ProjectFileState;
129
- rehydratedReducer: RehydratedState;
130
- settingReducer: SettingState;
131
- formReducer: FormState;
132
- userReducer: UserState;
133
- formRevisionReducer: FormRevisionState;
134
- formRevisionAttachmentReducer: FormRevisionAttachmentState;
135
- formSubmissionAttachmentReducer: FormSubmissionAttachmentState;
136
- formSubmissionReducer: FormSubmissionState;
137
- workspaceReducer: WorkspaceState;
138
- emailDomainsReducer: EmailDomainState;
139
- licenseReducer: LicenseState;
140
- documentsReducer: DocumentState;
141
- documentAttachmentReducer: DocumentAttachmentState;
142
- teamReducer: TeamState;
143
- agentsReducer: AgentsState;
144
- issueCommentReducer: IssueCommentState;
145
- issueUpdateReducer: IssueUpdateState;
146
- issueAttachmentReducer: IssueAttachmentState;
147
- } & {
148
- offline: OfflineState;
149
- }, AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<RootState, AnyAction>]>>;
150
- export declare function performRequest(action: FullOfflineAction, client: OvermapSDK): Promise<request.Response>;
68
+ export declare function performRequest(action: FullOfflineAction, client: BaseSDK<BaseState>): Promise<request.Response>;
151
69
  export declare function discard(reason: unknown, action: FullOfflineAction, retries?: number): boolean;
package/dist/style.css CHANGED
@@ -290,24 +290,6 @@
290
290
  }
291
291
  ._Footer_kbztw_19._Loading_kbztw_22 {
292
292
  background-color: unset;
293
- }._favoriteIcon_1bixi_1._favoriteIcon_1bixi_1 {
294
- color: var(--yellow-a9);
295
- }
296
- ._favoriteIcon_1bixi_1._favoriteIcon_1bixi_1:hover:not(:disabled) {
297
- background-color: transparent;
298
- color: var(--gray-a9);
299
- }
300
-
301
- ._regularIcon_1bixi_9._regularIcon_1bixi_9:hover:not(:disabled) {
302
- color: var(--yellow-a9);
303
- background-color: transparent;
304
- }._submissionsContainer_9iirt_1 {
305
- overflow-y: auto;
306
- max-height: min(369px, 100vh - 200px);
307
- }
308
-
309
- ._stopHorizontalOverflow_9iirt_6 {
310
- min-width: 0;
311
293
  }._typeBadge_an5ff_1 {
312
294
  width: fit-content;
313
295
  }
@@ -1,7 +1,46 @@
1
1
  /// <reference types="@redux-offline/redux-offline" />
2
2
  import { OfflineState } from "@redux-offline/redux-offline/lib/types";
3
- import { defaultStore, overmapReducer } from "../../store";
4
- export type AppDispatch = (typeof defaultStore)["dispatch"];
5
- export type RootState = ReturnType<typeof overmapReducer> & {
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
+ import { VersioningState } from "../../store/slices/versioningSlice";
5
+ export interface BaseState {
6
+ outboxReducer: OutboxState;
6
7
  offline: OfflineState;
7
- };
8
+ fileReducer: FileState;
9
+ authReducer: AuthState;
10
+ }
11
+ export interface OvermapRootState extends BaseState {
12
+ [VERSION_REDUCER_KEY]: VersioningState;
13
+ categoryReducer: CategoryState;
14
+ assetReducer: AssetState;
15
+ assetAttachmentReducer: AssetAttachmentState;
16
+ assetStageCompletionReducer: AssetStageCompletionState;
17
+ assetStageReducer: AssetStageState;
18
+ assetTypeReducer: AssetTypeState;
19
+ assetTypeAttachmentReducer: AssetTypeAttachmentState;
20
+ issueReducer: IssueState;
21
+ issueAttachmentReducer: IssueAttachmentState;
22
+ issueCommentReducer: IssueCommentState;
23
+ issueUpdateReducer: IssueUpdateState;
24
+ issueTypeReducer: IssueTypeState;
25
+ organizationReducer: OrganizationState;
26
+ projectReducer: ProjectState;
27
+ projectAttachmentReducer: ProjectAttachmentState;
28
+ projectAccessReducer: ProjectAccessState;
29
+ organizationAccessReducer: OrganizationAccessState;
30
+ projectFileReducer: ProjectFileState;
31
+ rehydratedReducer: RehydratedState;
32
+ settingReducer: SettingState;
33
+ formReducer: FormState;
34
+ formRevisionReducer: FormRevisionState;
35
+ formRevisionAttachmentReducer: FormRevisionAttachmentState;
36
+ formSubmissionReducer: FormSubmissionState;
37
+ formSubmissionAttachmentReducer: FormSubmissionAttachmentState;
38
+ userReducer: UserState;
39
+ workspaceReducer: WorkspaceState;
40
+ emailDomainsReducer: EmailDomainState;
41
+ licenseReducer: LicenseState;
42
+ documentsReducer: DocumentState;
43
+ documentAttachmentReducer: DocumentAttachmentState;
44
+ teamReducer: TeamState;
45
+ agentsReducer: AgentsState;
46
+ }
@@ -1,5 +1,7 @@
1
- import { RootState } from "./models";
2
- export type SelectorWithArgs<TArgs, TRet> = (args: TArgs) => (state: RootState) => TRet | undefined;
3
- export type Selector<TRet> = (state: RootState) => TRet;
4
- export type Migrator = (state: Partial<RootState>) => Partial<RootState>;
1
+ import { OvermapRootState } from "./models";
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>;
6
+ export type Migrator = (state: Partial<OvermapRootState>) => Partial<OvermapRootState>;
5
7
  export type Manifest = Record<number, Migrator>;
@@ -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;
@@ -1,6 +1,6 @@
1
- import { Coordinates, IssueAttachment, OfflineModel, RootState } from "../typings";
2
- type MemoizedSelectorWithArgs<TArgs, TRet> = (state: RootState, args: TArgs) => TRet;
3
- export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: RootState) => TRet;
1
+ import { Coordinates, IssueAttachment, OfflineModel, OvermapRootState } from "../typings";
2
+ type MemoizedSelectorWithArgs<TArgs, TRet> = (state: OvermapRootState, args: TArgs) => TRet;
3
+ export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: OvermapRootState) => TRet;
4
4
  export declare function onlyUniqueOfflineIds(value: OfflineModel, index: number, self: OfflineModel[]): boolean;
5
5
  export declare function onlyUniqueHashes(value: IssueAttachment, index: number, self: IssueAttachment[]): boolean;
6
6
  /**
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-model-adapter.1",
6
+ "version": "1.0.60-sdk-refactor.1",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -52,7 +52,7 @@
52
52
  "devDependencies": {
53
53
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
54
54
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
55
- "@overmap-ai/blocks": "^1.0.29-alpha.1",
55
+ "@overmap-ai/blocks": "1.0.31-clean-up.1",
56
56
  "@rollup/plugin-commonjs": "^25.0.4",
57
57
  "@storybook/addon-essentials": "7.3.2",
58
58
  "@storybook/addon-interactions": "7.3.2",
@@ -102,6 +102,7 @@
102
102
  "react": "^18.2.0",
103
103
  "react-dom": "^18.2.0",
104
104
  "react-hooks": "^1.0.1",
105
+ "react-icons": "^5.4.0",
105
106
  "react-redux": "^8.1.2",
106
107
  "redux": "^4.2.1",
107
108
  "rollup-plugin-polyfill-node": "^0.12.0",
@@ -114,11 +115,12 @@
114
115
  "vitest": "^1.2.1"
115
116
  },
116
117
  "peerDependencies": {
117
- "@overmap-ai/blocks": "1.0.8",
118
+ "@overmap-ai/blocks": "1.0.31-clean-up.1",
118
119
  "@tiptap/core": "^2.4.0",
119
120
  "leaflet": "^1.9.0",
120
121
  "react": "^18.2.0",
121
122
  "react-dom": "^18.2.0",
123
+ "react-icons": "^1.3.0",
122
124
  "react-redux": "^8.1.2"
123
125
  },
124
126
  "resolutions": {
@@ -1,2 +0,0 @@
1
- declare const useOvermap: () => null;
2
- export default useOvermap;
@@ -1,3 +0,0 @@
1
- export * from "./hooks";
2
- export * from "./overmap";
3
- export * from "./sdk";
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
3
- import { RootState } from "../typings";
4
- interface OvermapProviderProps {
5
- children: React.ReactNode;
6
- production?: boolean;
7
- disableDefaultTheme?: boolean;
8
- store: ToolkitStore<RootState>;
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 { RootState } from "../../typings";
3
- export declare function setClientStore(store: ToolkitStore<RootState>): void;
4
- export declare function getClientStore(): ToolkitStore<RootState> | undefined;
@@ -1,4 +0,0 @@
1
- /**
2
- * useSDK
3
- */
4
- export declare const useSDK: () => import("./sdk").ISDKContext;
@@ -1,2 +0,0 @@
1
- export * from "./hooks";
2
- export * from "./sdk";
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import { OvermapSDK } from "../../sdk";
3
- import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
4
- import { RootState } from "../../typings";
5
- export interface ISDKContext {
6
- sdk: OvermapSDK;
7
- }
8
- interface SDKProviderProps {
9
- children: React.ReactNode;
10
- API_URL: string;
11
- store: ToolkitStore<RootState>;
12
- }
13
- declare const SDKContext: React.Context<ISDKContext>;
14
- declare const SDKProvider: React.MemoExoticComponent<({ children, API_URL, store }: SDKProviderProps) => import("react/jsx-runtime").JSX.Element>;
15
- export { SDKProvider, SDKContext };
@@ -1,6 +0,0 @@
1
- export declare enum MapStyle {
2
- LIGHT = "LIGHT",
3
- DARK = "DARK",
4
- SATELLITE = "SATELLITE",
5
- NONE = "NONE"
6
- }
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { CachedUserForm } from "../../../typings";
3
- interface FormBrowserProps {
4
- /** If `true`, the user can toggle the favorite state of the forms they have access to */
5
- isFavoriteEditable?: boolean;
6
- onSelectForm: (form: CachedUserForm) => void;
7
- /** @default 20 */
8
- maxResults?: number;
9
- }
10
- export declare const FormBrowser: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FormBrowserProps & import("react").RefAttributes<HTMLDivElement>>>;
11
- 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,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
- }
@@ -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>;