@trops/dash-core 0.1.420 → 0.1.421

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/index.js CHANGED
@@ -55809,13 +55809,31 @@ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t
55809
55809
  * widget currently in the workspace's layout tree. Keys drive
55810
55810
  * listener pruning; the itemId set drives provider-binding pruning
55811
55811
  * (selectedProviders is keyed by raw widgetId).
55812
+ *
55813
+ * Listener event strings are written as `${component}[${itemId}].${event}`
55814
+ * where `itemId` is whichever id-ish field the emitter had at wire time
55815
+ * (in practice `itemIdOf` prefers numeric `id`). `canonicalItemKey`'s
55816
+ * preference order (uuidString → uuid → id) doesn't match that, and
55817
+ * `LayoutModel` decorates every persisted item with a composite
55818
+ * `uuid = "${dashboardId}-${component}-${id}"` while leaving
55819
+ * `uuidString` unset — so canonicalItemKey would produce
55820
+ * `Component|{dashId}-{Component}-{123}` while the event string produces
55821
+ * `Component|123`. Record every id-ish form as a separate live key so
55822
+ * reconciliation is tolerant of whichever shape the stored binding
55823
+ * carries.
55812
55824
  */
55813
55825
  function collectLiveIdentity(workspace) {
55814
55826
  var liveCanonicalKeys = new Set();
55815
55827
  var liveItemIds = new Set();
55816
55828
  forEachWidget(workspace, function (item) {
55817
- var key = canonicalItemKey(item);
55818
- if (key) liveCanonicalKeys.add(key);
55829
+ var comp = item.component;
55830
+ if (comp) {
55831
+ if (item.id != null) liveCanonicalKeys.add("".concat(comp, "|").concat(item.id));
55832
+ if (item.uuidString) {
55833
+ liveCanonicalKeys.add("".concat(comp, "|").concat(item.uuidString));
55834
+ }
55835
+ if (item.uuid) liveCanonicalKeys.add("".concat(comp, "|").concat(item.uuid));
55836
+ }
55819
55837
  // Track every id-ish the runtime might key by. selectedProviders
55820
55838
  // uses `item.uuidString` or `item.uuid` or `item.id` depending on
55821
55839
  // when the binding was written, so accept any of them.