Integrate with core's default content exporter
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3534561. -->
Reported by: [larowlan](https://www.drupal.org/user/395439)
Related to !336 !5 !1300 !1244
>>>
<h3 id="overview">Overview</h3>
<p>Default content exports needs to know if a field item references another entity so it can resolve a dependency graph.<br>
Prop sources can reference entities but there is no way to retrieve that information when you have a ComponentTreeItem</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<ol>
<li><del>Add <code>ComponentSourceInterface::getReferenceEntities</code> and have each source plugin implement it. Most likely only JS and SDC will return something, based on the use of an entity-reference field in the prop sources</del>
</li><li>✅ <strong>Merged because MVP</strong> Prove through tests that this is already trivial to achieve with the existing <code>ComponentTreeItem(List)</code> public methods 🎉 — see <a href="https://www.drupal.org#comment-16182376">#2</a> + <a href="https://www.drupal.org#comment-16182401">#5</a>.
</li><li>Make <code>EntityInterface::referencedEntities()</code> also work for XB component trees.
</li><li>Ensure that components that use entity reference inputs are exported with target_uuid instead of target_id. On import the target_uuid should converted back to the target_id of the corresponding entity on the new site.
</li></ol>
<h3 id="ui-changes">User interface changes</h3>
<p>None.</p>
> Related issue: [Issue #3518336](https://www.drupal.org/node/3518336)
> Related issue: [Issue #3532694](https://www.drupal.org/node/3532694)
> Related issue: [Issue #3526814](https://www.drupal.org/node/3526814)
issue