@vendure/dashboard 3.3.6-master-202507021511 → 3.3.6-master-202507030234

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 (116) hide show
  1. package/README.md +41 -4
  2. package/dist/plugin/vite-plugin-config.js +4 -2
  3. package/package.json +4 -4
  4. package/src/app/routes/_authenticated/_administrators/components/administrator-bulk-actions.tsx +1 -1
  5. package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +1 -1
  6. package/src/app/routes/_authenticated/_channels/components/channel-bulk-actions.tsx +1 -1
  7. package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +1 -2
  8. package/src/app/routes/_authenticated/_collections/components/collection-contents-table.tsx +1 -1
  9. package/src/app/routes/_authenticated/_collections/components/collection-filters-selector.tsx +1 -1
  10. package/src/app/routes/_authenticated/_countries/components/country-bulk-actions.tsx +1 -1
  11. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-bulk-actions.tsx +1 -1
  12. package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +1 -1
  13. package/src/app/routes/_authenticated/_customers/components/customer-bulk-actions.tsx +1 -1
  14. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +1 -1
  15. package/src/app/routes/_authenticated/_customers/components/customer-order-table.tsx +1 -1
  16. package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +1 -1
  17. package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +1 -1
  18. package/src/app/routes/_authenticated/_facets/components/facet-bulk-actions.tsx +1 -2
  19. package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +1 -1
  20. package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +1 -1
  21. package/src/app/routes/_authenticated/_orders/components/customer-address-selector.tsx +1 -1
  22. package/src/app/routes/_authenticated/_orders/components/money-gross-net.tsx +1 -1
  23. package/src/app/routes/_authenticated/_orders/components/order-address.tsx +1 -1
  24. package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +1 -1
  25. package/src/app/routes/_authenticated/_orders/components/order-history/order-history.tsx +6 -1
  26. package/src/app/routes/_authenticated/_orders/components/order-line-custom-fields-form.tsx +1 -1
  27. package/src/app/routes/_authenticated/_orders/components/order-table-totals.tsx +3 -3
  28. package/src/app/routes/_authenticated/_orders/components/order-table.tsx +1 -1
  29. package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +2 -2
  30. package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +1 -1
  31. package/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx +1 -1
  32. package/src/app/routes/_authenticated/_payment-methods/components/payment-handler-selector.tsx +1 -1
  33. package/src/app/routes/_authenticated/_payment-methods/components/payment-method-bulk-actions.tsx +1 -2
  34. package/src/app/routes/_authenticated/_product-variants/components/product-variant-bulk-actions.tsx +1 -2
  35. package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +4 -1
  36. package/src/app/routes/_authenticated/_products/components/option-value-input.tsx +5 -1
  37. package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +1 -2
  38. package/src/app/routes/_authenticated/_products/components/product-option-select.tsx +6 -1
  39. package/src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx +1 -1
  40. package/src/app/routes/_authenticated/_promotions/components/promotion-bulk-actions.tsx +1 -2
  41. package/src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx +1 -1
  42. package/src/app/routes/_authenticated/_roles/components/expandable-permissions.tsx +1 -1
  43. package/src/app/routes/_authenticated/_roles/components/permissions-grid.tsx +1 -1
  44. package/src/app/routes/_authenticated/_roles/components/role-bulk-actions.tsx +1 -1
  45. package/src/app/routes/_authenticated/_sellers/components/seller-bulk-actions.tsx +1 -1
  46. package/src/app/routes/_authenticated/_shipping-methods/components/fulfillment-handler-selector.tsx +1 -1
  47. package/src/app/routes/_authenticated/_shipping-methods/components/shipping-calculator-selector.tsx +1 -1
  48. package/src/app/routes/_authenticated/_shipping-methods/components/shipping-method-bulk-actions.tsx +1 -2
  49. package/src/app/routes/_authenticated/_stock-locations/components/stock-location-bulk-actions.tsx +1 -2
  50. package/src/app/routes/_authenticated/_system/components/payload-dialog.tsx +1 -1
  51. package/src/app/routes/_authenticated/_tax-categories/components/tax-category-bulk-actions.tsx +1 -1
  52. package/src/app/routes/_authenticated/_tax-rates/components/tax-rate-bulk-actions.tsx +1 -1
  53. package/src/app/routes/_authenticated/_zones/components/zone-bulk-actions.tsx +1 -1
  54. package/src/app/routes/_authenticated/_zones/components/zone-countries-sheet.tsx +1 -1
  55. package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +1 -1
  56. package/src/app/routes/_authenticated/index.tsx +1 -1
  57. package/src/lib/components/data-display/boolean.tsx +1 -1
  58. package/src/lib/components/data-display/date-time.tsx +1 -1
  59. package/src/lib/components/data-display/json.tsx +1 -1
  60. package/src/lib/components/data-input/affixed-input.tsx +1 -1
  61. package/src/lib/components/data-input/richt-text-input.tsx +1 -1
  62. package/src/lib/components/data-table/add-filter-menu.tsx +1 -1
  63. package/src/lib/components/data-table/data-table-bulk-actions.tsx +1 -1
  64. package/src/lib/components/data-table/data-table-column-header.tsx +1 -1
  65. package/src/lib/components/data-table/data-table-filter-dialog.tsx +1 -1
  66. package/src/lib/components/data-table/data-table.tsx +1 -1
  67. package/src/lib/components/data-table/filters/data-table-boolean-filter.tsx +4 -1
  68. package/src/lib/components/data-table/filters/data-table-datetime-filter.tsx +4 -1
  69. package/src/lib/components/data-table/filters/data-table-id-filter.tsx +1 -1
  70. package/src/lib/components/data-table/filters/data-table-number-filter.tsx +5 -1
  71. package/src/lib/components/data-table/filters/data-table-string-filter.tsx +4 -1
  72. package/src/lib/components/data-table/refresh-button.tsx +4 -1
  73. package/src/lib/components/layout/nav-main.tsx +1 -1
  74. package/src/lib/components/shared/asset/asset-bulk-actions.tsx +1 -1
  75. package/src/lib/components/shared/asset/asset-preview-selector.tsx +1 -1
  76. package/src/lib/components/shared/asset/asset-preview.tsx +1 -1
  77. package/src/lib/components/shared/asset/asset-properties.tsx +1 -1
  78. package/src/lib/components/shared/asset/focal-point-control.tsx +1 -1
  79. package/src/lib/components/shared/channel-code-label.tsx +1 -1
  80. package/src/lib/components/shared/copyable-text.tsx +2 -3
  81. package/src/lib/components/shared/custom-fields-form.tsx +1 -1
  82. package/src/lib/components/shared/error-page.tsx +1 -1
  83. package/src/lib/components/shared/history-timeline/history-entry.tsx +7 -1
  84. package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +1 -1
  85. package/src/lib/components/shared/history-timeline/history-note-input.tsx +1 -1
  86. package/src/lib/components/shared/history-timeline/history-timeline.tsx +1 -1
  87. package/src/lib/components/shared/option-value-input.tsx +1 -1
  88. package/src/lib/components/shared/paginated-list-data-table.tsx +1 -1
  89. package/src/lib/components/shared/permission-guard.tsx +1 -1
  90. package/src/lib/components/shared/product-variant-selector.tsx +1 -1
  91. package/src/lib/components/shared/role-code-label.tsx +1 -1
  92. package/src/lib/components/shared/stock-level-label.tsx +5 -5
  93. package/src/lib/components/shared/tax-category-selector.tsx +1 -1
  94. package/src/lib/components/shared/zone-selector.tsx +1 -1
  95. package/src/lib/framework/alert/alert-extensions.tsx +2 -3
  96. package/src/lib/framework/alert/alert-item.tsx +2 -1
  97. package/src/lib/framework/dashboard-widget/base-widget.tsx +2 -10
  98. package/src/lib/framework/dashboard-widget/widget-extensions.tsx +1 -1
  99. package/src/lib/framework/data-table/data-table-extensions.ts +1 -1
  100. package/src/lib/framework/extension-api/extension-api-types.ts +0 -3
  101. package/src/lib/framework/extension-api/types/data-table.ts +25 -2
  102. package/src/lib/framework/extension-api/types/widgets.ts +7 -4
  103. package/src/lib/framework/layout-engine/location-wrapper.tsx +4 -1
  104. package/src/lib/framework/layout-engine/page-layout.tsx +16 -9
  105. package/src/lib/framework/page/list-page.tsx +2 -8
  106. package/src/lib/framework/registry/registry-types.ts +7 -7
  107. package/src/lib/graphql/graphql-env.d.ts +31 -14
  108. package/src/lib/index.ts +0 -8
  109. package/src/lib/lib/trans.tsx +3 -3
  110. package/src/lib/providers/auth.tsx +1 -1
  111. package/src/lib/providers/channel-provider.tsx +1 -1
  112. package/src/lib/providers/theme-provider.tsx +2 -3
  113. package/vite/vite-plugin-config.ts +2 -1
  114. package/src/lib/framework/alert/types.ts +0 -13
  115. package/src/lib/framework/dashboard-widget/types.ts +0 -22
  116. package/src/lib/framework/data-table/data-table-types.ts +0 -25
