@overmap-ai/core 1.0.60-geo-images.6 → 1.0.60-geo-images.8

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.
@@ -418,6 +418,9 @@ const literalToCoordinates = (literal) => {
418
418
  const flipCoordinates = (coordinates) => {
419
419
  return [coordinates[1], coordinates[0]];
420
420
  };
421
+ const flipBounds = (bounds) => {
422
+ return [flipCoordinates(bounds[0]), flipCoordinates(bounds[1])];
423
+ };
421
424
  function offsetPositionByMeters(originalPosition, latMeters, lngMeters) {
422
425
  const { lat, lng } = originalPosition;
423
426
  const earthRadius = 6378137;
@@ -2373,6 +2376,7 @@ const {
2373
2376
  removeProjectFilesOfProject,
2374
2377
  resetProjectFileObjectUrls
2375
2378
  } = projectFileSlice.actions;
2379
+ const selectProjectFileMapping = (state) => state.projectFileReducer.projectFiles;
2376
2380
  const selectEnabledProjectFiles = (state) => state.projectFileReducer.enabledProjectFiles;
2377
2381
  const selectProjectFileVisibility = createSelector(
2378
2382
  [selectEnabledProjectFiles],
@@ -2393,6 +2397,14 @@ const selectProjectFiles = createSelector(
2393
2397
  );
2394
2398
  const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
2395
2399
  const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
2400
+ const selectProjectFileById = restructureCreateSelectorWithArgs(
2401
+ createSelector(
2402
+ [selectProjectFileMapping, (_, projectFileId) => projectFileId],
2403
+ (projectFileMapping, projectFileId) => {
2404
+ return projectFileMapping[projectFileId];
2405
+ }
2406
+ )
2407
+ );
2396
2408
  const projectFileReducer = projectFileSlice.reducer;
2397
2409
  const projectAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
2398
2410
  const initialState$h = projectAttachmentAdapter.getInitialState({});
@@ -7549,6 +7561,7 @@ export {
7549
7561
  fileReducer,
7550
7562
  fileSlice,
7551
7563
  fileToBlob,
7564
+ flipBounds,
7552
7565
  flipCoordinates,
7553
7566
  formReducer,
7554
7567
  formRevisionAttachmentReducer,
@@ -7805,6 +7818,8 @@ export {
7805
7818
  selectProjectAccesses,
7806
7819
  selectProjectAttachment,
7807
7820
  selectProjectAttachmentMapping,
7821
+ selectProjectFileById,
7822
+ selectProjectFileMapping,
7808
7823
  selectProjectFileVisibility,
7809
7824
  selectProjectFiles,
7810
7825
  selectProjectUsersAsMapping,