@m4l/gclick 0.14.0 → 0.14.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ReportsViewerTabStrip.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/ReportsViewer/subcomponents/ReportsViewerTabStrip/ReportsViewerTabStrip.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAEV,0BAA0B,EAE3B,MAAM,SAAS,CAAC;AA2OjB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,EAAE,0BAA0B,oDAY5B;yBAjBe,qBAAqB"}
1
+ {"version":3,"file":"ReportsViewerTabStrip.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/ReportsViewer/subcomponents/ReportsViewerTabStrip/ReportsViewerTabStrip.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAEV,0BAA0B,EAE3B,MAAM,SAAS,CAAC;AA4PjB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,EAAE,0BAA0B,oDAY5B;yBAjBe,qBAAqB"}
@@ -4,7 +4,7 @@ import { HTML5Backend as k } from "../../../../node_modules/react-dnd-html5-back
4
4
  import { useVirtualizer as M } from "../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
5
5
  import { ArrowChevronMdLeftOutlined as N, ArrowChevronMdRightOutlined as z } from "@m4l/icons";
6
6
  import { useReportsViewerStore as T } from "../../hooks/useReportsViewerStore/useReportsViewerStore.js";
7
- import { RootStyled as F, ScrollButtonStyled as A, ScrollerStyled as H, TrackStyled as U } from "./slots/ReportsViewerTabStripSlots.js";
7
+ import { RootStyled as F, ScrollButtonStyled as x, ScrollerStyled as H, TrackStyled as U } from "./slots/ReportsViewerTabStripSlots.js";
8
8
  import { ReportsViewerTab as j } from "./ReportsViewerTab.js";
9
9
  import { computeEdgeScrollDirection as q } from "./helpers/computeEdgeScrollDirection.js";
10
10
  import { REPORTS_VIEWER_TAB_SCROLL_BUTTON_STEP_RATIO as X, REPORTS_VIEWER_FROZEN_SHEET_INDEX as G, REPORTS_VIEWER_TAB_OVERSCAN as Y, REPORTS_VIEWER_TAB_ESTIMATED_WIDTH as Z, REPORTS_VIEWER_TAB_AUTOSCROLL_SPEED as $, REPORTS_VIEWER_TAB_DND_TYPE as J, REPORTS_VIEWER_TAB_AUTOSCROLL_EDGE as K } from "./constants.js";
@@ -12,7 +12,7 @@ import { DndProvider as Q } from "../../../../node_modules/react-dnd/dist/core/D
12
12
  import { DndContext as ee } from "../../../../node_modules/react-dnd/dist/core/DndContext.js";
13
13
  import { useDrop as te } from "../../../../node_modules/react-dnd/dist/hooks/useDrop/useDrop.js";
14
14
  function re({ children: r }) {
15
- return I(ee)?.dragDropManager ? /* @__PURE__ */ o(L, { children: r }) : /* @__PURE__ */ o(Q, { backend: k, children: r });
15
+ return I(ee)?.dragDropManager ? /* @__PURE__ */ o(L, { children: r }) : /* @__PURE__ */ o(Q, { backend: k, context: window, children: r });
16
16
  }
