@overmap-ai/core 1.0.48-component-type-views.1 → 1.0.48-component-type-views.2
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
|
@@ -1610,6 +1610,7 @@ const selectComponents = (state) => {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
return prevComponents;
|
|
1612
1612
|
};
|
|
1613
|
+
const selectComponentsMapping = (state) => state.componentReducer.components;
|
|
1613
1614
|
const selectComponentsFromComponentType = (componentTypeId) => (state) => {
|
|
1614
1615
|
if (!componentTypeId)
|
|
1615
1616
|
return [];
|
|
@@ -3706,6 +3707,23 @@ const selectSubmissionsForComponent = restructureCreateSelectorWithArgs(
|
|
|
3706
3707
|
}
|
|
3707
3708
|
)
|
|
3708
3709
|
);
|
|
3710
|
+
const selectComponentSubmissionMapping = createSelector(
|
|
3711
|
+
[selectSubmissionMapping, selectComponentsMapping],
|
|
3712
|
+
(submissions, components) => {
|
|
3713
|
+
var _a2;
|
|
3714
|
+
const componentSubmissionMapping = {};
|
|
3715
|
+
for (const componentId in components) {
|
|
3716
|
+
componentSubmissionMapping[componentId] = [];
|
|
3717
|
+
}
|
|
3718
|
+
for (const submissionId in submissions) {
|
|
3719
|
+
const submission = submissions[submissionId];
|
|
3720
|
+
if (submission.component) {
|
|
3721
|
+
(_a2 = componentSubmissionMapping[submission.component]) == null ? void 0 : _a2.push(submission);
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
return componentSubmissionMapping;
|
|
3725
|
+
}
|
|
3726
|
+
);
|
|
3709
3727
|
const selectUserFormMapping = (state) => {
|
|
3710
3728
|
return state.userFormReducer.userForms;
|
|
3711
3729
|
};
|
|
@@ -15804,6 +15822,7 @@ export {
|
|
|
15804
15822
|
selectCompletedStages,
|
|
15805
15823
|
selectComponent,
|
|
15806
15824
|
selectComponentAttachmentMapping,
|
|
15825
|
+
selectComponentSubmissionMapping,
|
|
15807
15826
|
selectComponentType,
|
|
15808
15827
|
selectComponentTypeAttachmentMapping,
|
|
15809
15828
|
selectComponentTypeForm,
|
|
@@ -15817,6 +15836,7 @@ export {
|
|
|
15817
15836
|
selectComponents,
|
|
15818
15837
|
selectComponentsByType,
|
|
15819
15838
|
selectComponentsFromComponentType,
|
|
15839
|
+
selectComponentsMapping,
|
|
15820
15840
|
selectCreateProjectType,
|
|
15821
15841
|
selectCurrentUser,
|
|
15822
15842
|
selectDeletedRequests,
|