@overmap-ai/core 1.0.63-form-submission-fix.3 → 1.0.63-issue-association.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +243 -113
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +243 -113
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/IssueAssociationService.d.ts +9 -0
- package/dist/sdk/services/index.d.ts +1 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueAssociationSlice.d.ts +47 -0
- package/dist/store/store.d.ts +3 -2
- package/dist/typings/models/base.d.ts +1 -1
- package/dist/typings/models/issues.d.ts +12 -7
- package/dist/typings/models/store.d.ts +2 -1
- package/package.json +1 -1
|
@@ -367,15 +367,15 @@ var __publicField = (obj, key, value) => {
|
|
|
367
367
|
};
|
|
368
368
|
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
369
369
|
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
370
|
-
const initialState$
|
|
370
|
+
const initialState$C = {
|
|
371
371
|
accessToken: "",
|
|
372
372
|
refreshToken: "",
|
|
373
373
|
isLoggedIn: false
|
|
374
374
|
};
|
|
375
375
|
const authSlice = toolkit.createSlice({
|
|
376
376
|
name: "auth",
|
|
377
|
-
initialState: initialState$
|
|
378
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
377
|
+
initialState: initialState$C,
|
|
378
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$C)),
|
|
379
379
|
reducers: {
|
|
380
380
|
setTokens: (state, action) => {
|
|
381
381
|
state.accessToken = action.payload.accessToken;
|
|
@@ -845,11 +845,11 @@ var __publicField = (obj, key, value) => {
|
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
847
|
const categoryAdapter = createModelAdapter((category) => category.offline_id);
|
|
848
|
-
const initialState$
|
|
848
|
+
const initialState$B = categoryAdapter.getInitialState({});
|
|
849
849
|
const categorySlice = toolkit.createSlice({
|
|
850
850
|
name: "categories",
|
|
851
|
-
initialState: initialState$
|
|
852
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
851
|
+
initialState: initialState$B,
|
|
852
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
853
853
|
reducers: {
|
|
854
854
|
initializeCategories: categoryAdapter.initialize,
|
|
855
855
|
addCategory: categoryAdapter.addOne,
|
|
@@ -879,11 +879,11 @@ var __publicField = (obj, key, value) => {
|
|
|
879
879
|
};
|
|
880
880
|
const categoryReducer = categorySlice.reducer;
|
|
881
881
|
const assetTypeAdapter = createModelAdapter((assetType) => assetType.offline_id);
|
|
882
|
-
const initialState$
|
|
882
|
+
const initialState$A = assetTypeAdapter.getInitialState({});
|
|
883
883
|
const assetTypeSlice = toolkit.createSlice({
|
|
884
884
|
name: "assetTypes",
|
|
885
|
-
initialState: initialState$
|
|
886
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
885
|
+
initialState: initialState$A,
|
|
886
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$A)),
|
|
887
887
|
reducers: {
|
|
888
888
|
initializeAssetTypes: assetTypeAdapter.initialize,
|
|
889
889
|
addAssetType: assetTypeAdapter.addOne,
|
|
@@ -928,11 +928,11 @@ var __publicField = (obj, key, value) => {
|
|
|
928
928
|
);
|
|
929
929
|
const assetTypeReducer = assetTypeSlice.reducer;
|
|
930
930
|
const assetAdapter = createModelAdapter((asset) => asset.offline_id);
|
|
931
|
-
const initialState$
|
|
931
|
+
const initialState$z = assetAdapter.getInitialState({});
|
|
932
932
|
const assetSlice = toolkit.createSlice({
|
|
933
933
|
name: "assets",
|
|
934
|
-
initialState: initialState$
|
|
935
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
934
|
+
initialState: initialState$z,
|
|
935
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$z)),
|
|
936
936
|
reducers: {
|
|
937
937
|
initializeAssets: (state, action) => {
|
|
938
938
|
assetAdapter.initialize(state, action);
|
|
@@ -1035,11 +1035,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1035
1035
|
};
|
|
1036
1036
|
const assetReducer = assetSlice.reducer;
|
|
1037
1037
|
const assetAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
1038
|
-
const initialState$
|
|
1038
|
+
const initialState$y = assetAttachmentAdapter.getInitialState({});
|
|
1039
1039
|
const assetAttachmentSlice = toolkit.createSlice({
|
|
1040
1040
|
name: "assetAttachments",
|
|
1041
|
-
initialState: initialState$
|
|
1042
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1041
|
+
initialState: initialState$y,
|
|
1042
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$y)),
|
|
1043
1043
|
reducers: {
|
|
1044
1044
|
initializeAssetAttachments: assetAttachmentAdapter.initialize,
|
|
1045
1045
|
addAssetAttachment: assetAttachmentAdapter.addOne,
|
|
@@ -1097,13 +1097,13 @@ var __publicField = (obj, key, value) => {
|
|
|
1097
1097
|
)
|
|
1098
1098
|
);
|
|
1099
1099
|
const assetAttachmentReducer = assetAttachmentSlice.reducer;
|
|
1100
|
-
const initialState$
|
|
1100
|
+
const initialState$x = {
|
|
1101
1101
|
completionsByAssetId: {}
|
|
1102
1102
|
};
|
|
1103
1103
|
const assetStageCompletionSlice = toolkit.createSlice({
|
|
1104
1104
|
name: "assetStageCompletions",
|
|
1105
|
-
initialState: initialState$
|
|
1106
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1105
|
+
initialState: initialState$x,
|
|
1106
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$x)),
|
|
1107
1107
|
reducers: {
|
|
1108
1108
|
addStageCompletion: (state, action) => {
|
|
1109
1109
|
let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
|
|
@@ -1155,11 +1155,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1155
1155
|
);
|
|
1156
1156
|
const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
|
|
1157
1157
|
const assetStageAdapter = createModelAdapter((assetStage) => assetStage.offline_id);
|
|
1158
|
-
const initialState$
|
|
1158
|
+
const initialState$w = assetStageAdapter.getInitialState({});
|
|
1159
1159
|
const assetStageSlice = toolkit.createSlice({
|
|
1160
1160
|
name: "assetStages",
|
|
1161
|
-
initialState: initialState$
|
|
1162
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1161
|
+
initialState: initialState$w,
|
|
1162
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$w)),
|
|
1163
1163
|
reducers: {
|
|
1164
1164
|
initializeStages: assetStageAdapter.initialize,
|
|
1165
1165
|
setStage: assetStageAdapter.setOne,
|
|
@@ -1240,11 +1240,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1240
1240
|
const assetTypeAttachmentAdapter = createModelAdapter(
|
|
1241
1241
|
(attachment) => attachment.offline_id
|
|
1242
1242
|
);
|
|
1243
|
-
const initialState$
|
|
1243
|
+
const initialState$v = assetTypeAttachmentAdapter.getInitialState({});
|
|
1244
1244
|
const assetTypeAttachmentSlice = toolkit.createSlice({
|
|
1245
1245
|
name: "assetTypeAttachments",
|
|
1246
|
-
initialState: initialState$
|
|
1247
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1246
|
+
initialState: initialState$v,
|
|
1247
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$v)),
|
|
1248
1248
|
reducers: {
|
|
1249
1249
|
initializeAssetTypeAttachments: assetTypeAttachmentAdapter.initialize,
|
|
1250
1250
|
addAssetTypeAttachment: assetTypeAttachmentAdapter.addOne,
|
|
@@ -1303,10 +1303,10 @@ var __publicField = (obj, key, value) => {
|
|
|
1303
1303
|
);
|
|
1304
1304
|
const assetTypeAttachmentReducer = assetTypeAttachmentSlice.reducer;
|
|
1305
1305
|
const workspaceAdapter = createModelAdapter((workspace) => workspace.offline_id);
|
|
1306
|
-
const initialState$
|
|
1306
|
+
const initialState$u = workspaceAdapter.getInitialState({});
|
|
1307
1307
|
const workspaceSlice = toolkit.createSlice({
|
|
1308
1308
|
name: "workspace",
|
|
1309
|
-
initialState: initialState$
|
|
1309
|
+
initialState: initialState$u,
|
|
1310
1310
|
reducers: {
|
|
1311
1311
|
initializeWorkspaces: workspaceAdapter.initialize,
|
|
1312
1312
|
setWorkspaces: workspaceAdapter.setMany,
|
|
@@ -1338,14 +1338,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1338
1338
|
const workspaceReducer = workspaceSlice.reducer;
|
|
1339
1339
|
const maxRecentIssues = 10;
|
|
1340
1340
|
const issueAdapter = createModelAdapter((issue) => issue.offline_id);
|
|
1341
|
-
const initialState$
|
|
1341
|
+
const initialState$t = issueAdapter.getInitialState({
|
|
1342
1342
|
recentIssueIds: []
|
|
1343
1343
|
});
|
|
1344
1344
|
const issueSlice = toolkit.createSlice({
|
|
1345
1345
|
name: "issues",
|
|
1346
|
-
initialState: initialState$
|
|
1346
|
+
initialState: initialState$t,
|
|
1347
1347
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
1348
|
-
Object.assign(state, initialState$
|
|
1348
|
+
Object.assign(state, initialState$t);
|
|
1349
1349
|
}),
|
|
1350
1350
|
reducers: {
|
|
1351
1351
|
initializeIssues: issueAdapter.initialize,
|
|
@@ -1489,12 +1489,12 @@ var __publicField = (obj, key, value) => {
|
|
|
1489
1489
|
);
|
|
1490
1490
|
const issueReducer = issueSlice.reducer;
|
|
1491
1491
|
const issueTypeAdapter = createModelAdapter((issueType) => issueType.offline_id);
|
|
1492
|
-
const initialState$
|
|
1492
|
+
const initialState$s = issueTypeAdapter.getInitialState({});
|
|
1493
1493
|
const issueTypeSlice = toolkit.createSlice({
|
|
1494
1494
|
name: "issueTypes",
|
|
1495
|
-
initialState: initialState$
|
|
1495
|
+
initialState: initialState$s,
|
|
1496
1496
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
1497
|
-
Object.assign(state, initialState$
|
|
1497
|
+
Object.assign(state, initialState$s);
|
|
1498
1498
|
}),
|
|
1499
1499
|
reducers: {
|
|
1500
1500
|
initializeIssueTypes: issueTypeAdapter.initialize,
|
|
@@ -1543,15 +1543,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1543
1543
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
1544
1544
|
};
|
|
1545
1545
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
1546
|
-
const initialState$
|
|
1546
|
+
const initialState$r = {
|
|
1547
1547
|
s3Urls: {}
|
|
1548
1548
|
};
|
|
1549
1549
|
const msPerHour = 1e3 * 60 * 60;
|
|
1550
1550
|
const msPerWeek = msPerHour * 24 * 7;
|
|
1551
1551
|
const fileSlice = toolkit.createSlice({
|
|
1552
1552
|
name: "file",
|
|
1553
|
-
initialState: initialState$
|
|
1554
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1553
|
+
initialState: initialState$r,
|
|
1554
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
|
|
1555
1555
|
reducers: {
|
|
1556
1556
|
setUploadUrl: (state, action) => {
|
|
1557
1557
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -1632,7 +1632,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1632
1632
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
1633
1633
|
return LicenseStatus2;
|
|
1634
1634
|
})(LicenseStatus || {});
|
|
1635
|
-
const initialState$
|
|
1635
|
+
const initialState$q = {
|
|
1636
1636
|
users: {},
|
|
1637
1637
|
currentUser: {
|
|
1638
1638
|
id: 0,
|
|
@@ -1643,8 +1643,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1643
1643
|
};
|
|
1644
1644
|
const userSlice = toolkit.createSlice({
|
|
1645
1645
|
name: "users",
|
|
1646
|
-
initialState: initialState$
|
|
1647
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1646
|
+
initialState: initialState$q,
|
|
1647
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1648
1648
|
reducers: {
|
|
1649
1649
|
setUsers: (state, action) => {
|
|
1650
1650
|
const usersMapping = {};
|
|
@@ -1709,11 +1709,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1709
1709
|
const organizationAccessAdapter = createModelAdapter(
|
|
1710
1710
|
(organizationAccess) => organizationAccess.offline_id
|
|
1711
1711
|
);
|
|
1712
|
-
const initialState$
|
|
1712
|
+
const initialState$p = organizationAccessAdapter.getInitialState({});
|
|
1713
1713
|
const organizationAccessSlice = toolkit.createSlice({
|
|
1714
1714
|
name: "organizationAccess",
|
|
1715
|
-
initialState: initialState$
|
|
1716
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1715
|
+
initialState: initialState$p,
|
|
1716
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1717
1717
|
reducers: {
|
|
1718
1718
|
initializeOrganizationAccesses: organizationAccessAdapter.initialize,
|
|
1719
1719
|
updateOrganizationAccess: organizationAccessAdapter.updateOne,
|
|
@@ -1750,11 +1750,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1750
1750
|
};
|
|
1751
1751
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
1752
1752
|
const licenseAdapter = createModelAdapter((license) => license.offline_id);
|
|
1753
|
-
const initialState$
|
|
1753
|
+
const initialState$o = licenseAdapter.getInitialState({});
|
|
1754
1754
|
const licenseSlice = toolkit.createSlice({
|
|
1755
1755
|
name: "license",
|
|
1756
|
-
initialState: initialState$
|
|
1757
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1756
|
+
initialState: initialState$o,
|
|
1757
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1758
1758
|
reducers: {
|
|
1759
1759
|
initializeLicences: licenseAdapter.initialize,
|
|
1760
1760
|
addLicenses: licenseAdapter.addMany,
|
|
@@ -1780,11 +1780,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1780
1780
|
);
|
|
1781
1781
|
const licenseReducer = licenseSlice.reducer;
|
|
1782
1782
|
const projectAccessAdapter = createModelAdapter((projectAccess) => projectAccess.offline_id);
|
|
1783
|
-
const initialState$
|
|
1783
|
+
const initialState$n = projectAccessAdapter.getInitialState({});
|
|
1784
1784
|
const projectAccessSlice = toolkit.createSlice({
|
|
1785
1785
|
name: "projectAccess",
|
|
1786
|
-
initialState: initialState$
|
|
1787
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1786
|
+
initialState: initialState$n,
|
|
1787
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1788
1788
|
reducers: {
|
|
1789
1789
|
initializeProjectAccesses: projectAccessAdapter.initialize,
|
|
1790
1790
|
updateProjectAccess: projectAccessAdapter.updateOne,
|
|
@@ -1830,14 +1830,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1830
1830
|
return projectAccesses;
|
|
1831
1831
|
};
|
|
1832
1832
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
1833
|
-
const initialState$
|
|
1833
|
+
const initialState$m = {
|
|
1834
1834
|
projects: {},
|
|
1835
1835
|
activeProjectId: null
|
|
1836
1836
|
};
|
|
1837
1837
|
const projectSlice = toolkit.createSlice({
|
|
1838
1838
|
name: "projects",
|
|
1839
|
-
initialState: initialState$
|
|
1840
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1839
|
+
initialState: initialState$m,
|
|
1840
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
|
|
1841
1841
|
reducers: {
|
|
1842
1842
|
setProjects: (state, action) => {
|
|
1843
1843
|
const projectsMap = {};
|
|
@@ -1951,13 +1951,13 @@ var __publicField = (obj, key, value) => {
|
|
|
1951
1951
|
});
|
|
1952
1952
|
}
|
|
1953
1953
|
);
|
|
1954
|
-
const initialState$
|
|
1954
|
+
const initialState$l = {
|
|
1955
1955
|
organizations: {}
|
|
1956
1956
|
};
|
|
1957
1957
|
const organizationSlice = toolkit.createSlice({
|
|
1958
1958
|
name: "organizations",
|
|
1959
|
-
initialState: initialState$
|
|
1960
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1959
|
+
initialState: initialState$l,
|
|
1960
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$l)),
|
|
1961
1961
|
reducers: {
|
|
1962
1962
|
setOrganizations: (state, action) => {
|
|
1963
1963
|
for (const org of action.payload) {
|
|
@@ -2040,14 +2040,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
};
|
|
2042
2042
|
};
|
|
2043
|
-
const initialState$
|
|
2043
|
+
const initialState$k = {
|
|
2044
2044
|
deletedRequests: [],
|
|
2045
2045
|
latestRetryTime: 0
|
|
2046
2046
|
};
|
|
2047
2047
|
const outboxSlice = toolkit.createSlice({
|
|
2048
2048
|
name: "outbox",
|
|
2049
|
-
initialState: initialState$
|
|
2050
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2049
|
+
initialState: initialState$k,
|
|
2050
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$k)),
|
|
2051
2051
|
reducers: {
|
|
2052
2052
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
2053
2053
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -2079,15 +2079,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2079
2079
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
2080
2080
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
2081
2081
|
const outboxReducer = outboxSlice.reducer;
|
|
2082
|
-
const initialState$
|
|
2082
|
+
const initialState$j = {
|
|
2083
2083
|
projectFiles: {},
|
|
2084
2084
|
activeProjectFileId: null,
|
|
2085
2085
|
isImportingProjectFile: false
|
|
2086
2086
|
};
|
|
2087
2087
|
const projectFileSlice = toolkit.createSlice({
|
|
2088
2088
|
name: "projectFiles",
|
|
2089
|
-
initialState: initialState$
|
|
2090
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2089
|
+
initialState: initialState$j,
|
|
2090
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
|
|
2091
2091
|
reducers: {
|
|
2092
2092
|
addOrReplaceProjectFiles: (state, action) => {
|
|
2093
2093
|
for (let fileObj of action.payload) {
|
|
@@ -2172,11 +2172,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2172
2172
|
};
|
|
2173
2173
|
const projectFileReducer = projectFileSlice.reducer;
|
|
2174
2174
|
const projectAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
2175
|
-
const initialState$
|
|
2175
|
+
const initialState$i = projectAttachmentAdapter.getInitialState({});
|
|
2176
2176
|
const projectAttachmentSlice = toolkit.createSlice({
|
|
2177
2177
|
name: "projectAttachments",
|
|
2178
|
-
initialState: initialState$
|
|
2179
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2178
|
+
initialState: initialState$i,
|
|
2179
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2180
2180
|
reducers: {
|
|
2181
2181
|
initializeProjectAttachments: projectAttachmentAdapter.initialize,
|
|
2182
2182
|
addProjectAttachment: projectAttachmentAdapter.addOne,
|
|
@@ -2234,12 +2234,12 @@ var __publicField = (obj, key, value) => {
|
|
|
2234
2234
|
)
|
|
2235
2235
|
);
|
|
2236
2236
|
const projectAttachmentReducer = projectAttachmentSlice.reducer;
|
|
2237
|
-
const initialState$
|
|
2237
|
+
const initialState$h = {
|
|
2238
2238
|
isRehydrated: false
|
|
2239
2239
|
};
|
|
2240
2240
|
const rehydratedSlice = toolkit.createSlice({
|
|
2241
2241
|
name: "rehydrated",
|
|
2242
|
-
initialState: initialState$
|
|
2242
|
+
initialState: initialState$h,
|
|
2243
2243
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2244
2244
|
reducers: {
|
|
2245
2245
|
setRehydrated: (state, action) => {
|
|
@@ -2250,13 +2250,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2250
2250
|
const { setRehydrated } = rehydratedSlice.actions;
|
|
2251
2251
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
2252
2252
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
2253
|
-
const initialState$
|
|
2253
|
+
const initialState$g = {
|
|
2254
2254
|
isFetchingInitialData: false
|
|
2255
2255
|
};
|
|
2256
2256
|
const settingSlice = toolkit.createSlice({
|
|
2257
2257
|
name: "settings",
|
|
2258
|
-
initialState: initialState$
|
|
2259
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2258
|
+
initialState: initialState$g,
|
|
2259
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
|
|
2260
2260
|
reducers: {
|
|
2261
2261
|
setIsFetchingInitialData: (state, action) => {
|
|
2262
2262
|
state.isFetchingInitialData = action.payload;
|
|
@@ -2280,11 +2280,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2280
2280
|
}
|
|
2281
2281
|
};
|
|
2282
2282
|
const formRevisionAdapter = createModelAdapter((revision) => revision.offline_id);
|
|
2283
|
-
const initialState$
|
|
2283
|
+
const initialState$f = formRevisionAdapter.getInitialState({});
|
|
2284
2284
|
const formRevisionsSlice = toolkit.createSlice({
|
|
2285
2285
|
name: "formRevisions",
|
|
2286
|
-
initialState: initialState$
|
|
2287
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2286
|
+
initialState: initialState$f,
|
|
2287
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2288
2288
|
reducers: {
|
|
2289
2289
|
initializeFormRevisions: formRevisionAdapter.initialize,
|
|
2290
2290
|
setFormRevision: formRevisionAdapter.setOne,
|
|
@@ -2384,11 +2384,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2384
2384
|
});
|
|
2385
2385
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
2386
2386
|
const formAdapter = createModelAdapter((form) => form.offline_id);
|
|
2387
|
-
const initialState$
|
|
2387
|
+
const initialState$e = formAdapter.getInitialState({});
|
|
2388
2388
|
const formSlice = toolkit.createSlice({
|
|
2389
2389
|
name: "forms",
|
|
2390
|
-
initialState: initialState$
|
|
2391
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2390
|
+
initialState: initialState$e,
|
|
2391
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2392
2392
|
reducers: {
|
|
2393
2393
|
initializeForms: formAdapter.initialize,
|
|
2394
2394
|
setForm: formAdapter.setOne,
|
|
@@ -2468,11 +2468,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2468
2468
|
});
|
|
2469
2469
|
const formReducer = formSlice.reducer;
|
|
2470
2470
|
const submissionAdapter = createModelAdapter((submission) => submission.offline_id);
|
|
2471
|
-
const initialState$
|
|
2471
|
+
const initialState$d = submissionAdapter.getInitialState({});
|
|
2472
2472
|
const formSubmissionSlice = toolkit.createSlice({
|
|
2473
2473
|
name: "formSubmissions",
|
|
2474
|
-
initialState: initialState$
|
|
2475
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2474
|
+
initialState: initialState$d,
|
|
2475
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
|
|
2476
2476
|
reducers: {
|
|
2477
2477
|
initializeFormSubmissions: submissionAdapter.initialize,
|
|
2478
2478
|
setFormSubmission: submissionAdapter.setOne,
|
|
@@ -2582,8 +2582,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2582
2582
|
],
|
|
2583
2583
|
(issues, forms, formRevisions, submissions, issueId) => {
|
|
2584
2584
|
const issue = issues[issueId];
|
|
2585
|
-
if (!issue
|
|
2585
|
+
if (!issue)
|
|
2586
2586
|
return [];
|
|
2587
|
+
if (!issue.issue_type) {
|
|
2588
|
+
return Object.values(submissions).filter((submission) => submission.issue === issueId);
|
|
2587
2589
|
}
|
|
2588
2590
|
const issueTypeForms = new Set(
|
|
2589
2591
|
Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
|
|
@@ -2638,8 +2640,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2638
2640
|
],
|
|
2639
2641
|
(assets, forms, formRevisions, submissions, assetId) => {
|
|
2640
2642
|
const asset = assets[assetId];
|
|
2641
|
-
if (!asset
|
|
2643
|
+
if (!asset)
|
|
2642
2644
|
return [];
|
|
2645
|
+
if (!asset.asset_type) {
|
|
2646
|
+
return Object.values(submissions).filter((submission) => submission.asset === assetId);
|
|
2643
2647
|
}
|
|
2644
2648
|
const issueTypeForms = new Set(
|
|
2645
2649
|
Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)
|
|
@@ -2676,11 +2680,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2676
2680
|
const formSubmissionAttachmentAdapter = createModelAdapter(
|
|
2677
2681
|
(attachment) => attachment.offline_id
|
|
2678
2682
|
);
|
|
2679
|
-
const initialState$
|
|
2683
|
+
const initialState$c = formSubmissionAttachmentAdapter.getInitialState({});
|
|
2680
2684
|
const formSubmissionAttachmentSlice = toolkit.createSlice({
|
|
2681
2685
|
name: "formSubmissionAttachments",
|
|
2682
|
-
initialState: initialState$
|
|
2683
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2686
|
+
initialState: initialState$c,
|
|
2687
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
|
|
2684
2688
|
reducers: {
|
|
2685
2689
|
initializeFormSubmissionAttachments: formSubmissionAttachmentAdapter.initialize,
|
|
2686
2690
|
addFormSubmissionAttachment: formSubmissionAttachmentAdapter.addOne,
|
|
@@ -2719,11 +2723,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2719
2723
|
const formRevisionAttachmentAdapter = createModelAdapter(
|
|
2720
2724
|
(attachment) => attachment.offline_id
|
|
2721
2725
|
);
|
|
2722
|
-
const initialState$
|
|
2726
|
+
const initialState$b = formRevisionAttachmentAdapter.getInitialState({});
|
|
2723
2727
|
const formRevisionAttachmentSlice = toolkit.createSlice({
|
|
2724
2728
|
name: "formRevisionAttachments",
|
|
2725
|
-
initialState: initialState$
|
|
2726
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2729
|
+
initialState: initialState$b,
|
|
2730
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
2727
2731
|
reducers: {
|
|
2728
2732
|
initializeFormRevisionAttachments: formRevisionAttachmentAdapter.initialize,
|
|
2729
2733
|
addFormRevisionAttachment: formRevisionAttachmentAdapter.addOne,
|
|
@@ -2760,10 +2764,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2760
2764
|
);
|
|
2761
2765
|
const formRevisionAttachmentReducer = formRevisionAttachmentSlice.reducer;
|
|
2762
2766
|
const emailDomainAdapter = createModelAdapter((emailDomain) => emailDomain.offline_id);
|
|
2763
|
-
const initialState$
|
|
2767
|
+
const initialState$a = emailDomainAdapter.getInitialState({});
|
|
2764
2768
|
const emailDomainsSlice = toolkit.createSlice({
|
|
2765
2769
|
name: "emailDomains",
|
|
2766
|
-
initialState: initialState$
|
|
2770
|
+
initialState: initialState$a,
|
|
2767
2771
|
reducers: {
|
|
2768
2772
|
initializeEmailDomains: emailDomainAdapter.initialize,
|
|
2769
2773
|
addEmailDomain: emailDomainAdapter.addOne,
|
|
@@ -2782,14 +2786,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2782
2786
|
)
|
|
2783
2787
|
);
|
|
2784
2788
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
2785
|
-
const initialState$
|
|
2789
|
+
const initialState$9 = {
|
|
2786
2790
|
documents: {}
|
|
2787
2791
|
};
|
|
2788
2792
|
const documentSlice = toolkit.createSlice({
|
|
2789
2793
|
name: "documents",
|
|
2790
|
-
initialState: initialState$
|
|
2794
|
+
initialState: initialState$9,
|
|
2791
2795
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2792
|
-
Object.assign(state, initialState$
|
|
2796
|
+
Object.assign(state, initialState$9);
|
|
2793
2797
|
}),
|
|
2794
2798
|
reducers: {
|
|
2795
2799
|
setDocuments: (state, action) => {
|
|
@@ -2964,11 +2968,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2964
2968
|
);
|
|
2965
2969
|
const documentsReducer = documentSlice.reducer;
|
|
2966
2970
|
const documentAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
2967
|
-
const initialState$
|
|
2971
|
+
const initialState$8 = documentAttachmentAdapter.getInitialState({});
|
|
2968
2972
|
const documentAttachmentSlice = toolkit.createSlice({
|
|
2969
2973
|
name: "documentAttachments",
|
|
2970
|
-
initialState: initialState$
|
|
2971
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2974
|
+
initialState: initialState$8,
|
|
2975
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$8)),
|
|
2972
2976
|
reducers: {
|
|
2973
2977
|
initializeDocumentAttachments: documentAttachmentAdapter.initialize,
|
|
2974
2978
|
addDocumentAttachment: documentAttachmentAdapter.addOne,
|
|
@@ -3027,11 +3031,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3027
3031
|
);
|
|
3028
3032
|
const documentAttachmentReducer = documentAttachmentSlice.reducer;
|
|
3029
3033
|
const teamAdapter = createModelAdapter((team) => team.offline_id);
|
|
3030
|
-
const initialState$
|
|
3034
|
+
const initialState$7 = teamAdapter.getInitialState({});
|
|
3031
3035
|
const teamSlice = toolkit.createSlice({
|
|
3032
3036
|
name: "teams",
|
|
3033
|
-
initialState: initialState$
|
|
3034
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3037
|
+
initialState: initialState$7,
|
|
3038
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3035
3039
|
reducers: {
|
|
3036
3040
|
setTeam: teamAdapter.setOne,
|
|
3037
3041
|
initializeTeams: teamAdapter.initialize,
|
|
@@ -3065,11 +3069,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3065
3069
|
const agentUserConversationAdapter = createModelAdapter(
|
|
3066
3070
|
(conversation) => conversation.offline_id
|
|
3067
3071
|
);
|
|
3068
|
-
const initialState$
|
|
3072
|
+
const initialState$6 = agentUserConversationAdapter.getInitialState({});
|
|
3069
3073
|
const agentsSlice = toolkit.createSlice({
|
|
3070
3074
|
name: "agents",
|
|
3071
|
-
initialState: initialState$
|
|
3072
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3075
|
+
initialState: initialState$6,
|
|
3076
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3073
3077
|
reducers: {
|
|
3074
3078
|
initializeConversations: agentUserConversationAdapter.initialize,
|
|
3075
3079
|
addConversation: agentUserConversationAdapter.addOne,
|
|
@@ -3091,11 +3095,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3091
3095
|
);
|
|
3092
3096
|
const agentsReducer = agentsSlice.reducer;
|
|
3093
3097
|
const issueCommentAdapter = createModelAdapter((comment) => comment.offline_id);
|
|
3094
|
-
const initialState$
|
|
3098
|
+
const initialState$5 = issueCommentAdapter.getInitialState({});
|
|
3095
3099
|
const issueCommentSlice = toolkit.createSlice({
|
|
3096
3100
|
name: "issueComments",
|
|
3097
|
-
initialState: initialState$
|
|
3098
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3101
|
+
initialState: initialState$5,
|
|
3102
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3099
3103
|
reducers: {
|
|
3100
3104
|
addIssueComment: issueCommentAdapter.addOne,
|
|
3101
3105
|
addIssueComments: issueCommentAdapter.addMany,
|
|
@@ -3124,11 +3128,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3124
3128
|
);
|
|
3125
3129
|
const issueCommentReducer = issueCommentSlice.reducer;
|
|
3126
3130
|
const issueUpdateAdapter = createModelAdapter((issueUpdate) => issueUpdate.offline_id);
|
|
3127
|
-
const initialState$
|
|
3131
|
+
const initialState$4 = issueUpdateAdapter.getInitialState({});
|
|
3128
3132
|
const issueUpdateSlice = toolkit.createSlice({
|
|
3129
3133
|
name: "issueUpdates",
|
|
3130
|
-
initialState: initialState$
|
|
3131
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3134
|
+
initialState: initialState$4,
|
|
3135
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
|
|
3132
3136
|
reducers: {
|
|
3133
3137
|
initializeIssueUpdates: issueUpdateAdapter.setMany,
|
|
3134
3138
|
setIssueUpdate: issueUpdateAdapter.setOne,
|
|
@@ -3157,11 +3161,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3157
3161
|
);
|
|
3158
3162
|
const issueUpdateReducer = issueUpdateSlice.reducer;
|
|
3159
3163
|
const issueAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
3160
|
-
const initialState$
|
|
3164
|
+
const initialState$3 = issueAttachmentAdapter.getInitialState({});
|
|
3161
3165
|
const issueAttachmentSlice = toolkit.createSlice({
|
|
3162
3166
|
name: "issueAttachments",
|
|
3163
|
-
initialState: initialState$
|
|
3164
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3167
|
+
initialState: initialState$3,
|
|
3168
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$3)),
|
|
3165
3169
|
reducers: {
|
|
3166
3170
|
initializeIssueAttachments: issueAttachmentAdapter.initialize,
|
|
3167
3171
|
addIssueAttachment: issueAttachmentAdapter.addOne,
|
|
@@ -3219,23 +3223,23 @@ var __publicField = (obj, key, value) => {
|
|
|
3219
3223
|
)
|
|
3220
3224
|
);
|
|
3221
3225
|
const issueAttachmentReducer = issueAttachmentSlice.reducer;
|
|
3222
|
-
const initialState$
|
|
3226
|
+
const initialState$2 = {
|
|
3223
3227
|
version: 0
|
|
3224
3228
|
};
|
|
3225
3229
|
const versioningSlice = toolkit.createSlice({
|
|
3226
3230
|
name: "versioning",
|
|
3227
|
-
initialState: initialState$
|
|
3231
|
+
initialState: initialState$2,
|
|
3228
3232
|
reducers: {}
|
|
3229
3233
|
});
|
|
3230
3234
|
const versioningReducer = versioningSlice.reducer;
|
|
3231
3235
|
const geoImageAdapter = createModelAdapter((model) => model.offline_id);
|
|
3232
|
-
const initialState = geoImageAdapter.getInitialState({});
|
|
3236
|
+
const initialState$1 = geoImageAdapter.getInitialState({});
|
|
3233
3237
|
const geoImageSlice = toolkit.createSlice({
|
|
3234
3238
|
name: "geoImages",
|
|
3235
|
-
initialState,
|
|
3239
|
+
initialState: initialState$1,
|
|
3236
3240
|
extraReducers: (builder) => {
|
|
3237
3241
|
builder.addCase("RESET", (state) => {
|
|
3238
|
-
Object.assign(state, initialState);
|
|
3242
|
+
Object.assign(state, initialState$1);
|
|
3239
3243
|
});
|
|
3240
3244
|
},
|
|
3241
3245
|
reducers: {
|
|
@@ -3272,6 +3276,50 @@ var __publicField = (obj, key, value) => {
|
|
|
3272
3276
|
})
|
|
3273
3277
|
);
|
|
3274
3278
|
const geoImageReducer = geoImageSlice.reducer;
|
|
3279
|
+
const issueAssociationAdapter = createModelAdapter((assoc) => assoc.offline_id);
|
|
3280
|
+
const initialState = issueAssociationAdapter.getInitialState({});
|
|
3281
|
+
const issueAssociationSlice = toolkit.createSlice({
|
|
3282
|
+
name: "issueAssociations",
|
|
3283
|
+
initialState,
|
|
3284
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState)),
|
|
3285
|
+
reducers: {
|
|
3286
|
+
initializeIssueAssociations: issueAssociationAdapter.initialize,
|
|
3287
|
+
addIssueAssociation: issueAssociationAdapter.addOne,
|
|
3288
|
+
addIssueAssociations: issueAssociationAdapter.addMany,
|
|
3289
|
+
setIssueAssociation: issueAssociationAdapter.setOne,
|
|
3290
|
+
setIssueAssociations: issueAssociationAdapter.setMany,
|
|
3291
|
+
updateIssueAssociation: issueAssociationAdapter.updateOne,
|
|
3292
|
+
updateIssueAssociations: issueAssociationAdapter.updateMany,
|
|
3293
|
+
deleteIssueAssociation: issueAssociationAdapter.deleteOne,
|
|
3294
|
+
deleteIssueAssociations: issueAssociationAdapter.deleteMany
|
|
3295
|
+
}
|
|
3296
|
+
});
|
|
3297
|
+
const {
|
|
3298
|
+
initializeIssueAssociations,
|
|
3299
|
+
setIssueAssociations,
|
|
3300
|
+
setIssueAssociation,
|
|
3301
|
+
updateIssueAssociation,
|
|
3302
|
+
updateIssueAssociations,
|
|
3303
|
+
addIssueAssociation,
|
|
3304
|
+
addIssueAssociations,
|
|
3305
|
+
deleteIssueAssociation,
|
|
3306
|
+
deleteIssueAssociations
|
|
3307
|
+
} = issueAssociationSlice.actions;
|
|
3308
|
+
const selectIssueAssociationMapping = (state) => state.issueAssociationReducer.instances;
|
|
3309
|
+
const selectIssueAssociationById = (id) => (state) => {
|
|
3310
|
+
return state.issueAssociationReducer.instances[id];
|
|
3311
|
+
};
|
|
3312
|
+
const selectAssociationsOfIssue = restructureCreateSelectorWithArgs(
|
|
3313
|
+
toolkit.createSelector(
|
|
3314
|
+
[selectIssueAssociationMapping, (_state, issueId) => issueId],
|
|
3315
|
+
(associationMapping, issueId) => {
|
|
3316
|
+
return Object.values(associationMapping).filter(
|
|
3317
|
+
(assoc) => assoc.issue === issueId
|
|
3318
|
+
);
|
|
3319
|
+
}
|
|
3320
|
+
)
|
|
3321
|
+
);
|
|
3322
|
+
const issueAssociationReducer = issueAssociationSlice.reducer;
|
|
3275
3323
|
const fullAssetMarkerSize = 45;
|
|
3276
3324
|
const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
|
|
3277
3325
|
const DEFAULT_ISSUE_PRIORITY = IssuePriority.MEDIUM;
|
|
@@ -3344,7 +3392,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3344
3392
|
agentsReducer,
|
|
3345
3393
|
issueCommentReducer,
|
|
3346
3394
|
issueUpdateReducer,
|
|
3347
|
-
geoImageReducer
|
|
3395
|
+
geoImageReducer,
|
|
3396
|
+
issueAssociationReducer
|
|
3348
3397
|
};
|
|
3349
3398
|
const overmapReducer = toolkit.combineReducers(overmapReducers);
|
|
3350
3399
|
const resetStore = "RESET";
|
|
@@ -7229,6 +7278,72 @@ var __publicField = (obj, key, value) => {
|
|
|
7229
7278
|
store.dispatch(initializeGeoImages(result));
|
|
7230
7279
|
}
|
|
7231
7280
|
}
|
|
7281
|
+
class IssueAssociationSlice extends BaseUploadService {
|
|
7282
|
+
add(payload) {
|
|
7283
|
+
const { store } = this.client;
|
|
7284
|
+
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7285
|
+
const createdBy = store.getState().userReducer.currentUser.id;
|
|
7286
|
+
const offlineIssueAssociation = offline({
|
|
7287
|
+
...payload,
|
|
7288
|
+
submitted_at: submittedAt,
|
|
7289
|
+
created_by: createdBy
|
|
7290
|
+
});
|
|
7291
|
+
this.dispatch(addIssueAssociation(offlineIssueAssociation));
|
|
7292
|
+
const promise = this.enqueueRequest({
|
|
7293
|
+
description: "Add issue association",
|
|
7294
|
+
method: HttpMethod.POST,
|
|
7295
|
+
url: "/issues/associations/",
|
|
7296
|
+
payload: {
|
|
7297
|
+
offline_id: offlineIssueAssociation.offline_id,
|
|
7298
|
+
submitted_at: submittedAt,
|
|
7299
|
+
created_by: createdBy,
|
|
7300
|
+
...payload
|
|
7301
|
+
},
|
|
7302
|
+
blockers: [
|
|
7303
|
+
payload.associated_issue,
|
|
7304
|
+
...payload.issue ? [payload.issue] : [],
|
|
7305
|
+
...payload.asset ? [payload.asset] : []
|
|
7306
|
+
],
|
|
7307
|
+
blocks: [offlineIssueAssociation.offline_id]
|
|
7308
|
+
});
|
|
7309
|
+
promise.then((issueAssociation) => {
|
|
7310
|
+
this.dispatch(updateIssueAssociation(issueAssociation));
|
|
7311
|
+
}).catch(() => {
|
|
7312
|
+
this.dispatch(deleteIssueAssociation(offlineIssueAssociation.offline_id));
|
|
7313
|
+
});
|
|
7314
|
+
return [offlineIssueAssociation, promise];
|
|
7315
|
+
}
|
|
7316
|
+
async delete(id) {
|
|
7317
|
+
const { store } = this.client;
|
|
7318
|
+
const issueAssociation = selectIssueAssociationById(id)(store.getState());
|
|
7319
|
+
if (!issueAssociation) {
|
|
7320
|
+
throw new Error(`Issue association with id ${id} not found in store.`);
|
|
7321
|
+
}
|
|
7322
|
+
this.dispatch(deleteIssueAssociation(id));
|
|
7323
|
+
const promise = this.enqueueRequest({
|
|
7324
|
+
description: "Delete issue association",
|
|
7325
|
+
method: HttpMethod.DELETE,
|
|
7326
|
+
url: `/issues/associations/${id}/`,
|
|
7327
|
+
blockers: [id],
|
|
7328
|
+
blocks: []
|
|
7329
|
+
});
|
|
7330
|
+
promise.catch(() => {
|
|
7331
|
+
this.dispatch(addIssueAssociation(issueAssociation));
|
|
7332
|
+
});
|
|
7333
|
+
return promise;
|
|
7334
|
+
}
|
|
7335
|
+
async refreshStore(projectId) {
|
|
7336
|
+
const issueAssociations = await this.enqueueRequest({
|
|
7337
|
+
description: "Fetch issue associations",
|
|
7338
|
+
method: HttpMethod.GET,
|
|
7339
|
+
url: "/issues/associations/",
|
|
7340
|
+
queryParams: { project_id: projectId.toString() },
|
|
7341
|
+
blockers: [],
|
|
7342
|
+
blocks: []
|
|
7343
|
+
});
|
|
7344
|
+
this.dispatch(initializeIssueAssociations(issueAssociations));
|
|
7345
|
+
}
|
|
7346
|
+
}
|
|
7232
7347
|
exports2.APIError = APIError;
|
|
7233
7348
|
exports2.AgentService = AgentService;
|
|
7234
7349
|
exports2.AssetAttachmentService = AssetAttachmentService;
|
|
@@ -7256,6 +7371,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7256
7371
|
exports2.GREEN = GREEN;
|
|
7257
7372
|
exports2.GeoImageService = GeoImageService;
|
|
7258
7373
|
exports2.HttpMethod = HttpMethod;
|
|
7374
|
+
exports2.IssueAssociationSlice = IssueAssociationSlice;
|
|
7259
7375
|
exports2.IssueAttachmentService = IssueAttachmentService;
|
|
7260
7376
|
exports2.IssueCommentService = IssueCommentService;
|
|
7261
7377
|
exports2.IssuePriority = IssuePriority;
|
|
@@ -7317,6 +7433,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7317
7433
|
exports2.addGeoImage = addGeoImage;
|
|
7318
7434
|
exports2.addGeoImages = addGeoImages;
|
|
7319
7435
|
exports2.addIssue = addIssue;
|
|
7436
|
+
exports2.addIssueAssociation = addIssueAssociation;
|
|
7437
|
+
exports2.addIssueAssociations = addIssueAssociations;
|
|
7320
7438
|
exports2.addIssueAttachment = addIssueAttachment;
|
|
7321
7439
|
exports2.addIssueAttachments = addIssueAttachments;
|
|
7322
7440
|
exports2.addIssueComment = addIssueComment;
|
|
@@ -7394,6 +7512,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7394
7512
|
exports2.deleteGeoImage = deleteGeoImage;
|
|
7395
7513
|
exports2.deleteGeoImages = deleteGeoImages;
|
|
7396
7514
|
exports2.deleteIssue = deleteIssue;
|
|
7515
|
+
exports2.deleteIssueAssociation = deleteIssueAssociation;
|
|
7516
|
+
exports2.deleteIssueAssociations = deleteIssueAssociations;
|
|
7397
7517
|
exports2.deleteIssueAttachment = deleteIssueAttachment;
|
|
7398
7518
|
exports2.deleteIssueAttachments = deleteIssueAttachments;
|
|
7399
7519
|
exports2.deleteIssueComment = deleteIssueComment;
|
|
@@ -7466,6 +7586,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7466
7586
|
exports2.initializeFormSubmissions = initializeFormSubmissions;
|
|
7467
7587
|
exports2.initializeForms = initializeForms;
|
|
7468
7588
|
exports2.initializeGeoImages = initializeGeoImages;
|
|
7589
|
+
exports2.initializeIssueAssociations = initializeIssueAssociations;
|
|
7469
7590
|
exports2.initializeIssueAttachments = initializeIssueAttachments;
|
|
7470
7591
|
exports2.initializeIssueTypes = initializeIssueTypes;
|
|
7471
7592
|
exports2.initializeIssueUpdates = initializeIssueUpdates;
|
|
@@ -7478,6 +7599,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7478
7599
|
exports2.initializeTeams = initializeTeams;
|
|
7479
7600
|
exports2.initializeWorkspaces = initializeWorkspaces;
|
|
7480
7601
|
exports2.isToday = isToday;
|
|
7602
|
+
exports2.issueAssociationReducer = issueAssociationReducer;
|
|
7603
|
+
exports2.issueAssociationSlice = issueAssociationSlice;
|
|
7481
7604
|
exports2.issueAttachmentReducer = issueAttachmentReducer;
|
|
7482
7605
|
exports2.issueAttachmentSlice = issueAttachmentSlice;
|
|
7483
7606
|
exports2.issueCommentReducer = issueCommentReducer;
|
|
@@ -7567,6 +7690,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7567
7690
|
exports2.selectAssets = selectAssets;
|
|
7568
7691
|
exports2.selectAssetsMapping = selectAssetsMapping;
|
|
7569
7692
|
exports2.selectAssetsOfAssetType = selectAssetsOfAssetType;
|
|
7693
|
+
exports2.selectAssociationsOfIssue = selectAssociationsOfIssue;
|
|
7570
7694
|
exports2.selectAttachedFormSubmissionsOfAsset = selectAttachedFormSubmissionsOfAsset;
|
|
7571
7695
|
exports2.selectAttachedFormSubmissionsOfIssue = selectAttachedFormSubmissionsOfIssue;
|
|
7572
7696
|
exports2.selectAttachmentsOfAsset = selectAttachmentsOfAsset;
|
|
@@ -7633,6 +7757,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7633
7757
|
exports2.selectIsImportingProjectFile = selectIsImportingProjectFile;
|
|
7634
7758
|
exports2.selectIsLoggedIn = selectIsLoggedIn;
|
|
7635
7759
|
exports2.selectIssue = selectIssue;
|
|
7760
|
+
exports2.selectIssueAssociationById = selectIssueAssociationById;
|
|
7761
|
+
exports2.selectIssueAssociationMapping = selectIssueAssociationMapping;
|
|
7636
7762
|
exports2.selectIssueAttachment = selectIssueAttachment;
|
|
7637
7763
|
exports2.selectIssueAttachmentMapping = selectIssueAttachmentMapping;
|
|
7638
7764
|
exports2.selectIssueAttachments = selectIssueAttachments;
|
|
@@ -7737,6 +7863,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7737
7863
|
exports2.setGeoImages = setGeoImages;
|
|
7738
7864
|
exports2.setIsFetchingInitialData = setIsFetchingInitialData;
|
|
7739
7865
|
exports2.setIsImportingProjectFile = setIsImportingProjectFile;
|
|
7866
|
+
exports2.setIssueAssociation = setIssueAssociation;
|
|
7867
|
+
exports2.setIssueAssociations = setIssueAssociations;
|
|
7740
7868
|
exports2.setIssueAttachment = setIssueAttachment;
|
|
7741
7869
|
exports2.setIssueAttachments = setIssueAttachments;
|
|
7742
7870
|
exports2.setIssueComment = setIssueComment;
|
|
@@ -7790,6 +7918,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7790
7918
|
exports2.updateGeoImage = updateGeoImage;
|
|
7791
7919
|
exports2.updateGeoImages = updateGeoImages;
|
|
7792
7920
|
exports2.updateIssue = updateIssue;
|
|
7921
|
+
exports2.updateIssueAssociation = updateIssueAssociation;
|
|
7922
|
+
exports2.updateIssueAssociations = updateIssueAssociations;
|
|
7793
7923
|
exports2.updateIssueAttachment = updateIssueAttachment;
|
|
7794
7924
|
exports2.updateIssueAttachments = updateIssueAttachments;
|
|
7795
7925
|
exports2.updateIssueType = updateIssueType;
|