@vendure/dashboard 3.5.0-minor-202509261210 → 3.5.0-minor-202510031341

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +4 -0
  2. package/dist/plugin/dashboard.plugin.d.ts +25 -6
  3. package/dist/plugin/dashboard.plugin.js +184 -27
  4. package/dist/plugin/default-page.html +188 -0
  5. package/dist/vite/vite-plugin-config.js +13 -9
  6. package/dist/vite/vite-plugin-translations.d.ts +22 -0
  7. package/dist/vite/vite-plugin-translations.js +66 -0
  8. package/dist/vite/vite-plugin-vendure-dashboard.js +8 -6
  9. package/lingui.config.js +25 -2
  10. package/package.json +159 -156
  11. package/src/app/app-providers.tsx +0 -4
  12. package/src/app/common/delete-bulk-action.tsx +6 -5
  13. package/src/app/common/duplicate-bulk-action.tsx +4 -5
  14. package/src/app/common/duplicate-entity-dialog.tsx +1 -1
  15. package/src/app/common/set-document-direction.ts +7 -0
  16. package/src/app/main.tsx +50 -17
  17. package/src/app/routes/_authenticated/_administrators/administrators.tsx +8 -6
  18. package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +17 -6
  19. package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +2 -2
  20. package/src/app/routes/_authenticated/_assets/assets.tsx +1 -1
  21. package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +4 -4
  22. package/src/app/routes/_authenticated/_assets/components/asset-bulk-actions.tsx +8 -6
  23. package/src/app/routes/_authenticated/_assets/components/asset-tag-filter.tsx +1 -1
  24. package/src/app/routes/_authenticated/_assets/components/asset-tags-editor.tsx +1 -1
  25. package/src/app/routes/_authenticated/_assets/components/manage-tags-dialog.tsx +3 -8
  26. package/src/app/routes/_authenticated/_channels/channels.tsx +3 -6
  27. package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +5 -5
  28. package/src/app/routes/_authenticated/_collections/collections.tsx +3 -4
  29. package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +4 -6
  30. package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +1 -1
  31. package/src/app/routes/_authenticated/_collections/components/collection-contents-sheet.tsx +1 -1
  32. package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +6 -6
  33. package/src/app/routes/_authenticated/_countries/countries.graphql.ts +2 -0
  34. package/src/app/routes/_authenticated/_countries/countries.tsx +2 -3
  35. package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +4 -4
  36. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-sheet.tsx +1 -1
  37. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +4 -4
  38. package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +2 -4
  39. package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +13 -6
  40. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +8 -8
  41. package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +3 -3
  42. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +1 -1
  43. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-utils.tsx +1 -1
  44. package/src/app/routes/_authenticated/_customers/components/customer-history/default-customer-history-components.tsx +1 -1
  45. package/src/app/routes/_authenticated/_customers/components/customer-history/use-customer-history.ts +1 -1
  46. package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +1 -1
  47. package/src/app/routes/_authenticated/_customers/customers.graphql.ts +4 -0
  48. package/src/app/routes/_authenticated/_customers/customers.tsx +23 -11
  49. package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +10 -8
  50. package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +1 -1
  51. package/src/app/routes/_authenticated/_facets/components/facet-bulk-actions.tsx +6 -5
  52. package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +1 -1
  53. package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +1 -1
  54. package/src/app/routes/_authenticated/_facets/facets.tsx +5 -5
  55. package/src/app/routes/_authenticated/_facets/facets_.$facetId.values_.$id.tsx +7 -5
  56. package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +4 -4
  57. package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +5 -5
  58. package/src/app/routes/_authenticated/_orders/components/add-manual-payment-dialog.tsx +19 -21
  59. package/src/app/routes/_authenticated/_orders/components/customer-address-selector.tsx +1 -1
  60. package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +22 -22
  61. package/src/app/routes/_authenticated/_orders/components/fulfill-order-dialog.tsx +6 -6
  62. package/src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx +15 -9
  63. package/src/app/routes/_authenticated/_orders/components/order-address.tsx +1 -1
  64. package/src/app/routes/_authenticated/_orders/components/order-detail-shared.tsx +11 -9
  65. package/src/app/routes/_authenticated/_orders/components/order-history/default-order-history-components.tsx +1 -1
  66. package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +1 -1
  67. package/src/app/routes/_authenticated/_orders/components/order-history/order-history-utils.tsx +1 -1
  68. package/src/app/routes/_authenticated/_orders/components/order-history/use-order-history.ts +1 -1
  69. package/src/app/routes/_authenticated/_orders/components/order-line-custom-fields-form.tsx +1 -1
  70. package/src/app/routes/_authenticated/_orders/components/order-modification-preview-dialog.tsx +4 -4
  71. package/src/app/routes/_authenticated/_orders/components/order-modification-summary.tsx +1 -1
  72. package/src/app/routes/_authenticated/_orders/components/order-table-totals.tsx +27 -27
  73. package/src/app/routes/_authenticated/_orders/components/order-table.tsx +2 -2
  74. package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +1 -1
  75. package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +26 -20
  76. package/src/app/routes/_authenticated/_orders/components/seller-orders-card.tsx +3 -1
  77. package/src/app/routes/_authenticated/_orders/components/settle-refund-dialog.tsx +6 -6
  78. package/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx +1 -1
  79. package/src/app/routes/_authenticated/_orders/components/state-transition-control.tsx +1 -1
  80. package/src/app/routes/_authenticated/_orders/components/use-transition-order-to-state.tsx +3 -2
  81. package/src/app/routes/_authenticated/_orders/orders.tsx +5 -9
  82. package/src/app/routes/_authenticated/_orders/orders_.$aggregateOrderId_.seller-orders.$sellerOrderId.tsx +1 -1
  83. package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +1 -1
  84. package/src/app/routes/_authenticated/_orders/orders_.$id_.modify.tsx +4 -4
  85. package/src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx +17 -17
  86. package/src/app/routes/_authenticated/_orders/utils/order-detail-loaders.tsx +1 -1
  87. package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +5 -6
  88. package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +13 -6
  89. package/src/app/routes/_authenticated/_product-variants/components/product-variant-bulk-actions.tsx +1 -1
  90. package/src/app/routes/_authenticated/_product-variants/components/variant-price-detail.tsx +1 -1
  91. package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +9 -2
  92. package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +13 -6
  93. package/src/app/routes/_authenticated/_products/components/add-option-group-dialog.tsx +5 -5
  94. package/src/app/routes/_authenticated/_products/components/add-product-variant-dialog.tsx +5 -5
  95. package/src/app/routes/_authenticated/_products/components/assign-facet-values-dialog.tsx +5 -4
  96. package/src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx +9 -12
  97. package/src/app/routes/_authenticated/_products/components/create-product-variants-dialog.tsx +1 -1
  98. package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +4 -4
  99. package/src/app/routes/_authenticated/_products/components/option-groups-editor.tsx +1 -1
  100. package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +1 -1
  101. package/src/app/routes/_authenticated/_products/components/product-option-select.tsx +3 -3
  102. package/src/app/routes/_authenticated/_products/components/product-options-table.tsx +9 -6
  103. package/src/app/routes/_authenticated/_products/products.graphql.ts +31 -31
  104. package/src/app/routes/_authenticated/_products/products.tsx +11 -6
  105. package/src/app/routes/_authenticated/_products/products_.$id.tsx +4 -4
  106. package/src/app/routes/_authenticated/_products/products_.$id_.variants.tsx +11 -11
  107. package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$id.tsx +8 -12
  108. package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$productOptionGroupId.options_.$id.tsx +2 -2
  109. package/src/app/routes/_authenticated/_profile/profile.tsx +4 -4
  110. package/src/app/routes/_authenticated/_promotions/promotions.tsx +2 -4
  111. package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +16 -9
  112. package/src/app/routes/_authenticated/_roles/components/permissions-table-grid.tsx +1 -1
  113. package/src/app/routes/_authenticated/_roles/roles.tsx +3 -6
  114. package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +4 -6
  115. package/src/app/routes/_authenticated/_sellers/sellers.tsx +3 -4
  116. package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +4 -4
  117. package/src/app/routes/_authenticated/_shipping-methods/components/price-display.tsx +5 -5
  118. package/src/app/routes/_authenticated/_shipping-methods/components/shipping-method-test-result-wrapper.tsx +1 -1
  119. package/src/app/routes/_authenticated/_shipping-methods/components/test-address-form.tsx +4 -3
  120. package/src/app/routes/_authenticated/_shipping-methods/components/test-order-builder.tsx +4 -3
  121. package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-methods-result.tsx +8 -8
  122. package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-methods-sheet.tsx +1 -1
  123. package/src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx +8 -8
  124. package/src/app/routes/_authenticated/_shipping-methods/components/test-single-shipping-method-sheet.tsx +4 -4
  125. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +2 -3
  126. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +2 -2
  127. package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +3 -4
  128. package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +13 -6
  129. package/src/app/routes/_authenticated/_system/healthchecks.tsx +10 -4
  130. package/src/app/routes/_authenticated/_system/job-queue.tsx +10 -13
  131. package/src/app/routes/_authenticated/_system/scheduled-tasks.tsx +18 -16
  132. package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +2 -4
  133. package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +13 -6
  134. package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +8 -12
  135. package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +6 -4
  136. package/src/app/routes/_authenticated/_zones/zones.tsx +4 -4
  137. package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +8 -5
  138. package/src/app/routes/_authenticated/index.tsx +6 -2
  139. package/src/app/styles.css +4 -0
  140. package/src/i18n/common-strings.ts +111 -0
  141. package/src/i18n/locales/ar.po +4777 -0
  142. package/src/i18n/locales/cs.po +4777 -0
  143. package/src/i18n/locales/de.po +4299 -1101
  144. package/src/i18n/locales/en.po +3857 -659
  145. package/src/i18n/locales/es.po +4777 -0
  146. package/src/i18n/locales/fa.po +4777 -0
  147. package/src/i18n/locales/fr.po +4777 -0
  148. package/src/i18n/locales/he.po +4777 -0
  149. package/src/i18n/locales/hr.po +4777 -0
  150. package/src/i18n/locales/it.po +4777 -0
  151. package/src/i18n/locales/ja.po +4777 -0
  152. package/src/i18n/locales/ko.po +4628 -0
  153. package/src/i18n/locales/nb.po +4777 -0
  154. package/src/i18n/locales/ne.po +4777 -0
  155. package/src/i18n/locales/nl.po +4628 -0
  156. package/src/i18n/locales/pl.po +4777 -0
  157. package/src/i18n/locales/pt_BR.po +4777 -0
  158. package/src/i18n/locales/pt_PT.po +4777 -0
  159. package/src/i18n/locales/ru.po +4777 -0
  160. package/src/i18n/locales/sv.po +4777 -0
  161. package/src/i18n/locales/tr.po +4777 -0
  162. package/src/i18n/locales/uk.po +4777 -0
  163. package/src/i18n/locales/zh_Hans.po +4777 -0
  164. package/src/i18n/locales/zh_Hant.po +4777 -0
  165. package/src/lib/components/data-input/combination-mode-input.tsx +1 -1
  166. package/src/lib/components/data-input/custom-field-list-input.tsx +11 -7
  167. package/src/lib/components/data-input/customer-group-input.tsx +27 -33
  168. package/src/lib/components/data-input/datetime-input.tsx +40 -1
  169. package/src/lib/components/data-input/default-relation-input.tsx +5 -4
  170. package/src/lib/components/data-input/product-multi-selector-input.tsx +14 -14
  171. package/src/lib/components/data-input/relation-selector.tsx +1 -1
  172. package/src/lib/components/data-input/select-with-options.tsx +1 -1
  173. package/src/lib/components/data-input/slug-input.tsx +9 -15
  174. package/src/lib/components/data-table/add-filter-menu.tsx +4 -4
  175. package/src/lib/components/data-table/data-table-bulk-action-item.tsx +8 -8
  176. package/src/lib/components/data-table/data-table-bulk-actions.tsx +4 -4
  177. package/src/lib/components/data-table/data-table-column-header.tsx +13 -8
  178. package/src/lib/components/data-table/data-table-faceted-filter.tsx +2 -1
  179. package/src/lib/components/data-table/data-table-filter-dialog.tsx +1 -1
  180. package/src/lib/components/data-table/data-table-utils.ts +21 -4
  181. package/src/lib/components/data-table/data-table-view-options.tsx +4 -2
  182. package/src/lib/components/data-table/data-table.tsx +3 -3
  183. package/src/lib/components/data-table/filters/data-table-boolean-filter.tsx +4 -4
  184. package/src/lib/components/data-table/global-views-bar.tsx +1 -1
  185. package/src/lib/components/data-table/human-readable-operator.tsx +1 -1
  186. package/src/lib/components/data-table/manage-global-views-button.tsx +1 -1
  187. package/src/lib/components/data-table/my-views-button.tsx +13 -13
  188. package/src/lib/components/data-table/refresh-button.tsx +1 -1
  189. package/src/lib/components/data-table/save-view-button.tsx +11 -11
  190. package/src/lib/components/data-table/use-generated-columns.tsx +10 -7
  191. package/src/lib/components/data-table/views-sheet.tsx +79 -71
  192. package/src/lib/components/date-range-picker.tsx +36 -34
  193. package/src/lib/components/layout/app-sidebar.tsx +3 -1
  194. package/src/lib/components/layout/channel-switcher.tsx +8 -10
  195. package/src/lib/components/layout/dev-mode-indicator.tsx +1 -1
  196. package/src/lib/components/layout/generated-breadcrumbs.tsx +10 -8
  197. package/src/lib/components/layout/language-dialog.tsx +34 -13
  198. package/src/lib/components/layout/manage-languages-dialog.tsx +1 -1
  199. package/src/lib/components/layout/nav-main.tsx +23 -13
  200. package/src/lib/components/layout/nav-user.tsx +19 -23
  201. package/src/lib/components/login/login-form.tsx +1 -1
  202. package/src/lib/components/shared/asset/asset-bulk-actions.tsx +4 -4
  203. package/src/lib/components/shared/asset/asset-focal-point-editor.tsx +1 -1
  204. package/src/lib/components/shared/asset/asset-gallery.tsx +15 -14
  205. package/src/lib/components/shared/assign-to-channel-bulk-action.tsx +11 -11
  206. package/src/lib/components/shared/assign-to-channel-dialog.tsx +6 -5
  207. package/src/lib/components/shared/channel-code-label.tsx +1 -1
  208. package/src/lib/components/shared/channel-selector.tsx +4 -4
  209. package/src/lib/components/shared/configurable-operation-multi-selector.tsx +16 -14
  210. package/src/lib/components/shared/configurable-operation-selector.tsx +1 -1
  211. package/src/lib/components/shared/confirmation-dialog.tsx +8 -8
  212. package/src/lib/components/shared/country-selector.tsx +1 -1
  213. package/src/lib/components/shared/currency-selector.tsx +4 -4
  214. package/src/lib/components/shared/custom-fields-form.tsx +8 -24
  215. package/src/lib/components/shared/customer-address-form.tsx +3 -3
  216. package/src/lib/components/shared/customer-group-selector.tsx +1 -1
  217. package/src/lib/components/shared/customer-selector.tsx +1 -1
  218. package/src/lib/components/shared/error-page.tsx +1 -1
  219. package/src/lib/components/shared/facet-value-selector.tsx +10 -10
  220. package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +1 -1
  221. package/src/lib/components/shared/history-timeline/history-note-editor.tsx +1 -1
  222. package/src/lib/components/shared/history-timeline/history-note-entry.tsx +1 -1
  223. package/src/lib/components/shared/language-selector.tsx +4 -4
  224. package/src/lib/components/shared/navigation-confirmation.tsx +1 -1
  225. package/src/lib/components/shared/paginated-list-data-table.tsx +21 -18
  226. package/src/lib/components/shared/remove-from-channel-bulk-action.tsx +6 -5
  227. package/src/lib/components/shared/rich-text-editor/image-dialog.tsx +1 -1
  228. package/src/lib/components/shared/rich-text-editor/link-dialog.tsx +1 -1
  229. package/src/lib/components/shared/rich-text-editor/responsive-toolbar.tsx +1 -1
  230. package/src/lib/components/shared/rich-text-editor/table-edit-icons.tsx +1 -1
  231. package/src/lib/components/shared/role-code-label.tsx +1 -1
  232. package/src/lib/components/shared/role-selector.tsx +4 -4
  233. package/src/lib/components/shared/seller-selector.tsx +1 -1
  234. package/src/lib/components/shared/stock-level-label.tsx +3 -5
  235. package/src/lib/components/shared/table-cell/order-table-cell-components.tsx +3 -1
  236. package/src/lib/components/shared/tax-category-selector.tsx +1 -1
  237. package/src/lib/components/shared/translatable-form-field.tsx +15 -15
  238. package/src/lib/components/shared/zone-selector.tsx +1 -1
  239. package/src/lib/constants.ts +10 -0
  240. package/src/lib/framework/dashboard-widget/base-widget.tsx +11 -9
  241. package/src/lib/framework/dashboard-widget/latest-orders-widget/index.tsx +6 -4
  242. package/src/lib/framework/dashboard-widget/metrics-widget/index.tsx +8 -5
  243. package/src/lib/framework/dashboard-widget/orders-summary/index.tsx +7 -4
  244. package/src/lib/framework/dashboard-widget/widget-filters-context.tsx +3 -1
  245. package/src/lib/framework/defaults.ts +34 -63
  246. package/src/lib/framework/layout-engine/page-layout.tsx +36 -36
  247. package/src/lib/framework/page/detail-page.tsx +10 -10
  248. package/src/lib/framework/page/use-extended-router.tsx +48 -23
  249. package/src/lib/graphql/api.ts +22 -7
  250. package/src/lib/graphql/graphql-env.d.ts +13 -25
  251. package/src/lib/hooks/use-display-locale.ts +40 -0
  252. package/src/lib/hooks/use-dynamic-translations.ts +46 -0
  253. package/src/lib/hooks/use-extended-detail-query.ts +1 -1
  254. package/src/lib/hooks/use-extended-list-query.ts +1 -1
  255. package/src/lib/hooks/use-local-format.ts +15 -1
  256. package/src/lib/hooks/use-saved-views.ts +7 -0
  257. package/src/lib/hooks/use-ui-language-loader.ts +30 -0
  258. package/src/lib/lib/load-i18n-messages.ts +17 -0
  259. package/src/lib/lib/trans.tsx +15 -11
  260. package/src/lib/providers/auth.tsx +2 -2
  261. package/src/lib/providers/channel-provider.tsx +3 -2
  262. package/src/lib/providers/i18n-provider.tsx +7 -14
  263. package/src/lib/providers/user-settings.tsx +46 -5
