@vendure/dashboard 3.4.3-master-202509260228 → 3.5.0-minor-202510012036

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 (295) hide show
  1. package/README.md +4 -0
  2. package/dist/plugin/api/api-extensions.js +11 -14
  3. package/dist/plugin/api/metrics.resolver.d.ts +2 -2
  4. package/dist/plugin/api/metrics.resolver.js +2 -2
  5. package/dist/plugin/config/metrics-strategies.d.ts +9 -9
  6. package/dist/plugin/config/metrics-strategies.js +6 -6
  7. package/dist/plugin/constants.d.ts +2 -0
  8. package/dist/plugin/constants.js +3 -1
  9. package/dist/plugin/dashboard.plugin.js +13 -0
  10. package/dist/plugin/service/metrics.service.d.ts +3 -3
  11. package/dist/plugin/service/metrics.service.js +37 -53
  12. package/dist/plugin/types.d.ts +9 -12
  13. package/dist/plugin/types.js +7 -11
  14. package/dist/vite/vite-plugin-config.js +13 -9
  15. package/dist/vite/vite-plugin-translations.d.ts +22 -0
  16. package/dist/vite/vite-plugin-translations.js +66 -0
  17. package/dist/vite/vite-plugin-vendure-dashboard.js +10 -8
  18. package/lingui.config.js +25 -2
  19. package/package.json +159 -156
  20. package/src/app/app-providers.tsx +0 -4
  21. package/src/app/common/delete-bulk-action.tsx +6 -5
  22. package/src/app/common/duplicate-bulk-action.tsx +4 -5
  23. package/src/app/common/duplicate-entity-dialog.tsx +1 -1
  24. package/src/app/common/set-document-direction.ts +7 -0
  25. package/src/app/main.tsx +50 -17
  26. package/src/app/routes/_authenticated/_administrators/administrators.tsx +8 -6
  27. package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +17 -6
  28. package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +2 -2
  29. package/src/app/routes/_authenticated/_assets/assets.tsx +1 -1
  30. package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +4 -4
  31. package/src/app/routes/_authenticated/_assets/components/asset-bulk-actions.tsx +8 -6
  32. package/src/app/routes/_authenticated/_assets/components/asset-tag-filter.tsx +1 -1
  33. package/src/app/routes/_authenticated/_assets/components/asset-tags-editor.tsx +1 -1
  34. package/src/app/routes/_authenticated/_assets/components/manage-tags-dialog.tsx +3 -8
  35. package/src/app/routes/_authenticated/_channels/channels.tsx +3 -6
  36. package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +5 -5
  37. package/src/app/routes/_authenticated/_collections/collections.tsx +10 -6
  38. package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +16 -5
  39. package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +1 -1
  40. package/src/app/routes/_authenticated/_collections/components/collection-contents-sheet.tsx +1 -1
  41. package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +6 -6
  42. package/src/app/routes/_authenticated/_countries/countries.graphql.ts +2 -0
  43. package/src/app/routes/_authenticated/_countries/countries.tsx +2 -3
  44. package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +4 -4
  45. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-sheet.tsx +1 -1
  46. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +4 -4
  47. package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +2 -4
  48. package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +13 -6
  49. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +8 -8
  50. package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +3 -3
  51. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +1 -1
  52. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-utils.tsx +1 -1
  53. package/src/app/routes/_authenticated/_customers/components/customer-history/default-customer-history-components.tsx +1 -1
  54. package/src/app/routes/_authenticated/_customers/components/customer-history/use-customer-history.ts +1 -1
  55. package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +1 -1
  56. package/src/app/routes/_authenticated/_customers/customers.graphql.ts +4 -0
  57. package/src/app/routes/_authenticated/_customers/customers.tsx +23 -11
  58. package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +10 -8
  59. package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +1 -1
  60. package/src/app/routes/_authenticated/_facets/components/facet-bulk-actions.tsx +6 -5
  61. package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +1 -1
  62. package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +1 -1
  63. package/src/app/routes/_authenticated/_facets/facets.tsx +5 -5
  64. package/src/app/routes/_authenticated/_facets/facets_.$facetId.values_.$id.tsx +7 -5
  65. package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +18 -6
  66. package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +5 -5
  67. package/src/app/routes/_authenticated/_orders/components/add-manual-payment-dialog.tsx +19 -21
  68. package/src/app/routes/_authenticated/_orders/components/customer-address-selector.tsx +1 -1
  69. package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +22 -22
  70. package/src/app/routes/_authenticated/_orders/components/fulfill-order-dialog.tsx +6 -6
  71. package/src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx +15 -9
  72. package/src/app/routes/_authenticated/_orders/components/order-address.tsx +1 -1
  73. package/src/app/routes/_authenticated/_orders/components/order-detail-shared.tsx +11 -9
  74. package/src/app/routes/_authenticated/_orders/components/order-history/default-order-history-components.tsx +1 -1
  75. package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +1 -1
  76. package/src/app/routes/_authenticated/_orders/components/order-history/order-history-utils.tsx +1 -1
  77. package/src/app/routes/_authenticated/_orders/components/order-history/use-order-history.ts +1 -1
  78. package/src/app/routes/_authenticated/_orders/components/order-line-custom-fields-form.tsx +1 -1
  79. package/src/app/routes/_authenticated/_orders/components/order-modification-preview-dialog.tsx +4 -4
  80. package/src/app/routes/_authenticated/_orders/components/order-modification-summary.tsx +1 -1
  81. package/src/app/routes/_authenticated/_orders/components/order-table-totals.tsx +27 -27
  82. package/src/app/routes/_authenticated/_orders/components/order-table.tsx +2 -2
  83. package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +1 -1
  84. package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +26 -20
  85. package/src/app/routes/_authenticated/_orders/components/seller-orders-card.tsx +3 -1
  86. package/src/app/routes/_authenticated/_orders/components/settle-refund-dialog.tsx +6 -6
  87. package/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx +1 -1
  88. package/src/app/routes/_authenticated/_orders/components/state-transition-control.tsx +1 -1
  89. package/src/app/routes/_authenticated/_orders/components/use-transition-order-to-state.tsx +3 -2
  90. package/src/app/routes/_authenticated/_orders/orders.tsx +5 -9
  91. package/src/app/routes/_authenticated/_orders/orders_.$aggregateOrderId_.seller-orders.$sellerOrderId.tsx +1 -1
  92. package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +1 -1
  93. package/src/app/routes/_authenticated/_orders/orders_.$id_.modify.tsx +4 -4
  94. package/src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx +17 -17
  95. package/src/app/routes/_authenticated/_orders/utils/order-detail-loaders.tsx +1 -1
  96. package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +5 -6
  97. package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +13 -6
  98. package/src/app/routes/_authenticated/_product-variants/components/product-variant-bulk-actions.tsx +1 -1
  99. package/src/app/routes/_authenticated/_product-variants/components/variant-price-detail.tsx +1 -1
  100. package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +10 -0
  101. package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +9 -2
  102. package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +13 -6
  103. package/src/app/routes/_authenticated/_products/components/add-option-group-dialog.tsx +5 -5
  104. package/src/app/routes/_authenticated/_products/components/add-product-variant-dialog.tsx +5 -5
  105. package/src/app/routes/_authenticated/_products/components/assign-facet-values-dialog.tsx +5 -4
  106. package/src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx +9 -12
  107. package/src/app/routes/_authenticated/_products/components/create-product-variants-dialog.tsx +1 -1
  108. package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +4 -4
  109. package/src/app/routes/_authenticated/_products/components/option-groups-editor.tsx +1 -1
  110. package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +1 -1
  111. package/src/app/routes/_authenticated/_products/components/product-option-group-badge.tsx +19 -0
  112. package/src/app/routes/_authenticated/_products/components/product-option-select.tsx +3 -3
  113. package/src/app/routes/_authenticated/_products/components/product-options-table.tsx +114 -0
  114. package/src/app/routes/_authenticated/_products/product-option-groups.graphql.ts +103 -0
  115. package/src/app/routes/_authenticated/_products/products.graphql.ts +44 -32
  116. package/src/app/routes/_authenticated/_products/products.tsx +34 -5
  117. package/src/app/routes/_authenticated/_products/products_.$id.tsx +29 -12
  118. package/src/app/routes/_authenticated/_products/products_.$id_.variants.tsx +11 -11
  119. package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$id.tsx +177 -0
  120. package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$productOptionGroupId.options_.$id.tsx +208 -0
  121. package/src/app/routes/_authenticated/_profile/profile.tsx +4 -4
  122. package/src/app/routes/_authenticated/_promotions/promotions.tsx +2 -4
  123. package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +16 -9
  124. package/src/app/routes/_authenticated/_roles/components/permissions-table-grid.tsx +1 -1
  125. package/src/app/routes/_authenticated/_roles/roles.tsx +3 -6
  126. package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +4 -6
  127. package/src/app/routes/_authenticated/_sellers/sellers.tsx +3 -4
  128. package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +4 -4
  129. package/src/app/routes/_authenticated/_shipping-methods/components/price-display.tsx +5 -5
  130. package/src/app/routes/_authenticated/_shipping-methods/components/shipping-method-test-result-wrapper.tsx +1 -1
  131. package/src/app/routes/_authenticated/_shipping-methods/components/test-address-form.tsx +11 -11
  132. package/src/app/routes/_authenticated/_shipping-methods/components/test-order-builder.tsx +1 -1
  133. package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-methods-result.tsx +8 -8
  134. package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-methods-sheet.tsx +1 -1
  135. package/src/app/routes/_authenticated/_shipping-methods/components/test-single-method-result.tsx +8 -8
  136. package/src/app/routes/_authenticated/_shipping-methods/components/test-single-shipping-method-sheet.tsx +4 -4
  137. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +2 -3
  138. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +2 -2
  139. package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +3 -4
  140. package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +13 -6
  141. package/src/app/routes/_authenticated/_system/healthchecks.tsx +10 -4
  142. package/src/app/routes/_authenticated/_system/job-queue.tsx +10 -13
  143. package/src/app/routes/_authenticated/_system/scheduled-tasks.tsx +18 -16
  144. package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +2 -4
  145. package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +13 -6
  146. package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +8 -12
  147. package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +6 -4
  148. package/src/app/routes/_authenticated/_zones/components/zone-countries-sheet.tsx +4 -1
  149. package/src/app/routes/_authenticated/_zones/zones.tsx +4 -4
  150. package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +8 -5
  151. package/src/app/routes/_authenticated/index.tsx +46 -25
  152. package/src/app/styles.css +4 -0
  153. package/src/i18n/common-strings.ts +111 -0
  154. package/src/i18n/locales/ar.po +4777 -0
  155. package/src/i18n/locales/cs.po +4777 -0
  156. package/src/i18n/locales/de.po +4299 -1101
  157. package/src/i18n/locales/en.po +3857 -659
  158. package/src/i18n/locales/es.po +4777 -0
  159. package/src/i18n/locales/fa.po +4777 -0
  160. package/src/i18n/locales/fr.po +4777 -0
  161. package/src/i18n/locales/he.po +4777 -0
  162. package/src/i18n/locales/hr.po +4777 -0
  163. package/src/i18n/locales/it.po +4777 -0
  164. package/src/i18n/locales/ja.po +4777 -0
  165. package/src/i18n/locales/ko.po +4628 -0
  166. package/src/i18n/locales/nb.po +4777 -0
  167. package/src/i18n/locales/ne.po +4777 -0
  168. package/src/i18n/locales/nl.po +4628 -0
  169. package/src/i18n/locales/pl.po +4777 -0
  170. package/src/i18n/locales/pt_BR.po +4777 -0
  171. package/src/i18n/locales/pt_PT.po +4777 -0
  172. package/src/i18n/locales/ru.po +4777 -0
  173. package/src/i18n/locales/sv.po +4777 -0
  174. package/src/i18n/locales/tr.po +4777 -0
  175. package/src/i18n/locales/uk.po +4777 -0
  176. package/src/i18n/locales/zh_Hans.po +4777 -0
  177. package/src/i18n/locales/zh_Hant.po +4777 -0
  178. package/src/lib/components/data-display/json.tsx +16 -1
  179. package/src/lib/components/data-input/combination-mode-input.tsx +1 -1
  180. package/src/lib/components/data-input/custom-field-list-input.tsx +11 -7
  181. package/src/lib/components/data-input/customer-group-input.tsx +27 -33
  182. package/src/lib/components/data-input/datetime-input.tsx +40 -1
  183. package/src/lib/components/data-input/default-relation-input.tsx +5 -4
  184. package/src/lib/components/data-input/index.ts +3 -0
  185. package/src/lib/components/data-input/product-multi-selector-input.tsx +14 -14
  186. package/src/lib/components/data-input/relation-selector.tsx +1 -1
  187. package/src/lib/components/data-input/select-with-options.tsx +1 -1
  188. package/src/lib/components/data-input/slug-input.tsx +290 -0
  189. package/src/lib/components/data-table/add-filter-menu.tsx +17 -10
  190. package/src/lib/components/data-table/data-table-bulk-action-item.tsx +45 -8
  191. package/src/lib/components/data-table/data-table-bulk-actions.tsx +4 -4
  192. package/src/lib/components/data-table/data-table-column-header.tsx +13 -8
  193. package/src/lib/components/data-table/data-table-context.tsx +91 -0
  194. package/src/lib/components/data-table/data-table-faceted-filter.tsx +2 -1
  195. package/src/lib/components/data-table/data-table-filter-badge.tsx +9 -5
  196. package/src/lib/components/data-table/data-table-filter-dialog.tsx +1 -1
  197. package/src/lib/components/data-table/data-table-utils.ts +21 -4
  198. package/src/lib/components/data-table/data-table-view-options.tsx +21 -10
  199. package/src/lib/components/data-table/data-table.tsx +146 -94
  200. package/src/lib/components/data-table/filters/data-table-boolean-filter.tsx +4 -4
  201. package/src/lib/components/data-table/global-views-bar.tsx +97 -0
  202. package/src/lib/components/data-table/global-views-sheet.tsx +11 -0
  203. package/src/lib/components/data-table/human-readable-operator.tsx +1 -1
  204. package/src/lib/components/data-table/manage-global-views-button.tsx +26 -0
  205. package/src/lib/components/data-table/my-views-button.tsx +47 -0
  206. package/src/lib/components/data-table/refresh-button.tsx +12 -3
  207. package/src/lib/components/data-table/save-view-button.tsx +41 -0
  208. package/src/lib/components/data-table/save-view-dialog.tsx +113 -0
  209. package/src/lib/components/data-table/use-generated-columns.tsx +13 -8
  210. package/src/lib/components/data-table/user-views-sheet.tsx +11 -0
  211. package/src/lib/components/data-table/views-sheet.tsx +305 -0
  212. package/src/lib/components/date-range-picker.tsx +186 -0
  213. package/src/lib/components/layout/app-sidebar.tsx +3 -1
  214. package/src/lib/components/layout/channel-switcher.tsx +8 -10
  215. package/src/lib/components/layout/dev-mode-indicator.tsx +1 -1
  216. package/src/lib/components/layout/generated-breadcrumbs.tsx +10 -8
  217. package/src/lib/components/layout/language-dialog.tsx +34 -13
  218. package/src/lib/components/layout/manage-languages-dialog.tsx +1 -1
  219. package/src/lib/components/layout/nav-main.tsx +23 -13
  220. package/src/lib/components/layout/nav-user.tsx +19 -23
  221. package/src/lib/components/login/login-form.tsx +1 -1
  222. package/src/lib/components/shared/asset/asset-bulk-actions.tsx +4 -4
  223. package/src/lib/components/shared/asset/asset-focal-point-editor.tsx +1 -1
  224. package/src/lib/components/shared/asset/asset-gallery.tsx +15 -14
  225. package/src/lib/components/shared/assign-to-channel-bulk-action.tsx +11 -11
  226. package/src/lib/components/shared/assign-to-channel-dialog.tsx +6 -5
  227. package/src/lib/components/shared/channel-code-label.tsx +1 -1
  228. package/src/lib/components/shared/channel-selector.tsx +4 -4
  229. package/src/lib/components/shared/configurable-operation-multi-selector.tsx +16 -14
  230. package/src/lib/components/shared/configurable-operation-selector.tsx +1 -1
  231. package/src/lib/components/shared/confirmation-dialog.tsx +8 -8
  232. package/src/lib/components/shared/country-selector.tsx +1 -1
  233. package/src/lib/components/shared/currency-selector.tsx +4 -4
  234. package/src/lib/components/shared/custom-fields-form.tsx +8 -24
  235. package/src/lib/components/shared/customer-address-form.tsx +3 -3
  236. package/src/lib/components/shared/customer-group-selector.tsx +1 -1
  237. package/src/lib/components/shared/customer-selector.tsx +1 -1
  238. package/src/lib/components/shared/error-page.tsx +1 -1
  239. package/src/lib/components/shared/facet-value-selector.tsx +10 -10
  240. package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +1 -1
  241. package/src/lib/components/shared/history-timeline/history-note-editor.tsx +1 -1
  242. package/src/lib/components/shared/history-timeline/history-note-entry.tsx +1 -1
  243. package/src/lib/components/shared/language-selector.tsx +4 -4
  244. package/src/lib/components/shared/navigation-confirmation.tsx +1 -1
  245. package/src/lib/components/shared/paginated-list-data-table.tsx +64 -34
  246. package/src/lib/components/shared/remove-from-channel-bulk-action.tsx +6 -5
  247. package/src/lib/components/shared/rich-text-editor/image-dialog.tsx +1 -1
  248. package/src/lib/components/shared/rich-text-editor/link-dialog.tsx +1 -1
  249. package/src/lib/components/shared/rich-text-editor/responsive-toolbar.tsx +1 -1
  250. package/src/lib/components/shared/rich-text-editor/table-edit-icons.tsx +1 -1
  251. package/src/lib/components/shared/role-code-label.tsx +1 -1
  252. package/src/lib/components/shared/role-selector.tsx +4 -4
  253. package/src/lib/components/shared/seller-selector.tsx +1 -1
  254. package/src/lib/components/shared/stock-level-label.tsx +3 -5
  255. package/src/lib/components/shared/table-cell/order-table-cell-components.tsx +3 -1
  256. package/src/lib/components/shared/tax-category-selector.tsx +1 -1
  257. package/src/lib/components/shared/translatable-form-field.tsx +15 -15
  258. package/src/lib/components/shared/zone-selector.tsx +1 -1
  259. package/src/lib/components/ui/button.tsx +1 -1
  260. package/src/lib/framework/dashboard-widget/base-widget.tsx +11 -9
  261. package/src/lib/framework/dashboard-widget/latest-orders-widget/index.tsx +35 -6
  262. package/src/lib/framework/dashboard-widget/metrics-widget/index.tsx +18 -12
  263. package/src/lib/framework/dashboard-widget/metrics-widget/metrics-widget.graphql.ts +9 -3
  264. package/src/lib/framework/dashboard-widget/orders-summary/index.tsx +26 -79
  265. package/src/lib/framework/dashboard-widget/widget-filters-context.tsx +35 -0
  266. package/src/lib/framework/defaults.ts +34 -63
  267. package/src/lib/framework/document-introspection/add-custom-fields.spec.ts +319 -9
  268. package/src/lib/framework/document-introspection/add-custom-fields.ts +60 -31
  269. package/src/lib/framework/document-introspection/get-document-structure.spec.ts +1 -159
  270. package/src/lib/framework/document-introspection/include-only-selected-list-fields.spec.ts +1840 -0
  271. package/src/lib/framework/document-introspection/include-only-selected-list-fields.ts +940 -0
  272. package/src/lib/framework/document-introspection/testing-utils.ts +161 -0
  273. package/src/lib/framework/extension-api/display-component-extensions.tsx +2 -0
  274. package/src/lib/framework/extension-api/types/data-table.ts +62 -4
  275. package/src/lib/framework/extension-api/types/navigation.ts +16 -0
  276. package/src/lib/framework/form-engine/utils.ts +34 -0
  277. package/src/lib/framework/layout-engine/page-layout.tsx +36 -36
  278. package/src/lib/framework/page/detail-page.tsx +10 -10
  279. package/src/lib/framework/page/list-page.tsx +289 -4
  280. package/src/lib/framework/page/use-extended-router.tsx +101 -34
  281. package/src/lib/graphql/api.ts +6 -2
  282. package/src/lib/graphql/graphql-env.d.ts +38 -26
  283. package/src/lib/hooks/use-display-locale.ts +40 -0
  284. package/src/lib/hooks/use-dynamic-translations.ts +46 -0
  285. package/src/lib/hooks/use-extended-detail-query.ts +1 -1
  286. package/src/lib/hooks/use-extended-list-query.ts +6 -1
  287. package/src/lib/hooks/use-local-format.ts +15 -1
  288. package/src/lib/hooks/use-saved-views.ts +230 -0
  289. package/src/lib/hooks/use-ui-language-loader.ts +30 -0
  290. package/src/lib/index.ts +15 -0
  291. package/src/lib/lib/load-i18n-messages.ts +17 -0
  292. package/src/lib/lib/trans.tsx +15 -11
  293. package/src/lib/providers/i18n-provider.tsx +7 -14
  294. package/src/lib/types/saved-views.ts +39 -0
  295. package/src/lib/utils/saved-views-utils.ts +40 -0
