@vendure/dashboard 3.8.1-master-202610220213 → 3.8.1

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 (90) hide show
  1. package/dist/bundle/chunks/{2SSKDMRQ-BVYTtZ4W.js → 2SSKDMRQ-BHHzW1a_.js} +2 -2
  2. package/dist/bundle/chunks/{AP7HFJJL-BDXyVf1-.js → AP7HFJJL-B5qPACUM.js} +1 -1
  3. package/dist/bundle/chunks/{WDYDFRGG-DP5Ikh83.js → WDYDFRGG-BfBnFCDT.js} +2 -2
  4. package/dist/bundle/chunks/{ar-DMK_eFVD.js → ar-ZYyYt3LW.js} +1 -1
  5. package/dist/bundle/chunks/{bg-_l7rTFuK.js → bg-BgDGBTKB.js} +1 -1
  6. package/dist/bundle/chunks/{common-operations-CVADEI6Z.js → common-operations-DaHPL4es.js} +732 -674
  7. package/dist/bundle/chunks/{cs-DMrGo78x.js → cs-BYGURbP6.js} +1 -1
  8. package/dist/bundle/chunks/{de-DEE86yVt.js → de-HdkR3fYi.js} +1 -1
  9. package/dist/bundle/chunks/{en-Cl1y9IIy.js → en-BAhByZZJ.js} +1 -1
  10. package/dist/bundle/chunks/{es-BxdaHguU.js → es-Dt0C52Mq.js} +1 -1
  11. package/dist/bundle/chunks/{fa-DmehFzkF.js → fa-CREXA3HL.js} +1 -1
  12. package/dist/bundle/chunks/{fr-OT8cvTDq.js → fr-Cz8kKMli.js} +1 -1
  13. package/dist/bundle/chunks/{he-BKP3NS5j.js → he-9NoIAj8m.js} +1 -1
  14. package/dist/bundle/chunks/{hr-BYAgAid3.js → hr-BwXcr71B.js} +1 -1
  15. package/dist/bundle/chunks/{hu-D5RzrlfJ.js → hu-DUz4OEIA.js} +1 -1
  16. package/dist/bundle/chunks/{it-DjrjGb8J.js → it-CAlaDmH7.js} +1 -1
  17. package/dist/bundle/chunks/{ja-CHHuYFJd.js → ja-2JxS6pFi.js} +1 -1
  18. package/dist/bundle/chunks/{ko-CIrLMXet.js → ko-BsFLDX_m.js} +1 -1
  19. package/dist/bundle/chunks/{locale-DlaghAWQ.js → locale-cLfB2IZc.js} +1 -1
  20. package/dist/bundle/chunks/{main-CcSc9LYG.js → main-MGWdQzqd.js} +3 -3
  21. package/dist/bundle/chunks/{nb-CBS2CxWA.js → nb-Dff7oHih.js} +1 -1
  22. package/dist/bundle/chunks/{ne-BKFoZX0n.js → ne-ByGdZmfQ.js} +1 -1
  23. package/dist/bundle/chunks/{nl-CioNp_N5.js → nl-DniFiVio.js} +1 -1
  24. package/dist/bundle/chunks/{pl-ChqS0pNw.js → pl-B5DHommF.js} +1 -1
  25. package/dist/bundle/chunks/{pt_BR-8wz_k8Ib.js → pt_BR-BAq7WTWG.js} +1 -1
  26. package/dist/bundle/chunks/{pt_PT-BsddGCVI.js → pt_PT-DL7eSU8R.js} +1 -1
  27. package/dist/bundle/chunks/{ro-DLZ4JjP9.js → ro-CGYxDEv8.js} +1 -1
  28. package/dist/bundle/chunks/{ru-CDB-oX6Y.js → ru-BduayFrD.js} +1 -1
  29. package/dist/bundle/chunks/{sv-C05330I8.js → sv-E3RLr9cy.js} +1 -1
  30. package/dist/bundle/chunks/{tr-BmdyAxJM.js → tr-pMuzyLjn.js} +1 -1
  31. package/dist/bundle/chunks/{uk-UHmyTWD9.js → uk-BFfpHemj.js} +1 -1
  32. package/dist/bundle/chunks/{uz-BPv1mncF.js → uz-DBzLLOoE.js} +1 -1
  33. package/dist/bundle/chunks/{zh_Hans-DYtmTSvd.js → zh_Hans-DDD5yH27.js} +1 -1
  34. package/dist/bundle/chunks/{zh_Hant-CdyREtHJ.js → zh_Hant-B9iOWieA.js} +1 -1
  35. package/dist/bundle/lib.js +653 -707
  36. package/dist/bundle/main.js +2 -2
  37. package/dist/vite/utils/get-active-plugin-info.d.ts +0 -29
  38. package/dist/vite/utils/get-active-plugin-info.js +1 -3
  39. package/dist/vite/vite-plugin-config.js +28 -2
  40. package/dist/vite/vite-plugin-dashboard-metadata.js +47 -15
  41. package/dist/vite/vite-plugin-vendure-dashboard.d.ts +0 -1
  42. package/dist/vite/vite-plugin-vendure-dashboard.js +0 -5
  43. package/package.json +3 -3
  44. package/src/i18n/locales/ar.po +4 -0
  45. package/src/i18n/locales/bg.po +4 -0
  46. package/src/i18n/locales/cs.po +4 -0
  47. package/src/i18n/locales/de.po +4 -0
  48. package/src/i18n/locales/en.po +4 -0
  49. package/src/i18n/locales/es.po +4 -0
  50. package/src/i18n/locales/fa.po +4 -0
  51. package/src/i18n/locales/fr.po +4 -0
  52. package/src/i18n/locales/he.po +4 -0
  53. package/src/i18n/locales/hr.po +4 -0
  54. package/src/i18n/locales/hu.po +4 -0
  55. package/src/i18n/locales/it.po +4 -0
  56. package/src/i18n/locales/ja.po +4 -0
  57. package/src/i18n/locales/ko.po +4 -0
  58. package/src/i18n/locales/nb.po +4 -0
  59. package/src/i18n/locales/ne.po +4 -0
  60. package/src/i18n/locales/nl.po +4 -0
  61. package/src/i18n/locales/pl.po +4 -0
  62. package/src/i18n/locales/pt_BR.po +4 -0
  63. package/src/i18n/locales/pt_PT.po +4 -0
  64. package/src/i18n/locales/ro.po +4 -0
  65. package/src/i18n/locales/ru.po +4 -0
  66. package/src/i18n/locales/sv.po +4 -0
  67. package/src/i18n/locales/tr.po +4 -0
  68. package/src/i18n/locales/uk.po +4 -0
  69. package/src/i18n/locales/uz.po +4 -0
  70. package/src/i18n/locales/zh_Hans.po +4 -0
  71. package/src/i18n/locales/zh_Hant.po +4 -0
  72. package/src/lib/components/shared/error-page.tsx +2 -2
  73. package/src/lib/components/shared/paginated-list-data-table.spec.tsx +151 -0
  74. package/src/lib/components/shared/paginated-list-data-table.tsx +11 -2
  75. package/src/lib/constants.ts +1 -0
  76. package/src/lib/framework/registry/registry-types.ts +0 -2
  77. package/src/lib/index.ts +0 -3
  78. package/src/lib/providers/auth.tsx +75 -7
  79. package/src/lib/providers/server-config.tsx +3 -2
  80. package/src/lib/providers/user-settings.spec.tsx +191 -0
  81. package/src/lib/providers/user-settings.tsx +30 -14
  82. package/src/lib/storage-keys.ts +3 -1
  83. package/src/lib/utils/is-forbidden-error.ts +9 -0
  84. package/src/lib/virtual.d.ts +0 -6
  85. package/dist/vite/vite-plugin-platform-promotion.d.ts +0 -25
  86. package/dist/vite/vite-plugin-platform-promotion.js +0 -83
  87. package/src/lib/framework/platform-promotion/platform-granted-capabilities.ts +0 -71
  88. package/src/lib/framework/platform-promotion/platform-promotion-types.ts +0 -5
  89. package/src/lib/hooks/use-platform-promotion.spec.tsx +0 -117
  90. package/src/lib/hooks/use-platform-promotion.ts +0 -117
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
- import "./chunks/common-operations-CVADEI6Z.js";
2
+ import "./chunks/common-operations-DaHPL4es.js";
3
3
  import "sonner";
