@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
@@ -4,7 +4,7 @@ import { Button } from '@/vdb/components/ui/button.js';
4
4
  import { PageActionBarRight } from '@/vdb/framework/layout-engine/page-layout.js';
5
5
  import { ListPage } from '@/vdb/framework/page/list-page.js';
6
6
  import { api } from '@/vdb/graphql/api.js';
7
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
7
+ import { Trans, useLingui } from '@lingui/react/macro';
8
8
  import { useMutation } from '@tanstack/react-query';
9
9
  import { createFileRoute, Link } from '@tanstack/react-router';
10
10
  import { PlusIcon, RefreshCwIcon } from 'lucide-react';
@@ -24,14 +24,14 @@ export const Route = createFileRoute('/_authenticated/_products/products')({
24
24
  });
25
25
 
26
26
  function ProductListPage() {
27
- const { i18n } = useLingui();
27
+ const { t } = useLingui();
28
28
  const reindexMutation = useMutation({
29
29
  mutationFn: () => api.mutate(reindexDocument, {}),
30
30
  onSuccess: () => {
31
- toast.success(i18n.t('Search index rebuild started'));
31
+ toast.success(t`Search index rebuild started`);
32
32
  },
33
33
  onError: () => {
34
- toast.error(i18n.t('Search index rebuild could not be started'));
34
+ toast.error(t`Search index rebuild could not be started`);
35
35
  },
36
36
  });
37
37
 
@@ -43,10 +43,9 @@ function ProductListPage() {
43
43
  <ListPage
44
44
  pageId="product-list"
45
45
  listQuery={productListDocument}
46
- title="Products"
46
+ title={<Trans>Products</Trans>}
47
47
  customizeColumns={{
48
48
  name: {
49
- header: 'Product Name',
50
49
  cell: ({ row }) => <DetailPageButton id={row.original.id} label={row.original.name} />,
51
50
  },
52
51
  }}
@@ -55,6 +54,12 @@ function ProductListPage() {
55
54
  name: { contains: searchTerm },
56
55
  };
57
56
  }}
57
+ defaultVisibility={{
58
+ name: true,
59
+ featuredAsset: true,
60
+ slug: true,
61
+ enabled: true,
62
+ }}
58
63
  route={Route}
