myio-js-library 0.1.67 → 0.1.69

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.cjs CHANGED
@@ -1793,7 +1793,7 @@ var MyIOSelectionStoreClass = class {
1793
1793
  }
1794
1794
  // Core Selection Methods
1795
1795
  add(id) {
1796
- if (typeof id !== "string" || !id.trim()) return;
1796
+ console.log("Biblioteca ID", id);
1797
1797
  const wasSelected = this.selectedIds.has(id);
1798
1798
  this.selectedIds.add(id);
1799
1799
  if (!wasSelected) {
@@ -1802,8 +1802,10 @@ var MyIOSelectionStoreClass = class {
1802
1802
  }
1803
1803
  }
1804
1804
  remove(id) {
1805
- if (typeof id !== "string" || !this.selectedIds.has(id)) return;
1806
- this.selectedIds.delete(id);
1805
+ const itemToRemove = Array.from(this.selectedIds).find((obj) => obj.id === id);
1806
+ if (!itemToRemove) return;
1807
+ console.log("DELETE ID", id);
1808
+ this.selectedIds.delete(itemToRemove);
1807
1809
  this._emitSelectionChange("remove", id);
1808
1810
  this._trackEvent("footer_dock.remove_chip", { entityId: id });
1809
1811
  }
@@ -1855,7 +1857,8 @@ var MyIOSelectionStoreClass = class {
1855
1857
  return Array.from(this.selectedIds);
1856
1858
  }
1857
1859
  getSelectedEntities() {
1858
- return this.getSelectedIds().map((id) => this.entities.get(id)).filter((entity) => entity !== void 0);
1860
+ console.log("biblioteca:", this.getSelectedIds());
1861
+ return this.getSelectedIds();
1859
1862
  }
1860
1863
  getTotals() {
1861
1864
  const selectedEntities = this.getSelectedEntities();
@@ -3458,6 +3461,7 @@ function renderCardComponentV2({
3458
3461
  enhancedCardElement.addEventListener("dragstart", (e) => {
3459
3462
  e.dataTransfer.setData("text/myio-id", entityId);
3460
3463
  e.dataTransfer.setData("application/json", JSON.stringify(entityObject));
3464
+ e.dataTransfer.setData("text/myio-name", entityObject.labelOrName);
3461
3465
  e.dataTransfer.effectAllowed = "copy";
3462
3466
  if (MyIOSelectionStore) {
3463
3467
  MyIOSelectionStore.startDrag(entityId);
@@ -8716,7 +8720,9 @@ var AllReportModal = class {
8716
8720
  domainConfig;
8717
8721
  // Debug logging helper
8718
8722
  debugLog(message, data) {
8719
- console.log(`[AllReportModal DEBUG] ${message}`, data || "");
8723
+ if (this.debugEnabled) {
8724
+ console.log(`[AllReportModal DEBUG] ${message}`, data || "");
8725
+ }
8720
8726
  }
8721
8727
  // Helper: normalize identifiers (upper, strip spaces and non-alphanum)
8722
8728
  normalizeId(v) {
package/dist/index.js CHANGED
@@ -1719,7 +1719,7 @@ var MyIOSelectionStoreClass = class {
1719
1719
  }
1720
1720
  // Core Selection Methods
1721
1721
  add(id) {
1722
- if (typeof id !== "string" || !id.trim()) return;
1722
+ console.log("Biblioteca ID", id);
1723
1723
  const wasSelected = this.selectedIds.has(id);
1724
1724
  this.selectedIds.add(id);
1725
1725
  if (!wasSelected) {
@@ -1728,8 +1728,10 @@ var MyIOSelectionStoreClass = class {
1728
1728
  }
1729
1729
  }
1730
1730
  remove(id) {
1731
- if (typeof id !== "string" || !this.selectedIds.has(id)) return;
1732
- this.selectedIds.delete(id);
1731
+ const itemToRemove = Array.from(this.selectedIds).find((obj) => obj.id === id);
1732
+ if (!itemToRemove) return;
1733
+ console.log("DELETE ID", id);
1734
+ this.selectedIds.delete(itemToRemove);
1733
1735
  this._emitSelectionChange("remove", id);
1734
1736
  this._trackEvent("footer_dock.remove_chip", { entityId: id });
1735
1737
  }
@@ -1781,7 +1783,8 @@ var MyIOSelectionStoreClass = class {
1781
1783
  return Array.from(this.selectedIds);
1782
1784
  }
1783
1785
  getSelectedEntities() {
1784
- return this.getSelectedIds().map((id) => this.entities.get(id)).filter((entity) => entity !== void 0);
1786
+ console.log("biblioteca:", this.getSelectedIds());
1787
+ return this.getSelectedIds();
1785
1788
  }
1786
1789
  getTotals() {
1787
1790
  const selectedEntities = this.getSelectedEntities();
@@ -3384,6 +3387,7 @@ function renderCardComponentV2({
3384
3387
  enhancedCardElement.addEventListener("dragstart", (e) => {
3385
3388
  e.dataTransfer.setData("text/myio-id", entityId);
3386
3389
  e.dataTransfer.setData("application/json", JSON.stringify(entityObject));
3390
+ e.dataTransfer.setData("text/myio-name", entityObject.labelOrName);
3387
3391
  e.dataTransfer.effectAllowed = "copy";
3388
3392
  if (MyIOSelectionStore) {
3389
3393
  MyIOSelectionStore.startDrag(entityId);
@@ -8642,7 +8646,9 @@ var AllReportModal = class {
8642
8646
  domainConfig;
8643
8647
  // Debug logging helper
8644
8648
  debugLog(message, data) {
8645
- console.log(`[AllReportModal DEBUG] ${message}`, data || "");
8649
+ if (this.debugEnabled) {
8650
+ console.log(`[AllReportModal DEBUG] ${message}`, data || "");
8651
+ }
8646
8652
  }
8647
8653
  // Helper: normalize identifiers (upper, strip spaces and non-alphanum)
8648
8654
  normalizeId(v) {
@@ -1725,7 +1725,7 @@
1725
1725
  }
1726
1726
  // Core Selection Methods
1727
1727
  add(id) {
1728
- if (typeof id !== "string" || !id.trim()) return;
1728
+ console.log("Biblioteca ID", id);
1729
1729
  const wasSelected = this.selectedIds.has(id);
1730
1730
  this.selectedIds.add(id);
1731
1731
  if (!wasSelected) {
@@ -1734,8 +1734,10 @@
1734
1734
  }
1735
1735
  }
1736
1736
  remove(id) {
1737
- if (typeof id !== "string" || !this.selectedIds.has(id)) return;
1738
- this.selectedIds.delete(id);
1737
+ const itemToRemove = Array.from(this.selectedIds).find((obj) => obj.id === id);
1738
+ if (!itemToRemove) return;
1739
+ console.log("DELETE ID", id);
1740
+ this.selectedIds.delete(itemToRemove);
1739
1741
  this._emitSelectionChange("remove", id);
1740
1742
  this._trackEvent("footer_dock.remove_chip", { entityId: id });
1741
1743
  }
@@ -1787,7 +1789,8 @@
1787
1789
  return Array.from(this.selectedIds);
1788
1790
  }
1789
1791
  getSelectedEntities() {
1790
- return this.getSelectedIds().map((id) => this.entities.get(id)).filter((entity) => entity !== void 0);
1792
+ console.log("biblioteca:", this.getSelectedIds());
1793
+ return this.getSelectedIds();
1791
1794
  }
1792
1795
  getTotals() {
1793
1796
  const selectedEntities = this.getSelectedEntities();
@@ -3384,6 +3387,7 @@
3384
3387
  enhancedCardElement.addEventListener("dragstart", (e) => {
3385
3388
  e.dataTransfer.setData("text/myio-id", entityId);
3386
3389
  e.dataTransfer.setData("application/json", JSON.stringify(entityObject));
3390
+ e.dataTransfer.setData("text/myio-name", entityObject.labelOrName);
3387
3391
  e.dataTransfer.effectAllowed = "copy";
3388
3392
  if (MyIOSelectionStore) {
3389
3393
  MyIOSelectionStore.startDrag(entityId);
@@ -8631,7 +8635,9 @@
8631
8635
  domainConfig;
8632
8636
  // Debug logging helper
8633
8637
  debugLog(message, data) {
8634
- console.log(`[AllReportModal DEBUG] ${message}`, data || "");
8638
+ if (this.debugEnabled) {
8639
+ console.log(`[AllReportModal DEBUG] ${message}`, data || "");
8640
+ }
8635
8641
  }
8636
8642
  // Helper: normalize identifiers (upper, strip spaces and non-alphanum)
8637
8643
  normalizeId(v) {