@acmekit/dashboard 2.13.7 → 2.13.9

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 (83) hide show
  1. package/dist/api-key-management-create-VWUERPPB.mjs +170 -0
  2. package/dist/api-key-management-detail-V4ENQHYY.mjs +306 -0
  3. package/dist/api-key-management-edit-R44OHS7B.mjs +106 -0
  4. package/dist/api-key-management-list-K2XPKF5E.mjs +400 -0
  5. package/dist/app.js +16765 -1370
  6. package/dist/app.mjs +786 -1030
  7. package/dist/chunk-22YYMH6M.mjs +382 -0
  8. package/dist/chunk-2U3RK3JG.mjs +474 -0
  9. package/dist/chunk-535OVBXR.mjs +226 -0
  10. package/dist/chunk-774WSTCC.mjs +19 -0
  11. package/dist/chunk-C76H5USB.mjs +16 -0
  12. package/dist/chunk-DFFLVEZ5.mjs +40 -0
  13. package/dist/chunk-DN3MIYQH.mjs +140 -0
  14. package/dist/chunk-DQCEH3X2.mjs +28 -0
  15. package/dist/chunk-DTY37DDZ.mjs +20 -0
  16. package/dist/chunk-EFRMWHRX.mjs +84 -0
  17. package/dist/chunk-FXYH54JP.mjs +16 -0
  18. package/dist/chunk-G22WWLPG.mjs +44 -0
  19. package/dist/chunk-G2VJOHHV.mjs +32 -0
  20. package/dist/chunk-GBFVWROS.mjs +58 -0
  21. package/dist/chunk-ITNQKZQQ.mjs +142 -0
  22. package/dist/chunk-IUCDCPJU.mjs +0 -0
  23. package/dist/chunk-LKWTBYYC.mjs +35 -0
  24. package/dist/{chunk-4VYJHIB3.mjs → chunk-ND3ODI36.mjs} +0 -72
  25. package/dist/chunk-OAHCJFG3.mjs +17 -0
  26. package/dist/chunk-RPAL6FHW.mjs +73 -0
  27. package/dist/{chunk-JSJZMTQG.mjs → chunk-RREPQMYC.mjs} +14 -41
  28. package/dist/chunk-S3REQHPQ.mjs +86 -0
  29. package/dist/chunk-S4DMV3ZT.mjs +35 -0
  30. package/dist/chunk-ST2YB7JN.mjs +74 -0
  31. package/dist/chunk-TCNCAWYD.mjs +9 -0
  32. package/dist/chunk-ULSPL3DR.mjs +126 -0
  33. package/dist/chunk-WILMJYUB.mjs +35 -0
  34. package/dist/chunk-XIM7X4FB.mjs +83 -0
  35. package/dist/chunk-YLPAZ2DP.mjs +1837 -0
  36. package/dist/chunk-YRWSG3YM.mjs +80 -0
  37. package/dist/{invite-S5USGDOZ.mjs → invite-XGPZZBUP.mjs} +15 -7
  38. package/dist/{login-AIMR26AL.mjs → login-GNP3QIPI.mjs} +25 -12
  39. package/dist/profile-detail-YX27F7N6.mjs +96 -0
  40. package/dist/profile-edit-2VRDU75O.mjs +173 -0
  41. package/dist/{reset-password-UQPRHMB3.mjs → reset-password-TWRNZO6Z.mjs} +7 -3
  42. package/dist/settings-3XWLL5LG.mjs +545 -0
  43. package/dist/translation-list-CCEQJNED.mjs +581 -0
  44. package/dist/translations-edit-E57GVUFV.mjs +5376 -0
  45. package/dist/user-detail-KUSRRVNX.mjs +169 -0
  46. package/dist/user-edit-HTN3ZGCL.mjs +114 -0
  47. package/dist/user-invite-E3FAAU3V.mjs +361 -0
  48. package/dist/user-list-KNJ5S3IM.mjs +1116 -0
  49. package/dist/user-metadata-5GQK75DT.mjs +425 -0
  50. package/dist/workflow-execution-detail-LZXCRVNC.mjs +819 -0
  51. package/dist/workflow-execution-list-HQ3V6TML.mjs +175 -0
  52. package/package.json +9 -9
  53. package/src/components/layout/settings-layout/settings-layout.tsx +8 -2
  54. package/src/dashboard-app/routes/get-route.map.tsx +1 -14
  55. package/src/hooks/api/api-keys.tsx +0 -49
  56. package/src/hooks/api/index.ts +0 -1
  57. package/src/providers/keybind-provider/hooks.tsx +0 -145
  58. package/src/routes/translations/translation-list/translation-list.tsx +10 -21
  59. package/src/routes/translations/translations-edit/translations-edit.tsx +14 -11
  60. package/src/vite-env.d.ts +3 -1
  61. package/dist/chunk-FBTP4AJM.mjs +0 -221
  62. package/dist/chunk-QYOO4QR6.mjs +0 -73
  63. package/src/components/data-table/helpers/sales-channels/index.ts +0 -4
  64. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.tsx +0 -61
  65. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.tsx +0 -22
  66. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.tsx +0 -33
  67. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-query.tsx +0 -30
  68. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +0 -206
  69. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +0 -1
  70. package/src/routes/store/common/hooks/use-currencies-table-columns.tsx +0 -29
  71. package/src/routes/store/common/hooks/use-currencies-table-query.tsx +0 -21
  72. package/src/routes/store/common/hooks/use-locales-table-columns.tsx +0 -29
  73. package/src/routes/store/common/hooks/use-locales-table-query.tsx +0 -21
  74. package/src/routes/store/store-detail/components/store-general-section/index.ts +0 -1
  75. package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +0 -48
  76. package/src/routes/store/store-detail/index.ts +0 -2
  77. package/src/routes/store/store-detail/loader.ts +0 -18
  78. package/src/routes/store/store-detail/store-detail.tsx +0 -42
  79. package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +0 -83
  80. package/src/routes/store/store-edit/index.ts +0 -1
  81. package/src/routes/store/store-edit/store-edit.tsx +0 -25
  82. package/src/routes/store/store-metadata/index.ts +0 -1
  83. package/src/routes/store/store-metadata/store-metadata.tsx +0 -24