@@ -1,6 +1,7 @@
1
+ import { lingui } from '@lingui/vite-plugin';
1
2
  import tailwindcss from '@tailwindcss/vite';
2
- import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
3
- import react from '@vitejs/plugin-react';
3
+ import { tanstackRouter } from '@tanstack/router-plugin/vite';
4
+ import react from '@vitejs/plugin-react-swc';
4
5
  import path from 'path';
5
6
  import { adminApiSchemaPlugin } from './vite-plugin-admin-api-schema.js';
6
7
  import { configLoaderPlugin } from './vite-plugin-config-loader.js';
@@ -10,6 +11,7 @@ import { gqlTadaPlugin } from './vite-plugin-gql-tada.js';
10
11
  import { dashboardTailwindSourcePlugin } from './vite-plugin-tailwind-source.js';
11
12
  import { themeVariablesPlugin } from './vite-plugin-theme.js';
12
13
  import { transformIndexHtmlPlugin } from './vite-plugin-transform-index.js';
14
+ import { translationsPlugin } from './vite-plugin-translations.js';
13
15
  import { uiConfigPlugin } from './vite-plugin-ui-config.js';
14
16
  /**
15
17
  * @description
@@ -25,12 +27,10 @@ export function vendureDashboardPlugin(options) {
25
27
  process.env.LINGUI_CONFIG = linguiConfigPath;
26
28
  }
27
29
  return [
28
- // TODO: solve https://github.com/kentcdodds/babel-plugin-macros/issues/87
29
- // lingui(),
30
30
  ...(options.disableTansStackRouterPlugin
31
31
  ? []
32
32
  : [
33
- TanStackRouterVite({
33
+ tanstackRouter({
34
34
  autoCodeSplitting: true,
35
35
  routeFileIgnorePattern: '.graphql.ts|components|hooks|utils',
36
36
  routesDirectory: path.join(packageRoot, 'src/app/routes'),
@@ -38,10 +38,9 @@ export function vendureDashboardPlugin(options) {
38
38
  }),
39
39
  ]),
40
40
  react({
41
- // babel: {
42
- // plugins: ['@lingui/babel-plugin-lingui-macro'],
43
- // },
41
+ plugins: [['@lingui/swc-plugin', {}]],
44
42
  }),
43
+ lingui({}),
45
44
  themeVariablesPlugin({ theme: options.theme }),
46
45
  dashboardTailwindSourcePlugin(),
47
46
  tailwindcss(),
@@ -59,6 +58,9 @@ export function vendureDashboardPlugin(options) {
59
58
  ? [gqlTadaPlugin({ gqlTadaOutputPath: options.gqlOutputPath, tempDir, packageRoot })]
60
59
  : []),
61
60
  transformIndexHtmlPlugin(),
61
+ translationsPlugin({
62
+ packageRoot,
63
+ }),
62
64
  ];
63
65
  }
64
66
  /**
package/lingui.config.js CHANGED
@@ -2,11 +2,34 @@ import { defineConfig } from '@lingui/cli';
2
2
 
3
3
  export default defineConfig({
4
4
  sourceLocale: 'en',
5
- locales: ['de', 'en'],
5
+ locales: [
6
+ 'he',
7
+ 'ar',
8
+ 'de',
9
+ 'en',
10
+ 'es',
11
+ 'pl',
12
+ 'zh_Hans',
13
+ 'zh_Hant',
14
+ 'pt_BR',
15
+ 'pt_PT',
16
+ 'cs',
17
+ 'fr',
18
+ 'ru',
19
+ 'uk',
20
+ 'it',
21
+ 'fa',
22
+ 'ne',
23
+ 'hr',
24
+ 'nb',
25
+ 'sv',
26
+ 'tr',
27
+ 'ja',
28
+ ],
6
29
  catalogs: [
7
30
  {
8
31
  path: '<rootDir>/src/i18n/locales/{locale}',
9
- include: ['<rootDir>'],
32
+ include: ['<rootDir>/src'],
10
33
  },
11
34
  ],
12
35
  });
package/package.json CHANGED
@@ -1,160 +1,163 @@
1
1
  {
2
- "name": "@vendure/dashboard",
3
- "private": false,
4
- "version": "3.4.3-master-202509260228",
5
- "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/vendure-ecommerce/vendure"
2
+ "name": "@vendure/dashboard",
3
+ "private": false,
4
+ "version": "3.5.0-minor-202510012036",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/vendure-ecommerce/vendure"
9
+ },
10
+ "homepage": "https://www.vendure.io",
11
+ "funding": "https://github.com/sponsors/michaelbromley",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "scripts": {
16
+ "dev": "vite",
17
+ "build:standalone": "vite build",
18
+ "build:vite": "tsc --project tsconfig.vite.json",
19
+ "build:plugin": "tsc --project tsconfig.plugin.json && node scripts/build-plugin.js",
20
+ "build": "npm run build:vite && npm run build:plugin",
21
+ "watch": "tsc --project tsconfig.vite.json --watch",
22
+ "test": "vitest run",
23
+ "lint": "eslint .",
24
+ "preview": "vite preview",
25
+ "generate-index": "node scripts/generate-index.js",
26
+ "i18n:extract": "lingui extract && node ./scripts/translate/i18n-tool.js extract",
27
+ "i18n:apply": "node ./scripts/translate/i18n-tool.js apply"
28
+ },
29
+ "module": "./src/lib/index.ts",
30
+ "main": "./src/lib/index.ts",
31
+ "types": "./src/lib/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./src/lib/index.d.ts",
35
+ "import": "./src/lib/index.ts",
36
+ "require": "./src/lib/index.ts"
9
37
  },
10
- "homepage": "https://www.vendure.io",
11
- "funding": "https://github.com/sponsors/michaelbromley",
12
- "publishConfig": {
13
- "access": "public"
38
+ "./plugin": {
39
+ "types": "./dist/plugin/index.d.ts",
40
+ "import": "./dist/plugin/index.js",
41
+ "require": "./dist/plugin/index.js"
14
42
  },
15
- "scripts": {
16
- "dev": "vite",
17
- "build:standalone": "vite build",
18
- "build:vite": "tsc --project tsconfig.vite.json",
19
- "build:plugin": "tsc --project tsconfig.plugin.json && node scripts/build-plugin.js",
20
- "build": "npm run build:vite && npm run build:plugin",
21
- "watch": "tsc --project tsconfig.vite.json --watch",
22
- "test": "vitest run",
23
- "lint": "eslint .",
24
- "preview": "vite preview",
25
- "generate-index": "node scripts/generate-index.js"
26
- },
27
- "module": "./src/lib/index.ts",
28
- "main": "./src/lib/index.ts",
29
- "types": "./src/lib/index.d.ts",
30
- "exports": {
31
- ".": {
32
- "types": "./src/lib/index.d.ts",
33
- "import": "./src/lib/index.ts",
34
- "require": "./src/lib/index.ts"
35
- },
36
- "./plugin": {
37
- "types": "./dist/plugin/index.d.ts",
38
- "import": "./dist/plugin/index.js",
39
- "require": "./dist/plugin/index.js"
40
- },
41
- "./vite": {
42
- "types": "./dist/vite/index.d.ts",
43
- "import": "./dist/vite/index.js",
44
- "require": "./dist/vite/index.js"
45
- }
46
- },
47
- "files": [
48
- "dist",
49
- "src",
50
- "lingui.config.js",
51
- "index.html"
52
- ],
53
- "dependencies": {
54
- "@dnd-kit/core": "^6.3.1",
55
- "@dnd-kit/modifiers": "^9.0.0",
56
- "@dnd-kit/sortable": "^10.0.0",
57
- "@hookform/resolvers": "^4.1.3",
58
- "@lingui/babel-plugin-lingui-macro": "^5.2.0",
59
- "@lingui/cli": "^5.2.0",
60
- "@lingui/core": "^5.2.0",
61
- "@lingui/react": "^5.2.0",
62
- "@lingui/vite-plugin": "^5.2.0",
63
- "@radix-ui/react-accordion": "^1.2.11",
64
- "@radix-ui/react-alert-dialog": "^1.1.14",
65
- "@radix-ui/react-aspect-ratio": "^1.1.7",
66
- "@radix-ui/react-avatar": "^1.1.10",
67
- "@radix-ui/react-checkbox": "^1.3.2",
68
- "@radix-ui/react-collapsible": "^1.1.11",
69
- "@radix-ui/react-context-menu": "^2.2.15",
70
- "@radix-ui/react-dialog": "^1.1.14",
71
- "@radix-ui/react-dropdown-menu": "^2.1.15",
72
- "@radix-ui/react-hover-card": "^1.1.14",
73
- "@radix-ui/react-label": "^2.1.7",
74
- "@radix-ui/react-menubar": "^1.1.15",
75
- "@radix-ui/react-navigation-menu": "^1.2.13",
76
- "@radix-ui/react-popover": "^1.1.14",
77
- "@radix-ui/react-progress": "^1.1.7",
78
- "@radix-ui/react-radio-group": "^1.3.7",
79
- "@radix-ui/react-scroll-area": "^1.2.9",
80
- "@radix-ui/react-select": "^2.2.5",
81
- "@radix-ui/react-separator": "^1.1.7",
82
- "@radix-ui/react-slider": "^1.3.5",
83
- "@radix-ui/react-slot": "^1.2.3",
84
- "@radix-ui/react-switch": "^1.2.5",
85
- "@radix-ui/react-tabs": "^1.1.12",
86
- "@radix-ui/react-toggle": "^1.1.9",
87
- "@radix-ui/react-toggle-group": "^1.1.10",
88
- "@radix-ui/react-tooltip": "^1.2.7",
89
- "@tailwindcss/vite": "^4.1.5",
90
- "@tanstack/eslint-plugin-query": "^5.66.1",
91
- "@tanstack/react-query": "^5.66.7",
92
- "@tanstack/react-query-devtools": "^5.68.0",
93
- "@tanstack/react-router": "^1.105.0",
94
- "@tanstack/react-table": "^8.21.2",
95
- "@tanstack/router-devtools": "^1.105.0",
96
- "@tanstack/router-plugin": "^1.105.0",
97
- "@tiptap/extension-floating-menu": "^3.4.4",
98
- "@tiptap/extension-image": "^3.4.4",
99
- "@tiptap/extension-table": "^3.4.4",
100
- "@tiptap/extension-text-style": "^3.4.4",
101
- "@tiptap/pm": "^3.4.4",
102
- "@tiptap/react": "^3.4.4",
103
- "@tiptap/starter-kit": "^3.4.4",
104
- "@types/react": "^19.0.10",
105
- "@types/react-dom": "^19.0.4",
106
- "@uidotdev/usehooks": "^2.4.1",
107
- "@vendure/common": "^3.4.3-master-202509260228",
108
- "@vendure/core": "^3.4.3-master-202509260228",
109
- "@vitejs/plugin-react": "^4.3.4",
110
- "acorn": "^8.11.3",
111
- "acorn-walk": "^8.3.2",
112
- "awesome-graphql-client": "^2.1.0",
113
- "class-variance-authority": "^0.7.1",
114
- "clsx": "^2.1.1",
115
- "cmdk": "^1.1.1",
116
- "date-fns": "^4.0.0",
117
- "embla-carousel-react": "^8.6.0",
118
- "express-rate-limit": "^7.5.0",
119
- "fast-glob": "^3.3.2",
120
- "fs-extra": "^11.2.0",
121
- "gql.tada": "^1.8.10",
122
- "graphql": "^16.10.0",
123
- "input-otp": "^1.4.2",
124
- "json-edit-react": "^1.23.1",
125
- "lucide-react": "^0.475.0",
126
- "motion": "^12.6.2",
127
- "next-themes": "^0.4.6",
128
- "react": "^19.0.0",
129
- "react-day-picker": "^9.8.0",
130
- "react-dom": "^19.0.0",
131
- "react-dropzone": "^14.3.8",
132
- "react-hook-form": "^7.60.0",
133
- "react-resizable-panels": "^3.0.3",
134
- "recharts": "^2.15.4",
135
- "sonner": "^2.0.6",
136
- "tailwind-merge": "^3.2.0",
137
- "tailwindcss": "^4.1.5",
138
- "tailwindcss-animate": "^1.0.7",
139
- "tsconfig-paths": "^4.2.0",
140
- "tw-animate-css": "^1.2.9",
141
- "vaul": "^1.1.2",
142
- "vite": "^6.3.5",
143
- "zod": "^3.25.76"
144
- },
145
- "devDependencies": {
146
- "@eslint/js": "^9.19.0",
147
- "@types/node": "^22.13.4",
148
- "eslint": "^9.19.0",
149
- "eslint-plugin-react": "^7.37.4",
150
- "eslint-plugin-react-hooks": "^5.0.0",
151
- "eslint-plugin-react-refresh": "^0.4.18",
152
- "globals": "^15.14.0",
153
- "vite-plugin-dts": "^4.5.3"
154
- },
155
- "optionalDependencies": {
156
- "lightningcss-linux-arm64-musl": "^1.29.3",
157
- "lightningcss-linux-x64-musl": "^1.29.1"
158
- },
159
- "gitHead": "09a859925b6a64910b4d028e04845bf5aefd89b4"
43
+ "./vite": {
44
+ "types": "./dist/vite/index.d.ts",
45
+ "import": "./dist/vite/index.js",
46
+ "require": "./dist/vite/index.js"
47
+ }
48
+ },
49
+ "files": [
50
+ "dist",
51
+ "src",
52
+ "lingui.config.js",
53
+ "index.html"
54
+ ],
55
+ "dependencies": {
56
+ "@dnd-kit/core": "^6.3.1",
57
+ "@dnd-kit/modifiers": "^9.0.0",
58
+ "@dnd-kit/sortable": "^10.0.0",
59
+ "@hookform/resolvers": "^4.1.3",
60
+ "@lingui/cli": "^5.5.0",
61
+ "@lingui/core": "^5.5.0",
62
+ "@lingui/react": "^5.5.0",
63
+ "@lingui/swc-plugin": "^5.6.1",
64
+ "@lingui/vite-plugin": "^5.5.0",
65
+ "@radix-ui/react-accordion": "^1.2.11",
66
+ "@radix-ui/react-alert-dialog": "^1.1.14",
67
+ "@radix-ui/react-aspect-ratio": "^1.1.7",
68
+ "@radix-ui/react-avatar": "^1.1.10",
69
+ "@radix-ui/react-checkbox": "^1.3.2",
70
+ "@radix-ui/react-collapsible": "^1.1.11",
71
+ "@radix-ui/react-context-menu": "^2.2.15",
72
+ "@radix-ui/react-dialog": "^1.1.14",
73
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
74
+ "@radix-ui/react-hover-card": "^1.1.14",
75
+ "@radix-ui/react-label": "^2.1.7",
76
+ "@radix-ui/react-menubar": "^1.1.15",
77
+ "@radix-ui/react-navigation-menu": "^1.2.13",
78
+ "@radix-ui/react-popover": "^1.1.14",
79
+ "@radix-ui/react-progress": "^1.1.7",
80
+ "@radix-ui/react-radio-group": "^1.3.7",
81
+ "@radix-ui/react-scroll-area": "^1.2.9",
82
+ "@radix-ui/react-select": "^2.2.5",
83
+ "@radix-ui/react-separator": "^1.1.7",
84
+ "@radix-ui/react-slider": "^1.3.5",
85
+ "@radix-ui/react-slot": "^1.2.3",
86
+ "@radix-ui/react-switch": "^1.2.5",
87
+ "@radix-ui/react-tabs": "^1.1.12",
88
+ "@radix-ui/react-toggle": "^1.1.9",
89
+ "@radix-ui/react-toggle-group": "^1.1.10",
90
+ "@radix-ui/react-tooltip": "^1.2.7",
91
+ "@tailwindcss/vite": "^4.1.5",
92
+ "@tanstack/eslint-plugin-query": "^5.66.1",
93
+ "@tanstack/react-query": "^5.66.7",
94
+ "@tanstack/react-query-devtools": "^5.68.0",
95
+ "@tanstack/react-router": "^1.105.0",
96
+ "@tanstack/react-table": "^8.21.2",
97
+ "@tanstack/router-devtools": "^1.105.0",
98
+ "@tanstack/router-plugin": "^1.105.0",
99
+ "@tiptap/extension-floating-menu": "^3.4.4",
100
+ "@tiptap/extension-image": "^3.4.4",
101
+ "@tiptap/extension-table": "^3.4.4",
102
+ "@tiptap/extension-text-style": "^3.4.4",
103
+ "@tiptap/pm": "^3.4.4",
104
+ "@tiptap/react": "^3.4.4",
105
+ "@tiptap/starter-kit": "^3.4.4",
106
+ "@types/react": "^19.0.10",
107
+ "@types/react-dom": "^19.0.4",
108
+ "@uidotdev/usehooks": "^2.4.1",
109
+ "@vendure/common": "^3.5.0-minor-202510012036",
110
+ "@vendure/core": "^3.5.0-minor-202510012036",
111
+ "@vitejs/plugin-react": "^4.3.4",
112
+ "@vitejs/plugin-react-swc": "^4.1.0",
113
+ "acorn": "^8.11.3",
114
+ "acorn-walk": "^8.3.2",
115
+ "awesome-graphql-client": "^2.1.0",
116
+ "class-variance-authority": "^0.7.1",
117
+ "clsx": "^2.1.1",
118
+ "cmdk": "^1.1.1",
119
+ "date-fns": "^4.0.0",
120
+ "embla-carousel-react": "^8.6.0",
121
+ "express-rate-limit": "^7.5.0",
122
+ "fast-glob": "^3.3.2",
123
+ "fs-extra": "^11.2.0",
124
+ "gql.tada": "^1.8.10",
125
+ "graphql": "^16.10.0",
126
+ "input-otp": "^1.4.2",
127
+ "json-edit-react": "^1.23.1",
128
+ "lucide-react": "^0.475.0",
129
+ "motion": "^12.6.2",
130
+ "next-themes": "^0.4.6",
131
+ "react": "^19.0.0",
132
+ "react-day-picker": "^9.8.0",
133
+ "react-dom": "^19.0.0",
134
+ "react-dropzone": "^14.3.8",
135
+ "react-hook-form": "^7.60.0",
136
+ "react-resizable-panels": "^3.0.3",
137
+ "recharts": "^2.15.4",
138
+ "sonner": "^2.0.6",
139
+ "tailwind-merge": "^3.2.0",
140
+ "tailwindcss": "^4.1.5",
141
+ "tailwindcss-animate": "^1.0.7",
142
+ "tsconfig-paths": "^4.2.0",
143
+ "tw-animate-css": "^1.2.9",
144
+ "vaul": "^1.1.2",
145
+ "vite": "^6.3.5",
146
+ "zod": "^3.25.76"
147
+ },
148
+ "devDependencies": {
149
+ "@eslint/js": "^9.19.0",
150
+ "@types/node": "^22.13.4",
151
+ "eslint": "^9.19.0",
152
+ "eslint-plugin-react": "^7.37.4",
153
+ "eslint-plugin-react-hooks": "^5.0.0",
154
+ "eslint-plugin-react-refresh": "^0.4.18",
155
+ "globals": "^15.14.0",
156
+ "vite-plugin-dts": "^4.5.3"
157
+ },
158
+ "optionalDependencies": {
159
+ "lightningcss-linux-arm64-musl": "^1.29.3",
160
+ "lightningcss-linux-x64-musl": "^1.29.1"
161
+ },
162
+ "gitHead": "e1ec4b6b65d0743ab1ab1f344eb03c0cf55a7f32"
160
163
  }
@@ -5,7 +5,6 @@ import { ServerConfigProvider } from '@/vdb/providers/server-config.js';
5
5
  import { ThemeProvider } from '@/vdb/providers/theme-provider.js';
6
6
  import { UserSettingsProvider } from '@/vdb/providers/user-settings.js';
7
7
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
8
- import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
9
8
  import React from 'react';
10
9
 
11
10
  export const queryClient = new QueryClient();
@@ -23,9 +22,6 @@ export function AppProviders({ children }: { children: React.ReactNode }) {
23
22
  </AuthProvider>
24
23
  </ThemeProvider>
25
24
  </UserSettingsProvider>
26
- {process.env.NODE_ENV === 'development' && (
27
- <ReactQueryDevtools initialIsOpen={false} buttonPosition="bottom-left" />
28
- )}
29
25
  </QueryClientProvider>
30
26
  </I18nProvider>
31
27
  );
@@ -6,7 +6,7 @@ import { DataTableBulkActionItem } from '@/vdb/components/data-table/data-table-
6
6
  import { usePaginatedList } from '@/vdb/components/shared/paginated-list-data-table.js';
7
7
  import { getMutationName } from '@/vdb/framework/document-introspection/get-document-structure.js';
8
8
  import { api } from '@/vdb/graphql/api.js';
9
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
9
+ import { Trans, useLingui } from '@lingui/react/macro';
10
10
 
11
11
  interface DeleteBulkActionProps {
12
12
  /** The GraphQL mutation document to execute */
