@overmap-ai/core 1.0.46-project-attachments.8 → 1.0.46-project-attachments.10
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.
|
@@ -3816,6 +3816,20 @@ var __publicField = (obj, key, value) => {
|
|
|
3816
3816
|
(mapping, documentId) => mapping[documentId]
|
|
3817
3817
|
)
|
|
3818
3818
|
);
|
|
3819
|
+
const selectAncestorIdsOfDocument = restructureCreateSelectorWithArgs(
|
|
3820
|
+
toolkit.createSelector([selectDocumentsMapping, (_state, documentId) => documentId], (mapping, documentId) => {
|
|
3821
|
+
const listOfAncestors = [];
|
|
3822
|
+
const document2 = mapping[documentId];
|
|
3823
|
+
if (!document2 || !document2.parent_document)
|
|
3824
|
+
return listOfAncestors;
|
|
3825
|
+
let currentAncestor = mapping[document2.parent_document];
|
|
3826
|
+
while (currentAncestor) {
|
|
3827
|
+
listOfAncestors.push(currentAncestor.offline_id);
|
|
3828
|
+
currentAncestor = mapping[currentAncestor.parent_document ?? ""];
|
|
3829
|
+
}
|
|
3830
|
+
return listOfAncestors;
|
|
3831
|
+
})
|
|
3832
|
+
);
|
|
3819
3833
|
const selectRootDocuments = toolkit.createSelector(
|
|
3820
3834
|
[selectDocuments],
|
|
3821
3835
|
(documents) => documents.filter((document2) => !document2.parent_document)
|
|
@@ -15774,6 +15788,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15774
15788
|
exports2.selectAllComponentAttachments = selectAllComponentAttachments;
|
|
15775
15789
|
exports2.selectAllComponentTypeAttachments = selectAllComponentTypeAttachments;
|
|
15776
15790
|
exports2.selectAllProjectAttachments = selectAllProjectAttachments;
|
|
15791
|
+
exports2.selectAncestorIdsOfDocument = selectAncestorIdsOfDocument;
|
|
15777
15792
|
exports2.selectAppearance = selectAppearance;
|
|
15778
15793
|
exports2.selectAttachmentsOfComponent = selectAttachmentsOfComponent;
|
|
15779
15794
|
exports2.selectAttachmentsOfComponentByType = selectAttachmentsOfComponentByType;
|