@@ -0,0 +1,175 @@
1
+ import {
2
+ StatusCell
3
+ } from "./chunk-WILMJYUB.mjs";
4
+ import {
5
+ getTransactionState,
6
+ getTransactionStateColor
7
+ } from "./chunk-RPAL6FHW.mjs";
8
+ import {
9
+ _DataTable,
10
+ useDataTable
11
+ } from "./chunk-YLPAZ2DP.mjs";
12
+ import {
13
+ useQueryParams
14
+ } from "./chunk-C76H5USB.mjs";
15
+ import "./chunk-DFFLVEZ5.mjs";
16
+ import "./chunk-535OVBXR.mjs";
17
+ import {
18
+ SingleColumnPage
19
+ } from "./chunk-22YYMH6M.mjs";
20
+ import {
21
+ useExtension
22
+ } from "./chunk-C5P5PL3E.mjs";
23
+ import {
24
+ useWorkflowExecutions
25
+ } from "./chunk-LKWTBYYC.mjs";
26
+ import "./chunk-ITNQKZQQ.mjs";
27
+ import "./chunk-S4DMV3ZT.mjs";
28
+ import "./chunk-774WSTCC.mjs";
29
+ import "./chunk-DTY37DDZ.mjs";
30
+ import "./chunk-QZ7TP4HQ.mjs";
31
+
32
+ // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx
33
+ import { Container, Heading, Text } from "@acmekit/ui";
34
+ import { keepPreviousData } from "@tanstack/react-query";
35
+ import { useTranslation as useTranslation2 } from "react-i18next";
36
+
37
+ // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx
38
+ import { Badge } from "@acmekit/ui";
39
+ import { createColumnHelper } from "@tanstack/react-table";
40
+ import { useMemo } from "react";
41
+ import { useTranslation } from "react-i18next";
42
+ import { jsx } from "react/jsx-runtime";
43
+ var columnHelper = createColumnHelper();
44
+ var useWorkflowExecutionTableColumns = () => {
45
+ const { t } = useTranslation();
46
+ return useMemo(
47
+ () => [
48
+ columnHelper.accessor("transaction_id", {
49
+ header: t("workflowExecutions.transactionIdLabel"),
50
+ cell: ({ getValue }) => /* @__PURE__ */ jsx(Badge, { size: "2xsmall", children: getValue() })
51
+ }),
52
+ columnHelper.accessor("state", {
53
+ header: t("fields.state"),
54
+ cell: ({ getValue }) => {
55
+ const state = getValue();
56
+ const color = getTransactionStateColor(state);
57
+ const translatedState = getTransactionState(t, state);
58
+ return /* @__PURE__ */ jsx(StatusCell, { color, children: /* @__PURE__ */ jsx("span", { className: "capitalize", children: translatedState }) });
59
+ }
60
+ }),
61
+ columnHelper.accessor("execution", {
62
+ header: t("workflowExecutions.progressLabel"),
63
+ cell: ({ getValue }) => {
64
+ const steps = getValue()?.steps;
65
+ if (!steps) {
66
+ return "0 of 0 steps";
67
+ }
68
+ const actionableSteps = Object.values(steps).filter(
69
+ (step) => step.id !== ROOT_PREFIX
70
+ );
71
+ const completedSteps = actionableSteps.filter(
72
+ (step) => step.invoke.state === "done" /* DONE */
73
+ );
74
+ return t("workflowExecutions.stepsCompletedLabel", {
75
+ completed: completedSteps.length,
76
+ count: actionableSteps.length
77
+ });
78
+ }
79
+ })
80
+ ],
81
+ [t]
82
+ );
83
+ };
84
+ var ROOT_PREFIX = "_root";
85
+
86
+ // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx
87
+ var useWorkflowExecutionTableQuery = ({
88
+ pageSize = 20,
89
+ prefix
90
+ }) => {
91
+ const raw = useQueryParams(["q", "offset"], prefix);
92
+ const { offset, ...rest } = raw;
93
+ const searchParams = {
94
+ limit: pageSize,
95
+ offset: offset ? parseInt(offset) : 0,
96
+ ...rest
97
+ };
98
+ return {
99
+ searchParams,
100
+ raw
101
+ };
102
+ };
103
+
104
+ // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx
105
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
106
+ var PAGE_SIZE = 20;
107
+ var WorkflowExecutionListTable = () => {
108
+ const { t } = useTranslation2();
109
+ const { searchParams, raw } = useWorkflowExecutionTableQuery({
110
+ pageSize: PAGE_SIZE
111
+ });
112
+ const { workflow_executions, count, isLoading, isError, error } = useWorkflowExecutions(
113
+ {
114
+ ...searchParams
115
+ },
116
+ {
117
+ placeholderData: keepPreviousData
118
+ }
119
+ );
120
+ const columns = useWorkflowExecutionTableColumns();
121
+ const { table } = useDataTable({
122
+ data: workflow_executions || [],
123
+ columns,
124
+ count,
125
+ pageSize: PAGE_SIZE,
126
+ enablePagination: true,
127
+ getRowId: (row) => row.id
128
+ });
129
+ if (isError) {
130
+ throw error;
131
+ }
132
+ return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
133
+ /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsxs("div", { children: [
134
+ /* @__PURE__ */ jsx2(Heading, { children: t("workflowExecutions.domain") }),
135
+ /* @__PURE__ */ jsx2(Text, { className: "text-ui-fg-subtle", size: "small", children: t(`workflowExecutions.subtitle`) })
136
+ ] }) }),
137
+ /* @__PURE__ */ jsx2(
138
+ _DataTable,
139
+ {
140
+ table,
141
+ columns,
142
+ count,
143
+ isLoading,
144
+ pageSize: PAGE_SIZE,
145
+ navigateTo: (row) => `${row.id}`,
146
+ search: true,
147
+ pagination: true,
148
+ queryObject: raw,
149
+ noRecords: {
150
+ message: t("workflowExecutions.list.noRecordsMessage")
151
+ }
152
+ }
153
+ )
154
+ ] });
155
+ };
156
+
157
+ // src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx
158
+ import { jsx as jsx3 } from "react/jsx-runtime";
159
+ var WorkflowExcecutionList = () => {
160
+ const { getWidgets } = useExtension();
161
+ return /* @__PURE__ */ jsx3(
162
+ SingleColumnPage,
163
+ {
164
+ widgets: {
165
+ after: getWidgets("workflow.list.after"),
166
+ before: getWidgets("workflow.list.before")
167
+ },
168
+ hasOutlet: false,
169
+ children: /* @__PURE__ */ jsx3(WorkflowExecutionListTable, {})
170
+ }
171
+ );
172
+ };
173
+ export {
174
+ WorkflowExcecutionList as Component
175
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acmekit/dashboard",
3
- "version": "2.13.7",
3
+ "version": "2.13.9",
4
4
  "scripts": {
5
5
  "generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
6
6
  "dev": "../../../node_modules/.bin/vite",
@@ -39,10 +39,10 @@
39
39
  "dist"
40
40
  ],
41
41
  "dependencies": {
42
- "@acmekit/admin-shared": "2.13.7",
43
- "@acmekit/icons": "2.13.7",
44
- "@acmekit/js-sdk": "2.13.7",
45
- "@acmekit/ui": "4.1.7",
42
+ "@acmekit/admin-shared": "2.13.9",
43
+ "@acmekit/icons": "2.13.9",
44
+ "@acmekit/js-sdk": "2.13.9",
45
+ "@acmekit/ui": "4.1.9",
46
46
  "@ariakit/react": "^0.4.15",
47
47
  "@babel/runtime": "^7.26.10",
48
48
  "@dnd-kit/core": "^6.1.0",
@@ -80,10 +80,10 @@
80
80
  "zod": "3.25.76"
81
81
  },
82
82
  "devDependencies": {
83
- "@acmekit/admin-shared": "2.13.7",
84
- "@acmekit/admin-vite-plugin": "2.13.7",
85
- "@acmekit/types": "2.13.7",
86
- "@acmekit/ui-preset": "2.13.7"
83
+ "@acmekit/admin-shared": "2.13.9",
84
+ "@acmekit/admin-vite-plugin": "2.13.9",
85
+ "@acmekit/types": "2.13.9",
86
+ "@acmekit/ui-preset": "2.13.9"
87
87
  },
88
88
  "packageManager": "yarn@3.2.1"
89
89
  }