@@ -2,7 +2,6 @@ import { useAuth } from '@/vdb/hooks/use-auth.js';
2
2
  import { Link, useNavigate, useRouter } from '@tanstack/react-router';
3
3
  import { ChevronsUpDown, LogOut, Monitor, Moon, Sparkles, Sun } from 'lucide-react';
4
4
 
5
- // import { Avatar, AvatarFallback, AvatarImage } from '@/vdb/components/ui/avatar.js';
6
5
  import {
7
6
  DropdownMenu,
8
7
  DropdownMenuContent,
@@ -19,9 +18,10 @@ import {
19
18
  DropdownMenuTrigger,
20
19
  } from '@/vdb/components/ui/dropdown-menu.js';
21
20
  import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from '@/vdb/components/ui/sidebar.js';
21
+ import { useDisplayLocale } from '@/vdb/hooks/use-display-locale.js';
22
22
  import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
23
- import { Trans } from '@/vdb/lib/trans.js';
24
23
  import { Theme } from '@/vdb/providers/theme-provider.js';
24
+ import { Trans } from '@lingui/react/macro';
25
25
  import { useMemo } from 'react';
26
26
  import { Dialog, DialogTrigger } from '../ui/dialog.js';
27
27
  import { LanguageDialog } from './language-dialog.js';
@@ -30,6 +30,7 @@ export function NavUser() {
30
30
  const { isMobile } = useSidebar();
31
31
  const router = useRouter();
32
32
  const navigate = useNavigate();
33
+ const { humanReadableLanguage } = useDisplayLocale();
33
34
  const { user, ...auth } = useAuth();
34
35
  const { settings, setTheme, setDevMode } = useUserSettings();
35
36
 
@@ -61,12 +62,6 @@ export function NavUser() {
61
62
  size="lg"
62
63
  className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
63
64
  >
64
- {/* Avatar component temporarily disabled due to https://github.com/radix-ui/primitives/issues/3489
65
- error in published package version */}
66
- {/*<Avatar className="h-8 w-8 rounded-lg">*/}
67
- {/* <AvatarImage src={user.id} alt={user.firstName} />*/}
68
- {/* <AvatarFallback className="rounded-lg">{avatarFallback}</AvatarFallback>*/}
69
- {/*</Avatar>*/}
70
65
  <div className="relative flex rounded-lg border justify-center items-center w-8 h-8">
71
66
  {avatarFallback}
72
67
  </div>
@@ -87,12 +82,6 @@ export function NavUser() {
87
82
  >
88
83
  <DropdownMenuLabel className="p-0 font-normal">
89
84
  <div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
90
- {/*<Avatar className="h-8 w-8 rounded-lg">*/}
91
- {/* <AvatarImage src={user.id} alt={user.firstName} />*/}
92
- {/* <AvatarFallback className="rounded-lg">*/}
93
- {/* {avatarFallback}*/}
94
- {/* </AvatarFallback>*/}
95
- {/*</Avatar>*/}
96
85
  <div className="grid flex-1 text-left text-sm leading-tight">
97
86
  <span className="truncate font-semibold">
98
87
  {user.firstName} {user.lastName}
@@ -106,20 +95,27 @@ export function NavUser() {
106
95
  <DropdownMenuItem asChild>
107
96
  <a href="https://vendure.io/pricing" target="_blank">
108
97
  <Sparkles />
109
- Explore Enterprise Edition
98
+ <Trans>Explore Enterprise Edition</Trans>
110
99
  </a>
111
100
  </DropdownMenuItem>
112
101
  </DropdownMenuGroup>
113
102
  <DropdownMenuSeparator />
114
103
  <DropdownMenuGroup>
115
104
  <DropdownMenuItem asChild>
116
- <Link to="/profile">Profile</Link>
105
+ <Link to="/profile">
106
+ <Trans>Profile</Trans>
107
+ </Link>
117
108
  </DropdownMenuItem>
118
109
  <DialogTrigger asChild>
119
- <DropdownMenuItem>Language</DropdownMenuItem>
110
+ <DropdownMenuItem className="flex gap-2">
111
+ <div>
112
+ <Trans>Language</Trans>
113
+ </div>
114
+ <div className="text-muted-foreground">{humanReadableLanguage}</div>
115
+ </DropdownMenuItem>
120
116
  </DialogTrigger>
121
117
  <DropdownMenuSub>
122
- <DropdownMenuSubTrigger>Theme</DropdownMenuSubTrigger>
118
+ <DropdownMenuSubTrigger><Trans>Theme</Trans></DropdownMenuSubTrigger>
123
119
  <DropdownMenuPortal>
124
120
  <DropdownMenuSubContent>
125
121
  <DropdownMenuRadioGroup
@@ -128,15 +124,15 @@ export function NavUser() {
128
124
  >
129
125
  <DropdownMenuRadioItem value="light">
130
126
  <Sun />
131
- Light
127
+ <Trans context='theme'>Light</Trans>
132
128
  </DropdownMenuRadioItem>
133
129
  <DropdownMenuRadioItem value="dark">
134
130
  <Moon />
135
- Dark
131
+ <Trans context='theme'>Dark</Trans>
136
132
  </DropdownMenuRadioItem>
137
133
  <DropdownMenuRadioItem value="system">
138
134
  <Monitor />
139
- System
135
+ <Trans context='theme'>System</Trans>
140
136
  </DropdownMenuRadioItem>
141
137
  </DropdownMenuRadioGroup>
142
138
  </DropdownMenuSubContent>
@@ -145,7 +141,7 @@ export function NavUser() {
145
141
  </DropdownMenuGroup>
146
142
  {isDevMode && (
147
143
  <DropdownMenuSub>
148
- <DropdownMenuSubTrigger>Dev Mode</DropdownMenuSubTrigger>
144
+ <DropdownMenuSubTrigger><Trans>Dev Mode</Trans></DropdownMenuSubTrigger>
149
145
  <DropdownMenuPortal>
150
146
  <DropdownMenuSubContent>
151
147
  <DropdownMenuRadioGroup
@@ -166,7 +162,7 @@ export function NavUser() {
166
162
  <DropdownMenuSeparator />
167
163
  <DropdownMenuItem onClick={handleLogout}>
168
164
  <LogOut />
169
- Log out
165
+ <Trans>Log out</Trans>
170
166
  </DropdownMenuItem>
171
167
  </DropdownMenuContent>
172
168
  </DropdownMenu>
@@ -1,7 +1,7 @@
1
1
  import { Button } from '@/vdb/components/ui/button.js';
2
2
  import { Card, CardContent } from '@/vdb/components/ui/card.js';
3
3
  import { Input } from '@/vdb/components/ui/input.js';
4
- import { Trans } from '@/vdb/lib/trans.js';
4
+ import { Trans } from '@lingui/react/macro';
5
5
  import { cn } from '@/vdb/lib/utils.js';
6
6
  import { zodResolver } from '@hookform/resolvers/zod';
7
7
  import { Loader2 } from 'lucide-react';
@@ -11,7 +11,7 @@ import { getBulkActions } from '@/vdb/framework/data-table/data-table-extensions
11
11
  import { useFloatingBulkActions } from '@/vdb/hooks/use-floating-bulk-actions.js';
12
12
  import { usePageBlock } from '@/vdb/hooks/use-page-block.js';
13
13
  import { usePage } from '@/vdb/hooks/use-page.js';
14
- import { Trans } from '@/vdb/lib/trans.js';
14
+ import { Trans } from '@lingui/react/macro';
15
15
  import { ChevronDown } from 'lucide-react';
16
16
  import { Asset } from './asset-gallery.js';
17
17
 
@@ -37,7 +37,7 @@ export function AssetBulkActions({ selection, bulkActions, refetch }: Readonly<A
37
37
  const { pageId } = usePage();
38
38
  const pageBlock = usePageBlock();
39
39
  const blockId = pageBlock?.blockId;
40
-
40
+
41
41
  const { position, shouldShow } = useFloatingBulkActions({
42
42
  selectionCount: selection.length,
43
43
  containerSelector: '[data-asset-gallery]'
@@ -71,8 +71,8 @@ export function AssetBulkActions({ selection, bulkActions, refetch }: Readonly<A
71
71
  return (
72
72
  <div
73
73
  className="flex items-center gap-4 px-8 py-2 animate-in fade-in duration-200 fixed transform -translate-x-1/2 bg-white shadow-2xl rounded-md border z-50"
74
- style={{
75
- height: 'auto',
74
+ style={{
75
+ height: 'auto',
76
76
  maxHeight: '60px',
77
77
  bottom: position.bottom,
78
78
  left: position.left
@@ -1,5 +1,5 @@
1
1
  import { Button } from '@/vdb/components/ui/button.js';
2
- import { Trans } from '@/vdb/lib/trans.js';
2
+ import { Trans } from '@lingui/react/macro';
3
3
  import { cn } from '@/vdb/lib/utils.js';
4
4
  import { DndContext, useDraggable } from '@dnd-kit/core';
5
5
  import { restrictToParentElement } from '@dnd-kit/modifiers';
@@ -16,7 +16,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
16
16
  import { api } from '@/vdb/graphql/api.js';
17
17
  import { assetFragment, AssetFragment } from '@/vdb/graphql/fragments.js';
18
18
  import { graphql } from '@/vdb/graphql/graphql.js';
19
- import { Trans } from '@/vdb/lib/trans.js';
19
+ import { Trans } from '@lingui/react/macro';
20
20
  import { formatFileSize } from '@/vdb/lib/utils.js';
21
21
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
22
22
  import { useDebounce } from '@uidotdev/usehooks';
@@ -153,18 +153,18 @@ export interface AssetGalleryProps {
153
153
  * @docsWeight 0
154
154
  */
155
155
  export function AssetGallery({
156
- onSelect,
157
- selectable = true,
158
- multiSelect = undefined,
159
- initialSelectedAssets = [],
160
- pageSize = 24,
161
- fixedHeight = false,
162
- showHeader = true,
163
- className = '',
164
- onFilesDropped,
165
- bulkActions,
166
- displayBulkActions = true,
167
- }: AssetGalleryProps) {
156
+ onSelect,
157
+ selectable = true,
158
+ multiSelect = undefined,
159
+ initialSelectedAssets = [],
160
+ pageSize = 24,
161
+ fixedHeight = false,
162
+ showHeader = true,
163
+ className = '',
164
+ onFilesDropped,
165
+ bulkActions,
166
+ displayBulkActions = true,
167
+ }: AssetGalleryProps) {
168
168
  // State
169
169
  const [page, setPage] = useState(1);
170
170
  const [search, setSearch] = useState('');
@@ -380,7 +380,8 @@ export function AssetGallery({
380
380
  <input {...getInputProps()} />
381
381
 
382
382
  {isDragActive && (
383
- <div className="absolute inset-0 bg-background/80 backdrop-blur-sm z-10 flex flex-col items-center justify-center rounded-md">
383
+ <div
384
+ className="absolute inset-0 bg-background/80 backdrop-blur-sm z-10 flex flex-col items-center justify-center rounded-md">
384
385
  <Upload className="h-12 w-12 text-primary mb-2" />
385
386
  <p className="text-center font-medium">Drop files here to upload</p>
386
387
  </div>
@@ -5,7 +5,7 @@ import { DataTableBulkActionItem } from '@/vdb/components/data-table/data-table-
5
5
  import { AssignToChannelDialog } from '@/vdb/components/shared/assign-to-channel-dialog.js';
6
6
  import { usePaginatedList } from '@/vdb/components/shared/paginated-list-data-table.js';
7
7
  import { useChannel } from '@/vdb/hooks/use-channel.js';
8
- import { Trans } from '@/vdb/lib/trans.js';
8
+ import { Trans } from '@lingui/react/macro';
9
9
 
10
10
  interface AssignToChannelBulkActionProps {
11
11
  selection: any[];
@@ -23,16 +23,16 @@ interface AssignToChannelBulkActionProps {
23
23
  }
24
24
 
25
25
  export function AssignToChannelBulkAction({
26
- selection,
27
- table,
28
- entityType,
29
- mutationFn,
30
- requiredPermissions,
31
- buildInput,
32
- additionalFields,
33
- additionalData = {},
34
- onSuccess,
35
- }: Readonly<AssignToChannelBulkActionProps>) {
26
+ selection,
27
+ table,
28
+ entityType,
29
+ mutationFn,
30
+ requiredPermissions,
31
+ buildInput,
32
+ additionalFields,
33
+ additionalData = {},
34
+ onSuccess,
35
+ }: Readonly<AssignToChannelBulkActionProps>) {
36
36
  const { refetchPaginatedList } = usePaginatedList();
37
37
  const { channels } = useChannel();
38
38
  const [dialogOpen, setDialogOpen] = useState(false);
@@ -15,7 +15,7 @@ import {
15
15
  import { Input } from '@/vdb/components/ui/input.js';
16
16
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
17
17
  import { ResultOf } from '@/vdb/graphql/graphql.js';
18
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
18
+ import { Trans, useLingui } from '@lingui/react/macro';
19
19
 
20
20
  import { useChannel } from '@/vdb/hooks/use-channel.js';
21
21
 
@@ -54,9 +54,10 @@ export function AssignToChannelDialog({
54
54
  additionalFields,
55
55
  additionalData = {},
56
56
  }: Readonly<AssignToChannelDialogProps>) {
57
- const { i18n } = useLingui();
57
+ const { t } = useLingui();
58
58
  const [selectedChannelId, setSelectedChannelId] = useState<string>('');
59
59
  const { channels, activeChannel } = useChannel();
60
+ const entityIdsLength = entityIds.length;
60
61
 
61
62
  // Filter out the currently selected channel from available options
62
63
  const availableChannels = channels.filter(channel => channel.id !== activeChannel?.id);
@@ -64,12 +65,12 @@ export function AssignToChannelDialog({
64
65
  const { mutate, isPending } = useMutation({
65
66
  mutationFn,
66
67
  onSuccess: () => {
67
- toast.success(i18n.t(`Successfully assigned ${entityIds.length} ${entityType} to channel`));
68
+ toast.success(t`Successfully assigned ${entityIdsLength} ${entityType} to channel`);
68
69
  onSuccess?.();
69
70
  onOpenChange(false);
70
71
  },
71
72
  onError: () => {
72
- toast.error(`Failed to assign ${entityIds.length} ${entityType} to channel`);
73
+ toast.error(`Failed to assign ${entityIdsLength} ${entityType} to channel`);
73
74
  },
74
75
  });
75
76
 
@@ -103,7 +104,7 @@ export function AssignToChannelDialog({
103
104
  </label>
104
105
  <Select value={selectedChannelId} onValueChange={setSelectedChannelId}>
105
106
  <SelectTrigger>
106
- <SelectValue placeholder={i18n.t('Select a channel')} />
107
+ <SelectValue placeholder={t`Select a channel`} />
107
108
  </SelectTrigger>
108
109
  <SelectContent>
109
110
  {availableChannels.map(channel => (
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_CHANNEL_CODE } from '@/vdb/constants.js';
2
- import { Trans } from '@/vdb/lib/trans.js';
2
+ import { Trans } from '@lingui/react/macro';
3
3
 
4
4
  export function ChannelCodeLabel({ code }: Readonly<{ code: string }> | Readonly<{ code: undefined }>) {
5
5
  return code === DEFAULT_CHANNEL_CODE ? <Trans>Default channel</Trans> : code;
@@ -1,6 +1,6 @@
1
1
  import { api } from '@/vdb/graphql/api.js';
2
2
  import { graphql } from '@/vdb/graphql/graphql.js';
3
- import { useLingui } from '@/vdb/lib/trans.js';
3
+ import { useLingui } from '@lingui/react/macro';
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { ChannelCodeLabel } from './channel-code-label.js';
6
6
  import { MultiSelect } from './multi-select.js';
@@ -24,7 +24,7 @@ export interface ChannelSelectorProps<T extends boolean> {
24
24
 
25
25
  export function ChannelSelector<T extends boolean>(props: ChannelSelectorProps<T>) {
26
26
  const { value, onChange, multiple } = props;
27
- const { i18n } = useLingui();
27
+ const { t } = useLingui();
28
28
 
29
29
  const { data: channelsData } = useQuery({
30
30
  queryKey: ['channels'],
@@ -44,8 +44,8 @@ export function ChannelSelector<T extends boolean>(props: ChannelSelectorProps<T
44
44
  onChange={onChange}
45
45
  multiple={multiple}
46
46
  items={items}
47
- placeholder={i18n.t('Select a channel')}
48
- searchPlaceholder={i18n.t('Search channels...')}
47
+ placeholder={t`Select a channel`}
48
+ searchPlaceholder={t`Search channels...`}
49
49
  />
50
50
  );
51
51
  }
@@ -8,7 +8,7 @@ import {
8
8
  } from '@/vdb/components/ui/dropdown-menu.js';
9
9
  import { api } from '@/vdb/graphql/api.js';
10
10
  import { ConfigurableOperationDefFragment } from '@/vdb/graphql/fragments.js';
11
- import { Trans } from '@/vdb/lib/trans.js';
11
+ import { Trans } from '@lingui/react/macro';
12
12
  import { DefinedInitialDataOptions, useQuery, UseQueryOptions } from '@tanstack/react-query';
13
13
  import { ConfigurableOperationInput as ConfigurableOperationInputType } from '@vendure/common/lib/generated-types';
14
14
  import { Plus } from 'lucide-react';
@@ -94,17 +94,17 @@ type QueryData = {
94
94
  * ```
95
95
  */
96
96
  export function ConfigurableOperationMultiSelector({
97
- value,
98
- onChange,
99
- queryDocument,
100
- queryOptions,
101
- queryKey,
102
- dataPath,
103
- buttonText,
104
- dropdownTitle,
105
- emptyText = 'No options found',
106
- showEnhancedDropdown = true,
107
- }: Readonly<ConfigurableOperationMultiSelectorProps>) {
97
+ value,
98
+ onChange,
99
+ queryDocument,
100
+ queryOptions,
101
+ queryKey,
102
+ dataPath,
103
+ buttonText,
104
+ dropdownTitle,
105
+ emptyText = 'No options found',
106
+ showEnhancedDropdown = true,
107
+ }: Readonly<ConfigurableOperationMultiSelectorProps>) {
108
108
  const { data } = useQuery<QueryData>(
109
109
  queryOptions || {
110
110
  queryKey: [queryKey],
@@ -195,8 +195,10 @@ export function ConfigurableOperationMultiSelector({
195
195
  onCombinationModeChange(index, newValue)
196
196
  }
197
197
  name={''}
198
- ref={() => {}}
199
- onBlur={() => {}}
198
+ ref={() => {
199
+ }}
200
+ onBlur={() => {
201
+ }}
200
202
  position={index}
201
203
  />
202
204
  </div>
@@ -7,7 +7,7 @@ import {
7
7
  } from '@/vdb/components/ui/dropdown-menu.js';
8
8
  import { api } from '@/vdb/graphql/api.js';
9
9
  import { ConfigurableOperationDefFragment } from '@/vdb/graphql/fragments.js';
10
- import { Trans } from '@/vdb/lib/trans.js';
10
+ import { Trans } from '@lingui/react/macro';
11
11
  import { useQuery } from '@tanstack/react-query';
12
12
  import { ConfigurableOperationInput as ConfigurableOperationInputType } from '@vendure/common/lib/generated-types';
13
13
  import { Plus } from 'lucide-react';
@@ -9,17 +9,17 @@ import {
9
9
  AlertDialogTitle,
10
10
  AlertDialogTrigger,
11
11
  } from '@/vdb/components/ui/alert-dialog.js';
12
- import { Trans } from '@/vdb/lib/trans.js';
12
+ import { Trans } from '@lingui/react/macro';
13
13
  import { useState } from 'react';
14
14
 
15
15
  export function ConfirmationDialog({
16
- title,
17
- description,
18
- onConfirm,
19
- children,
20
- confirmText,
21
- cancelText,
22
- }: {
16
+ title,
17
+ description,
18
+ onConfirm,
19
+ children,
20
+ confirmText,
21
+ cancelText,
22
+ }: {
23
23
  title: string;
24
24
  description: string;
25
25
  onConfirm: () => void;
@@ -9,7 +9,7 @@ import {
9
9
  import { Popover, PopoverContent, PopoverTrigger } from '@/vdb/components/ui/popover.js';
10
10
  import { api } from '@/vdb/graphql/api.js';
11
11
  import { graphql } from '@/vdb/graphql/graphql.js';
12
- import { Trans } from '@/vdb/lib/trans.js';
12
+ import { Trans } from '@lingui/react/macro';
13
13
  import { useQuery } from '@tanstack/react-query';
14
14
  import { Plus, Search } from 'lucide-react';
15
15
  import { useState } from 'react';
@@ -1,6 +1,6 @@
1
1
  import { CurrencyCode } from '@/vdb/constants.js';
2
2
  import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
3
- import { useLingui } from '@/vdb/lib/trans.js';
3
+ import { useLingui } from '@lingui/react/macro';
4
4
  import { MultiSelect } from './multi-select.js';
5
5
 
6
6
  export interface CurrencySelectorProps<T extends boolean> {
@@ -13,7 +13,7 @@ export interface CurrencySelectorProps<T extends boolean> {
13
13
  export function CurrencySelector<T extends boolean>(props: CurrencySelectorProps<T>) {
14
14
  const { formatCurrencyName } = useLocalFormat();
15
15
  const { value, onChange, multiple, availableCurrencyCodes } = props;
16
- const { i18n } = useLingui();
16
+ const { t } = useLingui();
17
17
 
18
18
  const items = (availableCurrencyCodes ?? Object.values(CurrencyCode)).map(currencyCode => ({
19
19
  value: currencyCode,
@@ -26,8 +26,8 @@ export function CurrencySelector<T extends boolean>(props: CurrencySelectorProps
26
26
  onChange={onChange}
27
27
  multiple={multiple}
28
28
  items={items}
29
- placeholder={i18n.t('Select a currency')}
30
- searchPlaceholder={i18n.t('Search currencies...')}
29
+ placeholder={t`Select a currency`}
30
+ searchPlaceholder={t`Search currencies...`}
31
31
  />
32
32
  );
33
33
  }
@@ -12,8 +12,8 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/vdb/components/ui/ta
12
12
  import { CustomFormComponent } from '@/vdb/framework/form-engine/custom-form-component.js';
13
13
  import { useCustomFieldConfig } from '@/vdb/hooks/use-custom-field-config.js';
14
14
  import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
15
- import { useLingui } from '@/vdb/lib/trans.js';
16
15
  import { customFieldConfigFragment } from '@/vdb/providers/server-config.js';
16
+ import { useLingui } from '@lingui/react/macro';
17
17
  import { ResultOf } from 'gql.tada';
18
18
  import React, { useMemo } from 'react';
19
19
  import { Control } from 'react-hook-form';
@@ -29,7 +29,7 @@ interface CustomFieldsFormProps {
29
29
  }
30
30
 
31
31
  export function CustomFieldsForm({ entityType, control, formPathPrefix }: Readonly<CustomFieldsFormProps>) {
32
- const { i18n } = useLingui();
32
+ const { t } = useLingui();
33
33
  const customFields = useCustomFieldConfig(entityType);
34
34
 
35
35
  const getCustomFieldBaseName = (fieldDef: CustomFieldConfig) => {
@@ -97,7 +97,7 @@ export function CustomFieldsForm({ entityType, control, formPathPrefix }: Readon
97
97
  <TabsList>
98
98
  {groupedFields.map(group => (
99
99
  <TabsTrigger key={group.tabName} value={group.tabName}>
100
- {group.tabName === 'general' ? i18n.t('General') : group.tabName}
100
+ {group.tabName === 'general' ? t`General` : group.tabName}
101
101
  </TabsTrigger>
102
102
  ))}
103
103
  </TabsList>
@@ -151,10 +151,7 @@ function CustomFieldItem({ fieldDef, control, fieldName }: Readonly<CustomFieldI
151
151
  <FormLabel>{getTranslation(fieldDef.label) ?? field.name}</FormLabel>
152
152
  <FormControl>
153
153
  {hasCustomFormComponent ? (
154
- <CustomFormComponent
155
- fieldDef={fieldDef}
156
- {...field}
157
- />
154
+ <CustomFormComponent fieldDef={fieldDef} {...field} />
158
155
  ) : (
159
156
  <FormControlAdapter
160
157
  fieldDef={fieldDef}
@@ -185,10 +182,7 @@ function CustomFieldItem({ fieldDef, control, fieldName }: Readonly<CustomFieldI
185
182
  getTranslation={getTranslation}
186
183
  fieldName={fieldProps.field.name}
187
184
  >
188
- <CustomFormComponent
189
- fieldDef={fieldDef}
190
- {...fieldProps.field}
191
- />
185
+ <CustomFormComponent fieldDef={fieldDef} {...fieldProps.field} />
192
186
  </CustomFieldFormItem>
193
187
  )}
194
188
  />
@@ -215,10 +209,7 @@ function CustomFieldItem({ fieldDef, control, fieldName }: Readonly<CustomFieldI
215
209
  {...field}
216
210
  disabled={isReadonly}
217
211
  renderInput={(index, inputField) => (
218
- <StructFormInput
219
- {...inputField}
220
- fieldDef={fieldDef}
221
- />
212
+ <StructFormInput {...inputField} fieldDef={fieldDef} />
222
213
  )}
223
214
  defaultValue={{}} // Empty struct object as default
224
215
  isFullWidth={true} // Structs should always be full-width
@@ -243,10 +234,7 @@ function CustomFieldItem({ fieldDef, control, fieldName }: Readonly<CustomFieldI
243
234
  <FormItem>
244
235
  <FormLabel>{getTranslation(fieldDef.label) ?? fieldDef.name}</FormLabel>
245
236
  <FormControl>
246
- <StructFormInput
247
- {...field}
248
- fieldDef={fieldDef}
249
- />
237
+ <StructFormInput {...field} fieldDef={fieldDef} />
250
238
  </FormControl>
251
239
  <FormDescription>{getTranslation(fieldDef.description)}</FormDescription>
252
240
  <FormMessage />
@@ -269,11 +257,7 @@ function CustomFieldItem({ fieldDef, control, fieldName }: Readonly<CustomFieldI
269
257
  getTranslation={getTranslation}
270
258
  fieldName={fieldDef.name}
271
259
  >
272
- <FormControlAdapter
273
- fieldDef={fieldDef}
274
- field={field}
275
- valueMode="native"
276
- />
260
+ <FormControlAdapter fieldDef={fieldDef} field={field} valueMode="native" />
277
261
  </CustomFieldFormItem>
278
262
  )}
279
263
  />
@@ -1,7 +1,7 @@
1
1
  import { api } from '@/vdb/graphql/api.js';
2
2
  import { graphql } from '@/vdb/graphql/graphql.js';
3
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
4
3
  import { zodResolver } from '@hookform/resolvers/zod';
4
+ import { Trans, useLingui } from '@lingui/react/macro';
5
5
  import { useQuery } from '@tanstack/react-query';
6
6
  import { useForm } from 'react-hook-form';
7
7
  import { z } from 'zod';
@@ -64,7 +64,7 @@ export function CustomerAddressForm<T>({
64
64
  onSubmit,
65
65
  onCancel,
66
66
  }: CustomerAddressFormProps<T>) {
67
- const { i18n } = useLingui();
67
+ const { t } = useLingui();
68
68
 
69
69
  // Fetch available countries
70
70
  const { data: countriesData, isLoading: isLoadingCountries } = useQuery({
@@ -237,7 +237,7 @@ export function CustomerAddressForm<T>({
237
237
  >
238
238
  <FormControl>
239
239
  <SelectTrigger>
240
- <SelectValue placeholder={i18n.t('Select a country')} />
240
+ <SelectValue placeholder={t`Select a country`} />
241
241
  </SelectTrigger>
242
242
  </FormControl>
243
243
  <SelectContent>
@@ -3,7 +3,7 @@ import { Command, CommandItem, CommandList } from '@/vdb/components/ui/command.j
3
3
  import { Popover, PopoverContent, PopoverTrigger } from '@/vdb/components/ui/popover.js';
4
4
  import { api } from '@/vdb/graphql/api.js';
5
5
  import { graphql } from '@/vdb/graphql/graphql.js';
6
- import { Trans } from '@/vdb/lib/trans.js';
6
+ import { Trans } from '@lingui/react/macro';
7
7
  import { useQuery } from '@tanstack/react-query';
8
8
  import { Plus } from 'lucide-react';
9
9
  import { useState } from 'react';
@@ -9,7 +9,7 @@ import {
9
9
  import { Popover, PopoverContent, PopoverTrigger } from '@/vdb/components/ui/popover.js';
10
10
  import { api } from '@/vdb/graphql/api.js';
11
11
  import { graphql } from '@/vdb/graphql/graphql.js';
12
- import { Trans } from '@/vdb/lib/trans.js';
12
+ import { Trans } from '@lingui/react/macro';
13
13
  import { useQuery } from '@tanstack/react-query';
14
14
  import { useDebounce } from '@uidotdev/usehooks';
15
15
  import { Plus } from 'lucide-react';
@@ -1,5 +1,5 @@
1
1
  import { Page, PageBlock, PageLayout, PageTitle } from '@/vdb/framework/layout-engine/page-layout.js';
2
- import { Trans } from '@/vdb/lib/trans.js';
2
+ import { Trans } from '@lingui/react/macro';
3
3
  import { AlertCircle } from 'lucide-react';
4
4
  import { Alert, AlertDescription, AlertTitle } from '../ui/alert.js';
5
5