4
- import "./chunks/main-CcSc9LYG.js";
4
+ import "./chunks/main-MGWdQzqd.js";
5
5
  import "@tanstack/react-router";
6
6
  import "react";
7
7
  import "react-dom";
@@ -27,32 +27,3 @@ import { PluginInfo } from '../types.js';
27
27
  * @internal
28
28
  */
29
29
  export declare function filterActivePluginInfo(pluginInfo: PluginInfo[], vendureConfig: Pick<VendureConfig, 'plugins'>): PluginInfo[];
30
- /**
31
- * Returns the set of class names of the plugins active in the runtime config.
32
- *
33
- * Each entry in `VendureConfig.plugins` is either:
34
- * - a class decorated with `@VendurePlugin` (the most common pattern,
35
- * including the return value of `SomePlugin.init(opts)` which by
36
- * convention returns the class itself), or
37
- * - a NestJS `DynamicModule` of the shape `{ module: SomePluginClass, ... }`,
38
- * which some plugins use to return additional providers/imports.
39
- *
40
- * Plugins can compose other plugins through the `plugins` property of the
41
- * `@VendurePlugin` metadata (since v3.8.0). Vendure core registers these composed
42
- * plugins at bootstrap (see `flattenPlugins()` in `@vendure/core`), so their
43
- * class names are active too. This function reads the same `plugins` metadata
44
- * key recursively. It cannot import `flattenPlugins()` because `@vendure/core`
45
- * is not a runtime dependency of the dashboard package.
46
- *
47
- * Matching by class name (rather than by class reference) is necessary because
48
- * the runtime config side and the static-discovery side load plugin modules
49
- * through different import paths and therefore see distinct class objects.
50
- * Two installed plugin packages sharing a class name would be indistinguishable
51
- * here, but the same limitation already exists in the discovery step (which
52
- * also keys on `name`), so this filter does not regress anything. If a future
53
- * change tracks `(pluginPath, name)` tuples through discovery, this filter
54
- * should be updated to match on the same key.
55
- *
56
- * @internal
57
- */
58
- export declare function getActivePluginNames(vendureConfig: Pick<VendureConfig, 'plugins'>): Set<string>;
@@ -56,10 +56,8 @@ export function filterActivePluginInfo(pluginInfo, vendureConfig) {
56
56
  * also keys on `name`), so this filter does not regress anything. If a future