@@ -79,7 +79,7 @@ export function DeleteBulkAction({
79
79
  table,
80
80
  }: Readonly<DeleteBulkActionProps>) {
81
81
  const { refetchPaginatedList } = usePaginatedList();
82
- const { i18n } = useLingui();
82
+ const { t } = useLingui();
83
83
  const queryClient = useQueryClient();
84
84
 
85
85
  const { mutate } = useMutation({
@@ -105,13 +105,14 @@ export function DeleteBulkAction({
105
105
  }
106
106
 
107
107
  if (0 < deleted) {
108
- toast.success(i18n.t(`Deleted ${deleted} ${entityName}`));
108
+ toast.success(t`Deleted ${deleted} ${entityName}`);
109
109
  }
110
110
  if (0 < failed) {
111
+ const allErrors = errors.join(', ');
111
112
  const errorMessage =
112
113
  errors.length > 0
113
- ? i18n.t(`Failed to delete ${failed} ${entityName}: ${errors.join(', ')}`)
114
- : i18n.t(`Failed to delete ${failed} ${entityName}`);
114
+ ? t`Failed to delete ${failed} ${entityName}: ${allErrors}`
115
+ : t`Failed to delete ${failed} ${entityName}`;
115
116
  toast.error(errorMessage);
116
117
  }
117
118
 
@@ -8,7 +8,7 @@ import { DataTableBulkActionItem } from '@/vdb/components/data-table/data-table-
8
8
  import { usePaginatedList } from '@/vdb/components/shared/paginated-list-data-table.js';
9
9
  import { api } from '@/vdb/graphql/api.js';
10
10
  import { duplicateEntityDocument } from '@/vdb/graphql/common-operations.js';
11
- import { Trans, useLingui } from '@/vdb/lib/trans.js';
11
+ import { Trans, useLingui } from '@lingui/react/macro';
12
12
  import { DuplicateEntityDialog } from './duplicate-entity-dialog.js';
13
13
 
14
14
  interface DuplicateBulkActionProps {
@@ -31,7 +31,7 @@ export function DuplicateBulkAction({
31
31
  table,
32
32
  }: Readonly<DuplicateBulkActionProps>) {
33
33
  const { refetchPaginatedList } = usePaginatedList();
34
- const { i18n } = useLingui();
34
+ const { t } = useLingui();
35
35
  const [isDuplicating, setIsDuplicating] = useState(false);
36
36
  const [progress, setProgress] = useState({ completed: 0, total: 0 });
37
37
  const [dialogOpen, setDialogOpen] = useState(false);
@@ -93,9 +93,8 @@ export function DuplicateBulkAction({
93
93
 
94
94
  // Show results
95
95
  if (results.success > 0) {
96
- toast.success(
97
- i18n.t(`Successfully duplicated ${results.success} ${entityName.toLowerCase()}s`),
98
- );
96
+ const count = results.success;
97
+ toast.success(t`Successfully duplicated ${count} ${entityName}`);
99
98
  }
100
99
  if (results.failed > 0) {
101
100
  const errorMessage =
@@ -9,7 +9,7 @@ import {
9
9
  } from '@/vdb/components/ui/dialog.js';
10
10
  import { api } from '@/vdb/graphql/api.js';
11
11
  import { getEntityDuplicatorsDocument } from '@/vdb/graphql/common-operations.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 { ConfigurableOperationInput } from '@vendure/common/lib/generated-types';
15
15
  import React, { useState } from 'react';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description
3
+ * Sets the `dir` attribute on the HTML tag, which sets the global text direction
4
+ */
5
+ export function setDocumentDirection(direction: 'rtl' | 'ltr') {
6
+ document.documentElement.setAttribute('dir', direction);
7
+ }