@vendure/dashboard 3.3.6-master-202507020959 → 3.3.6-master-202507021511
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/vite-plugin-config.js +2 -6
- package/package.json +4 -4
- package/src/app/app-providers.tsx +6 -6
- package/src/app/common/delete-bulk-action.tsx +4 -4
- package/src/app/common/duplicate-bulk-action.tsx +5 -5
- package/src/app/main.tsx +9 -9
- package/src/app/routes/__root.tsx +1 -2
- package/src/app/routes/_authenticated/_administrators/administrators.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_administrators/administrators.tsx +8 -8
- package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_administrators/components/administrator-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +15 -15
- package/src/app/routes/_authenticated/_assets/assets.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_assets/assets.tsx +12 -8
- package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_assets/components/asset-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_channels/channels.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_channels/channels.tsx +10 -10
- package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +16 -16
- package/src/app/routes/_authenticated/_channels/components/channel-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_collections/collections.graphql.ts +3 -3
- package/src/app/routes/_authenticated/_collections/collections.tsx +7 -7
- package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +15 -15
- package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_collections/components/collection-contents-preview-table.tsx +7 -8
- package/src/app/routes/_authenticated/_collections/components/collection-contents-sheet.tsx +9 -5
- package/src/app/routes/_authenticated/_collections/components/collection-contents-table.tsx +9 -8
- package/src/app/routes/_authenticated/_collections/components/collection-filters-selector.tsx +6 -6
- package/src/app/routes/_authenticated/_countries/components/country-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_countries/countries.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_countries/countries.tsx +6 -6
- package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +12 -12
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-sheet.tsx +12 -5
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +22 -17
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +6 -6
- package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +10 -10
- package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +19 -19
- package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +9 -9
- package/src/app/routes/_authenticated/_customers/components/customer-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +4 -4
- package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history.tsx +11 -7
- package/src/app/routes/_authenticated/_customers/components/customer-history/use-customer-history.ts +4 -4
- package/src/app/routes/_authenticated/_customers/components/customer-order-table.tsx +74 -72
- package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +3 -3
- package/src/app/routes/_authenticated/_customers/customers.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_customers/customers.tsx +6 -6
- package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +8 -8
- package/src/app/routes/_authenticated/_facets/components/facet-bulk-actions.tsx +7 -7
- package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +3 -3
- package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +14 -10
- package/src/app/routes/_authenticated/_facets/facets.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_facets/facets.tsx +7 -7
- package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +12 -12
- package/src/app/routes/_authenticated/_global-settings/global-settings.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +12 -12
- package/src/app/routes/_authenticated/_orders/components/customer-address-selector.tsx +10 -13
- package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +92 -54
- package/src/app/routes/_authenticated/_orders/components/money-gross-net.tsx +10 -8
- package/src/app/routes/_authenticated/_orders/components/order-address.tsx +2 -3
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +66 -61
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history.tsx +5 -5
- package/src/app/routes/_authenticated/_orders/components/order-history/use-order-history.ts +4 -4
- package/src/app/routes/_authenticated/_orders/components/order-line-custom-fields-form.tsx +10 -6
- package/src/app/routes/_authenticated/_orders/components/order-table-totals.tsx +38 -18
- package/src/app/routes/_authenticated/_orders/components/order-table.tsx +3 -3
- package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +37 -35
- package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +3 -3
- package/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx +42 -43
- package/src/app/routes/_authenticated/_orders/orders.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_orders/orders.tsx +21 -20
- package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +9 -9
- package/src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx +188 -90
- package/src/app/routes/_authenticated/_payment-methods/components/payment-eligibility-checker-selector.tsx +10 -7
- package/src/app/routes/_authenticated/_payment-methods/components/payment-handler-selector.tsx +11 -11
- package/src/app/routes/_authenticated/_payment-methods/components/payment-method-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +7 -7
- package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +13 -13
- package/src/app/routes/_authenticated/_product-variants/components/product-variant-bulk-actions.tsx +8 -8
- package/src/app/routes/_authenticated/_product-variants/components/variant-price-detail.tsx +7 -6
- package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +6 -6
- package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +19 -19
- package/src/app/routes/_authenticated/_products/components/add-product-variant-dialog.tsx +10 -10
- package/src/app/routes/_authenticated/_products/components/assign-facet-values-dialog.tsx +7 -7
- package/src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx +57 -41
- package/src/app/routes/_authenticated/_products/components/create-product-variants-dialog.tsx +11 -11
- package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +14 -13
- package/src/app/routes/_authenticated/_products/components/option-value-input.tsx +16 -14
- package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +8 -8
- package/src/app/routes/_authenticated/_products/components/product-option-select.tsx +22 -33
- package/src/app/routes/_authenticated/_products/components/product-variants-table.tsx +6 -6
- package/src/app/routes/_authenticated/_products/products.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_products/products.tsx +6 -6
- package/src/app/routes/_authenticated/_products/products_.$id.tsx +16 -16
- package/src/app/routes/_authenticated/_profile/profile.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_profile/profile.tsx +8 -8
- package/src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx +13 -10
- package/src/app/routes/_authenticated/_promotions/components/promotion-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx +13 -10
- package/src/app/routes/_authenticated/_promotions/promotions.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_promotions/promotions.tsx +7 -7
- package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_roles/components/expandable-permissions.tsx +4 -4
- package/src/app/routes/_authenticated/_roles/components/permissions-grid.tsx +20 -16
- package/src/app/routes/_authenticated/_roles/components/role-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_roles/roles.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_roles/roles.tsx +10 -10
- package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_sellers/components/seller-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_sellers/sellers.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_sellers/sellers.tsx +7 -7
- package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +10 -10
- package/src/app/routes/_authenticated/_shipping-methods/components/fulfillment-handler-selector.tsx +5 -5
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-calculator-selector.tsx +22 -20
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-eligibility-checker-selector.tsx +25 -21
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-method-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-method-dialog.tsx +3 -3
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +6 -6
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +12 -12
- package/src/app/routes/_authenticated/_stock-locations/components/stock-location-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +6 -6
- package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_system/components/payload-dialog.tsx +3 -3
- package/src/app/routes/_authenticated/_system/healthchecks.tsx +4 -4
- package/src/app/routes/_authenticated/_system/job-queue.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_system/job-queue.tsx +10 -6
- package/src/app/routes/_authenticated/_system/scheduled-tasks.tsx +34 -28
- package/src/app/routes/_authenticated/_tax-categories/components/tax-category-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +7 -7
- package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_tax-rates/components/tax-rate-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +8 -8
- package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_zones/components/zone-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_zones/components/zone-countries-sheet.tsx +3 -3
- package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +11 -7
- package/src/app/routes/_authenticated/_zones/zones.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_zones/zones.tsx +6 -6
- package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +10 -10
- package/src/app/routes/_authenticated/index.tsx +4 -4
- package/src/app/routes/_authenticated.tsx +3 -3
- package/src/app/routes/login.tsx +2 -2
- package/src/lib/components/data-display/date-time.tsx +1 -1
- package/src/lib/components/data-display/money.tsx +2 -3
- package/src/lib/components/data-input/affixed-input.tsx +2 -7
- package/src/lib/components/data-input/customer-group-input.tsx +2 -2
- package/src/lib/components/data-input/datetime-input.tsx +129 -146
- package/src/lib/components/data-input/facet-value-input.tsx +30 -22
- package/src/lib/components/data-input/money-input.tsx +3 -3
- package/src/lib/components/data-table/add-filter-menu.tsx +8 -17
- package/src/lib/components/data-table/data-table-bulk-action-item.tsx +3 -3
- package/src/lib/components/data-table/data-table-bulk-actions.tsx +7 -7
- package/src/lib/components/data-table/data-table-column-header.tsx +3 -21
- package/src/lib/components/data-table/data-table-faceted-filter.tsx +8 -8
- package/src/lib/components/data-table/data-table-filter-badge.tsx +1 -1
- package/src/lib/components/data-table/data-table-filter-dialog.tsx +3 -3
- package/src/lib/components/data-table/data-table-pagination.tsx +2 -2
- package/src/lib/components/data-table/data-table-view-options.tsx +25 -21
- package/src/lib/components/data-table/data-table.tsx +8 -8
- package/src/lib/components/data-table/filters/data-table-boolean-filter.tsx +7 -7
- package/src/lib/components/data-table/filters/data-table-datetime-filter.tsx +10 -22
- package/src/lib/components/data-table/filters/data-table-id-filter.tsx +14 -9
- package/src/lib/components/data-table/filters/data-table-number-filter.tsx +13 -16
- package/src/lib/components/data-table/filters/data-table-string-filter.tsx +25 -11
- package/src/lib/components/data-table/human-readable-operator.tsx +1 -1
- package/src/lib/components/data-table/refresh-button.tsx +1 -1
- package/src/lib/components/layout/app-layout.tsx +8 -8
- package/src/lib/components/layout/app-sidebar.tsx +5 -5
- package/src/lib/components/layout/channel-switcher.tsx +8 -8
- package/src/lib/components/layout/content-language-selector.tsx +16 -10
- package/src/lib/components/layout/generated-breadcrumbs.tsx +1 -1
- package/src/lib/components/layout/language-dialog.tsx +5 -11
- package/src/lib/components/layout/nav-main.tsx +3 -3
- package/src/lib/components/layout/nav-projects.tsx +2 -2
- package/src/lib/components/layout/nav-user.tsx +7 -7
- package/src/lib/components/layout/prerelease-popup.tsx +1 -1
- package/src/lib/components/login/login-form.tsx +5 -5
- package/src/lib/components/shared/alerts.tsx +3 -3
- package/src/lib/components/shared/animated-number.tsx +2 -2
- package/src/lib/components/shared/asset/asset-bulk-actions.tsx +11 -7
- package/src/lib/components/shared/asset/asset-focal-point-editor.tsx +29 -19
- package/src/lib/components/shared/asset/asset-gallery.tsx +12 -12
- package/src/lib/components/shared/asset/asset-picker-dialog.tsx +63 -66
- package/src/lib/components/shared/asset/asset-preview-dialog.tsx +3 -7
- package/src/lib/components/shared/asset/asset-preview-selector.tsx +3 -5
- package/src/lib/components/shared/asset/asset-preview.tsx +7 -15
- package/src/lib/components/shared/asset/asset-properties.tsx +6 -8
- package/src/lib/components/shared/asset/focal-point-control.tsx +5 -13
- package/src/lib/components/shared/assign-to-channel-bulk-action.tsx +4 -4
- package/src/lib/components/shared/assign-to-channel-dialog.tsx +8 -8
- package/src/lib/components/shared/channel-code-label.tsx +2 -3
- package/src/lib/components/shared/channel-selector.tsx +6 -6
- package/src/lib/components/shared/configurable-operation-arg-input.tsx +2 -2
- package/src/lib/components/shared/configurable-operation-input.tsx +15 -16
- package/src/lib/components/shared/confirmation-dialog.tsx +2 -2
- package/src/lib/components/shared/country-selector.tsx +21 -18
- package/src/lib/components/shared/currency-selector.tsx +5 -5
- package/src/lib/components/shared/custom-fields-form.tsx +8 -8
- package/src/lib/components/shared/customer-address-form.tsx +3 -3
- package/src/lib/components/shared/customer-group-selector.tsx +6 -6
- package/src/lib/components/shared/customer-selector.tsx +24 -18
- package/src/lib/components/shared/entity-assets.tsx +33 -34
- package/src/lib/components/shared/error-page.tsx +5 -5
- package/src/lib/components/shared/facet-value-chip.tsx +12 -5
- package/src/lib/components/shared/facet-value-selector.tsx +64 -63
- package/src/lib/components/shared/history-timeline/history-entry.tsx +5 -5
- package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +2 -2
- package/src/lib/components/shared/history-timeline/history-note-editor.tsx +4 -4
- package/src/lib/components/shared/history-timeline/history-note-input.tsx +2 -2
- package/src/lib/components/shared/history-timeline/history-timeline.tsx +14 -7
- package/src/lib/components/shared/language-selector.tsx +5 -5
- package/src/lib/components/shared/multi-select.tsx +5 -5
- package/src/lib/components/shared/navigation-confirmation.tsx +24 -9
- package/src/lib/components/shared/option-value-input.tsx +16 -14
- package/src/lib/components/shared/paginated-list-data-table.tsx +12 -12
- package/src/lib/components/shared/permission-guard.tsx +4 -4
- package/src/lib/components/shared/product-variant-selector.tsx +31 -30
- package/src/lib/components/shared/remove-from-channel-bulk-action.tsx +4 -4
- package/src/lib/components/shared/role-code-label.tsx +9 -5
- package/src/lib/components/shared/role-selector.tsx +4 -4
- package/src/lib/components/shared/seller-selector.tsx +21 -17
- package/src/lib/components/shared/tax-category-selector.tsx +4 -4
- package/src/lib/components/shared/translatable-form-field.tsx +1 -1
- package/src/lib/components/shared/vendure-image.tsx +1 -1
- package/src/lib/components/shared/zone-selector.tsx +4 -5
- package/src/lib/components/ui/accordion.tsx +3 -3
- package/src/lib/components/ui/alert-dialog.tsx +10 -10
- package/src/lib/components/ui/alert.tsx +3 -3
- package/src/lib/components/ui/badge.tsx +2 -2
- package/src/lib/components/ui/breadcrumb.tsx +4 -4
- package/src/lib/components/ui/button.tsx +10 -3
- package/src/lib/components/ui/calendar.tsx +392 -459
- package/src/lib/components/ui/card.tsx +2 -2
- package/src/lib/components/ui/checkbox.tsx +2 -2
- package/src/lib/components/ui/command.tsx +12 -6
- package/src/lib/components/ui/dialog.tsx +2 -2
- package/src/lib/components/ui/dropdown-menu.tsx +7 -7
- package/src/lib/components/ui/form.tsx +4 -4
- package/src/lib/components/ui/hover-card.tsx +3 -3
- package/src/lib/components/ui/input.tsx +1 -1
- package/src/lib/components/ui/label.tsx +2 -2
- package/src/lib/components/ui/pagination.tsx +87 -108
- package/src/lib/components/ui/popover.tsx +3 -3
- package/src/lib/components/ui/scroll-area.tsx +2 -2
- package/src/lib/components/ui/select.tsx +2 -2
- package/src/lib/components/ui/separator.tsx +2 -2
- package/src/lib/components/ui/sheet.tsx +5 -5
- package/src/lib/components/ui/sidebar.tsx +10 -10
- package/src/lib/components/ui/skeleton.tsx +1 -1
- package/src/lib/components/ui/switch.tsx +2 -2
- package/src/lib/components/ui/table.tsx +2 -2
- package/src/lib/components/ui/tabs.tsx +3 -3
- package/src/lib/components/ui/textarea.tsx +1 -1
- package/src/lib/components/ui/tooltip.tsx +3 -3
- package/src/lib/framework/alert/alert-item.tsx +3 -2
- package/src/lib/framework/dashboard-widget/base-widget.tsx +4 -4
- package/src/lib/framework/dashboard-widget/latest-orders-widget/index.tsx +7 -8
- package/src/lib/framework/dashboard-widget/latest-orders-widget/latest-orders-widget.graphql.ts +1 -1
- package/src/lib/framework/dashboard-widget/metrics-widget/index.tsx +6 -7
- package/src/lib/framework/dashboard-widget/metrics-widget/metrics-widget.graphql.ts +1 -1
- package/src/lib/framework/dashboard-widget/orders-summary/index.tsx +6 -6
- package/src/lib/framework/dashboard-widget/orders-summary/order-summary-widget.graphql.ts +1 -1
- package/src/lib/framework/data-table/data-table-extensions.ts +1 -1
- package/src/lib/framework/defaults.ts +1 -1
- package/src/lib/framework/document-extension/extend-detail-form-query.ts +2 -2
- package/src/lib/framework/document-extension/extend-document.spec.ts +1 -1
- package/src/lib/framework/document-extension/extend-document.ts +1 -1
- package/src/lib/framework/document-introspection/add-custom-fields.ts +2 -2
- package/src/lib/framework/document-introspection/hooks.ts +4 -1
- package/src/lib/framework/extension-api/display-component-extensions.tsx +4 -4
- package/src/lib/framework/extension-api/input-component-extensions.tsx +5 -5
- package/src/lib/framework/extension-api/logic/detail-forms.ts +1 -1
- package/src/lib/framework/extension-api/types/detail-forms.ts +1 -1
- package/src/lib/framework/form-engine/form-schema-tools.ts +1 -1
- package/src/lib/framework/layout-engine/location-wrapper.tsx +7 -7
- package/src/lib/framework/layout-engine/page-block-provider.tsx +1 -1
- package/src/lib/framework/layout-engine/page-layout.tsx +10 -10
- package/src/lib/framework/page/detail-page-route-loader.tsx +3 -3
- package/src/lib/framework/page/detail-page.tsx +9 -9
- package/src/lib/framework/page/list-page.tsx +10 -4
- package/src/lib/framework/page/use-detail-page.ts +1 -1
- package/src/lib/graphql/graphql-env.d.ts +14 -31
- package/src/lib/hooks/use-auth.tsx +1 -1
- package/src/lib/hooks/use-channel.ts +1 -2
- package/src/lib/hooks/use-extended-detail-query.ts +2 -3
- package/src/lib/hooks/use-extended-list-query.ts +3 -4
- package/src/lib/hooks/use-grouped-permissions.ts +1 -2
- package/src/lib/hooks/use-page-block.tsx +1 -1
- package/src/lib/hooks/use-page.tsx +1 -1
- package/src/lib/hooks/use-server-config.ts +1 -2
- package/src/lib/hooks/use-theme.ts +1 -2
- package/src/lib/hooks/use-user-settings.tsx +1 -1
- package/src/lib/index.ts +28 -0
- package/src/lib/providers/auth.tsx +3 -3
- package/src/lib/providers/channel-provider.tsx +3 -3
- package/src/lib/providers/server-config.tsx +13 -11
- package/vite/vite-plugin-config.ts +3 -6
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Column } from '@tanstack/react-table';
|
|
3
|
-
import { Check, FilterIcon
|
|
2
|
+
import { Check, FilterIcon } from 'lucide-react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Button } from '@/components/ui/button.js';
|
|
5
|
+
import { Badge } from '@/vdb/components/ui/badge.js';
|
|
6
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
8
7
|
import {
|
|
9
8
|
Command,
|
|
10
9
|
CommandEmpty,
|
|
@@ -13,9 +12,10 @@ import {
|
|
|
13
12
|
CommandItem,
|
|
14
13
|
CommandList,
|
|
15
14
|
CommandSeparator,
|
|
16
|
-
} from '@/components/ui/command.js';
|
|
17
|
-
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover.js';
|
|
18
|
-
import { Separator } from '@/components/ui/separator.js';
|
|
15
|
+
} from '@/vdb/components/ui/command.js';
|
|
16
|
+
import { Popover, PopoverContent, PopoverTrigger } from '@/vdb/components/ui/popover.js';
|
|
17
|
+
import { Separator } from '@/vdb/components/ui/separator.js';
|
|
18
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
19
19
|
|
|
20
20
|
export interface DataTableFacetedFilterOption {
|
|
21
21
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useLocalFormat } from '@/hooks/use-local-format.js';
|
|
1
|
+
import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
|
|
2
2
|
import { CircleX, Filter } from 'lucide-react';
|
|
3
3
|
import { Badge } from '../ui/badge.js';
|
|
4
4
|
import { HumanReadableOperator, Operator } from './human-readable-operator.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button.js';
|
|
1
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
2
2
|
import {
|
|
3
3
|
DialogClose,
|
|
4
4
|
DialogContent,
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
DialogFooter,
|
|
7
7
|
DialogHeader,
|
|
8
8
|
DialogTitle,
|
|
9
|
-
} from '@/components/ui/dialog.js';
|
|
10
|
-
import { Trans } from '@/lib/trans.js';
|
|
9
|
+
} from '@/vdb/components/ui/dialog.js';
|
|
10
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
11
11
|
import { Column } from '@tanstack/react-table';
|
|
12
12
|
import { useState } from 'react';
|
|
13
13
|
import { DataTableBooleanFilter } from './filters/data-table-boolean-filter.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react';
|
|
3
3
|
|
|
4
|
-
import { Button } from '@/components/ui/button.js';
|
|
5
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select.js';
|
|
4
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
5
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
6
6
|
|
|
7
7
|
interface DataTablePaginationProps<TData> {
|
|
8
8
|
table: Table<TData>;
|
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { DndContext, closestCenter } from '@dnd-kit/core';
|
|
4
|
-
import {
|
|
5
|
-
restrictToVerticalAxis,
|
|
6
|
-
} from '@dnd-kit/modifiers';
|
|
4
|
+
import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
7
5
|
import { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
8
6
|
import { CSS } from '@dnd-kit/utilities';
|
|
9
7
|
import { Table } from '@tanstack/react-table';
|
|
10
8
|
import { GripVertical, Settings2 } from 'lucide-react';
|
|
11
9
|
|
|
12
|
-
import { Button } from '@/components/ui/button.js';
|
|
10
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
13
11
|
import {
|
|
14
|
-
DropdownMenuSeparator, DropdownMenuTrigger,
|
|
15
12
|
DropdownMenu,
|
|
16
13
|
DropdownMenuCheckboxItem,
|
|
17
14
|
DropdownMenuContent,
|
|
18
|
-
DropdownMenuItem
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import {
|
|
15
|
+
DropdownMenuItem,
|
|
16
|
+
DropdownMenuSeparator,
|
|
17
|
+
DropdownMenuTrigger,
|
|
18
|
+
} from '@/vdb/components/ui/dropdown-menu.js';
|
|
19
|
+
import { usePage } from '@/vdb/hooks/use-page.js';
|
|
20
|
+
import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
|
|
21
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
23
22
|
|
|
24
23
|
interface DataTableViewOptionsProps<TData> {
|
|
25
24
|
table: Table<TData>;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
function SortableItem({ id, children }: { id: string; children: React.ReactNode }) {
|
|
29
|
-
const {
|
|
30
|
-
attributes,
|
|
31
|
-
listeners,
|
|
32
|
-
setNodeRef,
|
|
33
|
-
transform,
|
|
34
|
-
transition,
|
|
35
|
-
} = useSortable({ id });
|
|
28
|
+
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id });
|
|
36
29
|
|
|
37
30
|
const style = {
|
|
38
31
|
transform: CSS.Transform.toString(transform),
|
|
@@ -65,7 +58,11 @@ export function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps
|
|
|
65
58
|
const newColumns = [...columns];
|
|
66
59
|
newColumns.splice(overIndex, 0, newColumns.splice(activeIndex, 1)[0]);
|
|
67
60
|
if (page?.pageId) {
|
|
68
|
-
setTableSettings(
|
|
61
|
+
setTableSettings(
|
|
62
|
+
page.pageId,
|
|
63
|
+
'columnOrder',
|
|
64
|
+
newColumns.map(col => col.id),
|
|
65
|
+
);
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
68
|
};
|
|
@@ -87,15 +84,22 @@ export function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps
|
|
|
87
84
|
</Button>
|
|
88
85
|
</DropdownMenuTrigger>
|
|
89
86
|
<DropdownMenuContent align="end" className="w-[150px]">
|
|
90
|
-
<DndContext
|
|
91
|
-
|
|
87
|
+
<DndContext
|
|
88
|
+
collisionDetection={closestCenter}
|
|
89
|
+
onDragEnd={handleDragEnd}
|
|
90
|
+
modifiers={[restrictToVerticalAxis]}
|
|
91
|
+
>
|
|
92
|
+
<SortableContext
|
|
93
|
+
items={columns.map(col => col.id)}
|
|
94
|
+
strategy={verticalListSortingStrategy}
|
|
95
|
+
>
|
|
92
96
|
{columns.map(column => (
|
|
93
97
|
<SortableItem key={column.id} id={column.id}>
|
|
94
98
|
<DropdownMenuCheckboxItem
|
|
95
99
|
className="capitalize"
|
|
96
100
|
checked={column.getIsVisible()}
|
|
97
101
|
onCheckedChange={value => column.toggleVisibility(!!value)}
|
|
98
|
-
onSelect={
|
|
102
|
+
onSelect={e => e.preventDefault()}
|
|
99
103
|
>
|
|
100
104
|
{column.id}
|
|
101
105
|
</DropdownMenuCheckboxItem>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { DataTablePagination } from '@/components/data-table/data-table-pagination.js';
|
|
4
|
-
import { DataTableViewOptions } from '@/components/data-table/data-table-view-options.js';
|
|
5
|
-
import { RefreshButton } from '@/components/data-table/refresh-button.js';
|
|
6
|
-
import { Input } from '@/components/ui/input.js';
|
|
7
|
-
import { Skeleton } from '@/components/ui/skeleton.js';
|
|
8
|
-
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table.js';
|
|
9
|
-
import { BulkAction } from '@/framework/data-table/data-table-types.js';
|
|
10
|
-
import { useChannel } from '@/hooks/use-channel.js';
|
|
3
|
+
import { DataTablePagination } from '@/vdb/components/data-table/data-table-pagination.js';
|
|
4
|
+
import { DataTableViewOptions } from '@/vdb/components/data-table/data-table-view-options.js';
|
|
5
|
+
import { RefreshButton } from '@/vdb/components/data-table/refresh-button.js';
|
|
6
|
+
import { Input } from '@/vdb/components/ui/input.js';
|
|
7
|
+
import { Skeleton } from '@/vdb/components/ui/skeleton.js';
|
|
8
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/vdb/components/ui/table.js';
|
|
9
|
+
import { BulkAction } from '@/vdb/framework/data-table/data-table-types.js';
|
|
10
|
+
import { useChannel } from '@/vdb/hooks/use-channel.js';
|
|
11
11
|
import {
|
|
12
12
|
ColumnDef,
|
|
13
13
|
ColumnFilter,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Trans } from
|
|
1
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
2
2
|
|
|
3
|
-
import { Select, SelectItem, SelectTrigger, SelectValue } from
|
|
3
|
+
import { Select, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
4
4
|
|
|
5
|
-
import { SelectContent } from
|
|
6
|
-
import { useEffect, useState } from
|
|
7
|
-
import { HumanReadableOperator } from
|
|
5
|
+
import { SelectContent } from '@/vdb/components/ui/select.js';
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { HumanReadableOperator } from '../human-readable-operator.js';
|
|
8
8
|
|
|
9
9
|
export interface DataTableBooleanFilterProps {
|
|
10
10
|
value: Record<string, any> | undefined;
|
|
@@ -14,10 +14,10 @@ export interface DataTableBooleanFilterProps {
|
|
|
14
14
|
export const BOOLEAN_OPERATORS = ['eq', 'isNull'] as const;
|
|
15
15
|
|
|
16
16
|
export function DataTableBooleanFilter({ value: incomingValue, onChange }: DataTableBooleanFilterProps) {
|
|
17
|
-
const initialOperator = incomingValue ? Object.keys(incomingValue)[0] ?? 'eq' : 'eq';
|
|
17
|
+
const initialOperator = incomingValue ? (Object.keys(incomingValue)[0] ?? 'eq') : 'eq';
|
|
18
18
|
const initialValue = incomingValue ? Object.values(incomingValue)[0] : true;
|
|
19
19
|
const [operator, setOperator] = useState<string>(initialOperator ?? 'eq');
|
|
20
|
-
const [value, setValue] = useState<boolean>(initialValue as boolean ?? true);
|
|
20
|
+
const [value, setValue] = useState<boolean>((initialValue as boolean) ?? true);
|
|
21
21
|
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
onChange({ [operator]: value });
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Select,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { DateTimeInput } from "@/components/data-input/datetime-input.js";
|
|
6
|
-
import { HumanReadableOperator } from "../human-readable-operator.js";
|
|
1
|
+
import { DateTimeInput } from '@/vdb/components/data-input/datetime-input.js';
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { HumanReadableOperator } from '../human-readable-operator.js';
|
|
7
5
|
|
|
8
6
|
export interface DataTableDateTimeFilterProps {
|
|
9
7
|
value: Record<string, any> | undefined;
|
|
@@ -67,25 +65,15 @@ export function DataTableDateTimeFilter({ value: incomingValue, onChange }: Data
|
|
|
67
65
|
))}
|
|
68
66
|
</SelectContent>
|
|
69
67
|
</Select>
|
|
70
|
-
{operator !== 'isNull' &&
|
|
71
|
-
operator === 'between' ? (
|
|
68
|
+
{operator !== 'isNull' &&
|
|
69
|
+
(operator === 'between' ? (
|
|
72
70
|
<div className="space-y-2">
|
|
73
|
-
<DateTimeInput
|
|
74
|
-
|
|
75
|
-
onChange={setStartDate}
|
|
76
|
-
/>
|
|
77
|
-
<DateTimeInput
|
|
78
|
-
value={endDate}
|
|
79
|
-
onChange={setEndDate}
|
|
80
|
-
/>
|
|
71
|
+
<DateTimeInput value={startDate} onChange={setStartDate} />
|
|
72
|
+
<DateTimeInput value={endDate} onChange={setEndDate} />
|
|
81
73
|
</div>
|
|
82
74
|
) : (
|
|
83
|
-
<DateTimeInput
|
|
84
|
-
|
|
85
|
-
onChange={setValue}
|
|
86
|
-
/>
|
|
87
|
-
)
|
|
88
|
-
)}
|
|
75
|
+
<DateTimeInput value={value} onChange={setValue} />
|
|
76
|
+
))}
|
|
89
77
|
</div>
|
|
90
78
|
{error && <p className="text-sm text-red-500">{error}</p>}
|
|
91
79
|
</div>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Select, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useEffect, useState } from "react";
|
|
8
|
-
import { HumanReadableOperator } from "../human-readable-operator.js";
|
|
3
|
+
import { Input } from '@/vdb/components/ui/input.js';
|
|
4
|
+
import { SelectContent } from '@/vdb/components/ui/select.js';
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
import { HumanReadableOperator } from '../human-readable-operator.js';
|
|
9
7
|
|
|
10
8
|
export interface DataTableIdFilterProps {
|
|
11
9
|
value: Record<string, any> | undefined;
|
|
@@ -25,7 +23,10 @@ export function DataTableIdFilter({ value: incomingValue, onChange }: DataTableI
|
|
|
25
23
|
onChange({ [operator]: true });
|
|
26
24
|
} else if (operator === 'in' || operator === 'notIn') {
|
|
27
25
|
// Split by comma and trim whitespace
|
|
28
|
-
const values = value
|
|
26
|
+
const values = value
|
|
27
|
+
.split(',')
|
|
28
|
+
.map(v => v.trim())
|
|
29
|
+
.filter(v => v);
|
|
29
30
|
onChange({ [operator]: values });
|
|
30
31
|
} else {
|
|
31
32
|
onChange({ [operator]: value });
|
|
@@ -48,7 +49,11 @@ export function DataTableIdFilter({ value: incomingValue, onChange }: DataTableI
|
|
|
48
49
|
</Select>
|
|
49
50
|
{operator !== 'isNull' && (
|
|
50
51
|
<Input
|
|
51
|
-
placeholder={
|
|
52
|
+
placeholder={
|
|
53
|
+
operator === 'in' || operator === 'notIn'
|
|
54
|
+
? 'Enter comma-separated IDs...'
|
|
55
|
+
: 'Enter ID...'
|
|
56
|
+
}
|
|
52
57
|
value={value}
|
|
53
58
|
onChange={e => setValue(e.target.value)}
|
|
54
59
|
/>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { SelectContent } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useChannel } from "@/hooks/use-channel.js";
|
|
8
|
-
import { HumanReadableOperator } from "../human-readable-operator.js";
|
|
1
|
+
import { MoneyInput } from '@/vdb/components/data-input/money-input.js';
|
|
2
|
+
import { Input } from '@/vdb/components/ui/input.js';
|
|
3
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
4
|
+
import { useChannel } from '@/vdb/hooks/use-channel.js';
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
import { HumanReadableOperator } from '../human-readable-operator.js';
|
|
9
7
|
|
|
10
8
|
export interface DataTableNumberFilterProps {
|
|
11
9
|
mode: 'number' | 'money';
|
|
@@ -72,7 +70,7 @@ export function DataTableNumberFilter({ mode, value: incomingValue, onChange }:
|
|
|
72
70
|
return (
|
|
73
71
|
<MoneyInput
|
|
74
72
|
value={parseFloat(value) || 0}
|
|
75
|
-
onChange={
|
|
73
|
+
onChange={newValue => onChange(newValue.toString())}
|
|
76
74
|
currency={activeChannel?.defaultCurrencyCode ?? 'USD'}
|
|
77
75
|
/>
|
|
78
76
|
);
|
|
@@ -102,16 +100,15 @@ export function DataTableNumberFilter({ mode, value: incomingValue, onChange }:
|
|
|
102
100
|
))}
|
|
103
101
|
</SelectContent>
|
|
104
102
|
</Select>
|
|
105
|
-
{operator !== 'isNull' &&
|
|
106
|
-
operator === 'between' ? (
|
|
103
|
+
{operator !== 'isNull' &&
|
|
104
|
+
(operator === 'between' ? (
|
|
107
105
|
<div className="flex gap-2">
|
|
108
|
-
{renderInput(minValue, setMinValue,
|
|
109
|
-
{renderInput(maxValue, setMaxValue,
|
|
106
|
+
{renderInput(minValue, setMinValue, 'Min')}
|
|
107
|
+
{renderInput(maxValue, setMaxValue, 'Max')}
|
|
110
108
|
</div>
|
|
111
109
|
) : (
|
|
112
|
-
renderInput(value, setValue,
|
|
113
|
-
)
|
|
114
|
-
)}
|
|
110
|
+
renderInput(value, setValue, 'Enter value...')
|
|
111
|
+
))}
|
|
115
112
|
</div>
|
|
116
113
|
{error && <p className="text-sm text-red-500">{error}</p>}
|
|
117
114
|
</div>
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Select, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useEffect, useState } from "react";
|
|
8
|
-
import { HumanReadableOperator } from "../human-readable-operator.js";
|
|
3
|
+
import { Input } from '@/vdb/components/ui/input.js';
|
|
4
|
+
import { SelectContent } from '@/vdb/components/ui/select.js';
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
import { HumanReadableOperator } from '../human-readable-operator.js';
|
|
9
7
|
|
|
10
8
|
export interface DataTableStringFilterProps {
|
|
11
9
|
value: Record<string, any> | undefined;
|
|
12
10
|
onChange: (filter: Record<string, any>) => void;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
export const STRING_OPERATORS = [
|
|
13
|
+
export const STRING_OPERATORS = [
|
|
14
|
+
'eq',
|
|
15
|
+
'notEq',
|
|
16
|
+
'contains',
|
|
17
|
+
'notContains',
|
|
18
|
+
'in',
|
|
19
|
+
'notIn',
|
|
20
|
+
'regex',
|
|
21
|
+
'isNull',
|
|
22
|
+
] as const;
|
|
16
23
|
|
|
17
24
|
export function DataTableStringFilter({ value: incomingValue, onChange }: DataTableStringFilterProps) {
|
|
18
25
|
const initialOperator = incomingValue ? Object.keys(incomingValue)[0] : 'contains';
|
|
@@ -26,7 +33,10 @@ export function DataTableStringFilter({ value: incomingValue, onChange }: DataTa
|
|
|
26
33
|
} else if (operator === 'in' || operator === 'notIn') {
|
|
27
34
|
// Split by comma and trim whitespace
|
|
28
35
|
if (typeof value === 'string') {
|
|
29
|
-
const values = value
|
|
36
|
+
const values = value
|
|
37
|
+
.split(',')
|
|
38
|
+
.map(v => v.trim())
|
|
39
|
+
.filter(v => v);
|
|
30
40
|
onChange({ [operator]: values });
|
|
31
41
|
} else {
|
|
32
42
|
onChange({ [operator]: [] });
|
|
@@ -52,11 +62,15 @@ export function DataTableStringFilter({ value: incomingValue, onChange }: DataTa
|
|
|
52
62
|
</Select>
|
|
53
63
|
{operator !== 'isNull' && (
|
|
54
64
|
<Input
|
|
55
|
-
placeholder={
|
|
65
|
+
placeholder={
|
|
66
|
+
operator === 'in' || operator === 'notIn'
|
|
67
|
+
? 'Enter comma-separated values...'
|
|
68
|
+
: 'Enter filter value...'
|
|
69
|
+
}
|
|
56
70
|
value={value}
|
|
57
71
|
onChange={e => setValue(e.target.value)}
|
|
58
72
|
/>
|
|
59
73
|
)}
|
|
60
74
|
</div>
|
|
61
|
-
)
|
|
75
|
+
);
|
|
62
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Trans } from '@/lib/trans.js';
|
|
1
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
2
2
|
import { BOOLEAN_OPERATORS } from './filters/data-table-boolean-filter.js';
|
|
3
3
|
import { DATETIME_OPERATORS } from './filters/data-table-datetime-filter.js';
|
|
4
4
|
import { ID_OPERATORS } from './filters/data-table-id-filter.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AppSidebar } from '@/components/layout/app-sidebar.js';
|
|
2
|
-
import { GeneratedBreadcrumbs } from '@/components/layout/generated-breadcrumbs.js';
|
|
3
|
-
import { PrereleasePopup } from '@/components/layout/prerelease-popup.js';
|
|
4
|
-
import { Badge } from '@/components/ui/badge.js';
|
|
5
|
-
import { Separator } from '@/components/ui/separator.js';
|
|
6
|
-
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar.js';
|
|
7
|
-
import { useUserSettings } from '@/hooks/use-user-settings.js';
|
|
8
|
-
import { Trans } from '@/lib/trans.js';
|
|
1
|
+
import { AppSidebar } from '@/vdb/components/layout/app-sidebar.js';
|
|
2
|
+
import { GeneratedBreadcrumbs } from '@/vdb/components/layout/generated-breadcrumbs.js';
|
|
3
|
+
import { PrereleasePopup } from '@/vdb/components/layout/prerelease-popup.js';
|
|
4
|
+
import { Badge } from '@/vdb/components/ui/badge.js';
|
|
5
|
+
import { Separator } from '@/vdb/components/ui/separator.js';
|
|
6
|
+
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/vdb/components/ui/sidebar.js';
|
|
7
|
+
import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
|
|
8
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
9
9
|
import { Outlet } from '@tanstack/react-router';
|
|
10
10
|
import { Alerts } from '../shared/alerts.js';
|
|
11
11
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { NavMain } from '@/components/layout/nav-main.js';
|
|
2
|
-
import { NavUser } from '@/components/layout/nav-user.js';
|
|
1
|
+
import { NavMain } from '@/vdb/components/layout/nav-main.js';
|
|
2
|
+
import { NavUser } from '@/vdb/components/layout/nav-user.js';
|
|
3
3
|
import {
|
|
4
4
|
Sidebar,
|
|
5
5
|
SidebarContent,
|
|
6
6
|
SidebarFooter,
|
|
7
7
|
SidebarHeader,
|
|
8
8
|
SidebarRail,
|
|
9
|
-
} from '@/components/ui/sidebar.js';
|
|
10
|
-
import { useDashboardExtensions } from '@/framework/extension-api/use-dashboard-extensions.js';
|
|
11
|
-
import { getNavMenuConfig } from '@/framework/nav-menu/nav-menu-extensions.js';
|
|
9
|
+
} from '@/vdb/components/ui/sidebar.js';
|
|
10
|
+
import { useDashboardExtensions } from '@/vdb/framework/extension-api/use-dashboard-extensions.js';
|
|
11
|
+
import { getNavMenuConfig } from '@/vdb/framework/nav-menu/nav-menu-extensions.js';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { ChannelSwitcher } from './channel-switcher.js';
|
|
14
14
|
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ChevronsUpDown, Plus } from 'lucide-react';
|
|
3
2
|
|
|
3
|
+
import { ChannelCodeLabel } from '@/vdb/components/shared/channel-code-label.js';
|
|
4
4
|
import {
|
|
5
5
|
DropdownMenu,
|
|
6
6
|
DropdownMenuContent,
|
|
7
7
|
DropdownMenuItem,
|
|
8
8
|
DropdownMenuLabel,
|
|
9
9
|
DropdownMenuSeparator,
|
|
10
|
-
DropdownMenuShortcut,
|
|
11
10
|
DropdownMenuTrigger,
|
|
12
|
-
} from '@/components/ui/dropdown-menu.js';
|
|
13
|
-
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from '@/components/ui/sidebar.js';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
} from '@/vdb/components/ui/dropdown-menu.js';
|
|
12
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from '@/vdb/components/ui/sidebar.js';
|
|
13
|
+
import { useChannel } from '@/vdb/hooks/use-channel.js';
|
|
14
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
16
15
|
import { Link } from '@tanstack/react-router';
|
|
17
|
-
import { ChannelCodeLabel } from '@/components/shared/channel-code-label.js';
|
|
18
16
|
|
|
19
17
|
export function ChannelSwitcher() {
|
|
20
18
|
const { isMobile } = useSidebar();
|
|
@@ -38,7 +36,9 @@ export function ChannelSwitcher() {
|
|
|
38
36
|
</span>
|
|
39
37
|
</div>
|
|
40
38
|
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
41
|
-
<span className="truncate font-semibold"
|
|
39
|
+
<span className="truncate font-semibold">
|
|
40
|
+
<ChannelCodeLabel code={displayChannel?.code} />
|
|
41
|
+
</span>
|
|
42
42
|
<span className="truncate text-xs">
|
|
43
43
|
Default Language: {displayChannel?.defaultLanguageCode?.toUpperCase()}
|
|
44
44
|
</span>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select.js';
|
|
2
|
-
import { useLocalFormat } from '@/hooks/use-local-format.js';
|
|
3
|
-
import { useServerConfig } from '@/hooks/use-server-config.js';
|
|
4
|
-
import { useUserSettings } from '@/hooks/use-user-settings.js';
|
|
5
|
-
import { cn } from '@/lib/utils.js';
|
|
1
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
|
|
2
|
+
import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
|
|
3
|
+
import { useServerConfig } from '@/vdb/hooks/use-server-config.js';
|
|
4
|
+
import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
interface ContentLanguageSelectorProps {
|
|
8
8
|
value?: string;
|
|
@@ -13,7 +13,10 @@ interface ContentLanguageSelectorProps {
|
|
|
13
13
|
export function ContentLanguageSelector({ value, onChange, className }: ContentLanguageSelectorProps) {
|
|
14
14
|
const serverConfig = useServerConfig();
|
|
15
15
|
const { formatLanguageName } = useLocalFormat();
|
|
16
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
settings: { contentLanguage, displayLanguage },
|
|
18
|
+
setContentLanguage,
|
|
19
|
+
} = useUserSettings();
|
|
17
20
|
|
|
18
21
|
// Fallback to empty array if serverConfig is null
|
|
19
22
|
const languages = serverConfig?.availableLanguages || [];
|
|
@@ -22,10 +25,13 @@ export function ContentLanguageSelector({ value, onChange, className }: ContentL
|
|
|
22
25
|
const currentValue = contentLanguage;
|
|
23
26
|
|
|
24
27
|
return (
|
|
25
|
-
<Select
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
<Select
|
|
29
|
+
value={currentValue}
|
|
30
|
+
onValueChange={value => {
|
|
31
|
+
onChange?.(value);
|
|
32
|
+
setContentLanguage(value);
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
29
35
|
<SelectTrigger className={cn('w-[200px]', className)}>
|
|
30
36
|
<SelectValue placeholder="Select language" />
|
|
31
37
|
</SelectTrigger>
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
BreadcrumbLink,
|
|
5
5
|
BreadcrumbList,
|
|
6
6
|
BreadcrumbSeparator,
|
|
7
|
-
} from '@/components/ui/breadcrumb.js';
|
|
7
|
+
} from '@/vdb/components/ui/breadcrumb.js';
|
|
8
8
|
import { Link, useRouterState } from '@tanstack/react-router';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { Fragment } from 'react';
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { CurrencyCode } from '@/constants.js';
|
|
2
|
-
import { useLocalFormat } from '@/hooks/use-local-format.js';
|
|
3
|
-
import { useUserSettings } from '@/hooks/use-user-settings.js';
|
|
4
|
-
import { Trans } from '@/lib/trans.js';
|
|
1
|
+
import { CurrencyCode } from '@/vdb/constants.js';
|
|
2
|
+
import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
|
|
3
|
+
import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
|
|
4
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { uiConfig } from 'virtual:vendure-ui-config';
|
|
7
7
|
import { Button } from '../ui/button.js';
|
|
8
|
-
import {
|
|
9
|
-
DialogClose,
|
|
10
|
-
DialogContent,
|
|
11
|
-
DialogFooter,
|
|
12
|
-
DialogHeader,
|
|
13
|
-
DialogTitle
|
|
14
|
-
} from '../ui/dialog.js';
|
|
8
|
+
import { DialogClose, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '../ui/dialog.js';
|
|
15
9
|
import { Label } from '../ui/label.js';
|
|
16
10
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select.js';
|
|
17
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible.js';
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/vdb/components/ui/collapsible.js';
|
|
2
2
|
import {
|
|
3
3
|
SidebarGroup,
|
|
4
4
|
SidebarGroupLabel,
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
SidebarMenuSub,
|
|
9
9
|
SidebarMenuSubButton,
|
|
10
10
|
SidebarMenuSubItem,
|
|
11
|
-
} from '@/components/ui/sidebar.js';
|
|
11
|
+
} from '@/vdb/components/ui/sidebar.js';
|
|
12
12
|
import {
|
|
13
13
|
NavMenuItem,
|
|
14
14
|
NavMenuSection,
|
|
15
15
|
NavMenuSectionPlacement,
|
|
16
|
-
} from '@/framework/nav-menu/nav-menu-extensions.js';
|
|
16
|
+
} from '@/vdb/framework/nav-menu/nav-menu-extensions.js';
|
|
17
17
|
import { Link, useLocation } from '@tanstack/react-router';
|
|
18
18
|
import { ChevronRight } from 'lucide-react';
|
|
19
19
|
import * as React from 'react';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DropdownMenuItem,
|
|
7
7
|
DropdownMenuSeparator,
|
|
8
8
|
DropdownMenuTrigger,
|
|
9
|
-
} from '@/components/ui/dropdown-menu.js';
|
|
9
|
+
} from '@/vdb/components/ui/dropdown-menu.js';
|
|
10
10
|
import {
|
|
11
11
|
SidebarGroup,
|
|
12
12
|
SidebarGroupLabel,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
SidebarMenuButton,
|
|
16
16
|
SidebarMenuItem,
|
|
17
17
|
useSidebar,
|
|
18
|
-
} from '@/components/ui/sidebar.js';
|
|
18
|
+
} from '@/vdb/components/ui/sidebar.js';
|
|
19
19
|
|
|
20
20
|
export function NavProjects({
|
|
21
21
|
projects,
|