@@ -18,7 +18,10 @@ const LocationWrapperContext = createContext<{
18
18
  setHoveredId: null,
19
19
  });
20
20
 
21
- export function LocationWrapper({ children, blockId }: { children: React.ReactNode; blockId?: string }) {
21
+ export function LocationWrapper({
22
+ children,
23
+ blockId,
24
+ }: Readonly<{ children: React.ReactNode; blockId?: string }>) {
22
25
  const page = usePage();
23
26
  const { settings } = useUserSettings();
24
27
  const [isPopoverOpen, setIsPopoverOpen] = useState(false);
@@ -10,7 +10,7 @@ import { useMediaQuery } from '@uidotdev/usehooks';
10
10
  import React, { ComponentProps } from 'react';
11
11
  import { Control, UseFormReturn } from 'react-hook-form';
12
12
 
13
- import { DashboardActionBarItem } from '../extension-api/extension-api-types.js';
13
+ import { DashboardActionBarItem } from '../extension-api/types/layout.js';
14
14
 
15
15
  import { PageBlockContext } from '@/vdb/framework/layout-engine/page-block-provider.js';
16
16
  import { PageContext, PageContextValue } from '@/vdb/framework/layout-engine/page-provider.js';
@@ -42,7 +42,7 @@ export interface PageProps extends ComponentProps<'div'> {
42
42
  * @docsWeight 0
43
43
  * @since 3.3.0
44
44
  */
45
- export function Page({ children, pageId, entity, form, submitHandler, ...props }: PageProps) {
45
+ export function Page({ children, pageId, entity, form, submitHandler, ...props }: Readonly<PageProps>) {
46
46
  const childArray = React.Children.toArray(children);
47
47
 
48
48
  const pageTitle = childArray.find(child => React.isValidElement(child) && child.type === PageTitle);
@@ -164,7 +164,7 @@ function isPageBlock(child: unknown): child is React.ReactElement<PageBlockProps
164
164
  * @docsWeight 0
165
165
  * @since 3.3.0
166
166
  */
167
- export function PageLayout({ children, className }: PageLayoutProps) {
167
+ export function PageLayout({ children, className }: Readonly<PageLayoutProps>) {
168
168
  const page = usePage();
169
169
  const isDesktop = useMediaQuery('only screen and (min-width : 769px)');
170
170
  // Separate blocks into categories
@@ -238,7 +238,7 @@ export function PageLayout({ children, className }: PageLayoutProps) {
238
238
  );
239
239
  }
240
240
 
241
- export function DetailFormGrid({ children }: { children: React.ReactNode }) {
241
+ export function DetailFormGrid({ children }: Readonly<{ children: React.ReactNode }>) {
242
242
  return <div className="md:grid md:grid-cols-2 gap-4 items-start mb-4">{children}</div>;
243
243
  }
244
244
 
@@ -252,7 +252,7 @@ export function DetailFormGrid({ children }: { children: React.ReactNode }) {
252
252
  * @docsPage PageTitle
253
253
  * @since 3.3.0
254
254
  */
255
- export function PageTitle({ children }: { children: React.ReactNode }) {
255
+ export function PageTitle({ children }: Readonly<{ children: React.ReactNode }>) {
256
256
  return <h1 className="text-2xl font-semibold">{children}</h1>;
257
257
  }
258
258
 
@@ -269,7 +269,7 @@ export function PageTitle({ children }: { children: React.ReactNode }) {
269
269
  * @docsWeight 0
270
270
  * @since 3.3.0
271
271
  */
272
- export function PageActionBar({ children }: { children: React.ReactNode }) {
272
+ export function PageActionBar({ children }: Readonly<{ children: React.ReactNode }>) {
273
273
  let childArray = React.Children.toArray(children);
274
274
 
275
275
  const leftContent = childArray.filter(child => isOfType(child, PageActionBarLeft));
@@ -291,7 +291,7 @@ export function PageActionBar({ children }: { children: React.ReactNode }) {
291
291
  * @docsPage PageActionBar
292
292
  * @since 3.3.0
293
293
  */
294
- export function PageActionBarLeft({ children }: { children: React.ReactNode }) {
294
+ export function PageActionBarLeft({ children }: Readonly<{ children: React.ReactNode }>) {
295
295
  return <div className="flex justify-start gap-2">{children}</div>;
296
296
  }
297
297
 
@@ -303,7 +303,7 @@ export function PageActionBarLeft({ children }: { children: React.ReactNode }) {
303
303
  * @docsPage PageActionBar
304
304
  * @since 3.3.0
305
305
  */
306
- export function PageActionBarRight({ children }: { children: React.ReactNode }) {
306
+ export function PageActionBarRight({ children }: Readonly<{ children: React.ReactNode }>) {
307
307
  const page = usePage();
308
308
  const actionBarItems = page.pageId ? getDashboardActionBarItems(page.pageId) : [];
309
309
  return (
@@ -355,7 +355,14 @@ export type PageBlockProps = {
355
355
  * @docsWeight 0
356
356
  * @since 3.3.0
357
357
  */
358
- export function PageBlock({ children, title, description, className, blockId, column }: PageBlockProps) {
358
+ export function PageBlock({
359
+ children,
360
+ title,
361
+ description,
362
+ className,
363
+ blockId,
364
+ column,
365
+ }: Readonly<PageBlockProps>) {
359
366
  return (
360
367
  <LocationWrapper blockId={blockId}>
361
368
  <PageBlockContext.Provider value={{ blockId, title, description, column }}>
@@ -9,21 +9,15 @@ import {
9
9
  PaginatedListDataTable,
10
10
  RowAction,
11
11
  } from '@/vdb/components/shared/paginated-list-data-table.js';
12
- import { BulkAction } from '@/vdb/framework/data-table/data-table-types.js';
13
12
  import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
14
13
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
15
14
  import { AnyRoute, AnyRouter, useNavigate } from '@tanstack/react-router';
16
15
  import { ColumnFiltersState, SortingState, Table } from '@tanstack/react-table';
17
16
  import { TableOptions } from '@tanstack/table-core';
18
17
 
18
+ import { BulkAction } from '@/vdb/framework/extension-api/types/index.js';
19
19
  import { addCustomFields } from '../document-introspection/add-custom-fields.js';
20
- import {
21
- FullWidthPageBlock,
22
- Page,
23
- PageActionBar,
24
- PageLayout,
25
- PageTitle,
26
- } from '../layout-engine/page-layout.js';
20
+ import { FullWidthPageBlock, Page, PageActionBar, PageLayout, PageTitle } from '../layout-engine/page-layout.js';
27
21
 
28
22
  /**
29
23
  * @description
@@ -1,14 +1,14 @@
1
+ import {
2
+ BulkAction,
3
+ DashboardActionBarItem,
4
+ DashboardPageBlockDefinition,
5
+ DashboardWidgetDefinition,
6
+ } from '@/vdb/framework/extension-api/types/index.js';
1
7
  import { DocumentNode } from 'graphql';
2
8
  import React from 'react';
3
9
 
4
- import { DashboardAlertDefinition } from '../alert/types.js';
5
10
  import { DataDisplayComponent, DataInputComponent } from '../component-registry/component-registry.js';
6
- import { DashboardWidgetDefinition } from '../dashboard-widget/types.js';
7
- import { BulkAction } from '../data-table/data-table-types.js';
8
- import {
9
- DashboardActionBarItem,
10
- DashboardPageBlockDefinition,
11
- } from '../extension-api/extension-api-types.js';
11
+ import { DashboardAlertDefinition } from '../extension-api/types/alerts.js';
12
12
  import { CustomFormComponentInputProps } from '../form-engine/custom-form-component.js';
13
13
  import { NavMenuConfig } from '../nav-menu/nav-menu-extensions.js';
14
14