@overmap-ai/core 1.0.51-issue-types.3 → 1.0.51-issue-types.5
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
|
@@ -4042,6 +4042,43 @@ const selectFormSubmissionsOfForm = restructureCreateSelectorWithArgs(
|
|
|
4042
4042
|
}
|
|
4043
4043
|
)
|
|
4044
4044
|
);
|
|
4045
|
+
const selectFormSubmissionsByFormRevisions = createSelector([selectFormRevisionMapping, selectFormSubmissions], (revisions, submissions) => {
|
|
4046
|
+
var _a2;
|
|
4047
|
+
const submissionMapping = {};
|
|
4048
|
+
for (const revisionId in revisions) {
|
|
4049
|
+
submissionMapping[revisionId] = [];
|
|
4050
|
+
}
|
|
4051
|
+
for (const submission of submissions) {
|
|
4052
|
+
(_a2 = submissionMapping[submission.form_revision]) == null ? void 0 : _a2.push(submission);
|
|
4053
|
+
}
|
|
4054
|
+
return submissionMapping;
|
|
4055
|
+
});
|
|
4056
|
+
const selectSortedFormSubmissionsOfForm = restructureCreateSelectorWithArgs(
|
|
4057
|
+
createSelector(
|
|
4058
|
+
[
|
|
4059
|
+
selectFormRevisionMapping,
|
|
4060
|
+
selectFormSubmissionsByFormRevisions,
|
|
4061
|
+
(_state, formId2) => formId2
|
|
4062
|
+
],
|
|
4063
|
+
(revisionsMapping, submissionsByRevision, formId2) => {
|
|
4064
|
+
const submissionsByFormRevisions = {};
|
|
4065
|
+
for (const revisionId in revisionsMapping) {
|
|
4066
|
+
const revision = revisionsMapping[revisionId];
|
|
4067
|
+
const submissionsOfRevision = submissionsByRevision[revisionId];
|
|
4068
|
+
if (revision && submissionsOfRevision && revision.form === formId2) {
|
|
4069
|
+
submissionsByFormRevisions[revisionId] = submissionsOfRevision.sort(
|
|
4070
|
+
(a, b) => a.submitted_at < b.submitted_at ? -1 : 1
|
|
4071
|
+
);
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
return Object.entries(submissionsByFormRevisions).sort((a, b) => {
|
|
4075
|
+
const aRevision = revisionsMapping[a[0]];
|
|
4076
|
+
const bRevision = revisionsMapping[b[0]];
|
|
4077
|
+
return formRevisionSortFn(aRevision, bRevision);
|
|
4078
|
+
}).map(([_revisionId, submissions]) => submissions).flat();
|
|
4079
|
+
}
|
|
4080
|
+
)
|
|
4081
|
+
);
|
|
4045
4082
|
const selectFormSubmissionsOfIssue = restructureCreateSelectorWithArgs(
|
|
4046
4083
|
createSelector(
|
|
4047
4084
|
[selectFormSubmissions, (_state, issueId) => issueId],
|
|
@@ -15052,7 +15089,7 @@ const FormBrowser = memo(
|
|
|
15052
15089
|
}, [filter, maxResults, ownerFilter]);
|
|
15053
15090
|
const userForms = useAppSelector(selectFilteredForms(ownerFilterOptions)) ?? [];
|
|
15054
15091
|
const userFormMapping = useAppSelector(selectFormMapping);
|
|
15055
|
-
const attachableUserForms = userForms.filter((form) => !form.component_type);
|
|
15092
|
+
const attachableUserForms = userForms.filter((form) => !form.component_type && !form.issue_type);
|
|
15056
15093
|
const attachableUserFormMapping = Object.values(userFormMapping).filter(
|
|
15057
15094
|
(form) => !form.component_type
|
|
15058
15095
|
);
|
|
@@ -16882,6 +16919,7 @@ export {
|
|
|
16882
16919
|
selectFormSubmissionAttachmentsMapping,
|
|
16883
16920
|
selectFormSubmissions,
|
|
16884
16921
|
selectFormSubmissionsByComponents,
|
|
16922
|
+
selectFormSubmissionsByFormRevisions,
|
|
16885
16923
|
selectFormSubmissionsMapping,
|
|
16886
16924
|
selectFormSubmissionsOfComponent,
|
|
16887
16925
|
selectFormSubmissionsOfForm,
|
|
@@ -16950,6 +16988,7 @@ export {
|
|
|
16950
16988
|
selectRootDocuments,
|
|
16951
16989
|
selectShowTooltips,
|
|
16952
16990
|
selectSortedEmailDomains,
|
|
16991
|
+
selectSortedFormSubmissionsOfForm,
|
|
16953
16992
|
selectSortedOrganizationLicenses,
|
|
16954
16993
|
selectSortedOrganizationUsers,
|
|
16955
16994
|
selectSortedProjectUsers,
|