17
17
  function oe({
18
18
  sheets: r,
@@ -20,7 +20,7 @@ function oe({
20
20
  onSelectTab: S,
21
21
  size: n
22
22
  }) {
23
- const l = T((e) => e.sheetOrder), _ = T((e) => e.reportsViewerActions.setSheetOrder), x = T((e) => e.reportsViewerActions.reorderSheets), c = E(null), R = E(0), a = E(null), [O, V] = y({ canScrollLeft: !1, canScrollRight: !1 }), d = W(
23
+ const l = T((e) => e.sheetOrder), _ = T((e) => e.reportsViewerActions.setSheetOrder), A = T((e) => e.reportsViewerActions.reorderSheets), c = E(null), R = E(0), a = E(null), [O, V] = y({ canScrollLeft: !1, canScrollRight: !1 }), d = W(
24
24
  () => l.length === r.length ? l : r.map((e, t) => t),
25
25
  [l, r]
26
26
  );
@@ -44,7 +44,7 @@ function oe({
44
44
  V(
45
45
  (s) => s.canScrollLeft === t && s.canScrollRight === i ? s : { canScrollLeft: t, canScrollRight: i }
46
46
  );
47
- }, []), b = m((e) => {
47
+ }, []), w = m((e) => {
48
48
  const t = c.current;
49
49
  t && t.scrollBy({
50
50
  left: e * t.clientWidth * X,
@@ -59,7 +59,7 @@ function oe({
59
59
  const t = new ResizeObserver(() => f());
60
60
  return t.observe(e), () => t.disconnect();
61
61
  }, [f, g, d.length]);
62
- const [{ isOverContainer: w }, v] = te({
62
+ const [{ isOverContainer: b }, v] = te({
63
63
  accept: J,
64
64
  /** Tracks the pointer near the scroller edges to drive drag auto-scroll (no reorder here). */
65
65
  hover: (e, t) => {
@@ -75,7 +75,7 @@ function oe({
75
75
  })
76
76
  });
77
77
  h(() => {
78
- if (!w) {
78
+ if (!b) {
79
79
  R.current = 0;
80
80
  return;
81
81
  }
@@ -86,7 +86,7 @@ function oe({
86
86
  return a.current = requestAnimationFrame(e), () => {
87
87
  a.current !== null && (cancelAnimationFrame(a.current), a.current = null);
88
88
  };
89
- }, [w]);
89
+ }, [b]);
90
90
  const D = m(
91
91
  (e) => {
92
92
  c.current = e, v(e);
@@ -95,7 +95,7 @@ function oe({
95
95
  );
96
96
  return /* @__PURE__ */ P(F, { ownerState: { size: n }, "data-testid": "reports-viewer-tab-strip-root", children: [
97
97
  O.canScrollLeft ? /* @__PURE__ */ o(
98
- A,
98
+ x,
99
99
  {
100
100
  ownerState: { size: n },
101
101
  size: n,
@@ -104,7 +104,7 @@ function oe({
104
104
  src: /* @__PURE__ */ o(N, {}),
105
105
  "aria-label": "Scroll tabs left",
106
106
  "data-testid": "reports-viewer-tab-strip-scroll-left",
107
- onClick: () => b(-1)
107
+ onClick: () => w(-1)
108
108
  }
109
109
  ) : null,
110
110
  /* @__PURE__ */ o(
@@ -131,7 +131,7 @@ function oe({
131
131
  translateX: e.start,
132
132
  measureElement: p.measureElement,
133
133
  onSelect: () => S(t),
134
- onReorder: x,
134
+ onReorder: A,
135
135
  resolveOrderPos: C
136
136
  },
137
137
  e.key
@@ -140,7 +140,7 @@ function oe({
140
140
  }
141
141
  ),
142
142
  O.canScrollRight ? /* @__PURE__ */ o(
143
- A,
143
+ x,
144
144
  {
145
145
  ownerState: { size: n },
146
146
  size: n,
@@ -149,7 +149,7 @@ function oe({
149
149
  src: /* @__PURE__ */ o(z, {}),
150
150
  "aria-label": "Scroll tabs right",
151
151
  "data-testid": "reports-viewer-tab-strip-scroll-right",
152
- onClick: () => b(1)
152
+ onClick: () => w(1)
153
153
  }
154
154
  ) : null
155
155
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/gclick",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -48,8 +48,8 @@
48
48
  "react-dom": "19.1.0",
49
49
  "immer": "9.0.21",
50
50
  "react-hook-form": "7.71.1",
51
- "leaflet.markercluster": "1.5.3",
52
51
  "@googlemaps/js-api-loader": "1.16.10",
52
+ "leaflet.markercluster": "1.5.3",
53
53
  "yup": "0.32.11"
54
54
  }
55
55
  }