@overmap-ai/core 1.0.60-forms-removal.9 → 1.0.60-forms-refactor-1.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 +487 -509
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +487 -509
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +8 -4
- package/dist/sdk/services/BaseUploadService.d.ts +8 -0
- package/dist/sdk/services/FormService.d.ts +18 -0
- package/dist/sdk/services/FormSubmissionService.d.ts +24 -0
- package/dist/sdk/services/GeoImageService.d.ts +11 -0
- package/dist/sdk/services/IssueService.d.ts +1 -1
- package/dist/sdk/services/index.d.ts +3 -2
- package/dist/sdk/typings.d.ts +3 -2
- package/dist/store/slices/assetTypeSlice.d.ts +2 -8
- package/dist/store/slices/categorySlice.d.ts +11 -25
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +21 -21
- package/dist/store/slices/formRevisionSlice.d.ts +21 -21
- package/dist/store/slices/formSlice.d.ts +20 -20
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +20 -20
- package/dist/store/slices/formSubmissionSlice.d.ts +26 -26
- package/dist/store/slices/geoImageSlice.d.ts +48 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueSlice.d.ts +2 -12
- package/dist/store/slices/organizationSlice.d.ts +6 -17
- package/dist/store/slices/projectFileSlice.d.ts +4 -15
- package/dist/store/slices/projectSlice.d.ts +1 -4
- package/dist/store/slices/workspaceSlice.d.ts +5 -10
- package/dist/store/store.d.ts +2 -1
- package/dist/typings/models/assets.d.ts +1 -1
- package/dist/typings/models/forms.d.ts +11 -11
- package/dist/typings/models/geo.d.ts +2 -1
- package/dist/typings/models/geoImages.d.ts +14 -0
- package/dist/typings/models/index.d.ts +1 -0
- package/dist/typings/models/issues.d.ts +3 -3
- package/dist/typings/models/store.d.ts +2 -2
- package/dist/utils/coordinates.d.ts +2 -1
- package/dist/utils/forms.d.ts +2 -2
- package/package.json +1 -1
- package/dist/sdk/services/UserFormService.d.ts +0 -18
- package/dist/sdk/services/UserFormSubmissionService.d.ts +0 -25
package/dist/overmap-core.js
CHANGED
|
@@ -379,15 +379,15 @@ const wrapMigration = (migrator) => (state) => {
|
|
|
379
379
|
};
|
|
380
380
|
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
381
381
|
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
382
|
-
const initialState$
|
|
382
|
+
const initialState$B = {
|
|
383
383
|
accessToken: "",
|
|
384
384
|
refreshToken: "",
|
|
385
385
|
isLoggedIn: false
|
|
386
386
|
};
|
|
387
387
|
const authSlice = createSlice({
|
|
388
388
|
name: "auth",
|
|
389
|
-
initialState: initialState$
|
|
390
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
389
|
+
initialState: initialState$B,
|
|
390
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
391
391
|
reducers: {
|
|
392
392
|
setTokens: (state, action) => {
|
|
393
393
|
state.accessToken = action.payload.accessToken;
|
|
@@ -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;
|
|
@@ -854,72 +857,23 @@ function createModelAdapter(computeModelId) {
|
|
|
854
857
|
};
|
|
855
858
|
}
|
|
856
859
|
const categoryAdapter = createModelAdapter((category) => category.offline_id);
|
|
857
|
-
const initialState$
|
|
858
|
-
categoryVisibility: {
|
|
859
|
-
hiddenCategoryIds: [],
|
|
860
|
-
isNullCategoryHidden: false
|
|
861
|
-
}
|
|
862
|
-
});
|
|
860
|
+
const initialState$A = categoryAdapter.getInitialState({});
|
|
863
861
|
const categorySlice = createSlice({
|
|
864
862
|
name: "categories",
|
|
865
|
-
initialState: initialState$
|
|
866
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
863
|
+
initialState: initialState$A,
|
|
864
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$A)),
|
|
867
865
|
reducers: {
|
|
868
|
-
initializeCategories:
|
|
869
|
-
categoryAdapter.initialize(state, action);
|
|
870
|
-
state.categoryVisibility.hiddenCategoryIds = state.categoryVisibility.hiddenCategoryIds.filter(
|
|
871
|
-
(categoryId) => action.payload.some((category) => category.offline_id === categoryId)
|
|
872
|
-
);
|
|
873
|
-
},
|
|
866
|
+
initializeCategories: categoryAdapter.initialize,
|
|
874
867
|
addCategory: categoryAdapter.addOne,
|
|
875
868
|
updateCategory: categoryAdapter.updateOne,
|
|
876
|
-
deleteCategory: categoryAdapter.deleteOne
|
|
877
|
-
// Pass in a null value to hide the "No category" category
|
|
878
|
-
hideCategory: (state, action) => {
|
|
879
|
-
const categoryId = action.payload;
|
|
880
|
-
if (categoryId === null) {
|
|
881
|
-
state.categoryVisibility.isNullCategoryHidden = true;
|
|
882
|
-
} else if (!(categoryId in state.categoryVisibility.hiddenCategoryIds)) {
|
|
883
|
-
state.categoryVisibility.hiddenCategoryIds.push(categoryId);
|
|
884
|
-
}
|
|
885
|
-
},
|
|
886
|
-
hideAllCategories: (state) => {
|
|
887
|
-
state.categoryVisibility.hiddenCategoryIds = Object.keys(state.instances);
|
|
888
|
-
state.categoryVisibility.isNullCategoryHidden = true;
|
|
889
|
-
},
|
|
890
|
-
// Pass in a null value to unhide the "No category" category
|
|
891
|
-
unhideCategory: (state, action) => {
|
|
892
|
-
const categoryId = action.payload;
|
|
893
|
-
if (categoryId === null) {
|
|
894
|
-
state.categoryVisibility.isNullCategoryHidden = false;
|
|
895
|
-
} else {
|
|
896
|
-
state.categoryVisibility.hiddenCategoryIds = state.categoryVisibility.hiddenCategoryIds.filter(
|
|
897
|
-
(id) => id !== categoryId
|
|
898
|
-
);
|
|
899
|
-
}
|
|
900
|
-
},
|
|
901
|
-
unhideAllCategories: (state) => {
|
|
902
|
-
state.categoryVisibility.hiddenCategoryIds = [];
|
|
903
|
-
state.categoryVisibility.isNullCategoryHidden = false;
|
|
904
|
-
}
|
|
869
|
+
deleteCategory: categoryAdapter.deleteOne
|
|
905
870
|
}
|
|
906
871
|
});
|
|
907
|
-
const {
|
|
908
|
-
initializeCategories,
|
|
909
|
-
addCategory,
|
|
910
|
-
updateCategory,
|
|
911
|
-
deleteCategory,
|
|
912
|
-
hideCategory,
|
|
913
|
-
hideAllCategories,
|
|
914
|
-
unhideCategory,
|
|
915
|
-
unhideAllCategories
|
|
916
|
-
} = categorySlice.actions;
|
|
872
|
+
const { initializeCategories, addCategory, updateCategory, deleteCategory } = categorySlice.actions;
|
|
917
873
|
const selectCategoryMapping = (state) => state.categoryReducer.instances;
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
(mapping, activeWorkspaceId) => activeWorkspaceId ? Object.values(mapping).filter((category) => category.workspace === activeWorkspaceId) : []
|
|
922
|
-
);
|
|
874
|
+
const selectCategories = createSelector([selectCategoryMapping], (categoryMapping) => {
|
|
875
|
+
return Object.values(categoryMapping);
|
|
876
|
+
});
|
|
923
877
|
const selectCategoriesOfWorkspace = restructureCreateSelectorWithArgs(
|
|
924
878
|
createSelector(
|
|
925
879
|
[selectCategories, (_state, workspaceId) => workspaceId],
|
|
@@ -932,36 +886,23 @@ const selectCategoryById = restructureCreateSelectorWithArgs(
|
|
|
932
886
|
(mapping, categoryId) => mapping[categoryId]
|
|
933
887
|
)
|
|
934
888
|
);
|
|
935
|
-
const selectCategoryVisibility = (state) => state.categoryReducer.categoryVisibility;
|
|
936
|
-
const selectHiddenCategoryCount = (state) => {
|
|
937
|
-
const { hiddenCategoryIds, isNullCategoryHidden } = state.categoryReducer.categoryVisibility;
|
|
938
|
-
let hiddenCategoryCount = hiddenCategoryIds.length;
|
|
939
|
-
if (isNullCategoryHidden)
|
|
940
|
-
hiddenCategoryCount++;
|
|
941
|
-
return hiddenCategoryCount;
|
|
942
|
-
};
|
|
943
889
|
const selectIssueCountOfCategory = (categoryId) => (state) => {
|
|
944
890
|
return Object.values(state.issueReducer.instances).filter((issue) => issue.category === categoryId).length;
|
|
945
891
|
};
|
|
946
892
|
const categoryReducer = categorySlice.reducer;
|
|
947
893
|
const assetTypeAdapter = createModelAdapter((assetType) => assetType.offline_id);
|
|
948
|
-
const initialState$
|
|
949
|
-
hiddenAssetTypeIds: {}
|
|
950
|
-
});
|
|
894
|
+
const initialState$z = assetTypeAdapter.getInitialState({});
|
|
951
895
|
const assetTypeSlice = createSlice({
|
|
952
896
|
name: "assetTypes",
|
|
953
|
-
initialState: initialState$
|
|
954
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
897
|
+
initialState: initialState$z,
|
|
898
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$z)),
|
|
955
899
|
reducers: {
|
|
956
900
|
initializeAssetTypes: assetTypeAdapter.initialize,
|
|
957
901
|
addAssetType: assetTypeAdapter.addOne,
|
|
958
|
-
deleteAssetType: assetTypeAdapter.deleteOne
|
|
959
|
-
toggleAssetTypeVisibility: (state, action) => {
|
|
960
|
-
state.hiddenAssetTypeIds[action.payload] = !state.hiddenAssetTypeIds[action.payload];
|
|
961
|
-
}
|
|
902
|
+
deleteAssetType: assetTypeAdapter.deleteOne
|
|
962
903
|
}
|
|
963
904
|
});
|
|
964
|
-
const { addAssetType, initializeAssetTypes, deleteAssetType
|
|
905
|
+
const { addAssetType, initializeAssetTypes, deleteAssetType } = assetTypeSlice.actions;
|
|
965
906
|
const selectAssetTypesMapping = (state) => state.assetTypeReducer.instances;
|
|
966
907
|
const selectAssetTypes = createSelector(
|
|
967
908
|
[selectAssetTypesMapping],
|
|
@@ -997,14 +938,13 @@ const selectAssetTypesByName = restructureCreateSelectorWithArgs(
|
|
|
997
938
|
});
|
|
998
939
|
})
|
|
999
940
|
);
|
|
1000
|
-
const selectHiddenAssetTypeIds = (state) => state.assetTypeReducer.hiddenAssetTypeIds;
|
|
1001
941
|
const assetTypeReducer = assetTypeSlice.reducer;
|
|
1002
942
|
const assetAdapter = createModelAdapter((asset) => asset.offline_id);
|
|
1003
|
-
const initialState$
|
|
943
|
+
const initialState$y = assetAdapter.getInitialState({});
|
|
1004
944
|
const assetSlice = createSlice({
|
|
1005
945
|
name: "assets",
|
|
1006
|
-
initialState: initialState$
|
|
1007
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
946
|
+
initialState: initialState$y,
|
|
947
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$y)),
|
|
1008
948
|
reducers: {
|
|
1009
949
|
initializeAssets: (state, action) => {
|
|
1010
950
|
assetAdapter.initialize(state, action);
|
|
@@ -1107,11 +1047,11 @@ const selectAssetTypesFromIds = (assetTypeIds) => (state) => {
|
|
|
1107
1047
|
};
|
|
1108
1048
|
const assetReducer = assetSlice.reducer;
|
|
1109
1049
|
const assetAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
1110
|
-
const initialState$
|
|
1050
|
+
const initialState$x = assetAttachmentAdapter.getInitialState({});
|
|
1111
1051
|
const assetAttachmentSlice = createSlice({
|
|
1112
1052
|
name: "assetAttachments",
|
|
1113
|
-
initialState: initialState$
|
|
1114
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1053
|
+
initialState: initialState$x,
|
|
1054
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$x)),
|
|
1115
1055
|
reducers: {
|
|
1116
1056
|
initializeAssetAttachments: assetAttachmentAdapter.initialize,
|
|
1117
1057
|
addAssetAttachment: assetAttachmentAdapter.addOne,
|
|
@@ -1169,13 +1109,13 @@ const selectAttachmentsOfAssetByType = restructureCreateSelectorWithArgs(
|
|
|
1169
1109
|
)
|
|
1170
1110
|
);
|
|
1171
1111
|
const assetAttachmentReducer = assetAttachmentSlice.reducer;
|
|
1172
|
-
const initialState$
|
|
1112
|
+
const initialState$w = {
|
|
1173
1113
|
completionsByAssetId: {}
|
|
1174
1114
|
};
|
|
1175
1115
|
const assetStageCompletionSlice = createSlice({
|
|
1176
1116
|
name: "assetStageCompletions",
|
|
1177
|
-
initialState: initialState$
|
|
1178
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1117
|
+
initialState: initialState$w,
|
|
1118
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$w)),
|
|
1179
1119
|
reducers: {
|
|
1180
1120
|
addStageCompletion: (state, action) => {
|
|
1181
1121
|
let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
|
|
@@ -1227,11 +1167,11 @@ const selectCompletedStageIdsForAsset = restructureCreateSelectorWithArgs(
|
|
|
1227
1167
|
);
|
|
1228
1168
|
const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
|
|
1229
1169
|
const assetStageAdapter = createModelAdapter((assetStage) => assetStage.offline_id);
|
|
1230
|
-
const initialState$
|
|
1170
|
+
const initialState$v = assetStageAdapter.getInitialState({});
|
|
1231
1171
|
const assetStageSlice = createSlice({
|
|
1232
1172
|
name: "assetStages",
|
|
1233
|
-
initialState: initialState$
|
|
1234
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1173
|
+
initialState: initialState$v,
|
|
1174
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$v)),
|
|
1235
1175
|
reducers: {
|
|
1236
1176
|
initializeStages: assetStageAdapter.initialize,
|
|
1237
1177
|
setStage: assetStageAdapter.setOne,
|
|
@@ -1300,8 +1240,8 @@ const selectStageFormIdsFromStageIds = restructureCreateSelectorWithArgs(
|
|
|
1300
1240
|
if (!stage) {
|
|
1301
1241
|
throw new Error("No stage exists with the id " + stageId);
|
|
1302
1242
|
}
|
|
1303
|
-
if (stage.
|
|
1304
|
-
ret[stageId] = stage.
|
|
1243
|
+
if (stage.form) {
|
|
1244
|
+
ret[stageId] = stage.form;
|
|
1305
1245
|
}
|
|
1306
1246
|
}
|
|
1307
1247
|
return ret;
|
|
@@ -1312,11 +1252,11 @@ const assetStageReducer = assetStageSlice.reducer;
|
|
|
1312
1252
|
const assetTypeAttachmentAdapter = createModelAdapter(
|
|
1313
1253
|
(attachment) => attachment.offline_id
|
|
1314
1254
|
);
|
|
1315
|
-
const initialState$
|
|
1255
|
+
const initialState$u = assetTypeAttachmentAdapter.getInitialState({});
|
|
1316
1256
|
const assetTypeAttachmentSlice = createSlice({
|
|
1317
1257
|
name: "assetTypeAttachments",
|
|
1318
|
-
initialState: initialState$
|
|
1319
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1258
|
+
initialState: initialState$u,
|
|
1259
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$u)),
|
|
1320
1260
|
reducers: {
|
|
1321
1261
|
initializeAssetTypeAttachments: assetTypeAttachmentAdapter.initialize,
|
|
1322
1262
|
addAssetTypeAttachment: assetTypeAttachmentAdapter.addOne,
|
|
@@ -1375,31 +1315,19 @@ const selectAttachmentsOfAssetTypeByType = restructureCreateSelectorWithArgs(
|
|
|
1375
1315
|
);
|
|
1376
1316
|
const assetTypeAttachmentReducer = assetTypeAttachmentSlice.reducer;
|
|
1377
1317
|
const workspaceAdapter = createModelAdapter((workspace) => workspace.offline_id);
|
|
1378
|
-
const initialState$
|
|
1379
|
-
activeWorkspaceId: null
|
|
1380
|
-
});
|
|
1318
|
+
const initialState$t = workspaceAdapter.getInitialState({});
|
|
1381
1319
|
const workspaceSlice = createSlice({
|
|
1382
1320
|
name: "workspace",
|
|
1383
|
-
initialState: initialState$
|
|
1321
|
+
initialState: initialState$t,
|
|
1384
1322
|
reducers: {
|
|
1385
1323
|
initializeWorkspaces: workspaceAdapter.initialize,
|
|
1386
1324
|
setWorkspaces: workspaceAdapter.setMany,
|
|
1387
1325
|
addWorkspace: workspaceAdapter.addOne,
|
|
1388
1326
|
updateWorkspace: workspaceAdapter.updateOne,
|
|
1389
|
-
deleteWorkspace: workspaceAdapter.deleteOne
|
|
1390
|
-
setActiveWorkspaceId: (state, action) => {
|
|
1391
|
-
state.activeWorkspaceId = action.payload;
|
|
1392
|
-
}
|
|
1327
|
+
deleteWorkspace: workspaceAdapter.deleteOne
|
|
1393
1328
|
}
|
|
1394
1329
|
});
|
|
1395
|
-
const {
|
|
1396
|
-
initializeWorkspaces,
|
|
1397
|
-
setWorkspaces,
|
|
1398
|
-
addWorkspace,
|
|
1399
|
-
updateWorkspace,
|
|
1400
|
-
setActiveWorkspaceId,
|
|
1401
|
-
deleteWorkspace
|
|
1402
|
-
} = workspaceSlice.actions;
|
|
1330
|
+
const { initializeWorkspaces, setWorkspaces, addWorkspace, updateWorkspace, deleteWorkspace } = workspaceSlice.actions;
|
|
1403
1331
|
const selectWorkspaceMapping = (state) => state.workspaceReducer.instances;
|
|
1404
1332
|
const selectWorkspaces = createSelector([selectWorkspaceMapping], (mapping) => Object.values(mapping));
|
|
1405
1333
|
const selectMainWorkspace = createSelector(
|
|
@@ -1408,20 +1336,9 @@ const selectMainWorkspace = createSelector(
|
|
|
1408
1336
|
return workspaces.find((workspace) => workspace.name.toLowerCase() === "main");
|
|
1409
1337
|
}
|
|
1410
1338
|
);
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
})
|
|
1415
|
-
);
|
|
1416
|
-
const selectActiveWorkspaceId = (state) => state.workspaceReducer.activeWorkspaceId;
|
|
1417
|
-
const selectActiveWorkspace = createSelector(
|
|
1418
|
-
[selectWorkspaceMapping, selectActiveWorkspaceId],
|
|
1419
|
-
(mapping, activeWorkspaceId) => {
|
|
1420
|
-
if (!activeWorkspaceId)
|
|
1421
|
-
return null;
|
|
1422
|
-
return mapping[activeWorkspaceId];
|
|
1423
|
-
}
|
|
1424
|
-
);
|
|
1339
|
+
const selectWorkspaceById = (workspaceId) => (state) => {
|
|
1340
|
+
return state.workspaceReducer.instances[workspaceId];
|
|
1341
|
+
};
|
|
1425
1342
|
const selectPermittedWorkspaceIds = createSelector(
|
|
1426
1343
|
[selectWorkspaceMapping],
|
|
1427
1344
|
(mapping) => {
|
|
@@ -1433,16 +1350,14 @@ const selectPermittedWorkspaceIds = createSelector(
|
|
|
1433
1350
|
const workspaceReducer = workspaceSlice.reducer;
|
|
1434
1351
|
const maxRecentIssues = 10;
|
|
1435
1352
|
const issueAdapter = createModelAdapter((issue) => issue.offline_id);
|
|
1436
|
-
const initialState$
|
|
1437
|
-
visibleStatuses: [IssueStatus.BACKLOG, IssueStatus.SELECTED],
|
|
1438
|
-
visibleUserIds: null,
|
|
1353
|
+
const initialState$s = issueAdapter.getInitialState({
|
|
1439
1354
|
recentIssueIds: []
|
|
1440
1355
|
});
|
|
1441
1356
|
const issueSlice = createSlice({
|
|
1442
1357
|
name: "issues",
|
|
1443
|
-
initialState: initialState$
|
|
1358
|
+
initialState: initialState$s,
|
|
1444
1359
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
1445
|
-
Object.assign(state, initialState$
|
|
1360
|
+
Object.assign(state, initialState$s);
|
|
1446
1361
|
}),
|
|
1447
1362
|
reducers: {
|
|
1448
1363
|
initializeIssues: issueAdapter.initialize,
|
|
@@ -1451,12 +1366,6 @@ const issueSlice = createSlice({
|
|
|
1451
1366
|
updateIssue: issueAdapter.updateOne,
|
|
1452
1367
|
deleteIssue: issueAdapter.deleteOne,
|
|
1453
1368
|
deleteIssues: issueAdapter.deleteMany,
|
|
1454
|
-
setVisibleStatuses: (state, action) => {
|
|
1455
|
-
state.visibleStatuses = action.payload;
|
|
1456
|
-
},
|
|
1457
|
-
setVisibleUserIds: (state, action) => {
|
|
1458
|
-
state.visibleUserIds = [...new Set(action.payload)];
|
|
1459
|
-
},
|
|
1460
1369
|
cleanRecentIssues: (state) => {
|
|
1461
1370
|
state.recentIssueIds = state.recentIssueIds.filter((recentIssue) => state.instances[recentIssue.offlineId]);
|
|
1462
1371
|
},
|
|
@@ -1489,8 +1398,6 @@ const {
|
|
|
1489
1398
|
updateIssue,
|
|
1490
1399
|
deleteIssue,
|
|
1491
1400
|
deleteIssues,
|
|
1492
|
-
setVisibleStatuses,
|
|
1493
|
-
setVisibleUserIds,
|
|
1494
1401
|
addToRecentIssues,
|
|
1495
1402
|
cleanRecentIssues,
|
|
1496
1403
|
removeRecentIssue,
|
|
@@ -1498,51 +1405,6 @@ const {
|
|
|
1498
1405
|
} = issueSlice.actions;
|
|
1499
1406
|
const selectIssueMapping = (state) => state.issueReducer.instances;
|
|
1500
1407
|
const selectRecentIssueIds = (state) => state.issueReducer.recentIssueIds;
|
|
1501
|
-
const selectVisibleUserIds = (state) => state.issueReducer.visibleUserIds;
|
|
1502
|
-
const selectVisibleStatuses = (state) => state.issueReducer.visibleStatuses;
|
|
1503
|
-
const selectIssues = restructureCreateSelectorWithArgs(
|
|
1504
|
-
createSelector(
|
|
1505
|
-
[
|
|
1506
|
-
selectIssueMapping,
|
|
1507
|
-
selectVisibleUserIds,
|
|
1508
|
-
selectVisibleStatuses,
|
|
1509
|
-
selectCategoryVisibility,
|
|
1510
|
-
selectActiveWorkspaceId,
|
|
1511
|
-
(_state, args) => args
|
|
1512
|
-
],
|
|
1513
|
-
(mapping, visibleUserIds, visibleStatuses, categoryVisibility, activeWorkspaceId, args) => {
|
|
1514
|
-
let ret = Object.values(mapping);
|
|
1515
|
-
const visibleUserIdsSet = new Set(visibleUserIds);
|
|
1516
|
-
const visibleStatusesSet = new Set(visibleStatuses);
|
|
1517
|
-
if (args.filterByAssignedTo && (visibleUserIds == null ? void 0 : visibleUserIds.length)) {
|
|
1518
|
-
ret = ret.filter((issue) => {
|
|
1519
|
-
return visibleUserIdsSet.has(issue.assigned_to || null);
|
|
1520
|
-
});
|
|
1521
|
-
}
|
|
1522
|
-
if (args.filterByStatus) {
|
|
1523
|
-
ret = ret.filter((issue) => {
|
|
1524
|
-
return visibleStatusesSet.has(issue.status);
|
|
1525
|
-
});
|
|
1526
|
-
}
|
|
1527
|
-
if (args.filterByCategory) {
|
|
1528
|
-
const isNullCategoryHidden = categoryVisibility.isNullCategoryHidden;
|
|
1529
|
-
const hiddenCategoryIds = categoryVisibility.hiddenCategoryIds;
|
|
1530
|
-
ret = ret.filter((issue) => {
|
|
1531
|
-
if (!issue.category) {
|
|
1532
|
-
return !isNullCategoryHidden;
|
|
1533
|
-
}
|
|
1534
|
-
return !hiddenCategoryIds.includes(issue.category);
|
|
1535
|
-
});
|
|
1536
|
-
if (args.filterByWorkspace) {
|
|
1537
|
-
ret = ret.filter((issue) => {
|
|
1538
|
-
return activeWorkspaceId && issue.visible_in_workspaces.includes(activeWorkspaceId);
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
return ret;
|
|
1543
|
-
}
|
|
1544
|
-
)
|
|
1545
|
-
);
|
|
1546
1408
|
const selectIssue = restructureCreateSelectorWithArgs(
|
|
1547
1409
|
createSelector([selectIssueMapping, (_state, id) => id], (mapping, id) => {
|
|
1548
1410
|
return mapping[id];
|
|
@@ -1639,12 +1501,12 @@ const selectRecentIssuesAsSearchResults = createSelector(
|
|
|
1639
1501
|
);
|
|
1640
1502
|
const issueReducer = issueSlice.reducer;
|
|
1641
1503
|
const issueTypeAdapter = createModelAdapter((issueType) => issueType.offline_id);
|
|
1642
|
-
const initialState$
|
|
1504
|
+
const initialState$r = issueTypeAdapter.getInitialState({});
|
|
1643
1505
|
const issueTypeSlice = createSlice({
|
|
1644
1506
|
name: "issueTypes",
|
|
1645
|
-
initialState: initialState$
|
|
1507
|
+
initialState: initialState$r,
|
|
1646
1508
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
1647
|
-
Object.assign(state, initialState$
|
|
1509
|
+
Object.assign(state, initialState$r);
|
|
1648
1510
|
}),
|
|
1649
1511
|
reducers: {
|
|
1650
1512
|
initializeIssueTypes: issueTypeAdapter.initialize,
|
|
@@ -1693,15 +1555,15 @@ const selectIssuesOfIssueTypeCount = (issueTypeId) => (state) => {
|
|
|
1693
1555
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
1694
1556
|
};
|
|
1695
1557
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
1696
|
-
const initialState$
|
|
1558
|
+
const initialState$q = {
|
|
1697
1559
|
s3Urls: {}
|
|
1698
1560
|
};
|
|
1699
1561
|
const msPerHour = 1e3 * 60 * 60;
|
|
1700
1562
|
const msPerWeek = msPerHour * 24 * 7;
|
|
1701
1563
|
const fileSlice = createSlice({
|
|
1702
1564
|
name: "file",
|
|
1703
|
-
initialState: initialState$
|
|
1704
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1565
|
+
initialState: initialState$q,
|
|
1566
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1705
1567
|
reducers: {
|
|
1706
1568
|
setUploadUrl: (state, action) => {
|
|
1707
1569
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -1782,7 +1644,7 @@ var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
|
1782
1644
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
1783
1645
|
return LicenseStatus2;
|
|
1784
1646
|
})(LicenseStatus || {});
|
|
1785
|
-
const initialState$
|
|
1647
|
+
const initialState$p = {
|
|
1786
1648
|
users: {},
|
|
1787
1649
|
currentUser: {
|
|
1788
1650
|
id: 0,
|
|
@@ -1793,8 +1655,8 @@ const initialState$o = {
|
|
|
1793
1655
|
};
|
|
1794
1656
|
const userSlice = createSlice({
|
|
1795
1657
|
name: "users",
|
|
1796
|
-
initialState: initialState$
|
|
1797
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1658
|
+
initialState: initialState$p,
|
|
1659
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1798
1660
|
reducers: {
|
|
1799
1661
|
setUsers: (state, action) => {
|
|
1800
1662
|
const usersMapping = {};
|
|
@@ -1859,11 +1721,11 @@ const userReducer = userSlice.reducer;
|
|
|
1859
1721
|
const organizationAccessAdapter = createModelAdapter(
|
|
1860
1722
|
(organizationAccess) => organizationAccess.offline_id
|
|
1861
1723
|
);
|
|
1862
|
-
const initialState$
|
|
1724
|
+
const initialState$o = organizationAccessAdapter.getInitialState({});
|
|
1863
1725
|
const organizationAccessSlice = createSlice({
|
|
1864
1726
|
name: "organizationAccess",
|
|
1865
|
-
initialState: initialState$
|
|
1866
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1727
|
+
initialState: initialState$o,
|
|
1728
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1867
1729
|
reducers: {
|
|
1868
1730
|
initializeOrganizationAccesses: organizationAccessAdapter.initialize,
|
|
1869
1731
|
updateOrganizationAccess: organizationAccessAdapter.updateOne,
|
|
@@ -1900,11 +1762,11 @@ const selectOrganizationAccessUserMapping = (state) => {
|
|
|
1900
1762
|
};
|
|
1901
1763
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
1902
1764
|
const licenseAdapter = createModelAdapter((license) => license.offline_id);
|
|
1903
|
-
const initialState$
|
|
1765
|
+
const initialState$n = licenseAdapter.getInitialState({});
|
|
1904
1766
|
const licenseSlice = createSlice({
|
|
1905
1767
|
name: "license",
|
|
1906
|
-
initialState: initialState$
|
|
1907
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1768
|
+
initialState: initialState$n,
|
|
1769
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1908
1770
|
reducers: {
|
|
1909
1771
|
setLicenses: licenseAdapter.initialize,
|
|
1910
1772
|
addLicenses: licenseAdapter.addMany,
|
|
@@ -1930,11 +1792,11 @@ const selectLicensesForProjectsMapping = createSelector(
|
|
|
1930
1792
|
);
|
|
1931
1793
|
const licenseReducer = licenseSlice.reducer;
|
|
1932
1794
|
const projectAccessAdapter = createModelAdapter((projectAccess) => projectAccess.offline_id);
|
|
1933
|
-
const initialState$
|
|
1795
|
+
const initialState$m = projectAccessAdapter.getInitialState({});
|
|
1934
1796
|
const projectAccessSlice = createSlice({
|
|
1935
1797
|
name: "projectAccess",
|
|
1936
|
-
initialState: initialState$
|
|
1937
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1798
|
+
initialState: initialState$m,
|
|
1799
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
|
|
1938
1800
|
reducers: {
|
|
1939
1801
|
setProjectAccesses: projectAccessAdapter.initialize,
|
|
1940
1802
|
updateProjectAccess: projectAccessAdapter.updateOne,
|
|
@@ -1980,15 +1842,14 @@ const selectProjectAccessUserMapping = (state) => {
|
|
|
1980
1842
|
return projectAccesses;
|
|
1981
1843
|
};
|
|
1982
1844
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
1983
|
-
const initialState$
|
|
1845
|
+
const initialState$l = {
|
|
1984
1846
|
projects: {},
|
|
1985
|
-
activeProjectId: null
|
|
1986
|
-
recentProjectIds: [],
|
|
1987
|
-
recentSearchableQueries: []
|
|
1847
|
+
activeProjectId: null
|
|
1988
1848
|
};
|
|
1989
1849
|
const projectSlice = createSlice({
|
|
1990
1850
|
name: "projects",
|
|
1991
|
-
initialState: initialState$
|
|
1851
|
+
initialState: initialState$l,
|
|
1852
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$l)),
|
|
1992
1853
|
reducers: {
|
|
1993
1854
|
setProjects: (state, action) => {
|
|
1994
1855
|
const projectsMap = {};
|
|
@@ -2068,21 +1929,6 @@ const selectProject = restructureCreateSelectorWithArgs(
|
|
|
2068
1929
|
(projects, projectId) => projects[projectId]
|
|
2069
1930
|
)
|
|
2070
1931
|
);
|
|
2071
|
-
const selectSortedProjects = createSelector(
|
|
2072
|
-
[selectActiveProject, selectProjects],
|
|
2073
|
-
(activeProject, projects) => {
|
|
2074
|
-
return Object.values(projects).sort((projectA, projectB) => {
|
|
2075
|
-
if (activeProject) {
|
|
2076
|
-
if (activeProject.id === projectA.id) {
|
|
2077
|
-
return -1;
|
|
2078
|
-
} else if (activeProject.id === projectB.id) {
|
|
2079
|
-
return 1;
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
return projectA.name.toLowerCase().localeCompare(projectB.name.toLowerCase(), void 0, { numeric: true });
|
|
2083
|
-
});
|
|
2084
|
-
}
|
|
2085
|
-
);
|
|
2086
1932
|
const projectReducer = projectSlice.reducer;
|
|
2087
1933
|
const selectProjectUsersIds = createSelector(
|
|
2088
1934
|
[selectProjectAccessMapping],
|
|
@@ -2117,38 +1963,22 @@ const selectSortedProjectUsers = createSelector(
|
|
|
2117
1963
|
});
|
|
2118
1964
|
}
|
|
2119
1965
|
);
|
|
2120
|
-
const initialState$
|
|
2121
|
-
organizations: {}
|
|
2122
|
-
activeOrganizationId: null
|
|
1966
|
+
const initialState$k = {
|
|
1967
|
+
organizations: {}
|
|
2123
1968
|
};
|
|
2124
1969
|
const organizationSlice = createSlice({
|
|
2125
1970
|
name: "organizations",
|
|
2126
|
-
initialState: initialState$
|
|
2127
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1971
|
+
initialState: initialState$k,
|
|
1972
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$k)),
|
|
2128
1973
|
reducers: {
|
|
2129
1974
|
setOrganizations: (state, action) => {
|
|
2130
1975
|
for (const org of action.payload) {
|
|
2131
1976
|
state.organizations[org.id] = org;
|
|
2132
1977
|
}
|
|
2133
|
-
},
|
|
2134
|
-
updateActiveOrganization: (state, action) => {
|
|
2135
|
-
if (!state.activeOrganizationId) {
|
|
2136
|
-
throw new Error("Cannot update name of active organization. Active organization ID does not exist");
|
|
2137
|
-
}
|
|
2138
|
-
if (state.activeOrganizationId !== action.payload.id) {
|
|
2139
|
-
throw new Error("Tried updating active organization with different organization");
|
|
2140
|
-
}
|
|
2141
|
-
state.organizations[state.activeOrganizationId] = action.payload;
|
|
2142
|
-
},
|
|
2143
|
-
setActiveOrganizationId: (state, action) => {
|
|
2144
|
-
state.activeOrganizationId = action.payload;
|
|
2145
1978
|
}
|
|
2146
1979
|
}
|
|
2147
1980
|
});
|
|
2148
|
-
const { setOrganizations
|
|
2149
|
-
const selectActiveOrganizationId = (state) => {
|
|
2150
|
-
return state.organizationReducer.activeOrganizationId;
|
|
2151
|
-
};
|
|
1981
|
+
const { setOrganizations } = organizationSlice.actions;
|
|
2152
1982
|
const selectOrganizations = (state) => {
|
|
2153
1983
|
return Object.values(state.organizationReducer.organizations);
|
|
2154
1984
|
};
|
|
@@ -2159,43 +1989,21 @@ const selectOrganizationsWithAccess = createSelector(
|
|
|
2159
1989
|
[selectOrganizations],
|
|
2160
1990
|
(organizations) => Object.values(organizations).filter((organization) => organization.has_access)
|
|
2161
1991
|
);
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2164
|
-
if (!id) {
|
|
2165
|
-
return null;
|
|
2166
|
-
}
|
|
2167
|
-
const organization = state.organizationReducer.organizations[id];
|
|
2168
|
-
if (!organization) {
|
|
2169
|
-
return null;
|
|
2170
|
-
}
|
|
2171
|
-
return organization;
|
|
1992
|
+
const selectOrganizationById = (organizationId) => (state) => {
|
|
1993
|
+
return state.organizationReducer.organizations[organizationId];
|
|
2172
1994
|
};
|
|
2173
1995
|
const selectOrganizationUsersIds = createSelector(
|
|
2174
1996
|
[selectOrganizationAccesses],
|
|
2175
1997
|
(organizationAccesses) => Object.values(organizationAccesses).map((organizationAccess) => organizationAccess.user)
|
|
2176
1998
|
);
|
|
2177
|
-
const
|
|
2178
|
-
[selectProjects,
|
|
2179
|
-
|
|
2180
|
-
)
|
|
2181
|
-
const selectActiveOrganizationLicenses = createSelector(
|
|
2182
|
-
[selectActiveOrganizationId, selectLicenses],
|
|
2183
|
-
(activeOrganizationId, licenses) => !activeOrganizationId ? [] : Object.values(licenses).filter((license) => license.organization_owner === activeOrganizationId)
|
|
1999
|
+
const selectProjectsOfOrganization = restructureCreateSelectorWithArgs(
|
|
2000
|
+
createSelector([selectProjects, (_, organizationId) => organizationId], (projects, organizationId) => {
|
|
2001
|
+
return Object.values(projects).filter((project) => project.owner_organization === organizationId);
|
|
2002
|
+
})
|
|
2184
2003
|
);
|
|
2185
|
-
const
|
|
2186
|
-
[
|
|
2187
|
-
|
|
2188
|
-
if (!licenseA.project) {
|
|
2189
|
-
return 1;
|
|
2190
|
-
}
|
|
2191
|
-
if (!licenseB.project) {
|
|
2192
|
-
return -1;
|
|
2193
|
-
}
|
|
2194
|
-
return projects[licenseA.project].name.toLowerCase().localeCompare(
|
|
2195
|
-
projects[licenseB.project].name.toLowerCase(),
|
|
2196
|
-
void 0,
|
|
2197
|
-
{ numeric: true }
|
|
2198
|
-
);
|
|
2004
|
+
const selectLicensesOfOrganization = restructureCreateSelectorWithArgs(
|
|
2005
|
+
createSelector([selectLicenses, (_, organizationId) => organizationId], (licenses, organizationId) => {
|
|
2006
|
+
return Object.values(licenses).filter((license) => license.organization_owner === organizationId);
|
|
2199
2007
|
})
|
|
2200
2008
|
);
|
|
2201
2009
|
const selectOrganizationUsersAsMapping = createSelector(
|
|
@@ -2244,14 +2052,14 @@ const createOfflineAction = (request2, baseUrl, serviceName) => {
|
|
|
2244
2052
|
}
|
|
2245
2053
|
};
|
|
2246
2054
|
};
|
|
2247
|
-
const initialState$
|
|
2055
|
+
const initialState$j = {
|
|
2248
2056
|
deletedRequests: [],
|
|
2249
2057
|
latestRetryTime: 0
|
|
2250
2058
|
};
|
|
2251
2059
|
const outboxSlice = createSlice({
|
|
2252
2060
|
name: "outbox",
|
|
2253
|
-
initialState: initialState$
|
|
2254
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2061
|
+
initialState: initialState$j,
|
|
2062
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
|
|
2255
2063
|
reducers: {
|
|
2256
2064
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
2257
2065
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -2283,16 +2091,15 @@ const selectDeletedRequests = (state) => state.outboxReducer.deletedRequests;
|
|
|
2283
2091
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
2284
2092
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
2285
2093
|
const outboxReducer = outboxSlice.reducer;
|
|
2286
|
-
const initialState$
|
|
2094
|
+
const initialState$i = {
|
|
2287
2095
|
projectFiles: {},
|
|
2288
2096
|
activeProjectFileId: null,
|
|
2289
|
-
isImportingProjectFile: false
|
|
2290
|
-
enabledProjectFiles: {}
|
|
2097
|
+
isImportingProjectFile: false
|
|
2291
2098
|
};
|
|
2292
2099
|
const projectFileSlice = createSlice({
|
|
2293
2100
|
name: "projectFiles",
|
|
2294
|
-
initialState: initialState$
|
|
2295
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2101
|
+
initialState: initialState$i,
|
|
2102
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2296
2103
|
reducers: {
|
|
2297
2104
|
addOrReplaceProjectFiles: (state, action) => {
|
|
2298
2105
|
for (let fileObj of action.payload) {
|
|
@@ -2317,9 +2124,6 @@ const projectFileSlice = createSlice({
|
|
|
2317
2124
|
}
|
|
2318
2125
|
state.projectFiles[action.payload.offline_id] = action.payload;
|
|
2319
2126
|
},
|
|
2320
|
-
setProjectFileVisible: (state, action) => {
|
|
2321
|
-
state.enabledProjectFiles[action.payload.fileId] = action.payload.visible;
|
|
2322
|
-
},
|
|
2323
2127
|
setIsImportingProjectFile: (state, action) => {
|
|
2324
2128
|
state.isImportingProjectFile = action.payload;
|
|
2325
2129
|
},
|
|
@@ -2339,19 +2143,14 @@ const projectFileSlice = createSlice({
|
|
|
2339
2143
|
// TODO: Move to MapContext. Should not be persisted.
|
|
2340
2144
|
setActiveProjectFileId: (state, action) => {
|
|
2341
2145
|
state.activeProjectFileId = action.payload;
|
|
2342
|
-
if (action.payload) {
|
|
2343
|
-
state.enabledProjectFiles[action.payload] = true;
|
|
2344
|
-
}
|
|
2345
2146
|
},
|
|
2346
2147
|
removeProjectFile: (state, action) => {
|
|
2347
2148
|
delete state.projectFiles[action.payload];
|
|
2348
|
-
delete state.enabledProjectFiles[action.payload];
|
|
2349
2149
|
},
|
|
2350
2150
|
removeProjectFilesOfProject: (state, action) => {
|
|
2351
2151
|
const filesToDelete = Object.values(state.projectFiles).filter((file) => file.project === action.payload);
|
|
2352
2152
|
for (const file of filesToDelete) {
|
|
2353
2153
|
delete state.projectFiles[file.offline_id];
|
|
2354
|
-
delete state.enabledProjectFiles[file.offline_id];
|
|
2355
2154
|
}
|
|
2356
2155
|
},
|
|
2357
2156
|
resetProjectFileObjectUrls: (state, ..._args) => {
|
|
@@ -2364,7 +2163,6 @@ const projectFileSlice = createSlice({
|
|
|
2364
2163
|
const {
|
|
2365
2164
|
addOrReplaceProjectFiles,
|
|
2366
2165
|
addOrReplaceProjectFile,
|
|
2367
|
-
setProjectFileVisible,
|
|
2368
2166
|
setIsImportingProjectFile,
|
|
2369
2167
|
setActiveProjectFileId,
|
|
2370
2168
|
saveActiveProjectFileBounds,
|
|
@@ -2372,33 +2170,25 @@ const {
|
|
|
2372
2170
|
removeProjectFilesOfProject,
|
|
2373
2171
|
resetProjectFileObjectUrls
|
|
2374
2172
|
} = projectFileSlice.actions;
|
|
2375
|
-
const
|
|
2376
|
-
const selectProjectFileVisibility = createSelector(
|
|
2377
|
-
[selectEnabledProjectFiles],
|
|
2378
|
-
(enabledProjectFiles) => {
|
|
2379
|
-
const ret = {};
|
|
2380
|
-
for (const [fileId, enabled] of Object.entries(enabledProjectFiles)) {
|
|
2381
|
-
ret[fileId] = enabled === true || enabled === void 0;
|
|
2382
|
-
}
|
|
2383
|
-
return ret;
|
|
2384
|
-
}
|
|
2385
|
-
);
|
|
2386
|
-
const selectEnabledProjectFileMapping = (state) => state.projectFileReducer.projectFiles;
|
|
2173
|
+
const selectProjectFileMapping = (state) => state.projectFileReducer.projectFiles;
|
|
2387
2174
|
const selectProjectFiles = createSelector(
|
|
2388
|
-
[
|
|
2175
|
+
[selectProjectFileMapping, selectActiveProjectId],
|
|
2389
2176
|
(mapping, activeProjectId) => {
|
|
2390
2177
|
return Object.values(mapping).filter((file) => file.project === activeProjectId).sort((a, b) => a.z_index - b.z_index);
|
|
2391
2178
|
}
|
|
2392
2179
|
);
|
|
2393
2180
|
const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
|
|
2394
2181
|
const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
|
|
2182
|
+
const selectProjectFileById = (id) => (state) => {
|
|
2183
|
+
return state.projectFileReducer.projectFiles[id];
|
|
2184
|
+
};
|
|
2395
2185
|
const projectFileReducer = projectFileSlice.reducer;
|
|
2396
2186
|
const projectAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
2397
|
-
const initialState$
|
|
2187
|
+
const initialState$h = projectAttachmentAdapter.getInitialState({});
|
|
2398
2188
|
const projectAttachmentSlice = createSlice({
|
|
2399
2189
|
name: "projectAttachments",
|
|
2400
|
-
initialState: initialState$
|
|
2401
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2190
|
+
initialState: initialState$h,
|
|
2191
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
|
|
2402
2192
|
reducers: {
|
|
2403
2193
|
initializeProjectAttachments: projectAttachmentAdapter.initialize,
|
|
2404
2194
|
addProjectAttachment: projectAttachmentAdapter.addOne,
|
|
@@ -2456,12 +2246,12 @@ const selectAttachmentsOfProjectByType = restructureCreateSelectorWithArgs(
|
|
|
2456
2246
|
)
|
|
2457
2247
|
);
|
|
2458
2248
|
const projectAttachmentReducer = projectAttachmentSlice.reducer;
|
|
2459
|
-
const initialState$
|
|
2249
|
+
const initialState$g = {
|
|
2460
2250
|
isRehydrated: false
|
|
2461
2251
|
};
|
|
2462
2252
|
const rehydratedSlice = createSlice({
|
|
2463
2253
|
name: "rehydrated",
|
|
2464
|
-
initialState: initialState$
|
|
2254
|
+
initialState: initialState$g,
|
|
2465
2255
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2466
2256
|
reducers: {
|
|
2467
2257
|
setRehydrated: (state, action) => {
|
|
@@ -2472,13 +2262,13 @@ const rehydratedSlice = createSlice({
|
|
|
2472
2262
|
const { setRehydrated } = rehydratedSlice.actions;
|
|
2473
2263
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
2474
2264
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
2475
|
-
const initialState$
|
|
2265
|
+
const initialState$f = {
|
|
2476
2266
|
isFetchingInitialData: false
|
|
2477
2267
|
};
|
|
2478
2268
|
const settingSlice = createSlice({
|
|
2479
2269
|
name: "settings",
|
|
2480
|
-
initialState: initialState$
|
|
2481
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2270
|
+
initialState: initialState$f,
|
|
2271
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2482
2272
|
reducers: {
|
|
2483
2273
|
setIsFetchingInitialData: (state, action) => {
|
|
2484
2274
|
state.isFetchingInitialData = action.payload;
|
|
@@ -2502,11 +2292,11 @@ const formRevisionSortFn = (formRevisionA, formRevisionB) => {
|
|
|
2502
2292
|
}
|
|
2503
2293
|
};
|
|
2504
2294
|
const formRevisionAdapter = createModelAdapter((revision) => revision.offline_id);
|
|
2505
|
-
const initialState$
|
|
2295
|
+
const initialState$e = formRevisionAdapter.getInitialState({});
|
|
2506
2296
|
const formRevisionsSlice = createSlice({
|
|
2507
2297
|
name: "formRevisions",
|
|
2508
|
-
initialState: initialState$
|
|
2509
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2298
|
+
initialState: initialState$e,
|
|
2299
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2510
2300
|
reducers: {
|
|
2511
2301
|
initializeFormRevisions: formRevisionAdapter.initialize,
|
|
2512
2302
|
setFormRevision: formRevisionAdapter.setOne,
|
|
@@ -2567,11 +2357,11 @@ const selectLatestFormRevisionsOfAssetTypes = restructureCreateSelectorWithArgs(
|
|
|
2567
2357
|
selectFormRevisionMapping,
|
|
2568
2358
|
(_state, assetTypeIds) => assetTypeIds
|
|
2569
2359
|
],
|
|
2570
|
-
(
|
|
2360
|
+
(formsMapping, revisions, assetTypeIds) => {
|
|
2571
2361
|
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
2572
2362
|
const formsOfAssetTypes = {};
|
|
2573
2363
|
const ret = {};
|
|
2574
|
-
for (const form of Object.values(
|
|
2364
|
+
for (const form of Object.values(formsMapping)) {
|
|
2575
2365
|
if (form.asset_type && assetTypeIdsSet.has(form.asset_type)) {
|
|
2576
2366
|
formsOfAssetTypes[form.offline_id] = form;
|
|
2577
2367
|
}
|
|
@@ -2599,11 +2389,11 @@ const selectLatestFormRevisionByForm = createSelector([selectFormRevisionMapping
|
|
|
2599
2389
|
});
|
|
2600
2390
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
2601
2391
|
const formAdapter = createModelAdapter((form) => form.offline_id);
|
|
2602
|
-
const initialState$
|
|
2392
|
+
const initialState$d = formAdapter.getInitialState({});
|
|
2603
2393
|
const formSlice = createSlice({
|
|
2604
2394
|
name: "forms",
|
|
2605
|
-
initialState: initialState$
|
|
2606
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2395
|
+
initialState: initialState$d,
|
|
2396
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
|
|
2607
2397
|
reducers: {
|
|
2608
2398
|
setForms: formAdapter.initialize,
|
|
2609
2399
|
setForm: formAdapter.setOne,
|
|
@@ -2624,22 +2414,22 @@ const selectFilteredForms = restructureCreateSelectorWithArgs(
|
|
|
2624
2414
|
(state) => state.formRevisionReducer.instances,
|
|
2625
2415
|
(_state, search) => search
|
|
2626
2416
|
],
|
|
2627
|
-
(
|
|
2417
|
+
(formsMapping, revisions, search) => {
|
|
2628
2418
|
const { searchTerm, maxResults, favorites, organization } = search;
|
|
2629
2419
|
const favoriteMatches = [];
|
|
2630
2420
|
const regularMatches = [];
|
|
2631
|
-
for (const [
|
|
2632
|
-
if (favorites !== void 0 &&
|
|
2421
|
+
for (const [formId, form] of Object.entries(formsMapping)) {
|
|
2422
|
+
if (favorites !== void 0 && form.favorite != favorites)
|
|
2633
2423
|
continue;
|
|
2634
|
-
if (Number.isInteger(organization) && organization !==
|
|
2424
|
+
if (Number.isInteger(organization) && organization !== form.organization) {
|
|
2635
2425
|
continue;
|
|
2636
2426
|
}
|
|
2637
|
-
const latestRevision = _selectLatestFormRevision(revisions,
|
|
2427
|
+
const latestRevision = _selectLatestFormRevision(revisions, formId);
|
|
2638
2428
|
if (latestRevision.title.toLowerCase().includes(searchTerm.toLowerCase())) {
|
|
2639
|
-
if (
|
|
2640
|
-
favoriteMatches.push({ ...
|
|
2429
|
+
if (form.favorite) {
|
|
2430
|
+
favoriteMatches.push({ ...form, latestRevision });
|
|
2641
2431
|
} else {
|
|
2642
|
-
regularMatches.push({ ...
|
|
2432
|
+
regularMatches.push({ ...form, latestRevision });
|
|
2643
2433
|
}
|
|
2644
2434
|
}
|
|
2645
2435
|
if (favoriteMatches.length >= maxResults) {
|
|
@@ -2653,43 +2443,41 @@ const selectFilteredForms = restructureCreateSelectorWithArgs(
|
|
|
2653
2443
|
{ memoizeOptions: { equalityCheck: shallowEqual } }
|
|
2654
2444
|
)
|
|
2655
2445
|
);
|
|
2656
|
-
const selectForm =
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
})
|
|
2660
|
-
);
|
|
2446
|
+
const selectForm = (formId) => (state) => {
|
|
2447
|
+
return state.formReducer.instances[formId];
|
|
2448
|
+
};
|
|
2661
2449
|
const selectFormMapping = (state) => {
|
|
2662
2450
|
return state.formReducer.instances;
|
|
2663
2451
|
};
|
|
2664
2452
|
const selectFormOfAssetType = restructureCreateSelectorWithArgs(
|
|
2665
2453
|
createSelector(
|
|
2666
2454
|
[selectFormMapping, (_state, assetTypeId) => assetTypeId],
|
|
2667
|
-
(
|
|
2668
|
-
return Object.values(
|
|
2455
|
+
(formsMapping, assetTypeId) => {
|
|
2456
|
+
return Object.values(formsMapping).find((form) => form.asset_type === assetTypeId);
|
|
2669
2457
|
}
|
|
2670
2458
|
)
|
|
2671
2459
|
);
|
|
2672
2460
|
const selectFormOfIssueType = restructureCreateSelectorWithArgs(
|
|
2673
2461
|
createSelector(
|
|
2674
2462
|
[selectFormMapping, (_state, issueTypeId) => issueTypeId],
|
|
2675
|
-
(
|
|
2676
|
-
return Object.values(
|
|
2463
|
+
(formsMapping, issueTypeId) => {
|
|
2464
|
+
return Object.values(formsMapping).find((form) => form.issue_type === issueTypeId);
|
|
2677
2465
|
}
|
|
2678
2466
|
)
|
|
2679
2467
|
);
|
|
2680
|
-
const selectFormsCount = createSelector([selectFormMapping], (
|
|
2681
|
-
return Object.keys(
|
|
2468
|
+
const selectFormsCount = createSelector([selectFormMapping], (formsMapping) => {
|
|
2469
|
+
return Object.keys(formsMapping).length;
|
|
2682
2470
|
});
|
|
2683
|
-
const selectGeneralFormCount = createSelector([selectFormMapping], (
|
|
2684
|
-
return Object.values(
|
|
2471
|
+
const selectGeneralFormCount = createSelector([selectFormMapping], (formsMapping) => {
|
|
2472
|
+
return Object.values(formsMapping).filter((form) => !form.asset_type).length;
|
|
2685
2473
|
});
|
|
2686
2474
|
const formReducer = formSlice.reducer;
|
|
2687
2475
|
const submissionAdapter = createModelAdapter((submission) => submission.offline_id);
|
|
2688
|
-
const initialState$
|
|
2476
|
+
const initialState$c = submissionAdapter.getInitialState({});
|
|
2689
2477
|
const formSubmissionSlice = createSlice({
|
|
2690
2478
|
name: "formSubmissions",
|
|
2691
|
-
initialState: initialState$
|
|
2692
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2479
|
+
initialState: initialState$c,
|
|
2480
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
|
|
2693
2481
|
reducers: {
|
|
2694
2482
|
setFormSubmission: submissionAdapter.setOne,
|
|
2695
2483
|
setFormSubmissions: submissionAdapter.setMany,
|
|
@@ -2809,29 +2597,32 @@ const selectFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
|
|
|
2809
2597
|
}
|
|
2810
2598
|
)
|
|
2811
2599
|
);
|
|
2812
|
-
const selectFormSubmissionsByAssets = createSelector(
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
assetSubmissionMapping
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2600
|
+
const selectFormSubmissionsByAssets = createSelector(
|
|
2601
|
+
[selectFormSubmissionsMapping, selectAssetsMapping],
|
|
2602
|
+
(submissions, assets) => {
|
|
2603
|
+
var _a2;
|
|
2604
|
+
const assetSubmissionMapping = {};
|
|
2605
|
+
for (const assetId in assets) {
|
|
2606
|
+
assetSubmissionMapping[assetId] = [];
|
|
2607
|
+
}
|
|
2608
|
+
for (const submissionId in submissions) {
|
|
2609
|
+
const submission = submissions[submissionId];
|
|
2610
|
+
if (submission.asset) {
|
|
2611
|
+
(_a2 = assetSubmissionMapping[submission.asset]) == null ? void 0 : _a2.push(submission);
|
|
2612
|
+
}
|
|
2822
2613
|
}
|
|
2614
|
+
return assetSubmissionMapping;
|
|
2823
2615
|
}
|
|
2824
|
-
|
|
2825
|
-
});
|
|
2616
|
+
);
|
|
2826
2617
|
const formSubmissionReducer = formSubmissionSlice.reducer;
|
|
2827
2618
|
const formSubmissionAttachmentAdapter = createModelAdapter(
|
|
2828
2619
|
(attachment) => attachment.offline_id
|
|
2829
2620
|
);
|
|
2830
|
-
const initialState$
|
|
2621
|
+
const initialState$b = formSubmissionAttachmentAdapter.getInitialState({});
|
|
2831
2622
|
const formSubmissionAttachmentSlice = createSlice({
|
|
2832
2623
|
name: "formSubmissionAttachments",
|
|
2833
|
-
initialState: initialState$
|
|
2834
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2624
|
+
initialState: initialState$b,
|
|
2625
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
2835
2626
|
reducers: {
|
|
2836
2627
|
initializeFormSubmissionAttachments: formSubmissionAttachmentAdapter.initialize,
|
|
2837
2628
|
addFormSubmissionAttachment: formSubmissionAttachmentAdapter.addOne,
|
|
@@ -2870,11 +2661,11 @@ const formSubmissionAttachmentReducer = formSubmissionAttachmentSlice.reducer;
|
|
|
2870
2661
|
const formRevisionAttachmentAdapter = createModelAdapter(
|
|
2871
2662
|
(attachment) => attachment.offline_id
|
|
2872
2663
|
);
|
|
2873
|
-
const initialState$
|
|
2664
|
+
const initialState$a = formRevisionAttachmentAdapter.getInitialState({});
|
|
2874
2665
|
const formRevisionAttachmentSlice = createSlice({
|
|
2875
2666
|
name: "formRevisionAttachments",
|
|
2876
|
-
initialState: initialState$
|
|
2877
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2667
|
+
initialState: initialState$a,
|
|
2668
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
|
|
2878
2669
|
reducers: {
|
|
2879
2670
|
initializeFormRevisionAttachments: formRevisionAttachmentAdapter.initialize,
|
|
2880
2671
|
addFormRevisionAttachment: formRevisionAttachmentAdapter.addOne,
|
|
@@ -2898,12 +2689,12 @@ const {
|
|
|
2898
2689
|
deleteFormRevisionAttachment,
|
|
2899
2690
|
deleteFormRevisionAttachments
|
|
2900
2691
|
} = formRevisionAttachmentSlice.actions;
|
|
2901
|
-
const
|
|
2692
|
+
const selectFormRevisionAttachmentsMapping = (state) => {
|
|
2902
2693
|
return state.formRevisionAttachmentReducer.instances;
|
|
2903
2694
|
};
|
|
2904
2695
|
const selectAttachmentsOfFormRevision = restructureCreateSelectorWithArgs(
|
|
2905
2696
|
createSelector(
|
|
2906
|
-
[
|
|
2697
|
+
[selectFormRevisionAttachmentsMapping, (_state, revisionId) => revisionId],
|
|
2907
2698
|
(attachments, revisionId) => {
|
|
2908
2699
|
return Object.values(attachments).filter((attachment) => attachment.revision === revisionId);
|
|
2909
2700
|
}
|
|
@@ -2911,10 +2702,10 @@ const selectAttachmentsOfFormRevision = restructureCreateSelectorWithArgs(
|
|
|
2911
2702
|
);
|
|
2912
2703
|
const formRevisionAttachmentReducer = formRevisionAttachmentSlice.reducer;
|
|
2913
2704
|
const emailDomainAdapter = createModelAdapter((emailDomain) => emailDomain.offline_id);
|
|
2914
|
-
const initialState$
|
|
2705
|
+
const initialState$9 = emailDomainAdapter.getInitialState({});
|
|
2915
2706
|
const emailDomainsSlice = createSlice({
|
|
2916
2707
|
name: "emailDomains",
|
|
2917
|
-
initialState: initialState$
|
|
2708
|
+
initialState: initialState$9,
|
|
2918
2709
|
reducers: {
|
|
2919
2710
|
initializeEmailDomains: emailDomainAdapter.initialize,
|
|
2920
2711
|
addEmailDomain: emailDomainAdapter.addOne,
|
|
@@ -2933,14 +2724,14 @@ const selectEmailDomainsOfOrganization = restructureCreateSelectorWithArgs(
|
|
|
2933
2724
|
)
|
|
2934
2725
|
);
|
|
2935
2726
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
2936
|
-
const initialState$
|
|
2727
|
+
const initialState$8 = {
|
|
2937
2728
|
documents: {}
|
|
2938
2729
|
};
|
|
2939
2730
|
const documentSlice = createSlice({
|
|
2940
2731
|
name: "documents",
|
|
2941
|
-
initialState: initialState$
|
|
2732
|
+
initialState: initialState$8,
|
|
2942
2733
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2943
|
-
Object.assign(state, initialState$
|
|
2734
|
+
Object.assign(state, initialState$8);
|
|
2944
2735
|
}),
|
|
2945
2736
|
reducers: {
|
|
2946
2737
|
setDocuments: (state, action) => {
|
|
@@ -3115,11 +2906,11 @@ const selectRootDocuments = createSelector(
|
|
|
3115
2906
|
);
|
|
3116
2907
|
const documentsReducer = documentSlice.reducer;
|
|
3117
2908
|
const documentAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
3118
|
-
const initialState$
|
|
2909
|
+
const initialState$7 = documentAttachmentAdapter.getInitialState({});
|
|
3119
2910
|
const documentAttachmentSlice = createSlice({
|
|
3120
2911
|
name: "documentAttachments",
|
|
3121
|
-
initialState: initialState$
|
|
3122
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2912
|
+
initialState: initialState$7,
|
|
2913
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3123
2914
|
reducers: {
|
|
3124
2915
|
initializeDocumentAttachments: documentAttachmentAdapter.initialize,
|
|
3125
2916
|
addDocumentAttachment: documentAttachmentAdapter.addOne,
|
|
@@ -3178,11 +2969,11 @@ const selectAttachmentsOfDocumentByType = restructureCreateSelectorWithArgs(
|
|
|
3178
2969
|
);
|
|
3179
2970
|
const documentAttachmentReducer = documentAttachmentSlice.reducer;
|
|
3180
2971
|
const teamAdapter = createModelAdapter((team) => team.offline_id);
|
|
3181
|
-
const initialState$
|
|
2972
|
+
const initialState$6 = teamAdapter.getInitialState({});
|
|
3182
2973
|
const teamSlice = createSlice({
|
|
3183
2974
|
name: "teams",
|
|
3184
|
-
initialState: initialState$
|
|
3185
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2975
|
+
initialState: initialState$6,
|
|
2976
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3186
2977
|
reducers: {
|
|
3187
2978
|
setTeam: teamAdapter.setOne,
|
|
3188
2979
|
setTeams: teamAdapter.initialize,
|
|
@@ -3216,11 +3007,11 @@ const teamReducer = teamSlice.reducer;
|
|
|
3216
3007
|
const agentUserConversationAdapter = createModelAdapter(
|
|
3217
3008
|
(conversation) => conversation.offline_id
|
|
3218
3009
|
);
|
|
3219
|
-
const initialState$
|
|
3010
|
+
const initialState$5 = agentUserConversationAdapter.getInitialState({});
|
|
3220
3011
|
const agentsSlice = createSlice({
|
|
3221
3012
|
name: "agents",
|
|
3222
|
-
initialState: initialState$
|
|
3223
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3013
|
+
initialState: initialState$5,
|
|
3014
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3224
3015
|
reducers: {
|
|
3225
3016
|
initializeConversations: agentUserConversationAdapter.initialize,
|
|
3226
3017
|
addConversation: agentUserConversationAdapter.addOne,
|
|
@@ -3242,11 +3033,11 @@ const selectConversation = restructureCreateSelectorWithArgs(
|
|
|
3242
3033
|
);
|
|
3243
3034
|
const agentsReducer = agentsSlice.reducer;
|
|
3244
3035
|
const issueCommentAdapter = createModelAdapter((comment) => comment.offline_id);
|
|
3245
|
-
const initialState$
|
|
3036
|
+
const initialState$4 = issueCommentAdapter.getInitialState({});
|
|
3246
3037
|
const issueCommentSlice = createSlice({
|
|
3247
3038
|
name: "issueComments",
|
|
3248
|
-
initialState: initialState$
|
|
3249
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3039
|
+
initialState: initialState$4,
|
|
3040
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
|
|
3250
3041
|
reducers: {
|
|
3251
3042
|
addIssueComment: issueCommentAdapter.addOne,
|
|
3252
3043
|
addIssueComments: issueCommentAdapter.addMany,
|
|
@@ -3275,11 +3066,11 @@ const selectCommentsOfIssue = restructureCreateSelectorWithArgs(
|
|
|
3275
3066
|
);
|
|
3276
3067
|
const issueCommentReducer = issueCommentSlice.reducer;
|
|
3277
3068
|
const issueUpdateAdapter = createModelAdapter((issueUpdate) => issueUpdate.offline_id);
|
|
3278
|
-
const initialState$
|
|
3069
|
+
const initialState$3 = issueUpdateAdapter.getInitialState({});
|
|
3279
3070
|
const issueUpdateSlice = createSlice({
|
|
3280
3071
|
name: "issueUpdates",
|
|
3281
|
-
initialState: initialState$
|
|
3282
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3072
|
+
initialState: initialState$3,
|
|
3073
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$3)),
|
|
3283
3074
|
reducers: {
|
|
3284
3075
|
initializeIssueUpdates: issueUpdateAdapter.setMany,
|
|
3285
3076
|
setIssueUpdate: issueUpdateAdapter.setOne,
|
|
@@ -3308,11 +3099,11 @@ const selectIssueUpdatesOfIssue = restructureCreateSelectorWithArgs(
|
|
|
3308
3099
|
);
|
|
3309
3100
|
const issueUpdateReducer = issueUpdateSlice.reducer;
|
|
3310
3101
|
const issueAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
3311
|
-
const initialState$
|
|
3102
|
+
const initialState$2 = issueAttachmentAdapter.getInitialState({});
|
|
3312
3103
|
const issueAttachmentSlice = createSlice({
|
|
3313
3104
|
name: "issueAttachments",
|
|
3314
|
-
initialState: initialState$
|
|
3315
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3105
|
+
initialState: initialState$2,
|
|
3106
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$2)),
|
|
3316
3107
|
reducers: {
|
|
3317
3108
|
initializeIssueAttachments: issueAttachmentAdapter.initialize,
|
|
3318
3109
|
addIssueAttachment: issueAttachmentAdapter.addOne,
|
|
@@ -3370,15 +3161,59 @@ const selectAttachmentsOfIssueByType = restructureCreateSelectorWithArgs(
|
|
|
3370
3161
|
)
|
|
3371
3162
|
);
|
|
3372
3163
|
const issueAttachmentReducer = issueAttachmentSlice.reducer;
|
|
3373
|
-
const initialState = {
|
|
3164
|
+
const initialState$1 = {
|
|
3374
3165
|
version: 0
|
|
3375
3166
|
};
|
|
3376
3167
|
const versioningSlice = createSlice({
|
|
3377
3168
|
name: "versioning",
|
|
3378
|
-
initialState,
|
|
3169
|
+
initialState: initialState$1,
|
|
3379
3170
|
reducers: {}
|
|
3380
3171
|
});
|
|
3381
3172
|
const versioningReducer = versioningSlice.reducer;
|
|
3173
|
+
const geoImageAdapter = createModelAdapter((model) => model.offline_id);
|
|
3174
|
+
const initialState = geoImageAdapter.getInitialState({});
|
|
3175
|
+
const geoImageSlice = createSlice({
|
|
3176
|
+
name: "geoImages",
|
|
3177
|
+
initialState,
|
|
3178
|
+
extraReducers: (builder) => {
|
|
3179
|
+
builder.addCase("RESET", (state) => {
|
|
3180
|
+
Object.assign(state, initialState);
|
|
3181
|
+
});
|
|
3182
|
+
},
|
|
3183
|
+
reducers: {
|
|
3184
|
+
initializeGeoImages: geoImageAdapter.initialize,
|
|
3185
|
+
setGeoImage: geoImageAdapter.setOne,
|
|
3186
|
+
setGeoImages: geoImageAdapter.setMany,
|
|
3187
|
+
addGeoImage: geoImageAdapter.addOne,
|
|
3188
|
+
addGeoImages: geoImageAdapter.addMany,
|
|
3189
|
+
updateGeoImage: geoImageAdapter.updateOne,
|
|
3190
|
+
updateGeoImages: geoImageAdapter.updateMany,
|
|
3191
|
+
deleteGeoImage: geoImageAdapter.deleteOne,
|
|
3192
|
+
deleteGeoImages: geoImageAdapter.deleteMany
|
|
3193
|
+
}
|
|
3194
|
+
});
|
|
3195
|
+
const {
|
|
3196
|
+
initializeGeoImages,
|
|
3197
|
+
setGeoImage,
|
|
3198
|
+
setGeoImages,
|
|
3199
|
+
addGeoImage,
|
|
3200
|
+
addGeoImages,
|
|
3201
|
+
updateGeoImage,
|
|
3202
|
+
updateGeoImages,
|
|
3203
|
+
deleteGeoImage,
|
|
3204
|
+
deleteGeoImages
|
|
3205
|
+
} = geoImageSlice.actions;
|
|
3206
|
+
const selectGeoImageMapping = (state) => state.geoImageReducer.instances;
|
|
3207
|
+
const selectGeoImages = (state) => Object.values(state.geoImageReducer.instances);
|
|
3208
|
+
const selectGeoImageById = (id) => (state) => {
|
|
3209
|
+
return state.geoImageReducer.instances[id];
|
|
3210
|
+
};
|
|
3211
|
+
const selectGeoImagesOfProject = restructureCreateSelectorWithArgs(
|
|
3212
|
+
createSelector([selectGeoImages, (_, projectId) => projectId], (mapImages, projectId) => {
|
|
3213
|
+
return mapImages.filter((mapImage) => mapImage.project === projectId);
|
|
3214
|
+
})
|
|
3215
|
+
);
|
|
3216
|
+
const geoImageReducer = geoImageSlice.reducer;
|
|
3382
3217
|
const fullAssetMarkerSize = 45;
|
|
3383
3218
|
const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
|
|
3384
3219
|
const DEFAULT_ISSUE_PRIORITY = IssuePriority.MEDIUM;
|
|
@@ -3450,7 +3285,8 @@ const overmapReducers = {
|
|
|
3450
3285
|
teamReducer,
|
|
3451
3286
|
agentsReducer,
|
|
3452
3287
|
issueCommentReducer,
|
|
3453
|
-
issueUpdateReducer
|
|
3288
|
+
issueUpdateReducer,
|
|
3289
|
+
geoImageReducer
|
|
3454
3290
|
};
|
|
3455
3291
|
const overmapReducer = combineReducers(overmapReducers);
|
|
3456
3292
|
const resetStore = "RESET";
|
|
@@ -4006,8 +3842,6 @@ class JWTService extends BaseAuthService {
|
|
|
4006
3842
|
console.debug(this.constructor.name, "clearing auth;");
|
|
4007
3843
|
this.dispatch(setLoggedIn(false));
|
|
4008
3844
|
this.clearTokens();
|
|
4009
|
-
this.dispatch(setActiveProjectId(null));
|
|
4010
|
-
this.dispatch(setActiveWorkspaceId(null));
|
|
4011
3845
|
this.dispatch({ type: RESET_STATE });
|
|
4012
3846
|
this.dispatch({ type: resetStore });
|
|
4013
3847
|
}
|
|
@@ -4504,13 +4338,13 @@ class AssetStageService extends BaseApiService {
|
|
|
4504
4338
|
if (!stage) {
|
|
4505
4339
|
throw new Error(`No asset stage with id ${stageId} found in the store`);
|
|
4506
4340
|
}
|
|
4507
|
-
this.dispatch(updateStage({ ...stage,
|
|
4341
|
+
this.dispatch(updateStage({ ...stage, form: formId }));
|
|
4508
4342
|
try {
|
|
4509
4343
|
await this.enqueueRequest({
|
|
4510
4344
|
description: "Link asset stage to form",
|
|
4511
4345
|
method: HttpMethod.POST,
|
|
4512
4346
|
url: `/assets/stages/${stageId}/associate-with-form/`,
|
|
4513
|
-
payload: {
|
|
4347
|
+
payload: { form: formId },
|
|
4514
4348
|
blockers: [stageId, formId],
|
|
4515
4349
|
blocks: [stageId]
|
|
4516
4350
|
});
|
|
@@ -4525,7 +4359,7 @@ class AssetStageService extends BaseApiService {
|
|
|
4525
4359
|
if (!stage) {
|
|
4526
4360
|
throw new Error(`No asset stage with id ${stageId} found in the store`);
|
|
4527
4361
|
}
|
|
4528
|
-
this.dispatch(updateStage({ ...stage,
|
|
4362
|
+
this.dispatch(updateStage({ ...stage, form: void 0 }));
|
|
4529
4363
|
try {
|
|
4530
4364
|
await this.enqueueRequest({
|
|
4531
4365
|
description: "Unlink asset stage from form",
|
|
@@ -4550,39 +4384,7 @@ class AssetStageService extends BaseApiService {
|
|
|
4550
4384
|
this.dispatch(initializeStages(result));
|
|
4551
4385
|
}
|
|
4552
4386
|
}
|
|
4553
|
-
|
|
4554
|
-
[AttachmentModel.Issue]: {
|
|
4555
|
-
name: "issue",
|
|
4556
|
-
attachUrlPrefix: "/issues",
|
|
4557
|
-
deleteUrlPrefix: "/issues",
|
|
4558
|
-
fetchUrlPostfix: "/issue-attachments"
|
|
4559
|
-
},
|
|
4560
|
-
[AttachmentModel.Asset]: {
|
|
4561
|
-
name: "asset",
|
|
4562
|
-
attachUrlPrefix: "/assets",
|
|
4563
|
-
deleteUrlPrefix: "/assets",
|
|
4564
|
-
fetchUrlPostfix: "/asset-attachments"
|
|
4565
|
-
},
|
|
4566
|
-
[AttachmentModel.AssetType]: {
|
|
4567
|
-
name: "asset type",
|
|
4568
|
-
attachUrlPrefix: "/assets/types",
|
|
4569
|
-
deleteUrlPrefix: "/assets/types",
|
|
4570
|
-
fetchUrlPostfix: "/asset-type-attachments"
|
|
4571
|
-
},
|
|
4572
|
-
[AttachmentModel.Project]: {
|
|
4573
|
-
name: "project",
|
|
4574
|
-
attachUrlPrefix: "/projects",
|
|
4575
|
-
deleteUrlPrefix: "/projects",
|
|
4576
|
-
fetchUrlPostfix: "/attachments"
|
|
4577
|
-
},
|
|
4578
|
-
[AttachmentModel.Document]: {
|
|
4579
|
-
name: "document",
|
|
4580
|
-
attachUrlPrefix: "/documents",
|
|
4581
|
-
deleteUrlPrefix: "/documents",
|
|
4582
|
-
fetchUrlPostfix: "/document-attachments"
|
|
4583
|
-
}
|
|
4584
|
-
};
|
|
4585
|
-
class BaseAttachmentService extends BaseApiService {
|
|
4387
|
+
class BaseUploadService extends BaseApiService {
|
|
4586
4388
|
getNumberOfAttachmentsWithSha1(sha1) {
|
|
4587
4389
|
const {
|
|
4588
4390
|
issueAttachmentReducer: issueAttachmentReducer2,
|
|
@@ -4590,8 +4392,9 @@ class BaseAttachmentService extends BaseApiService {
|
|
|
4590
4392
|
assetTypeAttachmentReducer: assetTypeAttachmentReducer2,
|
|
4591
4393
|
documentAttachmentReducer: documentAttachmentReducer2,
|
|
4592
4394
|
projectAttachmentReducer: projectAttachmentReducer2,
|
|
4395
|
+
formRevisionAttachmentReducer: formRevisionAttachmentReducer2,
|
|
4593
4396
|
formSubmissionAttachmentReducer: formSubmissionAttachmentReducer2,
|
|
4594
|
-
|
|
4397
|
+
geoImageReducer: geoImageReducer2
|
|
4595
4398
|
} = this.client.store.getState();
|
|
4596
4399
|
const objectsWithSha1 = [].concat(
|
|
4597
4400
|
Object.values(issueAttachmentReducer2.instances),
|
|
@@ -4600,7 +4403,8 @@ class BaseAttachmentService extends BaseApiService {
|
|
|
4600
4403
|
Object.values(documentAttachmentReducer2.instances),
|
|
4601
4404
|
Object.values(projectAttachmentReducer2.instances),
|
|
4602
4405
|
Object.values(formRevisionAttachmentReducer2.instances),
|
|
4603
|
-
Object.values(formSubmissionAttachmentReducer2.instances)
|
|
4406
|
+
Object.values(formSubmissionAttachmentReducer2.instances),
|
|
4407
|
+
Object.values(geoImageReducer2.instances)
|
|
4604
4408
|
);
|
|
4605
4409
|
return objectsWithSha1.filter((object) => object.file_sha1 === sha1).length;
|
|
4606
4410
|
}
|
|
@@ -4620,6 +4424,40 @@ class BaseAttachmentService extends BaseApiService {
|
|
|
4620
4424
|
});
|
|
4621
4425
|
}
|
|
4622
4426
|
}
|
|
4427
|
+
}
|
|
4428
|
+
const AttachmentModelMeta = {
|
|
4429
|
+
[AttachmentModel.Issue]: {
|
|
4430
|
+
name: "issue",
|
|
4431
|
+
attachUrlPrefix: "/issues",
|
|
4432
|
+
deleteUrlPrefix: "/issues",
|
|
4433
|
+
fetchUrlPostfix: "/issue-attachments"
|
|
4434
|
+
},
|
|
4435
|
+
[AttachmentModel.Asset]: {
|
|
4436
|
+
name: "asset",
|
|
4437
|
+
attachUrlPrefix: "/assets",
|
|
4438
|
+
deleteUrlPrefix: "/assets",
|
|
4439
|
+
fetchUrlPostfix: "/asset-attachments"
|
|
4440
|
+
},
|
|
4441
|
+
[AttachmentModel.AssetType]: {
|
|
4442
|
+
name: "asset type",
|
|
4443
|
+
attachUrlPrefix: "/assets/types",
|
|
4444
|
+
deleteUrlPrefix: "/assets/types",
|
|
4445
|
+
fetchUrlPostfix: "/asset-type-attachments"
|
|
4446
|
+
},
|
|
4447
|
+
[AttachmentModel.Project]: {
|
|
4448
|
+
name: "project",
|
|
4449
|
+
attachUrlPrefix: "/projects",
|
|
4450
|
+
deleteUrlPrefix: "/projects",
|
|
4451
|
+
fetchUrlPostfix: "/attachments"
|
|
4452
|
+
},
|
|
4453
|
+
[AttachmentModel.Document]: {
|
|
4454
|
+
name: "document",
|
|
4455
|
+
attachUrlPrefix: "/documents",
|
|
4456
|
+
deleteUrlPrefix: "/documents",
|
|
4457
|
+
fetchUrlPostfix: "/document-attachments"
|
|
4458
|
+
}
|
|
4459
|
+
};
|
|
4460
|
+
class BaseAttachmentService extends BaseUploadService {
|
|
4623
4461
|
async attachFiles(files, modelId, buildOfflineAttachment) {
|
|
4624
4462
|
const { store } = this.client;
|
|
4625
4463
|
const currentUser = store.getState().userReducer.currentUser;
|
|
@@ -4975,11 +4813,10 @@ class IssueService extends BaseApiService {
|
|
|
4975
4813
|
// Basic CRUD functions
|
|
4976
4814
|
// TODO: Once all models are represented in `Created<TModel>`, use `Created` in `OptimisticModelResult`, so we don't
|
|
4977
4815
|
// have to repeat it for all optimistic model results (all optimistic results are created).
|
|
4978
|
-
add(issue, issueType = null) {
|
|
4816
|
+
add(issue, workspaceId, issueType = null) {
|
|
4979
4817
|
const { store } = this.client;
|
|
4980
4818
|
const dateWithoutMilliseconds = /* @__PURE__ */ new Date();
|
|
4981
4819
|
const state = store.getState();
|
|
4982
|
-
const workspaceId = state.workspaceReducer.activeWorkspaceId;
|
|
4983
4820
|
const currentUserId = state.userReducer.currentUser.id;
|
|
4984
4821
|
dateWithoutMilliseconds.setMilliseconds(0);
|
|
4985
4822
|
if (!workspaceId) {
|
|
@@ -5490,10 +5327,6 @@ class ProjectService extends BaseApiService {
|
|
|
5490
5327
|
if (!project) {
|
|
5491
5328
|
throw new Error("Expected project to exist");
|
|
5492
5329
|
}
|
|
5493
|
-
const activeProjectId = state.projectReducer.activeProjectId;
|
|
5494
|
-
if (activeProjectId === projectId) {
|
|
5495
|
-
this.dispatch({ type: "project/setActiveProjectId", payload: null });
|
|
5496
|
-
}
|
|
5497
5330
|
const filesToDelete = selectProjectFiles(state).filter((file) => file.project === projectId);
|
|
5498
5331
|
this.dispatch(removeProjectFilesOfProject(project.id));
|
|
5499
5332
|
const attachmentsOfProject = selectAttachmentsOfProject(project.id)(state);
|
|
@@ -5520,7 +5353,6 @@ class ProjectService extends BaseApiService {
|
|
|
5520
5353
|
this.dispatch(setProjectAccesses(Object.values(projectAccesses)));
|
|
5521
5354
|
this.dispatch(addOrReplaceProjectFiles(filesToDelete));
|
|
5522
5355
|
this.dispatch(setProjectAttachments(attachmentsOfProject));
|
|
5523
|
-
this.dispatch(setActiveProjectId(activeProjectId));
|
|
5524
5356
|
this.dispatch({ type: "rehydrated/setRehydrated", payload: true });
|
|
5525
5357
|
if (license) {
|
|
5526
5358
|
this.dispatch(updateLicense({ ...license, project: project.id }));
|
|
@@ -5591,7 +5423,7 @@ const separateImageFromFields = async (fields) => {
|
|
|
5591
5423
|
}
|
|
5592
5424
|
return { fields: newFields, images };
|
|
5593
5425
|
};
|
|
5594
|
-
class
|
|
5426
|
+
class FormService extends BaseApiService {
|
|
5595
5427
|
constructor() {
|
|
5596
5428
|
super(...arguments);
|
|
5597
5429
|
// Attach images to revision, after uploading them to S3
|
|
@@ -5797,17 +5629,17 @@ class UserFormService extends BaseApiService {
|
|
|
5797
5629
|
async delete(formId) {
|
|
5798
5630
|
const { store } = this.client;
|
|
5799
5631
|
const state = store.getState();
|
|
5800
|
-
const
|
|
5801
|
-
if (!
|
|
5802
|
-
throw new Error("Expected
|
|
5632
|
+
const form = selectForm(formId)(state);
|
|
5633
|
+
if (!form) {
|
|
5634
|
+
throw new Error("Expected form to exist");
|
|
5803
5635
|
}
|
|
5804
|
-
const
|
|
5805
|
-
if (
|
|
5806
|
-
this.dispatch(deleteFormSubmissions(
|
|
5636
|
+
const formSubmissions = selectFormSubmissionsOfForm(formId)(state);
|
|
5637
|
+
if (formSubmissions && formSubmissions.length > 0) {
|
|
5638
|
+
this.dispatch(deleteFormSubmissions(formSubmissions.map(({ offline_id }) => offline_id)));
|
|
5807
5639
|
}
|
|
5808
|
-
const
|
|
5809
|
-
if (
|
|
5810
|
-
this.dispatch(deleteFormRevisions(
|
|
5640
|
+
const formRevisions = selectFormRevisionsOfForm(formId)(state);
|
|
5641
|
+
if (formRevisions && formRevisions.length > 0) {
|
|
5642
|
+
this.dispatch(deleteFormRevisions(formRevisions.map(({ offline_id }) => offline_id)));
|
|
5811
5643
|
}
|
|
5812
5644
|
this.dispatch(deleteForm(formId));
|
|
5813
5645
|
try {
|
|
@@ -5819,12 +5651,12 @@ class UserFormService extends BaseApiService {
|
|
|
5819
5651
|
blocks: []
|
|
5820
5652
|
});
|
|
5821
5653
|
} catch (e) {
|
|
5822
|
-
this.dispatch(addForm(
|
|
5823
|
-
if (
|
|
5824
|
-
this.dispatch(addFormRevisions(
|
|
5654
|
+
this.dispatch(addForm(form));
|
|
5655
|
+
if (formRevisions && formRevisions.length > 0) {
|
|
5656
|
+
this.dispatch(addFormRevisions(formRevisions));
|
|
5825
5657
|
}
|
|
5826
|
-
if (
|
|
5827
|
-
this.dispatch(addFormSubmissions(
|
|
5658
|
+
if (formSubmissions && formSubmissions.length > 0) {
|
|
5659
|
+
this.dispatch(addFormSubmissions(formSubmissions));
|
|
5828
5660
|
}
|
|
5829
5661
|
throw e;
|
|
5830
5662
|
}
|
|
@@ -5910,7 +5742,7 @@ const separateFilesFromValues = (values) => {
|
|
|
5910
5742
|
}
|
|
5911
5743
|
return { values: newValues, files };
|
|
5912
5744
|
};
|
|
5913
|
-
class
|
|
5745
|
+
class FormSubmissionService extends BaseUploadService {
|
|
5914
5746
|
constructor() {
|
|
5915
5747
|
super(...arguments);
|
|
5916
5748
|
// Attach files to submission, after uploading them to S3
|
|
@@ -5991,7 +5823,6 @@ class UserFormSubmissionService extends BaseApiService {
|
|
|
5991
5823
|
// TODO: adapt the support bulk adding to any model type
|
|
5992
5824
|
async bulkAdd(args, batchSize) {
|
|
5993
5825
|
const { formRevision, commonFieldValues, fieldValuesByAsset } = args;
|
|
5994
|
-
const allFilesRecord = {};
|
|
5995
5826
|
const { values: fileSeperatedCommonFieldValues, files: commonFiles } = separateFilesFromValues(commonFieldValues);
|
|
5996
5827
|
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
5997
5828
|
const transactionId = v4();
|
|
@@ -6033,7 +5864,6 @@ class UserFormSubmissionService extends BaseApiService {
|
|
|
6033
5864
|
file_type: file.type,
|
|
6034
5865
|
size: file.size
|
|
6035
5866
|
};
|
|
6036
|
-
allFilesRecord[sha1] = filePayload;
|
|
6037
5867
|
filePaylods.push(filePayload);
|
|
6038
5868
|
}
|
|
6039
5869
|
return {
|
|
@@ -6069,22 +5899,7 @@ class UserFormSubmissionService extends BaseApiService {
|
|
|
6069
5899
|
blocks
|
|
6070
5900
|
});
|
|
6071
5901
|
void promise.then(({ presigned_urls }) => {
|
|
6072
|
-
|
|
6073
|
-
const file = allFilesRecord[sha1];
|
|
6074
|
-
if (!file)
|
|
6075
|
-
continue;
|
|
6076
|
-
void this.enqueueRequest({
|
|
6077
|
-
url: presignedUrl.url,
|
|
6078
|
-
description: "Upload file",
|
|
6079
|
-
method: HttpMethod.POST,
|
|
6080
|
-
isExternalUrl: true,
|
|
6081
|
-
isAuthNeeded: false,
|
|
6082
|
-
attachmentHash: sha1,
|
|
6083
|
-
blockers: [`s3-${file.sha1}.${file.extension}`],
|
|
6084
|
-
blocks: [sha1],
|
|
6085
|
-
s3url: presignedUrl
|
|
6086
|
-
});
|
|
6087
|
-
}
|
|
5902
|
+
this.processPresignedUrls(presigned_urls);
|
|
6088
5903
|
});
|
|
6089
5904
|
prevBatchId = batchId;
|
|
6090
5905
|
batchPromises.push(promise);
|
|
@@ -6555,7 +6370,7 @@ class OrganizationService extends BaseApiService {
|
|
|
6555
6370
|
});
|
|
6556
6371
|
}
|
|
6557
6372
|
async update(organization) {
|
|
6558
|
-
|
|
6373
|
+
return this.enqueueRequest({
|
|
6559
6374
|
description: "Edit organization",
|
|
6560
6375
|
method: HttpMethod.PATCH,
|
|
6561
6376
|
url: `/organizations/${organization.id}/`,
|
|
@@ -6563,10 +6378,6 @@ class OrganizationService extends BaseApiService {
|
|
|
6563
6378
|
blockers: [`add-org-${organization.name}`, organization.id.toString()],
|
|
6564
6379
|
blocks: [organization.id.toString()]
|
|
6565
6380
|
});
|
|
6566
|
-
return promise.then((result) => {
|
|
6567
|
-
this.dispatch(updateActiveOrganization(organization));
|
|
6568
|
-
return result;
|
|
6569
|
-
});
|
|
6570
6381
|
}
|
|
6571
6382
|
async invite(organizationId, email) {
|
|
6572
6383
|
return this.enqueueRequest({
|
|
@@ -7144,6 +6955,179 @@ class UserService extends BaseApiService {
|
|
|
7144
6955
|
this.dispatch(setUsers(Object.values(usersRecord)));
|
|
7145
6956
|
}
|
|
7146
6957
|
}
|
|
6958
|
+
class GeoImageService extends BaseUploadService {
|
|
6959
|
+
async add(payload) {
|
|
6960
|
+
const { store } = this.client;
|
|
6961
|
+
const { file, ...payloadWithoutFile } = payload;
|
|
6962
|
+
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6963
|
+
const currentUser = store.getState().userReducer.currentUser;
|
|
6964
|
+
const projectId = payloadWithoutFile.project;
|
|
6965
|
+
const sha1 = await hashFile(file);
|
|
6966
|
+
const filePayload = {
|
|
6967
|
+
sha1,
|
|
6968
|
+
file_type: file.type,
|
|
6969
|
+
extension: file.name.split(".").pop(),
|
|
6970
|
+
size: file.size
|
|
6971
|
+
};
|
|
6972
|
+
const offlineMapImage = offline({
|
|
6973
|
+
...payloadWithoutFile,
|
|
6974
|
+
file_name: file.name,
|
|
6975
|
+
file_sha1: sha1,
|
|
6976
|
+
file: URL.createObjectURL(file),
|
|
6977
|
+
submitted_at: submittedAt,
|
|
6978
|
+
created_by: currentUser.id
|
|
6979
|
+
});
|
|
6980
|
+
store.dispatch(addGeoImage(offlineMapImage));
|
|
6981
|
+
const promise = this.enqueueRequest({
|
|
6982
|
+
description: "Add geo image",
|
|
6983
|
+
method: HttpMethod.POST,
|
|
6984
|
+
url: "/geo-images/",
|
|
6985
|
+
payload: {
|
|
6986
|
+
offline_id: offlineMapImage.offline_id,
|
|
6987
|
+
submitted_at: submittedAt,
|
|
6988
|
+
title: offlineMapImage.title,
|
|
6989
|
+
description: offlineMapImage.description,
|
|
6990
|
+
geo_marker: offlineMapImage.geo_marker,
|
|
6991
|
+
canvas_marker: offlineMapImage.canvas_marker,
|
|
6992
|
+
sha1: offlineMapImage.file_sha1,
|
|
6993
|
+
project: offlineMapImage.project,
|
|
6994
|
+
file_name: offlineMapImage.file_name,
|
|
6995
|
+
direction: offlineMapImage.direction,
|
|
6996
|
+
original_date: offlineMapImage.original_date,
|
|
6997
|
+
file: filePayload
|
|
6998
|
+
},
|
|
6999
|
+
blocks: [projectId.toString()],
|
|
7000
|
+
blockers: [projectId.toString()]
|
|
7001
|
+
});
|
|
7002
|
+
promise.then((result) => {
|
|
7003
|
+
this.processPresignedUrls(result.presigned_urls);
|
|
7004
|
+
store.dispatch(setGeoImage(result.geo_image));
|
|
7005
|
+
}).catch(() => {
|
|
7006
|
+
store.dispatch(deleteGeoImage(offlineMapImage.offline_id));
|
|
7007
|
+
});
|
|
7008
|
+
return [offlineMapImage, promise.then((result) => result.geo_image)];
|
|
7009
|
+
}
|
|
7010
|
+
async bulkAdd(payloads, projectId) {
|
|
7011
|
+
const { store } = this.client;
|
|
7012
|
+
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7013
|
+
const currentUser = store.getState().userReducer.currentUser;
|
|
7014
|
+
const offlineGeoImages = [];
|
|
7015
|
+
const offlineIds = [];
|
|
7016
|
+
const geoImagePayloads = [];
|
|
7017
|
+
const filePayloadRecord = {};
|
|
7018
|
+
for (const payloadAndFile of payloads) {
|
|
7019
|
+
const { file, ...payload } = payloadAndFile;
|
|
7020
|
+
const sha1 = await hashFile(file);
|
|
7021
|
+
if (!(sha1 in filePayloadRecord)) {
|
|
7022
|
+
filePayloadRecord[sha1] = {
|
|
7023
|
+
sha1,
|
|
7024
|
+
file_type: file.type,
|
|
7025
|
+
extension: file.name.split(".").pop(),
|
|
7026
|
+
size: file.size
|
|
7027
|
+
};
|
|
7028
|
+
await this.client.files.addCache(file, sha1);
|
|
7029
|
+
}
|
|
7030
|
+
const offlineMapImage = offline({
|
|
7031
|
+
...payload,
|
|
7032
|
+
file_name: file.name,
|
|
7033
|
+
file_sha1: sha1,
|
|
7034
|
+
file: URL.createObjectURL(file),
|
|
7035
|
+
submitted_at: submittedAt,
|
|
7036
|
+
created_by: currentUser.id,
|
|
7037
|
+
project: projectId
|
|
7038
|
+
});
|
|
7039
|
+
offlineGeoImages.push(offlineMapImage);
|
|
7040
|
+
offlineIds.push(offlineMapImage.offline_id);
|
|
7041
|
+
geoImagePayloads.push({
|
|
7042
|
+
offline_id: offlineMapImage.offline_id,
|
|
7043
|
+
sha1: offlineMapImage.file_sha1,
|
|
7044
|
+
file_name: offlineMapImage.file_name,
|
|
7045
|
+
title: offlineMapImage.title,
|
|
7046
|
+
description: offlineMapImage.description,
|
|
7047
|
+
geo_marker: offlineMapImage.geo_marker,
|
|
7048
|
+
canvas_marker: offlineMapImage.canvas_marker,
|
|
7049
|
+
direction: offlineMapImage.direction,
|
|
7050
|
+
original_date: offlineMapImage.original_date
|
|
7051
|
+
});
|
|
7052
|
+
}
|
|
7053
|
+
store.dispatch(addGeoImages(offlineGeoImages));
|
|
7054
|
+
const promise = this.enqueueRequest({
|
|
7055
|
+
description: "Bulk add geo images",
|
|
7056
|
+
method: HttpMethod.POST,
|
|
7057
|
+
url: "/geo-images/bulk/",
|
|
7058
|
+
payload: {
|
|
7059
|
+
submitted_at: submittedAt,
|
|
7060
|
+
project: projectId,
|
|
7061
|
+
geo_images: geoImagePayloads,
|
|
7062
|
+
files: Object.values(filePayloadRecord)
|
|
7063
|
+
},
|
|
7064
|
+
blocks: [projectId.toString()],
|
|
7065
|
+
blockers: offlineIds
|
|
7066
|
+
});
|
|
7067
|
+
promise.then((result) => {
|
|
7068
|
+
this.processPresignedUrls(result.presigned_urls);
|
|
7069
|
+
store.dispatch(setGeoImages(result.geo_images));
|
|
7070
|
+
}).catch(() => {
|
|
7071
|
+
store.dispatch(deleteGeoImages(offlineIds));
|
|
7072
|
+
});
|
|
7073
|
+
return [offlineGeoImages, promise.then((result) => result.geo_images)];
|
|
7074
|
+
}
|
|
7075
|
+
update(payload) {
|
|
7076
|
+
const { store } = this.client;
|
|
7077
|
+
const state = store.getState();
|
|
7078
|
+
const geoImageToUpdate = selectGeoImageById(payload.offline_id)(state);
|
|
7079
|
+
if (!geoImageToUpdate) {
|
|
7080
|
+
throw new Error(`Map image with offline_id ${payload.offline_id} does not exist in the store`);
|
|
7081
|
+
}
|
|
7082
|
+
const updatedGeoImage = { ...geoImageToUpdate, ...payload };
|
|
7083
|
+
store.dispatch(updateGeoImage(updatedGeoImage));
|
|
7084
|
+
const promise = this.enqueueRequest({
|
|
7085
|
+
description: "Update geo image",
|
|
7086
|
+
method: HttpMethod.PATCH,
|
|
7087
|
+
url: `/geo-images/${payload.offline_id}/`,
|
|
7088
|
+
payload,
|
|
7089
|
+
blocks: [payload.offline_id],
|
|
7090
|
+
blockers: [payload.offline_id]
|
|
7091
|
+
});
|
|
7092
|
+
promise.then((result) => {
|
|
7093
|
+
store.dispatch(setGeoImage(result));
|
|
7094
|
+
}).catch(() => {
|
|
7095
|
+
store.dispatch(setGeoImage(geoImageToUpdate));
|
|
7096
|
+
});
|
|
7097
|
+
return [updatedGeoImage, promise];
|
|
7098
|
+
}
|
|
7099
|
+
async delete(geoImageId) {
|
|
7100
|
+
const { store } = this.client;
|
|
7101
|
+
const state = store.getState();
|
|
7102
|
+
const geoImageToDelete = selectGeoImageById(geoImageId)(state);
|
|
7103
|
+
if (!geoImageToDelete) {
|
|
7104
|
+
throw new Error(`Map image with offline_id ${geoImageId} does not exist in the store`);
|
|
7105
|
+
}
|
|
7106
|
+
store.dispatch(deleteGeoImage(geoImageId));
|
|
7107
|
+
const promise = this.enqueueRequest({
|
|
7108
|
+
description: "Delete geo image",
|
|
7109
|
+
method: HttpMethod.DELETE,
|
|
7110
|
+
url: `/geo-images/${geoImageId}/`,
|
|
7111
|
+
blocks: [geoImageId],
|
|
7112
|
+
blockers: [geoImageId]
|
|
7113
|
+
});
|
|
7114
|
+
promise.catch(() => {
|
|
7115
|
+
store.dispatch(setGeoImage(geoImageToDelete));
|
|
7116
|
+
});
|
|
7117
|
+
return promise;
|
|
7118
|
+
}
|
|
7119
|
+
async refreshStore(projectId) {
|
|
7120
|
+
const { store } = this.client;
|
|
7121
|
+
const result = await this.enqueueRequest({
|
|
7122
|
+
description: "Get geo images",
|
|
7123
|
+
method: HttpMethod.GET,
|
|
7124
|
+
url: `/projects/${projectId}/geo-images/`,
|
|
7125
|
+
blocks: [projectId.toString()],
|
|
7126
|
+
blockers: []
|
|
7127
|
+
});
|
|
7128
|
+
store.dispatch(initializeGeoImages(result));
|
|
7129
|
+
}
|
|
7130
|
+
}
|
|
7147
7131
|
export {
|
|
7148
7132
|
APIError,
|
|
7149
7133
|
AgentService,
|
|
@@ -7167,7 +7151,10 @@ export {
|
|
|
7167
7151
|
EmailDomainsService,
|
|
7168
7152
|
EmailVerificationService,
|
|
7169
7153
|
FileService,
|
|
7154
|
+
FormService,
|
|
7155
|
+
FormSubmissionService,
|
|
7170
7156
|
GREEN,
|
|
7157
|
+
GeoImageService,
|
|
7171
7158
|
HttpMethod,
|
|
7172
7159
|
IssueAttachmentService,
|
|
7173
7160
|
IssueCommentService,
|
|
@@ -7193,8 +7180,6 @@ export {
|
|
|
7193
7180
|
ProjectFileService,
|
|
7194
7181
|
ProjectService,
|
|
7195
7182
|
TeamService,
|
|
7196
|
-
UserFormService,
|
|
7197
|
-
UserFormSubmissionService,
|
|
7198
7183
|
UserService,
|
|
7199
7184
|
VERSION_REDUCER_KEY,
|
|
7200
7185
|
VerificationCodeType,
|
|
@@ -7229,6 +7214,8 @@ export {
|
|
|
7229
7214
|
addFormSubmissionAttachments,
|
|
7230
7215
|
addFormSubmissions,
|
|
7231
7216
|
addForms,
|
|
7217
|
+
addGeoImage,
|
|
7218
|
+
addGeoImages,
|
|
7232
7219
|
addIssue,
|
|
7233
7220
|
addIssueAttachment,
|
|
7234
7221
|
addIssueAttachments,
|
|
@@ -7304,6 +7291,8 @@ export {
|
|
|
7304
7291
|
deleteFormSubmissionAttachment,
|
|
7305
7292
|
deleteFormSubmissionAttachments,
|
|
7306
7293
|
deleteFormSubmissions,
|
|
7294
|
+
deleteGeoImage,
|
|
7295
|
+
deleteGeoImages,
|
|
7307
7296
|
deleteIssue,
|
|
7308
7297
|
deleteIssueAttachment,
|
|
7309
7298
|
deleteIssueAttachments,
|
|
@@ -7337,6 +7326,7 @@ export {
|
|
|
7337
7326
|
fileReducer,
|
|
7338
7327
|
fileSlice,
|
|
7339
7328
|
fileToBlob,
|
|
7329
|
+
flipBounds,
|
|
7340
7330
|
flipCoordinates,
|
|
7341
7331
|
formReducer,
|
|
7342
7332
|
formRevisionAttachmentReducer,
|
|
@@ -7351,6 +7341,8 @@ export {
|
|
|
7351
7341
|
fullAssetMarkerSize,
|
|
7352
7342
|
generateBadgeColors,
|
|
7353
7343
|
genericMemo,
|
|
7344
|
+
geoImageReducer,
|
|
7345
|
+
geoImageSlice,
|
|
7354
7346
|
getFileIdentifier,
|
|
7355
7347
|
getFileS3Key,
|
|
7356
7348
|
getLocalDateString,
|
|
@@ -7359,8 +7351,6 @@ export {
|
|
|
7359
7351
|
getRenamedFile,
|
|
7360
7352
|
getStageColor,
|
|
7361
7353
|
hashFile,
|
|
7362
|
-
hideAllCategories,
|
|
7363
|
-
hideCategory,
|
|
7364
7354
|
initSDK,
|
|
7365
7355
|
initializeAssetAttachments,
|
|
7366
7356
|
initializeAssetTypeAttachments,
|
|
@@ -7373,6 +7363,7 @@ export {
|
|
|
7373
7363
|
initializeFormRevisionAttachments,
|
|
7374
7364
|
initializeFormRevisions,
|
|
7375
7365
|
initializeFormSubmissionAttachments,
|
|
7366
|
+
initializeGeoImages,
|
|
7376
7367
|
initializeIssueAttachments,
|
|
7377
7368
|
initializeIssueTypes,
|
|
7378
7369
|
initializeIssueUpdates,
|
|
@@ -7445,18 +7436,12 @@ export {
|
|
|
7445
7436
|
searchIssues,
|
|
7446
7437
|
selectAccessToken,
|
|
7447
7438
|
selectActiveLicense,
|
|
7448
|
-
selectActiveOrganization,
|
|
7449
7439
|
selectActiveOrganizationAccess,
|
|
7450
|
-
selectActiveOrganizationId,
|
|
7451
|
-
selectActiveOrganizationLicenses,
|
|
7452
|
-
selectActiveOrganizationProjects,
|
|
7453
7440
|
selectActiveProject,
|
|
7454
7441
|
selectActiveProjectAccess,
|
|
7455
7442
|
selectActiveProjectFileId,
|
|
7456
7443
|
selectActiveProjectId,
|
|
7457
7444
|
selectActiveStatusLicenses,
|
|
7458
|
-
selectActiveWorkspace,
|
|
7459
|
-
selectActiveWorkspaceId,
|
|
7460
7445
|
selectAllDocumentAttachments,
|
|
7461
7446
|
selectAllProjectAttachments,
|
|
7462
7447
|
selectAncestorIdsOfDocument,
|
|
@@ -7493,7 +7478,6 @@ export {
|
|
|
7493
7478
|
selectCategoriesOfWorkspace,
|
|
7494
7479
|
selectCategoryById,
|
|
7495
7480
|
selectCategoryMapping,
|
|
7496
|
-
selectCategoryVisibility,
|
|
7497
7481
|
selectCommentsOfIssue,
|
|
7498
7482
|
selectCompletedStageIdsForAsset,
|
|
7499
7483
|
selectCompletedStages,
|
|
@@ -7510,8 +7494,6 @@ export {
|
|
|
7510
7494
|
selectEmailDomains,
|
|
7511
7495
|
selectEmailDomainsAsMapping,
|
|
7512
7496
|
selectEmailDomainsOfOrganization,
|
|
7513
|
-
selectEnabledProjectFileMapping,
|
|
7514
|
-
selectEnabledProjectFiles,
|
|
7515
7497
|
selectFavouriteProjects,
|
|
7516
7498
|
selectFilteredForms,
|
|
7517
7499
|
selectForm,
|
|
@@ -7519,6 +7501,7 @@ export {
|
|
|
7519
7501
|
selectFormOfAssetType,
|
|
7520
7502
|
selectFormOfIssueType,
|
|
7521
7503
|
selectFormRevision,
|
|
7504
|
+
selectFormRevisionAttachmentsMapping,
|
|
7522
7505
|
selectFormRevisionMapping,
|
|
7523
7506
|
selectFormRevisions,
|
|
7524
7507
|
selectFormRevisionsOfForm,
|
|
@@ -7535,8 +7518,10 @@ export {
|
|
|
7535
7518
|
selectFormsCount,
|
|
7536
7519
|
selectFormsMapping,
|
|
7537
7520
|
selectGeneralFormCount,
|
|
7538
|
-
|
|
7539
|
-
|
|
7521
|
+
selectGeoImageById,
|
|
7522
|
+
selectGeoImageMapping,
|
|
7523
|
+
selectGeoImages,
|
|
7524
|
+
selectGeoImagesOfProject,
|
|
7540
7525
|
selectIsFetchingInitialData,
|
|
7541
7526
|
selectIsImportingProjectFile,
|
|
7542
7527
|
selectIsLoggedIn,
|
|
@@ -7553,7 +7538,6 @@ export {
|
|
|
7553
7538
|
selectIssueTypesOfOrganization,
|
|
7554
7539
|
selectIssueUpdateMapping,
|
|
7555
7540
|
selectIssueUpdatesOfIssue,
|
|
7556
|
-
selectIssues,
|
|
7557
7541
|
selectIssuesOfIssueType,
|
|
7558
7542
|
selectIssuesOfIssueTypeCount,
|
|
7559
7543
|
selectLatestFormRevisionByForm,
|
|
@@ -7564,6 +7548,7 @@ export {
|
|
|
7564
7548
|
selectLicenseForProject,
|
|
7565
7549
|
selectLicenses,
|
|
7566
7550
|
selectLicensesForProjectsMapping,
|
|
7551
|
+
selectLicensesOfOrganization,
|
|
7567
7552
|
selectMainWorkspace,
|
|
7568
7553
|
selectNumberOfAssetTypesMatchingCaseInsensitiveName,
|
|
7569
7554
|
selectNumberOfAssetsOfAssetType,
|
|
@@ -7572,6 +7557,7 @@ export {
|
|
|
7572
7557
|
selectOrganizationAccessForUser,
|
|
7573
7558
|
selectOrganizationAccessUserMapping,
|
|
7574
7559
|
selectOrganizationAccesses,
|
|
7560
|
+
selectOrganizationById,
|
|
7575
7561
|
selectOrganizationUsersAsMapping,
|
|
7576
7562
|
selectOrganizationUsersIds,
|
|
7577
7563
|
selectOrganizations,
|
|
@@ -7586,21 +7572,21 @@ export {
|
|
|
7586
7572
|
selectProjectAccesses,
|
|
7587
7573
|
selectProjectAttachment,
|
|
7588
7574
|
selectProjectAttachmentMapping,
|
|
7589
|
-
|
|
7575
|
+
selectProjectFileById,
|
|
7576
|
+
selectProjectFileMapping,
|
|
7590
7577
|
selectProjectFiles,
|
|
7591
7578
|
selectProjectUsersAsMapping,
|
|
7592
7579
|
selectProjectUsersIds,
|
|
7593
7580
|
selectProjects,
|
|
7581
|
+
selectProjectsOfOrganization,
|
|
7594
7582
|
selectProjectsWithAccess,
|
|
7595
7583
|
selectRecentIssueIds,
|
|
7596
7584
|
selectRecentIssuesAsSearchResults,
|
|
7597
7585
|
selectRehydrated,
|
|
7598
7586
|
selectRootDocuments,
|
|
7599
7587
|
selectSortedFormSubmissionsOfForm,
|
|
7600
|
-
selectSortedOrganizationLicenses,
|
|
7601
7588
|
selectSortedOrganizationUsers,
|
|
7602
7589
|
selectSortedProjectUsers,
|
|
7603
|
-
selectSortedProjects,
|
|
7604
7590
|
selectStage,
|
|
7605
7591
|
selectStageFormIdsFromStageIds,
|
|
7606
7592
|
selectStageMapping,
|
|
@@ -7615,17 +7601,12 @@ export {
|
|
|
7615
7601
|
selectTeamsOfUser,
|
|
7616
7602
|
selectUploadUrl,
|
|
7617
7603
|
selectUser,
|
|
7618
|
-
selectUserFormRevisionAttachmentsMapping,
|
|
7619
7604
|
selectUsersAsMapping,
|
|
7620
|
-
|
|
7621
|
-
selectVisibleUserIds,
|
|
7622
|
-
selectWorkspace,
|
|
7605
|
+
selectWorkspaceById,
|
|
7623
7606
|
selectWorkspaceMapping,
|
|
7624
7607
|
selectWorkspaces,
|
|
7625
|
-
setActiveOrganizationId,
|
|
7626
7608
|
setActiveProjectFileId,
|
|
7627
7609
|
setActiveProjectId,
|
|
7628
|
-
setActiveWorkspaceId,
|
|
7629
7610
|
setAsset,
|
|
7630
7611
|
setAssetAttachment,
|
|
7631
7612
|
setAssetAttachments,
|
|
@@ -7646,6 +7627,8 @@ export {
|
|
|
7646
7627
|
setFormSubmissionAttachments,
|
|
7647
7628
|
setFormSubmissions,
|
|
7648
7629
|
setForms,
|
|
7630
|
+
setGeoImage,
|
|
7631
|
+
setGeoImages,
|
|
7649
7632
|
setIsFetchingInitialData,
|
|
7650
7633
|
setIsImportingProjectFile,
|
|
7651
7634
|
setIssueAttachment,
|
|
@@ -7661,7 +7644,6 @@ export {
|
|
|
7661
7644
|
setProjectAccesses,
|
|
7662
7645
|
setProjectAttachment,
|
|
7663
7646
|
setProjectAttachments,
|
|
7664
|
-
setProjectFileVisible,
|
|
7665
7647
|
setProjects,
|
|
7666
7648
|
setRehydrated,
|
|
7667
7649
|
setStage,
|
|
@@ -7672,8 +7654,6 @@ export {
|
|
|
7672
7654
|
setTourStep,
|
|
7673
7655
|
setUploadUrl,
|
|
7674
7656
|
setUsers,
|
|
7675
|
-
setVisibleStatuses,
|
|
7676
|
-
setVisibleUserIds,
|
|
7677
7657
|
setWorkspaces,
|
|
7678
7658
|
settingReducer,
|
|
7679
7659
|
settingSlice,
|
|
@@ -7685,11 +7665,7 @@ export {
|
|
|
7685
7665
|
teamSlice,
|
|
7686
7666
|
toFileNameSafeString,
|
|
7687
7667
|
toOfflineIdRecord,
|
|
7688
|
-
toggleAssetTypeVisibility,
|
|
7689
7668
|
truncate,
|
|
7690
|
-
unhideAllCategories,
|
|
7691
|
-
unhideCategory,
|
|
7692
|
-
updateActiveOrganization,
|
|
7693
7669
|
updateAsset,
|
|
7694
7670
|
updateAssetAttachment,
|
|
7695
7671
|
updateAssetAttachments,
|
|
@@ -7708,6 +7684,8 @@ export {
|
|
|
7708
7684
|
updateFormSubmissionAttachment,
|
|
7709
7685
|
updateFormSubmissionAttachments,
|
|
7710
7686
|
updateFormSubmissions,
|
|
7687
|
+
updateGeoImage,
|
|
7688
|
+
updateGeoImages,
|
|
7711
7689
|
updateIssue,
|
|
7712
7690
|
updateIssueAttachment,
|
|
7713
7691
|
updateIssueAttachments,
|