@overmap-ai/core 1.0.60-move-active-states.0 → 1.0.60-move-active-states.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
CHANGED
|
@@ -1844,9 +1844,7 @@ const selectProjectAccessUserMapping = (state) => {
|
|
|
1844
1844
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
1845
1845
|
const initialState$l = {
|
|
1846
1846
|
projects: {},
|
|
1847
|
-
activeProjectId: null
|
|
1848
|
-
recentProjectIds: [],
|
|
1849
|
-
recentSearchableQueries: []
|
|
1847
|
+
activeProjectId: null
|
|
1850
1848
|
};
|
|
1851
1849
|
const projectSlice = createSlice({
|
|
1852
1850
|
name: "projects",
|
|
@@ -1931,21 +1929,6 @@ const selectProject = restructureCreateSelectorWithArgs(
|
|
|
1931
1929
|
(projects, projectId) => projects[projectId]
|
|
1932
1930
|
)
|
|
1933
1931
|
);
|
|
1934
|
-
const selectSortedProjects = createSelector(
|
|
1935
|
-
[selectActiveProject, selectProjects],
|
|
1936
|
-
(activeProject, projects) => {
|
|
1937
|
-
return Object.values(projects).sort((projectA, projectB) => {
|
|
1938
|
-
if (activeProject) {
|
|
1939
|
-
if (activeProject.id === projectA.id) {
|
|
1940
|
-
return -1;
|
|
1941
|
-
} else if (activeProject.id === projectB.id) {
|
|
1942
|
-
return 1;
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
return projectA.name.toLowerCase().localeCompare(projectB.name.toLowerCase(), void 0, { numeric: true });
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
);
|
|
1949
1932
|
const projectReducer = projectSlice.reducer;
|
|
1950
1933
|
const selectProjectUsersIds = createSelector(
|
|
1951
1934
|
[selectProjectAccessMapping],
|
|
@@ -5343,10 +5326,6 @@ class ProjectService extends BaseApiService {
|
|
|
5343
5326
|
if (!project) {
|
|
5344
5327
|
throw new Error("Expected project to exist");
|
|
5345
5328
|
}
|
|
5346
|
-
const activeProjectId = state.projectReducer.activeProjectId;
|
|
5347
|
-
if (activeProjectId === projectId) {
|
|
5348
|
-
this.dispatch({ type: "project/setActiveProjectId", payload: null });
|
|
5349
|
-
}
|
|
5350
5329
|
const filesToDelete = selectProjectFiles(state).filter((file) => file.project === projectId);
|
|
5351
5330
|
this.dispatch(removeProjectFilesOfProject(project.id));
|
|
5352
5331
|
const attachmentsOfProject = selectAttachmentsOfProject(project.id)(state);
|
|
@@ -5373,7 +5352,6 @@ class ProjectService extends BaseApiService {
|
|
|
5373
5352
|
this.dispatch(setProjectAccesses(Object.values(projectAccesses)));
|
|
5374
5353
|
this.dispatch(addOrReplaceProjectFiles(filesToDelete));
|
|
5375
5354
|
this.dispatch(setProjectAttachments(attachmentsOfProject));
|
|
5376
|
-
this.dispatch(setActiveProjectId(activeProjectId));
|
|
5377
5355
|
this.dispatch({ type: "rehydrated/setRehydrated", payload: true });
|
|
5378
5356
|
if (license) {
|
|
5379
5357
|
this.dispatch(updateLicense({ ...license, project: project.id }));
|
|
@@ -7607,7 +7585,6 @@ export {
|
|
|
7607
7585
|
selectSortedFormSubmissionsOfForm,
|
|
7608
7586
|
selectSortedOrganizationUsers,
|
|
7609
7587
|
selectSortedProjectUsers,
|
|
7610
|
-
selectSortedProjects,
|
|
7611
7588
|
selectStage,
|
|
7612
7589
|
selectStageFormIdsFromStageIds,
|
|
7613
7590
|
selectStageMapping,
|