@@ -39,8 +39,14 @@ const useDeveloperRoutes = (): INavItem[] => {
39
39
  const { t } = useTranslation()
40
40
  return useMemo(
41
41
  () => [
42
- { label: t("apiKeyManagement.domain.publishable"), to: "/settings/publishable-api-keys" },
43
- { label: t("apiKeyManagement.domain.secret"), to: "/settings/secret-api-keys" },
42
+ {
43
+ label: t("apiKeyManagement.domain.publishable"),
44
+ to: "/settings/publishable-api-keys",
45
+ },
46
+ {
47
+ label: t("apiKeyManagement.domain.secret"),
48
+ to: "/settings/secret-api-keys",
49
+ },
44
50
  { label: t("workflowExecutions.domain"), to: "/settings/workflows" },
45
51
  ],
46
52
  [t]
@@ -18,7 +18,7 @@ function mergeSettingsRouteChildren(
18
18
  .flatMap((r) => r.children ?? [])
19
19
  }
20
20
 
21
- /** Default framework settings routes (profile, store, users, api-keys, workflows, translations). */
21
+ /** Default framework settings routes (profile, users, api-keys, workflows, translations). */
22
22
  const defaultSettingsRouteChildren: RouteObject[] = [
23
23
  {
24
24
  path: "profile",
@@ -32,19 +32,6 @@ const defaultSettingsRouteChildren: RouteObject[] = [
32
32
  },
33
33
  ],
34
34
  },
35
- {
36
- path: "store",
37
- errorElement: <ErrorBoundary />,
38
- lazy: () => import("../../routes/store/store-detail"),
39
- handle: { breadcrumb: () => t("store.domain") },
40
- children: [
41
- { path: "edit", lazy: () => import("../../routes/store/store-edit") },
42
- {
43
- path: "metadata/edit",
44
- lazy: () => import("../../routes/store/store-metadata"),
45
- },
46
- ],
47
- },
48
35
  {
49
36
  path: "users",
50
37
  errorElement: <ErrorBoundary />,
@@ -11,7 +11,6 @@ import {
11
11
  import { sdk } from "../../lib/client"
12
12
  import { queryClient } from "../../lib/query-client"
13
13
  import { queryKeysFactory } from "../../lib/query-key-factory"
14
- import { salesChannelsQueryKeys } from "./sales-channels"
15
14
 
16
15
  const API_KEYS_QUERY_KEY = "api_keys" as const
17
16
  export const apiKeysQueryKeys = queryKeysFactory(API_KEYS_QUERY_KEY)
@@ -129,51 +128,3 @@ export const useDeleteApiKey = (
129
128
  },
130
129
  })
131
130
  }
132
-
133
- export const useBatchRemoveSalesChannelsFromApiKey = (
134
- id: string,
135
- options?: UseMutationOptions<
136
- HttpTypes.AdminApiKeyResponse,
137
- FetchError,
138
- HttpTypes.AdminBatchLink["remove"]
139
- >
140
- ) => {
141
- return useMutation({
142
- mutationFn: (payload) =>
143
- sdk.admin.apiKey.batchSalesChannels(id, { remove: payload }),
144
- onSuccess: (data, variables, context) => {
145
- queryClient.invalidateQueries({ queryKey: apiKeysQueryKeys.lists() })
146
- queryClient.invalidateQueries({ queryKey: apiKeysQueryKeys.detail(id) })
147
- queryClient.invalidateQueries({
148
- queryKey: salesChannelsQueryKeys.lists(),
149
- })
150
-
151
- options?.onSuccess?.(data, variables, context)
152
- },
153
- ...options,
154
- })
155
- }
156
-
157
- export const useBatchAddSalesChannelsToApiKey = (
158
- id: string,
159
- options?: UseMutationOptions<
160
- HttpTypes.AdminApiKeyResponse,
161
- FetchError,
162
- HttpTypes.AdminBatchLink["add"]
163
- >
164
- ) => {
165
- return useMutation({
166
- mutationFn: (payload) =>
167
- sdk.admin.apiKey.batchSalesChannels(id, { add: payload }),
168
- onSuccess: (data, variables, context) => {
169
- queryClient.invalidateQueries({ queryKey: apiKeysQueryKeys.lists() })
170
- queryClient.invalidateQueries({ queryKey: apiKeysQueryKeys.detail(id) })
171
- queryClient.invalidateQueries({
172
- queryKey: salesChannelsQueryKeys.lists(),
173
- })
174
-
175
- options?.onSuccess?.(data, variables, context)
176
- },
177
- ...options,
178
- })
179
- }
@@ -6,7 +6,6 @@ export * from "./invites"
6
6
  export * from "./locales"
7
7
  export * from "./notification"
8
8
  export * from "./plugins"
9
- export * from "./store"
10
9
  export * from "./translations"
11
10
  export * from "./users"
12
11
  export * from "./views"
@@ -110,95 +110,6 @@ export const useGlobalShortcuts = () => {
110
110
  }
111
111
 
112
112
  const globalShortcuts: Shortcut[] = [
113
- // Pages
114
- {
115
- keys: {
116
- Mac: ["G", "O"],
117
- },
118
- label: t("app.keyboardShortcuts.navigation.goToOrders"),
119
- type: "pageShortcut",
120
- to: "/orders",
121
- },
122
- {
123
- keys: {
124
- Mac: ["G", "P"],
125
- },
126
- label: t("app.keyboardShortcuts.navigation.goToProducts"),
127
- type: "pageShortcut",
128
- to: "/products",
129
- },
130
- {
131
- keys: {
132
- Mac: ["G", "C"],
133
- },
134
- label: t("app.keyboardShortcuts.navigation.goToCollections"),
135
- type: "pageShortcut",
136
- to: "/collections",
137
- },
138
- {
139
- keys: {
140
- Mac: ["G", "A"],
141
- },
142
- label: t("app.keyboardShortcuts.navigation.goToCategories"),
143
- type: "pageShortcut",
144
- to: "/categories",
145
- },
146
- {
147
- keys: {
148
- Mac: ["G", "U"],
149
- },
150
- label: t("app.keyboardShortcuts.navigation.goToCustomers"),
151
- type: "pageShortcut",
152
- to: "/customers",
153
- },
154
- {
155
- keys: {
156
- Mac: ["G", "G"],
157
- },
158
- label: t("app.keyboardShortcuts.navigation.goToCustomerGroups"),
159
- type: "pageShortcut",
160
- to: "/customer-groups",
161
- },
162
- {
163
- keys: {
164
- Mac: ["G", "I"],
165
- },
166
- label: t("app.keyboardShortcuts.navigation.goToInventory"),
167
- type: "pageShortcut",
168
- to: "/inventory",
169
- },
170
- {
171
- keys: {
172
- Mac: ["G", "R"],
173
- },
174
- label: t("app.keyboardShortcuts.navigation.goToReservations"),
175
- type: "pageShortcut",
176
- to: "/reservations",
177
- },
178
- {
179
- keys: {
180
- Mac: ["G", "L"],
181
- },
182
- label: t("app.keyboardShortcuts.navigation.goToPriceLists"),
183
- type: "pageShortcut",
184
- to: "/price-lists",
185
- },
186
- {
187
- keys: {
188
- Mac: ["G", "M"],
189
- },
190
- label: t("app.keyboardShortcuts.navigation.goToPromotions"),
191
- type: "pageShortcut",
192
- to: "/promotions",
193
- },
194
- {
195
- keys: {
196
- Mac: ["G", "K"],
197
- },
198
- label: t("app.keyboardShortcuts.navigation.goToCampaigns"),
199
- type: "pageShortcut",
200
- to: "/campaigns",
201
- },
202
113
  // Settings
203
114
  {
204
115
  keys: {
@@ -208,14 +119,6 @@ export const useGlobalShortcuts = () => {
208
119
  type: "settingShortcut",
209
120
  to: "/settings",
210
121
  },
211
- {
212
- keys: {
213
- Mac: ["G", ",", "S"],
214
- },
215
- label: t("app.keyboardShortcuts.settings.goToStore"),
216
- type: "settingShortcut",
217
- to: "/settings/store",
218
- },
219
122
  {
220
123
  keys: {
221
124
  Mac: ["G", ",", "U"],
@@ -224,54 +127,6 @@ export const useGlobalShortcuts = () => {
224
127
  type: "settingShortcut",
225
128
  to: "/settings/users",
226
129
  },
227
- {
228
- keys: {
229
- Mac: ["G", ",", "R"],
230
- },
231
- label: t("app.keyboardShortcuts.settings.goToRegions"),
232
- type: "settingShortcut",
233
- to: "/settings/regions",
234
- },
235
- {
236
- keys: {
237
- Mac: ["G", ",", "T"],
238
- },
239
- label: t("app.keyboardShortcuts.settings.goToTaxRegions"),
240
- type: "settingShortcut",
241
- to: "/settings/tax-regions",
242
- },
243
- {
244
- keys: {
245
- Mac: ["G", ",", "A"],
246
- },
247
- label: t("app.keyboardShortcuts.settings.goToSalesChannels"),
248
- type: "settingShortcut",
249
- to: "/settings/sales-channels",
250
- },
251
- {
252
- keys: {
253
- Mac: ["G", ",", "P"],
254
- },
255
- label: t("app.keyboardShortcuts.settings.goToProductTypes"),
256
- type: "settingShortcut",
257
- to: "/settings/product-types",
258
- },
259
- {
260
- keys: {
261
- Mac: ["G", ",", "L"],
262
- },
263
- label: t("app.keyboardShortcuts.settings.goToLocations"),
264
- type: "settingShortcut",
265
- to: "/settings/locations",
266
- },
267
- {
268
- keys: {
269
- Mac: ["G", ",", "M"],
270
- },
271
- label: t("app.keyboardShortcuts.settings.goToReturnReasons"),
272
- type: "settingShortcut",
273
- to: "/settings/return-reasons",
274
- },
275
130
  {
276
131
  keys: {
277
132
  Mac: ["G", ",", "J"],
@@ -5,7 +5,7 @@ import { useNavigate } from "react-router-dom"
5
5
  import { TwoColumnPageSkeleton } from "../../../components/common/skeleton"
6
6
  import { TwoColumnPage } from "../../../components/layout/pages"
7
7
  import {
8
- useStore,
8
+ useLocales,
9
9
  useTranslationSettings,
10
10
  useTranslationStatistics,
11
11
  } from "../../../hooks/api"
@@ -26,7 +26,9 @@ export const TranslationList = () => {
26
26
  const { t } = useTranslation()
27
27
  const navigate = useNavigate()
28
28
 
29
- const { store, isPending, isError, error } = useStore()
29
+ const { locales: localesList, isPending, isError, error } = useLocales()
30
+ const supportedLocales =
31
+ localesList?.map((l) => ({ locale_code: l.code, locale: l.code })) ?? []
30
32
  const {
31
33
  translation_settings,
32
34
  isPending: isTranslationSettingsPending,
@@ -42,17 +44,12 @@ export const TranslationList = () => {
42
44
  error: translationStatisticsError,
43
45
  } = useTranslationStatistics(
44
46
  {
45
- locales:
46
- store?.supported_locales?.map(
47
- (suportedLocale) => suportedLocale.locale_code
48
- ) ?? [],
47
+ locales: supportedLocales.map((l) => l.locale_code),
49
48
  entity_types: Object.keys(translation_settings ?? {}),
50
49
  },
51
50
  {
52
51
  enabled:
53
- !!translation_settings &&
54
- !!store &&
55
- store.supported_locales?.length > 0,
52
+ !!translation_settings && supportedLocales.length > 0,
56
53
  }
57
54
  )
58
55
 
@@ -60,7 +57,7 @@ export const TranslationList = () => {
60
57
  throw error || translationSettingsError || translationStatisticsError
61
58
  }
62
59
 
63
- const hasLocales = (store?.supported_locales ?? []).length > 0
60
+ const hasLocales = supportedLocales.length > 0
64
61
 
65
62
  const translatableEntities: TranslatableEntity[] = useMemo(() => {
66
63
  if (!translation_settings) {
@@ -104,7 +101,7 @@ export const TranslationList = () => {
104
101
  }, [navigate])
105
102
 
106
103
  const isReady =
107
- !!store &&
104
+ !!localesList &&
108
105
  !isPending &&
109
106
  !isTranslationSettingsPending &&
110
107
  !!translation_settings &&
@@ -168,19 +165,11 @@ export const TranslationList = () => {
168
165
  </TwoColumnPage.Main>
169
166
  <TwoColumnPage.Sidebar>
170
167
  <ActiveLocalesSection
171
- locales={
172
- store?.supported_locales?.map(
173
- (suportedLocale) => suportedLocale.locale
174
- ) ?? []
175
- }
168
+ locales={supportedLocales.map((l) => l.locale)}
176
169
  ></ActiveLocalesSection>
177
170
  <TranslationsCompletionSection
178
171
  statistics={statistics ?? {}}
179
- locales={
180
- store?.supported_locales?.map(
181
- (supportedLocale) => supportedLocale.locale
182
- ) ?? []
183
- }
172
+ locales={supportedLocales.map((l) => l.locale)}
184
173
  />
185
174
  </TwoColumnPage.Sidebar>
186
175
  </TwoColumnPage>
@@ -3,8 +3,8 @@ import { useEffect } from "react"
3
3
  import { useNavigate, useSearchParams } from "react-router-dom"
4
4
  import { RouteFocusModal } from "../../../components/modals"
5
5
  import {
6
+ useLocales,
6
7
  useReferenceTranslations,
7
- useStore,
8
8
  useTranslationSettings,
9
9
  } from "../../../hooks/api"
10
10
  import { useFeatureFlag } from "../../../providers/feature-flag-provider"
@@ -46,11 +46,14 @@ export const TranslationsEdit = () => {
46
46
  placeholderData: keepPreviousData,
47
47
  })
48
48
  const {
49
- store,
50
- isPending: isStorePending,
51
- isError: isStoreError,
52
- error: storeError,
53
- } = useStore()
49
+ locales: localesList,
50
+ isPending: isLocalesPending,
51
+ isError: isLocalesError,
52
+ error: localesError,
53
+ } = useLocales()
54
+
55
+ const availableLocales =
56
+ localesList?.map((l) => ({ locale_code: l.code, locale: l.code })) ?? []
54
57
 
55
58
  const ready =
56
59
  !isPending &&
@@ -58,11 +61,11 @@ export const TranslationsEdit = () => {
58
61
  !!translation_settings &&
59
62
  !isTranslationSettingsPending &&
60
63
  !!references &&
61
- !isStorePending &&
62
- !!store
64
+ !isLocalesPending &&
65
+ !!localesList
63
66
 
64
- if (isError || isStoreError || isTranslationSettingsError) {
65
- throw error || storeError || translationSettingsError
67
+ if (isError || isLocalesError || isTranslationSettingsError) {
68
+ throw error || localesError || translationSettingsError
66
69
  }
67
70
 
68
71
  return (
@@ -72,7 +75,7 @@ export const TranslationsEdit = () => {
72
75
  translations={translations}
73
76
  references={references}
74
77
  entityType={reference!}
75
- availableLocales={store?.supported_locales ?? []}
78
+ availableLocales={availableLocales}
76
79
  translatableFields={translation_settings[reference!]?.fields ?? []}
77
80
  fetchNextPage={fetchNextPage}
78
81
  hasNextPage={hasNextPage}
package/src/vite-env.d.ts CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  interface ImportMetaEnv {
4
4
  readonly VITE_ACMEKIT_ADMIN_BACKEND_URL: string
5
+ readonly VITE_ACMEKIT_FRONTEND_URL: string
6
+ /** @deprecated Use VITE_ACMEKIT_FRONTEND_URL */
5
7
  readonly VITE_ACMEKIT_STOREFRONT_URL: string
6
8
  readonly VITE_ACMEKIT_V2: "true" | "false"
7
9
  }
@@ -14,7 +16,7 @@ interface ImportMeta {
14
16
  }
15
17
 
16
18
  declare const __BACKEND_URL__: string | undefined
17
- declare const __STOREFRONT_URL__: string | undefined
19
+ declare const __FRONTEND_URL__: string | undefined
18
20
  declare const __BASE__: string
19
21
  declare const __AUTH_TYPE__: "session" | "jwt" | undefined
20
22
  declare const __JWT_TOKEN_STORAGE_KEY__: string | undefined