57
57
  * change tracks `(pluginPath, name)` tuples through discovery, this filter
58
58
  * should be updated to match on the same key.
59
- *
60
- * @internal
61
59
  */
62
- export function getActivePluginNames(vendureConfig) {
60
+ function getActivePluginNames(vendureConfig) {
63
61
  var _a;
64
62
  const names = new Set();
65
63
  const visited = new Set();
@@ -1,3 +1,5 @@
1
+ import { createHash } from 'node:crypto';
2
+ import fs from 'node:fs';
1
3
  import path from 'path';
2
4
  import { singletonSharedDepNames } from './lib-externals.js';
3
5
  export function viteConfigPlugin({ packageRoot, gqlOutputPath, useExperimentalBundle, }) {
@@ -29,7 +31,7 @@ export function viteConfigPlugin({ packageRoot, gqlOutputPath, useExperimentalBu
29
31
  // See the readme for an explanation of this alias.
30
32
  '@/vdb': path.resolve(packageRoot, './src/lib'), '@/graphql': path.resolve(packageRoot, './src/lib/graphql') }), (useExperimentalBundle
31
33
  ? {
32
- '@vendure/dashboard': path.resolve(packageRoot, './dist/bundle/lib.js'),
34
+ '@vendure/dashboard': getBundleLibEntry(packageRoot),
33
35
  }
34
36
  : {})),
35
37
  };
@@ -49,7 +51,6 @@ export function viteConfigPlugin({ packageRoot, gqlOutputPath, useExperimentalBu
49
51
  'virtual:admin-api-schema',
50
52
  'virtual:dashboard-extensions',
51
53
  'virtual:plugin-translations',
52
- 'virtual:vendure-platform-promotion',
53
54
  ],
54
55
  // We however do want to pre-bundle recharts, as it depends
55
56
  // on lodash which is a CJS packages and _does_ require
@@ -65,6 +66,14 @@ export function viteConfigPlugin({ packageRoot, gqlOutputPath, useExperimentalBu
65
66
  'use-sync-external-store/shim',
66
67
  'use-sync-external-store/shim/with-selector',
67
68
  '@messageformat/parser',
69
+ // The Lingui runtime is only imported by macro-transformed code
70
+ // (and, in bundle mode, from within node_modules), so the
71
+ // scanner never finds it: it would be discovered late, forcing
72
+ // a reload. In bundle mode an un-optimized `@lingui/core` is
73
+ // also served raw to the bundle while extension code gets an
74
+ // optimized copy, i.e. two `i18n` singletons.
75
+ '@lingui/core',
76
+ '@lingui/react',
68
77
  // In bundle mode these context/singleton libraries are kept
69
78
  // external from the pre-built bundle (see lib-externals.ts),
70
79
  // so pre-bundle them here to guarantee that main.js, lib.js
@@ -77,3 +86,20 @@ export function viteConfigPlugin({ packageRoot, gqlOutputPath, useExperimentalBu
77
86
  },
78
87
  };
79
88
  }
89
+ /**
90
+ * Returns the bundle's library entry with a `?v=` derived from its contents.
91
+ * Vite's own `?v=` (added for files in node_modules, served as immutable) does not
92
+ * change with the bundle, so a rebuilt bundle would be shadowed by a stale cached
93
+ * `lib.js`. Vite does not add its own `v` when one is present. The chunks have
94
+ * content-hashed names referenced by `lib.js`, so hashing `lib.js` covers them.
95
+ */
96
+ function getBundleLibEntry(packageRoot) {
97
+ const libEntry = path.resolve(packageRoot, './dist/bundle/lib.js');
98
+ try {
99
+ const version = createHash('sha256').update(fs.readFileSync(libEntry)).digest('hex').slice(0, 8);
100
+ return `${libEntry}?v=${version}`;
101
+ }
102
+ catch (_a) {
103
+ return libEntry;
104
+ }
105
+ }
@@ -1,5 +1,6 @@
1
1
  import { pathToFileURL } from 'node:url';
2
2
  import path from 'path';
3
+ import { normalizePath } from 'vite';
3
4
  import { filterActivePluginInfo } from './utils/get-active-plugin-info.js';
4
5
  import { getConfigLoaderApi } from './vite-plugin-config-loader.js';
5
6
  const virtualModuleId = 'virtual:dashboard-extensions';
@@ -17,13 +18,29 @@ export function dashboardMetadataPlugin() {
17
18
  configResolved({ plugins }) {
18
19
  configLoaderApi = getConfigLoaderApi(plugins);
19
20
  },
21
+ configureServer(server) {
22
+ var _a;
23
+ // Extensions load via dynamic `import()`, which Vite's cold-start crawl
24
+ // skips, so their deps would otherwise be found after the app boots.
25
+ // Wait for `listening`: the config loads in `buildStart`, before the deps
26
+ // optimizer is initialized. Not applied in middleware mode (no httpServer).
27
+ (_a = server.httpServer) === null || _a === void 0 ? void 0 : _a.once('listening', () => {
28
+ void configLoaderApi.getVendureConfig().then(result => {
29
+ if (!result) {
30
+ return;
31
+ }
32
+ for (const extension of getExtensionEntryPaths(result)) {
33
+ void server.environments.client.warmupRequest(fileToServerUrl(extension, server.config.root));
34
+ }
35
+ });
36
+ });
37
+ },
20
38
  resolveId(id) {
21
39
  if (id === virtualModuleId) {
22
40
  return resolvedVirtualModuleId;
23
41
  }
24
42
  },
25
43
  async load(id) {
26
- var _a;
27
44
  if (id === resolvedVirtualModuleId) {
28
45
  const startTime = Date.now();
29
46
  this.debug('Loading dashboard extensions...');
@@ -32,21 +49,9 @@ export function dashboardMetadataPlugin() {
32
49
  loadVendureConfigResult = await configLoaderApi.getVendureConfig();
33
50
  this.debug(`Loaded Vendure config in ${Date.now() - configStart}ms`);
34
51
  }
35
- const { pluginInfo, vendureConfig } = loadVendureConfigResult;
36
- const activePluginInfo = filterActivePluginInfo(pluginInfo, vendureConfig);
37
52
  const resolveStart = Date.now();
38
- const pluginsWithExtensions = (_a = activePluginInfo === null || activePluginInfo === void 0 ? void 0 : activePluginInfo.map(({ dashboardEntryPath, pluginPath, sourcePluginPath }) => {
39
- if (!dashboardEntryPath) {
40
- return null;
41
- }
42
- // For local plugins, use the sourcePluginPath to resolve the dashboard extension
43
- const basePath = sourcePluginPath
44
- ? path.dirname(sourcePluginPath)
45
- : path.dirname(pluginPath);
46
- const resolved = path.resolve(basePath, dashboardEntryPath);
47
- this.debug(`Resolved extension path: ${resolved}`);
48
- return resolved;
49
- }).filter(x => x != null)) !== null && _a !== void 0 ? _a : [];
53
+ const pluginsWithExtensions = getExtensionEntryPaths(loadVendureConfigResult);
54
+ pluginsWithExtensions.forEach(resolved => this.debug(`Resolved extension path: ${resolved}`));
50
55
  this.info(`Found ${pluginsWithExtensions.length} Dashboard extensions in ${Date.now() - resolveStart}ms`);
51
56
  this.debug(`Total dashboard extension loading completed in ${Date.now() - startTime}ms`);
52
57
  return `
@@ -61,3 +66,30 @@ export function dashboardMetadataPlugin() {
61
66
  },
62
67
  };
63
68
  }
69
+ /**
70
+ * Returns the absolute paths of the dashboard extension entry files of all
71
+ * plugins that are active in the Vendure config.
72
+ */
73
+ function getExtensionEntryPaths({ pluginInfo, vendureConfig }) {
74
+ var _a, _b;
75
+ return ((_b = (_a = filterActivePluginInfo(pluginInfo, vendureConfig)) === null || _a === void 0 ? void 0 : _a.map(({ dashboardEntryPath, pluginPath, sourcePluginPath }) => {
76
+ if (!dashboardEntryPath) {
77
+ return null;
78
+ }
79
+ // For local plugins, use the sourcePluginPath to resolve the dashboard extension
80
+ const basePath = sourcePluginPath ? path.dirname(sourcePluginPath) : path.dirname(pluginPath);
81
+ return path.resolve(basePath, dashboardEntryPath);
82
+ }).filter(x => x != null)) !== null && _b !== void 0 ? _b : []);
83
+ }
84
+ /**
85
+ * Converts an absolute file path to the URL the Vite dev server serves it at:
86
+ * root-relative inside the root, `/@fs/` otherwise.
87
+ */
88
+ function fileToServerUrl(file, root) {
89
+ const relative = path.relative(root, file);
90
+ if (!relative.startsWith('..') && !path.isAbsolute(relative)) {
91
+ return `/${normalizePath(relative)}`;
92
+ }
93
+ const normalized = normalizePath(file);
94
+ return `/@fs${normalized.startsWith('/') ? '' : '/'}${normalized}`;
95
+ }
@@ -153,7 +153,6 @@ export type VitePluginVendureDashboardOptions = {
153
153
  bundleEntry?: boolean;
154
154
  adminApiSchema?: boolean;
155
155
  dashboardMetadata?: boolean;
156
- platformPromotion?: boolean;
157
156
  uiConfig?: boolean;
158
157
  gqlTada?: boolean;
159
158
  transformIndexHtml?: boolean;
@@ -16,7 +16,6 @@ import { dashboardMetadataPlugin } from './vite-plugin-dashboard-metadata.js';
16
16
  import { gqlTadaPlugin } from './vite-plugin-gql-tada.js';
17
17
  import { hmrPlugin } from './vite-plugin-hmr.js';
18
18
  import { linguiBabelPlugin } from './vite-plugin-lingui-babel.js';
19
- import { platformPromotionPlugin } from './vite-plugin-platform-promotion.js';
20
19
  import { dashboardTailwindSourcePlugin } from './vite-plugin-tailwind-source.js';
21
20
  import { themeVariablesPlugin } from './vite-plugin-theme.js';
22
21
  import { transformIndexHtmlPlugin } from './vite-plugin-transform-index.js';
@@ -127,10 +126,6 @@ export function vendureDashboardPlugin(options) {
127
126
  key: 'dashboardMetadata',
128
127
  plugin: () => dashboardMetadataPlugin(),
129
128
  },
130
- {
131
- key: 'platformPromotion',
132
- plugin: () => platformPromotionPlugin(),
133
- },
134
129
  {
135
130
  key: 'uiConfig',
136
131
  plugin: () => uiConfigPlugin(options),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vendure/dashboard",
3
3
  "private": false,
4
- "version": "3.8.1-master-202610220213",
4
+ "version": "3.8.1",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -139,8 +139,8 @@
139
139
  "@storybook/react-vite": "^10.3.1",
140
140
  "@types/node": "^22.19.0",
141
141
  "@vendure-io/design-lint": "^1.0.0",
142
- "@vendure/common": "^3.8.1-master-202610220213",
143
- "@vendure/core": "^3.8.1-master-202610220213",
142
+ "@vendure/common": "3.8.1",
143
+ "@vendure/core": "3.8.1",
144
144
  "@vitest/browser": "^3.2.4",
145
145
  "@vitest/coverage-v8": "^3.2.4",
146
146
  "eslint": "^9.39.0",
@@ -7272,6 +7272,10 @@ msgstr "إضافة دفع إلى الطلب"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "جارٍ التحميل..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "أنشئ متغيرات لتركيبات الخيارات غير الموجودة بعد. التركيبات الموجودة بالفعل معروضة للتوضيح ولا يمكن تعديلها."
@@ -7309,6 +7309,10 @@ msgstr "Добавете плащане към поръчката"
7309
7309
  #~ msgid "Loading..."
7310
7310
  #~ msgstr "Зареждане..."
7311
7311
 
7312
+ #: src/lib/providers/auth.tsx
7313
+ msgid "You do not have access to any channel"
7314
+ msgstr ""
7315
+
7312
7316
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7313
7317
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7314
7318
  msgstr "Създайте варианти за комбинациите от опции, които все още не съществуват. Комбинациите, които вече съществуват, са показани за контекст и не могат да бъдат редактирани."
@@ -7272,6 +7272,10 @@ msgstr "Přidat platbu k objednávce"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Načítání..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Vytvořte varianty pro kombinace možností, které ještě neexistují. Již existující kombinace jsou zobrazeny pro kontext a nelze je upravovat."
@@ -7272,6 +7272,10 @@ msgstr "Zahlung zur Bestellung hinzufügen"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Lade..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Erstellen Sie Varianten für die Optionskombinationen, die noch nicht existieren. Bereits vorhandene Kombinationen werden zur Übersicht angezeigt und können nicht bearbeitet werden."
@@ -7272,6 +7272,10 @@ msgstr "Add payment to order"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Loading..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr "You do not have access to any channel"
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
@@ -7272,6 +7272,10 @@ msgstr "Agregar pago al pedido"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Cargando..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Cree variantes para las combinaciones de opciones que aún no existen. Las combinaciones que ya existen se muestran como referencia y no se pueden editar."
@@ -7272,6 +7272,10 @@ msgstr "افزودن پرداخت به سفارش"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "در حال بارگذاری..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "برای ترکیب‌های گزینه‌هایی که هنوز وجود ندارند متغیر ایجاد کنید. ترکیب‌های موجود فقط برای مرجع نمایش داده می‌شوند و قابل ویرایش نیستند."
@@ -7272,6 +7272,10 @@ msgstr "Ajouter un paiement à la commande"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Chargement..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Créez des variantes pour les combinaisons d'options qui n'existent pas encore. Les combinaisons déjà existantes sont affichées à titre indicatif et ne peuvent pas être modifiées."
@@ -7272,6 +7272,10 @@ msgstr "הוסף תשלום להזמנה"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "טוען..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "צרו וריאנטים עבור שילובי האפשרויות שעדיין לא קיימים. שילובים שכבר קיימים מוצגים לצורך הקשר ולא ניתן לערוך אותם."
@@ -7272,6 +7272,10 @@ msgstr "Dodaj plaćanje narudžbi"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Učitavanje..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Izradite varijante za kombinacije opcija koje još ne postoje. Kombinacije koje već postoje prikazane su radi konteksta i ne mogu se uređivati."
@@ -7255,6 +7255,10 @@ msgstr "Fizetés hozzáadása a megrendeléshez"
7255
7255
  #~ msgid "Loading..."
7256
7256
  #~ msgstr "Betöltés..."
7257
7257
 
7258
+ #: src/lib/providers/auth.tsx
7259
+ msgid "You do not have access to any channel"
7260
+ msgstr ""
7261
+
7258
7262
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7259
7263
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7260
7264
  msgstr "Hozzon létre variánsokat a még nem létező opciókombinációkhoz. A már létező kombinációk tájékoztatásul jelennek meg, és nem szerkeszthetők."
@@ -7272,6 +7272,10 @@ msgstr "Aggiungi pagamento all'ordine"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Caricamento..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Crea varianti per le combinazioni di opzioni che non esistono ancora. Le combinazioni già esistenti sono mostrate come riferimento e non possono essere modificate."
@@ -7272,6 +7272,10 @@ msgstr "注文に支払いを追加"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "読み込み中..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "まだ存在しないオプションの組み合わせのバリアントを作成します。既に存在する組み合わせは参考として表示され、編集できません。"
@@ -7196,6 +7196,10 @@ msgstr "주문에 결제 추가"
7196
7196
  #~ msgid "Loading..."
7197
7197
  #~ msgstr "로딩 중..."
7198
7198
 
7199
+ #: src/lib/providers/auth.tsx
7200
+ msgid "You do not have access to any channel"
7201
+ msgstr ""
7202
+
7199
7203
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7200
7204
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7201
7205
  msgstr ""
@@ -7272,6 +7272,10 @@ msgstr "Legg til betaling til bestilling"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Laster..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Opprett varianter for alternativkombinasjonene som ikke finnes ennå. Kombinasjoner som allerede finnes vises for kontekst og kan ikke redigeres."
@@ -7272,6 +7272,10 @@ msgstr "अर्डरमा भुक्तानी थप्नुहोस
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "लोड गर्दै..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "अझै अवस्थित नभएका विकल्प संयोजनहरूका लागि भेरियन्टहरू सिर्जना गर्नुहोस्। पहिले नै अवस्थित संयोजनहरू सन्दर्भका लागि देखाइएका छन् र तिनलाई सम्पादन गर्न सकिँदैन।"
@@ -7267,6 +7267,10 @@ msgstr "Betaling toevoegen aan bestelling"
7267
7267
  #~ msgid "Loading..."
7268
7268
  #~ msgstr "Laden..."
7269
7269
 
7270
+ #: src/lib/providers/auth.tsx
7271
+ msgid "You do not have access to any channel"
7272
+ msgstr ""
7273
+
7270
7274
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7271
7275
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7272
7276
  msgstr "Maak varianten voor de optiecombinaties die nog niet bestaan. Combinaties die al bestaan worden ter referentie getoond en kunnen niet worden bewerkt."
@@ -7272,6 +7272,10 @@ msgstr "Dodaj płatność do zamówienia"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Ładowanie..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Utwórz warianty dla kombinacji opcji, które jeszcze nie istnieją. Kombinacje, które już istnieją, są wyświetlane dla kontekstu i nie można ich edytować."
@@ -7272,6 +7272,10 @@ msgstr "Adicionar pagamento ao pedido"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Carregando..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Crie variantes para as combinações de opções que ainda não existem. As combinações que já existem são exibidas como referência e não podem ser editadas."
@@ -7272,6 +7272,10 @@ msgstr "Adicionar pagamento à encomenda"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "A carregar..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Crie variantes para as combinações de opções que ainda não existem. As combinações já existentes são apresentadas como referência e não podem ser editadas."
@@ -7068,6 +7068,10 @@ msgstr "Adaugă plată la comandă"
7068
7068
  #~ msgid "Loading..."
7069
7069
  #~ msgstr "Se încarcă..."
7070
7070
 
7071
+ #: src/lib/providers/auth.tsx
7072
+ msgid "You do not have access to any channel"
7073
+ msgstr ""
7074
+
7071
7075
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7072
7076
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7073
7077
  msgstr "Creați variante pentru combinațiile de opțiuni care nu există încă. Combinațiile care există deja sunt afișate pentru context și nu pot fi editate."
@@ -7272,6 +7272,10 @@ msgstr "Добавить платёж к заказу"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Загрузка..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Создайте варианты для комбинаций опций, которых ещё нет. Уже существующие комбинации показаны для справки и не могут быть изменены."
@@ -7272,6 +7272,10 @@ msgstr "Lägg till betalning till beställning"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Laddar..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Skapa varianter för de alternativkombinationer som inte finns ännu. Kombinationer som redan finns visas som referens och kan inte redigeras."
@@ -7272,6 +7272,10 @@ msgstr "Siparişe ödeme ekle"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Yükleniyor..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Henüz mevcut olmayan seçenek kombinasyonları için varyantlar oluşturun. Zaten mevcut olan kombinasyonlar bilgi amaçlı gösterilir ve düzenlenemez."
@@ -7272,6 +7272,10 @@ msgstr "Додати платіж до замовлення"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "Завантаження..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "Створіть варіанти для комбінацій опцій, яких ще не існує. Комбінації, що вже існують, показані для контексту та не можуть бути відредаговані."
@@ -7068,6 +7068,10 @@ msgstr "Buyurtmaga to'lov qo'shish"
7068
7068
  #~ msgid "Loading..."
7069
7069
  #~ msgstr "Yuklanmoqda..."
7070
7070
 
7071
+ #: src/lib/providers/auth.tsx
7072
+ msgid "You do not have access to any channel"
7073
+ msgstr ""
7074
+
7071
7075
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7072
7076
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7073
7077
  msgstr "Hali mavjud bo‘lmagan tanlov kombinatsiyalari uchun variantlar yarating. Allaqachon mavjud kombinatsiyalar ma’lumot uchun ko‘rsatilgan va ularni tahrirlab bo‘lmaydi."
@@ -7272,6 +7272,10 @@ msgstr "向订单添加支付"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "正在加载..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "为尚不存在的选项组合创建变体。已存在的组合仅供参考显示,无法编辑。"
@@ -7272,6 +7272,10 @@ msgstr "向訂單新增付款"
7272
7272
  #~ msgid "Loading..."
7273
7273
  #~ msgstr "正在載入..."
7274
7274
 
7275
+ #: src/lib/providers/auth.tsx
7276
+ msgid "You do not have access to any channel"
7277
+ msgstr ""
7278
+
7275
7279
  #: src/app/routes/_authenticated/_products/components/generate-missing-variants-dialog.tsx
7276
7280
  msgid "Create variants for the option combinations that don't exist yet. Combinations that already exist are shown for context and can't be edited."
7277
7281
  msgstr "為尚不存在的選項組合建立變體。已存在的組合僅供參考顯示,無法編輯。"
@@ -1,4 +1,5 @@
1
1
  import { Page, PageBlock, PageLayout, PageTitle } from '@/vdb/framework/layout-engine/page-layout.js';
2
+ import { isForbiddenError } from '@/vdb/utils/is-forbidden-error.js';
2
3
  import { Trans } from '@lingui/react/macro';
3
4
  import { Link, useRouter } from '@tanstack/react-router';
4
5
  import { Button } from '../ui/button.js';
@@ -29,8 +30,7 @@ export function getErrorKind(error: unknown): ErrorKind {
29
30
  if (error instanceof NotFoundError) {
30
31
  return 'not-found';
31
32
  }
32
- const code = (error as any)?.extensions?.code;
33
- if (code === 'FORBIDDEN' || code === 'UNAUTHORIZED') {
33
+ if (isForbiddenError(error)) {
34
34
  return 'forbidden';
35
35
  }
36
36
  const status = (error as any)?.response?.status;