@gravitee/graphene-charts 3.12.1 → 3.13.0

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":"DashboardGrid.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AA4BhE,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,IAAmB,EACnB,SAA8B,EAC9B,GAAiB,EACjB,WAAW,EACX,cAAc,EACd,UAAuB,EACvB,QAAgB,EAChB,QAAc,EACd,cAAc,EACd,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,QAAQ,EACZ,EAAE,kBAAkB,+BAsEpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AA+BhE,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,IAAmB,EACnB,SAA8B,EAC9B,GAAiB,EACjB,WAAW,EACX,cAAc,EACd,UAAuB,EACvB,QAAgB,EAChB,QAAc,EACd,cAAc,EACd,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,QAAQ,EACZ,EAAE,kBAAkB,+BAqFpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardWidget.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,oBAAqB,SAAQ,KAAK,C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CAAA;KAAE,CAAC,CAAC;IAC5D,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EACN,MAAM,EACN,SAAiB,EACjB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,oBAAoB,qBAkDtB"}
@@ -44,53 +44,57 @@ var m = 12, h = 150, g = [16, 16], _ = {
44
44
  vertical: d,
45
45
  horizontal: c,
46
46
  none: l
47
- };
48
- function b({ widgets: t, cols: n = m, rowHeight: c = h, gap: l = g, breakpoints: d, breakpointCols: b, compaction: x = "vertical", editable: S = !1, minWidth: C = 960, onLayoutChange: w, children: T, className: E, style: D, ...O }) {
49
- let { width: k, containerRef: A, mounted: j } = u(), M = i(() => t.map(f), [t]), N = i(() => ({ lg: M }), [M]), P = i(() => b ? {
47
+ }, b = "[data-dashboard-grid-no-drag]";
48
+ function x({ widgets: t, cols: n = m, rowHeight: c = h, gap: l = g, breakpoints: d, breakpointCols: x, compaction: S = "vertical", editable: C = !1, minWidth: w = 960, onLayoutChange: T, children: E, className: D, style: O, ...k }) {
49
+ let { width: A, containerRef: j, mounted: M } = u(), N = i(() => t.map(f), [t]), P = i(() => ({ lg: N }), [N]), F = i(() => x ? {
50
50
  ...v,
51
- ...b
51
+ ...x
52
52
  } : {
53
53
  ...v,
54
54
  lg: n
55
- }, [b, n]), F = i(() => [l[0], l[1]], [l]), I = i(() => ({ enabled: S }), [S]), L = i(() => ({ enabled: S }), [S]), R = r((e) => {
56
- if (!w) return;
55
+ }, [x, n]), I = i(() => [l[0], l[1]], [l]), L = i(() => ({
56
+ enabled: C,
57
+ cancel: b
58
+ }), [C]), R = i(() => ({ enabled: C }), [C]), z = r((e) => {
59
+ if (!T) return;
57
60
  let t = /* @__PURE__ */ new Map();
58
61
  for (let n of e) t.set(n.i, p(n));
59
- w(t);
60
- }, [w]), z = C === 0 ? void 0 : typeof C == "number" ? `${C}px` : C;
62
+ T(t);
63
+ }, [T]), B = w === 0 ? void 0 : typeof w == "number" ? `${w}px` : w;
61
64
  return /* @__PURE__ */ o("div", {
62
- ref: A,
63
- className: e("relative w-full", E),
65
+ ref: j,
66
+ className: e("relative w-full", D),
64
67
  style: {
65
- minWidth: z,
66
- ...D
68
+ minWidth: B,
69
+ ...O
67
70
  },
68
- ...O,
71
+ "data-grid-editing": C ? "" : void 0,
72
+ ...k,
69
73
  children: [/* @__PURE__ */ a("style", {
70
74
  precedence: "graphene-charts",
71
- children: "\n .react-grid-item.react-grid-placeholder {\n background: var(--muted);\n border-radius: var(--radius, 0.5rem);\n opacity: 0.5;\n }\n "
72
- }), j && /* @__PURE__ */ a(s, {
73
- width: k,
74
- layouts: N,
75
+ children: "\n .react-grid-item.react-grid-placeholder {\n background: var(--muted);\n border-radius: var(--radius, 0.5rem);\n opacity: 0.5;\n }\n /* Higher specificity than the base \".react-grid-layout { transition: height }\";\n both are unlayered, so specificity decides — no !important needed. */\n [data-grid-editing] .react-grid-layout {\n transition: none;\n }\n "
76
+ }), M && /* @__PURE__ */ a(s, {
77
+ width: A,
78
+ layouts: P,
75
79
  breakpoints: d ?? _,
76
- cols: P,
80
+ cols: F,
77
81
  rowHeight: c,
78
- margin: F,
82
+ margin: I,
79
83
  containerPadding: [0, 0],
80
- dragConfig: I,
81
- resizeConfig: L,
82
- compactor: y[x],
83
- onLayoutChange: R,
84
+ dragConfig: L,
85
+ resizeConfig: R,
86
+ compactor: y[S],
87
+ onLayoutChange: z,
84
88
  children: t.map((e) => /* @__PURE__ */ a("div", {
85
89
  className: "min-h-0 overflow-hidden",
86
- children: T(e)
90
+ children: E(e)
87
91
  }, e.id))
88
92
  })]
89
93
  });
90
94
  }
91
95
  //#endregion
92
96
  //#region src/dashboard-grid/DashboardWidget.tsx
93
- function x({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u = !1, children: d, className: f, ...p }) {
97
+ function S({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u = !1, children: d, className: f, ...p }) {
94
98
  let m = r || i || c;
95
99
  return /* @__PURE__ */ o("div", {
96
100
  className: e("flex h-full flex-col", n, t, "@container", f),
@@ -113,6 +117,7 @@ function x({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u
113
117
  })]
114
118
  }), c && /* @__PURE__ */ a("div", {
115
119
  className: "shrink-0",
120
+ "data-dashboard-grid-no-drag": "",
116
121
  children: c
117
122
  })]
118
123
  }),
@@ -128,4 +133,4 @@ function x({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u
128
133
  });
129
134
  }
130
135
  //#endregion
131
- export { b as DashboardGrid, x as DashboardWidget, p as rglLayoutItemToWidgetLayout, f as widgetToRGLLayoutItem };
136
+ export { x as DashboardGrid, S as DashboardWidget, p as rglLayoutItemToWidgetLayout, f as widgetToRGLLayoutItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-charts",
3
- "version": "3.12.1",
3
+ "version": "3.13.0",
4
4
  "type": "module",
5
5
  "description": "Theme-compliant data visualization components for the Graphene design system. Built on D3, styled with Tailwind, and designed to inherit the Graphene token system out of the box.",
6
6
  "keywords": [