@overmap-ai/core 1.0.62-store-clear-fixes.2 → 1.0.62-store-clear-fixes.4
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.
|
@@ -2571,6 +2571,34 @@ var __publicField = (obj, key, value) => {
|
|
|
2571
2571
|
}
|
|
2572
2572
|
)
|
|
2573
2573
|
);
|
|
2574
|
+
const selectAttachedFormSubmissionsOfIssue = restructureCreateSelectorWithArgs(
|
|
2575
|
+
toolkit.createSelector(
|
|
2576
|
+
[
|
|
2577
|
+
(state) => state.issueReducer.instances,
|
|
2578
|
+
(state) => state.formReducer.instances,
|
|
2579
|
+
(state) => state.formRevisionReducer.instances,
|
|
2580
|
+
(state) => state.formSubmissionReducer.instances,
|
|
2581
|
+
(_state, issueId) => issueId
|
|
2582
|
+
],
|
|
2583
|
+
(issues, forms, formRevisions, submissions, issueId) => {
|
|
2584
|
+
const issue = issues[issueId];
|
|
2585
|
+
if (!issue || !issue.issue_type) {
|
|
2586
|
+
return [];
|
|
2587
|
+
}
|
|
2588
|
+
const issueTypeForms = new Set(
|
|
2589
|
+
Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
|
|
2590
|
+
);
|
|
2591
|
+
const issueTypeFormRevisions = new Set(
|
|
2592
|
+
Object.keys(formRevisions).filter(
|
|
2593
|
+
(formRevisionId) => issueTypeForms.has(formRevisions[formRevisionId].form)
|
|
2594
|
+
)
|
|
2595
|
+
);
|
|
2596
|
+
return Object.values(submissions).filter(
|
|
2597
|
+
(submission) => submission.issue === issueId && !issueTypeFormRevisions.has(submission.form_revision)
|
|
2598
|
+
);
|
|
2599
|
+
}
|
|
2600
|
+
)
|
|
2601
|
+
);
|
|
2574
2602
|
const selectFormSubmissionsByIssues = restructureCreateSelectorWithArgs(
|
|
2575
2603
|
toolkit.createSelector(
|
|
2576
2604
|
[selectFormSubmissions, (_state, issueIds) => issueIds],
|
|
@@ -2599,6 +2627,34 @@ var __publicField = (obj, key, value) => {
|
|
|
2599
2627
|
}
|
|
2600
2628
|
)
|
|
2601
2629
|
);
|
|
2630
|
+
const selectAttachedFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
|
|
2631
|
+
toolkit.createSelector(
|
|
2632
|
+
[
|
|
2633
|
+
(state) => state.assetReducer.instances,
|
|
2634
|
+
(state) => state.formReducer.instances,
|
|
2635
|
+
(state) => state.formRevisionReducer.instances,
|
|
2636
|
+
(state) => state.formSubmissionReducer.instances,
|
|
2637
|
+
(_state, assetId) => assetId
|
|
2638
|
+
],
|
|
2639
|
+
(assets, forms, formRevisions, submissions, assetId) => {
|
|
2640
|
+
const asset = assets[assetId];
|
|
2641
|
+
if (!asset || !asset.asset_type) {
|
|
2642
|
+
return [];
|
|
2643
|
+
}
|
|
2644
|
+
const issueTypeForms = new Set(
|
|
2645
|
+
Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)
|
|
2646
|
+
);
|
|
2647
|
+
const issueTypeFormRevisions = new Set(
|
|
2648
|
+
Object.keys(formRevisions).filter(
|
|
2649
|
+
(formRevisionId) => issueTypeForms.has(formRevisions[formRevisionId].form)
|
|
2650
|
+
)
|
|
2651
|
+
);
|
|
2652
|
+
return Object.values(submissions).filter(
|
|
2653
|
+
(submission) => submission.asset === assetId && !issueTypeFormRevisions.has(submission.form_revision)
|
|
2654
|
+
);
|
|
2655
|
+
}
|
|
2656
|
+
)
|
|
2657
|
+
);
|
|
2602
2658
|
const selectFormSubmissionsByAssets = toolkit.createSelector(
|
|
2603
2659
|
[selectFormSubmissionsMapping, selectAssetsMapping],
|
|
2604
2660
|
(submissions, assets) => {
|
|
@@ -7480,6 +7536,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7480
7536
|
exports2.selectAssets = selectAssets;
|
|
7481
7537
|
exports2.selectAssetsMapping = selectAssetsMapping;
|
|
7482
7538
|
exports2.selectAssetsOfAssetType = selectAssetsOfAssetType;
|
|
7539
|
+
exports2.selectAttachedFormSubmissionsOfAsset = selectAttachedFormSubmissionsOfAsset;
|
|
7540
|
+
exports2.selectAttachedFormSubmissionsOfIssue = selectAttachedFormSubmissionsOfIssue;
|
|
7483
7541
|
exports2.selectAttachmentsOfAsset = selectAttachmentsOfAsset;
|
|
7484
7542
|
exports2.selectAttachmentsOfAssetByType = selectAttachmentsOfAssetByType;
|
|
7485
7543
|
exports2.selectAttachmentsOfAssetType = selectAttachmentsOfAssetType;
|