@firecms/core 3.0.0-alpha.47 → 3.0.0-alpha.48

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.es.js CHANGED
@@ -13465,11 +13465,13 @@ const rs = ({
13465
13465
  hoverRow: s,
13466
13466
  rowClassName: u
13467
13467
  }) {
13468
- const d = v((m) => c ? c({
13469
- rowData: o,
13470
- rowIndex: r,
13471
- event: m
13472
- }) : void 0, [c, o, r]);
13468
+ const d = v((m) => {
13469
+ console.debug("VirtualTableRow click"), c && c({
13470
+ rowData: o,
13471
+ rowIndex: r,
13472
+ event: m
13473
+ });
13474
+ }, [c, o, r]);
13473
13475
  return /* @__PURE__ */ n(
13474
13476
  "div",
13475
13477
  {
@@ -14321,7 +14323,7 @@ const _s = {}, Ei = F.createContext(_s), ys = () => Ve(Ei), Bi = F.memo(
14321
14323
  }, Ln = v(() => {
14322
14324
  Z?.(re);
14323
14325
  }, [re]), un = v(({ rowData: ne }) => {
14324
- if (!h)
14326
+ if (console.debug("EntityCollectionTable click"), !h)
14325
14327
  return A && A(ne);
14326
14328
  }, [A, h]), dn = v((ne) => {
14327
14329
  f && f(ne), Oe(ne);
@@ -17695,6 +17697,7 @@ function ru({
17695
17697
  forceFilter: s,
17696
17698
  maxSelection: u
17697
17699
  }) {
17700
+ console.log("ReferenceSelectionInner");
17698
17701
  const d = Bo(), m = kn(), A = ve(), p = ue(), f = A.resolveAliasesFrom(c), _ = je(), [y, h] = T([]), g = Ti();
17699
17702
  O(() => {
17700
17703
  let E = !1;
@@ -17714,11 +17717,12 @@ function ru({
17714
17717
  E = !0;
17715
17718
  };
17716
17719
  }, [_, f, a, i, g.setSelectedEntities]);
17717
- const b = v(() => {
17720
+ const b = () => {
17718
17721
  p.onAnalyticsEvent?.("reference_selection_clear", {
17719
17722
  path: f
17720
17723
  }), g.setSelectedEntities([]), !r && e ? e(null) : o && o([]);
17721
- }, [r, o, e]), w = v((E) => {
17724
+ }, w = (E) => {
17725
+ console.debug("ReferenceSelectionInner toggleEntitySelection", E);
17722
17726
  let P;
17723
17727
  const D = g.selectedEntities;
17724
17728
  if (p.onAnalyticsEvent?.("reference_selection_toggle", {
@@ -17734,27 +17738,24 @@ function ru({
17734
17738
  }
17735
17739
  g.setSelectedEntities(P), o && o(P);
17736
17740
  }
17737
- }, [o, g.selectedEntities]), k = v((E) => {
17738
- !r && e ? (p.onAnalyticsEvent?.("reference_selected_single", {
17741
+ }, k = (E) => {
17742
+ console.debug("ReferenceSelectionInner onEntityClick", E), !r && e ? (p.onAnalyticsEvent?.("reference_selected_single", {
17739
17743
  path: f,
17740
17744
  entityId: E.id
17741
17745
  }), e(E), d.close(!1)) : w(E);
17742
- }, [d, r, e, w]), C = v(
17743
- () => {
17744
- p.onAnalyticsEvent?.("reference_selection_new_entity", {
17745
- path: f
17746
- }), m.open({
17747
- path: f,
17748
- collection: i,
17749
- updateUrl: !0,
17750
- onUpdate: ({ entity: E }) => {
17751
- h([E, ...y]), k(E);
17752
- },
17753
- closeOnSave: !0
17754
- });
17755
- },
17756
- [m, f, i, y, k]
17757
- ), x = v(({
17746
+ }, C = () => {
17747
+ p.onAnalyticsEvent?.("reference_selection_new_entity", {
17748
+ path: f
17749
+ }), m.open({
17750
+ path: f,
17751
+ collection: i,
17752
+ updateUrl: !0,
17753
+ onUpdate: ({ entity: E }) => {
17754
+ h([E, ...y]), k(E);
17755
+ },
17756
+ closeOnSave: !0
17757
+ });
17758
+ }, x = ({
17758
17759
  entity: E,
17759
17760
  size: P,
17760
17761
  width: D,
@@ -17775,7 +17776,7 @@ function ru({
17775
17776
  selectionController: g
17776
17777
  }
17777
17778
  );
17778
- }, [r, g.selectedEntities, w, i?.hideIdFromCollection]), K = v((E) => {
17779
+ }, K = v((E) => {
17779
17780
  E.stopPropagation(), d.close(!1);
17780
17781
  }, [d]);
17781
17782
  if (!i)
@@ -23344,8 +23345,14 @@ function od(e) {
23344
23345
  function rd(e, o, r = [], i) {
23345
23346
  const c = (o ?? []).map((l) => {
23346
23347
  const s = e?.find((u) => u.id === l.id);
23347
- return s ? id(s, l, r, i) : l;
23348
- }), a = e.filter((l) => !c.map((s) => s.id).includes(l.id)).map((l) => i ? i({ collection: l, parentPaths: r }) ?? l : l);
23348
+ return s ? id(s, l, r, i) : i ? i({
23349
+ collection: l,
23350
+ parentPaths: r
23351
+ }) ?? l : l;
23352
+ }), a = e.filter((l) => !c.map((s) => s.id).includes(l.id)).map((l) => i ? i({
23353
+ collection: l,
23354
+ parentPaths: r
23355
+ }) ?? l : l);
23349
23356
  return [...c, ...a];
23350
23357
  }
23351
23358
  function id(e, o, r = [], i) {
@@ -23368,7 +23375,10 @@ function id(e, o, r = [], i) {
23368
23375
  entityViews: m
23369
23376
  };
23370
23377
  if (i) {
23371
- const p = i({ collection: A, parentPaths: r });
23378
+ const p = i({
23379
+ collection: A,
23380
+ parentPaths: r
23381
+ });
23372
23382
  p && (A = p);
23373
23383
  }
23374
23384
  return A;
@@ -23383,9 +23393,17 @@ function cc(e, o) {
23383
23393
  return Object.keys(o.properties).forEach((A) => {
23384
23394
  const p = a[A];
23385
23395
  p && (m[A] = cc(p, l[A]));
23386
- }), { ...r, editable: i && c, properties: m, propertiesOrder: d };
23396
+ }), {
23397
+ ...r,
23398
+ editable: i && c,
23399
+ properties: m,
23400
+ propertiesOrder: d
23401
+ };
23387
23402
  }
23388
- return { ...r, editable: i && c };
23403
+ return {
23404
+ ...r,
23405
+ editable: i && c
23406
+ };
23389
23407
  }
23390
23408
  }
23391
23409
  function wr(e) {