@overmap-ai/core 1.0.60-forms-removal.9 → 1.0.60-forms-refactor-1.0

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 (39) hide show
  1. package/dist/overmap-core.js +449 -469
  2. package/dist/overmap-core.js.map +1 -1
  3. package/dist/overmap-core.umd.cjs +449 -469
  4. package/dist/overmap-core.umd.cjs.map +1 -1
  5. package/dist/sdk/services/BaseAttachmentService.d.ts +8 -4
  6. package/dist/sdk/services/BaseUploadService.d.ts +8 -0
  7. package/dist/sdk/services/FormService.d.ts +18 -0
  8. package/dist/sdk/services/FormSubmissionService.d.ts +24 -0
  9. package/dist/sdk/services/GeoImageService.d.ts +11 -0
  10. package/dist/sdk/services/IssueService.d.ts +1 -1
  11. package/dist/sdk/services/index.d.ts +3 -2
  12. package/dist/sdk/typings.d.ts +3 -2
  13. package/dist/store/slices/assetTypeSlice.d.ts +2 -8
  14. package/dist/store/slices/categorySlice.d.ts +11 -25
  15. package/dist/store/slices/formRevisionAttachmentSlice.d.ts +20 -20
  16. package/dist/store/slices/formRevisionSlice.d.ts +21 -21
  17. package/dist/store/slices/formSlice.d.ts +19 -19
  18. package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +20 -20
  19. package/dist/store/slices/formSubmissionSlice.d.ts +26 -26
  20. package/dist/store/slices/geoImageSlice.d.ts +48 -0
  21. package/dist/store/slices/index.d.ts +1 -0
  22. package/dist/store/slices/issueSlice.d.ts +2 -12
  23. package/dist/store/slices/organizationSlice.d.ts +6 -17
  24. package/dist/store/slices/projectFileSlice.d.ts +4 -15
  25. package/dist/store/slices/projectSlice.d.ts +1 -4
  26. package/dist/store/slices/workspaceSlice.d.ts +5 -10
  27. package/dist/store/store.d.ts +2 -1
  28. package/dist/typings/models/assets.d.ts +1 -1
  29. package/dist/typings/models/forms.d.ts +11 -11
  30. package/dist/typings/models/geo.d.ts +2 -1
  31. package/dist/typings/models/geoImages.d.ts +14 -0
  32. package/dist/typings/models/index.d.ts +1 -0
  33. package/dist/typings/models/issues.d.ts +3 -3
  34. package/dist/typings/models/store.d.ts +2 -2
  35. package/dist/utils/coordinates.d.ts +2 -1
  36. package/dist/utils/forms.d.ts +2 -2
  37. package/package.json +1 -1
  38. package/dist/sdk/services/UserFormService.d.ts +0 -18
  39. package/dist/sdk/services/UserFormSubmissionService.d.ts +0 -25
@@ -367,15 +367,15 @@ var __publicField = (obj, key, value) => {
367
367
  };
368
368
  const migrations = [initialVersioning, signOut, signOut, createOutboxState];
369
369
  const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
370
- const initialState$A = {
370
+ const initialState$B = {
371
371
  accessToken: "",
372
372
  refreshToken: "",
373
373
  isLoggedIn: false
374
374
  };
375
375
  const authSlice = toolkit.createSlice({
376
376
  name: "auth",
377
- initialState: initialState$A,
378
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$A)),
377
+ initialState: initialState$B,
378
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
379
379
  reducers: {
380
380
  setTokens: (state, action) => {
381
381
  state.accessToken = action.payload.accessToken;
@@ -406,6 +406,9 @@ var __publicField = (obj, key, value) => {
406
406
  const flipCoordinates = (coordinates) => {
407
407
  return [coordinates[1], coordinates[0]];
408
408
  };
409
+ const flipBounds = (bounds) => {
410
+ return [flipCoordinates(bounds[0]), flipCoordinates(bounds[1])];
411
+ };
409
412
  function offsetPositionByMeters(originalPosition, latMeters, lngMeters) {
410
413
  const { lat, lng } = originalPosition;
411
414
  const earthRadius = 6378137;
@@ -842,72 +845,23 @@ var __publicField = (obj, key, value) => {
842
845
  };
843
846
  }
844
847
  const categoryAdapter = createModelAdapter((category) => category.offline_id);
845
- const initialState$z = categoryAdapter.getInitialState({
846
- categoryVisibility: {
847
- hiddenCategoryIds: [],
848
- isNullCategoryHidden: false
849
- }
850
- });
848
+ const initialState$A = categoryAdapter.getInitialState({});
851
849
  const categorySlice = toolkit.createSlice({
852
850
  name: "categories",
853
- initialState: initialState$z,
854
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$z)),
851
+ initialState: initialState$A,
852
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$A)),
855
853
  reducers: {
856
- initializeCategories: (state, action) => {
857
- categoryAdapter.initialize(state, action);
858
- state.categoryVisibility.hiddenCategoryIds = state.categoryVisibility.hiddenCategoryIds.filter(
859
- (categoryId) => action.payload.some((category) => category.offline_id === categoryId)
860
- );
861
- },
854
+ initializeCategories: categoryAdapter.initialize,
862
855
  addCategory: categoryAdapter.addOne,
863
856
  updateCategory: categoryAdapter.updateOne,
864
- deleteCategory: categoryAdapter.deleteOne,
865
- // Pass in a null value to hide the "No category" category
866
- hideCategory: (state, action) => {
867
- const categoryId = action.payload;
868
- if (categoryId === null) {
869
- state.categoryVisibility.isNullCategoryHidden = true;
870
- } else if (!(categoryId in state.categoryVisibility.hiddenCategoryIds)) {
871
- state.categoryVisibility.hiddenCategoryIds.push(categoryId);
872
- }
873
- },
874
- hideAllCategories: (state) => {
875
- state.categoryVisibility.hiddenCategoryIds = Object.keys(state.instances);
876
- state.categoryVisibility.isNullCategoryHidden = true;
877
- },
878
- // Pass in a null value to unhide the "No category" category
879
- unhideCategory: (state, action) => {
880
- const categoryId = action.payload;
881
- if (categoryId === null) {
882
- state.categoryVisibility.isNullCategoryHidden = false;
883
- } else {
884
- state.categoryVisibility.hiddenCategoryIds = state.categoryVisibility.hiddenCategoryIds.filter(
885
- (id) => id !== categoryId
886
- );
887
- }
888
- },
889
- unhideAllCategories: (state) => {
890
- state.categoryVisibility.hiddenCategoryIds = [];
891
- state.categoryVisibility.isNullCategoryHidden = false;
892
- }
857
+ deleteCategory: categoryAdapter.deleteOne
893
858
  }
894
859
  });
895
- const {
896
- initializeCategories,
897
- addCategory,
898
- updateCategory,
899
- deleteCategory,
900
- hideCategory,
901
- hideAllCategories,
902
- unhideCategory,
903
- unhideAllCategories
904
- } = categorySlice.actions;
860
+ const { initializeCategories, addCategory, updateCategory, deleteCategory } = categorySlice.actions;
905
861
  const selectCategoryMapping = (state) => state.categoryReducer.instances;
906
- const _selectActiveWorkspaceId = (state) => state.workspaceReducer.activeWorkspaceId;
907
- const selectCategories = toolkit.createSelector(
908
- [selectCategoryMapping, _selectActiveWorkspaceId],
909
- (mapping, activeWorkspaceId) => activeWorkspaceId ? Object.values(mapping).filter((category) => category.workspace === activeWorkspaceId) : []
910
- );
862
+ const selectCategories = toolkit.createSelector([selectCategoryMapping], (categoryMapping) => {
863
+ return Object.values(categoryMapping);
864
+ });
911
865
  const selectCategoriesOfWorkspace = restructureCreateSelectorWithArgs(
912
866
  toolkit.createSelector(
913
867
  [selectCategories, (_state, workspaceId) => workspaceId],
@@ -920,36 +874,23 @@ var __publicField = (obj, key, value) => {
920
874
  (mapping, categoryId) => mapping[categoryId]
921
875
  )
922
876
  );
923
- const selectCategoryVisibility = (state) => state.categoryReducer.categoryVisibility;
924
- const selectHiddenCategoryCount = (state) => {
925
- const { hiddenCategoryIds, isNullCategoryHidden } = state.categoryReducer.categoryVisibility;
926
- let hiddenCategoryCount = hiddenCategoryIds.length;
927
- if (isNullCategoryHidden)
928
- hiddenCategoryCount++;
929
- return hiddenCategoryCount;
930
- };
931
877
  const selectIssueCountOfCategory = (categoryId) => (state) => {
932
878
  return Object.values(state.issueReducer.instances).filter((issue) => issue.category === categoryId).length;
933
879
  };
934
880
  const categoryReducer = categorySlice.reducer;
935
881
  const assetTypeAdapter = createModelAdapter((assetType) => assetType.offline_id);
936
- const initialState$y = assetTypeAdapter.getInitialState({
937
- hiddenAssetTypeIds: {}
938
- });
882
+ const initialState$z = assetTypeAdapter.getInitialState({});
939
883
  const assetTypeSlice = toolkit.createSlice({
940
884
  name: "assetTypes",
941
- initialState: initialState$y,
942
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$y)),
885
+ initialState: initialState$z,
886
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$z)),
943
887
  reducers: {
944
888
  initializeAssetTypes: assetTypeAdapter.initialize,
945
889
  addAssetType: assetTypeAdapter.addOne,
946
- deleteAssetType: assetTypeAdapter.deleteOne,
947
- toggleAssetTypeVisibility: (state, action) => {
948
- state.hiddenAssetTypeIds[action.payload] = !state.hiddenAssetTypeIds[action.payload];
949
- }
890
+ deleteAssetType: assetTypeAdapter.deleteOne
950
891
  }
951
892
  });
952
- const { addAssetType, initializeAssetTypes, deleteAssetType, toggleAssetTypeVisibility } = assetTypeSlice.actions;
893
+ const { addAssetType, initializeAssetTypes, deleteAssetType } = assetTypeSlice.actions;
953
894
  const selectAssetTypesMapping = (state) => state.assetTypeReducer.instances;
954
895
  const selectAssetTypes = toolkit.createSelector(
955
896
  [selectAssetTypesMapping],
@@ -985,14 +926,13 @@ var __publicField = (obj, key, value) => {
985
926
  });
986
927
  })
987
928
  );
988
- const selectHiddenAssetTypeIds = (state) => state.assetTypeReducer.hiddenAssetTypeIds;
989
929
  const assetTypeReducer = assetTypeSlice.reducer;
990
930
  const assetAdapter = createModelAdapter((asset) => asset.offline_id);
991
- const initialState$x = assetAdapter.getInitialState({});
931
+ const initialState$y = assetAdapter.getInitialState({});
992
932
  const assetSlice = toolkit.createSlice({
993
933
  name: "assets",
994
- initialState: initialState$x,
995
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$x)),
934
+ initialState: initialState$y,
935
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$y)),
996
936
  reducers: {
997
937
  initializeAssets: (state, action) => {
998
938
  assetAdapter.initialize(state, action);
@@ -1095,11 +1035,11 @@ var __publicField = (obj, key, value) => {
1095
1035
  };
1096
1036
  const assetReducer = assetSlice.reducer;
1097
1037
  const assetAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
1098
- const initialState$w = assetAttachmentAdapter.getInitialState({});
1038
+ const initialState$x = assetAttachmentAdapter.getInitialState({});
1099
1039
  const assetAttachmentSlice = toolkit.createSlice({
1100
1040
  name: "assetAttachments",
1101
- initialState: initialState$w,
1102
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$w)),
1041
+ initialState: initialState$x,
1042
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$x)),
1103
1043
  reducers: {
1104
1044
  initializeAssetAttachments: assetAttachmentAdapter.initialize,
1105
1045
  addAssetAttachment: assetAttachmentAdapter.addOne,
@@ -1157,13 +1097,13 @@ var __publicField = (obj, key, value) => {
1157
1097
  )
1158
1098
  );
