@vendure/dashboard 3.4.2 → 3.4.3-master-202509180227

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vendure/dashboard",
3
3
  "private": false,
4
- "version": "3.4.2",
4
+ "version": "3.4.3-master-202509180227",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -100,8 +100,8 @@
100
100
  "@types/react": "^19.0.10",
101
101
  "@types/react-dom": "^19.0.4",
102
102
  "@uidotdev/usehooks": "^2.4.1",
103
- "@vendure/common": "3.4.2",
104
- "@vendure/core": "3.4.2",
103
+ "@vendure/common": "^3.4.3-master-202509180227",
104
+ "@vendure/core": "^3.4.3-master-202509180227",
105
105
  "@vitejs/plugin-react": "^4.3.4",
106
106
  "acorn": "^8.11.3",
107
107
  "acorn-walk": "^8.3.2",
@@ -152,5 +152,5 @@
152
152
  "lightningcss-linux-arm64-musl": "^1.29.3",
153
153
  "lightningcss-linux-x64-musl": "^1.29.1"
154
154
  },
155
- "gitHead": "77218033e22397ad50f39d952d440e7879927814"
155
+ "gitHead": "abb4130cebdea8f79dcfb0823d806293bb0d2a1b"
156
156
  }
@@ -27,6 +27,7 @@ export const collectionListDocument = graphql(
27
27
  }
28
28
  children {
29
29
  id
30
+ name
30
31
  }
31
32
  position
32
33
  isPrivate
@@ -13,6 +13,7 @@ import { ResultOf } from 'gql.tada';
13
13
  import { Folder, FolderOpen, FolderTreeIcon, PlusIcon } from 'lucide-react';
14
14
  import { useState } from 'react';
15
15
 
16
+ import { Badge } from '@/vdb/components/ui/badge.js';
16
17
  import { collectionListDocument, deleteCollectionDocument } from './collections.graphql.js';
17
18
  import {
18
19
  AssignCollectionsToChannelBulkAction,
@@ -150,6 +151,26 @@ function CollectionListPage() {
150
151
  );
151
152
  },
152
153
  },
154
+ children: {
155
+ cell: ({ row }) => {
156
+ const children = row.original.children ?? [];
157
+ const count = children.length;
158
+ const maxDisplay = 5;
159
+ const leftOver = Math.max(count - maxDisplay, 0);
160
+ return (
161
+ <div className="flex flex-wrap gap-2">
162
+ {children.slice(0, maxDisplay).map(child => (
163
+ <Badge variant="outline">{child.name}</Badge>
164
+ ))}
165
+ {leftOver > 0 ? (
166
+ <Badge variant="outline">
167
+ <Trans>+ {leftOver} more</Trans>
168
+ </Badge>
169
+ ) : null}
170
+ </div>
171
+ );
172
+ },
173
+ },
153
174
  }}
154
175
  defaultColumnOrder={[
155
176
  'featuredAsset',
@@ -14,6 +14,7 @@ export const productVariantListDocument = graphql(
14
14
  }
15
15
  name
16
16
  sku
17
+ enabled
17
18
  currencyCode
18
19
  price
19
20
  priceWithTax
@@ -9,6 +9,12 @@ import { graphql } from '@/vdb/graphql/graphql.js';
9
9
  import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
10
10
  import { ColumnFiltersState, SortingState } from '@tanstack/react-table';
11
11
  import { useState } from 'react';
12
+ import {
13
+ AssignFacetValuesToProductVariantsBulkAction,
14
+ AssignProductVariantsToChannelBulkAction,
15
+ DeleteProductVariantsBulkAction,
16
+ RemoveProductVariantsFromChannelBulkAction,
17
+ } from '../../_product-variants/components/product-variant-bulk-actions.js';
12
18
  import { productVariantListDocument } from '../products.graphql.js';
13
19
 
14
20
  export const deleteProductVariantDocument = graphql(`
@@ -47,9 +53,31 @@ export function ProductVariantsTable({
47
53
  productId,
48
54
  })}
49
55
  defaultVisibility={{
50
- id: false,
51
- currencyCode: false,
56
+ featuredAsset: true,
57
+ name: true,
58
+ enabled: true,
59
+ price: true,
60
+ priceWithTax: true,
61
+ stockLevels: true,
52
62
  }}
63
+ bulkActions={[
64
+ {
65
+ component: AssignProductVariantsToChannelBulkAction,
66
+ order: 100,
67
+ },
68
+ {
69
+ component: RemoveProductVariantsFromChannelBulkAction,
70
+ order: 200,
71
+ },
72
+ {
73
+ component: AssignFacetValuesToProductVariantsBulkAction,
74
+ order: 300,
75
+ },
76
+ {
77
+ component: DeleteProductVariantsBulkAction,
78
+ order: 400,
79
+ },
80
+ ]}
53
81
  customizeColumns={{
54
82
  name: {
55
83
  header: 'Variant name',
@@ -61,25 +61,34 @@ export const productDetailFragment = graphql(
61
61
  [assetFragment],
62
62
  );
63
63
 
64
- export const productVariantListDocument = graphql(`
65
- query ProductVariantList($options: ProductVariantListOptions, $productId: ID) {
66
- productVariants(options: $options, productId: $productId) {
67
- items {
68
- id
69
- name
70
- sku
71
- currencyCode
72
- price
73
- priceWithTax
74
- stockLevels {
75
- stockOnHand
76
- stockAllocated
64
+ export const productVariantListDocument = graphql(
65
+ `
66
+ query ProductVariantList($options: ProductVariantListOptions, $productId: ID) {
67
+ productVariants(options: $options, productId: $productId) {
68
+ items {
69
+ id
70
+ createdAt
71
+ updatedAt
72
+ featuredAsset {
73
+ ...Asset
74
+ }
75
+ name
76
+ sku
77
+ enabled
78
+ currencyCode
79
+ price
80
+ priceWithTax
81
+ stockLevels {
82
+ stockOnHand
83
+ stockAllocated
84
+ }
77
85
  }
86
+ totalItems
78
87
  }
79
- totalItems
80
88
  }
81
- }
82
- `);
89
+ `,
90
+ [assetFragment],
91
+ );
83
92
 
84
93
  export const productDetailDocument = graphql(
85
94
  `
@@ -32,7 +32,9 @@ export function useFloatingBulkActions({
32
32
  }
33
33
 
34
34
  const updatePosition = () => {
35
- const container = document.querySelector(containerSelector)?.closest('div') as HTMLElement;
35
+ // Find the container by searching upwards from the current component
36
+ const currentElement = document.activeElement || document.body;
37
+ const container = currentElement.closest(containerSelector) as HTMLElement;
36
38
  if (!container) return;
37
39
 
38
40
  const containerRect = container.getBoundingClientRect();