@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.
- package/dist/api-key-management-create-VWUERPPB.mjs +170 -0
- package/dist/api-key-management-detail-V4ENQHYY.mjs +306 -0
- package/dist/api-key-management-edit-R44OHS7B.mjs +106 -0
- package/dist/api-key-management-list-K2XPKF5E.mjs +400 -0
- package/dist/app.js +16765 -1370
- package/dist/app.mjs +786 -1030
- package/dist/chunk-22YYMH6M.mjs +382 -0
- package/dist/chunk-2U3RK3JG.mjs +474 -0
- package/dist/chunk-535OVBXR.mjs +226 -0
- package/dist/chunk-774WSTCC.mjs +19 -0
- package/dist/chunk-C76H5USB.mjs +16 -0
- package/dist/chunk-DFFLVEZ5.mjs +40 -0
- package/dist/chunk-DN3MIYQH.mjs +140 -0
- package/dist/chunk-DQCEH3X2.mjs +28 -0
- package/dist/chunk-DTY37DDZ.mjs +20 -0
- package/dist/chunk-EFRMWHRX.mjs +84 -0
- package/dist/chunk-FXYH54JP.mjs +16 -0
- package/dist/chunk-G22WWLPG.mjs +44 -0
- package/dist/chunk-G2VJOHHV.mjs +32 -0
- package/dist/chunk-GBFVWROS.mjs +58 -0
- package/dist/chunk-ITNQKZQQ.mjs +142 -0
- package/dist/chunk-IUCDCPJU.mjs +0 -0
- package/dist/chunk-LKWTBYYC.mjs +35 -0
- package/dist/{chunk-4VYJHIB3.mjs → chunk-ND3ODI36.mjs} +0 -72
- package/dist/chunk-OAHCJFG3.mjs +17 -0
- package/dist/chunk-RPAL6FHW.mjs +73 -0
- package/dist/{chunk-JSJZMTQG.mjs → chunk-RREPQMYC.mjs} +14 -41
- package/dist/chunk-S3REQHPQ.mjs +86 -0
- package/dist/chunk-S4DMV3ZT.mjs +35 -0
- package/dist/chunk-ST2YB7JN.mjs +74 -0
- package/dist/chunk-TCNCAWYD.mjs +9 -0
- package/dist/chunk-ULSPL3DR.mjs +126 -0
- package/dist/chunk-WILMJYUB.mjs +35 -0
- package/dist/chunk-XIM7X4FB.mjs +83 -0
- package/dist/chunk-YLPAZ2DP.mjs +1837 -0
- package/dist/chunk-YRWSG3YM.mjs +80 -0
- package/dist/{invite-S5USGDOZ.mjs → invite-XGPZZBUP.mjs} +15 -7
- package/dist/{login-AIMR26AL.mjs → login-GNP3QIPI.mjs} +25 -12
- package/dist/profile-detail-YX27F7N6.mjs +96 -0
- package/dist/profile-edit-2VRDU75O.mjs +173 -0
- package/dist/{reset-password-UQPRHMB3.mjs → reset-password-TWRNZO6Z.mjs} +7 -3
- package/dist/settings-3XWLL5LG.mjs +545 -0
- package/dist/translation-list-CCEQJNED.mjs +581 -0
- package/dist/translations-edit-E57GVUFV.mjs +5376 -0
- package/dist/user-detail-KUSRRVNX.mjs +169 -0
- package/dist/user-edit-HTN3ZGCL.mjs +114 -0
- package/dist/user-invite-E3FAAU3V.mjs +361 -0
- package/dist/user-list-KNJ5S3IM.mjs +1116 -0
- package/dist/user-metadata-5GQK75DT.mjs +425 -0
- package/dist/workflow-execution-detail-LZXCRVNC.mjs +819 -0
- package/dist/workflow-execution-list-HQ3V6TML.mjs +175 -0
- package/package.json +9 -9
- package/src/components/layout/settings-layout/settings-layout.tsx +8 -2
- package/src/dashboard-app/routes/get-route.map.tsx +1 -14
- package/src/hooks/api/api-keys.tsx +0 -49
- package/src/hooks/api/index.ts +0 -1
- package/src/providers/keybind-provider/hooks.tsx +0 -145
- package/src/routes/translations/translation-list/translation-list.tsx +10 -21
- package/src/routes/translations/translations-edit/translations-edit.tsx +14 -11
- package/src/vite-env.d.ts +3 -1
- package/dist/chunk-FBTP4AJM.mjs +0 -221
- package/dist/chunk-QYOO4QR6.mjs +0 -73
- package/src/components/data-table/helpers/sales-channels/index.ts +0 -4
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.tsx +0 -61
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.tsx +0 -22
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.tsx +0 -33
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-query.tsx +0 -30
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +0 -206
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +0 -1
- package/src/routes/store/common/hooks/use-currencies-table-columns.tsx +0 -29
- package/src/routes/store/common/hooks/use-currencies-table-query.tsx +0 -21
- package/src/routes/store/common/hooks/use-locales-table-columns.tsx +0 -29
- package/src/routes/store/common/hooks/use-locales-table-query.tsx +0 -21
- package/src/routes/store/store-detail/components/store-general-section/index.ts +0 -1
- package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +0 -48
- package/src/routes/store/store-detail/index.ts +0 -2
- package/src/routes/store/store-detail/loader.ts +0 -18
- package/src/routes/store/store-detail/store-detail.tsx +0 -42
- package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +0 -83
- package/src/routes/store/store-edit/index.ts +0 -1
- package/src/routes/store/store-edit/store-edit.tsx +0 -25
- package/src/routes/store/store-metadata/index.ts +0 -1
- package/src/routes/store/store-metadata/store-metadata.tsx +0 -24
package/dist/app.mjs
CHANGED
|
@@ -1,24 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
notificationQueryKeys,
|
|
3
|
-
useFeatureFlags,
|
|
4
|
-
useMe,
|
|
5
|
-
useNotifications
|
|
6
|
-
} from "./chunk-FBTP4AJM.mjs";
|
|
7
1
|
import {
|
|
8
2
|
I18n
|
|
9
3
|
} from "./chunk-W3WS3HKB.mjs";
|
|
4
|
+
import {
|
|
5
|
+
FeatureFlagProvider,
|
|
6
|
+
useFeatureFlag
|
|
7
|
+
} from "./chunk-DQCEH3X2.mjs";
|
|
8
|
+
import {
|
|
9
|
+
isFetchError
|
|
10
|
+
} from "./chunk-TCNCAWYD.mjs";
|
|
11
|
+
import {
|
|
12
|
+
languages
|
|
13
|
+
} from "./chunk-535OVBXR.mjs";
|
|
10
14
|
import {
|
|
11
15
|
ExtensionProvider,
|
|
12
16
|
useExtension
|
|
13
17
|
} from "./chunk-C5P5PL3E.mjs";
|
|
14
18
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
ActionMenu
|
|
20
|
+
} from "./chunk-S3REQHPQ.mjs";
|
|
21
|
+
import {
|
|
22
|
+
notificationQueryKeys,
|
|
23
|
+
useNotifications
|
|
24
|
+
} from "./chunk-ST2YB7JN.mjs";
|
|
18
25
|
import {
|
|
19
|
-
sdk,
|
|
20
26
|
useLogout
|
|
21
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GBFVWROS.mjs";
|
|
28
|
+
import "./chunk-EFRMWHRX.mjs";
|
|
29
|
+
import "./chunk-LKWTBYYC.mjs";
|
|
30
|
+
import "./chunk-ULSPL3DR.mjs";
|
|
31
|
+
import "./chunk-DN3MIYQH.mjs";
|
|
32
|
+
import "./chunk-XIM7X4FB.mjs";
|
|
33
|
+
import {
|
|
34
|
+
Skeleton
|
|
35
|
+
} from "./chunk-ITNQKZQQ.mjs";
|
|
36
|
+
import {
|
|
37
|
+
ConditionalTooltip
|
|
38
|
+
} from "./chunk-OAHCJFG3.mjs";
|
|
39
|
+
import {
|
|
40
|
+
useDocumentDirection
|
|
41
|
+
} from "./chunk-S4DMV3ZT.mjs";
|
|
42
|
+
import "./chunk-ND3ODI36.mjs";
|
|
43
|
+
import {
|
|
44
|
+
useMe
|
|
45
|
+
} from "./chunk-YRWSG3YM.mjs";
|
|
46
|
+
import {
|
|
47
|
+
queryClient
|
|
48
|
+
} from "./chunk-FXYH54JP.mjs";
|
|
49
|
+
import "./chunk-774WSTCC.mjs";
|
|
50
|
+
import {
|
|
51
|
+
sdk
|
|
52
|
+
} from "./chunk-DTY37DDZ.mjs";
|
|
22
53
|
import {
|
|
23
54
|
__publicField
|
|
24
55
|
} from "./chunk-QZ7TP4HQ.mjs";
|
|
@@ -42,231 +73,6 @@ import { HelmetProvider } from "react-helmet-async";
|
|
|
42
73
|
import { I18nProvider as Provider } from "@acmekit/ui";
|
|
43
74
|
import { useEffect } from "react";
|
|
44
75
|
import { useTranslation } from "react-i18next";
|
|
45
|
-
|
|
46
|
-
// src/i18n/languages.ts
|
|
47
|
-
import {
|
|
48
|
-
ar,
|
|
49
|
-
bg,
|
|
50
|
-
bs,
|
|
51
|
-
cs,
|
|
52
|
-
de,
|
|
53
|
-
el,
|
|
54
|
-
enUS,
|
|
55
|
-
es,
|
|
56
|
-
faIR,
|
|
57
|
-
fr,
|
|
58
|
-
he,
|
|
59
|
-
hu,
|
|
60
|
-
id,
|
|
61
|
-
it,
|
|
62
|
-
ja,
|
|
63
|
-
ko,
|
|
64
|
-
lt,
|
|
65
|
-
mk,
|
|
66
|
-
mn,
|
|
67
|
-
nl,
|
|
68
|
-
pl,
|
|
69
|
-
pt,
|
|
70
|
-
ptBR,
|
|
71
|
-
ro,
|
|
72
|
-
ru,
|
|
73
|
-
th,
|
|
74
|
-
tr,
|
|
75
|
-
uk,
|
|
76
|
-
vi,
|
|
77
|
-
zhCN,
|
|
78
|
-
zhTW
|
|
79
|
-
} from "date-fns/locale";
|
|
80
|
-
var languages = [
|
|
81
|
-
{
|
|
82
|
-
code: "bs",
|
|
83
|
-
display_name: "Bosanski",
|
|
84
|
-
ltr: true,
|
|
85
|
-
date_locale: bs
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
code: "bg",
|
|
89
|
-
display_name: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",
|
|
90
|
-
ltr: true,
|
|
91
|
-
date_locale: bg
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
code: "en",
|
|
95
|
-
display_name: "English",
|
|
96
|
-
ltr: true,
|
|
97
|
-
date_locale: enUS
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
code: "es",
|
|
101
|
-
display_name: "Espa\xF1ol",
|
|
102
|
-
ltr: true,
|
|
103
|
-
date_locale: es
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
code: "el",
|
|
107
|
-
display_name: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",
|
|
108
|
-
ltr: true,
|
|
109
|
-
date_locale: el
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
code: "de",
|
|
113
|
-
display_name: "Deutsch",
|
|
114
|
-
ltr: true,
|
|
115
|
-
date_locale: de
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
code: "fr",
|
|
119
|
-
display_name: "Fran\xE7ais",
|
|
120
|
-
ltr: true,
|
|
121
|
-
date_locale: fr
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
code: "he",
|
|
125
|
-
display_name: "\u05E2\u05D1\u05E8\u05D9\u05EA",
|
|
126
|
-
ltr: false,
|
|
127
|
-
date_locale: he
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
code: "hu",
|
|
131
|
-
display_name: "Magyar",
|
|
132
|
-
ltr: true,
|
|
133
|
-
date_locale: hu
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
code: "it",
|
|
137
|
-
display_name: "Italiano",
|
|
138
|
-
ltr: true,
|
|
139
|
-
date_locale: it
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
code: "ja",
|
|
143
|
-
display_name: "\u65E5\u672C\u8A9E",
|
|
144
|
-
ltr: true,
|
|
145
|
-
date_locale: ja
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
code: "pl",
|
|
149
|
-
display_name: "Polski",
|
|
150
|
-
ltr: true,
|
|
151
|
-
date_locale: pl
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
code: "ptBR",
|
|
155
|
-
display_name: "Portugu\xEAs (Brasil)",
|
|
156
|
-
ltr: true,
|
|
157
|
-
date_locale: ptBR
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
code: "ptPT",
|
|
161
|
-
display_name: "Portugu\xEAs (Portugal)",
|
|
162
|
-
ltr: true,
|
|
163
|
-
date_locale: pt
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
code: "tr",
|
|
167
|
-
display_name: "T\xFCrk\xE7e",
|
|
168
|
-
ltr: true,
|
|
169
|
-
date_locale: tr
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
code: "th",
|
|
173
|
-
display_name: "\u0E44\u0E17\u0E22",
|
|
174
|
-
ltr: true,
|
|
175
|
-
date_locale: th
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
code: "uk",
|
|
179
|
-
display_name: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",
|
|
180
|
-
ltr: true,
|
|
181
|
-
date_locale: uk
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
code: "ro",
|
|
185
|
-
display_name: "Rom\xE2n\u0103",
|
|
186
|
-
ltr: true,
|
|
187
|
-
date_locale: ro
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
code: "mk",
|
|
191
|
-
display_name: "\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438",
|
|
192
|
-
ltr: true,
|
|
193
|
-
date_locale: mk
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
code: "mn",
|
|
197
|
-
display_name: "\u041C\u043E\u043D\u0433\u043E\u043B",
|
|
198
|
-
ltr: true,
|
|
199
|
-
date_locale: mn
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
code: "ar",
|
|
203
|
-
display_name: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629",
|
|
204
|
-
ltr: false,
|
|
205
|
-
date_locale: ar
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
code: "zhCN",
|
|
209
|
-
display_name: "\u7B80\u4F53\u4E2D\u6587",
|
|
210
|
-
ltr: true,
|
|
211
|
-
date_locale: zhCN
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
code: "fa",
|
|
215
|
-
display_name: "\u0641\u0627\u0631\u0633\u06CC",
|
|
216
|
-
ltr: false,
|
|
217
|
-
date_locale: faIR
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
code: "cs",
|
|
221
|
-
display_name: "\u010Ce\u0161tina",
|
|
222
|
-
ltr: true,
|
|
223
|
-
date_locale: cs
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
code: "ru",
|
|
227
|
-
display_name: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439",
|
|
228
|
-
ltr: true,
|
|
229
|
-
date_locale: ru
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
code: "lt",
|
|
233
|
-
display_name: "Lietuvi\u0161kai",
|
|
234
|
-
ltr: true,
|
|
235
|
-
date_locale: lt
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
code: "vi",
|
|
239
|
-
display_name: "Ti\u1EBFng Vi\u1EC7t",
|
|
240
|
-
ltr: true,
|
|
241
|
-
date_locale: vi
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
code: "id",
|
|
245
|
-
display_name: "Bahasa Indonesia",
|
|
246
|
-
ltr: true,
|
|
247
|
-
date_locale: id
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
code: "ko",
|
|
251
|
-
display_name: "\uD55C\uAD6D\uC5B4",
|
|
252
|
-
ltr: true,
|
|
253
|
-
date_locale: ko
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
code: "nl",
|
|
257
|
-
display_name: "Nederlands",
|
|
258
|
-
ltr: true,
|
|
259
|
-
date_locale: nl
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
code: "zhTW",
|
|
263
|
-
display_name: "\u7E41\u9AD4\u4E2D\u6587(\u81FA\u7063)",
|
|
264
|
-
ltr: true,
|
|
265
|
-
date_locale: zhTW
|
|
266
|
-
}
|
|
267
|
-
];
|
|
268
|
-
|
|
269
|
-
// src/providers/i18n-provider/i18n-provider.tsx
|
|
270
76
|
import { jsx } from "react/jsx-runtime";
|
|
271
77
|
var formatLocaleCode = (code) => {
|
|
272
78
|
return code.replace(/([a-z])([A-Z])/g, "$1-$2");
|
|
@@ -353,26 +159,13 @@ var useTheme = () => {
|
|
|
353
159
|
return context;
|
|
354
160
|
};
|
|
355
161
|
|
|
356
|
-
// src/providers/feature-flag-provider/index.tsx
|
|
357
|
-
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
358
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
359
|
-
var FeatureFlagContext = createContext2(null);
|
|
360
|
-
var FeatureFlagProvider = ({ children }) => {
|
|
361
|
-
const { data: flags = {}, isLoading, error } = useFeatureFlags();
|
|
362
|
-
const isFeatureEnabled = (flag) => {
|
|
363
|
-
const enabled = flags[flag] === true;
|
|
364
|
-
return enabled;
|
|
365
|
-
};
|
|
366
|
-
return /* @__PURE__ */ jsx3(FeatureFlagContext.Provider, { value: { flags, isLoading, isFeatureEnabled }, children });
|
|
367
|
-
};
|
|
368
|
-
|
|
369
162
|
// src/providers/providers.tsx
|
|
370
|
-
import { jsx as
|
|
163
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
371
164
|
var Providers = ({ api, children }) => {
|
|
372
|
-
return /* @__PURE__ */
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ jsx3(TooltipProvider, { children: /* @__PURE__ */ jsx3(ExtensionProvider, { api, children: /* @__PURE__ */ jsx3(HelmetProvider, { children: /* @__PURE__ */ jsx3(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx3(ThemeProvider, { children: /* @__PURE__ */ jsxs(FeatureFlagProvider, { children: [
|
|
166
|
+
/* @__PURE__ */ jsx3(I18n, {}),
|
|
167
|
+
/* @__PURE__ */ jsx3(I18nProvider, { children }),
|
|
168
|
+
/* @__PURE__ */ jsx3(Toaster, {})
|
|
376
169
|
] }) }) }) }) }) });
|
|
377
170
|
};
|
|
378
171
|
|
|
@@ -93082,23 +92875,24 @@ var translations_default = {
|
|
|
93082
92875
|
|
|
93083
92876
|
// src/dashboard-app/routes/get-route.map.tsx
|
|
93084
92877
|
import { t } from "i18next";
|
|
92878
|
+
import { Outlet as Outlet4 } from "react-router-dom";
|
|
93085
92879
|
|
|
93086
92880
|
// src/components/authentication/protected-route/protected-route.tsx
|
|
93087
92881
|
import { Spinner as Spinner2 } from "@acmekit/icons";
|
|
93088
92882
|
import { Navigate, Outlet, useLocation as useLocation3 } from "react-router-dom";
|
|
93089
92883
|
|
|
93090
92884
|
// src/providers/search-provider/search-provider.tsx
|
|
93091
|
-
import { useEffect as
|
|
92885
|
+
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
93092
92886
|
|
|
93093
92887
|
// src/components/search/search.tsx
|
|
93094
92888
|
import {
|
|
93095
92889
|
Badge,
|
|
93096
92890
|
Button,
|
|
93097
|
-
clx as
|
|
92891
|
+
clx as clx2,
|
|
93098
92892
|
DropdownMenu,
|
|
93099
92893
|
IconButton,
|
|
93100
92894
|
Kbd,
|
|
93101
|
-
Text
|
|
92895
|
+
Text
|
|
93102
92896
|
} from "@acmekit/ui";
|
|
93103
92897
|
import { Command } from "cmdk";
|
|
93104
92898
|
import { Dialog as RadixDialog } from "radix-ui";
|
|
@@ -93107,11 +92901,11 @@ import {
|
|
|
93107
92901
|
forwardRef,
|
|
93108
92902
|
Fragment,
|
|
93109
92903
|
useCallback as useCallback4,
|
|
93110
|
-
useEffect as
|
|
92904
|
+
useEffect as useEffect4,
|
|
93111
92905
|
useImperativeHandle,
|
|
93112
92906
|
useMemo as useMemo3,
|
|
93113
92907
|
useRef,
|
|
93114
|
-
useState as
|
|
92908
|
+
useState as useState5
|
|
93115
92909
|
} from "react";
|
|
93116
92910
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
93117
92911
|
import { useLocation, useNavigate as useNavigate2 } from "react-router-dom";
|
|
@@ -93124,46 +92918,29 @@ import {
|
|
|
93124
92918
|
} from "@acmekit/icons";
|
|
93125
92919
|
import { matchSorter } from "match-sorter";
|
|
93126
92920
|
|
|
93127
|
-
// src/components/common/skeleton/skeleton.tsx
|
|
93128
|
-
import { Container, clx } from "@acmekit/ui";
|
|
93129
|
-
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
93130
|
-
var Skeleton = ({ className, style }) => {
|
|
93131
|
-
return /* @__PURE__ */ jsx5(
|
|
93132
|
-
"div",
|
|
93133
|
-
{
|
|
93134
|
-
"aria-hidden": true,
|
|
93135
|
-
className: clx(
|
|
93136
|
-
"bg-ui-bg-component h-3 w-3 animate-pulse rounded-[4px]",
|
|
93137
|
-
className
|
|
93138
|
-
),
|
|
93139
|
-
style
|
|
93140
|
-
}
|
|
93141
|
-
);
|
|
93142
|
-
};
|
|
93143
|
-
|
|
93144
92921
|
// src/components/common/thumbnail/thumbnail.tsx
|
|
93145
92922
|
import { Photo } from "@acmekit/icons";
|
|
93146
|
-
import { clx
|
|
93147
|
-
import { jsx as
|
|
92923
|
+
import { clx } from "@acmekit/ui";
|
|
92924
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
93148
92925
|
var Thumbnail = ({ src, alt, size = "base" }) => {
|
|
93149
|
-
return /* @__PURE__ */
|
|
92926
|
+
return /* @__PURE__ */ jsx4(
|
|
93150
92927
|
"div",
|
|
93151
92928
|
{
|
|
93152
|
-
className:
|
|
92929
|
+
className: clx(
|
|
93153
92930
|
"bg-ui-bg-component border-ui-border-base flex items-center justify-center overflow-hidden rounded border",
|
|
93154
92931
|
{
|
|
93155
92932
|
"h-8 w-6": size === "base",
|
|
93156
92933
|
"h-5 w-4": size === "small"
|
|
93157
92934
|
}
|
|
93158
92935
|
),
|
|
93159
|
-
children: src ? /* @__PURE__ */
|
|
92936
|
+
children: src ? /* @__PURE__ */ jsx4(
|
|
93160
92937
|
"img",
|
|
93161
92938
|
{
|
|
93162
92939
|
src,
|
|
93163
92940
|
alt,
|
|
93164
92941
|
className: "h-full w-full object-cover object-center"
|
|
93165
92942
|
}
|
|
93166
|
-
) : /* @__PURE__ */
|
|
92943
|
+
) : /* @__PURE__ */ jsx4(Photo, { className: "text-ui-fg-subtle" })
|
|
93167
92944
|
}
|
|
93168
92945
|
);
|
|
93169
92946
|
};
|
|
@@ -93185,13 +92962,13 @@ import { useMemo as useMemo2 } from "react";
|
|
|
93185
92962
|
|
|
93186
92963
|
// src/providers/keybind-provider/hooks.tsx
|
|
93187
92964
|
import { default as debounceFn } from "lodash.debounce";
|
|
93188
|
-
import { useCallback, useContext as
|
|
92965
|
+
import { useCallback, useContext as useContext2, useEffect as useEffect3, useState as useState2 } from "react";
|
|
93189
92966
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
93190
92967
|
import { useNavigate } from "react-router-dom";
|
|
93191
92968
|
|
|
93192
92969
|
// src/providers/keybind-provider/keybind-context.tsx
|
|
93193
|
-
import { createContext as
|
|
93194
|
-
var KeybindContext =
|
|
92970
|
+
import { createContext as createContext2 } from "react";
|
|
92971
|
+
var KeybindContext = createContext2(null);
|
|
93195
92972
|
|
|
93196
92973
|
// src/providers/keybind-provider/utils.ts
|
|
93197
92974
|
var findFirstPlatformMatch = (keys) => {
|
|
@@ -93316,95 +93093,6 @@ var useGlobalShortcuts = () => {
|
|
|
93316
93093
|
});
|
|
93317
93094
|
};
|
|
93318
93095
|
const globalShortcuts = [
|
|
93319
|
-
// Pages
|
|
93320
|
-
{
|
|
93321
|
-
keys: {
|
|
93322
|
-
Mac: ["G", "O"]
|
|
93323
|
-
},
|
|
93324
|
-
label: t2("app.keyboardShortcuts.navigation.goToOrders"),
|
|
93325
|
-
type: "pageShortcut",
|
|
93326
|
-
to: "/orders"
|
|
93327
|
-
},
|
|
93328
|
-
{
|
|
93329
|
-
keys: {
|
|
93330
|
-
Mac: ["G", "P"]
|
|
93331
|
-
},
|
|
93332
|
-
label: t2("app.keyboardShortcuts.navigation.goToProducts"),
|
|
93333
|
-
type: "pageShortcut",
|
|
93334
|
-
to: "/products"
|
|
93335
|
-
},
|
|
93336
|
-
{
|
|
93337
|
-
keys: {
|
|
93338
|
-
Mac: ["G", "C"]
|
|
93339
|
-
},
|
|
93340
|
-
label: t2("app.keyboardShortcuts.navigation.goToCollections"),
|
|
93341
|
-
type: "pageShortcut",
|
|
93342
|
-
to: "/collections"
|
|
93343
|
-
},
|
|
93344
|
-
{
|
|
93345
|
-
keys: {
|
|
93346
|
-
Mac: ["G", "A"]
|
|
93347
|
-
},
|
|
93348
|
-
label: t2("app.keyboardShortcuts.navigation.goToCategories"),
|
|
93349
|
-
type: "pageShortcut",
|
|
93350
|
-
to: "/categories"
|
|
93351
|
-
},
|
|
93352
|
-
{
|
|
93353
|
-
keys: {
|
|
93354
|
-
Mac: ["G", "U"]
|
|
93355
|
-
},
|
|
93356
|
-
label: t2("app.keyboardShortcuts.navigation.goToCustomers"),
|
|
93357
|
-
type: "pageShortcut",
|
|
93358
|
-
to: "/customers"
|
|
93359
|
-
},
|
|
93360
|
-
{
|
|
93361
|
-
keys: {
|
|
93362
|
-
Mac: ["G", "G"]
|
|
93363
|
-
},
|
|
93364
|
-
label: t2("app.keyboardShortcuts.navigation.goToCustomerGroups"),
|
|
93365
|
-
type: "pageShortcut",
|
|
93366
|
-
to: "/customer-groups"
|
|
93367
|
-
},
|
|
93368
|
-
{
|
|
93369
|
-
keys: {
|
|
93370
|
-
Mac: ["G", "I"]
|
|
93371
|
-
},
|
|
93372
|
-
label: t2("app.keyboardShortcuts.navigation.goToInventory"),
|
|
93373
|
-
type: "pageShortcut",
|
|
93374
|
-
to: "/inventory"
|
|
93375
|
-
},
|
|
93376
|
-
{
|
|
93377
|
-
keys: {
|
|
93378
|
-
Mac: ["G", "R"]
|
|
93379
|
-
},
|
|
93380
|
-
label: t2("app.keyboardShortcuts.navigation.goToReservations"),
|
|
93381
|
-
type: "pageShortcut",
|
|
93382
|
-
to: "/reservations"
|
|
93383
|
-
},
|
|
93384
|
-
{
|
|
93385
|
-
keys: {
|
|
93386
|
-
Mac: ["G", "L"]
|
|
93387
|
-
},
|
|
93388
|
-
label: t2("app.keyboardShortcuts.navigation.goToPriceLists"),
|
|
93389
|
-
type: "pageShortcut",
|
|
93390
|
-
to: "/price-lists"
|
|
93391
|
-
},
|
|
93392
|
-
{
|
|
93393
|
-
keys: {
|
|
93394
|
-
Mac: ["G", "M"]
|
|
93395
|
-
},
|
|
93396
|
-
label: t2("app.keyboardShortcuts.navigation.goToPromotions"),
|
|
93397
|
-
type: "pageShortcut",
|
|
93398
|
-
to: "/promotions"
|
|
93399
|
-
},
|
|
93400
|
-
{
|
|
93401
|
-
keys: {
|
|
93402
|
-
Mac: ["G", "K"]
|
|
93403
|
-
},
|
|
93404
|
-
label: t2("app.keyboardShortcuts.navigation.goToCampaigns"),
|
|
93405
|
-
type: "pageShortcut",
|
|
93406
|
-
to: "/campaigns"
|
|
93407
|
-
},
|
|
93408
93096
|
// Settings
|
|
93409
93097
|
{
|
|
93410
93098
|
keys: {
|
|
@@ -93414,14 +93102,6 @@ var useGlobalShortcuts = () => {
|
|
|
93414
93102
|
type: "settingShortcut",
|
|
93415
93103
|
to: "/settings"
|
|
93416
93104
|
},
|
|
93417
|
-
{
|
|
93418
|
-
keys: {
|
|
93419
|
-
Mac: ["G", ",", "S"]
|
|
93420
|
-
},
|
|
93421
|
-
label: t2("app.keyboardShortcuts.settings.goToStore"),
|
|
93422
|
-
type: "settingShortcut",
|
|
93423
|
-
to: "/settings/store"
|
|
93424
|
-
},
|
|
93425
93105
|
{
|
|
93426
93106
|
keys: {
|
|
93427
93107
|
Mac: ["G", ",", "U"]
|
|
@@ -93430,54 +93110,6 @@ var useGlobalShortcuts = () => {
|
|
|
93430
93110
|
type: "settingShortcut",
|
|
93431
93111
|
to: "/settings/users"
|
|
93432
93112
|
},
|
|
93433
|
-
{
|
|
93434
|
-
keys: {
|
|
93435
|
-
Mac: ["G", ",", "R"]
|
|
93436
|
-
},
|
|
93437
|
-
label: t2("app.keyboardShortcuts.settings.goToRegions"),
|
|
93438
|
-
type: "settingShortcut",
|
|
93439
|
-
to: "/settings/regions"
|
|
93440
|
-
},
|
|
93441
|
-
{
|
|
93442
|
-
keys: {
|
|
93443
|
-
Mac: ["G", ",", "T"]
|
|
93444
|
-
},
|
|
93445
|
-
label: t2("app.keyboardShortcuts.settings.goToTaxRegions"),
|
|
93446
|
-
type: "settingShortcut",
|
|
93447
|
-
to: "/settings/tax-regions"
|
|
93448
|
-
},
|
|
93449
|
-
{
|
|
93450
|
-
keys: {
|
|
93451
|
-
Mac: ["G", ",", "A"]
|
|
93452
|
-
},
|
|
93453
|
-
label: t2("app.keyboardShortcuts.settings.goToSalesChannels"),
|
|
93454
|
-
type: "settingShortcut",
|
|
93455
|
-
to: "/settings/sales-channels"
|
|
93456
|
-
},
|
|
93457
|
-
{
|
|
93458
|
-
keys: {
|
|
93459
|
-
Mac: ["G", ",", "P"]
|
|
93460
|
-
},
|
|
93461
|
-
label: t2("app.keyboardShortcuts.settings.goToProductTypes"),
|
|
93462
|
-
type: "settingShortcut",
|
|
93463
|
-
to: "/settings/product-types"
|
|
93464
|
-
},
|
|
93465
|
-
{
|
|
93466
|
-
keys: {
|
|
93467
|
-
Mac: ["G", ",", "L"]
|
|
93468
|
-
},
|
|
93469
|
-
label: t2("app.keyboardShortcuts.settings.goToLocations"),
|
|
93470
|
-
type: "settingShortcut",
|
|
93471
|
-
to: "/settings/locations"
|
|
93472
|
-
},
|
|
93473
|
-
{
|
|
93474
|
-
keys: {
|
|
93475
|
-
Mac: ["G", ",", "M"]
|
|
93476
|
-
},
|
|
93477
|
-
label: t2("app.keyboardShortcuts.settings.goToReturnReasons"),
|
|
93478
|
-
type: "settingShortcut",
|
|
93479
|
-
to: "/settings/return-reasons"
|
|
93480
|
-
},
|
|
93481
93113
|
{
|
|
93482
93114
|
keys: {
|
|
93483
93115
|
Mac: ["G", ",", "J"]
|
|
@@ -93525,7 +93157,7 @@ var useGlobalShortcuts = () => {
|
|
|
93525
93157
|
|
|
93526
93158
|
// src/providers/keybind-provider/keybind-provider.tsx
|
|
93527
93159
|
import { useCallback as useCallback2, useMemo, useState as useState3 } from "react";
|
|
93528
|
-
import { jsx as
|
|
93160
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
93529
93161
|
var KeybindProvider = ({
|
|
93530
93162
|
shortcuts,
|
|
93531
93163
|
debounce = 500,
|
|
@@ -93560,7 +93192,7 @@ var KeybindProvider = ({
|
|
|
93560
93192
|
}),
|
|
93561
93193
|
[storeShortcuts, registerShortcut, getKeysByPlatform]
|
|
93562
93194
|
);
|
|
93563
|
-
return /* @__PURE__ */
|
|
93195
|
+
return /* @__PURE__ */ jsx5(KeybindContext.Provider, { value: commandsContext, children });
|
|
93564
93196
|
};
|
|
93565
93197
|
|
|
93566
93198
|
// src/components/search/use-search-results.tsx
|
|
@@ -93625,44 +93257,12 @@ var useDynamicSearchResults = (_currentArea, _limit, _q) => {
|
|
|
93625
93257
|
);
|
|
93626
93258
|
};
|
|
93627
93259
|
|
|
93628
|
-
// src/hooks/use-document-direction.tsx
|
|
93629
|
-
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
93630
|
-
var useDocumentDirection = () => {
|
|
93631
|
-
const [direction, setDirection] = useState5(() => {
|
|
93632
|
-
if (typeof document !== "undefined") {
|
|
93633
|
-
return document.documentElement.getAttribute("dir") || void 0;
|
|
93634
|
-
}
|
|
93635
|
-
return void 0;
|
|
93636
|
-
});
|
|
93637
|
-
useEffect4(() => {
|
|
93638
|
-
if (typeof document === "undefined") {
|
|
93639
|
-
return;
|
|
93640
|
-
}
|
|
93641
|
-
const observer = new MutationObserver((mutations) => {
|
|
93642
|
-
mutations.forEach((mutation) => {
|
|
93643
|
-
if (mutation.type === "attributes" && mutation.attributeName === "dir" && mutation.target === document.documentElement) {
|
|
93644
|
-
const newDirection = document.documentElement.getAttribute("dir");
|
|
93645
|
-
setDirection(newDirection || void 0);
|
|
93646
|
-
}
|
|
93647
|
-
});
|
|
93648
|
-
});
|
|
93649
|
-
observer.observe(document.documentElement, {
|
|
93650
|
-
attributes: true,
|
|
93651
|
-
attributeFilter: ["dir"]
|
|
93652
|
-
});
|
|
93653
|
-
return () => {
|
|
93654
|
-
observer.disconnect();
|
|
93655
|
-
};
|
|
93656
|
-
}, []);
|
|
93657
|
-
return direction;
|
|
93658
|
-
};
|
|
93659
|
-
|
|
93660
93260
|
// src/components/search/search.tsx
|
|
93661
|
-
import { jsx as
|
|
93261
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
93662
93262
|
var Search = () => {
|
|
93663
|
-
const [area, setArea] =
|
|
93664
|
-
const [search, setSearch] =
|
|
93665
|
-
const [limit, setLimit] =
|
|
93263
|
+
const [area, setArea] = useState5("all");
|
|
93264
|
+
const [search, setSearch] = useState5("");
|
|
93265
|
+
const [limit, setLimit] = useState5(DEFAULT_SEARCH_LIMIT);
|
|
93666
93266
|
const { open, onOpenChange } = useSearch();
|
|
93667
93267
|
const location = useLocation();
|
|
93668
93268
|
const { t: t2 } = useTranslation3();
|
|
@@ -93692,7 +93292,7 @@ var Search = () => {
|
|
|
93692
93292
|
},
|
|
93693
93293
|
[onOpenChange, handleReset]
|
|
93694
93294
|
);
|
|
93695
|
-
|
|
93295
|
+
useEffect4(() => {
|
|
93696
93296
|
handleOpenChange(false);
|
|
93697
93297
|
}, [location.pathname, handleOpenChange]);
|
|
93698
93298
|
const handleSelect = (item) => {
|
|
@@ -93741,8 +93341,8 @@ var Search = () => {
|
|
|
93741
93341
|
const showLoading = useMemo3(() => {
|
|
93742
93342
|
return isFetching && !dynamicResults.length && !filteredStaticResults.length;
|
|
93743
93343
|
}, [isFetching, dynamicResults, filteredStaticResults]);
|
|
93744
|
-
return /* @__PURE__ */
|
|
93745
|
-
/* @__PURE__ */
|
|
93344
|
+
return /* @__PURE__ */ jsxs2(CommandDialog, { open, onOpenChange: handleOpenChange, children: [
|
|
93345
|
+
/* @__PURE__ */ jsx6(
|
|
93746
93346
|
CommandInput,
|
|
93747
93347
|
{
|
|
93748
93348
|
isFetching,
|
|
@@ -93755,19 +93355,19 @@ var Search = () => {
|
|
|
93755
93355
|
placeholder: t2("app.search.placeholder")
|
|
93756
93356
|
}
|
|
93757
93357
|
),
|
|
93758
|
-
/* @__PURE__ */
|
|
93759
|
-
showLoading && /* @__PURE__ */
|
|
93358
|
+
/* @__PURE__ */ jsxs2(CommandList, { ref: listRef, children: [
|
|
93359
|
+
showLoading && /* @__PURE__ */ jsx6(CommandLoading, {}),
|
|
93760
93360
|
dynamicResults.map((group) => {
|
|
93761
|
-
return /* @__PURE__ */
|
|
93361
|
+
return /* @__PURE__ */ jsxs2(CommandGroup, { heading: group.title, children: [
|
|
93762
93362
|
group.items.map((item) => {
|
|
93763
|
-
return /* @__PURE__ */
|
|
93363
|
+
return /* @__PURE__ */ jsx6(
|
|
93764
93364
|
CommandItem,
|
|
93765
93365
|
{
|
|
93766
93366
|
onSelect: () => handleSelect(item),
|
|
93767
93367
|
value: item.value,
|
|
93768
93368
|
className: "flex items-center justify-between",
|
|
93769
|
-
children: /* @__PURE__ */
|
|
93770
|
-
item.thumbnail && /* @__PURE__ */
|
|
93369
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-3", children: [
|
|
93370
|
+
item.thumbnail && /* @__PURE__ */ jsx6(
|
|
93771
93371
|
Thumbnail,
|
|
93772
93372
|
{
|
|
93773
93373
|
alt: item.title,
|
|
@@ -93775,34 +93375,34 @@ var Search = () => {
|
|
|
93775
93375
|
size: "small"
|
|
93776
93376
|
}
|
|
93777
93377
|
),
|
|
93778
|
-
/* @__PURE__ */
|
|
93779
|
-
item.subtitle && /* @__PURE__ */
|
|
93378
|
+
/* @__PURE__ */ jsx6("span", { children: item.title }),
|
|
93379
|
+
item.subtitle && /* @__PURE__ */ jsx6("span", { className: "text-ui-fg-muted", children: item.subtitle })
|
|
93780
93380
|
] })
|
|
93781
93381
|
},
|
|
93782
93382
|
item.id
|
|
93783
93383
|
);
|
|
93784
93384
|
}),
|
|
93785
|
-
group.hasMore && area === "all" && /* @__PURE__ */
|
|
93385
|
+
group.hasMore && area === "all" && /* @__PURE__ */ jsx6(
|
|
93786
93386
|
CommandItem,
|
|
93787
93387
|
{
|
|
93788
93388
|
onSelect: () => handleShowMore(group.area),
|
|
93789
93389
|
hidden: true,
|
|
93790
93390
|
value: `${group.title}:show:more`,
|
|
93791
|
-
children: /* @__PURE__ */
|
|
93792
|
-
/* @__PURE__ */
|
|
93793
|
-
/* @__PURE__ */
|
|
93391
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-muted flex items-center gap-x-3", children: [
|
|
93392
|
+
/* @__PURE__ */ jsx6(Plus, {}),
|
|
93393
|
+
/* @__PURE__ */ jsx6(Text, { size: "small", leading: "compact", weight: "plus", children: t2("app.search.showMore") })
|
|
93794
93394
|
] })
|
|
93795
93395
|
}
|
|
93796
93396
|
),
|
|
93797
|
-
group.hasMore && area === group.area && /* @__PURE__ */
|
|
93397
|
+
group.hasMore && area === group.area && /* @__PURE__ */ jsx6(
|
|
93798
93398
|
CommandItem,
|
|
93799
93399
|
{
|
|
93800
93400
|
onSelect: handleLoadMore,
|
|
93801
93401
|
hidden: true,
|
|
93802
93402
|
value: `${group.title}:load:more`,
|
|
93803
|
-
children: /* @__PURE__ */
|
|
93804
|
-
/* @__PURE__ */
|
|
93805
|
-
/* @__PURE__ */
|
|
93403
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-muted flex items-center gap-x-3", children: [
|
|
93404
|
+
/* @__PURE__ */ jsx6(Plus, {}),
|
|
93405
|
+
/* @__PURE__ */ jsx6(Text, { size: "small", leading: "compact", weight: "plus", children: t2("app.search.loadMore", {
|
|
93806
93406
|
count: Math.min(
|
|
93807
93407
|
SEARCH_LIMIT_INCREMENT,
|
|
93808
93408
|
group.count - limit
|
|
@@ -93814,26 +93414,26 @@ var Search = () => {
|
|
|
93814
93414
|
] }, group.title);
|
|
93815
93415
|
}),
|
|
93816
93416
|
filteredStaticResults.map((group) => {
|
|
93817
|
-
return /* @__PURE__ */
|
|
93417
|
+
return /* @__PURE__ */ jsx6(
|
|
93818
93418
|
CommandGroup,
|
|
93819
93419
|
{
|
|
93820
93420
|
heading: t2(`app.keyboardShortcuts.${group.title}`),
|
|
93821
93421
|
children: group.items.map((item) => {
|
|
93822
|
-
return /* @__PURE__ */
|
|
93422
|
+
return /* @__PURE__ */ jsxs2(
|
|
93823
93423
|
CommandItem,
|
|
93824
93424
|
{
|
|
93825
93425
|
onSelect: () => handleSelect(item),
|
|
93826
93426
|
className: "flex items-center justify-between",
|
|
93827
93427
|
children: [
|
|
93828
|
-
/* @__PURE__ */
|
|
93829
|
-
/* @__PURE__ */
|
|
93830
|
-
return /* @__PURE__ */
|
|
93428
|
+
/* @__PURE__ */ jsx6("span", { children: item.label }),
|
|
93429
|
+
/* @__PURE__ */ jsx6("div", { className: "flex items-center gap-x-1.5", children: item.keys.Mac?.map((key, index) => {
|
|
93430
|
+
return /* @__PURE__ */ jsxs2(
|
|
93831
93431
|
"div",
|
|
93832
93432
|
{
|
|
93833
93433
|
className: "flex items-center gap-x-1",
|
|
93834
93434
|
children: [
|
|
93835
|
-
/* @__PURE__ */
|
|
93836
|
-
index < (item.keys.Mac?.length || 0) - 1 && /* @__PURE__ */
|
|
93435
|
+
/* @__PURE__ */ jsx6(Kbd, { children: key }),
|
|
93436
|
+
index < (item.keys.Mac?.length || 0) - 1 && /* @__PURE__ */ jsx6("span", { className: "txt-compact-xsmall text-ui-fg-subtle", children: t2("app.keyboardShortcuts.then") })
|
|
93837
93437
|
]
|
|
93838
93438
|
},
|
|
93839
93439
|
index
|
|
@@ -93848,16 +93448,16 @@ var Search = () => {
|
|
|
93848
93448
|
group.title
|
|
93849
93449
|
);
|
|
93850
93450
|
}),
|
|
93851
|
-
!showLoading && /* @__PURE__ */
|
|
93451
|
+
!showLoading && /* @__PURE__ */ jsx6(CommandEmpty, { q: search })
|
|
93852
93452
|
] })
|
|
93853
93453
|
] });
|
|
93854
93454
|
};
|
|
93855
|
-
var CommandPalette = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93455
|
+
var CommandPalette = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
93856
93456
|
Command,
|
|
93857
93457
|
{
|
|
93858
93458
|
shouldFilter: false,
|
|
93859
93459
|
ref,
|
|
93860
|
-
className:
|
|
93460
|
+
className: clx2(
|
|
93861
93461
|
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
93862
93462
|
className
|
|
93863
93463
|
),
|
|
@@ -93870,12 +93470,12 @@ var CommandDialog = ({ children, ...props }) => {
|
|
|
93870
93470
|
const preserveHeight = useMemo3(() => {
|
|
93871
93471
|
return props.isLoading && Children.count(children) === 0;
|
|
93872
93472
|
}, [props.isLoading, children]);
|
|
93873
|
-
return /* @__PURE__ */
|
|
93874
|
-
/* @__PURE__ */
|
|
93875
|
-
/* @__PURE__ */
|
|
93473
|
+
return /* @__PURE__ */ jsx6(RadixDialog.Root, { ...props, children: /* @__PURE__ */ jsxs2(RadixDialog.Portal, { children: [
|
|
93474
|
+
/* @__PURE__ */ jsx6(RadixDialog.Overlay, { className: "bg-ui-bg-overlay fixed inset-0" }),
|
|
93475
|
+
/* @__PURE__ */ jsxs2(
|
|
93876
93476
|
RadixDialog.Content,
|
|
93877
93477
|
{
|
|
93878
|
-
className:
|
|
93478
|
+
className: clx2(
|
|
93879
93479
|
"bg-ui-bg-base shadow-elevation-modal fixed left-[50%] top-[50%] flex max-h-[calc(100%-16px)] w-[calc(100%-16px)] min-w-0 max-w-2xl translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-xl p-0",
|
|
93880
93480
|
{
|
|
93881
93481
|
"h-[300px]": preserveHeight
|
|
@@ -93883,21 +93483,21 @@ var CommandDialog = ({ children, ...props }) => {
|
|
|
93883
93483
|
}
|
|
93884
93484
|
),
|
|
93885
93485
|
children: [
|
|
93886
|
-
/* @__PURE__ */
|
|
93887
|
-
/* @__PURE__ */
|
|
93888
|
-
/* @__PURE__ */
|
|
93889
|
-
/* @__PURE__ */
|
|
93890
|
-
/* @__PURE__ */
|
|
93891
|
-
/* @__PURE__ */
|
|
93892
|
-
/* @__PURE__ */
|
|
93893
|
-
/* @__PURE__ */
|
|
93894
|
-
/* @__PURE__ */
|
|
93486
|
+
/* @__PURE__ */ jsx6(RadixDialog.Title, { className: "sr-only", children: t2("app.search.title") }),
|
|
93487
|
+
/* @__PURE__ */ jsx6(RadixDialog.Description, { className: "sr-only", children: t2("app.search.description") }),
|
|
93488
|
+
/* @__PURE__ */ jsx6(CommandPalette, { className: "[&_[cmdk-group-heading]]:text-muted-foreground flex h-full flex-col overflow-hidden [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0", children }),
|
|
93489
|
+
/* @__PURE__ */ jsx6("div", { className: "bg-ui-bg-field text-ui-fg-subtle flex items-center justify-end border-t px-4 py-3", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-3", children: [
|
|
93490
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
|
|
93491
|
+
/* @__PURE__ */ jsx6(Text, { size: "xsmall", leading: "compact", children: t2("app.search.navigation") }),
|
|
93492
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-1", children: [
|
|
93493
|
+
/* @__PURE__ */ jsx6(Kbd, { className: "bg-ui-bg-field-component", children: "\u2193" }),
|
|
93494
|
+
/* @__PURE__ */ jsx6(Kbd, { className: "bg-ui-bg-field-component", children: "\u2191" })
|
|
93895
93495
|
] })
|
|
93896
93496
|
] }),
|
|
93897
|
-
/* @__PURE__ */
|
|
93898
|
-
/* @__PURE__ */
|
|
93899
|
-
/* @__PURE__ */
|
|
93900
|
-
/* @__PURE__ */
|
|
93497
|
+
/* @__PURE__ */ jsx6("div", { className: "bg-ui-border-strong h-3 w-px" }),
|
|
93498
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
|
|
93499
|
+
/* @__PURE__ */ jsx6(Text, { size: "xsmall", leading: "compact", children: t2("app.search.openResult") }),
|
|
93500
|
+
/* @__PURE__ */ jsx6(Kbd, { className: "bg-ui-bg-field-component", children: "\u21B5" })
|
|
93901
93501
|
] })
|
|
93902
93502
|
] }) })
|
|
93903
93503
|
]
|
|
@@ -93923,20 +93523,20 @@ var CommandInput = forwardRef(
|
|
|
93923
93523
|
ref,
|
|
93924
93524
|
() => innerRef.current
|
|
93925
93525
|
);
|
|
93926
|
-
return /* @__PURE__ */
|
|
93927
|
-
/* @__PURE__ */
|
|
93928
|
-
/* @__PURE__ */
|
|
93526
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col border-b", children: [
|
|
93527
|
+
/* @__PURE__ */ jsx6("div", { className: "px-4 pt-4", children: /* @__PURE__ */ jsxs2(DropdownMenu, { dir: direction, children: [
|
|
93528
|
+
/* @__PURE__ */ jsx6(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
|
|
93929
93529
|
Badge,
|
|
93930
93530
|
{
|
|
93931
93531
|
size: "2xsmall",
|
|
93932
93532
|
className: "hover:bg-ui-bg-base-pressed transition-fg cursor-pointer",
|
|
93933
93533
|
children: [
|
|
93934
93534
|
t2(`app.search.groups.${area}`),
|
|
93935
|
-
/* @__PURE__ */
|
|
93535
|
+
/* @__PURE__ */ jsx6(TriangleDownMini, { className: "text-ui-fg-muted" })
|
|
93936
93536
|
]
|
|
93937
93537
|
}
|
|
93938
93538
|
) }),
|
|
93939
|
-
/* @__PURE__ */
|
|
93539
|
+
/* @__PURE__ */ jsx6(
|
|
93940
93540
|
DropdownMenu.Content,
|
|
93941
93541
|
{
|
|
93942
93542
|
align: "start",
|
|
@@ -93945,48 +93545,48 @@ var CommandInput = forwardRef(
|
|
|
93945
93545
|
e.preventDefault();
|
|
93946
93546
|
innerRef.current?.focus();
|
|
93947
93547
|
},
|
|
93948
|
-
children: /* @__PURE__ */
|
|
93548
|
+
children: /* @__PURE__ */ jsx6(
|
|
93949
93549
|
DropdownMenu.RadioGroup,
|
|
93950
93550
|
{
|
|
93951
93551
|
value: area,
|
|
93952
93552
|
onValueChange: (v) => setArea(v),
|
|
93953
|
-
children: SEARCH_AREAS.map((area2) => /* @__PURE__ */
|
|
93954
|
-
area2 === "command" && /* @__PURE__ */
|
|
93955
|
-
/* @__PURE__ */
|
|
93956
|
-
area2 === "all" && /* @__PURE__ */
|
|
93553
|
+
children: SEARCH_AREAS.map((area2) => /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
93554
|
+
area2 === "command" && /* @__PURE__ */ jsx6(DropdownMenu.Separator, {}),
|
|
93555
|
+
/* @__PURE__ */ jsx6(DropdownMenu.RadioItem, { value: area2, children: t2(`app.search.groups.${area2}`) }),
|
|
93556
|
+
area2 === "all" && /* @__PURE__ */ jsx6(DropdownMenu.Separator, {})
|
|
93957
93557
|
] }, area2))
|
|
93958
93558
|
}
|
|
93959
93559
|
)
|
|
93960
93560
|
}
|
|
93961
93561
|
)
|
|
93962
93562
|
] }) }),
|
|
93963
|
-
/* @__PURE__ */
|
|
93964
|
-
onBack && /* @__PURE__ */
|
|
93563
|
+
/* @__PURE__ */ jsxs2("div", { className: "relative flex items-center gap-x-2 px-4 py-3", children: [
|
|
93564
|
+
onBack && /* @__PURE__ */ jsx6(
|
|
93965
93565
|
IconButton,
|
|
93966
93566
|
{
|
|
93967
93567
|
type: "button",
|
|
93968
93568
|
size: "small",
|
|
93969
93569
|
variant: "transparent",
|
|
93970
93570
|
onClick: onBack,
|
|
93971
|
-
children: /* @__PURE__ */
|
|
93571
|
+
children: /* @__PURE__ */ jsx6(ArrowUturnLeft, { className: "text-ui-fg-muted" })
|
|
93972
93572
|
}
|
|
93973
93573
|
),
|
|
93974
|
-
/* @__PURE__ */
|
|
93574
|
+
/* @__PURE__ */ jsx6(
|
|
93975
93575
|
Command.Input,
|
|
93976
93576
|
{
|
|
93977
93577
|
ref: innerRef,
|
|
93978
93578
|
value,
|
|
93979
93579
|
onValueChange,
|
|
93980
|
-
className:
|
|
93580
|
+
className: clx2(
|
|
93981
93581
|
"placeholder:text-ui-fg-muted flex !h-6 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
93982
93582
|
className
|
|
93983
93583
|
),
|
|
93984
93584
|
...props
|
|
93985
93585
|
}
|
|
93986
93586
|
),
|
|
93987
|
-
/* @__PURE__ */
|
|
93988
|
-
isFetching && /* @__PURE__ */
|
|
93989
|
-
value && /* @__PURE__ */
|
|
93587
|
+
/* @__PURE__ */ jsxs2("div", { className: "absolute end-4 top-1/2 flex -translate-y-1/2 items-center justify-end gap-x-2", children: [
|
|
93588
|
+
isFetching && /* @__PURE__ */ jsx6(Spinner, { className: "text-ui-fg-muted animate-spin" }),
|
|
93589
|
+
value && /* @__PURE__ */ jsx6(
|
|
93990
93590
|
Button,
|
|
93991
93591
|
{
|
|
93992
93592
|
variant: "transparent",
|
|
@@ -94006,11 +93606,11 @@ var CommandInput = forwardRef(
|
|
|
94006
93606
|
}
|
|
94007
93607
|
);
|
|
94008
93608
|
CommandInput.displayName = Command.Input.displayName;
|
|
94009
|
-
var CommandList = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93609
|
+
var CommandList = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
94010
93610
|
Command.List,
|
|
94011
93611
|
{
|
|
94012
93612
|
ref,
|
|
94013
|
-
className:
|
|
93613
|
+
className: clx2(
|
|
94014
93614
|
"max-h-[300px] flex-1 overflow-y-auto overflow-x-hidden px-2 pb-4",
|
|
94015
93615
|
className
|
|
94016
93616
|
),
|
|
@@ -94020,35 +93620,35 @@ var CommandList = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
94020
93620
|
CommandList.displayName = Command.List.displayName;
|
|
94021
93621
|
var CommandEmpty = forwardRef((props, ref) => {
|
|
94022
93622
|
const { t: t2 } = useTranslation3();
|
|
94023
|
-
return /* @__PURE__ */
|
|
94024
|
-
/* @__PURE__ */
|
|
94025
|
-
/* @__PURE__ */
|
|
94026
|
-
/* @__PURE__ */
|
|
94027
|
-
/* @__PURE__ */
|
|
93623
|
+
return /* @__PURE__ */ jsx6(Command.Empty, { ref, className: "py-6 text-center text-sm", ...props, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle flex min-h-[236px] flex-col items-center justify-center gap-y-3", children: [
|
|
93624
|
+
/* @__PURE__ */ jsx6(MagnifyingGlass, { className: "text-ui-fg-subtle" }),
|
|
93625
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center justify-center gap-y-1", children: [
|
|
93626
|
+
/* @__PURE__ */ jsx6(Text, { size: "small", weight: "plus", leading: "compact", children: props.q ? t2("app.search.noResultsTitle") : t2("app.search.emptySearchTitle") }),
|
|
93627
|
+
/* @__PURE__ */ jsx6(Text, { size: "small", className: "text-ui-fg-muted", children: props.q ? t2("app.search.noResultsMessage") : t2("app.search.emptySearchMessage") })
|
|
94028
93628
|
] })
|
|
94029
93629
|
] }) });
|
|
94030
93630
|
});
|
|
94031
93631
|
CommandEmpty.displayName = Command.Empty.displayName;
|
|
94032
93632
|
var CommandLoading = forwardRef((props, ref) => {
|
|
94033
|
-
return /* @__PURE__ */
|
|
93633
|
+
return /* @__PURE__ */ jsxs2(
|
|
94034
93634
|
Command.Loading,
|
|
94035
93635
|
{
|
|
94036
93636
|
ref,
|
|
94037
93637
|
...props,
|
|
94038
93638
|
className: "bg-ui-bg-base flex flex-col",
|
|
94039
93639
|
children: [
|
|
94040
|
-
/* @__PURE__ */
|
|
94041
|
-
Array.from({ length: 7 }).map((_, index) => /* @__PURE__ */
|
|
93640
|
+
/* @__PURE__ */ jsx6("div", { className: "w-full px-2 pb-1 pt-3", children: /* @__PURE__ */ jsx6(Skeleton, { className: "h-5 w-10" }) }),
|
|
93641
|
+
Array.from({ length: 7 }).map((_, index) => /* @__PURE__ */ jsx6("div", { className: "w-full p-2", children: /* @__PURE__ */ jsx6(Skeleton, { className: "h-5 w-full" }) }, index))
|
|
94042
93642
|
]
|
|
94043
93643
|
}
|
|
94044
93644
|
);
|
|
94045
93645
|
});
|
|
94046
93646
|
CommandLoading.displayName = Command.Loading.displayName;
|
|
94047
|
-
var CommandGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93647
|
+
var CommandGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
94048
93648
|
Command.Group,
|
|
94049
93649
|
{
|
|
94050
93650
|
ref,
|
|
94051
|
-
className:
|
|
93651
|
+
className: clx2(
|
|
94052
93652
|
"text-ui-fg-base [&_[cmdk-group-heading]]:text-ui-fg-muted [&_[cmdk-group-heading]]:txt-compact-xsmall-plus overflow-hidden [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-item]]:py-2",
|
|
94053
93653
|
className
|
|
94054
93654
|
),
|
|
@@ -94056,20 +93656,20 @@ var CommandGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
94056
93656
|
}
|
|
94057
93657
|
));
|
|
94058
93658
|
CommandGroup.displayName = Command.Group.displayName;
|
|
94059
|
-
var CommandSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93659
|
+
var CommandSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
94060
93660
|
Command.Separator,
|
|
94061
93661
|
{
|
|
94062
93662
|
ref,
|
|
94063
|
-
className:
|
|
93663
|
+
className: clx2("bg-border -mx-1 h-px", className),
|
|
94064
93664
|
...props
|
|
94065
93665
|
}
|
|
94066
93666
|
));
|
|
94067
93667
|
CommandSeparator.displayName = Command.Separator.displayName;
|
|
94068
|
-
var CommandItem = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93668
|
+
var CommandItem = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
94069
93669
|
Command.Item,
|
|
94070
93670
|
{
|
|
94071
93671
|
ref,
|
|
94072
|
-
className:
|
|
93672
|
+
className: clx2(
|
|
94073
93673
|
"aria-selected:bg-ui-bg-base-hover focus-visible:bg-ui-bg-base-hover txt-compact-small [&>svg]:text-ui-fg-subtle relative flex cursor-pointer select-none items-center gap-x-3 rounded-md p-2 outline-none data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
94074
93674
|
className
|
|
94075
93675
|
),
|
|
@@ -94079,18 +93679,18 @@ var CommandItem = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
94079
93679
|
CommandItem.displayName = Command.Item.displayName;
|
|
94080
93680
|
|
|
94081
93681
|
// src/providers/sidebar-provider/sidebar-provider.tsx
|
|
94082
|
-
import { useEffect as
|
|
93682
|
+
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
94083
93683
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
94084
93684
|
|
|
94085
93685
|
// src/providers/sidebar-provider/sidebar-context.tsx
|
|
94086
|
-
import { createContext as
|
|
94087
|
-
var SidebarContext =
|
|
93686
|
+
import { createContext as createContext3 } from "react";
|
|
93687
|
+
var SidebarContext = createContext3(null);
|
|
94088
93688
|
|
|
94089
93689
|
// src/providers/sidebar-provider/sidebar-provider.tsx
|
|
94090
|
-
import { jsx as
|
|
93690
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
94091
93691
|
var SidebarProvider = ({ children }) => {
|
|
94092
|
-
const [desktop, setDesktop] =
|
|
94093
|
-
const [mobile, setMobile] =
|
|
93692
|
+
const [desktop, setDesktop] = useState6(true);
|
|
93693
|
+
const [mobile, setMobile] = useState6(false);
|
|
94094
93694
|
const { pathname } = useLocation2();
|
|
94095
93695
|
const toggle = (view) => {
|
|
94096
93696
|
if (view === "desktop") {
|
|
@@ -94099,16 +93699,16 @@ var SidebarProvider = ({ children }) => {
|
|
|
94099
93699
|
setMobile(!mobile);
|
|
94100
93700
|
}
|
|
94101
93701
|
};
|
|
94102
|
-
|
|
93702
|
+
useEffect5(() => {
|
|
94103
93703
|
setMobile(false);
|
|
94104
93704
|
}, [pathname]);
|
|
94105
|
-
return /* @__PURE__ */
|
|
93705
|
+
return /* @__PURE__ */ jsx7(SidebarContext.Provider, { value: { desktop, mobile, toggle }, children });
|
|
94106
93706
|
};
|
|
94107
93707
|
|
|
94108
93708
|
// src/providers/sidebar-provider/use-sidebar.tsx
|
|
94109
|
-
import { useContext as
|
|
93709
|
+
import { useContext as useContext3 } from "react";
|
|
94110
93710
|
var useSidebar = () => {
|
|
94111
|
-
const context =
|
|
93711
|
+
const context = useContext3(SidebarContext);
|
|
94112
93712
|
if (!context) {
|
|
94113
93713
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
94114
93714
|
}
|
|
@@ -94116,13 +93716,13 @@ var useSidebar = () => {
|
|
|
94116
93716
|
};
|
|
94117
93717
|
|
|
94118
93718
|
// src/providers/search-provider/search-context.tsx
|
|
94119
|
-
import { createContext as
|
|
94120
|
-
var SearchContext =
|
|
93719
|
+
import { createContext as createContext4 } from "react";
|
|
93720
|
+
var SearchContext = createContext4(null);
|
|
94121
93721
|
|
|
94122
93722
|
// src/providers/search-provider/search-provider.tsx
|
|
94123
|
-
import { jsx as
|
|
93723
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
94124
93724
|
var SearchProvider = ({ children }) => {
|
|
94125
|
-
const [open, setOpen] =
|
|
93725
|
+
const [open, setOpen] = useState7(false);
|
|
94126
93726
|
const { mobile, toggle } = useSidebar();
|
|
94127
93727
|
const toggleSearch = () => {
|
|
94128
93728
|
const update = !open;
|
|
@@ -94131,7 +93731,7 @@ var SearchProvider = ({ children }) => {
|
|
|
94131
93731
|
}
|
|
94132
93732
|
setOpen(update);
|
|
94133
93733
|
};
|
|
94134
|
-
|
|
93734
|
+
useEffect6(() => {
|
|
94135
93735
|
const onKeyDown = (e) => {
|
|
94136
93736
|
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
94137
93737
|
setOpen((prev) => !prev);
|
|
@@ -94142,7 +93742,7 @@ var SearchProvider = ({ children }) => {
|
|
|
94142
93742
|
document.removeEventListener("keydown", onKeyDown);
|
|
94143
93743
|
};
|
|
94144
93744
|
}, []);
|
|
94145
|
-
return /* @__PURE__ */
|
|
93745
|
+
return /* @__PURE__ */ jsxs3(
|
|
94146
93746
|
SearchContext.Provider,
|
|
94147
93747
|
{
|
|
94148
93748
|
value: {
|
|
@@ -94152,16 +93752,16 @@ var SearchProvider = ({ children }) => {
|
|
|
94152
93752
|
},
|
|
94153
93753
|
children: [
|
|
94154
93754
|
children,
|
|
94155
|
-
/* @__PURE__ */
|
|
93755
|
+
/* @__PURE__ */ jsx8(Search, {})
|
|
94156
93756
|
]
|
|
94157
93757
|
}
|
|
94158
93758
|
);
|
|
94159
93759
|
};
|
|
94160
93760
|
|
|
94161
93761
|
// src/providers/search-provider/use-search.tsx
|
|
94162
|
-
import { useContext as
|
|
93762
|
+
import { useContext as useContext4 } from "react";
|
|
94163
93763
|
var useSearch = () => {
|
|
94164
|
-
const context =
|
|
93764
|
+
const context = useContext4(SearchContext);
|
|
94165
93765
|
if (!context) {
|
|
94166
93766
|
throw new Error("useSearch must be used within a SearchProvider");
|
|
94167
93767
|
}
|
|
@@ -94169,60 +93769,44 @@ var useSearch = () => {
|
|
|
94169
93769
|
};
|
|
94170
93770
|
|
|
94171
93771
|
// src/components/authentication/protected-route/protected-route.tsx
|
|
94172
|
-
import { jsx as
|
|
93772
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
94173
93773
|
var ProtectedRoute = () => {
|
|
94174
93774
|
const { user, isLoading } = useMe();
|
|
94175
93775
|
const location = useLocation3();
|
|
94176
93776
|
if (isLoading) {
|
|
94177
|
-
return /* @__PURE__ */
|
|
93777
|
+
return /* @__PURE__ */ jsx9("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsx9(Spinner2, { className: "text-ui-fg-interactive animate-spin" }) });
|
|
94178
93778
|
}
|
|
94179
93779
|
if (!user) {
|
|
94180
|
-
return /* @__PURE__ */
|
|
93780
|
+
return /* @__PURE__ */ jsx9(Navigate, { to: "/login", state: { from: location }, replace: true });
|
|
94181
93781
|
}
|
|
94182
|
-
return /* @__PURE__ */
|
|
93782
|
+
return /* @__PURE__ */ jsx9(SidebarProvider, { children: /* @__PURE__ */ jsx9(SearchProvider, { children: /* @__PURE__ */ jsx9(Outlet, {}) }) });
|
|
94183
93783
|
};
|
|
94184
93784
|
|
|
94185
93785
|
// src/components/layout/main-layout/main-layout.tsx
|
|
94186
93786
|
import {
|
|
94187
93787
|
ChevronDownMini,
|
|
94188
93788
|
CogSixTooth,
|
|
94189
|
-
EllipsisHorizontal as
|
|
93789
|
+
EllipsisHorizontal as EllipsisHorizontal2,
|
|
94190
93790
|
MagnifyingGlass as MagnifyingGlass2,
|
|
94191
93791
|
MinusMini,
|
|
94192
93792
|
OpenRectArrowOut as OpenRectArrowOut2,
|
|
94193
93793
|
SquaresPlus
|
|
94194
93794
|
} from "@acmekit/icons";
|
|
94195
|
-
import { Avatar as Avatar2, Divider, DropdownMenu as
|
|
93795
|
+
import { Avatar as Avatar2, Divider, DropdownMenu as DropdownMenu3, Text as Text6, clx as clx7 } from "@acmekit/ui";
|
|
94196
93796
|
import { Collapsible as RadixCollapsible2 } from "radix-ui";
|
|
94197
93797
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
94198
93798
|
|
|
94199
93799
|
// src/components/layout/nav-item/nav-item.tsx
|
|
94200
|
-
import { Kbd as Kbd2, Text as
|
|
93800
|
+
import { Kbd as Kbd2, Text as Text2, clx as clx3 } from "@acmekit/ui";
|
|
94201
93801
|
import { Collapsible as RadixCollapsible } from "radix-ui";
|
|
94202
93802
|
import {
|
|
94203
93803
|
useCallback as useCallback5,
|
|
94204
|
-
useEffect as
|
|
94205
|
-
useState as
|
|
93804
|
+
useEffect as useEffect7,
|
|
93805
|
+
useState as useState8
|
|
94206
93806
|
} from "react";
|
|
94207
93807
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
94208
93808
|
import { NavLink, useLocation as useLocation4 } from "react-router-dom";
|
|
94209
|
-
|
|
94210
|
-
// src/components/common/conditional-tooltip/conditional-tooltip.tsx
|
|
94211
|
-
import { Tooltip } from "@acmekit/ui";
|
|
94212
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
94213
|
-
var ConditionalTooltip = ({
|
|
94214
|
-
children,
|
|
94215
|
-
showTooltip = false,
|
|
94216
|
-
...props
|
|
94217
|
-
}) => {
|
|
94218
|
-
if (showTooltip) {
|
|
94219
|
-
return /* @__PURE__ */ jsx12(Tooltip, { ...props, children });
|
|
94220
|
-
}
|
|
94221
|
-
return children;
|
|
94222
|
-
};
|
|
94223
|
-
|
|
94224
|
-
// src/components/layout/nav-item/nav-item.tsx
|
|
94225
|
-
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
93809
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
94226
93810
|
var BASE_NAV_LINK_CLASSES = "text-ui-fg-subtle transition-fg hover:bg-ui-bg-subtle-hover flex items-center gap-x-2 rounded-md py-0.5 pl-0.5 pr-2 outline-none [&>svg]:text-ui-fg-subtle focus-visible:shadow-borders-focus";
|
|
94227
93811
|
var ACTIVE_NAV_LINK_CLASSES = "bg-ui-bg-base shadow-elevation-card-rest text-ui-fg-base hover:bg-ui-bg-base";
|
|
94228
93812
|
var NESTED_NAV_LINK_CLASSES = "pl-[34px] pr-2 py-1 w-full text-ui-fg-muted";
|
|
@@ -94239,21 +93823,21 @@ var NavItemTooltip = ({
|
|
|
94239
93823
|
const { t: t2 } = useTranslation4();
|
|
94240
93824
|
const globalShortcuts = useGlobalShortcuts();
|
|
94241
93825
|
const shortcut = globalShortcuts.find((s) => s.to === to);
|
|
94242
|
-
return /* @__PURE__ */
|
|
93826
|
+
return /* @__PURE__ */ jsx10(
|
|
94243
93827
|
ConditionalTooltip,
|
|
94244
93828
|
{
|
|
94245
93829
|
showTooltip: !!shortcut,
|
|
94246
93830
|
maxWidth: 9999,
|
|
94247
|
-
content: /* @__PURE__ */
|
|
94248
|
-
/* @__PURE__ */
|
|
94249
|
-
/* @__PURE__ */
|
|
94250
|
-
/* @__PURE__ */
|
|
94251
|
-
index < (shortcut.keys.Mac?.length || 0) - 1 && /* @__PURE__ */
|
|
93831
|
+
content: /* @__PURE__ */ jsxs4("div", { className: "txt-compact-xsmall flex h-5 items-center justify-between gap-x-2 whitespace-nowrap", children: [
|
|
93832
|
+
/* @__PURE__ */ jsx10("span", { children: shortcut?.label }),
|
|
93833
|
+
/* @__PURE__ */ jsx10("div", { className: "flex items-center gap-x-1", children: shortcut?.keys.Mac?.map((key, index) => /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-1", children: [
|
|
93834
|
+
/* @__PURE__ */ jsx10(Kbd2, { children: key }, key),
|
|
93835
|
+
index < (shortcut.keys.Mac?.length || 0) - 1 && /* @__PURE__ */ jsx10("span", { className: "text-ui-fg-muted txt-compact-xsmall", children: t2("app.keyboardShortcuts.then") })
|
|
94252
93836
|
] }, index)) })
|
|
94253
93837
|
] }),
|
|
94254
93838
|
side: "right",
|
|
94255
93839
|
delayDuration: 1500,
|
|
94256
|
-
children: /* @__PURE__ */
|
|
93840
|
+
children: /* @__PURE__ */ jsx10("div", { className: "w-full", children })
|
|
94257
93841
|
}
|
|
94258
93842
|
);
|
|
94259
93843
|
};
|
|
@@ -94268,9 +93852,9 @@ var NavItem = ({
|
|
|
94268
93852
|
}) => {
|
|
94269
93853
|
const { t: t2 } = useTranslation4(translationNs);
|
|
94270
93854
|
const { pathname } = useLocation4();
|
|
94271
|
-
const [open, setOpen] =
|
|
93855
|
+
const [open, setOpen] = useState8(getIsOpen(to, items, pathname));
|
|
94272
93856
|
const displayLabel = translationNs ? t2(label) : label;
|
|
94273
|
-
|
|
93857
|
+
useEffect7(() => {
|
|
94274
93858
|
setOpen(getIsOpen(to, items, pathname));
|
|
94275
93859
|
}, [pathname, to, items]);
|
|
94276
93860
|
const navLinkClassNames = useCallback5(
|
|
@@ -94283,7 +93867,7 @@ var NavItem = ({
|
|
|
94283
93867
|
if (["core", "setting"].includes(type)) {
|
|
94284
93868
|
isActive = pathname.startsWith(to2);
|
|
94285
93869
|
}
|
|
94286
|
-
return
|
|
93870
|
+
return clx3(BASE_NAV_LINK_CLASSES, {
|
|
94287
93871
|
[NESTED_NAV_LINK_CLASSES]: isNested,
|
|
94288
93872
|
[ACTIVE_NAV_LINK_CLASSES]: isActive,
|
|
94289
93873
|
[SETTING_NAV_LINK_CLASSES]: isSetting2
|
|
@@ -94292,8 +93876,8 @@ var NavItem = ({
|
|
|
94292
93876
|
[type, pathname]
|
|
94293
93877
|
);
|
|
94294
93878
|
const isSetting = type === "setting";
|
|
94295
|
-
return /* @__PURE__ */
|
|
94296
|
-
/* @__PURE__ */
|
|
93879
|
+
return /* @__PURE__ */ jsxs4("div", { className: "px-3", children: [
|
|
93880
|
+
/* @__PURE__ */ jsx10(NavItemTooltip, { to, children: /* @__PURE__ */ jsxs4(
|
|
94297
93881
|
NavLink,
|
|
94298
93882
|
{
|
|
94299
93883
|
to,
|
|
@@ -94302,38 +93886,38 @@ var NavItem = ({
|
|
|
94302
93886
|
from
|
|
94303
93887
|
} : void 0,
|
|
94304
93888
|
className: ({ isActive }) => {
|
|
94305
|
-
return
|
|
93889
|
+
return clx3(navLinkClassNames({ isActive, isSetting, to }), {
|
|
94306
93890
|
"max-lg:hidden": !!items?.length
|
|
94307
93891
|
});
|
|
94308
93892
|
},
|
|
94309
93893
|
children: [
|
|
94310
|
-
type !== "setting" && /* @__PURE__ */
|
|
94311
|
-
/* @__PURE__ */
|
|
93894
|
+
type !== "setting" && /* @__PURE__ */ jsx10("div", { className: "flex size-6 items-center justify-center", children: /* @__PURE__ */ jsx10(Icon, { icon, type }) }),
|
|
93895
|
+
/* @__PURE__ */ jsx10(Text2, { size: "small", weight: "plus", leading: "compact", children: displayLabel })
|
|
94312
93896
|
]
|
|
94313
93897
|
}
|
|
94314
93898
|
) }),
|
|
94315
|
-
items && items.length > 0 && /* @__PURE__ */
|
|
94316
|
-
/* @__PURE__ */
|
|
93899
|
+
items && items.length > 0 && /* @__PURE__ */ jsxs4(RadixCollapsible.Root, { open, onOpenChange: setOpen, children: [
|
|
93900
|
+
/* @__PURE__ */ jsxs4(
|
|
94317
93901
|
RadixCollapsible.Trigger,
|
|
94318
93902
|
{
|
|
94319
|
-
className:
|
|
93903
|
+
className: clx3(
|
|
94320
93904
|
"text-ui-fg-subtle hover:text-ui-fg-base transition-fg hover:bg-ui-bg-subtle-hover flex w-full items-center gap-x-2 rounded-md py-0.5 pl-0.5 pr-2 outline-none lg:hidden",
|
|
94321
93905
|
{ "pl-2": isSetting }
|
|
94322
93906
|
),
|
|
94323
93907
|
children: [
|
|
94324
|
-
/* @__PURE__ */
|
|
94325
|
-
/* @__PURE__ */
|
|
93908
|
+
/* @__PURE__ */ jsx10("div", { className: "flex size-6 items-center justify-center", children: /* @__PURE__ */ jsx10(Icon, { icon, type }) }),
|
|
93909
|
+
/* @__PURE__ */ jsx10(Text2, { size: "small", weight: "plus", leading: "compact", children: displayLabel })
|
|
94326
93910
|
]
|
|
94327
93911
|
}
|
|
94328
93912
|
),
|
|
94329
|
-
/* @__PURE__ */
|
|
94330
|
-
/* @__PURE__ */
|
|
93913
|
+
/* @__PURE__ */ jsx10(RadixCollapsible.Content, { children: /* @__PURE__ */ jsx10("div", { className: "flex flex-col gap-y-0.5 pb-2 pt-0.5", children: /* @__PURE__ */ jsxs4("ul", { className: "flex flex-col gap-y-0.5", children: [
|
|
93914
|
+
/* @__PURE__ */ jsx10("li", { className: "flex w-full items-center gap-x-1 lg:hidden", children: /* @__PURE__ */ jsx10(NavItemTooltip, { to, children: /* @__PURE__ */ jsx10(
|
|
94331
93915
|
NavLink,
|
|
94332
93916
|
{
|
|
94333
93917
|
to,
|
|
94334
93918
|
end: true,
|
|
94335
93919
|
className: ({ isActive }) => {
|
|
94336
|
-
return
|
|
93920
|
+
return clx3(
|
|
94337
93921
|
navLinkClassNames({
|
|
94338
93922
|
to,
|
|
94339
93923
|
isActive,
|
|
@@ -94342,19 +93926,19 @@ var NavItem = ({
|
|
|
94342
93926
|
})
|
|
94343
93927
|
);
|
|
94344
93928
|
},
|
|
94345
|
-
children: /* @__PURE__ */
|
|
93929
|
+
children: /* @__PURE__ */ jsx10(Text2, { size: "small", weight: "plus", leading: "compact", children: displayLabel })
|
|
94346
93930
|
}
|
|
94347
93931
|
) }) }),
|
|
94348
93932
|
items.map((item) => {
|
|
94349
93933
|
const { t: itemT } = useTranslation4(item.translationNs);
|
|
94350
93934
|
const itemLabel = item.translationNs ? itemT(item.label) : item.label;
|
|
94351
|
-
return /* @__PURE__ */
|
|
93935
|
+
return /* @__PURE__ */ jsx10("li", { className: "flex h-7 items-center", children: /* @__PURE__ */ jsx10(NavItemTooltip, { to: item.to, children: /* @__PURE__ */ jsx10(
|
|
94352
93936
|
NavLink,
|
|
94353
93937
|
{
|
|
94354
93938
|
to: item.to,
|
|
94355
93939
|
end: true,
|
|
94356
93940
|
className: ({ isActive }) => {
|
|
94357
|
-
return
|
|
93941
|
+
return clx3(
|
|
94358
93942
|
navLinkClassNames({
|
|
94359
93943
|
to: item.to,
|
|
94360
93944
|
isActive,
|
|
@@ -94363,7 +93947,7 @@ var NavItem = ({
|
|
|
94363
93947
|
})
|
|
94364
93948
|
);
|
|
94365
93949
|
},
|
|
94366
|
-
children: /* @__PURE__ */
|
|
93950
|
+
children: /* @__PURE__ */ jsx10(Text2, { size: "small", weight: "plus", leading: "compact", children: itemLabel })
|
|
94367
93951
|
}
|
|
94368
93952
|
) }) }, item.to);
|
|
94369
93953
|
})
|
|
@@ -94375,18 +93959,18 @@ var Icon = ({ icon, type }) => {
|
|
|
94375
93959
|
if (!icon) {
|
|
94376
93960
|
return null;
|
|
94377
93961
|
}
|
|
94378
|
-
return type === "extension" ? /* @__PURE__ */
|
|
93962
|
+
return type === "extension" ? /* @__PURE__ */ jsx10("div", { className: "shadow-borders-base bg-ui-bg-base flex h-5 w-5 items-center justify-center rounded-[4px]", children: /* @__PURE__ */ jsx10("div", { className: "h-[15px] w-[15px] overflow-hidden rounded-sm", children: icon }) }) : icon;
|
|
94379
93963
|
};
|
|
94380
93964
|
|
|
94381
93965
|
// src/components/layout/shell/shell.tsx
|
|
94382
93966
|
import { SidebarLeft, TriangleRightMini, XMark } from "@acmekit/icons";
|
|
94383
|
-
import { IconButton as
|
|
93967
|
+
import { IconButton as IconButton4, clx as clx5 } from "@acmekit/ui";
|
|
94384
93968
|
import { AnimatePresence } from "motion/react";
|
|
94385
93969
|
import { Dialog as RadixDialog2 } from "radix-ui";
|
|
94386
|
-
import { useEffect as
|
|
93970
|
+
import { useEffect as useEffect10, useState as useState10 } from "react";
|
|
94387
93971
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
94388
93972
|
import {
|
|
94389
|
-
Link
|
|
93973
|
+
Link,
|
|
94390
93974
|
Outlet as Outlet2,
|
|
94391
93975
|
useMatches,
|
|
94392
93976
|
useNavigation
|
|
@@ -94394,9 +93978,9 @@ import {
|
|
|
94394
93978
|
|
|
94395
93979
|
// src/components/common/progress-bar/progress-bar.tsx
|
|
94396
93980
|
import { motion } from "motion/react";
|
|
94397
|
-
import { jsx as
|
|
93981
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
94398
93982
|
var ProgressBar = ({ duration = 2 }) => {
|
|
94399
|
-
return /* @__PURE__ */
|
|
93983
|
+
return /* @__PURE__ */ jsx11(
|
|
94400
93984
|
motion.div,
|
|
94401
93985
|
{
|
|
94402
93986
|
className: "bg-ui-fg-subtle size-full",
|
|
@@ -94425,93 +94009,15 @@ import {
|
|
|
94425
94009
|
BellAlertDone,
|
|
94426
94010
|
InformationCircleSolid
|
|
94427
94011
|
} from "@acmekit/icons";
|
|
94428
|
-
import { clx as
|
|
94012
|
+
import { clx as clx4, Drawer, Heading, IconButton as IconButton3, Text as Text4 } from "@acmekit/ui";
|
|
94429
94013
|
import { formatDistance } from "date-fns";
|
|
94430
|
-
import { useEffect as
|
|
94014
|
+
import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
94431
94015
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
94432
94016
|
|
|
94433
94017
|
// src/components/common/file-preview/file-preview.tsx
|
|
94434
94018
|
import { ArrowDownTray, Spinner as Spinner3 } from "@acmekit/icons";
|
|
94435
|
-
import { IconButton as
|
|
94436
|
-
|
|
94437
|
-
// src/components/common/action-menu/action-menu.tsx
|
|
94438
|
-
import { DropdownMenu as DropdownMenu2, IconButton as IconButton2, clx as clx5 } from "@acmekit/ui";
|
|
94439
|
-
import { EllipsisHorizontal } from "@acmekit/icons";
|
|
94440
|
-
import { Link } from "react-router-dom";
|
|
94441
|
-
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
94442
|
-
var ActionMenu = ({
|
|
94443
|
-
groups,
|
|
94444
|
-
variant = "transparent",
|
|
94445
|
-
children
|
|
94446
|
-
}) => {
|
|
94447
|
-
const direction = useDocumentDirection();
|
|
94448
|
-
const inner = children ?? /* @__PURE__ */ jsx15(IconButton2, { size: "small", variant, children: /* @__PURE__ */ jsx15(EllipsisHorizontal, {}) });
|
|
94449
|
-
return /* @__PURE__ */ jsxs6(DropdownMenu2, { dir: direction, children: [
|
|
94450
|
-
/* @__PURE__ */ jsx15(DropdownMenu2.Trigger, { asChild: true, children: inner }),
|
|
94451
|
-
/* @__PURE__ */ jsx15(DropdownMenu2.Content, { children: groups.map((group, index) => {
|
|
94452
|
-
if (!group.actions.length) {
|
|
94453
|
-
return null;
|
|
94454
|
-
}
|
|
94455
|
-
const isLast = index === groups.length - 1;
|
|
94456
|
-
return /* @__PURE__ */ jsxs6(DropdownMenu2.Group, { children: [
|
|
94457
|
-
group.actions.map((action, index2) => {
|
|
94458
|
-
const Wrapper = action.disabledTooltip ? ({ children: children2 }) => /* @__PURE__ */ jsx15(
|
|
94459
|
-
ConditionalTooltip,
|
|
94460
|
-
{
|
|
94461
|
-
showTooltip: action.disabled,
|
|
94462
|
-
content: action.disabledTooltip,
|
|
94463
|
-
side: "right",
|
|
94464
|
-
children: /* @__PURE__ */ jsx15("div", { children: children2 })
|
|
94465
|
-
}
|
|
94466
|
-
) : "div";
|
|
94467
|
-
if (action.onClick) {
|
|
94468
|
-
return /* @__PURE__ */ jsx15(Wrapper, { children: /* @__PURE__ */ jsxs6(
|
|
94469
|
-
DropdownMenu2.Item,
|
|
94470
|
-
{
|
|
94471
|
-
disabled: action.disabled,
|
|
94472
|
-
onClick: (e) => {
|
|
94473
|
-
e.stopPropagation();
|
|
94474
|
-
action.onClick();
|
|
94475
|
-
},
|
|
94476
|
-
className: clx5(
|
|
94477
|
-
"[&_svg]:text-ui-fg-subtle flex items-center gap-x-2",
|
|
94478
|
-
{
|
|
94479
|
-
"[&_svg]:text-ui-fg-disabled": action.disabled
|
|
94480
|
-
}
|
|
94481
|
-
),
|
|
94482
|
-
children: [
|
|
94483
|
-
action.icon,
|
|
94484
|
-
/* @__PURE__ */ jsx15("span", { children: action.label })
|
|
94485
|
-
]
|
|
94486
|
-
}
|
|
94487
|
-
) }, index2);
|
|
94488
|
-
}
|
|
94489
|
-
return /* @__PURE__ */ jsx15(Wrapper, { children: /* @__PURE__ */ jsx15(
|
|
94490
|
-
DropdownMenu2.Item,
|
|
94491
|
-
{
|
|
94492
|
-
className: clx5(
|
|
94493
|
-
"[&_svg]:text-ui-fg-subtle flex items-center gap-x-2",
|
|
94494
|
-
{
|
|
94495
|
-
"[&_svg]:text-ui-fg-disabled": action.disabled
|
|
94496
|
-
}
|
|
94497
|
-
),
|
|
94498
|
-
asChild: true,
|
|
94499
|
-
disabled: action.disabled,
|
|
94500
|
-
children: /* @__PURE__ */ jsxs6(Link, { to: action.to, onClick: (e) => e.stopPropagation(), children: [
|
|
94501
|
-
action.icon,
|
|
94502
|
-
/* @__PURE__ */ jsx15("span", { children: action.label })
|
|
94503
|
-
] })
|
|
94504
|
-
}
|
|
94505
|
-
) }, index2);
|
|
94506
|
-
}),
|
|
94507
|
-
!isLast && /* @__PURE__ */ jsx15(DropdownMenu2.Separator, {})
|
|
94508
|
-
] }, index);
|
|
94509
|
-
}) })
|
|
94510
|
-
] });
|
|
94511
|
-
};
|
|
94512
|
-
|
|
94513
|
-
// src/components/common/file-preview/file-preview.tsx
|
|
94514
|
-
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
94019
|
+
import { IconButton as IconButton2, Text as Text3 } from "@acmekit/ui";
|
|
94020
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
94515
94021
|
var FilePreview = ({
|
|
94516
94022
|
filename,
|
|
94517
94023
|
url,
|
|
@@ -94520,12 +94026,12 @@ var FilePreview = ({
|
|
|
94520
94026
|
actions,
|
|
94521
94027
|
hideThumbnail
|
|
94522
94028
|
}) => {
|
|
94523
|
-
return /* @__PURE__ */
|
|
94524
|
-
/* @__PURE__ */
|
|
94525
|
-
!hideThumbnail && /* @__PURE__ */
|
|
94526
|
-
/* @__PURE__ */
|
|
94527
|
-
/* @__PURE__ */
|
|
94528
|
-
|
|
94029
|
+
return /* @__PURE__ */ jsx12("div", { className: "shadow-elevation-card-rest bg-ui-bg-component transition-fg rounded-md px-3 py-2", children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-row items-center justify-between gap-2", children: [
|
|
94030
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-row items-center gap-3", children: [
|
|
94031
|
+
!hideThumbnail && /* @__PURE__ */ jsx12(FileThumbnail, {}),
|
|
94032
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col justify-center", children: [
|
|
94033
|
+
/* @__PURE__ */ jsx12(
|
|
94034
|
+
Text3,
|
|
94529
94035
|
{
|
|
94530
94036
|
size: "small",
|
|
94531
94037
|
leading: "compact",
|
|
@@ -94533,8 +94039,8 @@ var FilePreview = ({
|
|
|
94533
94039
|
children: filename
|
|
94534
94040
|
}
|
|
94535
94041
|
),
|
|
94536
|
-
loading && !!activity && /* @__PURE__ */
|
|
94537
|
-
|
|
94042
|
+
loading && !!activity && /* @__PURE__ */ jsx12(
|
|
94043
|
+
Text3,
|
|
94538
94044
|
{
|
|
94539
94045
|
leading: "compact",
|
|
94540
94046
|
size: "xsmall",
|
|
@@ -94544,13 +94050,13 @@ var FilePreview = ({
|
|
|
94544
94050
|
)
|
|
94545
94051
|
] })
|
|
94546
94052
|
] }),
|
|
94547
|
-
loading && /* @__PURE__ */
|
|
94548
|
-
!loading && actions && /* @__PURE__ */
|
|
94549
|
-
!loading && url && /* @__PURE__ */
|
|
94053
|
+
loading && /* @__PURE__ */ jsx12(Spinner3, { className: "animate-spin" }),
|
|
94054
|
+
!loading && actions && /* @__PURE__ */ jsx12(ActionMenu, { groups: actions }),
|
|
94055
|
+
!loading && url && /* @__PURE__ */ jsx12(IconButton2, { variant: "transparent", asChild: true, children: /* @__PURE__ */ jsx12("a", { href: url, download: filename ?? `${Date.now()}`, children: /* @__PURE__ */ jsx12(ArrowDownTray, {}) }) })
|
|
94550
94056
|
] }) });
|
|
94551
94057
|
};
|
|
94552
94058
|
var FileThumbnail = () => {
|
|
94553
|
-
return /* @__PURE__ */
|
|
94059
|
+
return /* @__PURE__ */ jsxs5(
|
|
94554
94060
|
"svg",
|
|
94555
94061
|
{
|
|
94556
94062
|
width: "24",
|
|
@@ -94559,7 +94065,7 @@ var FileThumbnail = () => {
|
|
|
94559
94065
|
fill: "none",
|
|
94560
94066
|
xmlns: "http://www.w3.org/2000/svg",
|
|
94561
94067
|
children: [
|
|
94562
|
-
/* @__PURE__ */
|
|
94068
|
+
/* @__PURE__ */ jsx12(
|
|
94563
94069
|
"path",
|
|
94564
94070
|
{
|
|
94565
94071
|
d: "M20 31.75H4C1.92893 31.75 0.25 30.0711 0.25 28V4C0.25 1.92893 1.92893 0.25 4 0.25H15.9431C16.9377 0.25 17.8915 0.645088 18.5948 1.34835L22.6516 5.4052C23.3549 6.10847 23.75 7.06229 23.75 8.05685V28C23.75 30.0711 22.0711 31.75 20 31.75Z",
|
|
@@ -94568,7 +94074,7 @@ var FileThumbnail = () => {
|
|
|
94568
94074
|
"stroke-width": "0.5"
|
|
94569
94075
|
}
|
|
94570
94076
|
),
|
|
94571
|
-
/* @__PURE__ */
|
|
94077
|
+
/* @__PURE__ */ jsx12(
|
|
94572
94078
|
"path",
|
|
94573
94079
|
{
|
|
94574
94080
|
opacity: "0.4",
|
|
@@ -94578,8 +94084,8 @@ var FileThumbnail = () => {
|
|
|
94578
94084
|
"stroke-width": "0.428571"
|
|
94579
94085
|
}
|
|
94580
94086
|
),
|
|
94581
|
-
/* @__PURE__ */
|
|
94582
|
-
/* @__PURE__ */
|
|
94087
|
+
/* @__PURE__ */ jsxs5("defs", { children: [
|
|
94088
|
+
/* @__PURE__ */ jsxs5(
|
|
94583
94089
|
"linearGradient",
|
|
94584
94090
|
{
|
|
94585
94091
|
id: "paint0_linear_6594_388107",
|
|
@@ -94589,12 +94095,12 @@ var FileThumbnail = () => {
|
|
|
94589
94095
|
y2: "32",
|
|
94590
94096
|
gradientUnits: "userSpaceOnUse",
|
|
94591
94097
|
children: [
|
|
94592
|
-
/* @__PURE__ */
|
|
94593
|
-
/* @__PURE__ */
|
|
94098
|
+
/* @__PURE__ */ jsx12("stop", { "stop-color": "#F4F4F5" }),
|
|
94099
|
+
/* @__PURE__ */ jsx12("stop", { offset: "1", "stop-color": "#E4E4E7" })
|
|
94594
94100
|
]
|
|
94595
94101
|
}
|
|
94596
94102
|
),
|
|
94597
|
-
/* @__PURE__ */
|
|
94103
|
+
/* @__PURE__ */ jsxs5(
|
|
94598
94104
|
"linearGradient",
|
|
94599
94105
|
{
|
|
94600
94106
|
id: "paint1_linear_6594_388107",
|
|
@@ -94604,12 +94110,12 @@ var FileThumbnail = () => {
|
|
|
94604
94110
|
y2: "32",
|
|
94605
94111
|
gradientUnits: "userSpaceOnUse",
|
|
94606
94112
|
children: [
|
|
94607
|
-
/* @__PURE__ */
|
|
94608
|
-
/* @__PURE__ */
|
|
94113
|
+
/* @__PURE__ */ jsx12("stop", { "stop-color": "#E4E4E7" }),
|
|
94114
|
+
/* @__PURE__ */ jsx12("stop", { offset: "1", "stop-color": "#D4D4D8" })
|
|
94609
94115
|
]
|
|
94610
94116
|
}
|
|
94611
94117
|
),
|
|
94612
|
-
/* @__PURE__ */
|
|
94118
|
+
/* @__PURE__ */ jsxs5(
|
|
94613
94119
|
"linearGradient",
|
|
94614
94120
|
{
|
|
94615
94121
|
id: "paint2_linear_6594_388107",
|
|
@@ -94619,12 +94125,12 @@ var FileThumbnail = () => {
|
|
|
94619
94125
|
y2: "21.25",
|
|
94620
94126
|
gradientUnits: "userSpaceOnUse",
|
|
94621
94127
|
children: [
|
|
94622
|
-
/* @__PURE__ */
|
|
94623
|
-
/* @__PURE__ */
|
|
94128
|
+
/* @__PURE__ */ jsx12("stop", { "stop-color": "#52525B" }),
|
|
94129
|
+
/* @__PURE__ */ jsx12("stop", { offset: "1", "stop-color": "#A1A1AA" })
|
|
94624
94130
|
]
|
|
94625
94131
|
}
|
|
94626
94132
|
),
|
|
94627
|
-
/* @__PURE__ */
|
|
94133
|
+
/* @__PURE__ */ jsxs5(
|
|
94628
94134
|
"linearGradient",
|
|
94629
94135
|
{
|
|
94630
94136
|
id: "paint3_linear_6594_388107",
|
|
@@ -94634,8 +94140,8 @@ var FileThumbnail = () => {
|
|
|
94634
94140
|
y2: "21.25",
|
|
94635
94141
|
gradientUnits: "userSpaceOnUse",
|
|
94636
94142
|
children: [
|
|
94637
|
-
/* @__PURE__ */
|
|
94638
|
-
/* @__PURE__ */
|
|
94143
|
+
/* @__PURE__ */ jsx12("stop", { "stop-color": "#18181B" }),
|
|
94144
|
+
/* @__PURE__ */ jsx12("stop", { offset: "1", "stop-color": "#52525B" })
|
|
94639
94145
|
]
|
|
94640
94146
|
}
|
|
94641
94147
|
)
|
|
@@ -94647,10 +94153,10 @@ var FileThumbnail = () => {
|
|
|
94647
94153
|
|
|
94648
94154
|
// src/components/common/infinite-list/infinite-list.tsx
|
|
94649
94155
|
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
94650
|
-
import { useEffect as
|
|
94156
|
+
import { useEffect as useEffect8, useMemo as useMemo4, useRef as useRef2 } from "react";
|
|
94651
94157
|
import { toast } from "@acmekit/ui";
|
|
94652
94158
|
import { Spinner as Spinner4 } from "@acmekit/icons";
|
|
94653
|
-
import { jsx as
|
|
94159
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
94654
94160
|
var InfiniteList = ({
|
|
94655
94161
|
queryKey,
|
|
94656
94162
|
queryFn,
|
|
@@ -94697,11 +94203,11 @@ var InfiniteList = ({
|
|
|
94697
94203
|
const endObserver = useRef2();
|
|
94698
94204
|
const fetchNextPageRef = useRef2(fetchNextPage);
|
|
94699
94205
|
const fetchPreviousPageRef = useRef2(fetchPreviousPage);
|
|
94700
|
-
|
|
94206
|
+
useEffect8(() => {
|
|
94701
94207
|
fetchNextPageRef.current = fetchNextPage;
|
|
94702
94208
|
fetchPreviousPageRef.current = fetchPreviousPage;
|
|
94703
94209
|
}, [fetchNextPage, fetchPreviousPage]);
|
|
94704
|
-
|
|
94210
|
+
useEffect8(() => {
|
|
94705
94211
|
if (isPending) {
|
|
94706
94212
|
return;
|
|
94707
94213
|
}
|
|
@@ -94745,31 +94251,31 @@ var InfiniteList = ({
|
|
|
94745
94251
|
isFetching,
|
|
94746
94252
|
isPending
|
|
94747
94253
|
]);
|
|
94748
|
-
|
|
94254
|
+
useEffect8(() => {
|
|
94749
94255
|
if (error) {
|
|
94750
94256
|
toast.error(error.message);
|
|
94751
94257
|
}
|
|
94752
94258
|
}, [error]);
|
|
94753
94259
|
if (isPending) {
|
|
94754
|
-
return /* @__PURE__ */
|
|
94260
|
+
return /* @__PURE__ */ jsx13("div", { className: "flex h-full flex-col items-center justify-center", children: /* @__PURE__ */ jsx13(Spinner4, { className: "animate-spin" }) });
|
|
94755
94261
|
}
|
|
94756
|
-
return /* @__PURE__ */
|
|
94757
|
-
items?.length ? items.map((item) => /* @__PURE__ */
|
|
94758
|
-
isFetching && /* @__PURE__ */
|
|
94262
|
+
return /* @__PURE__ */ jsxs6("div", { ref: parentRef, className: "h-full", children: [
|
|
94263
|
+
items?.length ? items.map((item) => /* @__PURE__ */ jsx13("div", { children: renderItem(item) }, item.id)) : renderEmpty(),
|
|
94264
|
+
isFetching && /* @__PURE__ */ jsx13("div", { className: "flex flex-col items-center justify-center py-4", children: /* @__PURE__ */ jsx13(Spinner4, { className: "animate-spin" }) })
|
|
94759
94265
|
] });
|
|
94760
94266
|
};
|
|
94761
94267
|
|
|
94762
94268
|
// src/components/layout/notifications/notifications.tsx
|
|
94763
|
-
import { Fragment as Fragment2, jsx as
|
|
94269
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
94764
94270
|
var LAST_READ_NOTIFICATION_KEY = "notificationsLastReadAt";
|
|
94765
94271
|
var Notifications = () => {
|
|
94766
94272
|
const { t: t2 } = useTranslation5();
|
|
94767
|
-
const [open, setOpen] =
|
|
94273
|
+
const [open, setOpen] = useState9(false);
|
|
94768
94274
|
const [hasUnread, setHasUnread] = useUnreadNotifications();
|
|
94769
|
-
const [lastReadAt, setLastReadAt] =
|
|
94275
|
+
const [lastReadAt, setLastReadAt] = useState9(
|
|
94770
94276
|
localStorage.getItem(LAST_READ_NOTIFICATION_KEY)
|
|
94771
94277
|
);
|
|
94772
|
-
|
|
94278
|
+
useEffect9(() => {
|
|
94773
94279
|
const onKeyDown = (e) => {
|
|
94774
94280
|
if (e.key === "n" && (e.metaKey || e.ctrlKey)) {
|
|
94775
94281
|
setOpen((prev) => !prev);
|
|
@@ -94790,22 +94296,22 @@ var Notifications = () => {
|
|
|
94790
94296
|
setLastReadAt(localStorage.getItem(LAST_READ_NOTIFICATION_KEY));
|
|
94791
94297
|
}
|
|
94792
94298
|
};
|
|
94793
|
-
return /* @__PURE__ */
|
|
94794
|
-
/* @__PURE__ */
|
|
94795
|
-
|
|
94299
|
+
return /* @__PURE__ */ jsxs7(Drawer, { open, onOpenChange: handleOnOpen, children: [
|
|
94300
|
+
/* @__PURE__ */ jsx14(Drawer.Trigger, { asChild: true, children: /* @__PURE__ */ jsx14(
|
|
94301
|
+
IconButton3,
|
|
94796
94302
|
{
|
|
94797
94303
|
variant: "transparent",
|
|
94798
94304
|
size: "small",
|
|
94799
94305
|
className: "text-ui-fg-muted hover:text-ui-fg-subtle",
|
|
94800
|
-
children: hasUnread ? /* @__PURE__ */
|
|
94306
|
+
children: hasUnread ? /* @__PURE__ */ jsx14(BellAlertDone, {}) : /* @__PURE__ */ jsx14(BellAlert, {})
|
|
94801
94307
|
}
|
|
94802
94308
|
) }),
|
|
94803
|
-
/* @__PURE__ */
|
|
94804
|
-
/* @__PURE__ */
|
|
94805
|
-
/* @__PURE__ */
|
|
94806
|
-
/* @__PURE__ */
|
|
94309
|
+
/* @__PURE__ */ jsxs7(Drawer.Content, { children: [
|
|
94310
|
+
/* @__PURE__ */ jsxs7(Drawer.Header, { children: [
|
|
94311
|
+
/* @__PURE__ */ jsx14(Drawer.Title, { asChild: true, children: /* @__PURE__ */ jsx14(Heading, { children: t2("notifications.domain") }) }),
|
|
94312
|
+
/* @__PURE__ */ jsx14(Drawer.Description, { className: "sr-only", children: t2("notifications.accessibility.description") })
|
|
94807
94313
|
] }),
|
|
94808
|
-
/* @__PURE__ */
|
|
94314
|
+
/* @__PURE__ */ jsx14(Drawer.Body, { className: "overflow-y-auto px-0", children: /* @__PURE__ */ jsx14(
|
|
94809
94315
|
InfiniteList,
|
|
94810
94316
|
{
|
|
94811
94317
|
responseKey: "notifications",
|
|
@@ -94815,9 +94321,9 @@ var Notifications = () => {
|
|
|
94815
94321
|
channel: "feed"
|
|
94816
94322
|
}),
|
|
94817
94323
|
queryOptions: { enabled: open },
|
|
94818
|
-
renderEmpty: () => /* @__PURE__ */
|
|
94324
|
+
renderEmpty: () => /* @__PURE__ */ jsx14(NotificationsEmptyState, { t: t2 }),
|
|
94819
94325
|
renderItem: (notification) => {
|
|
94820
|
-
return /* @__PURE__ */
|
|
94326
|
+
return /* @__PURE__ */ jsx14(
|
|
94821
94327
|
Notification,
|
|
94822
94328
|
{
|
|
94823
94329
|
notification,
|
|
@@ -94839,18 +94345,18 @@ var Notification = ({
|
|
|
94839
94345
|
if (!data?.title) {
|
|
94840
94346
|
return null;
|
|
94841
94347
|
}
|
|
94842
|
-
return /* @__PURE__ */
|
|
94843
|
-
/* @__PURE__ */
|
|
94844
|
-
/* @__PURE__ */
|
|
94845
|
-
/* @__PURE__ */
|
|
94846
|
-
/* @__PURE__ */
|
|
94847
|
-
/* @__PURE__ */
|
|
94848
|
-
/* @__PURE__ */
|
|
94849
|
-
/* @__PURE__ */
|
|
94850
|
-
|
|
94348
|
+
return /* @__PURE__ */ jsx14(Fragment2, { children: /* @__PURE__ */ jsxs7("div", { className: "relative flex items-start justify-center gap-3 border-b p-6", children: [
|
|
94349
|
+
/* @__PURE__ */ jsx14("div", { className: "text-ui-fg-muted flex size-5 items-center justify-center", children: /* @__PURE__ */ jsx14(InformationCircleSolid, {}) }),
|
|
94350
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col gap-y-3", children: [
|
|
94351
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
|
|
94352
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between", children: [
|
|
94353
|
+
/* @__PURE__ */ jsx14(Text4, { size: "small", leading: "compact", weight: "plus", children: data.title }),
|
|
94354
|
+
/* @__PURE__ */ jsxs7("div", { className: "align-center flex items-center justify-center gap-2", children: [
|
|
94355
|
+
/* @__PURE__ */ jsx14(
|
|
94356
|
+
Text4,
|
|
94851
94357
|
{
|
|
94852
94358
|
as: "span",
|
|
94853
|
-
className:
|
|
94359
|
+
className: clx4("text-ui-fg-subtle", {
|
|
94854
94360
|
"text-ui-fg-base": unread
|
|
94855
94361
|
}),
|
|
94856
94362
|
size: "small",
|
|
@@ -94861,7 +94367,7 @@ var Notification = ({
|
|
|
94861
94367
|
})
|
|
94862
94368
|
}
|
|
94863
94369
|
),
|
|
94864
|
-
unread && /* @__PURE__ */
|
|
94370
|
+
unread && /* @__PURE__ */ jsx14(
|
|
94865
94371
|
"div",
|
|
94866
94372
|
{
|
|
94867
94373
|
className: "bg-ui-bg-interactive h-2 w-2 rounded",
|
|
@@ -94870,8 +94376,8 @@ var Notification = ({
|
|
|
94870
94376
|
)
|
|
94871
94377
|
] })
|
|
94872
94378
|
] }),
|
|
94873
|
-
!!data.description && /* @__PURE__ */
|
|
94874
|
-
|
|
94379
|
+
!!data.description && /* @__PURE__ */ jsx14(
|
|
94380
|
+
Text4,
|
|
94875
94381
|
{
|
|
94876
94382
|
className: "text-ui-fg-subtle whitespace-pre-line",
|
|
94877
94383
|
size: "small",
|
|
@@ -94879,7 +94385,7 @@ var Notification = ({
|
|
|
94879
94385
|
}
|
|
94880
94386
|
)
|
|
94881
94387
|
] }),
|
|
94882
|
-
!!data?.file?.url && /* @__PURE__ */
|
|
94388
|
+
!!data?.file?.url && /* @__PURE__ */ jsx14(
|
|
94883
94389
|
FilePreview,
|
|
94884
94390
|
{
|
|
94885
94391
|
filename: data.file.filename ?? "",
|
|
@@ -94891,11 +94397,11 @@ var Notification = ({
|
|
|
94891
94397
|
] }) });
|
|
94892
94398
|
};
|
|
94893
94399
|
var NotificationsEmptyState = ({ t: t2 }) => {
|
|
94894
|
-
return /* @__PURE__ */
|
|
94895
|
-
/* @__PURE__ */
|
|
94896
|
-
/* @__PURE__ */
|
|
94897
|
-
/* @__PURE__ */
|
|
94898
|
-
|
|
94400
|
+
return /* @__PURE__ */ jsxs7("div", { className: "flex h-full flex-col items-center justify-center", children: [
|
|
94401
|
+
/* @__PURE__ */ jsx14(BellAlertDone, {}),
|
|
94402
|
+
/* @__PURE__ */ jsx14(Text4, { size: "small", leading: "compact", weight: "plus", className: "mt-3", children: t2("notifications.emptyState.title") }),
|
|
94403
|
+
/* @__PURE__ */ jsx14(
|
|
94404
|
+
Text4,
|
|
94899
94405
|
{
|
|
94900
94406
|
size: "small",
|
|
94901
94407
|
className: "text-ui-fg-muted mt-1 max-w-[294px] text-center",
|
|
@@ -94905,13 +94411,13 @@ var NotificationsEmptyState = ({ t: t2 }) => {
|
|
|
94905
94411
|
] });
|
|
94906
94412
|
};
|
|
94907
94413
|
var useUnreadNotifications = () => {
|
|
94908
|
-
const [hasUnread, setHasUnread] =
|
|
94414
|
+
const [hasUnread, setHasUnread] = useState9(false);
|
|
94909
94415
|
const { notifications } = useNotifications(
|
|
94910
94416
|
{ limit: 1, offset: 0, fields: "created_at" },
|
|
94911
94417
|
{ refetchInterval: 6e4 }
|
|
94912
94418
|
);
|
|
94913
94419
|
const lastNotification = notifications?.[0];
|
|
94914
|
-
|
|
94420
|
+
useEffect9(() => {
|
|
94915
94421
|
if (!lastNotification) {
|
|
94916
94422
|
return;
|
|
94917
94423
|
}
|
|
@@ -94926,37 +94432,37 @@ var useUnreadNotifications = () => {
|
|
|
94926
94432
|
};
|
|
94927
94433
|
|
|
94928
94434
|
// src/components/layout/shell/shell.tsx
|
|
94929
|
-
import { jsx as
|
|
94435
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
94930
94436
|
var Shell = ({ children }) => {
|
|
94931
94437
|
const globalShortcuts = useGlobalShortcuts();
|
|
94932
94438
|
const navigation = useNavigation();
|
|
94933
94439
|
const loading = navigation.state === "loading";
|
|
94934
|
-
return /* @__PURE__ */
|
|
94935
|
-
/* @__PURE__ */
|
|
94936
|
-
/* @__PURE__ */
|
|
94937
|
-
/* @__PURE__ */
|
|
94938
|
-
/* @__PURE__ */
|
|
94440
|
+
return /* @__PURE__ */ jsx15(KeybindProvider, { shortcuts: globalShortcuts, children: /* @__PURE__ */ jsxs8("div", { className: "relative flex h-screen flex-col items-start overflow-hidden lg:flex-row", children: [
|
|
94441
|
+
/* @__PURE__ */ jsx15(NavigationBar, { loading }),
|
|
94442
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
94443
|
+
/* @__PURE__ */ jsx15(MobileSidebarContainer, { children }),
|
|
94444
|
+
/* @__PURE__ */ jsx15(DesktopSidebarContainer, { children })
|
|
94939
94445
|
] }),
|
|
94940
|
-
/* @__PURE__ */
|
|
94941
|
-
/* @__PURE__ */
|
|
94942
|
-
/* @__PURE__ */
|
|
94446
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex h-screen w-full flex-col overflow-auto", children: [
|
|
94447
|
+
/* @__PURE__ */ jsx15(Topbar, {}),
|
|
94448
|
+
/* @__PURE__ */ jsx15(
|
|
94943
94449
|
"main",
|
|
94944
94450
|
{
|
|
94945
|
-
className:
|
|
94451
|
+
className: clx5(
|
|
94946
94452
|
"flex h-full w-full flex-col items-center overflow-y-auto transition-opacity delay-200 duration-200",
|
|
94947
94453
|
{
|
|
94948
94454
|
"opacity-25": loading
|
|
94949
94455
|
}
|
|
94950
94456
|
),
|
|
94951
|
-
children: /* @__PURE__ */
|
|
94457
|
+
children: /* @__PURE__ */ jsx15(Gutter, { children: /* @__PURE__ */ jsx15(Outlet2, {}) })
|
|
94952
94458
|
}
|
|
94953
94459
|
)
|
|
94954
94460
|
] })
|
|
94955
94461
|
] }) });
|
|
94956
94462
|
};
|
|
94957
94463
|
var NavigationBar = ({ loading }) => {
|
|
94958
|
-
const [showBar, setShowBar] =
|
|
94959
|
-
|
|
94464
|
+
const [showBar, setShowBar] = useState10(false);
|
|
94465
|
+
useEffect10(() => {
|
|
94960
94466
|
let timeout;
|
|
94961
94467
|
if (loading) {
|
|
94962
94468
|
timeout = setTimeout(() => {
|
|
@@ -94969,10 +94475,10 @@ var NavigationBar = ({ loading }) => {
|
|
|
94969
94475
|
clearTimeout(timeout);
|
|
94970
94476
|
};
|
|
94971
94477
|
}, [loading]);
|
|
94972
|
-
return /* @__PURE__ */
|
|
94478
|
+
return /* @__PURE__ */ jsx15("div", { className: "fixed inset-x-0 top-0 z-50 h-1", children: /* @__PURE__ */ jsx15(AnimatePresence, { children: showBar ? /* @__PURE__ */ jsx15(ProgressBar, {}) : null }) });
|
|
94973
94479
|
};
|
|
94974
94480
|
var Gutter = ({ children }) => {
|
|
94975
|
-
return /* @__PURE__ */
|
|
94481
|
+
return /* @__PURE__ */ jsx15("div", { className: "flex w-full max-w-[1600px] flex-col gap-y-2 p-3", children });
|
|
94976
94482
|
};
|
|
94977
94483
|
var Breadcrumbs = () => {
|
|
94978
94484
|
const matches = useMatches();
|
|
@@ -94991,29 +94497,29 @@ var Breadcrumbs = () => {
|
|
|
94991
94497
|
path: match.pathname
|
|
94992
94498
|
};
|
|
94993
94499
|
}).filter(Boolean);
|
|
94994
|
-
return /* @__PURE__ */
|
|
94500
|
+
return /* @__PURE__ */ jsx15(
|
|
94995
94501
|
"ol",
|
|
94996
94502
|
{
|
|
94997
|
-
className:
|
|
94503
|
+
className: clx5(
|
|
94998
94504
|
"text-ui-fg-muted txt-compact-small-plus flex select-none items-center"
|
|
94999
94505
|
),
|
|
95000
94506
|
children: crumbs.map((crumb, index) => {
|
|
95001
94507
|
const isLast = index === crumbs.length - 1;
|
|
95002
94508
|
const isSingle = crumbs.length === 1;
|
|
95003
|
-
return /* @__PURE__ */
|
|
95004
|
-
!isLast ? /* @__PURE__ */
|
|
95005
|
-
|
|
94509
|
+
return /* @__PURE__ */ jsxs8("li", { className: clx5("flex items-center"), children: [
|
|
94510
|
+
!isLast ? /* @__PURE__ */ jsx15(
|
|
94511
|
+
Link,
|
|
95006
94512
|
{
|
|
95007
94513
|
className: "transition-fg hover:text-ui-fg-subtle",
|
|
95008
94514
|
to: crumb.path,
|
|
95009
94515
|
children: crumb.label
|
|
95010
94516
|
}
|
|
95011
|
-
) : /* @__PURE__ */
|
|
95012
|
-
!isSingle && /* @__PURE__ */
|
|
95013
|
-
/* @__PURE__ */
|
|
94517
|
+
) : /* @__PURE__ */ jsxs8("div", { children: [
|
|
94518
|
+
!isSingle && /* @__PURE__ */ jsx15("span", { className: "block lg:hidden", children: "..." }),
|
|
94519
|
+
/* @__PURE__ */ jsx15(
|
|
95014
94520
|
"span",
|
|
95015
94521
|
{
|
|
95016
|
-
className:
|
|
94522
|
+
className: clx5({
|
|
95017
94523
|
"hidden lg:block": !isSingle
|
|
95018
94524
|
}),
|
|
95019
94525
|
children: crumb.label
|
|
@@ -95021,7 +94527,7 @@ var Breadcrumbs = () => {
|
|
|
95021
94527
|
index
|
|
95022
94528
|
)
|
|
95023
94529
|
] }),
|
|
95024
|
-
!isLast && /* @__PURE__ */
|
|
94530
|
+
!isLast && /* @__PURE__ */ jsx15("span", { className: "mx-2", children: /* @__PURE__ */ jsx15(TriangleRightMini, { className: "rtl:rotate-180" }) })
|
|
95025
94531
|
] }, index);
|
|
95026
94532
|
})
|
|
95027
94533
|
}
|
|
@@ -95029,44 +94535,44 @@ var Breadcrumbs = () => {
|
|
|
95029
94535
|
};
|
|
95030
94536
|
var ToggleSidebar = () => {
|
|
95031
94537
|
const { toggle } = useSidebar();
|
|
95032
|
-
return /* @__PURE__ */
|
|
95033
|
-
/* @__PURE__ */
|
|
95034
|
-
|
|
94538
|
+
return /* @__PURE__ */ jsxs8("div", { children: [
|
|
94539
|
+
/* @__PURE__ */ jsx15(
|
|
94540
|
+
IconButton4,
|
|
95035
94541
|
{
|
|
95036
94542
|
className: "hidden lg:flex",
|
|
95037
94543
|
variant: "transparent",
|
|
95038
94544
|
onClick: () => toggle("desktop"),
|
|
95039
94545
|
size: "small",
|
|
95040
|
-
children: /* @__PURE__ */
|
|
94546
|
+
children: /* @__PURE__ */ jsx15(SidebarLeft, { className: "text-ui-fg-muted rtl:rotate-180" })
|
|
95041
94547
|
}
|
|
95042
94548
|
),
|
|
95043
|
-
/* @__PURE__ */
|
|
95044
|
-
|
|
94549
|
+
/* @__PURE__ */ jsx15(
|
|
94550
|
+
IconButton4,
|
|
95045
94551
|
{
|
|
95046
94552
|
className: "hidden max-lg:flex",
|
|
95047
94553
|
variant: "transparent",
|
|
95048
94554
|
onClick: () => toggle("mobile"),
|
|
95049
94555
|
size: "small",
|
|
95050
|
-
children: /* @__PURE__ */
|
|
94556
|
+
children: /* @__PURE__ */ jsx15(SidebarLeft, { className: "text-ui-fg-muted rtl:rotate-180" })
|
|
95051
94557
|
}
|
|
95052
94558
|
)
|
|
95053
94559
|
] });
|
|
95054
94560
|
};
|
|
95055
94561
|
var Topbar = () => {
|
|
95056
|
-
return /* @__PURE__ */
|
|
95057
|
-
/* @__PURE__ */
|
|
95058
|
-
/* @__PURE__ */
|
|
95059
|
-
/* @__PURE__ */
|
|
94562
|
+
return /* @__PURE__ */ jsxs8("div", { className: "grid w-full grid-cols-2 border-b p-3", children: [
|
|
94563
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-x-1.5", children: [
|
|
94564
|
+
/* @__PURE__ */ jsx15(ToggleSidebar, {}),
|
|
94565
|
+
/* @__PURE__ */ jsx15(Breadcrumbs, {})
|
|
95060
94566
|
] }),
|
|
95061
|
-
/* @__PURE__ */
|
|
94567
|
+
/* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end gap-x-3", children: /* @__PURE__ */ jsx15(Notifications, {}) })
|
|
95062
94568
|
] });
|
|
95063
94569
|
};
|
|
95064
94570
|
var DesktopSidebarContainer = ({ children }) => {
|
|
95065
94571
|
const { desktop } = useSidebar();
|
|
95066
|
-
return /* @__PURE__ */
|
|
94572
|
+
return /* @__PURE__ */ jsx15(
|
|
95067
94573
|
"div",
|
|
95068
94574
|
{
|
|
95069
|
-
className:
|
|
94575
|
+
className: clx5("hidden h-screen w-[220px] border-e", {
|
|
95070
94576
|
"lg:flex": desktop
|
|
95071
94577
|
}),
|
|
95072
94578
|
children
|
|
@@ -95076,36 +94582,36 @@ var DesktopSidebarContainer = ({ children }) => {
|
|
|
95076
94582
|
var MobileSidebarContainer = ({ children }) => {
|
|
95077
94583
|
const { t: t2 } = useTranslation6();
|
|
95078
94584
|
const { mobile, toggle } = useSidebar();
|
|
95079
|
-
return /* @__PURE__ */
|
|
95080
|
-
/* @__PURE__ */
|
|
94585
|
+
return /* @__PURE__ */ jsx15(RadixDialog2.Root, { open: mobile, onOpenChange: () => toggle("mobile"), children: /* @__PURE__ */ jsxs8(RadixDialog2.Portal, { children: [
|
|
94586
|
+
/* @__PURE__ */ jsx15(
|
|
95081
94587
|
RadixDialog2.Overlay,
|
|
95082
94588
|
{
|
|
95083
|
-
className:
|
|
94589
|
+
className: clx5(
|
|
95084
94590
|
"bg-ui-bg-overlay fixed inset-0",
|
|
95085
94591
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
95086
94592
|
)
|
|
95087
94593
|
}
|
|
95088
94594
|
),
|
|
95089
|
-
/* @__PURE__ */
|
|
94595
|
+
/* @__PURE__ */ jsxs8(
|
|
95090
94596
|
RadixDialog2.Content,
|
|
95091
94597
|
{
|
|
95092
|
-
className:
|
|
94598
|
+
className: clx5(
|
|
95093
94599
|
"bg-ui-bg-subtle shadow-elevation-modal fixed inset-y-2 start-2 flex w-full max-w-[304px] flex-col overflow-hidden rounded-lg border-r",
|
|
95094
94600
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-start-1/2 data-[state=open]:slide-in-from-start-1/2 duration-200"
|
|
95095
94601
|
),
|
|
95096
94602
|
children: [
|
|
95097
|
-
/* @__PURE__ */
|
|
95098
|
-
/* @__PURE__ */
|
|
95099
|
-
|
|
94603
|
+
/* @__PURE__ */ jsxs8("div", { className: "p-3", children: [
|
|
94604
|
+
/* @__PURE__ */ jsx15(RadixDialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
94605
|
+
IconButton4,
|
|
95100
94606
|
{
|
|
95101
94607
|
size: "small",
|
|
95102
94608
|
variant: "transparent",
|
|
95103
94609
|
className: "text-ui-fg-subtle",
|
|
95104
|
-
children: /* @__PURE__ */
|
|
94610
|
+
children: /* @__PURE__ */ jsx15(XMark, {})
|
|
95105
94611
|
}
|
|
95106
94612
|
) }),
|
|
95107
|
-
/* @__PURE__ */
|
|
95108
|
-
/* @__PURE__ */
|
|
94613
|
+
/* @__PURE__ */ jsx15(RadixDialog2.Title, { className: "sr-only", children: t2("app.nav.accessibility.title") }),
|
|
94614
|
+
/* @__PURE__ */ jsx15(RadixDialog2.Description, { className: "sr-only", children: t2("app.nav.accessibility.description") })
|
|
95109
94615
|
] }),
|
|
95110
94616
|
children
|
|
95111
94617
|
]
|
|
@@ -95115,13 +94621,13 @@ var MobileSidebarContainer = ({ children }) => {
|
|
|
95115
94621
|
};
|
|
95116
94622
|
|
|
95117
94623
|
// src/components/layout/main-layout/main-layout.tsx
|
|
95118
|
-
import { Link as
|
|
94624
|
+
import { Link as Link3, useLocation as useLocation6, useNavigate as useNavigate4 } from "react-router-dom";
|
|
95119
94625
|
|
|
95120
94626
|
// src/components/layout/user-menu/user-menu.tsx
|
|
95121
94627
|
import {
|
|
95122
94628
|
BookOpen,
|
|
95123
94629
|
CircleHalfSolid,
|
|
95124
|
-
EllipsisHorizontal
|
|
94630
|
+
EllipsisHorizontal,
|
|
95125
94631
|
Keyboard,
|
|
95126
94632
|
OpenRectArrowOut,
|
|
95127
94633
|
TimelineVertical,
|
|
@@ -95130,59 +94636,59 @@ import {
|
|
|
95130
94636
|
} from "@acmekit/icons";
|
|
95131
94637
|
import {
|
|
95132
94638
|
Avatar,
|
|
95133
|
-
DropdownMenu as
|
|
95134
|
-
Heading as
|
|
95135
|
-
IconButton as
|
|
94639
|
+
DropdownMenu as DropdownMenu2,
|
|
94640
|
+
Heading as Heading2,
|
|
94641
|
+
IconButton as IconButton5,
|
|
95136
94642
|
Input,
|
|
95137
94643
|
Kbd as Kbd3,
|
|
95138
|
-
Text as
|
|
95139
|
-
clx as
|
|
94644
|
+
Text as Text5,
|
|
94645
|
+
clx as clx6
|
|
95140
94646
|
} from "@acmekit/ui";
|
|
95141
94647
|
import { Dialog as RadixDialog3 } from "radix-ui";
|
|
95142
94648
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
95143
|
-
import { useState as
|
|
95144
|
-
import { Link as
|
|
95145
|
-
import { jsx as
|
|
94649
|
+
import { useState as useState11 } from "react";
|
|
94650
|
+
import { Link as Link2, useLocation as useLocation5, useNavigate as useNavigate3 } from "react-router-dom";
|
|
94651
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
95146
94652
|
var UserMenu = () => {
|
|
95147
94653
|
const { t: t2 } = useTranslation7();
|
|
95148
94654
|
const location = useLocation5();
|
|
95149
94655
|
const direction = useDocumentDirection();
|
|
95150
|
-
const [openMenu, setOpenMenu] =
|
|
95151
|
-
const [openModal, setOpenModal] =
|
|
94656
|
+
const [openMenu, setOpenMenu] = useState11(false);
|
|
94657
|
+
const [openModal, setOpenModal] = useState11(false);
|
|
95152
94658
|
const toggleModal = () => {
|
|
95153
94659
|
setOpenMenu(false);
|
|
95154
94660
|
setOpenModal(!openModal);
|
|
95155
94661
|
};
|
|
95156
|
-
return /* @__PURE__ */
|
|
95157
|
-
/* @__PURE__ */
|
|
95158
|
-
/* @__PURE__ */
|
|
95159
|
-
/* @__PURE__ */
|
|
95160
|
-
/* @__PURE__ */
|
|
95161
|
-
/* @__PURE__ */
|
|
95162
|
-
/* @__PURE__ */
|
|
95163
|
-
/* @__PURE__ */
|
|
94662
|
+
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
94663
|
+
/* @__PURE__ */ jsxs9(DropdownMenu2, { dir: direction, open: openMenu, onOpenChange: setOpenMenu, children: [
|
|
94664
|
+
/* @__PURE__ */ jsx16(UserBadge, {}),
|
|
94665
|
+
/* @__PURE__ */ jsxs9(DropdownMenu2.Content, { className: "min-w-[var(--radix-dropdown-menu-trigger-width)] max-w-[var(--radix-dropdown-menu-trigger-width)]", children: [
|
|
94666
|
+
/* @__PURE__ */ jsx16(UserItem, {}),
|
|
94667
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Separator, {}),
|
|
94668
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Item, { asChild: true, children: /* @__PURE__ */ jsxs9(Link2, { to: "/settings/profile", state: { from: location.pathname }, children: [
|
|
94669
|
+
/* @__PURE__ */ jsx16(UserIcon, { className: "text-ui-fg-subtle me-2" }),
|
|
95164
94670
|
t2("app.menus.user.profileSettings")
|
|
95165
94671
|
] }) }),
|
|
95166
|
-
/* @__PURE__ */
|
|
95167
|
-
/* @__PURE__ */
|
|
95168
|
-
/* @__PURE__ */
|
|
94672
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Separator, {}),
|
|
94673
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Item, { asChild: true, children: /* @__PURE__ */ jsxs9(Link2, { to: "https://docs.acmekit.com", target: "_blank", children: [
|
|
94674
|
+
/* @__PURE__ */ jsx16(BookOpen, { className: "text-ui-fg-subtle me-2" }),
|
|
95169
94675
|
t2("app.menus.user.documentation")
|
|
95170
94676
|
] }) }),
|
|
95171
|
-
/* @__PURE__ */
|
|
95172
|
-
/* @__PURE__ */
|
|
94677
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Item, { asChild: true, children: /* @__PURE__ */ jsxs9(Link2, { to: "https://acmekit.com/changelog/", target: "_blank", children: [
|
|
94678
|
+
/* @__PURE__ */ jsx16(TimelineVertical, { className: "text-ui-fg-subtle me-2" }),
|
|
95173
94679
|
t2("app.menus.user.changelog")
|
|
95174
94680
|
] }) }),
|
|
95175
|
-
/* @__PURE__ */
|
|
95176
|
-
/* @__PURE__ */
|
|
95177
|
-
/* @__PURE__ */
|
|
94681
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Separator, {}),
|
|
94682
|
+
/* @__PURE__ */ jsxs9(DropdownMenu2.Item, { onClick: toggleModal, children: [
|
|
94683
|
+
/* @__PURE__ */ jsx16(Keyboard, { className: "text-ui-fg-subtle me-2" }),
|
|
95178
94684
|
t2("app.menus.user.shortcuts")
|
|
95179
94685
|
] }),
|
|
95180
|
-
/* @__PURE__ */
|
|
95181
|
-
/* @__PURE__ */
|
|
95182
|
-
/* @__PURE__ */
|
|
94686
|
+
/* @__PURE__ */ jsx16(ThemeToggle, {}),
|
|
94687
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.Separator, {}),
|
|
94688
|
+
/* @__PURE__ */ jsx16(Logout, {})
|
|
95183
94689
|
] })
|
|
95184
94690
|
] }),
|
|
95185
|
-
/* @__PURE__ */
|
|
94691
|
+
/* @__PURE__ */ jsx16(GlobalKeybindsModal, { open: openModal, onOpenChange: setOpenModal })
|
|
95186
94692
|
] });
|
|
95187
94693
|
};
|
|
95188
94694
|
var UserBadge = () => {
|
|
@@ -95191,28 +94697,28 @@ var UserBadge = () => {
|
|
|
95191
94697
|
const displayName = name || user?.email;
|
|
95192
94698
|
const fallback = displayName ? displayName[0].toUpperCase() : null;
|
|
95193
94699
|
if (isPending) {
|
|
95194
|
-
return /* @__PURE__ */
|
|
95195
|
-
/* @__PURE__ */
|
|
95196
|
-
/* @__PURE__ */
|
|
94700
|
+
return /* @__PURE__ */ jsxs9("button", { className: "shadow-borders-base flex max-w-[192px] select-none items-center gap-x-2 overflow-hidden text-ellipsis whitespace-nowrap rounded-full py-1 ps-1 pe-2.5", children: [
|
|
94701
|
+
/* @__PURE__ */ jsx16(Skeleton, { className: "h-5 w-5 rounded-full" }),
|
|
94702
|
+
/* @__PURE__ */ jsx16(Skeleton, { className: "h-[9px] w-[70px]" })
|
|
95197
94703
|
] });
|
|
95198
94704
|
}
|
|
95199
94705
|
if (isError) {
|
|
95200
94706
|
throw error;
|
|
95201
94707
|
}
|
|
95202
|
-
return /* @__PURE__ */
|
|
95203
|
-
|
|
94708
|
+
return /* @__PURE__ */ jsx16("div", { className: "p-3", children: /* @__PURE__ */ jsxs9(
|
|
94709
|
+
DropdownMenu2.Trigger,
|
|
95204
94710
|
{
|
|
95205
94711
|
disabled: !user,
|
|
95206
|
-
className:
|
|
94712
|
+
className: clx6(
|
|
95207
94713
|
"bg-ui-bg-subtle grid w-full cursor-pointer grid-cols-[24px_1fr_15px] items-center gap-2 rounded-md py-1 ps-0.5 pe-2 outline-none",
|
|
95208
94714
|
"hover:bg-ui-bg-subtle-hover",
|
|
95209
94715
|
"data-[state=open]:bg-ui-bg-subtle-hover",
|
|
95210
94716
|
"focus-visible:shadow-borders-focus"
|
|
95211
94717
|
),
|
|
95212
94718
|
children: [
|
|
95213
|
-
/* @__PURE__ */
|
|
95214
|
-
/* @__PURE__ */
|
|
95215
|
-
|
|
94719
|
+
/* @__PURE__ */ jsx16("div", { className: "flex size-6 items-center justify-center", children: fallback ? /* @__PURE__ */ jsx16(Avatar, { size: "xsmall", fallback }) : /* @__PURE__ */ jsx16(Skeleton, { className: "h-6 w-6 rounded-full" }) }),
|
|
94720
|
+
/* @__PURE__ */ jsx16("div", { className: "flex items-center overflow-hidden", children: displayName ? /* @__PURE__ */ jsx16(
|
|
94721
|
+
Text5,
|
|
95216
94722
|
{
|
|
95217
94723
|
size: "xsmall",
|
|
95218
94724
|
weight: "plus",
|
|
@@ -95220,8 +94726,8 @@ var UserBadge = () => {
|
|
|
95220
94726
|
className: "truncate",
|
|
95221
94727
|
children: displayName
|
|
95222
94728
|
}
|
|
95223
|
-
) : /* @__PURE__ */
|
|
95224
|
-
/* @__PURE__ */
|
|
94729
|
+
) : /* @__PURE__ */ jsx16(Skeleton, { className: "h-[9px] w-[70px]" }) }),
|
|
94730
|
+
/* @__PURE__ */ jsx16(EllipsisHorizontal, { className: "text-ui-fg-muted" })
|
|
95225
94731
|
]
|
|
95226
94732
|
}
|
|
95227
94733
|
) });
|
|
@@ -95229,14 +94735,14 @@ var UserBadge = () => {
|
|
|
95229
94735
|
var ThemeToggle = () => {
|
|
95230
94736
|
const { t: t2 } = useTranslation7();
|
|
95231
94737
|
const { theme, setTheme } = useTheme();
|
|
95232
|
-
return /* @__PURE__ */
|
|
95233
|
-
/* @__PURE__ */
|
|
95234
|
-
/* @__PURE__ */
|
|
95235
|
-
/* @__PURE__ */
|
|
94738
|
+
return /* @__PURE__ */ jsxs9(DropdownMenu2.SubMenu, { children: [
|
|
94739
|
+
/* @__PURE__ */ jsxs9(DropdownMenu2.SubMenuTrigger, { dir: "ltr", className: "rounded-md rtl:rotate-180", children: [
|
|
94740
|
+
/* @__PURE__ */ jsx16(CircleHalfSolid, { className: "text-ui-fg-subtle me-2" }),
|
|
94741
|
+
/* @__PURE__ */ jsx16("span", { className: "rtl:rotate-180", children: t2("app.menus.user.theme.label") })
|
|
95236
94742
|
] }),
|
|
95237
|
-
/* @__PURE__ */
|
|
95238
|
-
/* @__PURE__ */
|
|
95239
|
-
|
|
94743
|
+
/* @__PURE__ */ jsx16(DropdownMenu2.SubMenuContent, { children: /* @__PURE__ */ jsxs9(DropdownMenu2.RadioGroup, { value: theme, children: [
|
|
94744
|
+
/* @__PURE__ */ jsx16(
|
|
94745
|
+
DropdownMenu2.RadioItem,
|
|
95240
94746
|
{
|
|
95241
94747
|
value: "system",
|
|
95242
94748
|
onClick: (e) => {
|
|
@@ -95246,8 +94752,8 @@ var ThemeToggle = () => {
|
|
|
95246
94752
|
children: t2("app.menus.user.theme.system")
|
|
95247
94753
|
}
|
|
95248
94754
|
),
|
|
95249
|
-
/* @__PURE__ */
|
|
95250
|
-
|
|
94755
|
+
/* @__PURE__ */ jsx16(
|
|
94756
|
+
DropdownMenu2.RadioItem,
|
|
95251
94757
|
{
|
|
95252
94758
|
value: "light",
|
|
95253
94759
|
onClick: (e) => {
|
|
@@ -95257,8 +94763,8 @@ var ThemeToggle = () => {
|
|
|
95257
94763
|
children: t2("app.menus.user.theme.light")
|
|
95258
94764
|
}
|
|
95259
94765
|
),
|
|
95260
|
-
/* @__PURE__ */
|
|
95261
|
-
|
|
94766
|
+
/* @__PURE__ */ jsx16(
|
|
94767
|
+
DropdownMenu2.RadioItem,
|
|
95262
94768
|
{
|
|
95263
94769
|
value: "dark",
|
|
95264
94770
|
onClick: (e) => {
|
|
@@ -95283,33 +94789,33 @@ var Logout = () => {
|
|
|
95283
94789
|
}
|
|
95284
94790
|
});
|
|
95285
94791
|
};
|
|
95286
|
-
return /* @__PURE__ */
|
|
95287
|
-
/* @__PURE__ */
|
|
95288
|
-
/* @__PURE__ */
|
|
94792
|
+
return /* @__PURE__ */ jsx16(DropdownMenu2.Item, { onClick: handleLogout, children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-2", children: [
|
|
94793
|
+
/* @__PURE__ */ jsx16(OpenRectArrowOut, { className: "text-ui-fg-subtle" }),
|
|
94794
|
+
/* @__PURE__ */ jsx16("span", { children: t2("app.menus.actions.logout") })
|
|
95289
94795
|
] }) });
|
|
95290
94796
|
};
|
|
95291
94797
|
var GlobalKeybindsModal = (props) => {
|
|
95292
94798
|
const { t: t2 } = useTranslation7();
|
|
95293
94799
|
const globalShortcuts = useGlobalShortcuts();
|
|
95294
|
-
const [searchValue, onSearchValueChange] =
|
|
94800
|
+
const [searchValue, onSearchValueChange] = useState11("");
|
|
95295
94801
|
const searchResults = searchValue ? globalShortcuts.filter((shortcut) => {
|
|
95296
94802
|
return shortcut.label.toLowerCase().includes(searchValue?.toLowerCase());
|
|
95297
94803
|
}) : globalShortcuts;
|
|
95298
|
-
return /* @__PURE__ */
|
|
95299
|
-
/* @__PURE__ */
|
|
95300
|
-
/* @__PURE__ */
|
|
95301
|
-
/* @__PURE__ */
|
|
95302
|
-
/* @__PURE__ */
|
|
95303
|
-
/* @__PURE__ */
|
|
95304
|
-
/* @__PURE__ */
|
|
95305
|
-
/* @__PURE__ */
|
|
94804
|
+
return /* @__PURE__ */ jsx16(RadixDialog3.Root, { ...props, children: /* @__PURE__ */ jsxs9(RadixDialog3.Portal, { children: [
|
|
94805
|
+
/* @__PURE__ */ jsx16(RadixDialog3.Overlay, { className: "bg-ui-bg-overlay fixed inset-0" }),
|
|
94806
|
+
/* @__PURE__ */ jsxs9(RadixDialog3.Content, { className: "bg-ui-bg-subtle shadow-elevation-modal fixed left-[50%] top-[50%] flex h-full max-h-[612px] w-full max-w-[560px] translate-x-[-50%] translate-y-[-50%] flex-col divide-y overflow-hidden rounded-lg", children: [
|
|
94807
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-3 px-6 py-4", children: [
|
|
94808
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between", children: [
|
|
94809
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
94810
|
+
/* @__PURE__ */ jsx16(RadixDialog3.Title, { asChild: true, children: /* @__PURE__ */ jsx16(Heading2, { children: t2("app.menus.user.shortcuts") }) }),
|
|
94811
|
+
/* @__PURE__ */ jsx16(RadixDialog3.Description, { className: "sr-only" })
|
|
95306
94812
|
] }),
|
|
95307
|
-
/* @__PURE__ */
|
|
95308
|
-
/* @__PURE__ */
|
|
95309
|
-
/* @__PURE__ */
|
|
94813
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-2", children: [
|
|
94814
|
+
/* @__PURE__ */ jsx16(Kbd3, { children: "esc" }),
|
|
94815
|
+
/* @__PURE__ */ jsx16(RadixDialog3.Close, { asChild: true, children: /* @__PURE__ */ jsx16(IconButton5, { variant: "transparent", size: "small", children: /* @__PURE__ */ jsx16(XMark2, {}) }) })
|
|
95310
94816
|
] })
|
|
95311
94817
|
] }),
|
|
95312
|
-
/* @__PURE__ */
|
|
94818
|
+
/* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(
|
|
95313
94819
|
Input,
|
|
95314
94820
|
{
|
|
95315
94821
|
type: "search",
|
|
@@ -95318,17 +94824,17 @@ var GlobalKeybindsModal = (props) => {
|
|
|
95318
94824
|
}
|
|
95319
94825
|
) })
|
|
95320
94826
|
] }),
|
|
95321
|
-
/* @__PURE__ */
|
|
95322
|
-
return /* @__PURE__ */
|
|
94827
|
+
/* @__PURE__ */ jsx16("div", { className: "flex flex-col divide-y overflow-y-auto", children: searchResults.map((shortcut, index) => {
|
|
94828
|
+
return /* @__PURE__ */ jsxs9(
|
|
95323
94829
|
"div",
|
|
95324
94830
|
{
|
|
95325
94831
|
className: "text-ui-fg-subtle flex items-center justify-between px-6 py-3",
|
|
95326
94832
|
children: [
|
|
95327
|
-
/* @__PURE__ */
|
|
95328
|
-
/* @__PURE__ */
|
|
95329
|
-
return /* @__PURE__ */
|
|
95330
|
-
/* @__PURE__ */
|
|
95331
|
-
index2 < (shortcut.keys.Mac?.length || 0) - 1 && /* @__PURE__ */
|
|
94833
|
+
/* @__PURE__ */ jsx16(Text5, { size: "small", children: shortcut.label }),
|
|
94834
|
+
/* @__PURE__ */ jsx16("div", { className: "flex items-center gap-x-1", children: shortcut.keys.Mac?.map((key, index2) => {
|
|
94835
|
+
return /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-1", children: [
|
|
94836
|
+
/* @__PURE__ */ jsx16(Kbd3, { children: key }),
|
|
94837
|
+
index2 < (shortcut.keys.Mac?.length || 0) - 1 && /* @__PURE__ */ jsx16("span", { className: "txt-compact-xsmall text-ui-fg-subtle", children: t2("app.keyboardShortcuts.then") })
|
|
95332
94838
|
] }, index2);
|
|
95333
94839
|
}) })
|
|
95334
94840
|
]
|
|
@@ -95343,7 +94849,7 @@ var UserItem = () => {
|
|
|
95343
94849
|
const { user, isPending, isError, error } = useMe();
|
|
95344
94850
|
const loaded = !isPending && !!user;
|
|
95345
94851
|
if (!loaded) {
|
|
95346
|
-
return /* @__PURE__ */
|
|
94852
|
+
return /* @__PURE__ */ jsx16("div", {});
|
|
95347
94853
|
}
|
|
95348
94854
|
const name = [user.first_name, user.last_name].filter(Boolean).join(" ");
|
|
95349
94855
|
const email = user.email;
|
|
@@ -95352,8 +94858,8 @@ var UserItem = () => {
|
|
|
95352
94858
|
if (isError) {
|
|
95353
94859
|
throw error;
|
|
95354
94860
|
}
|
|
95355
|
-
return /* @__PURE__ */
|
|
95356
|
-
/* @__PURE__ */
|
|
94861
|
+
return /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-3 overflow-hidden px-2 py-1", children: [
|
|
94862
|
+
/* @__PURE__ */ jsx16(
|
|
95357
94863
|
Avatar,
|
|
95358
94864
|
{
|
|
95359
94865
|
size: "small",
|
|
@@ -95362,9 +94868,9 @@ var UserItem = () => {
|
|
|
95362
94868
|
fallback
|
|
95363
94869
|
}
|
|
95364
94870
|
),
|
|
95365
|
-
/* @__PURE__ */
|
|
95366
|
-
/* @__PURE__ */
|
|
95367
|
-
|
|
94871
|
+
/* @__PURE__ */ jsxs9("div", { className: "block w-full min-w-0 max-w-[187px] overflow-hidden whitespace-nowrap", children: [
|
|
94872
|
+
/* @__PURE__ */ jsx16(
|
|
94873
|
+
Text5,
|
|
95368
94874
|
{
|
|
95369
94875
|
size: "small",
|
|
95370
94876
|
weight: "plus",
|
|
@@ -95373,8 +94879,8 @@ var UserItem = () => {
|
|
|
95373
94879
|
children: name || email
|
|
95374
94880
|
}
|
|
95375
94881
|
),
|
|
95376
|
-
!!name && /* @__PURE__ */
|
|
95377
|
-
|
|
94882
|
+
!!name && /* @__PURE__ */ jsx16(
|
|
94883
|
+
Text5,
|
|
95378
94884
|
{
|
|
95379
94885
|
size: "xsmall",
|
|
95380
94886
|
leading: "compact",
|
|
@@ -95387,24 +94893,24 @@ var UserItem = () => {
|
|
|
95387
94893
|
};
|
|
95388
94894
|
|
|
95389
94895
|
// src/components/layout/main-layout/main-layout.tsx
|
|
95390
|
-
import { jsx as
|
|
94896
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
95391
94897
|
var MainLayout = () => {
|
|
95392
|
-
return /* @__PURE__ */
|
|
94898
|
+
return /* @__PURE__ */ jsx17(Shell, { children: /* @__PURE__ */ jsx17(MainSidebar, {}) });
|
|
95393
94899
|
};
|
|
95394
94900
|
var MainSidebar = () => {
|
|
95395
|
-
return /* @__PURE__ */
|
|
95396
|
-
/* @__PURE__ */
|
|
95397
|
-
/* @__PURE__ */
|
|
95398
|
-
/* @__PURE__ */
|
|
94901
|
+
return /* @__PURE__ */ jsx17("aside", { className: "flex flex-1 flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs10("div", { className: "flex flex-1 flex-col", children: [
|
|
94902
|
+
/* @__PURE__ */ jsxs10("div", { className: "bg-ui-bg-subtle sticky top-0", children: [
|
|
94903
|
+
/* @__PURE__ */ jsx17(Header, {}),
|
|
94904
|
+
/* @__PURE__ */ jsx17("div", { className: "px-3", children: /* @__PURE__ */ jsx17(Divider, { variant: "dashed" }) })
|
|
95399
94905
|
] }),
|
|
95400
|
-
/* @__PURE__ */
|
|
95401
|
-
/* @__PURE__ */
|
|
95402
|
-
/* @__PURE__ */
|
|
95403
|
-
/* @__PURE__ */
|
|
94906
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-1 flex-col justify-between", children: [
|
|
94907
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-1 flex-col", children: [
|
|
94908
|
+
/* @__PURE__ */ jsx17(CoreRouteSection, {}),
|
|
94909
|
+
/* @__PURE__ */ jsx17(ExtensionRouteSection, {})
|
|
95404
94910
|
] }),
|
|
95405
|
-
/* @__PURE__ */
|
|
94911
|
+
/* @__PURE__ */ jsx17(UtilitySection, {})
|
|
95406
94912
|
] }),
|
|
95407
|
-
/* @__PURE__ */
|
|
94913
|
+
/* @__PURE__ */ jsx17("div", { className: "bg-ui-bg-subtle sticky bottom-0", children: /* @__PURE__ */ jsx17(UserSection, {}) })
|
|
95408
94914
|
] }) });
|
|
95409
94915
|
};
|
|
95410
94916
|
var Logout2 = () => {
|
|
@@ -95419,29 +94925,29 @@ var Logout2 = () => {
|
|
|
95419
94925
|
}
|
|
95420
94926
|
});
|
|
95421
94927
|
};
|
|
95422
|
-
return /* @__PURE__ */
|
|
95423
|
-
/* @__PURE__ */
|
|
95424
|
-
/* @__PURE__ */
|
|
94928
|
+
return /* @__PURE__ */ jsx17(DropdownMenu3.Item, { onClick: handleLogout, children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-x-2", children: [
|
|
94929
|
+
/* @__PURE__ */ jsx17(OpenRectArrowOut2, { className: "text-ui-fg-subtle" }),
|
|
94930
|
+
/* @__PURE__ */ jsx17("span", { children: t2("app.menus.actions.logout") })
|
|
95425
94931
|
] }) });
|
|
95426
94932
|
};
|
|
95427
94933
|
var Header = () => {
|
|
95428
94934
|
const { t: t2 } = useTranslation8();
|
|
95429
94935
|
const direction = useDocumentDirection();
|
|
95430
94936
|
const fallback = "A";
|
|
95431
|
-
return /* @__PURE__ */
|
|
95432
|
-
/* @__PURE__ */
|
|
95433
|
-
|
|
94937
|
+
return /* @__PURE__ */ jsx17("div", { className: "w-full p-3", children: /* @__PURE__ */ jsxs10(DropdownMenu3, { dir: direction, children: [
|
|
94938
|
+
/* @__PURE__ */ jsxs10(
|
|
94939
|
+
DropdownMenu3.Trigger,
|
|
95434
94940
|
{
|
|
95435
|
-
className:
|
|
94941
|
+
className: clx7(
|
|
95436
94942
|
"bg-ui-bg-subtle transition-fg grid w-full grid-cols-[24px_1fr_15px] items-center gap-x-3 rounded-md p-0.5 pe-2 outline-none",
|
|
95437
94943
|
"hover:bg-ui-bg-subtle-hover",
|
|
95438
94944
|
"data-[state=open]:bg-ui-bg-subtle-hover",
|
|
95439
94945
|
"focus-visible:shadow-borders-focus"
|
|
95440
94946
|
),
|
|
95441
94947
|
children: [
|
|
95442
|
-
/* @__PURE__ */
|
|
95443
|
-
/* @__PURE__ */
|
|
95444
|
-
|
|
94948
|
+
/* @__PURE__ */ jsx17(Avatar2, { variant: "squared", size: "xsmall", fallback }),
|
|
94949
|
+
/* @__PURE__ */ jsx17("div", { className: "block overflow-hidden text-start", children: /* @__PURE__ */ jsx17(
|
|
94950
|
+
Text6,
|
|
95445
94951
|
{
|
|
95446
94952
|
size: "small",
|
|
95447
94953
|
weight: "plus",
|
|
@@ -95450,17 +94956,17 @@ var Header = () => {
|
|
|
95450
94956
|
children: t2("app.nav.main.store", "Admin")
|
|
95451
94957
|
}
|
|
95452
94958
|
) }),
|
|
95453
|
-
/* @__PURE__ */
|
|
94959
|
+
/* @__PURE__ */ jsx17(EllipsisHorizontal2, { className: "text-ui-fg-muted" })
|
|
95454
94960
|
]
|
|
95455
94961
|
}
|
|
95456
94962
|
),
|
|
95457
|
-
/* @__PURE__ */
|
|
95458
|
-
/* @__PURE__ */
|
|
95459
|
-
/* @__PURE__ */
|
|
94963
|
+
/* @__PURE__ */ jsxs10(DropdownMenu3.Content, { className: "w-[var(--radix-dropdown-menu-trigger-width)] min-w-0", children: [
|
|
94964
|
+
/* @__PURE__ */ jsx17(DropdownMenu3.Item, { className: "gap-x-2", asChild: true, children: /* @__PURE__ */ jsxs10(Link3, { to: "/settings", children: [
|
|
94965
|
+
/* @__PURE__ */ jsx17(CogSixTooth, { className: "text-ui-fg-subtle" }),
|
|
95460
94966
|
t2("app.nav.main.storeSettings", "Settings")
|
|
95461
94967
|
] }) }),
|
|
95462
|
-
/* @__PURE__ */
|
|
95463
|
-
/* @__PURE__ */
|
|
94968
|
+
/* @__PURE__ */ jsx17(DropdownMenu3.Separator, {}),
|
|
94969
|
+
/* @__PURE__ */ jsx17(Logout2, {})
|
|
95464
94970
|
] })
|
|
95465
94971
|
] }) });
|
|
95466
94972
|
};
|
|
@@ -95470,19 +94976,19 @@ var useCoreRoutes = () => {
|
|
|
95470
94976
|
var Searchbar = () => {
|
|
95471
94977
|
const { t: t2 } = useTranslation8();
|
|
95472
94978
|
const { toggleSearch } = useSearch();
|
|
95473
|
-
return /* @__PURE__ */
|
|
94979
|
+
return /* @__PURE__ */ jsx17("div", { className: "px-3", children: /* @__PURE__ */ jsxs10(
|
|
95474
94980
|
"button",
|
|
95475
94981
|
{
|
|
95476
94982
|
onClick: toggleSearch,
|
|
95477
|
-
className:
|
|
94983
|
+
className: clx7(
|
|
95478
94984
|
"bg-ui-bg-subtle text-ui-fg-subtle flex w-full items-center gap-x-2.5 rounded-md px-2 py-1 outline-none",
|
|
95479
94985
|
"hover:bg-ui-bg-subtle-hover",
|
|
95480
94986
|
"focus-visible:shadow-borders-focus"
|
|
95481
94987
|
),
|
|
95482
94988
|
children: [
|
|
95483
|
-
/* @__PURE__ */
|
|
95484
|
-
/* @__PURE__ */
|
|
95485
|
-
/* @__PURE__ */
|
|
94989
|
+
/* @__PURE__ */ jsx17(MagnifyingGlass2, {}),
|
|
94990
|
+
/* @__PURE__ */ jsx17("div", { className: "flex-1 text-start", children: /* @__PURE__ */ jsx17(Text6, { size: "small", leading: "compact", weight: "plus", children: t2("app.search.label") }) }),
|
|
94991
|
+
/* @__PURE__ */ jsx17(Text6, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: "\u2318K" })
|
|
95486
94992
|
]
|
|
95487
94993
|
}
|
|
95488
94994
|
) });
|
|
@@ -95499,10 +95005,10 @@ var CoreRouteSection = () => {
|
|
|
95499
95005
|
}
|
|
95500
95006
|
}
|
|
95501
95007
|
});
|
|
95502
|
-
return /* @__PURE__ */
|
|
95503
|
-
/* @__PURE__ */
|
|
95008
|
+
return /* @__PURE__ */ jsxs10("nav", { className: "flex flex-col gap-y-1 py-3", children: [
|
|
95009
|
+
/* @__PURE__ */ jsx17(Searchbar, {}),
|
|
95504
95010
|
coreRoutes.map((route) => {
|
|
95505
|
-
return /* @__PURE__ */
|
|
95011
|
+
return /* @__PURE__ */ jsx17(NavItem, { ...route }, route.to);
|
|
95506
95012
|
})
|
|
95507
95013
|
] });
|
|
95508
95014
|
};
|
|
@@ -95513,23 +95019,23 @@ var ExtensionRouteSection = () => {
|
|
|
95513
95019
|
if (!menuItems.length) {
|
|
95514
95020
|
return null;
|
|
95515
95021
|
}
|
|
95516
|
-
return /* @__PURE__ */
|
|
95517
|
-
/* @__PURE__ */
|
|
95518
|
-
/* @__PURE__ */
|
|
95519
|
-
/* @__PURE__ */
|
|
95520
|
-
/* @__PURE__ */
|
|
95521
|
-
/* @__PURE__ */
|
|
95522
|
-
/* @__PURE__ */
|
|
95523
|
-
/* @__PURE__ */
|
|
95022
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
95023
|
+
/* @__PURE__ */ jsx17("div", { className: "px-3", children: /* @__PURE__ */ jsx17(Divider, { variant: "dashed" }) }),
|
|
95024
|
+
/* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-y-1 py-3", children: /* @__PURE__ */ jsxs10(RadixCollapsible2.Root, { defaultOpen: true, children: [
|
|
95025
|
+
/* @__PURE__ */ jsx17("div", { className: "px-4", children: /* @__PURE__ */ jsx17(RadixCollapsible2.Trigger, { asChild: true, className: "group/trigger", children: /* @__PURE__ */ jsxs10("button", { className: "text-ui-fg-subtle flex w-full items-center justify-between px-2", children: [
|
|
95026
|
+
/* @__PURE__ */ jsx17(Text6, { size: "xsmall", weight: "plus", leading: "compact", children: t2("app.nav.common.extensions") }),
|
|
95027
|
+
/* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-muted", children: [
|
|
95028
|
+
/* @__PURE__ */ jsx17(ChevronDownMini, { className: "group-data-[state=open]/trigger:hidden" }),
|
|
95029
|
+
/* @__PURE__ */ jsx17(MinusMini, { className: "group-data-[state=closed]/trigger:hidden" })
|
|
95524
95030
|
] })
|
|
95525
95031
|
] }) }) }),
|
|
95526
|
-
/* @__PURE__ */
|
|
95527
|
-
return /* @__PURE__ */
|
|
95032
|
+
/* @__PURE__ */ jsx17(RadixCollapsible2.Content, { children: /* @__PURE__ */ jsx17("nav", { className: "flex flex-col gap-y-0.5 py-1 pb-4", children: menuItems.map((item, i) => {
|
|
95033
|
+
return /* @__PURE__ */ jsx17(
|
|
95528
95034
|
NavItem,
|
|
95529
95035
|
{
|
|
95530
95036
|
to: item.to,
|
|
95531
95037
|
label: item.label,
|
|
95532
|
-
icon: item.icon ? item.icon : /* @__PURE__ */
|
|
95038
|
+
icon: item.icon ? item.icon : /* @__PURE__ */ jsx17(SquaresPlus, {}),
|
|
95533
95039
|
items: item.items,
|
|
95534
95040
|
translationNs: item.translationNs,
|
|
95535
95041
|
type: "extension"
|
|
@@ -95543,40 +95049,76 @@ var ExtensionRouteSection = () => {
|
|
|
95543
95049
|
var UtilitySection = () => {
|
|
95544
95050
|
const location = useLocation6();
|
|
95545
95051
|
const { t: t2 } = useTranslation8();
|
|
95546
|
-
return /* @__PURE__ */
|
|
95052
|
+
return /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-y-0.5 py-3", children: /* @__PURE__ */ jsx17(
|
|
95547
95053
|
NavItem,
|
|
95548
95054
|
{
|
|
95549
95055
|
label: t2("app.nav.settings.header"),
|
|
95550
95056
|
to: "/settings",
|
|
95551
95057
|
from: location.pathname,
|
|
95552
|
-
icon: /* @__PURE__ */
|
|
95058
|
+
icon: /* @__PURE__ */ jsx17(CogSixTooth, {})
|
|
95553
95059
|
}
|
|
95554
95060
|
) });
|
|
95555
95061
|
};
|
|
95556
95062
|
var UserSection = () => {
|
|
95557
|
-
return /* @__PURE__ */
|
|
95558
|
-
/* @__PURE__ */
|
|
95559
|
-
/* @__PURE__ */
|
|
95063
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
95064
|
+
/* @__PURE__ */ jsx17("div", { className: "px-3", children: /* @__PURE__ */ jsx17(Divider, { variant: "dashed" }) }),
|
|
95065
|
+
/* @__PURE__ */ jsx17(UserMenu, {})
|
|
95560
95066
|
] });
|
|
95561
95067
|
};
|
|
95562
95068
|
|
|
95563
95069
|
// src/components/layout/public-layout/public-layout.tsx
|
|
95564
95070
|
import { Outlet as Outlet3 } from "react-router-dom";
|
|
95565
|
-
import { jsx as
|
|
95071
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
95566
95072
|
var PublicLayout = () => {
|
|
95567
|
-
return /* @__PURE__ */
|
|
95073
|
+
return /* @__PURE__ */ jsx18(Outlet3, {});
|
|
95568
95074
|
};
|
|
95569
95075
|
|
|
95570
95076
|
// src/components/layout/settings-layout/settings-layout.tsx
|
|
95571
95077
|
import { ArrowUturnLeft as ArrowUturnLeft2, MinusMini as MinusMini2 } from "@acmekit/icons";
|
|
95572
|
-
import { clx as
|
|
95078
|
+
import { clx as clx8, Divider as Divider2, IconButton as IconButton6, Text as Text7 } from "@acmekit/ui";
|
|
95573
95079
|
import { Collapsible as RadixCollapsible3 } from "radix-ui";
|
|
95574
|
-
import { useEffect as
|
|
95080
|
+
import { Fragment as Fragment3, useEffect as useEffect11, useMemo as useMemo5, useState as useState12 } from "react";
|
|
95575
95081
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
95576
|
-
import { Link as
|
|
95577
|
-
import { jsx as
|
|
95082
|
+
import { Link as Link4, useLocation as useLocation7 } from "react-router-dom";
|
|
95083
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
95578
95084
|
var SettingsLayout = () => {
|
|
95579
|
-
return /* @__PURE__ */
|
|
95085
|
+
return /* @__PURE__ */ jsx19(Shell, { children: /* @__PURE__ */ jsx19(SettingsSidebar, {}) });
|
|
95086
|
+
};
|
|
95087
|
+
var useSettingRoutes = () => {
|
|
95088
|
+
const isTranslationsEnabled = useFeatureFlag("translation");
|
|
95089
|
+
const { t: t2 } = useTranslation9();
|
|
95090
|
+
return useMemo5(
|
|
95091
|
+
() => [
|
|
95092
|
+
{ label: t2("store.domain"), to: "/settings/store" },
|
|
95093
|
+
{ label: t2("users.domain"), to: "/settings/users" },
|
|
95094
|
+
...isTranslationsEnabled ? [{ label: t2("translations.domain"), to: "/settings/translations" }] : []
|
|
95095
|
+
],
|
|
95096
|
+
[t2, isTranslationsEnabled]
|
|
95097
|
+
);
|
|
95098
|
+
};
|
|
95099
|
+
var useDeveloperRoutes = () => {
|
|
95100
|
+
const { t: t2 } = useTranslation9();
|
|
95101
|
+
return useMemo5(
|
|
95102
|
+
() => [
|
|
95103
|
+
{
|
|
95104
|
+
label: t2("apiKeyManagement.domain.publishable"),
|
|
95105
|
+
to: "/settings/publishable-api-keys"
|
|
95106
|
+
},
|
|
95107
|
+
{
|
|
95108
|
+
label: t2("apiKeyManagement.domain.secret"),
|
|
95109
|
+
to: "/settings/secret-api-keys"
|
|
95110
|
+
},
|
|
95111
|
+
{ label: t2("workflowExecutions.domain"), to: "/settings/workflows" }
|
|
95112
|
+
],
|
|
95113
|
+
[t2]
|
|
95114
|
+
);
|
|
95115
|
+
};
|
|
95116
|
+
var useMyAccountRoutes = () => {
|
|
95117
|
+
const { t: t2 } = useTranslation9();
|
|
95118
|
+
return useMemo5(
|
|
95119
|
+
() => [{ label: t2("profile.domain"), to: "/settings/profile" }],
|
|
95120
|
+
[t2]
|
|
95121
|
+
);
|
|
95580
95122
|
};
|
|
95581
95123
|
var getSafeFromValue = (from) => {
|
|
95582
95124
|
if (from.startsWith("/settings")) {
|
|
@@ -95588,45 +95130,76 @@ var SettingsSidebar = () => {
|
|
|
95588
95130
|
const { getMenu } = useExtension();
|
|
95589
95131
|
const extensionRoutes = getMenu("settingsExtensions");
|
|
95590
95132
|
const { t: t2 } = useTranslation9();
|
|
95591
|
-
|
|
95592
|
-
|
|
95593
|
-
|
|
95594
|
-
|
|
95133
|
+
const routes = useSettingRoutes();
|
|
95134
|
+
const developerRoutes = useDeveloperRoutes();
|
|
95135
|
+
const myAccountRoutes = useMyAccountRoutes();
|
|
95136
|
+
return /* @__PURE__ */ jsxs11("aside", { className: "relative flex flex-1 flex-col justify-between overflow-y-auto", children: [
|
|
95137
|
+
/* @__PURE__ */ jsxs11("div", { className: "bg-ui-bg-subtle sticky top-0", children: [
|
|
95138
|
+
/* @__PURE__ */ jsx19(Header2, {}),
|
|
95139
|
+
/* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx19(Divider2, { variant: "dashed" }) })
|
|
95595
95140
|
] }),
|
|
95596
|
-
/* @__PURE__ */
|
|
95597
|
-
/* @__PURE__ */
|
|
95598
|
-
|
|
95599
|
-
|
|
95600
|
-
|
|
95601
|
-
|
|
95602
|
-
|
|
95603
|
-
|
|
95604
|
-
|
|
95141
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-1 flex-col", children: [
|
|
95142
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-1 flex-col overflow-y-auto", children: [
|
|
95143
|
+
/* @__PURE__ */ jsx19(
|
|
95144
|
+
RadixCollapsibleSection,
|
|
95145
|
+
{
|
|
95146
|
+
label: t2("app.nav.settings.general"),
|
|
95147
|
+
items: routes
|
|
95148
|
+
}
|
|
95149
|
+
),
|
|
95150
|
+
/* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx19(Divider2, { variant: "dashed" }) }),
|
|
95151
|
+
/* @__PURE__ */ jsx19(
|
|
95152
|
+
RadixCollapsibleSection,
|
|
95153
|
+
{
|
|
95154
|
+
label: t2("app.nav.settings.developer"),
|
|
95155
|
+
items: developerRoutes
|
|
95156
|
+
}
|
|
95157
|
+
),
|
|
95158
|
+
/* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx19(Divider2, { variant: "dashed" }) }),
|
|
95159
|
+
/* @__PURE__ */ jsx19(
|
|
95160
|
+
RadixCollapsibleSection,
|
|
95161
|
+
{
|
|
95162
|
+
label: t2("app.nav.settings.myAccount"),
|
|
95163
|
+
items: myAccountRoutes
|
|
95164
|
+
}
|
|
95165
|
+
),
|
|
95166
|
+
extensionRoutes.length > 0 ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
95167
|
+
/* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx19(Divider2, { variant: "dashed" }) }),
|
|
95168
|
+
/* @__PURE__ */ jsx19(
|
|
95169
|
+
RadixCollapsibleSection,
|
|
95170
|
+
{
|
|
95171
|
+
label: t2("app.nav.common.extensions"),
|
|
95172
|
+
items: extensionRoutes
|
|
95173
|
+
}
|
|
95174
|
+
)
|
|
95175
|
+
] }) : null
|
|
95176
|
+
] }),
|
|
95177
|
+
/* @__PURE__ */ jsx19("div", { className: "bg-ui-bg-subtle sticky bottom-0", children: /* @__PURE__ */ jsx19(UserSection2, {}) })
|
|
95605
95178
|
] })
|
|
95606
95179
|
] });
|
|
95607
95180
|
};
|
|
95608
95181
|
var Header2 = () => {
|
|
95609
|
-
const [from, setFrom] =
|
|
95182
|
+
const [from, setFrom] = useState12("/");
|
|
95610
95183
|
const { t: t2 } = useTranslation9();
|
|
95611
95184
|
const location = useLocation7();
|
|
95612
|
-
|
|
95185
|
+
useEffect11(() => {
|
|
95613
95186
|
if (location.state?.from) {
|
|
95614
95187
|
setFrom(getSafeFromValue(location.state.from));
|
|
95615
95188
|
}
|
|
95616
95189
|
}, [location]);
|
|
95617
|
-
return /* @__PURE__ */
|
|
95618
|
-
|
|
95190
|
+
return /* @__PURE__ */ jsx19("div", { className: "bg-ui-bg-subtle p-3", children: /* @__PURE__ */ jsx19(
|
|
95191
|
+
Link4,
|
|
95619
95192
|
{
|
|
95620
95193
|
to: from,
|
|
95621
95194
|
replace: true,
|
|
95622
|
-
className:
|
|
95195
|
+
className: clx8(
|
|
95623
95196
|
"bg-ui-bg-subtle transition-fg flex items-center rounded-md outline-none",
|
|
95624
95197
|
"hover:bg-ui-bg-subtle-hover",
|
|
95625
95198
|
"focus-visible:shadow-borders-focus"
|
|
95626
95199
|
),
|
|
95627
|
-
children: /* @__PURE__ */
|
|
95628
|
-
/* @__PURE__ */
|
|
95629
|
-
/* @__PURE__ */
|
|
95200
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-2.5 px-2 py-1", children: [
|
|
95201
|
+
/* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx19(ArrowUturnLeft2, { className: "text-ui-fg-subtle" }) }),
|
|
95202
|
+
/* @__PURE__ */ jsx19(Text7, { leading: "compact", weight: "plus", size: "small", children: t2("app.nav.settings.header") })
|
|
95630
95203
|
] })
|
|
95631
95204
|
}
|
|
95632
95205
|
) });
|
|
@@ -95635,27 +95208,27 @@ var RadixCollapsibleSection = ({
|
|
|
95635
95208
|
label,
|
|
95636
95209
|
items
|
|
95637
95210
|
}) => {
|
|
95638
|
-
return /* @__PURE__ */
|
|
95639
|
-
/* @__PURE__ */
|
|
95640
|
-
/* @__PURE__ */
|
|
95641
|
-
/* @__PURE__ */
|
|
95211
|
+
return /* @__PURE__ */ jsxs11(RadixCollapsible3.Root, { defaultOpen: true, className: "py-3", children: [
|
|
95212
|
+
/* @__PURE__ */ jsx19("div", { className: "px-3", children: /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-muted flex h-7 items-center justify-between px-2", children: [
|
|
95213
|
+
/* @__PURE__ */ jsx19(Text7, { size: "small", leading: "compact", children: label }),
|
|
95214
|
+
/* @__PURE__ */ jsx19(RadixCollapsible3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx19(IconButton6, { size: "2xsmall", variant: "transparent", className: "static", children: /* @__PURE__ */ jsx19(MinusMini2, { className: "text-ui-fg-muted" }) }) })
|
|
95642
95215
|
] }) }),
|
|
95643
|
-
/* @__PURE__ */
|
|
95216
|
+
/* @__PURE__ */ jsx19(RadixCollapsible3.Content, { children: /* @__PURE__ */ jsx19("div", { className: "pt-0.5", children: /* @__PURE__ */ jsx19("nav", { className: "flex flex-col gap-y-0.5", children: items.map((setting) => /* @__PURE__ */ jsx19(NavItem, { type: "setting", ...setting }, setting.to)) }) }) })
|
|
95644
95217
|
] });
|
|
95645
95218
|
};
|
|
95646
95219
|
var UserSection2 = () => {
|
|
95647
|
-
return /* @__PURE__ */
|
|
95648
|
-
/* @__PURE__ */
|
|
95649
|
-
/* @__PURE__ */
|
|
95220
|
+
return /* @__PURE__ */ jsxs11("div", { children: [
|
|
95221
|
+
/* @__PURE__ */ jsx19("div", { className: "px-3", children: /* @__PURE__ */ jsx19(Divider2, { variant: "dashed" }) }),
|
|
95222
|
+
/* @__PURE__ */ jsx19(UserMenu, {})
|
|
95650
95223
|
] });
|
|
95651
95224
|
};
|
|
95652
95225
|
|
|
95653
95226
|
// src/components/utilities/error-boundary/error-boundary.tsx
|
|
95654
95227
|
import { ExclamationCircle } from "@acmekit/icons";
|
|
95655
|
-
import { Text as
|
|
95228
|
+
import { Text as Text8 } from "@acmekit/ui";
|
|
95656
95229
|
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
95657
95230
|
import { Navigate as Navigate2, useLocation as useLocation8, useRouteError } from "react-router-dom";
|
|
95658
|
-
import { jsx as
|
|
95231
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
95659
95232
|
var ErrorBoundary = () => {
|
|
95660
95233
|
const error = useRouteError();
|
|
95661
95234
|
const location = useLocation8();
|
|
@@ -95663,7 +95236,7 @@ var ErrorBoundary = () => {
|
|
|
95663
95236
|
let code = null;
|
|
95664
95237
|
if (isFetchError(error)) {
|
|
95665
95238
|
if (error.status === 401) {
|
|
95666
|
-
return /* @__PURE__ */
|
|
95239
|
+
return /* @__PURE__ */ jsx20(Navigate2, { to: "/login", state: { from: location }, replace: true });
|
|
95667
95240
|
}
|
|
95668
95241
|
code = error.status ?? null;
|
|
95669
95242
|
}
|
|
@@ -95690,12 +95263,12 @@ var ErrorBoundary = () => {
|
|
|
95690
95263
|
message = t2("errorBoundary.defaultMessage");
|
|
95691
95264
|
break;
|
|
95692
95265
|
}
|
|
95693
|
-
return /* @__PURE__ */
|
|
95694
|
-
/* @__PURE__ */
|
|
95695
|
-
/* @__PURE__ */
|
|
95696
|
-
/* @__PURE__ */
|
|
95697
|
-
/* @__PURE__ */
|
|
95698
|
-
|
|
95266
|
+
return /* @__PURE__ */ jsx20("div", { className: "flex size-full min-h-[calc(100vh-57px-24px)] items-center justify-center", children: /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-y-6", children: /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle flex flex-col items-center gap-y-3", children: [
|
|
95267
|
+
/* @__PURE__ */ jsx20(ExclamationCircle, {}),
|
|
95268
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center gap-y-1", children: [
|
|
95269
|
+
/* @__PURE__ */ jsx20(Text8, { size: "small", leading: "compact", weight: "plus", children: title }),
|
|
95270
|
+
/* @__PURE__ */ jsx20(
|
|
95271
|
+
Text8,
|
|
95699
95272
|
{
|
|
95700
95273
|
size: "small",
|
|
95701
95274
|
className: "text-ui-fg-muted text-balance text-center",
|
|
@@ -95707,10 +95280,192 @@ var ErrorBoundary = () => {
|
|
|
95707
95280
|
};
|
|
95708
95281
|
|
|
95709
95282
|
// src/dashboard-app/routes/get-route.map.tsx
|
|
95710
|
-
import { jsx as
|
|
95283
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
95711
95284
|
function mergeSettingsRouteChildren(settingsRoutes) {
|
|
95712
95285
|
return settingsRoutes.filter((r) => r.path === "settings").flatMap((r) => r.children ?? []);
|
|
95713
95286
|
}
|
|
95287
|
+
var defaultSettingsRouteChildren = [
|
|
95288
|
+
{
|
|
95289
|
+
path: "profile",
|
|
95290
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95291
|
+
lazy: () => import("./profile-detail-YX27F7N6.mjs"),
|
|
95292
|
+
handle: { breadcrumb: () => t("profile.domain") },
|
|
95293
|
+
children: [
|
|
95294
|
+
{
|
|
95295
|
+
path: "edit",
|
|
95296
|
+
lazy: () => import("./profile-edit-2VRDU75O.mjs")
|
|
95297
|
+
}
|
|
95298
|
+
]
|
|
95299
|
+
},
|
|
95300
|
+
{
|
|
95301
|
+
path: "users",
|
|
95302
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95303
|
+
element: /* @__PURE__ */ jsx21(Outlet4, {}),
|
|
95304
|
+
handle: { breadcrumb: () => t("users.domain") },
|
|
95305
|
+
children: [
|
|
95306
|
+
{
|
|
95307
|
+
path: "",
|
|
95308
|
+
lazy: () => import("./user-list-KNJ5S3IM.mjs"),
|
|
95309
|
+
children: [
|
|
95310
|
+
{
|
|
95311
|
+
path: "invite",
|
|
95312
|
+
lazy: () => import("./user-invite-E3FAAU3V.mjs")
|
|
95313
|
+
}
|
|
95314
|
+
]
|
|
95315
|
+
},
|
|
95316
|
+
{
|
|
95317
|
+
path: ":id",
|
|
95318
|
+
lazy: async () => {
|
|
95319
|
+
const { Component, Breadcrumb, loader } = await import("./user-detail-KUSRRVNX.mjs");
|
|
95320
|
+
return {
|
|
95321
|
+
Component,
|
|
95322
|
+
loader,
|
|
95323
|
+
handle: {
|
|
95324
|
+
breadcrumb: (match) => /* @__PURE__ */ jsx21(Breadcrumb, { ...match })
|
|
95325
|
+
}
|
|
95326
|
+
};
|
|
95327
|
+
},
|
|
95328
|
+
children: [
|
|
95329
|
+
{ path: "edit", lazy: () => import("./user-edit-HTN3ZGCL.mjs") },
|
|
95330
|
+
{
|
|
95331
|
+
path: "metadata/edit",
|
|
95332
|
+
lazy: () => import("./user-metadata-5GQK75DT.mjs")
|
|
95333
|
+
}
|
|
95334
|
+
]
|
|
95335
|
+
}
|
|
95336
|
+
]
|
|
95337
|
+
},
|
|
95338
|
+
{
|
|
95339
|
+
path: "publishable-api-keys",
|
|
95340
|
+
element: /* @__PURE__ */ jsx21(Outlet4, {}),
|
|
95341
|
+
handle: { breadcrumb: () => t("apiKeyManagement.domain.publishable") },
|
|
95342
|
+
children: [
|
|
95343
|
+
{
|
|
95344
|
+
path: "",
|
|
95345
|
+
element: /* @__PURE__ */ jsx21(Outlet4, {}),
|
|
95346
|
+
children: [
|
|
95347
|
+
{
|
|
95348
|
+
path: "",
|
|
95349
|
+
lazy: () => import("./api-key-management-list-K2XPKF5E.mjs"),
|
|
95350
|
+
children: [
|
|
95351
|
+
{
|
|
95352
|
+
path: "create",
|
|
95353
|
+
lazy: () => import("./api-key-management-create-VWUERPPB.mjs")
|
|
95354
|
+
}
|
|
95355
|
+
]
|
|
95356
|
+
}
|
|
95357
|
+
]
|
|
95358
|
+
},
|
|
95359
|
+
{
|
|
95360
|
+
path: ":id",
|
|
95361
|
+
lazy: async () => {
|
|
95362
|
+
const { Component, Breadcrumb, loader } = await import("./api-key-management-detail-V4ENQHYY.mjs");
|
|
95363
|
+
return {
|
|
95364
|
+
Component,
|
|
95365
|
+
loader,
|
|
95366
|
+
handle: {
|
|
95367
|
+
breadcrumb: (match) => /* @__PURE__ */ jsx21(Breadcrumb, { ...match })
|
|
95368
|
+
}
|
|
95369
|
+
};
|
|
95370
|
+
},
|
|
95371
|
+
children: [
|
|
95372
|
+
{
|
|
95373
|
+
path: "edit",
|
|
95374
|
+
lazy: () => import("./api-key-management-edit-R44OHS7B.mjs")
|
|
95375
|
+
}
|
|
95376
|
+
]
|
|
95377
|
+
}
|
|
95378
|
+
]
|
|
95379
|
+
},
|
|
95380
|
+
{
|
|
95381
|
+
path: "secret-api-keys",
|
|
95382
|
+
element: /* @__PURE__ */ jsx21(Outlet4, {}),
|
|
95383
|
+
handle: { breadcrumb: () => t("apiKeyManagement.domain.secret") },
|
|
95384
|
+
children: [
|
|
95385
|
+
{
|
|
95386
|
+
path: "",
|
|
95387
|
+
element: /* @__PURE__ */ jsx21(Outlet4, {}),
|
|
95388
|
+
children: [
|
|
95389
|
+
{
|
|
95390
|
+
path: "",
|
|
95391
|
+
lazy: () => import("./api-key-management-list-K2XPKF5E.mjs"),
|
|
95392
|
+
children: [
|
|
95393
|
+
{
|
|
95394
|
+
path: "create",
|
|
95395
|
+
lazy: () => import("./api-key-management-create-VWUERPPB.mjs")
|
|
95396
|
+
}
|
|
95397
|
+
]
|
|
95398
|
+
}
|
|
95399
|
+
]
|
|
95400
|
+
},
|
|
95401
|
+
{
|
|
95402
|
+
path: ":id",
|
|
95403
|
+
lazy: async () => {
|
|
95404
|
+
const { Component, Breadcrumb, loader } = await import("./api-key-management-detail-V4ENQHYY.mjs");
|
|
95405
|
+
return {
|
|
95406
|
+
Component,
|
|
95407
|
+
loader,
|
|
95408
|
+
handle: {
|
|
95409
|
+
breadcrumb: (match) => /* @__PURE__ */ jsx21(Breadcrumb, { ...match })
|
|
95410
|
+
}
|
|
95411
|
+
};
|
|
95412
|
+
},
|
|
95413
|
+
children: [
|
|
95414
|
+
{
|
|
95415
|
+
path: "edit",
|
|
95416
|
+
lazy: () => import("./api-key-management-edit-R44OHS7B.mjs")
|
|
95417
|
+
}
|
|
95418
|
+
]
|
|
95419
|
+
}
|
|
95420
|
+
]
|
|
95421
|
+
},
|
|
95422
|
+
{
|
|
95423
|
+
path: "workflows",
|
|
95424
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95425
|
+
element: /* @__PURE__ */ jsx21(Outlet4, {}),
|
|
95426
|
+
handle: { breadcrumb: () => t("workflowExecutions.domain") },
|
|
95427
|
+
children: [
|
|
95428
|
+
{
|
|
95429
|
+
path: "",
|
|
95430
|
+
lazy: () => import("./workflow-execution-list-HQ3V6TML.mjs")
|
|
95431
|
+
},
|
|
95432
|
+
{
|
|
95433
|
+
path: ":id",
|
|
95434
|
+
lazy: async () => {
|
|
95435
|
+
const { Component, Breadcrumb, loader } = await import("./workflow-execution-detail-LZXCRVNC.mjs");
|
|
95436
|
+
return {
|
|
95437
|
+
Component,
|
|
95438
|
+
loader,
|
|
95439
|
+
handle: {
|
|
95440
|
+
breadcrumb: (match) => /* @__PURE__ */ jsx21(Breadcrumb, { ...match })
|
|
95441
|
+
}
|
|
95442
|
+
};
|
|
95443
|
+
}
|
|
95444
|
+
}
|
|
95445
|
+
]
|
|
95446
|
+
},
|
|
95447
|
+
{
|
|
95448
|
+
path: "translations",
|
|
95449
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95450
|
+
handle: { breadcrumb: () => t("translations.domain") },
|
|
95451
|
+
children: [
|
|
95452
|
+
{
|
|
95453
|
+
path: "",
|
|
95454
|
+
lazy: () => import("./translation-list-CCEQJNED.mjs"),
|
|
95455
|
+
children: [
|
|
95456
|
+
{
|
|
95457
|
+
path: "settings",
|
|
95458
|
+
lazy: () => import("./settings-3XWLL5LG.mjs")
|
|
95459
|
+
}
|
|
95460
|
+
]
|
|
95461
|
+
},
|
|
95462
|
+
{
|
|
95463
|
+
path: "edit",
|
|
95464
|
+
lazy: () => import("./translations-edit-E57GVUFV.mjs")
|
|
95465
|
+
}
|
|
95466
|
+
]
|
|
95467
|
+
}
|
|
95468
|
+
];
|
|
95714
95469
|
function getRouteMap({
|
|
95715
95470
|
settingsRoutes,
|
|
95716
95471
|
coreRoutes
|
|
@@ -95718,15 +95473,15 @@ function getRouteMap({
|
|
|
95718
95473
|
const settingsPluginChildren = mergeSettingsRouteChildren(settingsRoutes);
|
|
95719
95474
|
return [
|
|
95720
95475
|
{
|
|
95721
|
-
element: /* @__PURE__ */
|
|
95722
|
-
errorElement: /* @__PURE__ */
|
|
95476
|
+
element: /* @__PURE__ */ jsx21(ProtectedRoute, {}),
|
|
95477
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95723
95478
|
children: [
|
|
95724
95479
|
{
|
|
95725
|
-
element: /* @__PURE__ */
|
|
95480
|
+
element: /* @__PURE__ */ jsx21(MainLayout, {}),
|
|
95726
95481
|
children: [
|
|
95727
95482
|
{
|
|
95728
95483
|
path: "/",
|
|
95729
|
-
errorElement: /* @__PURE__ */
|
|
95484
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95730
95485
|
lazy: () => import("./home-KNY6I2I2.mjs")
|
|
95731
95486
|
},
|
|
95732
95487
|
...coreRoutes
|
|
@@ -95737,35 +95492,36 @@ function getRouteMap({
|
|
|
95737
95492
|
handle: {
|
|
95738
95493
|
breadcrumb: () => t("app.nav.settings.header")
|
|
95739
95494
|
},
|
|
95740
|
-
element: /* @__PURE__ */
|
|
95495
|
+
element: /* @__PURE__ */ jsx21(SettingsLayout, {}),
|
|
95741
95496
|
children: [
|
|
95742
95497
|
{
|
|
95743
95498
|
index: true,
|
|
95744
|
-
errorElement: /* @__PURE__ */
|
|
95499
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95745
95500
|
lazy: () => import("./settings-QPWN5OOD.mjs")
|
|
95746
95501
|
},
|
|
95502
|
+
...defaultSettingsRouteChildren,
|
|
95747
95503
|
...settingsPluginChildren
|
|
95748
95504
|
]
|
|
95749
95505
|
}
|
|
95750
95506
|
]
|
|
95751
95507
|
},
|
|
95752
95508
|
{
|
|
95753
|
-
element: /* @__PURE__ */
|
|
95509
|
+
element: /* @__PURE__ */ jsx21(PublicLayout, {}),
|
|
95754
95510
|
children: [
|
|
95755
95511
|
{
|
|
95756
|
-
errorElement: /* @__PURE__ */
|
|
95512
|
+
errorElement: /* @__PURE__ */ jsx21(ErrorBoundary, {}),
|
|
95757
95513
|
children: [
|
|
95758
95514
|
{
|
|
95759
95515
|
path: "/login",
|
|
95760
|
-
lazy: () => import("./login-
|
|
95516
|
+
lazy: () => import("./login-GNP3QIPI.mjs")
|
|
95761
95517
|
},
|
|
95762
95518
|
{
|
|
95763
95519
|
path: "/reset-password",
|
|
95764
|
-
lazy: () => import("./reset-password-
|
|
95520
|
+
lazy: () => import("./reset-password-TWRNZO6Z.mjs")
|
|
95765
95521
|
},
|
|
95766
95522
|
{
|
|
95767
95523
|
path: "/invite",
|
|
95768
|
-
lazy: () => import("./invite-
|
|
95524
|
+
lazy: () => import("./invite-XGPZZBUP.mjs")
|
|
95769
95525
|
},
|
|
95770
95526
|
{
|
|
95771
95527
|
path: "*",
|
|
@@ -95926,7 +95682,7 @@ function sortMenuItemsByRank(items) {
|
|
|
95926
95682
|
}
|
|
95927
95683
|
|
|
95928
95684
|
// src/dashboard-app/dashboard-app.tsx
|
|
95929
|
-
import { jsx as
|
|
95685
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
95930
95686
|
var OPTIONAL_LAST_SEGMENT_MATCH = /\/([^\/])+\?$/;
|
|
95931
95687
|
var DashboardApp = class {
|
|
95932
95688
|
constructor({ plugins }) {
|
|
@@ -96032,7 +95788,7 @@ var DashboardApp = class {
|
|
|
96032
95788
|
const navItem = {
|
|
96033
95789
|
label: item.label,
|
|
96034
95790
|
to: item.path,
|
|
96035
|
-
icon: item.icon ? /* @__PURE__ */
|
|
95791
|
+
icon: item.icon ? /* @__PURE__ */ jsx22(item.icon, {}) : void 0,
|
|
96036
95792
|
items: [],
|
|
96037
95793
|
nested: item.nested,
|
|
96038
95794
|
rank: item.rank,
|
|
@@ -96242,7 +95998,7 @@ var DashboardApp = class {
|
|
|
96242
95998
|
const router = createBrowserRouter(routes, {
|
|
96243
95999
|
basename: __BASE__ || "/"
|
|
96244
96000
|
});
|
|
96245
|
-
return /* @__PURE__ */
|
|
96001
|
+
return /* @__PURE__ */ jsx22(Providers, { api: this.api, children: /* @__PURE__ */ jsx22(RouterProvider, { router }) });
|
|
96246
96002
|
}
|
|
96247
96003
|
};
|
|
96248
96004
|
|
|
@@ -96263,7 +96019,7 @@ import {
|
|
|
96263
96019
|
} from "zod";
|
|
96264
96020
|
|
|
96265
96021
|
// src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx
|
|
96266
|
-
import { jsx as
|
|
96022
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
96267
96023
|
|
|
96268
96024
|
// src/dashboard-app/forms/hooks.tsx
|
|
96269
96025
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -96280,7 +96036,7 @@ import i18nModule from "virtual:acmekit/i18n";
|
|
|
96280
96036
|
import menuItemModule from "virtual:acmekit/menu-items";
|
|
96281
96037
|
import routeModule from "virtual:acmekit/routes";
|
|
96282
96038
|
import widgetModule from "virtual:acmekit/widgets";
|
|
96283
|
-
import { jsx as
|
|
96039
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
96284
96040
|
var localPlugin = {
|
|
96285
96041
|
widgetModule,
|
|
96286
96042
|
routeModule,
|
|
@@ -96293,7 +96049,7 @@ function App({ plugins = [] }) {
|
|
|
96293
96049
|
const app = new DashboardApp({
|
|
96294
96050
|
plugins: [localPlugin, ...plugins]
|
|
96295
96051
|
});
|
|
96296
|
-
return /* @__PURE__ */
|
|
96052
|
+
return /* @__PURE__ */ jsx24("div", { children: app.render() });
|
|
96297
96053
|
}
|
|
96298
96054
|
var app_default = App;
|
|
96299
96055
|
export {
|