@overmap-ai/core 1.0.48-component-type-views.0 → 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 +26 -0
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +26 -0
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/store/slices/componentSlice.d.ts +1 -0
- package/dist/store/slices/componentStageSlice.d.ts +1 -0
- package/dist/store/slices/userFormSlice.d.ts +1 -0
- package/dist/typings/models/access.d.ts +1 -1
- package/package.json +1 -1
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 [];
|
|
@@ -1807,6 +1808,11 @@ const componentStageSlice = createSlice({
|
|
|
1807
1808
|
}
|
|
1808
1809
|
});
|
|
1809
1810
|
const selectStageMapping = (state) => state.componentStageReducer.stages;
|
|
1811
|
+
const selectStage = restructureCreateSelectorWithArgs(
|
|
1812
|
+
createSelector([selectStageMapping, (_state, stageId) => stageId], (stageMapping, stageId) => {
|
|
1813
|
+
return stageMapping[stageId];
|
|
1814
|
+
})
|
|
1815
|
+
);
|
|
1810
1816
|
const selectStages = createSelector(
|
|
1811
1817
|
[selectStageMapping],
|
|
1812
1818
|
(stageMapping) => {
|
|
@@ -3701,6 +3707,23 @@ const selectSubmissionsForComponent = restructureCreateSelectorWithArgs(
|
|
|
3701
3707
|
}
|
|
3702
3708
|
)
|
|
3703
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
|
+
);
|
|
3704
3727
|
const selectUserFormMapping = (state) => {
|
|
3705
3728
|
return state.userFormReducer.userForms;
|
|
3706
3729
|
};
|
|
@@ -15799,6 +15822,7 @@ export {
|
|
|
15799
15822
|
selectCompletedStages,
|
|
15800
15823
|
selectComponent,
|
|
15801
15824
|
selectComponentAttachmentMapping,
|
|
15825
|
+
selectComponentSubmissionMapping,
|
|
15802
15826
|
selectComponentType,
|
|
15803
15827
|
selectComponentTypeAttachmentMapping,
|
|
15804
15828
|
selectComponentTypeForm,
|
|
@@ -15812,6 +15836,7 @@ export {
|
|
|
15812
15836
|
selectComponents,
|
|
15813
15837
|
selectComponentsByType,
|
|
15814
15838
|
selectComponentsFromComponentType,
|
|
15839
|
+
selectComponentsMapping,
|
|
15815
15840
|
selectCreateProjectType,
|
|
15816
15841
|
selectCurrentUser,
|
|
15817
15842
|
selectDeletedRequests,
|
|
@@ -15893,6 +15918,7 @@ export {
|
|
|
15893
15918
|
selectSortedOrganizationUsers,
|
|
15894
15919
|
selectSortedProjectUsers,
|
|
15895
15920
|
selectSortedProjects,
|
|
15921
|
+
selectStage,
|
|
15896
15922
|
selectStageFormIdsFromStageIds,
|
|
15897
15923
|
selectStageMapping,
|
|
15898
15924
|
selectStages,
|