@vendure/dashboard 3.3.6-master-202507020959 → 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.
- package/README.md +41 -4
- package/dist/plugin/vite-plugin-config.js +5 -7
- 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 +16 -16
- 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 +4 -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 +10 -9
- package/src/app/routes/_authenticated/_collections/components/collection-filters-selector.tsx +7 -7
- 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 +10 -10
- 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 +5 -5
- 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 +75 -73
- package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +4 -4
- 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 +9 -9
- package/src/app/routes/_authenticated/_facets/components/facet-bulk-actions.tsx +6 -7
- package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +4 -4
- package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +15 -11
- 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 +11 -14
- package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +92 -54
- package/src/app/routes/_authenticated/_orders/components/money-gross-net.tsx +11 -9
- package/src/app/routes/_authenticated/_orders/components/order-address.tsx +3 -4
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +67 -62
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history.tsx +11 -6
- 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 +11 -7
- package/src/app/routes/_authenticated/_orders/components/order-table-totals.tsx +39 -19
- package/src/app/routes/_authenticated/_orders/components/order-table.tsx +4 -4
- package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +38 -36
- package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +4 -4
- package/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx +43 -44
- 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 +4 -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 +7 -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 +18 -14
- package/src/app/routes/_authenticated/_products/components/option-value-input.tsx +21 -15
- package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +7 -8
- package/src/app/routes/_authenticated/_products/components/product-option-select.tsx +28 -34
- 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 +14 -11
- package/src/app/routes/_authenticated/_promotions/components/promotion-bulk-actions.tsx +4 -5
- package/src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx +14 -11
- 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 +5 -5
- package/src/app/routes/_authenticated/_roles/components/permissions-grid.tsx +21 -17
- 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 +6 -6
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-calculator-selector.tsx +23 -21
- 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 +4 -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 +4 -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 +4 -4
- 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 +4 -4
- package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +12 -8
- 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/boolean.tsx +1 -1
- package/src/lib/components/data-display/date-time.tsx +2 -2
- package/src/lib/components/data-display/json.tsx +1 -1
- package/src/lib/components/data-display/money.tsx +2 -3
- package/src/lib/components/data-input/affixed-input.tsx +3 -8
- 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-input/richt-text-input.tsx +1 -1
- package/src/lib/components/data-table/add-filter-menu.tsx +9 -18
- 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 +4 -22
- 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 +4 -4
- 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 +11 -8
- package/src/lib/components/data-table/filters/data-table-datetime-filter.tsx +14 -23
- package/src/lib/components/data-table/filters/data-table-id-filter.tsx +15 -10
- package/src/lib/components/data-table/filters/data-table-number-filter.tsx +18 -17
- package/src/lib/components/data-table/filters/data-table-string-filter.tsx +29 -12
- package/src/lib/components/data-table/human-readable-operator.tsx +1 -1
- package/src/lib/components/data-table/refresh-button.tsx +5 -2
- 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 +4 -4
- 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 +12 -8
- 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 +4 -6
- package/src/lib/components/shared/asset/asset-preview.tsx +7 -15
- package/src/lib/components/shared/asset/asset-properties.tsx +7 -9
- 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 +3 -4
- 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/copyable-text.tsx +2 -3
- 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 +9 -9
- 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 +6 -6
- 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 +12 -6
- package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +3 -3
- package/src/lib/components/shared/history-timeline/history-note-editor.tsx +4 -4
- package/src/lib/components/shared/history-timeline/history-note-input.tsx +3 -3
- package/src/lib/components/shared/history-timeline/history-timeline.tsx +15 -8
- 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 +17 -15
- 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 +32 -31
- package/src/lib/components/shared/remove-from-channel-bulk-action.tsx +4 -4
- package/src/lib/components/shared/role-code-label.tsx +10 -6
- 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/stock-level-label.tsx +5 -5
- package/src/lib/components/shared/tax-category-selector.tsx +5 -5
- 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 +5 -6
- 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-extensions.tsx +2 -3
- package/src/lib/framework/alert/alert-item.tsx +5 -3
- package/src/lib/framework/dashboard-widget/base-widget.tsx +5 -13
- 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/dashboard-widget/widget-extensions.tsx +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/extension-api-types.ts +0 -3
- 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/data-table.ts +25 -2
- package/src/lib/framework/extension-api/types/detail-forms.ts +1 -1
- package/src/lib/framework/extension-api/types/widgets.ts +7 -4
- package/src/lib/framework/form-engine/form-schema-tools.ts +1 -1
- package/src/lib/framework/layout-engine/location-wrapper.tsx +11 -8
- package/src/lib/framework/layout-engine/page-block-provider.tsx +1 -1
- package/src/lib/framework/layout-engine/page-layout.tsx +26 -19
- 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 +3 -3
- package/src/lib/framework/page/use-detail-page.ts +1 -1
- package/src/lib/framework/registry/registry-types.ts +7 -7
- 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 +26 -6
- package/src/lib/lib/trans.tsx +3 -3
- package/src/lib/providers/auth.tsx +4 -4
- package/src/lib/providers/channel-provider.tsx +4 -4
- package/src/lib/providers/server-config.tsx +13 -11
- package/src/lib/providers/theme-provider.tsx +2 -3
- package/vite/vite-plugin-config.ts +5 -7
- package/src/lib/framework/alert/types.ts +0 -13
- package/src/lib/framework/dashboard-widget/types.ts +0 -22
- package/src/lib/framework/data-table/data-table-types.ts +0 -25
|
@@ -1,30 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataTableFilterDialog } from '@/vdb/components/data-table/data-table-filter-dialog.js';
|
|
2
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
3
|
+
import { Dialog } from '@/vdb/components/ui/dialog.js';
|
|
2
4
|
import {
|
|
3
5
|
DropdownMenu,
|
|
4
6
|
DropdownMenuContent,
|
|
5
7
|
DropdownMenuItem,
|
|
6
8
|
DropdownMenuTrigger,
|
|
7
|
-
} from '@/components/ui/dropdown-menu.js';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
DialogContent,
|
|
11
|
-
DialogDescription,
|
|
12
|
-
DialogHeader,
|
|
13
|
-
DialogTitle,
|
|
14
|
-
DialogTrigger,
|
|
15
|
-
} from '@/components/ui/dialog.js';
|
|
16
|
-
import { DataTableFilterDialog } from '@/components/data-table/data-table-filter-dialog.js';
|
|
9
|
+
} from '@/vdb/components/ui/dropdown-menu.js';
|
|
10
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
11
|
+
import { camelCaseToTitleCase } from '@/vdb/lib/utils.js';
|
|
17
12
|
import { Column, ColumnDef } from '@tanstack/react-table';
|
|
18
13
|
import { PlusCircle } from 'lucide-react';
|
|
19
|
-
import {
|
|
20
|
-
import React, { useState } from 'react';
|
|
21
|
-
import { camelCaseToTitleCase } from '@/lib/utils.js';
|
|
14
|
+
import { useState } from 'react';
|
|
22
15
|
|
|
23
16
|
export interface AddFilterMenuProps {
|
|
24
17
|
columns: Column<any, unknown>[];
|
|
25
18
|
}
|
|
26
19
|
|
|
27
|
-
export function AddFilterMenu({ columns }: AddFilterMenuProps) {
|
|
20
|
+
export function AddFilterMenu({ columns }: Readonly<AddFilterMenuProps>) {
|
|
28
21
|
const [selectedColumn, setSelectedColumn] = useState<ColumnDef<any> | null>(null);
|
|
29
22
|
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
|
30
23
|
|
|
@@ -53,9 +46,7 @@ export function AddFilterMenu({ columns }: AddFilterMenuProps) {
|
|
|
53
46
|
))}
|
|
54
47
|
</DropdownMenuContent>
|
|
55
48
|
</DropdownMenu>
|
|
56
|
-
{selectedColumn &&
|
|
57
|
-
<DataTableFilterDialog column={selectedColumn as any} />
|
|
58
|
-
)}
|
|
49
|
+
{selectedColumn && <DataTableFilterDialog column={selectedColumn as any} />}
|
|
59
50
|
</Dialog>
|
|
60
51
|
);
|
|
61
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { usePermissions } from '@/hooks/use-permissions.js';
|
|
2
|
-
import { Trans } from '@/lib/trans.js';
|
|
3
|
-
import { cn } from '@/lib/utils.js';
|
|
1
|
+
import { usePermissions } from '@/vdb/hooks/use-permissions.js';
|
|
2
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
3
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
4
4
|
import { LucideIcon } from 'lucide-react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { Button } from '@/components/ui/button.js';
|
|
3
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
4
4
|
import {
|
|
5
5
|
DropdownMenu,
|
|
6
6
|
DropdownMenuContent,
|
|
7
7
|
DropdownMenuItem,
|
|
8
8
|
DropdownMenuTrigger,
|
|
9
|
-
} from '@/components/ui/dropdown-menu.js';
|
|
10
|
-
import { getBulkActions } from '@/framework/data-table/data-table-extensions.js';
|
|
11
|
-
import { BulkAction } from '@/framework/
|
|
12
|
-
import { usePageBlock } from '@/hooks/use-page-block.js';
|
|
13
|
-
import { usePage } from '@/hooks/use-page.js';
|
|
14
|
-
import { Trans } from '@/lib/trans.js';
|
|
9
|
+
} from '@/vdb/components/ui/dropdown-menu.js';
|
|
10
|
+
import { getBulkActions } from '@/vdb/framework/data-table/data-table-extensions.js';
|
|
11
|
+
import { BulkAction } from '@/vdb/framework/extension-api/types/index.js';
|
|
12
|
+
import { usePageBlock } from '@/vdb/hooks/use-page-block.js';
|
|
13
|
+
import { usePage } from '@/vdb/hooks/use-page.js';
|
|
14
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
15
15
|
import { Table } from '@tanstack/react-table';
|
|
16
16
|
import { ChevronDown } from 'lucide-react';
|
|
17
17
|
import { useRef } from 'react';
|
|
@@ -1,32 +1,14 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button.js';
|
|
2
|
-
import {
|
|
3
|
-
DropdownMenu,
|
|
4
|
-
DropdownMenuContent,
|
|
5
|
-
DropdownMenuItem,
|
|
6
|
-
DropdownMenuTrigger,
|
|
7
|
-
} from '@/components/ui/dropdown-menu.js';
|
|
8
|
-
import {
|
|
9
|
-
Dialog,
|
|
10
|
-
DialogContent,
|
|
11
|
-
DialogDescription,
|
|
12
|
-
DialogHeader,
|
|
13
|
-
DialogTitle,
|
|
14
|
-
DialogTrigger,
|
|
15
|
-
} from '@/components/ui/dialog.js';
|
|
16
|
-
import { DataTableFilterDialog } from '@/components/data-table/data-table-filter-dialog.js';
|
|
17
|
-
import { FieldInfo } from '@/framework/document-introspection/get-document-structure.js';
|
|
18
|
-
import { camelCaseToTitleCase } from '@/lib/utils.js';
|
|
19
|
-
import { Trans } from '@/lib/trans.js';
|
|
1
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
2
|
+
import { camelCaseToTitleCase } from '@/vdb/lib/utils.js';
|
|
20
3
|
import { ColumnDef, HeaderContext } from '@tanstack/table-core';
|
|
21
|
-
import { ArrowDown, ArrowUp, ArrowUpDown
|
|
22
|
-
import React from 'react';
|
|
4
|
+
import { ArrowDown, ArrowUp, ArrowUpDown } from 'lucide-react';
|
|
23
5
|
|
|
24
6
|
export interface DataTableColumnHeaderProps {
|
|
25
7
|
customConfig: Partial<ColumnDef<any>>;
|
|
26
8
|
headerContext: HeaderContext<any, any>;
|
|
27
9
|
}
|
|
28
10
|
|
|
29
|
-
export function DataTableColumnHeader({ headerContext, customConfig }: DataTableColumnHeaderProps) {
|
|
11
|
+
export function DataTableColumnHeader({ headerContext, customConfig }: Readonly<DataTableColumnHeaderProps>) {
|
|
30
12
|
const { column } = headerContext;
|
|
31
13
|
const isSortable = column.getCanSort();
|
|
32
14
|
|
|
@@ -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';
|
|
@@ -21,7 +21,7 @@ export interface DataTableFilterDialogProps {
|
|
|
21
21
|
column: Column<any>;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export function DataTableFilterDialog({ column }: DataTableFilterDialogProps) {
|
|
24
|
+
export function DataTableFilterDialog({ column }: Readonly<DataTableFilterDialogProps>) {
|
|
25
25
|
const columnFilter = column.getFilterValue() as Record<string, string> | undefined;
|
|
26
26
|
const [filter, setFilter] = useState(columnFilter);
|
|
27
27
|
|
|
@@ -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/
|
|
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/extension-api/types/index.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;
|
|
@@ -13,11 +13,14 @@ export interface DataTableBooleanFilterProps {
|
|
|
13
13
|
|
|
14
14
|
export const BOOLEAN_OPERATORS = ['eq', 'isNull'] as const;
|
|
15
15
|
|
|
16
|
-
export function DataTableBooleanFilter({
|
|
17
|
-
|
|
16
|
+
export function DataTableBooleanFilter({
|
|
17
|
+
value: incomingValue,
|
|
18
|
+
onChange,
|
|
19
|
+
}: Readonly<DataTableBooleanFilterProps>) {
|
|
20
|
+
const initialOperator = incomingValue ? (Object.keys(incomingValue)[0] ?? 'eq') : 'eq';
|
|
18
21
|
const initialValue = incomingValue ? Object.values(incomingValue)[0] : true;
|
|
19
22
|
const [operator, setOperator] = useState<string>(initialOperator ?? 'eq');
|
|
20
|
-
const [value, setValue] = useState<boolean>(initialValue as boolean ?? true);
|
|
23
|
+
const [value, setValue] = useState<boolean>((initialValue as boolean) ?? true);
|
|
21
24
|
|
|
22
25
|
useEffect(() => {
|
|
23
26
|
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;
|
|
@@ -12,7 +10,10 @@ export interface DataTableDateTimeFilterProps {
|
|
|
12
10
|
|
|
13
11
|
export const DATETIME_OPERATORS = ['eq', 'before', 'after', 'between', 'isNull'] as const;
|
|
14
12
|
|
|
15
|
-
export function DataTableDateTimeFilter({
|
|
13
|
+
export function DataTableDateTimeFilter({
|
|
14
|
+
value: incomingValue,
|
|
15
|
+
onChange,
|
|
16
|
+
}: Readonly<DataTableDateTimeFilterProps>) {
|
|
16
17
|
const initialOperator = incomingValue ? Object.keys(incomingValue)[0] : 'eq';
|
|
17
18
|
const initialValue = incomingValue ? Object.values(incomingValue)[0] : '';
|
|
18
19
|
const [operator, setOperator] = useState<string>(initialOperator ?? 'eq');
|
|
@@ -67,25 +68,15 @@ export function DataTableDateTimeFilter({ value: incomingValue, onChange }: Data
|
|
|
67
68
|
))}
|
|
68
69
|
</SelectContent>
|
|
69
70
|
</Select>
|
|
70
|
-
{operator !== 'isNull' &&
|
|
71
|
-
operator === 'between' ? (
|
|
71
|
+
{operator !== 'isNull' &&
|
|
72
|
+
(operator === 'between' ? (
|
|
72
73
|
<div className="space-y-2">
|
|
73
|
-
<DateTimeInput
|
|
74
|
-
|
|
75
|
-
onChange={setStartDate}
|
|
76
|
-
/>
|
|
77
|
-
<DateTimeInput
|
|
78
|
-
value={endDate}
|
|
79
|
-
onChange={setEndDate}
|
|
80
|
-
/>
|
|
74
|
+
<DateTimeInput value={startDate} onChange={setStartDate} />
|
|
75
|
+
<DateTimeInput value={endDate} onChange={setEndDate} />
|
|
81
76
|
</div>
|
|
82
77
|
) : (
|
|
83
|
-
<DateTimeInput
|
|
84
|
-
|
|
85
|
-
onChange={setValue}
|
|
86
|
-
/>
|
|
87
|
-
)
|
|
88
|
-
)}
|
|
78
|
+
<DateTimeInput value={value} onChange={setValue} />
|
|
79
|
+
))}
|
|
89
80
|
</div>
|
|
90
81
|
{error && <p className="text-sm text-red-500">{error}</p>}
|
|
91
82
|
</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;
|
|
@@ -14,7 +12,7 @@ export interface DataTableIdFilterProps {
|
|
|
14
12
|
|
|
15
13
|
export const ID_OPERATORS = ['eq', 'notEq', 'in', 'notIn', 'isNull'] as const;
|
|
16
14
|
|
|
17
|
-
export function DataTableIdFilter({ value: incomingValue, onChange }: DataTableIdFilterProps) {
|
|
15
|
+
export function DataTableIdFilter({ value: incomingValue, onChange }: Readonly<DataTableIdFilterProps>) {
|
|
18
16
|
const initialOperator = incomingValue ? Object.keys(incomingValue)[0] : 'eq';
|
|
19
17
|
const initialValue = incomingValue ? Object.values(incomingValue)[0] : '';
|
|
20
18
|
const [operator, setOperator] = useState<string>(initialOperator ?? 'eq');
|
|
@@ -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';
|
|
@@ -15,7 +13,11 @@ export interface DataTableNumberFilterProps {
|
|
|
15
13
|
|
|
16
14
|
export const NUMBER_OPERATORS = ['eq', 'gt', 'gte', 'lt', 'lte', 'isNull', 'between'] as const;
|
|
17
15
|
|
|
18
|
-
export function DataTableNumberFilter({
|
|
16
|
+
export function DataTableNumberFilter({
|
|
17
|
+
mode,
|
|
18
|
+
value: incomingValue,
|
|
19
|
+
onChange,
|
|
20
|
+
}: Readonly<DataTableNumberFilterProps>) {
|
|
19
21
|
const { activeChannel } = useChannel();
|
|
20
22
|
const initialOperator = incomingValue ? Object.keys(incomingValue)[0] : 'eq';
|
|
21
23
|
const initialValue = incomingValue ? Object.values(incomingValue)[0] : 0;
|
|
@@ -72,7 +74,7 @@ export function DataTableNumberFilter({ mode, value: incomingValue, onChange }:
|
|
|
72
74
|
return (
|
|
73
75
|
<MoneyInput
|
|
74
76
|
value={parseFloat(value) || 0}
|
|
75
|
-
onChange={
|
|
77
|
+
onChange={newValue => onChange(newValue.toString())}
|
|
76
78
|
currency={activeChannel?.defaultCurrencyCode ?? 'USD'}
|
|
77
79
|
/>
|
|
78
80
|
);
|
|
@@ -102,16 +104,15 @@ export function DataTableNumberFilter({ mode, value: incomingValue, onChange }:
|
|
|
102
104
|
))}
|
|
103
105
|
</SelectContent>
|
|
104
106
|
</Select>
|
|
105
|
-
{operator !== 'isNull' &&
|
|
106
|
-
operator === 'between' ? (
|
|
107
|
+
{operator !== 'isNull' &&
|
|
108
|
+
(operator === 'between' ? (
|
|
107
109
|
<div className="flex gap-2">
|
|
108
|
-
{renderInput(minValue, setMinValue,
|
|
109
|
-
{renderInput(maxValue, setMaxValue,
|
|
110
|
+
{renderInput(minValue, setMinValue, 'Min')}
|
|
111
|
+
{renderInput(maxValue, setMaxValue, 'Max')}
|
|
110
112
|
</div>
|
|
111
113
|
) : (
|
|
112
|
-
renderInput(value, setValue,
|
|
113
|
-
)
|
|
114
|
-
)}
|
|
114
|
+
renderInput(value, setValue, 'Enter value...')
|
|
115
|
+
))}
|
|
115
116
|
</div>
|
|
116
117
|
{error && <p className="text-sm text-red-500">{error}</p>}
|
|
117
118
|
</div>
|
|
@@ -1,20 +1,30 @@
|
|
|
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
|
-
export function DataTableStringFilter({
|
|
24
|
+
export function DataTableStringFilter({
|
|
25
|
+
value: incomingValue,
|
|
26
|
+
onChange,
|
|
27
|
+
}: Readonly<DataTableStringFilterProps>) {
|
|
18
28
|
const initialOperator = incomingValue ? Object.keys(incomingValue)[0] : 'contains';
|
|
19
29
|
const initialValue = incomingValue ? Object.values(incomingValue)[0] : '';
|
|
20
30
|
const [operator, setOperator] = useState<string>(initialOperator ?? 'contains');
|
|
@@ -26,7 +36,10 @@ export function DataTableStringFilter({ value: incomingValue, onChange }: DataTa
|
|
|
26
36
|
} else if (operator === 'in' || operator === 'notIn') {
|
|
27
37
|
// Split by comma and trim whitespace
|
|
28
38
|
if (typeof value === 'string') {
|
|
29
|
-
const values = value
|
|
39
|
+
const values = value
|
|
40
|
+
.split(',')
|
|
41
|
+
.map(v => v.trim())
|
|
42
|
+
.filter(v => v);
|
|
30
43
|
onChange({ [operator]: values });
|
|
31
44
|
} else {
|
|
32
45
|
onChange({ [operator]: [] });
|
|
@@ -52,11 +65,15 @@ export function DataTableStringFilter({ value: incomingValue, onChange }: DataTa
|
|
|
52
65
|
</Select>
|
|
53
66
|
{operator !== 'isNull' && (
|
|
54
67
|
<Input
|
|
55
|
-
placeholder={
|
|
68
|
+
placeholder={
|
|
69
|
+
operator === 'in' || operator === 'notIn'
|
|
70
|
+
? 'Enter comma-separated values...'
|
|
71
|
+
: 'Enter filter value...'
|
|
72
|
+
}
|
|
56
73
|
value={value}
|
|
57
74
|
onChange={e => setValue(e.target.value)}
|
|
58
75
|
/>
|
|
59
76
|
)}
|
|
60
77
|
</div>
|
|
61
|
-
)
|
|
78
|
+
);
|
|
62
79
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button.js';
|
|
1
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
2
2
|
import { RefreshCw } from 'lucide-react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
|
|
@@ -22,7 +22,10 @@ function useDelayedLoading(isLoading: boolean, delayMs: number = 100) {
|
|
|
22
22
|
return delayedLoading;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function RefreshButton({
|
|
25
|
+
export function RefreshButton({
|
|
26
|
+
onRefresh,
|
|
27
|
+
isLoading,
|
|
28
|
+
}: Readonly<{ onRefresh: () => void; isLoading: boolean }>) {
|
|
26
29
|
const delayedLoading = useDelayedLoading(isLoading, 100);
|
|
27
30
|
|
|
28
31
|
const handleClick = () => {
|
|
@@ -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
|
|