@vendure/dashboard 3.6.0-minor-202511061555 → 3.6.0-minor-202512161252
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/dist/plugin/constants.js +2 -2
- package/dist/vite/constants.js +1 -0
- package/dist/vite/utils/compiler.d.ts +1 -0
- package/dist/vite/utils/compiler.js +5 -4
- package/dist/vite/utils/get-dashboard-paths.d.ts +5 -0
- package/dist/vite/utils/get-dashboard-paths.js +20 -0
- package/dist/vite/vite-plugin-dashboard-metadata.js +2 -1
- package/dist/vite/vite-plugin-tailwind-source.js +2 -15
- package/dist/vite/vite-plugin-translations.d.ts +10 -1
- package/dist/vite/vite-plugin-translations.js +156 -45
- package/dist/vite/vite-plugin-vendure-dashboard.d.ts +12 -0
- package/dist/vite/vite-plugin-vendure-dashboard.js +1 -0
- package/lingui.config.js +1 -0
- package/package.json +7 -7
- package/src/app/routeTree.gen.ts +1221 -0
- package/src/app/routes/_authenticated/_administrators/administrators.tsx +9 -12
- package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +6 -9
- package/src/app/routes/_authenticated/_channels/channels.tsx +9 -12
- package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_collections/collections.tsx +9 -12
- package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_countries/countries.tsx +9 -12
- package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +9 -12
- package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_customers/components/customer-history/index.ts +0 -1
- package/src/app/routes/_authenticated/_customers/customers.tsx +9 -12
- package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_facets/facets.tsx +9 -12
- package/src/app/routes/_authenticated/_facets/facets_.$facetId.values_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +10 -13
- package/src/app/routes/_authenticated/_orders/components/add-surcharge-form.tsx +139 -0
- package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +3 -0
- package/src/app/routes/_authenticated/_orders/components/fulfill-order-dialog.tsx +3 -1
- package/src/app/routes/_authenticated/_orders/components/order-address.tsx +3 -3
- package/src/app/routes/_authenticated/_orders/components/order-detail-shared.tsx +41 -41
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history-utils.tsx +1 -1
- package/src/app/routes/_authenticated/_orders/components/order-modification-summary.tsx +49 -11
- package/src/app/routes/_authenticated/_orders/components/order-table.tsx +4 -1
- package/src/app/routes/_authenticated/_orders/components/use-transition-order-to-state.tsx +2 -3
- package/src/app/routes/_authenticated/_orders/orders.tsx +3 -3
- package/src/app/routes/_authenticated/_orders/orders_.$id_.modify.tsx +12 -3
- package/src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx +27 -30
- package/src/app/routes/_authenticated/_orders/utils/use-modify-order.ts +23 -0
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +9 -12
- package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_product-variants/components/add-currency-dropdown.tsx +3 -3
- package/src/app/routes/_authenticated/_product-variants/components/add-stock-location-dropdown.tsx +2 -2
- package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +1 -0
- package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +10 -12
- package/src/app/routes/_authenticated/_products/products.graphql.ts +1 -0
- package/src/app/routes/_authenticated/_products/products.tsx +15 -18
- package/src/app/routes/_authenticated/_products/products_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$productOptionGroupId.options_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_profile/profile.tsx +3 -3
- package/src/app/routes/_authenticated/_promotions/promotions.tsx +9 -12
- package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_roles/roles.tsx +9 -12
- package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_sellers/sellers.tsx +9 -12
- package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +11 -12
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +19 -20
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +9 -12
- package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_system/healthchecks.tsx +2 -3
- package/src/app/routes/_authenticated/_system/job-queue.tsx +3 -3
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +9 -12
- package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +9 -12
- package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_zones/components/zone-bulk-actions.tsx +49 -1
- package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +34 -16
- package/src/app/routes/_authenticated/_zones/zones.tsx +9 -12
- package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/index.tsx +5 -3
- package/src/i18n/locales/bg.po +3436 -0
- package/src/lib/components/data-input/datetime-input.tsx +1 -1
- package/src/lib/components/data-input/default-relation-input.tsx +1 -1
- package/src/lib/components/data-input/relation-selector.tsx +1 -1
- package/src/lib/components/data-input/string-list-input.tsx +188 -26
- package/src/lib/components/data-input/struct-form-input.tsx +175 -174
- package/src/lib/components/data-table/column-header-wrapper.tsx +1 -1
- package/src/lib/components/data-table/data-table-filter-badge.tsx +2 -2
- package/src/lib/components/data-table/data-table.tsx +1 -1
- package/src/lib/components/data-table/use-generated-columns.tsx +1 -1
- package/src/lib/components/layout/channel-switcher.tsx +6 -2
- package/src/lib/components/layout/content-language-selector.tsx +6 -7
- package/src/lib/components/layout/dev-mode-indicator.tsx +7 -3
- package/src/lib/components/layout/language-dialog.tsx +26 -13
- package/src/lib/components/layout/manage-languages-dialog.tsx +10 -29
- package/src/lib/components/layout/nav-item-wrapper.tsx +1 -1
- package/src/lib/components/shared/asset/asset-gallery.tsx +8 -3
- package/src/lib/components/shared/configurable-operation-multi-selector.tsx +14 -16
- package/src/lib/components/shared/custom-fields-form.tsx +14 -9
- package/src/lib/components/shared/language-selector.tsx +14 -6
- package/src/lib/components/shared/multi-select.tsx +1 -1
- package/src/lib/components/shared/navigation-confirmation.tsx +1 -1
- package/src/lib/components/shared/table-cell/order-table-cell-components.tsx +4 -4
- package/src/lib/components/ui/carousel.tsx +2 -2
- package/src/lib/components/ui/chart.tsx +1 -1
- package/src/lib/components/ui/context-menu.tsx +1 -1
- package/src/lib/components/ui/drawer.tsx +1 -1
- package/src/lib/components/ui/grid-layout.tsx +1 -1
- package/src/lib/components/ui/input-group.tsx +1 -0
- package/src/lib/components/ui/input-otp.tsx +1 -1
- package/src/lib/components/ui/menubar.tsx +1 -1
- package/src/lib/components/ui/navigation-menu.tsx +1 -1
- package/src/lib/components/ui/progress.tsx +1 -1
- package/src/lib/components/ui/radio-group.tsx +1 -1
- package/src/lib/components/ui/resizable.tsx +1 -1
- package/src/lib/components/ui/select.tsx +1 -1
- package/src/lib/components/ui/slider.tsx +1 -1
- package/src/lib/components/ui/toggle-group.tsx +2 -2
- package/src/lib/components/ui/toggle.tsx +1 -1
- package/src/lib/framework/component-registry/component-registry.tsx +2 -6
- package/src/lib/framework/document-introspection/add-custom-fields.spec.ts +907 -1
- package/src/lib/framework/document-introspection/add-custom-fields.ts +248 -119
- package/src/lib/framework/extension-api/display-component-extensions.tsx +4 -3
- package/src/lib/framework/extension-api/logic/detail-forms.ts +0 -13
- package/src/lib/framework/extension-api/logic/navigation.ts +1 -1
- package/src/lib/framework/extension-api/types/data-table.ts +4 -2
- package/src/lib/framework/extension-api/types/layout.ts +34 -1
- package/src/lib/framework/extension-api/types/navigation.ts +7 -2
- package/src/lib/framework/form-engine/use-generated-form.tsx +7 -1
- package/src/lib/framework/history-entry/history-entry.tsx +1 -1
- package/src/lib/framework/layout-engine/action-bar-item-wrapper.tsx +185 -0
- package/src/lib/framework/layout-engine/dev-mode-button.tsx +15 -13
- package/src/lib/framework/layout-engine/location-wrapper.tsx +3 -1
- package/src/lib/framework/layout-engine/page-layout.spec.tsx +138 -0
- package/src/lib/framework/layout-engine/page-layout.tsx +294 -69
- package/src/lib/framework/nav-menu/nav-menu-extensions.ts +1 -1
- package/src/lib/framework/page/detail-page-route-loader.tsx +1 -1
- package/src/lib/framework/page/page-api.ts +1 -1
- package/src/lib/framework/page/use-detail-page.ts +4 -2
- package/src/lib/framework/page/use-extended-router.tsx +20 -16
- package/src/lib/framework/registry/registry-types.ts +2 -1
- package/src/lib/graphql/api.ts +3 -8
- package/src/lib/graphql/graphql-env.d.ts +29 -10
- package/src/lib/hooks/use-permissions.ts +3 -3
- package/src/lib/hooks/use-sorted-languages.ts +41 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/lib/load-i18n-messages.ts +4 -1
- package/src/lib/providers/channel-provider.tsx +11 -7
- package/src/lib/utils/config-utils.ts +19 -0
- package/src/lib/virtual.d.ts +3 -0
- package/LICENSE.md +0 -42
- package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +0 -129
- /package/src/{app/routes/_authenticated/_global-settings → lib}/utils/global-languages.ts +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { DataTable } from '@/vdb/components/data-table/data-table.js';
|
|
2
|
+
import { useGeneratedColumns } from '@/vdb/components/data-table/use-generated-columns.js';
|
|
2
3
|
import { CountrySelector } from '@/vdb/components/shared/country-selector.js';
|
|
3
4
|
import { api } from '@/vdb/graphql/api.js';
|
|
4
5
|
import { useMutation, useQuery } from '@tanstack/react-query';
|
|
5
|
-
import {
|
|
6
|
+
import { Trans } from '@lingui/react/macro';
|
|
6
7
|
import { useMemo, useState } from 'react';
|
|
7
8
|
import {
|
|
8
9
|
addCountryToZoneMutation,
|
|
9
|
-
removeCountryFromZoneMutation,
|
|
10
10
|
zoneMembersQuery,
|
|
11
11
|
} from '../zones.graphql.js';
|
|
12
|
+
import { removeCountryFromZoneBulkAction } from './zone-bulk-actions.js';
|
|
12
13
|
|
|
13
14
|
interface ZoneCountriesTableProps {
|
|
14
15
|
zoneId: string;
|
|
@@ -35,31 +36,48 @@ export function ZoneCountriesTable({ zoneId, canAddCountries = false }: Readonly
|
|
|
35
36
|
return data?.zone?.members?.slice((page - 1) * pageSize, page * pageSize);
|
|
36
37
|
}, [data, page, pageSize]);
|
|
37
38
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
const bulkActions = useMemo(
|
|
40
|
+
() => [
|
|
41
|
+
{
|
|
42
|
+
component: removeCountryFromZoneBulkAction(zoneId),
|
|
43
|
+
order: 500,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
[zoneId],
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const { columns } = useGeneratedColumns({
|
|
50
|
+
fields: [],
|
|
51
|
+
additionalColumns: {
|
|
52
|
+
name: {
|
|
53
|
+
header: () => <Trans>Country</Trans>,
|
|
54
|
+
accessorKey: 'name',
|
|
55
|
+
},
|
|
56
|
+
enabled: {
|
|
57
|
+
header: () => <Trans>Enabled</Trans>,
|
|
58
|
+
accessorKey: 'enabled',
|
|
59
|
+
},
|
|
60
|
+
code: {
|
|
61
|
+
header: () => <Trans>Code</Trans>,
|
|
62
|
+
accessorKey: 'code',
|
|
63
|
+
},
|
|
50
64
|
},
|
|
51
|
-
|
|
65
|
+
bulkActions,
|
|
66
|
+
includeActionsColumn: false,
|
|
67
|
+
enableSorting: false,
|
|
68
|
+
});
|
|
52
69
|
|
|
53
70
|
return (
|
|
54
71
|
<div>
|
|
55
72
|
<DataTable
|
|
56
|
-
columns={columns}
|
|
73
|
+
columns={columns as any}
|
|
57
74
|
data={paginatedItems ?? []}
|
|
58
75
|
onPageChange={(table, page, itemsPerPage) => {
|
|
59
76
|
setPage(page);
|
|
60
77
|
setPageSize(itemsPerPage);
|
|
61
78
|
}}
|
|
62
79
|
totalItems={data?.zone?.members?.length ?? 0}
|
|
80
|
+
bulkActions={bulkActions}
|
|
63
81
|
/>
|
|
64
82
|
{canAddCountries && (
|
|
65
83
|
<CountrySelector
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
2
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
3
2
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
4
|
-
import {
|
|
3
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
5
4
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
6
5
|
import { Trans, useLingui } from '@lingui/react/macro';
|
|
7
6
|
import { createFileRoute, Link } from '@tanstack/react-router';
|
|
@@ -48,16 +47,14 @@ function ZoneListPage() {
|
|
|
48
47
|
},
|
|
49
48
|
]}
|
|
50
49
|
>
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</PermissionGuard>
|
|
60
|
-
</PageActionBarRight>
|
|
50
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateZone']}>
|
|
51
|
+
<Button asChild>
|
|
52
|
+
<Link to="./new">
|
|
53
|
+
<PlusIcon />
|
|
54
|
+
<Trans>New Zone</Trans>
|
|
55
|
+
</Link>
|
|
56
|
+
</Button>
|
|
57
|
+
</ActionBarItem>
|
|
61
58
|
</ListPage>
|
|
62
59
|
);
|
|
63
60
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
2
2
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
3
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
4
3
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
5
4
|
import { Input } from '@/vdb/components/ui/input.js';
|
|
6
5
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
7
6
|
import {
|
|
7
|
+
ActionBarItem,
|
|
8
8
|
CustomFieldsPageBlock,
|
|
9
9
|
DetailFormGrid,
|
|
10
10
|
Page,
|
|
11
11
|
PageActionBar,
|
|
12
|
-
PageActionBarRight,
|
|
13
12
|
PageBlock,
|
|
14
13
|
PageLayout,
|
|
15
14
|
PageTitle,
|
|
@@ -76,16 +75,14 @@ function ZoneDetailPage() {
|
|
|
76
75
|
<Page pageId={pageId} form={form} submitHandler={submitHandler} entity={entity}>
|
|
77
76
|
<PageTitle>{creatingNewEntity ? <Trans>New zone</Trans> : (entity?.name ?? '')}</PageTitle>
|
|
78
77
|
<PageActionBar>
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</PermissionGuard>
|
|
88
|
-
</PageActionBarRight>
|
|
78
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateZone']}>
|
|
79
|
+
<Button
|
|
80
|
+
type="submit"
|
|
81
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
82
|
+
>
|
|
83
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
84
|
+
</Button>
|
|
85
|
+
</ActionBarItem>
|
|
89
86
|
</PageActionBar>
|
|
90
87
|
<PageLayout>
|
|
91
88
|
<PageBlock column="main" blockId="main-form">
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from '@/vdb/framework/dashboard-widget/widget-filters-context.js';
|
|
13
13
|
import { DashboardWidgetInstance } from '@/vdb/framework/extension-api/types/widgets.js';
|
|
14
14
|
import {
|
|
15
|
+
ActionBarItem,
|
|
15
16
|
FullWidthPageBlock,
|
|
16
17
|
Page,
|
|
17
18
|
PageActionBar,
|
|
18
|
-
PageActionBarRight,
|
|
19
19
|
PageLayout,
|
|
20
20
|
PageTitle,
|
|
21
21
|
} from '@/vdb/framework/layout-engine/page-layout.js';
|
|
@@ -181,19 +181,21 @@ function DashboardPage() {
|
|
|
181
181
|
<Trans>Insights</Trans>
|
|
182
182
|
</PageTitle>
|
|
183
183
|
<PageActionBar>
|
|
184
|
-
<
|
|
184
|
+
<ActionBarItem itemId="date-range-picker">
|
|
185
185
|
<DateRangePicker
|
|
186
186
|
dateRange={dateRange}
|
|
187
187
|
onDateRangeChange={setDateRange}
|
|
188
188
|
className="mr-2"
|
|
189
189
|
/>
|
|
190
|
+
</ActionBarItem>
|
|
191
|
+
<ActionBarItem itemId="edit-layout-button">
|
|
190
192
|
<Button
|
|
191
193
|
variant={editMode ? 'default' : 'outline'}
|
|
192
194
|
onClick={() => setEditMode(prev => !prev)}
|
|
193
195
|
>
|
|
194
196
|
{editMode ? t`Save Layout` : t`Edit Layout`}
|
|
195
197
|
</Button>
|
|
196
|
-
</
|
|
198
|
+
</ActionBarItem>
|
|
197
199
|
</PageActionBar>
|
|
198
200
|
<PageLayout>
|
|
199
201
|
<FullWidthPageBlock blockId="widgets">
|