@overmap-ai/core 1.0.46-project-attachments.8 → 1.0.46-project-attachments.9
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
|
@@ -3826,6 +3826,20 @@ const selectDocument = restructureCreateSelectorWithArgs(
|
|
|
3826
3826
|
(mapping, documentId) => mapping[documentId]
|
|
3827
3827
|
)
|
|
3828
3828
|
);
|
|
3829
|
+
const selectAncestorIdsOfDocument = restructureCreateSelectorWithArgs(
|
|
3830
|
+
createSelector([selectDocumentsMapping, (_state, documentId) => documentId], (mapping, documentId) => {
|
|
3831
|
+
const listOfAncestors = [];
|
|
3832
|
+
const document2 = mapping[documentId];
|
|
3833
|
+
if (!document2 || !document2.parent_document)
|
|
3834
|
+
return listOfAncestors;
|
|
3835
|
+
let currentAncestor = mapping[document2.parent_document];
|
|
3836
|
+
while (currentAncestor && currentAncestor.parent_document) {
|
|
3837
|
+
listOfAncestors.push(currentAncestor.offline_id);
|
|
3838
|
+
currentAncestor = mapping[currentAncestor.parent_document];
|
|
3839
|
+
}
|
|
3840
|
+
return listOfAncestors;
|
|
3841
|
+
})
|
|
3842
|
+
);
|
|
3829
3843
|
const selectRootDocuments = createSelector(
|
|
3830
3844
|
[selectDocuments],
|
|
3831
3845
|
(documents) => documents.filter((document2) => !document2.parent_document)
|
|
@@ -15785,6 +15799,7 @@ export {
|
|
|
15785
15799
|
selectAllComponentAttachments,
|
|
15786
15800
|
selectAllComponentTypeAttachments,
|
|
15787
15801
|
selectAllProjectAttachments,
|
|
15802
|
+
selectAncestorIdsOfDocument,
|
|
15788
15803
|
selectAppearance,
|
|
15789
15804
|
selectAttachmentsOfComponent,
|
|
15790
15805
|
selectAttachmentsOfComponentByType,
|