@overmap-ai/core 1.0.62-store-clear-fixes.2 → 1.0.62-store-clear-fixes.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/overmap-core.js
CHANGED
|
@@ -2583,6 +2583,34 @@ const selectFormSubmissionsOfIssue = restructureCreateSelectorWithArgs(
|
|
|
2583
2583
|
}
|
|
2584
2584
|
)
|
|
2585
2585
|
);
|
|
2586
|
+
const selectAttachedFormSubmissionsOfIssue = restructureCreateSelectorWithArgs(
|
|
2587
|
+
createSelector(
|
|
2588
|
+
[
|
|
2589
|
+
(state) => state.issueReducer.instances,
|
|
2590
|
+
(state) => state.formReducer.instances,
|
|
2591
|
+
(state) => state.formRevisionReducer.instances,
|
|
2592
|
+
(state) => state.formSubmissionReducer.instances,
|
|
2593
|
+
(_state, issueId) => issueId
|
|
2594
|
+
],
|
|
2595
|
+
(issues, forms, formRevisions, submissions, issueId) => {
|
|
2596
|
+
const issue = issues[issueId];
|
|
2597
|
+
if (!issue || !issue.issue_type) {
|
|
2598
|
+
return [];
|
|
2599
|
+
}
|
|
2600
|
+
const issueTypeForms = new Set(
|
|
2601
|
+
Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
|
|
2602
|
+
);
|
|
2603
|
+
const issueTypeFormRevisions = new Set(
|
|
2604
|
+
Object.keys(formRevisions).filter(
|
|
2605
|
+
(formRevisionId) => issueTypeForms.has(formRevisions[formRevisionId].form)
|
|
2606
|
+
)
|
|
2607
|
+
);
|
|
2608
|
+
return Object.values(submissions).filter(
|
|
2609
|
+
(submission) => !issueTypeFormRevisions.has(submission.form_revision)
|
|
2610
|
+
);
|
|
2611
|
+
}
|
|
2612
|
+
)
|
|
2613
|
+
);
|
|
2586
2614
|
const selectFormSubmissionsByIssues = restructureCreateSelectorWithArgs(
|
|
2587
2615
|
createSelector(
|
|
2588
2616
|
[selectFormSubmissions, (_state, issueIds) => issueIds],
|
|
@@ -2611,6 +2639,34 @@ const selectFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
|
|
|
2611
2639
|
}
|
|
2612
2640
|
)
|
|
2613
2641
|
);
|
|
2642
|
+
const selectAttachedFormSubmissionsOfAssets = restructureCreateSelectorWithArgs(
|
|
2643
|
+
createSelector(
|
|
2644
|
+
[
|
|
2645
|
+
(state) => state.assetReducer.instances,
|
|
2646
|
+
(state) => state.formReducer.instances,
|
|
2647
|
+
(state) => state.formRevisionReducer.instances,
|
|
2648
|
+
(state) => state.formSubmissionReducer.instances,
|
|
2649
|
+
(_state, assetId) => assetId
|
|
2650
|
+
],
|
|
2651
|
+
(assets, forms, formRevisions, submissions, assetId) => {
|
|
2652
|
+
const asset = assets[assetId];
|
|
2653
|
+
if (!asset || !asset.asset_type) {
|
|
2654
|
+
return [];
|
|
2655
|
+
}
|
|
2656
|
+
const issueTypeForms = new Set(
|
|
2657
|
+
Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)
|
|
2658
|
+
);
|
|
2659
|
+
const issueTypeFormRevisions = new Set(
|
|
2660
|
+
Object.keys(formRevisions).filter(
|
|
2661
|
+
(formRevisionId) => issueTypeForms.has(formRevisions[formRevisionId].form)
|
|
2662
|
+
)
|
|
2663
|
+
);
|
|
2664
|
+
return Object.values(submissions).filter(
|
|
2665
|
+
(submission) => !issueTypeFormRevisions.has(submission.form_revision)
|
|
2666
|
+
);
|
|
2667
|
+
}
|
|
2668
|
+
)
|
|
2669
|
+
);
|
|
2614
2670
|
const selectFormSubmissionsByAssets = createSelector(
|
|
2615
2671
|
[selectFormSubmissionsMapping, selectAssetsMapping],
|
|
2616
2672
|
(submissions, assets) => {
|
|
@@ -7493,6 +7549,8 @@ export {
|
|
|
7493
7549
|
selectAssets,
|
|
7494
7550
|
selectAssetsMapping,
|
|
7495
7551
|
selectAssetsOfAssetType,
|
|
7552
|
+
selectAttachedFormSubmissionsOfAssets,
|
|
7553
|
+
selectAttachedFormSubmissionsOfIssue,
|
|
7496
7554
|
selectAttachmentsOfAsset,
|
|
7497
7555
|
selectAttachmentsOfAssetByType,
|
|
7498
7556
|
selectAttachmentsOfAssetType,
|