@mercurjs/dashboard-shared 2.3.2-canary.4 → 2.3.2

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.
Files changed (2) hide show
  1. package/dist/index.js +27 -6
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -13702,7 +13702,7 @@ var NoRecords = ({
13702
13702
  "div",
13703
13703
  {
13704
13704
  className: clx6(
13705
- "flex h-[150px] w-full flex-col items-center justify-center gap-y-4",
13705
+ "flex min-h-[150px] w-full flex-col items-center justify-center gap-y-4",
13706
13706
  className
13707
13707
  ),
13708
13708
  children: [
@@ -19320,6 +19320,7 @@ var DataGridRoot = ({
19320
19320
  onColumnVisibilityChange: setColumnVisibility,
19321
19321
  getSubRows,
19322
19322
  getCoreRowModel: getCoreRowModel(),
19323
+ columnResizeMode: "onChange",
19323
19324
  defaultColumn: {
19324
19325
  size: 200,
19325
19326
  maxSize: 400
@@ -19436,6 +19437,10 @@ var DataGridRoot = ({
19436
19437
  }
19437
19438
  });
19438
19439
  const virtualColumns = columnVirtualizer.getVirtualItems();
19440
+ const columnSizing = grid.getState().columnSizing;
19441
+ useEffect10(() => {
19442
+ columnVirtualizer.measure();
19443
+ }, [columnSizing, columnVirtualizer]);
19439
19444
  let virtualPaddingLeft;
19440
19445
  let virtualPaddingRight;
19441
19446
  if (columnVirtualizer && virtualColumns?.length) {
@@ -19756,7 +19761,7 @@ var DataGridRoot = ({
19756
19761
  );
19757
19762
  }
19758
19763
  acc.push(
19759
- /* @__PURE__ */ jsx43(
19764
+ /* @__PURE__ */ jsxs31(
19760
19765
  "div",
19761
19766
  {
19762
19767
  role: "columnheader",
@@ -19766,10 +19771,26 @@ var DataGridRoot = ({
19766
19771
  ...getCommonPinningStyles(header.column)
19767
19772
  },
19768
19773
  className: "bg-ui-bg-base txt-compact-small-plus flex items-center border-b border-r px-4 py-2.5",
19769
- children: header.isPlaceholder ? null : flexRender(
19770
- header.column.columnDef.header,
19771
- header.getContext()
19772
- )
19774
+ children: [
19775
+ header.isPlaceholder ? null : flexRender(
19776
+ header.column.columnDef.header,
19777
+ header.getContext()
19778
+ ),
19779
+ header.column.getCanResize() && /* @__PURE__ */ jsx43(
19780
+ "div",
19781
+ {
19782
+ onMouseDown: header.getResizeHandler(),
19783
+ onTouchStart: header.getResizeHandler(),
19784
+ onClick: (e) => e.stopPropagation(),
19785
+ className: clx25(
19786
+ "hover:bg-ui-fg-interactive absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize touch-none select-none",
19787
+ {
19788
+ "bg-ui-fg-interactive": header.column.getIsResizing()
19789
+ }
19790
+ )
19791
+ }
19792
+ )
19793
+ ]
19773
19794
  },
19774
19795
  header.id
19775
19796
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/dashboard-shared",
3
- "version": "2.3.2-canary.4",
3
+ "version": "2.3.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",
@@ -23,7 +23,7 @@
23
23
  "build": "tsup"
24
24
  },
25
25
  "dependencies": {
26
- "@mercurjs/client": "2.3.2-canary.4",
26
+ "@mercurjs/client": "2.3.2",
27
27
  "@ariakit/react": "^0.4.15",
28
28
  "@babel/runtime": "^8.0.0",
29
29
  "@dnd-kit/core": "^6.1.0",
@@ -63,9 +63,9 @@
63
63
  },
64
64
  "devDependencies": {
65
65
  "@medusajs/types": "2.18.0",
66
- "@mercurjs/core": "2.3.2-canary.4",
67
- "@mercurjs/dashboard-sdk": "2.3.2-canary.4",
68
- "@mercurjs/types": "2.3.2-canary.4",
66
+ "@mercurjs/core": "2.3.2",
67
+ "@mercurjs/dashboard-sdk": "2.3.2",
68
+ "@mercurjs/types": "2.3.2",
69
69
  "@types/lodash.debounce": "^4.0.8",
70
70
  "@types/react": "^18.3.2",
71
71
  "@types/react-dom": "^18.2.22",