1159
1099
  const assetAttachmentReducer = assetAttachmentSlice.reducer;
1160
- const initialState$v = {
1100
+ const initialState$w = {
1161
1101
  completionsByAssetId: {}
1162
1102
  };
1163
1103
  const assetStageCompletionSlice = toolkit.createSlice({
1164
1104
  name: "assetStageCompletions",
1165
- initialState: initialState$v,
1166
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$v)),
1105
+ initialState: initialState$w,
1106
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$w)),
1167
1107
  reducers: {
1168
1108
  addStageCompletion: (state, action) => {
1169
1109
  let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
@@ -1215,11 +1155,11 @@ var __publicField = (obj, key, value) => {
1215
1155
  );
1216
1156
  const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
1217
1157
  const assetStageAdapter = createModelAdapter((assetStage) => assetStage.offline_id);
1218
- const initialState$u = assetStageAdapter.getInitialState({});
1158
+ const initialState$v = assetStageAdapter.getInitialState({});
1219
1159
  const assetStageSlice = toolkit.createSlice({
1220
1160
  name: "assetStages",
1221
- initialState: initialState$u,
1222
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$u)),
1161
+ initialState: initialState$v,
1162
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$v)),
1223
1163
  reducers: {
1224
1164
  initializeStages: assetStageAdapter.initialize,
1225
1165
  setStage: assetStageAdapter.setOne,
@@ -1288,8 +1228,8 @@ var __publicField = (obj, key, value) => {
1288
1228
  if (!stage) {
1289
1229
  throw new Error("No stage exists with the id " + stageId);
1290
1230
  }
1291
- if (stage.user_form) {
1292
- ret[stageId] = stage.user_form;
1231
+ if (stage.form) {
1232
+ ret[stageId] = stage.form;
1293
1233
  }
1294
1234
  }
1295
1235
  return ret;
@@ -1300,11 +1240,11 @@ var __publicField = (obj, key, value) => {
1300
1240
  const assetTypeAttachmentAdapter = createModelAdapter(
1301
1241
  (attachment) => attachment.offline_id
1302
1242
  );
1303
- const initialState$t = assetTypeAttachmentAdapter.getInitialState({});
1243
+ const initialState$u = assetTypeAttachmentAdapter.getInitialState({});
1304
1244
  const assetTypeAttachmentSlice = toolkit.createSlice({
1305
1245
  name: "assetTypeAttachments",
1306
- initialState: initialState$t,
1307
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$t)),
1246
+ initialState: initialState$u,
1247
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$u)),
1308
1248
  reducers: {
1309
1249
  initializeAssetTypeAttachments: assetTypeAttachmentAdapter.initialize,
1310
1250
  addAssetTypeAttachment: assetTypeAttachmentAdapter.addOne,
@@ -1363,31 +1303,19 @@ var __publicField = (obj, key, value) => {
1363
1303
  );
1364
1304
  const assetTypeAttachmentReducer = assetTypeAttachmentSlice.reducer;
1365
1305
  const workspaceAdapter = createModelAdapter((workspace) => workspace.offline_id);
1366
- const initialState$s = workspaceAdapter.getInitialState({
1367
- activeWorkspaceId: null
1368
- });
1306
+ const initialState$t = workspaceAdapter.getInitialState({});
1369
1307
  const workspaceSlice = toolkit.createSlice({
1370
1308
  name: "workspace",
1371
- initialState: initialState$s,
1309
+ initialState: initialState$t,
1372
1310
  reducers: {
1373
1311
  initializeWorkspaces: workspaceAdapter.initialize,
1374
1312
  setWorkspaces: workspaceAdapter.setMany,
1375
1313
  addWorkspace: workspaceAdapter.addOne,
1376
1314
  updateWorkspace: workspaceAdapter.updateOne,
1377
- deleteWorkspace: workspaceAdapter.deleteOne,
1378
- setActiveWorkspaceId: (state, action) => {
1379
- state.activeWorkspaceId = action.payload;
1380
- }
1315
+ deleteWorkspace: workspaceAdapter.deleteOne
1381
1316
  }
1382
1317
  });
1383
- const {
1384
- initializeWorkspaces,
1385
- setWorkspaces,
1386
- addWorkspace,
1387
- updateWorkspace,
1388
- setActiveWorkspaceId,
1389
- deleteWorkspace
1390
- } = workspaceSlice.actions;
1318
+ const { initializeWorkspaces, setWorkspaces, addWorkspace, updateWorkspace, deleteWorkspace } = workspaceSlice.actions;
1391
1319
  const selectWorkspaceMapping = (state) => state.workspaceReducer.instances;
1392
1320
  const selectWorkspaces = toolkit.createSelector([selectWorkspaceMapping], (mapping) => Object.values(mapping));
1393
1321
  const selectMainWorkspace = toolkit.createSelector(
@@ -1396,20 +1324,9 @@ var __publicField = (obj, key, value) => {
1396
1324
  return workspaces.find((workspace) => workspace.name.toLowerCase() === "main");
1397
1325
  }
1398
1326
  );
1399
- const selectWorkspace = restructureCreateSelectorWithArgs(
1400
- toolkit.createSelector([selectWorkspaceMapping, (_state, workspaceId) => workspaceId], (mapping, workspaceId) => {
1401
- return mapping[workspaceId];
1402
- })
1403
- );
1404
- const selectActiveWorkspaceId = (state) => state.workspaceReducer.activeWorkspaceId;
1405
- const selectActiveWorkspace = toolkit.createSelector(
1406
- [selectWorkspaceMapping, selectActiveWorkspaceId],
1407
- (mapping, activeWorkspaceId) => {
1408
- if (!activeWorkspaceId)
1409
- return null;
1410
- return mapping[activeWorkspaceId];
1411
- }
1412
- );
1327
+ const selectWorkspaceById = (workspaceId) => (state) => {
1328
+ return state.workspaceReducer.instances[workspaceId];
1329
+ };
1413
1330
  const selectPermittedWorkspaceIds = toolkit.createSelector(
1414
1331
  [selectWorkspaceMapping],
1415
1332
  (mapping) => {
@@ -1421,16 +1338,14 @@ var __publicField = (obj, key, value) => {
1421
1338
  const workspaceReducer = workspaceSlice.reducer;
1422
1339
  const maxRecentIssues = 10;
1423
1340
  const issueAdapter = createModelAdapter((issue) => issue.offline_id);
1424
- const initialState$r = issueAdapter.getInitialState({
1425
- visibleStatuses: [IssueStatus.BACKLOG, IssueStatus.SELECTED],
1426
- visibleUserIds: null,
1341
+ const initialState$s = issueAdapter.getInitialState({
1427
1342
  recentIssueIds: []
1428
1343
  });
1429
1344
  const issueSlice = toolkit.createSlice({
1430
1345
  name: "issues",
1431
- initialState: initialState$r,
1346
+ initialState: initialState$s,
1432
1347
  extraReducers: (builder) => builder.addCase("RESET", (state) => {
1433
- Object.assign(state, initialState$r);
1348
+ Object.assign(state, initialState$s);
1434
1349
  }),
1435
1350
  reducers: {
1436
1351
  initializeIssues: issueAdapter.initialize,
@@ -1439,12 +1354,6 @@ var __publicField = (obj, key, value) => {
1439
1354
  updateIssue: issueAdapter.updateOne,
1440
1355
  deleteIssue: issueAdapter.deleteOne,
1441
1356
  deleteIssues: issueAdapter.deleteMany,
1442
- setVisibleStatuses: (state, action) => {
1443
- state.visibleStatuses = action.payload;
1444
- },
1445
- setVisibleUserIds: (state, action) => {
1446
- state.visibleUserIds = [...new Set(action.payload)];
1447
- },
1448
1357
  cleanRecentIssues: (state) => {
1449
1358
  state.recentIssueIds = state.recentIssueIds.filter((recentIssue) => state.instances[recentIssue.offlineId]);
1450
1359
  },
@@ -1477,8 +1386,6 @@ var __publicField = (obj, key, value) => {
1477
1386
  updateIssue,
1478
1387
  deleteIssue,
1479
1388
  deleteIssues,
1480
- setVisibleStatuses,
1481
- setVisibleUserIds,
1482
1389
  addToRecentIssues,
1483
1390
  cleanRecentIssues,
1484
1391
  removeRecentIssue,
@@ -1486,51 +1393,6 @@ var __publicField = (obj, key, value) => {
1486
1393
  } = issueSlice.actions;
1487
1394
  const selectIssueMapping = (state) => state.issueReducer.instances;
1488
1395
  const selectRecentIssueIds = (state) => state.issueReducer.recentIssueIds;
1489
- const selectVisibleUserIds = (state) => state.issueReducer.visibleUserIds;
1490
- const selectVisibleStatuses = (state) => state.issueReducer.visibleStatuses;
1491
- const selectIssues = restructureCreateSelectorWithArgs(
1492
- toolkit.createSelector(
1493
- [
1494
- selectIssueMapping,
1495
- selectVisibleUserIds,
1496
- selectVisibleStatuses,
1497
- selectCategoryVisibility,
1498
- selectActiveWorkspaceId,
1499
- (_state, args) => args
1500
- ],
1501
- (mapping, visibleUserIds, visibleStatuses, categoryVisibility, activeWorkspaceId, args) => {
1502
- let ret = Object.values(mapping);
1503
- const visibleUserIdsSet = new Set(visibleUserIds);
1504
- const visibleStatusesSet = new Set(visibleStatuses);
1505
- if (args.filterByAssignedTo && (visibleUserIds == null ? void 0 : visibleUserIds.length)) {
1506
- ret = ret.filter((issue) => {
1507
- return visibleUserIdsSet.has(issue.assigned_to || null);
1508
- });
1509
- }
1510
- if (args.filterByStatus) {
1511
- ret = ret.filter((issue) => {
1512
- return visibleStatusesSet.has(issue.status);
1513
- });
1514
- }
1515
- if (args.filterByCategory) {
1516
- const isNullCategoryHidden = categoryVisibility.isNullCategoryHidden;
1517
- const hiddenCategoryIds = categoryVisibility.hiddenCategoryIds;
1518
- ret = ret.filter((issue) => {
1519
- if (!issue.category) {
1520
- return !isNullCategoryHidden;
1521
- }
1522
- return !hiddenCategoryIds.includes(issue.category);
1523
- });
1524
- if (args.filterByWorkspace) {
1525
- ret = ret.filter((issue) => {
1526
- return activeWorkspaceId && issue.visible_in_workspaces.includes(activeWorkspaceId);
1527
- });
1528
- }
1529
- }
1530
- return ret;
1531
- }
1532
- )
1533
- );
1534
1396
  const selectIssue = restructureCreateSelectorWithArgs(
1535
1397
  toolkit.createSelector([selectIssueMapping, (_state, id) => id], (mapping, id) => {
1536
1398
  return mapping[id];
@@ -1627,12 +1489,12 @@ var __publicField = (obj, key, value) => {
1627
1489
  );
1628
1490
  const issueReducer = issueSlice.reducer;
1629
1491
  const issueTypeAdapter = createModelAdapter((issueType) => issueType.offline_id);
1630
- const initialState$q = issueTypeAdapter.getInitialState({});
1492
+ const initialState$r = issueTypeAdapter.getInitialState({});
1631
1493
  const issueTypeSlice = toolkit.createSlice({
1632
1494
  name: "issueTypes",
1633
- initialState: initialState$q,
1495
+ initialState: initialState$r,
1634
1496
  extraReducers: (builder) => builder.addCase("RESET", (state) => {
1635
- Object.assign(state, initialState$q);
1497
+ Object.assign(state, initialState$r);
1636
1498
  }),
1637
1499
  reducers: {
1638
1500
  initializeIssueTypes: issueTypeAdapter.initialize,
@@ -1681,15 +1543,15 @@ var __publicField = (obj, key, value) => {
1681
1543
  return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
1682
1544
  };
1683
1545
  const issueTypeReducer = issueTypeSlice.reducer;
1684
- const initialState$p = {
1546
+ const initialState$q = {
1685
1547
  s3Urls: {}
1686
1548
  };
1687
1549
  const msPerHour = 1e3 * 60 * 60;
1688
1550
  const msPerWeek = msPerHour * 24 * 7;
1689
1551
  const fileSlice = toolkit.createSlice({
1690
1552
  name: "file",
1691
- initialState: initialState$p,
1692
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
1553
+ initialState: initialState$q,
1554
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
1693
1555
  reducers: {
1694
1556
  setUploadUrl: (state, action) => {
1695
1557
  const { url, fields, sha1 } = action.payload;
@@ -1770,7 +1632,7 @@ var __publicField = (obj, key, value) => {
1770
1632
  LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
1771
1633
  return LicenseStatus2;
1772
1634
  })(LicenseStatus || {});
1773
- const initialState$o = {
1635
+ const initialState$p = {
1774
1636
  users: {},
1775
1637
  currentUser: {
1776
1638
  id: 0,
@@ -1781,8 +1643,8 @@ var __publicField = (obj, key, value) => {
1781
1643
  };
1782
1644
  const userSlice = toolkit.createSlice({
1783
1645
  name: "users",
1784
- initialState: initialState$o,
1785
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
1646
+ initialState: initialState$p,
1647
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
1786
1648
  reducers: {
1787
1649
  setUsers: (state, action) => {
1788
1650
  const usersMapping = {};
@@ -1847,11 +1709,11 @@ var __publicField = (obj, key, value) => {
1847
1709
  const organizationAccessAdapter = createModelAdapter(
1848
1710
  (organizationAccess) => organizationAccess.offline_id
1849
1711
  );
1850
- const initialState$n = organizationAccessAdapter.getInitialState({});
1712
+ const initialState$o = organizationAccessAdapter.getInitialState({});
1851
1713
  const organizationAccessSlice = toolkit.createSlice({
1852
1714
  name: "organizationAccess",
1853
- initialState: initialState$n,
1854
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
1715
+ initialState: initialState$o,
1716
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
1855
1717
  reducers: {
1856
1718
  initializeOrganizationAccesses: organizationAccessAdapter.initialize,
1857
1719
  updateOrganizationAccess: organizationAccessAdapter.updateOne,
@@ -1888,11 +1750,11 @@ var __publicField = (obj, key, value) => {
1888
1750
  };
1889
1751
  const organizationAccessReducer = organizationAccessSlice.reducer;
1890
1752
  const licenseAdapter = createModelAdapter((license) => license.offline_id);
1891
- const initialState$m = licenseAdapter.getInitialState({});
1753
+ const initialState$n = licenseAdapter.getInitialState({});
1892
1754
  const licenseSlice = toolkit.createSlice({
1893
1755
  name: "license",
1894
- initialState: initialState$m,
1895
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
1756
+ initialState: initialState$n,
1757
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
1896
1758
  reducers: {
1897
1759
  setLicenses: licenseAdapter.initialize,
1898
1760
  addLicenses: licenseAdapter.addMany,
@@ -1918,11 +1780,11 @@ var __publicField = (obj, key, value) => {
1918
1780
  );
1919
1781
  const licenseReducer = licenseSlice.reducer;
1920
1782
  const projectAccessAdapter = createModelAdapter((projectAccess) => projectAccess.offline_id);
1921
- const initialState$l = projectAccessAdapter.getInitialState({});
1783
+ const initialState$m = projectAccessAdapter.getInitialState({});
1922
1784
  const projectAccessSlice = toolkit.createSlice({
1923
1785
  name: "projectAccess",
1924
- initialState: initialState$l,
1925
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$l)),
1786
+ initialState: initialState$m,
1787
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
1926
1788
  reducers: {
1927
1789
  setProjectAccesses: projectAccessAdapter.initialize,
1928
1790
  updateProjectAccess: projectAccessAdapter.updateOne,
@@ -1968,15 +1830,14 @@ var __publicField = (obj, key, value) => {
1968
1830
  return projectAccesses;
1969
1831
  };
1970
1832
  const projectAccessReducer = projectAccessSlice.reducer;
1971
- const initialState$k = {
1833
+ const initialState$l = {
1972
1834
  projects: {},
1973
- activeProjectId: null,
1974
- recentProjectIds: [],
1975
- recentSearchableQueries: []
1835
+ activeProjectId: null
1976
1836
  };
1977
1837
  const projectSlice = toolkit.createSlice({
1978
1838
  name: "projects",
1979
- initialState: initialState$k,
1839
+ initialState: initialState$l,
1840
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$l)),
1980
1841
  reducers: {
1981
1842
  setProjects: (state, action) => {
1982
1843
  const projectsMap = {};
@@ -2056,21 +1917,6 @@ var __publicField = (obj, key, value) => {
2056
1917
  (projects, projectId) => projects[projectId]
2057
1918
  )
2058
1919
  );
2059
- const selectSortedProjects = toolkit.createSelector(
2060
- [selectActiveProject, selectProjects],
2061
- (activeProject, projects) => {
2062
- return Object.values(projects).sort((projectA, projectB) => {
2063
- if (activeProject) {
2064
- if (activeProject.id === projectA.id) {
2065
- return -1;
2066
- } else if (activeProject.id === projectB.id) {
2067
- return 1;
2068
- }
2069
- }
2070
- return projectA.name.toLowerCase().localeCompare(projectB.name.toLowerCase(), void 0, { numeric: true });
2071
- });
2072
- }
2073
- );
2074
1920
  const projectReducer = projectSlice.reducer;
2075
1921
  const selectProjectUsersIds = toolkit.createSelector(
2076
1922
  [selectProjectAccessMapping],
@@ -2105,38 +1951,22 @@ var __publicField = (obj, key, value) => {
2105
1951
  });
2106
1952
  }
2107
1953
  );
2108
- const initialState$j = {
2109
- organizations: {},
2110
- activeOrganizationId: null
1954
+ const initialState$k = {
1955
+ organizations: {}
2111
1956
  };
2112
1957
  const organizationSlice = toolkit.createSlice({
2113
1958
  name: "organizations",
2114
- initialState: initialState$j,
2115
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
1959
+ initialState: initialState$k,
1960
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$k)),
2116
1961
  reducers: {
2117
1962
  setOrganizations: (state, action) => {
2118
1963
  for (const org of action.payload) {
2119
1964
  state.organizations[org.id] = org;
2120
1965
  }
2121
- },
2122
- updateActiveOrganization: (state, action) => {
2123
- if (!state.activeOrganizationId) {
2124
- throw new Error("Cannot update name of active organization. Active organization ID does not exist");
2125
- }
2126
- if (state.activeOrganizationId !== action.payload.id) {
2127
- throw new Error("Tried updating active organization with different organization");
2128
- }
2129
- state.organizations[state.activeOrganizationId] = action.payload;
2130
- },
2131
- setActiveOrganizationId: (state, action) => {
2132
- state.activeOrganizationId = action.payload;
2133
1966
  }
2134
1967
  }
2135
1968
  });
2136
- const { setOrganizations, setActiveOrganizationId, updateActiveOrganization } = organizationSlice.actions;
2137
- const selectActiveOrganizationId = (state) => {
2138
- return state.organizationReducer.activeOrganizationId;
2139
- };
1969
+ const { setOrganizations } = organizationSlice.actions;
2140
1970
  const selectOrganizations = (state) => {
2141
1971
  return Object.values(state.organizationReducer.organizations);
2142
1972
  };
@@ -2147,43 +1977,21 @@ var __publicField = (obj, key, value) => {
2147
1977
  [selectOrganizations],
2148
1978
  (organizations) => Object.values(organizations).filter((organization) => organization.has_access)
2149
1979
  );
2150
- const selectActiveOrganization = (state) => {
2151
- const id = selectActiveOrganizationId(state);
2152
- if (!id) {
2153
- return null;
2154
- }
2155
- const organization = state.organizationReducer.organizations[id];
2156
- if (!organization) {
2157
- return null;
2158
- }
2159
- return organization;
1980
+ const selectOrganizationById = (organizationId) => (state) => {
1981
+ return state.organizationReducer.organizations[organizationId];
2160
1982
  };
2161
1983
  const selectOrganizationUsersIds = toolkit.createSelector(
2162
1984
  [selectOrganizationAccesses],
2163
1985
  (organizationAccesses) => Object.values(organizationAccesses).map((organizationAccess) => organizationAccess.user)
2164
1986
  );
2165
- const selectActiveOrganizationProjects = toolkit.createSelector(
2166
- [selectProjects, selectActiveOrganizationId],
2167
- (projects, activeOrganizationId) => activeOrganizationId ? Object.values(projects).filter((project) => project.owner_organization === activeOrganizationId) : []
2168
- );
2169
- const selectActiveOrganizationLicenses = toolkit.createSelector(
2170
- [selectActiveOrganizationId, selectLicenses],
2171
- (activeOrganizationId, licenses) => !activeOrganizationId ? [] : Object.values(licenses).filter((license) => license.organization_owner === activeOrganizationId)
1987
+ const selectProjectsOfOrganization = restructureCreateSelectorWithArgs(
1988
+ toolkit.createSelector([selectProjects, (_, organizationId) => organizationId], (projects, organizationId) => {
1989
+ return Object.values(projects).filter((project) => project.owner_organization === organizationId);
1990
+ })
2172
1991
  );
2173
- const selectSortedOrganizationLicenses = toolkit.createSelector(
2174
- [selectActiveOrganizationLicenses, selectProjects],
2175
- (licences, projects) => licences.sort((licenseA, licenseB) => {
2176
- if (!licenseA.project) {
2177
- return 1;
2178
- }
2179
- if (!licenseB.project) {
2180
- return -1;
2181
- }
2182
- return projects[licenseA.project].name.toLowerCase().localeCompare(
2183
- projects[licenseB.project].name.toLowerCase(),
2184
- void 0,
2185
- { numeric: true }
2186
- );
1992
+ const selectLicensesOfOrganization = restructureCreateSelectorWithArgs(
1993
+ toolkit.createSelector([selectLicenses, (_, organizationId) => organizationId], (licenses, organizationId) => {
1994
+ return Object.values(licenses).filter((license) => license.organization_owner === organizationId);
2187
1995
  })
2188
1996
  );
2189
1997
  const selectOrganizationUsersAsMapping = toolkit.createSelector(
@@ -2232,14 +2040,14 @@ var __publicField = (obj, key, value) => {
2232
2040
  }
2233
2041
  };
2234
2042
  };
2235
- const initialState$i = {
2043
+ const initialState$j = {
2236
2044
  deletedRequests: [],
2237
2045
  latestRetryTime: 0
2238
2046
  };
2239
2047
  const outboxSlice = toolkit.createSlice({
2240
2048
  name: "outbox",
2241
- initialState: initialState$i,
2242
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
2049
+ initialState: initialState$j,
2050
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
2243
2051
  reducers: {
2244
2052
  // enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
2245
2053
  // Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
@@ -2271,16 +2079,15 @@ var __publicField = (obj, key, value) => {
2271
2079
  const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
2272
2080
  const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
2273
2081
  const outboxReducer = outboxSlice.reducer;
2274
- const initialState$h = {
2082
+ const initialState$i = {
2275
2083
  projectFiles: {},
2276
2084
  activeProjectFileId: null,
2277
- isImportingProjectFile: false,
2278
- enabledProjectFiles: {}
2085
+ isImportingProjectFile: false
2279
2086
  };
2280
2087
  const projectFileSlice = toolkit.createSlice({
2281
2088
  name: "projectFiles",
2282
- initialState: initialState$h,
2283
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
2089
+ initialState: initialState$i,
2090
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
2284
2091
  reducers: {
2285
2092
  addOrReplaceProjectFiles: (state, action) => {
2286
2093
  for (let fileObj of action.payload) {
@@ -2305,9 +2112,6 @@ var __publicField = (obj, key, value) => {
2305
2112
  }
2306
2113
  state.projectFiles[action.payload.offline_id] = action.payload;
2307
2114
  },
2308
- setProjectFileVisible: (state, action) => {
2309
- state.enabledProjectFiles[action.payload.fileId] = action.payload.visible;
2310
- },
2311
2115
  setIsImportingProjectFile: (state, action) => {
2312
2116
  state.isImportingProjectFile = action.payload;
2313
2117
  },
@@ -2327,19 +2131,14 @@ var __publicField = (obj, key, value) => {
2327
2131
  // TODO: Move to MapContext. Should not be persisted.
2328
2132
  setActiveProjectFileId: (state, action) => {
2329
2133
  state.activeProjectFileId = action.payload;
2330
- if (action.payload) {
2331
- state.enabledProjectFiles[action.payload] = true;
2332
- }
2333
2134
  },
2334
2135
  removeProjectFile: (state, action) => {
2335
2136
  delete state.projectFiles[action.payload];
2336
- delete state.enabledProjectFiles[action.payload];
2337
2137
  },
2338
2138
  removeProjectFilesOfProject: (state, action) => {
2339
2139
  const filesToDelete = Object.values(state.projectFiles).filter((file) => file.project === action.payload);
2340
2140
  for (const file of filesToDelete) {
2341
2141
  delete state.projectFiles[file.offline_id];
2342
- delete state.enabledProjectFiles[file.offline_id];
2343
2142
  }
2344
2143
  },
2345
2144
  resetProjectFileObjectUrls: (state, ..._args) => {
@@ -2352,7 +2151,6 @@ var __publicField = (obj, key, value) => {
2352
2151
  const {
2353
2152
  addOrReplaceProjectFiles,
2354
2153
  addOrReplaceProjectFile,
2355
- setProjectFileVisible,
2356
2154
  setIsImportingProjectFile,
2357
2155
  setActiveProjectFileId,
2358
2156
  saveActiveProjectFileBounds,
@@ -2360,33 +2158,25 @@ var __publicField = (obj, key, value) => {
2360
2158
  removeProjectFilesOfProject,
2361
2159
  resetProjectFileObjectUrls
2362
2160
  } = projectFileSlice.actions;
2363
- const selectEnabledProjectFiles = (state) => state.projectFileReducer.enabledProjectFiles;
2364
- const selectProjectFileVisibility = toolkit.createSelector(
2365
- [selectEnabledProjectFiles],
2366
- (enabledProjectFiles) => {
2367
- const ret = {};
2368
- for (const [fileId, enabled] of Object.entries(enabledProjectFiles)) {
2369
- ret[fileId] = enabled === true || enabled === void 0;
2370
- }
2371
- return ret;
2372
- }
2373
- );
2374
- const selectEnabledProjectFileMapping = (state) => state.projectFileReducer.projectFiles;
2161
+ const selectProjectFileMapping = (state) => state.projectFileReducer.projectFiles;
2375
2162
  const selectProjectFiles = toolkit.createSelector(
2376
- [selectEnabledProjectFileMapping, selectActiveProjectId],
2163
+ [selectProjectFileMapping, selectActiveProjectId],
2377
2164
  (mapping, activeProjectId) => {
2378
2165
  return Object.values(mapping).filter((file) => file.project === activeProjectId).sort((a, b) => a.z_index - b.z_index);
2379
2166
  }
2380
2167
  );
2381
2168
  const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
2382
2169
  const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
2170
+ const selectProjectFileById = (id) => (state) => {
2171
+ return state.projectFileReducer.projectFiles[id];
2172
+ };
2383
2173
  const projectFileReducer = projectFileSlice.reducer;
2384
2174
  const projectAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
2385
- const initialState$g = projectAttachmentAdapter.getInitialState({});
2175
+ const initialState$h = projectAttachmentAdapter.getInitialState({});
2386
2176
  const projectAttachmentSlice = toolkit.createSlice({
2387
2177
  name: "projectAttachments",
2388
- initialState: initialState$g,
2389
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
2178
+ initialState: initialState$h,
2179
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
2390
2180
  reducers: {
2391
2181
  initializeProjectAttachments: projectAttachmentAdapter.initialize,
2392
2182
  addProjectAttachment: projectAttachmentAdapter.addOne,
@@ -2444,12 +2234,12 @@ var __publicField = (obj, key, value) => {
2444
2234
  )
2445
2235
  );
2446
2236
  const projectAttachmentReducer = projectAttachmentSlice.reducer;
2447
- const initialState$f = {
2237
+ const initialState$g = {
2448
2238
  isRehydrated: false
2449
2239
  };
2450
2240
  const rehydratedSlice = toolkit.createSlice({
2451
2241
  name: "rehydrated",
2452
- initialState: initialState$f,
2242
+ initialState: initialState$g,
2453
2243
  // The `reducers` field lets us define reducers and generate associated actions
2454
2244
  reducers: {
2455
2245
  setRehydrated: (state, action) => {
@@ -2460,13 +2250,13 @@ var __publicField = (obj, key, value) => {
2460
2250
  const { setRehydrated } = rehydratedSlice.actions;
2461
2251
  const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
2462
2252
  const rehydratedReducer = rehydratedSlice.reducer;
2463
- const initialState$e = {
2253
+ const initialState$f = {
2464
2254
  isFetchingInitialData: false
2465
2255
  };
2466
2256
  const settingSlice = toolkit.createSlice({
2467
2257
  name: "settings",
2468
- initialState: initialState$e,
2469
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
2258
+ initialState: initialState$f,
2259
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
2470
2260
  reducers: {
2471
2261
  setIsFetchingInitialData: (state, action) => {
2472
2262
  state.isFetchingInitialData = action.payload;
@@ -2490,11 +2280,11 @@ var __publicField = (obj, key, value) => {
2490
2280
  }
2491
2281
  };
2492
2282
  const formRevisionAdapter = createModelAdapter((revision) => revision.offline_id);
2493
- const initialState$d = formRevisionAdapter.getInitialState({});
2283
+ const initialState$e = formRevisionAdapter.getInitialState({});
2494
2284
  const formRevisionsSlice = toolkit.createSlice({
2495
2285
  name: "formRevisions",
2496
- initialState: initialState$d,
2497
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
2286
+ initialState: initialState$e,
2287
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
2498
2288
  reducers: {
2499
2289
  initializeFormRevisions: formRevisionAdapter.initialize,
2500
2290
  setFormRevision: formRevisionAdapter.setOne,
@@ -2587,11 +2377,11 @@ var __publicField = (obj, key, value) => {
2587
2377
  });
2588
2378
  const formRevisionReducer = formRevisionsSlice.reducer;
2589
2379
  const formAdapter = createModelAdapter((form) => form.offline_id);
2590
- const initialState$c = formAdapter.getInitialState({});
2380
+ const initialState$d = formAdapter.getInitialState({});
2591
2381
  const formSlice = toolkit.createSlice({
2592
2382
  name: "forms",
2593
- initialState: initialState$c,
2594
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
2383
+ initialState: initialState$d,
2384
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
2595
2385
  reducers: {
2596
2386
  setForms: formAdapter.initialize,
2597
2387
  setForm: formAdapter.setOne,
@@ -2673,11 +2463,11 @@ var __publicField = (obj, key, value) => {
2673
2463
  });
2674
2464
  const formReducer = formSlice.reducer;
2675
2465
  const submissionAdapter = createModelAdapter((submission) => submission.offline_id);
2676
- const initialState$b = submissionAdapter.getInitialState({});
2466
+ const initialState$c = submissionAdapter.getInitialState({});
2677
2467
  const formSubmissionSlice = toolkit.createSlice({
2678
2468
  name: "formSubmissions",
2679
- initialState: initialState$b,
2680
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
2469
+ initialState: initialState$c,
2470
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
2681
2471
  reducers: {
2682
2472
  setFormSubmission: submissionAdapter.setOne,
2683
2473
  setFormSubmissions: submissionAdapter.setMany,
@@ -2797,29 +2587,32 @@ var __publicField = (obj, key, value) => {
2797
2587
  }
2798
2588
  )
2799
2589
  );
2800
- const selectFormSubmissionsByAssets = toolkit.createSelector([selectFormSubmissionsMapping, selectAssetsMapping], (submissions, assets) => {
2801
- var _a2;
2802
- const assetSubmissionMapping = {};
2803
- for (const assetId in assets) {
2804
- assetSubmissionMapping[assetId] = [];
2805
- }
2806
- for (const submissionId in submissions) {
2807
- const submission = submissions[submissionId];
2808
- if (submission.asset) {
2809
- (_a2 = assetSubmissionMapping[submission.asset]) == null ? void 0 : _a2.push(submission);
2590
+ const selectFormSubmissionsByAssets = toolkit.createSelector(
2591
+ [selectFormSubmissionsMapping, selectAssetsMapping],
2592
+ (submissions, assets) => {
2593
+ var _a2;
2594
+ const assetSubmissionMapping = {};
2595
+ for (const assetId in assets) {
2596
+ assetSubmissionMapping[assetId] = [];
2597
+ }
2598
+ for (const submissionId in submissions) {
2599
+ const submission = submissions[submissionId];
2600
+ if (submission.asset) {
2601
+ (_a2 = assetSubmissionMapping[submission.asset]) == null ? void 0 : _a2.push(submission);
2602
+ }
2810
2603
  }
2604
+ return assetSubmissionMapping;
2811
2605
  }
2812
- return assetSubmissionMapping;
2813
- });
2606
+ );
2814
2607
  const formSubmissionReducer = formSubmissionSlice.reducer;
2815
2608
  const formSubmissionAttachmentAdapter = createModelAdapter(
2816
2609
  (attachment) => attachment.offline_id
2817
2610
  );
2818
- const initialState$a = formSubmissionAttachmentAdapter.getInitialState({});
2611
+ const initialState$b = formSubmissionAttachmentAdapter.getInitialState({});
2819
2612
  const formSubmissionAttachmentSlice = toolkit.createSlice({
2820
2613
  name: "formSubmissionAttachments",
2821
- initialState: initialState$a,
2822
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
2614
+ initialState: initialState$b,
2615
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
2823
2616
  reducers: {
2824
2617
  initializeFormSubmissionAttachments: formSubmissionAttachmentAdapter.initialize,
2825
2618
  addFormSubmissionAttachment: formSubmissionAttachmentAdapter.addOne,
@@ -2858,11 +2651,11 @@ var __publicField = (obj, key, value) => {
2858
2651
  const formRevisionAttachmentAdapter = createModelAdapter(
2859
2652
  (attachment) => attachment.offline_id
2860
2653
  );
2861
- const initialState$9 = formRevisionAttachmentAdapter.getInitialState({});
2654
+ const initialState$a = formRevisionAttachmentAdapter.getInitialState({});
2862
2655
  const formRevisionAttachmentSlice = toolkit.createSlice({
2863
2656
  name: "formRevisionAttachments",
2864
- initialState: initialState$9,
2865
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$9)),
2657
+ initialState: initialState$a,
2658
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
2866
2659
  reducers: {
2867
2660
  initializeFormRevisionAttachments: formRevisionAttachmentAdapter.initialize,
2868
2661
  addFormRevisionAttachment: formRevisionAttachmentAdapter.addOne,
@@ -2899,10 +2692,10 @@ var __publicField = (obj, key, value) => {
2899
2692
  );
2900
2693
  const formRevisionAttachmentReducer = formRevisionAttachmentSlice.reducer;
2901
2694
  const emailDomainAdapter = createModelAdapter((emailDomain) => emailDomain.offline_id);
2902
- const initialState$8 = emailDomainAdapter.getInitialState({});
2695
+ const initialState$9 = emailDomainAdapter.getInitialState({});
2903
2696
  const emailDomainsSlice = toolkit.createSlice({
2904
2697
  name: "emailDomains",
2905
- initialState: initialState$8,
2698
+ initialState: initialState$9,
2906
2699
  reducers: {
2907
2700
  initializeEmailDomains: emailDomainAdapter.initialize,
2908
2701
  addEmailDomain: emailDomainAdapter.addOne,
@@ -2921,14 +2714,14 @@ var __publicField = (obj, key, value) => {
2921
2714
  )
2922
2715
  );
2923
2716
  const emailDomainsReducer = emailDomainsSlice.reducer;
2924
- const initialState$7 = {
2717
+ const initialState$8 = {
2925
2718
  documents: {}
2926
2719
  };
2927
2720
  const documentSlice = toolkit.createSlice({
2928
2721
  name: "documents",
2929
- initialState: initialState$7,
2722
+ initialState: initialState$8,
2930
2723
  extraReducers: (builder) => builder.addCase("RESET", (state) => {
2931
- Object.assign(state, initialState$7);
2724
+ Object.assign(state, initialState$8);
2932
2725
  }),
2933
2726
  reducers: {
2934
2727
  setDocuments: (state, action) => {
@@ -3103,11 +2896,11 @@ var __publicField = (obj, key, value) => {
3103
2896
  );
3104
2897
  const documentsReducer = documentSlice.reducer;
3105
2898
  const documentAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
3106
- const initialState$6 = documentAttachmentAdapter.getInitialState({});
2899
+ const initialState$7 = documentAttachmentAdapter.getInitialState({});
3107
2900
  const documentAttachmentSlice = toolkit.createSlice({
3108
2901
  name: "documentAttachments",
3109
- initialState: initialState$6,
3110
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
2902
+ initialState: initialState$7,
2903
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
3111
2904
  reducers: {
3112
2905
  initializeDocumentAttachments: documentAttachmentAdapter.initialize,
3113
2906
  addDocumentAttachment: documentAttachmentAdapter.addOne,
@@ -3166,11 +2959,11 @@ var __publicField = (obj, key, value) => {
3166
2959
  );
3167
2960
  const documentAttachmentReducer = documentAttachmentSlice.reducer;
3168
2961
  const teamAdapter = createModelAdapter((team) => team.offline_id);
3169
- const initialState$5 = teamAdapter.getInitialState({});
2962
+ const initialState$6 = teamAdapter.getInitialState({});
3170
2963
  const teamSlice = toolkit.createSlice({
3171
2964
  name: "teams",
3172
- initialState: initialState$5,
3173
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
2965
+ initialState: initialState$6,
2966
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
3174
2967
  reducers: {
3175
2968
  setTeam: teamAdapter.setOne,
3176
2969
  setTeams: teamAdapter.initialize,
@@ -3204,11 +2997,11 @@ var __publicField = (obj, key, value) => {
3204
2997
  const agentUserConversationAdapter = createModelAdapter(
3205
2998
  (conversation) => conversation.offline_id
3206
2999
  );
3207
- const initialState$4 = agentUserConversationAdapter.getInitialState({});
3000
+ const initialState$5 = agentUserConversationAdapter.getInitialState({});
3208
3001
  const agentsSlice = toolkit.createSlice({
3209
3002
  name: "agents",
3210
- initialState: initialState$4,
3211
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
3003
+ initialState: initialState$5,
3004
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
3212
3005
  reducers: {
3213
3006
  initializeConversations: agentUserConversationAdapter.initialize,
3214
3007
  addConversation: agentUserConversationAdapter.addOne,
@@ -3230,11 +3023,11 @@ var __publicField = (obj, key, value) => {
3230
3023
  );
3231
3024
  const agentsReducer = agentsSlice.reducer;
3232
3025
  const issueCommentAdapter = createModelAdapter((comment) => comment.offline_id);
3233
- const initialState$3 = issueCommentAdapter.getInitialState({});
3026
+ const initialState$4 = issueCommentAdapter.getInitialState({});
3234
3027
  const issueCommentSlice = toolkit.createSlice({
3235
3028
  name: "issueComments",
3236
- initialState: initialState$3,
3237
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$3)),
3029
+ initialState: initialState$4,
3030
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
3238
3031
  reducers: {
3239
3032
  addIssueComment: issueCommentAdapter.addOne,
3240
3033
  addIssueComments: issueCommentAdapter.addMany,
@@ -3263,11 +3056,11 @@ var __publicField = (obj, key, value) => {
3263
3056
  );
3264
3057
  const issueCommentReducer = issueCommentSlice.reducer;
3265
3058
  const issueUpdateAdapter = createModelAdapter((issueUpdate) => issueUpdate.offline_id);
3266
- const initialState$2 = issueUpdateAdapter.getInitialState({});
3059
+ const initialState$3 = issueUpdateAdapter.getInitialState({});
3267
3060
  const issueUpdateSlice = toolkit.createSlice({
3268
3061
  name: "issueUpdates",
3269
- initialState: initialState$2,
3270
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$2)),
3062
+ initialState: initialState$3,
3063
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$3)),
3271
3064
  reducers: {
3272
3065
  initializeIssueUpdates: issueUpdateAdapter.setMany,
3273
3066
  setIssueUpdate: issueUpdateAdapter.setOne,
@@ -3296,11 +3089,11 @@ var __publicField = (obj, key, value) => {
3296
3089
  );
3297
3090
  const issueUpdateReducer = issueUpdateSlice.reducer;
3298
3091
  const issueAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
3299
- const initialState$1 = issueAttachmentAdapter.getInitialState({});
3092
+ const initialState$2 = issueAttachmentAdapter.getInitialState({});
3300
3093
  const issueAttachmentSlice = toolkit.createSlice({
3301
3094
  name: "issueAttachments",
3302
- initialState: initialState$1,
3303
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$1)),
3095
+ initialState: initialState$2,
3096
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$2)),
3304
3097
  reducers: {
3305
3098
  initializeIssueAttachments: issueAttachmentAdapter.initialize,
3306
3099
  addIssueAttachment: issueAttachmentAdapter.addOne,
@@ -3358,15 +3151,59 @@ var __publicField = (obj, key, value) => {
3358
3151
  )
3359
3152
  );
3360
3153
  const issueAttachmentReducer = issueAttachmentSlice.reducer;
3361
- const initialState = {
3154
+ const initialState$1 = {
3362
3155
  version: 0
3363
3156
  };
3364
3157
  const versioningSlice = toolkit.createSlice({
3365
3158
  name: "versioning",
3366
- initialState,
3159
+ initialState: initialState$1,
3367
3160
  reducers: {}
3368
3161
  });
3369
3162
  const versioningReducer = versioningSlice.reducer;
3163
+ const geoImageAdapter = createModelAdapter((model) => model.offline_id);
3164
+ const initialState = geoImageAdapter.getInitialState({});
3165
+ const geoImageSlice = toolkit.createSlice({
3166
+ name: "geoImages",
3167
+ initialState,
3168
+ extraReducers: (builder) => {
3169
+ builder.addCase("RESET", (state) => {
3170
+ Object.assign(state, initialState);
3171
+ });
3172
+ },
3173
+ reducers: {
3174
+ initializeGeoImages: geoImageAdapter.initialize,
3175
+ setGeoImage: geoImageAdapter.setOne,
3176
+ setGeoImages: geoImageAdapter.setMany,
3177
+ addGeoImage: geoImageAdapter.addOne,
3178
+ addGeoImages: geoImageAdapter.addMany,
3179
+ updateGeoImage: geoImageAdapter.updateOne,
3180
+ updateGeoImages: geoImageAdapter.updateMany,
3181
+ deleteGeoImage: geoImageAdapter.deleteOne,
3182
+ deleteGeoImages: geoImageAdapter.deleteMany
3183
+ }
3184
+ });
3185
+ const {
3186
+ initializeGeoImages,
3187
+ setGeoImage,
3188
+ setGeoImages,
3189
+ addGeoImage,
3190
+ addGeoImages,
3191
+ updateGeoImage,
3192
+ updateGeoImages,
3193
+ deleteGeoImage,
3194
+ deleteGeoImages
3195
+ } = geoImageSlice.actions;
3196
+ const selectGeoImageMapping = (state) => state.geoImageReducer.instances;
3197
+ const selectGeoImages = (state) => Object.values(state.geoImageReducer.instances);
3198
+ const selectGeoImageById = (id) => (state) => {
3199
+ return state.geoImageReducer.instances[id];
3200
+ };
3201
+ const selectGeoImagesOfProject = restructureCreateSelectorWithArgs(
3202
+ toolkit.createSelector([selectGeoImages, (_, projectId) => projectId], (mapImages, projectId) => {
3203
+ return mapImages.filter((mapImage) => mapImage.project === projectId);
3204
+ })
3205
+ );
3206
+ const geoImageReducer = geoImageSlice.reducer;
3370
3207
  const fullAssetMarkerSize = 45;
3371
3208
  const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
3372
3209
  const DEFAULT_ISSUE_PRIORITY = IssuePriority.MEDIUM;
@@ -3438,7 +3275,8 @@ var __publicField = (obj, key, value) => {
3438
3275
  teamReducer,
3439
3276
  agentsReducer,
3440
3277
  issueCommentReducer,
3441
- issueUpdateReducer
3278
+ issueUpdateReducer,
3279
+ geoImageReducer
3442
3280
  };
3443
3281
  const overmapReducer = toolkit.combineReducers(overmapReducers);
3444
3282
  const resetStore = "RESET";
@@ -3994,8 +3832,6 @@ var __publicField = (obj, key, value) => {
3994
3832
  console.debug(this.constructor.name, "clearing auth;");
3995
3833
  this.dispatch(setLoggedIn(false));
3996
3834
  this.clearTokens();
3997
- this.dispatch(setActiveProjectId(null));
3998
- this.dispatch(setActiveWorkspaceId(null));
3999
3835
  this.dispatch({ type: constants.RESET_STATE });
4000
3836
  this.dispatch({ type: resetStore });
4001
3837
  }
@@ -4492,13 +4328,13 @@ var __publicField = (obj, key, value) => {
4492
4328
  if (!stage) {
4493
4329
  throw new Error(`No asset stage with id ${stageId} found in the store`);
4494
4330
  }
4495
- this.dispatch(updateStage({ ...stage, user_form: formId }));
4331
+ this.dispatch(updateStage({ ...stage, form: formId }));
4496
4332
  try {
4497
4333
  await this.enqueueRequest({
4498
4334
  description: "Link asset stage to form",
4499
4335
  method: HttpMethod.POST,
4500
4336
  url: `/assets/stages/${stageId}/associate-with-form/`,
4501
- payload: { user_form: formId },
4337
+ payload: { form: formId },
4502
4338
  blockers: [stageId, formId],
4503
4339
  blocks: [stageId]
4504
4340
  });
@@ -4513,7 +4349,7 @@ var __publicField = (obj, key, value) => {
4513
4349
  if (!stage) {
4514
4350
  throw new Error(`No asset stage with id ${stageId} found in the store`);
4515
4351
  }
4516
- this.dispatch(updateStage({ ...stage, user_form: void 0 }));
4352
+ this.dispatch(updateStage({ ...stage, form: void 0 }));
4517
4353
  try {
4518
4354
  await this.enqueueRequest({
4519
4355
  description: "Unlink asset stage from form",
@@ -4538,39 +4374,7 @@ var __publicField = (obj, key, value) => {
4538
4374
  this.dispatch(initializeStages(result));
4539
4375
  }
4540
4376
  }
4541
- const AttachmentModelMeta = {
4542
- [AttachmentModel.Issue]: {
4543
- name: "issue",
4544
- attachUrlPrefix: "/issues",
4545
- deleteUrlPrefix: "/issues",
4546
- fetchUrlPostfix: "/issue-attachments"
4547
- },
4548
- [AttachmentModel.Asset]: {
4549
- name: "asset",
4550
- attachUrlPrefix: "/assets",
4551
- deleteUrlPrefix: "/assets",
4552
- fetchUrlPostfix: "/asset-attachments"
4553
- },
4554
- [AttachmentModel.AssetType]: {
4555
- name: "asset type",
4556
- attachUrlPrefix: "/assets/types",
4557
- deleteUrlPrefix: "/assets/types",
4558
- fetchUrlPostfix: "/asset-type-attachments"
4559
- },
4560
- [AttachmentModel.Project]: {
4561
- name: "project",
4562
- attachUrlPrefix: "/projects",
4563
- deleteUrlPrefix: "/projects",
4564
- fetchUrlPostfix: "/attachments"
4565
- },
4566
- [AttachmentModel.Document]: {
4567
- name: "document",
4568
- attachUrlPrefix: "/documents",
4569
- deleteUrlPrefix: "/documents",
4570
- fetchUrlPostfix: "/document-attachments"
4571
- }
4572
- };
4573
- class BaseAttachmentService extends BaseApiService {
4377
+ class BaseUploadService extends BaseApiService {
4574
4378
  getNumberOfAttachmentsWithSha1(sha1) {
4575
4379
  const {
4576
4380
  issueAttachmentReducer: issueAttachmentReducer2,
@@ -4578,8 +4382,9 @@ var __publicField = (obj, key, value) => {
4578
4382
  assetTypeAttachmentReducer: assetTypeAttachmentReducer2,
4579
4383
  documentAttachmentReducer: documentAttachmentReducer2,
4580
4384
  projectAttachmentReducer: projectAttachmentReducer2,
4385
+ formRevisionAttachmentReducer: formRevisionAttachmentReducer2,
4581
4386
  formSubmissionAttachmentReducer: formSubmissionAttachmentReducer2,
4582
- formRevisionAttachmentReducer: formRevisionAttachmentReducer2
4387
+ geoImageReducer: geoImageReducer2
4583
4388
  } = this.client.store.getState();
4584
4389
  const objectsWithSha1 = [].concat(
4585
4390
  Object.values(issueAttachmentReducer2.instances),
@@ -4588,7 +4393,8 @@ var __publicField = (obj, key, value) => {
4588
4393
  Object.values(documentAttachmentReducer2.instances),
4589
4394
  Object.values(projectAttachmentReducer2.instances),
4590
4395
  Object.values(formRevisionAttachmentReducer2.instances),
4591
- Object.values(formSubmissionAttachmentReducer2.instances)
4396
+ Object.values(formSubmissionAttachmentReducer2.instances),
4397
+ Object.values(geoImageReducer2.instances)
4592
4398
  );
4593
4399
  return objectsWithSha1.filter((object) => object.file_sha1 === sha1).length;
4594
4400
  }
@@ -4608,6 +4414,40 @@ var __publicField = (obj, key, value) => {
4608
4414
  });
4609
4415
  }
4610
4416
  }
4417
+ }
4418
+ const AttachmentModelMeta = {
4419
+ [AttachmentModel.Issue]: {
4420
+ name: "issue",
4421
+ attachUrlPrefix: "/issues",
4422
+ deleteUrlPrefix: "/issues",
4423
+ fetchUrlPostfix: "/issue-attachments"
4424
+ },
4425
+ [AttachmentModel.Asset]: {
4426
+ name: "asset",
4427
+ attachUrlPrefix: "/assets",
4428
+ deleteUrlPrefix: "/assets",
4429
+ fetchUrlPostfix: "/asset-attachments"
4430
+ },
4431
+ [AttachmentModel.AssetType]: {
4432
+ name: "asset type",
4433
+ attachUrlPrefix: "/assets/types",
4434
+ deleteUrlPrefix: "/assets/types",
4435
+ fetchUrlPostfix: "/asset-type-attachments"
4436
+ },
4437
+ [AttachmentModel.Project]: {
4438
+ name: "project",
4439
+ attachUrlPrefix: "/projects",
4440
+ deleteUrlPrefix: "/projects",
4441
+ fetchUrlPostfix: "/attachments"
4442
+ },
4443
+ [AttachmentModel.Document]: {
4444
+ name: "document",
4445
+ attachUrlPrefix: "/documents",
4446
+ deleteUrlPrefix: "/documents",
4447
+ fetchUrlPostfix: "/document-attachments"
4448
+ }
4449
+ };
4450
+ class BaseAttachmentService extends BaseUploadService {
4611
4451
  async attachFiles(files, modelId, buildOfflineAttachment) {
4612
4452
  const { store } = this.client;
4613
4453
  const currentUser = store.getState().userReducer.currentUser;
@@ -4963,11 +4803,10 @@ var __publicField = (obj, key, value) => {
4963
4803
  // Basic CRUD functions
4964
4804
  // TODO: Once all models are represented in `Created<TModel>`, use `Created` in `OptimisticModelResult`, so we don't
4965
4805
  // have to repeat it for all optimistic model results (all optimistic results are created).
4966
- add(issue, issueType = null) {
4806
+ add(issue, workspaceId, issueType = null) {
4967
4807
  const { store } = this.client;
4968
4808
  const dateWithoutMilliseconds = /* @__PURE__ */ new Date();
4969
4809
  const state = store.getState();
4970
- const workspaceId = state.workspaceReducer.activeWorkspaceId;
4971
4810
  const currentUserId = state.userReducer.currentUser.id;
4972
4811
  dateWithoutMilliseconds.setMilliseconds(0);
4973
4812
  if (!workspaceId) {
@@ -5478,10 +5317,6 @@ var __publicField = (obj, key, value) => {
5478
5317
  if (!project) {
5479
5318
  throw new Error("Expected project to exist");
5480
5319
  }
5481
- const activeProjectId = state.projectReducer.activeProjectId;
5482
- if (activeProjectId === projectId) {
5483
- this.dispatch({ type: "project/setActiveProjectId", payload: null });
5484
- }
5485
5320
  const filesToDelete = selectProjectFiles(state).filter((file) => file.project === projectId);
5486
5321
  this.dispatch(removeProjectFilesOfProject(project.id));
5487
5322
  const attachmentsOfProject = selectAttachmentsOfProject(project.id)(state);
@@ -5508,7 +5343,6 @@ var __publicField = (obj, key, value) => {
5508
5343
  this.dispatch(setProjectAccesses(Object.values(projectAccesses)));
5509
5344
  this.dispatch(addOrReplaceProjectFiles(filesToDelete));
5510
5345
  this.dispatch(setProjectAttachments(attachmentsOfProject));
5511
- this.dispatch(setActiveProjectId(activeProjectId));
5512
5346
  this.dispatch({ type: "rehydrated/setRehydrated", payload: true });
5513
5347
  if (license) {
5514
5348
  this.dispatch(updateLicense({ ...license, project: project.id }));
@@ -5579,7 +5413,7 @@ var __publicField = (obj, key, value) => {
5579
5413
  }
5580
5414
  return { fields: newFields, images };
5581
5415
  };
5582
- class UserFormService extends BaseApiService {
5416
+ class FormService extends BaseApiService {
5583
5417
  constructor() {
5584
5418
  super(...arguments);
5585
5419
  // Attach images to revision, after uploading them to S3
@@ -5898,7 +5732,7 @@ var __publicField = (obj, key, value) => {
5898
5732
  }
5899
5733
  return { values: newValues, files };
5900
5734
  };
5901
- class UserFormSubmissionService extends BaseApiService {
5735
+ class FormSubmissionService extends BaseUploadService {
5902
5736
  constructor() {
5903
5737
  super(...arguments);
5904
5738
  // Attach files to submission, after uploading them to S3
@@ -5979,7 +5813,6 @@ var __publicField = (obj, key, value) => {
5979
5813
  // TODO: adapt the support bulk adding to any model type
5980
5814
  async bulkAdd(args, batchSize) {
5981
5815
  const { formRevision, commonFieldValues, fieldValuesByAsset } = args;
5982
- const allFilesRecord = {};
5983
5816
  const { values: fileSeperatedCommonFieldValues, files: commonFiles } = separateFilesFromValues(commonFieldValues);
5984
5817
  const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
5985
5818
  const transactionId = uuid.v4();
@@ -6021,7 +5854,6 @@ var __publicField = (obj, key, value) => {
6021
5854
  file_type: file.type,
6022
5855
  size: file.size
6023
5856
  };
6024
- allFilesRecord[sha1] = filePayload;
6025
5857
  filePaylods.push(filePayload);
6026
5858
  }
6027
5859
  return {
@@ -6057,22 +5889,7 @@ var __publicField = (obj, key, value) => {
6057
5889
  blocks: blocks2
6058
5890
  });
6059
5891
  void promise.then(({ presigned_urls }) => {
6060
- for (const [sha1, presignedUrl] of Object.entries(presigned_urls)) {
6061
- const file = allFilesRecord[sha1];
6062
- if (!file)
6063
- continue;
6064
- void this.enqueueRequest({
6065
- url: presignedUrl.url,
6066
- description: "Upload file",
6067
- method: HttpMethod.POST,
6068
- isExternalUrl: true,
6069
- isAuthNeeded: false,
6070
- attachmentHash: sha1,
6071
- blockers: [`s3-${file.sha1}.${file.extension}`],
6072
- blocks: [sha1],
6073
- s3url: presignedUrl
6074
- });
6075
- }
5892
+ this.processPresignedUrls(presigned_urls);
6076
5893
  });
6077
5894
  prevBatchId = batchId;
6078
5895
  batchPromises.push(promise);
@@ -6543,7 +6360,7 @@ var __publicField = (obj, key, value) => {
6543
6360
  });
6544
6361
  }
6545
6362
  async update(organization) {
6546
- const promise = this.enqueueRequest({
6363
+ return this.enqueueRequest({
6547
6364
  description: "Edit organization",
6548
6365
  method: HttpMethod.PATCH,
6549
6366
  url: `/organizations/${organization.id}/`,
@@ -6551,10 +6368,6 @@ var __publicField = (obj, key, value) => {
6551
6368
  blockers: [`add-org-${organization.name}`, organization.id.toString()],
6552
6369
  blocks: [organization.id.toString()]
6553
6370
  });
6554
- return promise.then((result) => {
6555
- this.dispatch(updateActiveOrganization(organization));
6556
- return result;
6557
- });
6558
6371
  }
6559
6372
  async invite(organizationId, email) {
6560
6373
  return this.enqueueRequest({
@@ -7132,6 +6945,179 @@ var __publicField = (obj, key, value) => {
7132
6945
  this.dispatch(setUsers(Object.values(usersRecord)));
7133
6946
  }
7134
6947
  }
6948
+ class GeoImageService extends BaseUploadService {
6949
+ async add(payload) {
6950
+ const { store } = this.client;
6951
+ const { file, ...payloadWithoutFile } = payload;
6952
+ const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
6953
+ const currentUser = store.getState().userReducer.currentUser;
6954
+ const projectId = payloadWithoutFile.project;
6955
+ const sha1 = await hashFile(file);
6956
+ const filePayload = {
6957
+ sha1,
6958
+ file_type: file.type,
6959
+ extension: file.name.split(".").pop(),
6960
+ size: file.size
6961
+ };
6962
+ const offlineMapImage = offline({
6963
+ ...payloadWithoutFile,
6964
+ file_name: file.name,
6965
+ file_sha1: sha1,
6966
+ file: URL.createObjectURL(file),
6967
+ submitted_at: submittedAt,
6968
+ created_by: currentUser.id
6969
+ });
6970
+ store.dispatch(addGeoImage(offlineMapImage));
6971
+ const promise = this.enqueueRequest({
6972
+ description: "Add geo image",
6973
+ method: HttpMethod.POST,
6974
+ url: "/geo-images/",
6975
+ payload: {
6976
+ offline_id: offlineMapImage.offline_id,
6977
+ submitted_at: submittedAt,
6978
+ title: offlineMapImage.title,
6979
+ description: offlineMapImage.description,
6980
+ geo_marker: offlineMapImage.geo_marker,
6981
+ canvas_marker: offlineMapImage.canvas_marker,
6982
+ sha1: offlineMapImage.file_sha1,
6983
+ project: offlineMapImage.project,
6984
+ file_name: offlineMapImage.file_name,
6985
+ direction: offlineMapImage.direction,
6986
+ original_date: offlineMapImage.original_date,
6987
+ file: filePayload
6988
+ },
6989
+ blocks: [projectId.toString()],
6990
+ blockers: [projectId.toString()]
6991
+ });
6992
+ promise.then((result) => {
6993
+ this.processPresignedUrls(result.presigned_urls);
6994
+ store.dispatch(setGeoImage(result.geo_image));
6995
+ }).catch(() => {
6996
+ store.dispatch(deleteGeoImage(offlineMapImage.offline_id));
6997
+ });
6998
+ return [offlineMapImage, promise.then((result) => result.geo_image)];
6999
+ }
7000
+ async bulkAdd(payloads, projectId) {
7001
+ const { store } = this.client;
7002
+ const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
7003
+ const currentUser = store.getState().userReducer.currentUser;
7004
+ const offlineGeoImages = [];
7005
+ const offlineIds = [];
7006
+ const geoImagePayloads = [];
7007
+ const filePayloadRecord = {};
7008
+ for (const payloadAndFile of payloads) {
7009
+ const { file, ...payload } = payloadAndFile;
7010
+ const sha1 = await hashFile(file);
7011
+ if (!(sha1 in filePayloadRecord)) {
7012
+ filePayloadRecord[sha1] = {
7013
+ sha1,
7014
+ file_type: file.type,
7015
+ extension: file.name.split(".").pop(),
7016
+ size: file.size
7017
+ };
7018
+ await this.client.files.addCache(file, sha1);
7019
+ }
7020
+ const offlineMapImage = offline({
7021
+ ...payload,
7022
+ file_name: file.name,
7023
+ file_sha1: sha1,
7024
+ file: URL.createObjectURL(file),
7025
+ submitted_at: submittedAt,
7026
+ created_by: currentUser.id,
7027
+ project: projectId
7028
+ });
7029
+ offlineGeoImages.push(offlineMapImage);
7030
+ offlineIds.push(offlineMapImage.offline_id);
7031
+ geoImagePayloads.push({
7032
+ offline_id: offlineMapImage.offline_id,
7033
+ sha1: offlineMapImage.file_sha1,
7034
+ file_name: offlineMapImage.file_name,
7035
+ title: offlineMapImage.title,
7036
+ description: offlineMapImage.description,
7037
+ geo_marker: offlineMapImage.geo_marker,
7038
+ canvas_marker: offlineMapImage.canvas_marker,
7039
+ direction: offlineMapImage.direction,
7040
+ original_date: offlineMapImage.original_date
7041
+ });
7042
+ }
7043
+ store.dispatch(addGeoImages(offlineGeoImages));
7044
+ const promise = this.enqueueRequest({
7045
+ description: "Bulk add geo images",
7046
+ method: HttpMethod.POST,
7047
+ url: "/geo-images/bulk/",
7048
+ payload: {
7049
+ submitted_at: submittedAt,
7050
+ project: projectId,
7051
+ geo_images: geoImagePayloads,
7052
+ files: Object.values(filePayloadRecord)
7053
+ },
7054
+ blocks: [projectId.toString()],
7055
+ blockers: offlineIds
7056
+ });
7057
+ promise.then((result) => {
7058
+ this.processPresignedUrls(result.presigned_urls);
7059
+ store.dispatch(setGeoImages(result.geo_images));
7060
+ }).catch(() => {
7061
+ store.dispatch(deleteGeoImages(offlineIds));
7062
+ });
7063
+ return [offlineGeoImages, promise.then((result) => result.geo_images)];
7064
+ }
7065
+ update(payload) {
7066
+ const { store } = this.client;
7067
+ const state = store.getState();
7068
+ const geoImageToUpdate = selectGeoImageById(payload.offline_id)(state);
7069
+ if (!geoImageToUpdate) {
7070
+ throw new Error(`Map image with offline_id ${payload.offline_id} does not exist in the store`);
7071
+ }
7072
+ const updatedGeoImage = { ...geoImageToUpdate, ...payload };
7073
+ store.dispatch(updateGeoImage(updatedGeoImage));
7074
+ const promise = this.enqueueRequest({
7075
+ description: "Update geo image",
7076
+ method: HttpMethod.PATCH,
7077
+ url: `/geo-images/${payload.offline_id}/`,
7078
+ payload,
7079
+ blocks: [payload.offline_id],
7080
+ blockers: [payload.offline_id]
7081
+ });
7082
+ promise.then((result) => {
7083
+ store.dispatch(setGeoImage(result));
7084
+ }).catch(() => {
7085
+ store.dispatch(setGeoImage(geoImageToUpdate));
7086
+ });
7087
+ return [updatedGeoImage, promise];
7088
+ }
7089
+ async delete(geoImageId) {
7090
+ const { store } = this.client;
7091
+ const state = store.getState();
7092
+ const geoImageToDelete = selectGeoImageById(geoImageId)(state);
7093
+ if (!geoImageToDelete) {
7094
+ throw new Error(`Map image with offline_id ${geoImageId} does not exist in the store`);
7095
+ }
7096
+ store.dispatch(deleteGeoImage(geoImageId));
7097
+ const promise = this.enqueueRequest({
7098
+ description: "Delete geo image",
7099
+ method: HttpMethod.DELETE,
7100
+ url: `/geo-images/${geoImageId}/`,
7101
+ blocks: [geoImageId],
7102
+ blockers: [geoImageId]
7103
+ });
7104
+ promise.catch(() => {
7105
+ store.dispatch(setGeoImage(geoImageToDelete));
7106
+ });
7107
+ return promise;
7108
+ }
7109
+ async refreshStore(projectId) {
7110
+ const { store } = this.client;
7111
+ const result = await this.enqueueRequest({
7112
+ description: "Get geo images",
7113
+ method: HttpMethod.GET,
7114
+ url: `/projects/${projectId}/geo-images/`,
7115
+ blocks: [projectId.toString()],
7116
+ blockers: []
7117
+ });
7118
+ store.dispatch(initializeGeoImages(result));
7119
+ }
7120
+ }
7135
7121
  exports2.APIError = APIError;
7136
7122
  exports2.AgentService = AgentService;
7137
7123
  exports2.AssetAttachmentService = AssetAttachmentService;
@@ -7154,7 +7140,10 @@ var __publicField = (obj, key, value) => {
7154
7140
  exports2.EmailDomainsService = EmailDomainsService;
7155
7141
  exports2.EmailVerificationService = EmailVerificationService;
7156
7142
  exports2.FileService = FileService;
7143
+ exports2.FormService = FormService;
7144
+ exports2.FormSubmissionService = FormSubmissionService;
7157
7145
  exports2.GREEN = GREEN;
7146
+ exports2.GeoImageService = GeoImageService;
7158
7147
  exports2.HttpMethod = HttpMethod;
7159
7148
  exports2.IssueAttachmentService = IssueAttachmentService;
7160
7149
  exports2.IssueCommentService = IssueCommentService;
@@ -7180,8 +7169,6 @@ var __publicField = (obj, key, value) => {
7180
7169
  exports2.ProjectFileService = ProjectFileService;
7181
7170
  exports2.ProjectService = ProjectService;
7182
7171
  exports2.TeamService = TeamService;
7183
- exports2.UserFormService = UserFormService;
7184
- exports2.UserFormSubmissionService = UserFormSubmissionService;
7185
7172
  exports2.UserService = UserService;
7186
7173
  exports2.VERSION_REDUCER_KEY = VERSION_REDUCER_KEY;
7187
7174
  exports2.VerificationCodeType = VerificationCodeType;
@@ -7216,6 +7203,8 @@ var __publicField = (obj, key, value) => {
7216
7203
  exports2.addFormSubmissionAttachments = addFormSubmissionAttachments;
7217
7204
  exports2.addFormSubmissions = addFormSubmissions;
7218
7205
  exports2.addForms = addForms;
7206
+ exports2.addGeoImage = addGeoImage;
7207
+ exports2.addGeoImages = addGeoImages;
7219
7208
  exports2.addIssue = addIssue;
7220
7209
  exports2.addIssueAttachment = addIssueAttachment;
7221
7210
  exports2.addIssueAttachments = addIssueAttachments;
@@ -7291,6 +7280,8 @@ var __publicField = (obj, key, value) => {
7291
7280
  exports2.deleteFormSubmissionAttachment = deleteFormSubmissionAttachment;
7292
7281
  exports2.deleteFormSubmissionAttachments = deleteFormSubmissionAttachments;
7293
7282
  exports2.deleteFormSubmissions = deleteFormSubmissions;
7283
+ exports2.deleteGeoImage = deleteGeoImage;
7284
+ exports2.deleteGeoImages = deleteGeoImages;
7294
7285
  exports2.deleteIssue = deleteIssue;
7295
7286
  exports2.deleteIssueAttachment = deleteIssueAttachment;
7296
7287
  exports2.deleteIssueAttachments = deleteIssueAttachments;
@@ -7324,6 +7315,7 @@ var __publicField = (obj, key, value) => {
7324
7315
  exports2.fileReducer = fileReducer;
7325
7316
  exports2.fileSlice = fileSlice;
7326
7317
  exports2.fileToBlob = fileToBlob;
7318
+ exports2.flipBounds = flipBounds;
7327
7319
  exports2.flipCoordinates = flipCoordinates;
7328
7320
  exports2.formReducer = formReducer;
7329
7321
  exports2.formRevisionAttachmentReducer = formRevisionAttachmentReducer;
@@ -7338,6 +7330,8 @@ var __publicField = (obj, key, value) => {
7338
7330
  exports2.fullAssetMarkerSize = fullAssetMarkerSize;
7339
7331
  exports2.generateBadgeColors = generateBadgeColors;
7340
7332
  exports2.genericMemo = genericMemo;
7333
+ exports2.geoImageReducer = geoImageReducer;
7334
+ exports2.geoImageSlice = geoImageSlice;
7341
7335
  exports2.getFileIdentifier = getFileIdentifier;
7342
7336
  exports2.getFileS3Key = getFileS3Key;
7343
7337
  exports2.getLocalDateString = getLocalDateString;
@@ -7346,8 +7340,6 @@ var __publicField = (obj, key, value) => {
7346
7340
  exports2.getRenamedFile = getRenamedFile;
7347
7341
  exports2.getStageColor = getStageColor;
7348
7342
  exports2.hashFile = hashFile;
7349
- exports2.hideAllCategories = hideAllCategories;
7350
- exports2.hideCategory = hideCategory;
7351
7343
  exports2.initSDK = initSDK;
7352
7344
  exports2.initializeAssetAttachments = initializeAssetAttachments;
7353
7345
  exports2.initializeAssetTypeAttachments = initializeAssetTypeAttachments;
@@ -7360,6 +7352,7 @@ var __publicField = (obj, key, value) => {
7360
7352
  exports2.initializeFormRevisionAttachments = initializeFormRevisionAttachments;
7361
7353
  exports2.initializeFormRevisions = initializeFormRevisions;
7362
7354
  exports2.initializeFormSubmissionAttachments = initializeFormSubmissionAttachments;
7355
+ exports2.initializeGeoImages = initializeGeoImages;
7363
7356
  exports2.initializeIssueAttachments = initializeIssueAttachments;
7364
7357
  exports2.initializeIssueTypes = initializeIssueTypes;
7365
7358
  exports2.initializeIssueUpdates = initializeIssueUpdates;
@@ -7432,18 +7425,12 @@ var __publicField = (obj, key, value) => {
7432
7425
  exports2.searchIssues = searchIssues;
7433
7426
  exports2.selectAccessToken = selectAccessToken;
7434
7427
  exports2.selectActiveLicense = selectActiveLicense;
7435
- exports2.selectActiveOrganization = selectActiveOrganization;
7436
7428
  exports2.selectActiveOrganizationAccess = selectActiveOrganizationAccess;
7437
- exports2.selectActiveOrganizationId = selectActiveOrganizationId;
7438
- exports2.selectActiveOrganizationLicenses = selectActiveOrganizationLicenses;
7439
- exports2.selectActiveOrganizationProjects = selectActiveOrganizationProjects;
7440
7429
  exports2.selectActiveProject = selectActiveProject;
7441
7430
  exports2.selectActiveProjectAccess = selectActiveProjectAccess;
7442
7431
  exports2.selectActiveProjectFileId = selectActiveProjectFileId;
7443
7432
  exports2.selectActiveProjectId = selectActiveProjectId;
7444
7433
  exports2.selectActiveStatusLicenses = selectActiveStatusLicenses;
7445
- exports2.selectActiveWorkspace = selectActiveWorkspace;
7446
- exports2.selectActiveWorkspaceId = selectActiveWorkspaceId;
7447
7434
  exports2.selectAllDocumentAttachments = selectAllDocumentAttachments;
7448
7435
  exports2.selectAllProjectAttachments = selectAllProjectAttachments;
7449
7436
  exports2.selectAncestorIdsOfDocument = selectAncestorIdsOfDocument;
@@ -7480,7 +7467,6 @@ var __publicField = (obj, key, value) => {
7480
7467
  exports2.selectCategoriesOfWorkspace = selectCategoriesOfWorkspace;
7481
7468
  exports2.selectCategoryById = selectCategoryById;
7482
7469
  exports2.selectCategoryMapping = selectCategoryMapping;
7483
- exports2.selectCategoryVisibility = selectCategoryVisibility;
7484
7470
  exports2.selectCommentsOfIssue = selectCommentsOfIssue;
7485
7471
  exports2.selectCompletedStageIdsForAsset = selectCompletedStageIdsForAsset;
7486
7472
  exports2.selectCompletedStages = selectCompletedStages;
@@ -7497,8 +7483,6 @@ var __publicField = (obj, key, value) => {
7497
7483
  exports2.selectEmailDomains = selectEmailDomains;
7498
7484
  exports2.selectEmailDomainsAsMapping = selectEmailDomainsAsMapping;
7499
7485
  exports2.selectEmailDomainsOfOrganization = selectEmailDomainsOfOrganization;
7500
- exports2.selectEnabledProjectFileMapping = selectEnabledProjectFileMapping;
7501
- exports2.selectEnabledProjectFiles = selectEnabledProjectFiles;
7502
7486
  exports2.selectFavouriteProjects = selectFavouriteProjects;
7503
7487
  exports2.selectFilteredForms = selectFilteredForms;
7504
7488
  exports2.selectForm = selectForm;
@@ -7522,8 +7506,10 @@ var __publicField = (obj, key, value) => {
7522
7506
  exports2.selectFormsCount = selectFormsCount;
7523
7507
  exports2.selectFormsMapping = selectFormsMapping;
7524
7508
  exports2.selectGeneralFormCount = selectGeneralFormCount;
7525
- exports2.selectHiddenAssetTypeIds = selectHiddenAssetTypeIds;
7526
- exports2.selectHiddenCategoryCount = selectHiddenCategoryCount;
7509
+ exports2.selectGeoImageById = selectGeoImageById;
7510
+ exports2.selectGeoImageMapping = selectGeoImageMapping;
7511
+ exports2.selectGeoImages = selectGeoImages;
7512
+ exports2.selectGeoImagesOfProject = selectGeoImagesOfProject;
7527
7513
  exports2.selectIsFetchingInitialData = selectIsFetchingInitialData;
7528
7514
  exports2.selectIsImportingProjectFile = selectIsImportingProjectFile;
7529
7515
  exports2.selectIsLoggedIn = selectIsLoggedIn;
@@ -7540,7 +7526,6 @@ var __publicField = (obj, key, value) => {
7540
7526
  exports2.selectIssueTypesOfOrganization = selectIssueTypesOfOrganization;
7541
7527
  exports2.selectIssueUpdateMapping = selectIssueUpdateMapping;
7542
7528
  exports2.selectIssueUpdatesOfIssue = selectIssueUpdatesOfIssue;
7543
- exports2.selectIssues = selectIssues;
7544
7529
  exports2.selectIssuesOfIssueType = selectIssuesOfIssueType;
7545
7530
  exports2.selectIssuesOfIssueTypeCount = selectIssuesOfIssueTypeCount;
7546
7531
  exports2.selectLatestFormRevisionByForm = selectLatestFormRevisionByForm;
@@ -7551,6 +7536,7 @@ var __publicField = (obj, key, value) => {
7551
7536
  exports2.selectLicenseForProject = selectLicenseForProject;
7552
7537
  exports2.selectLicenses = selectLicenses;
7553
7538
  exports2.selectLicensesForProjectsMapping = selectLicensesForProjectsMapping;
7539
+ exports2.selectLicensesOfOrganization = selectLicensesOfOrganization;
7554
7540
  exports2.selectMainWorkspace = selectMainWorkspace;
7555
7541
  exports2.selectNumberOfAssetTypesMatchingCaseInsensitiveName = selectNumberOfAssetTypesMatchingCaseInsensitiveName;
7556
7542
  exports2.selectNumberOfAssetsOfAssetType = selectNumberOfAssetsOfAssetType;
@@ -7559,6 +7545,7 @@ var __publicField = (obj, key, value) => {
7559
7545
  exports2.selectOrganizationAccessForUser = selectOrganizationAccessForUser;
7560
7546
  exports2.selectOrganizationAccessUserMapping = selectOrganizationAccessUserMapping;
7561
7547
  exports2.selectOrganizationAccesses = selectOrganizationAccesses;
7548
+ exports2.selectOrganizationById = selectOrganizationById;
7562
7549
  exports2.selectOrganizationUsersAsMapping = selectOrganizationUsersAsMapping;
7563
7550
  exports2.selectOrganizationUsersIds = selectOrganizationUsersIds;
7564
7551
  exports2.selectOrganizations = selectOrganizations;
@@ -7573,21 +7560,21 @@ var __publicField = (obj, key, value) => {
7573
7560
  exports2.selectProjectAccesses = selectProjectAccesses;
7574
7561
  exports2.selectProjectAttachment = selectProjectAttachment;
7575
7562
  exports2.selectProjectAttachmentMapping = selectProjectAttachmentMapping;
7576
- exports2.selectProjectFileVisibility = selectProjectFileVisibility;
7563
+ exports2.selectProjectFileById = selectProjectFileById;
7564
+ exports2.selectProjectFileMapping = selectProjectFileMapping;
7577
7565
  exports2.selectProjectFiles = selectProjectFiles;
7578
7566
  exports2.selectProjectUsersAsMapping = selectProjectUsersAsMapping;
7579
7567
  exports2.selectProjectUsersIds = selectProjectUsersIds;
7580
7568
  exports2.selectProjects = selectProjects;
7569
+ exports2.selectProjectsOfOrganization = selectProjectsOfOrganization;
7581
7570
  exports2.selectProjectsWithAccess = selectProjectsWithAccess;
7582
7571
  exports2.selectRecentIssueIds = selectRecentIssueIds;
7583
7572
  exports2.selectRecentIssuesAsSearchResults = selectRecentIssuesAsSearchResults;
7584
7573
  exports2.selectRehydrated = selectRehydrated;
7585
7574
  exports2.selectRootDocuments = selectRootDocuments;
7586
7575
  exports2.selectSortedFormSubmissionsOfForm = selectSortedFormSubmissionsOfForm;
7587
- exports2.selectSortedOrganizationLicenses = selectSortedOrganizationLicenses;
7588
7576
  exports2.selectSortedOrganizationUsers = selectSortedOrganizationUsers;
7589
7577
  exports2.selectSortedProjectUsers = selectSortedProjectUsers;
7590
- exports2.selectSortedProjects = selectSortedProjects;
7591
7578
  exports2.selectStage = selectStage;
7592
7579
  exports2.selectStageFormIdsFromStageIds = selectStageFormIdsFromStageIds;
7593
7580
  exports2.selectStageMapping = selectStageMapping;
@@ -7604,15 +7591,11 @@ var __publicField = (obj, key, value) => {
7604
7591
  exports2.selectUser = selectUser;
7605
7592
  exports2.selectUserFormRevisionAttachmentsMapping = selectUserFormRevisionAttachmentsMapping;
7606
7593
  exports2.selectUsersAsMapping = selectUsersAsMapping;
7607
- exports2.selectVisibleStatuses = selectVisibleStatuses;
7608
- exports2.selectVisibleUserIds = selectVisibleUserIds;
7609
- exports2.selectWorkspace = selectWorkspace;
7594
+ exports2.selectWorkspaceById = selectWorkspaceById;
7610
7595
  exports2.selectWorkspaceMapping = selectWorkspaceMapping;
7611
7596
  exports2.selectWorkspaces = selectWorkspaces;
7612
- exports2.setActiveOrganizationId = setActiveOrganizationId;
7613
7597
  exports2.setActiveProjectFileId = setActiveProjectFileId;
7614
7598
  exports2.setActiveProjectId = setActiveProjectId;
7615
- exports2.setActiveWorkspaceId = setActiveWorkspaceId;
7616
7599
  exports2.setAsset = setAsset;
7617
7600
  exports2.setAssetAttachment = setAssetAttachment;
7618
7601
  exports2.setAssetAttachments = setAssetAttachments;
@@ -7633,6 +7616,8 @@ var __publicField = (obj, key, value) => {
7633
7616
  exports2.setFormSubmissionAttachments = setFormSubmissionAttachments;
7634
7617
  exports2.setFormSubmissions = setFormSubmissions;
7635
7618
  exports2.setForms = setForms;
7619
+ exports2.setGeoImage = setGeoImage;
7620
+ exports2.setGeoImages = setGeoImages;
7636
7621
  exports2.setIsFetchingInitialData = setIsFetchingInitialData;
7637
7622
  exports2.setIsImportingProjectFile = setIsImportingProjectFile;
7638
7623
  exports2.setIssueAttachment = setIssueAttachment;
@@ -7648,7 +7633,6 @@ var __publicField = (obj, key, value) => {
7648
7633
  exports2.setProjectAccesses = setProjectAccesses;
7649
7634
  exports2.setProjectAttachment = setProjectAttachment;
7650
7635
  exports2.setProjectAttachments = setProjectAttachments;
7651
- exports2.setProjectFileVisible = setProjectFileVisible;
7652
7636
  exports2.setProjects = setProjects;
7653
7637
  exports2.setRehydrated = setRehydrated;
7654
7638
  exports2.setStage = setStage;
@@ -7659,8 +7643,6 @@ var __publicField = (obj, key, value) => {
7659
7643
  exports2.setTourStep = setTourStep;
7660
7644
  exports2.setUploadUrl = setUploadUrl;
7661
7645
  exports2.setUsers = setUsers;
7662
- exports2.setVisibleStatuses = setVisibleStatuses;
7663
- exports2.setVisibleUserIds = setVisibleUserIds;
7664
7646
  exports2.setWorkspaces = setWorkspaces;
7665
7647
  exports2.settingReducer = settingReducer;
7666
7648
  exports2.settingSlice = settingSlice;
@@ -7672,11 +7654,7 @@ var __publicField = (obj, key, value) => {
7672
7654
  exports2.teamSlice = teamSlice;
7673
7655
  exports2.toFileNameSafeString = toFileNameSafeString;
7674
7656
  exports2.toOfflineIdRecord = toOfflineIdRecord;
7675
- exports2.toggleAssetTypeVisibility = toggleAssetTypeVisibility;
7676
7657
  exports2.truncate = truncate;
7677
- exports2.unhideAllCategories = unhideAllCategories;
7678
- exports2.unhideCategory = unhideCategory;
7679
- exports2.updateActiveOrganization = updateActiveOrganization;
7680
7658
  exports2.updateAsset = updateAsset;
7681
7659
  exports2.updateAssetAttachment = updateAssetAttachment;
7682
7660
  exports2.updateAssetAttachments = updateAssetAttachments;
@@ -7695,6 +7673,8 @@ var __publicField = (obj, key, value) => {
7695
7673
  exports2.updateFormSubmissionAttachment = updateFormSubmissionAttachment;
7696
7674
  exports2.updateFormSubmissionAttachments = updateFormSubmissionAttachments;
7697
7675
  exports2.updateFormSubmissions = updateFormSubmissions;
7676
+ exports2.updateGeoImage = updateGeoImage;
7677
+ exports2.updateGeoImages = updateGeoImages;
7698
7678
  exports2.updateIssue = updateIssue;
7699
7679
  exports2.updateIssueAttachment = updateIssueAttachment;
7700
7680
  exports2.updateIssueAttachments = updateIssueAttachments;