59
64
  bulkActions={[
60
65
  {
@@ -23,7 +23,7 @@ import {
23
23
  } from '@/vdb/framework/layout-engine/page-layout.js';
24
24
  import { detailPageRouteLoader } from '@/vdb/framework/page/detail-page-route-loader.js';
25
25
  import { useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
26
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
26
+ import { Trans, useLingui } from '@lingui/react/macro';
27
27
  import { createFileRoute, Link, useNavigate } from '@tanstack/react-router';
28
28
  import { PlusIcon } from 'lucide-react';
29
29
  import { useRef } from 'react';
@@ -54,7 +54,7 @@ function ProductDetailPage() {
54
54
  const params = Route.useParams();
55
55
  const navigate = useNavigate();
56
56
  const creatingNewEntity = params.id === NEW_ENTITY_PATH;
57
- const { i18n } = useLingui();
57
+ const { t } = useLingui();
58
58
  const refreshRef = useRef<() => void>(() => {});
59
59
 
60
60
  const { form, submitHandler, entity, isPending, refreshEntity, resetForm } = useDetailPage({
@@ -84,7 +84,7 @@ function ProductDetailPage() {
84
84
  params: { id: params.id },
85
85
  onSuccess: async data => {
86
86
  toast.success(
87
- i18n.t(creatingNewEntity ? 'Successfully created product' : 'Successfully updated product'),
87
+ creatingNewEntity ? t`Successfully created product` : t`Successfully updated product`,
88
88
  );
89
89
  resetForm();
90
90
  if (creatingNewEntity) {
@@ -92,7 +92,7 @@ function ProductDetailPage() {
92
92
  }
93
93
  },
94
94
  onError: err => {
95
- toast.error(i18n.t(creatingNewEntity ? 'Failed to create product' : 'Failed to update product'), {
95
+ toast.error(creatingNewEntity ? t`Failed to create product` : t`Failed to update product`, {
96
96
  description: err instanceof Error ? err.message : 'Unknown error',
97
97
  });
98
98
  },
@@ -17,8 +17,8 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@
17
17
  import { Page, PageBlock, PageLayout, PageTitle } from '@/vdb/framework/layout-engine/page-layout.js';
18
18
  import { api } from '@/vdb/graphql/api.js';
19
19
  import { ResultOf } from '@/vdb/graphql/graphql.js';
20
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
21
20
  import { zodResolver } from '@hookform/resolvers/zod';
21
+ import { Trans, useLingui } from '@lingui/react/macro';
22
22
  import { useMutation, useQuery } from '@tanstack/react-query';
23
23
  import { createFileRoute } from '@tanstack/react-router';
24
24
  import { Plus, Save, Trash2 } from 'lucide-react';
@@ -82,7 +82,7 @@ function AddOptionValueDialog({
82
82
  onSuccess?: () => void;
83
83
  }>) {
84
84
  const [open, setOpen] = useState(false);
85
- const { i18n } = useLingui();
85
+ const { t } = useLingui();
86
86
 
87
87
  const form = useForm<AddOptionValueFormValues>({
88
88
  resolver: zodResolver(addOptionValueSchema),
@@ -94,14 +94,14 @@ function AddOptionValueDialog({
94
94
  const createOptionMutation = useMutation({
95
95
  mutationFn: api.mutate(createProductOptionDocument),
96
96
  onSuccess: () => {
97
- toast.success(i18n.t('Successfully added option value'));
97
+ toast.success(t`Successfully added option value`);
98
98
  setOpen(false);
99
99
  form.reset();
100
100
  onSuccess?.();
101
101
  },
102
102
  onError: error => {
103
- toast.error(i18n.t('Failed to add option value'), {
104
- description: error instanceof Error ? error.message : i18n.t('Unknown error'),
103
+ toast.error(t`Failed to add option value`, {
104
+ description: error instanceof Error ? error.message : t`Unknown error`,
105
105
  });
106
106
  },
107
107
  });
@@ -141,7 +141,7 @@ function AddOptionValueDialog({
141
141
  name="name"
142
142
  label={<Trans>Option value name</Trans>}
143
143
  render={({ field }) => (
144
- <Input {...field} placeholder={i18n.t('e.g., Red, Large, Cotton')} />
144
+ <Input {...field} placeholder={t`e.g., Red, Large, Cotton`} />
145
145
  )}
146
146
  />
147
147
  <DialogFooter>
@@ -158,7 +158,7 @@ function AddOptionValueDialog({
158
158
 
159
159
  function ManageProductVariants() {
160
160
  const { id } = Route.useParams();
161
- const { i18n } = useLingui();
161
+ const { t } = useLingui();
162
162
  const [optionsToAddToVariant, setOptionsToAddToVariant] = useState<
163
163
  Record<string, Record<string, string>>
164
164
  >({});
@@ -171,7 +171,7 @@ function ManageProductVariants() {
171
171
  const updateVariantMutation = useMutation({
172
172
  mutationFn: api.mutate(updateProductVariantDocument),
173
173
  onSuccess: () => {
174
- toast.success(i18n.t('Variant updated successfully'));
174
+ toast.success(t`Variant updated successfully`);
175
175
  refetch();
176
176
  },
177
177
  });
@@ -179,7 +179,7 @@ function ManageProductVariants() {
179
179
  const deleteVariantMutation = useMutation({
180
180
  mutationFn: api.mutate(deleteProductVariantDocument),
181
181
  onSuccess: () => {
182
- toast.success(i18n.t('Variant deleted successfully'));
182
+ toast.success(t`Variant deleted successfully`);
183
183
  refetch();
184
184
  },
185
185
  });
@@ -187,7 +187,7 @@ function ManageProductVariants() {
187
187
  const removeOptionGroupMutation = useMutation({
188
188
  mutationFn: api.mutate(removeOptionGroupFromProductDocument),
189
189
  onSuccess: () => {
190
- toast.success(i18n.t('Option group removed'));
190
+ toast.success(t`Option group removed`);
191
191
  refetch();
192
192
  },
193
193
  });
@@ -233,7 +233,7 @@ function ManageProductVariants() {
233
233
  };
234
234
 
235
235
  const deleteVariant = async (variant: Variant) => {
236
- if (confirm(i18n.t('Are you sure you want to delete this variant?'))) {
236
+ if (confirm(t`Are you sure you want to delete this variant?`)) {
237
237
  await deleteVariantMutation.mutateAsync({ id: variant.id });
238
238
  }
239
239
  };
@@ -20,7 +20,7 @@ import {
20
20
  } from '@/vdb/framework/layout-engine/page-layout.js';
21
21
  import { getDetailQueryOptions, useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
22
22
  import { api } from '@/vdb/graphql/api.js';
23
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
23
+ import { Trans, useLingui } from '@lingui/react/macro';
24
24
  import { createFileRoute, ParsedLocation, useNavigate } from '@tanstack/react-router';
25
25
  import { toast } from 'sonner';
26
26
  import { ProductOptionsTable } from './components/product-options-table.js';
@@ -72,7 +72,7 @@ function ProductOptionGroupDetailPage() {
72
72
  const params = Route.useParams();
73
73
  const navigate = useNavigate();
74
74
  const creatingNewEntity = params.id === NEW_ENTITY_PATH;
75
- const { i18n } = useLingui();
75
+ const { t } = useLingui();
76
76
 
77
77
  const { form, submitHandler, entity, isPending, resetForm } = useDetailPage({
78
78
  pageId,
@@ -102,11 +102,9 @@ function ProductOptionGroupDetailPage() {
102
102
  params: { id: params.id },
103
103
  onSuccess: async data => {
104
104
  toast(
105
- i18n.t(
106
- creatingNewEntity
107
- ? 'Successfully created product option group'
108
- : 'Successfully updated product option group',
109
- ),
105
+ creatingNewEntity
106
+ ? t`Successfully created product option group`
107
+ : t`Successfully updated product option group`,
110
108
  );
111
109
  resetForm();
112
110
  if (creatingNewEntity) {
@@ -115,11 +113,9 @@ function ProductOptionGroupDetailPage() {
115
113
  },
116
114
  onError: err => {
117
115
  toast(
118
- i18n.t(
119
- creatingNewEntity
120
- ? 'Failed to create product option group'
121
- : 'Failed to update product option group',
122
- ),
116
+ creatingNewEntity
117
+ ? t`Failed to create product option group`
118
+ : t`Failed to update product option group`,
123
119
  {
124
120
  description: err instanceof Error ? err.message : 'Unknown error',
125
121
  },
@@ -20,7 +20,7 @@ import {
20
20
  } from '@/vdb/framework/layout-engine/page-layout.js';
21
21
  import { getDetailQueryOptions, useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
22
22
  import { api } from '@/vdb/graphql/api.js';
23
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
23
+ import { Trans, useLingui } from '@lingui/react/macro';
24
24
  import { createFileRoute, ParsedLocation, useNavigate } from '@tanstack/react-router';
25
25
  import { toast } from 'sonner';
26
26
  import {
@@ -94,7 +94,7 @@ function ProductOptionDetailPage() {
94
94
  const params = Route.useParams();
95
95
  const navigate = useNavigate();
96
96
  const creatingNewEntity = params.id === NEW_ENTITY_PATH;
97
- const { i18n } = useLingui();
97
+ const { t } = useLingui();
98
98
 
99
99
  const { form, submitHandler, entity, isPending, resetForm } = useDetailPage({
100
100
  pageId,
@@ -14,7 +14,7 @@ import {
14
14
  } from '@/vdb/framework/layout-engine/page-layout.js';
15
15
  import { useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
16
16
  import { api } from '@/vdb/graphql/api.js';
17
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
17
+ import { Trans, useLingui } from '@lingui/react/macro';
18
18
  import { createFileRoute } from '@tanstack/react-router';
19
19
  import { toast } from 'sonner';
20
20
  import { activeAdministratorDocument, updateAdministratorDocument } from './profile.graphql.js';
@@ -34,7 +34,7 @@ export const Route = createFileRoute('/_authenticated/_profile/profile')({
34
34
  });
35
35
 
36
36
  function ProfilePage() {
37
- const { i18n } = useLingui();
37
+ const { t } = useLingui();
38
38
 
39
39
  const { form, submitHandler, isPending } = useDetailPage({
40
40
  queryDocument: activeAdministratorDocument,
@@ -58,11 +58,11 @@ function ProfilePage() {
58
58
  },
59
59
  params: { id: 'undefined' },
60
60
  onSuccess: async data => {
61
- toast(i18n.t('Successfully updated profile'));
61
+ toast(t`Successfully updated profile`);
62
62
  form.reset(form.getValues());
63
63
  },
64
64
  onError: err => {
65
- toast(i18n.t('Failed to update profile'), {
65
+ toast(t`Failed to update profile`, {
66
66
  description: err instanceof Error ? err.message : 'Unknown error',
67
67
  });
68
68
  },
@@ -4,7 +4,7 @@ import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
4
4
  import { Button } from '@/vdb/components/ui/button.js';
5
5
  import { PageActionBarRight } from '@/vdb/framework/layout-engine/page-layout.js';
6
6
  import { ListPage } from '@/vdb/framework/page/list-page.js';
7
- import { Trans } from '@/vdb/lib/trans.js';
7
+ import { Trans } from '@lingui/react/macro';
8
8
  import { createFileRoute, Link } from '@tanstack/react-router';
9
9
  import { PlusIcon } from 'lucide-react';
10
10
  import {
@@ -26,7 +26,7 @@ function PromotionListPage() {
26
26
  pageId="promotion-list"
27
27
  listQuery={promotionListDocument}
28
28
  route={Route}
29
- title="Promotions"
29
+ title={<Trans>Promotions</Trans>}
30
30
  defaultVisibility={{
31
31
  name: true,
32
32
  couponCode: true,
@@ -42,11 +42,9 @@ function PromotionListPage() {
42
42
  }}
43
43
  customizeColumns={{
44
44
  name: {
45
- header: 'Name',
46
45
  cell: ({ row }) => <DetailPageButton id={row.original.id} label={row.original.name} />,
47
46
  },
48
47
  enabled: {
49
- header: 'Enabled',
50
48
  cell: ({ row }) => <BooleanDisplayBadge value={row.original.enabled} />,
51
49
  },
52
50
  }}
@@ -20,7 +20,7 @@ import {
20
20
  } from '@/vdb/framework/layout-engine/page-layout.js';
21
21
  import { detailPageRouteLoader } from '@/vdb/framework/page/detail-page-route-loader.js';
22
22
  import { useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
23
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
23
+ import { Trans, useLingui } from '@lingui/react/macro';
24
24
  import { createFileRoute, useNavigate } from '@tanstack/react-router';
25
25
  import { toast } from 'sonner';
26
26
  import { PromotionActionsSelector } from './components/promotion-actions-selector.js';
@@ -52,7 +52,7 @@ function PromotionDetailPage() {
52
52
  const params = Route.useParams();
53
53
  const navigate = useNavigate();
54
54
  const creatingNewEntity = params.id === NEW_ENTITY_PATH;
55
- const { i18n } = useLingui();
55
+ const { t } = useLingui();
56
56
 
57
57
  const { form, submitHandler, entity, isPending, resetForm } = useDetailPage({
58
58
  pageId,
@@ -99,19 +99,24 @@ function PromotionDetailPage() {
99
99
  params: { id: params.id },
100
100
  onSuccess: async data => {
101
101
  if (data.__typename === 'Promotion') {
102
- toast.success(i18n.t(creatingNewEntity ? 'Successfully created promotion' : 'Successfully updated promotion'));
102
+ toast.success(
103
+ creatingNewEntity ? t`Successfully created promotion` : t`Successfully updated promotion`,
104
+ );
103
105
  resetForm();
104
106
  if (creatingNewEntity) {
105
107
  await navigate({ to: `../$id`, params: { id: data.id } });
106
108
  }
107
109
  } else {
108
- toast.error(i18n.t(creatingNewEntity ? 'Failed to create promotion' : 'Failed to update promotion'), {
109
- description: data.message,
110
- });
110
+ toast.error(
111
+ creatingNewEntity ? t`Failed to create promotion` : t`Failed to update promotion`,
112
+ {
113
+ description: data.message,
114
+ },
115
+ );
111
116
  }
112
117
  },
113
118
  onError: err => {
114
- toast.error(i18n.t(creatingNewEntity ? 'Failed to create promotion' : 'Failed to update promotion'), {
119
+ toast.error(creatingNewEntity ? t`Failed to create promotion` : t`Failed to update promotion`, {
115
120
  description: err instanceof Error ? err.message : 'Unknown error',
116
121
  });
117
122
  },
@@ -169,8 +174,9 @@ function PromotionDetailPage() {
169
174
  label={<Trans>Starts at</Trans>}
170
175
  render={({ field }) => (
171
176
  <DateTimeInput
177
+ {...field}
172
178
  value={field.value}
173
- onChange={value => field.onChange(value.toISOString())}
179
+ onChange={value => field.onChange(value)}
174
180
  />
175
181
  )}
176
182
  />
@@ -180,8 +186,9 @@ function PromotionDetailPage() {
180
186
  label={<Trans>Ends at</Trans>}
181
187
  render={({ field }) => (
182
188
  <DateTimeInput
189
+ {...field}
183
190
  value={field.value}
184
- onChange={value => field.onChange(value.toISOString())}
191
+ onChange={value => field.onChange(value)}
185
192
  />
186
193
  )}
187
194
  />
@@ -3,8 +3,8 @@ import { Switch } from '@/vdb/components/ui/switch.js';
3
3
  import { Table, TableBody, TableCell, TableRow } from '@/vdb/components/ui/table.js';
4
4
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/vdb/components/ui/tooltip.js';
5
5
  import { useGroupedPermissions } from '@/vdb/hooks/use-grouped-permissions.js';
6
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
7
6
  import { ServerConfig } from '@/vdb/providers/server-config.js';
7
+ import { Trans, useLingui } from '@lingui/react/macro';
8
8
  import { InfoIcon } from 'lucide-react';
9
9
 
10
10
  interface PermissionsTableGridProps {
@@ -7,7 +7,7 @@ import { Button } from '@/vdb/components/ui/button.js';
7
7
  import { CUSTOMER_ROLE_CODE, SUPER_ADMIN_ROLE_CODE } from '@/vdb/constants.js';
8
8
  import { PageActionBarRight } from '@/vdb/framework/layout-engine/page-layout.js';
9
9
  import { ListPage } from '@/vdb/framework/page/list-page.js';
10
- import { Trans } from '@/vdb/lib/trans.js';
10
+ import { Trans } from '@lingui/react/macro';
11
11
  import { createFileRoute, Link } from '@tanstack/react-router';
12
12
  import { LayersIcon, PlusIcon } from 'lucide-react';
13
13
  import { ExpandablePermissions } from './components/expandable-permissions.js';
@@ -25,7 +25,7 @@ function RoleListPage() {
25
25
  return (
26
26
  <ListPage
27
27
  pageId="role-list"
28
- title="Roles"
28
+ title={<Trans>Roles</Trans>}
29
29
  listQuery={roleListQuery}
30
30
  route={Route}
31
31
  defaultVisibility={{
@@ -36,7 +36,6 @@ function RoleListPage() {
36
36
  }}
37
37
  customizeColumns={{
38
38
  code: {
39
- header: 'Code',
40
39
  cell: ({ row }) => {
41
40
  return (
42
41
  <DetailPageButton
@@ -48,7 +47,6 @@ function RoleListPage() {
48
47
  },
49
48
  },
50
49
  permissions: {
51
- header: 'Permissions',
52
50
  cell: ({ row }) => {
53
51
  if (SYSTEM_ROLES.includes(row.original.code)) {
54
52
  return (
@@ -62,7 +60,6 @@ function RoleListPage() {
62
60
  },
63
61
  },
64
62
  channels: {
65
- header: 'Channels',
66
63
  cell: ({ row }) => {
67
64
  if (SYSTEM_ROLES.includes(row.original.code)) {
68
65
  return null;
@@ -92,7 +89,7 @@ function RoleListPage() {
92
89
  <Button asChild>
93
90
  <Link to="./new">
94
91
  <PlusIcon className="mr-2 h-4 w-4" />
95
- New Role
92
+ <Trans>New Role</Trans>
96
93
  </Link>
97
94
  </Button>
98
95
  </PermissionGuard>
@@ -16,7 +16,7 @@ import {
16
16
  } from '@/vdb/framework/layout-engine/page-layout.js';
17
17
  import { detailPageRouteLoader } from '@/vdb/framework/page/detail-page-route-loader.js';
18
18
  import { useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
19
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
19
+ import { Trans, useLingui } from '@lingui/react/macro';
20
20
  import { createFileRoute, useNavigate } from '@tanstack/react-router';
21
21
  import { toast } from 'sonner';
22
22
  import { PermissionsTableGrid } from './components/permissions-table-grid.js';
@@ -43,7 +43,7 @@ function RoleDetailPage() {
43
43
  const params = Route.useParams();
44
44
  const navigate = useNavigate();
45
45
  const creatingNewEntity = params.id === NEW_ENTITY_PATH;
46
- const { i18n } = useLingui();
46
+ const { t } = useLingui();
47
47
 
48
48
  const { form, submitHandler, entity, isPending, resetForm } = useDetailPage({
49
49
  pageId,
@@ -61,16 +61,14 @@ function RoleDetailPage() {
61
61
  },
62
62
  params: { id: params.id },
63
63
  onSuccess: async data => {
64
- toast.success(
65
- i18n.t(creatingNewEntity ? 'Successfully created role' : 'Successfully updated role'),
66
- );
64
+ toast.success(creatingNewEntity ? t`Successfully created role` : t`Successfully updated role`);
67
65
  resetForm();
68
66
  if (creatingNewEntity) {
69
67
  await navigate({ to: `../$id`, params: { id: data.id } });
70
68
  }
71
69
  },
72
70
  onError: err => {
73
- toast.error(i18n.t(creatingNewEntity ? 'Failed to create role' : 'Failed to update role'), {
71
+ toast.error(creatingNewEntity ? t`Failed to create role` : t`Failed to update role`, {
74
72
  description: err instanceof Error ? err.message : 'Unknown error',
75
73
  });
76
74
  },
@@ -3,7 +3,7 @@ import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
3
3
  import { Button } from '@/vdb/components/ui/button.js';
4
4
  import { PageActionBarRight } from '@/vdb/framework/layout-engine/page-layout.js';
5
5
  import { ListPage } from '@/vdb/framework/page/list-page.js';
6
- import { Trans } from '@/vdb/lib/trans.js';
6
+ import { Trans } from '@lingui/react/macro';
7
7
  import { createFileRoute, Link } from '@tanstack/react-router';
8
8
  import { PlusIcon } from 'lucide-react';
9
9
  import { DeleteSellersBulkAction } from './components/seller-bulk-actions.js';
@@ -20,7 +20,7 @@ function SellerListPage() {
20
20
  pageId="seller-list"
21
21
  listQuery={sellerListQuery}
22
22
  route={Route}
23
- title="Sellers"
23
+ title={<Trans>Sellers</Trans>}
24
24
  defaultVisibility={{
25
25
  name: true,
26
26
  }}
@@ -31,7 +31,6 @@ function SellerListPage() {
31
31
  }}
32
32
  customizeColumns={{
33
33
  name: {
34
- header: 'Name',
35
34
  cell: ({ row }) => <DetailPageButton id={row.original.id} label={row.original.name} />,
36
35
  },
37
36
  }}
@@ -47,7 +46,7 @@ function SellerListPage() {
47
46
  <Button asChild>
48
47
  <Link to="./new">
49
48
  <PlusIcon className="mr-2 h-4 w-4" />
50
- New Seller
49
+ <Trans>New Seller</Trans>
51
50
  </Link>
52
51
  </Button>
53
52
  </PermissionGuard>
@@ -15,7 +15,7 @@ import {
15
15
  } from '@/vdb/framework/layout-engine/page-layout.js';
16
16
  import { detailPageRouteLoader } from '@/vdb/framework/page/detail-page-route-loader.js';
17
17
  import { useDetailPage } from '@/vdb/framework/page/use-detail-page.js';
18
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
18
+ import { Trans, useLingui } from '@lingui/react/macro';
19
19
  import { createFileRoute, useNavigate } from '@tanstack/react-router';
20
20
  import { toast } from 'sonner';
21
21
  import { createSellerDocument, sellerDetailDocument, updateSellerDocument } from './sellers.graphql.js';
@@ -39,7 +39,7 @@ function SellerDetailPage() {
39
39
  const params = Route.useParams();
40
40
  const navigate = useNavigate();
41
41
  const creatingNewEntity = params.id === NEW_ENTITY_PATH;
42
- const { i18n } = useLingui();
42
+ const { t } = useLingui();
43
43
 
44
44
  const { form, submitHandler, entity, isPending, resetForm } = useDetailPage({
45
45
  pageId,
@@ -55,14 +55,14 @@ function SellerDetailPage() {
55
55
  },
56
56
  params: { id: params.id },
57
57
  onSuccess: async data => {
58
- toast(i18n.t(creatingNewEntity ? 'Successfully created seller' : 'Successfully updated seller'));
58
+ toast(creatingNewEntity ? t`Successfully created seller` : t`Successfully updated seller`);
59
59
  form.reset(form.getValues());
60
60
  if (creatingNewEntity) {
61
61
  await navigate({ to: `../$id`, params: { id: data.id } });
62
62
  }
63
63
  },
64
64
  onError: err => {
65
- toast(i18n.t(creatingNewEntity ? 'Failed to create seller' : 'Failed to update seller'), {
65
+ toast(creatingNewEntity ? t`Failed to create seller` : t`Failed to update seller`, {
66
66
  description: err instanceof Error ? err.message : 'Unknown error',
67
67
  });
68
68
  },
@@ -1,11 +1,11 @@
1
1
  import { Money } from '@/vdb/components/data-display/money.js';
2
- import { Trans } from '@/vdb/lib/trans.js';
2
+ import { Trans } from '@lingui/react/macro';
3
3
 
4
4
  export function PriceDisplay({
5
- price,
6
- priceWithTax,
7
- currencyCode,
8
- }: Readonly<{
5
+ price,
6
+ priceWithTax,
7
+ currencyCode,
8
+ }: Readonly<{
9
9
  price: number;
10
10
  priceWithTax: number;
11
11
  currencyCode: string;
@@ -1,7 +1,7 @@
1
1
  import { Alert, AlertDescription } from '@/vdb/components/ui/alert.js';
2
2
  import { Button } from '@/vdb/components/ui/button.js';
3
3
  import { Card, CardContent, CardHeader, CardTitle } from '@/vdb/components/ui/card.js';
4
- import { Trans } from '@/vdb/lib/trans.js';
4
+ import { Trans } from '@lingui/react/macro';
5
5
  import { PlayIcon } from 'lucide-react';
6
6
  import React from 'react';
7
7
 
@@ -3,9 +3,10 @@ import { AccordionContent, AccordionItem, AccordionTrigger } from '@/vdb/compone
3
3
  import { Form } from '@/vdb/components/ui/form.js';
4
4
  import { Input } from '@/vdb/components/ui/input.js';
5
5
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/vdb/components/ui/select.js';
6
+ import { LS_KEY_SHIPPING_TEST_ADDRESS } from '@/vdb/constants.js';
6
7
  import { api } from '@/vdb/graphql/api.js';
7
8
  import { graphql } from '@/vdb/graphql/graphql.js';
8
- import { Trans } from '@/vdb/lib/trans.js';
9
+ import { Trans } from '@lingui/react/macro';
9
10
  import { useQuery } from '@tanstack/react-query';
10
11
  import { useEffect, useRef } from 'react';
11
12
  import { useForm } from 'react-hook-form';
@@ -43,7 +44,7 @@ export function TestAddressForm({ onAddressChange }: Readonly<TestAddressFormPro
43
44
  const form = useForm<TestAddress>({
44
45
  defaultValues: (() => {
45
46
  try {
46
- const stored = localStorage.getItem('shippingTestAddress');
47
+ const stored = localStorage.getItem(LS_KEY_SHIPPING_TEST_ADDRESS);
47
48
  return stored
48
49
  ? JSON.parse(stored)
49
50
  : {
@@ -92,7 +93,7 @@ export function TestAddressForm({ onAddressChange }: Readonly<TestAddressFormPro
92
93
  previousValuesRef.current = currentValueString;
93
94
 
94
95
  try {
95
- localStorage.setItem('shippingTestAddress', currentValueString);
96
+ localStorage.setItem(LS_KEY_SHIPPING_TEST_ADDRESS, currentValueString);
96
97
  } catch {
97
98
  // Ignore localStorage errors
98
99
  }
@@ -7,9 +7,10 @@ import { AccordionContent, AccordionItem, AccordionTrigger } from '@/vdb/compone
7
7
  import { Button } from '@/vdb/components/ui/button.js';
8
8
  import { Input } from '@/vdb/components/ui/input.js';
9
9
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/vdb/components/ui/table.js';
10
+ import { LS_KEY_SHIPPING_TEST_ORDER } from '@/vdb/constants.js';
10
11
  import { useChannel } from '@/vdb/hooks/use-channel.js';
11
12
  import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
12
- import { Trans } from '@/vdb/lib/trans.js';
13
+ import { Trans } from '@lingui/react/macro';
13
14
  import {
14
15
  ColumnDef,
15
16
  flexRender,
@@ -38,7 +39,7 @@ export function TestOrderBuilder({ onOrderLinesChange }: Readonly<TestOrderBuild
38
39
  const { activeChannel } = useChannel();
39
40
  const [lines, setLines] = useState<TestOrderLine[]>(() => {
40
41
  try {
41
- const stored = localStorage.getItem('shippingTestOrder');
42
+ const stored = localStorage.getItem(LS_KEY_SHIPPING_TEST_ORDER);
42
43
  return stored ? JSON.parse(stored) : [];
43
44
  } catch {
44
45
  return [];
@@ -51,7 +52,7 @@ export function TestOrderBuilder({ onOrderLinesChange }: Readonly<TestOrderBuild
51
52
 
52
53
  useEffect(() => {
53
54
  try {
54
- localStorage.setItem('shippingTestOrder', JSON.stringify(lines));
55
+ localStorage.setItem(LS_KEY_SHIPPING_TEST_ORDER, JSON.stringify(lines));
55
56
  } catch {
56
57
  // Ignore localStorage errors
57
58
  }